comm.gpu.TurboDecoder

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 (Parallel Computing Toolbox).

A GPU-based System object accepts typical MATLAB® arrays or objects created using the gpuArray class. A GPU-based System object supports input signals with double- or single-precision data types. The output signal inherits its data type from the input signal.

  • If the input signal is a MATLAB array, the System object handles data transfer between the CPU and the GPU. The output signal is a MATLAB array.

  • If the input signal is a gpuArray, the data remains on the GPU. The output signal is a gpuArray. 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).

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.

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.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

resetReset states of the turbo decoder object
stepDecode input signal using parallel concatenated decoding scheme
Common to All System Objects
release

Allow System object property value changes

Examples

collapse all

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.

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

Create a BPSK Modulator System object.

bpsk = comm.BPSKModulator;

Create an AWGN Channel System object.

channel = 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.

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

Create an Error Rate System object.

errorRate = comm.ErrorRate;

Run the simulation.

for frmIdx = 1:8
 data = randi(s, [0 1], frmLen, 1);
 encodedData = turboEnc(data);
 modSignal = bpsk(encodedData);
 receivedSignal = channel(modSignal); 

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

receivedBits  = turboDec(-2/(noiseVar/2))*real(receivedSignal));

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

errorStats = errorRate(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.

Extended Capabilities

Introduced in R2012a