Lodestar
An integrated real-time control package in C++
ls::analysis::ZeroOrderHold Class Reference

Routines for computing zero-order hold transformation on state space systems. More...

#include <ZeroOrderHold.hpp>

Classes

struct  mallocStruct
 

Public Member Functions

template<typename TScalar , int TStateDim, int TInputDim, int TOutputDim>
void c2d (const ls::systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *ss, double dt, ls::systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *out, ls::analysis::ZeroOrderHold::mallocStruct< TScalar, TStateDim, TInputDim, TOutputDim > *memStruct, LS_IS_DYNAMIC(TStateDim, TInputDim, TOutputDim))
 
template<typename TScalar , int TStateDim, int TInputDim, int TOutputDim>
void c2d (const ls::systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *ss, double dt, ls::systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *out, ls::analysis::ZeroOrderHold::mallocStruct< TScalar, TStateDim, TInputDim, TOutputDim > *memStruct, LS_IS_STATIC(TStateDim, TInputDim, TOutputDim))
 
template<typename TScalar , int TStateDim, int TInputDim, int TOutputDim>
void d2c (const ls::systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *ss, double dt, ls::systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *out, ls::analysis::ZeroOrderHold::mallocStruct< TScalar, TStateDim, TInputDim, TOutputDim > *memStruct, LS_IS_DYNAMIC(TStateDim, TInputDim, TOutputDim))
 
template<typename TScalar , int TStateDim, int TInputDim, int TOutputDim>
void d2c (const ls::systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *ss, double dt, ls::systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *out, ls::analysis::ZeroOrderHold::mallocStruct< TScalar, TStateDim, TInputDim, TOutputDim > *memStruct, LS_IS_STATIC(TStateDim, TInputDim, TOutputDim))
 

Static Public Member Functions

static systems::StateSpace c2d (const Eigen::MatrixXd &A, const Eigen::MatrixXd &B, const Eigen::MatrixXd &C, const Eigen::MatrixXd &D, double dt)
 Generates zero-order hold discretization from a continuous-time state space system. More...
 
static systems::StateSpace c2d (Eigen::MatrixXd *A, Eigen::MatrixXd *B, Eigen::MatrixXd *C, Eigen::MatrixXd *D, double dt)
 Generates zero-order hold discretization from a continuous-time state space system. More...
 
template<typename TScalar , int TStateDim, int TInputDim, int TOutputDim>
static void c2d (const systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *ss, double dt, systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *out, mallocStruct< TScalar, TStateDim, TInputDim, TOutputDim > *memStruct, LS_IS_DYNAMIC_DEFAULT(TStateDim, TInputDim, TOutputDim))
 
template<typename TScalar , int TStateDim, int TInputDim, int TOutputDim>
static void c2d (const systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *ss, double dt, systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *out, mallocStruct< TScalar, TStateDim, TInputDim, TOutputDim > *memStruct, LS_IS_STATIC_DEFAULT(TStateDim, TInputDim, TOutputDim))
 
static systems::StateSpace< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic > c2d (const systems::StateSpace< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic > &ss, double dt)
 Generates zero-order hold discretization from a continuous-time state space system. More...
 
static systems::StateSpace c2d (const systems::StateSpace<> *ss, double dt)
 Generates zero-order hold discretization from a continuous-time state space system. More...
 
static systems::StateSpace< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic > d2c (const Eigen::MatrixXd &A, const Eigen::MatrixXd &B, const Eigen::MatrixXd &C, const Eigen::MatrixXd &D, double dt)
 Reverts a zero-order hold discretization on a discrete-time state space system. More...
 
static systems::StateSpace< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic > d2c (Eigen::MatrixXd *A, Eigen::MatrixXd *B, Eigen::MatrixXd *C, Eigen::MatrixXd *D, double dt)
 Reverts a zero-order hold discretization on a discrete-time state space system. More...
 
static systems::StateSpace< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic > d2c (const systems::StateSpace< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic > &ss, double dt)
 Reverts a zero-order hold discretization on a discrete-time state space system. More...
 
static systems::StateSpace d2c (const systems::StateSpace<> *ss, double dt)
 Reverts a zero-order hold discretization on a discrete-time state space system. More...
 
static systems::StateSpace d2c (const systems::StateSpace<> *ss)
 Reverts a zero-order hold discretization on a discrete-time state space system. More...
 
static systems::StateSpace d2c (const systems::StateSpace<> &ss)
 Reverts a zero-order hold discretization on a discrete-time state space system. More...
 
template<typename TScalar , int TStateDim, int TInputDim, int TOutputDim>
static void d2c (const systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *ss, double dt, systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *out, mallocStruct< TScalar, TStateDim, TInputDim, TOutputDim > *memStruct, LS_IS_DYNAMIC_DEFAULT(TStateDim, TInputDim, TOutputDim))
 Reverts a zero-order hold discretization on a discrete-time state space system. More...
 
template<typename TScalar , int TStateDim, int TInputDim, int TOutputDim>
static void d2c (const systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *ss, double dt, systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *out, mallocStruct< TScalar, TStateDim, TInputDim, TOutputDim > *memStruct, LS_IS_STATIC_DEFAULT(TStateDim, TInputDim, TOutputDim))
 Reverts a zero-order hold discretization on a discrete-time state space system. More...
 

Detailed Description

Routines for computing zero-order hold transformation on state space systems.

See also
theory.ldstr.dev/discretization

Member Function Documentation

