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

C9 · Lesson 40 · Inverse systems and deconvolution

Undoing a system's effect, when it's possible, and what it costs in noise when it barely is

A phone call through a room adds an echo; a cable smears a data signal's pulses; a camera blurs an image; a sensor responds slowly. Each is an LTI system, and the natural wish is to apply its inverse and get the original back. Lesson 39 drew systems as poles and zeros, and the inverse simply swaps them: zeros become poles. That's the whole difficulty. A zero outside the unit circle becomes an unstable pole, and a zero near the circle, where the system nearly kills a frequency, becomes a pole that amplifies whatever noise is there enormously. Engineering inverses means deciding how much to undo.

  • A channel with an echo, H(z)=1+az−D, and its inverse, 1/H(z), plotted as gain in dB against frequency. The echo makes a comb of peaks and notches; the inverse is its mirror image.
  • As a approaches 1, the channel's notches deepen toward zero gain and the inverse's peaks shoot up: any noise at those frequencies is amplified by the same amount.

Predict

A channel is H(z)=1−2z−1. Can a causal, stable filter undo it exactly?

Name it

The inverse system

If H(z) has zeros zk and poles pk, then H−1(z)=1/H(z) has poles at zk and zeros at pk. Cascading them gives H(z)H−1(z)=1: the signal comes back exactly. A causal inverse is stable only if every zero of H is inside the unit circle.

Minimum phase

A system whose poles and zeros are all inside the unit circle is minimum phase, and it has a causal, stable inverse. Any rational system can be split as

H(z)=Hmin(z)Hap(z)

a minimum-phase part times an all-pass part (lesson 39's flat-magnitude section): reflect each outside zero zk to 1/zk* and absorb the difference into the all-pass. The minimum-phase part has the same magnitude response, so 1/Hmin equalizes the magnitude perfectly, leaving only the all-pass phase distortion.

Echoes

An echo of strength a and delay D samples, H(z)=1+az−D, has D zeros on a circle of radius |a|1/D. If |a|<1 it's minimum phase, and its inverse is the recursion

w[n]=y[n]−aw[n−D]

which removes the echo exactly.

Noise and regularization

Real signals carry noise. Where |H| is small, the inverse's gain 1/|H| is large, and so is the noise it amplifies. A regularized inverse limits that:

G(ejω)=H*(ejω)|H(ejω)|2+λ

It behaves like 1/H where |H|2≫λ and rolls off where |H| is tiny; its gain never exceeds 1/(2λ). Choosing λ from the noise level gives the Wiener deconvolution filter.

Worked example

A telephone line adds an echo half as strong as the direct signal, 40 samples later: y[n]=x[n]+0.5x[n−40]. Write the inverse and check that it removes the echo.

Show the solution
  1. Zeros of the echo. H(z)=1+0.5z−40 has zeros at radius 0.51/40 = 0.983: inside the circle, so it's minimum phase.
  2. The inverse. w[n]=y[n]−0.5w[n−40]
  3. Check it. Substituting: w[n]=x[n]+0.5x[n−40]−0.5w[n−40] and if w=x up to now, w[n]=x[n] again.
  4. The cost. Its gain swings between 1/1.5 and 1/0.5 = 2, 6 dB of boost at the echo's notches: noise at those frequencies doubles.

Answer the inverse is w[n]=y[n]−0.5w[n−40], which gives back x exactly, at the cost of up to 6 dB of noise boost at the echo's notches.

Worked example

Split H(z)=1−2z−1 into a minimum-phase part and an all-pass part, and give a stable magnitude equalizer.

Show the solution
  1. Reflect the zero. Move the zero at 2 to 1/2: Hmin(z)=2−z−1=2(1−0.5z−1)
  2. Same magnitude. It has the same magnitude as H at every frequency, since |1−2e−jω|=2|1−0.5ejω|
  3. All-pass part. This has unit magnitude: Hap=1−2z−12−z−1
  4. Equalizer. It's stable and flattens the magnitude: 1/Hmin=0.51−0.5z−1
  5. What's left. The phase of Hap remains, which matters for data but not for, say, a loudspeaker's tonal balance.

Answer Hmin=2−z−1 and Hap=(1−2z−1)/(2−z−1), and the stable equalizer is 0.5/(1−0.5z−1).

Worked example

A sensor's response falls to |H| = 0.05 at high frequencies, where the measurement noise lives. Compare the plain inverse's gain there with a regularized inverse using λ = 0.01, and give the regularized filter's largest gain.

Show the solution
  1. Plain inverse. 1/0.05=20 or 26 dB of noise gain.
  2. Regularized inverse. |G|=0.05/(0.0025+0.01)=4 or 12 dB.
  3. Largest gain. It's reached where |H|=λ = 0.1: 1/(20.01)=5
  4. Below that point. The filter gives up on restoring the signal, because there's more noise than signal to restore.

Answer the plain inverse's gain there is 20 (26 dB) and the regularized one's is 4 (12 dB); the regularized filter's largest gain is 5.

Check

A channel adds an echo of strength 0.5. What's the largest gain of its inverse, in dB?

Check

An echo channel 1+az−D has a = 0.5 and D = 4. On what radius do its zeros lie?

Check

Where a system's gain is 0.05, what's the gain of a regularized inverse with λ = 0.001, in dB?

Check

What's the largest gain any frequency can get from a regularized inverse with λ = 0.001?

Check

A channel is H(z)=1−2z−1.

(a)

Reflect its zero inside the unit circle. Where is the minimum-phase zero?

(b)

What gain c makes Hmin(z)=c(1−z−1/2) have the same magnitude as H at every frequency?

Check

Which systems have a causal, stable inverse?

Check

Remove an echo. With x = numpy.random.default_rng(seed).standard_normal(2000), the channel output is y[n] = x[n] + a*x[n - D] (zero before the start). Write dereverb(y, a, D) implementing the inverse recursion and set err to the largest absolute difference from x. Then add noise, y2 = y + 0.01*numpy.random.default_rng(seed + 100).standard_normal(2000), invert it, and set noise_gain, the RMS of the error divided by the RMS of the added noise.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Explain why

A camera's motion blur is a known LTI filter, but dividing the blurred image's spectrum by the blur's spectrum gives a picture buried in speckle. Explain why, and how a regularized inverse helps.

Practice

Keep practicing

8 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.