Engee documentation

EngeeComms.ConvolutionalEncoder

Convolutional encoding of binary data.

Library

EngeeComms

Block

Convolutional Encoder

Description

The EngeeComms.ConvolutionalEncoder system object encodes a sequence of binary input vectors to produce a sequence of binary output vectors.

To perform convolutional encoding of binary data, perform the following steps:

  1. Create an EngeeComms.ConvolutionalEncoder object and set its properties.

  2. Call the object with arguments as if it were a function.

To learn more about how to work with system objects, see Engee system objects.

Creating

Syntax

  • object = EngeeComms.ConvolutionalEncoder creates a system object for convolutional encoding with by default properties. Example:

    ConvEncoder = EngeeComms.ConvolutionalEncoder()
  • object = EngeeComms.ConvolutionalEncoder(trellis) creates a system object for convolutional coding with a description via the lattice structure TrellisStructure. Example:

    # кодер с длиной ограничения 7 и полиномами генератора кода 171 и 133 (в восьмеричных числах)
    ConvEncoder = EngeeComms.ConvolutionalEncoder(TrellisStructure="poly2trellis(7, [171 133])"
  • object = EngeeComms.ConvolutionalEncoder(Name=Value) creates a system object for convolutional encoding with each specified property Name (name) set to the specified Value (value). You can specify additional arguments as a name-value pair in any order (Name1=Value1,…​,NameN=ValueN). Example:

    # сохраняет состояния кодера в конце каждого входа для использования в следующем кадре
    ConvEncoder = EngeeComms.ConvolutionalEncoder(TerminationMethod="Continuous")

Properties

TrellisStructure -. description of convolutional code via lattice structure
poly2trellis(7, [171 133]) (by default) | lattice structure

Details

A Trellis description of convolutional code, given as a structure containing a Trellis description for code with rate , where is the number of input bitstreams and is the number of output bitstreams.

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

The lattice structure contains the following fields:

  • numInputSymbols - number of symbols input to the encoder, specified as an integer equal to , where is the number of input bitstreams.

  • numOutputSymbols - number of symbols output from the encoder, specified as an integer equal to , where - number of output bit streams.

  • numStates - number of states in the encoder, specified as degree 2.

  • nextStates - subsequent states for all combinations of current states and current inputs, given as a matrix of integers. The matrix size must be numStates at .

  • outputs - outputs for all combinations of current states and current inputs, given as a matrix of octal numbers. The matrix size should be numStates at .

TerminationMethod - method for terminating an encoded frame
Continuous (by default) | Truncated

Details

The encoded frame termination method specified as one of these values:

  • Continuous - The system object saves the encoder states at the end of each input vector for usage in the next input vector.

  • Truncated - the system object resets at the beginning of each input vector. If you set the InitialStateInputPort property to 0 (false), the object resets its states to all zeros. If you set the InitialStateInputPort property to 1 (true), the object resets its states to the values specified in the initstate input argument.

DelayedResetAction -. option for delayed reset of output data
0 (by default) | 1

Details

Output data reset delay option specified as one of these logical values:

  • 1 (true) - the reset of the internal states of the encoder occurs after the object calculates the encoded data.

  • 0 (false) - the reset of the internal states of the encoder occurs before the object calculates the encoded data.

Dependencies

To use this property, set the ResetInputPort property to 1.

InitialStateInputPort -. option to enable initial state input
0 (by default) | 1

Details

Option to enable initial state input, specified as logical 1 (true) or 0 (false). When this property is set to 1, the object allows the initial state of the encoder to be set for each input vector.

Dependencies

To use this property, set the TerminationMethod property to Truncated.

FinalStateOutputPort -. option to enable final state output
0 (by default) | 1

Details

Option to enable final state output, specified as logical 1 (true) or 0 (false). Set this property to 1 to get the encoder’s final state output.

Dependencies

To use this property, set the TerminationMethod property to Continuous or Truncated.

PuncturePatternSource — perforation pattern source
None (By default) | Property

Details

The source of the punch pattern, specified as one of these values:

  • None - the object does not perform perforation.

  • Property - the object performs code perforation. Perforation is based on the perforation pattern vector, which is specified in the PuncturePattern property.

Dependencies

To use this property, set the TerminationMethod property to Continuous or Truncated.

PuncturePattern — perforation pattern vector
[1; 1; 0; 1; 1; 0; 1] (by default) | column vector

Details

A perforation pattern specified as a vector. The perforation vector is a pattern of 1 and 0, where 0 denotes perforated bits or bits excluded from the output coded data.

Dependencies

To use this property, set the TerminationMethod property to Continuous or Truncated and the PuncturePatternSource property to Property.

Usage

Syntax

ConvEncoder= EngeeComms.ConvolutionalEncoder()

ConvEncoder= EngeeComms.ConvolutionalEncoder(TrellisStructure="poly2trellis(3,[4 5])")

ConvEncoder= EngeeComms.ConvolutionalEncoder(TrellisStructure="poly2trellis(3,[4 5])" TerminationMethod="Truncated", FinalStateOutputPort=true)
in_data = [1; 0; 1; 0; 0; 1]
out = ConvEncoder(in_data)

Description

  • ConvEncoder= EngeeComms.ConvolutionalEncoder() to create a system default object.

  • ConvEncoder= EngeeComms.ConvolutionalEncode(Name=Value) - creating an object with the specified parameters.

Output arguments

out - output value
[codeword, finalstate]| [codeword]

Details

If the FinalStateOutputPort property is set to 1 (true), then the output argument out is a vector [codeword, finalstate], where codeword is the convolutional codeword and finalstate is the final state of the encoder. If the FinalStateOutputPort property is set to 0 (false), then out contains only the convolutional codeword [codeword].

A convolutional codeword message returned as a column vector with binary values. This output vector has the same data type and orientation as the input message.

When a convolutional encoder presents code at rate , the length of the input vector is for some positive integer . The object sets the length of the output vector equal to .

Data types: Float64, Int8

finalstate - encoder final state
integer

Details

The final state of the encoder, returned as an integer.

Dependencies

To use this argument, set the TerminationMethod property to Continuous or Truncated.

Data types: Float64

Methods

Common for all system objects

step!

Start the system object’s operating algorithm

release!

Allow changing the value of a system object property

reset!

Reset internal states of the system object

Optional

More about convolutional coding

Details

Convex coding is an error-controlled coding that has memory. In particular, the computation and the coded 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 every input bits. During simulation, the input data may be multiples of bits.

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

To decode the output of a convolution code, you can use:

  • EngeeComms.APPDecoder system object - uses a posterior probabilistic decoder to soft decode the output of convolution codes.

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.