◆ c2d() [1/4]

ls::systems::StateSpace ls::analysis::ZeroOrderHold::c2d ( const Eigen::MatrixXd &  A,
const Eigen::MatrixXd &  B,
const Eigen::MatrixXd &  C,
const Eigen::MatrixXd &  D,
double  dt 
)
static

Generates zero-order hold discretization from a continuous-time state space system.

Parameters
AState matrix.
BInput matrix.
COutput matrix.
DFeedforward matrix.
dtSampling period.
Returns
Zero-order hold discrete-time state space system.

◆ c2d() [2/4]

static systems::StateSpace<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic> ls::analysis::ZeroOrderHold::c2d ( const systems::StateSpace< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic > &  ss,
double  dt 
)
static

Generates zero-order hold discretization from a continuous-time state space system.

Parameters
ssState space system.
dtSampling period.
Returns
Zero-order hold discrete-time state space system.

◆ c2d() [3/4]

ls::systems::StateSpace ls::analysis::ZeroOrderHold::c2d ( const systems::StateSpace<> *  ss,
double  dt 
)
static

Generates zero-order hold discretization from a continuous-time state space system.

Parameters
ssPointer to state space system.
dtSampling period.
Returns
Zero-order hold discrete-time state space system.

◆ c2d() [4/4]

ls::systems::StateSpace ls::analysis::ZeroOrderHold::c2d ( Eigen::MatrixXd *  A,
Eigen::MatrixXd *  B,
Eigen::MatrixXd *  C,
Eigen::MatrixXd *  D,
double  dt 
)
static

Generates zero-order hold discretization from a continuous-time state space system.

Parameters
AState matrix.
BInput matrix.
COutput matrix.
DFeedforward matrix.
dtSampling period.
Returns
Zero-order hold discrete-time state space system.

◆ d2c() [1/8]

ls::systems::StateSpace ls::analysis::ZeroOrderHold::d2c ( const Eigen::MatrixXd &  A,
const Eigen::MatrixXd &  B,
const Eigen::MatrixXd &  C,
const Eigen::MatrixXd &  D,
double  dt 
)
static

Reverts a zero-order hold discretization on a discrete-time state space system.

Parameters
AState matrix.
BInput matrix.
COutput matrix.
DFeedforward matrix.
dtSampling period.
Returns
Zero-order hold continuous-time state space system.

◆ d2c() [2/8]

static systems::StateSpace<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic> ls::analysis::ZeroOrderHold::d2c ( const systems::StateSpace< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic > &  ss,
double  dt 
)
static

Reverts a zero-order hold discretization on a discrete-time state space system.

Parameters
ssState space system.
dtSampling period.
Returns
Continuous-time state space system.

◆ d2c() [3/8]

template<typename TScalar , int TStateDim, int TInputDim, int TOutputDim>
static void ls::analysis::ZeroOrderHold::d2c ( const systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *  ss,
double  dt,
systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *  out,
mallocStruct< TScalar, TStateDim, TInputDim, TOutputDim > *  memStruct,
LS_IS_DYNAMIC_DEFAULT(TStateDim, TInputDim, TOutputDim)   
)
static

Reverts a zero-order hold discretization on a discrete-time state space system.

Parameters
ssState space system.
dtSampling period.
Returns
Continuous-time state space system.

◆ d2c() [4/8]

template<typename TScalar , int TStateDim, int TInputDim, int TOutputDim>
static void ls::analysis::ZeroOrderHold::d2c ( const systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *  ss,
double  dt,
systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *  out,
mallocStruct< TScalar, TStateDim, TInputDim, TOutputDim > *  memStruct,
LS_IS_STATIC_DEFAULT(TStateDim, TInputDim, TOutputDim)   
)
static

Reverts a zero-order hold discretization on a discrete-time state space system.

Parameters
ssState space system.
dtSampling period.
Returns
Continuous-time state space system.

◆ d2c() [5/8]

ls::systems::StateSpace ls::analysis::ZeroOrderHold::d2c ( const systems::StateSpace<> &  ss)
static

Reverts a zero-order hold discretization on a discrete-time state space system.

This method retrieves the sampling period from the state space object.

Parameters
ssState space system.
dtSampling period.
Returns
Continuous-time state space system.

◆ d2c() [6/8]

ls::systems::StateSpace ls::analysis::ZeroOrderHold::d2c ( const systems::StateSpace<> *  ss)
static

Reverts a zero-order hold discretization on a discrete-time state space system.

This method retrieves the sampling period from the state space object.

Parameters
ssState space system.
dtSampling period.
Returns
Continuous-time state space system.

◆ d2c() [7/8]

ls::systems::StateSpace ls::analysis::ZeroOrderHold::d2c ( const systems::StateSpace<> *  ss,
double  dt 
)
static

Reverts a zero-order hold discretization on a discrete-time state space system.

Parameters
ssState space system.
dtSampling period.
Returns
Continuous-time state space system.

◆ d2c() [8/8]

ls::systems::StateSpace ls::analysis::ZeroOrderHold::d2c ( Eigen::MatrixXd *  A,
Eigen::MatrixXd *  B,
Eigen::MatrixXd *  C,
Eigen::MatrixXd *  D,
double  dt 
)
static

Reverts a zero-order hold discretization on a discrete-time state space system.

Parameters
AState matrix.
BInput matrix.
COutput matrix.
DFeedforward matrix.
dtSampling period.
Returns
Zero-order hold continuous-time state space system.

The documentation for this class was generated from the following files: