Main Content

getTurboIOIndices

Compute output indices for turbo coding

Since R2021a

    Description

    Use getTurboIOIndices to generate the output indices for the comm.TurboEncoder and input indices for the comm.TurboDecoder System objects.

    indices=getTurboIOIndices(blklen,N,mlen) computes the indices for a given input block length, blklen, number of output streams, N, and the memory length, mlen, relative to the fully encoded output. In this mode, the second interleaved, systematic bit-stream is punctured. N and mlen correspond to the constituent coder configuration for the comm.TurboEncoder and comm.TurboDecoder System objects.

    example

    indices=getTurboIOIndices(blklen,N,mlen,'LTE') computes LTE-like output indices as specified by TS 36.212. For LTE, the second systematic bit-stream is punctured and the tail bits are reordered.

    Examples

    collapse all

    Create output indices for use with a turbo encoder System object™.

    Initialize input parameters for a constituent turbo encoder configuration having 2 streams, 3 registers and a block length of 64. Create the output indices vector. Display the number of tail bits and the values of the tail bits.

    blklen = 64; % Block length
    N = 2;       % Number of streams
    mlen = 3;    % Number of registers
    firsttailbit = blklen * (2*N - 1) + 1;
    outindices = getTurboIOIndices(blklen,N,mlen);
    numtailbits = length(outindices(firsttailbit:end)')
    numtailbits = 9
    
    tailbits = outindices(firsttailbit:end)'
    tailbits = 1×9
    
       257   258   260   261   262   264   265   266   268
    
    

    For comparison, keep the same input settings for the block length, number of streams, and number of registers, but create a set of LTE-like output indices vector by adding 'LTE' as the fourth input argument.

    outindices = getTurboIOIndices(blklen,N,mlen,'LTE');

    Display the number of tail bits and the values of the tail bits. The LTE-like output indices have ordering as specified in TS 36.212 and include tail bits for all output streams.

    numtailbitsLTE = length(outindices(firsttailbit:end)')
    numtailbitsLTE = 12
    
    tailbitsLTE = outindices(firsttailbit:end)'
    tailbitsLTE = 1×12
    
       257   258   261   262   265   266   259   260   263   264   267   268
    
    

    Input Arguments

    collapse all

    Block length, specified as a nonnegative integer.

    Data Types: double

    Number of output streams, specified as an integer greater than 1.

    Data Types: double

    Number of registers, specified as a positive integer.

    Data Types: double

    Output Arguments

    collapse all

    Output indices, returned as column vector of positive integers.

    Extended Capabilities

    C/C++ Code Generation
    Generate C and C++ code using MATLAB® Coder™.

    Version History

    Introduced in R2021a