- 3.0.2 core module.
ct::core::System< STATE_DIM, SCALAR > Class Template Referenceabstract

Interface class for a general system described by an ordinary differential equation (ODE) More...

#include <System.h>

Inheritance diagram for ct::core::System< STATE_DIM, SCALAR >:
ct::core::ControlledSystem< 2, 1, SCALAR > ct::core::ControlledSystem< POS_DIM+VEL_DIM, CONTROL_DIM, SCALAR > ct::core::ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > ct::core::tpl::SecondOrderSystem< SCALAR > ct::core::tpl::TestLinearSystem< class > ct::core::tpl::TestNonlinearSystem< SCALAR > ct::core::SymplecticSystem< POS_DIM, VEL_DIM, CONTROL_DIM, SCALAR > ct::core::SymplecticSystem< 1, 1, 1, SCALAR > ct::core::LinearSystem< STATE_DIM, CONTROL_DIM, SCALAR > ct::core::SwitchedControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > ct::core::tpl::TestSymplecticSystem< SCALAR > ct::core::SwitchedLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR > ct::core::SystemLinearizer< STATE_DIM, CONTROL_DIM, SCALAR > ct::models::HyA::HyALinearizedForward ct::models::HyA::HyALinearizedReverse ct::models::HyQ::HyQBareModelLinearizedForward ct::models::HyQ::HyQBareModelLinearizedReverse ct::models::HyQ::HyQWithContactModelLinearizedForward ct::models::HyQ::HyQWithContactModelLinearizedReverse ct::models::InvertedPendulum::InvertedPendulumActDynLinearizedForward ct::models::QuadrotorLinear ct::optcon::example::DiehlSystemLinear ct::optcon::example::LinearizedSystem ct::optcon::example::LinearizedSystem ct::optcon::example::MIMOIntegratorLinear< state_dim, control_dim > ct::optcon::example::tpl::LinearOscillatorLinear< class > LinkedMasses

Public Types

typedef SCALAR time_t
 the type of the time variable More...
 

Public Member Functions

 System (const SYSTEM_TYPE &type=SYSTEM_TYPE::GENERAL)
 default constructor More...
 
 System (const System &other)
 copy constructor More...
 
virtual ~System ()
 destructor More...
 
virtual Systemclone () const
 deep copy More...
 
virtual void computeDynamics (const StateVector< STATE_DIM, SCALAR > &state, const time_t &t, StateVector< STATE_DIM, SCALAR > &derivative)=0
 computes the system dynamics More...
 
SYSTEM_TYPE getType () const
 get the type of system More...
 
virtual bool isSymplectic () const
 Determines if the system is in symplectic form. More...
 

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef SCALAR S
 the scalar type More...
 

Protected Attributes

SYSTEM_TYPE type_
 type of system More...
 

Detailed Description

template<size_t STATE_DIM, typename SCALAR = double>
class ct::core::System< STATE_DIM, SCALAR >

Interface class for a general system described by an ordinary differential equation (ODE)

Defines the interface for a general system described by an ordinary differential equation (ODE) of the form

\[ \dot{x} = f(x,t) \]

for systems with an input ( $ \dot{x} = f(x,u,t) $) see ControlledSystem.

To implement your own system, derive from this class. This ensures you can use other functionality such as an Integrator.

Template Parameters
STATE_DIMdimensionality of the state
SCALARscalar type
Examples:
Masspoint.h.

Member Typedef Documentation

◆ time_t

template<size_t STATE_DIM, typename SCALAR = double>
typedef SCALAR ct::core::System< STATE_DIM, SCALAR >::time_t

the type of the time variable

Constructor & Destructor Documentation

◆ System() [1/2]

template<size_t STATE_DIM, typename SCALAR = double>
ct::core::System< STATE_DIM, SCALAR >::System ( const SYSTEM_TYPE type = SYSTEM_TYPE::GENERAL)
inline

default constructor

Creates a new system given a system type. The system type can help to speed up algorithms that specialize on the type. If unsure about the type, simply use SYSTEM_TYPE::GENERAL.

Parameters
typetype of system

◆ System() [2/2]

template<size_t STATE_DIM, typename SCALAR = double>
ct::core::System< STATE_DIM, SCALAR >::System ( const System< STATE_DIM, SCALAR > &  other)
inline

copy constructor

◆ ~System()

template<size_t STATE_DIM, typename SCALAR = double>
virtual ct::core::System< STATE_DIM, SCALAR >::~System ( )
inlinevirtual

