Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 6 IIR Digital Filter Design

Similar presentations


Presentation on theme: "Chapter 6 IIR Digital Filter Design"— Presentation transcript:

1 Chapter 6 IIR Digital Filter Design

2 Introduce Digital Filter
-- One of the most widely used complex signal processing operations is filtering, whose main objective is to alter the spectrum according to some given specifications. The system implementing this operation is called a filter. The discrete-time system for the treatment of discrete-time signal is called a digital filter. 2018年9月8日1时40分

3 Introduce Classification of Digital Filter
According to the characterization of the eliminated frequency component, the digital filters are usually classified as: Classical filters The useful frequency components in input signal are different from the eliminated frequency components. Modern filters The signal is aliased into interferer frequency component. 2018年9月8日1时40分

4 Introduce Classification of Digital Filter
According to magnitude characteristics of the transfer function, the Classical filters include: Lowpass filters Highpass filters Bandpass filters Bandstop filters. 2018年9月8日1时40分

5 图6.1.1 理想低通、高通、带通、带阻滤波器幅度特性
图 理想低通、高通、带通、带阻滤波器幅度特性 2018年9月8日1时40分

6 Introduce According to the length of their impulse response sequences, the digital filters are usually classified as: Infinite impulse response (IIR) filters Finite impulse response (FIR) filters 2018年9月8日1时40分

7 Introduce An important step in the development of a digital filter is the determination of a realizable transfer function H(z) approximating the given frequency response specifications. The process of deriving the transfer function H(z) is called digital filter design. 2018年9月8日1时40分

8 Introduce In Chapter 5, we outlined a variety of basic structures for the realization of IIR and FIR transfer functions. In this chapter, we consider the IIR digital filter design problem. The design of FIR digital filters is discussed in Chapter 7. 2018年9月8日1时40分

9 Content Digital Filter Specifications Design of analog filters
Impulse Invariance Method of Lowpass IIR Digital Filters Design Bilinear Transformation Method of Lowpass IIR Digital Filter Design Design of Highpass,Bandpass and Bandstop Digital Filters 2018年9月8日1时40分

10 6.1 Concepts on Digital Filter
There are two major issues that need to be answered before one can develop the digital transfer function G(z). The first issue is the development of a reasonable filter frequency response specification from the requirements of overall system in which the digital filter is to be designed. The second issue is to determine whether an FIR or IIR digital filter is to be designed. 2018年9月8日1时40分

11 6.1 Concepts on Digital Filter
Digital Filter Specification As in the case of the design of analog filters, either the magnitude and/or the phase response is specified for the design of a digital filter for most application. In most practical applications, the problem of interest is the development of a realizable approximation to a given magnitude response specification. The phase response of the filter can be corrected by cascading it with an allpass filter. 2018年9月8日1时40分

12 6.1 Concepts on Digital Filter
We restrict our attention in this chapter to the magnitude approximation problem only. We pointed out that there are four basic types of filters, whose magnitude responses are shown: 2018年9月8日1时40分

13 图6.1.1 理想低通、高通、带通、带阻滤波器幅度特性
图 理想低通、高通、带通、带阻滤波器幅度特性 2018年9月8日1时40分

14 6.1 Concepts on Digital Filter
Since the impulse response corresponding to each of these is noncausal and of infinite length, these ideal filters are not realizable. One way of developing a realizable approximation to these filters would be to truncate the impulse response for a lowpass filter. 2018年9月8日1时40分

15 6.1 Concepts on Digital Filter
The magnitude response specifications of a digital filter in passband and in the stopband are given with some acceptable tolerances. A transition band is specified between the passband and the stopband to permit the magnitude to drop off smoothly. For example, the magnitude of a losspass filter may be given as shown in Figure 9.1 2018年9月8日1时40分

16 Passband edge frequency Stopband edge frequency
Peak ripple value Transition band Peak ripple value Passband edge frequency Stopband edge frequency 2018年9月8日1时40分

17 6.1 Concepts on Digital Filter
Passband defined by Error bound Magnitude Stopband defined by Error bound Magnitude Transition band 2018年9月8日1时40分

18 6.1 Concepts on Digital Filter
Note: The frequency response of a digital filter is a periodic function of ω, and the magnitude response of a real-coefficient digital filter is an even function of ω. As a result, the digital filter specifications are given only for the range 2018年9月8日1时40分

19 6.1 Concepts on Digital Filter
Digital filter specifications are often given in terms of loss function, in dB. Thus Peak passband ripple Minimum stopband attenuation 2018年9月8日1时40分

20 6.1 Concepts on Digital Filter
The magnitude response specifications for a digital lowpass filter may alternatively be given I a normalized form: The maximum value of the magnitude in passband is assumed to be unity. The maximum passband deviation, denoted as is given by the minimum value of the magnitude in the passband. The maximum stopband magnitude is denoted by 1/A. 2018年9月8日1时40分

21 Maximum passband attenuation
6.1 Concepts on Digital Filter Maximum passband attenuation 2018年9月8日1时40分

22 6.1 Concepts on Digital Filter
Maximum passband attenuation as is typically the case, it can be shown For 2018年9月8日1时40分

23 6.1 Concepts on Digital Filter
The passband and stopband edge frequencies, in most applications, are specified in Hz, along with the sampling rate of the digital. Then, the normalized angular edge frequencies in radians are given by 2018年9月8日1时40分

24 Selection of the Filter Type
6.1 Concepts on Digital Filter Selection of the Filter Type The second issue of interest is the selection of the digital filter type, that is, whether an IIR or an FIR digital filter is to be employed. The objective of digital filter design is to develop a causal transfer function H(z) meeting the frequency response specifications. 2018年9月8日1时40分

25 6.1 Concepts on Digital Filter
For IIR digital filter design, the transfer function is a rational function of z-1 : Moreover, H(z) must be a stable transfer function, and for reduced computational complexity, it must be of lowest order N. 2018年9月8日1时40分

26 6.1 Concepts on Digital Filter
For FIR filter design, the transfer function is polynomial in z-1 : For reduced computational complexity, the degree N of H(z) must be as small as possible. In addition, if a linear phase is desired, then the FIR filter coefficients must satisfy the constraint: 2018年9月8日1时40分

27 6.1 Concepts on Digital Filter
Advantages in using an FIR filter It can be designed with exact linear phase. The filter structure is always stable with quantized filter coefficients. 2018年9月8日1时40分

28 6.1 Concepts on Digital Filter
Disadvantages in using an FIR filter In the cases, the order NFIR of an FIR filter is considerably higher than the order NIIR of an equivalent IIR filter meeting the same magnitude specification. It has been shown that for most practical filter specifications, the ratio NFIR/NIIR is typically of the order of tens or more and, as a result, the IIR filter usually is computationally more efficient. 2018年9月8日1时40分

29 6.1 Concepts on Digital Filter
If the group delay of the IIR filter is equalized by cascading it with an allpass equalizer, then the savings in computation may longer be that significant. In many applications, the linearity of the phase response of the digital filter is not an issue, making the IIR filter preferable because of the lower computational requirements. 2018年9月8日1时40分

30 6.1 Concepts on Digital Filter
Introduce of filter design The approach to IIR filter design based on the conversion of a prototype analog transfer function to a digital transfer function is widely used. Then, the most common practice of IIR filter design is 2018年9月8日1时40分

31 6.1 Concepts on Digital Filter
To convert the digital filter specifications into analog lowpass prototype filter specifications. To determine the analog lowpass filter transfer function meeting these specifications To transform it into the desired digital filter transfer function. 2018年9月8日1时40分

32 6.1 Concepts on Digital Filter
Why is this approach used? Analog approximation techniques are highly advanced. They usually yield closed-form solutions. Extensive tables are available for analog filter design. Many applications require the digital simulation of analog filter. 2018年9月8日1时40分

33 6.1 Concepts on Digital Filter
We denote an analog transfer function as The digital transfer function derived from Ha(s) is denoted by 2018年9月8日1时40分

34 6.1 Concepts on Digital Filter
The basic idea behind the conversion of an analog prototype transfer function Ha(s) into a digital IIR transfer function G(z) is to apply a mapping from the s-domain to the z-domain so that the essential properties of the analog frequency response are preserved. 2018年9月8日1时40分

35 6.1 Concepts on Digital Filter
The mapping function should be such that the imaginary axis in the s-plane be mapping onto the unit circle of the z-plane. a stable analog transfer function be transformed into a stable digital transfer function. The widely used transformation is the Bilinear Transformation and Impulse Invariance Method. 2018年9月8日1时40分

36 6.2 Analog Filter Design

37 1. Introduce There are a number of established approximation techniques for the design of analog lowpass filters. Here we describe four widely used design techniques without their detailed derivations. Further details of these methods can be found in texts on analog filter design. 2018年9月8日1时40分

38 1. Introduce Filter specifications Butterworth approximation
Chebyshev approximation Elliptic approximation Highpass,Bandpass and Bandstop Filters Design 2018年9月8日1时40分

39 2. Filter specifications
The ideal lowpass filter should have a magnitude response of the form shown as follow: 2018年9月8日1时40分

40 2. Filter specifications
In practical, the magnitude response characteristics in the passband and in the stopband cannot be constant and are therefore specified with some acceptable tolerances. A transition band is specified between the passband and the stopband to permit the magnitude to drop off smoothly. 2018年9月8日1时40分

41 Figure 6.17 Typical magnitude specifications for an analog lowpass filter
2018年9月8日1时40分

42 2. Filter specfications Passband defined by 0≤Ω ≤ Ωp, we require
Stopband defined by Ωs≤Ω ≤ ∞, we require Passband edge frequency Stopband edge frequency 2018年9月8日1时40分

43 Minimum stopband attenuation
2. Filter specfications Passband ripple Stopband ripple Minimum stopband attenuation Peak passband ripple The filter specifications are given in terms of the loss function or attenuation function in dB, which is defined as the negative of the gain in dB; that is , 2018年9月8日1时40分

44 2. Filter specfications The magnitude response specification for an analog lowpass filter can also be given in a normalized form in some application. 2018年9月8日1时40分

45 Figure 6.18 Notmalized magnitude specifications for an analog lowpass filter
2018年9月8日1时40分

46 2. Filter specifications
Similar to a digital filter, the analog filter specification can also be given: Passband: 0≤ ≤p Stopband: p ≤ ≤s 2018年9月8日1时40分

47 2. Filter specifications
The frequency p and s are,respectively, called the passband edge frequency and the stopband edge frequency. The limits of the tolerances in the passband and stopband, δp and δs are called ripples. Usually, these ripples are specified in dB in terms of the peak passband ripple and the minimum stopband attenuation, defined by 2018年9月8日1时40分

48 2. Filter specifications
Peak passband ripple Peak passband ripple 2018年9月8日1时40分

49 2. Filter specifications
Example: Passband and stopband ripple computation Let the desired peak passband ripple of a losspass be 0.01dB, and the minimum attenuation in the stopband be 70dB. We can be given 2018年9月8日1时40分

50 3. Butterwort approximation
The magnitude-squared response of an analog lowpass Butterworth filter Ha(s) of Nth order is given by N is the order of filter. 2018年9月8日1时40分

51 3. Butterwort approximation
2018年9月8日1时40分

52 Figure 4.19 Typical Butterworth lowpass filter response
2018年9月8日1时40分

53 3. Butterwort approximation
It can easily shown that At Ω=0 the magnitude are equal to unity, and as a result, the Butterworth lowpass filter is said to have a maximally flat magnitude at Ω=0 . 2018年9月8日1时40分

54 3. Butterwort approximation
The gain of the butterworth filter in dB is given by At dc, that is, at Ω=0, the gain in dB is equal to zero , and at Ω=Ωc, the gain is Ωc is often called the 3-dB cutoff frequency. 2018年9月8日1时40分

55 3. Butterwort approximation
Since the derivative of the squared-magnitude response or, equivalently, of the magnitude response is always negative for positive values of Ω, the magnitude response is monotonically decreasing with increasing Ω. For Ω>>Ωc, the squared-magnitude function can be approximated by 2018年9月8日1时40分

56 3. Butterwort approximation
The gain G(Ω2) in dB at Ω2=2Ω1 with Ω1>>2Ωc is given by As a result, the gain in the stopband decrease by 6dB per octave or, equivalently, by 20 dB per decade for an increase of the filter order by one. In other words, the passband and the stopband behaviors of the magntude response improve with a corresponding decrease in the transition band as the filter order N increases. 2018年9月8日1时40分

57 3. Butterwort approximation
The two parameters completely characterizing a Butterworth filter are the 3-dB cutoff frequency Ωc and the order N. These are determined from the specified passband edge frequency Ωp, the minimum passband magnitude The stopband edge frequency Ωs, and the maximum stopband ripple 1/A The magnitude response of the Butterworth filter is monotonically decreasing with increasing . 2018年9月8日1时40分

58 3. Butterwort approximation
Solving the above, we arrive at the expression for the order N as The value of N computed using the above expression is rounded up to the next higher integer. 2018年9月8日1时40分

59 3. Butterwort approximation
This value of N can be used to solve for the 3-dB cutoff frequency Ωc. The Passband specification at p is met exactly, while the stopband specification at s is exceeded. The stopband specification at s is satisfied exactly, while the passband specification at p is exceeded. 2018年9月8日1时40分

60 3. Butterwort approximation
The expression for the transfer function of the Butterworth lowpass filter is given by where 2018年9月8日1时40分

61 3. Butterwort approximation
It can easily shown that Poles are 2018年9月8日1时40分

62 图 三阶巴特沃斯滤波器极点分布 2018年9月8日1时40分

63 3. Butterwort approximation
为了获得因果稳定的滤波器,只能取位于S平面的左半平面的极点构成传输函数 为使设计公式和图表统一,将频率对 归一化,可得 2018年9月8日1时40分

64 3. Butterwort approximation
引入归一化复变量 这样,巴特沃斯滤波器的归一化低通原型系统函数 2018年9月8日1时40分

65 3. Butterwort approximation
可得设计步骤: 根据技术指标求出阶数N; 求出N个极点 ; 求出或查表得到归一化低通原型系统函数 ; 求出 ; 去归一化得到期望设计的系统函数 。 2018年9月8日1时40分

66 表 巴特沃斯归一化低通滤波器参数 2018年9月8日1时40分

67 2018年9月8日1时40分

68 2018年9月8日1时40分

69 3. Butterwort approximation
EXAMPLE Design of Butterworth lowpass filter 2018年9月8日1时40分

70 3. Butterwort approximation
Design of Butterworth lowpass filter with MATLAB [z, p, k]=buttap(k) [N, wc]=buttord(wp, ws, Rp, As) [N, wc]=buttord(wp,ws, Rp, As, ‘s’) [B,A]=butter(N, wc, ‘ftype’) [B, A]=butter(N, wc, ‘ftype’, ‘s’) 2018年9月8日1时40分

71 4. Chebychev approximation
In this case, the approximation error, defined as the difference between the ideal brickwall characteristic and the actual response, is minimized over a prescribed band of frequencies. In fact, the magnitude error is equiripple in the band. 2018年9月8日1时40分

72 4. Chebychev approximation
There are two types of Chebychev tranfser functions. In the Type 1 Chebyshev approximation, the magnitude characteristic is equiripple in the passband and monotonic in the stopband, whereas in the Type 2 approximation, the magnitude response is monotonic in the passband and equiripple in the stopband. 2018年9月8日1时40分

73 图 切比雪夫Ⅰ型滤波器幅频特性 2018年9月8日1时40分

74 4. Chebychev approximation
The magnitude-squared response of the analog lowpass Type 1 Chebychev filter of Nth order is given by Where 0<ε<1 is the ripple in the passband, CN is the Chebychev polynomial of order N. 2018年9月8日1时40分

75 4. Chebychev approximation
The above polynomial can also be derived via a recurrence relation given by With 2018年9月8日1时40分

76 图 N=0,4,5切比雪夫多项式曲线 2018年9月8日1时40分

77 4. Chebychev approximation
It can be seen that the squared-magnitude response is equiripple between x=0 and x=1, and it decreases monotonically for all x>1. 2018年9月8日1时40分

78 图6.2.7 切比雪夫Ⅰ型与巴特沃斯低通的A2(Ω)曲线
2018年9月8日1时40分

79 4. Chebychev approximation
The order N of the transfer function is determined from the attenuation specification in the stopband at a particular frequency. For example, if at =s, the magnitude is equal to the minimum stopband attenuation δs 2018年9月8日1时40分

80 4. Chebychev approximation
At , the magnitude is equal to the maximum passband attenuation ,we can obtain Where We can also obtain 2018年9月8日1时40分

81 4. Chebychev approximation
At , the minimum stopband attenutation is , we can obtained 由于 2018年9月8日1时40分

82 4. Chebychev approximation
We can obtain As in the case of the Butterworth filter, the order N of the filter is chosen as the nearest integer greater than or equal to the above number N. 2018年9月8日1时40分

83 4. Chebychev approximation
Further, at 3db-cutoff-frequency, then We can also obtain 2018年9月8日1时40分

84 4. Chebychev approximation
The transfer function Ha(s) is a rational function 2018年9月8日1时40分

85 4. Chebychev approximation
At , the minimum stopband attenutation is , we can obtained 可得 可得 2018年9月8日1时40分

86 4. Chebychev approximation
设计步骤: 确定技术指标 ; 求滤波器的阶数N和参数ε; 求归一化系统函数 ; 将 去归一化,得到实际的 ,即 2018年9月8日1时40分

87 4. Chebychev approximation
EXAMPLE Design of Chebychev lowpass filter 2018年9月8日1时40分

88 4. Chebychev approximation
Design of Chebychev filter using MATLAB [z, p, k]=cheb1ap(N, Rp) [N, wpo]=cheb1ord(wp, ws, Rp, As) [N, wpo]=cheb1ord(wp, ws, Rp, As, ‘s’) [B, A]=cheby(N, Rp, wpo, ‘ftype’) [B, A]=cheby1(N, Rp, wpo, ‘ftype’, ‘s’) 2018年9月8日1时40分

89 4. Chebychev approximation
Example 6.2.4 wp=2*pi*3000;ws=2*pi*12000;rp=0.1;as=60; [N1,wp1]=cheb1ord(wp,ws,rp,as,’s’); [B1,A1]=cheby1(N1,rp,wp1,’s’); Subplot(221); fk=0:12000/512:12000;wk=2*pi*fk; Hk=frqs(B1,A1,wk); Plot(fk/1000,20*log10(abs(Hk)));grid on 2018年9月8日1时40分

90 2018年9月8日1时40分

91 5. Elliptic Approximation
An elliptic filter, also known as Cauer filter, has an equiripple passband and an equiripple stopband magnitude response. 椭圆滤波器通带和阻带波纹幅度固定时,阶数越高,过渡带越窄;阶数固定时,通带和阻带波纹幅度越小,过渡带就越宽。所以椭圆滤波器的阶数由通带边界频率、阻带边界频率、通带最大衰减和阻带最小衰减共同决定。 2018年9月8日1时40分

