59
Part 1: FIR Filters – Window Method Tutorial ISCAS 2007 Copyright © 2007 Andreas Antoniou Victoria, BC, Canada Email: [email protected] July 24, 2007 Frame # 1 Slide # 1 A. Antoniou Part 1: FIR Filters – Window Method

Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Embed Size (px)

Citation preview

Page 1: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Part 1: FIR Filters – Window Method

Tutorial ISCAS 2007

Copyright © 2007 Andreas AntoniouVictoria, BC, Canada

Email: [email protected]

July 24, 2007

Frame # 1 Slide # 1 A. Antoniou Part 1: FIR Filters – Window Method

Page 2: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Fourier Series Method

� A simple method for the design of FIR filters is through theuse of the Fourier series in conjunction with the applicationof a class of functions known as window functions.

� Arbitrary specifications can be achieved by using a methodproposed by Kaiser.

Note: The material for this module is taken from Antoniou,Digital Signal Processing: Signals, Systems, and Filters„Chap. 9.)

Frame # 2 Slide # 2 A. Antoniou Part 1: FIR Filters – Window Method

Page 3: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Fourier Series Method

� A fundamental property of digital filters in general is thatthey have a periodic frequency response with period equalto the sampling frequency ωs, i.e.,

H (ej(ω+kωs)T ) = H (ejωT )

� Therefore, an arbitrary desired frequency response,H (ejωT ), can be represented by a Fourier series as

H (ejωT ) =∞∑

n=−∞h(nT )e−jωnT (A)

where h(nT ) = 1ωs

∫ ωs/2

−ωs/2H (ejωT )ejωnT dω

are the Fourier series coefficients.

Frame # 3 Slide # 3 A. Antoniou Part 1: FIR Filters – Window Method

Page 4: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Fourier Series Method Cont’d

· · ·H (ejωT ) =

∞∑n=−∞

h(nT )e−jωnT (A)

If we let ejωT = z in Eq. (A), we get

H (z) =∞∑

n=∞h(nT )z−n

This is the transfer function of an FIR filter with impulseresponse h(nT ).

Frame # 4 Slide # 4 A. Antoniou Part 1: FIR Filters – Window Method

Page 5: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Fourier Series Method Cont’d

Since the Fourier series coefficients are defined over the range−∞ < n < ∞, two problems are associated with the Fourierseries method:

� The FIR filter obtained is of infinite length.

Frame # 5 Slide # 5 A. Antoniou Part 1: FIR Filters – Window Method

Page 6: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Fourier Series Method Cont’d

Since the Fourier series coefficients are defined over the range−∞ < n < ∞, two problems are associated with the Fourierseries method:

� The FIR filter obtained is of infinite length.

� The filter is noncausal because the impulse response isnonzero for negative time.

Frame # 5 Slide # 6 A. Antoniou Part 1: FIR Filters – Window Method

Page 7: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Fourier Series Method Cont’d

� A finite filter length can be achieved by truncating theimpulse response such that

h(nT ) = 0 for |n| > M

where M = (N − 1)/2.

Frame # 6 Slide # 7 A. Antoniou Part 1: FIR Filters – Window Method

Page 8: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Fourier Series Method Cont’d

� A finite filter length can be achieved by truncating theimpulse response such that

h(nT ) = 0 for |n| > M

where M = (N − 1)/2.

� On the other hand, a causal filter can be obtained bydelaying the impulse response by a period MT seconds orby M sampling periods.

Frame # 6 Slide # 8 A. Antoniou Part 1: FIR Filters – Window Method

Page 9: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Fourier Series Method Cont’d

� Since delaying the impulse response by M samplingperiods amounts to multiplying the transfer function by z−M ,the transfer function of the causal filter assumes the form

H ′(z) = z−MM∑

n=−M

h(nT )z−n

Frame # 7 Slide # 9 A. Antoniou Part 1: FIR Filters – Window Method

Page 10: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Fourier Series Method Cont’d

� Since delaying the impulse response by M samplingperiods amounts to multiplying the transfer function by z−M ,the transfer function of the causal filter assumes the form

H ′(z) = z−MM∑

n=−M

h(nT )z−n

� The frequency response of the causal filter is obtained byletting z = ejωT in the transfer function, i.e.,

H ′(ejωT ) = e−jMωTM∑

n=−M

h(nT )e−jnωT

