Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Fixed Window Functions Fixed Window Functions

• Using a tapered window causes the height • Plots of magnitudes of the DTFTs of these
of the sidelobes to diminish, with a windows for M = 25 are shown below:
corresponding increase in the main lobe 0
Rectangular window
0
Hann window

width resulting in a wider transition at the -20 -20

discontinuity -40 -40

Gain, dB

Gain, dB
-60 -60
• Hann:
w[ n] = 0.5 + 0.5cos( πn ) , − M ≤ n ≤ M
-80 -80

-100 -100
0 0.2 0.4 0.6 0.8 1
M 0 0.2 0.4
ω/π
0.6 0.8 1
ω/π

• Hamming: Hamming window Blackman window

w[ n] = 0.54 + 0.46cos( π n) , − M ≤ n ≤ M
0 0

-20 -20
M -40 -40

Gain, dB
Gain, dB
• Blackman: -60 -60

w[ n] = 0.42 + 0.5cos( π n) + 0.08cos( 2π n) -80 -80

M M -100 -100

−M ≤n≤M
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
1 2 ω/π ω/π
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Fixed Window Functions Fixed Window Functions


• Magnitude spectrum of each window
• Main lobe width ∆ ML - given by the
characterized by a main lobe centered at
distance between zero crossings on both
ω = 0 followed by a series of sidelobes with
sides of main lobe
decreasing amplitudes
• Relative sidelobe level Asl - given by the
• Parameters predicting the performance of a
difference in dB between amplitudes of
window in filter design are:
largest sidelobe and main lobe
• Main lobe width
• Relative sidelobe level
3 4
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Fixed Window Functions Fixed Window Functions


• Distance between the locations of the
maximum passband deviation and minimum
stopband value ≅ ∆ ML

• Observe H t (e j (ωc + ∆ω) ) + H t (e j (ωc − ∆ω) ) ≅ 1


• Width of transition band
• Thus, H t (e jωc ) ≅ 0.5
∆ω = ω s − ω p < ∆ ML
• Passband and stopband ripples are the same
5 6
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

1
Fixed Window Functions Fixed Window Functions
• To ensure a fast transition from passband to • In the case of rectangular, Hann, Hamming,
stopband, window should have a very small and Blackman windows, the value of ripple
main lobe width does not depend on filter length or cutoff
• To reduce the passband and stopband ripple frequency ωc , and is essentially constant
δ, the area under the sidelobes should be • In addition,
very small ∆ω ≈ c
M
• Unfortunately, these two requirements are where c is a constant for most practical
contradictory purposes
7 8
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Fixed Window Functions Fixed Window Functions


• Rectangular window - ∆ ML = 4π /(2M + 1) • Filter Design Steps -
Asl = 13.3 dB, α s = 20.9 dB, ∆ω = 0.92π / M (1) Set
• Hann window - ∆ ML = 8π /(2M + 1) ωc = (ω p + ωs ) / 2
Asl = 31.5 dB, α s = 43.9 dB, ∆ω = 3.11π / M (2) Choose window based on specified α s
• Hamming window - ∆ ML = 8π /(2M + 1) (3) Estimate M using
Asl = 42.7 dB, α s = 54.5 dB, ∆ω = 3.32π / M
∆ω ≈ c
• Blackman window - ∆ ML = 12π /(2 M + 1) M
Asl = 58.1 dB, α s = 75.3 dB, ∆ω = 5.56π / M
9 10
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

FIR Filter Design Example


• Lowpass filter of length 51 and ωc = π / 2 FIR Filter Design Example
Lowpass Filter Designed Using Hann window Lowpass Filter Designed Using Hamming window
0 0

• An increase in the main lobe width is


Gain, dB
Gain, dB

-50 -50
associated with an increase in the width of
-100 -100 the transition band
0 0.2 0.4
ω/π
0.6 0.8 1 0 0.2 0.4
ω/π
0.6 0.8 1
• A decrease in the sidelobe amplitude results
Lowpass Filter Designed Using Blackman window
0
in an increase in the stopband attenuation
Gain, dB

-50

-100

0 0.2 0.4 0.6 0.8 1


11 ω/π 12
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