destructor

Member Function Documentation

◆ clone()

template<size_t STATE_DIM, typename SCALAR = double>
virtual System* ct::core::System< STATE_DIM, SCALAR >::clone ( ) const
inlinevirtual

deep copy

Reimplemented in ct::core::tpl::SecondOrderSystem< SCALAR >, ct::core::SystemLinearizer< STATE_DIM, CONTROL_DIM, SCALAR >, ct::core::SwitchedControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >, ct::core::ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >, ct::core::ControlledSystem< 2, 1 >, ct::core::ControlledSystem< 2, 1, SCALAR >, ct::core::ControlledSystem< STATE_DIM, CONTROL_DIM, double >, ct::core::ControlledSystem< POS_DIM+VEL_DIM, CONTROL_DIM, SCALAR >, ct::core::SwitchedLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >, ct::core::SymplecticSystem< POS_DIM, VEL_DIM, CONTROL_DIM, SCALAR >, ct::core::SymplecticSystem< 1, 1, 1, SCALAR >, LinearizedOscillator, ct::core::LTISystem< STATE_DIM, CONTROL_DIM >, ct::core::LinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >, ct::core::LinearSystem< STATE_DIM, CONTROL_DIM >, ct::core::LinearSystem< 2, 1, double >, ct::core::LinearSystem< 2, 1 >, ct::core::tpl::TestSymplecticSystem< SCALAR >, ct::core::tpl::TestNonlinearSystem< SCALAR >, ct::core::generated::TestNonlinearSystemLinearized, Masspoint, TestOscillator, ct::optcon::example::DiehlSystemLinear, ct::optcon::example::LinearizedSystem, ct::optcon::example::LinearizedSystem, ct::optcon::example::tpl::LinearOscillatorLinear< class >, LinkedMasses, ct::optcon::example::MIMOIntegratorLinear< state_dim, control_dim >, ct::optcon::example::SpringLoadedMass, ct::optcon::example::SpringLoadedMassLinear, ct::core::tpl::TestLinearSystem< class >, ct::models::HyA::HyALinearizedForward, ct::models::HyA::HyALinearizedReverse, ct::models::HyQ::HyQBareModelLinearizedForward, ct::models::HyQ::HyQBareModelLinearizedReverse, ct::models::HyQ::HyQWithContactModelLinearizedForward, ct::models::HyQ::HyQWithContactModelLinearizedReverse, ct::models::InvertedPendulum::InvertedPendulumActDynLinearizedForward, and ct::models::QuadrotorLinear.

◆ computeDynamics()

template<size_t STATE_DIM, typename SCALAR = double>
virtual void ct::core::System< STATE_DIM, SCALAR >::computeDynamics ( const StateVector< STATE_DIM, SCALAR > &  state,
const time_t t,
StateVector< STATE_DIM, SCALAR > &  derivative 
)
pure virtual

computes the system dynamics

evaluates $ \dot{x} = f(x,t) $ at a given state and time

Parameters
statestate to evaluate dynamics at
ttime to evaluate the dynamics at
derivativestate derivative

Implemented in ct::core::ControlledSystem< 2, 1, SCALAR >, and ct::core::ControlledSystem< POS_DIM+VEL_DIM, CONTROL_DIM, SCALAR >.

Referenced by ct::core::System< STATE_DIM, double >::clone().

◆ getType()

template<size_t STATE_DIM, typename SCALAR = double>
SYSTEM_TYPE ct::core::System< STATE_DIM, SCALAR >::getType ( ) const
inline

get the type of system

Returns
system type

◆ isSymplectic()

template<size_t STATE_DIM, typename SCALAR = double>
virtual bool ct::core::System< STATE_DIM, SCALAR >::isSymplectic ( ) const
inlinevirtual

Determines if the system is in symplectic form.

Returns
True if symplectic, False otherwise.

Reimplemented in ct::core::SymplecticSystem< POS_DIM, VEL_DIM, CONTROL_DIM, SCALAR >, and ct::core::SymplecticSystem< 1, 1, 1, SCALAR >.

Member Data Documentation

◆ S

template<size_t STATE_DIM, typename SCALAR = double>
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef SCALAR ct::core::System< STATE_DIM, SCALAR >::S

the scalar type

◆ type_

template<size_t STATE_DIM, typename SCALAR = double>
SYSTEM_TYPE ct::core::System< STATE_DIM, SCALAR >::type_
protected

type of system

Referenced by ct::core::System< STATE_DIM, double >::getType().


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