y0 bx0 À ayÀ1 b,
y1 bx1 À ay0 Àay0 Àab,
y2 bx2 À ay1 Àay1 a
2
b,
. . .
In general, we have
hn yn À1
n
a
n
b, n 0, 1, 2, . . . , I:
3:2:17
This system has infinite impulse response hn if the coefficients a and b are non-zero. This
system is called an IIR system (or filter). In theory, we can calculate an IIR filter output
yn using either the convolution equation (3.2.14) or the I/O difference equation (3.2.16).
However, it is not computationally feasible using (3.2.14) for the impulse response hn
given in (3.2.17), because we cannot deal with an infinite number of impulse response
coefficients. Therefore we must use an I/O difference equation such as the one defined in
(3.2.16) for computing the IIR filter output in practical applications.
The I/O equation of the IIR system given in (3.2.16) can be generalized with the
difference equation
yn b
0
xn b
1
xn À 1 Á Á Á b
LÀ1
xn À L 1 À a
1
yn À 1 À Á Á Á À a
M
yn À M
LÀ1
l0
b
l
xn À l À
M
m1
a
m
yn À m:
3:2:18
This IIR system is represented by a set of feedforward coefficients fb
l
, l 0,
1, . . . , L À 1g and a set of feedback coefficients fa
m
, m 1, 2, . . . , Mg. Since the
outputs are fed back and combined with the weighted inputs, this system is an example
of the general class of feedback systems. Note that when all a
m
are zero, Equation
(3.2.18) is identical to (3.1.16). Therefore an FIR filter is a special case of an IIR filter
without feedback coefficients. An FIR filter is also called a non-recursive filter.
The difference equation of IIR filters given in (3.2.18) can be implemented using the
MATLAB function filter as follows:
yn filter(b, a, xn);
where the vector b contains feedforward coefficients fb
l
, l 0, 1, . . . , L À 1g and the
vector a contains feedback coefficient fa
m
, m 1, 2, . . . , Mg. The signal vectors, xn
and yn, are the input and output buffers of the system. The FIR filter defined in (3.1.16)
can be implemented using MATLAB as
yn filter(b, 1, xn);
Assuming that L is large enough so that the oldest sample xn À L can be approxi-
mated using its average, yn À 1. The moving-average filter defined in (3.2.2) can be
simplified as
yn 1 À
1
L
yn À 1
1
L
xn 1 À ayn À 1 axn,
3:2:19
INTRODUCTION TO DIGITAL FILTERS
89