Page 388 - Analog and Digital Filter Design
P. 388
Digital FIR Filter Design 38
to arrange the equations so those tap coefficients up to the ”zero time” sample
are calculated. For an odd number of taps, these coefficients are h(0) to
A([lV- 1]/2), where h(0) is the first sample and h(N- 1) is the last. The remaining
tap coefficients can be equated to corresponding values either side of the “zero
time” sample, thus: h(0) = h(N- 1); /?(I) = h(N- 2); h(2) = h(N- 3); and so forth.
Filters with an odd number of taps have the “zero rime” coefficient occurring
at h([N- 11/21. On either side of this tap we have h([N- 1]/2 - 1) = h([N- 1]/1
+ 1). For example, if N= 21, the “zero time” coefficient is h(10). On either side
of this, the coefficient of h(9) equals that of h(1 l), the coefficient of k(8) equals
i1(12), and so on.
For filter with an even number of taps, there is no tap at h([N - 1]/2), nor is
there ip “zero time” coefficient. However, there are taps symmetrically on either
side of this point, at h([N - 2]/2) and h([N - 23/2 + 1). For example, if N = 20,
the coefficient of h(9) equals that of h(10). “Zero time” is midway between h(9)
and h( 10).
Window Types
1 Rectangular Window
The rectangular window has a value of unity over the whole of its length. The
sinc(x) function is used for the filter coefficients, but outside the window they
are set to zero.
Using the rectangular window, the first side-lobe stopband attenuation is limited
to 13.2dB, increasing by 6dB per octave at higher frequencies.
2 Triangular (Bartlett) Window
The triangular window has coefficients that decrease linearly on either side of
the zero time value. The first side-lobe stopband attenuation is limited to 27 dB
for this window, which increases by 12dB per octave for higher frequencies. One
way of calcuiating the tap coefficients is to simply scale the values so that they
end up at zero:
k(~ 1.0 - /nl/(N - 1) ‘2,
j
=
i~ = -(N - 1)/2, - (N - 3),’2,. . . - 1,0,1, ~. . (N - 3),‘2, (N - 1)/’2.
The value of h(rz) falls by 0.1 per tap, either side of the zero time coefficient
(which has a value of 1). At the window edge, when n = -(N - 1)/2 and
(N - 1)/2, the window coefficient is equal to zero. This is a waste of computing

