Communications Blockset | ![]() ![]() |
This section discusses a punctured coding model that includes delays from decoding, downsampling, and filtering. Two Error Rate Calculation blocks in the model work correctly if and only if their Receive delay parameters accurately reflect the delays in the model. To open the model, type punctdoc
in the MATLAB Command Window.
Frame Periods in the Model
Before searching for individual delays, first enable the Sample time colors option from the model window's Format menu. Notice that only the rightmost portion of the model differs in color from the rest of the model. This means that all signals and blocks in the model except those in the rightmost edge share the same frame period. As a consequence, frames at this predominant frame rate are a convenient unit for measuring delays in the blocks that process these signals. In the computation of the cumulative delay along a path, the weighted average (of numbers of frames, weighted by each frame's period) reduces to a sum.
The yellow blocks represent multirate systems, while the AWGN Channel block and the Rx Filter block run at a higher frame rate than most other blocks in the model.
Inner Error Rate Block
The block labeled Inner Error Rate, located near the center of the model, is a copy of the Error Rate Calculation block from the Sinks library. It computes the bit error rate for the portion of the model that excludes the punctured convolutional code. In the portion of the model between this block's two input signals, delays come from the Tx Filter, Rx Filter, and Downsample blocks, as summarized in the following table. This section explains why the Inner Error Rate block's Receive delay parameter is the total delay value of 16
.
Block |
Delay, in Samples at Individual Block |
Delay, in Frames at Predominant Frame Rate |
Delay, in Input Samples to Inner Error Rate Block |
Tx Filter |
3 |
3/2 |
6 |
Rx Filter |
3 (relative to input of Tx Filter block) |
3/2 |
6 |
Downsample |
2 |
1 |
4 |
Total |
N/A |
4 |
16 |
Tx Filter Block. The block labeled Tx Filter is a copy of the FIR Interpolation block in the DSP Blockset. It upsamples the input signal by a factor of 8
and applies a square-root raised cosine filter. The value of the block's FIR filter coefficients parameter is
where the ratio 3/1 indicates that the delay caused by the filter is 3 times the sample period (not frame period) of the signal before upsampling. Because the input signal is not upsampled and is a 2-sample frame at the model's predominant frame rate, the delay is equivalent to 3/2 frames at the predominant frame rate.
Rx Filter Block. The block labeled Rx Filter is another copy of the FIR Interpolation block, but it differs from the Tx Filter block in that its Interpolation factor parameter is 1
instead of 8
. The values of that parameter differ in the two filter blocks because the Tx Filter block needs to upsample the signal to prepare for transmission along the channel, while the Rx Filter processes a signal that is already upsampled and that needs no further upsampling. Thus the Rx Filter block merely applies a square-root raised cosine filter without upsampling its input data. As in the case of the Tx Filter block, the delay caused by the Rx Filter block is 3 times the sample period (not frame period) of the signal without upsampling. The frame rate without upsampling is just the model's predominant frame rate, so the delay of the Rx Filter block is the same as that of the Tx Filter block. That is, the delay is equivalent to 3/2 frames at the predominant frame rate.
Downsample Block. The Downsample block reduces the frame rate of the filtered received data. Its delay is one output frame, as stated on the reference page for the Downsample block. Because the frame rate at the outport equals the model's predominant frame rate, the delay of the Downsample block is one frame at the predominant frame rate.
Summing the Delays. No other blocks in the portion of the model between the Inner Error Rate block's two input signals cause any delays. Adding the two 3/2-frame delays from the two filter blocks with the one-frame delay from the Downsample block indicates that the total delay in this portion of the model is four frames.
Total Delay Relative to Inner Error Rate Block. The Inner Error Rate block requires a Receive delay parameter value that is equivalent to four frames. The Receive delay parameter is measured in samples and each input frame to the Inner Error Rate block contains four samples. Therefore, the correct value for the Receive delay parameter is 16
samples.
Outer Error Rate Block
The block labeled Outer Error Rate, located near the center of the model, is a copy of the Error Rate Calculation block from the Sinks library. It computes the bit error rate for the entire model, including the punctured convolutional code. Delays come from the Tx Filter, Rx Filter, Downsample, and Viterbi Decoder blocks, as summarized in the table below. This section explains why the Outer Error Rate block's Receive delay parameter is the total delay value of 108
.
Block |
Delay, in Samples at Individual Block |
Delay, in Frames at Predominant Frame Rate |
Delay, in Input Samples to Outer Error Rate Block |
Tx Filter |
3 |
3/2 |
9/2 |
Rx Filter |
3 (relative to input of Tx Filter block) |
3/2 |
9/2 |
Downsample |
2 |
1 |
3 |
Viterbi Decoder |
96 |
32 |
96 |
Total |
N/A |
36 |
108 |
Filter and Downsample Blocks. The Tx Filter, Rx Filter, and Downsample blocks have a combined delay of four frames at the model's predominant frame rate. For details, see Inner Error Rate Block.
Viterbi Decoder Block. The Viterbi Decoder block decodes the convolutional code, and the algorithm's use of traceback path causes a delay. The block processes a frame-based signal and has the Operation mode set to Continuous. Therefore, the delay, measured in output samples, is equal to the Traceback depth parameter value of 96
. (The delay amount is stated on the reference page for the Viterbi Decoder block.) Because the output of the Viterbi Decoder block is precisely one of the inputs to the Outer Error Rate block, it is easier to consider the delay to be 96 samples rather than to convert it to an equivalent number of frames.
Total Delay Relative to Outer Error Rate Block. The Outer Error Rate block requires a Receive delay parameter value that is equivalent to four frames plus 96 samples. The Receive delay parameter is measured in samples and each input frame to the Outer Error Rate block contains three samples. Therefore, the correct value for the Receive delay parameter is 4*3+96
= 108
samples.
![]() | ADSL Demo Model | Manipulating Delays | ![]() |