C939 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

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 ±ω0, 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 ω0. Away from ω0, 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 ω₀?

Name it

The geometric picture

Factor H(z)=b0∏k(z−zk)∏k(z−pk) (times a power of z, which only adds linear phase). At z=ejω:

|H(ejω)|=|b0|∏k|ejω−zk|∏k|ejω−pk|

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

H(z)=1−2cos⁡ω0z−1+z−21−2rcos⁡ω0z−1+r2z−2

with zeros at e±jω0 and poles at re±jω0. Its notch is about 2(1−r) radians wide at the −3 dB points, which is (1−r)fs/π in hertz.

All-pass and minimum phase

A pole at a and a zero at 1/a* have distances in a fixed ratio from every point on the circle, so (z−1−a*)/(1−az−1) has |H|=1 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
  1. Notch frequency. ω0=2π⋅60/1000=0.377rad so 2cos⁡ω0=1.860.
  2. Transfer function. H(z)=1−1.860z−1+z−21−1.822z−1+0.960z−2
  3. 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 H(z)=(1−1.860z−1+z−2)/(1−1.822z−1+0.960z−2), a notch about 6.4 Hz wide with a DC gain of 1.017.

Worked example

Show that H(z)=(z−1−0.5)/(1−0.5z−1) is all-pass.

Show the solution
  1. At z = 1. 0.5/0.5=1
  2. At z = −1. −1.5/1.5=−1
  3. In general. The numerator's size is |e−jω−0.5|=|1−0.5ejω| which equals |1−0.5e−jω| because the two are complex conjugates. So the ratio's magnitude is 1 at every ω.
  4. 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
  1. Transfer function. H(z)=1+z−11−0.9z−1
  2. At ω = 0 (z = 1). 2/0.1=20
  3. At ω = π (z = −1). The zero makes it 0.
  4. 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 z−1 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

H(z)=(z−−0.8)/(z−0.6). What is its gain at ω = π/2?

Check

H(z)=(z−1−0.8)/(1−0.8z−1).

(a)

What is its gain at ω = 0.5?

(b)

Where is its zero?

Check

An FIR filter is H(z)=1+z−3.

(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 ω≈1−r?

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?

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.