EngeeComms.ConvolutionalEncoder
Convolutional encoding of binary data.
| Library |
|
| Block |
Description
System object EngeeComms.ConvolutionalEncoder Encodes a sequence of binary input vectors to produce a sequence of binary output vectors.
To perform convolutional encoding of binary data, follow these steps:
-
Create an object EngeeComms.ConvolutionalEncoder and set its properties.
-
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.
Creation
Syntax
-
object = EngeeComms.ConvolutionalEncoder— creates a system object for convolutional encoding with default properties.Example:
ConvEncoder = EngeeComms.ConvolutionalEncoder() -
object = EngeeComms.ConvolutionalEncoder(trellis)— creates a system object for convolutional encoding with a description through a 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 specified properties in the form of a pairName=Value, whereName— the name of the property, andValue— the appropriate value. You can specify multiple pairs «name-value» the order of the pairs does not matter. Unspecified properties retain their default values.Example:
# сохраняет состояния кодера в конце каждого входа для использования в следующем кадре ConvEncoder = EngeeComms.ConvolutionalEncoder(TerminationMethod="Continuous")
Features
TrellisStructure — description of the convolutional code through a lattice structure
+
poly2trellis(7, [171,133]) (default) | lattice structure
Details
A trellis description of a convolutional code, defined as a structure containing a trellis description for a code with a speed of , 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 create it manually.
The grid structure contains the following fields:
-
numInputSymbols— the number of characters entered into the encoder, set as an integer equal to , where — the number of input bit streams. -
numOutputSymbols— the number of characters output from the encoder, set as an integer equal to , where — the number of output bit streams. -
numStates— the number of states in the encoder, set as a power2. -
nextStates— subsequent states for all combinations of current states and current inputs, specified as a matrix of integers. The size of the matrix should benumStateson . -
outputs— output data for all combinations of current states and current input data, specified as a matrix of octal numbers. The size of the matrix should benumStateson .
TerminationMethod is the method of completing the encoded frame
+
Continuous (by default) | Truncated
Details
The completion method of the encoded frame, set as one of these values:
-
Continuous— the system object saves the encoder states at the end of each input vector for use in the next input vector. -
Truncated— the system object resets at the beginning of each input vector. If you set the InitialStateInputPort property to0 (false), then the object resets its states to «all zeros». If you set the InitialStateInputPort property to1 (true), then the object resets its states to the values specified in the input argument initstate.
DelayedResetAction — option to delay output data reset
+
0 (default) | 1
Details
The output data reset delay option, set as one of these boolean values:
-
1(true) — the internal states of the encoder are reset after the object calculates the encoded data. -
0(false) — the internal states of the encoder are reset before the object calculates the encoded data.
Dependencies
To use this property, set the ResetInputPort property to 1.
InitialStateInputPort — option to enable entry of the initial state
+
0 (default) | 1
Details
The option to enable the input of the initial state, set as a logical 1 (true) or 0 (false). When setting the value for this property 1 The object allows you to set the initial state of the encoder for each input vector.
Dependencies
To use this property, set the TerminationMethod property to Truncated.
FinalStateOutputPort — option to enable the output of the final state
+
0 (default) | 1
Details
The option to enable the output of the final state, set as a logical 1 (true) or 0 (false). Set the values for this property 1 to get the final state of the encoder at the output.
Dependencies
To use this property, set the TerminationMethod property to Continuous or Truncated.
PuncturePatternSource — the source of the perforation pattern
+
None (by default) | Property
Details
The source of the perforation pattern is specified as one of these values:
-
None— the object does not perform perforation. -
Property— the object performs code punching. The perforation is based on the vector of the perforation pattern, which is set in the PuncturePattern property.
Dependencies
To use this property, set the TerminationMethod property to Continuous or Truncated.
PuncturePattern — vector of the perforation pattern
+
[1; 1; 0; 1; 0; 1] ( by default) | column vector
Details
The perforation pattern, defined as a vector. The perforation vector is a template from 1 and 0, where 0 denote the punched bits or bits excluded from the output encoded data.
Dependencies
To use this property, set the TerminationMethod property to Continuous or Truncated, and for the PuncturePatternSource property , the value Property.
Using
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()— create a default system object. -
ConvEncoder= EngeeComms.ConvolutionalEncode(Name=Value)— creation of 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 — convolutional code word, and finalstate — 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 code message returned as a column vector with binary values. This output vector has the same data type and orientation as the input message.
When the convolutional encoder presents the code at a rate of , the length of the input vector is for some positive integer . The object sets the length of the output vector to .
Data types: Float64, Int8
finalstate — the final state of the encoder
+
an 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
Additional Info
Learn more about convolutional coding
Details
Convolutional encoding is an error—controlled encoding that has memory. In particular, the calculations and the encoded output depend on the current set of input characters and on the number of previous input characters, which varies depending on the grid configuration.
The convolutional encoder outputs bits for each input bits. During the modeling process, the input data can 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 the convolutional code, you can use:
-
System object EngeeComms.APPDecoder — uses a posteriori probabilistic decoder to soft decode the output of convolutional codes.
Literature
-
Clark, George C., and J. Bibb Cain. Error-Correction Coding for Digital Communications. Applications of Communications Theory. New York: Plenum Press, 1981.
-
Gitlin, Richard D., Jeremiah F. Hayes, and Stephen B. Weinstein. Data Communications Principles. Applications of Communications Theory. New York: Plenum Press, 1992.
-
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.
-
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.
-
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.