Viterbi Decoder
Decoding convolutionally encoded data using the Viterbi algorithm.
Description
The Viterbi Decoder block decodes the input symbols obtained by convolutional coding to produce binary output symbols using the Viterbi algorithm. The lattice structure defines the convolutional coding scheme.
Ports
Input
Port_1 - input word obtained by convolutional coding
`vector-column
The input word received by convolutional coding, specified as a column vector. If the decoder accepts input bitstreams (that is, it can accept possible input symbols), the length of the input block vector is equal to for some positive integer .
For more information, see Input and output data sizes, Input data and solution type, and the description of the Operation mode parameter.
Data types: Float32
, Float64
, Int8
, Int16
, Int32
, UInt8
, UInt16
, UInt32
, Bool
.
Output
Port_1 - output message
binary vector-column
Output message returned as a binary vector-column. If the decoder outputs output bitstreams (that is, it can output possible output symbols), the length of the block output vector is equal to for some positive integer .
For more information, see Input and Output Dimensions.
Data types: Float32
, Float64
, Int8
, Int16
, Int32
, UInt8
, UInt16
, UInt32
, Bool
.
Parameters
Encoded data parameters
Trellis structure - description of convolutional code through code lattice
poly2trellis(7, [171 133]) (by default)
A lattice description of a convolutional code given as a lattice structure for code with rate , where is the number of input bitstreams and is the number of output bitstreams.
To create the lattice structure you can use the poly2trellis
function or set it manually.
The lattice structure contains the following fields:
-
numInputSymbols
- the number of symbols coming to the input of the encoder, set as an integer equal to , where K is the number of input bit streams. -
numOutputSymbols
- the number of symbols arriving at the output of the encoder is set as an integer equal to , where K is the number of output bit streams. -
numStates
- number of states in the encoding device, specified as degree 2. -
nextStates
- the next states for all combinations of current states and current inputs, given as a matrix of integers. The size of the matrix must benumStates
at . -
outputs
- outputs for all combinations of current states and current inputs, given as a matrix of octal numbers. The matrix size should benumStates
at .
Branch metric computation parameters
Decision type - decoder decision type
Hard decision (by default)
| Unquantized
Decision type of decoder, options to select:
-
Hard decision
- the decoder uses the Hemming distance to compute the branching metric. The input must be a vector of hard decision values that represent 0 or 1. The data type of the input must be double precision, single precision, logical or numeric. -
Unquantised
- the decoder uses Euclidean distance to compute the branching metric. The input data must be a vector of real values of double or single precision, unquantised. The object converts positive values to logical ones and negative values to logical zeros.
Traceback decoding parameters
Traceback depth - traceback depth
34 (By default)
| positive integer
The traceback depth is specified as an integer that indicates the number of grid branches used to build each traceback path.
The trace depth affects the decoding delay. The decode delay is the number of zero characters that precede the first decoded character in the output.
In continuous mode operation, the decoding delay is equal to the number of trace depth characters.
It is generally estimated that a typical trace depth value is about two to three times , where
-
- is the length of constraints in the code;
-
;
-
- is the number of input symbols;
-
- number of output symbols;
-
- vector of puncture patterns.
For example, if we apply this general estimate, we get these approximate trace depths:
-
A code with rate 1/2 has a trace depth of .
-
A code with speed 2/3 has a trace depth of .
-
A code with speed 3/4 has a trace depth of .
-
A 5/6 speed code has a trace depth of .
More information in 7.
Operation mode - method of termination of the encoded frame
Continuous (by default)
| Truncated
The encoded frame termination method specified as one of these mode values:
-
Continuous
- the block retains its internal state metric at the end of each input for use with the next frame. Each trace path is processed independently. This mode results in a decoding delay of Traceback depth zero bits for convolutional code at , where is the number of message characters and is the number of encoded characters. -
Truncated
- The block processes each input independently. The trace path starts from the state with the best metric and always ends in theall zeros
state. This mode is suitable ifTruncated (reset every frame)
is set for the corresponding block Convolutional Encoder for the Operation mode parameter. There is no output delay in this mode.
The decoder state is reset at each input time step if the block outputs sequences whose length changes during the simulation and the Truncated
operation mode is set.
If the input signal contains only one character, use the Continuous
mode.
Read more
Input and output data sizes
If the convolution code uses an alphabet of possible symbols, the length of the input vector must be for some positive integer . Similarly, if the decoded data uses an alphabet of possible output symbols, the length of the output vector will be .
This block accepts the input signal as a column vector with any positive integer value for . For variable-sized input signals, can be changed during the simulation. The operation of the block is controlled by the operation mode parameter.
This table summarises the data types supported for input and output ports.
Port | Supported Data Type |
---|---|
Input |
|
Output |
|
Input data and solution type
The input vector entries are either bipolar real, binary, or integer data depending on the value of the Decision type parameter.
Decision type | Possible decoder input entries | Interpreting values | Calculating the branching metric |
---|---|---|---|
|
Real numbers. Input values outside the range are truncated to the values and respectively. |
Positive real number: logical zero. Negative real number: logical one. |
Euclidean distance |
|
0, 1 |
0: logical zero. 1: logical one. |
Hemming distance |
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] Heller, J., and I. Jacobs. "Viterbi Decoding for Satellite and Space Communication." IEEE Transactions on Communication Technology 19, no. 5 (October 1971): 835-48. https://doi.org/10.1109/TCOM.1971.1090711.
[4] 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.
[5] 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.
[6] 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.
[7] Moision, B. "A Truncation Depth Rule of Thumb for Convolutional Codes." In Information Theory and Applications Workshop (January 27 2008-February 1 2008, San Diego, California), 555-557. New York: IEEE, 2008.