# Simplifying Cascading State Space Models

I have the following 2 state space models

1. $$\begin{array}{rcl} \dot{x}_1&=&A_1x_1+B_{11}u_{11}+B_{12}u_{12}\\ y_1&=&C_1x_1+D_{11}u_{11}+D_{12}u_{12} \end{array}$$

2. $$\begin{array}{rcl} \dot{x}_2&=&A_2x_2+B_{2}u_{2}\\ y_2&=&C_2x_2+D_{2}u_{2}\\ \end{array}$$

The first system is a controller which feeds the second system, The output of the second system then feeds back as one of the inputs to the first system:

$$\begin{array}\dot{y}_{1}&= u_{2}\end{array}$$

And: $$\begin{array}\dot{u}_{12}&= y_{2}\end{array}$$

Algebraically, if I plug in y1 in u2 it works, but when I try plug y2 into u12, I get a loop as they are dependant on either other.

I am unsure how to combine these? It feels like I need to make the second system output a state not an input/output. I am just unsure how to do it.

• In feedback interconnections you have a well-posedness condition, which basically says that you cannot have an algebraic loop in the system. This is ensured if $\det(I-D_2)\neq 0$, if I'm correct (not 100% sure, as I don't have pen and paper available right now :P, see also the following: imng.uni-stuttgart.de/mst/files/LectureNotes.pdf In the synthesis chapter they talk about this a little bit) Commented Feb 9, 2022 at 10:52

Ok... I was not satisfied by my comment, so here is the derivation :P

NOTE: I changed the output equation of the controller to $$y_2=C_2x_2+D_{2}u_{2}$$

\begin{align} \dot{x}_1&=A_1x_1+B_{11}u_{11}+B_{12}u_{12}\\ \dot{x}_2&=A_2x_2+B_{2}u_{2}\\ y_1&=C_1x_1+D_{11}u_{11}+D_{12}u_{12} \\ y_2&=C_2x_2+D_{2}u_{2}\\ y_1&=u_2 \\ u_{12} & = y_2 \end{align} substituting $$y_1=u_2$$: \begin{align} \dot{x}_1&=A_1x_1+B_{11}u_{11}+B_{12}u_{12}\\ \dot{x}_2&=A_2x_2+B_{2}(C_1x_1+D_{11}u_{11}+D_{12}u_{12})\\ y_2&=C_2x_2+D_{2}(C_1x_1+D_{11}u_{11}+D_{12}u_{12})\\ u_{12} & = y_2 \end{align} now substituting $$u_{12} = y_2$$ in the last equation results in \begin{align} y_2 & =C_2x_2+D_{2}C_1x_1+D_{2}D_{11}u_{11}+D_{2}D_{12}y_2, \iff \\ (I-D_{2}D_{12}) y_2 & = C_2x_2+D_{2}C_1x_1+D_{2}D_{11}u_{11}, \iff \\ y_2 & = (I-D_{2}D_{12})^{-1}(C_2x_2+D_{2}C_1x_1+D_{2}D_{11}u_{11}) \end{align} We can now substitute $$u_{12} = y_2$$ in the remaining \begin{align} \dot{x}_1&=A_1x_1+B_{11}u_{11}+B_{12}(I-D_{2}D_{12})^{-1}(C_2x_2+D_{2}C_1x_1+D_{2}D_{11}u_{11})\\ \dot{x}_2&=A_2x_2+B_{2}(C_1x_1+D_{11}u_{11}+D_{12}(I-D_{2}D_{12})^{-1}(C_2x_2+D_{2}C_1x_1+D_{2}D_{11}u_{11})) \end{align} which you may simplify yourself ;-)

Either way, this system is well-posed if the inverse of $$I-D_{2}D_{12}$$ exists, i.e., $$\det(I-D_{2}D_{12})\neq0$$

The interpretation here is that the matrix $$D_{2}D_{12}$$ cannot be full rank, which implies that we have some free variables that we can use to iteratively solve the associated system of equations (we do not have strict dependency, which causes an algebraic loop)

– SS1
Commented Feb 9, 2022 at 12:25

The answer from seaver is correct, but I think that it can also be shown a little more elegantly. Namely, when starting from the initially systems

\begin{align} \dot{x}_1&=A_1x_1+B_{11}u_{11}+B_{12}u_{12}\\ \dot{x}_2&=A_2x_2+B_{2}u_{2}\\ y_1&=C_1x_1+D_{11}u_{11}+D_{12}u_{12} \\ y_2&=C_2x_2+D_{2}u_2\\ u_2&=y_1 \\ u_{12} & = y_2 \end{align}

the only relevant thing here is that $$y_1$$ and $$y_2$$ are well defined for a given state and other inputs. This can be put into equations using the output equations and the input-output relations, yielding

\begin{align} y_1&=C_1x_1+D_{11}u_{11}+D_{12}y_2, \\ y_2&=C_2x_2+D_{2}y_1. \end{align}

Combing this into one equation and bringing $$y_1$$ and $$y_2$$ to one side yields

$$\begin{bmatrix} I & -D_{12} \\ -D_2 & I \end{bmatrix} \begin{bmatrix} y_1 \\ y_2 \end{bmatrix} = \begin{bmatrix} C_1x_1+D_{11}u_{11} \\ C_2x_2 \end{bmatrix}.$$

This equation can always be solved for $$y_1$$ and $$y_2$$ if the matrix

$$\begin{bmatrix} I & -D_{12} \\ -D_2 & I \end{bmatrix}$$

is invertible (non-zero determinant), which I believe is indeed equivalent to $$\det(I-D_{2}D_{12})\neq0$$.