Why does the index based connection for a MIMO system with a unity feedback loop differ in response with a signal name based system when using the function "connect"?

2 views (last 30 days)
I am trying to create an equivalent feedback loop using index based connections for the MIMO system "T" designed with named connections in this example:
My script for the corresponding index based system is as follows:
%% With connection indices
blksys = append(C,G);
connections = [1 -3;2 -4;3 1;4 2];
T_conn = connect(blksys,connections,[1 2],[3 4]);
However, the bode plot of the system T_conn differs from that of the system T (in red) at very low frequencies. Is this the right way to model index based interconnections and if so, why is the response different?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 13 Oct 2021
Edited: MathWorks Support Team on 13 Oct 2021
Inspection reveals that the only difference between T and T_conn is the state ordering. This can be traced back to:
blksys = append(C,G);
This puts the states of G last whereas they appears first in the system T. To eliminate the discrepancy, you make the following alterations to the connection index based system:
blksys = append(G,C);
connections = [1 3;2 4;3 -1;4 -2];
T_conn = connect(blksys,connections,[3 4],[1 2]);
While this produces the same response at lower frequencies, T_conn is no worse than T. To see a difference, we are observing the behavior at extremely low frequencies, but it turns out that both Tand T_conn have no accuracy at all at such frequencies, as evidenced by the following in say, the frequency band [1e-20 1e5]:
This is due to the pole/zero cancellation at s=0 in G*C and the closed-loop system: You could try "minreal(T)" to get rid of this cancellation. Such cancellations give rise to a  0/0 expression near the zero frequency, which is extremely sensitive to rounding errors.
To summarize, there is nothing wrong with T_conn as computed, as the observed discrepancy is just a manifestation of the fundamental limit of accuracy for any finite-precision computation. You can safely proceed with the T_conn formula in the script.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by