m Based on OFDM+QPSK and LDPC coding and decoding communication link matlab performance simulation, including Costas carrier synchronization and gardner timing synchronization

Table of contents

1. Algorithm simulation effect

2. Algorithms involve an overview of theoretical knowledge

3. MATLAB core program

4. Complete algorithm code file


1. Algorithm simulation effect

The matlab2013b simulation results are as follows:

 

2. Algorithms involve an overview of theoretical knowledge

        A communication link based on OFDM+QPSK and LDPC coding is a commonly used digital communication system for high-speed and reliable data transmission. The system combines Orthogonal Frequency Division Multiplexing (OFDM), Quadrature Phase Shift Keying (QPSK) modulation and Low Density Parity Check (LDPC) encoding and decoding techniques. In addition, the system also includes a Costas ring carrier synchronization module and a Gardner ring timing synchronization module, which are used to realize the synchronization of the carrier frequency and timing offset of the signal.

       The communication link based on OFDM+QPSK and LDPC coding improves the system's ability to resist multipath fading and frequency deviation by dividing the data into multiple subcarriers and transmitting them in parallel in the frequency domain. QPSK modulation maps every two bits to a complex point, realizing four phase modulations. LDPC coding is an efficient error correction coding technique that can improve the reliability of the system.

       A communication link based on OFDM+QPSK and LDPC coding is a commonly used digital communication system for high-speed and reliable data transmission. The system combines Orthogonal Frequency Division Multiplexing (OFDM), Quadrature Phase Shift Keying (QPSK) modulation and Low Density Parity Check (LDPC) encoding and decoding techniques. In addition, the system also includes a Costas ring carrier synchronization module and a Gardner ring timing synchronization module, which are used to realize the synchronization of the carrier frequency and timing offset of the signal.

System principle
         The communication link based on OFDM+QPSK and LDPC code divides the data into multiple subcarriers and transmits them in parallel in the frequency domain, which improves the system's ability to resist multipath fading and frequency deviation. QPSK modulation maps every two bits to a complex point, realizing four phase modulations. LDPC coding is an efficient error correction coding technique that can improve the reliability of the system.

OFDM+QPSK modulation
        OFDM technology divides the entire frequency spectrum into multiple subcarriers, and each subcarrier is transmitted orthogonally. OFDM modulation can convert time-domain signals into frequency-domain signals through Fast Fourier Transform (FFT). QPSK modulation maps every two bits to a complex point, realizing four phase modulations. OFDM+QPSK modulation applies QPSK modulation to the signal on each subcarrier, realizing efficient spectrum utilization and anti-interference capability.

 

 LDPC encoding and decoding
        LDPC encoding is an error control coding technique, and the encoder and decoder are constructed by sparse parity check matrix. The encoder performs matrix operation on the input data and check matrix to generate encoded data. The decoder uses an iterative decoding algorithm to decode the received encoded data through message passing. LDPC coding can provide higher error correction capability and coding efficiency.

Operation of input data and check matrix:

 Costas Loop Carrier Synchronization
        The Costas Loop Carrier Synchronization module is used to estimate and compensate the carrier frequency offset of the received signal. The carrier frequency offset will cause the phase of the received signal to change, so synchronization is required to ensure correct signal reception and demodulation. Costas loop carrier synchronization calculates the carrier frequency offset by estimating the phase difference of the received signal, and then adjusts the frequency of the local oscillator through feedback control to keep it synchronized with the carrier frequency of the received signal.

       Carrier Frequency Estimation Error:

 Gardner loop timing synchronization
        The Gardner loop timing synchronization module is used to estimate the timing offset of the received signal and compensate for it. Timing offset will lead to inaccurate sampling moment of the received signal, so synchronization is required to restore the correct sampling moment. Gardner loop timing synchronization estimates the timing offset by calculating the square error of the clock edge interval of the received signal, and then adjusts the phase of the sampling clock through feedback control to achieve timing synchronization of the received signal. Timing Offset Estimation Error:

       The difficulty in realizing this communication link lies in the design and optimization of each link of the system. It is necessary to design the appropriate number of OFDM subcarriers, guard interval and LDPC coding parameters, as well as appropriate parameters of Costas ring and Gardner ring. At the same time, it is necessary to solve the feedback control problem of carrier synchronization and timing synchronization to ensure accurate demodulation of received signals. In addition, the iterative decoding algorithm and debugging of LDPC encoding are also challenges in the implementation process. The communication link based on OFDM+QPSK and LDPC encoding involves OFDM modulation, QPSK modulation, LDPC encoding and decoding, and carrier synchronization and timing synchronization. Through proper parameter selection and optimization, high-speed and reliable data transmission can be realized and applied in various communication systems.

