Documentation

### This is machine translation

Mouseover text to see original. Click the button below to return to the English version of the page.

# comm.AlgebraicInterleaver

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.

### Note

Starting in R2016b, instead of using the `step` method to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For example, ```y = step(obj,x)``` and `y = obj(x)` perform equivalent operations.

## 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(N+1). For the `Takeshita-Costello` method, you must set the `Length` property to a value equal to 2m, 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(N+1). N is the value you specify in the Length property. You can express every nonzero element of GF(N+1) 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

 step Permute input symbols using an algebraically derived permutation vector
Common to All System Objects
`release`

Allow System object property value changes

## Examples

expand all

Create algebraic interleaver and deinterleaver objects having a length of 16.

```interleaver = comm.AlgebraicInterleaver('Length',16); deinterleaver = comm.AlgebraicDeinterleaver('Length',16);```

Generate 8-ary data. Interleave and deinterleave the data.

```data = randi([0 7],16,1); intData = interleaver(data); deIntData = deinterleaver(intData);```

Compare the original, interleaved, and deinterleaved data.

`[data,intData,deIntData]`
```ans = 16×3 6 3 6 7 7 7 1 7 1 7 7 7 5 7 5 0 7 0 2 1 2 4 6 4 7 6 7 7 7 7 ⋮ ```

Confirm the original and deinterleaved data are identical.

`isequal(data,deIntData)`
```ans = logical 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.