Communications Blockset | ![]() ![]() |
Aligning Words for Interleaving
This section describes an example that manipulates the delay before a deinterleaver, because the path between the interleaver and deinterleaver includes a delay from demodulation. To open the model, type gmskintdoc
in the MATLAB Command Window.
The model includes block coding, helical interleaving, and GMSK modulation. The table below summarizes the individual block delays in the model.
Block |
Delay, in Output Samples from Individual Block |
Reference |
GMSK Demodulator Baseband |
16 |
Delays in Digital Modulation |
Helical Deinterleaver |
42 |
Delays of Convolutional Interleavers |
Integer Delay |
5 |
Integer Delay reference page |
Misalignment of Interleaved Words
The demodulation process in this model causes a delay between the interleaver and deinterleaver. Because the deinterleaver expects each frame of input data to start on a new word, it is important to ensure that the total delay between the interleaver and deinterleaver includes one or more full frames but no partial frames.
The delay of the demodulator is 16 output samples. However, the input to the Helical Deinterleaver block is a frame of size 21, and 16 is not a multiple of 21. Consequently, the signal that exits the GMSK Demodulator Baseband 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 deinterleaver.
Inserting a Delay to Correct the Alignment
The model moves the word boundary from the 17th sample of the 21-sample frame to the first sample of the next frame. Moving the word boundary is equivalent to delaying the signal by 5 samples. The Integer Delay block between the GMSK Demodulator Baseband block and the Helical Deinterleaver block accomplishes such a delay. The Integer Delay block has its Delay parameter set to 5
.
Combining the effects of the demodulator and the Integer Delay block, the total delay between the interleaver and deinterleaver is a full 21-sample frame of data, not a partial frame.
Checking Alignment of Block Code Words
The interleaver and deinterleaver cause a combined delay of 42 samples measured at the output from the Helical Deinterleaver block. Because the delayed output from the deinterleaver goes next to a Reed-Solomon decoder and because the decoder expects each frame of input data to start on a new word, it is important to ensure that the total delay between the encoder and decoder includes one or more full frames but no partial frames.
In this case, the 42-sample delay is exactly two frames. Therefore, it is not necessary to insert an Integer Delay block between the Helical Deinterleaver block and the Binary-Output RS Decoder block.
Computing Delays to Configure the Error Rate Calculation Blocks
The model contains two Error Rate Calculation blocks, labeled Channel Error Rate and System 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 of a Block Code | Aligning Words of a Concatenated Code | ![]() |