A variable code length and code rate coding method based on 5G LDPC codes

CN116388771BActive Publication Date: 2026-08-11SOUTHEAST UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-11
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0011]5G协议中的编码方法,对于给定的不同码率码长的矩阵,需要针对每个矩阵计算合适的扩展因子Z和基矩阵列数,存在复杂度高的缺点

Benefits of technology

[0025]本发明的一种基于5G LDPC码的可变码长码率的编码方法具有以下优点:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116388771B_ABST
    Figure CN116388771B_ABST
Patent Text Reader

Abstract

This invention proposes a variable code length and code rate encoding method based on 5GLDPC codes, and provides seven matrix encoding methods with different code rate ranges for the 5GLDPC code BG1 matrix, covering almost all code rates supported by BG1. This method achieves a bit error rate (BER) of 1×10⁻⁶. ‑5 The method proposed in this invention achieves better performance than 5G protocol LDPC code encoding; it also reduces the computational burden of recalculating offset values ​​and matrix sizes due to changes in code rate and code length, thus achieving lower complexity and better performance in multi-code-rate, multi-code-length 5G LDPC code encoding. Furthermore, the punch-down shortening mode specified in this invention supports a maximum coded information length of 7680.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a base matrix construction method for LDPC codes in 5G systems, specifically to a variable code length and code rate encoding method for LDPC codes in 5G systems, belonging to the field of encoding construction technology. Background Technology

[0002] LDPC (Low-Density Parity-Check) codes are a type of forward error correction code. The transmitter adds check symbols to the transmitted symbol sequence for error control, allowing the receiver to identify erroneous symbols and correct them. LDPC codes were first proposed by Gallager in his doctoral dissertation in the 1960s, but due to the limited computing power of the hardware at the time, efficient decoding of the relatively complex LDPC codes was impossible, resulting in limited research. They were rediscovered by MacKay et al. in the 1990s. In recent years, LDPC codes have gained attention due to their low decoding algorithm complexity and have been widely used in various communication fields. In 2016, LDPC codes were adopted as the coding scheme for data services in 5G eMBB scenarios, supporting high throughput, a wide range of code lengths and rate lengths, and incrementally redundant hybrid automatic repeat request (IR-HARQ).

[0003] LDPC code is a linear block code. Linear means that the parity bits and information bits of the LDPC code form a linear constraint relationship. Blocking means that the received information sequence is divided into groups of K information bits, and N codeword bits are obtained through encoding. The linear block code is also represented by (N,K).

[0004] The LDPC codes in 5G systems belong to QC-LDPC codes, and their basis matrix is ​​represented in the form of dimension M. b ×N b The matrix H is a parity check matrix where each element is an arbitrary integer between -1 and Z, called the expansion factor. By replacing -1 with a Z×Z all-zero matrix and replacing Z with an identity matrix cyclically shifted right by Z bits, a parity check matrix consisting of 0s and 1s is obtained. After Gaussian elimination encoding, the transmitted codeword is obtained. Any codeword of the LDPC code and its corresponding parity check matrix H are in a nullification space.

[0005] In practical applications, LDPC codes must consider rate compatibility. Common implementation methods include puncturing and shortening. Punching, besides the c1 and c2 columns of information bits specified in the 5G protocol, typically occurs in the parity bits. The punctured bits are not transmitted. Punching is performed on a low-rate LDPC code to obtain a series of high-rate codes with identical parity-check matrices, thus not increasing the complexity of the encoding and decoding process. Punching is performed after encoding. During decoding, the punctured bits are assigned lower reliability information, typically by setting the input likelihood ratio to 0. Shortening reduces the rate by deleting information bits from the LDPC codeword. The shortened information bits do not need to be transmitted through the channel. At the transmitting end, the shortened bits are set to 0 and participate in encoding; during decoding, the all-zero shortened bits are assigned high reliability information, typically by setting the initial likelihood ratio to infinity. At the receiving end, the shortened bits are used as known data in decoding.

[0006] The coding steps proposed in the 5G protocol are as follows:

[0007] Given the transmission rate R, the bit length of the transmitted information K′, and the transmission code length N′ = K′ / R,

[0008] 1) First, select an appropriate number of columns N in the basis matrix based on the given code rate R. b The protocol specifies that the c1 and c2 columns of the base matrix are punched, by 22 / (N′) b -2)=R to get N b ′, then for N b Rounding up gives N b ;

