centroidal_control_collection
|
Sequential extension for time-variant system. More...
#include <VariantSequentialExtension.h>
Public Types | |
using | _StateSpaceModel = StateSpaceModel< StateDim, Eigen::Dynamic, Eigen::Dynamic > |
Type of state-space model with fixed state dimension. More... | |
Public Member Functions | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | VariantSequentialExtension (const ListType< std::shared_ptr< _StateSpaceModel >> &model_list, bool extend_for_output=false) |
Constructor. More... | |
int | totalStateDim () const |
Get total state dimension. More... | |
int | totalInputDim () const |
Get total input dimension. More... | |
int | totalOutputDim () const |
Get total output dimension. More... | |
Public Attributes | |
ListType< std::shared_ptr< _StateSpaceModel > > | model_list_ |
State-space model list. More... | |
int | total_state_dim_ = 0 |
Total state dimension. More... | |
int | total_input_dim_ = 0 |
Total input dimension. More... | |
int | total_output_dim_ = 0 |
Total output dimension. More... | |
Eigen::Matrix< double, Eigen::Dynamic, StateDim > | A_seq_ |
Sequential extension matrix \(\boldsymbol{\hat{A}}\). More... | |
Eigen::MatrixXd | B_seq_ |
Sequential extension matrix \(\boldsymbol{\hat{B}}\). More... | |
Eigen::VectorXd | E_seq_ |
Sequential extension vector (i.e., offset vector) \(\boldsymbol{\hat{e}}\). More... | |
Protected Member Functions | |
void | setup (bool extend_for_output) |
Setup coefficients. More... | |
Sequential extension for time-variant system.
StateDim | state dimension |
ListType | type of state-space model list |
Given the following time-variant linear discrete state equation (even systems with time-variant dimensions of control input are acceptable).
\begin{align*} \boldsymbol{x}_{k+1} = \boldsymbol{A}_{k} \boldsymbol{x}_{k} + \boldsymbol{B}_{k} \boldsymbol{u}_{k} + \boldsymbol{e}_k \end{align*}
The following equation is called "sequential extension" here. In this class, the coefficients \(\boldsymbol{\hat{A}}_k\), \(\boldsymbol{\hat{B}}_k\), and \(\boldsymbol{\hat{e}}_k\) are calculated.
\begin{align*} \boldsymbol{\hat{x}}_{k+1} &= \boldsymbol{\hat{A}}_{k} \boldsymbol{x}_{k} + \boldsymbol{\hat{B}}_{k} \boldsymbol{\hat{u}}_{k} + \boldsymbol{\hat{e}}_k \\ \Leftrightarrow \begin{bmatrix} \boldsymbol{x}_{k+1} \\ \boldsymbol{x}_{k+2} \\ \boldsymbol{x}_{k+3} \\ \boldsymbol{x}_{k+4} \\ \vdots \\ \boldsymbol{x}_{k+N} \end{bmatrix} &= \begin{bmatrix} \boldsymbol{A}_{k} \\ \boldsymbol{A}_{k+1} \boldsymbol{A}_{k} \\ \boldsymbol{A}_{k+2} \boldsymbol{A}_{k+1} \boldsymbol{A}_{k} \\ \boldsymbol{A}_{k+3} \boldsymbol{A}_{k+2} \boldsymbol{A}_{k+1} \boldsymbol{A}_{k} \\ \vdots \\ \boldsymbol{A}_{k+N-1} \cdots \boldsymbol{A}_{k+1} \boldsymbol{A}_{k} \end{bmatrix} \boldsymbol{x}_{k} \\ & + \begin{bmatrix} \boldsymbol{B}_{k} & \boldsymbol{O} & \boldsymbol{O} & \boldsymbol{O} & \boldsymbol{O} & \cdots & \boldsymbol{O} \\ \boldsymbol{A}_{k+1} \boldsymbol{B}_{k} & \boldsymbol{B}_{k+1} & \boldsymbol{O} & \boldsymbol{O} & \boldsymbol{O} & \cdots & \boldsymbol{O} \\ \boldsymbol{A}_{k+2} \boldsymbol{A}_{k+1} \boldsymbol{B}_{k} & \boldsymbol{A}_{k+2} \boldsymbol{B}_{k+1} & \boldsymbol{B}_{k+2} & \boldsymbol{O} & \boldsymbol{O} & \cdots & \boldsymbol{O} \\ \boldsymbol{A}_{k+3} \boldsymbol{A}_{k+2} \boldsymbol{A}_{k+1} \boldsymbol{B}_{k} & \boldsymbol{A}_{k+3} \boldsymbol{A}_{k+2} \boldsymbol{B}_{k+1} & \boldsymbol{A}_{k+3} \boldsymbol{B}_{k+2} & \boldsymbol{B}_{k+3} & \boldsymbol{O} & \cdots & \boldsymbol{O} \\ \vdots & \vdots & \vdots & \vdots & \ddots & \vdots & \vdots \\ \boldsymbol{A}_{k+N-1} \cdots \boldsymbol{A}_{k+1} \boldsymbol{B}_{k} & \cdots & \cdots & \cdots & \cdots & \boldsymbol{A}_{k+N-1} \boldsymbol{B}_{k+N-2} & \boldsymbol{B}_{k+N-1} \end{bmatrix} \begin{bmatrix} \boldsymbol{u}_{k} \\ \boldsymbol{u}_{k+1} \\ \boldsymbol{u}_{k+2} \\ \boldsymbol{u}_{k+3} \\ \vdots \\ \boldsymbol{u}_{k+N-1} \end{bmatrix} \\ & + \begin{bmatrix} \boldsymbol{e}_{k} \\ \boldsymbol{A}_{k+1} \boldsymbol{e}_{k} + \boldsymbol{e}_{k+1} \\ \boldsymbol{A}_{k+2} \boldsymbol{A}_{k+1} \boldsymbol{e}_{k} + \boldsymbol{A}_{k+2} \boldsymbol{e}_{k+1} + \boldsymbol{e}_{k+2}\\ \vdots \\ \vdots \\ \boldsymbol{A}_{k+N-1} \cdots \boldsymbol{A}_{k+1} \boldsymbol{e}_{k} + \boldsymbol{A}_{k+N-1} \cdots\boldsymbol{A}_{k+2} \boldsymbol{e}_{k+1} + \cdots + \boldsymbol{e}_{k+N-1} \end{bmatrix} \end{align*}
Such a sequential extension is often used to formulate linear MPC as quadratic programming. For example, the following papers uses it.
Definition at line 70 of file VariantSequentialExtension.h.
using CCC::VariantSequentialExtension< StateDim, ListType >::_StateSpaceModel = StateSpaceModel<StateDim, Eigen::Dynamic, Eigen::Dynamic> |
Type of state-space model with fixed state dimension.
Definition at line 74 of file VariantSequentialExtension.h.
|
inline |
Constructor.
model_list | list of state-space model |
extend_for_output | whether to extend for output instead of state |
Definition at line 83 of file VariantSequentialExtension.h.
|
inlineprotected |
Setup coefficients.
Definition at line 110 of file VariantSequentialExtension.h.
|
inline |
Get total input dimension.
Definition at line 97 of file VariantSequentialExtension.h.
|
inline |
Get total output dimension.
Definition at line 103 of file VariantSequentialExtension.h.
|
inline |
Get total state dimension.
Definition at line 91 of file VariantSequentialExtension.h.
Eigen::Matrix<double, Eigen::Dynamic, StateDim> CCC::VariantSequentialExtension< StateDim, ListType >::A_seq_ |
Sequential extension matrix \(\boldsymbol{\hat{A}}\).
Definition at line 224 of file VariantSequentialExtension.h.
Eigen::MatrixXd CCC::VariantSequentialExtension< StateDim, ListType >::B_seq_ |
Sequential extension matrix \(\boldsymbol{\hat{B}}\).
Definition at line 227 of file VariantSequentialExtension.h.
Eigen::VectorXd CCC::VariantSequentialExtension< StateDim, ListType >::E_seq_ |
Sequential extension vector (i.e., offset vector) \(\boldsymbol{\hat{e}}\).
Definition at line 230 of file VariantSequentialExtension.h.
ListType<std::shared_ptr<_StateSpaceModel> > CCC::VariantSequentialExtension< StateDim, ListType >::model_list_ |
State-space model list.
Definition at line 212 of file VariantSequentialExtension.h.
int CCC::VariantSequentialExtension< StateDim, ListType >::total_input_dim_ = 0 |
Total input dimension.
Definition at line 218 of file VariantSequentialExtension.h.
int CCC::VariantSequentialExtension< StateDim, ListType >::total_output_dim_ = 0 |
Total output dimension.
Definition at line 221 of file VariantSequentialExtension.h.
int CCC::VariantSequentialExtension< StateDim, ListType >::total_state_dim_ = 0 |
Total state dimension.
Definition at line 215 of file VariantSequentialExtension.h.