HF / 110BMODEM RECOVERY LAB← Back to live lab
INTERACTIVE SYSTEM MAP

Follow one message
through the DSP chain.

Start with bytes, move through the 110B transmitter and fading HF channel, then watch the receiver recover timing, carrier, multipath, and finally the original payload.

Start the walkthrough ↓12 stages · one continuous worked example
PAYLOADFEC + INTERLEAVERFRAME + 8-PSK + RRCWATTERSON CHANNELCLOCK + CARRIER ERRORTIMING + CARRIER + EQSOFT BITS + VITERBI
i

Every output below becomes the next stage’s input. The “HF” samples are deterministic worked examples; the live lab runs the full numerical DSP with your selected payload and channel.

TX01

Turn text or a repeatable test pattern into the information bits the modem will carry.

Payload and frame sizing

INPUTUTF-8 source
“HF”
“HF”2 characters · 2 bytes
PROCESS
OUTPUTPayload bits
01001000 01000110The UTF-8 bytes for H and F

Text is encoded as UTF-8. PRBS-15 produces a deterministic test pattern instead. With interleaving enabled, the requested duration is quantized to a complete matrix, so the actual frame duration can differ slightly from the request.

TX 01 · STEP BY STEP

How the source becomes an exact bit array

The simulator first chooses the payload length, then produces exactly that many MSB-first bits from text or PRBS-15. Everything after this boundary operates on bits, not characters.

1Choose the sourcetext or PRBS-15

Text makes the final decode readable. PRBS-15 creates a deterministic pattern for statistically useful BER measurements.

2Encode bytesUTF-8 → uint8

Each character becomes one or more bytes. Basic ASCII characters such as H and F each occupy one byte.

3Expand MSB firstbyte → b₇ … b₀

The most-significant bit is emitted first so both ends agree on byte order.

4Fit the requested framerepeat / truncate to N bits

Text repeats if needed to fill the selected duration. PRBS generation continues until the same target length is reached.

WORKED EXAMPLE

Encode the two-character payload “HF”

H72₁₀ = 48₁₆01001000₂
F70₁₀ = 46₁₆01000110₂
Concatenate01001000 0100011016 payload bits

What it means: The seed does not alter text bytes. It selects the PRBS sequence and also reproduces the later fading and noise realization.

SourceText / PRBS-15

Readable demo payload or repeatable bit statistics.

Duration0.1–60 s

Controls the target amount of payload in one run.

Seed32-bit integer

Reproduces payload, fading, and noise.

WHAT TO WATCH

Use PRBS-15 when BER matters; use text when you want the decode result to be immediately understandable.

TX02

Mark the end of the message, return the coder to known state, and add correction redundancy.

Termination and convolutional FEC

INPUTPayload bits
01001000 01000110The UTF-8 bytes for H and F
PROCESS
OUTPUTRate-1/2 coded bits
00 11 10 00 00 01 01 00 11 10 01 00 11 00 00 01All 16 pairs produced from the 16 displayed payload bits

The transmitter appends the 32-bit end-of-message word and 144 flush bits. When interleaving is enabled, it adds zero fill to complete a matrix, then applies the rate-one-half K=7 convolutional code with 133 and 171 octal generators.

TX 02 · WORKED EXAMPLE

How one input bit becomes a two-bit code pair

The encoder is not repeating each bit. It combines the current bit with six bits of history, so every output pair carries information about several neighboring input bits.

1Prepare the framepayload + 32-bit EOM + 144 zeros

The EOM (4B65A5B2₁₆) marks the payload boundary. The zeros flush the encoder back to its known all-zero state; matrix fill is added when required.

2Shift through seven positions[ current · six previous bits ]

K = 7 means the encoder remembers the current input plus six earlier inputs. A new bit shifts in once per step.

3Apply two parity patternsG₁ = 133₈ · G₂ = 171₈

Each generator selects different register positions. XORing each selected set produces the two transmitted bits.

DISPLAYED “HF” EXAMPLE16 input bits × 2 = 32 coded bits

The input/output cards now show all sixteen output pairs.

NO-INTERLEAVER FRAME(16 + 32 + 144) × 2 = 384 bits

The complete frame also encodes the EOM and flush bits.

SHORT-INTERLEAVER FRAME1,440 × 2 = 2,880 coded bits

Zero fill completes the matrix before the whole stream is encoded.

FIRST FOUR BITS OF “H”0100
Input7-bit registerOutput pair
0000000000
1000000111
0000001010
0000010000

Result: 0100 → 00 11 10 00. The two-bit output depends on both the new bit and the register history, which is why the same input value can produce different pairs later.

WHY DOES 0010010 BECOME 01?

This is the actual register after the first six bits of “H” have shifted in. The generator numbers are octal tap masks: convert them to binary, keep the positions selected by each mask, then XOR those selected bits to find parity.

133₈ = 001 011 011₂ = 1011011₂171₈ = 001 111 001₂ = 1111001₂
Register0010010two positions contain one
AND 133₈0010010 ∧ 1011011 = 00100101 ⊕ 1 = 0
AND 171₈0010010 ∧ 1111001 = 00100001 = 1

PAIRp₁p₂ = 0 1133₈ selects two ones, giving even parity zero. 171₈ selects one of them, giving odd parity one.

Code rate1/2

Each information bit produces two coded bits.

Constraint lengthK = 7

Each output pair depends on the current bit and six bits of history.

Termination144 zero bits

Returns the encoder and decoder trellis to a known state.

WHAT TO WATCH

The coded stream is longer on purpose. The extra structure lets the receiver repair many damaged bits later.

TX03

Reorder the coded bits so a short fade is distributed across many decoder decisions.

Block interleaving

