akreon-control
Optimal and robust control and state estimation in C++26.
Loading...
Searching...
No Matches
control::PolytopicObserver< Plant, N > Struct Template Reference

Polytopic Luenberger Observer. More...

#include <polytopic_observer.hpp>

Public Types

using Model = linalg::remove_cvref_t< Plant >
 
using T = plant_type_t< Model >
 
using State = plant_state_vec_t< Model >
 
using QMat = linalg::Matrix< T, StateDim, StateDim >
 
using WMat = linalg::Matrix< T, StateDim, OutputDim >
 
using LMat = linalg::Matrix< T, StateDim, OutputDim >
 
using FMat = QMat
 
using ZSpace = linalg::RowVector< T, ZDim >
 
using Fs = linalg::Vector< FMat, ZDim >
 
using Polytope = linalg::Vector< Plant, N >
 

Public Member Functions

template<convex::AtomLike Var>
constexpr auto operator() (const Polytope &poly, const Var &Z, T margin=1e-6) const
 operator overload (polytopic observer)
 
template<convex::AtomLike Var>
constexpr auto apply (const Polytope &poly, const Var &Z, T margin=1e-6) const
 apply
 
template<convex::AtomLike ZVar>
constexpr auto q_constraint (const ZVar &Z, T margin=1e-6) const
 q_constraint
 
template<convex::AtomLike ZVar>
constexpr auto vertex_constraint (const Plant &plant, const ZVar &Z) const
 vertex constraint
 
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 OutputDim = plant_traits<Model>::MeasurementDim
 
static constexpr std::size_t QDim = StateDim * (StateDim + 1) / 2
 
static constexpr std::size_t WDim = OutputDim * StateDim
 
static constexpr std::size_t ZDim = QDim + WDim
 

Detailed Description

template<ContinuousPlantModelLike Plant, std::size_t N>
struct control::PolytopicObserver< Plant, N >

Polytopic Luenberger Observer.

Given xdot = A(t) x + B(t) u y = C(t) x

design a state observer xhatdot = A(t) xhat + B(t) u + L (y - C(t) xhat)

s.t. the estimation error e = x - xhat satisfies edot = (A(t) - L C(t)) e

There exists Q > 0 s.t. A_i^T Q + Q A_i - W C_i - C_i^T W^T < 0

where W = Q L, and L = Q^{-1} W.

Definition at line 41 of file polytopic_observer.hpp.

Member Typedef Documentation

◆ FMat

template<ContinuousPlantModelLike Plant, std::size_t N>
using control::PolytopicObserver< Plant, N >::FMat = QMat

Definition at line 53 of file polytopic_observer.hpp.

◆ Fs

template<ContinuousPlantModelLike Plant, std::size_t N>
using control::PolytopicObserver< Plant, N >::Fs = linalg::Vector<FMat, ZDim>

Definition at line 60 of file polytopic_observer.hpp.

◆ LMat

template<ContinuousPlantModelLike Plant, std::size_t N>
using control::PolytopicObserver< Plant, N >::LMat = linalg::Matrix<T, StateDim, OutputDim>

Definition at line 52 of file polytopic_observer.hpp.

◆ Model

template<ContinuousPlantModelLike Plant, std::size_t N>
using control::PolytopicObserver< Plant, N >::Model = linalg::remove_cvref_t<Plant>

Definition at line 42 of file polytopic_observer.hpp.

◆ Polytope

template<ContinuousPlantModelLike Plant, std::size_t N>
using control::PolytopicObserver< Plant, N >::Polytope = linalg::Vector<Plant, N>

Definition at line 61 of file polytopic_observer.hpp.

◆ QMat

template<ContinuousPlantModelLike Plant, std::size_t N>
using control::PolytopicObserver< Plant, N >::QMat = linalg::Matrix<T, StateDim, StateDim>

Definition at line 50 of file polytopic_observer.hpp.

◆ State

template<ContinuousPlantModelLike Plant, std::size_t N>
using control::PolytopicObserver< Plant, N >::State = plant_state_vec_t<Model>

Definition at line 45 of file polytopic_observer.hpp.

◆ T

template<ContinuousPlantModelLike Plant, std::size_t N>
using control::PolytopicObserver< Plant, N >::T = plant_type_t<Model>

Definition at line 44 of file polytopic_observer.hpp.

◆ WMat

template<ContinuousPlantModelLike Plant, std::size_t N>
using control::PolytopicObserver< Plant, N >::WMat = linalg::Matrix<T, StateDim, OutputDim>

Definition at line 51 of file polytopic_observer.hpp.

◆ ZSpace

template<ContinuousPlantModelLike Plant, std::size_t N>
using control::PolytopicObserver< Plant, N >::ZSpace = linalg::RowVector<T, ZDim>

Definition at line 59 of file polytopic_observer.hpp.

Member Function Documentation

◆ apply()

template<ContinuousPlantModelLike Plant, std::size_t N>
template<convex::AtomLike Var>
constexpr auto control::PolytopicObserver< Plant, N >::apply ( const Polytope &  poly,
const Var &  Z,
T  margin = 1e-6 
) const
inlineconstexpr

◆ L()

template<ContinuousPlantModelLike Plant, std::size_t N>
constexpr auto control::PolytopicObserver< Plant, N >::L ( const QMat &  Q,
const WMat &  W 
) const
inlineconstexpr

L.

L = Q^{-1} W

Parameters
Q(symmetric observability Gramian)
W(lifted luenberger gain W = Q L)
Returns
L

Definition at line 175 of file polytopic_observer.hpp.

References control::is_continuous_v, and control::PolytopicObserver< Plant, N >::L().

Referenced by control::PolytopicObserver< Plant, N >::L().

◆ operator()()

template<ContinuousPlantModelLike Plant, std::size_t N>
template<convex::AtomLike Var>
constexpr auto control::PolytopicObserver< Plant, N >::operator() ( const Polytope &  poly,
const Var &  Z,
T  margin = 1e-6 
) const
inlineconstexpr

operator overload (polytopic observer)

Parameters
poly(Polytope)
Z([svec(Q); vec(W)])
Returns
PLDI as intersection of LMIs

Definition at line 72 of file polytopic_observer.hpp.

References control::PolytopicObserver< Plant, N >::apply(), and control::is_continuous_v.

◆ q_constraint()

template<ContinuousPlantModelLike Plant, std::size_t N>
template<convex::AtomLike ZVar>
constexpr auto control::PolytopicObserver< Plant, N >::q_constraint ( const ZVar &  Z,
T  margin = 1e-6 
) const
inlineconstexpr

q_constraint

Parameters
Z([svec(Q); vec(W)])
margin(PDness)
Returns
LMI for Q

Definition at line 120 of file polytopic_observer.hpp.

References control::is_continuous_v, control::PolytopicObserver< Plant, N >::QDim, and control::PolytopicObserver< Plant, N >::WDim.

Referenced by control::PolytopicObserver< Plant, N >::apply().

◆ vertex_constraint()

template<ContinuousPlantModelLike Plant, std::size_t N>
template<convex::AtomLike ZVar>
constexpr auto control::PolytopicObserver< Plant, N >::vertex_constraint ( const Plant &  plant,
const ZVar &  Z 
) const
inlineconstexpr

vertex constraint

Parameters
plant(ModelPlant)
Z(dec var)
Returns
LMI for the stability of each vertex

Definition at line 142 of file polytopic_observer.hpp.

References control::is_continuous_v, control::PolytopicObserver< Plant, N >::QDim, and control::PolytopicObserver< Plant, N >::WDim.

Referenced by control::PolytopicObserver< Plant, N >::apply().

Member Data Documentation

◆ OutputDim

template<ContinuousPlantModelLike Plant, std::size_t N>
constexpr std::size_t control::PolytopicObserver< Plant, N >::OutputDim = plant_traits<Model>::MeasurementDim
staticconstexpr

Definition at line 48 of file polytopic_observer.hpp.

◆ QDim

template<ContinuousPlantModelLike Plant, std::size_t N>
constexpr std::size_t control::PolytopicObserver< Plant, N >::QDim = StateDim * (StateDim + 1) / 2
staticconstexpr

◆ StateDim

template<ContinuousPlantModelLike Plant, std::size_t N>
constexpr std::size_t control::PolytopicObserver< Plant, N >::StateDim = plant_traits<Model>::StateDim
staticconstexpr

Definition at line 47 of file polytopic_observer.hpp.

◆ WDim

template<ContinuousPlantModelLike Plant, std::size_t N>
constexpr std::size_t control::PolytopicObserver< Plant, N >::WDim = OutputDim * StateDim
staticconstexpr

◆ ZDim

template<ContinuousPlantModelLike Plant, std::size_t N>
constexpr std::size_t control::PolytopicObserver< Plant, N >::ZDim = QDim + WDim
staticconstexpr

Definition at line 57 of file polytopic_observer.hpp.


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