# State-space description of system with two differential equations

The dynamics of my system are described by the following equations. $$J_1\ddot{\phi_1}+c(\dot{\phi_1}-\dot{\phi_2})+k(\phi_1-\phi_2)=k_I I \\ J_2\ddot{\phi_2}+c(\dot{\phi_2}-\dot{\phi_1})+k(\phi_2-\phi_1)=T_d$$ I have to find a state-space description $$\dot{x}=Ax+Bu, y=Cx+Du$$ of this system with input and output $$u=\begin{bmatrix}I \\ T_d\end{bmatrix} \text{and } y=\begin{bmatrix}\phi_1 \\ \phi_2\end{bmatrix}$$ My problem is that I don't understand how I can write this system with only two states. How can I start on this problem without writing $$x=\begin{bmatrix}\phi_1 \\ \phi_2 \\ \dot{\phi_1} \\ \dot{\phi_2} \\ \ddot{\phi_1} \\ \ddot{\phi_2}\end{bmatrix}$$?

• Your $x$ vector is wrong, it should include only 4 states, namely $\phi_1, \dot{\phi}_1, \phi_2, \dot{\phi}_2$. Also, why do you want to write it with only two states? You will need 4 states here. – SampleTime Sep 8 '19 at 14:40
• Since the output vector y only contains two states, I believe the x vector should have two as well. Please correct me if I'm wrong. – gilianzz Sep 8 '19 at 17:07
• It is wrong because you have two second order ODEs for $\phi_1$ and $\phi_2$. Converting a $n$-th order ODE to a system of first-order ODEs will always get you a system with $n$ equations (so, in this case 4). – SampleTime Sep 8 '19 at 18:09
• If you have decoupled equations and some of those equations don't affect the output, you could indeed remove them (they would also be cancelled away when writing down the transfer function). But this is not the case here. – SampleTime Sep 8 '19 at 18:11

$$\dot{x} = \frac{d}{dt}\begin{bmatrix}\phi_1 \\ \dot{\phi}_1 \\ \phi_2 \\ \dot{\phi}_2\end{bmatrix} = \begin{bmatrix}\dot{\phi}_1 \\ \ddot{\phi}_1 \\ \dot{\phi}_2 \\ \ddot{\phi}_2\end{bmatrix} = \begin{bmatrix}0 & 1 & 0 & 0 \\ -k/J_1 & -c/J_1 & k/J_1 & c/J_1 \\ & & & \\ & & & \end{bmatrix} \begin{bmatrix}\phi_1 \\ \dot{\phi}_1 \\ \phi_2 \\ \dot{\phi}_2\end{bmatrix} + \begin{bmatrix} 0 & 0 \\&\\&\\&\end{bmatrix}\begin{bmatrix}I\\T_d\end{bmatrix}$$ $$y=\begin{bmatrix}\phi_1\\\phi_2\end{bmatrix}=\begin{bmatrix} 1 & 0 & 0 & 0 \\ & & & \end{bmatrix}\begin{bmatrix}\phi_1 \\ \dot{\phi}_1 \\ \phi_2 \\ \dot{\phi}_2\end{bmatrix}$$