第6章 模拟滤波器设计ppt课件.ppt

上传人:小飞机 文档编号:1429504 上传时间:2022-11-23 格式:PPT 页数:89 大小:662.50KB
返回 下载 相关 举报
第6章 模拟滤波器设计ppt课件.ppt_第1页
第1页 / 共89页
第6章 模拟滤波器设计ppt课件.ppt_第2页
第2页 / 共89页
第6章 模拟滤波器设计ppt课件.ppt_第3页
第3页 / 共89页
第6章 模拟滤波器设计ppt课件.ppt_第4页
第4页 / 共89页
第6章 模拟滤波器设计ppt课件.ppt_第5页
第5页 / 共89页
点击查看更多>>
资源描述

《第6章 模拟滤波器设计ppt课件.ppt》由会员分享,可在线阅读,更多相关《第6章 模拟滤波器设计ppt课件.ppt(89页珍藏版)》请在三一办公上搜索。

1、第6章 模拟滤波器设计,6.1 滤波的基本概念6.2 模拟滤波器的设计原理6.3 典型的模拟滤波器本章内容参考:郑君里等信号与系统(第二版)下册第十章 模拟与数字滤波器MATLAB: Signal Processing Toolbox,6.1 滤波器的基本概念(1)滤波与滤波器,滤波技术是信号处理的一种基本而重要的技术。采用这种技术,可以从信号中提取所需要的部分,抑制不需要的部分。所谓信号处理,在一般情况下,就是指对信号进行滤波(filter)。对信号进行滤波的系统,称为滤波器(filter)。英汉双解词典对filter的解释:filter:滤光器,滤色镜,滤波器,n. vt. vi.Any

2、of various electric, electronic, acoustic, or optical devices used to reject signals, vibrations, or radiations of certain frequencies while passing others.一种电学的、电子学的、声学的或光学的设备,用于在通过其它物时限制特定频率的信号、振动或放射。,滤波器是一种频率选择装置,可以使输入信号中的某些特定频率范围的分量通过,阻止或较大地衰减输入信号中的其他频率范围的分量,所以又称为频率选择性滤波器。滤波器的这种频率选择特性,由滤波器的频率特性H

3、(j)来决定。,频率特性:频率特性:幅频特性:相频特性:,(2)滤波器的分类,从不同的角度,可以对滤波器进行不同的分类。根据所处理的信号类型的不同,可以将滤波器分为模拟滤波器和数字滤波器两大类。模拟滤波器是连续时间系统,用来处理模拟信号或连续时间信号。数字滤波器是离散时间系统,用来处理数字信号或离散时间信号。模拟滤波器设计是数字滤波器设计的基础。,根据滤波器的频率选择作用的不同,可以将滤波器分为以下4类:低通滤波器(lowpass filter)高通滤波器(highpass filter)带通滤波器(bandpass filter)带阻滤波器(bandstop filter)其中低通滤波器是基

4、础,其他3类滤波器均可以从低通滤波器转化而来。,低通,高通,带通,带阻,(3)理想低通滤波器,理想低通滤波器的频率特性:理想低通滤波器的幅频特性:理想低通滤波器的相频特性:,理想低通滤波器的幅频特性:矩形窗。理想低通滤波器的相频特性:线性相位。相关概念的定义:通带:0c截止频率:c,因为理想低通滤波器的单位脉冲响应函数是非因果、无限长的函数(从傅里叶变换的性质即可看出)。所以,实际上,理想低通滤波器在物理上是无法实现的。因此,设计滤波器的核心问题,就是求出一个在物理上可以实现的系统H(s),使其频率特性H(j)尽量逼近理想低通滤波器的频率特性,以满足所给定的滤波参数的要求。,(4)实际低通滤波

5、器的性能指标,通带 0 p 中,,阻带s中,,:通带截止频率s:阻带截止频率p:通带波纹s:阻带波纹,:通带峰值波纹,s:最小阻带衰减,实际低通滤波器的性能指标:只考虑幅频特性,不考虑相频特性。,通带: 使信号通过的频带。阻带:抑制噪声通过的频带。过渡带:通带到阻带间过渡的频率范围。c:截止频率,半功率点,功率衰减1/2,-3db衰减点,幅值衰减理想低通滤波器:过渡带为零,阻带内幅值|H(j)|=0,通带内幅值|H(j)|=常数,H(j)的相位是线性的。,6.2 模拟滤波器的设计原理,根据拉普拉斯变换与傅里叶变换的关系,可得从模拟滤波器的传递函数H(s)来确定模拟滤波器的频率特性H(j)的方法