[0009] 2) Given the length of the transmitted information bits K′, the number of information columns in the basis matrix BG1 is 22. From K′ / 22=Z′, we obtain the smallest expansion factor Z′. Then, we query the set of all values ​​of the expansion factor Z supported in the 5G protocol {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 22, 24, 26, 28, 30, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, 88, 96, 104, 112, 120, 128, 144, 160, 176, 192, 208, 224, 240, 256, 288, 320, 352, 384} to obtain the expansion factor Z that is greater than Z′ and closest to Z′.

[0010] 3) At this point, puncture the c1 and c2 columns of the LDPC code's base matrix BG1, with the number of punctured bits being P. i =2Z. The information bits are shortened from back to front, with a shortening length of S = K. b ZK′, punches holes in the parity bits from back to front, with a hole length of P.c =N b ZN′-SP i This yields the basis matrix. The structure of the constructed basis matrix is ​​as follows: Figure 2 In the diagram, A and B form a high-rate matrix with low dimension. B has a double-diagonal structure, and its first column has a weight of 3. C is an all-zero matrix. D and E form an extended structure, where D is a sparse matrix and E is an identity matrix, with a size ranging from N. b The decision has been made. The maximum coded information bit length supported by BG1 is 8448, covering a code rate range of 1 / 3 to 11 / 12.

[0011] The coding method in the 5G protocol requires calculating the appropriate expansion factor Z and the number of columns of the base matrix for each matrix given different code rates and code lengths, which has the disadvantage of high complexity. Summary of the Invention

[0012] The purpose of this invention is to provide an encoding method for LDPC codes in 5G systems. Under the same code rate, code length, and decoding algorithm conditions, the encoding performance of this invention is superior to the encoding method given in the 5G protocol. Furthermore, it reduces the computational workload of recalculating offset values ​​and matrix size due to changes in code rate and code length, thereby achieving lower complexity and better performance in multi-code rate and multi-code length 5G LDPC code encoding.

[0013] To solve the above-mentioned technical problems, the specific technical solution of the present invention is as follows:

[0014] A variable code length and code rate encoding method based on 5G LDPC codes is proposed, providing seven sets of matrix puncturing and shortening modes for 5G LDPC code encoding; the parity-check matrix of the 5G LDPC code has a quasi-cyclic structure, using a base matrix H. b The expression, where the number of lines is M b The number of columns is N b The number of information columns is K. b Satisfying K b =N b -M b The basis matrix supports multiple sets of different offset values, thus ensuring compatibility with codes of different lengths. The 5G protocol specifies a basis matrix format where the positions of non-zero elements are fixed, called BG1. The basis matrix is ​​expanded by an expansion factor Z to obtain a parity-check matrix H of dimension M×N, where M = M b ×Z, N=N b ×Z; In the 5G protocol, for encoding long block data and high code rates, a base matrix BG1 is used, supporting 8 different offset value matrices. The encoded bit sequence C of length N is divided into N columns according to the number of columns in the base matrix. b A small block, The bit length of each sub-block is consistent with the expansion factor;

[0015] The encoding method specifically includes the following steps:

[0016] S101, firstly, according to the 5G protocol, the information bits in columns c1 and c2 of the LDPC code's base matrix BG1 are punctured, and the number of punctured bits is denoted as P. i There is P i =2Z. Then, the present invention shortens the matrix information bits from back to front, that is, sets this part of the information bits to 0 before encoding, and the shortened bit length is denoted as S, where 2Z≤S≤5Z; then, the parity bits are punched from back to front, and the punched bit length is denoted as Pc, and the number of information columns of the base matrix BG1 is K. b =22. If the actual transmitted information bit length is K′ and the transmission code rate is R, then the actual transmitted code length N′ = K′ / R.

[0017] S102, calculate the value of the spreading factor Z, and implement variable code length and code rate coding through the puncturing shortening mode. The maximum supported codeable information bit length is 7680. The set of spreading factors supported by 5G LDPC is Z = a × 2. j Where a = (2, 3, 5, 7, 9, 11, 13, 15)}, j = 0, 1, 2, 3, 4, 5, and Z ≤ 384; therefore, the complete set of values ​​for the expansion factor Z is {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 22, 24, 26, 28, 30, 32, 36, 40, 44, 4}. 8, 52, 56, 60, 64, 72, 80, 88, 96, 104, 112, 120, 128, 144, 160, 176, 192, 208, 224, 240, 256, 288, 320, 352, 384}; The expansion factor Z is divided into 8 groups, each corresponding to a value of a, and the group number starts from 0; According to the information bit shortening length range 2Z≤K b ZK′≤5Z, we get K′ / 20≤Z≤K′ / 17, and find the expansion factor Z whose value satisfies the inequality; if multiple expansion factors satisfy the inequality are found, select the expansion factor Z with the largest value.

