求解一个DSP关于FIR filter的题目,如下:The window method of FIR design:a.Design linear-phase lowpass filters with the cutoff-frequency ωc = π/3 using the window method with a Dolph-Chebyshev window for filter orders M = 20,50 and 150.The
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/08 23:43:18
求解一个DSP关于FIR filter的题目,如下:The window method of FIR design:a.Design linear-phase lowpass filters with the cutoff-frequency ωc = π/3 using the window method with a Dolph-Chebyshev window for filter orders M = 20,50 and 150.The
求解一个DSP关于FIR filter的题目,如下:
The window method of FIR design:
a.Design linear-phase lowpass filters with the cutoff-frequency ωc = π/3 using the window method with a Dolph-Chebyshev window for filter orders M = 20,50 and 150.The MATLAB Signal Processing Toolbox function fir1() can be used to implement the window method and the MATLAB Signal Processing Toolbox function chebwin() can be used to obtain the desired Dolph-Chebyshev windows.
b.Note that you will need to specify the amount of sidelobe attenuation for your Dolph-Chebyshev windows.Try some different values,and demonstrate what effect this has on:
i.the passband ripple and stopband attenuation,and
ii.the slope of the transition region,
for one of the filters (M = 20,50 or 150).
c.Do you observe the Gibbs phenomenon in the window method?
求解一个DSP关于FIR filter的题目,如下:The window method of FIR design:a.Design linear-phase lowpass filters with the cutoff-frequency ωc = π/3 using the window method with a Dolph-Chebyshev window for filter orders M = 20,50 and 150.The
a部分:
wn=pi/3;% Cutoff-frequency
R=100;% Sidelobe attenuation
for i=1:3
switch i
case 1
N=20;% Filter orders
case 2
N=50;
case 3
N=150;
end
window=chebwin(N+1,R);% Chebyshev window
b=fir1(N,wn/pi,window);% FIR filter
figure(i);
freqz(b,1,512);%
title(['Filter order N= ',num2str(N)])
end
b部分:
wn=pi/3;% Cutoff-frequency
N=50;% Filter orders
for i=1:4
R=i*50;% Sidelobe attenuation
window=chebwin(N+1,R);% Chebyshev window
b=fir1(N,wn/pi,window);% FIR filter
figure(4);
subplot(2,2,i)
[H,w]=freqz(b,1,512);
mag=abs(H);
plot(w/pi,20*log10(mag/max(mag)));
xlabel('Normalized Frequency')
ylabel('Magnitude (dB)')
title(['Sidelobe attenuation R= ',num2str(R)])
grid on;
end
从图上可以看出,随着阻带衰减增加,通带波纹没有变化,过渡带随着变缓.说明小幅的旁瓣和窄的主瓣,两者不能同时满足.
c部分:
从a部分的图可以看出,随着滤波器阶数N增加,虽然起伏振荡变密,但通带最大波纹及阻带最大衰减均保持不变,这种现象称为吉布斯(Gibbs)效应
窗的长度必须和滤波器长度一致 blackman(M+1)改为blackman(M) 先看下fir1中的一段解释 For filters with a gain other than zero at Fs/2, e