6、:,所谓模拟滤波器的设计问题,就是已知模拟滤波器的频率特性H(j),进而确定模拟滤波器的传递函数H(s)。,解决方法:在一定的前提条件下,从频率特性H(j)的模的平方函数|H(j)|2,可以确定模拟滤波器的传递函数H(s)。,现在需要解决的就是这样一个相反的问题:如何从模拟滤波器的频率特性H(j)来确定模拟滤波器的传递函数H(s)?非常困难。,模拟滤波器的设计,就是根据一组设计规范,设计模拟滤波器的系统函数H(s),使其近似某个理想的滤波器特性H(j)。针对所分析的模拟滤波器进行一些必要的限制和假设,才有可能确定模拟滤波器的传递函数H(s)。假设一:假设所分析的模拟滤波器为因果系统。此时可以得

7、到一些有用的结论。如果系统满足此条件,那么可以得到下面的重要结论。,在因果系统中,系统单位脉冲响应函数h(t)的傅里叶变换就是系统的频率特性H(j)其中单位脉冲响应函数h(t) 一般是实函数。因为,即频率特性H(j)的翻转H(-j)与其共轭H*(j)相等。此结论为实函数的傅里叶变换的重要结论。,所以可得,假设二:假设所分析的模拟滤波器的频率特性H(j)的模的平方函数|H(j)|2可以表示为频率的平方2的函数。如果频率特性H(j)满足此条件,那么则有,所以有,又因为,现在的问题是:如何由A(-s2)得到H(s)?,进而有,假设三:假设所分析的模拟滤波器为稳定系统。如果系统满足此条件,那么可以进行

8、以下的一些推断。对于给定的A(-s2),首先在s复平面上标出A(-s2)的极点和零点。由(1)式知, A(-s2) 的极点和零点总是成对出现,而且对称于s平面的实轴和虚轴。选用A(-s2)的对称极点和零点的任意一半作为H(s)的极点和零点,则可得到H(s)。,h(t)是实函数,H(s)H(-s)的零、极点分布,根据系统的稳定性判据,当极点位于左半平面时,则系统稳定。为了保证系统H(s)的稳定性,应当选用A(-s2) 在s平面的左半平面的极点作为H(s)的极点,而零点则可以选用任何一半的零点。,进一步说明:(1)极点的归属:为了保证系统H(s)的稳定性,如果位于左半平面,则此极点归H(s)。如果

9、位于右半平面,则此极点归H(-s)。(2)零点的归属:零点的归属不唯一,但是一般与极点相同,即左半平面归H(s),右半平面归H(-s),则得到的系统为最小相位系统。(3)从频率特性H(j)的模的平方函数|H(j)|2来确定模拟滤波器的传递函数H(s),因为只考虑了幅频特性,并没有考虑相频特性,所以丢失了相频特性的信息。这就是这种设计方法的缺陷。,例:已知模的平方函数为:确定系统的传递函数。解:,系统无零点,有4个极点:,极点位于左半平面,归H(s),极点位于右半平面,归H(-s),确定比例增益常数K*K=25,得K=5。所以系统函数为,该系统为低通滤波器,由两个一阶惯性环节和一个比例环节串联组

10、成。,例:,解:,极点:,零点: (二阶),零点:,的极点:,设增益常数为K0,6.3 典型的模拟滤波器,三种典型的模拟滤波器:(1)巴特沃兹滤波器(Butterworth Filter) (2)切比雪夫滤波器(Chebyshev Filter)(3)椭圆滤波器(Elliptic Filter)这三种著名滤波器的特点:性能良好、理论完善。本节内容主要参考:MATLAB: Signal Processing Toolbox,6.3.1 巴特沃兹滤波器(Butterworth Filter),Butterworth filters are characterized by a magnitude

11、response that is maximally flat in the passband and monotonic overall. In the lowpass case, the first 2N-1 derivatives of the squared magnitude response are zero at = 0. The squared magnitude response function is,其中c为有效通带的截止频率。N为滤波器的阶数。并可称为N阶巴特沃斯低通滤波器。,Butterworth Filter,N阶巴特沃斯低通滤波器的特点:(1)=0处的最大平坦幅频

12、特性,前2N-1阶导数为0。(2)-3dB截止频率(参数c ),半功率点。,(3)幅频特性的陡峭程度由阶数N决定。(4)幅频特性单调下降。,幅频响应,N阶巴特沃斯低通滤波器没有零点,是一个全极点滤波器。可以证明,H(s)H(-s)的2N个极点为,N阶巴特沃斯低通滤波器的H(s)H(-s)的2N个极点的分布特点:(1)2N个极点在s平面呈象限对称分布,均匀分布在Buttterworth圆上。(2)极点间的角度间隔为 。(3)极点不在虚轴上。(4)当N为奇数时,实轴上有极点。(5)当N为偶数时,实轴上无极点。,H(s)H(-s)的零、极点分布(a)N=3(三阶),H(s)H(-s)的6个极点对称分

13、布。(b)N=4(四阶),H(s)H(-s)的8个极点对称分布。,MATLAB Function 1: buttapFunction Name: Analog Lowpass Filter PrototypesPurpose: Butterworth analog lowpass filter prototypeSyntax: z,p,k = buttap(n)Description: z,p,k = buttap(n) returns the poles and gain of an order n Butterworth analog lowpass filter prototype. T

14、he function returns the poles in the length n column vector p and the gain in scalar k. z is an empty matrix because there are no zeros. The transfer function is,例:z,p,k = buttap(2)计算结果:z = p = -0.7071 + 0.7071i -0.7071 - 0.7071ik = 1,例:z,p,k = buttap(3)计算结果:z = p = -0.5000 + 0.8660i -0.5000 - 0.866

15、0i -1.0000 k = 1.0000,MATLAB Function 2: butterFunction Name: Analog Filter DesignPurpose: Butterworth analog and digital filter designSyntax:b,a = butter(n,Wn)b,a = butter(n,Wn,ftype)b,a = butter(n,Wn,s)b,a = butter(n,Wn,ftype,s)z,p,k = butter(.)A,B,C,D = butter(.),Description:butter designs lowpas

16、s, bandpass, highpass, and bandstop digital and analog Butterworth filters. Butterworth filters are characterized by a magnituderesponse that is maximally flat in the passband and monotonic overall.Butterworth filters sacrifice rolloff steepness for monotonicity in the pass- and stopbands. Unless th

17、e smoothness of the Butterworth filter is needed, anelliptic or Chebyshev filter can generally provide steeper rolloff characteristics with a lower filter order.,例:For example, design a 9th-order Butterworth lowpass filter with a cutoff frequency of 400 Hz, based on a 2000 Hz sampling frequency.解:b,

18、a = butter(9,400/1000)计算结果:分子多项式的系数:b = 0.0011 0.0096 0.0384 0.0895 0.1342 0.1342 0.0895 0.0384 0.0096 0.0011分母多项式的系数:a = 1.0000 -1.7916 2.5319 -2.1182 1.3708 -0.6090 0.1993 -0.0431 0.0058 -0.0004,Now calculate the 256-point complex frequency response for this filter, and plot the magnitude and phas

19、e with a call to freqz.freqz(b,a,256,2000);,MATLAB Function 3: buttordFunction Name: Butterworth filter order and cutoff frequencyPurpose: Calculate the order and cutoff frequency for a Butterworth filterSyntax: n,Wn = buttord(Wp,Ws,Rp,Rs)n,Wn = buttord(Wp,Ws,Rp,Rs,s)Description:buttord calculates t

20、he minimum order of a digital or analog Butterworth filter required to meet a set of filter design specifications.,n,Wn = buttord(Wp,Ws,Rp,Rs) returns the lowest order, n, of the digital Butterworth filter that loses no more than Rp dB in the passband and has at least Rs dB of attenuation in the sto

