离散时间信号处理第七章滤波器的设计.ppt

上传人:本田雅阁 文档编号:3028307 上传时间:2019-06-27 格式:PPT 页数:203 大小:8.65MB
返回 下载 相关 举报
离散时间信号处理第七章滤波器的设计.ppt_第1页
第1页 / 共203页
离散时间信号处理第七章滤波器的设计.ppt_第2页
第2页 / 共203页
离散时间信号处理第七章滤波器的设计.ppt_第3页
第3页 / 共203页
离散时间信号处理第七章滤波器的设计.ppt_第4页
第4页 / 共203页
离散时间信号处理第七章滤波器的设计.ppt_第5页
第5页 / 共203页
点击查看更多>>
资源描述

《离散时间信号处理第七章滤波器的设计.ppt》由会员分享,可在线阅读,更多相关《离散时间信号处理第七章滤波器的设计.ppt(203页珍藏版)》请在三一文库上搜索。

1、7 Filter Design Techniques,7.0 Introduction 7.1 Design of Discrete-Time IIR Filters from Continuous-Time Filters 7.2 Design of FIR Filters by Windowing 7.6 Comments on IIR and FIR Discrete-Time Filters 7.7 Summary,7.0 Introduction,Filters are a particularly important class of linear time-invariant s

2、ystems. The design of filters involves the following stages: (1) the specification of the desired properties of the system, (2) the approximation of the specifications using a causal discrete-time system, and (3) the realization of the system.,4、 滤波器的设计步骤 按照实际任务要求, 确定滤波器的性能指标。 用一个因果稳定的离散线性时不变系统的系统函数

3、去逼近这一性能要求。根据不同要求可以用IIR系统函数,也可以用FIR系统函数去逼近。 利用有限精度算法来实现这个系统函数。这里包括选择运算结构(如第4章中的各种基本结构),选择合适的字长(包括系数量化及输入变量、中间变量和输出变量的量化)以及有效数字的处理方法(舍入、截尾)等。,As shown in Section 4.4, if a linear time-invariant discrete-time system is used as in Figure 7.1, and if the input is bandlimited and the sampling frequency is

4、 high enough to avoid aliasing, then the overall system behaves as a linear time-invariant continuous-time system with frequency response In such cases,it is straightforward to convert from specifications on the effective continuous-time filter to specifications on the discrete-time filter through t

5、he relation . That is is specified over one period by the equation,This type of conversion is illustrated in Example 7.1,Figure7.1 Basic system for discrete-time filtering of continuous-time signals.,1 选频滤波器的分类 数字滤波器是数字信号处理的重要基础。在对信号的过滤、检测与参数的估计等处理中, 数字滤波器是使用最广泛的线性系统。 数字滤波器是对数字信号实现滤波的线性时不变系统。它将输入的数字

6、序列通过特定运算转变为输出的数字序列。因此, 数字滤波器本质上是一台完成特定运算的数字计算机。,由第1章1.3节已经知道,一个输入序列x(n),通过一个单位脉冲响应为h(n)的线性时不变系统后,其输出响应y(n)为,将上式两边经过傅里叶变换,可得,式中,Y(ej)、X(ej)分别为输出序列和输入序列的频谱函数, H(ej)是系统的频率响应函数。,可以看出,输入序列的频谱X(ej)经过滤波后,变为X(ej)H(ej)。如果|H(ej)|的值在某些频率上是比较小的,则输入信号中的这些频率分量在输出信号中将被抑制掉。因此,只要按照输入信号频谱的特点和处理信号的目的,适当选择H(ej),使得滤波后的X

7、(ej)H(ej)符合人们的要求,这就是数字滤波器的滤波原理。和模拟滤波器一样,线性数字滤波器按照频率响应的通带特性可划分为低通、高通、带通和带阻几种形式。它们的理想模式如图5-1所示。(系统的频率响应H(ej)是以2为周期的。),图 5-1 数字滤波器的理想幅频特性,满足奈奎斯特采样定理时,信号的频率特性只能限带于|的范围。由图5-1可知,理想低通滤波器选择出输入信号中的低频分量,而把输入信号频率在c范围内所有分量全部滤掉。相反地,理想高通滤波器使输入信号中频率在c范围内的所有分量不失真地通过,而滤掉低于c的低频分量。带通滤波器只保留介于低频和高频之间的频率分量。,2 滤波器的技术指标 理想

8、滤波器(如理想低通滤波器)是非因果的, 其单位脉冲响应从-延伸到+, 因此,无论用递归还是非递归方法, 理想滤波器是不能实现的, 但在概念上极为重要。 一般来说,滤波器的性能要求往往以频率响应的幅度特性的允许误差来表征。以低通滤波器为例,如图5-2(称容限图)所示, 频率响应有通带、 过渡带及阻带三个范围(而不是理想的陡截止的通带、阻带两个范围)。图中1为通带的容限,2为阻带的容限。,图 5-2 低通滤波器频率响应幅度特性的容限图,在通带内,幅度响应以最大误差1逼近于1,即,在阻带内,幅度响应以误差小于2而逼近于零,即,s|,|p,式中,p, s分别为通带截止频率和阻带截止频率,它们都是数字域

9、频率。幅度响应在过渡带(s-p)中从通带平滑地下降到阻带,过渡带的频率响应不作规定。 ,虽然给出了通带的容限1及阻带的容限2,但是,在具体技术指标中往往使用通带允许的最大衰减(波纹)Ap和阻带应达到的最小衰减As描述,Ap及As的定义分别为:,(5-3a),(5-3b),式中,假定|H(ej0)|=1(已被归一化)。例如|H(ej)|在p处满足|H(ejp)|=0.707,则Ap=3 dB;在s处满足|H(ejs)|=0.001,则As=60 dB(参考图5-2)。(注:lg是log10的规范符号表示。),3、 FIR型滤波器和IIR型滤波器 数字滤波器按单位脉冲响应h(n)的时域特性可分为无

10、限长脉冲响应IIR(Infinite Impulse Response)滤波器和有限长脉冲响应FIR(Finite Impulse Response)滤波器。 IIR滤波器一般采用递归型的实现结构。其N阶递归型数字滤波器的差分方程为,(5-4),式(5-4)中的系数ak至少有一项不为零。 ak0 说明必须将延时的输出序列反馈回来,也即递归系统必须有反馈环路。相应的IIR滤波器的系统函数为,(5-5),IIR滤波器的系统函数H(z)在Z平面上不仅有零点,而且有极点。,FIR滤波器的单位脉冲响应h(n)是有限长的,即0nN-1, 该系统一般采用非递归型的实现结构,但如果系统函数中出现零、 极点相消

11、时, 也可以有递归型的结构(如频率采样结构)。FIR滤波器的系统函数为,(5-6),由式(5-6)可知,H(z)的极点只能在Z平面的原点。,5.1 Design of Discrete-Time IIR Filters from Continuous-Time Filters,式(5-5)的系统函数又可以用极、零点表示如下:,一般满足MN,这类系统称为N阶系统,当MN时,H(z)可看成是一个N阶IIR子系统与一个(M-N)阶的FIR子系统的级联。 以下讨论都假定MN。,IIR滤波器的系统函数的设计就是确定各系数ak, bk或零极点ck,dk和A,以使滤波器满足给定的性能要求。利用模拟滤波器的理

12、论来设计数字滤波器 首先,设计一个合适的模拟滤波器;然后,变换成满足预定指标的数字滤波器。这种方法很方便,因为模拟滤波器已经具有很多简单而又现成的设计公式,并且设计参数已经表格化了,设计起来既方便又准确。,利用模拟滤波器来设计数字滤波器,就是从已知的模拟滤波器传递函数Ha(s)设计数字滤波器的系统函数H(z)。因此,它归根结底是一个由S平面映射到Z平面的变换,这个变换通常是复变函数的映射变换,这个映射变换必须满足以下两条基本要求: (1)H(z)的频率响应要能模仿Ha(z)的频率响应,也即S平面虚轴j必须映射到Z平面的单位圆ej上。 (2) 因果稳定的Ha(s)应能映射成因果稳定的H(z),也

13、即S平面的左半平面Res0必须映射到Z平面单位圆的内部|z|1。,下面首先分别讨论由模拟滤波器设计IIR数字滤波器的两种常用的变换方法:脉冲响应不变法和双线性变换法,然后介绍一下常用模拟低通滤波器的特性。FIR数字滤波器的设计方法与IIR数字滤波器设计方法明显不同,这将在下一章中介绍。,5.4 Design of Continuous-Time Filters,常用的模拟原型滤波器有巴特沃思(Butterworth)滤波器、切比雪夫(Chebyshev)滤波器、椭圆(Ellipse)滤波器、贝塞尔(Bessel)滤波器等。这些滤波器都有严格的设计公式,现成的曲线和图表供设计人员使用。这些典型的

14、滤波器各有特点:巴特沃思滤波器具有单调下降的幅频特性;切比雪夫滤波器的幅频特性在通带或者在阻带有波动,可以提高选择性;贝塞尔滤波器通带内有较好的线性相位特性;椭圆滤波器的选择性相对前三种是最好的, 但在通带和阻带内均为等波纹幅频特性。这样根据具体要求可以选用不同类型的滤波器。,图 5-3 各种理想模拟滤波器的幅频特性,5.5 The Transform from Continuous-Time Low-Pass Filter to Discrete-Time Filter 首先,把数字滤波器的性能要求转换为与之相应的作为“样本”的模拟滤波器的性能要求,根据此性能要求设计模拟滤波器, 这可以用查

15、表的办法, 也可以用解析的方法。然后,通过脉冲响应不变法或双线性变换法,将此“样本”模拟低通滤波器数字化为所需的数字滤波器H(z)。我们讨论采用双线性变换法和脉冲响应不变法来设计低通滤波器的过程。,例 5-6 用脉冲响应不变法设计一个三阶巴特沃思数字低通滤波器,采样频率为fs=4 kHz(即采样周期为T=250s),其3 dB截止频率为fc=1 kHz。 解 查表可得归一化三阶模拟巴特沃思低通滤波器的传递函数,然后, 以s/c代替其归一化频率,则可得三阶模拟巴特沃思低通滤波器的传递函数为,式中,c=2fc。上式也可由巴特沃思滤波器的幅度平方函数求得。 为了进行脉冲响应不变法变换,将上式进行因式

16、分解并表示成如下的部分分式形式:,将此部分分式系数代入(5-40)式就得到,式中,c=cT=2fcT=0.5是数字滤波器数字频域的截止频率。 将上式两项共轭复根合并,得,从这个结果我们看到,H(z)只与数字频域参数c有关,也即只与临界频率fc与采样频率fs的相对值有关,而与它们的绝对大小无关。 例如fs=4kHz,fc=1 kHz与fs=40 kHz,fc=10kHz的数字滤波器将具有同一个系统函数。这个结论适合于所有的数字滤波器设计。,将c=cT=2fcT=0.5代入上式,得,这个形式正好适合用一个一阶节及一个二阶节并联起来实现。 脉冲响应不变法由于需要通过部分分式来实现变换,因而对采用并联

17、型的运算结构来说是比较方便的。 图5-18给出了脉冲响应不变法得到的三阶巴特沃思数字低通滤波器的频响幅度特性,同时给出例5-5双线性变换法设计的结果。由图可看出,脉冲响应不变法存在微小的混淆现象,因而选择性将受到一定损失,并且没有传输零点。,图 5-18 三阶巴特沃思数字低通滤波器的频响,下面我们总结利用模拟滤波器设计IIR数字低通滤波器的步骤。 (1)确定数字低通滤波器的技术指标:通带截止频率c、通带衰减c、阻带截止频率s、阻带衰减s。 (2)将数字低通滤波器的技术指标转换成模拟低通滤波器的技术指标。,如果采用双线性变换法,边界频率的转换关系为,(3)按照模拟低通滤波器的技术指标设计模拟低通

18、滤波器。 (4)将模拟滤波器Ha(s),从s平面转换到z平面,得到数字低通滤波器系统函数H(z)。,一、脉冲相应不变法设计数字巴特沃思低通滤波器,例 5-7 设计一个巴特沃思低通数字滤波器,给定抽样频率fs=10KHz,要求频率小于 1KHz的通带内,幅度特性下降小于1dB;在频率大于 1.5KHz的阻带内,衰减大于15dB 解 (1) 求对应的各数字域频率:, 数字低通的技术指标为 c=0.2rad,c=1dB; s=0.3rad,s=15dB 模拟低通的技术指标为,设计巴特沃斯低通滤波器。先计算阶数N及3dB截止频率c。,(4)用查表法 根据阶数N=6,查表5.2.1,得到归一化传输函数为

19、,为去归一化,将s=s/c代入Ha(s)中,得到实际的 传输函数Ha(s),(5)用脉冲响应不变法将Ha(s)转换成H(z)。首先将Ha(s)进行部分分式,并按照(5-36)式,可得到:,图5.4.7 例5.4.2图用脉冲响应不变法设计的数字低通滤波器的幅度特性,Example 7.1 Determining Specifications for a Discrete-Time Filter,We want the overall system of that figure to have the following properties when the sampling rate is s

20、amples/s ( ) 1. The gain should be within0.01 of unity in the frequency band 2. the gain should be no greater than 0.001 in the frequency band Such a set of lowpass specifications on can be depicted as in Figure7.2(a) , where the limits of tolerable approximation error are indicated by the shaded ho

21、rizontal lines. For this specific example, the parameters would be,Since the sampling rate is samples/s, the gain of the overall system is identically zero above , due to the ideal discrete-to-continuous( D/C ) converter in Figure7.1 The tolerance scheme for the discrete-time filter is shown in Figu

22、re7.2(b). From Eq.(7.1b), it follows that in the passband the magnitude of the frequency response must approximate unity within an error of Where and radians . The other approximation band is the stopband, in which the magnitude response must approximate zero with an error less than In this example

23、, and radians.,Figure 7.2 (a) Speciffications for effective frequency response of overall system in Figure7.1 for the case of a lowpass filter. (b) Corresponding specifications for the discrete-time system in Fihure7.1,(a),(b),7.1 DESIGN OF DISCRETE-TIME IIR FILTERS FROM CONTINUOUS-TIME FILTERS,The

24、traditional approach to the design of discrete-time IIR filters involves the transformation of a continuous-time filter into a discrete filter meeting prescribed specifications . This is a reasonable approach for several reasons: The art of continuous-time IIR filter design is highly advanced , and

25、since useful results can be achieved, it is advantageous to use the design procedures already developed for continuous-time filters.,Many useful continuous-time IIR design methods have relatively simple closed-form design formulas. Therefore, discrete-time IIR filter design methods based on such sta

26、ndard continuous-time design formulas are rather simple to carry out. The stand approximation methods that work well for continuous-time IIR filters do not lead to simple closed-form design formulas when these methods are applied directly to the discrete-time IIR case.,7.1.1 Filter Design by Impulse

27、 Invariance,Impulse invariance provides a direct means of computing samples of the output of a bandlimited continuous-time system for bandlimited input signals . Alternatively , in the context of filter design, we can think of impulse invariance as a method for obtaining a discrete-time system.,In t

28、he impulse invariance design procedure for transforming continuous-time filters into discrete-time filters , the impulse response of the discrete-time filter is chosen proportional to equally spaced samples of the impulse response of the continuous-time filter; i.e., where represents a sampling inte

29、rval.,When impulse invariance is used as a means for designing a discrete-time filter with a specified frequency response , we are especially interested in the relationship between the frequency response of the discrete-time and continuous-time filters. If the continuous-time filter is bandlimited,

30、so that then i.e., the discrete-time and continuous-time frequency response are related by a linear scaling of the frequency axis , namely ,Unfortunately, any practical continuous-time filter cannot be exactly bandlimited, and consequently , interference between successive terms in Eq.(7.5) occurs ,

31、 causing aliasing, as illustrated in Figure 7.3.,While the impulse invariance transform from continuous time to discrete time is defined in terms of time-domain sampling , it is easy to carry out as a transformation on the system functions. The corresponding impulse response is The impulse response

32、of the discrete-time filter obtained by sampling is,The system function of the discrete-time filter is therefore given by In comparing Eqs.(7.9) and (7.12) , we observe that a pole at in the s-plane transforms to a pole at in the z-plane and the coefficients in the partial fraction expansions of and

33、 are equal , except for the scaling multiplier Td.,Example 7.2 Impulse Invariance with a Butterworth Filter,Let us consider the design of a lowpass discrete-time filter by applying impulse invariance to an appropriate Butterworth continuous-time filter. The specifications for the discrete-time filte

34、r are Since the parameter Td cancels in the impulse invariance procedure , we can choose Td=1, so that .,Because of the preceding considerations , we want to design a continuous-time Butterworth filter with magnitude function for which Since the magnitude response of an analog Butterworth filter is

35、a monotonic functions of frequency.,Eqs.(7.14a) and (7.14b) will be satisfied if and,Specifically , the magnitude-squared function of a Butterworth filter is of the form So that the filter design process consists of determining the parameters N and to meet the desired specifications. Using Eq.(7.16)

36、 in Eqs.(7.15) with equality leads to the equations and The solution of these two equations is N=5.8858 and,With and with N=6, the 12 poles of the magnitude-squared function are uniformly distributed in angle on a circle of radius as indicated in Figure 7.4. consequently , the poles of are the three

37、 pole pairs in the left half of the s-plane with the following coordinates: Pole pair 1:-0.182j(0.679) Pole pair 2:-0.497j(0.497) Pole pair 3:-0.679j(0.182) Figure 7.4 s-plane locations for poles of for sixth-order Butterworth filter in Example 7.2.,Therefore , If we express as a partial fraction ex

38、pansion , perform the transformation of Eq.(7.12), and then combine complex-conjugate terms, the resulting system function of the discrete-time filter is,As is evident from Eq.(7.19), the system function resulting from the impulse invariance design procedure may be realized directly in parallel form

39、. The basis for impulse invariance is to choose an impulse response for the discrete-time filter that is similar in some sense to the impulse response of the continuous-time filter.,Figure 7.5 Frequency response of sixth-order Butterworth filter transform by impulse invariance. (a) Log magnitude in

40、dB. (b) magnitude . (c ) Group delay,5.2 Filter Design by Impulse Invariance,一、 变换原理 利用模拟滤波器来设计数字滤波器,也就是使数字滤波器能模仿模拟滤波器的特性,这种模仿可以从不同的角度出发。 脉冲响应不变法是从滤波器的脉冲响应出发,使数字滤波器的单位脉冲响应序列h(n)模仿模拟滤波器的冲激响应ha(t),即将ha(t)进行等间隔采样,使h(n)正好等于ha(t)的采样值,满足,h(n)=ha(nT),(5-31),式中, T是采样周期。,如果令Ha(s)是ha(t)的拉普拉斯变换,H(z)为h(n)的Z变换,利

41、用第2章2.5节采样序列的Z变换与模拟信号的拉普拉斯变换的关系,即利用式(2-53)(P71),得,(5-32),则可看出,脉冲响应不变法将模拟滤波器的S平面变换成数字滤波器的Z平面,这个从s到z的变换z=esT正是第2章2.5节中从S平面变换到Z平面的标准变换关系式(2-51)。,图 5-9 脉冲响应不变法的映射关系,二、 混叠失真 由式(5-32)知,数字滤波器的频率响应和模拟滤波器的频率响应间的关系为,(5-33),这就是说,数字滤波器的频率响应是模拟滤波器频率响应的周期延拓。正如第1章1.4节采样定理所讨论的,只有当模拟滤波器的频率响应是限带的,且带限于折叠频率以内时,即,(5-34)

42、,才能使数字滤波器的频率响应在折叠频率以内重现模拟滤波器的频率响应,而不产生混叠失真,即,|,(5-35),但是,任何一个实际的模拟滤波器频率响应都不是严格限带的, 变换后就会产生周期延拓分量的频谱交叠,即产生频率响应的混叠失真,如图5-10所示。这时数字滤波器的频响就不同于原模拟滤波器的频响,而带有一定的失真。当模拟滤波器的频率响应在折叠频率以上处衰减越大、越快时,变换后频率响应混叠失真就越小。这时,采用脉冲响应不变法设计的数字滤波器才能得到良好的效果。,图 5-10 脉冲响应不变法中的频响混叠现象,对某一模拟滤波器的单位冲激响应ha(t)进行采样,采样频率为fs,若使fs增加,即令采样时间