92 5. Elliptic Approximation
椭圆滤波器可以获得对理想滤波器幅频响应的最好逼近,是一种性价比最高的滤波器。 Since the theory of elliptic filter approximation is mathematically quite involved, and a detailed treatment of this topic is beyond the scope of this text. 2018年9月8日1时40分

93 5. Elliptic Approximation

94 5. Elliptic Approximation
椭圆滤波器的MATLAB设计 【见教材P169】 2018年9月8日1时40分

95 A Comparison of the Filter Types
Butterworth filter has the widest transition band, with a monotonically decreasing gain response. Another way of comparing the performances of the Butterworth, Chebyshev and elliptic filters would be compare the order of these filters required to meet the same filter specification. 2018年9月8日1时40分

96 6. Analog Highpass Filter Design
Two types of approximations dealt with the design of analog lowpass filters meeting the prescribed specifications have been discussed. Design of the other three classes of analog filters, namely, the highpass, bandpass, and bandstop filters, can be carried out by simple spectral transformations of the frequency variables. 2018年9月8日1时40分

97 6. Analog Highpass Filter Design
Design Process of Analog Highpass Filter Development of the specifications of a prototype analog lowpass filter from the specifications of the desired analog highpass filter using a frequency transformation. Design of the analog prototype lowpass filter. Determination of the transfer function of the desired analog filter by applying the inverse of the frequency transformation used to determine the specifications of the prototype lowpass filter. 2018年9月8日1时40分

98 6. Analog Highpass Filter Design
The mapping from p-domain to s-domain is given by invertible p=F(s). The transfer functions Q(p) and Hd(s) are related through 2018年9月8日1时40分

99 6. Analog Highpass Filter Design
A prototype analog lowpass transfer function Q(p) with a passband edge frequency p can be transformed into an analog highpass transfer function Hd(s) with a passband edge frequency ph using the spectral transformation On the imaginary axis, the above transformation reduces to 2018年9月8日1时40分

100 6. Analog Highpass Filter Design
The above mapping implies In passband In stopband 2018年9月8日1时40分

101 6. Analog Highpass Filter Design
The above mapping ensures that the gain value of the prototype laowpass filter in its passband will appear in the passband of the desired highpass filter. Likewise, the gain value of the prototype lowpass filter in its stopband will appear in the stopband of the desired highpass filter. 2018年9月8日1时40分

102 图 低通与高通滤波器的幅度特性 2018年9月8日1时40分

103 6. Analog Highpass Filter Design
Example P172 2018年9月8日1时40分

104 6. Analog Highpass Filter Design
% Exp 616.m Wp=1; ws=4; Rp=0.1; As=40; [N, wc]=buttord(wp, ws, Rp, As, ‘s’) [B, A]=butter(N, wc,’s’) Wph=2*pi*4000; [BH, AH]=lp2hp(B, A, wph) 2018年9月8日1时40分

105 7. Analog Bandpass Filter Design
The mapping relationship is On the imaginary axis, the above transformation reduces to 2018年9月8日1时40分

106 7. Analog Bandpass Filter Design
The above mapping implies G(p) of lowpass filter in passband [-λp, λp] is mapped into H(s) of bandpass filter in passband. 2018年9月8日1时40分

107 图 带通与低通滤波器的幅度特性 表 η与λ的对应关系 2018年9月8日1时40分

108 7. Analog Bandpass Filter Design
Example P175 2018年9月8日1时40分

109 7. Analog Bandpass Filter Design
MATLAB programm: Wp=2*pi*[4000,7000]; Ws=2*pi*[2000,9000]; Rp=1; As=20; [N,wc]=buttord(wp,ws,Rp,As,’s’) [BB, AB]=butter(N, wc, ‘s’) 2018年9月8日1时40分

110 8. Analog Bandstop Filter Design
The mapping relationship On the imaginary axis, 2018年9月8日1时40分

111 图 低通与带阻滤波器的幅频特性 2018年9月8日1时40分

112 Transformation Method of IIR Filter Design
A number of transformations have been proposed to convert an analog transfer function Ha(s) into a digital transfer function G(z) so that essential properties of the analog transfer function in s-domain are preserved for the digital transfer function in the z-domain. Impulse Invariance Method Bilinear Transformation Method 2018年9月8日1时40分

113 6.3 Impulse Invariance Method
Definition The impulse response of the digital filter is identical to the impulse response of an analog prototype filter at sampling instants Let Ha(s) be analog transfer function, then The sample sequence of ha(t) is: 2018年9月8日1时40分

114 6.3 Impulse Invariance Method
For single-poles case, namely We can be given by the inverse Laplace transform The discrete-time sequence can be given by sampling ha(t) with time interval T 2018年9月8日1时40分

