- 3.0.2 core module.
ct::core::SwitchedControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > Class Template Reference

A general, switched non-linear dynamic system with a control input. More...

#include <SwitchedControlledSystem.h>

Inheritance diagram for ct::core::SwitchedControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >:
ct::core::ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > ct::core::System< STATE_DIM, SCALAR >

Public Types

typedef std::shared_ptr< ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > > SystemPtr
 
typedef Switched< SystemPtrSwitchedSystems
 
typedef System< STATE_DIM, SCALARBase
 
typedef Base::time_t time_t
 
- Public Types inherited from ct::core::ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >
typedef std::shared_ptr< ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > > Ptr
 
typedef Base::time_t time_t
 
- Public Types inherited from ct::core::System< STATE_DIM, SCALAR >
typedef SCALAR time_t
 the type of the time variable More...
 

Public Member Functions

 SwitchedControlledSystem (const SwitchedSystems &switchedSystems, const ContinuousModeSequence &continuousModeSequence, const SYSTEM_TYPE &type=SYSTEM_TYPE::GENERAL)
 default constructor More...
 
 SwitchedControlledSystem (const SwitchedSystems &switchedSystems, const ContinuousModeSequence &continuousModeSequence, std::shared_ptr< ct::core::Controller< STATE_DIM, CONTROL_DIM, SCALAR >> controller, const SYSTEM_TYPE &type=SYSTEM_TYPE::GENERAL)
 constructor More...
 
 SwitchedControlledSystem (const SwitchedControlledSystem &arg)
 copy constructor More...
 
virtual ~SwitchedControlledSystem ()
 destructor More...
 
virtual SwitchedControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > * clone () const override
 deep copy More...
 
virtual void computeControlledDynamics (const StateVector< STATE_DIM, SCALAR > &state, const time_t &t, const ControlVector< CONTROL_DIM, SCALAR > &control, StateVector< STATE_DIM, SCALAR > &derivative) override
 
- Public Member Functions inherited from ct::core::ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >
 ControlledSystem (const SYSTEM_TYPE &type=SYSTEM_TYPE::GENERAL)
 default constructor More...
 
 ControlledSystem (std::shared_ptr< ct::core::Controller< STATE_DIM, CONTROL_DIM, SCALAR >> controller, const SYSTEM_TYPE &type=SYSTEM_TYPE::GENERAL)
 constructor More...
 
 ControlledSystem (const ControlledSystem &arg)
 copy constructor More...
 
virtual ~ControlledSystem ()
 destructor More...
 
void setController (const std::shared_ptr< Controller< STATE_DIM, CONTROL_DIM, SCALAR >> &controller)
 set a new controller More...
 
void getController (std::shared_ptr< Controller< STATE_DIM, CONTROL_DIM, SCALAR >> &controller) const
 get the controller instance More...
 
std::shared_ptr< Controller< STATE_DIM, CONTROL_DIM, SCALAR > > getController ()
 get the controller instace More...
 
virtual void computeDynamics (const StateVector< STATE_DIM, SCALAR > &state, const time_t &t, StateVector< STATE_DIM, SCALAR > &derivative) override
 compute the dynamics of the system More...
 
virtual void computeControlledDynamics (const StateVector< STATE_DIM, SCALAR > &state, const time_t &t, const ControlVector< CONTROL_DIM, SCALAR > &control, StateVector< STATE_DIM, SCALAR > &derivative)=0
 
ControlVector< CONTROL_DIM, SCALARgetLastControlAction ()
 
- Public Member Functions inherited from ct::core::System< STATE_DIM, SCALAR >
 System (const SYSTEM_TYPE &type=SYSTEM_TYPE::GENERAL)
 default constructor More...
 
 System (const System &other)
 copy constructor More...
 
virtual ~System ()
 destructor 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 std::shared_ptr< SwitchedControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > > Ptr
 
- Public Attributes inherited from ct::core::ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef System< STATE_DIM, SCALARBase
 
- Public Attributes inherited from ct::core::System< STATE_DIM, SCALAR >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef SCALAR S
 the scalar type More...
 

Protected Attributes

SwitchedSystems switchedSystems_
 switched system container More...
 
