How do I get the transfer functions of each channel for a control system?

Consider acontrol system with the following transfer matrix:

$$\G(s)=\begin{pmatrix} G_{11}(s) & G_{12}(s)\\ 0&G_{22}(s) \end{pmatrix}\$$

and suppose I want to get the transfer functions for the two channels in order to do some analysis in Matlab, for example look if there are pole at the origins or RHP zeros, or look at the effect of coupling, I am not sure if I should do as follows:

$$\y_{2}(s)=\frac{G_{22}(s)}{1+G_{22}(s)}u_2(s)\$$

and for the first channel is:

$$\y_{1}(s)=\frac{G_{11}(s)+G_{12}(s)}{1+G_{11}(s)+G_{12}(s)}\$$

Or I have to do something like:

$$\y_{1}(s)=\frac{G_{11}(s)}{1+G_{11}(s)}u_1(s)+\frac{G_{12}(s)}{1+G_{12}(s)}u_2(s)\$$

I ask because I have not clear how to deal with the effect of coupling when I want to define the transfer functions for each channel.

Using Matlab, I have done:

F4_cross = (F4_min(1,1)/(1+F4_min(1,1)))+(F4_min(1,2)/(1+F4_min(1,2)));


where I considered $$\F4_{min}(1,1)\$$ as $$\G(1,1)\$$ and the same for $$\G(1,2)\$$ for reasons due to previous code. The problem is that $$\F4_{min}(1,1)\$$ has a pole at the origin, while $$\F4_{min}(1,2)\$$ doesn't. The controller then should have a pole at the origin for $$\F4_{min}(1,2)\$$ and for the other one not, if the steady state error has to be zero. Moreover, the step response for the coupled system F4_cross is :

so it is present a steady state error.

If I consider for example:

$$\F4_{min}(1,1)+F4_{min}(1,2)\$$

as open loop, I think this is wrong since it is a system with two inputs which are differents.

If I plot the step response I have two different step responses, one with infinite steady sate error and one with zero steady state error.

The way of operating should be to apply the decoupling, bit if I don't want to apply it I donìt see a way out.

I have tried doing:

loopsens(F4_cross_min,k1_1/s)


and this gives me zero steady state error, since F4_cross_min does not have a pole at the origin, but the syntax for loopsens is loopsens(plant,controller), and it closes the loop. But in this case F4_cross_min it is a closed loop, but this is the only solution I have found that works at least on the calculations, but I think it is conceptually wrong.

• Are you asking how you can write code to include functions inside of a matrix in MATLAB? If so, then you should consider asking this question on StackOverflow.
– user103380
Feb 3, 2020 at 20:40

This is a good question. If you have a MIMO system like you have described: $$G(s)=\begin{pmatrix} G_{11}(s) & G_{12}(s)\\ 0&G_{22}(s) \end{pmatrix}$$ And if you want to evaluate the channels separately it gets a bit tricky. For the channel $$\y_1(s)\$$ you certainly cannot do: $$y_{1}(s)=\frac{G_{11}(s)+G_{12}(s)}{1+G_{11}(s)+G_{12}(s)}$$ This would be true only for the inputs $$\u_1 = u_2\$$. Therefore you will have to evaluate the influence of the each input separately, what due to the linearity of the model should be general enough. $$y_{1}(s)=\frac{G_{11}(s)}{1+G_{11}(s)}u_1(s)+\frac{G_{12}(s)}{1+G_{12}(s)}u_2(s)$$

But it depends of course what kind of analysis do you want to perform. In matalb, for MIMO system you can use matrix representation directly.

G11 = tf(...)
G12 = tf(...)
G22 = tf(...)
G = [G11, G12; 0, G22]


This will give you the two input two output MIMO system. To better see the coupling, it is common to continue in state space representation for MIMO systems and in that case you can just use:

G = ss([G11, G12; 0, G22])


