I have two linear control system that are represented by their state space models
$$\left( \begin{array}{c|c} A_1 & B_1 \\ \hline C_1 & D_1 \\ \end{array} \right), \left( \begin{array}{c|c} A_2 & B_2 \\ \hline C_2 & D_2 \\ \end{array} \right)$$
where $A_i$ is the state matrix, $B_i$ is the input matrix, $C_i$ is the output matrix and $D_i$ is the feedworward matrix.
The output of the first system is a vector signal of dimension $n$, which is the same dimension of the input signal of the second system. I want to put these two systems in cascade. How can I calculate the total space state model $(A_T, B_T, C_T, D_T)$?