Professional Documents
Culture Documents
Impulse Responses of Ideal Filters
Impulse Responses of Ideal Filters
Impulse Responses of Ideal Filters
Filters
• Ideal lowpass filter -
sin c n
hLP [n] n , n
1 (c 2 c1 ) ,
n 0
hBS [n]
sin(c1n) sin(c 2 n)
n n , n 0
Gibbs Phenomenon
• Gibbs phenomenon - Oscillatory behavior in
the magnitude responses of causal FIR filters
obtained by truncating the impulse response
coefficients of ideal filters
1.5
N = 20
N = 60
1
Magnitude
0.5
0
0 0.2 0.4 0.6 0.8 1
/
Gibbs Phenomenon
• As can be seen, as the length of the lowpass
filter is increased, the number of ripples in
both passband and stopband increases, with
a corresponding decrease in the ripple
widths
• Height of the largest ripples remain the
same independent of length
• Similar oscillatory behavior observed in the
magnitude responses of the truncated
versions of other types of ideal filters
Gibbs Phenomenon
• Gibbs phenomenon can be explained by
treating the truncation operation as a
windowing operation:
ht [n] h[n] w[n]
• In the frequency domain
j 1 j j ( )
H t (e ) d
H ( e ) ( e ) d
2
j j
• where H t (e ) and ( e ) are the DTFTs
of h [n] and w[n] , respectively
t
Gibbs Phenomenon
j
• Thus tH ( e ) is obtained by a periodic
continuous convolution of H d (e j ) with
j
(e )
Gibbs Phenomenon
• If (e j ) is a very narrow pulse centered at
0 (ideally a delta function) compared to
variations in H d (e j ), then H t (e j ) will
j
approximate H d (e ) very closely
• Length 2M+1 of w[n] should be very large
• On the other hand, length 2M+1 of ht [n]
should be as small as possible to reduce
computational complexity
Gibbs Phenomenon
• A rectangular window is used to achieve
simple truncation:
1, 0 n M
wR [n]
0, otherwise
j
• Presence of oscillatory behavior in H t (e )
is basically due to:
– 1) hd [n] is infinitely long and not absolutely
summable, and hence filter is unstable
– 2) Rectangular window has an abrupt transition
to zero
Gibbs Phenomenon
• Rectangular window has an abrupt transition
to zero outside the range M n M , which
results in Gibbs phenomenon in H t (e j )
• Gibbs phenomenon can be reduced either:
(1) Using a window that tapers smoothly to
zero at each end, or
(2) Providing a smooth transition from
passband to stopband in the magnitude
specifications
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
/ /
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
/ /
Fixed Window Functions
• Magnitude spectrum of each window is
characterized by a main lobe centered at
= 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( c 2 ) j( c 2 )
• Observe Ht (e ) H t (e ) 1
jc
• 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
Gain, dB
Gain, dB
-50 -50
-100 -100
-50
-100
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
/ /