Digital Filters
33
multiply-and-accumulate
Finally, the ending lines of the script aim at verifying that the same impulse
response can be obtained by iterated convolution of the 2-nd order impulse
response. The length-11 impulse response is shown in fig. 12.
0
5
10
0
0.1
0.2
samples
h
Figure 12: Impulse response of the length-11 FIR filter
###
2.1.4
Realizations of FIR Filters
The digital filters, especially FIR filters, are implementable as a sequence of
operations "multiply-and-accumulate", often called MAC. In order to run an
N-th order FIR filter we need to have, at any instant, the current input sample
together with the sequence of the N preceding samples. These N samples con-
stitute the memory of the filter. In practical implementations, it is customary
to allocate the memory in contiguous cells of the data memory or, in any case,
in locations that can be easily accessed sequentially. At every sampling instant,
the state must be updated in such a way that x(k) becomes x(k - 1), and this
seems to imply a shift of N data words in the filter memory. Indeed, instead of
moving data, it is convenient to move the indexes that access the data. Consider
the scheme depicted in fig. 13, which represents the realization of an FIR filter
of order 3.
h(0)
h(1)
h(2)
h(3)
x
n
n-2
n-3
n-1
M-1
0
y
Figure 13: Circular buffer that implements a 3-rd order FIR filter