EELE 4310: Digital Signal Processing...

19
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

Transcript of EELE 4310: Digital Signal Processing...

Page 1: EELE 4310: Digital Signal Processing (DSP)10mmsite.iugaza.edu.ps/musbahshaat/files/chapter10_handout_A.pdfdigital lter and turn it into a high-pass, bandpass, bandstop or another low-pass

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

Page 2: EELE 4310: Digital Signal Processing (DSP)10mmsite.iugaza.edu.ps/musbahshaat/files/chapter10_handout_A.pdfdigital lter and turn it into a high-pass, bandpass, bandstop or another low-pass

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

Page 3: EELE 4310: Digital Signal Processing (DSP)10mmsite.iugaza.edu.ps/musbahshaat/files/chapter10_handout_A.pdfdigital lter and turn it into a high-pass, bandpass, bandstop or another low-pass

Introduction

A discrete-time filter takes a discrete-time input sequence x(n) andproduces a discrete-time output sequence y(n).

To simulate an analog filter, the discrete-time filter is used in theanalog-to-digital-H(z)-digital-to-analog structure.

Digital filter design techniques:1- The bilinear transformation method, 2- The digital to digitaltransformation, 3- The impulse invariant approach.

EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 3 / 19

Page 4: EELE 4310: Digital Signal Processing (DSP)10mmsite.iugaza.edu.ps/musbahshaat/files/chapter10_handout_A.pdfdigital lter and turn it into a high-pass, bandpass, bandstop or another low-pass

Bilinear Transformation ... 1

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

,

as follows

H(z) = Ha(s)|s→

[2(1−z−1)

T (1+z−1)

]The left half plane of the s-plane is transformed inside the unitcircuit, therefore a stable analog filter would be transformed into astable digital filter.

While the frequency response of the analog filter and digital filterhave the same amplitude, there is a nonlinear relationship betweencorresponding digital and analog frequencies.

letting z = e jω and s = jΩ in the bilinear transformation relationgives

jΩ = 2(1−e−jω)T (1+e−jω)

EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 4 / 19

Page 5: EELE 4310: Digital Signal Processing (DSP)10mmsite.iugaza.edu.ps/musbahshaat/files/chapter10_handout_A.pdfdigital lter and turn it into a high-pass, bandpass, bandstop or another low-pass

Bilinear Transformation ... 2

Dividing both sides by j and rearrange the terms, we get

Ω = 2T 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 ofcritical frequencies ω1, ω2, · · · , ωN and a corresponding set ofmagnitude requirements K1,K2, · · · ,KN.To get the proper digital frequencies, we must design an analogfilter with analog critical frequencies Ωi : i = 1, 2, · · · ,N given by

Ωi = 2T 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 eachother, 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

Page 6: EELE 4310: Digital Signal Processing (DSP)10mmsite.iugaza.edu.ps/musbahshaat/files/chapter10_handout_A.pdfdigital lter and turn it into a high-pass, bandpass, bandstop or another low-pass

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 thedesign. To simplify the analysis we can select T = 1.

EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 6 / 19

Page 7: EELE 4310: Digital Signal Processing (DSP)10mmsite.iugaza.edu.ps/musbahshaat/files/chapter10_handout_A.pdfdigital lter and turn it into a high-pass, bandpass, bandstop or another low-pass

Bilinear Transformation ... 4

EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 7 / 19

Page 8: EELE 4310: Digital Signal Processing (DSP)10mmsite.iugaza.edu.ps/musbahshaat/files/chapter10_handout_A.pdfdigital lter and turn it into a high-pass, bandpass, bandstop or another low-pass

Bilinear Transformation ... 5

Ex. Design a digital low-pass filter using the bilinear transformationmethod to satisfy the following characteristics:(a)- monotonicstopband 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 = 2T tan ω1

2 = 2 tan(0.5π/2) = 2

Ω2 = 2T 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 anorder n and critical frequency Ωc as follows

