Documente Academic
Documente Profesional
Documente Cultură
The desired frequency response Hd(ejω) of a filter is periodic in frequency and can be
expanded using Fourier series. The resultant series is
∞
H d (e jω ) = ∑ h ( n) e
n = −∞
d
− jωn
where
π
1
∫π H (e
jω
hd (n) = )
2π −
One possible way of obtaining FIR filter is to truncate the infinite Fourier series at n = ±
(N-1)/2, where N is the length of the desired sequence.
But abrupt truncation results in oscillation in the passband and stopband. These
oscillations are due to slow convergence of the Fourier series and this effect is known as
Gibbs phenomenon.
To reduce these oscillations, the Fourier coefficients of the filter are modified by
multiplying the infinite impulse response with a finite weighing sequence w(n) called as
window, where
After multiplying window sequence w(n) and hd(n), we get a finite duration sequence
h(n) that satisfies the desired magnitude response
The frequency response H(ejω) of the filter can be obtained by convolution of Hd(ejω) and
W(ejω) given by
1
H ( e jω ) =
2π ∫ H d (e jθ )W (e j (ω −θ ) )dθ
Impulse response
Hd(ejω)
1.0
-ωc ωc ω
Impulse sequence
hd(n)
-π π
-2π/N 2π/N
Window sequence
w(n)
n
Filter response
H(ejω)
0 ω
Filter impulse
h(n) = hd(n) w(n)
-(N-1)/2 (N-1)/2
n
Delayed sequence
g(n)
0 N-1
n
Note: We find that the frequency response of the filter H(ejω) depends on the frequency
response of window W(ejω). Therefore, the window, chosen for truncating the infinite
impulse response should have some desirable characteristics. They are
1. The central lobe of the frequency response of the window should contain most of
the energy and should be narrow.
2. The highest side lobe level of the frequency response should be small.
3. The side lobes of the frequency response should decrease in energy rapidly as ω
tends to π.
Rectangular window:
N −1
2
WR (e jω ) = ∑e N −1
− j ωn
n=−
2
N −1 N −1
jω − jω
2 jω − jω 2
=e + ........... + e +1 + e + ........... + e
N −1
jω
=e 2
[1 + e − jω
+ ............. + e − jω ( N −1) ]
jω
N −1
2
1 − e
− jωN
=e 1 − e − jω
N
jω
e 2
(1 − e − jωN )
= 1
jω
e 2
(1 − e − jω )
N N
jω − jω
2 2
e −e
= 1 1
jω − jω
2 2
e −e
ωN
sin
= 2
ω
sin
2
-12 12
Frequency response of rectangular window for N= 25
WR(ejω)
1.0
-1 1
-2π/N 2π/N
|WR(ejω)|dB
0
-13dB
0 0.5 1
Normalized frequency ω/π
To get a finite impulse response filter we multiply hd(n) with a rectangular window, i.e.,
h(n) = hd(n)wR(n)
The frequency response of the truncated filter can be obtained by periodic convolution,
1
2π ∫
H ( e jω ) = H d (e jθ )WR (e j (ω −θ ) )dθ
|H(ejω)|
1.0
0 1
Normalized frequency ω/π
Log magnitude response of LPF using rectangular window for N = 25
|H(ejω)|dB
0
-21dB
0 0.5 1
Normalized frequency ω/π
Note:
The Gibbs phenomenon can be reduced by using a less abrupt truncation of filter
coefficients. This can be achieved using a window function that tapers smoothly towards
at both ends, eg: Triangular window.
Triangular or Bartlett window:
2| n | ( N − 1) ( N − 1)
wT (n) =1 − ; − ≤n≤
N −1 2 2
wT(n)
N=25,
n
-12 12
2
N −1
sin ω
jω
WT (e ) = 4
ω
sin
2
WT(ejω)
1.0
-1 1
-4π/N 4π/N
Log magnitude response of Triangular window for N = 25
|WT(ejω)|dB
0
-27dB
0 0.5 1
Normalized frequency ω/π
To get a finite impulse response filter we multiply hd(n) with a rectangular window, i.e.,
The frequency response of the truncated filter can be obtained by periodic convolution,
1
H (e jω ) =
2π ∫ H d (e jθ )WT (e j (ω −θ ) )dθ
0 1
Normalized frequency ω/π
0 0.5 1
Normalized frequency ω/π
Due to the following reasons, the triangular window is not usually a good choice.
1. Transition region is more
2. Stopband attenuation is very less
Raised Cosine Window:
The raised cosine window multiplies the central Fourier coefficients by approximately
unity and smoothly truncate the Fourier coefficients toward the ends of the filter.
N −1
2
2πn − jωn
Wα (e jω ) = ∑
N −1
α + (1 − α ) cos
N − 1
e
n=−
2
ωN ωN πN ωN πN
sin (1 − α ) sin − (1 − α ) sin +
=α 2 + 2 N −1
+ 2 N −1
ω ω π ω π
sin 2 sin − 2 sin +
2 2 N −1 2 N −1
Hanning window:
The Hanning window sequence can be obtained by substituting α = 0.5 in the Raised
Cosine function.
ωN ωN πN ωN πN
sin sin − sin +
WHn (e jω ) = 0.5 2 + 0.25 2 N −1
+ 0.25 2 N −1
ω ω π ω π
sin sin − sin +
2 2 N −1 2 N −1
Hanning window sequence
wHn(n)
N=25,
n
-12 12
WHn(ejω)
1.0
-1 1
-4π/N 4π/N
Log magnitude response of Hanning window for N = 25
|WHn(ejω)|dB
0
-32dB
0 0.5 1
Normalized frequency ω/π
To get a finite impulse response filter we multiply hd(n) with a rectangular window, i.e.,
h(n) = hd(n)wHn(n)
The frequency response of the truncated filter can be obtained by periodic convolution,
1
2π ∫
H (e jω ) = H d (e jθ )WHn (e j (ω −θ ) )dθ
|H(ejω)|
1.0
0 1
Normalized frequency ω/π
|H(ejω)|dB
0
-44dB
0 0.5 1
Normalized frequency ω/π
The equation for Hamming window is obtained by substituting α = 0.54 in the Raised
Cosine function.
ωN ωN πN ωN πN
sin sin − sin +
WH (e jω ) = 0.54 2 + 0.23 2 N −1
+ 0.23 2 N −1
ω ω π ω π
sin sin − sin +
2 2 N −1 2 N −1
wH(n)
N=25,
n
-12 12
WH(ejω)
1.0
-1 1
-4π/N 4π/N
Log magnitude response of Hamming window for N = 25
|WH(ejω)|dB
0
-43dB
0 0.5 1
Normalized frequency ω/π
To get a finite impulse response filter we multiply hd(n) with a rectangular window, i.e.,
h(n) = hd(n)wH(n)
The frequency response of the truncated filter can be obtained by periodic convolution,
π
1
2π −∫π
H (e jω ) = H d (e jθ )WH (e j (ω −θ ) )dθ
|H(ejω)|
1.0
0 1
Normalized frequency ω/π
|H(ejω)|dB
0
-53dB
0 0.5 1
Normalized frequency ω/π
Note: Additional cosine terms reduces the side lobes but main lobe width is increased.
N=25,
n
-12 12
WB(ejω)
1.0
-1 1
-6π/N 6π/N
Normalized frequency ω/π
Log magnitude response of Blackman window for N = 25
|WB(ejω)|dB
0
-58dB
0 0.5 1
Normalized frequency ω/π
To get a finite impulse response filter we multiply hd(n) with a rectangular window, i.e.,
h(n) = hd(n)wB(n)
The frequency response of the truncated filter can be obtained by periodic convolution,
π
1
2π −∫π
H (e jω ) = H d (e jθ )WB (e j (ω −θ ) )dθ
|H(ejω)|
1.0
0 1
Normalized frequency ω/π
|H(ejω)|dB
0
-74dB
0 0.5 1
Normalized frequency ω/π
Comparison of different types of windows
Window type Main lobe width Highest side lobe Minimum stopband
level attenuation