21、pband. The scalar (or vector) of corresponding cutoff frequencies, Wn, is also returned. Use the output arguments n and Wn in butter.n,Wn = buttord(Wp,Ws,Rp,Rs,s) finds the minimum order n and cutoff frequencies Wn for an analog Butterworth filter.,例:For data sampled at 1000Hz, design a lowpass Butt

22、erworth filter with less than 3dB of ripple in the passband, defined from 0 to 40Hz, and at least 60dB of attenuation in the stopband, defined from 150Hz to the Nyquist frequency (500Hz). 解:(1) Calculate the order and cutoff frequency:Wp = 40/500; Ws = 150/500; n,Wn = buttord(Wp,Ws,3,60) 计算结果:n = 5W

23、n = 0.0810,(2) Design the filter:b,a = butter(n,Wn)计算结果:分子多项式的系数:b = 1.0e-003 * 0.0227 0.1136 0.2272 0.2272 0.1136 0.0227分母多项式的系数:a = 1.0000 -4.1768 7.0358 -5.9686 2.5478 -0.4375(3) Plot the filters frequency response: Now calculate the 512-point complex frequency response for this filter, and plot

24、the magnitude and phase with a call to freqz.freqz(b,a,512,1000);,6.3.2 切比雪夫滤波器(Chebyshev Filter),6.3.2.1 Chebyshev Type I FilterThe Chebyshev Type I filter minimizes the absolute difference between the ideal and actual frequency response over the entire passband by incorporating an equal ripple of

25、Rp dB in the passband. Stopband response is maximally flat. The transition from passband to stopband is more rapid than for the Butterworth filter.,其中VN(x)为N阶切比雪夫多项式:,c为有效通带的截止频率。为与通带波纹有关的参数,越大,则波纹越大,0 1 。,Chebyshev Type I Filter,切比雪夫I型滤波器的特点:(1)通带内具有等波纹;(2)阻带内单调下降。,幅频响应,巴特沃斯滤波器与切比雪夫I型滤波器的比较:(1)Butt

26、erworth滤波器的频率特性,无论在通带与阻带,都随频率而单调变化。因此,如果在通带边缘满足指标,则在通带内肯定会有富裕量,也就是会超过指标的要求,因而并不经济。,巴特沃斯滤波器与切比雪夫I型滤波器的比较:(2)更有效的方法是,将指标的精度要求均匀地分布在通带内,或均匀地分布在阻带内,或同时均匀地分布在通带与阻带内。这时,就可设计出阶数较低的滤波器。这种精度均匀分布的办法,可通过选择具有等波纹特性的逼近函数来完成。这就是切比雪夫I型滤波器的基本思想。,巴特沃斯滤波器与切比雪夫I型滤波器的比较:(3)切比雪夫I型滤波器在通带内的幅频特性等幅变化。而巴特沃兹滤波器在通带内的幅频特性单调下降。如果

27、二者的阶次一定,则巴特沃兹滤波器在靠近截止频率c处,幅频特性下降很多。或者说,为了使通带内的衰减足够小,巴特沃兹滤波器需要的阶次N很高。为了克服巴特沃兹滤波器的这一缺点,可以采用切比雪夫多项式逼近所希望的频率特性H(j)的模的平方函数|H(j)|2。(4)切比雪夫I型滤波器的频率特性H(j)的模的平方函数|H(j)|2在通带范围内是等幅起伏的,所以同样的通带衰减,其阶数小于巴特沃兹滤波器的阶数。可以根据需要,对通带内允许的衰减量(波动范围)提出具体的要求。,MATLAB Function 1: cheb1apPurpose: Chebyshev Type I analog lowpass fi

28、lter prototypeSyntax: z,p,k = cheb1ap(n,Rp)Description: z,p,k = cheb1ap(n,Rp) returns the poles and gain of an order n Chebyshev Type I analog lowpass filter prototype with Rp dB of ripple in the passband. The function returns the poles in the length n column vector p and the gain in scalar k. z is

29、an empty matrix, because there are no zeros. The transfer function is,MATLAB Function 2: cheby1Function Name: Chebyshev Type I filter design (passband ripple)Purpose: Chebyshev Type I filter design (passband ripple)Syntax:b,a = cheby1(n,Rp,Wn)b,a = cheby1(n,Rp,Wn,ftype)b,a = cheby1(n,Rp,Wn,s)b,a = c

