- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
实验4 窗函数法设计FIR数字滤波器
一、实验目的
掌握窗函数法和频率取样法设计FIR数字滤波器的原理及具体方法
二、实验设备与环境
计算机、MATLAB软件环境
三、实验理论基础
四、实验内容
1、设计一个数字低通FIR滤波器,其技术指标如下
分别采用矩形窗、汉宁窗、海明窗、布莱克曼窗、凯瑟窗设计该滤波器。结合实验结果,分别讨论采用上述方法设计的数字滤波器是否都能满足给定指标要求。
解:
①矩形窗
wp=0.2*pi;
wst=0.3*pi;
tr_width=wst-wp;
N=ceil(1.8*pi/tr_width)+1;
n=0:(N-1);
wc=(wp+wst)/2;
alpha=(N-1)/2;
hd=(wc/pi)*sinc((wc/pi)*(n-alpha));
w_boxcar=boxcar(N);
h=hd.*w_boxcar;
subplot(221);
stem(n,hd,filled);
axis tight;
xlabel(n);
ylabel(hd(n));
[Hr,w1]=zerophase(h);
subplot(222);
plot(w1/pi,Hr);
axis tight;
xlabel(\omega/\pi);
ylabel(H(\omega));
subplot(223);
stem(n,h,filled);
axis tight;
xlabel(n);
ylabel(h(n));
[H,w]=freqz(h,1);
subplot(224);
plot(w/pi,20*log10(abs(H)/max(abs(H))));
xlabel(\omega/\pi);
ylabel(dB);
grid on
结果:
不满足指标要求
②汉宁窗
wp=0.2*pi;
wst=0.3*pi;
tr_width=wst-wp;
N=ceil(6.2*pi/tr_width)+1;
n=0:(N-1);
wc=(wp+wst)/2;
alpha=(N-1)/2;
hd=(wc/pi)*sinc((wc/pi)*(n-alpha));
w_boxcar=hanning(N);
h=hd.*w_boxcar;
subplot(221);
stem(n,hd,filled);
axis tight;
xlabel(n);
ylabel(hd(n));
[Hr,w1]=zerophase(h);
subplot(222);
plot(w1/pi,Hr);
axis tight;
xlabel(\omega/\pi);
ylabel(H(\omega));
subplot(223);
stem(n,h,filled);
axis tight;
xlabel(n);
ylabel(h(n));
[H,w]=freqz(h,1);
subplot(224);
plot(w/pi,20*log10(abs(H)/max(abs(H))));
xlabel(\omega/\pi);
ylabel(dB);
grid on
结果:
不满足指标要求
③海明窗
wp=0.2*pi;
wst=0.3*pi;
tr_width=wst-wp;
N=ceil(6.6*pi/tr_width)+1;
n=0:(N-1);
wc=(wp+wst)/2;
alpha=(N-1)/2;
hd=(wc/pi)*sinc((wc/pi)*(n-alpha));
w_boxcar=hamming(N);
h=hd.*w_boxcar;
subplot(221);
stem(n,hd,filled);
axis tight;
xlabel(n);
ylabel(hd(n));
[Hr,w1]=zerophase(h);
subplot(222);
plot(w1/pi,Hr);
axis tight;
xlabel(\omega/\pi);
ylabel(H(\omega));
subplot(223);
stem(n,h,filled);
axis tight;
xlabel(n);
ylabel(h(n));
[H,w]=freqz(h,1);
subplot(224);
plot(w/pi,20*log10(abs(H)/max(abs(H))));
xlabel(\omega/\pi);
ylabel(dB);
grid on
结果:
满足指标要求
④布莱克曼窗
wp=0.2*pi;
wst=0.3*pi;
tr_width=wst-wp;
N=ceil(11*pi/tr_width)+1;
n=0:(N-1);
wc=(wp+wst)/2;
alpha=(N-1)/2;
hd=(wc/pi)*sinc((wc/pi)*(n-al
文档评论(0)