ContinuousModeSequence continuousModeSequence_
 the prespecified mode sequence More...
 
- Protected Attributes inherited from ct::core::ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >
std::shared_ptr< Controller< STATE_DIM, CONTROL_DIM, SCALAR > > controller_
 the controller instance More...
 
ControlVector< CONTROL_DIM, SCALARcontrolAction_
 
- Protected Attributes inherited from ct::core::System< STATE_DIM, SCALAR >
SYSTEM_TYPE type_
 type of system More...
 

Detailed Description

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

A general, switched non-linear dynamic system with a control input.

This describes a general, switched non-linear dynamic system described by an Ordinary Differential Equation (ODE) of the following form

\[ \dot{x} = f_{i}(x,u,t) \]

where $ x(t) $ is the state, $ u(t) $ the control input and $ t $ the time. $ f_{i} $ refers to the dynamics in a specific mode. Modes are prespecified as a function of time.

For implementing your own SwitchedControlledSystem, provide a vector of controlled systems and a prespecified mode sequence.

We generally assume that the Controller is a state and time dependent function $ u = g(x,t) $ which allows any ControlledSystem to be re-written as a System of the form

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

which can be forward propagated in time with an Integrator.

Template Parameters
STATE_DIMdimension of state vector
CONTROL_DIMdimension of input vector
SCALARscalar type

Member Typedef Documentation

◆ SystemPtr

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
typedef std::shared_ptr<ControlledSystem<STATE_DIM, CONTROL_DIM, SCALAR> > ct::core::SwitchedControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >::SystemPtr

◆ SwitchedSystems

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
typedef Switched<SystemPtr> ct::core::SwitchedControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >::SwitchedSystems

◆ Base

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
typedef System<STATE_DIM, SCALAR> ct::core::SwitchedControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >::Base

◆ time_t

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
typedef Base::time_t ct::core::SwitchedControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >::time_t

Constructor & Destructor Documentation

◆ SwitchedControlledSystem() [1/3]

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
ct::core::SwitchedControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >::SwitchedControlledSystem ( const SwitchedSystems switchedSystems,
const ContinuousModeSequence continuousModeSequence,
const SYSTEM_TYPE type = SYSTEM_TYPE::GENERAL 
)
inline

default constructor

Parameters
typesystem type

Referenced by ct::core::SwitchedControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >::clone().

◆ SwitchedControlledSystem() [2/3]

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
ct::core::SwitchedControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >::SwitchedControlledSystem ( const SwitchedSystems switchedSystems,
const ContinuousModeSequence continuousModeSequence,
std::shared_ptr< ct::core::Controller< STATE_DIM, CONTROL_DIM, SCALAR >>  controller,
const SYSTEM_TYPE type = SYSTEM_TYPE::GENERAL 
)
inline

constructor

Parameters
controllercontroller
typesystem type

◆ SwitchedControlledSystem() [3/3]

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
ct::core::SwitchedControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >::SwitchedControlledSystem ( const SwitchedControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > &  arg)
inline

◆ ~SwitchedControlledSystem()

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

destructor

Member Function Documentation

◆ clone()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
virtual SwitchedControlledSystem<STATE_DIM, CONTROL_DIM, SCALAR>* ct::core::SwitchedControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >::clone ( ) const
inlineoverridevirtual

◆ computeControlledDynamics()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
virtual void ct::core::SwitchedControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >::computeControlledDynamics ( const StateVector< STATE_DIM, SCALAR > &  state,
const time_t t,
const ControlVector< CONTROL_DIM, SCALAR > &  control,
StateVector< STATE_DIM, SCALAR > &  derivative 
)
inlineoverridevirtual

Member Data Documentation

◆ Ptr

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef std::shared_ptr<SwitchedControlledSystem<STATE_DIM, CONTROL_DIM, SCALAR> > ct::core::SwitchedControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >::Ptr

◆ switchedSystems_

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
SwitchedSystems ct::core::SwitchedControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >::switchedSystems_
protected

◆ continuousModeSequence_

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
ContinuousModeSequence ct::core::SwitchedControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >::continuousModeSequence_
protected

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