![]() |
- 3.0.2 optimal control module.
|
Finite-Horizon Discrete Time LQR. More...
#include <FHDTLQR.hpp>
Public Types | |
| typedef Eigen::Matrix< SCALAR, STATE_DIM, STATE_DIM > | state_matrix_t |
| typedef Eigen::Matrix< SCALAR, CONTROL_DIM, CONTROL_DIM > | control_matrix_t |
| typedef Eigen::Matrix< SCALAR, CONTROL_DIM, STATE_DIM > | control_state_matrix_t |
| typedef Eigen::Matrix< SCALAR, STATE_DIM, CONTROL_DIM > | control_gain_matrix_t |
| typedef Eigen::Matrix< SCALAR, CONTROL_DIM, STATE_DIM > | control_feedback_t |
| typedef core::StateVectorArray< STATE_DIM, SCALAR > | state_vector_array_t |
| typedef core::ControlVectorArray< CONTROL_DIM, SCALAR > | control_vector_array_t |
| typedef ct::core::StateMatrixArray< STATE_DIM, SCALAR > | state_matrix_array_t |
| typedef ct::core::FeedbackArray< STATE_DIM, CONTROL_DIM, SCALAR > | control_feedback_array_t |
| typedef ct::core::StateControlMatrixArray< STATE_DIM, CONTROL_DIM, SCALAR > | control_gain_matrix_array_t |
Public Member Functions | |
| FHDTLQR (std::shared_ptr< CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >> costFunction) | |
| Constructor. More... | |
| ~FHDTLQR () | |
| void | designController (const state_vector_array_t &x_trajectory, const control_vector_array_t &u_trajectory, const state_matrix_array_t &A, const control_gain_matrix_array_t &B, SCALAR dt, control_feedback_array_t &K, bool performNumericalChecks=true) |
| design a time-varying feedback trajectory using user-provided matrices A and B More... | |
| void | designController (const state_vector_array_t &x_trajectory, const control_vector_array_t &u_trajectory, std::shared_ptr< core::LinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >> derivatives, SCALAR dt, control_feedback_array_t &K, bool performNumericalChecks=true) |
| design a time-varying feedback trajectory using a user-provided derivative-pointer More... | |
Public Attributes | |
| EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef core::ControlVector< CONTROL_DIM, SCALAR > | control_vector_t |
Finite-Horizon Discrete Time LQR.
compute the finite-horizon discrete time LQR solution (Example: stabilize a linear time-varying system about a trajectory). The user can either provide the linearized system matrices, or alternatively a pointer to a derivatives instance
The feedback law has form
| STATE_DIM | system state dimension |
| CONTROL_DIM | system input dimension |
| typedef Eigen::Matrix<SCALAR, STATE_DIM, STATE_DIM> ct::optcon::FHDTLQR< STATE_DIM, CONTROL_DIM, SCALAR >::state_matrix_t |
| typedef Eigen::Matrix<SCALAR, CONTROL_DIM, CONTROL_DIM> ct::optcon::FHDTLQR< STATE_DIM, CONTROL_DIM, SCALAR >::control_matrix_t |
| typedef Eigen::Matrix<SCALAR, CONTROL_DIM, STATE_DIM> ct::optcon::FHDTLQR< STATE_DIM, CONTROL_DIM, SCALAR >::control_state_matrix_t |
| typedef Eigen::Matrix<SCALAR, STATE_DIM, CONTROL_DIM> ct::optcon::FHDTLQR< STATE_DIM, CONTROL_DIM, SCALAR >::control_gain_matrix_t |
| typedef Eigen::Matrix<SCALAR, CONTROL_DIM, STATE_DIM> ct::optcon::FHDTLQR< STATE_DIM, CONTROL_DIM, SCALAR >::control_feedback_t |
| typedef core::StateVectorArray<STATE_DIM, SCALAR> ct::optcon::FHDTLQR< STATE_DIM, CONTROL_DIM, SCALAR >::state_vector_array_t |
| typedef core::ControlVectorArray<CONTROL_DIM, SCALAR> ct::optcon::FHDTLQR< STATE_DIM, CONTROL_DIM, SCALAR >::control_vector_array_t |
| typedef ct::core::StateMatrixArray<STATE_DIM, SCALAR> ct::optcon::FHDTLQR< STATE_DIM, CONTROL_DIM, SCALAR >::state_matrix_array_t |
| typedef ct::core::FeedbackArray<STATE_DIM, CONTROL_DIM, SCALAR> ct::optcon::FHDTLQR< STATE_DIM, CONTROL_DIM, SCALAR >::control_feedback_array_t |
| typedef ct::core::StateControlMatrixArray<STATE_DIM, CONTROL_DIM, SCALAR> ct::optcon::FHDTLQR< STATE_DIM, CONTROL_DIM, SCALAR >::control_gain_matrix_array_t |
| ct::optcon::FHDTLQR< STATE_DIM, CONTROL_DIM, SCALAR >::FHDTLQR | ( | std::shared_ptr< CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >> | costFunction | ) |
Constructor.
| costFunction | the cost function to be used for designing the TVLQR |
| ct::optcon::FHDTLQR< STATE_DIM, CONTROL_DIM, SCALAR >::~FHDTLQR | ( | ) |
| void ct::optcon::FHDTLQR< STATE_DIM, CONTROL_DIM, SCALAR >::designController | ( | const state_vector_array_t & | x_trajectory, |
| const control_vector_array_t & | u_trajectory, | ||
| const state_matrix_array_t & | A, | ||
| const control_gain_matrix_array_t & | B, | ||
| SCALAR | dt, | ||
| control_feedback_array_t & | K, | ||
| bool | performNumericalChecks = true |
||
| ) |
design a time-varying feedback trajectory using user-provided matrices A and B
| x_trajectory | state reference trajectory |
| u_trajectory | control reference trajectory |
| A | trajectory of system matrices A = df/dx |
| B | trajectory of system matrices B = df/du |
| dt | sampling time |
| K | trajectory of resulting control feedback arrays |
| performNumericalChecks | (optional) perform some numerical checks while solving for K |
| void ct::optcon::FHDTLQR< STATE_DIM, CONTROL_DIM, SCALAR >::designController | ( | const state_vector_array_t & | x_trajectory, |
| const control_vector_array_t & | u_trajectory, | ||
| std::shared_ptr< core::LinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >> | derivatives, | ||
| SCALAR | dt, | ||
| control_feedback_array_t & | K, | ||
| bool | performNumericalChecks = true |
||
| ) |
design a time-varying feedback trajectory using a user-provided derivative-pointer
| x_trajectory | state reference trajectory |
| u_trajectory | control reference trajectory |
| derivatives | shared_ptr to a LinearSystem, allowing to compute A and B |
| dt | sampling time |
| K | trajectory of resulting control feedback arrays |
| performNumericalChecks | (optional) perform some numerical checks while solving for K |
| EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef core::ControlVector<CONTROL_DIM, SCALAR> ct::optcon::FHDTLQR< STATE_DIM, CONTROL_DIM, SCALAR >::control_vector_t |