Problem with Bode Plot of cascaded discrete time systems
Show older comments
The bode plot of the cascaded connection of two discrete time systems is given an unexpected result. I'm using MATLAB 2017b. The unexpected Bode Plot obtained with MATLAB and the expected Bode Plot obtained with Wolfram Mathematica for the casacade system is illustrated below. What is the reason for the unexpected Bode Plot obtained with MATLAB? How can I get the same Bode Plot obtained with Wolfram Mathematica?
1-Considering the discrete time systems G1 and G2 whose bode plots are shown below:

2-The unexpected bode plot of the system G1*G2, which is the cascade connection of G1 and G2 is shown below:

3-The expected bode plot obtained with the software Wolfram Mathematica is shown below:

4-the script used in MATLAB is shown below:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Ts = 1/39960;
num1 = 1.0e+02.*[0.031539179206086,-0.218479792518950,0.648677356726311,-1.070054451616472,1.059168924735488,-0.629079503155372,0.207587755626987,-0.029359469003776];
den1 = [1.0,-6.878539169404124,20.274720364621878,-33.195141325571285,32.604147581404845,-19.210710652654448,6.287177056909766,-0.881653855287863];
G1 = filt(num1, den1, Ts);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
num2 = [0,0,0.030214737804111,-0.106047418049407,0.152721406591927,-0.106047418049407,0.030214737804111]
den2 = [1.0,-4.192774816029949,7.580364905504299,-7.484428436489121,4.192774816029949,-1.256799136009598,0.160862666994420]
G2 = filt(num2, den2, Ts);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
G1G2 = series(G1,G2)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
figure
bode(G1,'b')
hold
bode(G2,'r')
h = gcr;
h.AxesGrid.Xunits = 'Hz';
grid on;
xlim([10,40000])
h2 = findobj(gcf,'type','line');
set(h2,'linewidth',1);
h2 = findobj(gcf,'type','text');
set(h2,'FontSize',12);
legend('G1','G2')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
figure
bode(G1G2,'m')
h = gcr;
h.AxesGrid.Xunits = 'Hz';
grid on;
xlim([10,40000])
h2 = findobj(gcf,'type','line');
set(h2,'linewidth',1);
h2 = findobj(gcf,'type','text');
set(h2,'FontSize',12);
legend('G1*G2')
4 Comments
min nan piao
on 24 Oct 2020
Hello! I have met the same problem. The bode plot of the series of two discrete transfer functions is very strange. In my case, one discrete transfer function has a resonant peak. I guess that it may be the problem caused by the resonant peak since the results of two ordinary discrete transfer functions without resonant peaks are correct. If you have an answer to this problem, it will be very kind of you to share it. My email is 2514842881@qq.com.
ricardo s
on 24 Oct 2020
min nan piao
on 24 Oct 2020
Thanks anyway. I am trying to use the software Wolfram Mathematica instead as suggested by you~
min nan piao
on 24 Oct 2020
Sorry to bother again. I have not used Mathematica before, and would please tell me which is the funcion for bode plot in Mathematica? Thank you.
Accepted Answer
More Answers (1)
German Hulgich
on 19 Apr 2022
0 votes
Hello, I have the same problem, but the solution here doesn't work. I have MATLAB 2021.
I have 3 times the same implementation: G1 = G2 = G3 = filt(num1,den1,1/fmod); [Ihave also tested with tf()]
fmod = 20e6;
index1= 256;
den1 = [1 -1];
num1= 2:0.0:index1-1;
num1(index1) = -1;
num1(1) = 1;
So the transfer function is:
1 - z^-256
----------
1 - z^-1
The bodeplot of each one is: bode(G1)

But when I plot the 3 of them at the same time bode(G1*G2*G3) I get

Best Regards,
2 Comments
ricardo s
on 19 Apr 2022
German Hulgich
on 3 May 2022
It works. I think I have used another function by mistake. probably pzmap instead of zpk.
By bad. thanks for your help.
Categories
Find more on Get Started with Control System Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!