INPUTRate-1/2 coded bits
00 11 10 00 00 01 01 00 11 10 01 00 11 00 00 01All 16 pairs produced from the 16 displayed payload bits
PROCESS
OUTPUTInterleaved coded bits
0 1 1 0 0 0 0 0 1 1 0 0 1 0 0 0 | 0 1 0 0 0 1 1 0 1 0 1 0 1 0 0 1Colors trace each encoder pair; this compact order is schematic — real slot numbers are in the TX 03 lesson

The selected 40-row Revision B matrix changes the transmission order without changing any bit values. The receiver performs the exact inverse permutation before Viterbi decoding.

TX 03 · STEP BY STEP

How the matrix moves nearby bits far apart

The interleaver writes coded bits into a 40-row matrix using one permutation and reads them out using another. No bit value changes; only its transmission index changes.

1Select a matrixshort: 40×72 · long: 40×576

One complete matrix contains 2,880 or 23,040 coded bits.

2Load input bit krow = 9(k mod 40) mod 40

The column is floor(k/40). Multiplication by nine permutes the load rows.

3Fetch output bit jcol = (⌊j/40⌋ − 17·row) mod C

Here row = j mod 40 and C is 72 or 576. This diagonal readout creates time separation.

4Invert at the receiversame matrix · reverse directions

Soft values—not just hard bits—are placed back into their original coded-bit order.

TX 03 · REAL MATRIX SPREAD

Where encoder pairs actually land among the 2,880 slots

The output card compresses the picture; these are true transmit positions computed with the lab's own interleaver. At 4,800 coded bit/s, 369 slots is 77 ms of air time.

PAIR P1k = 0 · 1j = 0 · 369369 slots ≈ 77 ms apart on air
PAIR P3k = 4 · 5j = 1,476 · 525951 slots ≈ 198 ms — and the second bit leaves first
PAIR P16k = 30 · 31j = 270 · 639369 slots ≈ 77 ms apart on air

A fade has to persist across a large fraction of the 600 ms matrix span before it can damage both bits of the same encoder pair.

WORKED EXAMPLE

Trace one bit through the short matrix

Inputk = 2,209k mod 40 = 9
Load locationrow 1 · column 559×9 mod 40 = 1 · floor(2209/40) = 55
Outputj = 1fetch row 1 · column (0−17) mod 72 = 55

What it means: Input bit 2,209 becomes the second transmitted bit of that matrix. That large separation is what spreads a short fade across many decoder decisions.

None0 s

Lowest latency, but burst errors remain grouped together.

Short0.6 s

Uses a 40 × 72 coded-bit matrix.

Long4.8 s

Uses a 40 × 576 matrix for stronger time diversity.

WHAT TO WATCH

Matching colors identify the two bits produced by one encoder step. The output shows those partners separated across time, which is how a short fade stops damaging consecutive trellis decisions.

TX04

Group interleaved bits into threes, add synchronization structure, and select one of eight phases.

Randomization, framing, and 8-PSK mapping

INPUTInterleaved coded bits
0 1 1 0 0 0 0 0 1 1 0 0 1 0 0 0 | 0 1 0 0 0 1 1 0 1 0 1 0 1 0 0 1Colors trace each encoder pair; this compact order is schematic — real slot numbers are in the TX 03 lesson
PROCESS
OUTPUTFramed 8-PSK symbols
90° · 90° · 225° · 90° …The same four TX4 symbols continue into TX5 pulse shaping

Modified-Gray mapping converts each three-bit group into one unit-magnitude complex symbol. Synchronization segments and recurring known probes are inserted so the receiver has trusted timing, phase, and channel observations.

TX 04 · WORKED EXAMPLE

Bits choose a phase—then the known randomizer rotates it

Three interleaved coded bits form a word. Revision B uses a modified-Gray lookup so neighboring points around the circle differ by one bit. The data randomizer then adds a known phase index modulo eight.

000N = 00°I 1 · Q 0
001N = 145°I 0.707 · Q 0.707
010N = 3135°I -0.707 · Q 0.707
011N = 290°I 0 · Q 1
100N = 7315°I 0.707 · Q -0.707
101N = 6270°I 0 · Q -1
110N = 4180°I -1 · Q 0
111N = 5225°I -0.707 · Q -0.707
FIVE MICRO-STEPS
1Group the serial bits
011000001100

Read the interleaved stream three bits at a time, MSB first.

2Look up base phaseNbase = 2, 0, 1, 7

Use the modified-Gray table above; do not treat the binary word as the final phase index.

3Place into the framepreamble → data → probes

Data symbols occupy 32-symbol blocks. Sixteen known probes follow each complete block.

4Add randomizer modulo 8R = 0, 2, 4, 3

Compute Ntx = (Nbase + R) mod 8. The sequence starts from the fixed 0xBAD state.

5Create complex IQs = exp(jπNtx / 4)

The final index selects a unit-radius point at Ntx × 45 degrees.

BitsWordNbaseRNtxAngleI + jQ
011320(2 + 0) mod 8 = 290°0 + j1
000002(0 + 2) mod 8 = 290°0 + j1
001114(1 + 4) mod 8 = 5225°−0.707 − j0.707
100473(7 + 3) mod 8 = 290°0 + j1
WHAT THE RANDOMIZER IS—AND IS NOT

It is a deterministic phase schedule, not encryption and not noise. Both ends generate the same values; the sequence resets every 160 symbols, and the receiver subtracts each value modulo eight before demapping. Concretely: from BAD₁₆ the 12-bit register advances eight shifts per symbol, stepping 948 → 55A → ABC → D2B and reading off R = 0, 2, 4, 3 — the exact values in the trace above.

WHERE THE SYMBOL GOES

A burst starts with a known acquisition preamble. During the data portion, 32 unknown data symbols alternate with 16 known probe symbols used for tracking. Probes transmit tribit 0 through the randomizer — so their exact symbols are known — except the two blocks before each interleaver boundary, which carry the D1/D2 identification patterns instead.

CODED THROUGHPUT2,400 sym/s × 3 × 32⁄48 = 4,800 bit/sprobes carry no payload, so only 32 of every 48 symbols count
USER BIT RATE4,800 ÷ 2 = 2,400 bit/sthe rate-1/2 coder halves the information rate
MATRIX QUANTUM2,880 ÷ 4,800 = 0.6 swhy stage 01 rounds the requested duration to whole matrices
Modulation8-PSK

Carries three coded bits per symbol.

Data / probes32 / 16 symbols

Balances payload efficiency with receiver tracking.

Symbol rate2,400 sym/s

Sets the modem's fundamental time scale.

WHAT TO WATCH

The ideal constellation should contain eight equally spaced points. A constant phase error rotates all eight together.

TX05

Turn isolated symbols into a band-limited complex waveform suitable for the channel and audio carrier.

Root-raised-cosine pulse shaping

INPUTFramed 8-PSK symbols
90° · 90° · 225° · 90° …The same four TX4 symbols continue into TX5 pulse shaping
PROCESS
OUTPUTTransmit complex waveform
x[n] @ 19.2 ksample/sEight complex samples represent each 2,400-baud symbol

Symbols are upsampled by eight and filtered with a unit-energy root-raised-cosine pulse. For listening and WAV export, the complex envelope is translated to a real 1,800 Hz audio carrier and resampled to 48 kHz.

TX 05 · STEP BY STEP

How isolated symbols become a continuous waveform

A symbol sequence is too abrupt to transmit directly. Upsampling creates symbol-spaced impulses, and the RRC filter replaces every impulse with a smooth pulse that overlaps its neighbors in a controlled way.

1Insert sample gaps1 symbol + 7 zeros

Eight samples per symbol changes the working rate from 2,400 symbols/s to 19,200 complex samples/s.

2Generate the pulseRRC · α = 0.25 · span = 10

The implementation uses an 81-tap, unit-energy finite approximation.

3Convolve and overlapx[n] = Σ a[k]h[n−8k]

Several pulses contribute to each waveform sample, but the matched pair preserves clean symbol-center decisions.

4Create optional audioRe{x[n]eʲ²π1800t}

The complex envelope moves to a real 1,800 Hz audio carrier, then resamples from 19.2 to 48 kHz for playback.

TX 05 · SIGNAL-FLOW DIAGRAM

Four symbol decisions become a smooth complex waveform

Read left to right. The modem keeps each symbol value, places it on an eight-sample clock, and lets the RRC filter spread that value across nearby samples.

1SYMBOLS2,400 / second
2IMPULSE TRAIN19,200 samples / second

Important: the seven zeros are sample slots, not seven silent symbols.

3ONE RRC PULSEα = 0.25 · span = 10
a[k]h[n − 8k]

Every symbol launches this exact shape — the modem's actual 81 filter taps — scaled by its complex I and Q value.

4 · SHIFT, SCALE, AND ADD
x[n] = Σ a[k]h[n − 8k]

Neighboring pulses overlap between symbol times. Their sum is continuous and band-limited, while the matched transmit/receive filter pair keeps the intended symbol-center decisions separable.

I[n] · REAL
Q[n] · IMAGINARY
I samples Q samples

The samples between decision instants are supposed to move. Pulse shaping controls that path; it does not move the underlying 8-PSK targets.

WORKED EXAMPLE

Check the rates and occupied bandwidth

DSP rate2,400 × 8 = 19,200 sample/scomplex baseband
Raised-cosine width2,400(1 + 0.25) = 3,000 Hzapproximately −1,500 to +1,500 Hz
Audio placement1,800 ± 1,500 Hzapproximately 300 to 3,300 Hz

What it means: Pulse shaping changes the samples between decision times. It does not change which ideal 8-PSK point each symbol represents.

Samples / symbol8

2,400 × 8 gives the 19.2 kHz DSP rate.

RRC roll-off0.25

Controls excess bandwidth and pulse duration.

Filter span10 symbols

Finite approximation to the ideal pulse.

WHAT TO WATCH

Pulse shaping changes the path between symbols, not the intended symbol-center values.

CHANNEL06

Create delayed, independently fading copies of the waveform and add calibrated complex Gaussian noise.

Watterson fading and AWGN

INPUTTransmit complex waveform
x[n] @ 19.2 ksample/sEight complex samples represent each 2,400-baud symbol
PROCESS
OUTPUTWatterson channel IQ
Σ aₚ(t)x(t−τₚ) + w(t)Delayed fading paths summed with complex AWGN

Each path applies a fractional delay, power gain, mean Doppler shift, and Gaussian Doppler spread. The paths are summed and noise is added using the selected SNR in a 3 kHz reference bandwidth.

CHANNEL 06 · STEP BY STEP

How delayed, fading paths and noise combine

Each Watterson path is a separately delayed and time-varying copy of the same transmit waveform. The simulator scales and sums those copies, then adds complex Gaussian noise.

1Apply fractional delayxₚ[n] = x[n − τₚFₛ]

Linear interpolation represents non-integer delays such as 38.4 samples.

2Create the fading tapaₚ(t) · 10^(Pₚ/20)

A bank of random phasors gives each path a complex Rayleigh gain with mean Doppler shift and Gaussian spread.

3Sum every pathy[n] = Σ aₚ[n]xₚ[n]

Delayed copies can reinforce or cancel, producing time-varying intersymbol interference and spectral nulls.

4Add calibrated AWGNσw² = Pref·10^(−SNR/10)·Fₛ/3000

The SNR control is referenced to 3 kHz even though complex noise is generated across the 19.2 kHz DSP rate.

CHANNEL 06 · VISUAL EXAMPLE

One TX5 waveform takes two changing paths to the receiver

