Communications Blockset    

Aligning Words of a Block Code

The ADSL demo, discussed in ADSL Demo Model, illustrates the need to manipulate the delay in a model so that each frame of data that enters a block decoder has a code word boundary at the beginning of the frame. The need arises because the path between a block encoder and block decoder includes a delay-causing convolutional interleaving operation. This section explains why the model uses an Integer Delay block to manipulate the delay between the convolutional deinterleaver and the block decoder, and why the Integer Delay block is configured as it is. To open the ADSL demo model, type adsl_sim in the MATLAB Command Window.

Misalignment of Code Words

Notice in the ADSL demo that the Convolutional Interleaver and Convolutional Deinterleaver blocks appear after the Scrambler & FEC subsystems but before the Descrambler & FEC subsystems. These two subsystems contain blocks that perform Reed-Solomon coding, and the coding blocks expect each frame of input data to start on a new word rather than in the middle of a word.

As discussed in Path for Interleaved Data, the delay of the interleaver/deinterleaver pair is 40 samples. However, the input to the Descrambler & FEC subsystem is a frame of size 840, and 40 is not a multiple of 840. Consequently, the signal that exits the Convolutional Deinterleaver block is a frame whose first entry does not represent the beginning of a new code word. As described in Observing the Problem, this misalignment, between code words and the frames that contain them, hinders the decoder.

Inserting a Delay to Correct the Alignment

The ADSL demo solves the problem by moving the word boundary from the 41st sample of the 840-sample frame to the first sample of a successive frame. Moving the word boundary is equivalent to delaying the signal. To this end, the demo contains an Integer Delay block between the Convolutional Deinterleaver block and the Descrambler & FEC subsystem.

The Delay parameter in the Integer Delay block is 800 because that is the minimum number of samples required to shift the 41st sample of one 840-sample frame to the first sample of the next 840-sample frame. In other words, the sum of the inherent 40-sample delay (from the interleaving/deinterleaving process) and the artificial 800-sample delay is a full frame of data, not a partial frame.

Note that this 800-sample delay has implications for other parts of the model, specifically, the Receive delay parameter in one of the Error Rate Calculation blocks. For details about how the delay influences the value of that parameter, see Path for Interleaved Data.


  Delays and Alignment Problems Aligning Words for Interleaving