I have two state space systems. Now I want to compute the state space system where the first state space system is the input of the other...
$$M_1 = \begin{cases}\dot{x}_1 = A_1 x_1 + B_1 u_1 \\ y_1 = C_1 x_1 + D_1 u_1 \end{cases}$$ $$M_2 = \begin{cases}\dot{x}_2 = A_2 x_2 + B_2 u_2 \\ y_2 = C_2 x_2 + D_2 u_2 \end{cases}$$
+ u1 r --->O---->[ M1 ]----+---> y1 - | | y2 +-----[ M2 ]<---+ u2 Where $u_1 = r - y_2$ and $u_2 = y_1$.
How do you compute the new $A,B,C,D$ matrices?
When I have $A_1 = B_1 = C_1 = D_1 = 1$ and $A_2 = B_2 = C_2 = D_2 = 2$ I should obtain
$A = \begin{bmatrix} 1/3 & -2/3 \\ 2/3 & 2/3 \end{bmatrix}, B = \begin{bmatrix} 1/3 \\ 2/3 \end{bmatrix}, C = \begin{bmatrix} 1/3 & -2/3 \end{bmatrix}, D = 1/3$