Communications Blockset    

Decoding the Convolutional Code

Now that the received data is properly mapped to length-two vectors of 3-bit decision values, the Viterbi Decoder block can decode it. The Viterbi Decoder block resides in the Convolutional sublibrary of the Channel Coding library.

The Trellis structure parameter in the Viterbi Decoder block defines the encoder and therefore matches the corresponding parameter in the model's Convolutional Encoder block. For more information about this parameter, see Encoding Using a Convolutional Code.

Other parameters in the Viterbi Decoder block are specific to the decoding process. The block uses soft decisions with 23 different input values because the Decision type parameter is Soft Decision and the Number of soft decision bits parameter is 3.

Defining the Decoding Process (Technical)

This section elaborates on some more advanced aspects of the decoding in this example. It discusses how the Viterbi Decoder block interprets its inputs, how the interpretation influences the mapping done by the blocks that precede the Viterbi Decoder block, and what the Traceback depth parameter means.

Soft-Decision Interpretation of Data.   When the Decision type parameter is set to Soft Decision, the Viterbi Decoder block requires input values between 0 and 2b-1, where b is the Number of soft decision bits parameter. The block interprets 0 as the most confident decision that the codeword bit is a zero and interprets 2b-1 as the most confident decision that the codeword bit is a one. The values in between these extremes represent less confident decisions.

The table below lists the interpretations of the eight possible input values for this example.

Table 1-1: Decision Values for 3-Bit Soft Decisions 
Decision Value
Interpretation
0
Most confident 0
1
Second most confident 0
2
Third most confident 0
3
Least confident 0
4
Least confident 1
5
Third most confident 1
6
Second most confident 1
7
Most confident 1

How Decoder's Interpretation Influences Choice of Mapping.   The table above helps explain the design of the mapping process described in Mapping the Received Data. For example, if the original message contains a 1, then the Viterbi Decoder block makes a correct decision if and only if it receives an input between 4 and 7. On the other hand, the 1 in the message gets mapped to -1 by the BPSK Modulator Baseband block and to a number near -1 by the AWGN Channel block. This means that the Sampled Quantizer Encode block should be configured so as to map input numbers near -1 to output numbers between 4 and 7. As the Quantization partition and Quantization codebook parameters for the Sampled Quantizer Encode block indicate, it maps input numbers less than 0 to output numbers between 4 and 7. The schematic below suggests how knowledge about the modulator, channel, and decoder decisions (solid arrows) can help you design intermediate steps like the mapping procedure (dashed arrow).

Figure 1-2: Processing and Recovery of Code Bits

Traceback Depth Parameter.   The Traceback depth parameter in the Viterbi Decoder block represents the length of the decoding delay. Typically, people aim for a traceback depth of about five or six times the constraint length, which would be 35 or 42 in this example. However, some hardware implementations offer options of 48 and 96. This example chooses 48 because that is closer to the targets (35 and 42) than 96 is.


 Buffering to Convert Scalars to Vectors Computing the Error Rate