Accelerating the pace of engineering and science

# comm.AlgebraicInterleaver System object

Package: comm

Permute input symbols using algebraically derived permutation vector

## Description

The AlgebraicInterleaver object rearranges the elements of its input vector using an algebraically derived permutation.

To interleave input symbols using an algebraically derived permutation vector:

1. Define and set up your algebraic interleaver object. See Construction.

2. Call step to interleave the input symbols according to the properties of comm.AlgebraicInterleaver. The behavior of step is specific to each object in the toolbox.

## Construction

H = comm.AlgebraicInterleaver creates an interleaver System object™, H, that permutes the symbols in the input signal. This permutation is based on an algebraically derived permutation vector.

H = comm.AlgebraicInterleaver(Name,Value) creates an algebraic interleaver object, H, with each specified property set to the specified value. You can specify additional name-value pair arguments in any order as (Name1,Value1,...,NameN,ValueN).

## Properties

 Method Algebraic method to generate permutation vector Algebraic method to generate permutation vector Specify the algebraic method as one of Takeshita-Costello| Welch-Costas. The default is Takeshita-Costello. The algebraic interleaver performs all computations in modulo N, where N is the length you set in the Length property. For the Welch-Costas method, the value of (N+1) must be a prime number, where N is the value you specify in the Length property. You must set the PrimitiveElement property to an integer, A, between 1 and N. This integer represents a primitive element of the finite field $GF\left(N+1\right)$. For the Takeshita-Costello method, you must set the Length property to a value equal to ${2}^{m}$, for any integer m. You must also set the MultiplicativeFactor property to an odd integer which is less than the value of the Length property. In addition, you must set the CyclicShift property to a nonnegative integer which is less than the value of the Length property. The Takeshita-Costello interleaver method uses a cycle vector of length N, which you specify in the Length property. The cycle vector calculation uses the equation, , for any integer n, between 1 and N. The object creates an intermediate permutation function using the relationship, . You can shift the elements of the intermediate permutation vector to the left by the amount specified by the CyclicShift property. Doing so produces the actual permutation vector of the interleaver. Length Number of elements in input vector Specify the number of elements in the input as a positive, integer, scalar. When you set the Method property to Welch-Costas, then the value of Length+1 must equal a prime number. When you set the Method property to Takeshita-Costello, then the value of the Length property requires a power of two. The default is 256. MultiplicativeFactor Cycle vector computation method Specify the factor the object uses to compute the cycle vector for the interleaver as a positive, integer, scalar. This property applies when you set the Method property to Takeshita-Costello. The default is 13. CyclicShift Amount of cyclic shift Specify the amount by which the object shifts indices, when it creates the final permutation vector, as a nonnegative, integer, scalar. This property applies when you set the Method property to Takeshita-Costello. The default is 0. PrimitiveElement Primitive element Specify the primitive element as an element of order N in the finite field $GF\left(N+1\right)$. N is the value you specify in the Length property. You can express every nonzero element of $GF\left(N+1\right)$ as the value of the PrimitiveElement property raised to an integer power. In a Welch-Costas interleaver, the permutation maps the integer k to ${\text{mod(A}}^{\text{k}}\text{,N+1)-1}$, where A represents the value of the PrimitiveElement property. This property applies when you set the Method property to Welch-Costas. The default is 6.

## Methods

 clone Create algebraic interleaver object with same property values getNumInputs Number of expected inputs to step method getNumOutputs Number of outputs from step method isLocked Locked status for input attributes and nontunable properties release Allow property value and input characteristics changes step Permute input symbols using an algebraically derived permutation vector

## Examples

expand all

### Interleave and deinterleave data using algebraic interleaving

```    hInt = comm.AlgebraicInterleaver('Length', 16);
hDeInt = comm.AlgebraicDeinterleaver('Length', 16);
data = randi(7, 16, 1);
intData = step(hInt, data);
deIntData = step(hDeInt, intData);
[data, intData, deIntData]
```
```ans =

6     4     6
7     7     7
1     7     1
7     7     7
5     7     5
1     7     1
2     1     2
4     6     4
7     6     7
7     7     7
2     2     2
7     2     7
7     5     7
4     4     4
6     1     6
1     1     1

```

## Algorithms

This object implements the algorithm, inputs, and outputs described on the Algebraic Interleaver block reference page. The object properties correspond to the block parameters.