Professional Documents
Culture Documents
Finite Impulse Response (FIR) Digital Filters
Finite Impulse Response (FIR) Digital Filters
Yogananda Isukapalli
1
Ideal Impulse Response Design
p
1
hD [n] = ò D w jnw
H ( ) e dw
2p -p
2
• Ideal Low Pass impulse response design
p
1
We have, hD [n] = ò D w (1)
jnw
H ( ) e dw
2p -p
For the ideal low pass frequency response in Fig 1(a), the
ideal impulse response shown in Fig 1b, is obtained as
follows:
p wc
1 1
ò ò
j wn j wn
hD (n) = 1 ´ e dw = e dw
2p -p 2p -wc
2 f c sin( nwc )
= , n ¹ 0, - ¥ £ n £ ¥
nwc (2)
= 2 fc , n = 0 (using L' Hopital' s rule)
3
Fig 11. (a) Ideal frequency response of a low pass filter (b) Impulse response of the
ideal low pass filter
• The impulse responses of the ideal high pass, band pass and
band stop filters are obtained from the low pass case of eqn (2)
and are summarized in Table 1.
4
Table 11. Summary of ideal impulse responses for standard frequency selective filters
5
• FIR filter design requires the truncation of {h[n]} for
some n = ±M
Overshoot
of 0.09 for
both cases
Fig 2. Low pass filter frequency response for 101 and 151 coefficient designs
n=-20 n=20
Define the “windowed” filter coefficients:
h[n] = {hD [n]}{w[n]}
M
= å h[
n=- M
n ]w[ n ]e - jnw
1, | n |£ M
Truncation is equivalent to a rectangular window: w[n] =
0, otherwise
8
Fig 31. An illustration of how the filter coefficients, h(n), are determined by the window method
9
Windowing: Convolution interpretation
Consider rectangular window design:
h[n] = hD [n - M ]w[n]
ìh [ n - M ] 0 £ n £ 2M
=í D
î 0 otherwise
hD [n - M ] « H D (e jw )e - jwM
w[n] « W (e jw )
w(2 M + 1)
sin( )
W (e jw ) = DFT {w[n]} = 2
w
sin( )
2
H (e jw ) = H D (e jw )e - jwM * W (e jw )
10
Desirable window properties
12
Fig 41. Comparison of the time and frequency domain characteristics of common window functions
(a) rectangular; (b) Hamming; (c) Blackman
Solution:
14
15
• We note that the indices of the filter coefficients run from
-26 to 26. We make the filter causal by adding 26 to each
index so that the indices start at zero.
• The filter coefficients, with indices adjusted, are listed in
Table 3.
Table 31
16
Kaiser Window – Adjustable Window Function
The most widely used adjustable window function is the
Kaiser window function. Kaiser found that a near-optimal
window function could be formed by using the zeroth-
order modified Bessel function of the first kind.
The Kaiser window is given by:
ì I 0 {b 1- ( 2 n / N -1) 2 } - ( N - 1) / 2 £ n £ ( N - 1) / 2
ï I0 ( b )
w[n] = í 0 otherwise
ïî
where I0(.) represents the zeroth-order modified Bessel
function of the first kind given by:
2
L
é ( x / 2) k ù
I o ( x) = 1 + å ê ú where typically, L< 25.
k =1 ë k! û
17
Design Using Kaiser Window Function
contd....
18
Design Using Kaiser Window Function
contd....
Estimation of b and the filter length N=2M+1 for a given
as and transition bandwidth Df is determined empirically.
19
Design Using Kaiser Window Function contd...
1 b=0
0.9 b=3
0.8 b=6,
<-- Amplitude -->
0.7
M=29
0.6
0.5
0.4
0.3
0.2
0.1
0
0 5 10 15 20 25 30
<-- Samples -->
20
Design Using Kaiser Window Function contd...
Taking the fourier transform of the obtained windows we see
from the figures below we notice the tradeoff between the
width of the mainlobe and the amplitude of the sidelobes. If
the window is tapered more, the sidelobes of the fourier
transform become smaller, but the main lobe becomes wider.
-20 -20
-50
-40 -40
-60 -60 -100
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
Normalized frequency (Nyquist == 1) Normalized frequency (Nyquist == 1) Normalized frequency (Nyquist == 1)
100 100 100
Phase (degrees)
Phase (degrees)
Phase (degrees)
0 0
0
-100
-100
-100 -200
-200
-300
-200 -300 -400
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
Normalized frequency (Nyquist == 1) Normalized frequency (Nyquist == 1) Normalized frequency (Nyquist == 1)
21
Design Using Kaiser Window Function Example
• Specification of a Lowpass Filter:
wp= 0.3p, passband edge frequency
ws=0.4 p, stopband edge frequency
as =50dB attenuation
Soln)
22
Design Using Kaiser Window Function Example
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 10 20 30 40 50 60 70
-50
-100
0 0.2 0.4 0.6 0.8 1
Normalized frequency (Nyquist == 1)
100
0
Phase (degrees)
-100
-200
-300
-400
0 0.2 0.4 0.6 0.8 1
Normalized frequency (Nyquist == 1)
23
Design Using Kaiser Window Function Example
0.5
0.4
0.3
0.2
0.1
-0.1
0 10 20 30 40 50 60 70
24
Design Using Kaiser Window Function Example
-20
-40
<-- Gain -->
-60
-80
-100
-120
0 0.2 0.4 0.6 0.8 1
<-- Normalized F requency -->
25
Advantages and disadvantages of the window method
26
References
27