optic.comm.fec.encodeLDPC
- encodeLDPC(bits, param)
Encode binary sequences using a parity-check matrix of a LDPC code.
- Parameters:
bits (np.array of shape (k, N)) – Binary input sequences to be encoded. Each column is a bit sequence of length \(k\) bits.
param (object) –
Object containing the following attributes:
- modestr
Mode of operation (‘DVBS2’, ‘IEEE_802.11nD2’, or ‘AR4JA’).
- Hnp.array of shape (n - k, n)
Binary parity-check matrix \(H\).
- Gnp.array of shape (k, n), optional
Binary generator matrix \(G\).
- systematicbool, optional
If True, the generator matrix is assumed to be in systematic form. If False, the generator matrix is treated as a general linear transformation (default is True).
- P1np.array of shape (m, k), optional
Matrix used for encoding in triangular mode.
- P2np.array of shape (m, k), optional
Matrix used for encoding in triangular mode.
- Returns:
codewords – Binary encoded codewords. Each column is a codeword of length \(n\) corresponding to the respective input bit sequence.
- Return type:
np.array of shape (n, N)
References
[1] T. J. Richardson and R. L. Urbanke, “Efficient encoding of low-density parity-check codes,” IEEE Transactions on Information Theory, vol. 47, no. 2, pp. 638-656, Feb 2001.