robotoc
robotoc - efficient ROBOT Optimal Control solvers
Loading...
Searching...
No Matches
riccati_recursion.hpp
Go to the documentation of this file.
1#ifndef ROBOTOC_RICCATI_RECURSION_HPP_
2#define ROBOTOC_RICCATI_RECURSION_HPP_
3
4#include "Eigen/Core"
5
14#include "robotoc/ocp/ocp.hpp"
16
17
18namespace robotoc {
19
27public:
35 RiccatiRecursion(const OCP& ocp, const double max_dts0=0.1);
36
41
45 ~RiccatiRecursion() = default;
46
51
56
60 RiccatiRecursion(RiccatiRecursion&&) noexcept = default;
61
65 RiccatiRecursion& operator=(RiccatiRecursion&&) noexcept = default;
66
73 void setRegularization(const double max_dts0);
74
82 void backwardRiccatiRecursion(const TimeDiscretization& time_discretization,
83 KKTMatrix& kkt_matrix,
84 KKTResidual& kkt_residual,
85 RiccatiFactorization& factorization);
86
95 void forwardRiccatiRecursion(const TimeDiscretization& time_discretization,
96 const KKTMatrix& kkt_matrix,
97 const KKTResidual& kkt_residual,
98 const RiccatiFactorization& factorization,
99 Direction& d) const;
100
106
111 void resizeData(const TimeDiscretization& time_discretization);
112
113private:
114 RiccatiFactorizer factorizer_;
115 aligned_vector<LQRPolicy> lqr_policy_;
116 aligned_vector<STOPolicy> sto_policy_;
117 SplitRiccatiFactorization factorization_m_;
118
119};
120
121} // namespace robotoc
122
123#endif // ROBOTkeps_OC_RICCATI_RECURSION_HPP_
The state feedback and feedforward policy of LQR subproblem at a time stage.
Definition: lqr_policy.hpp:16
Riccati factorizer.
Definition: riccati_factorizer.hpp:28
Riccati recursion solver for optimal control problems. Solves the KKT system in linear time complexit...
Definition: riccati_recursion.hpp:26
const aligned_vector< LQRPolicy > & getLQRPolicy() const
Gets of the LQR policies over the horizon.
void setRegularization(const double max_dts0)
Sets the regularization on the STO.
RiccatiRecursion()
Default constructor.
RiccatiRecursion(RiccatiRecursion &&) noexcept=default
Default move constructor.
void forwardRiccatiRecursion(const TimeDiscretization &time_discretization, const KKTMatrix &kkt_matrix, const KKTResidual &kkt_residual, const RiccatiFactorization &factorization, Direction &d) const
Performs the backward Riccati recursion.
~RiccatiRecursion()=default
Destructor.
RiccatiRecursion(const RiccatiRecursion &)=default
Default copy constructor.
RiccatiRecursion(const OCP &ocp, const double max_dts0=0.1)
Construct a Riccati recursion solver.
void backwardRiccatiRecursion(const TimeDiscretization &time_discretization, KKTMatrix &kkt_matrix, KKTResidual &kkt_residual, RiccatiFactorization &factorization)
Performs the backward Riccati recursion.
RiccatiRecursion & operator=(const RiccatiRecursion &)=default
Default copy operator.
void resizeData(const TimeDiscretization &time_discretization)
Resizes the internal data.
The state feedback and feedforward policy of the switching time optimization (STO).
Definition: sto_policy.hpp:16
Riccati factorization matrix and vector for a time stage.
Definition: split_riccati_factorization.hpp:15
Time discretization of the optimal control problem.
Definition: time_discretization.hpp:20
Definition: constraint_component_base.hpp:17
aligned_vector< SplitKKTMatrix > KKTMatrix
The KKT matrix of the optimal control problem.
Definition: kkt_matrix.hpp:16
aligned_vector< SplitDirection > Direction
Newton direction of the solution to the optimal control problem.
Definition: direction.hpp:16
std::vector< T, Eigen::aligned_allocator< T > > aligned_vector
std vector with Eigen::aligned_allocator.
Definition: aligned_vector.hpp:14
aligned_vector< SplitKKTResidual > KKTResidual
The KKT residual of the optimal control problem.
Definition: kkt_residual.hpp:16
aligned_vector< SplitRiccatiFactorization > RiccatiFactorization
Riccati factorization matices of the LQR subproblem.
Definition: riccati_factorization.hpp:16
The optimal control problem.
Definition: ocp.hpp:22