The graphs use the same two equal-power, 2 ms-delay example as the math below. The fading traces are one real realization of the lab's own tap model (seed 359); the live lab generates its taps from your selected seed.

DELAY PROFILEWhere the energy arrivesrelative voltage · milliseconds
0 ms1 ms2 ms2.5 ms

The echo lands 38.4 DSP samples after the direct path, so symbols overlap.

FADING VS. TIMEEach path changes independently|aₚ(t)| · Watterson model · seed 359
P0
P1
0 s1 s2 s3 s4 s

Near 0.7 s path 0 fades almost to zero while path 1 stays strong — a real Rayleigh dip from the model. Only the sum of the two paths reaches the receiver.

DOPPLER SPECTRUMWhat “2σ = 1 Hz” meansGaussian fading power vs. frequency
−1.5 Hz−σ0+1.5 Hz

The highlighted center spans −0.5 to +0.5 Hz: a total width of 2σ = 1 Hz.

FREQUENCY RESPONSEWhat the echo does to the spectrum|H(f)| snapshot · equal taps in phase
−1.5 kHz−7500+750+1.5 kHz

Adding a 2 ms echo carves nulls every 1/τ = 500 Hz — six across the band. As a₀ and a₁ fade, the nulls sweep; suppressing them is the stage 10 equalizer's job.

POWER → VOLTAGE10^(−3.0103/20) = 0.707two paths · half the average power each
DELAY → SAMPLES0.002 × 19,200 = 38.4fractional-sample interpolation is required
DELAY → NULLS1 ÷ 2 ms = 500 Hznull spacing of the two-path frequency response
2σ → σ1 Hz ÷ 2 = 0.5 Hzlarger σ makes the tap vary faster
WORKED EXAMPLE

Two equal-power paths with 2 ms delay and 1 Hz spread

Path voltage10^(−3.0103/20) ≈ 0.707each path carries half the average power
Path delay0.002 × 19,200 = 38.4 samplesfractional interpolation is required
Doppler2σ = 1 Hz → σ = 0.5 Hzlarger spread means faster fading

What it means: The received signal is approximately 0.707a₀(t)x(t) + 0.707a₁(t)x(t−2 ms) + noise. The complex taps a₀ and a₁ keep changing throughout the burst.

Delaymilliseconds

Creates multipath and intersymbol interference.

PowerdB

Sets each path's relative voltage contribution.

ShiftHz

Moves the center of a path's Doppler spectrum.

2σ spreadHz

Controls fading speed; larger values vary faster.

SNRdB in 3 kHz

Sets the in-band signal-to-noise ratio.

WHAT TO WATCH

A Doppler shift produces average rotation. Doppler spread produces irregular time variation in amplitude and phase.

CHANNEL07

Apply the receiver-side offsets that synchronization must discover and remove.

Receiver oscillator and clock errors

INPUTWatterson channel IQ
Σ aₚ(t)x(t−τₚ) + w(t)Delayed fading paths summed with complex AWGN
PROCESS
OUTPUTImpaired sampled IQ
y(n(1 + ppm·10⁻⁶) + p₀) · exp(j(2πΔfn/Fₛ + φ₀))Timing offset (p₀), sample-clock drift (ppm), frequency error (Δf), and phase error (φ₀)

The simulator resamples the channel output at an offset and slightly incorrect clock rate, then applies a common carrier-frequency offset and initial phase rotation. These controls model receiver synchronization error, not a second propagation path.

CHANNEL 07 · STEP BY STEP

How receiver clock and oscillator errors distort IQ

These controls model receiver mismatch after propagation. Timing and clock error change where the waveform is sampled; carrier offset and initial phase rotate those samples.

1Offset the first samplep₀ = timing offset × 8

A fractional-symbol setting becomes a fractional position in the eight-samples-per-symbol waveform.

2Apply clock-rate errorp[n] = n(1 + ppm·10⁻⁶) + p₀

The source position gradually walks away from the nominal sample grid.

3Build carrier phaseφ[n] = φ₀ + 2πΔf·n/Fₛ

Initial phase is constant; frequency offset produces a phase ramp.

4Rotate each sampler[n] = y(p[n])eʲφ[n]

The channel output y is resampled at p[n], then rotated. The result r[n] is what the receiver actually digitizes.

CHANNEL 07 · VISUAL EXAMPLE

Three receiver errors, three distinct signatures

The default 5-second mismatch drawn exactly: a 35° initial phase, a 23 Hz carrier offset, and an 8 ppm sample clock. Phase rotates the constellation once, frequency keeps rotating it, and clock error slides the sampling instant — the three ramps stages 08 and 09 must estimate and remove.

INITIAL PHASE · 35°One rigid rotation
+35°

Hollow dots are the ideal eight phases; solid dots are the received ones. Every cluster turns by the same 35°, so the eight clusters stay tight — one derotation fixes the whole burst.

CARRIER OFFSET · 23 HZ3.45° more with every symbol

48 consecutive symbols, brightening with time: each lands 3.45° past the last. A full turn takes 104 symbols (43 ms), so a 5 s burst sweeps about 115 turns — this is the ring RX 08 receives.

CLOCK ERROR · 8 PPMThe sampling instant walks away
0 s1 s2 s3 s4 s5 s

A clock 8 ppm fast drifts 96,000 × 8×10⁻⁶ = 0.768 samples (0.096 symbol) over the burst; gridlines every 0.2 sample. A nonzero timing offset shifts where the ramp starts; stage 08's second-order loop tracks its slope.

WORKED EXAMPLE

Default 5-second receiver mismatch

Clock drift96,000 × 8 ppm = 0.768 sample0.096 of one symbol over five seconds
Carrier step360° × 23/2,400 = 3.45°added every symbol
Initial rotation35° at t = 0the 23 Hz offset keeps rotating after that

