./jerome{m}jack in

~/Notes/A Digital Copy Above the Picture - OFDM Over a Speaker.md · note · seedling · 5 min · updated

A Digital Copy Above the Picture: OFDM Over a Speaker

// status: seedling

Slow-scan television uses the band from 1100 to 2300 Hz, because it was designed for a voice radio. A laptop speaker and a phone microphone pass five times that. The Modem Lab uses the empty space above the picture for a second, digital transmission of the same picture: a compressed file, error-corrected, that arrives exactly or not at all. To a listener it is a hiss on top of the SSTV warble.

Left: the source picture. Middle: the SSTV picture recovered from a phone recording, after room equalization. Right: the digital copy recovered from the same recording, an 8,300-byte WebP returned bit for bit

One phone recording of one transmission: the source, the analogue picture after equalization, and the digital copy.

Built for echoes from the start

The analogue picture fails in a room because each pixel lasts a fraction of a millisecond and the echoes last hundreds (measured here). The digital channel takes the opposite approach: make each symbol far longer than the echoes that matter, and send many slow carriers at once. That is OFDM.

Two streams run side by side, carrying the same bytes:

StreamBandSymbolof which guard
Short6.40–8.39 kHz128 ms43 ms
Long8.46–10.45 kHz256 ms85 ms

The guard interval is a copy of the symbol's own tail placed in front of it, so echoes shorter than the guard land inside the same symbol and only rotate each carrier instead of smearing symbols together. Carriers at 5.6–6.35 kHz and 10.5–11 kHz carry a known sequence; they are how the receiver proves it has found a real transmission and measures the recorder's clock.

Each carrier uses differential QPSK between one symbol and the next. The receiver never estimates the room; it only needs the room to hold still for two consecutive symbols. That choice gives up some capacity and removes the part most likely to go wrong.

The SSTV is turned down from 0.85 to 0.55 of full scale to make headroom (3.8 dB quieter) and low-passed at 3.6 kHz so its skirts stay out of the digital band.

Error correction in three layers

Bits pass through a rate-½, constraint-length-7 convolutional code decoded with soft-decision Viterbi, then Reed-Solomon RS(255, 223) over interleaved bytes, then a CRC-32 over the whole file. The coded bits are scattered across the entire transmission by a fixed permutation, so a carrier that sits in a null of the room, or a second of someone talking, costs a sprinkling of errors everywhere instead of a hole.

What a mode can carry follows from how long its picture takes:

ModeCopy size
Robot 81.1 KB
Robot 365.1 KB
Martin M28.5 KB
Martin M116.5 KB
PD12018.3 KB

One constraint came from the recorder rather than the room. A phone video stores its sound as AAC, which treats a noise-like signal as something it may approximate: in tests with Apple's encoder at 192 kbit/s it held the OFDM carriers to roughly 17–25 dB of signal-to-noise. That is fine for QPSK and rules out denser constellations for anything that has to survive being filmed.

The first real recording

The test file was played through speakers and filmed on a hand-held phone. Before any error correction, about 4% of the bits were wrong (4.3% and 4.1% on the two streams). In simulation the code had held up to about 12%. Each stream alone, and the two combined, returned the 8,300-byte WebP exactly. With one of the phone's two microphones the raw error rate was 6–9% and the file still came back exact, with the Reed-Solomon layer repairing 40-odd bytes on the long stream: thinner margin than the two-microphone number suggests.

The phone's clock ran 36 parts per million fast against the player's. Over a minute that is two milliseconds, enough to matter to a 256 ms symbol's phase, and the known carriers measure and remove it.

A receiver that is told nothing

The receiver gets a recording and no hints. It looks for the start with a correlation against the first symbols of both streams, normalized by the energy in the window; it then checks that the known carriers really carry the known sequence over the first sixteen symbols; and it tries each mode's length until a checksum passes.

The normalization and the second check exist because the first version did neither and failed on the first real recording. The test file began with a loud frequency sweep, a plain correlation locked onto that instead of the transmission, and everything after read as noise.

What the copy is worth

The file arrives bit for bit, but it is a compressed picture, so intact does not mean identical to the original. Against the source, with the browser's own WebP encoder:

ModeCopyClean-wire SSTV
Robot 8 (half size, grey)18.65.8
Robot 36 (75% size)14.47.3
Martin M29.87.5
Martin M15.84.6
PD1208.47.4

So the copy never beats SSTV over a wire. In a room, where the analogue picture scores 24 raw and 12 to 20 equalized, it wins clearly in the larger modes and is modest in the two Robot modes. The lab therefore shows the copy by default only when the analogue picture needed equalizing or is missing.

The copy as a clock

The copy's first sample is the transmission's first sample, and the SSTV header is a fixed 950 ms long. So a recording whose header could not be read, but whose copy decoded, still says which mode it carried and exactly where line 0 begins. On the recording above, whose header was lost on the mix of the two microphones, starting the picture from the copy locked all 256 lines and scored 11.6.

Open

  • Across a room, on a laptop's single microphone: not measured. The one real test was a phone a desk away.
  • Whether the hiss harms the SSTV in a room: removing it from a recording, or boosting it 30 dB, changed nothing in the analogue decode, but that only speaks for a clean microphone chain. The SSTV is also 3.8 dB quieter with the copy on.
  • Live: the copy is looked for when the transmission ends, not while it arrives.

Part of the Modem Lab notes · what a room does to an FM picture · a blind equalizer · reading a header through a room · back to Notes.