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.
LDPC Encode and Decode QPSK-Modulated Signal in Simulink
Transmit an LDPC-encoded, QPSK-modulated bit stream through an AWGN channel. Demodulate and decode the received signal. Compute the error statistics.
snr variable is initialized using the
InitFcn callback in Model Properties>Callbacks. The
SNR dB parameter in the AWGN Channel block and the
Variance parameter in the QPSK Demodulator Baseband block initialize settings using the
The simulation is configured to process one input frame of data. The Error Rate Calculation block compares the transmitted binary data stream with the information data bits output by the LDPC Decoder block.
For SNR = 1 dB, the error rate is 0.
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.
To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.
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
I, that defines the row and column indices
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
Boolean data type.
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
'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
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Introduced in R2007a