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

Routines for converting a state space system from continuous- to discrete-time and vice versa. More...

#include <BilinearTransformation.hpp>

Classes

struct  mallocStructC2D
 
struct  mallocStructD2C
 

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, double alpha, ls::systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *out, mallocStructC2D< 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, double alpha, ls::systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *out, mallocStructC2D< 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, double alpha, ls::systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *out, mallocStructD2C< 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, double alpha, ls::systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *out, mallocStructD2C< 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, double alpha=1)
 Generates generalized bilinear transform of a continuous-time state space system. More...
 
static systems::StateSpace c2d (const Eigen::MatrixXd *A, const Eigen::MatrixXd *B, const Eigen::MatrixXd *C, const Eigen::MatrixXd *D, double dt, double alpha)
 Generates generalized bilinear transform of a continuous-time state space system. More...
 
static systems::StateSpace c2d (const systems::StateSpace<> &ss, double dt, double alpha=1)
 Generates generalized bilinear transform of 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, double alpha, systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *out, mallocStructC2D< 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, double alpha, systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *out, mallocStructC2D< TScalar, TStateDim, TInputDim, TOutputDim > *memStruct, LS_IS_STATIC_DEFAULT(TStateDim, TInputDim, TOutputDim))
 
static systems::StateSpace d2c (const systems::StateSpace<> &ss, double dt, double alpha=1)
 Generates generalized bilinear transform of 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, double alpha, systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *out, mallocStructD2C< TScalar, TStateDim, TInputDim, TOutputDim > *memStruct, LS_IS_DYNAMIC_DEFAULT(TStateDim, TInputDim, TOutputDim))
 
template<typename TScalar , int TStateDim, int TInputDim, int TOutputDim>
static void d2c (const systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *ss, double dt, double alpha, systems::StateSpace< TScalar, TStateDim, TInputDim, TOutputDim > *out, mallocStructD2C< TScalar, TStateDim, TInputDim, TOutputDim > *memStruct, LS_IS_STATIC_DEFAULT(TStateDim, TInputDim, TOutputDim))
 
static systems::StateSpace d2c (const systems::StateSpace<> &ss, double alpha=1)
 Generates generalized bilinear transform of a discrete-time state space system. More...
 
static systems::StateSpace d2c (const Eigen::MatrixXd &A, const Eigen::MatrixXd &B, const Eigen::MatrixXd &C, const Eigen::MatrixXd &D, double dt, double alpha=1)
 Generates generalized bilinear transform of a discrete-time state space system. More...
 
static systems::StateSpace d2c (const Eigen::MatrixXd *A, const Eigen::MatrixXd *B, const Eigen::MatrixXd *C, const Eigen::MatrixXd *D, double dt, double alpha)
 Generates generalized bilinear transform of a discrete-time state space system. More...
 
static systems::StateSpace c2dTustin (const systems::StateSpace<> &ss, double dt)
 Generates Tustin transform of a continuous-time state space system. More...
 
static systems::StateSpace d2cTustin (const systems::StateSpace<> &ss, double dt)
 Generates Tustin transform of a discrete-time state space system. More...
 
static systems::StateSpace c2dEuler (const systems::StateSpace<> &ss, double dt)
 Generates Euler transform of a continuous-time state space system. More...
 
static systems::StateSpace d2cEuler (const systems::StateSpace<> &ss, double dt)
 Generates Euler transform of a discrete-time state space system. More...
 
static systems::StateSpace c2dBwdDiff (const systems::StateSpace<> &ss, double dt)
 Generates backward differencing transform of a continuous-time state space system. More...
 
static systems::StateSpace d2cBwdDiff (const systems::StateSpace<> &ss, double dt)
 Generates backward differencing transform of a discrete-time state space system. More...
 

Detailed Description

Routines for converting a state space system from continuous- to discrete-time and vice versa.

Note
Corresponds to SLICOT Routine AB04MD (Discrete-time <-> continuous-time conversion by bilinear transformation).

Member Function Documentation

◆ c2d() [1/3]

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

Generates generalized bilinear transform of a continuous-time state space system.

Parameters
ATState matrix.
BInput matrix.
COutput matrix.
DFeedforward matrix.
dtSampling period.
alphaGeneralized bilinear transformation parameter; default parameter corresponds to backward differencing transform.
Returns
Transformed discrete-time state space system.

◆ c2d() [2/3]

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

Generates generalized bilinear transform of a continuous-time state space system.

Parameters
APointer to state matrix.
BPointer to input matrix.
CPointer to output matrix.
DPointer to feedforward matrix.
dtSampling period.
alphaGeneralized bilinear transformation parameter; default parameter corresponds to backward differencing transform.
Returns
Transformed discrete-time state space system.

◆ c2d() [3/3]

ls::systems::StateSpace ls::analysis::BilinearTransformation::c2d ( const systems::StateSpace<> &  ss,
double  dt,
double  alpha = 1 
)
static

Generates generalized bilinear transform of a continuous-time state space system.

Parameters
ssTState space system.
dtSampling period.
alphaGeneralized bilinear transformation parameter; default parameter corresponds to backward differencing transform.
Returns
Transformed discrete-time state space system.

◆ c2dBwdDiff()

ls::systems::StateSpace ls::analysis::BilinearTransformation::c2dBwdDiff ( const systems::StateSpace<> &  ss,
double  dt 
)
static

Generates backward differencing transform of a continuous-time state space system.

Parameters
ssTState space system.
dtSampling period.
Returns
Transformed discrete-time state space system.

◆ c2dEuler()

ls::systems::StateSpace ls::analysis::BilinearTransformation::c2dEuler ( const systems::StateSpace<> &  ss,
double  dt 
)
static

Generates Euler transform of a continuous-time state space system.

Parameters
ssTState space system.
dtSampling period.
Returns
Transformed discrete-time state space system.

◆ c2dTustin()

ls::systems::StateSpace ls::analysis::BilinearTransformation::c2dTustin ( const systems::StateSpace<> &  ss,
double  dt 
)
static

Generates Tustin transform of a continuous-time state space system.

Parameters
ssTState space system.
dtSampling period.
Returns
Transformed discrete-time state space system.

◆ d2c() [1/4]

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

Generates generalized bilinear transform of a discrete-time state space system.

Parameters
ATState matrix.
BInput matrix.
COutput matrix.
DFeedforward matrix.
dtSampling period.
alphaGeneralized bilinear transformation parameter; default parameter corresponds to backward differencing transform.
Returns
Transformed continuous-time state space system.

◆ d2c() [2/4]

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

Generates generalized bilinear transform of a discrete-time state space system.

Parameters
APointer to state matrix.
BPointer to input matrix.
CPointer to output matrix.
DPointer to feedforward matrix.
dtSampling period.
alphaGeneralized bilinear transformation parameter; default parameter corresponds to backward differencing transform.
Returns
Transformed continuous-time state space system.

◆ d2c() [3/4]

ls::systems::StateSpace ls::analysis::BilinearTransformation::d2c ( const systems::StateSpace<> &  ss,
double  alpha = 1 
)
static

Generates generalized bilinear transform of a discrete-time state space system.

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

Parameters
ssTState space system.
alphaGeneralized bilinear transformation parameter; default parameter corresponds to backward differencing transform.
Returns
Transformed continuous-time state space system.

◆ d2c() [4/4]

ls::systems::StateSpace ls::analysis::BilinearTransformation::d2c ( const systems::StateSpace<> &  ss,
double  dt,
double  alpha = 1 
)
static

Generates generalized bilinear transform of a discrete-time state space system.

Parameters
ssTState space system.
dtSampling period.
alphaGeneralized bilinear transformation parameter; default parameter corresponds to backward differencing transform.
Returns
Transformed continuous-time state space system.

◆ d2cBwdDiff()

ls::systems::StateSpace ls::analysis::BilinearTransformation::d2cBwdDiff ( const systems::StateSpace<> &  ss,
double  dt 
)
static

Generates backward differencing transform of a discrete-time state space system.

Parameters
ssTState space system.
dtSampling period.
Returns
Transformed continuous-time state space system.

◆ d2cEuler()

ls::systems::StateSpace ls::analysis::BilinearTransformation::d2cEuler ( const systems::StateSpace<> &  ss,
double  dt 
)
static

Generates Euler transform of a discrete-time state space system.

Parameters
ssTState space system.
dtSampling period.
Returns
Transformed continuous-time state space system.

◆ d2cTustin()

ls::systems::StateSpace ls::analysis::BilinearTransformation::d2cTustin ( const systems::StateSpace<> &  ss,
double  dt 
)
static

Generates Tustin transform of a discrete-time state space system.

Parameters
ssTState space system.
dtSampling period.
Returns
Transformed continuous-time state space system.

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