Public Member Functions | Private Attributes | List of all members
corbo::SerialIntegratorSystem Class Reference

System dynamics for a series of integrators (continuous-time) More...

#include <linear_benchmark_systems.h>

Inheritance diagram for corbo::SerialIntegratorSystem:
Inheritance graph
[legend]

Public Member Functions

void dynamics (const Eigen::Ref< const StateVector > &x, const Eigen::Ref< const ControlVector > &u, Eigen::Ref< StateVector > f) const override
 Evaluate the system dynamics equation. More...
 
const intgetDimension () const
 Get current integrator chain dimension / order of the system. More...
 
int getInputDimension () const override
 Return the plant input dimension (u) More...
 
Ptr getInstance () const override
 Return a newly created shared instance of the implemented class. More...
 
int getStateDimension () const override
 Return state dimension (x) More...
 
const double & getTimeConstant () const
 Get time constant T of the integrator. More...
 
bool isContinuousTime () const override
 Check if the system dynamics are defined in continuous-time. More...
 
bool isLinear () const override
 Check if the system dynamics are linear. More...
 
 SerialIntegratorSystem ()
 Default constructor (do not forget to set the dimension) More...
 
 SerialIntegratorSystem (int dimension)
 Construct ingerator system with given order/dimension. More...
 
void setDimension (int dim)
 Set integrator dimension (p >= 1) More...
 
void setTimeConstant (double time_constant)
 Set Time constant T of the integrator. More...
 
- Public Member Functions inherited from corbo::SystemDynamicsInterface
virtual double getDeadTime () const
 Return deadtime which might be taken into account by controllers/simulators if supported. More...
 
virtual void getLinearA (const StateVector &x0, const ControlVector &u0, Eigen::MatrixXd &A) const
 Return linear system matrix A (linearized system dynamics) More...
 
virtual void getLinearB (const StateVector &x0, const ControlVector &u0, Eigen::MatrixXd &B) const
 Return linear control input matrix B (linearized system dynamics) More...
 
virtual void reset ()
 
void setLinearizationMethod (std::shared_ptr< FiniteDifferencesInterface > lin_method)
 Set linearization method in case getLinearA() or getLinearB() are not overriden. More...
 
 SystemDynamicsInterface ()
 Default constructor. More...
 
virtual ~SystemDynamicsInterface ()=default
 Default destructor. More...
 

Private Attributes

int _dimension = 1
 
double _time_constant = 1.0
 

Additional Inherited Members

- Public Types inherited from corbo::SystemDynamicsInterface
using ControlVector = Eigen::VectorXd
 
using Ptr = std::shared_ptr< SystemDynamicsInterface >
 
using StateVector = Eigen::VectorXd
 

Detailed Description

System dynamics for a series of integrators (continuous-time)

An continuous-time integrator chain of order $ p $ is defiend as:

\[ T x^{(p)} = u \]

in which superscript $ (p) $ defines the p-th derivative of x w.r.t. time. $ T $ denotes a time constant.

See also
SystemDynamicsInterface
Author
Christoph Rösmann (chris.nosp@m.toph.nosp@m..roes.nosp@m.mann.nosp@m.@tu-d.nosp@m.ortm.nosp@m.und.d.nosp@m.e)

Definition at line 50 of file linear_benchmark_systems.h.

Constructor & Destructor Documentation

◆ SerialIntegratorSystem() [1/2]

corbo::SerialIntegratorSystem::SerialIntegratorSystem ( )
inline

Default constructor (do not forget to set the dimension)

Definition at line 54 of file linear_benchmark_systems.h.

◆ SerialIntegratorSystem() [2/2]

corbo::SerialIntegratorSystem::SerialIntegratorSystem ( int  dimension)
inlineexplicit

Construct ingerator system with given order/dimension.

Definition at line 56 of file linear_benchmark_systems.h.

Member Function Documentation

◆ dynamics()

void corbo::SerialIntegratorSystem::dynamics ( const Eigen::Ref< const StateVector > &  x,
const Eigen::Ref< const ControlVector > &  u,
Eigen::Ref< StateVector f 
) const
inlineoverridevirtual

Evaluate the system dynamics equation.

Implement this method to specify the actual system dynamics equation $ \dot{x} = f(x,u) $ (continuous-time) or $ x_{k+1} = f(x_k, u_k) $ (discrete-time).

Parameters
[in]xState vector x [getStateDimension() x 1]
[in]uControl input vector u [getInputDimension() x 1]
[out]fResulting function value $ \dot{x} $ respectively $ x_{k+1} $ (f must be preallocated with dimension [getStateDimension() x 1])

Implements corbo::SystemDynamicsInterface.

Definition at line 72 of file linear_benchmark_systems.h.

◆ getDimension()

const int& corbo::SerialIntegratorSystem::getDimension ( ) const
inline

Get current integrator chain dimension / order of the system.

Definition at line 87 of file linear_benchmark_systems.h.

◆ getInputDimension()

int corbo::SerialIntegratorSystem::getInputDimension ( ) const
inlineoverridevirtual

Return the plant input dimension (u)

Implements corbo::SystemDynamicsInterface.

Definition at line 67 of file linear_benchmark_systems.h.

◆ getInstance()

Ptr corbo::SerialIntegratorSystem::getInstance ( ) const
inlineoverridevirtual

Return a newly created shared instance of the implemented class.

Implements corbo::SystemDynamicsInterface.

Definition at line 59 of file linear_benchmark_systems.h.

◆ getStateDimension()

int corbo::SerialIntegratorSystem::getStateDimension ( ) const
inlineoverridevirtual

Return state dimension (x)

Implements corbo::SystemDynamicsInterface.

Definition at line 69 of file linear_benchmark_systems.h.

◆ getTimeConstant()

const double& corbo::SerialIntegratorSystem::getTimeConstant ( ) const
inline

Get time constant T of the integrator.

Definition at line 91 of file linear_benchmark_systems.h.

◆ isContinuousTime()

bool corbo::SerialIntegratorSystem::isContinuousTime ( ) const
inlineoverridevirtual

Check if the system dynamics are defined in continuous-time.

Continous-time equations are defined as $ \dot{x} = f(x,u) $ and discrete-time equations as $ x_{k+1} = f(x_k,u_k) $.

Returns
true if the system is specified in continuous time, false otherwise.

Implements corbo::SystemDynamicsInterface.

Definition at line 62 of file linear_benchmark_systems.h.

◆ isLinear()

bool corbo::SerialIntegratorSystem::isLinear ( ) const
inlineoverridevirtual

Check if the system dynamics are linear.

Linear system can be written in the form $ \dot{x} = Ax + Bu $ (continuous-time) or $ x_{k+1} = A x_k + B u_k $ (discrete-time). Consequently, getLinearA() and getLinearB() are independet of x0 and u0.

Returns
true if the system behavior is linear, false otherwise.

Implements corbo::SystemDynamicsInterface.

Definition at line 64 of file linear_benchmark_systems.h.

◆ setDimension()

void corbo::SerialIntegratorSystem::setDimension ( int  dim)
inline

Set integrator dimension (p >= 1)

Definition at line 89 of file linear_benchmark_systems.h.

◆ setTimeConstant()

void corbo::SerialIntegratorSystem::setTimeConstant ( double  time_constant)
inline

Set Time constant T of the integrator.

Definition at line 93 of file linear_benchmark_systems.h.

Member Data Documentation

◆ _dimension

int corbo::SerialIntegratorSystem::_dimension = 1
private

Definition at line 115 of file linear_benchmark_systems.h.

◆ _time_constant

double corbo::SerialIntegratorSystem::_time_constant = 1.0
private

Definition at line 116 of file linear_benchmark_systems.h.


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


control_box_rst
Author(s): Christoph Rösmann
autogenerated on Mon Feb 28 2022 22:08:03