What it means: A phase offset rotates the constellation once. A frequency offset adds another 3.45 degrees every symbol, so an uncorrected constellation becomes arcs or a ring.

Timing offsetsymbol fraction → p₀

Moves the initial sampling instant away from the eye center.

Clock errorppm → 1 + ppm·10⁻⁶

Makes the correct sampling instant drift over the burst.

Carrier offsetHz → Δf

Creates continuous constellation rotation.

Initial phasedegrees → φ₀

Rotates the entire constellation at the beginning.

WHAT TO WATCH

A phase offset gives one fixed rotation. A frequency offset keeps adding phase, so the points sweep around the origin.

RX08

Concentrate symbol energy, locate the best decision instant, and track clock drift with fractional-sample interpolation.

Matched filtering and timing recovery

INPUTImpaired sampled IQ
y(n(1 + ppm·10⁻⁶) + p₀) · exp(j(2πΔfn/Fₛ + φ₀))Timing offset (p₀), sample-clock drift (ppm), frequency error (Δf), and phase error (φ₀)
PROCESS
OUTPUTTimed 1-sps and 2-sps streams
z[k] and z[k + ½]Symbol decisions plus half-symbol samples for the equalizer

A matching RRC filter completes the raised-cosine response. Preamble acquisition estimates start position and clock rate; a Gardner-style early–late loop tracks timing using interpolated early, center, and late samples.

RX 08 · STEP BY STEP

How the receiver finds the center of every symbol

Timing recovery first concentrates energy with the matching RRC filter, searches for the known preamble, then tracks small clock changes using early, center, and late interpolated samples.

1Matched filterz[n] = r[n] * hRRC[n]

Transmit and receive RRC filters combine into the intended raised-cosine response.

2Acquire start and ratemaximize preamble differential correlation

A grid search estimates burst start and sample step without requiring the final carrier solution.

3Measure timing errore = Re{(early − late)·center*}

