akreon-control
Optimal and robust control and state estimation in C++26.
Loading...
Searching...
No Matches
control::H2StateFeedback< SFModel > Struct Template Reference

H2 State Feedback. More...

#include <h2_state_feedback.hpp>

Public Types

using Model = linalg::remove_cvref_t< SFModel >
 extracting alias and types
 
using T = plant_type_t< Model >
 
using QMat = linalg::Matrix< T, StateDim, StateDim >
 
using YMat = linalg::Matrix< T, InputDim, StateDim >
 
using KMat = linalg::Matrix< T, InputDim, StateDim >
 
using ZMat = linalg::Matrix< T, OutputDim, OutputDim >
 
using DecVarSpace = linalg::RowVector< T, DecVarDim >
 

Public Member Functions

template<convex::AtomLike DecVar>
constexpr auto operator() (const SFModel &model, const DecVar &Z_hat, T margin=1e-6) const
 operator overload to form H2 state feedback
 
template<convex::AtomLike DecVar>
constexpr auto apply (const SFModel &model, const DecVar &Z_hat, T margin=1e-6) const
 apply
 
template<convex::AtomLike DecVar>
constexpr auto stability_constraint (const SFModel &model, const DecVar &Z_hat) const
 stability_constraint
 
template<convex::AtomLike DecVar>
constexpr auto z_constraint (const SFModel &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 K (const QMat &Q, const YMat &Y) const
 K.
 

Static Public Attributes

static constexpr std::size_t StateDim = plant_traits<Model>::StateDim
 
static constexpr std::size_t InputDim = plant_traits<Model>::ControlDim
 
static constexpr std::size_t OutputDim = plant_traits<Model>::PerformanceDim
 
static constexpr std::size_t QDim = StateDim * (StateDim + 1) / 2
 
static constexpr std::size_t YDim = InputDim * StateDim
 
static constexpr std::size_t ZDim = OutputDim * (OutputDim + 1) / 2
 
static constexpr std::size_t DecVarDim = QDim + YDim + ZDim
 

Detailed Description

template<ContinuousPlantModelLike SFModel>
struct control::H2StateFeedback< SFModel >

H2 State Feedback.

LDI governed by H2 norm

Given the LTI System with additive disturbance xdot = A x + B_u u + B_w w y = C x + D_u u

We seek a static feedback controller u = Kx s.t. xdot = (A + B_u K) x + B_w w... where (A + B_u K) is the cled loop Plant y = (C + D_u K) x... where (C + D_u K) is the closed loop performance output

The controllability gramian (Q) requirement A_cl Q + Q A_cl^T + Bw Bw^T < 0

The H2 norm squared (total impulse response energy) ||T_{wz}||_2^2 = Tr(C_cl Q C_cl^T)

Dimensions: n = state dimension m_u = control input dimension m_w = disturbance input dimension p_z = performance output dimension

A : n x n B_u : n x m_u B_w : n x m_w C_z : p_z x n D_u : p_z x m_u

Decision blocks: Q : n x n, synthesis Lyapunov/Gramian variable Y : m_u x n K : m_u x n Z : p_z x p_z DecVar = [svec(Q); vec(Y); svec(Z)]

We have a bilinear term in K Q, so let Y = K Q where K = Y Q^-1

H2 objective can be lifted via epigraph with Z Z >= (C Q + D_u Y) Q^{-1} (C Q + Du Y)^T

Convex Problem is now min Tr(Z) s.t. A Q + Q A^T + B_u Y + Y^T B_u^T + B_w B_w^T < 0 [ Z C Q + Du Y ] >= 0 [ (C Q + Du Y)^T Q ]

Shape checks: A Q, Q A^T, B_u Y, Y^T B_u^T, B_w B_w^T : n x n C_z Q + D_u Y : p_z x n Epigraph LMI : (p_z + n) x (p_z + n)

Definition at line 77 of file h2_state_feedback.hpp.

Member Typedef Documentation

◆ DecVarSpace

template<ContinuousPlantModelLike SFModel>
using control::H2StateFeedback< SFModel >::DecVarSpace = linalg::RowVector<T, DecVarDim>

Definition at line 97 of file h2_state_feedback.hpp.

◆ KMat

template<ContinuousPlantModelLike SFModel>
using control::H2StateFeedback< SFModel >::KMat = linalg::Matrix<T, InputDim, StateDim>

Definition at line 89 of file h2_state_feedback.hpp.

◆ Model

template<ContinuousPlantModelLike SFModel>
using control::H2StateFeedback< SFModel >::Model = linalg::remove_cvref_t<SFModel>

extracting alias and types

Definition at line 79 of file h2_state_feedback.hpp.

◆ QMat

template<ContinuousPlantModelLike SFModel>
using control::H2StateFeedback< SFModel >::QMat = linalg::Matrix<T, StateDim, StateDim>

Definition at line 87 of file h2_state_feedback.hpp.

◆ T

template<ContinuousPlantModelLike SFModel>
using control::H2StateFeedback< SFModel >::T = plant_type_t<Model>

Definition at line 81 of file h2_state_feedback.hpp.

◆ YMat

template<ContinuousPlantModelLike SFModel>
using control::H2StateFeedback< SFModel >::YMat = linalg::Matrix<T, InputDim, StateDim>

Definition at line 88 of file h2_state_feedback.hpp.

◆ ZMat

template<ContinuousPlantModelLike SFModel>
using control::H2StateFeedback< SFModel >::ZMat = linalg::Matrix<T, OutputDim, OutputDim>

Definition at line 90 of file h2_state_feedback.hpp.

Member Function Documentation

◆ apply()

template<ContinuousPlantModelLike SFModel>
template<convex::AtomLike DecVar>
constexpr auto control::H2StateFeedback< SFModel >::apply ( const SFModel &  model,
const DecVar &  Z_hat,
T  margin = 1e-6 
) const
inlineconstexpr

◆ K()

template<ContinuousPlantModelLike SFModel>
constexpr auto control::H2StateFeedback< SFModel >::K ( const QMat &  Q,
const YMat &  Y 
) const
inlineconstexpr

K.

K = Y Q^{-1}

Parameters
Qcontrollability gramian
Ylifted feedback product Y = K Q
Returns
K

Definition at line 267 of file h2_state_feedback.hpp.

References control::is_continuous_v, and control::recover_state_feedback_gain().

◆ objective()

template<ContinuousPlantModelLike SFModel>
template<convex::AtomLike DecVar>
constexpr auto control::H2StateFeedback< SFModel >::objective ( const DecVar &  Z_hat) const
inlineconstexpr

objective

min Tr(Z)

Parameters
Z_hat(DecVar)
Returns
Tr(Z)

Definition at line 252 of file h2_state_feedback.hpp.

References control::is_continuous_v.

◆ operator()()

template<ContinuousPlantModelLike SFModel>
template<convex::AtomLike DecVar>
constexpr auto control::H2StateFeedback< SFModel >::operator() ( const SFModel &  model,
const DecVar &  Z_hat,
T  margin = 1e-6 
) const
inlineconstexpr

operator overload to form H2 state feedback

Parameters
model(PlantModel)
Z_hat(DecVar)
Returns
H2 LMIs

Definition at line 108 of file h2_state_feedback.hpp.

References control::H2StateFeedback< SFModel >::apply(), and control::is_continuous_v.

◆ stability_constraint()

template<ContinuousPlantModelLike SFModel>
template<convex::AtomLike DecVar>
constexpr auto control::H2StateFeedback< SFModel >::stability_constraint ( const SFModel &  model,
const DecVar &  Z_hat 
) const
inlineconstexpr

stability_constraint

Stability constraint on LMI: A Q + Q A^T + B_u Y + Y^T B_u^T + B_w B_w^T < 0

Parameters
model(PlantModel)
Z_hat(Dec Var)
Returns
stability constraint as LMI

Definition at line 148 of file h2_state_feedback.hpp.

References control::is_continuous_v, control::H2StateFeedback< SFModel >::QDim, and control::H2StateFeedback< SFModel >::YDim.

Referenced by control::H2StateFeedback< SFModel >::apply().

◆ z_constraint()

template<ContinuousPlantModelLike SFModel>
template<convex::AtomLike DecVar>
constexpr auto control::H2StateFeedback< SFModel >::z_constraint ( const SFModel &  model,
const DecVar &  Z_hat,
T  margin = 1e-6 
) const
inlineconstexpr

z_constraint

PSD constraint on Z (epigraph) [ Z C Q + Du Y ] >= 0 [ (C Q + Du Y)^T Q ]

FMat Dim (p+n x p+n) [ pxp pxn ] [ nxp nxn ]

Parameters
model(PlantModel)
Z_hat(DecVar)
marginfor PD
Returns
Z constraint as LMI

Definition at line 196 of file h2_state_feedback.hpp.

References control::is_continuous_v, control::H2StateFeedback< SFModel >::OutputDim, control::H2StateFeedback< SFModel >::QDim, control::H2StateFeedback< SFModel >::StateDim, control::H2StateFeedback< SFModel >::YDim, and control::H2StateFeedback< SFModel >::ZDim.

Referenced by control::H2StateFeedback< SFModel >::apply().

Member Data Documentation

◆ DecVarDim

template<ContinuousPlantModelLike SFModel>
constexpr std::size_t control::H2StateFeedback< SFModel >::DecVarDim = QDim + YDim + ZDim
staticconstexpr

Definition at line 95 of file h2_state_feedback.hpp.

◆ InputDim

template<ContinuousPlantModelLike SFModel>
constexpr std::size_t control::H2StateFeedback< SFModel >::InputDim = plant_traits<Model>::ControlDim
staticconstexpr

Definition at line 84 of file h2_state_feedback.hpp.

◆ OutputDim

template<ContinuousPlantModelLike SFModel>
constexpr std::size_t control::H2StateFeedback< SFModel >::OutputDim = plant_traits<Model>::PerformanceDim
staticconstexpr

◆ QDim

template<ContinuousPlantModelLike SFModel>
constexpr std::size_t control::H2StateFeedback< SFModel >::QDim = StateDim * (StateDim + 1) / 2
staticconstexpr

◆ StateDim

template<ContinuousPlantModelLike SFModel>
constexpr std::size_t control::H2StateFeedback< SFModel >::StateDim = plant_traits<Model>::StateDim
staticconstexpr

◆ YDim

template<ContinuousPlantModelLike SFModel>
constexpr std::size_t control::H2StateFeedback< SFModel >::YDim = InputDim * StateDim
staticconstexpr

◆ ZDim

template<ContinuousPlantModelLike SFModel>
constexpr std::size_t control::H2StateFeedback< SFModel >::ZDim = OutputDim * (OutputDim + 1) / 2
staticconstexpr

The documentation for this struct was generated from the following file: