C9 · Lesson 39 · Frequency response from poles and zeros
Reading a digital filter's response off the z-plane
Walk around the unit circle from z = 1 (DC) to z = −1 (half the sample rate), and at each point measure the distances to a filter's zeros and poles. The gain there is the product of the zero distances divided by the product of the pole distances. That's the whole of digital filter intuition: put a zero on the circle and the response drops to nothing at that frequency; put a pole just inside the circle and the response peaks. A notch filter that removes 60 Hz hum and leaves everything else alone is two zeros and two poles placed this way.
- A notch filter: zeros on the unit circle at angle , and poles just inside, at radius r on the same angles. The curve is its gain from ω = 0 to π.
- The zeros force the gain to exactly zero at . Away from , each pole is almost as far from the point as its zero, so the gain is close to 1.
- Push r toward 1: the notch narrows, about 2(1 − r) radians wide. Pull r down and the notch widens and the gain elsewhere sags.
Predict
A filter has a zero exactly on the unit circle at angle ω₀. What happens to a sinusoid at frequency ω₀?
It's removed: on the unit circle at , the distance to that zero is 0, so the product of zero distances, and the gain, is 0. Zeros on the circle are how FIR and notch filters make exact nulls.
Name it
The geometric picture
Factor (times a power of z, which only adds linear phase). At :
the product of distances from the point on the circle to the zeros over the product of distances to the poles. So:
- a zero on the circle makes an exact null at its angle;
- a pole near the circle makes a peak at its angle, sharper the closer it is;
- poles and zeros near the origin barely matter, since all points on the circle are about equally far from them.
The notch filter
with zeros at and poles at . Its notch is about radians wide at the −3 dB points, which is in hertz.
All-pass and minimum phase
A pole at a and a zero at have distances in a fixed ratio from every point on the circle, so has everywhere: an all-pass filter, which only changes phase. Moving a zero from inside the circle to its mirror position outside leaves the magnitude's shape unchanged but adds phase lag; a filter with all its zeros inside is minimum phase, the one with the least delay for its magnitude.
Worked example
Design a notch for 60 Hz hum at 1 kHz sampling, with r = 0.98.
Show the solution
- Notch frequency. so .
- Transfer function.
- Width and DC gain. The notch is about 2(0.02) = 0.04 rad, or 6.4 Hz, wide, and the gain at DC is 1.017.
Answer , a notch about 6.4 Hz wide with a DC gain of 1.017.
Worked example
Show that is all-pass.
Show the solution
- At z = 1.
- At z = −1.
- In general. The numerator's size is which equals because the two are complex conjugates. So the ratio's magnitude is 1 at every ω.
- Phase, pole and zero. Its phase runs from 0 at DC to −π at ω = π. The pole is at 0.5 and the zero at 1/0.5 = 2.
Answer its magnitude is 1 at every ω, so it's all-pass.
Worked example
A filter has a zero at z = −1 and a pole at z = 0.9. Find its gain at ω = 0 and π, and the scale factor for unity DC gain.
Show the solution
- Transfer function.
- At ω = 0 (z = 1).
- At ω = π (z = −1). The zero makes it 0.
- Scale for unity DC gain. Multiplying by 1/20 = 0.05 gives a low-pass with unity DC gain and a perfect null at half the sample rate: the zero kills the highest frequency, and the pole near z = 1 boosts the lowest.
Answer a gain of 20 at ω = 0 and 0 at π; a scale factor of 0.05 gives unity DC gain.
Check
A notch filter removes 60 Hz from data sampled at 1000 Hz.
(a)
At what angle do its zeros sit?
Write units the way you normally would: 1.5 rad and 1500 mrad are the same answer.
(b)
What is the coefficient of its numerator?
Check
A notch filter has its poles at radius 0.98, at a sample rate of 1000 Hz. About how wide is the notch, in hertz?
Write units the way you normally would: 1.5 Hz, 1500 mHz and 0.0015 kHz are the same answer.
Check
A notch at ω₀ = 1 rad has poles at radius 0.9. What is its gain at DC?
Check
. What is its gain at ω = π/2?
Check
.
(a)
What is its gain at ω = 0.5?
(b)
Where is its zero?
Check
An FIR filter is .
(a)
What is its gain at DC?
(b)
At what lowest positive ω does it have a null?
Write units the way you normally would: 1.5 rad and 1500 mrad are the same answer.
Check
Two FIR filters have the same magnitude response. One has all its zeros inside the unit circle; the other has some reflected outside. What's different?
Check
A notch removes 60 Hz at 500 Hz, with poles at radius 0.98.
(a)
What is the numerator's middle coefficient (with a minus sign in front)?
(b)
And the denominator's?
Check
A one-pole low-pass has its pole at z = 0.9 and runs at 1000 Hz.
(a)
What is its gain at ω = 0, unscaled?
(b)
About where is its −3 dB corner, using ?
Write units the way you normally would: 1.5 Hz, 1500 mHz and 0.0015 kHz are the same answer.
Explain why
Why does a pole just inside the unit circle make a sharp peak in the frequency response?
The gain at each frequency divides by the distance from the point on the circle to each pole. When a pole sits very close to the circle, that distance becomes tiny as the point passes the pole's angle, so the gain there becomes large, and it falls off quickly as the point moves away and the distance grows. The closer the pole to the circle, the smaller the minimum distance and the faster it grows on either side: a taller, narrower peak. That's resonance: in the time domain the same pole gives a slowly decaying oscillation at that frequency.
Practice
Keep practicing
11 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.