A Blind Equalizer for SSTV: Constant Modulus Least Squares
// status: seedling
A room adds delayed, filtered copies of a signal to itself (measured here). Undoing that is equalization: find a filter which, applied to what the microphone heard, gives back what the speaker played. The usual way needs a known training signal. A slow-scan TV transmission has almost none, and the picture is exactly the part we do not know. The equalizer in the Modem Lab learns the room from the picture audio anyway, using one fact about it.

Source, the recording decoded as it was (mean error 24.0), and the same recording equalized (12.0).
The one known fact: constant loudness
SSTV is frequency modulation. Whatever the picture, the transmitted signal is one tone of constant amplitude whose pitch moves. In complex baseband it is a point going round a circle of fixed radius.
Add echoes and that stops being true. Each echo is the same phasor a little earlier, at a different angle, so their sum swings in amplitude as the pitch moves. The amount the envelope swings is a direct, picture-independent measure of how much room is in the signal.
That gives a target without a reference: find the filter w whose output y = Xw has constant modulus. Here X holds delayed copies of the microphone signals, one column per filter tap.
Solving it in blocks
The textbook constant-modulus algorithm nudges w after every sample. Started from "pass the signal through unchanged" on these recordings, it made the picture worse: error 29.0, against 24.0 for doing nothing.
What works is the block form. Take the current output, keep its angle and force its length to one, and call that the target:
d = \frac{y}{|y|}, \qquad w \leftarrow \arg\min_w \; \lVert Xw - d \rVert^2 + \lambda \lVert w - w_0 \rVert^2
Each step is an ordinary least-squares problem with a closed-form solution; a handful of iterations settle. The lab's version runs in complex baseband around 1750 Hz at 4 kHz, with 128 ms of taps per microphone, and solves one filter per 8-second block from a 16-second window around it.
Three details decided whether it worked at all:
- Shrink toward something sensible. The penalty pulls w toward w_0, the previous block's filter (or plain pass-through for the first), not toward zero. Pulling toward zero trades echo for attenuation.
- Keep the header on the raw signal. A constant-modulus filter fitted to picture audio is free to do anything to frequencies the picture rarely visits, and it notched 1100–1300 Hz, where the header's mode code lives. Fed equalized audio alone, the decoder sometimes never started. So header detection listens to the microphone as recorded, while line sync and pixels are read from the equalized signal.
- Turn the live room stages off afterwards. The dereverberation and median filtering that help a raw room recording cost about 2.5 points of error on an equalized one.
Two microphones
A phone video carries two channels. They are not independent microphones: on these recordings they correlate at 0.8 to 0.94 with a lag of one or two samples. They still help, because each has its own filter and the solver can use the small difference between them to cancel reflections neither could alone.
| Recording (Martin M2, 158 rows) | Mean error | Gradient correlation |
|---|---|---|
| Over a wire | 7.5 | 0.86 |
| Room, decoded as recorded | 24.0 | 0.01 |
| Room, equalized, one microphone | 14.4 / 14.7 | 0.55 |
| Room, equalized, both microphones | 12.0 | 0.72 |
A later recording of a Martin M1 transmission went from 25.4 to 14.1 with both microphones, and to 16.8 and 20.0 with each one alone. A third, Martin M2 again, reached 11.5.
Gradient correlation is the number to watch. Mean error rewards blur; the correlation between the edges of the decoded and source pictures does not, and it goes from nothing to most of the way back.
A guard that is weaker than it looks
A blind method can be confidently wrong, so each block is checked on audio it was not fitted on: the filter is fitted on the rest of the transmission and kept only if it reduces the envelope's spread on the held-out block to below 0.7 of the raw value. Recordings that are already flat (a wire) are left byte-identical.
That check turned out not to be a quality test. On transmissions with only a few seconds of dark picture, a narrow filter can flatten the envelope without restoring the signal: with the minimum length lowered from four seconds to one, the guard admitted fits that took a clip from error 21.9 to 34.6. The real protection is the floor: no transmission with under four seconds of picture is touched.
Limits
- The microphone has to stay still. The filter describes one path through the room. A hand-held phone walking across the room produced a recording the equalizer refused outright (no block passed).
- It needs the transmission to have happened. In a dropped file that is free. When listening live, the lab tapes each transmission and redevelops the picture when it completes; nothing improves while the picture is still arriving. A causal version fed only past audio managed 24.6 → 15.7 offline, at roughly a second of computation per second of sound, and is not built.
- Cost. A one-minute recording takes about 3.5 s natively and about 5 s as WebAssembly in the page, in bounded slices so the tab stays responsive.
- Where it was tuned. The settings come from one recording. The two later ones agree with it, but that is three recordings, not a proof, and none of them is from a different building.
- Not yet measured: a laptop's single microphone, across a room, live.
Part of the Modem Lab notes · what a room does to an FM picture · a digital copy above the picture · reading a header through a room · back to Notes.
