Engee documentation

Convolutional Encoder

Encodes binary data using a convolutional encoding scheme.

blockType: ConvolutionalEncoder

Path in the library:

/Communication Systems/Error Detection And Correction/Convolution/Convolutional Encoder

Description

Block Convolutional Encoder encodes the input binary message using a convolutional encoding scheme specified by the lattice structure.

The block icon and the number of input and output ports change depending on the value of the parameters Specify initial state via input port and Output final state.

Ports

Output

# OUT_1 — output signal
binary column vector

Details

A convolutional code word returned as a binary column vector.

This port has no name on the block icon.

If the encoder produces output bit streams (that is, it can produce possible output characters), the length of the output vector of the block is for some positive integer . This output inherits the data type from the In input.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64

Complex numbers support

No

# FSt — the final state of the registers
a non-negative integer

Details

The final state of the encoder registers for each frame output from the block, returned as a non-negative integer.

Dependencies

To use this port, set the parameter Operation mode one of the values is: Continuous, Truncated (reset every frame), or Reset on nonzero input via port and check the box Output final state.

Data types

Float64

Complex numbers support

No

Input

# In — The input signal
binary column vector

Details

An input message specified as a binary column vector. This port remains unnamed until the second input port is enabled.

The encoder accepts only one input bit stream .

Example: [1 1 0 1 0 0 1 1] defines a message as a binary vector of strings with eight elements.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64

Complex numbers support

No

# ISt — the initial state of the registers
a non-negative integer

Details

The initial state of the encoder registers for each frame entering the block is set as a non-negative integer.

Dependencies

To use this port, set the parameter Operation mode meaning Truncated (reset every frame) and check the box Specify initial state via input.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64

Complex numbers support

No

Parameters

Main

# Trellis structure — description of the convolutional code through a code grid
String

Details

A lattice description of a convolutional code, defined as a lattice structure for a code with a velocity , where is the number of input bit streams, and — the number of output bit streams.

To create the lattice structure, you can use the function poly2trellis or set it manually.

The lattice structure contains the following fields:

  • numInputSymbols — the number of characters entering the input of the encoding device is set as an integer equal to , where K is the number of input bit streams.

  • numOutputSymbols — the number of characters coming to the output of the encoding device is set as an integer equal to , where K is the number of output bit streams.

  • numStates — the number of states in the encoding device, set as a power of 2.

  • nextStates — the following states for all combinations of current states and current inputs, specified as a matrix of integers. The size of the matrix should be numStates on .

  • outputs — outputs for all combinations of current states and current inputs, specified as a matrix of octal numbers. The size of the matrix should be numStates on .

Default value

poly2trellis(7, [171 133])

Program usage name

TrellisStructure

Tunable

No

Evaluatable

Yes

# Operation mode — encoded frame completion method
Continuous | Truncated (reset every frame)

Details

The completion method of the encoded frame, set as one of these mode values.

  • Continuous — The block saves the encoder states at the end of each input for use in the next frame.

  • Truncated (reset every frame) — the unit processes each input independently. At the beginning of each input frame, the encoder states are reset to the "all zeros" state or, if the Specify initial state via input port checkbox is selected, to the state specified by the ISt port.

Values

Continuous | Truncated (reset every frame)

Default value

Continuous

Program usage name

OperationMode

Tunable

No

Evaluatable

No

# Specify initial state via input port — set the initial state via the input port
Logical

Details

Select this option to add the ISt input port to the block.

Dependencies

To use this parameter, set for the parameter Operation mode meaning Truncated (reset every frame).

Default value

false (switched off)

Program usage name

SpecifyInitialStateViaInputPort

Tunable

No

Evaluatable

No

# Output final state — output the final state
Logical

Details

Select this option to add the FSt output port to the block.

Dependencies

To use this parameter, set for the parameter Operation mode meaning Continuous or Truncated (reset every frame).

Default value

false (switched off)

Program usage name

OutputFinalState

Tunable

No

Evaluatable

No

# Puncture code — enabling convolutional code punching
Logical

Details

Check this box to use the parameter Puncture vector.

Default value

false (switched off)

Program usage name

PunctureCode

Tunable

No

Evaluatable

No

# Puncture vector — the perforation pattern

Details

The perforation pattern, defined as a vector. The perforation vector is a template from 1 and 0, where 0 denote the bits excluded from the output encoded data.

The length of the vector must be an integer multiple of length(In), the length of the input message vector.

Some commonly used puncture patterns for certain velocities and polynomials are given in [3], [4], [5].

Dependencies

To use this option, select the Puncture code checkbox.

Default value

[1; 1; 0; 1; 0; 1]

Program usage name

PunctureVector

Tunable

No

Evaluatable

Yes

More about convolutional coding

Convolutional coding is an error—controlled coding that has memory. In particular, the calculations and the encoded output depend on the current set of input symbols and on the number of previous input symbols, which varies depending on the lattice configuration.

The convolutional encoder outputs bits for each input bits. In the process of modeling, the input data can be multiples bits.

Using a lattice structure that defines a set of generator polynomials, you can simulate unsystematic, systematic convolutional codes with direct or systematic feedback.

To decode the output signal of the convolutional code, you can use:

  • Block Viterbi Decoder — Uses Viterbi algorithm with hard and soft decoding.

  • The APP Decoder block uses a posteriori probabilistic decoder to soft decode the output of convolutional codes.

Definition of the encoder

To define a convolutional encoder, use the parameter Trellis structure. The lattice structure can be specified by calling the function poly2trellis.

For example, to use an encoder with a length limit 7, code generator polynomials 171 and 133 (in octal numbers), set for the parameter Trellis structure value poly2trellis(7,[171 133]).

Literature

  1. Clark, George C., and J. Bibb Cain. Error-Correction Coding for Digital Communications. Applications of Communications Theory. New York: Plenum Press, 1981.

  2. Gitlin, Richard D., Jeremiah F. Hayes, and Stephen B. Weinstein. Data Communications Principles. Applications of Communications Theory. New York: Plenum Press, 1992.

  3. Yasuda, Y., K. Kashiki, and Y. Hirata. “High-Rate Punctured Convolutional Codes for Soft Decision Viterbi Decoding.” IEEE Transactions on Communications 32, no. 3 (March 1984): 315–19. https://doi.org/10.1109/TCOM.1984.1096047.

  4. Haccoun, D., and G. Begin. “High-Rate Punctured Convolutional Codes for Viterbi and Sequential Decoding.” IEEE Transactions on Communications 37, no. 11 (November 1989): 1113–25. https://doi.org/10.1109/26.46505.

  5. Begin, G., D. Haccoun, and C. Paquin. “Further Results on High-Rate Punctured Convolutional Codes for Viterbi and Sequential Decoding.” IEEE Transactions on Communications 38, no. 11 (November 1990): 1922–28. https://doi.org/10.1109/26.61470.