Formula for interconnection of LTIs in state space form Given two SISO transfer functions as
$$
\begin{align}
G_1(s) &= C_1(s I - A_1)^{-1}B_1 + D_1 \\
G_2(s) &= C_2(s I - A_2)^{-1}B_2 + D_2 .
\end{align}
$$
It is well known that the "most common" interconnections of these transfer functions is given by:
$$
\begin{align}
G_{\text{series}} &= G_1 G_2 \\
G_{\text{parallel}} &= G_1 + G_2 \\
G_{\text{feedback}} &= \frac{G_1 G_2}{1 \pm G_1 G_2} .
\end{align}
$$
However, I could not find any formulas to directly compute the state space representation of these interconnections, given only the state space representation of $G_1$ and $G_2$.
In especially, I would like to get the connected state space representation without an indirection involving transfer functions.
Does anyone know formulas for this?
 A: For the series state space model you just have to link the output of the first system to the input of the second system, so $u_2 = y_1 = C_1\,x_1 + D_1\,u_1$. By defining the new state vector as $x = \begin{bmatrix}x_1^\top & x_2^\top\end{bmatrix}^\top$, input as $u = u_1$ and output as $y=y_2$ yields the following combined system
\begin{align}
\dot{x} &= 
\begin{bmatrix}
A_1 & 0 \\ B_2\,C_1 & A_2
\end{bmatrix} x + 
\begin{bmatrix}
B_1 \\ B_2\,D_1
\end{bmatrix} u \\
y &= 
\begin{bmatrix}
D_2\,C_1 & C_2
\end{bmatrix} x + 
D_2\,D_1\,u.
\end{align}
For the parallel state space model you just have to give both systems the same input and add the output of both systems for the final output, so $u_1 = u_2 = u$ and $y = y_1 + y_2$. By again defining the new state vector as $x = \begin{bmatrix}x_1^\top & x_2^\top\end{bmatrix}^\top$, input as $u = u_1 = u_2$ and output as $y = y_1 + y_2$ yields the following combined system
\begin{align}
\dot{x} &= 
\begin{bmatrix}
A_1 & 0 \\ 0 & A_2
\end{bmatrix} x + 
\begin{bmatrix}
B_1 \\ B_2
\end{bmatrix} u \\
y &= 
\begin{bmatrix}
C_1 & C_2
\end{bmatrix} x + 
\left(D_2 + D_1\right) u.
\end{align}
For the feedback state space model I will just consider one state space model, since the equivalent state space model for $G_1\,G_2$ can be obtained using the series state space model. For feedback the input to the starting state space model is $u = r \mp y = r \mp (C\,x + D\,u)$. I will try to keep it as general as possible and also allow MIMO systems, so solving for $u$ gives $u = (I \pm D)^{-1} (r \mp C\,x)$, which yields the following simplified closed loop system
\begin{align}
\dot{x} &= \left(A \mp B\,(I \pm D)^{-1} C\right) x + 
B\,(I \pm D)^{-1} r \\
y &= (I \pm D)^{-1} C\,x + D\,(I \pm D)^{-1} r,
\end{align}
from which it can be seen that $I \pm D$ has to be invertible.
Of course just like any other state space model you can apply any similarity transformation you like, so these representations are not unique. Also these resulting state space models might not be minimal (controllable and observable) even if the starting model are. For example when considering the parallel systems and $G_1=G_2$.
More different combinations of state space models and additional gain matrices can also be found in Duke, Eugene L. "Combining and connecting linear, multi-input, multi-output subsystem models." (1986).
