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, , and its inverse, , plotted as gain in dB against frequency. The echo makes a comb of peaks and notches; the inverse is its mirror image.
- As 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 . Can a causal, stable filter undo it exactly?
The channel's zero at = 2 becomes the inverse's pole at = 2, and a causal system with a pole outside the unit circle is unstable: its impulse response is . A stable inverse exists only if it's allowed to be anticausal (running backward in time, possible offline), or if we settle for equalizing the magnitude with the minimum-phase system , whose inverse is stable.
Name it
The inverse system
If has zeros and poles , then has poles at and zeros at . Cascading them gives : the signal comes back exactly. A causal inverse is stable only if every zero of 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
a minimum-phase part times an all-pass part (lesson 39's flat-magnitude section): reflect each outside zero to and absorb the difference into the all-pass. The minimum-phase part has the same magnitude response, so equalizes the magnitude perfectly, leaving only the all-pass phase distortion.
Echoes
An echo of strength and delay samples, , has zeros on a circle of radius . If it's minimum phase, and its inverse is the recursion
which removes the echo exactly.
Noise and regularization
Real signals carry noise. Where is small, the inverse's gain is large, and so is the noise it amplifies. A regularized inverse limits that:
It behaves like where and rolls off where is tiny; its gain never exceeds . 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: . Write the inverse and check that it removes the echo.
Show the solution
- Zeros of the echo. has zeros at radius = 0.983: inside the circle, so it's minimum phase.
- The inverse.
- Check it. Substituting: and if up to now, again.
- The cost. Its gain swings between and = 2, 6 dB of boost at the echo's notches: noise at those frequencies doubles.
Answer the inverse is , which gives back x exactly, at the cost of up to 6 dB of noise boost at the echo's notches.
Worked example
Split into a minimum-phase part and an all-pass part, and give a stable magnitude equalizer.
Show the solution
- Reflect the zero. Move the zero at 2 to :
- Same magnitude. It has the same magnitude as at every frequency, since
- All-pass part. This has unit magnitude:
- Equalizer. It's stable and flattens the magnitude:
- What's left. The phase of remains, which matters for data but not for, say, a loudspeaker's tonal balance.
Answer and , and the stable equalizer is .
Worked example
A sensor's response falls to = 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
- Plain inverse. or 26 dB of noise gain.
- Regularized inverse. or 12 dB.
- Largest gain. It's reached where = 0.1:
- 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 has = 0.5 and = 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 .
(a)
Reflect its zero inside the unit circle. Where is the minimum-phase zero?
(b)
What gain makes have the same magnitude as 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.
A motion blur averages over a short line, so its frequency response is a sinc that passes through zero, and nearly zero, at many spatial frequencies. Dividing by it multiplies the image's spectrum by , which is enormous at those frequencies. The image has little content there, but the sensor's noise has as much as anywhere, so the division amplifies the noise by huge factors and it dominates the result as speckle. A regularized inverse, , behaves like where the blur passes the signal strongly, and where falls below about it stops trying to restore and turns the gain down. Choosing λ near the noise-to-signal power ratio gives the Wiener filter, which trades a little remaining blur for much less noise.
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.