Docsity

Digital Signal Processing: Filter Design Techniques - FIR Filters by Windowing, Study notes of Digital Signal Processing

Partial preview of the text

Download Digital Signal Processing: Filter Design Techniques - FIR Filters by Windowing and more Study notes Digital Signal Processing in PDF only on Docsity!

Department of

Electrical and Computer Engineering

Yimin Zhang

Department of Electrical & Computer Engineering

Villanova University

ECE

Digital Signal Processing

http://www.ece.villanova.edu/~zhang/ECE8231/

Chapter 7

Filter Design Techniques

(2/3)

Design of FIR Filters by Windowing (2)

‰

We consider an ideal desired frequency response that can berepresented asIn turn, the impulse response sequence can be expressed as ‰

Many idealized systems are defined by piecewise-constant orpiecewise-functional frequency responses with discontinuities atthe boundaries between bands. As a result, these systems haveimpulse responses that are noncausal and infinitely long. ‰

The most straightforward approach to obtaining a causal FIRapproximation to such systems is to truncate the ideal response.

∞ ∑−∞=

−

=^

n

n j

d

Tj d^

e

n

h

e

H

ω

ω^

]

[

ω

π

ω

π π

ω^

d

e

e

H

n

h^

n j j d

d^

∫−

=^

]

[

Design of FIR Filters by Windowing (3)

‰

The simplest way to obtain a causal FIR filter from

hd

[ n

] is to

define a new system with impulse response

h [ n

] given by

‰

As can be seen in the LPF example (we discussed it in Ch. 2),there is the Gibbs phenomenon. ‰

More generally, we can represent

h

[ n

] as the product of the

desired impulse response and a finite-duration “window”

w

[ n

],

where the window for the above example is

^  

=^

otherwise

],

[

]

[^

M

n

n

h

n

h^

d

]

[

]

[

]

[^

n

w

n

h

n

h^

d

= ^  

=^

otherwise

]

[^

M

n

n

w

Design of FIR Filters by Windowing (5)

‰

From the modulation theorem (or windowing theorem)That is,

H
( e
j^ ω)

is the periodic convolution of

H
( ed
j^ ω) and
W
( e
j^ ω). Thus,
H
( e
j^ ω)

will be a smeared version of

H
( ed
j^ ω).

θ

π

π π

θ ω

ω

ω^

d e W e H e H

j

j d

j

∫−

−

=^

(^

) (

Design of FIR Filters by Windowing (6)

‰

If

W
( e
j^ ω) is concentrated in a narrowband of frequencies
around
=0, then
H
( e
j^ ω)

will look like

H
( ed
j^ ω), except where
H
( ed
j^ ω) changes very abruptly.
The choice of the window is to have
w
[ n
] as short as
possible in duration, so as to minimize computation in theimplementation
of
the
filter,
while
having
W
( e
j^ ω)
approximate
an
impulse.
Clearly,
there
are
conflicting
requirements.
For the rectangular window, the side lobes are large, and as^ M
increases, the peak amplitudes of the main lobe and the
side lobes grow in a manner such that the area under lobe isa constant while the width of each lobe decreases with
M

Properties of Commonly Used Windows (1)

Commonly used windows^ RectangularBartlett (triangular)HanningHammingBlackman

^  

≤ ≤

=^

otherwise , 0

0 , 1 ] [^

M n

n w  ^ 

≤ ≤

−

=^

otherwise

, 0

0

), / 2 cos( 5

. 0 (^5). 0 ] [^

M n M n n w

   

≤ ≤

−

≤ ≤

=

otherwise

, 0

(^2) /

, / 2 2

(^2) /

0 , / 2 ] [^

M n

M M n

M n

M n

n w  ^ 

≤ ≤

−

=^

otherwise

, 0

0 ), / 2 cos( (^46). 0

(^54). 0 ] [^

M n M n n w

^  

≤ ≤

−

=^

otherwise

, 0

0 ), / 4 cos( (^08). 0 ) / 2 cos( 5

. 0

(^42). 0 ] [^

M n M n M n n w

Properties of Commonly Used Windows (2)

Commonly used windows
(Note that the windows are
plotted as functions of a continuous variable. The actualwindow sequence is defined only at integer value of
n

Properties of Commonly Used Windows (4)

HanningPeak sidelobe level: –31 dBApprox. width of main lobe:

8 π

/ M

HammingPeak sidelobe level: –41 dBApprox. width of main lobe:

8 π

/ M

BlackmanPeak sidelobe level: –57 dBApprox. width of main lobe:

12

π/ M

Incorporation of Generalized Linear Phase ‰

All the windows have the property thati.e., they are symmetric about

M

/2.

‰

If the desired impulse response is also symmetric about

M

/2,

i.e., if

h

[ nd

]=

hd

[ M – n

], then the windowed impulse response

will

also

have

that

symmetry,

and

the

resulting

frequency

response will have a generalized linear phase; that iswhere

A
( ee
j^ ω) is real and is an even function of

Properties of Commonly Used Windows (5)

^  

=^

otherwise

],

[

]

[^

M n n M w n w

(^2) /

(^

M j

j e

j^

e

e

A

e

H

ω

ω

ω^

−

‰

The trade-off between the main lobe width and side-lobe areacan

be

quantified

by

seeking

the

window

function

that

is

maximally concentrated around

ω

=0 in the frequency domain.

This was considered and the solution shows that the filter designinvolves prolate spheroidal wave functions and thus is difficult. ‰

However, Kaiser found that a near-optimal window could beformed using the zeroth-order modified Bessel function of thefirst kind [

I (·)], a function that is much easier to compute.^0

‰

The Kaiser window is defined aswhere

α

= M

/2.

The Kaiser Window Filter Design Method (1)

^   
otherwise
]
]
[(
[
]
[^

0

(^2) / 1 2

0

M
n
n I
I
n
w

‰

The Kaiser window has two parameters: the window length(

M

+1) and a shape parameter

β

. By adjusting (

M

+1) and

β

, the

side-lobe

amplitude

and

main-lobe

width

can

be

properly

designed. ‰

β

=0 becomes the rectangular window. Increasing

β

will reduce

the side-lobe level, but the main-lobe becomes wider. ‰

Increasing

M

while holding

β

constant causes the main lobe to

reduce in width, but does not affect the amplitude of the sidelobes. ‰

Through extensive numerical experiments, Kaiser obtained a pairof formulas to predict the values of

and

β

needed to meet a

The Kaiser Window Filter Design Method (2) given filter specification.

Relationship of the Kaiser Window

to Other Windows

Window Related Matlab Functions

(Signal Processing Toolbox)

WINDOW - Window function gatewayWINDOW(@WNAME,N) returns an N-point window of type

specified by the function handle @WNAME in a column vector.@WNAME can be any valid window function name, forexample: @bartlett

  • Bartlett window.

@blackman

  • Blackman window.

@hamming

  • Hamming window.

@hann

  • Hann window.

@kaiser

  • Kaiser window.

@rectwin

  • Rectangular window.

@triang

  • Triangular window.