LECTURER NOTE SMJE363 DSP (04/05-) ------------------------------------------------------------------------- Week3 IIR Filter Design ------------------------------------------------------------------------- 3. IIR Filter Design Problem Input-output recursive difference equation The relationship between the input and output of an IIR filter is given by the recursive formula: y(n) = b 0 x(n) + b x(n ) + +b M x(n M) a y(n ) a N y(n N) M = b k x(n k) a k y(n k) k=0 N k= where a k (k =,.., N ), and b k (k = 0,.., M)are filter coefficients. System function (3.) The system function of IIR system above is defined by applying z transform on both sides of (3.) and taking the ratio H(z)=Y(z)/X(z). In contrast to IIR system, IIR system has a rational function of z as follow. H(z) = M k=0 b kz k a k z k (3.) where a 0=, N is the order of IIR system which is equal to the order of denominator polynomial. Frequency response The frequency response H(e jω ) of H(z) is obtained by substituting z = e jω to H(z), thus we have N k=0 Figure 3. Block Diagram of nd order IIR filter H(e jω ) = M k=0 b ke jkω a k e jkω N k=0 = H(e jω ) e j H(ejΩ ) (3.3) IIR filter design problem is to determine all filter coefficients a k and b k by which the magnitude characteristic H(e jω ) of (3. 3) satisfies given specifications. IIR filter design methods A number of different approaches have been proposed to the IIR filter approximation problem. One of the most efficient ways of designing IIR filter is through classical analog filter approximations. This course will focus on the bilinear transformation method. Analog filter approximation has been developed in the past, and vast amount of knowledge has been accumulated.
3. Transforming method approach The transforming approach of IIR filter design is illustrated in Figure 3.. The digital filter approximation problem (left hand side in Figure 3.) is translated to an equivalent analog filter approximation problem (right hand side). Analog filter approximation is then solved using well-known technique. The resulting analog system function is properly transformed into a discrete-time system function and the filter coefficients. Figure 3. Transform method approach 3.3 Analog Filter Design (Step in Figure 3.) Step -a Protptype Filter The most common analog filter approximation techniques which use Butterworth and Chebyshev approximation functions are introduced. Both two filters are presented in terms of a lowpass prototype filter. Butterworth Lowpass Prototype The magnitude-squared of N th-order Butterworth lowpass prototype is defined. H(jω) = (3.4) + ωn Examples of the magnitude response H(jω) of the Butterworth filter are shown in Figure 3.3. The Butterworth lowpass prototype filter has the passband edge frequency or -3db cutoff angular frequency at ω = [rad/sec] From the classic analog filter theory, the system functions of Butterworth prototype filter for N=~3 with magnitude-squared responses (3.4) are derived by Compute H(jω) H(jω) at ω = of (3.4). How about their decibel values? st order Butterworth H(s) = s+ nd order Butterworth H(s) = 3rd order Butterworth H(s) = s + s+ s 3 +s +s+ Butterworth filters are called maximally flat filters because the magnitude response at both at ω = 0, are completely flat. However the Butterworth filter does not provide a good response near passband edge, therefore, a very Figure 3.3 Magnitude response of Butterworth prototype Exercise Calculate the magnitude response of the st and the nd order Butterworth lowpass prototypes respectively.
high order filter is required for achieving a narrow transition band. Chebysev Lowpass Prototype The magnitude-squared of N th-order Chebysev lowpass prototype is defined by H(jω) = + ε C (3.5) N (ω) where C N (ω) is an N th-order Chebyshev polynomial, such as C (ω) = ω C (ω) = ω C 3 (ω) = 4ω 3 3ω and ϵ is a parameter associated with the size of the ripple. Figure 3.4 shows the magnitude response of (3.5) Chebyshv filters of order N=5 with ϵ = 0.5. As shown in the figure, the magnitude response over passband oscillates between and + ε and the passband edge angular frequency (not the -3db cutoff frequency as defined in Butterworth case) is ω = [rad/sec]. The allowance of some ripple in the passband makes Chebyshev filters to provide sharp roll-off from passband to stopband, therefore it overcomes gradual roll-off problems in Butterworth filters. For example, the system functions of Chebyshev filter for N= and with the same ϵ =0.3493 are given as follows. st order Chebysev (ε = 0.3493) H(s) =.868 s+.868 Figure 3.4 Chebysev prototype N=5, ϵ = 0.5 Compute H(jω) and H(jω) at ω = of Chebyshev prototype (3.5). Use C N () = for any N. Exercise Calculate the magnitude response of the st and nd order Chebyshev lowpass prototypes. nd order Chebysev (ε = 0.3493) H(s) =.434 s +,434s+.56 Step -b Filter Transformation in the Analog Domain Suppose we have designed a prototype lowpass filter with system function H pro (s). By using proper frequency transformation, it is possible to convert the prototype filter into a lowpass filter with any cutoff frequency (passband edge frequency) as well as another type of filter either a bandpass or a bandstop filter. The following Table 3. lists the conversion formula from prototype Butterworth and Chebyshev lowpass filter into actual filter.
TABLE 3. Filter Conversion from Prototype Filter Lowpass to Lowpass with cutoff angular frequency ω c [rad/sec] H(s) = H pro ( s ω c ) (3.6) Lowpass to Highpass with cutoff angular frequency ω c [rad/sec] H(s) = H pro ( ω c s ) (3.7) Lowpass to Bandpass cutoff angular frequencies ω c, ω c [rad/sec] (ω c < ω c ) H(s) = H pro ( s + ω c ω c s(ω c ω c ) ) (3.8) Lowpass to Bandstop cutoff angular frequencies ω c, ω c [rad/sec] (ω c < ω c ) Exercise Given a lowpass Butterworth prototype H pro (s) = s + Determine each of the following analog filters a. The lowpass filter with a cutoff angular frequency of 60[rad/sec] b. The lowpass filter with a cutoff frequency of 00[Hz] c. The highpass filter with a cutoff angular frequency of 40[rad/sec] d. The bandpass filter with cutoff angular frequencies of ω c = 60 [rad/sec], ω c = 00[rad/sec] H(s) = H pro ( s(ω c ω c ) s + ω c ω c ) (3.9) 3.4 Bilinear Transformation Bilinear transformation converting method from the analog filter transfer function H(s) into a discrete-time domain system function H(z). The transformation is performed by s = z (3.0) T + z where T is the sampling interval. The inverse transformation of above can be obtained by z = + Ts Ts (3.) Bilinear relationship can be derived by the discrete-time numerical approximation of continuous time integration. (See Appendix 3.) Substituting s = jω, z = e jω into Eq.(3.0) leads the following relationship between ω and Ω. ω = T tan Ω (3.) Ω = tan ( ωt ) (3.3) Figure 3.5 shows a plot of mapping between ω and Ω, and Figure 3.6 illustrates the flow of BLT with three steps. Figure 3.5 Mapping between ω and Ω
3.5 BLT IIR Filter Design Procedure Step Pre-warp: Pre-warp a given cutoff frequency Ω i, where i = c, c, c ; Ω c for LPF and HPF, Ω c for Ω c for BPF and BSF, to an analog frequency ω i [rad/sec] by Step Analog Filter Design -a Prototype Filter Selection ω i = T tan (Ω i ) (3.4) Select a filter type such as Butterworth and Chebyshev. The process here includes the determination of the filter order as well as the ripple parameters to meet the specifications. -b Transform from lowpass prototype to the target filter : One of the frequency transformation listed in Table 3. is applied to convert a lowpass prototype filter into the target filter. Step 3 Bilinear transform: Substitute the BLT (3.0) to the H(s) obtained above. H(z) = H(s) z (3.5) s= T +z Figure 3.6 Bilinear transformation IIR filter design
Appendix 3. A Relation between s and z in the bilinear Transform case: Here we shall connect two operators below. s : integration operation in Laplace domain, z : one sample delay operation in z-domain Define a continuous-time function y(t) as the running integral of x(t) by y(t) = t x(τ) dτ (A3.) Introduce the trapezoidal numerical integral approximate of (A3.) by y(n) the trapezoidal approximate area under the curve x(t) up to t=nt (T: sampling interval) (See Figure A3. Trapezoidal approximate integral of x(t)) Then, we have y(n) = y(n )+the trapezoidal approximate area from t=(n )T to t=nt With x(n) = x(nt), the second term above is equal to x(n) + x(n ) T (A3.) Discrete-time approximation of (A3.) is finally given by Figure A3. Numerical approximation of integration y(n-) means the approximate area under the curve up to t = (n )T y(n) = y(n ) + T x(n)+x(n ). (A3.3) Applying the z-transform to (A3.3) yields Y(z) = z Y(z) + T {X(z) + z X(z)} (A3.4) In Laplace domain, the system function of (A3.) is given by the integral operator Y(s) = X(s) s, while the system function of (A3.4) is given by Y(z) = T +z X(z) z Consequently, the mapping from s to z is obtained by (3.0). (A3.5) (A3.6)