Contenido principal

heldeintrlv

R2026b

Restore ordering of symbols permuted using helintrlv

Description

[deintrlvd,state] = heldeintrlv(data,col,ngrp,stp) restores the ordering of symbols in data by placing them in an internal matrix row by row and then selecting groups in a helical fashion to place in the output, deintrlvd. For more information, see Helical Deinterleaving.

example

[deintrlvd,state] = heldeintrlv(data,col,ngrp,stp,init_state) initializes the internal matrix with the symbols contained in init_state.value instead of zeros. In this syntax, some output symbols are default values of 0, some are input symbols from data, and some are initialization values from init_state.value.

deintrlvd = heldeintrlv(data,col,ngrp,stp,init_state) is the same as the syntax above, except that it does not record the deinterleaver's final state. This syntax is appropriate for the last in a series of calls to this function. However, if you plan to call this function again to continue the deinterleaving process, the syntax above is more appropriate.

Examples

collapse all

When you use a helical interleaver followed by a corresponding helical deinterleaver, the internal registers in the interleaver and deinterleaver cause a delay in the recovered data output from the deinterleaver. To compare the two data sets directly, you must take the delay into account by using appropriate truncating or padding operations.

Define helical interleaving parameters and compute the delay of the interleaver and deinterleaver pair. Compute the number of symbols to process for each call of the interleaver. Generate data of random symbols and append zero padding.

col = 4;
ngrp = 3;
stp = 2;
delayval = col * ngrp * ceil(stp * (col-1)/ngrp);
len = col*ngrp;
data = randi([0 9],len,1);
data_padded = [data; zeros(delayval,1)];

Interleave zero-padded data.

[i1,istate] = helintrlv(data_padded(1:len),col,ngrp,stp);
[i2,istate] = helintrlv(data_padded(len+1:2*len),col,ngrp, ...
    stp,istate);
i3 = helintrlv(data_padded(2*len+1:end),col,ngrp,stp,istate);

Deinterleave the data and concatenate the output into a single data vector. Truncate the deinterleaved data vector to remove the delay, and then check the symbol error rate.

[d1,dstate] = heldeintrlv(i1,col,ngrp,stp);
[d2,dstate] = heldeintrlv(i2,col,ngrp,stp,dstate);
d3 = heldeintrlv(i3,col,ngrp,stp,dstate);

d0 = [d1; d2; d3];
d0_trunc = d0(delayval+1:end);
ser = symerr(data,d0_trunc)
ser = 
0

Input Arguments

collapse all

Interleaved signal, specified as a vector or matrix.

  • If data is a vector, it must have col×ngrp elements.

  • If data is a matrix with multiple rows and columns, data must have col×ngrp rows. The function processes the columns independently.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32
Complex Number Support: Yes

Number of columns in the temporary internal matrix, specified as a positive integer.

Number of symbols per group of rows used for helical interleaving, specified as a positive integer.

Number of symbols per group of rows used for helical interleaving, specified as a positive integer.

Initial state of registers, typically specified by using the state output from a previous call to this same function. The initial state of registers is unrelated to the corresponding interleaver.

Deinterleaved data, returned with the same dimensions and data type as the input data.

Final state of the shift registers after the previous call to this function, returned as a structure with these fields:

Unshifted symbols, returned as a vector containing input symbols that remain in the col columns of the internal matrix and do not appear in the output.

Index of the next register to be shifted, returned as a positive integer.

More About

collapse all

Version History

Introduced before R2006a

See Also