Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 15

Fixed Window Functions

• Using a tapered window causes the height


of the sidelobes to diminish, with a
corresponding increase in the main lobe
width resulting in a wider transition at the
discontinuity
• Hanning:
w[n]  0.5  0.5 cos( 2 n ),  M  n  M
2M  1
• Hamming:
w[n]  0.54  0.46 cos( 2 n ),  M  n  M
2M  1
• Blackman:
w[n]  0.42  0.5 cos( 2  n )  0.08 cos( 4  n )
2M  1 2M  1
Fixed Window Functions
• Plots of magnitudes of the DTFTs of these
windows for M = 25 are shown below:
Rectangular window Hanning window
0 0

-20 -20

Gain, dB
Gain, dB

-40 -40

-60 -60

-80 -80

-100 -100
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
w/ w/
Hamming window Blackman window
0 0

-20 -20
Gain, dB

Gain, dB

-40 -40

-60 -60

-80 -80

-100 -100
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
w/ w/
Fixed Window Functions
• Magnitude spectrum of each window is
characterized by a main lobe centered at
w = 0 followed by a series of sidelobes with
decreasing amplitudes
• Parameters predicting the performance of a
window in filter design are:
• Main lobe width
• Relative sidelobe level
Fixed Window Functions
• Main lobe width  ML - given by the
distance between zero crossings on both
sides of main lobe
• Relative sidelobe level As - given by the
difference in dB between amplitudes of
largest sidelobe and main lobe
Fixed Window Functions

j( wc  2w ) j( wc  2w )
• Observe Ht (e )  H t (e ) 1
jwc
• Thus, H t (e )  0.5
• Passband and stopband ripples are the same
Fixed Window Functions
• Distance between the locations of the
maximum passband deviation and minimum
stopband value   ML

• Width of transition band


w  w s  w p   ML
Fixed Window Functions
• To ensure a fast transition from passband to
stopband, window should have a very small
main lobe width
• To reduce the passband and stopband ripple
 , the area under the sidelobes should be
very small
• Unfortunately, these two requirements are
contradictory
Fixed Window Functions
• In the case of rectangular, Hanning, Hamming,
and Blackman windows, the value of ripple  does
not depend on filter length or cutoff frequency wc ,
and is essentially constant
• In addition the transition bandwidth,
w  c
M
where c is a constant for most practical purposes
Fixed Window Functions
• Rectangular window -  ML  4 /(2M  1)
As  13.3 dB,  s  20.9 dB, w  0.92 / M
• Hanning window -  ML  8 /(2M  1)
As  31.5 dB,  s  43.9 dB, w  3.11 / M
• Hamming window -  ML  8 /(2M  1)
As  42.7 dB,  s  54.5 dB, w  3.32 / M
• Blackman window -  ML  12 /(2M  1)
As  58.1 dB,  s  75.3 dB, w  5.56 / M
Fixed Window Functions
• Filter Design Steps -
(1) Set
wc  (w p  w s ) / 2
(2) Choose window based on specified s
(3) Estimate M using
w  c
M
4) Obtain the impulse response coefficients of the
filter
ht [n]  h[n]  w[n]
FIR Filter Design Example
• Lowpass filter of length 51 and wc   / 2
Lowpass Filter Designed Using Hann window Lowpass Filter Designed Using Hamming window
0 0

Gain, dB
Gain, dB

-50 -50

-100 -100

0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1


w/ w/
Lowpass Filter Designed Using Blackman window
0
Gain, dB

-50

-100

0 0.2 0.4 0.6 0.8 1


w/
Adjustable Window Functions
• Kaiser Window -
I 0{ 1  (n / M ) 2 }
w[n]  , M nM
I0 ( )
where  is an adjustable parameter and I 0 (u )
is the modified zeroth-order Bessel function
of the first kind:  (u / 2) r
I 0 (u )  1   [ ] 2
r 1 r!
• Note I 0 (u )  0 for u > 0
20 (u / 2) r
• In practice I 0 (u )  1   [ ] 2
r 1 r!
Adjustable Window Functions
•  controls the minimum stopband
attenuation of the windowed filter response
•  is estimated using
 0.1102(  s 8.7 ), for  s  50
 0.5842(  s  21)0.4  0.07886(  s  21), for 21   s  50
 0, for  s  21
• Filter order is estimated using
s  8
N
2.285(w )
where w is the normalized transition
bandwidth
FIR Filter Design Example
• Specifications: w p  0.3 , w s  0.5 ,
 s  40 dB
• Thus wc  (w p  w s ) / 2  0.4
 s / 20
 s  10  0.01
  0.5842(19)  0.0788619  3.3953
0.4

32
N  22.2886
2.285(0.2)
• Choose N = 25 implying M =12
FIR Filter Design Example
sin(0.4 n)
• Hence ht [n]  n  w[n],  12  n  12
where w[n] is the n-th coefficient of a
length-25 Kaiser window with   3.3953
Kaiser Window Lowpass filter designed with Kaiser window
0 0

-20 -20

Gain, dB
Gain, dB

-40 -40

-60 -60

-80 -80
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
w/ w/

You might also like