Documentation Center

  • Trial Software
  • Product Updates

LDPC Decoder

Decode binary low-density parity-check code specified by parity-check matrix

Library

Block sublibrary of Error Detection and Correction

Description

This block implements the message-passing algorithm for decoding low-density parity-check (LDPC) codes, which are linear error control codes with sparse parity-check matrices and long block lengths that can attain performance near the Shannon limit.

The LDPC Decoder block is designed to:

  • Decode generic binary LDPC codes where no patterns in the parity-check matrix are assumed.

  • Execute a number of iterations you specify or run until all parity-checks are satisfied.

  • Output hard decisions or soft decisions (log-likelihood ratios) for decoded bits.

(nk) and n are the number of rows and columns, respectively, in the parity-check matrix.

This block accepts a real-valued, column vector input signal of type double. Each element is the log-likelihood ratio for a received bit (more likely to be 0 if the log-likelihood ratio is positive). The first k elements correspond to the information part of a codeword.

Both the input and the output are discrete-time signals. The ratio of the output sample time to the input sample time is if only the information part is decoded, and 1 if the entire codeword is decoded.

Decoding Algorithm

The input to the LDPC decoder is the log-likelihood ratio (LLR), , which is defined by the following equation

where is the ith bit of the transmitted codeword, c. There are three key variables in the algorithm: , , and . is initialized as . For each iteration, update , , and using the following equations

where the index sets, and , are chosen as shown in the following example.

Suppose you have the following parity-check matrix H:

For and , the index sets would be

At the end of each iteration, provides an updated estimate of the a posteriori log-likelihood ratio for the transmitted bit .

The soft-decision output for is . The hard-decision output for is 1 if , and 0 otherwise.

If the property DoParityCheck is set to 'no', the algorithm iterates as many times as specified by the Number of iterations parameter.

If the property DoParityCheck is set to 'yes', then at the end of each iteration the algorithm verifies the parity check equation ( ) and stops if it is satisfied.

In this algorithm, atanh(1) and atanh(-1) are set to be 19.07 and -19.07 respectively to avoid infinite numbers from being used in the algorithm's equations. These numbers were chosen because MATLAB returns 1 for tanh(19.07) and -1 for tanh(-19.07), due to finite precision.

Dialog Box

Parity-check matrix

This parameter accepts a sparse matrix with dimension n -k by n (where n >k > 0) of real numbers. All nonzero elements must be equal to 1. The upper bound limit for the value of n is 231-1

Output format

The output is a real-valued column vector signal. The options are Information part and Whole codeword.

  • When you this parameter to Information part, the output contains k elements.

  • When you set this parameter to whole codeword, the output contains n elements

Decision type

The options are Hard decision and Soft decision.

  • When you set this parameter to Hard decision, the output is decoded bits (of type double or boolean).

  • When you set this parameter to Soft decision, the output is log-likelihood ratios (of type double).

Output data type

This parameter appears only when Decision type is set to Hard decision.

The options are boolean and double.

Number of iterations

This can be any positive integer.

Stop iterating when all parity checks are satisfied

If checked, the block will determine whether the parity checks are satisfied after each iteration and stop if all are satisfied.

Output number of iterations executed

Creates an output port on the block when selected.

Output final parity checks

Creates an output port on the block when selected.

Supported Data Type

PortSupported Data Types
In
  • Double-precision floating point

Out
  • Double-precision floating point

  • Boolean when Decision type is Hard decision

Examples

Enter commdvbs2commdvbs2 at the command line to see an example that uses this block.

References

[1] Gallager, Robert G., Low-Density Parity-Check Codes, Cambridge, MA, MIT Press, 1963.

See Also

| |

Was this topic helpful?