optic.comm.fec.sumProductAlgorithm

sumProductAlgorithm(llrs, checkNodes, varNodes, maxIter, prec=<class 'numpy.float32'>)

Performs belief propagation decoding using the sum-product algorithm (SPA) for multiple codewords.

Parameters:
  • llrs (np.array of shape (n, numCodewords)) – Array of log-likelihood ratios (LLRs) for each bit of the received codeword.

  • checkNodes (list of np.array) – List of length \(m\), where each element is a 1D array containing the indices of variable nodes (bits) involved in the corresponding check node (parity-check equation).

  • varNodes (list of np.array) – List of length \(n\), where each element is a 1D array containing the indices of check nodes that the corresponding variable node participates in.

  • maxIter (int) – Maximum number of belief propagation iterations.

  • prec (data-type, optional) – Data type for the computations (default is np.float32).

Returns:

  • finalLLR (np.array of shape (n,)) – Updated log-likelihood ratios after message passing.

  • numIter (int) – Number of iterations executed until decoding converged or reached maxIter.

  • frameDecodingFail (np.array of shape (numCodewords,)) – Array indicating whether decoding was successful (0) or failed (1) for each codeword. A value of 0 indicates successful decoding, while 1 indicates failure.

References

[1] F. R. Kschischang, B. J. Frey and H. . -A. Loeliger, “Factor graphs and the sum-product algorithm,” IEEE Transactions on Information Theory, vol. 47, no. 2, pp. 498-519, Feb 2001.

[2] T. J. Richardson and R. L. Urbanke, “The capacity of low-density parity-check codes under message-passing decoding,” IEEE Transactions on Information Theory, vol. 47, no. 2, pp. 599-618, Feb 2001.