class for a general switched discrete linear system or linearized discrete system
More...
|
typedef Switched< LinearSystemPtr > | SwitchedLinearSystems |
|
typedef DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > | Base |
|
typedef Base::time_t | time_t |
|
typedef Base::state_vector_t | state_vector_t |
|
typedef Base::control_vector_t | control_vector_t |
|
typedef StateMatrix< STATE_DIM, SCALAR > | state_matrix_t |
| state Jacobian type More...
|
|
typedef StateControlMatrix< STATE_DIM, CONTROL_DIM, SCALAR > | state_control_matrix_t |
| input Jacobian type More...
|
|
typedef Base::time_t | time_t |
|
typedef Base::state_vector_t | state_vector_t |
|
typedef Base::control_vector_t | control_vector_t |
|
typedef StateMatrix< STATE_DIM, SCALAR > | state_matrix_t |
| state Jacobian type More...
|
|
typedef StateControlMatrix< STATE_DIM, CONTROL_DIM, SCALAR > | state_control_matrix_t |
| input Jacobian type More...
|
|
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 |
|
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 |
|
|
| SwitchedDiscreteLinearSystem (const SwitchedLinearSystems &switchedLinearSystems, const DiscreteModeSequence &discreteModeSequence, const SYSTEM_TYPE &type=SYSTEM_TYPE::GENERAL) |
| default constructor More...
|
|
| SwitchedDiscreteLinearSystem (const SwitchedDiscreteLinearSystem &arg) |
| copy constructor More...
|
|
virtual | ~SwitchedDiscreteLinearSystem () |
| destructor More...
|
|
virtual SwitchedDiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR > * | clone () const override |
| deep cloning More...
|
|
virtual void | propagateControlledDynamics (const state_vector_t &state, const time_t n, const control_vector_t &control, state_vector_t &stateNext) override |
| compute the system dynamics More...
|
|
virtual void | getAandB (const state_vector_t &x, const control_vector_t &u, const state_vector_t &x_next, const int n, size_t subSteps, state_matrix_t &A, state_control_matrix_t &B) override |
| retrieve discrete-time linear system matrices A and B for mode i, active at time n. More...
|
|
| DiscreteLinearSystem (const ct::core::SYSTEM_TYPE &type=ct::core::SYSTEM_TYPE::GENERAL) |
| default constructor More...
|
|
virtual | ~DiscreteLinearSystem () |
| destructor More...
|
|
void | getAandB (const state_vector_t &x, const control_vector_t &u, const int n, state_matrix_t &A, state_control_matrix_t &B) |
|
| 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...
|
|
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...
|
|
| 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...
|
|
template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
class ct::core::SwitchedDiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >
class for a general switched discrete linear system or linearized discrete system
Defines the interface for a switched discrete linear system
- Template Parameters
-
STATE_DIM | size of state vector |
CONTROL_DIM | size of input vector |
template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
retrieve discrete-time linear system matrices A and B for mode i, active at time n.
This computes matrices A and B such that
Note that the inputs x_next and subSteps are potentially being ignored for 'true' discrete system models but are relevant for sensitivity calculations if the underlying system is continuous.
- Parameters
-
x | the state setpoint at n |
u | the control setpoint at n |
n | the time setpoint |
x_next | the state at n+1 |
subSteps | number of substeps to use in sensitivity calculation |
A | the resulting linear system matrix A |
B | the resulting linear system matrix B |
Implements ct::core::DiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >.
References ct::core::SwitchedDiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >::discreteModeSequence_, ct::core::PhaseSequence< Phase, Time >::getPhaseFromTime(), and ct::core::SwitchedDiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >::switchedLinearSystems_.
Referenced by TEST().