Discrete Varying State Space
Discrete-time state-space model with varying matrix values
Libraries:
Control System Toolbox /
Linear Parameter Varying
Description
Use this block to implement a discrete-time state-space model with varying matrices. Feed the instantaneous values of the state matrix A, input matrix B, output matrix C, and feedforward matrix D to the corresponding input ports. The system response is given by:
where uk is the system input, yk is the system output, xk is the current system state, and xk+1 is the system state at the next time step.
The block also lets you specify varying offsets (since R2024a). Then, the system response is given by:
where u0k is the input offset, y0k is the output offset, and x0k and dx0k are the state offset and state derivative offset, respectively.
Use this block and the other blocks in the Linear Parameter Varying library to implement common control elements with variable parameters or coefficients. For more information, see Model Gain-Scheduled Control Systems in Simulink.
Caution
Avoid making the C and D matrices depend on the system output yk. If you have such dependence, the resulting state-space equation yk = C(yk)xk + D(yk)uk creates an algebraic loop, because computing the output value yk requires knowing the output value. This algebraic loop is prone to instability and divergence. Instead, try expressing C and D in terms of the time t, the block input uk, and the state outputs xk.
For similar reasons, avoid making A and B depend on the xk+1 output. Note that it is safe for A and B to depend on yk when yk is a fixed combination of states and inputs (in other words, when yk = Cxk + Duk, where C and D are constant matrices).