x(n
- L + 2)
x(n
- L + 1)
x(n
- 1)
x(n)
x(n
- 2)
x(n
- 3)
Signal buffer pointer
at time n
Signal buffer pointer
for next x(n)
(a)
b
0
b
1
b
2
b
3
b
L
-1
b
L
-2
Coefficient
buffer pointer
(b)
Figure 5.12 Circular buffers for FIR filter: (a) circular buffer for holding the signals for FIR
filtering. The pointer to xn is updated in the counterclockwise direction, and (b) circular buffer for
FIR filter coefficients, the pointer always pointing to b
0
at the beginning of filtering
buffer. It is also used in sinewave generators and wavetable sound synthesis, where a
stored waveform can be generated periodically by cycling over the circular buffer.
Figure 5.12(b) shows a circular buffer for FIR filter coefficients. Circular buffer
allows the coefficient pointer to wrap around when it reaches to the end of the
coefficient buffer. That is, the pointer moves from b
LÀ1
to b
0
such that the filtering
will always start with the first coefficient.
5.3 Design of FIR Filters
The objective of FIR filter design is to determine a set of filter coefficients fb
l
,
l 0, 1, . . . , L À 1g such that the filter performance is close to the given specifications.
A variety of techniques have been proposed for the design of FIR filters. In this section,
we discuss two direct design methods. The first method is based on truncating the
Fourier series representation of the desired frequency response. The second method is
based on specifying equally spaced frequency samples of the frequency response of the
desired filter.
5.3.1 Filter Design Procedure
The design of digital FIR filters involves five steps:
1. Specification of filter requirements.
2. Calculation and optimization of filter coefficients.
3. Realization of the filter by a suitable structure.
DESIGN OF FIR FILTERS
201