Documentation Center 
This block implements the messagepassing algorithm for decoding lowdensity paritycheck (LDPC) codes, which are linear error control codes with sparse paritycheck 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 paritycheck matrix are assumed.
Execute a number of iterations you specify or run until all paritychecks are satisfied.
Output hard decisions or soft decisions (loglikelihood ratios) for decoded bits.
(n – k) and n are the number of rows and columns, respectively, in the paritycheck matrix.
This block accepts a realvalued, column vector input signal of type double. Each element is the loglikelihood ratio for a received bit (more likely to be 0 if the loglikelihood ratio is positive). The first k elements correspond to the information part of a codeword.
Both the input and the output are discretetime 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.
The input to the LDPC decoder is the loglikelihood 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 paritycheck matrix H:
For and , the index sets would be
At the end of each iteration, provides an updated estimate of the a posteriori loglikelihood ratio for the transmitted bit .
The softdecision output for is . The harddecision 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.
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 2^{31}1
The output is a realvalued 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
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 loglikelihood ratios (of type double).
This parameter appears only when Decision type is set to Hard decision.
The options are boolean and double.
This can be any positive integer.
If checked, the block will determine whether the parity checks are satisfied after each iteration and stop if all are satisfied.
Creates an output port on the block when selected.
Creates an output port on the block when selected.
Port  Supported Data Types 

In 

Out 