115 6.3 Impulse Invariance Method
We can obtain by Z transform Comparing H(z) with Ha(s), we can be given that the mapping relation between s-plane and z-plane is 2018年9月8日1时40分

116 6.3 Impulse Invariance Method
Relation between s-plane and z-plane Let s=σ+j, z=rejω, we obtain 2018年9月8日1时40分

117 6.3 Impulse Invariance Method
2018年9月8日1时40分

118 6.3 Impulse Invariance Method
2018年9月8日1时40分

119 6.3 Impulse Invariance Method
Due to sampling the mapping is many-to-one The strips of length 2π/T are all mapped onto the unit circle Only if ha(t) is a band-limited signal, no alias will occur Hence, this method is not suitable for highpass and bandstop filters design 2018年9月8日1时40分

120 6.3 Impulse Invariance Method
2018年9月8日1时40分

121 6.3 Impulse Invariance Method
2018年9月8日1时40分

122 6.3 Impulse Invariance Method
For a pair of conjugate-pole , namely We have 2018年9月8日1时40分

123 6.3 Impulse Invariance Method
Advantage: Linear frequency transformation 数字滤波器的单位脉冲响应完全模仿模拟滤波器的单位冲激响应波形,时域特性逼近好。 2018年9月8日1时40分

124 6.3 Impulse Invariance Method
Disadvantage: 若ha(t)频带不是限于±π/T之间,则会在奇数π/T附近产生频谱混叠。对应数字频率在ω =±π附近产生频谱混叠。 This method is not suitable for highpass and bandstop filters design. 2018年9月8日1时40分

125 6.3 Impulse Invariance Method
The impulse invariance transformation of an analog transfer function to digital transfer function can be carried out in MATLAB using the M-file impinvar. 2018年9月8日1时40分

126 6.3 Impulse Invariance Method
Example the transfer function of a analog filter is Convert Ha(s) into the system function of the corresponding digital filter H(z) with impulse invariance method. 2018年9月8日1时40分

127 6.4 The bilinear Transformation
The bilinear transformation from the s-plane to the z-plane is given by It maps a single point in the s-plane to unique point in the z-plane. 2018年9月8日1时40分

128 6.4 Bilinear Transformation Method
The relation between the digital transfer function G(z) and the parent analog transfer function Ha(s) is given by Step size The bilinear transformation is derived by applying the trapezoidal numerical integration approach to the differential equation representation of Ha(s) that leads to the difference equation representation of G(z). 2018年9月8日1时40分

129 6.4 Bilinear Transformation Method
Therefore 2018年9月8日1时40分

130 6.4 Bilinear Transformation Method
It follows from the above equation that 2018年9月8日1时40分

131 6.4 Bilinear Transformation Method
A point on the jΩ-axis in the s-plane (σ0=0) is mapped onto a point on the unit circle in the z-plane as |z|=1. A point in the left-half s-plane with σ0<0 is mapped onto a point inside the unit circle in the z-plane as |z|<1. A point in the rigth-half s-plane with σ0>0 is mapped onto a point outside the unit circle in the z-plane as |z|<1. 2018年9月8日1时40分

132 6.4 Bilinear Transformation Method
The bilinear transformation mapping 2018年9月8日1时40分

133 6.4 Bilinear Transformation Method
The exact relation between the imaginary axis in the s-plane and the unit circle in the z-plane 2018年9月8日1时40分

134 6.4 Bilinear Transformation Method
Mapping of the angular analog frequencies  to the angular digital frequencies ω via the bilinear transformation 2018年9月8日1时40分

135 6.3 Bilinear Transformation Method
2018年9月8日1时40分

136 6.4 Bilinear Transformation Method
It is clear that the mapping is highly nonlinear. This introduces a distortion in the frequency axis called frequency warping . The effect of warping is more evident in the below, which shows the transformation of a typical analog filter magnitude response to a digital filter magnitude response derived via the bilinear transformation. 2018年9月8日1时40分

137 6.4 Bilinear Transformation Method
2018年9月8日1时40分

138 6.4 Bilinear Transformation Method
To design a digital filter meeting the desired (digital) specifications we have to: We must first prewarp the critical bandedge frequencies to find their analog equivalent. Design the analog prototype Ha(s) using the prewarped critical frequencies. Transform Ha(s) using the bilinear transformation to obtain the desired digital transfer function G(z). 2018年9月8日1时40分

139 6.4 Bilinear Transformation Method
It should be noted that the bilinear transformation preserves the magnitude response of an analog filter only if the specification requires piecewise constant magnitude. However, the phase response of the analog filter is not preserved after transformation。 2018年9月8日1时40分

140 6.4 Bilinear Transformation Method
The bilinear transformation of an analog transfer function can be carried out in MATLAB using the M-file bilinear 2018年9月8日1时40分

141 6.4 Bilinear Transformation Method
We consider now the design of low-order digital filters by applying the bilinear transformation to the transfer functions of corresponding low-order analog filters. An application of these low-order digital filters are as equalizers in digital audio. 2018年9月8日1时40分

142 6.4 Bilinear Transformation Method
Example Convert RC lowpass analog filter into the corresponding digital filter with the impulse invariance method and bilinear transformation method, respectively. 2018年9月8日1时40分

143 6.4 Design of Lowpass IIR Digital Filters
We illustrate now the development of a lowpass IIR digital transfer function meeting given specifications using the bilinear transformation method. 2018年9月8日1时40分

144 6.4 Bilinear Transformation Method
Design step of IIR digital lowpass filter based on the conversion of a prototype analog filter Determination of the digital lowpass filter specifications Obtain the specifications for a prototype analog filter from the specifications of the desired digital filter Design of the prototype analog filter Convert the analog transfer function into digital transfer function 2018年9月8日1时40分

145 6.4 Bilinear Transformation Method
First-order Butterworth lowpass digital filters The transfer function of a first-order Butterworth lowpass analog filter with 3-dBcutoff frequency at Ωc is given by Applying the bilinear transformation, we arrive at the expression for transfer function G(z) of a first-order Butterworth digital lowpass filter: 2018年9月8日1时40分

146 6.4 Bilinear Transformation Method
Example P187 2018年9月8日1时40分

147 6.5 Design of Highpass, Bandpass and Bandstop Digital Filters
The approach consists of the following steps: Step 1: Prewarp the specified digital frequency specifications of the desired digital filter GD(z) using Eq.(9.18) to arrive at the frequency specifications of analog filter HD(s) of same type. Step 2: Convert the frequency specifications of HD(s) into those of a prototype analog lowpass filter HLP(s) using an appropriate frequency transformation . 2018年9月8日1时40分

148 6.5 Design of Highpass, Bandpass and Bandstop Digital Filters
Step 3: Design the analog lowpass filter HLP(s). Step 4: Convert the transfer function HLP(s) into HD(s) using the inverse of the frequency transformation used in Step 2. Step 5: Transform the transfer function HD(s) using the bilinear transformation of Eq.(9.14) to arrive at the desired digital IIR transfer function GD(z). 2018年9月8日1时40分

149 6.5 Design of Highpass, Bandpass and Bandstop Digital Filters
Example P189 Example P191 2018年9月8日1时40分

150 6.6 Spectral Transformations of IIR Filters
Often, in practice, it is necessary to modify the characteristics of a filter to meet the new specifications without repeating the filter design procedure. For example, after a lowpass filter with a password edge at 2kHz has been designed, it may be required to move the passband edge to 2.1kHz. 2018年9月8日1时40分

151 6.6 Spectral Transformations of IIR Filters
We describe here the spectral transformations that can be used to transform a given lowpass digital IIR transfer function GL(z) to another digital transfer function GD(z) that could be a lowpass, highpass, bandpass, or bandstop filter. 2018年9月8日1时40分

152 6.6 Spectral Transformations of IIR Filters
Spectral Transformation Using MATLAB The M-files iirlp2lp,iirlp2hp,iirlp2bp and iirlp2bs can be used to carry out the desired spectral transforms. 2018年9月8日1时40分

153 6.7 IIR digital filter design using MATLAB
The Signal Processing Toolbox of MATLAB includes a variety of M-files for the design of both IIR and FIR digital filters. We illustrate the use of some these functions in this section. 2018年9月8日1时40分

154 6.7 IIR digital filter design using MATLAB
The IIR digital filter design process involves two steps: Step 1: To determine the filter order N and the frequency scaling factor Wn from the given specifications. Step 2: To determine the coefficients of the transfer function using the above parameters and the specified ripples. 2018年9月8日1时40分

155 6.7 IIR digital filter design using MATLAB
Order Estimation buttord for the Butterworth filters chebord for the Type 1 Chebyshev filters 2018年9月8日1时40分

156 6.7 IIR digital filter design using MATLAB
butter for the design of Butterworth cheby1 for the design of Type 1 Chebyshev 2018年9月8日1时40分

157 6.7 IIR digital filter design using MATLAB
The output files could be either the numerator and denominator coefficient vectors or the vector of zeros, the vector of poles, and the scalar gain factor. 2018年9月8日1时40分

158 6.7 IIR digital filter design using MATLAB
The numerator and denominator coefficients of the transfer function can be determined from the latter data using the function zp2tf. The function zp2sos can be used to find the second-order factors of the numerator and the denominator of the transfer function. After the transfer function has been computed, the frequency response can be computed using the M-file freqz. 2018年9月8日1时40分