n = d log[10(3/10)−1/10(15/10)−1]2 log(2/4.8282 e = d1.9412e = 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

Page 9: EELE 4310: Digital Signal Processing (DSP)10mmsite.iugaza.edu.ps/musbahshaat/files/chapter10_handout_A.pdfdigital lter and turn it into a high-pass, bandpass, bandstop or another low-pass

Bilinear Transformation ... 6

The normalized low-pass filter with order 2 is

H(s) = 1s2+√2s+1

By applying the LP to LP transformation, we get the trasfer function ofthe analog filter, Ha(s) = H(s)|s→s/2 = 1

s2+2√2s+4

Step 3: Apply the bilinear transformation (T = 1) to Ha(s) to find thedigital filter with system function that will satisfy the given digitalrequirement.H(z) = Ha(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

Page 10: EELE 4310: Digital Signal Processing (DSP)10mmsite.iugaza.edu.ps/musbahshaat/files/chapter10_handout_A.pdfdigital lter and turn it into a high-pass, bandpass, bandstop or another low-pass

Bilinear Transformation ... 7

EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 10 / 19

Page 11: EELE 4310: Digital Signal Processing (DSP)10mmsite.iugaza.edu.ps/musbahshaat/files/chapter10_handout_A.pdfdigital lter and turn it into a high-pass, bandpass, bandstop or another low-pass

Analog Design Using Digital Filters ... 1

In some cases, we are required to simulate ana analog filter usingA/D − H(z)− D/A structure.

We usually start from set of critical frequencies Ω1,Ω2, · · · ,ΩN , thecorresponding decibel frequency response magnitudesK1,K2, · · · ,KN and the sampling rate 1/T .

The basic approach is to convert the analog requirements intodigital ones and do the procedure mentioned before for the digitalfilter design.

The conversion of the analog specifications to digital is done troughthe formula ωi = ΩiT

EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 11 / 19

Page 12: EELE 4310: Digital Signal Processing (DSP)10mmsite.iugaza.edu.ps/musbahshaat/files/chapter10_handout_A.pdfdigital lter and turn it into a high-pass, bandpass, bandstop or another low-pass

Analog Design Using Digital Filters ... 2

Ex. Design a digital filter H(z) that when used inA/D − H(z)− D/A structure gives an equivalent low-pass analogfilter with (a) -3dB cutoff frequency of 500 Hz, (b) monotonicstopband and passband (c) magnitude of frequency response down aleast 15 dB at 750 Hz, (d) sample rate of 2000 samples/sec.

The analog specification become

Ω1 = 2πf1 = 2π500 = π103 rad/sec, K1 = −3dBΩ2 = 2πf2 = 2π750 = 1.5π103 rad/sec, K2 = −15dB

and the corresponding digital specifications become

ω1 = Ω1T = π × 103 × (1/2000) = 0.5π radω2 = Ω2T = 1.5π × 103 × (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

Page 13: EELE 4310: Digital Signal Processing (DSP)10mmsite.iugaza.edu.ps/musbahshaat/files/chapter10_handout_A.pdfdigital lter and turn it into a high-pass, bandpass, bandstop or another low-pass

Digital-to-Digital Transformations ... 1

We showed before that any analog filter can be obtained from thenormalized low-pass filter by using the analog-to-analogtransformation table.

Similarly, a set of transformations can be found take a low-passdigital filter and turn it into a high-pass, bandpass, bandstop oranother low-pass digital filter.

The transformations all take the form of replacing of the z−1 inH(z) by g(z−1), some function of z−1.

EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 13 / 19

Page 14: EELE 4310: Digital Signal Processing (DSP)10mmsite.iugaza.edu.ps/musbahshaat/files/chapter10_handout_A.pdfdigital lter and turn it into a high-pass, bandpass, bandstop or another low-pass

Digital-to-Digital Transformations ... 2

Ex. Design a unit bandwidth 3-dB digital butterworth filter of orderone 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 ananalog-to-analog low-pass transformation to get Hp(s)

Hp(s) = 1s+1

∣∣∣s→s/1.092605

= 10.9152438s+1

Go through the bilinear transformation

H(z) = Hp(s)|s→

[2(1−z−1)

(1+z−1)

]H(z) = 1+z−1

2.8305−0.83052z−1

EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 14 / 19

Page 15: EELE 4310: Digital Signal Processing (DSP)10mmsite.iugaza.edu.ps/musbahshaat/files/chapter10_handout_A.pdfdigital lter and turn it into a high-pass, bandpass, bandstop or another low-pass

Digital-to-Digital Transformations ... 3

EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 15 / 19

Page 16: EELE 4310: Digital Signal Processing (DSP)10mmsite.iugaza.edu.ps/musbahshaat/files/chapter10_handout_A.pdfdigital lter and turn it into a high-pass, bandpass, bandstop or another low-pass

Digital-to-Digital Transformations ... 4

Ex. Design a unit bandwidth 3-dB digital butterworth filter of orderone by using the low-pass to low-pass digital transforation method.

Apply the bilinear transformation directly t Ha(s) to get H1(z):

H1(z) = 1s+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 asfollows:

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

= −0.04425

Therefore,

H(z) = H1(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

Page 17: EELE 4310: Digital Signal Processing (DSP)10mmsite.iugaza.edu.ps/musbahshaat/files/chapter10_handout_A.pdfdigital lter and turn it into a high-pass, bandpass, bandstop or another low-pass

Digital-to-Digital Transformations ... 5

EELE 4310: Digital Signal Processing (DSP) - Ch.10 Dr. Musbah Shaat 17 / 19

Page 18: EELE 4310: Digital Signal Processing (DSP)10mmsite.iugaza.edu.ps/musbahshaat/files/chapter10_handout_A.pdfdigital lter and turn it into a high-pass, bandpass, bandstop or another low-pass

Digital-to-Digital Transformations ... 6

For a Butterworth filter, the order can be determined from the sameformula used in the analog filter design, by replacing every analogfrequency by its corresponding digital frequency, that is

n = d log[10(−K1/10)−1/10(−K2/10)−1]

2 log([tan(ω1/2)]/[tan(ω2/2)])e

The critical cutoff frequency is given by

ωp = 2 tan−1[(10(−K1/10) − 1)−1/2n tan(ω1/2)]

The required digital low-pass filter is determined from HBn(z) isgiven 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

Page 19: EELE 4310: Digital Signal Processing (DSP)10mmsite.iugaza.edu.ps/musbahshaat/files/chapter10_handout_A.pdfdigital lter and turn it into a high-pass, bandpass, bandstop or another low-pass

Digital-to-Digital Transformations ... 7

Ex. Using digital-to-digital transformation methods, find the systemfunction for a low pass filter that satisfies the following: (a)-monotonic stopband and passband; (b)- −3.01 dB cutoff frequencyof 0.5π rad; (c)- magnitude down at least 15 dB at 0.75π rad.

Because of the monotonic behavior, Butterworth filter is selected.

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