Bit Error Rate of LDPC Coding and Decoding Based on 5G Communication System

Table of contents

1. Theoretical basis

2. Core program

3. Simulation conclusion


1. Theoretical basis

       The LDPC (Low-Density Parity-Check) coding error rate research based on 5G communication system involves the channel coding and decoding technology of the communication system, which is mainly used to improve the reliability and transmission efficiency of the system. 5G communication system is the fifth generation mobile communication system, which aims to provide higher data rate, lower latency and better user experience. It uses new wireless technology and coding schemes to meet the needs of large-scale data transmission and connection numbers. In 5G systems, LDPC coding is an important channel coding technique for achieving efficient error correction performance.
       LDPC coding is a linear block coding technology based on graph theory, which realizes efficient coding and decoding by constructing a sparse parity check matrix. The encoding process of the LDPC code is to perform a matrix multiplication operation on input data and a parity check matrix to obtain encoded output data. The decoding process of LDPC codes is to correct errors generated in transmission through iterative decoding algorithms.
        The encoding formula of LDPC code can be expressed as:

      The decoding process of LDPC codes can use iterative decoding algorithms, the most commonly used of which is the message passing algorithm (Sum-Product algorithm). Suppose $\mathbf{r}$ is the received signal vector, and $\mathbf{L}$ is the initial likelihood information vector. In each iteration, error bits are gradually corrected by updating LLR (Log-Likelihood Ratio) information. The formula for iterative calculation is: 

        Among them, $i$ and $j$ represent the index of the check node and variable node respectively, $N(i)$ represents the set of variable nodes connected to the check node $i$, and $\tanh^{-1}$ represents the inverse hyperbolic tangent function.
       In the 5G communication system, we can evaluate the bit error rate performance of channels using LDPC coding and decoding through simulation or theoretical analysis. Bit Error Rate (BER, Bit Error Rate) is an important indicator to measure the quality of signal transmission, and is usually used to evaluate the performance of encoders and decoders.
For LDPC encoding and decoding, the relationship between bit error rate performance and signal-to-noise ratio (SNR, Signal-to-Noise Ratio) can be represented by a BER curve. Through different SNR values, the bit error rate between the decoded output and the original data is calculated to obtain the BER curve.

       In addition, the bit error rate performance of LDPC codes can also be derived by analytical methods. A common method is to use the channel capacity approximation method to estimate the bit error rate performance by calculating the channel capacity. The research on bit error rate of LDPC coding based on 5G communication system is one of the key technical fields in 5G communication system. This paper introduces the application principle and mathematical formula of LDPC coding in 5G systems, as well as the analysis method of bit error rate performance. Through the research on LDPC coding, the signal transmission efficiency can be optimized, the reliability of the communication system can be improved, and the requirements of the 5G communication system for high speed, low delay and large number of connections can be met.

2. Core program

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

EbNodB = [0:1:5];


for ij = 1:length(EbNodB)
for k = 1:20
[ij,k]
MaxItrs = 8;
rate_matching = 0;

load base_matrices\NR_1_0_16.txt;
B = NR_1_0_16;
[mb, nb] = size(B);
z = 16;

Slen = sum(B(:)~=-1);   %number of non '-1' in B
treg = zeros(max(sum(B~=-1,2)),z); %register storage for minsum

k = (nb - mb)*z;
n = nb*z;
if rate_matching == 1
    n = n -2*z;
end
Rate = k/n;                     
EbNo = 10^(EbNodB(ij)/10);              
sigma = sqrt(1/(2*Rate*EbNo));


Nbiterrs = 0; Nblkerrs = 0; Nblocks = 100;

for i = 1 : Nblocks
   %msg = randi([0 1],1,k);           %generate random message
   msg = zeros(1,k); % all-zero msg 
   
   %Encoding here
   cword = zeros(1,n);
      
   s = 1 - (2 * cword);                 %BPSK symbols
   r = s + sigma * randn(1,n);          %AWGN Channel
 
   %puncturing
   if rate_matching == 1
   r(1:2*z) = 0;
   end
   
   %Soft-Decision, iterative message-passing layered decoding here
   L = r;   % Total Belief
   itr = 0; % iteration number
   R = zeros(Slen, z);     %storage for row processing
   while itr < MaxItrs
       Ri = 0;
        for lyr = 1:mb
            ti = 0; % number of non -1 in row = lyr
            for col = 1:nb
                if B(lyr,col) ~= -1
                    ti = ti + 1;
                    Ri = Ri + 1;
                    %Substraction
                    L((col-1)*z+1:col*z) = L((col-1)*z+1:col*z) - R(Ri,:);
                    %Row alignment and store in treg
                    treg(ti,:) = mul_sh(L((col-1)*z+1:col*z),B(lyr,col));
                end  
            end
            %minsum on treg: ti x z
            for i1 = 1:z %treg(1:ti,i1)
                [min1, pos] = min(abs(treg(:,i1))); %first min
                min2 = min(abs(treg([1:pos-1 pos+1:ti],i1))); %second min
                S = sign(treg(1:ti,i1));
                parity = prod(S);
                treg(1:ti,i1) = min1; %absolute value for all
                treg(pos,i1) = min2; %absolute value for min1 position
                treg(1:ti,i1) = parity * S.*treg(1:ti,i1); %assign signs
            end
            %column alignment, addition and store in R
            Ri = Ri - ti; %reset the storage counter
            ti = 0;
            for col = 1:nb
                if B(lyr,col) ~= -1
                    Ri= Ri + 1;
                    ti = ti + 1;
                    %Column alignment
                    R(Ri,:) = mul_sh(treg(ti,:), z-B(lyr,col));
                    %Addition
                    L((col-1)*z+1:col*z) = L((col-1)*z+1:col*z) + R(Ri,:);
                end
            end
        end
        msg_cap = L(1:k) < 0; %decision
        itr = itr + 1;
   end

   Nerrs = sum(msg ~= msg_cap);
   
   if(Nerrs > 0)
      Nbiterrs = Nbiterrs + Nerrs;
      Nblkerrs = Nblkerrs + 1;
   end
end

BER_sim(ij,k) = Nbiterrs/(k*Nblocks);
FER_sim(ij,k) = Nblkerrs/Nblocks;

end
end


figure;
semilogy(EbNodB,mean(BER_sim,2),'b-o');
grid on
xlabel('EbNo');
ylabel('error');
up2175

3. Simulation conclusion

 

Guess you like

Origin blog.csdn.net/ccsss22/article/details/131901271