and since |e−jMωT | = 1, delaying the impulse response byM sampling periods does not change the amplituderesponse.

Frame # 7 Slide # 10 A. Antoniou Part 1: FIR Filters – Window Method

Page 11: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Example

Design a lowpass filter with a desired frequency response

H (ejωT ) ≈{

1 for |ω| ≤ ωc

0 for ωc < |ω| ≤ ωs/2

where ωs is the sampling frequency.

Solution The Fourier series gives the impulse response of thenoncausal filter as

h(nT ) = 1ωs

∫ ωc

−ωc

ejωnT dω = 1ωs

[ejωnT

jnT

]ωc

−ωc

= 1nπ

(ejωc nT − e−jωc nT )

2j= 1

nπsin ωcnT (B)

Truncating and delaying the impulse response by M samplingperiods immediately yields the required design.

Frame # 8 Slide # 11 A. Antoniou Part 1: FIR Filters – Window Method

Page 12: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Example Cont’d

0 2 4 6 8 10 −50

−40

−30

−20

−1.0

0

1.0

ω, rad/s

Gai

n, d

B

N=11 N=41

Frame # 9 Slide # 12 A. Antoniou Part 1: FIR Filters – Window Method

Page 13: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Fourier Series Method Cont’d

� The amplitude response of the filter (magnitude of thefrequency response) exhibits oscillations in the passbandas well as the stopband, which are known as Gibbs’oscillations. They are caused by the truncation of theFourier series.

Frame # 10 Slide # 13 A. Antoniou Part 1: FIR Filters – Window Method

Page 14: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Fourier Series Method Cont’d

� The amplitude response of the filter (magnitude of thefrequency response) exhibits oscillations in the passbandas well as the stopband, which are known as Gibbs’oscillations. They are caused by the truncation of theFourier series.

� As the filter length is increased, the frequency of theoscillations increases but the amplitude stays constant.

Frame # 10 Slide # 14 A. Antoniou Part 1: FIR Filters – Window Method

Page 15: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Fourier Series Method Cont’d

� The amplitude response of the filter (magnitude of thefrequency response) exhibits oscillations in the passbandas well as the stopband, which are known as Gibbs’oscillations. They are caused by the truncation of theFourier series.

� As the filter length is increased, the frequency of theoscillations increases but the amplitude stays constant.

� In other words, we do not seem to be able to reduce thepassband and stopband errors below a certain limit byincreasing the filter length.

Therefore, the filters that can be designed with the Fourierseries method are of little practical usefulness.

Frame # 10 Slide # 15 A. Antoniou Part 1: FIR Filters – Window Method

Page 16: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Fourier Series Method Cont’d

� The standard technique for the reduction of Gibbs’oscillations is to truncate the infinite-duration impulseresponse, h(nT ), through the use of a discrete-timewindow function w (nT ).

Frame # 11 Slide # 16 A. Antoniou Part 1: FIR Filters – Window Method

Page 17: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Fourier Series Method Cont’d

� The standard technique for the reduction of Gibbs’oscillations is to truncate the infinite-duration impulseresponse, h(nT ), through the use of a discrete-timewindow function w (nT ).

� If we lethw (nT ) = w (nT )h(nT )

then a modified transfer function is obtained as

Hw (z) = Z[w (nT )h(nT )]= 1

2π j

∮�

H (v )W(z

v

)v−1 dv

where H (z) is the original transfer function and W (z) is thez transform of the window function.

Frame # 11 Slide # 17 A. Antoniou Part 1: FIR Filters – Window Method

Page 18: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Fourier Series Method Cont’d

� Evaluating Hw (z) on the unit circle z = ejωT gives thefrequency response of the modified filter as

Hw (ejωT ) = T2π

∫ 2π/T

0H (ej�T )W (ej(ω−�)T ) d� (C)

W (ejωT ) is the frequency spectrum of the window functionand the integral at the right-hand side is a convolutionintegral.

Frame # 12 Slide # 18 A. Antoniou Part 1: FIR Filters – Window Method

Page 19: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Window functions

Frequency spectrum of a typical window:

0 ω, rad/s

W(ejωT)

AML

Main-lobe width

Amax

ωs/2−ωs/2

Frame # 13 Slide # 19 A. Antoniou Part 1: FIR Filters – Window Method

Page 20: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Window functions Cont’d

� Windows are characterized by their main-lobe width, BML,which is the bandwidth between the first negative and thefirst positive zero crossings, and by their ripple ratio, r,which is defined as

r = 100Amax

AML% or R = 20 log

Amax

AMLdB

where Amax and AML are the maximum side-lobe andmain-lobe amplitudes, respectively.

Frame # 14 Slide # 20 A. Antoniou Part 1: FIR Filters – Window Method

Page 21: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Window functions Cont’d

� Windows are characterized by their main-lobe width, BML,which is the bandwidth between the first negative and thefirst positive zero crossings, and by their ripple ratio, r,which is defined as

r = 100Amax

AML% or R = 20 log

Amax

AMLdB

where Amax and AML are the maximum side-lobe andmain-lobe amplitudes, respectively.

� The main-lobe width and ripple ratio should be as low aspossible, i.e., the spectral energy of the window should beconcentrated as far as possible in the main lobe and theenergy in the side lobes should be as low as possible.

Frame # 14 Slide # 21 A. Antoniou Part 1: FIR Filters – Window Method

Page 22: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Window functions Cont’d

� The way by which Gibbs’ oscillations can be controlled byusing a window is illustrated in the next few slides whichare based on Eq. (C), i.e.,

Hw (ejωT ) = T2π

∫ 2π/T

0H (ej�T )W (ej(ω−�)T ) d� (C)

Frame # 15 Slide # 22 A. Antoniou Part 1: FIR Filters – Window Method

Page 23: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Window functions Cont’d

� The way by which Gibbs’ oscillations can be controlled byusing a window is illustrated in the next few slides whichare based on Eq. (C), i.e.,

Hw (ejωT ) = T2π

∫ 2π/T

0H (ej�T )W (ej(ω−�)T ) d� (C)

� Let us consider the application of a generic window in thedesign of a LP filter, assuming that the area under thecurve in the frequency spectrum of the window is 2π/T .

Frame # 15 Slide # 23 A. Antoniou Part 1: FIR Filters – Window Method

Page 24: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Window functions Cont’d

1

−ωc

H(ejωT)

W(ejωT)

ωωs

ωs/2

ω

ωc

ωs

Frequency response of ideal lowpass filter

Frequency spectrum of window

Frame # 16 Slide # 24 A. Antoniou Part 1: FIR Filters – Window Method

Page 25: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Window functions Cont’d

1

−ωc

�ωs

ωs/2

ωs/2

ωs/2

ωs

ωs

ω

Hw(ejωT)

−ωc ωc

H(ej�T)

ω

W(ej(ω−�)T)

ωc

Frame # 17 Slide # 25 A. Antoniou Part 1: FIR Filters – Window Method

Page 26: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Window functions Cont’d

1

−ωc

�ωs

ωs/2

ωs/2

ωs/2

ωs

ωs

ω

Hw(ejωT)

−ωc ωc

H(ej�T)

ω

ωc

W(ej(ω−�)T)

Frame # 18 Slide # 26 A. Antoniou Part 1: FIR Filters – Window Method

Page 27: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Window functions Cont’d

1

−ωc

�ωs

ωs/2

ωs/2

ωs/2

ωc

ωs

ωs

ω

Hw(ejωT)

−ωc ωc

H(ej�T)

ω

W(ej(ω−�)T)

Frame # 19 Slide # 27 A. Antoniou Part 1: FIR Filters – Window Method

Page 28: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Window functions Cont’d

From the illustrations, we conclude that

� the steepness of the transition characteristic of the filterobtained depends on the main-lobe width of the window,and

Frame # 20 Slide # 28 A. Antoniou Part 1: FIR Filters – Window Method

Page 29: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Window functions Cont’d

From the illustrations, we conclude that

� the steepness of the transition characteristic of the filterobtained depends on the main-lobe width of the window,and

� the amplitudes of the passband and stopband ripplesdepend on the ripple ratio of the window.

Frame # 20 Slide # 29 A. Antoniou Part 1: FIR Filters – Window Method

Page 30: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Kaiser Window function

� One of the most important windows is the Kaiser window.

Frame # 21 Slide # 30 A. Antoniou Part 1: FIR Filters – Window Method

Page 31: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Kaiser Window function

� One of the most important windows is the Kaiser window.

� This is a parametric window which has an independentcontrol parameter α.

Frame # 21 Slide # 31 A. Antoniou Part 1: FIR Filters – Window Method

Page 32: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Kaiser Window function

� One of the most important windows is the Kaiser window.

� This is a parametric window which has an independentcontrol parameter α.

� By choosing the value of α and the filter length, N, arbitraryspecifications can be achieved in lowpass (LP), highpass(HP), bandpass (BP), and bandstop (BS) filters.

Frame # 21 Slide # 32 A. Antoniou Part 1: FIR Filters – Window Method

Page 33: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Kaiser Window function Cont’d

Ripple ratio versus α:

0 1 2 3 4 5 6 7 8 9 10−80

−70

−60

−50

−40

−30

−20

−10

RR, dB

α

Frame # 22 Slide # 33 A. Antoniou Part 1: FIR Filters – Window Method

Page 34: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Kaiser Window function Cont’d

Main-lobe width versus α:

0 1 2 3 4 5 6 7 8 9 100

0.5

1

1.5

2

2.5

N=43

63

123

MB, rad

α

Frame # 23 Slide # 34 A. Antoniou Part 1: FIR Filters – Window Method

Page 35: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Kaiser Window function Cont’d

The Kaiser window function is given by

wK (nT ) =⎧⎨⎩

I0(β)

I0(α)for |n| ≤ M

0 otherwise(D)

where

β = α

√1 −

( nM

)2, I0(x ) = 1 +

∞∑k=1

[1k !

(x2

)k]2

and M = (N − 1)/2. Its frequency spectrum is given by

WK (ejωT ) = wK (0) + 2M∑

n=1

wK (nT ) cos ωnT

Frame # 24 Slide # 35 A. Antoniou Part 1: FIR Filters – Window Method

Page 36: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Design of FIR Lowpass Filters

An FIR LP filter that would satisfy the specifications shown canbe readily designed by using a procedure due to Kaiser asdetailed in the next three slides.

Gai

n

ω

δ

1+δ

1−δ

ωcωp ωa

1.0

ωs/2

Ap∼

Aa∼

Frame # 25 Slide # 36 A. Antoniou Part 1: FIR Filters – Window Method

Page 37: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Design of FIR Lowpass Filters Cont’d

1. Determine the impulse response h(nT ) using the Fourierseries assuming an idealized frequency response

H (ejωT ) ={

1 for |ω| ≤ ωc

0 for ωc < |ω| ≤ ωs/2where ωc = 1

2(ωp + ωa)

(see Eq. (B).)

Frame # 26 Slide # 37 A. Antoniou Part 1: FIR Filters – Window Method

Page 38: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Design of FIR Lowpass Filters Cont’d

1. Determine the impulse response h(nT ) using the Fourierseries assuming an idealized frequency response

H (ejωT ) ={

1 for |ω| ≤ ωc

0 for ωc < |ω| ≤ ωs/2where ωc = 1

2(ωp + ωa)

(see Eq. (B).)2. Choose δ such that the actual passband ripple, Ap, is equal

to or less than specified passband ripple, Ap, and the actualminimum stopband attenuation, Aa, is equal or greater thanthe specified minimum stopband attenuation, Aa.A suitable value is

δ = min (δp, δa)

where δp = 100.05Ap − 1

100.05Ap + 1and δa = 10−0.05Aa

Frame # 26 Slide # 38 A. Antoniou Part 1: FIR Filters – Window Method

Page 39: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Design of FIR Lowpass Filters Cont’d

3. With the required δ defined, the actual stopbandattenuation Aa can be calculated as

Aa = −20 log10 δ

Frame # 27 Slide # 39 A. Antoniou Part 1: FIR Filters – Window Method

Page 40: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Design of FIR Lowpass Filters Cont’d

3. With the required δ defined, the actual stopbandattenuation Aa can be calculated as

Aa = −20 log10 δ

4. Choose parameter α as

α =

⎧⎪⎨⎪⎩

0 for Aa ≤ 21

0.5842(Aa − 21)0.4 + 0.07886(Aa − 21) for 21 < Aa ≤ 50

0.1102(Aa − 8.7) forAa > 50

Frame # 27 Slide # 40 A. Antoniou Part 1: FIR Filters – Window Method

Page 41: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Design of FIR Lowpass Filters Cont’d

5. Choose parameter D as

D =⎧⎨⎩

0.9222 for Aa ≤ 21Aa − 7.95

14.36for Aa > 21

Then select the lowest odd value of N that would satisfythe inequality

N ≥ ωsDBt

+ 1 where Bt = ωa − ωp

Frame # 28 Slide # 41 A. Antoniou Part 1: FIR Filters – Window Method

Page 42: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Design of FIR Lowpass Filters Cont’d

5. Choose parameter D as

D =⎧⎨⎩

0.9222 for Aa ≤ 21Aa − 7.95

14.36for Aa > 21

Then select the lowest odd value of N that would satisfythe inequality

N ≥ ωsDBt

+ 1 where Bt = ωa − ωp

6. Form wK (nT ) using Eq. (D).

Frame # 28 Slide # 42 A. Antoniou Part 1: FIR Filters – Window Method

Page 43: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Design of FIR Lowpass Filters Cont’d

5. Choose parameter D as

D =⎧⎨⎩

0.9222 for Aa ≤ 21Aa − 7.95

14.36for Aa > 21

Then select the lowest odd value of N that would satisfythe inequality

N ≥ ωsDBt

+ 1 where Bt = ωa − ωp

6. Form wK (nT ) using Eq. (D).7. Form

H ′w (z) = z−M Hw (z) where Hw (z) = Z[wK (nT )h(nT )]

and M = (N − 1)/2.

Frame # 28 Slide # 43 A. Antoniou Part 1: FIR Filters – Window Method

Page 44: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Design of FIR Bandpass Filters

� The design method presented can be easily extended toFIR HP, BP, and BS filters.

� Consider the case where a BP filter is required that wouldsatisfy the following specifications:

– Passband ripple ≤ Ap

– Minimum stopband attenuation ≥ Aa

– Lower passband edge ωp1

– Upper passband edge ωp2

– Lower stopband edge ωa1

– Upper stopband edge ωa2

– Sampling frequency ωs2

(Ap and Aa in dB and all frequencies in rad/s)

Frame # 29 Slide # 44 A. Antoniou Part 1: FIR Filters – Window Method

Page 45: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Design of FIR Bandpass Filters Cont’d

Gai

n

ω

δ

1+δ

1−δ

ωc1 ωc2

ωp1 ωp2ωa1

ωa2

1.0

ωs2

Ap∼

Aa∼

Frame # 30 Slide # 45 A. Antoniou Part 1: FIR Filters – Window Method

Page 46: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Design of FIR Bandpass Filters Cont’d

The only differences in the design of BP filters are to

� use the more critical of the two transition widths for thedesign,

� use the idealized frequency of a BP filter for thedetermination of the initial impulse response.

Frame # 31 Slide # 46 A. Antoniou Part 1: FIR Filters – Window Method

Page 47: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Design of FIR Bandpass Filters Cont’d

The more critical transition width is

Bt = min[(ωp1 − ωa1), (ωa2 − ωp2)]and hence the idealized frequency response for a BP filter isdeduced as

H (ejωT ) =

⎧⎪⎨⎪⎩

1 for −ωc2 ≤ ω ≤ −ωc1

1 for ωc1 ≤ ω ≤ ωc2

0 otherwise

where ωc1 = ωp1 − Bt

2ωc2 = ωp2 + Bt

2

Frame # 32 Slide # 47 A. Antoniou Part 1: FIR Filters – Window Method

Page 48: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Example

Design an FIR BP filter satisfying the following specifications:

� Minimum attenuation for 0 ≤ ω ≤ 200: 45 dB

� Maximum passband ripple for 400 < ω < 600: 0.2 dB

� Minimum attenuation for 700 ≤ ω ≤ 1000: 45 dB

� Sampling frequency: 2000 rad/s

Frame # 33 Slide # 48 A. Antoniou Part 1: FIR Filters – Window Method

Page 49: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Example Cont’d

The idealized impulse response is obtained as

h(nT ) = 1ωs

∫ ωs/2

−ωs/2H (ejωT )ejωnT dω

= 1nπ

(sin ωc2nT − sin ωc1nT )

The application of the design procedure described will give

α = 3.9754

D = 2.580

N = 53

Frame # 34 Slide # 49 A. Antoniou Part 1: FIR Filters – Window Method

Page 50: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Example Cont’d

0 200 400 600 800 1000 −70

−60

−50

−40

−30

−20

0

ω, rad/s

Gai

n, d

B

−0.01

0.01

Frame # 35 Slide # 50 A. Antoniou Part 1: FIR Filters – Window Method

Page 51: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Use of Ultraspherical Window Function

� A more recent approach for the design of FIR filters thatparallels the method described is a method based on theultraspherical window function proposed by Bergen andAntoniou (see References).

Frame # 36 Slide # 51 A. Antoniou Part 1: FIR Filters – Window Method

Page 52: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Use of Ultraspherical Window Function

� A more recent approach for the design of FIR filters thatparallels the method described is a method based on theultraspherical window function proposed by Bergen andAntoniou (see References).

� For certain specifications, this new approach tends to givemore efficient designs, i.e., the minimum filter length thatwill achieve the required specifications is somewhat lower.

Frame # 36 Slide # 52 A. Antoniou Part 1: FIR Filters – Window Method

Page 53: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

D-Filter

A DSP software package that incorporates the designtechniques described in this presentation is D-Filter. Please see

http://www.d-filter.ece.uvic.ca

for more information.

Frame # 37 Slide # 53 A. Antoniou Part 1: FIR Filters – Window Method

Page 54: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Summary

� A method for the design of FIR filters using a procedureproposed by Kaiser has been described.

Frame # 38 Slide # 54 A. Antoniou Part 1: FIR Filters – Window Method

Page 55: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Summary

� A method for the design of FIR filters using a procedureproposed by Kaiser has been described.

� The method is easy to apply and requires a minimalamount of computation.

Hence it can be used to design filters on-line in real orquasi-real time applications.

The method is implemented in a DSP software packageknown as D-Filter.

Frame # 38 Slide # 55 A. Antoniou Part 1: FIR Filters – Window Method

Page 56: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

Summary

� A method for the design of FIR filters using a procedureproposed by Kaiser has been described.

� The method is easy to apply and requires a minimalamount of computation.

Hence it can be used to design filters on-line in real orquasi-real time applications.

The method is implemented in a DSP software packageknown as D-Filter.

� The designs obtained are suboptimal, i.e., other methodsare available that would yield a lower filter order for thesame specifications, for example, the weighted-Chebyshevmethod which will be described in Part 2 of this tutorial.

Frame # 38 Slide # 56 A. Antoniou Part 1: FIR Filters – Window Method

Page 57: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

References

� A. Antoniou, Digital Signal Processing: Signals, Systems,and Filters, Chap. 9, McGraw-Hill, 2005.

� J. F. Kaiser, “Nonrecursive digital filter design using theI0-sinh window function,” in Proc. IEEE Int. Symp. CircuitTheory, 1974, pp. 20–23.

� S. W. A. Bergen and A. Antoniou, “Design of ultrasphericalwindow functions with prescribed spectral characteristics,”EURASIP Journal on Applied Signal Processing, vol. 13,pp. 2053-2065, 2004.

� S. W. A. Bergen and A. Antoniou, “Design of nonrecursivedigital filters using the ultraspherical window function,”EURASIP Journal on Applied Signal Processing, vol. 13,pp. 1910-1922, 2005.

Frame # 39 Slide # 57 A. Antoniou Part 1: FIR Filters – Window Method

Page 58: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

References Cont’d

� T. Saramäki, “Adjustable windows for the design of FIRfilters — A tutorial,” 6th Mediterranean ElectrotechnicalConference, vol. 1, pp. 28–33, May 1991.

� R. L. Streit, “A two-parameter family of weights fornonrecursive digital filters and antennas,” IEEE Trans.Acoust., Speech, Signal Process., vol. 32, pp. 108–118,Feb. 1984.

� A. Antoniou, “Design of digital differentiators satisfyingprescribed specifications,” Proc. Inst. Elect. Eng., Part E,vol. 127, pp. 24–30, Jan. 1980.

Frame # 40 Slide # 58 A. Antoniou Part 1: FIR Filters – Window Method

Page 59: Part 1: FIR Filters – Window Method Tutorial ISCAS 2007andreas/ISCASTutorial/Part 1-FIR Filters-Window...Fourier Series Method A simple method for the design of FIR filters is through

This slide concludes the presentation.Thank you for your attention.

Frame # 41 Slide # 59 A. Antoniou Part 1: FIR Filters – Window Method