求帮我用matlab实现以下的DSP滤波器的实验,
来源:学生作业帮 编辑:搜搜考试网作业帮 分类:英语作业 时间:2024/06/08 02:39:17
求帮我用matlab实现以下的DSP滤波器的实验,
a.Design linear-phase lowpass filters with the cutoff-frequency ωc = π/3 using the Parks-McClellan method for filter orders M = 20,50 and 150.The MATLAB Signal Processing Toolbox function remez() can be used to implement the Parks-McClellan method.
b.Note that you will not be able to specify the ideal passband and stopband cutoff frequencies exactly in the remez() function.Try specifying a few different passband and stopband cutoff frequencies that vary in how close they are to the ideal lowpass filter,and see what effect this has on the actual frequency responses.
c.How do the resulting filter frequency responses compare to those obtained from the truncation and window methods?
a.Design linear-phase lowpass filters with the cutoff-frequency ωc = π/3 using the Parks-McClellan method for filter orders M = 20,50 and 150.The MATLAB Signal Processing Toolbox function remez() can be used to implement the Parks-McClellan method.
b.Note that you will not be able to specify the ideal passband and stopband cutoff frequencies exactly in the remez() function.Try specifying a few different passband and stopband cutoff frequencies that vary in how close they are to the ideal lowpass filter,and see what effect this has on the actual frequency responses.
c.How do the resulting filter frequency responses compare to those obtained from the truncation and window methods?
a部分:
wn=1/3;% 归一化截止频率
wdel=1/15;% 过渡带宽
f=[0,wn-wdel/2,wn+wdel/2,1];
m=[1,1,0,0];
for i=1:3
switch i
case 1
N=20;% 滤波器阶数
case 2
N=50;
case 3
N=150;
end
b=remez(N,f,m);% FIR滤波器设计
figure(i);
freqz(b,1,512);
title(['Filter order N= ',num2str(N)])
end
b部分:
N=50;% 滤波器阶数
wn=1/3;% 归一化截止频率
for i=1:4
wdel=1/15/i;
f=[0,wn-wdel/2,wn+wdel/2,1];
m=[1,1,0,0];
b=remez(N,f,m);% FIR滤波器设计
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(['Transition bandwidth wdel= ',num2str(wdel)]);
grid on;
end
从这四个图可以看出,在滤波器阶数相同的情况下,过渡带宽越小,则通带波纹越大,阻带衰减越小.
c部分:这几种方法都是从不同的意义上对给定理想频率特性的逼近,窗函数法为时域逼近法,频率采样法为频域逼近,本题为最优化设计.
最优化逼近的特点是:逼近误差均匀分布(往往是牺牲通带波纹),相同指标下滤波器所需阶数低.(通过以下程序可以比较:)
wn=1/3;% 归一化截止频率
wdel=1/15;% 过渡带宽
f=[wn-wdel/2,wn+wdel/2];
m=[1,0];
devs=[0.05,0.01];
c_1=kaiserord(f,m,devs) % 窗函数法需要67阶
c_2=remezord(f,m,devs) % remez法只需44阶
wn=1/3;% 归一化截止频率
wdel=1/15;% 过渡带宽
f=[0,wn-wdel/2,wn+wdel/2,1];
m=[1,1,0,0];
for i=1:3
switch i
case 1
N=20;% 滤波器阶数
case 2
N=50;
case 3
N=150;
end
b=remez(N,f,m);% FIR滤波器设计
figure(i);
freqz(b,1,512);
title(['Filter order N= ',num2str(N)])
end
b部分:
N=50;% 滤波器阶数
wn=1/3;% 归一化截止频率
for i=1:4
wdel=1/15/i;
f=[0,wn-wdel/2,wn+wdel/2,1];
m=[1,1,0,0];
b=remez(N,f,m);% FIR滤波器设计
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(['Transition bandwidth wdel= ',num2str(wdel)]);
grid on;
end
从这四个图可以看出,在滤波器阶数相同的情况下,过渡带宽越小,则通带波纹越大,阻带衰减越小.
c部分:这几种方法都是从不同的意义上对给定理想频率特性的逼近,窗函数法为时域逼近法,频率采样法为频域逼近,本题为最优化设计.
最优化逼近的特点是:逼近误差均匀分布(往往是牺牲通带波纹),相同指标下滤波器所需阶数低.(通过以下程序可以比较:)
wn=1/3;% 归一化截止频率
wdel=1/15;% 过渡带宽
f=[wn-wdel/2,wn+wdel/2];
m=[1,0];
devs=[0.05,0.01];
c_1=kaiserord(f,m,devs) % 窗函数法需要67阶
c_2=remezord(f,m,devs) % remez法只需44阶
DSP实验:FIR滤波器的设计与实现,用matlab语言实现
DSP中的梳状滤波器的应用(matlab实现)
帮我设计一个图像的低通滤波器,用MATLAB
matlab与dsp的相关问题
刚学DSP using matlab 教授给了一个mat文件 急求关于DSP的 dfs一道问题!
在matlab中,已知滤波器的系数怎样求滤波器的频率响应呢
帮我设计一个图像的低通滤波器,用MATLAB设计一个3×3模板标准差为0.5的高斯低通滤波
求用MATLAB,频率采样法设计的高通FIR滤波器(最好有解释),
用FPGA如何实现fir滤波器的设计
用MATLAB的FDATool设计的滤波器怎么使用啊!
求 用Matlab做一个中值滤波器
DSP实验 让我用C语言编写程序完成计算sin(2.3π)+cos(1.7π)的值