2
Adjustable Window Functions Adjustable Window Functions
• Dolph-Chebyshev Window - • Dolph-Chebyshev window can be designed
M with any specified relative sidelobe level
w[n] = 1 [1γ + 2 ∑ Tk (β cos k ) cos 2nkπ ],
2M + 1 k =1 2M + 1 2M + 1 while the main lobe width adjusted by
−M ≤n≤M choosing length appropriately
where amplitude of sidelobe
γ= • Filter order is estimated using
main lobe amplitude 2.056α s − 16.4
β = cosh( 1 cosh −1 1γ ) N=
2M 2.85( ∆ω)
and
⎧ cos(l cos −1 x ), x ≤1 where ∆ω is the normalized transition
Tl ( x) = ⎨ −1 bandwidth, e.g, for a lowpass filter
⎩cosh(l cosh x), x > 1 ∆ω = ωs − ω p
13 14
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Adjustable Window Functions Adjustable Window Functions


• Gain response of a Dolph-Chebyshev Properties of Dolph-Chebyshev window:
window of length 51 and relative sidelobe • All sidelobes are of equal height
level of 50 dB is shown below • Stopband approximation error of filters
Dolph-Chebyshev Window designed have essentially equiripple
0 behavior
-20
• For a given window length, it has the
Gain, dB

-40
smallest main lobe width compared to other
-60 windows resulting in filters with the
-80
0 0.2 0.4 0.6 0.8 1
smallest transition band
ω/π
15 16
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Adjustable Window Functions Adjustable Window Functions


• Kaiser Window - • β controls the minimum stopband
2 attenuation of the windowed filter response
I 0{β 1 − ( n / M ) }
w[n] = , −M ≤n≤M • β is estimated using
I 0 (β)
⎧⎪ 0.1102( α s −8.7 ), for α s > 50
where β is an adjustable parameter and I 0 (u )
β= ⎨0.5842( α s − 21)0.4 + 0.07886( α s − 21), for 21 ≤ α s ≤ 50
is the modified zeroth-order Bessel function
⎪⎩ 0, for α s < 21
of the first kind: ∞ (u / 2) r
I 0 (u ) = 1 + ∑ [ ]2 • Filter order is estimated using
r! αs − 8
r =1 N=
• Note I 0 (u ) > 0 for u > 0 2.285(∆ω)
20 (u / 2) r where ∆ω is the normalized transition
• In practice I 0 (u ) ≅ 1 + ∑ [ ]2 bandwidth
17 r =1 r! 18
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

3
FIR Filter Design Example FIR Filter Design Example
• Specifications: ω p = 0.3π , ωs = 0.5π , sin(0.4π n)
• Hence ht [ n] = πn ⋅ w[n], − 12 ≤ n ≤ 12
α s = 40 dB
where w[n] is the n-th coefficient of a
• Thus ωc = (ω p + ωs ) / 2 = 0.4π
length-25 Kaiser window with β = 3.3953
δ s = 10−α s / 20 = 0.01 Kaiser Window Lowpass filter designed with Kaiser window

β = 0.5842(19)0.4 + 0.07886 × 19 = 3.3953 0 0

32 -20 -20

N= = 22.2886

Gain, dB
Gain, dB
2.285(0.2π)
-40 -40

-60 -60

• Choose N = 24 implying M =12 -80


0 0.2 0.4 0.6 0.8 1
-80
0 0.2 0.4 0.6 0.8 1
ω/π ω/π

19 20
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Impulse Responses of FIR Filters


with a Smooth Transition Impulse Responses of FIR Filters
with a Smooth Transition
• First-order spline passband-to-stopband
transition • Pth-order spline passband-to-stopband
transition
ωc = (ω p + ωs ) / 2
⎧ ωc / π, n=0
∆ω = ωs − ω p ⎪
hLP [n] = ⎨⎛ 2 sin(∆ω n / 2 P) ⎞ P sin(ωc n)
⎪⎩⎜⎝ ∆ω n / 2 P ⎠⎟ ⋅ π n n >0
⎧⎪ ωc / π, n=0
hLP [n] = ⎨ 2 sin( ∆ω n / 2) sin(ωc n)
⎪⎩ ⋅ πn n >0
∆ω n
21 22
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Lowpass FIR Filter Design


Example
• Example

1 P = 1, N = 40
P = 2, N = 60
0.8
Magnitude

0.6
0.4
0.2

0
0 0.2 0.4 0.6 0.8 1
ω/π

23
Copyright © 2005, S. K. Mitra

You might also like