Field Guide · algorithm

Also known as: RM(30,14), TETRA (30,14) code, AACH block code

RM(30,14) is the shortened Reed–Muller block code TETRA uses to protect its access-assignment channel (AACH).1 It expands 14 type-1 information bits into 30 type-2 channel bits and — unusually for TETRA — needs no further convolutional coding or interleaving: the AACH’s type-4 block simply is its type-2 block. That compactness is deliberate. The AACH is broadcast in the two half-blocks flanking every downlink burst’s training sequence, telling a receiver which slot carries what, so it must decode from a very short, self-contained codeword on every single burst.2

14 info bits (I₁₄) 16 parity bits (P) systematic: first 14 output bits = the input 30-bit codeword = b₁ · G, G = [ I₁₄ | P ]
The code is systematic: the 14 information bits appear unchanged in the first 14 output positions, and 16 parity bits computed from the 14×16 matrix P are appended to form the 30-bit codeword.

The generator

The generator matrix is G = [I14 | P]: the 14×14 identity makes the code systematic — the first 14 codeword bits equal the information bits — and P is the fixed 14×16 parity matrix from EN 300 392-2 eq. (8.13). Encoding is b2 = b1 · G over GF(2): copy the 14 input bits, then for each of the 16 parity columns XOR together the input bits whose row carries a 1 in that column. GopherTrunk stores P as a literal [14][16]byte table so there is nothing to derive at runtime, and EncodeRM3014Tetra implements exactly that copy-then-parity rule.

Decoding, hard and soft

The codeword is short enough — only 2^14 = 16 384 valid codewords — that decoding by exhaustive nearest-codeword search is cheap. The hard decoder, DecodeRM3014Tetra, encodes every candidate and returns the information vector at minimum Hamming distance from the 30 received bits; distance 0 means a clean codeword. The code’s minimum distance is at least 4, giving guaranteed single-bit correction across the 30-bit block and detection of up to three errors. The soft decoder, DecodeRM3014TetraSoft, runs the same search but maximises a soft correlation over the received log-likelihood ratios instead of minimising Hamming distance — adding a codeword’s LLR where its bit is 0 and subtracting it where the bit is 1, then picking the maximum. Soft decoding buys roughly 2 dB of coding gain, which recovers the AACH usage marker on marginal concurrent-call bursts a hard decoder mis-corrects. The soft decoder also returns a confidence margin (the normalised gap to the second-best codeword), which callers use to gate a low-confidence pick so a rescued marker never misroutes another call’s speech.

Reed–Muller codes are closely related to Hadamard codes — first-order Reed–Muller is a Hadamard code plus its complement — and both admit the fast correlation decoding that makes an exhaustive search over a short block practical.

Relevance to SDR

internal/radio/framing/rm_30_14_tetra.go holds the parity matrix, the systematic encoder, and both decoders. The AACH path calls the hard decoder first and falls back to the soft decoder — gated on a confident, valid decode within a bounded Hamming distance — precisely because the AACH is the per-slot call identifier the voice chain routes by. On a marginal burst, whether that block decodes decides whether a concurrent call is attributed to the right slot or dropped, so the small (30,14) code sits directly on the voice-follow critical path.

Sources

  1. Reed–Muller code — Wikipedia, on the Reed–Muller family and its distance and decoding properties. 

  2. Block code — Wikipedia, on systematic generator matrices and nearest-codeword decoding. 

See also