Example 4.15: Consider the difference equation of IIR filter defined as
yn xn yn À 1 À 0:9yn À 2:
4:3:19a
This is equivalent to the IIR filter with the transfer function
Hz
1
1 À z
À1
0:9z
À2
:
4:3:19b
The MATLAB script to analyze the magnitude and phase responses of this IIR
filter is listed (exam 4_15.m in the software package) as follows:
b [1]; a [1, À1, 0.9];
[H, w ] freqz(b, a, 128);
magH abs(H); angH angle(H);
subplot(2, 1, 1), plot(magH), subplot(2, 1, 2), plot(angH);
The MATLAB function abs(H)returns the absolute value of the elements of H
and angle(H)returns the phase angles in radians.
A simple,but useful,method of obtaining the brief frequency response of an LTI
system is based on the geometric evaluation of its pole±zero diagram. For example,
consider a second-order IIR filter expressed as
Hz
b
0
b
1
z
À1
b
2
z
À2
1 a
1
z
À1
a
2
z
À2
b
0
z
2
b
1
z b
2
z
2
a
1
z a
2
:
4:3:20
The roots of the characteristic equation
z
2
a
1
z a
2
0
4:3:21
are the poles of the filter,which may be either real or complex. For complex poles,
p
1
re
jy
and p
2
re
Àjy
,
4:3:22
where r is radius of the pole and y is the angle of the pole. Therefore Equation (4.3.20)
becomes
z À re
jy
À
Á
z À re
Àjy
À
Á
z
2
À 2r cos y r
2
0:
4:3:23
Comparing this equation with (4.3.21),we have
r
a
2
p
and y cos
À1
Àa
1
=2r
:
4:3:24
The filter behaves as a digital resonator for r close to unity. The system with a pair of
complex-conjugated poles as given in (4.3.22) is illustrated in Figure 4.10.
150
FREQUENCY ANALYSIS