- 3.0.2 optimal control module.
ct::optcon::InputDisturbedSystem< STATE_DIM, CONTROL_DIM, SCALAR > Class Template Reference

Implementation of an input disturbed system where, the dimension of the disturbance is equal to the dimension of the control input, thus DIST_DIM = CONTROL_DIM. This is a special case, however it occurs often and is convenient to have as separate class. More...

#include <InputDisturbedSystem.h>

Inheritance diagram for ct::optcon::InputDisturbedSystem< STATE_DIM, CONTROL_DIM, SCALAR >:
ct::optcon::DisturbedSystem< STATE_DIM, CONTROL_DIM, CONTROL_DIM, SCALAR > ct::core::ControlledSystem< STATE_DIM+DIST_DIM, CONTROL_DIM, SCALAR > ct::core::System< STATE_DIM, SCALAR >

Public Types

using Base = typename ct::optcon::DisturbedSystem< STATE_DIM, CONTROL_DIM, CONTROL_DIM, SCALAR >
 
- Public Types inherited from ct::core::ControlledSystem< STATE_DIM+DIST_DIM, CONTROL_DIM, SCALAR >
typedef std::shared_ptr< ControlledSystem< STATE_DIM+DIST_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
 

Public Member Functions

 InputDisturbedSystem (std::shared_ptr< ct::core::ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >> sys)
 Construct a new Input Disturbed System object. More...
 
 InputDisturbedSystem (const InputDisturbedSystem &other)
 copy constructor More...
 
InputDisturbedSystemclone () const override
 deep cloning More...
 
void computeControlledDynamics (const ct::core::StateVector< AUGMENTED_STATE_DIM, SCALAR > &state, const SCALAR &t, const ct::core::ControlVector< CONTROL_DIM, SCALAR > &control, ct::core::StateVector< AUGMENTED_STATE_DIM, SCALAR > &derivative) override
 compute the dynamics (the left-hand-side of the dynamics equation) for the disturbance-augmented system More...
 
- Public Member Functions inherited from ct::optcon::DisturbedSystem< STATE_DIM, CONTROL_DIM, CONTROL_DIM, SCALAR >
 DisturbedSystem ()
 Constructor. More...
 
 DisturbedSystem (std::shared_ptr< ct::core::Controller< STATE_DIM, CONTROL_DIM, SCALAR >> controller)
 Copy constructor. More...
 
virtual ~DisturbedSystem ()=default
 
void setController (const std::shared_ptr< ct::core::Controller< STATE_DIM, CONTROL_DIM, SCALAR >> controller)
 
virtual void computeControlledDynamics (const ct::core::StateVector< AUGMENTED_DIM, SCALAR > &state, const SCALAR &t, const ct::core::ControlVector< CONTROL_DIM, SCALAR > &control, ct::core::StateVector< AUGMENTED_DIM, SCALAR > &derivative)=0
 Implementation of the base computeControlledDynamics method. More...
 
- Public Member Functions inherited from ct::core::ControlledSystem< STATE_DIM+DIST_DIM, CONTROL_DIM, SCALAR >
 ControlledSystem (const SYSTEM_TYPE &type=SYSTEM_TYPE::GENERAL)
 
 ControlledSystem (std::shared_ptr< ct::core::Controller< STATE_DIM+DIST_DIM, CONTROL_DIM, SCALAR >> controller, const SYSTEM_TYPE &type=SYSTEM_TYPE::GENERAL)
 
 ControlledSystem (const ControlledSystem &arg)
 
virtual ~ControlledSystem ()
 
void setController (const std::shared_ptr< Controller< STATE_DIM+DIST_DIM, CONTROL_DIM, SCALAR >> &controller)
 
void getController (std::shared_ptr< Controller< STATE_DIM+DIST_DIM, CONTROL_DIM, SCALAR >> &controller) const
 
std::shared_ptr< Controller< STATE_DIM+DIST_DIM, CONTROL_DIM, SCALAR > > getController ()
 
virtual void computeDynamics (const StateVector< STATE_DIM+DIST_DIM, SCALAR > &state, const time_t &t, StateVector< STATE_DIM+DIST_DIM, SCALAR > &derivative) override
 
virtual void computeControlledDynamics (const StateVector< STATE_DIM+DIST_DIM, SCALAR > &state, const time_t &t, const ControlVector< CONTROL_DIM, SCALAR > &control, StateVector< STATE_DIM+DIST_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)
 
 System (const System &other)
 
virtual ~System ()
 
virtual void computeDynamics (const StateVector< STATE_DIM, SCALAR > &state, const time_t &t, StateVector< STATE_DIM, SCALAR > &derivative)=0
 
SYSTEM_TYPE getType () const
 
virtual bool isSymplectic () const
 

Static Public Attributes

static EIGEN_MAKE_ALIGNED_OPERATOR_NEW const size_t AUGMENTED_STATE_DIM = STATE_DIM + CONTROL_DIM
 
- Static Public Attributes inherited from ct::optcon::DisturbedSystem< STATE_DIM, CONTROL_DIM, CONTROL_DIM, SCALAR >
static EIGEN_MAKE_ALIGNED_OPERATOR_NEW const size_t AUGMENTED_DIM
 

Additional Inherited Members

- Public Attributes inherited from ct::core::ControlledSystem< STATE_DIM+DIST_DIM, CONTROL_DIM, SCALAR >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef System< STATE_DIM+DIST_DIM, SCALARBase
 
- Public Attributes inherited from ct::core::System< STATE_DIM, SCALAR >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef SCALAR S
 
- Protected Attributes inherited from ct::core::ControlledSystem< STATE_DIM+DIST_DIM, CONTROL_DIM, SCALAR >
std::shared_ptr< Controller< STATE_DIM+DIST_DIM, CONTROL_DIM, SCALAR > > controller_
 
ControlVector< CONTROL_DIM, SCALARcontrolAction_
 
- Protected Attributes inherited from ct::core::System< STATE_DIM, SCALAR >
SYSTEM_TYPE type_
 

Detailed Description

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
class ct::optcon::InputDisturbedSystem< STATE_DIM, CONTROL_DIM, SCALAR >

Implementation of an input disturbed system where, the dimension of the disturbance is equal to the dimension of the control input, thus DIST_DIM = CONTROL_DIM. This is a special case, however it occurs often and is convenient to have as separate class.

The new state vector has the form x_aug = [x_system + disturbance];

Note
this system should not be for simulation, but for filtering. It is not suitable for simulation since the disturbance state gets mapped back to the control input.
Template Parameters
STATE_DIMstate dimension
CONTROL_DIM
double
Examples:
KalmanDisturbanceFiltering.cpp.

Member Typedef Documentation

◆ Base

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
using ct::optcon::InputDisturbedSystem< STATE_DIM, CONTROL_DIM, SCALAR >::Base = typename ct::optcon::DisturbedSystem<STATE_DIM, CONTROL_DIM, CONTROL_DIM, SCALAR>

Constructor & Destructor Documentation

◆ InputDisturbedSystem() [1/2]

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
ct::optcon::InputDisturbedSystem< STATE_DIM, CONTROL_DIM, SCALAR >::InputDisturbedSystem ( std::shared_ptr< ct::core::ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >>  sys)

Construct a new Input Disturbed System object.

Parameters
systhe system that is subject to a disturbance

Referenced by ct::optcon::InputDisturbedSystem< STATE_DIM, CONTROL_DIM, SCALAR >::clone().

◆ InputDisturbedSystem() [2/2]

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
ct::optcon::InputDisturbedSystem< STATE_DIM, CONTROL_DIM, SCALAR >::InputDisturbedSystem ( const InputDisturbedSystem< STATE_DIM, CONTROL_DIM, SCALAR > &  other)

copy constructor

Member Function Documentation

◆ clone()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
InputDisturbedSystem< STATE_DIM, CONTROL_DIM, SCALAR > * ct::optcon::InputDisturbedSystem< STATE_DIM, CONTROL_DIM, SCALAR >::clone ( ) const
overridevirtual

◆ computeControlledDynamics()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
void ct::optcon::InputDisturbedSystem< STATE_DIM, CONTROL_DIM, SCALAR >::computeControlledDynamics ( const ct::core::StateVector< AUGMENTED_STATE_DIM, SCALAR > &  state,
const SCALAR t,
const ct::core::ControlVector< CONTROL_DIM, SCALAR > &  control,
ct::core::StateVector< AUGMENTED_STATE_DIM, SCALAR > &  derivative 
)
override

compute the dynamics (the left-hand-side of the dynamics equation) for the disturbance-augmented system

Parameters
statethe augmented state
tthe current time
controlthe nominal control (non-perturbed)
derivativethe left-hand side of the augmented system

Member Data Documentation

◆ AUGMENTED_STATE_DIM

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
EIGEN_MAKE_ALIGNED_OPERATOR_NEW const size_t ct::optcon::InputDisturbedSystem< STATE_DIM, CONTROL_DIM, SCALAR >::AUGMENTED_STATE_DIM = STATE_DIM + CONTROL_DIM
static

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