- 3.0.2 core module.
|
interface class for a general discrete linear system or linearized discrete system More...
#include <DiscreteLinearSystem.h>
Public Types | |
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... | |
Public Types inherited from ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > | |
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 | |
DiscreteLinearSystem (const ct::core::SYSTEM_TYPE &type=ct::core::SYSTEM_TYPE::GENERAL) | |
default constructor More... | |
virtual | ~DiscreteLinearSystem () |
destructor More... | |
virtual DiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR > * | clone () const override=0 |
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)=0 |
retrieve discrete-time linear system matrices A and B. 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) |
Public Member Functions inherited from ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > | |
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... | |
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 DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > | Base |
Public Attributes inherited from ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef std::shared_ptr< DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > > | Ptr |
Additional Inherited Members | |
Protected Attributes inherited from ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > | |
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... | |
interface class for a general discrete linear system or linearized discrete system
Defines the interface for a discrete linear system
STATE_DIM | size of state vector |
CONTROL_DIM | size of input vector |
typedef Base::time_t ct::core::DiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >::time_t |
typedef Base::state_vector_t ct::core::DiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >::state_vector_t |
typedef Base::control_vector_t ct::core::DiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >::control_vector_t |
typedef StateMatrix<STATE_DIM, SCALAR> ct::core::DiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >::state_matrix_t |
state Jacobian type
typedef StateControlMatrix<STATE_DIM, CONTROL_DIM, SCALAR> ct::core::DiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >::state_control_matrix_t |
input Jacobian type
|
inline |
default constructor
type | system type |
|
inlinevirtual |
destructor
|
overridepure virtual |
deep cloning
Implements ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >.
Implemented in 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::Sensitivity< STATE_DIM, CONTROL_DIM, SCALAR >, ct::core::generated::TestDiscreteNonlinearSystemLinearized, ct::core::generated::TestDiscreteNonlinearSystemLinearizedDouble, and ct::core::generated::TestDiscreteNonlinearSystemLinearizedFloat.
Referenced by ct::core::DiscreteLinearSystem< 2, 1, double >::~DiscreteLinearSystem().
|
inlineoverridevirtual |
compute the system dynamics
This computes the system dynamics
state | current state |
n | current time index |
control | control input |
stateNext | propagated state |
Implements ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >.
Reimplemented in ct::core::SwitchedDiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >.
|
pure virtual |
retrieve discrete-time linear system matrices A and B.
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.
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 |
Implemented in ct::core::DiscreteSystemLinearizer< STATE_DIM, CONTROL_DIM, SCALAR >, and ct::core::SwitchedDiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >.
Referenced by ct::core::DiscreteLinearSystem< 2, 1, double >::getAandB(), and ct::core::DiscreteLinearSystem< 2, 1, double >::propagateControlledDynamics().
|
inline |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef DiscreteControlledSystem<STATE_DIM, CONTROL_DIM, SCALAR> ct::core::DiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >::Base |