11.5 FIR Filter Design 685
FIGURE 11.22
(a) Hamming and (b) Kaiser
causal windows and (c) their
spectra.
0 102030
0
0.5
1
n
w
[n 3
]
0102030
0
0.5
1
n
w
[n 4
]
(a) (b)
0 0.2 0.4 0.6 0.8 1
− 150
− 100
− 50
0
ω/π
Gain(dB)
(c)
Hamming
Kaiser
Given that the sidelobes for the Kaiser window have the largest loss, the Kaiser window is considered
the best of these four, followed by the Hamming, the Bartlett, and the rectangular windows. Notice
that the width of the first lobe is the widest for the Kaiser and the narrowest for the rectangular, as
this width depends on the smoothness of the window.
RemarksThe linear phase is a result of the symmetry of the impulse response of the designed filter. It can be
shown that if the impulse response h[n]of the FIR filter is even or odd symmetric with respect to the sample
(N− 1 )/ 2 (whether this is a integer or not) the filter has a linear phase.
nExample 11.12
Design a low-pass FIR filter withN=21 to be used in filtering analog signals and that approxi-
mates the following ideal frequency response:
Hd(ejω)=
{
1 0≤f≤125 Hz
0 elsewhere in 0≤f≤fs/ 2
whereω= 2 πf/fsandfs=1000 Hz is the sampling rate. Use first a rectangular window, and then
a Hamming window. Compare the designed filters.
Solution
The discrete frequency response is given by
Hd(ejω)=
{
1 0≤ω≤π/4 rad
0 elsewhere in 0≤ω≤π