Observe the output of a system for a given input from State-Space representation using Simulink

Suppose, we have a state-space representation of a system - 


    \[\dot{\overrightarrow{x}} (t) = \begin{bmatrix} 0 & 9 \\ 1 & 0 \end{bmatrix} \overrightarrow{x} (t) + \begin{bmatrix} 1 \\ 0 \end{bmatrix} u(t)\]


    \[y = \begin{bmatrix} 1 & -3 \end{bmatrix} \overrightarrow{x}\]


By using state_space block of the simulink, we can see the behavior of this system. Here, we will see the output of the given system for a unit-step input u (t).




simulink10



From the state space representation, in this system we have - 


    \[ A = \begin{bmatrix} 0 & 9 \\ 1 & 0 \end{bmatrix} \]


    \[ B = \begin{bmatrix} 1 \\ 0 \end{bmatrix} \]



    \[ C = \begin{bmatrix} 1 & -3 \end{bmatrix} \]



D = 0


Initial Condition: 


    \[ \dot {x} (t) = \begin{bmatrix} 0 & 0 \end{bmatrix} \]


So, update the state-space block according to the above - 


simulink11





After running the simulation, from the scope, we can see the output response of the given system.


simulink12






Instead of using Simulink state-space block, we can draw the system and can see the output response from the scope.


Steps:


1) From the Simulink Library Browser > Simulink > Continuous, have as many integrator (1/s) as the no. of state variables


simulink1



2) Put x_dot and x before and after each integrator




simulink2


3) Insert the input at the leftmost. Here we are using a unit step input. From Simulink > Sources, insert one step block


simulink3

4) Insert the output at the rightmost. Here, we will use a scope to see the output. From Simulink > Sinks, insert one scope block

simulink4



5) Write the differential equations separately, and draw them using sum and gain blocks


    \[\dot {x_1} = 9 x_2 + u \]




simulink5





    \[\dot {x_2} = x_1 \]




simulink6



6) Write the output equations and draw them using sum and gain blocks


    \[ y = x_1 - 3 x_2 \]

simulink7





From the scope we can see that we have the same output as the previous.

simulink9