|
akreon-control
Optimal and robust control and state estimation in C++26.
|
H2 State Observer. More...
#include <h2_state_observer.hpp>
Public Types | |
| using | Model = linalg::remove_cvref_t< ObsModel > |
| extracting alias and types | |
| using | T = plant_type_t< Model > |
| using | QMat = linalg::Matrix< T, StateDim, StateDim > |
| using | WMat = linalg::Matrix< T, StateDim, MeasurementDim > |
| using | LMat = linalg::Matrix< T, StateDim, MeasurementDim > |
| using | ZMat = linalg::Matrix< T, ExogenousDim, ExogenousDim > |
| using | DecVarSpace = linalg::RowVector< T, DecVarDim > |
Public Member Functions | |
| template<convex::AtomLike DecVar> | |
| constexpr auto | operator() (const ObsModel &model, const DecVar &Z_hat, T margin=1e-6) const |
| operator overload to form H2 state observer | |
| template<convex::AtomLike DecVar> | |
| constexpr auto | apply (const ObsModel &model, const DecVar &Z_hat, T margin=1e-6) const |
| apply | |
| template<convex::AtomLike DecVar> | |
| constexpr auto | stability_constraint (const ObsModel &model, const DecVar &Z_hat) const |
| stability_constraint | |
| template<convex::AtomLike DecVar> | |
| constexpr auto | z_constraint (const ObsModel &model, const DecVar &Z_hat, T margin=1e-6) const |
| z_constraint | |
| template<convex::AtomLike DecVar> | |
| constexpr auto | objective (const DecVar &Z_hat) const |
| objective | |
| constexpr auto | L (const QMat &Q, const WMat &W) const |
| L. | |
Static Public Attributes | |
| static constexpr std::size_t | StateDim = plant_traits<Model>::StateDim |
| static constexpr std::size_t | ExogenousDim = plant_traits<Model>::ExogenousDim |
| static constexpr std::size_t | MeasurementDim |
| static constexpr std::size_t | PerformanceDim |
| static constexpr std::size_t | QDim = StateDim * (StateDim + 1) / 2 |
| static constexpr std::size_t | WDim = StateDim * MeasurementDim |
| static constexpr std::size_t | ZDim = ExogenousDim * (ExogenousDim + 1) / 2 |
| static constexpr std::size_t | DecVarDim = QDim + WDim + ZDim |
H2 State Observer.
LDI governed by H2 norm
Given the LTI System with additive disturbance xdot = A x + B_u u + B_w w y = C_y x + D_yw w z_e = C_e e
Observer design hat{xdot} = A hat{x} + B_u u + L(y - C_y hat{x}) e = x - hat{x} edot = (A - L C_y) e + (B_w - L D_yw) w
A_cl = A - L C_y B_cl = B_w - L D_yw
The observability gramian (Q) requirement A_cl^T Q + Q A_cl + C_e^T C_e < 0
The H2 norm squared (total impulse response energy) ||T_{wz_e}||_2^2 = Tr(B_cl^T Q B_cl)
Dimensions: n = state dimension m_w = disturbance input dimension p_y = measurement output dimension p_e = performance output dimension on the estimation error
A : n x n B_w : n x m_w C_y : p_y x n D_yw : p_y x m_w C_e : p_e x n
Decision blocks: Q : n x n W : n x p_y L : n x p_y Z : m_w x m_w DecVar = [svec(Q); vec(W); svec(Z)]
We have a bilinear term in Q L, so let W = Q L where L = Q^{-1} W
H2 objective can be lifted via epigraph with Z Z >= (Q B_w - W D_yw)^T Q^{-1} (Q B_w - W D_yw)
Convex Problem is now min Tr(Z) s.t. A^T Q + Q A - C_y^T W^T - W C_y + C_e^T C_e < 0 [ Z (Q B_w - W D_yw)^T ] >= 0 [ Q B_w - W D_yw Q ]
Shape checks: A^T Q, Q A, C_y^T W^T, W C_y, C_e^T C_e : n x n Q B_w - W D_yw : n x m_w Epigraph LMI : (m_w + n) x (m_w + n)
Definition at line 82 of file h2_state_observer.hpp.
| using control::H2StateObserver< ObsModel >::DecVarSpace = linalg::RowVector<T, DecVarDim> |
Definition at line 105 of file h2_state_observer.hpp.
| using control::H2StateObserver< ObsModel >::LMat = linalg::Matrix<T, StateDim, MeasurementDim> |
Definition at line 97 of file h2_state_observer.hpp.
| using control::H2StateObserver< ObsModel >::Model = linalg::remove_cvref_t<ObsModel> |
extracting alias and types
Definition at line 84 of file h2_state_observer.hpp.
| using control::H2StateObserver< ObsModel >::QMat = linalg::Matrix<T, StateDim, StateDim> |
Definition at line 95 of file h2_state_observer.hpp.
| using control::H2StateObserver< ObsModel >::T = plant_type_t<Model> |
Definition at line 86 of file h2_state_observer.hpp.
| using control::H2StateObserver< ObsModel >::WMat = linalg::Matrix<T, StateDim, MeasurementDim> |
Definition at line 96 of file h2_state_observer.hpp.
| using control::H2StateObserver< ObsModel >::ZMat = linalg::Matrix<T, ExogenousDim, ExogenousDim> |
Definition at line 98 of file h2_state_observer.hpp.
|
inlineconstexpr |
apply
| model | (PlantModel) |
| Z_hat | ([svec(Q); vec(W); svec(Z)]) |
Definition at line 130 of file h2_state_observer.hpp.
References control::is_continuous_v, control::H2StateObserver< ObsModel >::stability_constraint(), and control::H2StateObserver< ObsModel >::z_constraint().
Referenced by control::H2StateObserver< ObsModel >::operator()().
|
inlineconstexpr |
L.
L = Q^{-1} W
| Q | observability gramian |
| W | lifted observer product (W = Q L) |
Definition at line 275 of file h2_state_observer.hpp.
References control::is_continuous_v, and control::recover_state_observer_gain().
|
inlineconstexpr |
objective
min Tr(Z)
| Z_hat | (DecVar) |
Definition at line 260 of file h2_state_observer.hpp.
References control::is_continuous_v.
|
inlineconstexpr |
operator overload to form H2 state observer
| model | (PlantModel) |
| Z_hat | (DecVar) |
Definition at line 116 of file h2_state_observer.hpp.
References control::H2StateObserver< ObsModel >::apply(), and control::is_continuous_v.
|
inlineconstexpr |
stability_constraint
Stability constraint on LMI: A^T Q + Q A - C_y^T W^T - W C_y + C_e^T C_e < 0
| model | (PlantModel) |
| Z_hat | (Dec Var) |
Definition at line 156 of file h2_state_observer.hpp.
References control::is_continuous_v, control::H2StateObserver< ObsModel >::QDim, and control::H2StateObserver< ObsModel >::WDim.
Referenced by control::H2StateObserver< ObsModel >::apply().
|
inlineconstexpr |
z_constraint
PSD constraint on Z (epigraph) [ Z (Q B_w - W D_yw)^T ] >= 0 [ Q B_w - W D_yw Q ]
FMat Dim (m+n x m+n) [ mxm mxn ] [ nxm nxn ]
| model | (PlantModel) |
| Z_hat | (DecVar) |
| margin | for PD |
Definition at line 204 of file h2_state_observer.hpp.
References control::EXOGENOUS, control::H2StateObserver< ObsModel >::ExogenousDim, control::is_continuous_v, control::MEASUREMENT, control::H2StateObserver< ObsModel >::QDim, control::H2StateObserver< ObsModel >::StateDim, control::H2StateObserver< ObsModel >::WDim, and control::H2StateObserver< ObsModel >::ZDim.
Referenced by control::H2StateObserver< ObsModel >::apply().
|
staticconstexpr |
Definition at line 103 of file h2_state_observer.hpp.
|
staticconstexpr |
Definition at line 89 of file h2_state_observer.hpp.
Referenced by control::H2StateObserver< ObsModel >::z_constraint().
|
staticconstexpr |
Definition at line 90 of file h2_state_observer.hpp.
|
staticconstexpr |
Definition at line 92 of file h2_state_observer.hpp.
|
staticconstexpr |
Definition at line 100 of file h2_state_observer.hpp.
Referenced by control::H2StateObserver< ObsModel >::stability_constraint(), and control::H2StateObserver< ObsModel >::z_constraint().
|
staticconstexpr |
Definition at line 88 of file h2_state_observer.hpp.
Referenced by control::H2StateObserver< ObsModel >::z_constraint().
|
staticconstexpr |
Definition at line 101 of file h2_state_observer.hpp.
Referenced by control::H2StateObserver< ObsModel >::stability_constraint(), and control::H2StateObserver< ObsModel >::z_constraint().
|
staticconstexpr |
Definition at line 102 of file h2_state_observer.hpp.
Referenced by control::H2StateObserver< ObsModel >::z_constraint().