Skip to main content

Module coding

Module coding 

Source
Expand description

Coding blocks: channel codes, mapping of the coded bits and soft demapping (bit-interleaved coded modulation).

BlockDoes
fec_encodedraws the information bits of blocks codewords and encodes them, optionally through a random bit interleaver
mapmaps the coded bits on a constellation (the last symbol padded with random bits)
demapthe bit LLRs of the received symbols with their noise variances (exact or max-log)
fec_decodedeinterleaves and decodes the LLRs

A code is a mapping with a type:

typeParametersCode
convk, hard, puncturethe $(133, 171)_{8}$ code of constraint length 7, terminated, Viterbi decoding; puncture names a pattern of comnum_fec::puncture::Puncturer::from_name (ieee80211_2_3, ieee80211_3_4, ieee80211_5_6, dvbs_2_3, dvbs_3_4, dvbs_5_6, dvbs_7_8)
rsm, t, n, first_root, root_step, polya Reed–Solomon code over $\mathrm{GF}(2^{m})$ correcting $t$ symbols, shortened to $n$ symbols, hard decisions (n = 2^m - 1, $b = 1$, $c = 1$ and the conventional field by default; the CCSDS code in the conventional basis: m: 8, t: 16, first_root: 112, root_step: 11, poly: 391; its dual basis and interleaving are comnum_fec::ccsds::CcsdsRs)
turbok, iterations, max_logthe turbo code of LTE (log-MAP or max-log-MAP)
ldpcn, k, var_degree, seed, rule, alpha, layered, iterationsa regular LDPC code built by progressive edge growth; the defaults are those of comnum_fec::ldpc (degree 3, seed 1, layered sum-product, 50 iterations, $\alpha = 0.8$)
polarn, k, design_ebn0_db, crc, lista polar code of the Gaussian approximation, SC or CRC-aided SCL decoding

The parameters of every code are declared as those of the blocks: comnum blocks fec_encode lists them with their defaults, units and accepted values, and the JSON Schema of comnum schema describes them.

The encoder and the decoder are built from the same mapping (the decoder settings are ignored by the encoder), so that a specification writes the code once with a YAML anchor:

link:
  - {type: fec_encode, code: &code {type: ldpc, n: 1024, k: 512}, blocks: 4, interleave: true}
  - {type: map, constellation: 16-QAM}
  - {type: rayleigh, coherence_samples: 1}
  - {type: awgn_ebn0, ebn0_db: $ebn0_db}
  - mimo_rx
  - demap
  - {type: fec_decode, code: *code, interleave: true}
metrics: {report: [ber, coded_ber, bler]}

awgn_ebn0 after fec_encode counts the energy per information bit: $E_{s}/N_{0} = R \log_{2} M \cdot E_{b}/N_{0}$ with the code rate $R$.

§References

  1. G. Caire, G. Taricco and E. Biglieri, “Bit-interleaved coded modulation,” IEEE Trans. Inf. Theory, 44(3), 927–946, 1998.

Functions§

build_code
Build a code from its specification (a mapping with a type).