digital filter design - catholic university of...

55
1 Copyright © 2001, S. K. Mitra Digital Filter Design Digital Filter Design • Objective - Determination of a realizable transfer function G(z) approximating a given frequency response specification is an important step in the development of a digital filter If an IIR filter is desired, G(z) should be a stable real rational function Digital filter design is the process of deriving the transfer function G(z)

Upload: vuliem

Post on 31-Jan-2018

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

1Copyright © 2001, S. K. Mitra

Digital Filter DesignDigital Filter Design

• Objective - Determination of a realizabletransfer function G(z) approximating agiven frequency response specification is animportant step in the development of adigital filter

• If an IIR filter is desired, G(z) should be astable real rational function

• Digital filter design is the process ofderiving the transfer function G(z)

Page 2: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

2Copyright © 2001, S. K. Mitra

Digital Filter SpecificationsDigital Filter Specifications• Usually, either the magnitude and/or the

phase (delay) response is specified for thedesign of digital filter for most applications

• In some situations, the unit sample responseor the step response may be specified

• In most practical applications, the problemof interest is the development of a realizableapproximation to a given magnituderesponse specification

Page 3: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

3Copyright © 2001, S. K. Mitra

Digital Filter SpecificationsDigital Filter Specifications• We discuss in this course only the

magnitude approximation problem• There are four basic types of ideal filters

with magnitude responses as shown below

1

0 c – c

HLP(e j )

0 c – c

1

HHP(e j )

11–

– c1 c1 – c2 c2

HBP (e j )

1

– c1 c1 – c2 c2

HBS(e j )

Page 4: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

4Copyright © 2001, S. K. Mitra

Digital Filter SpecificationsDigital Filter Specifications• As the impulse response corresponding to

each of these ideal filters is noncausal andof infinite length, these filters are notrealizable

• In practice, the magnitude responsespecifications of a digital filter in thepassband and in the stopband are given withsome acceptable tolerances

• In addition, a transition band is specifiedbetween the passband and stopband

Page 5: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

5Copyright © 2001, S. K. Mitra

Digital Filter SpecificationsDigital Filter Specifications• For example, the magnitude response

