Discrete Time Filter in Matlab

I have the following matlab Code:
A = 10^0.5;
fc1 = 100;
fc2 = 1e3;
fc3 = 10e3;
fc4 = 100e3;
fc5 = 1e6;
Fs = 2.5e9;
a1 = 2*pi*fc1/Fs;
a2 = 2*pi*fc2/Fs;
a3 = 2*pi*fc3/Fs;
a4 = 2*pi*fc4/Fs;
a5 = 2*pi*fc5/Fs;
Ts = 1/Fs;
z = tf('z',Ts);
H1 = a1/(1-(1-a1)*z^-1);
H2 = (a2/A)/(1-(1-a2)*z^-1);
H3 = (a3/A^2)/(1-(1-a3)*z^-1);
H4 = (a4/A^3)/(1-(1-a4)*z^-1);
H5 = (a5/A^4)/(1-(1-a5)*z^-1);
H = H1 + H2 + H3 + H4 + H5;
figure(5);
bode(H),grid
hold on;
bode(H1),grid
bode(H2),grid
bode(H3),grid
In this code, I have five first order low pass filters (having 20dB/dec roll-off) and I am trying to create a filter with 10dB/dec roll-off by adding the responses of these filters to create a final transfer function H. But the bode plot of H is shown in the figure below (fig. 1). The response does not appear to be the sum of these (H1,H2 etc.) because H1 itself is 0dB at low frequencies. Could someone please explain what I am doing wrong? The problem seems to go away when I use Fs = 25e7, the plot for which is also shown below (fig. 2).
Fig. 1
Fig. 2

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by