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

StateFeedback. More...

#include <state_feedback.hpp>

Public Types

using Model = linalg::remove_cvref_t< SFModel >
 extracting alias and types
 
using T = plant_type_t< Model >
 
using State = plant_state_vec_t< Model >
 
using PMat = linalg::Matrix< T, StateDim, StateDim >
 
using YMat = linalg::Matrix< T, InputDim, StateDim >
 
using KMat = linalg::Matrix< T, InputDim, StateDim >
 
using FMat = PMat
 
using ZSpace = linalg::RowVector< T, ZDim >
 
using Fs = linalg::Vector< FMat, ZDim >
 

Public Member Functions

template<convex::AtomLike ZVar>
constexpr auto operator() (const SFModel &model, const ZVar &Z, T margin=1e-6) const
 operator overload (form state feedback)
 
template<convex::AtomLike ZVar>
constexpr auto apply (const SFModel &model, const ZVar &Z, T margin=1e-6) const
 apply
 
template<convex::AtomLike ZVar>
constexpr auto p_constraint (const ZVar &Z, T margin=1e-6) const
 p_constraint
 
template<convex::AtomLike ZVar>
constexpr auto stability_constraint (const SFModel &model, const ZVar &Z) const
 stability_constraint
 
constexpr auto K (const PMat &P, 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 PDim = StateDim * (StateDim + 1) / 2
 
static constexpr std::size_t YDim = InputDim * StateDim
 
static constexpr std::size_t ZDim = PDim + YDim
 

Detailed Description

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

StateFeedback.

Linear Differential Inclusion (LDI) State Feedback Given the LTI system xdot = A x + B_u u

We seek a static state-feedback u = K x

such that the closed-loop system is quadratically stable.

There exists S > 0 such that (A + B_u K)^T S + S (A + B_u K) < 0

Equivalently, letting P = S^{-1} > 0, P (A + B_u K)^T + (A + B_u K) P < 0

This is bilinear in P and K, so define Y = K P hence K = Y P^{-1}

The problem is represented over the merged decision variable z = [ svec(P); vec(Y) ].

Definition at line 48 of file state_feedback.hpp.

Member Typedef Documentation

◆ FMat

template<ContinuousPlantModelLike SFModel>
using control::StateFeedback< SFModel >::FMat = PMat

Definition at line 61 of file state_feedback.hpp.

◆ Fs

template<ContinuousPlantModelLike SFModel>
using control::StateFeedback< SFModel >::Fs = linalg::Vector<FMat, ZDim>

Definition at line 68 of file state_feedback.hpp.

◆ KMat

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

Definition at line 60 of file state_feedback.hpp.

◆ Model

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

extracting alias and types

Definition at line 50 of file state_feedback.hpp.

◆ PMat

template<ContinuousPlantModelLike SFModel>
using control::StateFeedback< SFModel >::PMat = linalg::Matrix<T, StateDim, StateDim>

Definition at line 58 of file state_feedback.hpp.

◆ State

template<ContinuousPlantModelLike SFModel>
using control::StateFeedback< SFModel >::State = plant_state_vec_t<Model>

Definition at line 53 of file state_feedback.hpp.

◆ T

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

Definition at line 52 of file state_feedback.hpp.

◆ YMat

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

Definition at line 59 of file state_feedback.hpp.

◆ ZSpace

template<ContinuousPlantModelLike SFModel>
using control::StateFeedback< SFModel >::ZSpace = linalg::RowVector<T, ZDim>

Definition at line 67 of file state_feedback.hpp.

Member Function Documentation

◆ apply()

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

apply

Parameters
model(StateSpace)
Z(dec var [svec(P); vec(Y)])
margin(for PD)
Returns
state-feedback synthesis constraints

Definition at line 94 of file state_feedback.hpp.

References control::is_continuous_v, control::StateFeedback< SFModel >::p_constraint(), and control::StateFeedback< SFModel >::stability_constraint().

Referenced by control::StateFeedback< SFModel >::operator()().

◆ K()

template<ContinuousPlantModelLike SFModel>
constexpr auto control::StateFeedback< SFModel >::K ( const PMat &  P,
const YMat &  Y 
) const
inlineconstexpr

K.

K = Y P^{-1}

Parameters
P(PMat)
Y(YMat)
Returns
K

Definition at line 174 of file state_feedback.hpp.

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

◆ operator()()

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

operator overload (form state feedback)

Parameters
model(StateSpace)
Z(dec var [svec(P); vec(Y)])
Returns
state-feedback synthesis constraints

Definition at line 79 of file state_feedback.hpp.

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

◆ p_constraint()

template<ContinuousPlantModelLike SFModel>
template<convex::AtomLike ZVar>
constexpr auto control::StateFeedback< SFModel >::p_constraint ( const ZVar &  Z,
T  margin = 1e-6 
) const
inlineconstexpr

p_constraint

Parameters
Z(dec var)
margin(PD)
Returns
P constraint as LMI

Definition at line 118 of file state_feedback.hpp.

References control::is_continuous_v, control::StateFeedback< SFModel >::PDim, and control::StateFeedback< SFModel >::YDim.

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

◆ stability_constraint()

template<ContinuousPlantModelLike SFModel>
template<convex::AtomLike ZVar>
constexpr auto control::StateFeedback< SFModel >::stability_constraint ( const SFModel &  model,
const ZVar &  Z 
) const
inlineconstexpr

stability_constraint

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

Definition at line 140 of file state_feedback.hpp.

References control::is_continuous_v, control::StateFeedback< SFModel >::PDim, and control::StateFeedback< SFModel >::YDim.

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

Member Data Documentation

◆ InputDim

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

Definition at line 56 of file state_feedback.hpp.

◆ PDim

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

◆ StateDim

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

Definition at line 55 of file state_feedback.hpp.

◆ YDim

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

◆ ZDim

template<ContinuousPlantModelLike SFModel>
constexpr std::size_t control::StateFeedback< SFModel >::ZDim = PDim + YDim
staticconstexpr

Definition at line 65 of file state_feedback.hpp.


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