This early–late detector (Gardner's rotation-insensitive family) indicates which direction moves the sample toward the eye center.

4Interpolate and trackFarrow cubic interpolation

A second-order loop adjusts both current position and samples-per-symbol estimate.

5Produce two streams1 sps + 2 sps

Carrier decisions use symbol centers; the fractionally spaced equalizer also keeps half-symbol samples.

RX 08 · ACQUISITION

Finding the burst before anything can be tracked

Every loop on this page assumes the receiver already knows roughly where the burst starts. It learns that by sliding a copy of the known preamble across the samples and scoring the match at every candidate offset — the curve below is that real sweep, computed with the lab's own scoring function.

WHAT IT CORRELATES AGAINSTA preamble the receiver knows by heart
KNOWN SEGMENTS3 × 480 symbols = 0.6 sthe short-interleave sync preamble (24 segments for long)
WHY DIFFERENTIALz[k] · z*[k−1]comparing successive symbols cancels any common carrier rotation, so timing can lock before carrier recovery exists
WHAT IS SEARCHEDstart ± samples · clock ppm gridthe best offset seeds the Gardner loop; the best step seeds the samples-per-symbol estimate

Acquisition needs no equalizer and no carrier lock — only the fact that 1,440 transmitted symbols are known in advance. That is the preamble's entire job.

SCORE VS START OFFSETOne sharp answer, one telltale echo
−240+24+48+72 samples

The peak at 0 is the direct path; the receiver takes it. The small bump near +38 samples is the 2 ms echo correlating on its own — acquisition locks the strongest arrival and leaves the echo to the stage 10 equalizer.

RX 08 · EYE DIAGRAM

Why the symbol center is the safest instant to decide

Each panel overlays 24 two-symbol windows of the matched-filter output (real part), computed by the lab's DSP over a PRBS symbol stream. Five rails appear because the I component of 8-PSK takes five values. The timing loop samples every symbol at the dashed early, center, and late instants.

WHAT THE MATCHED RRC ACTUALLY IS

RRC is a root-raised-cosine filter: its frequency response is the square root of the raised-cosine spectrum. TX 05 applied one copy to shape the transmit pulses; the receiver now applies the identical filter, and the two square roots multiply into the full raised cosine (√RC × √RC = RC). A raised cosine is a Nyquist pulse — it passes through zero at every other symbol center, so neighboring pulses contribute nothing at the decision instant. And because the receive filter has the same shape as the arriving pulse, it is simultaneously the matched filter that maximizes SNR at that instant. One filter, two jobs — which is why the clean-channel eye below is open at its center.

CLEAN CHANNELOpen eye after the matched filter
−Tearlycenterlate+T

RRC ⊗ RRC completes the raised cosine: the rails separate cleanly at the center, and e = Re{(early − late)·center*} averages to zero exactly there.

TWO-PATH CHANNEL · 2 MSIntersymbol interference closes the eye
−Tearlycenterlate+T

A static 0.707·x(t) + 0.707·x(t−2 ms) snapshot of the same stream. Timing recovery cannot reopen this eye; removing the echo is the stage 10 equalizer's job.

WORKED EXAMPLE

One simplified Gardner update

Samplesearly = 0.6 · center = 1.0 · late = 0.4real-valued example for clarity
ErrorRe{(0.6−0.4)×1} = +0.2positive timing correction
Outputsz[k] and z[k+½]center and half-symbol positions

What it means: The real modem uses complex samples and normalizes the detector by center-sample energy. Carrier phase largely cancels because the early, center, and late samples share it.

Timing offsetfraction of a symbol

Moves the initial sample away from the eye center.

Clock errorppm

Makes the best sample time drift across the frame.

Carrier stream1 sample / symbol

Feeds carrier acquisition and decisions.

Equalizer stream2 samples / symbol

Preserves fractional-delay information for the FSE.

WHAT TO WATCH

Before carrier recovery, correctly timed points may still form a ring because their phase continues to rotate.

RX09

Estimate frequency and phase error, then derotate every complex symbol by the opposite trajectory.

Carrier acquisition and tracking

INPUTTimed 1-sps and 2-sps streams
z[k] and z[k + ½]Symbol decisions plus half-symbol samples for the equalizer
PROCESS
OUTPUTCarrier-corrected streams
z[k] · exp(−jφ̂[k])The estimated phase trajectory is removed from both rates

Probe-aided recovery compares known symbols with their references. Eighth-power recovery removes ideal 8-PSK data modulation before estimating the tone. The decision-directed PLL acquires on the preamble and then tracks with known or detected symbols.

RX 09 · STEP BY STEP

How a phase trajectory is estimated and removed

Carrier recovery estimates one phase value per symbol. The receiver then multiplies by the opposite rotation, stopping frequency-induced motion and restoring the intended 8-PSK orientation.

1Acquire on known symbolsr[k]·sref*[k]

Preamble correlation exposes the common phase and frequency ramp while treating delayed-path mismatch as noise.

2Choose a trackerprobes · 8th power · PLL

Probe interpolation, blind feed-forward tracking, and a decision-directed loop provide different tracking tradeoffs.

3Resolve ambiguity8-PSK phase is modulo 45°

The known preamble selects the correct one of eight possible eighth-power branches.

4Derotatey[k] = r[k]e⁻ʲφ̂[k]

The phase estimate is interpolated onto the two-samples-per-symbol equalizer stream as well.

RX 09 · PHASE TRAJECTORY

The stage 07 injection and its removal on one plot

Stage 07 added φ[n] = 35° + 2π·23 Hz·t — an intercept plus a ramp of 3.45° per symbol. Carrier recovery estimates that trajectory as φ̂[k] and multiplies by exp(−jφ̂[k]); the flat residual is what the constellation actually experiences.

INTERCEPTφ[0] = 35°the initial phase control
SLOPE+3.45° / symbolthe 23 Hz carrier offset
AFTER DEROTATIONφ[k] − φ̂[k] ≈ 0°stationary clusters for the demapper
010203040 symbols
φ[k] injected · gridlines every 45° (one 8-PSK sector) φ[k] − φ̂[k] after recovery
WORKED EXAMPLE

Correct one rotated 8-PSK symbol

Ideal symbol45°I + jQ ≈ 0.707 + j0.707
Received45° + 35° = 80°initial phase error only
Correction80° − 35° = 45°multiply by exp(−j35°)
Frequency offset23 Hz → 3.45°/symbolφ̂ must continue changing

What it means: Carrier recovery removes common rotation. It cannot remove delayed echoes; that separate job belongs to the equalizer.

Carrier offsetHz

Sets how quickly the constellation rotates.

Initial phasedegrees

Sets the constellation's starting orientation.

Loop bandwidthnormalized

Trades tracking speed against admitted noise.

Dampingratio

Controls PLL overshoot and settling behavior.

WHAT TO WATCH

Successful recovery turns arcs or a ring into stationary clusters. It does not by itself remove multipath distortion.

RX10

Use the two-samples-per-symbol stream to suppress delayed channel copies before making final decisions.

Fractionally spaced NLMS equalizer

INPUTCarrier-corrected streams
z[k] · exp(−jφ̂[k])The estimated phase trajectory is removed from both rates
PROCESS
OUTPUTEqualized symbols
ŷ[k] = wᴴx[k]One complex estimate per symbol after multipath suppression

Known preamble samples produce a regularized least-squares starting point. Normalized LMS then updates the complex FIR taps from known probes and decision-directed data symbols.

RX 10 · STEP BY STEP

How the adaptive FIR filter cancels delayed copies

The equalizer combines a sliding window of carrier-corrected half-symbol samples. Its complex weights learn an approximate inverse of the multipath channel.

1Correct the 2-sps streamx₂[k]e⁻ʲφ̂[k/2]

The symbol-rate phase estimate is unwrapped and interpolated onto every half-symbol sample.

2Build a tap vectorx = [x₀ … x₂₀]

Twenty-one taps at two samples per symbol span ten symbol intervals end to end.

3Initialize on preambleregularized least squares

Known symbols provide a stable starting solution before sample-by-sample adaptation.

4Form an estimateŷ[k] = wᴴx[k]

The weighted sum aims to reproduce the desired undistorted symbol.

5Update with NLMSw ← w + μxe*/(||x||² + ε)

Known probes train directly; unknown data uses the nearest 8-PSK decision.

RX 10 · VISUAL EXAMPLE

What the adaptive filter actually learns

A fading snapshot with the 2 ms echo 6 dB below the direct path, at the lab's default 18 dB SNR. Every trace comes from the same NLMS update the live equalizer runs. When fading brings the two paths equal — the Channel 06 example — the dips become true nulls that no filter can invert; that is when errors burst and the stage 03 interleaver earns its keep.

LEARNING CURVEKnown-symbol error vs time
0240480720960 sym

Cold-started NLMS at the conservative default μ = 0.035 needs hundreds of symbols to reach the −13.9 dB floor (gridlines at −5/−10/−15 dB). That slowness is exactly why the lab batch-initializes from the known preamble: the dashed regularized-LS solution is available from symbol one.

FREQUENCY RESPONSESChannel dips become filter peaks
−1.2 kHz−0.60+0.6+1.2 kHz
|H(f)| channel |W(f)| learned taps |H·W| cascade

The learned 21-tap response rises exactly where the channel dips every 500 Hz. The cascade is flatter but not flat: fully inverting a dip would amplify noise, so the least-squares compromise leaves a shallow residual — that is MMSE behavior, not a defect.

CONSTELLATIONSame symbols, before and after
EQUALIZER IN
EQUALIZER OUT

Forty-eight carrier-corrected symbols from the steady state. At the input, echo ISI smears the eight phases into a cloud; at the output the clusters are decision-ready. The remaining fuzz is the −13.9 dB residual — noise the filter correctly declined to fight.

WORKED EXAMPLE

Intuition for cancelling one delayed echo

Channelr[k] = s[k] + 0.5s[k−1]current symbol plus delayed echo
Equalizer ideaŷ[k] ≈ r[k] − 0.5r[k−1]a simple first cancellation term
Actual filter21 complex taps at 2 spshandles fractional delay and time variation

What it means: The simple subtraction is only intuition; the implemented least-squares/NLMS filter learns all tap values jointly and keeps adapting through the burst.

Tap countodd, normally 21

Controls the delay span the equalizer can represent.

NLMS μstep size

Larger adapts faster but increases misadjustment risk.

Input rate2 samples / symbol

Reduces sensitivity to exact sampling phase.

WHAT TO WATCH

Equalizer MSE should fall while the IQ clusters tighten. Too large a step can make the filter noisy or unstable.

RX11

Undo the known phase randomizer and turn distance from the eight ideal points into bit confidence.

Descrambling and soft demapping

INPUTEqualized symbols
ŷ[k] = wᴴx[k]One complex estimate per symbol after multipath suppression
PROCESS
OUTPUTInterleaved soft bits
+5.8 −3.1 +0.4 +7.2 …Sign predicts the bit; magnitude expresses confidence

The receiver removes the deterministic modulo-eight phase randomizer, then computes a max-log likelihood ratio for each of the three bits represented by a data symbol. It preserves confidence instead of making an early hard decision.

RX 11 · STEP BY STEP

How one noisy IQ point becomes three confidence values

The demapper does not immediately choose hard bits. It compares squared distance to all eight modified-Gray points and reports how strongly the evidence favors one or zero for each bit position.

1Remove randomizationNbase = (Ntx − R) mod 8

The receiver regenerates the same known phase schedule used by the transmitter.

2Measure all distancesdm = |y − sm|²

Every received point is compared with all eight ideal word constellation points.

3Separate by bit valuemin d(bit=0) and min d(bit=1)

This is repeated independently for the MSB, middle bit, and LSB.

4Form max-log LLRLLR = (min d0 − min d1)/σ²

Positive favors one, negative favors zero, and magnitude expresses confidence.

RX 11 · VISUAL EXAMPLE

One received point, three separate bit questions

The worked example y = −0.05 − j0.92 drawn three times. In each panel the eight points are relabeled by one bit of their modified-Gray word: solid cyan carries that bit = 1, hollow violet carries 0, and dashed rays run to the nearest point of each kind. Notice 270° switching sides between panels — every bit asks its own question about the same geometry.

WHERE σ² COMES FROM

Nobody tells the demapper the noise power — it measures it from the equalized cloud itself. Each symbol's squared distance to its nearest ideal point is, while decisions are mostly right, a sample of |noise|², which for complex Gaussian noise is exponentially distributed with mean σ². The lab takes the median of those distances and divides by ln 2 (an exponential's median is mean × ln 2), because a median shrugs off the occasional wrong-nearest outlier that would bias an average. The worked example's σ² = 0.1 is simply given. One burst-wide σ² scales every LLR equally: it calibrates confidence without changing which point is nearest.

