数字信号处理:用窗函数法设计IIR数字滤波器

实验三:用窗函数法设计IIR数字滤波器
clear all;clc;close all
N=33;wc=pi/2;
hd=ideal(N,wc);
w1=boxcar(N);
师宗三中w2=hamming(N);
w3=hanning(N);
w4=blackman(N);
h1=hd.*w1';
h2=hd.*w2';
h3=hd.*w3';
h4=hd.*w4';
M=512;
fh1=fft(h1,M);
db1=-20*log10(abs(fh1(1)./(abs(fh1)+eps)));
fh2=fft(h2,M);
db2=-20*log10(abs(fh2(1)./(abs(fh2)+eps)));
fh3=fft(h3,M);
db3=-20*log10(abs(fh3(1)./(abs(fh3)+eps)));
fh4=fft(h4,M);
db4=-20*log10(abs(fh4(1)./(abs(fh4)+eps)));
耻骨联合w=2/M*[0:M-1];
figure
subplot(2,2,1);stem(h1)
subplot(2,2,2);plot(w,abs(fh1))
subplot(2,2,3);plot(w,db1)
subplot(2,2,4);plot(w,angle(fh1))
figure
山水比德subplot(2,2,1);stem(h2)
subplot(2,2,2);plot(w,abs(fh2))
subplot(2,2,3);plot(w,db2)
subplot(2,2,4);plot(w,angle(fh2))
figure
subplot(2,2,1);stem(h3)
subplot(2,2,2);plot(w,abs(fh3))
氧化锌油subplot(2,2,3);plot(w,db3)
subplot(2,2,4);plot(w,angle(fh3))
figure
subplot(2,2,1);stem(h4)
subplot(2,2,2);plot(w,abs(fh4))
subplot(2,2,3);plot(w,db4)
subplot(2,2,4);plot(w,angle(fh4))
N1=2048;
t=0:1/256:1/256*(N1-1);
x1=sin(100*pi*t)+sin(200*pi*t)+sin(300*pi*t);
figure
subplot(3,2,1);plot(x1(1:100))
F1x1=fft(x1,N1);
w=2/N1*[0:N1-1];
y1=conv(x1,h1);
subplot(3,2,2);plot(w,abs(F1x1))
subplot(3,2,3);plot(y1(1:100))
Fx2=fft(y1,N1)
subplot(3,2,4);plot(w,abs(Fx2))
y2=conv(x1,h4);
subplot(3,2,5);plot(y2(1:100))
Fx3=fft(y1,N1)
subplot(3,2,6);plot(w,abs(Fx3))
矩形窗滤波器:
海明窗滤波器
汉宁窗滤波器:英雄本 电影 2017
布莱克曼窗滤波器:

本文发布于:2024-09-21 04:36:06,感谢您对本站的认可!

本文链接:https://www.17tex.com/xueshu/423809.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:献给   设计   联合   英雄本色   父母   函数   耻骨
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议