optic.comm.fec.decodeLDPC

decodeLDPC(llrs, param)

Decode multiple LDPC codewords using the belief propagation algorithms.

Parameters:
  • llrs (np.array of shape (n, numCodewords)) – Array of log-likelihood ratios (LLRs) for each bit of the received codewords. Codewords are assumed to be disposed in columns.

  • param (object) –

    Object containing the following attributes:

    • Hnp.array of shape (m, n)

      Sparse binary parity-check matrix of the LDPC code.

    • maxIterint

      Maximum number of iterations for belief propagation.

    • algstr

      Decoding algorithm to use (‘SPA’ for sum-product or ‘MSA’ for min-sum).

    • precdata-type

      Numerical precision to use in computations (default is np.float32).

Returns:

  • decodedBits (np.array of shape (n, numCodewords)) – Array of decoded bits for each codeword.

  • outputLLRs (np.array of shape (n, numCodewords)) – Array of updated log-likelihood ratios (LLRs) after decoding.