# Combining State Space models with different size matrice?

I have two state models, one feeds the other so its concatenated.

The two systems have the following size matrix:

• $$A$$ is a $$2\times2$$ matrix,
• $$B$$ is $$2\times 10$$
• $$C$$ is $$2\times2$$
• $$D$$ is $$2 \times 10$$

The problem is, when I go to use the following method:

Cascade of state space models for linear systems

I cant, because I cannot multiply the B by the C matrix because of there different sizes. I "pad" them out with zeros, it works, but I lose all the information or states from both systems. I essentially just get the input out put relationship, which is correct but I have lost all the information.

Update #1

Please review the paper : Modeling, Analysis and Testing of Autonomous Operation of an Inverter-Based Microgrid

This will show you what I am trying to achieve. They have broken the inverter system into four components. Droop Control, Voltage Regulator, Current Regulator and the LCL filter. I am trying firstly to combine the Voltage Regulator and the Current Regulator which BOTH have the orders that I mentioned above.

They have then combined all the state space models, the problem is that the LCL filter outputs Il,Vo and Io feed into the all of the other components, and they also feed each other.

The problem is, I want to understand and adjust this model slightly as I want the ability to input the power and in this model they have removed that. I have done the adjustment to the droop controller equations already. I just do not understand how they have combined the model, I cannot find a reference to it anywhere.

• You only posted the dimensions of one state space model, and those dimensions even don't seem correct (at least the C matrix). Could you double check this and update your question? Commented Feb 2, 2022 at 16:37
• Hi, Firstly thanks for your comment. I will update the answer with pictures of the system, and then the state space models I have.
– SS1
Commented Feb 4, 2022 at 5:53

Let's say your system is such its state is of dimension 3, the output of dimension 2 and the input of dimension 10.

If you want to place them in cascade in the usual sense, that is, all the outputs of the first system are connected to the inputs of the second one, then you will not be able to do that. Why? Because the dimensions of the input and the output are not the same.

However, you may be able to connect some of the outputs of the first system to some of the inputs of the second system. If you do that, you will get a system in cascade but of a slightly different type than the usual cascade systems. In fact, this can be seen as a slight generalization.

The input of your cascade system will be the inputs of the first system and the inputs of the second system which have not been connected to the outputs of the first system. Similarly, the output of your cascade will be the outputs of the second system and the outputs of the first system which have not been connected to inputs of the second system.

That said, plugging systems in cascade often has a physical meaning and I think that you should think about whether what you are trying to do really makes sense physically.

Edit #1. I am editing my post as more details have been posted. In order to combine the voltage and the current controllers, you just do what I said, you connect some of the outputs to some of the inputs. Here, you can connect $$i^*_{ld}$$ and $$i^*_{lq}$$, which are the outputs of the voltage controller and the inputs of the current controller. The inputs of the combined system will be $$v^*_{od}$$, $$v_{od}$$, $$v^*_{oq}$$, $$v_{oq}$$, $$i_{od}$$, $$i_{oq}$$ (the inputs of the voltage controller), and $$i_{ld}$$, $$i_{lq}$$ (the remaining inputs of the current controller). The outputs will be $$v^*_{id}$$ and $$v^*_{iq}$$.

You can, for instance, write the voltage controller as

$$\begin{array}{rcl} \dot{x}_1&=&A_1x_1+B_1w_1\\ z_1&=&C_1x_1+D_1w_1 \end{array}$$

and the current controller as

$$\begin{array}{rcl} \dot{x}_2&=&A_2x_2+B_{21}w_{21}+B_{21}w_{22}\\ z_2&=&C_2x_2+D_{21}w_{21}+D_{22}w_{22} \end{array}$$

where $$w_{12}$$ are the inputs that will come from the voltage controller (i.e. $$w_{21}=z_1$$), and $$w_{22}$$ are the other inputs. Then, you can combine the models.

• Please review the update I have added, this will add clarity to what I am trying to achieve and highly the physical system I am trying to model.
– SS1
Commented Feb 4, 2022 at 6:03
• @SandfordStebbings I am not working in EE so I cannot help much but from my reading, they just augmented the state to include everything and also considered the interconnection of input and output signals as they have defined it.
– KBS
Commented Feb 4, 2022 at 17:42
• thank you for your response. I am a little confused. But I know you are right, because the paper I am using says exactly what you just said. Do you have any reference for this so I can go study it ? I do not quiet see how to combine them once they are split. Do I combine A1+B1 with A2+B21 and then tac on the B22? This is the paper I'm working off - Modeling, Analysis and Testing of Autonomous Operation of an Inverter-Based Microgrid
– SS1
Commented Feb 4, 2022 at 23:02
• I have updated my answer. Just follow the procedure I am giving. This is just some algebra.
– KBS
Commented Feb 5, 2022 at 14:34
• Thanks heaps. I went back and played around with the Algebra as you said and I got it all working.
– SS1
Commented Feb 6, 2022 at 0:34