作业帮 > 综合 > 作业

利用双线形变换,设计一个具有如下指标的Butterworth型和数字切比雪夫2型带通滤波器,抽样率为2500HZ,通帯截

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/22 16:32:10
利用双线形变换,设计一个具有如下指标的Butterworth型和数字切比雪夫2型带通滤波器,抽样率为2500HZ,通帯截止频率为560和780HZ,阻带截止频率为375和1000HZ,峰通带波纹为1.2dB,最小阻带衰减为25dB,并画出其幅频特性曲线和相频特性曲线.
程序完美加100分!
fs=2500;ts=1/2500;
wp=[560 780]*2*pi/fs;
ws=[375 1000]*2*pi/fs;
rp=1.2;
rs=25;
%conver digital frequency to analog frequency
Wp=(2/ts)*tan(wp/2);
Ws=(2/ts)*tan(ws/2);
%compute the butterworth analog filter
%compute oder and cutoff frequency
[Nb,wb]=buttord(Wp,Ws,rp,rs,'s');
[bb,ab]=butter(Nb,wb,'s');
%bilinear transformation
%for analog to butterworth digtal filter conversion
[bbz,abz]=bilinear(bb,ab,fs);
freqz(bbz,abz,1024,fs)
title('butterworth digtal filter');
%compute the chebyshev II type analog filter
%compute oder and cutoff frequency
[Nc,wc]=cheb2ord(Wp,Ws,rp,rs,'s');
[bc,ac]=cheby2(Nc,rs,wc,'s');
%bilinear transformation
%for analog to chebyshev II type digtal filter conversion
[bcz,acz]=bilinear(bb,ab,fs);
figure(2)
freqz(bcz,acz,1024,fs)
title('chebyshev II type digtal filter');
结果图如所附图片.
图片是将两幅幅频图组合在一起的,因为这里只能上传一张图片.
你把程序直接放到MATLAB里运行可以更清楚的看到特性曲线图.