BIT 1 · MSBLLR ≈ +19.40 → strong one
00001111y

Nearest 1-point is 101 at 270° (d² ≈ 0.009); nearest 0-point is 000 at 0° (d² ≈ 1.949). LLR = (1.949 − 0.009) ÷ 0.1 ≈ +19.4.

BIT 2 · MIDDLELLR ≈ −4.68 → moderate zero
00111100y

Now the same 101 is the nearest 0 (0.009) and 111 at 225° is the nearest 1 (0.477). LLR = (0.009 − 0.477) ÷ 0.1 ≈ −4.68.

BIT 3 · LSBLLR ≈ +6.10 → strong one
01100110y

Nearest 1 is again 101 (0.009); nearest 0 is 100 at 315° (0.618). LLR = (0.618 − 0.009) ÷ 0.1 ≈ +6.10.

WORKED EXAMPLE

Demap y = −0.05 − j0.92 with σ² = 0.1

MSBLLR ≈ +19.40strong one
MiddleLLR ≈ −4.68moderate zero
LSBLLR ≈ +6.10strong one
Soft word+19.40, −4.68, +6.10predicts tribit 101

What it means: The nearest ideal word is 101, but the three unequal magnitudes preserve more information for Viterbi decoding than a hard 101 decision alone.

Demappermax-log soft

Retains confidence instead of only hard zero-or-one choices.

Output3 LLR / symbol

Produces one signed confidence value for every coded bit.

Randomizerknown modulo-8

Reverses the transmitter's deterministic phase rotation.

WHAT TO WATCH

A value near zero is uncertain. A large positive or negative value is a confident one or zero.

RX12

Restore coded-bit order, find the most likely trellis path, and return the original payload.

Deinterleaving, Viterbi, and deframing

INPUTInterleaved soft bits
+5.8 −3.1 +0.4 +7.2 …Sign predicts the bit; magnitude expresses confidence
PROCESS
OUTPUTRecovered payload
“HF”
“HF”16 recovered payload bits decoded as UTF-8

The receiver inverts the selected block interleaver, passes the reordered soft values through full-burst Viterbi decoding, removes matrix fill, flush, and end-of-message structure, then converts the recovered payload bits back to UTF-8 text.

RX 12 · STEP BY STEP

How soft coded evidence becomes the original message

The final stage reverses transmitter ordering and uses trellis history to choose the most likely input sequence, then removes framing material that was never part of the payload.

1Remove symbol paddingdrop 0–2 terminal LLRs

Only padding added to complete a final tribit is removed at this point.

2Deinterleave soft valuestransmit order → coder order