3. MATLAB core program

............................................................................
%%
rece        = fft(rece);
%载波同步环
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%锁相环处理过程如下
Discriminator_Out = zeros(carlen * nsamp,1);
Freq_Control      = zeros(carlen * nsamp,1);
PLL_Phase_Part    = zeros(carlen * nsamp,1);   %锁相环频率
PLL_Freq_Part     = zeros(carlen * nsamp,1);   %锁相环相位
WC_frame          = zeros(1,carlen * nsamp);
NCO_Phase         = 0;
mul               = 2;

for i = 1 + mul:carlen - mul
.................................................................................
     end
end

figure(1);
subplot(211)
plot(WC_frame((1+mul)*nsamp:end-mul*nsamp));
grid on;
title('锁相环频率响应曲线');
subplot(212)
plot(PLL_Phase_Part((1+mul)*nsamp:end-mul*nsamp)*180/pi);
title('锁相环相位响应曲线');
grid on;
    
num1 = symerr(sign(I_D(comps1:compf1)) , sign(dataoutI(comps1:compf1)));
num2 = symerr(sign(I_D(comps1:compf1)) , -sign(dataoutI(comps1:compf1)));
num3 = symerr(sign(I_D(comps1:compf1)) , sign(dataoutQ(comps1:compf1)));
num4 = symerr(sign(I_D(comps1:compf1)) , -sign(dataoutQ(comps1:compf1)));
numI = [num1,num2,num3,num4];
num = min(numI);

if num1 == num
    dataout_I = dataoutI;
elseif num2 == num
    dataout_I = -dataoutI;
elseif  num3 == num
    dataout_I = dataoutQ;
else
    dataout_I = -dataoutQ;
end
num1 = symerr(sign(Q_D(comps2:compf2)) , sign(dataoutQ(comps2:compf2)));
num2 = symerr(sign(Q_D(comps2:compf2)) , -sign(dataoutQ(comps2:compf2)));
num3 = symerr(sign(Q_D(comps2:compf2)) , sign(dataoutI(comps2:compf2)));
num4 = symerr(sign(Q_D(comps2:compf2)) , -sign(dataoutI(comps2:compf2)));
numQ = [num1,num2,num3,num4];
num = min(numQ);

if num1 == num
    dataout_Q = dataoutQ;
elseif num2 == num
    dataout_Q = -dataoutQ;
elseif  num3 == num
    dataout_Q = dataoutI;
else
    dataout_Q = -dataoutI;
end   

figure(2);
x= 5:len-5;
stem(x*4 - 18,I_Data(5:len-5),'g');hold on;
stem(I_D(9:end-8));hold on;
stem(dataout_I(9:end),'r');
 
    

%%
%位同步环
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
datarcosI = dataout_I(9:end) ;
datarcosQ = dataout_Q(9:end) ;
interplen = length(datarcosI)/nsamp;
C1        = 0.001;
C2        = C1 * 0.001;
q         = zeros(1,interplen);
m         = 5;
j         = 3;
q0        = 0.9;
%lf输出
w         = 0.5;
%插值乘法器值
s0        = 2;
%误差检测输出
Detector_out   = zeros(1,interplen);
%插值filter输出;
interp_outI    = zeros(1,interplen * 2);
interp_outQ    = zeros(1,interplen * 2);
interp_outI(1) = datarcosI(2);
interp_outI(2) = datarcosI(4);
interp_outQ(1) = datarcosQ(2);
interp_outQ(2) = datarcosQ(4);

for i = 2 : interplen - 1
     for k = 1 : nsamp
........................................................................
end

[RData] = [QPSK_demod(sign(qoutI),sign(qoutQ))]';

RData   = [0;0;0;0;0;0;0;0;RData;0;0;0;0;0;0;0;0;0;0;0;0];
RData= 2*RData-1;
msg_dec   = [];
for i = 1:47
    i
    [vhatsd,nb_itersd,successsd] = func_Dec(RData(Ns*(i-1)+1:Ns*i),newH,N0,Max_iter);
    tmps                         = vhatsd(Ms+1:Ns)';
    msg_dec                      = [msg_dec;tmps];
end
[nCodErrs BERCoded] = biterr(msg_orig(sl:sp-100), msg_dec(sl:sp-100));
BERCoded
 

figure(3);
plot(uu,'*-');

figure(4);
subplot(211)
stem(I_Data(6:end-6));hold on;
stem(qoutI(2:end),'r');
grid on;
subplot(212)
stem(Q_Data(6:end-6));hold on;
stem(qoutQ(2:end),'r');
grid on;
0X_011m

4. Complete algorithm code file

V

Guess you like

Origin blog.csdn.net/hlayumi1234567/article/details/131794392