EELE 4310: Digital (DSP)

Chapter # 10 : 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

2(1−z−1) H(z) can be obtained from Ha(s) by replacing each s → T (1+z−1) , as follows

H(z) = Ha(s)| h 2(1−z−1) i 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 of the analog filter and digital filter have the same amplitude, there is a nonlinear relationship between corresponding digital and analog frequencies. letting z = ejω and s = jΩ in the bilinear transformation relation gives 2(1−e−jω) 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 {K1, K2, ··· , KN }. To get the proper digital frequencies, we must design an analog filter with analog critical frequencies Ω`i : i = 1, 2, ··· , N given by ` 2 Ωi = 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

` 2 ω1 Ω1 = T tan 2 = 2 tan(0.5π/2) = 2 ` 2 ω2 Ω2 = T tan 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 log[10(3/10)−1/10(15/10)−1] n = d 2 log(2/4.8282 e = d1.9412e = 2 (3/10) 1/4 Ωc = 2.000/(10 − 1) = 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 s2+ 2s+1 By applying the LP to LP transformation, we get the trasfer function of the analog filter, H (s) = H(s)| = √1 a s→s/2 s2+2 2s+4 Step 3: Apply the bilinear transformation (T = 1) to Ha(s) to find the digital filter with system function that will satisfy the given digital requirement.

H(z) = Ha(s)| h 2(1−z−1) i s→ (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 K1, K2, ··· , KN 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

3 Ω1 = 2πf1 = 2π500 = π10 rad/sec, K1 = −3dB 3 Ω2 = 2πf2 = 2π750 = 1.5π10 rad/sec, K2 = −15dB and the corresponding digital specifications become

3 ω1 = Ω1T = π × 10 × (1/2000) = 0.5π rad 3 ω2 = Ω2T = 1.5π × 10 × (1/2000) = 0.75π rad These are the specification of the last example, hence we get, 1+2z−1+z−2 H(z) = 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 Hp(s)

1 1 Hp(s) = = s+1 s→s/1.092605 0.9152438s+1 Go through the bilinear transformation

H(z) = Hp(s)| h 2(1−z−1) i s→ (1+z−1) 1+z−1 H(z) = 2.8305−0.83052z−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 Ha(s) to get H1(z):

1 1+z−1 H1(z) = h −1 i = −1 s+1 s→ 2(1−z ) 3−z (1+z−1) The critical frequency for the digital filter is warped (T = 1),

−1 −1 ωc = 2 tan (ΩT /2) = 2 tan (11/2) = 0.9272952

From table 4.1, Letting ωp = 1 and θp = 0.9272952, α is determined as follows:

α = sin[(θp−ωp)/2] = −0.04425 sin[(θp+ωp)/2] Therefore,

1+z−1 H(z) = H1(z)|z−1→(z−1+0.04425)/(1+0.04425z−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 (−K /10) (−K /10) n = d log[10 1 −1/10 2 −1] e 2 log([tan(ω1/2)]/[tan(ω2/2)]) The critical cutoff frequency is given by −1 (−K /10) −1/2n ωp = 2 tan [(10 1 − 1) tan(ω1/2)]

The required digital low-pass filter is determined from HBn (z) is given by

H(z) = HBn (z)|z−1→(z−1−α)/(1−αz−1) where α = sin[(θp−ωp)/2] sin[(θp+ωp)/2]

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[100.30102−1/101.5−1] n = d 2 log([tan(0.5π/2)]/[tan(0.75π/2)]) e = d1.9412e = 2

−1 −1/4 ωp = 2 tan [(0.30102 − 1) tan(0.5π/2)] = 0.5π

sin[(1−0.5π)/2] α = sin[(1+0.5π)/2] = −.29341993

H(z) = HB2 (z)|z−1→(z−1+.29341993)/(1+.29341993z−1

1+2z−1+z−2 H(z) = 3.4142135+0.5857865z−2 EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 19 / 19