IIR数字滤波器设计及应用要点.pdf

上传人:tbuqq 文档编号:5197181 上传时间:2020-02-19 格式:PDF 页数:35 大小:1,018.33KB
返回 下载 相关 举报
IIR数字滤波器设计及应用要点.pdf_第1页
第1页 / 共35页
IIR数字滤波器设计及应用要点.pdf_第2页
第2页 / 共35页
IIR数字滤波器设计及应用要点.pdf_第3页
第3页 / 共35页
IIR数字滤波器设计及应用要点.pdf_第4页
第4页 / 共35页
IIR数字滤波器设计及应用要点.pdf_第5页
第5页 / 共35页
点击查看更多>>
资源描述

《IIR数字滤波器设计及应用要点.pdf》由会员分享,可在线阅读,更多相关《IIR数字滤波器设计及应用要点.pdf(35页珍藏版)》请在三一文库上搜索。

1、本科学生验证性实验报告 学号114090315 姓名李开斌 学院物电学院专业、班级11 电子 实验课程名称数字信号处理 教师及职称李宏宁 开课学期2013 至 2014 学年 下 学期 填报时间2014 年5 月14 日 云南师范大学教务处编印 一、实验设计方案 实验序号 09 实验名称IIR 数字滤波器设计及应用 实验时间 2014 年 5 月 14 日实验室同析 3 栋 313 1. 实验目的 2. 加深理解 IIR 数字滤波器的特性,掌握 IIR 数字滤波器的设计原理与设计方法, 以及 IIR 数字滤波器的应用。 2 实验原理、实验流程或装置示意图 N 阶 IIR 数字滤波器的系统函数为

