- 3.0.2 core module.
|
A general, non-linear discrete dynamic system with a control input. More...
#include <DiscreteControlledSystem.h>
Public Types | |
typedef DiscreteSystem< STATE_DIM, CONTROL_DIM, SCALAR > | Base |
typedef Base::state_vector_t | state_vector_t |
typedef Base::control_vector_t | control_vector_t |
typedef Base::time_t | time_t |
Public Types inherited from ct::core::DiscreteSystem< STATE_DIM, CONTROL_DIM, SCALAR > | |
typedef int | time_t |
the type of the time variable More... | |
typedef StateVector< STATE_DIM, SCALAR > | state_vector_t |
typedef ControlVector< CONTROL_DIM, SCALAR > | control_vector_t |
Public Member Functions | |
DiscreteControlledSystem (const SYSTEM_TYPE &type=SYSTEM_TYPE::GENERAL) | |
default constructor More... | |
DiscreteControlledSystem (std::shared_ptr< DiscreteController< STATE_DIM, CONTROL_DIM, SCALAR >> controller, const SYSTEM_TYPE &type=SYSTEM_TYPE::GENERAL) | |
constructor More... | |
DiscreteControlledSystem (const ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > &arg) | |
copy constructor More... | |
virtual | ~DiscreteControlledSystem ()=default |
destructor More... | |
virtual DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > * | clone () const override=0 |
deep copy More... | |
void | setController (const std::shared_ptr< DiscreteController< STATE_DIM, CONTROL_DIM, SCALAR >> &controller) |
set a new controller More... | |
void | getController (std::shared_ptr< DiscreteController< STATE_DIM, CONTROL_DIM, SCALAR >> &controller) const |
get the controller instance More... | |
std::shared_ptr< DiscreteController< STATE_DIM, CONTROL_DIM, SCALAR > > | getController () |
get the controller instace More... | |
virtual void | propagateDynamics (const state_vector_t &state, const time_t n, state_vector_t &stateNext) override |
propagates the system dynamics forward by one step More... | |
virtual void | propagateControlledDynamics (const state_vector_t &state, const time_t n, const control_vector_t &control, state_vector_t &stateNext)=0 |
propagates the controlled system dynamics forward by one step More... | |
Public Member Functions inherited from ct::core::DiscreteSystem< STATE_DIM, CONTROL_DIM, SCALAR > | |
DiscreteSystem (const SYSTEM_TYPE &type=GENERAL) | |
constructor More... | |
virtual | ~DiscreteSystem () |
desctructor More... | |
virtual void | propagateDynamics (const StateVector< STATE_DIM, SCALAR > &state, const time_t n, StateVector< STATE_DIM, SCALAR > &stateNext)=0 |
propagates the system dynamics forward by one step More... | |
SYSTEM_TYPE | getType () const |
get the type of system More... | |
Public Attributes | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef std::shared_ptr< DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > > | Ptr |
Protected Attributes | |
std::shared_ptr< DiscreteController< STATE_DIM, CONTROL_DIM, SCALAR > > | controller_ |
the controller instance More... | |
Protected Attributes inherited from ct::core::DiscreteSystem< STATE_DIM, CONTROL_DIM, SCALAR > | |
SYSTEM_TYPE | type_ |
type of system More... | |
A general, non-linear discrete dynamic system with a control input.
This describes a general, non-linear discrete dynamic system of the following form
where is the state, the control input and the time index.
For implementing your own ControlledSystem, derive from this class.
We generally assume that the Controller is a state and time index dependent function which allows any ControlledSystem to be re-written as a System of the form
which can be forward propagated directly.
STATE_DIM | dimension of state vector |
CONTROL_DIM | dimension of input vector |
SCALAR | scalar type |
typedef DiscreteSystem<STATE_DIM, CONTROL_DIM, SCALAR> ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >::Base |
typedef Base::state_vector_t ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >::state_vector_t |
typedef Base::control_vector_t ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >::control_vector_t |
typedef Base::time_t ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >::time_t |
|
inline |
default constructor
type | system type |
|
inline |
constructor
controller | controller |
type | system type |
|
inline |
copy constructor
|
virtualdefault |
destructor
Referenced by ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, double >::DiscreteControlledSystem().
|
overridepure virtual |
deep copy
Reimplemented from ct::core::DiscreteSystem< STATE_DIM, CONTROL_DIM, SCALAR >.
Implemented in ct::core::SwitchedDiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >, ct::core::SystemDiscretizer< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR >, ct::core::DiscreteSystemLinearizer< STATE_DIM, CONTROL_DIM, SCALAR >, ct::core::SensitivityApproximation< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR >, ct::core::SwitchedDiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >, ct::core::DiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >, ct::core::DiscreteLinearSystem< 2, 1, float >, ct::core::DiscreteLinearSystem< 2, 1, double >, ct::core::Sensitivity< STATE_DIM, CONTROL_DIM, SCALAR >, ct::core::tpl::TestDiscreteNonlinearSystem< SCALAR >, ct::core::generated::TestDiscreteNonlinearSystemLinearized, ct::core::generated::TestDiscreteNonlinearSystemLinearizedDouble, and ct::core::generated::TestDiscreteNonlinearSystemLinearizedFloat.
Referenced by ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, double >::DiscreteControlledSystem().
|
inline |
set a new controller
controller | new controller |
|
inline |
get the controller instance
controller | controller instance |
|
inline |
get the controller instace
|
inlineoverridevirtual |
propagates the system dynamics forward by one step
evaluates at a given state and index
state | start state to propagate from |
n | time index to propagate the dynamics at |
stateNext | the resulting propagated state |
|
pure virtual |
propagates the controlled system dynamics forward by one step
evaluates at a given state, control and index
state | start state to propagate from |
control | the control input to apply. This is a constant control input applied to the continuous-time dynamics |
n | time index to propagate the dynamics at |
stateNext | the resulting propagated state |
Implemented in ct::core::SwitchedDiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >, ct::core::SwitchedDiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >, ct::core::DiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >, ct::core::DiscreteLinearSystem< 2, 1, float >, ct::core::DiscreteLinearSystem< 2, 1, double >, and ct::core::tpl::TestDiscreteNonlinearSystem< SCALAR >.
Referenced by ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, double >::propagateDynamics().
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef std::shared_ptr<DiscreteControlledSystem<STATE_DIM, CONTROL_DIM, SCALAR> > ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >::Ptr |
|
protected |
the controller instance
Referenced by ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, double >::DiscreteControlledSystem(), ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, double >::getController(), ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, double >::propagateDynamics(), and ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, double >::setController().