To see the poles of each channel you can check the poles of each row of the matrix:

pole(G(1,:)); % y_1
pole(G(2,:)); % y_2


But pole,bode,step, pzmap and similar functions will always give you superposed solutions for all the transfer functions (G11 and G12).

If you really want to dig deeper in this topic I suggest you to check singular values decomposition of the dynamical systems in Matlab you can calculate them using the sigma function. The output of the sigma function is a frequency dependent worst case system gain for each input, taking in consideration the coupling. This is a type of bode plot of the system and you can use the same evaluation tools as for every other bode plot. In fact for SISO system singular values plot is exactly bode magnitude plot. So in your case your singular value plot will have two lines (due to two inputs). With the singular value plot you will be able determine the worst case gains and magnitudes on certain frequencies, but not really the poles and zeros of the system.

EDIT: Control strategy explanation

First of all this equation is not correct:

F4_cross = (F4_min(1,1)/(1+F4_min(1,1)))+(F4_min(1,2)/(1+F4_min(1,2)));


As explained earlier you cannot simply add your transfer functions. In order to study this better you need a block diagram like this one:

Furthermore you can write this system as two separate systems:

And the one which has coupling influence, in this case it is just the disturbance for this system.

When you write it this way you can clearly see that the there are two loops you are interested to influence with your contorller: $$G_{cl} = \frac{y_1}{r_1} = \frac{C_{1}G_{11}}{1+ C_{1}G_{11}}$$ This is the control loop in which you need to have zero error, therefore you will need to add the integrator if necessary and so on...

Then, the second transfer funciton you are interested in is: $$G_{dist}(s) = \frac{y_1}{u_2} = \frac{G_{12}}{1+C_{1}G_{11}}$$ Now in order for your tracking error to be zero you will need to influence this transfer function to reject the disturbance (to diminish the signal $$\u_2\$$). Meaning that this transfer function should have stationary gain of 0. So just study both the transfer function $$\G_{cl}\$$ and $$\G_{dist}\$$ and adapt controller $$\C1\$$ if necessary.

• Thanks for answering. I would like to ask another thing if I can. Suppose I compute the output as $y_{1}(s)=\frac{G_{11}(s)}{1+G_{11}(s)}u_1(s)+\frac{G_{12}(s)}{1+G_{12}(s)}u_2(s)$. If I plot the step response I have a steady state error. To have zero steady state error I know that I have to place a pole at the origin in the controller. But $G(1,1)$ has a pole at the origin, and $G(1,2)$ doesn't. But the controller should be the same. How do I operate in thie case? Thanks.
– J.D.
Feb 10, 2020 at 13:56
• In general for MIMO systems you are going to apply state space techniques such as LQR, LMI methods or just some pole placement algorithms. But if you really want to have a controller for each input output pair as you say, you should look up the dynamic decoupling. This is a youtube lecture youtu.be/Ssit8bII7OA. The idea is to cancel the influence of the coupling transfer functions to achieve that in your case $y_1$ depends only on $u_1$ and $y_2$ depends only on $u_2$. The controller becomes a bit more complicated but the solution is very elegant. Feb 10, 2020 at 15:57
• Thanks again. Sorry if I bother you again. If I don't want to decouple the system so it is impossible to use the same controller? Since 'F4_cross' does not have ploes at the origin, I have tried to do : 'loopsens(F4_cross, k/s)' in Matlab, but I don't know if it is correct, since loopsens has the syntax : mathworks.com/help/robust/ref/loopsens.html . And also considering $F4_{min}(1,1)+F4_{min}(1,2)$ I think it is wrong. Again sorry I don't want to bother you since you have been of great help already. Thanks again.
– J.D.
Feb 10, 2020 at 16:15
• @J.D. The discussion is growing so I edited the answer rather than continued in here. Feb 10, 2020 at 20:04
• Thank you again!
– J.D.
Feb 10, 2020 at 20:13