43、间隔(T=1/fs)减小,则系统频率响应各周期延拓分量之间相距更远,因而可减小频率响应的混叠效应。,三、 模拟滤波器的数字化方法 由于脉冲响应不变法要由模拟系统函数Ha(s)求拉普拉斯反变换得到模拟的冲激响应ha(t),然后采样后得到h(n)=ha(nT),再取Z变换得H(z),过程较复杂。下面我们讨论如何由脉冲响应不变法的变换原理将Ha(s)直接转换为数字滤波器H(z)。 设模拟滤波器的系统函数Ha(s)只有单阶极点,且假定分母的阶次大于分子的阶次(一般都满足这一要求,因为只有这样才相当于一个因果稳定的模拟系统),因此可将,(5-36),其相应的冲激响应ha(t)是Ha(s)的拉普拉斯反变换

44、,即,式中, u(t)是单位阶跃函数。 在脉冲响应不变法中,要求数字滤波器的单位脉冲响应等于对ha(t)的采样,即,(5-37),对h(n)求Z变换,即得数字滤波器的系统函数,(5-38),将式(5-36)的Ha(s)和式(5-38)的H(z)加以比较,可以看出: (1)S平面的每一个单极点s=sk变换到Z平面上z=eskT处的单极点。 (2) Ha(s)与H(z)的部分分式的系数是相同的,都是Ak。,(3)如果模拟滤波器是因果稳定的,则所有极点sk位于S平面的左半平面,即Resk0, 则变换后的数字滤波器的全部极点在单位圆内,即|eskT|=eReskT1, 因此数字滤波器也是因果稳定的。

45、(4)虽然脉冲响应不变法能保证S平面极点与Z平面极点有这种代数对应关系,但是并不等于整个S平面与Z平面有这种代数对应关系,特别是数字滤波器的零点位置就与模拟滤波器零点位置没有这种代数对应关系,而是随Ha(s)的极点sk以及系数Ak两者而变化。,从式(5-35)看出,数字滤波器频率响应幅度还与采样间隔T成反比:,|,如果采样频率很高,即T很小,数字滤波器可能具有太高的增益,这是不希望的。为了使数字滤波器增益不随采样频率而变化,可以作以下简单的修正,令,h(n)=Tha(nT),(5-39),则有:,(5-40),(5-41),例 5-3 设模拟滤波器的系统函数为,试利用脉冲响应不变法将Ha(s)

46、转换成IIR数字滤波器的系统函数H(z)。,解 直接利用式(5-40)可得到数字滤波器的系统函数为,设T=1,则有,模拟滤波器的频率响应Ha(j)以及数字滤波器的频率响应H(ej)分别为:,把|Ha(j)|和|H(ej)|画在图5-11上。由该图可看出,由于Ha(j)不是充分限带的,所以H(ej)产生了严重的频谱混叠失真。,图 5-11 例5-3的幅频特性,5.4.4 优缺点 从以上讨论可以看出,脉冲响应不变法使得数字滤波器的单位脉冲响应完全模仿模拟滤波器的单位冲激响应,也就是时域逼近良好,而且模拟频率和数字频率之间呈线性关系=T。 因而,一个线性相位的模拟滤波器(例如贝塞尔滤波器)通过脉冲响

47、应不变法得到的仍然是一个线性相位的数字滤波器。,脉冲响应不变法的最大缺点是有频率响应的混叠效应。 所以, 脉冲响应不变法只适用于限带的模拟滤波器(例如, 衰减特性很好的低通或带通滤波器),而且高频衰减越快,混叠效应越小。 至于高通和带阻滤波器,由于它们在高频部分不衰减, 因此将完全混淆在低频响应中。如果要对高通和带阻滤波器采用脉冲响应不变法, 就必须先对高通和带阻滤波器加一保护滤波器,滤掉高于折叠频率以上的频率,然后再使用脉冲响应不变法转换为数字滤波器。 当然这样会进一步增加设计复杂性和滤波器的阶数。,7.1.2 Bilinear Transformation,The technique di

48、scussed in this subsection avoids the problem of aliasing by using the bilinear transformation , an algebraic transformation between the variables s and z that maps the entire -axis in the s-plane to one revolution of the unit circle in the z-plane. With denoting the continuous-time system function and H (z) the discrete-time system function, the bilinear transformation corresponds to replacing s by that is,To develop the properties of the algebraic transformation speci

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

当前位置:首页 > 其他


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