A structure to facilitate passing the myriad of optional arguments to the FiniteHorizonLinearQuadraticRegulator algorithms.
#include <drake/systems/controllers/finite_horizon_linear_quadratic_regulator.h>
Public Member Functions | |
FiniteHorizonLinearQuadraticRegulatorOptions ()=default | |
Public Attributes | |
std::optional< Eigen::MatrixXd > | Qf |
A num_states x num_states positive semi-definite matrix which specified the cost at the final time. More... | |
std::optional< Eigen::MatrixXd > | N |
A num_states x num_inputs matrix that describes the running cost 2(x-xd(t))'N(u-ud(t)). More... | |
const trajectories::Trajectory< double > * | x0 {nullptr} |
A nominal state trajectory. More... | |
const trajectories::Trajectory< double > * | u0 {nullptr} |
A nominal input trajectory. More... | |
const trajectories::Trajectory< double > * | xd {nullptr} |
A desired state trajectory. More... | |
const trajectories::Trajectory< double > * | ud {nullptr} |
A desired input trajectory. More... | |
std::variant< systems::InputPortSelection, InputPortIndex > | input_port_index |
For systems with multiple input ports, we must specify which input port is being used in the control design. More... | |
bool | use_square_root_method {false} |
Enables the "square-root" method solution to the Riccati equation. More... | |
SimulatorConfig | simulator_config {} |
For continuous-time dynamical systems, the Riccati equation is solved by the Simulator (running backwards in time). More... | |
|
default |
std::variant<systems::InputPortSelection, InputPortIndex> input_port_index |
For systems with multiple input ports, we must specify which input port is being used in the control design.
std::optional<Eigen::MatrixXd> N |
A num_states x num_inputs matrix that describes the running cost 2(x-xd(t))'N(u-ud(t)).
If unset, then N will be set to the zero matrix.
std::optional<Eigen::MatrixXd> Qf |
A num_states x num_states positive semi-definite matrix which specified the cost at the final time.
If unset, then Qf will be set to the zero matrix.
SimulatorConfig simulator_config {} |
For continuous-time dynamical systems, the Riccati equation is solved by the Simulator (running backwards in time).
Use this parameter to configure the simulator (e.g. choose non-default integrator or integrator parameters).
const trajectories::Trajectory<double>* u0 {nullptr} |
A nominal input trajectory.
The system is linearized about this trajectory. u0 must be defined over the entire interval, [t0, tf]. If null, then u0 is taken to be a constant trajectory (whose value is specified by the context passed into the LQR method).
const trajectories::Trajectory<double>* ud {nullptr} |
A desired input trajectory.
The objective is to regulate to this trajectory – the input component of the quadratic running cost is (u-ud(t))'R(u-ud(t)). If null, then ud(t) = u0(t).
bool use_square_root_method {false} |
Enables the "square-root" method solution to the Riccati equation.
This is slightly more expensive and potentially less numerically accurate (errors are bounded on the square root), but is more numerically robust. When true
, then you must also set a (positive definite and symmetric) Qf in this options struct.
const trajectories::Trajectory<double>* x0 {nullptr} |
A nominal state trajectory.
The system is linearized about this trajectory. x0 must be defined over the entire interval [t0, tf]. If null, then x0 is taken to be a constant trajectory (whose value is specified by the context passed into the LQR method).
const trajectories::Trajectory<double>* xd {nullptr} |
A desired state trajectory.
The objective is to regulate to this trajectory – the state component of the quadratic running cost is (x-xd(t))'Q(x-xd(t)) and the final cost is (x-xd(t))'Qf(x-xd(t)). If null, then xd(t) = x0(t).