2、: i i N i j j M j za zb zH 1 0 1 )( N N N N M M M M zazaza zbzbzbb )1( 1 1 1 )1( 1 1 10 1 IIR 数字滤波器的设计主要通过成熟的模拟滤波器设计方法来实现:将数字 滤波器设计指标转换为模拟滤波器设计指标,设计出相应的模拟滤波器H(s),再 经过脉冲响应不变法或双线性变换法得到所需的IIR 数字滤波器 H(z)。 IIR 数字滤波器设计的重要环节是模拟原型低通滤波器的设计,主要包括 Butterworth、Chebyshev和椭圆等滤波器。 MATLAB 信号处理工具箱中提供了IIR 滤波器设计的函数。 II

3、R 滤波器阶数选择 buttord -巴特沃斯 (Butterworth)滤波器阶数选择。 cheb1ord -切比雪夫 (Chebyshev)I 型滤波器阶数选择。 cheb2ord -切比雪夫 (Chebyshev)II 型滤波器阶数选择。 ellipord -椭圆(Elliptic) 滤波器阶数选择。 IIR 滤波器设计 butter -巴特沃斯 (Butterworth)滤波器设计 cheby1 -切比雪夫 (Chebyshev)I 型滤波器设计 cheby2 -切比雪夫 (Chebyshev)II 型滤波器设计 ellip -椭圆(Elliptic) 滤波器设计 maxflat -通

4、用的巴特沃斯 (Butterworth)低通滤波器设计 yulewalk -Yule-Walker 滤波器设计 (直接数字滤波器设计法 ) 1. Butterworth 滤波器设计 Butterworth 滤波器是通带、阻带都单调衰减的滤波器。 (1) 调 用 buttord 函 数 确 定 巴 特 沃 斯 滤 波 器 的 阶 数 , 格 式 为N,Wc = buttord(Wp,Ws,Ap,As) 输入参数: Ap,As 为通带最大衰减和阻带最小衰减,以dB 为单位。 Wp,Ws 为归一化通带截频和阻带截频,0Wp,Ws1 。 输出参数: N 为滤波器的阶数; Wc 为截频, 0 Wc 1。

5、 (2)调用 butter 函数设计出巴特沃斯滤波器, 格式为b,a = butter(N,Wc,options) 输入参数: N 和 Wc 是 buttord 函数返回的参数,含义见上。 Options= low, high , bandpass, stop , 分别对应低通、高通、 带通、带阻,默认情况下为低通或带通。 输出参数: b 和 a为设计出的 IIR 数字滤波器 H(s)的分子多项式和分母多项式的 系数矩阵。 2.(1) Chebyshev I型滤波器设计 Chebyshev I 型滤波器为通带纹波控制器:在通带呈现纹波特性,在阻带单调衰 减。 N,Wc = cheb1ord(W

6、p, Ws, Ap, As) b,a = cheby1(N,Ap,Wc,options) 参数含义与 butter 中参数一致。 2.(2) Chebyshev II 型滤波器设计 Chebyshev II 型滤波器为阻带纹波控制器: 在阻带呈现纹波特性。 N,Wc = cheb2ord(Wp, Ws, Ap, As) b,a = cheby2(N,As,Wc,options) 3. 椭圆滤波器设计 椭圆滤波器在通阻带都呈现纹波特性。 N,Wc = ellipord(Wp,Ws,Ap,As) b,a = ellip(N,Ap,As,Wc,options) 3实验设备及材料 装有 Matlab

7、的计算机一台 4实验方法步骤及注意事项 利用 Matlab 中的函数分析并绘出常用基本信号的波形。 注意事项 : (1)在使用 MATLAB 时应注意中英输入法的切换, 在中文输入法输入程序时得 到的程序是错误的; (2)MATLAB 中两个信号相乘表示为x.*u,中间有个 . ,同样两个信号相除也 是如此; (3)使用 MATLAB 编写程序时,应新建一个 m 文件, 而不是直接在 Comandante 窗口下编写程序; 在使用编程时,应该养成良好的编写习惯。 5实验数据处理方法 比较法 画图法 6参考文献 陈后金,等 .数字信号处理 .2 版【M】.北京:高等教育出版社,2010 张德丰,

8、等 .MATLAB 数值计算与方法 .北京:机械工业出版社, 2010 二实验报告 1实验现象与结果 1.信号) 3 2 cos() 4 cos(1kkkx,确定设计指标,实现各种 IIR 数字滤波器 以实现以下信号处理。 (1)设计 IIR 低通滤波器,滤除) 3 2 cos(k的成分。 % 低通滤波器 N,Wc=buttord(0.250,0.677,3,60) b,a=butter(N,Wc,low) freqz(b,a); axis(0,1,-120,0); grid on title(巴特沃斯低通数字滤波器) 00.10.20.30.40.50.60.70.80.91 -600 -4

9、00 -200 0 Normalized Frequency ( rad/sample) P h a s e ( d e g r e e s ) 00.10.20.30.40.50.60.70.80.91 -100 -50 0 Normalized Frequency ( rad/sample) M a g n it u d e ( d B ) 巴 特 沃 斯 低 通 数 字 滤 波 器 (2)设计 IIR 高通滤波器,滤除) 4 cos(1k的成分。 % 高通滤波器 N,Wc=buttord(0.250,0.677,3,60) b,a=butter(N,Wc,high) freqz(b,a)

10、; axis(0,1,-120,0); grid on title(巴特沃斯高通数字滤波器) 00.10.20.30.40.50.60.70.80.91 -400 -200 0 200 Normalized Frequency ( rad/sample) P h a s e ( d e g r e e s ) 00.10.20.30.40.50.60.70.80.91 -100 -50 0 Normalized Frequency ( rad/sample) M a g n it u d e ( d B ) 巴 特 沃 斯 高 通 数 字 滤 波 器 (3)设计 IIR 带通滤波器,滤除) 3

