Transcript Document
Discrete-Time Filter Design by Windowing
Quote of the Day
In mathematics you don't understand things.
You just get used to them.
Johann von Neumann
Content and Figures are from Discrete-Time Signal Processing, 2e by Oppenheim, Shafer, and Buck, ©1999-2000 Prentice Hall
Inc.
Filter Design by Windowing
• Simplest way of designing FIR filters
• Method is all discrete-time no continuous-time involved
• Start with ideal frequency response
1
j
jn
j
jn
Hd e hd ne
hd n
H
e
e
d
d
2
n
• Choose ideal frequency response as desired response
• Most ideal impulse responses are of infinite length
• The easiest way to obtain a causal FIR filter from ideal is
hd n 0 n M
hn
else
0
• More generally
hn hd nwn
Copyright (C) 2005 Güner Arslan
where
1 0 n M
wn
else
0
351M Digital Signal Processing
2
Windowing in Frequency Domain
• Windowed frequency response
1
j
j
H e j
H
e
W
e
d
d
2
• The windowed version is smeared version of desired response
• If w[n]=1 for all n, then W(ej) is pulse train with 2 period
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
3
Properties of Windows
• Prefer windows that concentrate around DC in frequency
– Less smearing, closer approximation
• Prefer window that has minimal span in time
– Less coefficient in designed filter, computationally efficient
• So we want concentration in time and in frequency
– Contradictory requirements
• Example: Rectangular window
e
We
j
M
n0
jn
1 e jM1
jM / 2 sinM 1 / 2
e
sin / 2
1 e j
• Demo
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
4
Rectangular Window
• Narrowest main lob
– 4/(M+1)
– Sharpest transitions at
discontinuities in
frequency
• Large side lobs
– -13 dB
– Large oscillation
around discontinuities
• Simplest window
possible
1 0 n M
wn
else
0
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
5
Bartlett (Triangular) Window
• Medium main lob
– 8/M
• Side lobs
– -25 dB
• Hamming window
performs better
• Simple equation
0 n M/2
2n / M
wn 2 2n / M M / 2 n M
0
else
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
6
Hanning Window
• Medium main lob
– 8/M
• Side lobs
– -31 dB
• Hamming window
performs better
• Same complexity as
Hamming
1
2n
1 cos
0 n M
wn 2
M
0
else
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
7
Hamming Window
• Medium main lob
– 8/M
• Good side lobs
– -41 dB
• Simpler than Blackman
2n
0.54 0.46 cos
0nM
wn
M
0
else
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
8
Blackman Window
• Large main lob
– 12/M
• Very good side lobs
– -57 dB
• Complex equation
2n
4n
0.42 0.5 cos
0.08 cos
0nM
wn
M
M
0
else
• Windows Demo
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
9
Incorporation of Generalized Linear Phase
• Windows are designed with linear phase in mind
– Symmetric around M/2
wM n 0 n M
wn
else
0
• So their Fourier transform are of the form
W ej We ej e jM / 2
where We ej is a realand even
• Will keep symmetry properties of the desired impulse response
• Assume symmetric desired response
Hd ej He ej e jM / 2
• With symmetric window
A e e j
1
j
j
H
e
W
e
d
e
2
– Periodic convolution of real functions
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
10
Linear-Phase Lowpass filter
• Desired frequency response
jM / 2
c
e
j
Hlp e
c
0
• Corresponding impulse
response
sinc n M / 2
hlp n
n M / 2
• Desired response is even
symmetric, use symmetric
window
hn
sinc n M / 2
wn
n M / 2
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
11
Kaiser Window Filter Design Method
• Parameterized equation
forming a set of windows
– Parameter to change mainlob width and side-lob area
trade-off
2
n
M
/
2
I0 1
M/2
wn
0nM
I0
0
else
– I0(.) represents zeroth-order
modified Bessel function of
1st kind
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
12
Determining Kaiser Window Parameters
• Given filter specifications Kaiser developed empirical equations
– Given the peak approximation error or in dB as A=-20log10
– and transition band width s p
• The shape parameter should be
0.1102A 8.7
A 50
0.4
0.5842A 21 0.07886A 21 21 A 50
0
A 21
• The filter order M is determined approximately by
M
Copyright (C) 2005 Güner Arslan
A8
2.285
351M Digital Signal Processing
13
Example: Kaiser Window Design of a Lowpass Filter
• Specifications p 0.4, p 0.6, 1 0.01, 2 0.001
• Window design methods assume 1 2 0.001
• Determine cut-off frequency
– Due to the symmetry we can choose it to be c 0.5
• Compute
A 20log10 60
s p 0.2
• And Kaiser window parameters
5.653
M 37
• Then the impulse response is given as
2
n 18.5
I0 5.653 1
18
.
5
hn sin0.5n 18.5
0nM
n 18.5
I0 5.653
0
else
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
14
Example Cont’d
Approximation Error
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
15
General Frequency Selective Filters
• A general multiband impulse response can be written as
hmb n
sin k n M / 2
G
G
k
k 1
n M / 2
k 1
Nmb
• Window methods can be applied to multiband filters
• Example multiband frequency response
– Special cases of
• Bandpass
• Highpass
• Bandstop
Copyright (C) 2005 Güner Arslan
351M Digital Signal Processing
16