[0018] S103, Calculate the shortened information bit length S, S = K b ZK′;

[0019] S104 specifies the encoding methods for the base matrices corresponding to 7 different code rates, and specifies the number of columns N of the base matrix within each code rate group. b When the code rate R∈[1 / 3, 17 / 47], N b Take 58; R∈(17 / 47, 11 / 26], N bTake 54; R∈(11 / 26, 1 / 2], N b Take 46; R∈(1 / 2, 11 / 49], N b Take 40; R∈(11 / 19, 11 / 17], N b Take 36; R∈(11 / 17, 11 / 15], N b Take 32; R∈(11 / 15, 11 / 12], N b Choose 30; select the number of columns N of the basis matrix according to the transmission code rate R. b Then the number of rows M of the basis matrix is ​​obtained. b =N b -twenty two;

[0020] S105, Calculate the puncture length Pc of the parity bit, Pc = N b ZSP i -N′; If Pc < 0, then recalculate the number of columns N of the basis matrix. b The value, Where |·| represents taking the absolute value, This indicates rounding up and recalculating the puncture length P of the parity bit. c =N b ZSP i -N′;

[0021] S106, based on the index value group of Z and N b According to the 5G standard protocol, the corresponding BG1 basis matrix is ​​obtained, and then the formula Z is used. i,j =mod(V i,j The offset factor Z at each position of the matrix is ​​obtained. i,j i and j represent the row number and column number respectively, mod represents the modulo algorithm, where V i,j Search within the offset value matrix specified in the 5G standard protocol;

[0022] S107, the obtained base matrix is ​​encoded to obtain the final encoded sequence to be sent.

[0023] Furthermore, the encoding of the obtained base matrix in S107 includes the following steps: shortening the S information bits, that is, zeroing out the information bits from the end to the beginning by S bits, then performing LDPC encoding, and then encoding the first 2Z lengths of information bits and the last P bits. c Punch the parity bits of the length to obtain the final encoded sequence to be sent.

[0024] Beneficial effects:

[0025] The variable code length and code rate encoding method based on 5G LDPC codes of the present invention has the following advantages:

[0026] 1) The encoding method of the seven matrices with different code rates provided by this invention has a significant performance gain compared with the encoding method of the BG1 matrix in the original 5G protocol under the same decoding conditions.

[0027] In the coding method of the 5G protocol, for a given matrix with different code rates and code lengths, it is necessary to calculate the appropriate expansion factor Z and the number of columns N of the base matrix for each matrix. b The encoding method proposed in this invention provides the basis matrix N corresponding to 7 sets of code rate ranges. b The number of columns N in the basis matrix corresponding to each group of different code rates b Similarly, N can be found directly based on the bitrate R. b No computation is required. The encoding method of this invention reduces the computational load caused by changing the base matrix, while achieving better matrix decoding performance than the 5G protocol at the same code rate and code length.

[0028] 2) The encoding method provided by this invention satisfies the given code length and code rate requirements by reducing the number of information bits, without replacing the base matrix. Therefore, it reduces the computational burden of recalculating offset values ​​and matrix size due to changes in code rate and code length, thereby achieving lower-complexity multi-code-rate, multi-code-length 5G LDPC code encoding. Attached Figure Description

[0029] Figure 1 This is a flowchart of the encoding method of the present invention.

[0030] Figure 2 This is a structural diagram of BG1 in a 5G system.

[0031] Figure 3 The simulation verification diagram for this invention is based on BG1-32-10-384 code (N). b =32, Z=384), a performance comparison curve of the encoding method of the present invention and the encoding method specified in the 5G protocol.

[0032] Figure 4 The simulation verification diagram for this invention is based on the BG1-54-32-384 code (N). b =54, Z=384), a performance comparison curve of the encoding method of the present invention and the encoding method specified in the 5G protocol.