11、 2 cos(1k的成分 % 带通滤波器 Wp =0.25 0.67; Ws =0.25-0.03 0.67+0.03; Rp = 3; Rs = 60; N,Wc=buttord(Wp,Ws,Rp,Rs) b,a=butter(N,Wc,bandpass) freqz(b,a); axis(0,1,-120,0); grid on title(巴特沃斯带通数字滤波器) 00.10.20.30.40.50.60.70.80.91 -6000 -4000 -2000 0 Normalized Frequency ( rad/sample) P h a s e ( d e g r e e s )

12、00.10.20.30.40.50.60.70.80.91 -100 -50 0 Normalized Frequency ( rad/sample) M a g n it u d e ( d B ) 巴 特 沃 斯 带 通 数 字 滤 波 器 N = 40 Wc = 0.2499 0.6701 b = Columns 1 through 7 0.0000 0 -0.0000 0 0.0000 0 -0.0000 Columns 8 through 14 0 0.0000 0 -0.0000 0 0.0000 0 Columns 15 through 21 -0.0000 0 0.0000 0

13、 -0.0001 0 0.0003 Columns 22 through 28 0 -0.0007 0 0.0017 0 -0.0037 0 Columns 29 through 35 0.0072 0 -0.0125 0 0.0195 0 -0.0276 Columns 36 through 42 0 0.0353 0 -0.0408 0 0.0429 0 Columns 43 through 49 -0.0408 0 0.0353 0 -0.0276 0 0.0195 Columns 50 through 56 0 -0.0125 0 0.0072 0 -0.0037 0 Columns

14、57 through 63 0.0017 0 -0.0007 0 0.0003 0 -0.0001 Columns 64 through 70 0 0.0000 0 -0.0000 0 0.0000 0 Columns 71 through 77 -0.0000 0 0.0000 0 -0.0000 0 0.0000 Columns 78 through 81 0 -0.0000 0 0.0000 a = 1.0e+005 * Columns 1 through 7 0.0000 -0.0001 0.0003 -0.0011 0.0030 -0.0074 0.0160 Columns 8 th

15、rough 14 -0.0318 0.0585 -0.1008 0.1637 -0.2519 0.3692 -0.5174 Columns 15 through 21 0.6952 -0.8980 1.1176 -1.3427 1.5597 -1.7542 1.9125 Columns 22 through 28 -2.0234 2.0794 -2.0773 2.0188 -1.9098 1.7596 -1.5798 Columns 29 through 35 1.3828 -1.1803 0.9828 -0.7985 0.6332 -0.4902 0.3705 Columns 36 thro

16、ugh 42 -0.2734 0.1970 -0.1386 0.0953 -0.0639 0.0419 -0.0268 Columns 43 through 49 0.0167 -0.0102 0.0061 -0.0035 0.0020 -0.0011 0.0006 Columns 50 through 56 -0.0003 0.0002 -0.0001 0.0000 -0.0000 0.0000 -0.0000 Columns 57 through 63 0.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 0.0000 Columns 64 throug

17、h 70 -0.0000 0.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 Columns 71 through 77 0.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 0.0000 Columns 78 through 81 -0.0000 0.0000 -0.0000 0.0000 (4)设计 IIR 带阻滤波器,滤除) 4 cos(k的成分。 % 带阻滤波器 Wp =0.25 0.67; Ws =0.25-0.03 0.67+0.03; Rp = 3; Rs = 60; N,Wc=buttord(Wp,Ws,

18、Rp,Rs) b,a=butter(N,Wc,stop) freqz(b,a); axis(0,1,-120,0); grid on title(巴特沃斯带阻数字滤波器) 00.10.20.30.40.50.60.70.80.91 -15000 -10000 -5000 0 Normalized Frequency ( rad/sample) P h a s e ( d e g r e e s ) 00.10.20.30.40.50.60.70.80.91 -100 -50 0 Normalized Frequency ( rad/sample) M a g n it u d e ( d B

19、) 巴 特 沃 斯 带 阻 数 字 滤 波 器 N = 40 Wc = 0.2499 0.6701 b = 1.0e+005 * Columns 1 through 7 0.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 0.0000 Columns 8 through 14 -0.0000 0.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 Columns 15 through 21 0.0001 -0.0001 0.0003 -0.0007 0.0015 -0.0029 0.0056 Columns 22 thro

20、ugh 28 -0.0102 0.0179 -0.0305 0.0502 -0.0798 0.1227 -0.1828 Columns 29 through 35 0.2636 -0.3686 0.4998 -0.6576 0.8396 -1.0409 1.2534 Columns 36 through 42 -1.4660 1.6661 -1.8401 1.9753 -2.0610 2.0904 -2.0610 Columns 43 through 49 1.9753 -1.8401 1.6661 -1.4660 1.2534 -1.0409 0.8396 Columns 50 throug

21、h 56 -0.6576 0.4998 -0.3686 0.2636 -0.1828 0.1227 -0.0798 Columns 57 through 63 0.0502 -0.0305 0.0179 -0.0102 0.0056 -0.0029 0.0015 Columns 64 through 70 -0.0007 0.0003 -0.0001 0.0001 -0.0000 0.0000 -0.0000 Columns 71 through 77 0.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 0.0000 Columns 78 through

22、81 -0.0000 0.0000 -0.0000 0.0000 a = 1.0e+005 * Columns 1 through 7 0.0000 -0.0001 0.0003 -0.0011 0.0030 -0.0074 0.0160 Columns 8 through 14 -0.0318 0.0585 -0.1008 0.1637 -0.2519 0.3692 -0.5174 Columns 15 through 21 0.6952 -0.8980 1.1176 -1.3427 1.5597 -1.7542 1.9125 Columns 22 through 28 -2.0234 2.

23、0794 -2.0773 2.0188 -1.9098 1.7596 -1.5798 Columns 29 through 35 1.3828 -1.1803 0.9828 -0.7985 0.6332 -0.4902 0.3705 Columns 36 through 42 -0.2734 0.1970 -0.1386 0.0953 -0.0639 0.0419 -0.0268 Columns 43 through 49 0.0167 -0.0102 0.0061 -0.0035 0.0020 -0.0011 0.0006 Columns 50 through 56 -0.0003 0.00

24、02 -0.0001 0.0000 -0.0000 0.0000 -0.0000 Columns 57 through 63 0.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 0.0000 Columns 64 through 70 -0.0000 0.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 Columns 71 through 77 0.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 0.0000 Columns 78 through 81 -0.0000 0.0000

25、 -0.0000 0.0000 2.某带通滤波器的设计指标为 dBAdBArad radradrad sps pps 42,1,)(72.0 ,)(6.0,)(3.0,)(2.0 2 211 (1) 用脉冲响应不变法设计各种滤波器: %脉冲响应不变法设计巴特沃斯带通模拟滤波器 Wp =0.3 0.6; Ws =0.2 0.72; Ap = 2; As = 42; Fs=1; N,Wc=buttord(Wp,Ws,Ap,As); b,a=butter(N,Wc,bandpass); freqz(b,a); axis(0,1,-120,0); grid on title(脉冲响应不变法巴特沃斯带通

26、模拟滤波器 ); 00.10.20.30.40.50.60.70.80.91 -1500 -1000 -500 0 Normalized Frequency ( rad/sample) P h a s e ( d e g r e e s ) 00.10.20.30.40.50.60.70.80.91 -100 -50 0 Normalized Frequency ( rad/sample) M a g n it u d e ( d B ) 脉 冲 响 应 不 变 法 巴 特 沃 斯 带 通 模 拟 滤 波 器 % 脉冲响应不变法设计巴特沃斯带通数字滤波器 Wp =0.3 0.6; Ws =0.

27、2 0.72; Ap = 2; As = 42; Fs=1; N,Wc=buttord(Wp,Ws,Ap,As); b,a=butter(N,Wc,bandpass); h=freqz(b,a,w); axis(0,1,-120,0); numd,dend=impinvar(b,a,Fs); w=linspace(0,pi,512); norm=max(abs(h); a=a/norm; plot(w/pi,20*log10(abs(h)/norm); grid on title(脉冲响应不变法巴特沃斯带通数字滤波器 ) 00.10.20.30.40.50.60.70.80.91 -400 -

28、350 -300 -250 -200 -150 -100 -50 0 脉 冲 响 应 不 变 法 巴 特 沃 斯 带 通 数 字 滤 波 器 % 脉冲响应不变法设计切比雪夫 1 型 带通模拟滤波器 Wp =0.3 0.6; Ws =0.2 0.72; Ap = 2; As = 42; Fs=1; N,Wc=cheb1ord(Wp,Ws,Ap,As); b,a=cheby1(N,Ap,Wc,bandpass); freqz(b,a); axis(0,1,-120,0); grid on title(脉冲响应不变法切比雪夫 1 型 带通模拟滤波器 ); 00.10.20.30.40.50.60.7

29、0.80.91 -1000 -500 0 500 Normalized Frequency ( rad/sample) P h a s e ( d e g r e e s ) 00.10.20.30.40.50.60.70.80.91 -100 -50 0 Normalized Frequency ( rad/sample) M a g n it u d e ( d B ) 脉 冲 响 应 不 变 法 切 比 雪 夫 1型 带 通 模 拟 滤 波 器 % 脉冲响应不变法设计切比雪夫 1 型 带通数字滤波器 Wp =0.3 0.6; Ws =0.2 0.72; Ap = 2; As = 42;

30、Fs=1; N,Wc=cheb1ord(Wp,Ws,Ap,As); b,a=cheby1(N,As,Wc,bandpass); w=linspace(0,pi,512); h=freqz(b,a,w); axis(0,1,-120,0); numd,dend=impinvar(b,a,Fs); w=linspace(0,pi,512); norm=max(abs(h); a=a/norm; plot(w/pi,20*log10(abs(h)/norm); grid on title(脉冲响应不变法切比雪夫 1 型 带通数字滤波器 ); 00.10.20.30.40.50.60.70.80.91

31、 -450 -400 -350 -300 -250 -200 -150 -100 -50 0 脉 冲 响 应 不 变 法 切 比 雪 夫 1型 带 通 数 字 滤 波 器 % 脉冲响应不变法设计切比雪夫 2 型 带通模拟滤波器 Wp =0.3 0.6; Ws =0.2 0.72; Ap = 2; As = 42; Fs=1; N,Wc=cheb2ord(Wp,Ws,Ap,As); b,a=cheby2(N,As,Wc,bandpass); freqz(b,a); axis(0,1,-120,0); grid on title(脉冲响应不变法切比雪夫 2 型 带通模拟滤波器 ); 00.10.2

32、0.30.40.50.60.70.80.91 -400 -200 0 200 400 Normalized Frequency ( rad/sample) P h a s e ( d e g r e e s ) 00.10.20.30.40.50.60.70.80.91 -100 -50 0 Normalized Frequency ( rad/sample) M a g n it u d e ( d B ) 脉 冲 响 应 不 变 法 切 比 雪 夫 2型 带 通 模 拟 滤 波 器 % 脉冲响应不变法设计切比雪夫 2 型 带通数字滤波器 Wp =0.3 0.6; Ws =0.2 0.72;

33、 Ap = 2; As = 42; Fs=1; N,Wc=cheb2ord(Wp,Ws,Ap,As); b,a=cheby2(N,As,Wc,bandpass); w=linspace(0,pi,512); h=freqz(b,a,w); axis(0,1,-120,0); numd,dend=impinvar(b,a,Fs); norm=max(abs(h); a=a/norm; plot(w/pi,20*log10(abs(h)/norm); grid on title(脉冲响应不变法切比雪夫 2 型 带通数字滤波器 ); 00.10.20.30.40.50.60.70.80.91 -35

34、0 -300 -250 -200 -150 -100 -50 0 脉 冲 响 应 不 变 法 切 比 雪 夫 2型 带 通 数 字 滤 波 器 % 脉冲响应不变法设计椭圆 带通模拟滤波器 Wp =0.3 0.6; Ws =0.2 0.72; Ap = 2; As = 42; Fs=1; N,Wc=ellipord(Wp,Ws,Ap,As); b,a=ellip(N,Ap,As,Wc,bandpass); freqz(b,a); axis(0,1,-120,0); grid on title(脉冲响应不变法椭圆 带通模拟滤波器 ); 00.10.20.30.40.50.60.70.80.91 -

35、400 -200 0 200 400 Normalized Frequency ( rad/sample) P h a s e ( d e g r e e s ) 00.10.20.30.40.50.60.70.80.91 -100 -50 0 Normalized Frequency ( rad/sample) M a g n it u d e ( d B ) 脉 冲 响 应 不 变 法 椭 圆 带 通 模 拟 滤 波 器 % 脉冲响应不变法设计椭圆 型带通数字滤波器 Wp =0.3 0.6; Ws =0.2 0.72; Ap = 2; As = 42; Fs=1; N,Wc=ellipor

36、d(Wp,Ws,Ap,As); b,a=ellip(N,Ap,As,Wc,bandpass); h=freqz(b,a,w); axis(0,1,-120,0); numd,dend=impinvar(b,a,Fs); w=linspace(0,pi,512); norm=max(abs(h); a=a/norm; plot(w/pi,20*log10(abs(h)/norm); grid on title(脉冲响应不变法椭圆 带通数字滤波器 ); 00.10.20.30.40.50.60.70.80.91 -120 -100 -80 -60 -40 -20 0 脉 冲 响 应 不 变 法 椭

37、 圆 带 通 数 字 滤 波 器 (2) 用双线性变换法设计各种滤波器: % 双线性变换法设计巴特沃斯带通模拟滤波器 %下列八个程序中约定WWp 为数字频率 WWp =0.3 0.6; WWs =0.2 0.72; Wp=tan(WWp/2);Ws=tan(WWs/2); Ap = 2; As = 42; Fs=1; N,Wc=buttord(Wp,Ws,Ap,As); b,a=butter(N,Wc,bandpass); freqz(b,a); axis(0,1,-120,0); grid on title(双线性变换法巴特沃斯带通模拟滤波器 ); 00.10.20.30.40.50.60.

38、70.80.91 -2000 -1000 0 1000 Normalized Frequency ( rad/sample) P h a s e ( d e g r e e s ) 00.10.20.30.40.50.60.70.80.91 -100 -50 0 Normalized Frequency ( rad/sample) M a g n it u d e ( d B ) 双 线 性 变 换 法 巴 特 沃 斯 带 通 模 拟 滤 波 器 % 双线性变换法设计巴特沃斯带通数字滤波器 WWp =0.3 0.6; WWs =0.2 0.72; Wp=tan(WWp/2);Ws=tan(WW

39、s/2); Ap = 2; As = 42; Fs=1; N,Wc=buttord(Wp,Ws,Ap,As); b,a=butter(N,Wc,bandpass); h=freqz(b,a,w); axis(0,1,-120,0); numd,dend=impinvar(b,a,Fs); w=linspace(0,pi,512); norm=max(abs(h); a=a/norm; plot(w/pi,20*log10(abs(h)/norm); grid on title(双线性变换法巴特沃斯带通数字滤波器 ) 00.10.20.30.40.50.60.70.80.91 -600 -500

40、 -400 -300 -200 -100 0 双 线 性 变 换 法 巴 特 沃 斯 带 通 数 字 滤 波 器 % 双线性变换法设计切比雪夫 1 型 带通模拟滤波器 WWp =0.3 0.6; WWs =0.2 0.72; Wp=tan(WWp/2);Ws=tan(WWs/2); Ap = 2; As = 42; Fs=1; N,Wc=cheb1ord(Wp,Ws,Ap,As); b,a=cheby1(N,Ap,Wc,bandpass); freqz(b,a); axis(0,1,-120,0); grid on title(双线性变换法切比雪夫 1 型 带通模拟滤波器 ); 00.10.2

41、0.30.40.50.60.70.80.91 -1000 -500 0 500 Normalized Frequency ( rad/sample) P h a s e ( d e g r e e s ) 00.10.20.30.40.50.60.70.80.91 -100 -50 0 Normalized Frequency ( rad/sample) M a g n it u d e ( d B ) 双 线 性 变 换 法 切 比 雪 夫 1型 带 通 模 拟 滤 波 器 % 双线性变换法设计切比雪夫 1 型 带通数字滤波器 WWp =0.3 0.6; WWs =0.2 0.72; Wp=

42、tan(WWp/2);Ws=tan(WWs/2); Ap = 2; As = 42; Fs=1; N,Wc=cheb1ord(Wp,Ws,Ap,As); b,a=cheby1(N,As,Wc,bandpass); w=linspace(0,pi,512); h=freqz(b,a,w); axis(0,1,-120,0); numd,dend=impinvar(b,a,Fs); w=linspace(0,pi,512); norm=max(abs(h); a=a/norm; plot(w/pi,20*log10(abs(h)/norm); grid on title(双线性变换法切比雪夫 1

43、型 带通数字滤波器 ); 00.10.20.30.40.50.60.70.80.91 -500 -450 -400 -350 -300 -250 -200 -150 -100 -50 0 双 线 性 变 换 法 切 比 雪 夫 1型 带 通 数 字 滤 波 器 % 双线性变换法设计切比雪夫 2 型 带通模拟滤波器 WWp =0.3 0.6; WWs =0.2 0.72; Wp=tan(WWp/2);Ws=tan(WWs/2); Ap = 2; As = 42; Fs=1; N,Wc=cheb2ord(Wp,Ws,Ap,As); b,a=cheby2(N,As,Wc,bandpass); fre

44、qz(b,a); axis(0,1,-120,0); grid on title(双线性变换法切比雪夫 2 型 带通模拟滤波器 ); 00.10.20.30.40.50.60.70.80.91 -400 -200 0 200 400 Normalized Frequency ( rad/sample) P h a s e ( d e g r e e s ) 00.10.20.30.40.50.60.70.80.91 -100 -50 0 Normalized Frequency ( rad/sample) M a g n it u d e ( d B ) 双 线 性 变 换 法 切 比 雪 夫

45、 2型 带 通 模 拟 滤 波 器 % 双线性变换法设计切比雪夫 2 型 带通数字滤波器 WWp =0.3 0.6; WWs =0.2 0.72; Wp=tan(WWp/2);Ws=tan(WWs/2); Ap = 2; As = 42; Fs=1; N,Wc=cheb2ord(Wp,Ws,Ap,As); b,a=cheby2(N,As,Wc,bandpass); w=linspace(0,pi,512); h=freqz(b,a,w); axis(0,1,-120,0); numd,dend=impinvar(b,a,Fs); w=linspace(0,pi,512); norm=max(a

46、bs(h); a=a/norm; plot(w/pi,20*log10(abs(h)/norm); grid on title(双线性变换法切比雪夫 2 型 带通数字滤波器 ); 00.10.20.30.40.50.60.70.80.91 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 双 线 性 变 换 法 切 比 雪 夫 2型 带 通 数 字 滤 波 器 % 双线性变换法设计椭圆 带通模拟滤波器 WWp =0.3 0.6; WWs =0.2 0.72; Wp=tan(WWp/2);Ws=tan(WWs/2); Ap = 2; As = 42; Fs=1

47、; N,Wc=ellipord(Wp,Ws,Ap,As); b,a=ellip(N,Ap,As,Wc,bandpass); freqz(b,a); axis(0,1,-120,0); grid on title(双线性变换法椭圆 带通模拟滤波器 ); 00.10.20.30.40.50.60.70.80.91 -400 -200 0 200 400 Normalized Frequency ( rad/sample) P h a s e ( d e g r e e s ) 00.10.20.30.40.50.60.70.80.91 -100 -50 0 Normalized Frequency

48、 ( rad/sample) M a g n it u d e ( d B ) 双 线 性 变 换 法 椭 圆 带 通 模 拟 滤 波 器 % 双线性变换法设计椭圆 型带通数字滤波器 WWp =0.3 0.6; WWs =0.2 0.72; Wp=tan(WWp/2);Ws=tan(WWs/2); Ap = 2; As = 42; Fs=1; N,Wc=ellipord(Wp,Ws,Ap,As); b,a=ellip(N,Ap,As,Wc,bandpass); h=freqz(b,a,w); axis(0,1,-120,0); numd,dend=impinvar(b,a,Fs); w=linspace(0,pi,512); norm=max(abs(h); a=a/norm; plot(w/pi,20*log10(abs(h)/norm); grid on title(双线性变换法椭圆 带通数字滤波器 ); 00.10.20.30.40.50.60.70.80.91 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 双 线 性 变 换 法 椭 圆 带 通 数 字 滤 波 器 (3) 进行对比: % 脉冲响应不变法设计巴特沃斯带通数字滤波器 subplot(2

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 其他


经营许可证编号:宁ICP备18001539号-1