# Issue with series command in MATLAB

I have a controller and a plant in series. The controller is 3 input 3 output MIMO system and the plant is also 3 input 3 output system. The bode of the open loop gain, i.e.,

$$D(z)=C(z)*G(z)$$

appears to be different when using

$$series(C(z),G(z))$$ versus

$$D(z) = C_1(z)G_1(z) + C_2(z)G_2(z) + C_3(z)G_3(z) \\$$

Theoretically, I believe both are same. However, the latter method gives a different bode with undamped peak, unlike the one using the series command.

The approach using $D(z) = C_1(z)G_1(z) + C_2(z)G_2(z) + C_3(z)G_3(z)$ is most suitable, according to me, as it gives more clarity.

Can anyone share idea on why this misbehaviour exists?

• Is there a difference between Z and z (seems that you use both in the code). Matlab is case sensitive, right?
– 50k4
Nov 29, 2016 at 10:56
• Z and z does not matter as this is just an explanation of the logic used in the code Nov 29, 2016 at 12:45
• @50k4 - It doesn't seem to matter in this particular question, but for the record, yes Matlab is case sensitive. Nov 29, 2016 at 21:32

## 1 Answer

You haven't posted any specifics about your plant or the controller, and I'm not positive I understand your terminology.

You said it's a MIMO system, but then you give the combined block (controller/plant) as:

$$D(z) = C_1(z)G_1(z) + C_2(z)G_2(z) + C_3(z)G_3(z) \\$$

A couple of points here:

1. It looks to me like $D(z)$ is now a singular value and not a vector of outputs.
2. Ignoring the point above, it doesn't look like you have any method for interaction between inputs. The way you wrote the "long" model implies that $G_1$ can be separated from $G_2$ and $G_3$, which means that $G_1$ has no impact on the others and vice-versa. This would mean that you don't actually have a MIMO system, just a group SISO systems.

Per point (1) above, I would expect your $D(z)$ definition to look more like:

$$D(z) = \left[ \begin{array}{} C_1(z)G_1(z) \\ C_2(z)G_2(z) \\ C_3(z)G_3(z) \end{array} \right] \\$$

That gives you a vector of outputs, but again, if $C_x$ has no impact on any of the other $C$ states, and $G_x$ has no impact on any of the other $G$ states, then you're saying that there's no coupling between any of those states and thus you don't have a MIMO system; it's more of a diagonal or block diagonal system where each input/output pair is distinct and unrelated to any other pair.

Unfortunately, this is about as helpful or insightful as I can be without specifics. If you could edit your post to show what you're using for the controller and plant, some plots of what your outputs are looking like, etc., then maybe I could say something more, but at the moment this is the best answer I can give.

• Thank you for your response.could you please share your email if possible? Nov 30, 2016 at 11:05
• Could you please check my new post "issue with open loop gain" and revert with your valuable suggestion Nov 30, 2016 at 11:29
• @GKY1980 - This is a public site, with the hopes that anyone that has the same problem as you in the future can find the answer here. There is no private messaging or email linking at Stack Exchange to discourage behind-the-scenes communication. If you have more questions, feel free to just create more posts - they're free! If there's some aspect of your question you think I've missed or I didn't exactly answer your question, then leave me a comment and/or edit your original question. Nov 30, 2016 at 13:51
• Thank you Chuck for your valuable reply. The issue is solved. I found that the OLTF is arrived as plant G(s)*controller(C(s)) thereby making the loop as single loop(plant(1x3) * controller(3x1)). However, when the same is connected as controller C(s)* Plant G(s), the resulting output is a MIMO (3x3). However, the existing calculations show that only diagonal elements of the resultant matrix is considered to compute OLTF. The final answer neglecting other loop interactions is C1(z)G1(z)+C2(z)G2(z)+C3(z)G3(z). Dec 5, 2016 at 7:07