30、heby1(n,Rp,Wn,ftype,s)z,p,k = cheby1(.)A,B,C,D = cheby1(.),Description: cheby1 designs lowpass, bandpass, highpass, and bandstop digital and analog Chebyshev Type I filters. Chebyshev Type I filters are equiripple in thepassband and monotonic in the stopband. Type I filters roll off faster than type

31、 II filters, but at the expense of greater deviation from unity in the passband.,MATLAB Function 3: cheb1ordFunction Name: Chebyshev Type I filter order Purpose: Calculate the order for a Chebyshev Type I filterSyntax: n,Wn = cheb1ord(Wp,Ws,Rp,Rs)n,Wn = cheb1ord(Wp,Ws,Rp,Rs,s)Description:cheb1ord ca

32、lculates the minimum order of a digital or analog Chebyshev Type I filter required to meet a set of filter design specifications.,例:For data sampled at 1000 Hz, design a lowpass Chebyshev Type I filter with less than 3 dB of ripple in the passband, defined from 0 to 40 Hz, and at least 60 dB of ripp

33、le in the stopband, defined from 150 Hz to the Nyquist frequency (500 Hz).解:(1) Calculate the order and cutoff frequency:Wp = 40/500; Ws = 150/500;Rp = 3; Rs = 60;n,Wn = cheb1ord(Wp,Ws,Rp,Rs)计算结果:n = 4Wn = 0.0800,(2) Design the filter:b,a = cheby1(n,Rp,Wn)计算结果:分子多项式的系数:b = 1.0e-003 * 0.0292 0.1168 0

34、.1752 0.1168 0.0292分母多项式的系数:a = 1.0000 -3.7925 5.4556 -3.5266 0.8641(3) Plot the filters frequency response: Now calculate the 512-point complex frequency response for this filter, and plot the magnitude and phase with a call to freqz.freqz(b,a,512,1000);,6.3.2.2 Chebyshev Type II FilterThe Chebyshe

35、v Type II filter minimizes the absolute difference between the ideal and actual frequency response over the entire stopband by incorporating an equal ripple of Rs dB in the stopband. Passband response is maximally flat. The stopband does not approach zero as quickly as the type I filter (and does no

36、t approach zero at all for even-valued filter order n). The absence of ripple in the passband, however, is often an important advantage.,其中VN(x)为N阶切比雪夫多项式:,c为有效通带的截止频率。为与阻带波纹有关的参数,越大,则波纹越大,0 1 。,Chebyshev Type II Filter,切比雪夫2型滤波器的特点:(1)通带内单调下降;(2)阻带内具有等波纹。,幅频响应,MATLAB Function 1: cheb2apPurpose: Che

37、byshev Type II analog lowpass filter prototypeSyntax: z,p,k = cheb2ap(n,Rs)Description: z,p,k = cheb2ap(n,Rs) finds the zeros, poles, and gain of an order n Chebyshev Type II analog lowpass filter prototype with stopband ripple Rs dB down from the passband peak value. heb2ap returns the zeros and po

38、les in length n column vectors z and p and the gain in scalar k. If n is odd, z is length n-1. The transfer function is,MATLAB Function 2: cheby2Function Name: Chebyshev Type II filter design (stopband ripple)Purpose: Chebyshev Type II filter design (stopband ripple)Syntax:b,a = cheby2(n,Rs,Wn)b,a =

39、 cheby2(n,Rs,Wn,ftype)b,a = cheby2(n,Rs,Wn,s)b,a = cheby2(n,Rs,Wn,ftype,s)z,p,k = cheby2(.)A,B,C,D = cheby2(.),Description: cheby2 designs lowpass, highpass, bandpass, and bandstop digital and analog Chebyshev Type II filters. Chebyshev Type II filters are monotonic in the passband and equiripple in

