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

Interface class for all controllers. More...

#include <Controller.h>

Inheritance diagram for ct::core::Controller< STATE_DIM, CONTROL_DIM, SCALAR >:
ct::core::ConstantController< STATE_DIM, CONTROL_DIM, SCALAR > ct::core::ConstantStateFeedbackController< STATE_DIM, CONTROL_DIM, SCALAR > ct::core::ConstantTrajectoryController< STATE_DIM, CONTROL_DIM, SCALAR > ct::core::StateFeedbackController< STATE_DIM, CONTROL_DIM, SCALAR > ct::optcon::ControllerDms< STATE_DIM, CONTROL_DIM, SCALAR >

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW Controller ()
 Default constructor. More...
 
 Controller (const Controller &other)
 Copy constructor. More...
 
virtual ~Controller ()
 Destructor. More...
 
virtual Controllerclone () const =0
 Deep cloning. More...
 
virtual void computeControl (const StateVector< STATE_DIM, SCALAR > &state, const SCALAR &t, ControlVector< CONTROL_DIM, SCALAR > &controlAction)=0
 Compute control signal. More...
 
virtual ControlMatrix< CONTROL_DIM, SCALARgetDerivativeU0 (const StateVector< STATE_DIM, SCALAR > &state, const SCALAR time)
 Returns the the derivative of the control with respect to the initial control input u0. More...
 
virtual ControlMatrix< CONTROL_DIM, SCALARgetDerivativeUf (const StateVector< STATE_DIM, SCALAR > &state, const SCALAR time)
 Returns the the derivative of the control with respect to the final control input uF. More...
 

Detailed Description

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

Interface class for all controllers.

This is a pure interface class for Controllers that can be fed to any ControlledSystem. Any custom controller should derive from this class to ensure it is compatible with ControlledSystem and the Integrator.

Examples:
CustomController.h.

Constructor & Destructor Documentation

◆ Controller() [1/2]

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
EIGEN_MAKE_ALIGNED_OPERATOR_NEW ct::core::Controller< STATE_DIM, CONTROL_DIM, SCALAR >::Controller ( )
inline

Default constructor.

◆ Controller() [2/2]

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

Copy constructor.

◆ ~Controller()

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

Destructor.

Member Function Documentation

◆ clone()

◆ computeControl()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
virtual void ct::core::Controller< STATE_DIM, CONTROL_DIM, SCALAR >::computeControl ( const StateVector< STATE_DIM, SCALAR > &  state,
const SCALAR t,
ControlVector< CONTROL_DIM, SCALAR > &  controlAction 
)
pure virtual

Compute control signal.

Evaluate the given controller for a given state and time returns the computed control action.

This function has to be implemented by any custom controller

Parameters
statecurrent state of the system
tcurrent time of the system
controlActionthe corresponding control action

Implemented in ct::core::ConstantStateFeedbackController< STATE_DIM, CONTROL_DIM, SCALAR >, ct::core::ConstantTrajectoryController< STATE_DIM, CONTROL_DIM, SCALAR >, and ct::core::ConstantController< STATE_DIM, CONTROL_DIM, SCALAR >.

Referenced by ct::core::Controller< 1, 1, double >::~Controller().

◆ getDerivativeU0()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
virtual ControlMatrix<CONTROL_DIM, SCALAR> ct::core::Controller< STATE_DIM, CONTROL_DIM, SCALAR >::getDerivativeU0 ( const StateVector< STATE_DIM, SCALAR > &  state,
const SCALAR  time 
)
inlinevirtual

Returns the the derivative of the control with respect to the initial control input u0.

Parameters
[in]stateThe state at which the method will be evaluated
[in]timeThe time at which the method will be evaluated
Returns
The derivatives with respect to u0.

Reimplemented in ct::core::ConstantController< STATE_DIM, CONTROL_DIM, SCALAR >.

◆ getDerivativeUf()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
virtual ControlMatrix<CONTROL_DIM, SCALAR> ct::core::Controller< STATE_DIM, CONTROL_DIM, SCALAR >::getDerivativeUf ( const StateVector< STATE_DIM, SCALAR > &  state,
const SCALAR  time 
)
inlinevirtual

Returns the the derivative of the control with respect to the final control input uF.

Parameters
[in]stateThe state at which the method will be evaluated
[in]timeThe time at which the method will be evaluated
Returns
The derivatives with respect to uF.

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