ct_optcon  3.0.1
Control Toolbox - Optimal Control Module
CustomController Class Reference

An example controller, in which we artifically add a time-varying disturbance. More...

Inheritance diagram for CustomController:

Public Member Functions

 CustomController (const ct::core::ControlVector< control_dim > &uff_max, const double &uff_frequency, const double &kp, const double &kd, const double &disturbance_max, const double &disturbance_frequency)
 default constructor More...
 
CustomControllerclone () const override
 clone method, needs to be implemented, overrides ct::core::Controller::clone() More...
 
void computeControl (const ct::core::StateVector< state_dim > &state, const double &t, ct::core::ControlVector< control_dim > &controlAction) override
 override the compute control method with a custom control law which includes a disturbance More...
 
ct::core::ControlVector< control_dimgetSimulatedDisturbance (const double &t)
 simulate the disturbance allow to reconstruct it from outside More...
 

Static Public Attributes

static EIGEN_MAKE_ALIGNED_OPERATOR_NEW const size_t state_dim = 2
 
static const size_t control_dim = 1
 

Detailed Description

An example controller, in which we artifically add a time-varying disturbance.

Note
this is only required for this simulated example. Not required for proper simulator/hardware setups.
Examples:
KalmanDisturbanceFiltering.cpp, and KalmanFiltering.cpp.

Constructor & Destructor Documentation

CustomController::CustomController ( const ct::core::ControlVector< control_dim > &  uff_max,
const double &  uff_frequency,
const double &  kp,
const double &  kd,
const double &  disturbance_max,
const double &  disturbance_frequency 
)
inline

default constructor

Examples:
KalmanDisturbanceFiltering.cpp.

Referenced by clone(), and main().

Member Function Documentation

CustomController* CustomController::clone ( ) const
inlineoverride

clone method, needs to be implemented, overrides ct::core::Controller::clone()

Examples:
KalmanDisturbanceFiltering.cpp.

References CustomController().

void CustomController::computeControl ( const ct::core::StateVector< state_dim > &  state,
const double &  t,
ct::core::ControlVector< control_dim > &  controlAction 
)
inlineoverride

override the compute control method with a custom control law which includes a disturbance

Examples:
KalmanDisturbanceFiltering.cpp.

References getSimulatedDisturbance().

ct::core::ControlVector<control_dim> CustomController::getSimulatedDisturbance ( const double &  t)
inline

simulate the disturbance allow to reconstruct it from outside

Examples:
KalmanDisturbanceFiltering.cpp.

Referenced by computeControl().

Member Data Documentation

EIGEN_MAKE_ALIGNED_OPERATOR_NEW const size_t CustomController::state_dim = 2
static
const size_t CustomController::control_dim = 1
static

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