- 3.0.2 optimal control module.
|
System model adapted to CT. System model encapsulates the integrator, so it is able to propagate the system, but also computes derivatives w.r.t. both state and noise. When propagating the system, CTSystemModel does not use the specified control input, but uses the assigned system controller instead. More...
#include <CTSystemModel.h>
Public Types | |
using | Base = SystemModelBase< STATE_DIM, CONTROL_DIM, SCALAR > |
using | SensitivityApprox_t = ct::core::SensitivityApproximation< STATE_DIM, CONTROL_DIM, STATE_DIM/2, STATE_DIM/2, SCALAR > |
using | control_vector_t = ct::core::ControlVector< CONTROL_DIM, SCALAR > |
using | state_matrix_t = ct::core::StateMatrix< STATE_DIM, SCALAR > |
using | state_vector_t = ct::core::StateVector< STATE_DIM, SCALAR > |
using | Time_t = SCALAR |
Public Types inherited from ct::optcon::SystemModelBase< STATE_DIM, CONTROL_DIM, SCALAR > | |
using | state_vector_t = ct::core::StateVector< STATE_DIM, SCALAR > |
using | state_matrix_t = ct::core::StateMatrix< STATE_DIM, SCALAR > |
using | control_vector_t = ct::core::ControlVector< CONTROL_DIM, SCALAR > |
using | Time_t = SCALAR |
Public Member Functions | |
CTSystemModel (std::shared_ptr< ct::core::ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >> system, std::shared_ptr< SensitivityApprox_t > sensApprox, const state_matrix_t &dFdv, const ct::core::IntegrationType &intType=ct::core::IntegrationType::EULERCT) | |
Constructor. Takes in the system with defined controller, and sens approximator for computing the derivatives. More... | |
state_vector_t | computeDynamics (const state_vector_t &state, const control_vector_t &u, const Time_t dt, Time_t t) override |
Propagates the system giving the next state as output. Control input is generated by the system controller. More... | |
state_matrix_t | computeDerivativeState (const state_vector_t &state, const control_vector_t &u, const Time_t dt, Time_t t) override |
Computes the derivative w.r.t state. Control input is generated by the system controller. More... | |
state_matrix_t | computeDerivativeNoise (const state_vector_t &state, const control_vector_t &control, const Time_t dt, Time_t t) override |
Computes the derivative w.r.t noise. Control input is generated by the system controller. More... | |
Public Member Functions inherited from ct::optcon::SystemModelBase< STATE_DIM, CONTROL_DIM, SCALAR > | |
virtual | ~SystemModelBase ()=default |
Virtual destructor. More... | |
Protected Attributes | |
std::shared_ptr< ct::core::ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > > | system_ |
The underlying CT system. More... | |
std::shared_ptr< ct::core::ConstantController< STATE_DIM, CONTROL_DIM, SCALAR > > | constantController_ |
each system gets re-assigned a constant controller for dynamics evaluation with known control inputs More... | |
std::shared_ptr< SensitivityApprox_t > | sensApprox_ |
The sensitivity approximator. More... | |
state_matrix_t | dFdv_ |
Derivative w.r.t. noise. More... | |
ct::core::Integrator< STATE_DIM, SCALAR > | integrator_ |
Integrator. More... | |
System model adapted to CT. System model encapsulates the integrator, so it is able to propagate the system, but also computes derivatives w.r.t. both state and noise. When propagating the system, CTSystemModel does not use the specified control input, but uses the assigned system controller instead.
STATE_DIM | |
CONTROL_DIM |
using ct::optcon::CTSystemModel< STATE_DIM, CONTROL_DIM, SCALAR >::Base = SystemModelBase<STATE_DIM, CONTROL_DIM, SCALAR> |
using ct::optcon::CTSystemModel< STATE_DIM, CONTROL_DIM, SCALAR >::SensitivityApprox_t = ct::core::SensitivityApproximation<STATE_DIM, CONTROL_DIM, STATE_DIM / 2, STATE_DIM / 2, SCALAR> |
using ct::optcon::SystemModelBase< STATE_DIM, CONTROL_DIM, SCALAR >::control_vector_t = ct::core::ControlVector<CONTROL_DIM, SCALAR> |
using ct::optcon::SystemModelBase< STATE_DIM, CONTROL_DIM, SCALAR >::state_matrix_t = ct::core::StateMatrix<STATE_DIM, SCALAR> |
using ct::optcon::SystemModelBase< STATE_DIM, CONTROL_DIM, SCALAR >::state_vector_t = ct::core::StateVector<STATE_DIM, SCALAR> |
using ct::optcon::SystemModelBase< STATE_DIM, CONTROL_DIM, SCALAR >::Time_t = SCALAR |
ct::optcon::CTSystemModel< STATE_DIM, CONTROL_DIM, SCALAR >::CTSystemModel | ( | std::shared_ptr< ct::core::ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >> | system, |
std::shared_ptr< SensitivityApprox_t > | sensApprox, | ||
const state_matrix_t & | dFdv, | ||
const ct::core::IntegrationType & | intType = ct::core::IntegrationType::EULERCT |
||
) |
Constructor. Takes in the system with defined controller, and sens approximator for computing the derivatives.
References ct::optcon::CTSystemModel< STATE_DIM, CONTROL_DIM, SCALAR >::constantController_, and ct::optcon::CTSystemModel< STATE_DIM, CONTROL_DIM, SCALAR >::system_.
|
overridevirtual |
Propagates the system giving the next state as output. Control input is generated by the system controller.
Implements ct::optcon::SystemModelBase< STATE_DIM, CONTROL_DIM, SCALAR >.
References ct::optcon::CTSystemModel< STATE_DIM, CONTROL_DIM, SCALAR >::constantController_, dt, ct::optcon::CTSystemModel< STATE_DIM, CONTROL_DIM, SCALAR >::integrator_, t, u, and x.
|
overridevirtual |
Computes the derivative w.r.t state. Control input is generated by the system controller.
Implements ct::optcon::SystemModelBase< STATE_DIM, CONTROL_DIM, SCALAR >.
References dt, ct::optcon::CTSystemModel< STATE_DIM, CONTROL_DIM, SCALAR >::sensApprox_, t, and u.
|
overridevirtual |
Computes the derivative w.r.t noise. Control input is generated by the system controller.
Implements ct::optcon::SystemModelBase< STATE_DIM, CONTROL_DIM, SCALAR >.
References ct::optcon::CTSystemModel< STATE_DIM, CONTROL_DIM, SCALAR >::dFdv_.
|
protected |
The underlying CT system.
Referenced by ct::optcon::CTSystemModel< STATE_DIM, CONTROL_DIM, SCALAR >::CTSystemModel().
|
protected |
each system gets re-assigned a constant controller for dynamics evaluation with known control inputs
Referenced by ct::optcon::CTSystemModel< STATE_DIM, CONTROL_DIM, SCALAR >::computeDynamics(), and ct::optcon::CTSystemModel< STATE_DIM, CONTROL_DIM, SCALAR >::CTSystemModel().
|
protected |
The sensitivity approximator.
Referenced by ct::optcon::CTSystemModel< STATE_DIM, CONTROL_DIM, SCALAR >::computeDerivativeState().
|
protected |
Derivative w.r.t. noise.
Referenced by ct::optcon::CTSystemModel< STATE_DIM, CONTROL_DIM, SCALAR >::computeDerivativeNoise().
|
protected |
Integrator.
Referenced by ct::optcon::CTSystemModel< STATE_DIM, CONTROL_DIM, SCALAR >::computeDynamics().