template<int num_states, int num_cont_inputs, int num_bin_inputs>
class mimpc::System< num_states, num_cont_inputs, num_bin_inputs >
In this library the system Dynamics are represented as \( \mathbf{\dot{x}} = \mathbf{A} \mathbf{x} + \mathbf{B} \mathbf{u} \), where
- system dynamics \(\mathbf{A}\)
- input dynamics \(\mathbf{B}\)
- system state is \(\mathbf{x} \in \mathbb{R}^{\text{num_states}}\)
- system input consists of a continuous and binary part \(\mathbf{u} = \left[\mathbf{u}_\text{cont}^T,\mathbf{u}^T_\text{bin}\right]^T\), \(\mathbf{u}_\text{cont} \in \mathbb{R}^{\text{num_cont_inputs}}\) and \(\mathbf{u}_\text{cont} \in \left\{0,1\right\}^{\text{num_bin_inputs}}\)
This class represents the system dynamics by offering functions that return the matrices \(A,B\) in order to allow a state dependend linearization. When the MPC needs to know the system state, it will call the functions getA() or getB() to retrieve the full state matrix based on the current state. In order to avoid computational overhead when the systems state has changed the functions updateA() or updateB() are used in order to retrieve only the matrix values that change due to linearization.
To define the dynamics of a system, this abstract class has to be by a class which returns the linearized system dynamics as specified. The (SCIPSolver) or (MPC) can than be instantiated with the system dynamics as a template argument.
- Template Parameters
-
num_states | Number of system states |
num_cont_inputs | Number of continuous inputs |
num_bin_inputs | Number of binary inputs |