All docsStellar LinkRF bench · by Stellar Systems v0.4.0

Signal Processing

Receiver Chain

What the Stellar Link receiver does to the signal, stage by stage: input and gain, down-conversion and filtering, AGC, matched filtering, timing and carrier recovery, decision, frame synchronisation and decoding, with the telemetry that shows each stage working.

The receiver takes the samples from the AD9361 (or, in internal loopback, from the channel emulator) and recovers the bytes that were sent.

flowchart LR
    A[AD9361 RX] --> B[Input gain]
    B --> C[Frequency offset<br/>and decimation]
    C --> D[AGC]
    D --> E[Matched filter]
    E --> F[Timing recovery]
    F --> G[Carrier recovery]
    G --> H[Decision]
    H --> I[Frame sync and<br/>descrambling]
    I --> J[FEC decoding]
    J --> K[Your bytes]

Every stage is configured by applying a profile (see RF Profiles). The telemetry values named below are published in every telemetry sample (see Telemetry and Metrics).

Input and gain#

The AD9361 amplifies the received signal and digitises it. A digital gain can then be applied.

SettingEffect
radio.rx_enabledEnables the receiver input
radio.rx_gain_dbAD9361 receive gain in dB; setting it puts the part's own AGC in manual mode
stellarlinkctl radio gain --domain digitalAdjusts the digital receive gain

Telemetry: part_rx_gain_db (the gain the AD9361 reports), part_rssi_db (the AD9361's own signal strength, in dB below full scale: smaller is stronger) and rssi_dbm (the modem's own level meter, relative).

Set the receive gain so that the signal sits well above the noise without saturating the input. RF Fundamentals explains how to read the receive level.

Frequency offset and decimation#

A digital NCO shifts the signal back by the same offset the transmitter used, so that it is centred on 0 Hz. The signal is then filtered and decimated down to 4 samples per symbol, removing everything outside the band of interest.

SettingEffect
radio.center_frequency_hzSets the local oscillator and the NCO offset together
phy.symbol_rate_baudSelects the decimation factor (the same as the transmit interpolation)
stellarlinkctl radio nco --rx-hzMoves the receive NCO by hand

Automatic gain control#

The AGC measures the signal power and adjusts a digital gain to hold it at a target level. The target leaves headroom for the matched filter that follows, whose output peaks are higher than its input.

Telemetry: agc_gain. A value in the middle of its range means the AGC is regulating. A value near its maximum (about 16) means the input is too weak: raise radio.rx_gain_db. A value near its minimum means the input is very strong.

Matched filter#

A root-raised-cosine filter (α = 0.35) matched to the transmit pulse. It maximises the signal-to-noise ratio at the decision instant and rejects noise outside the signal's bandwidth. It works at 4 samples per symbol and has no settings of its own.

Timing recovery#

The receiver does not know exactly when each symbol is at its peak. Timing recovery measures the timing error from the received samples (a Gardner detector) and continuously adjusts an interpolator so that one sample per symbol is taken at the best instant.

Telemetry: lock, the timing loop's lock flag. It is released when the signal disappears.

Carrier recovery#

Even with both ends tuned to the same frequency, a small residual frequency and an unknown phase remain. Carrier recovery (a Costas loop, updated once per symbol) estimates them and rotates the constellation back into place.

On an over-the-air profile (radio.loopback: false), the loop is armed with acquisition aids: a frequency-locked loop pulls it onto the offset, a frequency estimator confirms the lock so that a still-rotating constellation is not reported as locked, and the frequency is held during silences so that it does not drift on noise. On an internal loopback profile there is no frequency to acquire, and the loop runs without these aids.

Telemetry:

ValueMeaning
carrier_lockThe carrier loop's lock flag, distinct from the timing lock
cfo_hzThe frequency offset the loop is correcting, in Hz
phase_errThe loop's phase error, unitless: steady when settled, varying when hunting

If the receiver stops framing after a disturbance, the carrier loop can be cleared without a reboot; see Chain Conditioning.

Decision and demodulation#

Each symbol is decided on the sign of I and Q (a hard decision), and the demodulator matching phy.modulation turns the decisions into bits. BPSK and QPSK are demodulated coherently, using the recovered carrier; GMSK is demodulated with a frequency discriminator.

Telemetry:

ValueMeaning
rx_symbolsSymbols decided. It moves whenever a signal is demodulated, even if no frame is found
evmError vector magnitude, % rms: how far points lie from their ideal position, relative to the received constellation (independent of the gain setting). Lower is better. BPSK and QPSK
snr_db, mer_dbSignal-to-noise and modulation error ratios, from the QPSK demodulator

Frame synchronisation and descrambling#

The receiver searches the decided bit stream for the sync marker set in framing.sync_word.value_hex. Because a BPSK or QPSK carrier loop can settle on any of the constellation's equivalent phases, the marker is searched under every rotation the modulation allows; once found, the payload is rotated back, so the bytes come out as sent. A marker with a single wrong bit out of 32 is still accepted.

The frame that follows is then delimited, with a length derived from framing.mtu_bytes and the code, and descrambled when framing.scrambler.enabled is set (the same seed as the transmitter).

Telemetry:

ValueMeaning
rx_framesFrames delimited
rx_frame_errorsFrames whose marker matched with one wrong bit
ber_asmPre-decoding bit error estimate, from the marker bits

FEC decoding#

When framing.fec.type selects a code, the frame is decoded: Viterbi decoding for the convolutional code, then Reed-Solomon decoding, which corrects up to 16 byte errors per 223-byte frame. A frame with more errors than the code can correct is reported as uncorrectable and still delivered, errors included.

Telemetry: ber, the post-decoding error ratio, published when coding is enabled.

Reading the chain from the outside#

QuestionLook at
Is any signal reaching the receiver?part_rssi_db, rssi_dbm, agc_gain below its maximum
Are symbols being decided?rx_symbols moving
Are the loops locked?lock and carrier_lock, cfo_hz steady
Is the constellation clean?evm, snr_db, mer_db
Are frames found?rx_frames moving while tx_frames moves
How degraded is the channel?rx_frame_errors, ber_asm, ber
Are the bytes right?A byte comparison, from a loopback measurement or a transfer frame's error control field

↑↓ to moveEnter to open