| Communications Toolbox | ![]() |
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 Pair | Delay Between Original and Restored Sequences |
|---|---|
| muxintrlv, muxdeintrlv | length(delay)*max(delay) |
| convintrlv, convdeintrlv | nrows*(nrows-1)*slope |
| helintrlv, heldeintrlv | col*ngrp*ceil(stp*(col-1)/ngrp) |
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:
Interleave a version of the original data that is padded with D extra symbols at the end. Before comparing the original data with the recovered data, omit the first D symbols of the recovered data. In this approach, all the original symbols appear in the recovered data.
Before comparing the original data with the recovered data, omit the last D symbols of the original data and the first D symbols of the recovered data. In this approach, some of the original symbols are left in the deinterleaver's shift registers and do not appear in the recovered data.
The code below 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
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.
| Example: Convolutional Interleavers | Selected Bibliography for Interleaving | ![]() |
© 1994-2005 The MathWorks, Inc.