Signed confidence values follow the exact inverse matrix permutation from TX 03.

3Score the trellis64 states · two branches/state

K = 7 leaves six memory bits, producing 2⁶ possible states. Branch costs use the soft LLR pairs.

4Trace backbest terminated path → state 0

The complete bounded burst is traced backward from the known terminal state.

5Deframeremove fill + flush + EOM

The decoder locates the 32-bit EOM word 4B65A5B2₁₆ in the decoded stream; the payload bits before it are regrouped into bytes and decoded as UTF-8.

RX 12 · VISUAL EXAMPLE

How 64 states race and one path survives

What arrives here is not bits: after deinterleaving, stage 11's soft values line up as one LLR pair per encoder step — evidence about the coded stream 00 11 10 00, not about the payload. The payload 0100 never traveled over the air; the decoder infers it, because it owns a copy of the TX 02 encoder and can precompute the pair any (state, input bit) move would have sent. Those precomputed pairs are the branch labels below. Two branches leave every state, two arrive at every state, and each state keeps only the cheaper arrival — the survivor — so 64 running costs replace comparing whole paths, and eight soft coded values come out as four decided payload bits.

TRELLIS · 4 OF 64 STATESThe survivor path for 0100
000000000001000010000100bit 1offer from 100000 · dropped⋮ 60 more states per column0 → 001 → 110 → 100 → 00t0t1t2t3t4
WHERE “0 → 00” COMES FROM
HopInRegisterG₁ 133₈G₂ 171₈Pair
t0→t1000000000000
t1→t2100000011111
t2→t3000000101010
t3→t4000001000000

Each green hop consumes one input bit and shifts the six-bit register left — the table above is the TX 02 encoder replayed: shift the bit in, AND the register with each generator mask, and the two parities are the branch's expected pair. Grey shows the two survivor rules once each: two branches leave every state (t0), and when two arrive at one state (000001 at t2, offered paths from 000000 and hidden 100000), only the cheaper lives on. Traceback then reads the survivors backward from the terminal state.

PATH-COST RACE0100 against its best rival 0101
StepDeinterleaved LLRs01000101
1(−8, −7)0.000.00
2(+6, +9)0.000.00
3(+8, −5)0.010.01
4(−9, −8)0.0117.01
HOW ONE COST IS COMPUTEDcost = Σ log(1 + e^((1−2c)·L))c is the branch's expected bit, L the received LLR — the exact negative log-likelihood, summed over the pair. Agreeing with an LLR is nearly free; contradicting one costs exactly |L| more.rival, step 4: pair 11 vs (−9, −8) → log(1+e⁹) + log(1+e⁸) ≈ 9.00 + 8.00

The rival matches the winner until step 4, where its expected pair 11 must fight the confident LLRs (−9, −8) and pays 17.01 against 0.01 — a decisive gap from one step. The winner's own 0.01 is the price of the weak −5 at step 3. Small LLRs cost little to contradict, which is how a few wrong signs can be outvoted by the rest of the sequence — and why σ² never appears here: stage 11 already folded the confidence into the LLRs.

WORKED EXAMPLE

Recover the first four input bits from soft pairs

Expected coded path00 · 11 · 10 · 00the TX 02 encoding of 0100
Example LLR pairs(−8,−7) · (+6,+9) · (+8,−5) · (−9,−8)sign predicts each coded bit
Viterbi choice0100lowest accumulated path cost
Full “HF” result01001000 01000110UTF-8 → HF

What it means: A few individual LLR signs may be wrong and the correct trellis path can still win because Viterbi evaluates the consistency of the entire sequence.

Deinterleaverexact inverse

Restores the time order expected by the convolutional decoder.

Tracebackcomplete burst

Chooses the best terminated path for this bounded frame.

Verificationbit-level

Reports coded and payload BER against the simulator reference.

WHAT TO WATCH

For a blind proof, decode exported RX IQ in a separate process that never receives the original payload bits.

WHAT TO EXPECT

When does it decode? Two channels, two answers

Real decoder output: one 2 s burst (2,704 payload bits) per seed, three seeds per SNR point, keeping the best of the three carrier trackers each run. Dots are individual seeds, lines the median seed — a sketch of the operating envelope, not a Monte Carlo. Lower is better; hollow dots on the dashed line decoded with zero errors.

milstd 2 ms · stuck at 25–50% — SNR cannot fix lost syncitu_good · error-free from ≈ 8–12 dB
4 dB812162024 dB
itu_good · 0.5 ms echo · 0.1 Hz fading milstd · 2 ms echo · 1 Hz · equal power

The green channel behaves like the textbook: a waterfall that reaches error-free bursts by 8–12 dB. The spread between its dots is fading luck, not noise — one seed's realization dips hard and needs 16 dB, which is why real HF planning talks in percentiles.

The amber channel never decodes, at any SNR. Its line barely slopes because the failure is not noise: when two equal-power rays fade against each other, timing and carrier tracking collapse, and neither more SNR nor the long interleaver can rescue a receiver that lost the symbol clock. Flat-with-SNR is the signature of a receiver-limited channel — open the lab on this preset and watch which stage gives up first.

END-TO-END CHECK

Did the receiver really recover it?

REQUEST → FRAME5 s → 7 matrices = 4.8 sstage 01's quantization, exactly
PREAMBLE1,440 sym · 0.6 s12.5% of the burst
KNOWN PROBES3,360 sym · 1.4 s29.2% spent on tracking
NET PAYLOAD9,904 bits ÷ 4.8 s ≈ 2,063 bit/safter EOM, flush, and FEC ride along

For the strongest demonstration, export RX IQ and decode it in a separate process that never receives the original payload. Compare the SHA-256 hashes only after decoding.

Run an experiment →
NOTATION INDEX

Every symbol on this page

Each entry links to the stage that defines it.