Page 396 - Analog and Digital Filter Design
P. 396
Digital FIR Filter Design 393
plying M by 2, giving an equation for 2hl; this is exactly what is needed to find
N, because N = 2M + 1.
FIR Filter Coefficient Calculation
An example of how FIR filter coefficients are calculated is shown by the fol-
lowing exercise. Find the coefficients for a bandpass filter (cutoff at wcl and wc->.
The sinc(s) function for a bandpass design is given by the equations:
wc2 - Wl sin(wc,n) - sin(wcln)
h[O] = h[M] =
2T Kn
These must be multiplied by a Window function in order to obtain the coeffi-
cient values. Using the Hann Window:
2;n],
h(n) =0.5+0.5cos [ -
where n = -(iV - 1)/2:. . . -1,O,l,. . . (N - 3)/2,(N - 1)/2
For the center tap of the Vonn Hann Window. where n = 0, h[O] = 1.
oc2 - WCl
h(0) = a h[n] = sin(wcln) By1 - sin(mc,n) . ~.5+o.5cos[~]}
When time-shifted, a filter with N taps will have window edges at n = 0 and n =
N - 1. These modified values can be used in the equation. Note that with some
mathematical manipulation, the second half of the equation changes sign:
[ N+I 1,
sin(wczn) - sin(oclrz) 27G(n+1) 1
h[n] = . 0.5-0.5~0~
rcn
where n = 0, 1, through to (N - 3)/2 and then (N + l)/2 through to N.
Consider the midvalue coefficient for a bandpass sinc(x) function:
The Vonn Hann Window has value h[O] = 1, so the sinc(x) value is unchanged
after multiplying by the Window value. After time-shifting, where n = (N- I)i2?
this becomes:
wc2 -0ct
k[fN - 1)/2] =
r

