A method and device for encoding low-density parity-check codes for satellite navigation systems
By decomposing the LDPC code check matrix into sub-matrices A, B, T, C, D, and E and calculating the first and second check codes, the problem of high complexity in inverting sparse matrices is solved, and efficient encoding of low-density parity-check codes is achieved.
Patent Information
- Application Number
- CN202211713737.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-12-29
AI Technical Summary
In the prior art, the sparse matrix inversion of the LDPC code check matrix has high computational complexity and consumes a lot of hardware resources, resulting in low coding efficiency.
By decomposing the check matrix into submatrices A, B, T, C, D, and E, the first and second check codes are calculated using these submatrices and the target signal sequence, avoiding direct inversion operations and reducing the computational complexity of the sparse matrix.
The complexity of sparse matrix inversion is reduced, the hardware resources required for low-density parity-check code encoding are reduced, and the encoding efficiency is improved.
Smart Images

Figure CN116032427B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of signal processing technology, and in particular to a method and device for encoding low-density parity-check codes for satellite navigation systems. Background Art
[0002] Low-Density Parity-Check (LDPC) codes are a type of linear block code defined by a sparse parity check matrix and are widely used in digital communications and storage. In the next-generation Global Positioning System (GPS), two rate-1 / 2 LDPC codes are used in subframe 2 and subframe 3 of the L1C raw message data code to reduce the bit error rate (BER) of the raw message data code.
[0003] To implement encoding of two sets of LDPC codes, the GPS protocol provides a method for calculating the parity check bits of the two LDPC codes. Currently, calculating these two sets of LDPC codes requires inverting the submatrices of the LDPC parity check matrix. However, the submatrices of the LDPC parity check matrix are sparse, making inverting these matrices computationally complex and consuming significant hardware resources. Summary of the Invention
[0004] In view of this, the present application provides a method and apparatus for encoding low-density parity-check codes for a satellite navigation system, which can reduce the complexity of sparse matrix inversion and the hardware resources required for low-density parity-check code encoding.
[0005] To solve the above problems, the technical solutions provided by this application are as follows:
[0006] In a first aspect, the present application provides a method for encoding a low-density parity-check code for a satellite navigation system, the method comprising:
[0007] In response to acquiring an L1C original message data code of a satellite navigation system, acquiring a target signal sequence from the L1C original message data code;
[0008] Obtaining a check matrix of a low-density parity-check code;
[0009] Determine a first check code and a second check code based on the check matrix and the target signal sequence;
[0010] An encoding result of the low-density parity-check code is obtained according to the target signal sequence, the first check code, and the second check code.
[0011] In one possible implementation, determining the first check code and the second check code based on the check matrix and the target signal sequence includes:
[0012] Obtaining submatrices of the check matrix, the submatrices including an A submatrix, a B submatrix, a T submatrix, a C submatrix, a D submatrix, and an E submatrix;
[0013] Calculate the first check code according to the A submatrix, the T submatrix, the C submatrix, the E submatrix and the target signal sequence;
[0014] The second check code is calculated according to the A sub-matrix, the B sub-matrix, the T sub-matrix and the target signal sequence.
[0015] In one possible implementation, calculating the first check code according to the A sub-matrix, the T sub-matrix, the C sub-matrix, the E sub-matrix, and the target signal sequence includes:
[0016] Calculate the F matrix according to the A submatrix, the T submatrix, the C submatrix, and the E submatrix;
[0017] Calculating a first dimension according to the F matrix and the target signal sequence;
[0018] performing a modulo-2 operation on the first dimension to obtain first target data;
[0019] The first target data is determined as the first check code.
[0020] In one possible implementation, calculating the second check code according to the A sub-matrix, the B sub-matrix, the T sub-matrix, and the target signal sequence includes:
[0021] Calculate intermediate data according to the A submatrix, the B submatrix, the target signal sequence and the first target data;
[0022] Analyzing the T submatrix, the T submatrix is an approximately bidiagonal lower triangular matrix;
[0023] If only the diagonal and sub-diagonal elements in the rows of the T submatrix are 1, recursively calculate the second dimension based on the intermediate data;
[0024] If the diagonal and sub-diagonal elements in the rows of the T submatrix are 1 and there is an element with a value of 1 to the left of the sub-diagonal; or; the diagonal elements in the rows of the T submatrix are 1, the sub-diagonal elements are 0, and the elements to the left of the sub-diagonal are all 0; or; the diagonal elements in the rows of the T submatrix are 1, the sub-diagonal elements are 0, and there is an element with a value of 1 to the left of the sub-diagonal; or; the diagonal elements in the rows of the T submatrix are 1, the sub-diagonal elements are 0, and there is two elements with a value of 1 to the left of the sub-diagonal, then obtain the paired data according to the table lookup;
[0025] Calculating the second dimension according to the paired data and the intermediate data;
[0026] performing a modulo-2 operation on the second dimension to obtain second target data;
[0027] The second target data is determined as the second check code.
[0028] In one possible implementation, obtaining the encoding result of the low-density parity-check code according to the target signal sequence, the first check code, and the second check code includes:
[0029] The target signal sequence, the first check code, and the second check code are combined to obtain an encoding result of the low-density parity-check code.
[0030] In one possible implementation, the L1C original telegram data code includes a subframe 1 original telegram data code, a subframe 2 original telegram data code, and a subframe 3 original telegram data code, wherein the subframe 2 original telegram data code is a target signal sequence used to encode subframe 2, and the subframe 3 original telegram data code is a target signal sequence used to encode subframe 3.
[0031] In one possible implementation, obtaining a check matrix of a low-density parity-check code includes:
[0032] Obtain the check matrix of the low-density parity-check code from the L1C signal interface specification document.
[0033] In a second aspect, the present application provides a low-density parity-check code encoding device for a satellite navigation system, the device comprising:
[0034] a first acquisition module, configured to acquire a target signal sequence from an L1C original message data code in response to acquiring an L1C original message data code of a satellite navigation system;
[0035] A second acquisition module is used to obtain a check matrix of a low-density parity-check code;
[0036] a determination module, configured to determine a first check code and a second check code based on the check matrix and the target signal sequence;
[0037] A third acquisition module is configured to acquire an encoding result of the low-density parity-check code according to the target signal sequence, the first check code, and the second check code.
[0038] In one possible implementation, the determining module includes:
[0039] An acquisition submodule, configured to acquire submatrices of the check matrix, wherein the submatrices include an A submatrix, a B submatrix, a T submatrix, a C submatrix, a D submatrix, and an E submatrix;
[0040] A first calculation submodule, configured to calculate the first check code according to the A submatrix, the T submatrix, the C submatrix, the E submatrix and the target signal sequence;
[0041] The second calculation submodule is configured to calculate the second check code according to the A submatrix, the B submatrix, the T submatrix and the target signal sequence.
[0042] In one possible implementation, the first calculation submodule is specifically configured to:
[0043] Calculate the F matrix according to the A submatrix, the T submatrix, the C submatrix, and the E submatrix;
[0044] Calculating a first dimension according to the F matrix and the target signal sequence;
[0045] performing a modulo-2 operation on the first dimension to obtain first target data;
[0046] The first target data is determined as the first check code.
[0047] In one possible implementation, the second calculation submodule is specifically configured to:
[0048] Calculate intermediate data according to the A submatrix, the B submatrix, the target signal sequence and the first target data;
[0049] Analyzing the T submatrix, the T submatrix is an approximately bidiagonal lower triangular matrix;
[0050] If only the diagonal and sub-diagonal elements in the rows of the T submatrix are 1, recursively calculate the second dimension based on the intermediate data;
[0051] If the diagonal and sub-diagonal elements in the rows of the T submatrix are 1 and there is an element with a value of 1 to the left of the sub-diagonal; or; the diagonal elements in the rows of the T submatrix are 1, the sub-diagonal elements are 0, and the elements to the left of the sub-diagonal are all 0; or; the diagonal elements in the rows of the T submatrix are 1, the sub-diagonal elements are 0, and there is an element with a value of 1 to the left of the sub-diagonal; or; the diagonal elements in the rows of the T submatrix are 1, the sub-diagonal elements are 0, and there is two elements with a value of 1 to the left of the sub-diagonal, then obtain the paired data according to the table lookup;
[0052] Calculating the second dimension according to the paired data and the intermediate data;
[0053] performing a modulo-2 operation on the second dimension to obtain second target data;
[0054] The second target data is determined as the second check code.
[0055] In one possible implementation, the third acquisition module is specifically configured to:
[0056] The target signal sequence, the first check code, and the second check code are combined to obtain an encoding result of the low-density parity-check code.
[0057] In one possible implementation, the L1C original telegram data code includes a subframe 1 original telegram data code, a subframe 2 original telegram data code, and a subframe 3 original telegram data code, wherein the subframe 2 original telegram data code is a target signal sequence used to encode subframe 2, and the subframe 3 original telegram data code is a target signal sequence used to encode subframe 3.
[0058] In one possible implementation, the second acquisition module is specifically configured to:
[0059] Obtain the check matrix of the low-density parity-check code from the L1C signal interface specification document.
[0060] In a third aspect, the present application provides a low-density parity-check code encoding device for a satellite navigation system, comprising: a processor, a memory, and a system bus;
[0061] The processor and the memory are connected via the system bus;
[0062] The memory is used to store one or more programs, and the one or more programs include instructions. When the instructions are executed by the processor, the processor executes the encoding method of low-density parity-check code for satellite navigation system described in the first aspect above.
[0063] In a fourth aspect, the present application provides a computer-readable storage medium storing instructions. When the instructions are executed on a device, the device executes the encoding method of the low-density parity-check code of the satellite navigation system described in the first aspect above.
[0064] It can be seen that this application has the following beneficial effects:
[0065] The present application provides a method and apparatus for encoding a low-density parity-check code for a satellite navigation system. In response to obtaining an L1C original message data code of the satellite navigation system, a target signal sequence is obtained from the L1C original message data code; a check matrix for the low-density parity-check code is obtained; a first check code and a second check code are determined based on the check matrix and the target signal sequence; and an encoding result of the low-density parity-check code is obtained based on the target signal sequence, the first check code, and the second check code. In this manner, the low-density parity-check code is encoded by determining the check code based on the check matrix and the target signal sequence, thereby reducing the complexity of sparse matrix inversion and the hardware resources required for encoding the low-density parity-check code. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 A schematic flow chart of a method for encoding a low-density parity-check code for a satellite navigation system provided in an embodiment of the present application;
[0067] Figure 2 Schematic diagram of the structural characteristics of the LDPC code check matrix H in an embodiment of the present application;
[0068] Figure 3 Schematic diagram of the encoding process of the LDPC code in the embodiment of the present application;
[0069] Figure 4 This is a schematic diagram of the F matrix of the original message data code of subframe 2 in an embodiment of the present application;
[0070] Figure 5 This is a schematic diagram of the F matrix of the original message data code of subframe 3 in an embodiment of the present application;
[0071] Figure 6 The special index table Q of the original message data code of subframe 2 in the embodiment of the present application when calculating p2-599bit;
[0072] Figure 7 The special index table Q of the original message data code of subframe 3 in the embodiment of the present application when calculating p2-273 bits;
[0073] Figure 8 This is a structural block diagram of a low-density parity-check code encoding device for a satellite navigation system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0074] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0075] In this application, the terms "comprises," "comprising," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0076] In the next-generation Global Positioning System (GPS), the L1C original message data code uses two sets of LDPC codes with a code rate of 1 / 2 for subframe 2 and subframe 3, respectively, to reduce the bit error rate of the original message data code. To implement the encoding of the two sets of LDPC codes, the GPS protocol provides a method for calculating the parity check bits of the two sets of LDPC codes. Currently, calculating the two sets of LDPC codes requires inverting the submatrix of the LDPC code check matrix. However, the submatrix of the LDPC code check matrix is sparse, making the inversion of this sparse matrix computationally difficult, resulting in low LDPC code coding efficiency.
[0077] Based on this, an embodiment of the present application provides a method and apparatus for encoding a low-density parity-check code for a satellite navigation system. In response to obtaining the L1C original telegram data code of the satellite navigation system, a target signal sequence is obtained from the L1C original telegram data code; a check matrix for the low-density parity-check code is obtained; a first check code and a second check code are determined based on the check matrix and the target signal sequence; and an encoding result of the low-density parity-check code is obtained based on the target signal sequence, the first check code, and the second check code. In this way, the low-density parity-check code is encoded by determining the check code based on the check matrix of the low-density parity-check code and the target signal sequence, thereby reducing the complexity of sparse matrix inversion and the hardware resources required for low-density parity-check code encoding.
[0078] To facilitate understanding of the technical solution provided by the embodiment of the present application, a method and apparatus for encoding a low-density parity-check code for a satellite navigation system provided by the embodiment of the present application will be described below with reference to the accompanying drawings.
[0079] See also Figure 1 , Figure 1 This is a flow chart of a method for encoding a low-density parity-check code for a satellite navigation system provided in an embodiment of the present application. The method specifically includes the following steps S101 to S104:
[0080] S101: In response to acquiring an L1C original message data code of a satellite navigation system, acquiring a target signal sequence from the L1C original message data code.
[0081] The L1C original telegram data code consists of the subframe 1 original telegram data code, the subframe 2 original telegram data code, and the subframe 3 original telegram data code.
[0082] The target signal sequence is the k*1-dimensional information bit s used during the encoding process and changes dynamically during actual use. The target signal sequence is the GPS-L1C subframe 2 and subframe 3 raw message data codes. The raw message data codes contain information about GPS satellite parameters such as ephemeris, operating status, clock corrections, and almanac, which are corrected by the GPS system through various methods.
[0083] In one possible implementation, the L1C original telegram data code includes a subframe 1 original telegram data code, a subframe 2 original telegram data code, and a subframe 3 original telegram data code, wherein the subframe 2 original telegram data code is a target signal sequence used to encode subframe 2, and the subframe 3 original telegram data code is a target signal sequence used to encode subframe 3.
[0084] Subframe 2 and subframe 3 are encoded separately. For the encoding process involved in this application, the target signal sequence defaults to a known quantity. During use, the target signal sequence is the actual subframe 2 original telegram data code and the subframe 3 original telegram data code. The specific content of the subframe 2 original telegram data code and the subframe 3 original telegram data code can be obtained by decoding. After determining the target signal sequence, the target signal sequence can be used to encode a check code. It should be noted that the scheme introduced in the embodiment of this application can also be used in other similar LDPC coding methods.
[0085] S102: Obtain a check matrix of a low-density parity-check code.
[0086] In a possible implementation, obtaining the check matrix of the low-density parity-check code includes: obtaining the check matrix of the low-density parity-check code from an L1C signal interface specification document.
[0087] The L1C signal interface specification document (IS-GPS-800A) specifies the values of the parity check matrix H for the encoder's parity-check code. The check matrix is an m*n dimensional 0 / 1 matrix, divided into six submatrices: A, B, T, C, D, and E. By tabulating the row and column positions of all 1s, the complete parity check matrix H can be extracted. For the GPS-L1C signal, since the code rate is 1 / 2, m = k = (1 / 2) * n. Therefore, for the original message data code in subframe 2, k = 600, m = 600, and n = 1200; for the original message data code in subframe 3, k = 274, m = 274, and n = 548.
[0088] S103: Determine a first check code and a second check code based on the check matrix and the target signal sequence.
[0089] In one possible implementation, determining the first check code and the second check code based on the check matrix and the target signal sequence includes: obtaining a submatrix of the check matrix, the submatrix including an A submatrix, a B submatrix, a T submatrix, a C submatrix, a D submatrix, and an E submatrix; calculating the first check code based on the A submatrix, the T submatrix, the C submatrix, the E submatrix, and the target signal sequence; and calculating the second check code based on the A submatrix, the B submatrix, the T submatrix, and the target signal sequence.
[0090] See also Figure 2 , Figure 2 Schematic diagram of the structural characteristics of the LDPC code check matrix H in the embodiment of the present application. According to the structural characteristics of the check matrix H, the check matrix H is divided into 6 sub-matrices. The dimension of the A sub-matrix is (mg)*k, the dimension of the B sub-matrix is (mg)*(nk-m+g), the dimension of the T sub-matrix is (mg)*(mg), the dimension of the C sub-matrix is g*k, the dimension of the D sub-matrix is g*(nk-m+g), and the dimension of the E sub-matrix is g*(mg). Among them, g is the first check code p1 T In the LDPC encoding and decoding of GPS-L1C, the value of g is set to 1, and the first check code p1 T 1 bit. The value of g is not limited in the embodiment of the present application. In other LDPC encoding and decoding methods, g can be other values, such as 2, 3, etc. In the embodiment of the present application, for the GPS-L1C signal, g=1 is defined, and the dimension of the A submatrix is (m-1)*k, the dimension of the B submatrix is (m-1)*1, the dimension of the T submatrix is (m-1)*(m-1), the dimension of the C submatrix is 1*k, the dimension of the D submatrix is 1*1, and the dimension of the E submatrix is 1*(m-1).
[0091] In one possible implementation, calculating the first check code based on the A submatrix, the T submatrix, the C submatrix, the E submatrix and the target signal sequence includes: calculating an F matrix based on the A submatrix, the T submatrix, the C submatrix and the E submatrix; calculating a first dimension based on the F matrix and the target signal sequence; performing a modulo 2 operation on the first dimension to obtain first target data; and determining the first target data as the first check code.
[0092] See also Figure 3 , Figure 3 The F matrix is calculated based on the A sub-matrix, T sub-matrix, C sub-matrix and E sub-matrix, specifically F = -E*T -1 *A+C can save the F matrix as m bits. Figure 4 and Figure 5 , Figure 4 This is a schematic diagram of the F matrix of the original message data code of subframe 2 in the embodiment of the present application. Figure 5 The F matrix diagram of the original message data code of subframe 3 in the embodiment of the present application is shown in FIG. For the original message data code of subframe 2, F is 600 bits; for the original message data code of subframe 3, F is 274 bits. The target signal sequence s is kbit. In the process of use, s is used as the matrix. T Indicates that its dimension is k*1. The first dimension is F*s T , perform a modulo 2 operation on the first dimension to obtain the first target data p1, specifically: p1 = mod2(F*s T ). The modulo 2 operation is the remainder of a value divided by 2. If the remainder is an even number, the result of the modulo 2 operation is 0; if the remainder is an odd number, the result of the modulo 2 operation is 1. The first target data p1 and the first check code p1 T consistent.
[0093] In one possible implementation, the calculating the second check code according to the A submatrix, the B submatrix, the T submatrix and the target signal sequence includes: calculating intermediate data according to the A submatrix, the B submatrix, the target signal sequence and the first target data; analyzing the T submatrix, which is an approximately dual-diagonal lower triangular matrix; if only the diagonal and subdiagonal elements in the rows of the T submatrix are 1, recursively calculating the second dimension according to the intermediate data; if the diagonal and subdiagonal elements in the rows of the T submatrix are 1 and there is an element with a value of 1 to the left of the subdiagonal; or ; The diagonal elements in the rows of the T submatrix are 1, the elements in the subdiagonal are 0, and the elements to the left of the subdiagonal are all 0; or; The diagonal elements in the rows of the T submatrix are 1, the elements in the subdiagonal are 0, and there is one element with a value of 1 on the left of the subdiagonal; or; The diagonal elements in the rows of the T submatrix are 1, the elements in the subdiagonal are 0, and there are two elements with a value of 1 on the left of the subdiagonal, then obtain pairing data according to a table lookup; calculate the second dimension according to the pairing data and the intermediate data; perform a modulo 2 operation on the second dimension to obtain second target data; and determine the second target data as the second check code.
[0094] In the process of recursively calculating the second dimension based on the intermediate data, the recursive method for each dimension is used. If, when calculating this dimension, only the diagonal and sub-diagonal elements of this row of the T submatrix are 1, the preset general method is used for calculation, that is, the second dimension is recursively calculated based on the intermediate data. The calculation process of the general method is detailed below.
[0095] Specifically, if, when calculating this dimension, the diagonal and subdiagonal elements of the T submatrix row are 1, and there is still a 1 element to the left of the subdiagonal; or the diagonal elements of the row are 1, the subdiagonal elements are 0, and there is still a 1 element to the left of the subdiagonal; or the diagonal elements of the row are 1, the subdiagonal elements are 0, and all other elements to the left of the subdiagonal are 0; or the diagonal elements of the row are 1, the subdiagonal elements are 0, and there are two 1 elements to the left of the subdiagonal; then the second dimension is calculated based on the paired data and intermediate data obtained from the table lookup. Examples of special cases are detailed below.
[0096] The intermediate data y is calculated according to the A sub-matrix, the B sub-matrix, the target signal sequence and the first target data: y=mod2(A*s T +B*p1), the dimension of y is (m-1)*1. The calculation results show that y[i] is the i-th value of the intermediate data y.
[0097] Calculate the second check code p2 by recursionT , let the i-th value of p2 T be denoted as p2[i], where 1 ≤ i ≤ m - 1. Determine p2[1] = y[1], and analyze the T sub-matrix. The T sub-matrix is a lower triangular matrix that is approximately bidiagonal. In the process of recursively calculating the second dimension according to the intermediate data, the recursive method of each dimension is used for calculation. If, when calculating this dimension, only the elements on the diagonal and the sub-diagonal of the row of the T sub-matrix are 1, then p2[2] = mod2(y[2] - p2[1]). Calculate p2[i] serially in turn, 2 ≤ i ≤ m - 1. Then it can be known that, generally, p2[i] = mod2(y[i] - p2[i - 1]).
[0098] If the T sub-matrix does not have only the values of 1 on the diagonal and the sub-diagonal, there are the following special cases, and the corresponding data needs to be obtained by looking up a table. See Figure 6 and Figure 7 , Figure 6 is the special index table Q for the original telegram data code of sub-frame 2 in the embodiment of this application when calculating p2 - 599 bits, Figure 7 is the special index table Q for the original telegram data code of sub-frame 3 in the embodiment of this application when calculating p2 - 273 bits.<00002........
[0099] 1. When calculating the i-th value of p2, that is, p2[i], and i is in a certain row r in the first column of the special index table Q, and the second column is 1, then p2[i] is not calculated in the general case. It is necessary to add the third column of this r row, that is, p2[r[3]], to participate in the modulo 2 operation. At this time, take p2[i] = mod2(y[i] - p2[i - 1] - p2[r[3]]), where 0 < r[3] < i - 1;
[0100] 2. When calculating the i-th value of p2, that is, p2[i], and i is in a certain row r in the first column of the special index table Q, and the second column is 0, then p2[i] is not calculated in the general case. It is necessary to add p2[r[3]] to participate in the modulo 2 operation, where the third column (r[3]) of this r row represents the index of p2[r[3]] that needs to participate in the modulo 2 operation. At this time, take p2[i] = mod2(y[i] - p2[r[3]]), where 0 < r[3] < i - 1. Specifically, if r[3] = 0, it means that there is no p2[r[3]] participating in the operation. At this time, take p2[i] = mod2(y[i]).
[0101] 3. When it is necessary to calculate the i-th value of p2, i.e. p2[i], where i appears twice in the first column of the special index table Q, namely in row r1 and row r2, and both columns are 0, then p2[i] is no longer calculated in the general case. It is necessary to add p2[r1[3]] corresponding to the third column of row r1 and p2[r2[3]] corresponding to the third column of row r2 to participate in the modulo 2 operation. At this time, the calculation formula of p2[i] is: p2[i] = mod2(y[i] - p2[r1[3]] - p2[r2[3]]), where 0 <r1[3]<i-1,0<r2[3]<i-1。
[0102] S104: Obtain an encoding result of the low-density parity-check code according to the target signal sequence, the first check code, and the second check code.
[0103] After determining the first verification code and the second verification code, in one possible implementation method, obtaining the encoding result of the low-density parity-check code based on the target signal sequence, the first verification code and the second verification code includes: combining the target signal sequence, the first verification code and the second verification code to obtain the encoding result of the low-density parity-check code.
[0104] The LDPC encoding result is a combination of information bits and check bits: [s, p1, p2]. The encoding result is n bits, where n = m + k. For the original message data code of subframe 2, the encoding result is 1200 bits, and for the original message data code of subframe 3, the encoding result is 574 bits.
[0105] The above structural characteristics based on the check matrix H can avoid T -1 The calculation and multi-matrix multiplication operations save the storage space of the T submatrix according to the sparsity of the T submatrix and the lower triangular structure. It is only necessary to summarize the indexes of the subdiagonal that do not participate in the XOR and the indexes of the other non-subdiagonal elements that participate in the XOR by looking up the table, which reduces the complexity of the storage units and operations required, improves the operation efficiency, and further improves the coding efficiency. This embodiment of the present application does not limit this index table, and different index tables can be configured to be compatible with the two LDPC code lengths of GPS-L1C.
[0106] As can be seen from the contents of S101 to S104 above, an embodiment of the present application provides a method for encoding a low-density parity-check code for a satellite navigation system. In response to obtaining an L1C original telegram data code of a satellite navigation system, a target signal sequence is obtained from the L1C original telegram data code; a check matrix for the low-density parity-check code is obtained; a first check code and a second check code are determined based on the check matrix and the target signal sequence; and an encoding result of the low-density parity-check code is obtained based on the target signal sequence, the first check code, and the second check code. In this way, the encoding of the low-density parity-check code is completed by determining the check code based on the check matrix of the low-density parity-check code and the target signal sequence, which can reduce the complexity of sparse matrix inversion and reduce the hardware resources required for low-density parity-check code encoding.
[0107] As an example, a check matrix H is obtained, the matrix dimension is 6*12, and only positions of 1 are displayed in the check matrix H.
[0108]
[0109] Target signal sequence s = [1 0 1 0 1 1].
[0110] First check digit p1 T =F*s T , F=-E*T -1 *A+C, assuming F=[0 0 1 1 0 0], we can get p1 T =1.
[0111] According to the structural characteristics of the check matrix H, we can obtain the 5*6 dimensional A submatrix and the 1*5 dimensional B submatrix:
[0112]
[0113]
[0114] Calculate y[i]=mod2(A*s T +B*p1), y[i]=[0 1 0 0 0] T .
[0115] Recursive calculation of p2 T , i.e., p2[i], where 1≤i≤5. Based on the characteristics of the T submatrix, we summarize the index table Q. Specifically, for rows where the subdiagonal is missing, the row number minus 1 is filled into the first column, and the second column is 0. For rows where the subdiagonal is missing, the row number minus 1 is filled into the first column. The second column is XORed based on whether the row uses the non-subdiagonal column. If so, it is filled with 1; otherwise, it is filled with 0. The third column is filled with the index number of the non-subdiagonal column to be used.
[0116] Analyze the T submatrix:
[0117]
[0118] If the second row's secondary diagonal is missing, decrement the row number by 1, i.e., "1", and fill in the first column. The second column is "0", and the third column is "0". If the fourth row's secondary diagonal is missing, decrement the row number by 1, i.e., "3", and fill in the first column. The second column is "0", and the third column is "1". If the fifth row's secondary diagonal is missing, decrement the row number by 1, i.e., "4", and fill in the first column. The second column is "1", and the third column is "3". The special index table Q is then:
[0119]
[0120]
[0121] According to the special index table Q and the above steps, p2[i] can be calculated:
[0122] p2[1]=y[1]=0;
[0123] p2[2]=mod2(y[2])=1;
[0124] p2[3]=mod2(y[3]-p2[2])=1;
[0125] p2[4]=mod2(y[4]-p2[1])=0;
[0126] p2[5]=mod2(y[5]-p2[4]-p2[3])=1;
[0127] We get p2 = [0 1 1 0 1].
[0128] Combining s, p1, and p2, the LDPC encoding result is [s, p1, p2], that is, [1 0 1 0 1 11 0 1 10 1], which is 12 bits.
[0129] By adopting the above method, the computational complexity can be reduced while the storage space required can be reduced, thereby improving the efficiency of LDPC coding.
[0130] The above embodiment of the present application provides a coding method based on the low density parity check code of the satellite navigation system. Next, the coding device of the low density parity check code of the satellite navigation system provided in the embodiment of the present application is described. The device performs the above Figure 1 The method shown in FIG. 1 is used to describe the function of the low-density parity check code encoding device for the satellite navigation system. The structural block diagram of the low-density parity check code encoding device for the satellite navigation system is shown in FIG. Figure 8 As shown, including:
[0131] A first acquisition module 801 , a second acquisition module 802 , a determination module 803 and a third acquisition module 804 .
[0132] in,
[0133] A first acquisition module 801 is configured to acquire a target signal sequence from an L1C original message data code in response to acquiring the L1C original message data code of the satellite navigation system;
[0134] A second acquisition module 802 is configured to acquire a check matrix of a low-density parity-check code;
[0135] A determination module 803 is configured to determine a first check code and a second check code based on the check matrix and the target signal sequence;
[0136] The third acquisition module 804 is configured to acquire an encoding result of the low-density parity-check code according to the target signal sequence, the first check code, and the second check code.
[0137] In one possible implementation, the determining module 803 includes:
[0138] An acquisition submodule, configured to acquire submatrices of the check matrix, wherein the submatrices include an A submatrix, a B submatrix, a T submatrix, a C submatrix, a D submatrix, and an E submatrix;
[0139] A first calculation submodule, configured to calculate the first check code according to the A submatrix, the T submatrix, the C submatrix, the E submatrix and the target signal sequence;
[0140] The second calculation submodule is configured to calculate the second check code according to the A submatrix, the B submatrix, the T submatrix and the target signal sequence.
[0141] In one possible implementation, the first calculation submodule is specifically configured to:
[0142] Calculate the F matrix according to the A submatrix, the T submatrix, the C submatrix, and the E submatrix;
[0143] Calculating a first dimension according to the F matrix and the target signal sequence;
[0144] performing a modulo-2 operation on the first dimension to obtain first target data;
[0145] The first target data is determined as the first check code.
[0146] In one possible implementation, the second calculation submodule is specifically configured to:
[0147] Calculate intermediate data according to the A submatrix, the B submatrix, the target signal sequence and the first target data;
[0148] Analyzing the T submatrix, the T submatrix is an approximately bidiagonal lower triangular matrix;
[0149] If only the diagonal and sub-diagonal elements in the rows of the T submatrix are 1, recursively calculate the second dimension based on the intermediate data;
[0150] If the diagonal and sub-diagonal elements in the rows of the T submatrix are 1 and there is an element with a value of 1 to the left of the sub-diagonal; or; the diagonal elements in the rows of the T submatrix are 1, the sub-diagonal elements are 0, and the elements to the left of the sub-diagonal are all 0; or; the diagonal elements in the rows of the T submatrix are 1, the sub-diagonal elements are 0, and there is an element with a value of 1 to the left of the sub-diagonal; or; the diagonal elements in the rows of the T submatrix are 1, the sub-diagonal elements are 0, and there is two elements with a value of 1 to the left of the sub-diagonal, then obtain the paired data according to the table lookup;
[0151] Calculating the second dimension according to the paired data and the intermediate data;
[0152] performing a modulo-2 operation on the second dimension to obtain second target data;
[0153] The second target data is determined as the second check code.
[0154] In one possible implementation, the third obtaining module 804 is specifically configured to:
[0155] The target signal sequence, the first check code, and the second check code are combined to obtain an encoding result of the low-density parity-check code.
[0156] In one possible implementation, the L1C original telegram data code includes a subframe 1 original telegram data code, a subframe 2 original telegram data code, and a subframe 3 original telegram data code, wherein the subframe 2 original telegram data code is a target signal sequence used to encode subframe 2, and the subframe 3 original telegram data code is a target signal sequence used to encode subframe 3.
[0157] In one possible implementation, the second obtaining module 802 is specifically configured to:
[0158] Obtain the check matrix of the low-density parity-check code from the L1C signal interface specification document.
[0159] An embodiment of the present application provides an encoding device for a low-density parity-check code of a satellite navigation system, the device comprising: a first acquisition module, a second acquisition module, a determination module, and a third acquisition module. The first acquisition module is configured to obtain a target signal sequence from the L1C original telegram data code in response to obtaining the satellite navigation system's L1C original telegram data code; the second acquisition module is configured to obtain a check matrix of the low-density parity-check code; the determination module is configured to determine a first check code and a second check code based on the check matrix and the target signal sequence; and the third acquisition module is configured to obtain the encoding result of the low-density parity-check code based on the target signal sequence, the first check code, and the second check code. In this way, the encoding of the low-density parity-check code is completed by determining the check code based on the check matrix of the low-density parity-check code and the target signal sequence, thereby reducing the complexity of sparse matrix inversion and the hardware resources required for encoding the low-density parity-check code.
[0160] Based on the method for encoding a low-density parity-check code for a satellite navigation system provided in the above method embodiment, an embodiment of the present application further provides an encoding device for a low-density parity-check code for a satellite navigation system, including: a processor, a memory, and a system bus;
[0161] The processor and the memory are connected via the system bus;
[0162] The memory is used to store one or more programs, and the one or more programs include instructions. When the instructions are executed by the processor, the processor executes the encoding method of the low-density parity-check code for the satellite navigation system described in any one of the above embodiments.
[0163] Based on the encoding method of the low-density parity-check code of a satellite navigation system provided in the above-mentioned method embodiment, an embodiment of the present application also provides a computer-readable storage medium, which stores instructions. When the instructions are executed on a device, the device executes the encoding method of the low-density parity-check code of the satellite navigation system described in any of the above-mentioned embodiments.
[0164] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple. For relevant parts, refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.
[0165] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0166] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for encoding a low-density parity-check code for a satellite navigation system, characterized in that: The method comprises: In response to acquiring an L1C original message data code of a satellite navigation system, acquiring a target signal sequence from the L1C original message data code; Obtaining a check matrix of a low-density parity-check code; Determine a first check code and a second check code based on the check matrix and the target signal sequence; Obtaining an encoding result of the low-density parity-check code according to the target signal sequence, the first check code, and the second check code; The determining of the first check code and the second check code based on the check matrix and the target signal sequence includes: Obtaining submatrices of the check matrix, the submatrices including an A submatrix, a B submatrix, a T submatrix, a C submatrix, a D submatrix, and an E submatrix; The F matrix is calculated based on the A submatrix, the T submatrix, the C submatrix and the E submatrix, F=-E*T -1 *A+C; calculating a first dimension according to the F matrix and the target signal sequence; performing a modulo 2 operation on the first dimension to obtain first target data; determining the first target data as the first check code; Calculate intermediate data according to the A submatrix, the B submatrix, the target signal sequence and the first target data; Analyzing the T submatrix, the T submatrix is an approximately bidiagonal lower triangular matrix; If only the diagonal and sub-diagonal elements in the rows of the T submatrix are 1, recursively calculate the second dimension based on the intermediate data; If the diagonal and sub-diagonal elements in the rows of the T submatrix are 1 and there is an element with a value of 1 to the left of the sub-diagonal; or; the diagonal elements in the rows of the T submatrix are 1, the sub-diagonal elements are 0, and the elements to the left of the sub-diagonal are all 0; or; the diagonal elements in the rows of the T submatrix are 1, the sub-diagonal elements are 0, and there is an element with a value of 1 to the left of the sub-diagonal; or; the diagonal elements in the rows of the T submatrix are 1, the sub-diagonal elements are 0, and there is two elements with a value of 1 to the left of the sub-diagonal, then obtain the paired data according to the table lookup; Calculating the second dimension according to the paired data and the intermediate data; performing a modulo-2 operation on the second dimension to obtain second target data; The second target data is determined as the second check code.
2. The method according to claim 1, characterized in that The obtaining the encoding result of the low-density parity-check code according to the target signal sequence, the first check code, and the second check code includes: The target signal sequence, the first check code, and the second check code are combined to obtain an encoding result of the low-density parity-check code.
3. The method according to claim 1, characterized in that The L1C original telegram data code includes the subframe 1 original telegram data code, the subframe 2 original telegram data code and the subframe 3 original telegram data code. The subframe 2 original telegram data code is the target signal sequence used to encode subframe 2, and the subframe 3 original telegram data code is the target signal sequence used to encode subframe 3.
4. The method according to claim 1, wherein The obtaining of a check matrix of a low-density parity-check code includes: Obtain the check matrix of the low-density parity-check code from the L1C signal interface specification document.
5. A low-density parity-check code encoding device for a satellite navigation system, characterized in that: The device comprises: a first acquisition module, configured to acquire a target signal sequence from an L1C original message data code in response to acquiring an L1C original message data code of a satellite navigation system; A second acquisition module is used to obtain a check matrix of a low-density parity-check code; a determination module, configured to determine a first check code and a second check code based on the check matrix and the target signal sequence; a third acquisition module, configured to acquire an encoding result of the low-density parity-check code according to the target signal sequence, the first check code, and the second check code; The determination module includes: An acquisition submodule, configured to acquire submatrices of the check matrix, wherein the submatrices include an A submatrix, a B submatrix, a T submatrix, a C submatrix, a D submatrix, and an E submatrix; The first calculation submodule is used to calculate the F matrix based on the A submatrix, the T submatrix, the C submatrix and the E submatrix, F=-E*T -1 *A+C; calculating a first dimension according to the F matrix and the target signal sequence; performing a modulo 2 operation on the first dimension to obtain first target data; determining the first target data as the first check code; The second calculation submodule is used to calculate the intermediate data according to the A submatrix, the B submatrix, the target signal sequence and the first target data; analyze the T submatrix, which is an approximately double-diagonal lower triangular matrix; if only the diagonal and subdiagonal elements in the row of the T submatrix are 1, then recursively calculate the second dimension according to the intermediate data; if the diagonal and subdiagonal elements in the row of the T submatrix are 1 and there is an element with a value of 1 on the left side of the subdiagonal; or; the diagonal elements in the row of the T submatrix are 1, and the elements on the subdiagonal are is 0 and the elements on the left of the subdiagonal are all 0; or; the diagonal elements in the rows of the T submatrix are 1, the elements on the subdiagonal are 0, and there is one element on the left of the subdiagonal with a value of 1; or; the diagonal elements in the rows of the T submatrix are 1, the elements on the subdiagonal are 0, and there are two elements on the left of the subdiagonal with a value of 1, then obtaining pairing data according to a table lookup; calculating the second dimension according to the pairing data and the intermediate data; performing a modulo 2 operation on the second dimension to obtain second target data; and determining the second target data as the second check code.
6. A low-density parity-check code encoding device for a satellite navigation system, characterized in that: include: Processor, memory, system bus; The processor and the memory are connected via the system bus; The memory is used to store one or more programs, and the one or more programs include instructions. When the instructions are executed by the processor, the processor executes the encoding method of the low-density parity-check code for the satellite navigation system according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed on a device, the device executes the encoding method for low-density parity-check codes for satellite navigation systems according to any one of claims 1 to 4.
Citation Information
Patent Citations
Encoding and decoding techniques using low-density parity check codes
CN103534952A
Construction method of LDPC check matrix for navigation signals
CN103731158A
Code rate-compatible 5G LDPC encoding method with low complexity, and encoder
CN109379086A