of a digital lowpass filter may be given asindicated below

)( ωjeG

Page 6: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

6Copyright © 2001, S. K. Mitra

Digital Filter SpecificationsDigital Filter Specifications• As indicated in the figure, in the passband,

defined by , we require that with an error , i.e.,

• In the stopband, defined by , werequire that with an error ,i.e.,

1)( ≅ωjeG

0)( ≅ωjeG sδ

pδ±pω≤ω≤0

π≤ω≤ωs

ppj

p eG ω≤ωδ+≤≤δ− ω ,1)(1

π≤ω≤ωδ≤ωss

jeG ,)(

Page 7: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

7Copyright © 2001, S. K. Mitra

Digital Filter SpecificationsDigital Filter Specifications• - passband edge frequency• - stopband edge frequency• - peak ripple value in the passband• - peak ripple value in the stopband• Since is a periodic function of ω,

and of a real-coefficient digitalfilter is an even function of ω

• As a result, filter specifications are givenonly for the frequency range

sδpδ

)( ωjeG)( ωjeG

π≤ω≤0

Page 8: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

8Copyright © 2001, S. K. Mitra

Digital Filter SpecificationsDigital Filter Specifications

• Specifications are often given in terms ofloss function A indB

• Peak passband ripple dB• Minimum stopband attenuation dB

)(log20)( 10ω−=ω jeG

)1(log20 10 pp δ−−=α

)(log20 10 ss δ−=α

Page 9: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

9Copyright © 2001, S. K. Mitra

Digital Filter SpecificationsDigital Filter Specifications• Magnitude specifications may alternately be

given in a normalized form as indicatedbelow

Page 10: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

10Copyright © 2001, S. K. Mitra

Digital Filter SpecificationsDigital Filter Specifications• Here, the maximum value of the magnitude

in the passband is assumed to be unity

• - Maximum passband deviation,given by the minimum value of themagnitude in the passband

• - Maximum stopband magnitudeA1

21/1 ε+

Page 11: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

11Copyright © 2001, S. K. Mitra

Digital Filter SpecificationsDigital Filter Specifications

• For the normalized specification, maximumvalue of the gain function or the minimumvalue of the loss function is 0 dB

• Maximum passband attenuation - dB• For , it can be shown that dB

( )210max 1log20 ε+=α

1<<δ p)21(log20 10max pδ−−≅α

Page 12: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

12Copyright © 2001, S. K. Mitra

Digital Filter SpecificationsDigital Filter Specifications• In practice, passband edge frequency

and stopband edge frequency arespecified in Hz

• For digital filter design, normalizedbandedge frequencies need to be computedfrom specifications in Hz using

TFF

FF p

T

p

T

pp π=

π=

Ω=ω 2

2

TFF

FF s

T

s

T

ss π=

π=

Ω=ω 22

sFpF

Page 13: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

13Copyright © 2001, S. K. Mitra

Digital Filter SpecificationsDigital Filter Specifications

• Example - Let kHz, kHz, andkHz

• Then

7=pF 3=sF25=TF

π=××π=ω 56.01025

)107(23

3

p

π=××π=ω 24.01025

)103(23

3

s

Page 14: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

14Copyright © 2001, S. K. Mitra

• The transfer function H(z) meeting thefrequency response specifications should bea causal transfer function

• For IIR digital filter design, the IIR transferfunction is a real rational function of :

• H(z) must be a stable transfer function andmust be of lowest order N for reducedcomputational complexity

Selection of Filter TypeSelection of Filter Type

1−z

NMzdzdzddzpzpzppzH N

N

MM ≤

++++++++= −−−

−−−,)( 2

21

10

22

110

L

L

Page 15: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

15Copyright © 2001, S. K. Mitra

Selection of Filter TypeSelection of Filter Type• For FIR digital filter design, the FIR

transfer function is a polynomial inwith real coefficients:

• For reduced computational complexity,degree N of H(z) must be as small aspossible

• If a linear phase is desired, the filtercoefficients must satisfy the constraint:

∑==

−N

n

nznhzH0

][)(

][][ nNhnh −±=

1−z

Page 16: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

16Copyright © 2001, S. K. Mitra

Selection of Filter TypeSelection of Filter Type• Advantages in using an FIR filter -

(1) Can be designed with exact linear phase,(2) Filter structure always stable withquantized coefficients

• Disadvantages in using an FIR filter - Orderof an FIR filter, in most cases, isconsiderably higher than the order of anequivalent IIR filter meeting the samespecifications, and FIR filter has thus highercomputational complexity

Page 17: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

17Copyright © 2001, S. K. Mitra

Digital Filter Design:Digital Filter Design:Basic ApproachesBasic Approaches

• Most common approach to IIR filter design -(1) Convert the digital filter specificationsinto an analog prototype lowpass filterspecifications

• (2) Determine the analog lowpass filtertransfer function

• (3) Transform into the desired digitaltransfer function

)(sHa

)(zG)(sHa

Page 18: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

18Copyright © 2001, S. K. Mitra

Digital Filter Design:Digital Filter Design:Basic ApproachesBasic Approaches

• This approach has been widely used for thefollowing reasons:(1) Analog approximation techniques arehighly advanced(2) They usually yield closed-formsolutions(3) Extensive tables are available foranalog filter design(4) Many applications require digitalsimulation of analog systems

Page 19: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

19Copyright © 2001, S. K. Mitra

Digital Filter Design:Digital Filter Design:Basic ApproachesBasic Approaches

• An analog transfer function to be denoted as

where the subscript “a” specificallyindicates the analog domain

• A digital transfer function derived fromshall be denoted as

)()()( sD

sPsHa

aa =

)()()( zD

zPzG =

)(sHa

Page 20: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

20Copyright © 2001, S. K. Mitra

Digital Filter Design:Digital Filter Design:Basic ApproachesBasic Approaches

• Basic idea behind the conversion ofinto is to apply a mapping from thes-domain to the z-domain so that essentialproperties of the analog frequency responseare preserved

• Thus mapping function should be such that– Imaginary ( ) axis in the s-plane be

mapped onto the unit circle of the z-plane– A stable analog transfer function be mapped

into a stable digital transfer function

)(sHa)(zG

Ωj

Page 21: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

21Copyright © 2001, S. K. Mitra

Digital Filter Design:Digital Filter Design:Basic ApproachesBasic Approaches

• FIR filter design is based on a directapproximation of the specified magnituderesponse, with the often added requirementthat the phase be linear

• The design of an FIR filter of order N maybe accomplished by finding either thelength-(N+1) impulse response samplesor the (N+1) samples of its frequencyresponse

][nh

)( ωjeH

Page 22: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

22Copyright © 2001, S. K. Mitra

Digital Filter Design:Digital Filter Design:Basic ApproachesBasic Approaches

• Three commonly used approaches to FIRfilter design -(1) Windowed Fourier series approach(2) Frequency sampling approach(3) Computer-based optimization methods

Page 23: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

23Copyright © 2001, S. K. Mitra

IIR Digital Filter Design: BilinearIIR Digital Filter Design: BilinearTransformation MethodTransformation Method

• Bilinear transformation -

• Above transformation maps a single pointin the s-plane to a unique point in thez-plane and vice-versa

• Relation between G(z) and is thengiven by

+−= −

1

1

112

zz

Ts

)(sHa

−+

−−==

11

112)()(z

zTsa sHzG

Page 24: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

24Copyright © 2001, S. K. Mitra

Bilinear TransformationBilinear Transformation• Digital filter design consists of 3 steps:

(1) Develop the specifications of byapplying the inverse bilinear transformationto specifications of G(z)(2) Design(3) Determine G(z) by applying bilineartransformation to

• As a result, the parameter T has no effect onG(z) and T = 2 is chosen for convenience

)(sHa

)(sHa

)(sHa

Page 25: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

25Copyright © 2001, S. K. Mitra

Bilinear TransformationBilinear Transformation• Inverse bilinear transformation for T = 2 is

• For

• Thus,

ssz −

+= 11

oo js Ω+σ=

22

222

)1()1(

)1()1(

oo

oo

oo

oo zjjz

Ω+σ−Ω+σ+=⇒

Ω−σ−Ω+σ+=

10 =→=σ zo

10 <→<σ zo

10 >→>σ zo

Page 26: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

26Copyright © 2001, S. K. Mitra

Bilinear TransformationBilinear Transformation

• Mapping of s-plane into the z-plane

Page 27: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

27Copyright © 2001, S. K. Mitra

Bilinear TransformationBilinear Transformation• For with T = 2 we have

or

)()(

11

2/2/2/

2/2/2/

ω−ωω−

ω−ωω−

ω−

ω−

+−=

+−=Ω jjj

jjj

j

j

eeeeee

eej

ω= jez

)2/tan(ω=Ω)2/tan(2

)2/cos(2)2/sin(2 ω=

ωω= jj

Page 28: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

28Copyright © 2001, S. K. Mitra

Bilinear TransformationBilinear Transformation• Mapping is highly nonlinear• Complete negative imaginary axis in the s-

plane from to is mapped intothe lower half of the unit circle in the z-planefrom to

• Complete positive imaginary axis in the s-plane from to is mapped into theupper half of the unit circle in the z-planefrom to

−∞=Ω 0=Ω

0=Ω ∞=Ω

1−=z 1=z

1=z 1−=z

Page 29: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

29Copyright © 2001, S. K. Mitra

Bilinear TransformationBilinear Transformation• Nonlinear mapping introduces a distortion

in the frequency axis called frequencywarping

• Effect of warping shown below

Page 30: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

30Copyright © 2001, S. K. Mitra

Bilinear TransformationBilinear Transformation• Steps in the design of a digital filter -

(1) Prewarp to find their analogequivalents(2) Design the analog filter(3) Design the digital filter G(z) by applyingbilinear transformation to

• Transformation can be used only to designdigital filters with prescribed magnituderesponse with piecewise constant values

• Transformation does not preserve phaseresponse of analog filter

),( sp ωω),( sp ΩΩ

)(sHa

)(sHa

Page 31: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

31Copyright © 2001, S. K. Mitra

IIR Digital Filter Design UsingIIR Digital Filter Design UsingBilinear TransformationBilinear Transformation

• Example - Consider

• Applying bilinear transformation to the abovewe get the transfer function of a first-orderdigital lowpass Butterworth filter

c

ca s

sHΩ+

Ω=)(

)1()1()1()()( 11

1

11

11 −−

−+

−−= +Ω+−+Ω==

zzzsHzGc

c

zzsa

Page 32: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

32Copyright © 2001, S. K. Mitra

IIR Digital Filter Design UsingIIR Digital Filter Design UsingBilinear TransformationBilinear Transformation

• Rearranging terms we get

where

1

1

11

21)( −

−+⋅−=

zzzGα

α

)2/tan(1)2/tan(1

11

c

c

c

cω+ω−

=Ω+Ω−

Page 33: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

33Copyright © 2001, S. K. Mitra

IIR Digital Filter Design UsingIIR Digital Filter Design UsingBilinear TransformationBilinear Transformation

• Example - Consider the second-order analognotch transfer function

for which

• is called the notch frequency• If then

is the 3-dB notch bandwidth

22

22)(

o

oa sBs

ssHΩ++

Ω+=

0)( =Ωoa jH1)()0( =∞= jHjH aa

oΩ2/1)()( 12 =Ω=Ω jHjH aa

12 Ω−Ω=B

Page 34: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

34Copyright © 2001, S. K. Mitra

IIR Digital Filter Design UsingIIR Digital Filter Design UsingBilinear TransformationBilinear Transformation

• Then

where

1

1

11)()(

+−=

=zzsa sHzG

22122

22122

)1()1(2)1()1()1(2)1(

−−

−−

−Ω++Ω−−+Ω+Ω++Ω−−Ω+=

zBzBzz

ooo

ooo

21

21

)1(2121

21

−−

−−

++−+−⋅+=

zzzzααβ

βα

oo

o ω=Ω+Ω−=β cos

11

2

2)2/tan(1)2/tan(1

11

2

2

w

w

o

oBB

BB

+−=

+Ω+−Ω+=α

Page 35: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

35Copyright © 2001, S. K. Mitra

IIR Digital Filter Design UsingIIR Digital Filter Design UsingBilinear TransformationBilinear Transformation

• Example - Design a 2nd-order digital notchfilter operating at a sampling rate of 400 Hzwith a notch frequency at 60 Hz, 3-dB notchbandwidth of 6 Hz

• Thus

• From the above values we get

π=π=ω 3.0)400/60(2oπ=π= 03.0)400/6(2wB

90993.0=α

587785.0=β

Page 36: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

36Copyright © 2001, S. K. Mitra

IIR Digital Filter Design UsingIIR Digital Filter Design UsingBilinear TransformationBilinear Transformation

• Thus

• The gain and phase responses are shown below

21

21

90993.01226287.11954965.01226287.1954965.0)( −−

−−

+−+−=

zzzzzG

0 50 100 150 200-40

-30

-20

-10

0

Frequency, Hz

Gai

n, d

B

0 50 100 150 200-2

-1

0

1

2

Frequency, Hz

Pha

se, r

adia

ns

Page 37: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

37Copyright © 2001, S. K. Mitra

IIR IIR LowpassLowpass Digital Filter Design Digital Filter DesignUsing Bilinear TransformationUsing Bilinear Transformation

• Example - Design a lowpass Butterworthdigital filter with , ,

dB, and dB• Thus

• If this implies

π=ω 25.0p π=ω 55.0s15≥αs5.0≤α p

5.0)(log20 25.010 −≥πjeG

15)(log20 55.010 −≤πjeG

1)( 0 =jeG1220185.02 =ε 622777.312 =A

Page 38: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

38Copyright © 2001, S. K. Mitra

IIRIIR Lowpass Lowpass Digital Filter Design Digital Filter DesignUsing Bilinear TransformationUsing Bilinear Transformation

• Prewarping we get

• The inverse transition ratio is

• The inverse discrimination ratio is

4142136.0)2/25.0tan()2/tan( =π=ω=Ω pp

1708496.1)2/55.0tan()2/tan( =π=ω=Ω ss

8266809.21 =ΩΩ=

p

sk

841979.1511 2

1=

ε−= A

k

Page 39: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

39Copyright © 2001, S. K. Mitra

IIRIIR Lowpass Lowpass Digital Filter Design Digital Filter DesignUsing Bilinear TransformationUsing Bilinear Transformation

• Thus

• We choose N = 3• To determine we use

6586997.2)/1(log)/1(log

10

110 ==kkN

222

11

)/(11)(

ε+=

ΩΩ+=Ω N

cppa jH

Page 40: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

40Copyright © 2001, S. K. Mitra

IIRIIR Lowpass Lowpass Digital Filter Design Digital Filter DesignUsing Bilinear TransformationUsing Bilinear Transformation

• We then get

• 3rd-order lowpass Butterworth transferfunction for is

• Denormalizing to get wearrive at

588148.0)(419915.1 =Ω=Ω pc

1=Ωc

)1)(1(1)( 2 +++

=sss

sHan

=

588148.0)( sHsH ana

588148.0=Ωc

Page 41: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

41Copyright © 2001, S. K. Mitra

IIRIIR Lowpass Lowpass Digital Filter Design Digital Filter DesignUsing Bilinear TransformationUsing Bilinear Transformation

• Applying bilinear transformation towe get the desired digital transfer function

• Magnitude and gain responses of G(z) shownbelow:

)(sHa

1

1

11)()(

+−=

=zzsa sHzG

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

ω/π

Mag

nitu

de

0 0.2 0.4 0.6 0.8 1-40

-30

-20

-10

0

ω/π

Gai

n, d

B

Page 42: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

42Copyright © 2001, S. K. Mitra

Design of IIR Design of IIR HighpassHighpass, , BandpassBandpass,,and and BandstopBandstop Digital Filters Digital Filters

• First Approach -(1) Prewarp digital frequency specificationsof desired digital filter to arrive atfrequency specifications of analog filterof same type(2) Convert frequency specifications ofinto that of prototype analog lowpass filter

(3) Design analog lowpass filter

)(zGD)(sHD

)(sHD

)(sHLP

)(sHLP

Page 43: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

43Copyright © 2001, S. K. Mitra

Design of IIRDesign of IIR Highpass Highpass,, Bandpass Bandpass,,andand Bandstop Bandstop Digital Filters Digital Filters

(4) Convert into usinginverse frequency transformation used inStep 2(5) Design desired digital filter byapplying bilinear transformation to

)(sHLP )(sHD

)(zGD)(sHD

Page 44: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

44Copyright © 2001, S. K. Mitra

Design of IIRDesign of IIR Highpass Highpass,, Bandpass Bandpass,,andand Bandstop Bandstop Digital Filters Digital Filters

• Second Approach -(1) Prewarp digital frequency specificationsof desired digital filter to arrive atfrequency specifications of analog filterof same type(2) Convert frequency specifications ofinto that of prototype analog lowpass filter

)(zGD)(sHD

)(sHLP

)(sHD

Page 45: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

45Copyright © 2001, S. K. Mitra

Design of IIRDesign of IIR Highpass Highpass,, Bandpass Bandpass,,andand Bandstop Bandstop Digital Filters Digital Filters

(3) Design analog lowpass filter(4) Convert into an IIR digitaltransfer function using bilineartransformation(5) Transform into the desireddigital transfer function

• We illustrate the first approach

)(sHLP

)(sHLP)(zGLP

)(zGLP)(zGD

Page 46: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

46Copyright © 2001, S. K. Mitra

IIRIIR Highpass Highpass Digital Filter Design Digital Filter Design• Design of a Type 1 Chebyshev IIR digital

highpass filter• Specifications: Hz, Hz,

dB, dB, kHz• Normalized angular bandedge frequencies

700=pF 500=sF2=TF1=α p 32=αs

π=×π=π

=ω 7.02000

70022

T

pp F

F

π=×π

=ω 5.02000

50022T

ss F

F

Page 47: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

47Copyright © 2001, S. K. Mitra

IIRIIR Highpass Highpass Digital Filter Design Digital Filter Design• Prewarping these frequencies we get

• For the prototype analog lowpass filter choose

• Using we get• Analog lowpass filter specifications: ,

, dB, dB

ΩΩΩ

−=Ω ˆˆ pp

1=Ω p

962105.1=Ωs

9626105.1)2/tan(ˆ =ω=Ω pp

0.1)2/tan(ˆ =ω=Ω ss

1=Ω p

926105.1=Ωs 1=α p 32=αs

Page 48: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

48Copyright © 2001, S. K. Mitra

IIRIIR Highpass Highpass Digital Filter Design Digital Filter Design• MATLAB code fragments used for the design

[N, Wn] = cheb1ord(1, 1.9626105, 1, 32, ’s’)[B, A] = cheby1(N, 1, Wn, ’s’);[BT, AT] = lp2hp(B, A, 1.9626105);[num, den] = bilinear(BT, AT, 0.5);

0 0.2 0.4 0.6 0.8 1-50

-40

-30

-20

-10

0

ω/π

Gai

n, d

B

Page 49: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

49Copyright © 2001, S. K. Mitra

IIR IIR BandpassBandpass Digital Filter Design Digital Filter Design• Design of a Butterworth IIR digital bandpass

filter• Specifications: , ,

, , dB, dB• Prewarping we get

π=ω 45.01p π=ω 65.02p

π=ω 75.02sπ=ω 3.01s 1=α p 40=αs

8540807.0)2/tan(ˆ 11 =ω=Ω pp

6318517.1)2/tan(ˆ 22 =ω=Ω pp

41421356.2)2/tan(ˆ 22 =ω=Ω ss

5095254.0)2/tan(ˆ 11 =ω=Ω ss

Page 50: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

50Copyright © 2001, S. K. Mitra

IIR IIR Bandpass Bandpass Digital Filter DesignDigital Filter Design• Width of passband

• We therefore modify so that and exhibit geometric symmetry with

respect to• We set• For the prototype analog lowpass filter we

choose

777771.0ˆˆ 12 =Ω−Ω= ppwB393733.1ˆˆˆ 21

2 =ΩΩ=Ω ppo2

21 ˆ23010325.1ˆˆ oss Ω≠=ΩΩ1ˆ sΩ

2ˆ sΩ1ˆ sΩ

2ˆ oΩ5773031.0ˆ 1 =Ωs

1=Ω p

Page 51: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

51Copyright © 2001, S. K. Mitra

IIRIIR Bandpass Bandpass Digital Filter Design Digital Filter Design

• Using we get

• Specifications of prototype analogButterworth lowpass filter:

, , dB, dB

w

op BΩ

Ω−ΩΩ−=Ω ˆ

ˆˆ 22

3617627.2777771.05773031.0

3332788.0393733.1 =×−=Ωs

1=Ω p 3617627.2=Ωs 1=α p40=αs

Page 52: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

52Copyright © 2001, S. K. Mitra

IIRIIR Bandpass Bandpass Digital Filter Design Digital Filter Design• MATLAB code fragments used for the design

[N, Wn] = buttord(1, 2.3617627, 1, 40, ’s’)[B, A] = butter(N, Wn, ’s’);[BT, AT] = lp2bp(B, A, 1.1805647, 0.777771);[num, den] = bilinear(BT, AT, 0.5);

0 0.2 0.4 0.6 0.8 1-50

-40

-30

-20

-10

0

ω/π

Gai

n, d

B

Page 53: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

53Copyright © 2001, S. K. Mitra

IIR IIR BandstopBandstop Digital Filter Design Digital Filter Design• Design of an elliptic IIR digital bandstop filter• Specifications: , ,

, , dB, dB• Prewarping we get

• Width of stopband

π=ω 45.01s π=ω 65.02sπ=ω 75.02pπ=ω 3.01p 1=α p 40=αs

,8540806.0ˆ 1 =Ωs ,6318517.1ˆ 2 =Ωs

,5095254.0ˆ 1 =Ω p 4142136.2ˆ 2 =Ω p777771.0ˆˆ 12 =Ω−Ω= sswB

393733.1ˆˆˆ 122 =ΩΩ=Ω sso

212 ˆ230103.1ˆˆ opp Ω≠=ΩΩ

Page 54: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

54Copyright © 2001, S. K. Mitra

IIRIIR Bandstop Bandstop Digital Filter Design Digital Filter Design• We therefore modify so that and

exhibit geometric symmetry with respect to

• We set• For the prototype analog lowpass filter we

choose• Using we get

1ˆ pΩ 1ˆ pΩ 2ˆ pΩ

2ˆ oΩ

577303.0ˆ 1 =Ω p

1=Ωs

22 ˆˆˆ

Ω−ΩΩΩ=Ωo

ws

B

0.42341263332787.0393733.1

777771.05095254.0 =−×=Ω p

Page 55: Digital Filter Design - Catholic University of Americasip.cua.edu/res/docs/courses/ee515/chapter07/ch7-1.pdf · design of digital filter for most applications • In some situations,

55Copyright © 2001, S. K. Mitra

IIRIIR Bandstop Bandstop Digital Filter Design Digital Filter Design• MATLAB code fragments used for the design

[N, Wn] = ellipord(0.4234126, 1, 1, 40, ’s’);[B, A] = ellip(N, 1, 40, Wn, ’s’);[BT, AT] = lp2bs(B, A, 1.1805647, 0.777771);[num, den] = bilinear(BT, AT, 0.5);

0 0.2 0.4 0.6 0.8 1-50

-40

-30

-20

-10

0

ω/π

Gai

n, d

B