40、 the stopband. Type II filters do not roll off as fast as type I filters, but are free of passband ripple.,MATLAB Function 3: cheb2ordFunction Name: Chebyshev Type II filter orderPurpose: Calculate the order for a Chebyshev Type II filterSyntax: n,Wn = cheb2ord(Wp,Ws,Rp,Rs)n,Wn = cheb2ord(Wp,Ws,Rp,R

41、s,s)Description:cheb2ord calculates the minimum order of a digital or analog Chebyshev Type II filter required to meet a set of filter design specifications.,例:For data sampled at 1000 Hz, design a lowpass Chebyshev Type II filter with less than 3 dB of ripple in the passband, defined from 0 to 40 H

42、z, and at least 60 dB of attenuation in the stopband, defined from 150 Hz to the Nyquist frequency (500 Hz).解:(1) Calculate the order and cutoff frequency:Wp = 40/500; Ws = 150/500;Rp = 3; Rs = 60;n,Ws = cheb2ord(Wp,Ws,Rp,Rs)计算结果:n = 4Ws = 0.3000,(2) Design the filter:b,a = cheby2(n,Rs,Ws)计算结果:分子多项式

43、的系数:b = 0.0024 -0.0012 0.0034 -0.0012 0.0024分母多项式的系数:a = 1.0000 -3.2179 3.9457 -2.1773 0.4553(3) Plot the filters frequency response: Now calculate the 512-point complex frequency response for this filter, and plot the magnitude and phase with a call to freqz.freqz(b,a,512,1000);,6.3.3 椭圆滤波器(Ellipti

44、c Filter),Elliptic filters are equiripple in both the passband and stopband. They generally meet filter requirements with the lowest order of any supported filter type. Given a filter order n, passband ripple Rp in decibels, and stopband ripple Rs in decibels, elliptic filters minimize transition wi

45、dth.,其中RN()为雅可比(Jacobi)椭圆函数:,c为有效通带的截止频率。为与通带波纹有关的参数,越大,则波纹越大,0 1 。,椭圆滤波器也称为考尔(Cauer)滤波器,其频率特性H(j)的模的平方函数|H(j)|2为:,Elliptic Filter,椭圆低通滤波器的特点:(1)椭圆低通滤波器是一种零、极点型滤波器,它在有限频率范围内存在传输零点和极点。(2)椭圆低通滤波器的通带和阻带都具有等波纹特性,因此通带和阻带的逼近特性良好。(3)对于同样的性能要求,它比前两种滤波器所需要的阶数都低,而且它的过渡带比较窄。,椭圆低通滤波器的幅频响应带内均匀波动最快的滚降,MATLAB Func

46、tion 1: ellipapPurpose: Elliptic analog lowpass filter prototypeSyntax: z,p,k = ellipap(n,Rp,Rs)Description: z,p,k = ellipap(n,Rp,Rs) returns the zeros, poles, and gain of an order n elliptic analog lowpass filter prototype, with Rp dB of ripple in the passband, and a stopband Rs dB down from the pe

47、ak value in the passband. The zeros and poles are returned in length n column vectors z and p and the gain in scalar k. If n is odd, z is length n - 1. The transfer function is,MATLAB Function 2: ellipPurpose: Elliptic (Cauer) filter designSyntax: b,a = ellip(n,Rp,Rs,Wn)b,a = ellip(n,Rp,Rs,Wn,ftype)

48、b,a = ellip(n,Rp,Rs,Wn,s)b,a = ellip(n,Rp,Rs,Wn,ftype,s)z,p,k = ellip(.)A,B,C,D = ellip(.)Description: ellip designs lowpass, bandpass, highpass, and bandstop digital and analog elliptic filters. Elliptic filters offer steeper rolloff characteristics than Butterworth or Chebyshev filters, but are eq

49、uiripple in both the pass- and stopbands. In general, elliptic filters meet given performance specifications with the lowest order of any filter type.,MATLAB Function 3: ellipordPurpose: Calculate the minimum order for elliptic filtersSyntax: n,Wn = ellipord(Wp,Ws,Rp,Rs)n,Wn = ellipord(Wp,Ws,Rp,Rs,s

50、)Description: ellipord calculates the minimum order of a digital or analog elliptic filter required to meet a set of filter design specifications.,例:For 1000 Hz data, design a lowpass Elliptic filter with less than 3 dB of ripple in the passband, defined from 0 to 40 Hz, and at least 60 dB of ripple

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

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号