# Adaptive Rate-Compatible Non-Binary LDPC Coding Scheme for the B5G Mobile System
## 2 The Construction of RC-NB-LDPC Codes
### The Construction of RC-NB-LDPC Codes  
Most methods for constructing LDPC codes can be classified into two general categories: the algebraic-based and the graph-theoretic-based constructions [36]. This paper combines these two methods to construct the RC-LDPC codes, as shown in Figure 1.  
The best-known graph-theoretic-based construction method is the progressive edge-growth (PEG) algorithm [37; 38]. The goal of this algorithm is to construct a graph that adds one edge each time and maximizes the local girth. Therefore, the PEG algorithm is a greedy algorithm for constructing a Tanner graph with a large girth. In this paper, we use the PEG algorithm to construct a small base matrix for future research. The algebraic-based methods for constructing LDPC codes have been developed using mathematical tools such as finite geometries [39], finite fields [40], and combinatorial designs [41; 42]. In general, Algebraic LDPC codes have much lower error-floors than randomly constructed LDPC codes. Most of the algebraic constructions involve several key ingredients including the circulant permutation matrix, masking matrix, and superposition operation [43]. In this paper, the key operations for constructing RC-NB-LDPC codes are described as follows. * Mask operation  
The masking technique can selectively mask some sub-circulant matrixes in order to reduce the density of non-zero elements in the check matrix \(H\), so that fewer small cycles or longer girth could  
Figure 1: RC-NB-LDPC codes construction process. be obtained. Moreover, the performance of the LDPC code is improved. Through selecting a suitable masking matrix, we can obtain any rate code according to the same base matrix. The masking technique can be described as special matrix product operations [44]. We assume a masking matrix \(H_{m}=\left[{{{{{{{{{{{{{{{m{m_{ij}}}}}}}}}}}}}}}\right]\) as a binary matrix with size of \(m\times n\), then the definition of the product of \(H_{m}\) and \(H\) is shown as (4). \[H=H_{m}\otimes H_{b}\equiv\left[{ \begin{array}{*{20}{c}}{{{{m_{1,1}}}}{I({{{ {P_{11}}}}})}}&{{{{m_{1,2}}}}{I({{{P_{12}}}})}}&.&.&.&{{{m_{1,n}}}}{I({{{P_{1n}} }})}\\ {{{m_{2,1}}}{I({{{P_{21}}}})}}&{{{m_{2,2}}}{I({{{P_{22}}}})}}&.&.&.&{{{m_{2,n}} }}{I({{{P_{2n}}}})}\\.&.&&&.\\.&.&.&.&.\\.&.&&&.\\ {{{m_{m,1}}}{I({{{P_{m1}}}})}}&{{{m_{1,2}}}{I({{{P_{m2}}}})}}&.&.&.&{{{m_{mn}} }}{I({{{P_{mn}}}})}\\ \end{array} }\right] \tag{4}\]  
In Equation (4), when \(m_{i,j}=1\), \(m_{i,j}A_{{{{{{{{m_{ij}}}}}}}}}=A_{{{{{{{{{{{{{{{{j}}}}}}}}}}}}}}}}\) and when \(m_{i,j}=0\), \(m_{i,j}A_{{{{{{{{{{{{{{{{{{{j}}}}}}}}}}}}}}}}}}=0\). We define \(H_{b}\) as the base matrix and \(H\) as the masked matrix. If \(H_{m}\) and \(H_{b}\) are sparse matrices, then \(H\) is also a sparse matrix. In addition, sub-matrices in \(H\) can be replaced with zero arrays of the same size by using the masking technique, which can reduce the density of non-zero elements in \(GF(q)\). Thus, a sparser matrix \(H\) degrades the probability of small cycles. When constructing LDPC codes, if we obtain the degree distributions \(\lambda(x)\) and \(\rho(x)\) of the variable node and the check node, then we can obtain the check matrix \(H\). We assume that the corresponding degree distribution of code words with code rate \(r\) and code length \(n\) are \(\lambda(x)\) and \(\rho(x)\); if the masking matrix \(H_{m}\) obeys the same degree distribution, the masked check matrix \(H\) will also obey the same distribution. * Puncture operation  
The puncturing technique is the most common rate adaptive technique [24; 45; 46], the implementation process of which first selects a high rate mother code with excellent performance, then punctures the check bit in the code word, thus deleting a number of columns in the check matrix, resulting in a low rate code word. The high rate QC-LDPC code may be used at higher SNR. On the contrary, when the channel environment is poor, a low rate QC-LDPC code may be used, thereby improving the average effectiveness of the communication system.