[0033] Figure 5 The simulation verification diagram for this invention is based on the BG1-58-36-384 code (N). b =58, Z=384), performance comparison curve of the encoding method of the present invention and the encoding method specified in the 5G protocol. Detailed Implementation

[0034] To make the technical solution, objectives and advantages of the present invention clearer, the present invention will be further explained below with reference to the accompanying drawings and specific implementation examples. It should be understood that these examples are only for illustrating the present invention and are not intended to limit the scope of the present invention.

[0035] like Figure 1 The present invention provides a variable code length and code rate encoding method based on 5G LDPC codes, and provides a matrix puncturing and shortening mode for 5G LDPC code BG1 matrix encoding, which can achieve better performance than encoding according to the 5G protocol. The parity-check matrix of the 5G LDPC code has a quasi-cyclic structure, and can usually be represented by a base matrix H. b The expression, where the number of lines is M b The number of columns is N b The number of information columns is K. b Satisfying K b =N b -M b The basis matrix supports multiple sets of different offset values, thus ensuring compatibility with codes of different lengths. The basis matrix is ​​expanded by an expansion factor Z to obtain a parity-check matrix H of dimension M×N, where M = M b ×Z, N=N b ×Z. In the 5G protocol, for encoding long data blocks and high code rates, a base matrix BG1 is used, supporting 8 different offset matrices. The encoded bit sequence C of length N can be divided into N columns according to the number of columns in the base matrix. b A small block, Each sub-block has a bit length of Z, and its encoding method mainly involves the following steps:

[0036] S101, firstly, according to the 5G protocol, the information bits in columns c1 and c2 of the LDPC code's base matrix BG1 are punctured, and the number of punctured bits is denoted as P. i There is P i =2Z. Then, the present invention shortens the matrix information bits from back to front, that is, sets this part of the information bits to 0 before encoding, and the shortened bit length is denoted as S, where 2Z≤S≤5Z; then, the parity bits are punched from back to front, and the punched bit length is denoted as P. c The number of information columns K of the basis matrix BG1 b =22. If the actual transmitted information bit length is K′ and the transmission code rate is R, then the actual transmitted code length N′ = K′ / R.

[0037] S102, calculate the value of the spreading factor Z. This invention achieves variable code length and code rate encoding through a puncturing shortening mode, supporting a maximum coded information bit length of 7680. Based on the information bit shortening length range 2Z≤K... bGiven ZK′≤5Z, we obtain K′ / 20≤Z≤K′ / 17, which gives the approximate range of values ​​for the expansion factor Z. Then, we query the entire set of values ​​for the expansion factor Z to find the one that meets the requirements. If multiple values ​​meet the requirements, we select the largest Z value. Table 1 provides examples of matrix construction for several different code rates using this method, where Z is 384, Pi=2Z=768.

[0038] Table 1. Basis matrix encoding methods at different code rates

[0039] 19 / 25 7296 30 0 1152 96 / 125 6912 30 215 1536 19 / 27 7296 32 0 1152 17 / 29 6528 36 0 1920 5 / 9 7680 40 0 768

[0040] S103, Calculate the shortened information bit length S, S = K b ZK′.

[0041] S104, this invention specifies the encoding method for seven sets of base matrices corresponding to different code rates, as shown in Table 2. When constructing the base matrix, Table 2 is consulted to select the number of columns N of the base matrix according to the transmission code rate R. b Then the number of rows M of the basis matrix is ​​obtained. b =N b -22. Table 2 gives several base matrix encoding methods for different expansion factors Z, where P i =2Z, P c =0.

[0042] Table 2. Basis matrix encoding methods for different expansion factors Z

[0043] 384 6912 58 9 / 26 1536 192 3840 46 10 / 21 384 48 960 30 10 / 13 96

[0044] S105, Calculate the puncture length P of the parity bit. c P c =N b ZSP i -N′. If P c If the value is less than 0, then recalculate the number of columns N in the basis matrix. b The value, Where |·| represents taking the absolute value, This indicates rounding up and then calculating the puncture length P of the parity bit. c =N b ZSP i -N′.

[0045] S106, based on the index value group of Z and N b According to the 5G standard protocol, the corresponding BG1 basis matrix is ​​obtained, and then the formula Z is used. i,j =mod(V i,j The offset factor Z at each position of the matrix is ​​obtained. i,j i and j represent the row number and column number respectively, mod represents the modulo algorithm, where Vi,j The values ​​are searched in the offset matrix specified in the 5G standard protocol. Table 3 shows some of the offset values ​​for BG1, where i represents the row index, and 0 ≤ i ≤ M. b -1; j represents the column index, where 0 ≤ j ≤ N. b -1. Set index i LS Corresponding to the index in Table 1, i LS =0,1,2,3,4,5,6,7. BG1 consists of a set of 8 offset matrices, each of which supports a set of expansion factors. The non-negative elements of the offset matrices are in the same position. The offset value of the matrix position not given in the table is -1.

[0046] S107, the obtained base matrix is ​​encoded. Before encoding, the S information bits are shortened by setting the information bits to 0 from the last S bits forward, and then LDPC encoding is performed to obtain the final encoded sequence to be transmitted. Before decoding, the first 2Z blocks of information bits and the last P bits are further processed. c Puncture a parity bit, which means assigning low reliability information. The punctured bit is not sent, and the receiver needs information from other nodes to restore its reliability.

[0047] Table 3. Matrix offset values ​​corresponding to BG1

[0048]

[0049] This invention specifies a punch-hole shortening mode and provides matrix encoding methods for seven different bitrate ranges. Three bitrate ranges are selected, and within each range, 2-4 matrices of different bitrates are chosen. Performance is tested using both the encoding method provided by this invention and the encoding method provided by the 5G protocol. Figures 3-5 As shown in the figure. For ease of explanation, N in the legend specifically refers to the actual transmitted code length, and the figures are punched in columns c1 and c2.

[0050] The simulation parameters are as follows: LNMS decoding algorithm, 30 iterations, QPSK modulation, normalization coefficient alpha = 0.75; fixed-point quantization is used, the initial log-likelihood ratio fed into the decoder is quantized with 6 bits, the information from the check node to the variable node is quantized with 6 bits, and the information from the variable node to the check node is quantized with 8 bits.

[0051] Figure 3 The selected actual transmission information bit lengths were 7680, 7296, 6912, and 6528, with corresponding code rates of 5 / 7, 19 / 27, 9 / 13, and 17 / 25. Other matrix parameters are shown in Table 4. The simulation curves are shown in the figure, with a quantization saturation scale = 25. The curves show that at a bit error rate (BER) of 1 × 10⁻⁶... -5At different code lengths, the performance improvement of this invention compared to the protocol construction method is approximately 0.05 dB to 0.1 dB.

[0052] Table 4 Simulation Figure 3 Matrix parameters in

[0053]

[0054] Figure 4 The selected actual transmission information bit lengths are 7680, 6912, and 6528, with corresponding code rates of 2 / 5, 3 / 8, and 17 / 47. Other matrix parameters are shown in Table 5. Simulation curves are shown below. Figure 4 As shown, the quantization saturation scale = 10. The curve shows that at a bit error rate (BER) of 1 × 10⁻⁶,... -5 At different code lengths, the present invention improves performance by approximately 0.1 dB to 0.16 dB compared to the protocol construction method.

[0055] Table 5 Simulation Figure 4 Matrix parameters in

[0056]

[0057] Figure 5 The selected actual transmission information bit lengths are 7680, 6912, and 6528, with corresponding code rates of 10 / 27, 9 / 26, and 1 / 3. Other matrix parameters are shown in Table 6. Simulation curves are shown below. Figure 5 As shown, the quantization saturation scale = 10. The curve shows that at a bit error rate (BER) of 1 × 10⁻⁶,... -5 At different code lengths, the present invention improves performance by approximately 0.08 dB to 0.1 dB compared to the protocol construction method.

[0058] Table 6 Simulation Figure 5 Matrix parameters in

[0059]

[0060] In summary, the variable code length and code rate encoding method based on 5G LDPC code proposed in this invention not only achieves better decoding performance compared to the encoding method given in the 5G protocol, but also reduces the computational workload of recalculating offset values ​​and matrix size due to changes in code rate and code length. This results in lower complexity and better performance for multi-code rate and multi-code length 5G LDPC code encoding.

[0061] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A variable code length and code rate encoding method based on 5G LDPC codes, characterized in that, It provides matrix puncturing and shortening modes with 7 code rate ranges for 5G LDPC code encoding; the parity check matrix of the 5G LDPC code has a quasi-cyclic structure, using a base matrix H. b The expression, where the number of lines is M b The number of columns is N b The number of information columns is K. b Satisfying K b =N b -M b The basis matrix supports multiple sets of different offset values, thus ensuring compatibility with codes of different lengths. The 5G protocol specifies a basis matrix format where the positions of non-zero elements are fixed, called BG1. The basis matrix is ​​expanded by an expansion factor Z to obtain a parity-check matrix H of dimension M×N, where M = M b ×Z, N=N b ×Z; In the 5G protocol, for encoding long block data and high code rates, a base matrix BG1 is used, supporting 8 different offset value matrices. The encoded bit sequence C of length N is divided into N columns according to the number of columns in the base matrix. b A small block, The bit length of each sub-block is consistent with the expansion factor; The encoding method specifically includes the following steps: S101, firstly, according to the 5G protocol, the information bits in columns c1 and c2 of the LDPC code's base matrix BG1 are punctured, and the number of punctured bits is denoted as P. i There is P i =2Z; then, the matrix information bits are shortened from back to front, that is, these information bits are set to 0 before encoding, and the shortened bit length is denoted as S, where 2Z≤S≤5Z; then, the parity bits are punched from back to front, and the punched bit length is denoted as P. c The number of information columns K of the basis matrix BG1 b =22; If the actual transmitted information bit length is K′ and the transmission code rate is R, the actual transmitted code length N′ = K′ / R; S102, calculate the value of the spreading factor Z, and implement variable code length and code rate coding through the puncturing shortening mode. The maximum supported codeable information bit length is 7680. The set of spreading factors supported by 5G LDPC is Z = a × 2. j Where a = {2, 3, 5, 7, 9, 11, 13, 15}, j = 0, 1, 2, 3, 4, 5, and Z ≤ 384; therefore, the complete set of values ​​for the expansion factor Z is {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 22, 24, 26, 28, 30, 32, 36, 40, 44, 4}. 8, 52, 56, 60, 64, 72, 80, 88, 96, 104, 112, 120, 128, 144, 160, 176, 192, 208, 224, 240, 256, 288, 320, 352, 384}; The expansion factor Z is divided into 8 groups, each corresponding to a value of a, and the group number starts from 0; According to the information bit shortening length range 2Z≤K b ZK′≤5Z, we get K′ / 20≤Z≤K′ / 17, and find the expansion factor Z whose value satisfies the inequality; if multiple expansion factors satisfy the inequality are found, select the expansion factor Z with the largest value. S103, Calculate the shortened information bit length S, S = K b ZK′; S104 specifies the encoding methods for the base matrices corresponding to 7 different code rates, and specifies the number of columns N of the base matrix within each code rate group. b When the code rate R∈[1 / 3, 17 / 47], N b Take 58; R∈(17 / 47, 11 / 26], N b Take 54; R∈(11 / 26, 1 / 2], N b Take 46; R∈(1 / 2, 11 / 49], N b Take 40; R∈(11 / 19, 11 / 17], N b Take 36; R∈(11 / 17, 11 / 15], N b Take 32; R∈(11 / 15, 11 / 12], N b Choose 30; select the number of columns N of the basis matrix according to the transmission code rate R. b Then the number of rows M of the basis matrix is ​​obtained. b =N b -twenty two; S105, Calculate the puncture length P of the parity bit. c P c =N b ZSP i -N′; if P c If the value is less than 0, then recalculate the number of columns N in the basis matrix. b The value, Where |·| represents taking the absolute value, This indicates rounding up and recalculating the puncture length P of the parity bit. c =N b ZSP i -N′; S106, based on the index value group of Z and N b According to the 5G standard protocol, the corresponding BG1 basis matrix is ​​obtained, and then the formula Z is used. i,j =mod(V i,j The offset factor Z at each position of the matrix is ​​obtained. i,j i and j represent the row number and column number respectively, mod represents the modulo algorithm, where V i,j Search within the offset value matrix specified in the 5G standard protocol; S107, the obtained base matrix is ​​encoded to obtain the final encoded sequence to be sent.

2. The variable code length and code rate encoding method based on 5G LDPC code according to claim 1, characterized in that, The encoding of the obtained base matrix in S107 includes the following steps: shortening the S information bits, that is, zeroing the information bits from the right to the left by S bits, then performing LDPC encoding, and then encoding the first 2Z lengths of information bits and the last P bits. c Punch the parity bits of the length to obtain the final encoded sequence to be sent.