Communications Blockset | ![]() ![]() |
Aligning Words of a Concatenated Code
This section describes an example that manipulates the delay between the two portions of a concatenated code decoder, because the first portion includes a delay from Viterbi decoding while the second portion expects frame boundaries to coincide with word boundaries. To open the model, type concatdoc
in the MATLAB Command Window. It uses the block and convolutional codes from the dvbt_sim
demo, but simplifies the overall design a great deal.
The model includes a shortened block code and a punctured convolutional code. All signals and blocks in the model share the same frame period. The following table summarizes the individual block delays in the model.
Block |
Delay, in Output Samples from Individual Block |
Viterbi Decoder |
136 |
Integer Delay |
1496 (that is, 1632 - 136) |
Misalignment of Block Code Words
The Viterbi decoding process in this model causes a delay between the Integer to Bit Converter block and the Bit to Integer Converter block. Because the latter block expects each frame of input data to start on a new 8-bit word, it is important to ensure that the total delay between the two converter blocks includes one or more full frames but no partial frames.
The delay of the Viterbi Decoder block is 136 output samples. However, the input to the Bit to Integer Converter block is a frame of size 1632. Consequently, the signal that exits the Viterbi Decoder block is a frame whose first entry does not represent the beginning of a new word. As described in Observing the Problem, this misalignment, between words and the frames that contain them, hinders the converter block.
Inserting a Delay to Correct the Alignment
The model moves the word boundary from the 137th sample of the 1632-sample frame to the first sample of the next frame. Moving the word boundary is equivalent to delaying the signal by 1632-136 samples. The Integer Delay block between the Viterbi Decoder block and the Bit to Integer Converter block accomplishes such a delay. The Integer Delay block has its Delay parameter set to 1496
.
Combining the effects of the Viterbi Decoder block and the Integer Delay block, the total delay between the interleaver and deinterleaver is a full 1632-sample frame of data, not a partial frame.
Computing Delays to Configure the Error Rate Calculation Blocks
The model contains two Error Rate Calculation blocks, labeled Inner Error Rate and Outer Error Rate. Each of these blocks has a Receive delay parameter that must reflect the delay of the path between the block's Tx
and Rx
signals. The table below explains the Receive delay values in the two blocks.
![]() | Aligning Words for Interleaving | Comparing Baseband and Passband Simulation | ![]() |