# Adaptive Rate-Compatible Non-Binary LDPC Coding Scheme for the B5G Mobile System
## 2 The Construction of RC-NB-LDPC Codes
### Complexity Analysis  
The coding complexity is shown in Table 1. Since the check matrix construction algorithm for constructing the QC-LDPC code based on the masking and puncturing technique has a quasi-cyclic structure, an encoding method of a quasi-cyclic code with low coding complexity can be employed. From the perspective of coding complexity, adopting the QC-encoding algorithm, only needs to multiply \(O\Big{(}(L-J)^{2}p\Big{)}\) times in \(GF(q)\), and there is no need to add operations throughout the coding process--\(J\) and \(L\) are the number of rows and columns of the mask matrix \(H_{m}\), respectively, and \(p\) is the dimension of the sub matrix. Linear complexity coding is achieved when high-speed coding is employed. The coding complexity calculation of the random construction algorithm of the NB-LDPC code check matrix consists of two parts: one is to Gaussian eliminate the check matrix into the structure of the lower triangular matrix, that is, pre-process the check matrix; the operation complexity is \(O(n^{3})\), where \(n\) is the code length. The other part is that the coding complexity is \(O(n^{2})\). This is because the coding complexity of the coding algorithm depends on the sparsity of the generator matrix. Let the average column weight of the generator matrix be \(w\); approximately, \(wn\) multiplication operations and \((w-1)n\) sub-operations in \(GF(q)\) are required throughout the encoding process. Although the check matrix of a NB-LDPC code is very sparse, its generator matrix is not sparse. Usually, the ratio of \(w\) and \(n\) is a non-negligible constant, which often makes the coding complexity proportional to the square of its code length. From the hardware storage capacity of the check matrix, when storing the matrix with this construction algorithm, only one \(p\times p\) unit array \(\mathbf{I}\), one \(J\times L\) non-binary coefficient matrix \(\mathbf{G}c_{J\times L}\), and one \(J\times L\) circulation coefficient matrix \(\mathbf{S}_{J\times L}\) are stored. However, to construct a parity check matrix of the same size using a random construction method, it is necessary to store a \(p\times J\times p\times L\) check matrix. The hardware storage resource is largely saved compared with the storage of the complete NB-LDPC code check matrix. Figure 10: 8-ary LDPC code coding unit. Figure 9: Serial shift register accumulator unit. In addition, the masking and puncturing techniques are used to overcome the shortcomings of the search time when the NB-LDPC code of the long code length is randomly constructed. This is because the dimension of the masking matrix \(H_{m}\) is a small constant compared to a randomly constructed matrix. It is easy to construct a check matrix of the NB-LDPC code of the given degree distribution, \(\lambda(x)\) and \(\rho(x)\), with the row weight and the column weight. In the rate-adaptive communication system, the NB-LDPC code of the appropriate code rate is selected according to the channel environment for encoding. Most of the actual communication systems require real-time performance. Improving the effectiveness of the communication system and the speed of hardware processing are two effective ways. With adaptive-rate technology, the average effectiveness of the communication system can be improved. The puncturing of the masking matrix can greatly improve the speed of the hardware processing. Let the masking matrix \(H_{m}\) be a binary matrix of \(J\times L\) and the matrix \(H\) be a non-binary matrix of \(m\times n\), where \(m=p\times J,n=p\times L\). For example, if \(J=8,L=16\), the mother code rate is \(r=1/2\), and the puncturing code rate is \(r_{m}=3/4\). To delete the check bits in \(H\), \(4\times p\) check bits need to be deleted. However, for the check matrix constructed by the algorithm based on masking and puncturing techniques, only 4 check bits of the masking matrix \(H_{m}\) need to be deleted. The processing speed of the hardware is increased by \(p\) times.