The approach described here relates to solutions for error processing, comprising, e.g., the detection and/or correction of errors.
An object of the invention consists in avoiding disadvantages of known solutions for correcting errors, and in particular enabling an efficient correction of errors.
This object is achieved in accordance with the features of the Independent claims. Preferred embodiments can be gathered from the dependent claims, in particular.
These examples proposed herein can be based on at least one of the following solutions. In particular, combinations of the following features can be used to achieve a desired result. The features of the method can be combined with (an) arbitrary feature(s) of the device or of the circuit, or vice versa.
In order to achieve the object, a method for error correction is specified,
The data word can be arbitrary information, for example a predefined number of bits or bytes.
In one development, no correction is effected if the fact that no error was detected was determined on the basis of the result of the syndrome calculation.
In one development, the matrix M used for the syndrome calculation has the following properties:
In one development, the matrix M used for the syndrome calculation is determined on the basis of the matrix H of the code as follows:
In one development,
In one development, the linear mapping is based on the inverse matrix J-1.
In one development, the matrix J-1 is determined such that it has the fewest possible ones per row.
Furthermore, a device for error correction is proposed, comprising a processing unit, configured for carrying out the following steps:
The processing unit mentioned here can be embodied in particular as a processor unit and/or an at least partly hardwired or logical circuit arrangement which is configured for example in such a way that the method as described herein is able to be carried out. Said processing unit can be or comprise any kind of processor or computer with appropriately required peripherals (memory, input/output interfaces, input-output devices, etc.).
The above explanations concerning the method apply, mutatis mutandis, to the device. The respective device can be implemented in one component or in a manner distributed among a plurality of components.
In one development, the device and/or the processing unit are/is configured such that no correction is effected if the fact that no error was detected was determined on the basis of the result of the syndrome calculation.
In one development, the matrix M used for the syndrome calculation has the following properties:
In one development, the matrix M used for the syndrome calculation is determined on the basis of the matrix H of the code as follows:
In one development, the device and/or the processing unit are/is furthermore configured for
In one development, the device and/or the processing unit are/is configured such that the linear mapping is based on the Inverse matrix J-1.
In one development, the device and/or the processing unit are/is configured such that the matrix J-1 is determined such that it has the fewest possible ones per row.
Additionally, solutions described herein can take account of or comprise the following approaches: a method for error correction,
The code domain is determined for example by a vector space of the code. The code is preferably an error detecting and/or error correcting code. The first code has an efficient error correction algorithm. Preferably, the first code is a code for which such an efficient error correction algorithm is known. By way of example, the first code is one of the following codes: a Hamming code, a BCH code, a Reed-Muller code, a Simplex code, a Golay code or a Goppa code.
Changing between the code domains makes it possible to carry out the syndrome calculation more efficiently in the code domain of the second code and nevertheless to be able to use the efficient error correction algorithm of the first code (after changing back to the code domain thereof).
In one development, between the syndrome calculation and carrying out the efficient error correction algorithm, a transition between the code domains is carried out by means of at least one linear mapping.
In one development,
In one development,
In one development,
In one development, the matrix K is a check matrix comprising a unit matrix.
In one development, the first linear mapping comprises a permutation.
In one development, no correction is effected if the fact that no error was detected was determined on the basis of the result of the syndrome calculation.
An exemplary device for error correction can comprise a processing unit configured for carrying out the method described herein.
Moreover, a computer program product is proposed which is directly loadable into a memory of a digital computer, comprising program code parts suitable for carrying out steps of this method.
Furthermore, the problem mentioned above is solved by means of a computer-readable storage medium, e.g., of an arbitrary memory, comprising instructions (e.g., in the form of program code) which are executable by a computer and which are suitable for the purpose of the computer carrying out steps of the method described here.
The above-described properties, features and advantages of this invention and the way in which they are achieved are described below in association with a schematic description of exemplary embodiments which are explained in greater detail in association with the drawings. In this case, identical or identically acting elements may be provided with identical reference signs for the sake of clarity.
Each binary r×nmatrix H of rank r defines a binary linear code C having the length n and the dimension k=n-r. This code is the null space of the matrix H, i.e.
with
The matrix H is called the check matrix of the code C. The code C is uniquely defined by the check matrix H. The code is an error detecting and/or error correcting code, for example.
A weight (Hamming weight) w(
The smallest weight of all vectors
A linear code having the length n, the dimension k and the minimum distance d is designated as (n, k, d) code.
With a code having the minimum distance d, in principle all t-bit errors are correctable, where the following holds true: 0 ≤ t < d / 2 .
In this case, correctable means, in particular, that the t error positions in the received erroneous code word are uniquely determined. These error positions are not calculable here in all cases (in particular within a predefined time duration).
The error positions are determinable within a predefined time duration only if an efficient error correction algorithm is known for the present code. This is the case for very few linear codes. Codes which have an efficient error correction algorithm are, e.g., the following codes: Hamming code, BCH code, Reed-Muller code, simplex code, Golay code, Goppa code.
In practice, e.g., on computer chips, use is made of codes having an efficient error correction algorithm.
Example 1: Consider a linear code having the length n = 100 with a minimum distance d = 21. A 10-bit error occurs during data transmission. No efficient error correction algorithm is known for the code. In order to determine the error, all
possible error patterns have to be tried out. The syndrome is equal to zero for exactly one error pattern: this error pattern corresponds to the 10-bit error that has occurred. For all other error patterns, the syndrome is not equal to zero. Therefore, approximately 17 billion syndrome calculations are required to determine the 10-bit error.
Example 2: The simplex code having a length n = 127 has a minimum distance d = 64. There is an efficient error correction algorithm for this code. A 30-bit error occurs during data transmission. The error correction algorithm (implemented in hardware as an electronic circuit comprising 120 flip-flops and XOR and majority gates) allows the 30-bit error to be determined in 127 clock cycles of a processor unit (CPU). The error correction requires only a single syndrome calculation for the initialization of the circuit.
Most error correction algorithms require a syndrome vector (also referred to as syndrome) as input. The syndrome vector is calculated from the received data word with the aid of the check matrix H.
If
If no error has occurred during transmission (or during storage), i.e., if
A code word
If the syndrome is equal to zero, then the procedure branches to a step 105; the received data word is identical to the transmitted code word (
If the syndrome is not equal to zero, then the procedure branches from step 104 to a step 106: since the received data word is different than the transmitted code word (
The error correction algorithm calculates error positions from the syndrome vector S(
being calculated, where “⊕” corresponds to an exclusive-OR operation. This results in a corrected code word
which is assumed to be identical to the transmitted code word
The syndrome calculation is preferably always performed, whereas the error correction is only required if the syndrome is not equal to zero.
Example 3: A two-error-correcting code having the length n = 40 with a minimum distance d = 5 is assumed by way of example. 100000 code words are transmitted. A bit error probability is p = 0.001. Consequently, on average approximately 96000 code words are transmitted without errors. In the case of approximately 4000 code words, a 1-bit error or a 2-bit error occurs during transmission, these being corrected automatically. Just a single transmission involves the occurrence of a multi-bit error (i.e., three or more bits are erroneous) in the transmitted code word. Consequently, on average one of the 100 000 received data words cannot be corrected. In 96% of the cases the syndrome is equal to zero and no error correction is necessary. In 4% of the cases the syndrome is not equal to zero and it is only then that the error correction algorithm Is required.
Since the syndrome calculation is always carried out, but the error correction is only carried out sometimes, it is expedient to implement the syndrome calculation efficiently. In this way the computation duration is shortened and the power consumption of the decoder is reduced.
Check matrices of the form
enable an efficient syndrome calculation, for example by means of software. In this case, I represents the unit matrix.
The columns of the unit matrix I are unit vectors, i.e., vectors having only a single one and otherwise all zeroes. The canonical matrix is thus sparsely populated, i.e., it contains relatively few ones overall.
If the check matrix K is used for the syndrome calculation, i.e., a column vector
is calculated and used as syndrome, then for the calculation of the coordinates zi of the syndrome
only few coordinates yj of the vector
Consequently, in the case of a hardware implementation, the logical depth of a circuit for calculating the coordinates of the syndrome with the use of the sparsely populated matrix K is smaller than in the case of the syndrome calculation using a more densely populated matrix.
The syndrome calculation by means of such a canonical matrix K is advantageous in the case of a software implementation of the code as well: the (n-k)×(n-k) unit matrix I at the foremost position in the check matrix K= (I,A) has the effect that in the syndrome calculation initially only the last k coordinates yj of the vector
is added to this column vector in order to obtain the syndrome Z(
For i = 1,..., n-k the output but zi is at the same place as the corresponding input bit yi. This is advantageous for the programming since, for example, the programming languages C or C++ process data word by word: the bitwise addition of the two column vectors can thus be effected by means of a single instruction.
Example 4: Consider the following canonical check matrix by way of example:
K is the canonical check matrix of a 1-bit-error-correcting linear code having the length n = 7 and the dimension k = 3. The syndrome of
results as follows:
(end of example 4)
The check matrix H of a linear (n,k,d) code C is not uniquely determined. If J is an invertible (n-k)×(n-k) matrix, then
is likewise a check matrix of the code: the matrices H and H∗ have the same null space and the code is by definition identical to this vector space. A linear code C therefore has a plurality of different check matrices.
If the linear code Chas an efficient error correction algorithm which calculates the error vector
It is only for codes from the simplex family and for the first-order Reed-Muller code that the specific check matrix is already canonical, i.e., in the form (I,A).
In order to improve the efficiency of the syndrome calculation, it is desirable to use a canonical matrix for the syndrome calculation. However, the efficient error correction algorithm demands that the syndrome be calculated with the associated specific check matrix.
Let Hbe an r×nmatrix of rank r. A canonical r×n matrix can be determined from this matrix H by carrying out elementary row transformations for the rows of the matrix H. Elementary row transformations correspond to a permutation of rows of the matrix H and a bitwise addition in the Galois field GF(2) of one matrix row to another. Furthermore, columns of the matrix H can be permuted among one another.
By means of a finite number of such operations, a matrix Kof the type (I,A) is determined from the matrix H. In principle, any matrix H having a full rank can be transformed into a canonical matrix.
Carrying out elementary row transformations is equivalent to multiplying the matrix H from the left by an invertible r×r matrix A. The permutation of columns of the matrix H is equivalent to multiplying the matrix H from the right by an n×n permutation matrix B.
A permutation matrix is a matrix which has exactly a single one and otherwise only zeroes in each of its rows and in each of its columns.
There are, then, an invertible r×r matrix A and an n×n permutation matrix B, such that
holds true, the resulting matrix Khaving the canonical form. Consequently, the canonical matrix K is determined from the matrix H on the basis of the two matrices A and B.
The matrices A and B are both invertible. The inverse matrices are designated hereinafter by L and P, respectively, in accordance with the relationships:
Since B is a permutation matrix, the inverse matrix Pis also a permutation matrix.
Equation (9) is thus equivalent to
The vector
If it is then the case that the dimension k-n-r, the matrix H having r=n-k rows and n columns has the rank r = n - k. This means that the null space of the matrix H is a linear (n, k, d) code C and the matrix H is a check matrix for the code C.
The left-hand side of equation (11) corresponds, in accordance with equation (1), to the syndrome S(
The right-hand side of equation (11) contains the vector P
In the case of a realization in hardware, a mapping
in the form of a redistribution can advantageously be implemented (largely) cost-neutrally.
Example 5: Consider a permutation matrix
and a vector
What follows therefrom is:
Equation (11) can be formulated with equation (12) as follows:
The left-hand side of equation (14) contains the syndrome S(
It is thus evident that the two syndromes S:=S(
Owing to the permuted matrix columns in the course of deriving the matrix Kfrom the matrix H, the matrix Kis not a check matrix for the original code C. Instead the matrix K defines a new code C.
The old code C and the new code C have the same parameters n, k and d and the same weight distribution. However, they determine different vector spaces (also referred to as code domains): a code word of the code C is not necessarily also a code word of the code C. The calculations of the syndromes Sand Z thus relate to different codes.
1. For the first code C there is an efficient error correction algorithm which is based on properties of a specific check matrix H and requires the syndrome H·
A message
This code word
2. Derivation of the canonical matrix:
3. Redistribution:
4. Fast syndrome calculation 304:
5. Linear transformation 305:
6. Error vector calculation 306:
By means of the error correction algorithm, on the basis of the syndrome vector S, an error vector
7. Error correction:
On the basis of the error vector
Since most arriving data words
In step 4. the syndrome calculation is effected. The time required for this has a crucial effect on the overall performance of the solution presented here.
It should additionally be noted that the syndrome calculation 304 is effected in the code domain 302 of the second code, i.e., after the transition 303 (the transformation by means of P), using the matrix K. This replaces a syndrome calculation without transformation (i.e., within the code domain 301 of the first code) by means of the matrix H(not Illustrated in
An alternative solution is described below. The same prerequisites initially hold true: for a first linear (n,k,d) code there is an efficient error correction algorithm which is associated with a specific check matrix H.
For correction purposes, the error correction algorithm requires as an input the syndrome S(
From the matrix H, an equivalent matrix K of the form K-(I,A)can be determined. In this case, “equivalent” means that invertible square matrices L and Pof appropriate size exist such that the following holds true in accordance with equation (10):
In this case, the matrix P is the permutation matrix.
If the matrix P Is not itself the unit matrix, then the matrices Hand K define different codes. These codes are equivalent to one another since the code words of one code emerge from the code words of the other code by rearrangement according to a fixed specification.
Considered as vector spaces, however, they are two different codes. The first code is the null space of the matrix H and the second code is the null space of the matrix K.
In this alternative solution, the message coding is effected by means of the second code, i.e., the code associated with the canonical check matrix K. That has the following advantages, in particular:
1. The coding of the message having a length of k-bits, in the present case as a vector
can be carried out with the aid of the generator matrix G belonging to the canonical matrix K. This coding is also designated by K coding.
The generator matrix G has the form G=(I,B) with the k×k unit matrix l. The matrix K has the form K-(I,A) with the (n-k)×(n-k) unit matrix l. Consequently, the generator matrix G is likewise a canonical matrix.
The following holds true for the matrices Gand K:
where 0 here denotes the k×(n-k) zero matrix (all matrix entries are zero).
The coding of the message
Since the generator matrix G is canonical, the code word
The code word
Consequently, in the second code (i.e., the null space of the canonical matrix K) both the syndrome calculation and the coding can be performed more efficiently than in the first code (i.e., the null space of the error correction matrix H).
2.
The alternative solution described in the present case departs from this: the received data word
By contrast, if the K syndrome Z is not equal to zero, then it is linearly transformed using the square matrix L The transformed syndrome
is fed in the error correction algorithm of the first code, which calculates an error vector
In the code domain 302, a K coding 401 of the message vector
The syndrome Z(
If Z=0, i.e., the K syndrome is zero, then
If Z≠0, i.e., the K syndrome is not equal to zero, then
which brings about a transition from the code domain 302 to the code domain 301.
By means of an error correction algorithm 405 of the code domain 301, the error vector
As a result, the permutation of the solution shown in
A matrix M which can for example be implemented in hardware and is used for the syndrome calculation is intended to have the following properties:
Property (A) is important because the logical depth for the calculation of the individual syndrome coordinates is thus as small as possible. The smaller the logical depth of a circuit, the faster this circuit can be clocked.
Property (B) is important because fewer ones in the matrix means that the matrix can be implemented with a smaller number of XOR gates, which necessitates a smaller semiconductor area.
Consider a matrix H having r×n elements, which is a specific check matrix with respect to an error correction algorithm used. The error correction algorithm requires as input the syndrome S(
With an arbitrary invertible r × r matrix J, a matrix
is also a check matrix for the code.
If all possble invertible binary r×r matrices J are inserted in equation (16) (which leads to a very large number even for low values of r), then the matrix M runs through all existing check matrices of the code (which is defined by the matrix H). These check matrices include matrices having the properties (A) and (B).
If equation (16) is multiplied by an inverse matrix J-1 on both sides, it follows that:
If equation (17) is multiplied by
The right-hand side of equation (18) contains the H syndrome
The left-hand side of equation (18) contains the syndrome M·
The inverse matrix J-1 can be used by way of example in a hardware implementation which does not require the matrix J.
By way of example, the matrix J-1 is designated by F. i.e., F =J-1.
It is advantageous that the matrix J-1 contains the smallest possible number of ones per row. Therefore, a third property for an efficient syndrome calculation in hardware reads as follows:
(C) The inverse matrix J-1 with respect to the matrix J in accordance with equation (16) is intended to contain the fewest possible ones per row.
On the basis of the received data word
If W=0, i.e., the M syndrome is zero, then
If W≠0, i.e., the M syndrome is not equal to zero, then
On the basis of an error correction algorithm 504, an error vector
An example of the hardware-optimized determination of the matrices M and J-1 is given below.
Let
1. (In particular) all 2r-1 non-trivial linear combinations
of the r row vectors are determined.
2. The Hamming weight of each linear combination is calculated and the linear combinations are sorted according to ascending Hamming weight: at the beginning of the list there are the linear combinations having the Hamming weight 1 (if there are any), followed then by the linear combinations having the Hamming weight 2, etc.
Linear combinations having the same Hamming weight can be combined in groups. The arrangement of the linear combinations within a group can be chosen freely or according to a predefined scheme.
3. A linear combination
is selected from the first group. The row vector
4. If present, a linear combination
corresponds to the second row of the matrix M and (b1,...,bn) defines the second row of the matrix J.
5. A linear combination
determines the third row of the matrix M and (c1,...,cr) defines the third row of the matrix J.
6. The method is continued accordingly until all r rows of the check matrix M and the associated r rows of the matrix J have been determined.
This approach yields a hardware-optimized check matrix M. In this case, the matrix M is not uniquely determined; there are a large number of such optimized matrices. When selecting a linear combination from a group, there are a plurality of possibilities that lead to different optimized solutions. Each of the optimized check matrices H has the two properties (A)and (B).
The different possibilities for choosing the linear combinations from a respective group ultimately lead to different results for the generated matrices Mand J. This results in different inverse matrices J-1. In order to find an efficient form for the matrix J-1, a plurality of (or all) possibilities for choosing the linear combinations in the respective groups can be tried one after another. Each individual choice made yields a pair of matrices (J,M). By way of example, that inverse matrix J-1 having the fewest ones per row can be used. The property (C) is fulfilled in this way.
The following matrix H indicated by way of example is the check matrix of a 2-error-correcting linear code having the length n= 15, the dimension k=7 and having the minimum distance d= 5.
The columns of the matrix H are defined by the Boolean function
For j = 1,...,15 the j-th column of the matrix H is created in accordance with the following specification:
The j-th matrix column is then given by
The representability of the columns of the check matrix H by a uniform formula results in an efficient error correction algorithm with fast 1-bit-error correction (comparable with the duration for a single syndrome calculation) and an accelerated 2-bit-error correction (computation duration corresponds approximately to that of 15 syndrome calculations). The error correction algorithm acquires as input the following syndrome having a length of eight bits and defined by the check matrix H,
where
The matrix H is transformed into the canonical matrix K. For this purpose, the column vectors at the positions 3,4,5,6,7,8 and 9 are resorted according to the permutation
Afterward, a few elementary row operations are performed, such that the 8×8 unit matrix arises at the beginning of the new matrix. In this case, an invertible 8×8 matrix L is obtained as a biproduct. The canonical matrix K results as:
There is the following relationship between the matrices H and K:
where P is a 15 × 15 permutation matrix that represents the above permutation σ in matrix form. The matrices L and P are given by:
and
The canonical matrix K is used for the syndrome calculation. For this purpose, firstly the received data word
where
On the basis of the canonical matrix K, the syndrome
is determined. The syndrome calculation with the aid of the matrix K is able to be carried outin software more efficiently than with the use of the matrix H because the matrix K has the unit matrix I8 (8×8 unit matrix) at the beginning.
If the syndrome Z calculated using the matrix K for the vector
is equal to zero and the received data word
Otherwise, the linear transformation L is applied to the syndrome Z, resulting in the syndrome
for the error vector calculation to be carried out.
A check matrix M that is efficient in the case of a hardware implementation of the code for the syndrome calculation is determined as follows, for example:
The matrix M contains 4 ones in each row, whereas the matrix H has rows having eight ones. The logical depth in the case of the calculation of the syndrome components with the matrix M is two.
By way of example, the first syndrome component w1 of the M-syndrome results in accordance with
whereas the first syndrome component s1 of the H-syndrome is determined in accordance with
On account of the smaller logical depth, the syndrome calculation with the aid of the matrix M can be clocked more highly than the syndrome calculation with the aid of the matrix H.
The matrix M contains a total of 32 ones, whereas the matrix H has 48 ones. The implementation costs (i.e., the number of gates) for the matrix M thus turn out to be ⅔ of the implementation costs for the matrix H.
If the syndrome is calculated with the matrix M, it has to be transformed by way of the linear transformation F into the syndrome H ·
where the linear transformation is determined by the matrix
The matrices M and F were determined using the algorithm indicated above; the columns of the matrix H were not permuted in the process. Therefore, the matrices H and M define the same code vector space (which is simultaneously the null space of the matrix H and the null space of the matrix M) and no permutation (redistribution) is required.
Number | Date | Country | Kind |
---|---|---|---|
102022111624.7 | May 2022 | DE | national |