Multiplying transfer functions gives different bode plots

11 次查看(过去 30 天)
I have two transfer functions (L and GS_d, see tf.mat) and try to multiply them. They are both of type tf and in discrete time. But GS*L gives another solution in the bode diagram than L*GS.
Here is my code
clear
load('tf.mat')
A = L*GS_d;
B = GS_d*L;
C = ss(L)*(GS_d);
bodemag(A);
hold on
bodemag(B);
bodemag(C);
legend('A','B','C')
Bode.png
Although all of the plots don't seem to be right.
Can anyone give an explanation?

回答(1 个)

Santhosh A V
Santhosh A V 2019-2-19
I am able to reproduce the issue mentioned by you only when I use your data.
I have tried multiplying two custom discrete transfer functions h1 and h2 in the same fashion as specified by you.
The code is shown below.
clear
h1 = filt([1 3],[21 2 10 40],5e-05);
h2 = filt([2 1],[1 -2 8 14 6.269e-12],5e-05);
A = h1*h2;
B = h2*h1;
subplot(211);
bodemag(B);
hold on;
subplot(212);
bodemag(A);
bodemagissue.png
I have even tested with “tf” function and everything seems fine .
If you are facing this weird behavior with any other data kindly share it. Hope this helps.

产品

Community Treasure Hunt

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

Start Hunting!

Translated by