comm.gpu.TurboDecoder class

Package: comm.gpu

Decode input signal using parallel concatenation decoding with GPU

Description

The GPU Turbo Decoder System object™ decodes the input signal using a parallel concatenated decoding scheme. This scheme uses the a-posteriori probability (APP) decoder as the constituent decoder. Both constituent decoders use the same trellis structure and algorithm.

    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 in the Parallel Computing Toolbox documentation.

A GPU-based System object accepts typical MATLAB® arrays or objects that you create using the gpuArray class as an input to the step method. 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. Invoking the step method with gpuArray arguments provides increased performance by reducing simulation time. For more information, see Establish Arrays on a GPU in the Parallel Computing Toolbox documentation.

To decode an input signal using a turbo decoding scheme:

  1. Define and set up your turbo decoder object. See Construction.

  2. Call step to decode a binary signal according to the properties of comm.gpu.TurboDecoder. The behavior of step is specific to each object in the toolbox.

Construction

H = comm.gpu.TurboDecoder creates a GPU-based turbo decoder System object, H. This object uses the a-posteriori probability (APP) constituent decoder to iteratively decode the parallel-concatenated convolutionally encoded input data.

H = comm.gpu.TurboDecoder(Name, Value) creates a GPU-based turbo decoder object, H, with the specified property name set to the specified value. Name must appear inside single quotes (''). You can specify several name-value pair arguments in any order as Name1,Value1,…,NameN,ValueN.

H = comm.gpu.TurboDecoder(TRELLIS, INTERLVRINDICES, NUMITER) creates a GPU-based turbo decoder object, H. In this object, the TrellisStructure property is set to TRELLIS, the InterleaverIndices property set to INTERLVRINDICES, and the NumIterations property set to NUMITER.

Properties

TrellisStructure

Trellis structure of constituent convolutional code

Specify the trellis as a MATLAB structure that contains the trellis description of the constituent convolutional code. The default is the result of poly2trellis(4, [13 15], 13). Use the istrellis function to check if a structure is a valid trellis structure.

InterleaverIndicesSource

Source of interleaver indices

Specify the source of the interleaver indices. The only valid setting for this property is Property.

InterleaverIndices

Interleaver indices

Specify the mapping used to permute the input bits at the encoder as a column vector of integers. The default is (64:-1:1).'.. This mapping is a vector with the number of elements equal to the length, L, of the output of the step method. Each element must be an integer between 1 and L, with no repeated values.

Algorithm

Decoding algorithm

Specify the decoding algorithm. This object implements true a posteriori probability decoding. The only valid setting is True APP.

NumScalingBits

Number of scaling bits

The GPU version of the Turbo Decoder does not use this property.

NumIterations

Number of decoding iterations

Specify the number of decoding iterations used for each call to the step method. The default is 6. The object iterates and provides updates to the log-likelihood ratios (LLR) of the uncoded output bits. The output of the step method is the hard-decision output of the final LLR update.

NumFrames

Number of independent frames present in the input and output data vectors.

Specify the number of independent frames that a single data input/output vector contains. The default value of this property is 1. This object segments the input vector into NumFrames segments and decodes the segments independently. The output contains NumFrames decoded segments.

Methods

cloneCreate Turbo Decoder object with same property values
getNumInputsNumber of expected inputs to step method
getNumOutputsNumber of outputs from step method
isLockedLocked status for input attributes and nontunable properties
releaseAllow property value and input characteristics changes
resetReset states of the turbo decoder object
stepDecode input signal using parallel concatenated decoding scheme

Examples

expand all

Transmit and decode using turbo coding

Transmit turbo-encoded blocks of data over a BPSK-modulated AWGN channel. Then, decode using an iterative turbo decoder and display errors.

Define a noise variable, establish a frame length of 256, and use the random stream property so that the results are repeatable.

noiseVar = 4; frmLen = 256;
s = RandStream('mt19937ar', 'Seed', 11);
intrlvrIndices = randperm(s, frmLen);

Create a Turbo Encoder System object. The trellis structure for the constituent convolutional code is poly2trellis(4, [13 15 17], 13). The InterleaverIndices property specifies the mapping the object uses to permute the input bits at the encoder as a column vector of integers.

hTEnc = comm.TurboEncoder('TrellisStructure', poly2trellis(4, ...
      [13 15 17], 13), 'InterleaverIndices', intrlvrIndices);

Create a BPSK Modulator System object.

hMod = comm.BPSKModulator;

Create an AWGN Channel System object.

hChan = comm.AWGNChannel('NoiseMethod', 'Variance', 'Variance', ...
      noiseVar);

Create a GPU-Based Turbo Decoder System object. The trellis structure for the constituent convolutional code is poly2trellis(4, [13 15 17], 13). The InterleaverIndicies property specifies the mapping the object uses to permute the input bits at the encoder as a column vector of integers.

hTDec = comm.gpu.TurboDecoder('TrellisStructure', poly2trellis(4, ...
      [13 15 17], 13), 'InterleaverIndices', intrlvrIndices, ...
      'NumIterations', 4);

Create an Error Rate System object.

hError = comm.ErrorRate;

Run the simulation by using the step method to process data.

for frmIdx = 1:8
 data = randi(s, [0 1], frmLen, 1);
 encodedData = step(hTEnc, data);
 modSignal = step(hMod, encodedData);
 receivedSignal = step(hChan, modSignal); 

Convert the received signal to log-likelihood ratios for decoding.

receivedBits  = step(hTDec, (-2/(noiseVar/2))*real(receivedSignal));

Compare original the data to the received data and then calculate the error rate results.

errorStats = step(hError, data, receivedBits);
end
fprintf('Error rate = %f\nNumber of errors = %d\nTotal bits = %d\n', ...
errorStats(1), errorStats(2), errorStats(3))

Algorithms

This object implements the inputs and outputs described on the Turbo Decoder block reference page. The object properties correspond to the block parameters.

Was this topic helpful?