Products & Services Solutions Academia Support User Community Company

Learn more about Communications Toolbox   

Convolutional Interleavers

Section Overview

A convolutional interleaver consists of a set of shift registers, each with a fixed delay. In a typical convolutional interleaver, the delays are nonnegative integer multiples of a fixed integer (although a general multiplexed interleaver allows unrestricted delay values). Each new symbol from an input vector feeds into the next shift register and the oldest symbol in that register becomes part of the output vector. A convolutional interleaver has memory; that is, its operation depends not only on current symbols but also on previous symbols.

The schematic below depicts the structure of a general convolutional interleaver by showing the set of shift registers and their delay values D(1), D(2),..., D(N). The kth shift register holds D(k) symbols, where k = 1,2,...,N. The convolutional interleaving functions in this toolbox have input arguments that indicate the number of shift registers and the delay for each shift register.

Convolutional Interleaving Features of the Toolbox

The set of convolutional interleavers in this toolbox includes a general interleaver/deinterleaver pair as well as several special cases. Each special-case function uses the same computational code that its more general counterpart uses, but provides a syntax that is more suitable for the special case. The special cases are described below.

Type of InterleaverInterleaving FunctionDescription
General multiplexed interleavermuxintrlvAllows unrestricted delay values for the set of shift registers.
Convolutional interleaverconvintrlvThe delay values for the set of shift registers are nonnegative integer multiples of a fixed integer that you specify.
Helical interleaverhelintrlvFills an array with input symbols in a helical fashion and empties the array row by row.

The helscanintrlv function and the helintrlv function both use a helical array for internal computations. However, the two functions have some important differences:

Example: Convolutional Interleavers

The example below illustrates convolutional interleaving and deinterleaving using a sequence of consecutive integers. It also illustrates the inherent delay of the interleaver/deinterleaver pair.

x = [1:10]'; % Original data
delay = [0 1 2]; % Set delays of three shift registers.
[y,state_y] = muxintrlv(x,delay) % Interleave.
z = muxdeintrlv(y,delay) % Deinterleave.

In this example, the muxintrlv function initializes the three shift registers to the values [], [0], and [0 0], respectively. Then the function processes the input data [1:10]', performing internal computations as indicated in the table below.

Current InputCurrent Shift RegisterCurrent OutputContents of Shift Registers
111
[]
[0]
[0 0]
220
[]
[2]
[0 0]
330
[]
[2]
[0 3]
414
[]
[2]
[0 3]
522
[]
[5]
[0 3]
630
[]
[5]
[3 6]
717
[]
[5]
[3 6]
825
[]
[8]
[3 6]
933
[]
[8]
[6 9]
10110
[]
[8]
[6 9]

The output from the example is below.

y =

     1
     0
     0
     4
     2
     0
     7
     5
     3
    10


state_y = 

    value: {3x1 cell}
    index: 2


z =

     0
     0
     0
     0
     0
     0
     1
     2
     3
     4

Notice that the "Current Output" column of the table above agrees with the values in the vector y. Also, the last row of the table above indicates that the last shift register processed for the given data set is the first shift register. This agrees with the value of 2 for state_y.index, which indicates that any additional input data would be directed to the second shift register. You can optionally check that the state values listed in state_y.value match the "Contents of Shift Registers" entry in the last row of the table by typing state_y.value{:} in the Command Window after executing the example.

Another feature to notice about the example output is that z contains six zeros at the beginning before containing any of the symbols from the original data set. The six zeros illustrate that the delay of this convolutional interleaver/deinterleaver pair is length(delay)*max(delay) = 3*2 = 6. For more information about delays, see Delays of Convolutional Interleavers.

Delays of Convolutional Interleavers

After a sequence of symbols passes through a convolutional interleaver and a corresponding convolutional deinterleaver, the restored sequence lags behind the original sequence. The delay, measured in symbols, between the original and restored sequences is indicated in the table below. The variable names in the second column (delay, nrows, slope, col, ngrp, and stp) refer to the inputs named on each function's reference page.

Delays of Interleaver/Deinterleaver Pairs

Interleaver/Deinterleaver PairDelay Between Original and Restored Sequences
muxintrlv, muxdeintrlvlength(delay)*max(delay)
convintrlv, convdeintrlvnrows*(nrows-1)*slope
helintrlv, heldeintrlvcol*ngrp*ceil(stp*(col-1)/ngrp)

Effect of Delays on Recovery of Convolutionally Interleaved Data

If you use a convolutional interleaver followed by a corresponding convolutional deinterleaver, then a nonzero delay means that the recovered data (that is, the output from the deinterleaver) is not the same as the original data (that is, the input to the interleaver). If you compare the two data sets directly, then you must take the delay into account by using appropriate truncating or padding operations.

Here are some typical ways to compensate for a delay of D in an interleaver/deinterleaver pair:

The following code illustrates these approaches by computing a symbol error rate for the interleaving/deinterleaving operation.

x = randint(20,1,64); % Original data
nrows = 3; slope = 2; % Interleaver parameters
D = nrows*(nrows-1)*slope; % Delay of interleaver/deinterleaver pair

% First approach.
x_padded = [x; zeros(D,1)]; % Pad x at the end before interleaving.
a1 = convintrlv(x_padded,nrows,slope); % Interleave padded data.
b1 = convdeintrlv(a1,nrows,slope)
b1_trunc = b1(D+1:end); % Remove first D symbols.
ser1 = symerr(x,b1_trunc) % Compare original data with truncation.

% Second approach.
a2 = convintrlv(x,nrows,slope); % Interleave original data.
b2 = convdeintrlv(a2,nrows,slope)
x_trunc = x(1:end-D); % Remove last D symbols.
b2_trunc = b2(D+1:end); % Remove first D symbols.
ser2 = symerr(x_trunc,b2_trunc) % Compare the two truncations.

The output is shown below. The zero values of ser1 and ser2 indicate that the script correctly aligned the original and recovered data before computing the symbol error rates. However, notice from the lengths of b1 and b2 that the two approaches to alignment result in different amounts of deinterleaved data.

b1 =

     0
     0
     0
     0
     0
     0
     0
     0
     0
     0
     0
     0
    59
    42
     1
    28
    52
    54
    43
     8
    56
     5
    35
    37
    48
    17
    28
    62
    10
    31
    61
    39


ser1 =

     0


b2 =

     0
     0
     0
     0
     0
     0
     0
     0
     0
     0
     0
     0
    59
    42
     1
    28
    52
    54
    43
     8


ser2 =

     0

Combining Interleaving Delays and Other Delays

If you use convolutional interleavers in a script that incurs an additional delay, d, between the interleaver output and the deinterleaver input (for example, a delay from a filter), then the restored sequence lags behind the original sequence by the sum of d and the amount from the table Delays of Interleaver/Deinterleaver Pairs. In this case, d must be an integer multiple of the number of shift registers, or else the convolutional deinterleaver cannot recover the original symbols properly. If d is not naturally an integer multiple of the number of shift registers, then you can adjust the delay manually by padding the vector that forms the input to the deinterleaver.

  


Free Early Verification Kit

Learn how to apply early verification to your development process through these technical resources.

How much time do you spend on testing to ensure implementation meets system-level requirements?

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS