Implement discretetime state space
Simulink / Additional Math & Discrete / Additional Discrete
The FixedPoint StateSpace block implements the system described by
$$y(n)=\text{C}x(n)+\text{D}u(n)$$
$$x(n+1)=\text{A}x(n)+\text{B}u(n)$$
where u is the input, x is the state, and y is the output. Both equations have the same data type.
A must be an nbyn matrix, where n is the number of states.
B must be an nbym matrix, where m is the number of inputs.
C must be an rbyn matrix, where r is the number of outputs.
D must be an rbym matrix.
In addition:
The state x must be an nby1 vector.
The input u must be an mby1 vector.
The output y must be an rby1 vector.
The block accepts one input and generates one output. The width of the input vector is the number of columns in the B and D matrices. The width of the output vector is the number of rows in the C and D matrices. To define the initial state vector, use the Initial conditions parameter.
Data Types 

Direct Feedthrough 

Multidimensional Signals 

VariableSize Signals 

ZeroCrossing Detection 

^{[a]} This block is not recommended for use with Boolean signals. 