Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

comm.gpu.LDPCDecoder System object

Decode binary low-density parity-check data with GPU

Description

The GPU LDPCDecoder object decodes a binary low-density parity-check code using a graphics processing unit (GPU).

Note

To use this object, you must install a Parallel Computing Toolbox™ license and have access to an appropriate GPU. For more about GPUs, see GPU Computing (Parallel Computing Toolbox).

A GPU-based System object™ accepts typical MATLAB® arrays or objects that you create using the gpuArray class as an input. GPU-based System objects support input signals with double- or single-precision data types. The output signal inherits its datatype from the input signal.

  • If the input signal is a MATLAB array, then the output signal is also a MATLAB array. In this case, the System object handles data transfer between the CPU and GPU.

  • If the input signal is a gpuArray, then the output signal is also a gpuArray. In this case, the data remains on the GPU. Therefore, when the object is given a gpuArray, calculations take place entirely on the GPU and no data transfer occurs. Passing gpuArray arguments provides increased performance by reducing simulation time. For more information, see Establish Arrays on a GPU (Parallel Computing Toolbox).

This object performs LDPC decoding using the belief-passing or message-passing algorithm, implemented as the log-domain sum-product algorithm. For more information, see Algorithm. To decode a binary low-density parity-check code:

  1. Define and set up your binary low-density parity-check decoder object. See Construction.

  2. Call step to decode a binary low-density parity-check code according to the properties of comm.gpu.LDPCDecoder. The behavior of step is specific to each object in the toolbox.

Note

Starting in R2016b, instead of using the step method to perform the operation defined by the System object, you can call the object with arguments, as if it were a function. For example, y = step(obj,x) and y = obj(x) perform equivalent operations.

Construction

h = comm.gpu.LDPCDecoder creates a GPU-based LDPC binary low-density parity-check decoder object, h. This object performs LDPC decoding based on the specified parity-check matrix. The object does not assume any patterns in the parity-check matrix.

h = comm.gpu.LDPCDecoder('PropertyName','ValueName') creates a GPU-based LDPC decoder object, h, with each specified property set to the specified value. You can specify additional name-value pair arguments in any order as ('PropertyName1','PropertyValue1',...,'PropertyNameN','PropertyValueN').

h = comm.gpu.LDPCDecoder(PARITY) creates a GPU-based LDPC decoder object, h, with the ParityCheckMatrix property set to PARITY.

Properties

ParityCheckMatrix

Parity-check matrix

Specify the parity-check matrix as a binary valued sparse matrix with dimension (N-by-K) by N, where N > K > 0. The last N−K columns in the parity check matrix must be an invertible matrix in GF(2). This property accepts numeric or logical data types. The upper bound for the value of N is (231)-1. The default is the parity-check matrix of the half-rate LDPC code from the DVB-S.2 standard, which is the result of dvbs2ldpc(1/2).

OutputValue

Select output value format

Specify the output value format as one of Information part | Whole codeword. The default is Information part. When you set this property to Information part, the output contains only the message bits and is a multiple of K length column vector, assuming an (N-by-K)xK parity check matrix. When you set this property to Whole codeword, the output contains the codeword bits and is an N element column vector.

DecisionMethod

Decision method

Specify the decision method used for decoding as one of Hard decision | Soft decision. The default is Hard decision. When you set this property to Hard decision, the output is decoded bits of logical data type. When you set this property to Soft decision, the output is log-likelihood ratios of single or double data type.

MaximumIterationCount

Maximum number of decoding iterations

Specify the maximum number of iterations the object uses as an integer valued numeric scalar. The default is 50.

IterationTerminationCondition

Condition for iteration termination

Specify the condition to stop the decoding iterations as one of Maximum iteration count | Parity check satisfied. The default is Maximum iteration count. When you set this property to Maximum iteration count, the object will iterate for the number of iterations you specify in the MaximumIterationCount property. When you set this property to Parity check satisfied, the object will determine if the parity checks are satisfied after each iteration and stops if all parity checks are satisfied.

NumIterationsOutputPort

Output number of iterations performed

Set this property to true to output the actual number of iterations the object performed. The default is false.

FinalParityChecksOutputPort

Output final parity checks

Set this property to true to output the final parity checks the object calculated. The default is false.

Methods

stepDecode input signal using LDPC decoding scheme
Common to All System Objects
clone

Create System object with same property values

getNumInputs

Expected number of inputs to a System object

getNumOutputs

Expected number of outputs of a System object

isLocked

Check locked states of a System object (logical)

release

Allow System object property value changes

Algorithm

This object performs LDPC decoding using the belief-passing or message-passing algorithm, implemented as the log-domain sum-product algorithm. For more information, see the Decoding Algorithm section on the LDPC Decoder block reference page.

Examples

Transmit an LDPC-encoded, QPSK-modulated bit stream through an AWGN channel, then demodulate, decode, and count errors.

    hEnc = comm.LDPCEncoder;
    hMod = comm.PSKModulator(4, 'BitInput',true);
    hChan = comm.AWGNChannel(...
            'NoiseMethod','Signal to noise ratio (SNR)','SNR',1);
    hDemod = comm.PSKDemodulator(4, 'BitOutput',true,...
            'DecisionMethod','Approximate log-likelihood ratio', ...
            'Variance', 1/10^(hChan.SNR/10));
    hDec = comm.gpu.LDPCDecoder;
    hError = comm.ErrorRate;
    for counter = 1:10
      data           = logical(randi([0 1], 32400, 1));
      encodedData    = step(hEnc, data);
      modSignal      = step(hMod, encodedData);
      receivedSignal = step(hChan, modSignal);
      demodSignal    = step(hDemod, receivedSignal);
      receivedBits   = step(hDec, demodSignal);
      errorStats     = step(hError, data, receivedBits);
    end
    fprintf('Error rate       = %1.2f\nNumber of errors = %d\n', ...
      errorStats(1), errorStats(2))

Introduced in R2012a

Was this topic helpful?