Convolutional Encoder
Encoding binary data using a convolutional coding scheme.
Description
The Convolutional Encoder block 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
Input
Port_1 - input signal
`binary vector column
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 K = 1.
*Example: [1 1 0 1 0 1 0 0 0 1 1 1]
specifies a message as a binary vector of strings with eight elements.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
.
ISt - initial state of registers
non-negative integer
Initial state of encoder registers for each frame arriving to the block, specified as a non-negative integer.
Dependencies
To enable this port, set the Operation mode parameters to Truncated (reset every frame)
and select the Specify initial state via input checkbox.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
.
Output
Port_1 - output signal
binary vector-column
A convolutional codeword returned as a binary column vector.
This port is not named on the block icon.
If the encoder produces output bitstreams (that is, it can produce possible output symbols), the length of the block output vector is for some positive integer . This output inherits the data type from the In input.
In data types: Float64
.
FSt - final state of registers
non-negative integer
The final state of the encoder registers for each frame output from the block, returned as a non-negative integer.
Dependencies
To enable this port, set the Operation mode parameters to one of Continuous
, Truncated (reset every frame)
, or Reset on nonzero input via port
and select the Output final state checkbox.
Parameters
Trellis structure - description of the convolution code through the lattice structure
poly2trellis(7, [171,133]) (by default)
.
Trellis description of the convolution 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 trellis structure contains the following fields:
numInputSymbols - the number of symbols input to the encoder
2K
The 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
2N
The number of symbols output from the encoder, specified as an integer equal to , where is the number of output bitstreams.
numStates is the number of states in the encoder
degree 2
Number of states in the encoder, specified as degree 2
.
nextStates - subsequent states
matrix of integers
The subsequent states for all combinations of current states and current inputs, given as a matrix of integers. The size of the matrix must be numStates by 2K.
outputs - output data
`matrix of octal numbers
Outputs for all combinations of current states and current inputs, given as a matrix of octal numbers. The matrix size must be numStates by 2K.
Operation mode - the method of termination of the encoded frame
Continuous (by default)
| Truncated (reset every frame)
The encoded frame termination method specified as one of these mode values.
-
Continuous
- The block saves the encoder states at the end of each input for usage in the next frame. -
Truncated (reset every frame)
- the block 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.
Specify initial state via input port - set initial state via input port
disabled (by default)
| enabled
Select this parameters to add the ISt input port to the block.
Dependencies
To use this parameter, set the Operation mode parameters to Truncated (reset every frame)
.
Output final state - output final state
Off (by default)
| `On
Select this parameters to add the FSt output port to the block.
Dependencies
To use this parameter, set the Operation mode parameters to Continuous
, Truncated (reset every frame)
, or Reset on nonzero input via port
.
Puncture code to enable perforation of the convolution code
Off (by default)
| On
.
Select this parameter to enable the Puncture vector parameter.
Puncture vector is the perforation pattern
[1; 1; 0; 1; 1; 0; 1] (by default)
| `Puncture vector'.
A perforation pattern specified as a vector. The perforation vector is a pattern of 1
and 0
, where 0
denotes bits excluded from the output coded 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 rates and polynomials are given in references [3], [4] and [5].
Dependencies
To use this parameters, select the Puncture code check box
More information about convolutional coding
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 a multiple 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:
-
Viterbi Decoder block - uses the Viterbi algorithm with hard and soft decoding.
-
Block APP Decoder - uses posterior probabilistic decoder for soft decoding of convolutional code output.
Encoder definition
To define a convolutional coder, use the Trellis structure parameters. The trellis structure can be specified by calling the poly2trellis
function.
For example, to use an encoder with constraint length 7, code generator polynomials 171 and 133 (in octal), set the parameters Trellis structure to
poly2trellis(7,[171 133])
Bibliography
[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.