m Communication link bit error rate simulation based on 16QAM soft demodulation and LDPC channel coding

Table of contents

1. Algorithm simulation effect

2. Algorithms involve an overview of theoretical knowledge

2.1 Data source encoding

2.2 Modulation

2.3 Channel transmission

2.4 Demodulation

2.5 decoding

2.6 Implementation steps

3. MATLAB core program

4. Complete algorithm code file


1. Algorithm simulation effect

The matlab2022a simulation results are as follows:

2. Algorithms involve an overview of theoretical knowledge

The communication link based on 16QAM soft demodulation and LDPC channel coding includes the following main steps:

2.1 Data source encoding

       In the data source encoding stage, the input binary data is encoded into an error correction code to improve the reliability of data transmission. Commonly used error correction codes include convolutional codes, LDPC codes, and the like. In this paper, LDPC codes will be used as error correction codes.

2.2 Modulation

      In the modulation stage, the encoded data will be modulated into an analog signal for transmission in the transmission medium. Commonly used modulation methods include PSK, QAM, FSK and so on. This article will use 16QAM modulation.

2.3 Channel transmission

       In the channel transmission stage, the modulated signal will be transmitted to the receiver. During the transmission process, the signal will be affected by noise, multipath fading, etc., resulting in signal distortion. Therefore, signal processing is required at the receiving end to restore the original signal. This article will use the soft demodulation method.

2.4 Demodulation

      In the demodulation stage, the receiver will demodulate the received signal to restore the original signal. Commonly used demodulation methods include hard demodulation and soft demodulation. This article will use the soft demodulation method.

2.5 decoding

      In the decoding stage, the receiver will decode the demodulated signal to recover the original data. In the decoding process, the same error correction code as that used in the encoding stage needs to be used. In this paper, LDPC codes will be used as error correction codes.

2.6 Implementation steps

       In the data source encoding stage, the input binary data will be encoded as LDPC code. LDPC code is a low-density parity-check code, which has near-Shannon limit error correction performance and low complexity. Its encoding process can be expressed as:

$$\boldsymbol{x}=\boldsymbol{u}\boldsymbol{G}$$

        Among them, $\boldsymbol{u}$ is the input data, $\boldsymbol{G}$ is the sparse matrix, and $\boldsymbol{x}$ is the encoded data. The encoded data $\boldsymbol{x}$ will be transmitted to the receiver for decoding.

        In the modulation stage, the encoded data will be modulated into a 16QAM signal. 16QAM modulation maps every four binary bits to a complex number, namely:

$$s_k=\sqrt{\frac{2E_s}{T_s}}(2b_{4k-3}-1+2b_{4k-2}-1j)$$

Among them, $E_s$ is the energy of each symbol, $T_s$ is the symbol interval, $b_{4k-3}$, $b_{4k-2}$, $b_{4k-1}$ and $b_{4k }$ is the binary bit of the input data.

       In the channel transmission stage, the modulated signal will be transmitted to the receiver. During the transmission process, the signal will be affected by noise, multipath fading, etc., resulting in signal distortion. Therefore, signal processing is required at the receiving end to restore the original signal.

       In the demodulation stage, the receiving end will perform soft demodulation on the received signal to restore the original signal. Soft demodulation is a probability-based demodulation method that can better handle signals affected by noise. The soft demodulation process can be expressed as:

$$\hat{s}k=\arg\max{s\in S} P(s|r_k)$$

Among them, $S$ is the 16QAM modulation symbol set, $r_k$ is the received signal, and $\hat{s}_k$ is the demodulated signal.

      In the decoding stage, the receiver will decode the demodulated signal to recover the original data. In the decoding process, the same LDPC code as that used in the encoding stage needs to be used. The decoding process of LDPC code can be expressed as:

$$\boldsymbol{\hat{u}}=\arg\min_{\boldsymbol{u}\in{0,1}^n} \boldsymbol{r}^T\boldsymbol{H}\boldsymbol{u}$$

Among them, $\boldsymbol{\hat{u}}$ is the decoded data, $\boldsymbol{r}$ is the received signal, $\boldsymbol{H}$ is the LDPC check matrix, and $n$ is the input The length of the data.

3. MATLAB core program

.............................................................

rng('shuffle')
for ij = 1:length(SNRs)  
    
    errs = 0;             
    sigma      = sqrt(1./(2*10^(SNRs(ij)/10)*R));  
    for frame = 1:N_Frame
        if mod(frame,1000)==1
           [ij,frame]
        end
        %产生信号
        Tdats0              = randi([0,1],1,N_bits);
        Tdats               = mod(Tdats0*G,2);  

        %调制
        Tmods               = modulates(Tdats,K);           
        %经过信道
        Rmods               = awgn(Tmods,SNRs(ij),'measured'); 
        %解调
        Rdats               = soft_demodulates(Rmods,K);
        Rbits               = zeros(size(Rdats));
        idx                 = find(Rdats>=0);
        Rbits(idx)          = 1;
        z_hat               = func_Dec(2*Rbits-1,sigma,H,max_iter);
        x_hat               = round(z_hat(size(G,2)+1-size(G,1):size(G,2)));
        Err1                = sum(Tdats0~=x_hat');
        errs                = errs + Err1;
    end
    ber(ij) = errs/(N_bits*N_Frame);
end 
 
figure;
semilogy(SNRs, ber ,'b-o')
grid on; 
xlabel('SNR(dB)');
ylabel('BER');


if max_iter==15
   save R21.mat SNRs ber
end
if max_iter==30
   save R22.mat SNRs ber
end
0X_007m

4. Complete algorithm code file

V

Guess you like

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