The DVB-S system is used for satellite television signal transmission, and the block diagram of the transmitter is shown below.
Scrambling#
In practical digital communication, the payload data may have long runs of 0s or long runs of 1s, which is not conducive to the receiver extracting the clock signal. At the same time, this results in a large number of low-frequency components in the data stream, causing the phase of the QPSK modulator to remain unchanged for a long time, making the signal susceptible to interference. Therefore, scrambling is performed on the payload data.
The DVB-S standard specifies the generating polynomial for scrambling as
The initial state of the shift register is "1001_0101_0000_000”.
Matlab Code Simulation#
n=500;
% origin_data=randi([0 1],n,1);
origin_cnt_1=nnz(origin_data==1)
scrambling = comm.Scrambler("CalculationBase",2,"InitialConditions",[1 0 0 1 0 1 0 1 0 0 0 0 0 0 0], ...
"Polynomial",[1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1]);
scrambling_data=step(scrambling,origin_data);
scrambling_data_cnt_1=nnz(scrambling_data==1)
The results are shown in the figure below.
It can be seen that in the initial data packet of length 500, there are 403 "1s", and after scrambling, the number of "1s" is close to half of the total data.
Outer Code Error Correction (RS Coding)#
RS Code Definition:
$GF(q)$ (where $q \neq 2$, usually $q=2^m$) is a primitive BCH code of length $n=q-1$.
The parameters of the RS code that can correct $t$ errors are:
- Block length $n=q-1$
- Number of check symbols $n-k=2t$
- Minimum distance of the code $d_{min}=2t+1$
The RS(188,204) used in the DVB-S system is truncated from RS(239,255) and can correct 8 bytes of errors.
Matlab Simulation#
m=8; %bit per symbol
n=204;
k=188;
data_test=randi([0,n],1,k);
data_gf=gf(data_test,m);
data_rs_enc=rsenc(data_gf,n,k);
data_enc=data_rs_enc.x;
data_rs_dec=rsdec(data_rs_enc,n,k);
data_dec=data_rs_dec.x;
subplot(3,1,1);
stem(data_test);
subplot(3,1,2);
stem(data_enc);
subplot(3,1,3);
stem(data_dec);
First, a sequence of length 188 is generated, converted to the Galois field, and then RS encoding is performed using the rsenc
function. After decoding, it can be seen that the decoded bits are exactly the same as the original bits.
Convolution Interleaving#
In actual transmission, factors such as pulse interference and multipath effects can cause sustained burst errors. Although RS codes have good error correction capabilities for burst errors, when the duration is too long, it exceeds the error correction capability of RS codes. Therefore, convolution interleaving is introduced in the encoding process, which disperses the transmission order of the data according to a certain pattern, allowing the erroneous code elements to also be dispersed.
In DVB-S, the interleaving depth is 12, with a total of 17 FIFOs. Data is written into the registers by row and read out by column.
The maximum correctable length after interleaving is $12*8=96$.
It can be seen that many 0s were read in the previous period, indicating that the data in the shift register below has not yet moved to the end.
Convolution Coding#
Convolutional codes are an effective forward error correction code denoted as $(n,k,m)$, encoding $k$ information bits into $n$ bits, where $m$ is the encoding memory length, and $N=m+1$ is the constraint length. This means that the current code element of the convolutional code is related not only to the current input of $k$ information bits but also to the $m$ previous time inputs of information bits.
clc;
close all;
n=500;
tre1=[1 1 1 1 0 0 1]; %oct 171
tre2=[1 0 1 1 0 1 1]; %oct 133
trellis = poly2trellis(7,[171 133]);
convData=convenc(scrambling_data,trellis);
decData=vitdec(convData,trellis,499,"trunc","hard");
subplot(3,1,1);
stem(scrambling_data);
subplot(3,1,2);
stem(convData);
subplot(3,1,3);
stem(decData);
biterr(scrambling_data,decData)
Using poly2trellis
, the convolution encoding polynomial is converted into a trellis representation.
After comparison, it can be seen that the decoded data is exactly the same as the original data.