159 6.7 IIR digital filter design using MATLAB
% Program 9_1 % Elliptic IIR Lowpass Filter Design % Wp = input('Normalized passband edge = '); Ws = input('Normalized stopband edge = '); Rp = input('Passband ripple in dB = '); Rs = input('Minimum stopband attenuation in dB = '); [N,Wn] = ellipord(Wp,Ws,Rp,Rs) [b,a] = ellip(N,Rp,Rs,Wn); [h,omega] = freqz(b,a,256); plot (omega/pi,20*log10(abs(h)));grid; xlabel('\omega/\pi'); ylabel('Gain, dB'); title('IIR Elliptic Lowpass Filter'); 2018年9月8日1时40分

160 6.7 IIR digital filter design using MATLAB
% Program 9_2 % Type 1 Chebyshev IIR Highpass Filter Design % Wp = input('Normalized passband edge = '); Ws = input('Normalized stopband edge = '); Rp = input('Passband ripple in dB = '); Rs = input('Minimum stopband attenuation in dB = '); [N,Wn] = cheb1ord(Wp,Ws,Rp,Rs); [b,a] = cheby1(N,Rp,Wn,'high'); [h,omega] = freqz(b,a,256); plot (omega/pi,20*log10(abs(h)));grid; xlabel('\omega/\pi'); ylabel('Gain, dB'); title('Type I Chebyshev Highpass Filter'); 2018年9月8日1时40分

161 6.7 IIR digital filter design using MATLAB
% Program 9_3 % Design of IIR Butterworth Bandpass Filter % Wp = input('Passband edge frequencies = '); Ws = input('Stopband edge frequencies = '); Rp = input('Passband ripple in dB = '); Rs = input('Minimum stopband attenuation = '); [N,Wn] = buttord(Wp, Ws, Rp, Rs); [b,a] = butter(N,Wn); [h,omega] = freqz(b,a,256); gain = 20*log10(abs(h)); plot (omega/pi,gain);grid; xlabel('\omega/\pi'); ylabel('Gain, dB'); title('IIR Butterworth Bandpass Filter'); 2018年9月8日1时40分

162 6.8 Computer-Aided Design of IIR Digital Filters
The IIR digital filter design algorithms described in Sections 9.2, 9.4, and 9.5 are based on the design of a prototype analog filter followed by its transformation to an IIR digital filter. These algorithms are used in applications requiring filters with a frequency-selective magnitude response with a lowpass, highpass, bandpass, or bandstop characteristics. 2018年9月8日1时40分

163 6.8 Computer-Aided Design of IIR Digital Filters
In applications requiring IIR digital filters with other types of frequency response, filter design algorithms rely on some type of iterative optimization techniques that are used to minimize the error between the desired frequency response and that of the computer-generated filter. In this section, we first review the basic idea behind the computer-based iterative design techniques and then outline a specific application for the group delay equalization of IIR digital filters. 2018年9月8日1时40分

164 6.8 Computer-Aided Design of IIR Digital Filters
Let -- the frequency response of the digital transfer function H(z) to be designed. -- the desired frequency response, given as a piecewise linear function of ω, in some sense. 2018年9月8日1时40分

165 6.8 Computer-Aided Design of IIR Digital Filters
The objective is for all values of ω over closed subintervals of 0<= ω<=π is minimized. is some user-specified positive weighting function. 2018年9月8日1时40分

166 6.8 Computer-Aided Design of IIR Digital Filters
Some approximation measure The first approximation measure, called the Chebyshev or minimax criterion, is to minimize the peak absolute value of the weighted error The second approximation measure, called the least-p criterion, is to minimize the integral of pth power of the weighted error function 2018年9月8日1时40分

167 6.8 Computer-Aided Design of IIR Digital Filters
In the case of IIR filter design, H(ejω) and D(ejω) are replaced with their magnitude functions. Moreover, the desired transfer function H(z) is assumed to be a real, rational function of z with fixed orders of the numerator and the denominator polynomials. The adjustable filter parameters are either the coefficients of the numerator and the denominator polynomials or the poles and zeros of the transfer function. The design objective is to iteratively adjust the filter parameters so that ε defined by either Eq.(9.42) or Eq.(9.44) is a minimum. 2018年9月8日1时40分

168 6.8 Computer-Aided Design of IIR Digital Filters
The IIR filter design methods described in Section 9.2 through 9.5 lead to transfer functions with nonlinear phase response resulting in group delays that are not constant in the passbands of the filters. To arrive at a frequency selective IIR digital filter with a constant group delay, a practical approach is to first design an IIR digital filter meeting the magnitude response specifications then design an allpass section. The allpass delay equalizer is usually designed using a computer-aided optimization method. 2018年9月8日1时40分

169 6.8 Computer-Aided Design of IIR Digital Filters
Let H(z) be the transfer function of IIR digital filter, with a group delay given by τH(ω). Our objective is to design a stable allpass section with a transfer function with a group delay τA(ω) so that the over group delay of the cascaded system is approximately constant in the passband of the filter. 2018年9月8日1时40分


Download ppt "Chapter 6 IIR Digital Filter Design"

Similar presentations


Ads by Google