Encode binary low-density parity-check (LDPC) code
Communications Toolbox / Error Detection and Correction / Block
The LDPC Encoder block applies LDPC coding to a binary input message. LDPC codes are linear error control codes with sparse parity-check matrices and long block lengths that can attain performance near the Shannon limit.
The input and output are discrete-time signals. The ratio of the output sample time to the input sample time is K/N, where:
N is the length of the received signal and must be in the range (0, 231).
K is the length of the uncoded message and must be less than N.
In — Input message
binary column vector
Input message, specified as a K-by-1 column vector containing binary-valued elements. K is the length of the uncoded message.
Out — LDPC codeword
LDPC codeword, returned as an N-by-1 column vector. N is the number of bits in the LDPC codeword. The output signal inherits its data type from the input signal. The LDPC codeword output is a solution to the parity-check equation. The input message comprises the first K bits of the LDPC codeword output, and the parity check comprises the remaining (N – K) bits.
Parity-check matrix (sparse binary (N-K)-by-N matrix) — Parity-check matrix
dvbs2ldpc(1/2) (default) | sparse binary matrix | nonsparse index matrix
Parity-check matrix, specified as a sparse (N –
K)-by-N binary-valued matrix.
N is the length of the output LDPC codeword and must
be in the range (0, 231). K is
the length of the uncoded message and must be less than
N. The last (N – K)
columns in the parity-check matrix must be an invertible matrix in the
Galois field of order 2,
You can also specify the parity-check matrix as a two-column nonsparse index matrix,
I, that defines the row and column indices of the
1s in the parity-check matrix such that
This parameter accepts numeric data types. When you set this parameter to a sparse binary
matrix, this parameter also accepts the
The default value uses the
dvbs2ldpc function to
configure a sparse parity-check matrix for half-rate LDPC coding, as
specified in the DVB-S.2 standard.
When the last (N – K) columns of the parity-check matrix form a triangular matrix, forward or backward substitution is performed to solve the parity-check equation.
When the last (N – K) columns of the parity-check matrix do not form a triangular matrix, a matrix inversion is performed to solve the parity-check equation. If a large matrix needs to be inverted, initializations or updates take more time.
dvbs2ldpc(R,'indices') configures the index matrix for the
DVB-S.2 standard, where
R is the code rate, and
'indices' specifies the output format of
dvbs2ldpc as a two-column double-precision matrix
that defines the row and column indices of the
1s in the