centroidal_control_collection
|
State-space model. More...
#include <StateSpaceModel.h>
Public Types | |
using | StateDimVector = Eigen::Matrix< double, StateDim, 1 > |
Type of state vector. More... | |
using | InputDimVector = Eigen::Matrix< double, InputDim, 1 > |
Type of input vector. More... | |
using | OutputDimVector = Eigen::Matrix< double, OutputDim, 1 > |
Type of output vector. More... | |
Public Member Functions | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | StateSpaceModel (int state_dim=StateDim, int input_dim=InputDim, int output_dim=OutputDim) |
Constructor. More... | |
virtual | ~StateSpaceModel ()=default |
Destructor. More... | |
int | stateDim () const |
Gets the state dimension. More... | |
int | inputDim () const |
Gets the input dimension. More... | |
int | outputDim () const |
Gets the output dimension. More... | |
StateDimVector | stateEq (const StateDimVector &x, const InputDimVector &u) const |
Calculate the continuous state equation. More... | |
StateDimVector | stateEqDisc (const StateDimVector &x, const InputDimVector &u) const |
Calculate the discrete state equation. More... | |
OutputDimVector | observEq (const StateDimVector &x) const |
Calculate the observation equation. More... | |
OutputDimVector | observEq (const StateDimVector &x, const InputDimVector &u) const |
Calculate the observation equation. More... | |
void | calcDiscMatrix (double dt) |
Calculate the discrete system matrices \(\boldsymbol{A}_d, \boldsymbol{B}_d, \boldsymbol{e}_d\). More... | |
Public Attributes | |
const int | state_dim_ = 0 |
State dimension. More... | |
const int | input_dim_ = 0 |
Input dimension. More... | |
const int | output_dim_ = 0 |
Output dimension. More... | |
Eigen::Matrix< double, StateDim, StateDim > | A_ |
Matrix \(\boldsymbol{A}\) of continuous state equation. More... | |
Eigen::Matrix< double, StateDim, InputDim > | B_ |
Matrix \(\boldsymbol{B}\) of continuous state equation. More... | |
Eigen::Matrix< double, OutputDim, StateDim > | C_ |
Matrix \(\boldsymbol{C}\) of observation equation. More... | |
Eigen::Matrix< double, OutputDim, InputDim > | D_ |
Matrix \(\boldsymbol{D}\) of observation equation. More... | |
StateDimVector | E_ |
Offset vector \(\boldsymbol{e}\) of continuous state equation. More... | |
OutputDimVector | F_ |
Offset vector \(\boldsymbol{f}\) of observation equation. More... | |
double | dt_ = 0 |
Discretization timestep [sec] (zero if discrete coefficients are not initialized) More... | |
Eigen::Matrix< double, StateDim, StateDim > | Ad_ |
Matrix \(\boldsymbol{A}_d\) of discrete state equation. More... | |
Eigen::Matrix< double, StateDim, InputDim > | Bd_ |
Matrix \(\boldsymbol{B}_d\) of discrete state equation. More... | |
StateDimVector | Ed_ |
Offset vector \(\boldsymbol{e}_d\) of discrete state equation. More... | |
State-space model.
StateDim | state dimension |
InputDim | input dimension |
OutputDim | output dimension |
\begin{align*} \boldsymbol{\dot{x}} &= \boldsymbol{A} \boldsymbol{x} + \boldsymbol{B} \boldsymbol{u} + \boldsymbol{e} \\ \boldsymbol{y} &= \boldsymbol{C} \boldsymbol{x} + \boldsymbol{D} \boldsymbol{u} + \boldsymbol{f} \end{align*}
Definition at line 21 of file StateSpaceModel.h.
using CCC::StateSpaceModel< StateDim, InputDim, OutputDim >::InputDimVector = Eigen::Matrix<double, InputDim, 1> |
Type of input vector.
Definition at line 28 of file StateSpaceModel.h.
using CCC::StateSpaceModel< StateDim, InputDim, OutputDim >::OutputDimVector = Eigen::Matrix<double, OutputDim, 1> |
Type of output vector.
Definition at line 31 of file StateSpaceModel.h.
using CCC::StateSpaceModel< StateDim, InputDim, OutputDim >::StateDimVector = Eigen::Matrix<double, StateDim, 1> |
Type of state vector.
Definition at line 25 of file StateSpaceModel.h.
|
inline |
Constructor.
state_dim | state dimension |
input_dim | input dimension |
output_dim | output dimension |
Definition at line 42 of file StateSpaceModel.h.
|
virtualdefault |
Destructor.
|
inline |
Calculate the discrete system matrices \(\boldsymbol{A}_d, \boldsymbol{B}_d, \boldsymbol{e}_d\).
dt | discretization timestep [sec] |
\begin{align*} \boldsymbol{x}_{k+1} = \boldsymbol{A}_d \boldsymbol{x}_k + \boldsymbol{B}_d \boldsymbol{u}_k + \boldsymbol{e}_d \end{align*}
Definition at line 164 of file StateSpaceModel.h.
|
inline |
Gets the input dimension.
Definition at line 107 of file StateSpaceModel.h.
|
inline |
Calculate the observation equation.
x | state \(\boldsymbol{x}\) |
Definition at line 142 of file StateSpaceModel.h.
|
inline |
Calculate the observation equation.
x | state \(\boldsymbol{x}\) |
u | input \(\boldsymbol{u}\) |
Definition at line 152 of file StateSpaceModel.h.
|
inline |
Gets the output dimension.
Definition at line 113 of file StateSpaceModel.h.
|
inline |
Gets the state dimension.
Definition at line 101 of file StateSpaceModel.h.
|
inline |
Calculate the continuous state equation.
x | state \(\boldsymbol{x}\) |
u | input \(\boldsymbol{u}\) |
Definition at line 123 of file StateSpaceModel.h.
|
inline |
Calculate the discrete state equation.
x | current state \(\boldsymbol{x}_k\) |
u | current input \(\boldsymbol{u}_k\) |
Definition at line 133 of file StateSpaceModel.h.
Eigen::Matrix<double, StateDim, StateDim> CCC::StateSpaceModel< StateDim, InputDim, OutputDim >::A_ |
Matrix \(\boldsymbol{A}\) of continuous state equation.
Definition at line 229 of file StateSpaceModel.h.
Eigen::Matrix<double, StateDim, StateDim> CCC::StateSpaceModel< StateDim, InputDim, OutputDim >::Ad_ |
Matrix \(\boldsymbol{A}_d\) of discrete state equation.
Definition at line 250 of file StateSpaceModel.h.
Eigen::Matrix<double, StateDim, InputDim> CCC::StateSpaceModel< StateDim, InputDim, OutputDim >::B_ |
Matrix \(\boldsymbol{B}\) of continuous state equation.
Definition at line 232 of file StateSpaceModel.h.
Eigen::Matrix<double, StateDim, InputDim> CCC::StateSpaceModel< StateDim, InputDim, OutputDim >::Bd_ |
Matrix \(\boldsymbol{B}_d\) of discrete state equation.
Definition at line 253 of file StateSpaceModel.h.
Eigen::Matrix<double, OutputDim, StateDim> CCC::StateSpaceModel< StateDim, InputDim, OutputDim >::C_ |
Matrix \(\boldsymbol{C}\) of observation equation.
Definition at line 235 of file StateSpaceModel.h.
Eigen::Matrix<double, OutputDim, InputDim> CCC::StateSpaceModel< StateDim, InputDim, OutputDim >::D_ |
Matrix \(\boldsymbol{D}\) of observation equation.
Definition at line 238 of file StateSpaceModel.h.
double CCC::StateSpaceModel< StateDim, InputDim, OutputDim >::dt_ = 0 |
Discretization timestep [sec] (zero if discrete coefficients are not initialized)
Definition at line 247 of file StateSpaceModel.h.
StateDimVector CCC::StateSpaceModel< StateDim, InputDim, OutputDim >::E_ |
Offset vector \(\boldsymbol{e}\) of continuous state equation.
Definition at line 241 of file StateSpaceModel.h.
StateDimVector CCC::StateSpaceModel< StateDim, InputDim, OutputDim >::Ed_ |
Offset vector \(\boldsymbol{e}_d\) of discrete state equation.
Definition at line 256 of file StateSpaceModel.h.
OutputDimVector CCC::StateSpaceModel< StateDim, InputDim, OutputDim >::F_ |
Offset vector \(\boldsymbol{f}\) of observation equation.
Definition at line 244 of file StateSpaceModel.h.
const int CCC::StateSpaceModel< StateDim, InputDim, OutputDim >::input_dim_ = 0 |
Input dimension.
Definition at line 223 of file StateSpaceModel.h.
const int CCC::StateSpaceModel< StateDim, InputDim, OutputDim >::output_dim_ = 0 |
Output dimension.
Definition at line 226 of file StateSpaceModel.h.
const int CCC::StateSpaceModel< StateDim, InputDim, OutputDim >::state_dim_ = 0 |
State dimension.
Definition at line 220 of file StateSpaceModel.h.