anix
Newbie level 4
Hello guys,
I have this question:
A particular DSP system is sampled at 200 kHz, requires a digital Butterworth lowpass filter with a passband ripple of 1 dB at 40 kHz and a minimum stopband attenuation of 22 dB at 60 kHz.
Design the above filter using the impulse invariance method and the bilinear transformation method. Determine the order and the 3 dB cutoff frequency of the analog filter prototype using the formula given in the lecture notes, and then design the analog prototype filter using the M-file buttap of MATLAB. Transform the analog filter transfer function to the desired digital transfer function using the M-files impinvar and bilinear. Plot the magnitude and phase responses of both designs using the M-file fvtool. Compare the performances of the two filters. Show all calculation steps and the MATLAB codes used in the design.
I have this code but i am not sure if this generates what the question requires..can someone help me if this code is wrong?
I have this question:
A particular DSP system is sampled at 200 kHz, requires a digital Butterworth lowpass filter with a passband ripple of 1 dB at 40 kHz and a minimum stopband attenuation of 22 dB at 60 kHz.
Design the above filter using the impulse invariance method and the bilinear transformation method. Determine the order and the 3 dB cutoff frequency of the analog filter prototype using the formula given in the lecture notes, and then design the analog prototype filter using the M-file buttap of MATLAB. Transform the analog filter transfer function to the desired digital transfer function using the M-files impinvar and bilinear. Plot the magnitude and phase responses of both designs using the M-file fvtool. Compare the performances of the two filters. Show all calculation steps and the MATLAB codes used in the design.
I have this code but i am not sure if this generates what the question requires..can someone help me if this code is wrong?
Code:
Fd = 200000;
fp = 40000;
fs = 60000;
Rp = 1;
Rs = 22;
Wp = 2 * pi * fp;
Ws = 2 * pi * fs;
[n, Wn] = buttord (Wp, Ws, Rp, Rs, 's');
[z,p,k] = buttap(n)
[b,a]=butter(n,Wn,'s'); [bz, az]=impinvar(b,a,Fd)
sys=tf(bz,az)
h=fvtool(bz,az)
set(h,'Analysis','phase')
[num,den] = ZP2TF(z,p,k) [numd,dend] = bilinear(num,den,Fd).
q=fvtool(numd,dend)
set(q,'Analysis','phase')