数字信号处理实验报告
axis tight;xlabel('\\omega/\\pi');ylabel('dB'); grid on; MATLAB图形:
1.50.21hd(n)0.1H(?)020n40600.50-0.500.5?/?1000.20.15-20-40-60-80-100-120020n406000.20.40.60.8h(n)0.050dB0.1?/?
(3)海明窗 程序代码:
wp=0.2*pi;wst=0.3*pi;tr_width=wst-wp; N=ceil(6.6*pi/tr_width) n=0:N-1;
wc=(wst+wp)/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;xlabel('\\omega/\\pi');ylabel('H(\\omega)'); subplot(223);
stem(n,h,'filled'); axis tight; xlabel('n');
6
数字信号处理实验报告
ylabel('h(n)'); [H,w]=freqz(h,1); subplot(224);
plot(w/pi,20*log10(abs(H)/max(H)));
axis tight;xlabel('\\omega/\\pi');ylabel('dB'); grid on; MATLAB图形:
1.50.21hd(n)0.1H(?)020n40600.50-0.500.5?/?1000.2h(n)0020n4060dB0.1-50-10000.20.40.60.8?/?
(4)布莱克曼窗 程序代码:
wp=0.2*pi;wst=0.3*pi;tr_width=wst-wp; N=ceil(11*pi/tr_width) n=0:N-1;
wc=(wst+wp)/2;alpha=(N-1)/2;
hd=(wc/pi)*sinc((wc/pi)*(n-alpha)); w_boxcar=blackman(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;xlabel('\\omega/\\pi');ylabel('H(\\omega)'); subplot(223);
stem(n,h,'filled');
axis tight;xlabel('n');ylabel('h(n)');
7
数字信号处理实验报告
[H,w]=freqz(h,1); subplot(224);
plot(w/pi,20*log10(abs(H)/max(H)));
axis tight;xlabel('\\omega/\\pi');ylabel('dB'); grid on;
MATLAB图形为:
1.50.21hd(n)0.1H(?)050n1000.50-0.500.5?/?1000.2-50h(n)dB050n1000.1-100-15000.20.40.60.80?/?
(5)凯瑟窗 程序代码:
wp=0.2*pi;wst=0.3*pi;tr_width=wst-wp;As=50; N=ceil((As-7.95)/(2.285*tr_width))+1; beta=0.1102*(As-8.7); n=0:N-1;
wc=(wst+wp)/2;alpha=(N-1)/2;
hd=(wc/pi)*sinc((wc/pi)*(n-alpha)); w_boxcar=kaiser(N,beta)'; 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;xlabel('\\omega/\\pi');ylabel('H(\\omega)'); subplot(223);
stem(n,h,'filled');
8
数字信号处理实验报告
axis tight;xlabel('n');ylabel('h(n)'); [H,w]=freqz(h,1); subplot(224);
plot(w/pi,20*log10(abs(H)/max(H)));
axis tight;xlabel('\\omega/\\pi');ylabel('dB'); grid on; MATLAB图形:
1.50.21hd(n)0.1H(?)020n400.50-0.500.5?/?1000.20.15h(n)0.050020n40-10000.20.40.60.8dB0.1-50?/?
2、设计一个数字带通FIR滤波器,其技术指标如下: 下阻带边缘:?st1?0.2?,As?60dB 下通带边缘:?p1?0.35?,Rp?1dB 上通带边缘:?p2?0.65?,Rp?1dB 上阻带边缘:?st2?0.8?,As?60dB
程序代码:
wp1=0.2*pi;Rp1=1; wst1=0.35*pi;A1=60; width1=wst1-wp1;
N1=ceil(11*pi/width1)+1; n1=0:(N1-1);
wc1=(wp1+wst1)/2; alpha=(N1-1)/2;
wp2=0.65*pi;Rp2=1;wst2=0.8*pi;A2=60;
9
数字信号处理实验报告
width2=wst2-wp2;
N2=ceil(11*pi/width2)+1; n2=0:(N2-1);
wc2=(wp2+wst2)/2; alpha=(N2-1)/2;
hd=(wc2/pi)*sinc((wc2/pi)*(n2-alpha))-(wc1/pi)*sinc((wc1/pi)*(n1-alpha)); w_w=blackman(N1)'; h=hd.*w_w; subplot(221);
stem(n1,h,'filled'); subplot(222); [H,w]=freqz(h,1);
plot(w/pi,20*log10(abs(H)/max(abs(H)))); subplot(223);
[Hr,w1]=zerophase(h); plot(w1/pi,Hr); subplot(224);
stem(n1,hd,'filled'); [Hr,wl]=zerophase(h); grid on; MATLAB图形:
0.60.40.20-0.2-0.40204060800-50-100-15000.511.510.50.60.40.200-0.5-0.200.51-0.4020406080
3.采用频率取样法设计FIR数字低通滤波器,满足以下指标
10
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库实验四 窗函数法设计FIR数字滤波器(2)在线全文阅读。
相关推荐: