A qc-ldpc code construction method minimizing the number of short loops

By globally optimizing the number of short loops in the QC-LDPC code base matrix, the problems of insufficient flexibility and flat error profile in existing technologies are solved, achieving more efficient error correction performance, especially in the field of flash memory error correction.

CN115378440BActive Publication Date: 2026-07-03NANJING UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING UNIV
Filing Date
2021-05-18
Publication Date
2026-07-03

Smart Images

  • Figure CN115378440B_ABST
    Figure CN115378440B_ABST
Patent Text Reader

Abstract

This invention discloses a method for constructing QC-LDPC codes that minimizes the number of short loops, comprising the following steps: Step 1: Randomly generate the initial QC-LDPC code base matrix according to the construction requirements; Step 2: Count the number of short loops passing through each element in the base matrix; Step 3: Sort all elements in the base matrix according to the number of short loops; Step 4: Iterate through each element sequentially, calculate the number of short loops corresponding to all values ​​of the element, select the value with the fewest short loops as the new value of the element, if the element value changes, return to Step 2 for the next round of optimization, otherwise continue to traverse the next element; Step 5: Replace each element in the base matrix with a CPM (Current Minimum Quantity). This invention performs global optimization on all elements in the entire matrix, which can approach the global optimum solution, and does not rely on mathematical theories such as finite fields, has no restrictions on parameters, and has great flexibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for constructing QC-LDPC codes, and specifically to a method for constructing QC-LDPC codes that minimizes the number of short loops. Background Technology

[0002] Low-density parity-check (LDPC) codes, first proposed by R. Gallager, are widely used in wireless communication and flash memory error correction. When the code length is sufficiently long, the error-correcting performance of LDPC codes can approach the Shannon limit, and their iterative decoding algorithm makes the decoding process very easy to parallelize. In recent years, quasi-circular low-density parity-check (QC-LDPC) codes have gradually become the mainstream LDPC codes; their parity-check matrix is ​​composed of a cyclic shift matrix (CPM). QC-LDPC codes have highly efficient codec circuits, and many international standards have adopted QC-LDPC codes as error-correcting codes.

[0003] An LDPC code can be represented by a Tanner graph, which contains two types of nodes: variable nodes and check nodes. If an edge connects a variable node and a check node, it means that the variable node participates in the specified check equation. If the XOR result of the values ​​of all variable nodes in the specified check equation is 0, then the check equation is satisfied. For any codeword, all check equations are satisfied. In the Tanner graph, starting from any node, following several edges and returning to the same node along a path, these nodes and edges form a cycle. The number of nodes in the cycle is called the girth of the cycle, and a cycle with a girth is called a g-element cycle.

[0004] LDPC code performance curves often exhibit a phenomenon called error flattening. This refers to the situation where, as the original signal-to-noise ratio (SNR) of the channel gradually increases to a certain value, the frame error rate (FER) after error correction no longer decreases rapidly with increasing SNR, but instead shows a flat or slow decreasing trend. This property has become a significant obstacle to the application of LDPC codes, especially in the field of flash memory error correction. According to existing research, the error flattening phenomenon in LDPC codes is mainly caused by trap sets, which are primarily composed of short loops. Therefore, reducing the number of short loops can effectively alleviate the error flattening phenomenon.

[0005] There are two main types of construction methods for existing QC-LDPC codes. One type is based on finite field theory, directly constructing the shift values ​​of the QC-LDPC code using specific mathematical formulas. This method can usually guarantee the absence of quaternions, but it lacks control over hexaternions and has limited flexibility. The other type is based on the Progressive Edge Growth (PEG) algorithm, a greedy algorithm that sequentially adds each edge to the Tanner graph. This algorithm has better flexibility and can obtain a construction result with the largest possible perimeter. However, due to its unidirectional nature, in order to obtain a larger perimeter in the early stages of construction, the search space in the later stages is sacrificed, causing the final result to deviate from the global optimum. Summary of the Invention

[0006] To overcome the shortcomings of the prior art, this invention provides a method for constructing QC-LDPC codes that minimizes the number of short loops. This method can perform global optimization on the entire matrix, while the parameters are flexibly adjustable, effectively reducing the error planes of QC-LDPC codes.

[0007] The technical solution adopted by this invention to solve its technical problem is: a QC-LDPC code construction method that minimizes the number of short loops, comprising the following steps:

[0008] Step 1: According to the construction requirements, randomly generate the initial basic matrix of the QC-LDPC code;

[0009] Step 2: Count the number of short cycles passing through each element in the fundamental matrix;

[0010] Step 3: Sort all elements in the basic matrix according to the number of short cycles;

[0011] Step 4: Iterate through each element in turn, calculate the number of short cycles corresponding to all values ​​of the element, select the value with the fewest short cycles as the new value of the element. If the value of the element changes, return to step 2 for the next round of optimization; otherwise, continue to iterate through the next element.

[0012] Step 5: Replace each element in the basic matrix with a CPM to complete the construction of the QC-LDPC code.

[0013] Compared with the prior art, the positive effects of the present invention are:

[0014] This invention performs global optimization on all elements of the entire matrix, rather than constructing it unidirectionally, thus getting closer to the global optimum. Furthermore, this method does not rely on mathematical theories such as finite fields, has no restrictions on parameters, and has great flexibility. Attached Figure Description

[0015] The present invention will be described by way of example and with reference to the accompanying drawings, wherein:

[0016] Figure 1 This is a flowchart of the present invention;

[0017] Figure 2 Statistical examples of quaternary and hexaternary rings;

[0018] Figure 3 This is a comparison chart showing the number of quaternary rings and hexaternary rings constructed by this invention and other construction algorithms;

[0019] Figure 4 This is a comparison chart showing the error correction performance of the invention with other construction algorithms. Detailed Implementation

[0020] A QC-LDPC code construction method that minimizes the number of short cycles is proposed. This method continuously optimizes the elements in the fundamental matrix that pass through a large number of short cycles, thereby minimizing the number of short cycles in the entire matrix. The implementation steps are as follows: Figure 1 As shown, the specific construction process is as follows:

[0021] Step 1: According to the construction requirements, randomly generate the initial QC-LDPC code's fundamental matrix.

[0022] If the construction requirements do not specify a preamble, the preamble used for the QC-LDPC code must be determined first. Based on the required code length, code rate, and CPM, the size of the preamble is determined, and the matrix of the preamble is constructed. Edges in the preamble can be randomly generated based on column weight requirements. After the preamble is determined, each 0 in the preamble matrix is ​​replaced with -1, and each 1 is replaced with a random shift value. The resulting matrix serves as the base matrix for the random QC-LDPC code.

[0023] Step 2: Count the number of long and short loops passing through each element in the basic matrix.

[0024] For four non-negative integer elements e1, e2, e3, and e4 at distinct positions in the fundamental matrix, if e1 and e2 are in the same row, e3 and e4 are in the same row, e1 and e4 are in the same column, and e2 and e3 are in the same column, and (e1 + e3) mod z = (e2 + e4) mod z, then these four elements form a quaternion, where a mod b represents the remainder when a is divided by b, and z represents the size of the CPM. By traversing all combinations of four elements in the matrix and counting the number of quaternions that satisfy the condition, we can obtain the number of quaternions passing through each element in the fundamental matrix.

[0025] For six non-negative integer elements e1, e2, e3, e4, e5, and e6 at distinct positions in the fundamental matrix, if e1 and e2 are in the same row, e3 and e4 are in the same row, e5 and e6 are in the same row, e1 and e6 are in the same column, e2 and e3 are in the same column, and e4 and e5 are in the same column, and (e1 + e3 + e5) mod z = (e2 + e4 + e6) mod z, then these six elements form a six-element ring. By traversing all combinations of the six elements in the matrix and counting the number of six-element rings that satisfy the condition, we can obtain the number of six-element rings passing through each element in the fundamental matrix.

[0026] The statistical methods for rings with larger circumferences, such as octet rings, are similar.

[0027] Step 3: Sort all elements in the basic matrix according to the number of short cycles.

[0028] During the sorting process, elements are first sorted in descending order by the number of quaternions. Elements with the same number of quaternions are then sorted in descending order by the number of hexaternions, and elements with the same number of hexaternions are sorted in descending order by the number of octetions, and so on.

[0029] Step 4: Iterate through each element in turn, calculate the number of short cycles corresponding to all values ​​of the element, select the value with the fewest short cycles as the new value of the element. If the value of the element changes, return to step 2 for the next round of optimization; otherwise, continue to iterate through the next element.

[0030] Optimize each element sequentially based on the sorting results from step three.

[0031] For each element, let C(g, b) represent the number of g-membered rings passing through that element when the element's value is b. In calculating C(g, b), the method described in step two is used to traverse all combinations of elements containing that element, and the value b of each element that could potentially form a short cycle is calculated and accumulated into C(g, b). For example, in... Figure 2 In the diagram, CPM is 64, b represents the element to be optimized, the square in the lower left corner represents a possible quaternion, a quaternion can be formed when b = 35, so when traversing the combination of these 4 elements, C(4, 35) is increased by 1, the polygon on the right represents a possible hexaternion, a hexaternion can be formed when b = 59, so C(6, 59) is increased by 1.

[0032] Calculate all C(g, b), and sort all values ​​of b. First, sort by C(4, b) in ascending order; if C(4, b) is the same, sort by C(6, b) in ascending order; if C(6, b) is the same, sort by C(8, b) in ascending order, and so on. Then, select the first b in the sorted list as the optimal value for that element. If none of the optimal C(g, b) values ​​are lower than the original values, then no effective optimization has been achieved. Keep the matrix elements unchanged and continue trying the next element. If any of the optimal C(g, b) values ​​is lower than the original values, then an effective optimization has been achieved. Modify that element to that value and return to step two for the next round of optimization.

[0033] Step 5: Replace each element in the basic matrix with a CPM to complete the construction of the QC-LDPC code.

[0034] For each element in the base matrix, if it is -1, it is replaced with a matrix of all zeros; if it is a non-negative integer b, it is replaced with the matrix obtained by cyclically shifting the identity matrix to the right by b columns. After replacing all elements, the parity check matrix corresponding to the QC-LDPC code is obtained, thus completing the construction of the QC-LDPC code.

[0035] Figure 3 By comparing the number of quaternary rings and hexaternary rings obtained by this invention with those obtained by other construction algorithms, it can be seen that the result constructed by this invention has the fewest number of quaternary rings and hexaternary rings under different CPM sizes. Figure 4 By comparing the error correction performance of the results obtained by this invention with other construction algorithms, it can be seen that the error level of the QC-LDPC code constructed by this invention is no higher than that of other algorithms under all column weights, and there is a significant improvement when the column weight is small.

Claims

1. A QC-LDPC code construction method for minimizing the number of short cycles, characterized in that, The steps include: 1) Randomly generating the base matrix of the QC-LDPC code to be constructed according to the construction requirements; 2) Using a Tanner diagram to represent the QC-LDPC code determined by the base matrix, calculating the number of short loops of each length in the QC-LDPC code on the Tanner diagram, and counting the number of short loops passing through each element in the base matrix. 3) Sort all elements in the basic matrix according to the number of short cycles obtained in step 2); 4) Select each element in the base matrix as the current element to be optimized according to the sorting result. Iterate through all values ​​of the current element to be optimized, calculate the number of short cycles passing through the element under each value, and select the value with the fewest short cycles as the new value of the element. If the new value is different from the original value of the element, then update the element to the new value and return to step (2) for the next round of optimization; otherwise, keep the element unchanged and continue to process the next element. 5) After optimizing all elements in the base matrix, replace each element in the base matrix with a cyclic shift matrix CPM or a zero matrix to obtain the parity check matrix of the LDPC code to be constructed corresponding to the QC-LDPC code. The method for constructing the QC-LDPC code is characterized in that, in step 1), when randomly generating the initial base matrix of the QC-LDPC code according to the construction requirements, if the construction requirements do not specify the original model diagram, the original model diagram used by the QC-LDPC code is first determined. The size of the original model diagram is determined according to the required code length, code rate, and CPM. Then, the edges in the original model diagram are randomly generated according to the column weight requirements. After the original model diagram is determined, each 0 in the original model diagram matrix is ​​replaced with -1, and each 1 is replaced with a random shift value. The resulting matrix is ​​used as the base matrix of the random QC-LDPC code. The method for constructing the QC-LDPC code is characterized in that, in step 3), during the process of sorting all elements in the basic matrix according to the number of short rings, the elements are first sorted in descending order according to the number of four-rings, the elements with the same number of four-rings are sorted in descending order according to the number of six-rings, the elements with the same number of six-rings are sorted in descending order according to the number of eight-rings, and so on. The method for constructing the QC-LDPC code is characterized in that, in step 4), when selecting the value with the fewest short rings as the new value of the element, if the number of rings in each circumference is not less than the old element value, the element is not changed, but the next element is traversed.

2. The construction method of a QC-LDPC code according to claim 1, wherein In step 5), when each element in the base matrix is ​​replaced with CPM, if it is -1, it is replaced with a matrix of all zeros; if it is a non-negative integer b, it is replaced with the matrix obtained by shifting the identity matrix to the right by b columns.

3. The method for constructing QC-LDPC codes as described in claim 1, characterized in that, A random shift value refers to an integer generated by a computer in a uniformly distributed range between 0 and z-1 (inclusive), where z represents the size of CPM.

4. The method for constructing a QC-LDPC code as described in claim 1, characterized in that, When the number of rings of different elements is equal, these elements can have any relative order during the sorting process.

5. The method for constructing a QC-LDPC code as described in claim 1, characterized in that, When there are multiple possible values ​​for the shortest ring, the computer randomly selects one of them as the new value for that element using a uniform distribution.