EELE 4310: Digital Signal Processing (DSP) Chapter # 10 : Digital Filter Design (Part One) Spring, 2012/2013 EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 1 / 19
Outline 1 Introduction 2 Bilinear Transformation 3 Analog Design Using Digital Filters 4 Digital-to-Digital Transformations EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 2 / 19
Introduction A discrete-time filter takes a discrete-time input sequence x(n) and produces a discrete-time output sequence y(n). To simulate an analog filter, the discrete-time filter is used in the analog-to-digital-h(z)-digital-to-analog structure. Digital filter design techniques: 1- The bilinear transformation method, 2- The digital to digital transformation, 3- The impulse invariant approach. EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 3 / 19
Bilinear Transformation... 1 H(z) can be obtained from H a (s) by replacing each s 2(1 z 1 ) T (1+z 1 ), as follows H(z) = H a (s) [ ] 2(1 z 1 ) s T (1+z 1 ) The left half plane of the s-plane is transformed inside the unit circuit, therefore a stable analog filter would be transformed into a stable digital filter. While the frequency response of the analog filter and digital filter have the same amplitude, there is a nonlinear relationship between corresponding digital and analog frequencies. letting z = e jω and s = jω in the bilinear transformation relation gives jω = 2(1 e jω ) T (1+e jω ) EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 4 / 19
Bilinear Transformation... 2 Dividing both sides by j and rearrange the terms, we get Ω = 2 T tan(ω/2) The inverse relation can be found as ω = 2 tan 1 (ΩT /2) The specifications for a digital filter usually take the form of a set of critical frequencies {ω 1, ω 2,, ω N } and a corresponding set of magnitude requirements {K 1, K 2,, K N }. To get the proper digital frequencies, we must design an analog filter with analog critical frequencies Ὼi : i = 1, 2,, N given by Ὼ i = 2 T tan(ω i/2), i = 1, 2,, N This operation will referred to as prewarping. As the T in the Ὼ i and the T in the bilinear transform cancel each other, it is convenient to just use T equal to one in both places. EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 5 / 19
Bilinear Transformation... 3 Design of a digital filter procedures Prewarp the digital specifications. Design an analog filter to meet the prewarped specifications. Apply the bilinear transformation. Remember that you can select any value of T since its cancel in the design. To simplify the analysis we can select T = 1. EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 6 / 19
Bilinear Transformation... 4 EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 7 / 19
Bilinear Transformation... 5 Ex. Design a digital low-pass filter using the bilinear transformation method to satisfy the following characteristics:(a)- monotonic stopband and passband; (b)- 3.01 db cutoff frequency of 0.5π rad; (c)- magnitude down at least 15 db at 0.75π rad. Step 1: Prewarp the critical digital frequencies ω 1 = 0.5π and ω 2 = 0.75π using T = 1 to get Ὼ 1 = 2 T tan ω 1 2 = 2 tan(0.5π/2) = 2 Ὼ 2 = 2 T tan ω 2 2 = 2 tan(0.75π/2) = 4.8282 Step 2: Design an analog filter with the critical frequencies Ὼ 1 and Ὼ 2. A Butterworth filter is used to satisfy the monotonic property and has an order n and critical frequency Ω c as follows n = log[10(3/10) 1/10 (15/10) 1] 2 log(2/4.8282 = 1.9412 = 2 Ω c = 2.000/(10 (3/10) 1) 1/4 = 2 rad/sec. EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 8 / 19
Bilinear Transformation... 6 The normalized low-pass filter with order 2 is H(s) = 1 s 2 + 2s+1 By applying the LP to LP transformation, we get the trasfer function of 1 the analog filter, H a (s) = H(s) s s/2 = s 2 +2 2s+4 Step 3: Apply the bilinear transformation (T = 1) to H a (s) to find the digital filter with system function that will satisfy the given digital requirement. H(z) = H a (s) s [ 2(1 z 1 ) (1+z 1 ) = 1+2z 1 +z 2 3.4142135+0.5857865z 2 ] EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 9 / 19
Bilinear Transformation... 7 EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 10 / 19
Analog Design Using Digital Filters... 1 In some cases, we are required to simulate ana analog filter using A/D H(z) D/A structure. We usually start from set of critical frequencies Ω 1, Ω 2,, Ω N, the corresponding decibel frequency response magnitudes K 1, K 2,, K N and the sampling rate 1/T. The basic approach is to convert the analog requirements into digital ones and do the procedure mentioned before for the digital filter design. The conversion of the analog specifications to digital is done trough the formula ω i = Ω i T EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 11 / 19
Analog Design Using Digital Filters... 2 Ex. Design a digital filter H(z) that when used in A/D H(z) D/A structure gives an equivalent low-pass analog filter with (a) -3dB cutoff frequency of 500 Hz, (b) monotonic stopband and passband (c) magnitude of frequency response down a least 15 db at 750 Hz, (d) sample rate of 2000 samples/sec. The analog specification become Ω 1 = 2πf 1 = 2π500 = π10 3 rad/sec, K 1 = 3dB Ω 2 = 2πf 2 = 2π750 = 1.5π10 3 rad/sec, K 2 = 15dB and the corresponding digital specifications become ω 1 = Ω 1 T = π 10 3 (1/2000) = 0.5π rad ω 2 = Ω 2 T = 1.5π 10 3 (1/2000) = 0.75π rad These are the specification of the last example, hence we get, H(z) = 1+2z 1 +z 2 3.4142135+0.5857865z 2 EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 12 / 19
Digital-to-Digital Transformations... 1 We showed before that any analog filter can be obtained from the normalized low-pass filter by using the analog-to-analog transformation table. Similarly, a set of transformations can be found take a low-pass digital filter and turn it into a high-pass, bandpass, bandstop or another low-pass digital filter. The transformations all take the form of replacing of the z 1 in H(z) by g(z 1 ), some function of z 1. EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 13 / 19
Digital-to-Digital Transformations... 2 Ex. Design a unit bandwidth 3-dB digital butterworth filter of order one by using the conventional bilinear transforation method. Prewarp the ω 1 = 1 rad requirement to get Ὼ = 2 tan(ω/2) = 2 tan(1/2) = 1.09265 Use n = 1 analog butterworth filter as a prototype filter, and apply an analog-to-analog low-pass transformation to get H p (s) H p (s) = 1 1 = s s/1.092605 s+1 Go through the bilinear transformation H(z) = H p (s) [ ] 2(1 z 1 ) s (1+z 1 ) H(z) = 1+z 1 2.8305 0.83052z 1 0.9152438s+1 EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 14 / 19
Digital-to-Digital Transformations... 3 EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 15 / 19
Digital-to-Digital Transformations... 4 Ex. Design a unit bandwidth 3-dB digital butterworth filter of order one by using the low-pass to low-pass digital transforation method. Apply the bilinear transformation directly t H a (s) to get H 1 (z): H 1 (z) = 1 s+1 s [ 2(1 z 1 ) (1+z 1 ) ] = 1+z 1 3 z 1 The critical frequency for the digital filter is warped (T = 1), ω c = 2 tan 1 (ΩT /2) = 2 tan 1 (11/2) = 0.9272952 From table 4.1, Letting ω p = 1 and θ p = 0.9272952, α is determined as follows: Therefore, α = sin[(θp ωp)/2] sin[(θ p+ω p)/2] = 0.04425 H(z) = H 1 (z) z 1 (z 1 +0.04425)/(1+0.04425z 1 ) = 1+z 1 2.8305 0.83052z 1 EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 16 / 19
Digital-to-Digital Transformations... 5 EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 17 / 19
Digital-to-Digital Transformations... 6 For a Butterworth filter, the order can be determined from the same formula used in the analog filter design, by replacing every analog frequency by its corresponding digital frequency, that is n = log[10( K 1 /10) 1/10 ( K 2 /10) 1] 2 log([tan(ω 1 /2)]/[tan(ω 2 /2)]) The critical cutoff frequency is given by ω p = 2 tan 1 [(10 ( K 1/10) 1) 1/2n tan(ω 1 /2)] The required digital low-pass filter is determined from H Bn (z) is given by where α = sin[(θp ωp)/2] sin[(θ p+ω p)/2] H(z) = H Bn (z) z 1 (z 1 α)/(1 αz 1 ) EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 18 / 19
Digital-to-Digital Transformations... 7 Ex. Using digital-to-digital transformation methods, find the system function for a low pass filter that satisfies the following: (a)- monotonic stopband and passband; (b)- 3.01 db cutoff frequency of 0.5π rad; (c)- magnitude down at least 15 db at 0.75π rad. Because of the monotonic behavior, Butterworth filter is selected. log[10 0.30102 1/10 1.5 1] n = 2 log([tan(0.5π/2)]/[tan(0.75π/2)]) = 1.9412 = 2 ω p = 2 tan 1 [(0.30102 1) 1/4 tan(0.5π/2)] = 0.5π α = sin[(1 0.5π)/2] sin[(1+0.5π)/2] =.29341993 H(z) = H B2 (z) z 1 (z 1 +.29341993)/(1+.29341993z 1 H(z) = 1+2z 1 +z 2 3.4142135+0.5857865z 2 EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 19 / 19