38
D. Rocchesso: Sound Processing
second-order filter
Instead of starting from the transfer function or from the difference equation,
in this case we begin by positioning the two poles in the complex plane at the
point
p
0
= re
j
0
(38)
and at its conjugate point p
0
= re
-j
0
. In fact, if p
0
is not real, the two poles
must be complex conjugate if we want to have a real-coefficient transfer function.
In order to make sure that the filter is stable, we impose |r| < 1. The transfer
function of the second-order filter can be written as
H(z) =
G
(1 - re
j
0
z
-1
)(1 - re
-j
0
z
-1
)
=
G
1 - r(e
j
0
+ e
-j
0
)z
-1
+ r
2
z
-2
=
G
1 - 2 r cos
0
z
-1
+ r
2
z
-2
=
G
1 + a
1
z
-1
+ a
2
z
-2
(39)
where G is a parameter that allows us to control the total gain of the filter.
As usual, we obtain the frequency response by substitution of z with e
j
in
H() =
G
1 - 2 r cos
0
e
-j
+ r
2
e
-2j
.
(40)
If the input is a complex sinusoid at the (resonance) frequency
0
, the output
is, from the first of (39):
H(
0
) =
G
(1 - r)(1 - re
-2j
0
)
=
G
(1 - r)(1 - r cos 2
0
+ j r sin 2
0
)
.
(41)
In order to have a unit-magnitude response at the frequency
0
we have to
impose
|H(
0
)| = 1
(42)
and, therefore,
G = (1 - r) 1 - 2r cos 2
0
+ r
2
.
(43)
The frequency response of this normalized filter is reported in fig. 16 for r = 0.95
and
0
= /6. It is interesting to notice the large step experienced by the phase
response around the resonance frequency. This step approaches as the poles
get closer to the unit circumference.
It is useful to draw the pole-zero diagram in order to gain intuition about
the frequency response. The magnitude of the frequency response is found by
taking the ratio of the product of the magnitudes of the vectors that go from
the zeros to the unit circumference with the product of the magnitudes of the
vectors that go from the poles to the unit circumference. The phase response
is found by taking the difference of the sum of the angles of the vectors start-
ing from the zeros with the sum of the angles of the vectors starting from the
poles. If we move along the unit circumference from dc to the Nyquist rate,
we see that, as we approach the pole, the magnitude of the frequency response
increases, and it decreases as we move away from the pole. Reasoning on the
complex plane it is also easier to figure out why there is a step in the phase
response and why the width of this step converges to as we move the pole
toward the unit circumference. In the computation of the frequency response it