13.2 RS encoding and error correction algorithms

Source: Internet
Author: User
13.2 RS encoding and error correction algorithms

13.2.1. GF (2M) Domain

RS (Reed-Solomon) code is computed in galois field (GF). Therefore, before introducing the RS code, we will briefly introduce galoon.

CD-ROM data, address, verification code and so on can be considered to belong to GF (2M) = Element or symbol in GF (28. GF (28) indicates that the domain contains 256 elements, and the 254 elements except 0 and 1 are derived from the original polynomial.P(X. The feature of the primitive polynomial is that the remainder formula is equal to 0. The CD-ROM used to construct the GF (28) domain is

(13-1)
The original element in the GF (28) field is

Alpha = (0 0 0 0 0 1 0)

The following is a simple example of domain construction.

[Example: 13.1]Assume that the original polynomial of the GF (23) domain is

α is defined as the root of = 0, that is

Alpha 3 + Alpha + 1 = 0
And α 3 = α + 1

The elements in GF (23) can be calculated as follows:

 

0

MoD (Alpha 3 + α + 1) = 0

α 0

MoD (α 3 + α + 1) = α 0 = 1

α 1

MoD (α 3 + α + 1) = α 1

α 2

MoD (α 3 + α + 1) = α 2

α 3

MoD (α 3 + α + 1) = α + 1

α 4

MoD (α 3 + α + 1) = α 2 + α

α 5

MoD (α 3 + α + 1) = α 2 + α 1 + 1

Alpha 6

MoD (α 3 + α + 1) = α 2 + 1

Alpha 7

MoD (Alpha 3 + Alpha + 1) = Alpha 0

α 8

MoD (α 3 + α + 1) = α 1

......

 

Use the binary number to represent the domain elements.

Table 13-01 comparison between the GF (23) domain and binary code,

 

GF (23) domain Element

Binary pair code

0

(000)

α 0

(001)

α 1

(010)

α 2

(100)

α 3

(011)

α 4

(110)

α 5

(111)

Alpha 6

(101)

In this way, the one-to-one correspondence between elements in the GF (23) domain and three-bit binary numbers is established. The same method can be used to establish a one-to-one correspondence between the 256 elements in the GF (28) field and the 8-bit binary number. During the error correction coding operation, addition, subtraction, multiplication, and Division operations are performed in the galohua domain. The following uses operations in the GF (23) domain as an example:

Add legislation: Alpha 0 + Alpha 3 = 001 + 011

= 010 = α 1

Subtraction example: Same as Addition

Multiplication example: α 5 · α 4 = α (5 + 4) mod7

= α 2

Division example: α 5/α 3 = α 2

Alpha 3/Alpha 5 = alpha-2

= α (-2 + 7)

= Alpha 5

Logarithm: log (α 5) = 5

The results of these operations are still in the GF (23) domain.

13.2.2 RS encoding algorithm

The RS encoding is the remainder of the calculation Information Code character polynomial divided by the Verification code generated polynomial.

You need to describe some symbols before the introduction. In GF (2M) Domain, symbol (N,K) The meaning of RS is as follows:

 

M

Indicates the size of a symbol. For example, M = 8 indicates that the symbol consists of eight binary numbers.

N

Length of the block,

K

Length of information in the block

K = n-k = 2 t

Indicates the number of characters in the verification code.

T

Indicates the number of errors that can be corrected.

For example, (28, 24) the RS code represents a total of 28 characters in length of the block. The length of the Information Code is 24, and the verification code has four inspection symbols. In this Code block consisting of 28 symbols, two scattered or two consecutive symbol errors can be corrected in the code block, however, three or more symbol errors cannot be corrected.

For an Information Code Symbol polynomial, the general form of the RS verification code generated polynomial is

(13-2)
In formula, M0 is the offset, usually take K0 = 0 or K0 = 1, while (N-k) ≥2T(TNumber of error symbols to be corrected ).

The following two examples describe the encoding principles of the RS code.

[Example: 13.2]The table corresponding to the elements in the GF (23) field is shown in Table 13-01. Assume that the four information symbols in the (6, 4) RS code are m3, M2, M1, and M0, And the polynomial of the Information Code Symbol is

(13-3)
Assume that the two symbols of the RS verification code are Q1 and q0, and the remainder polynomial is


The order of this polynomial is less than the order.

If K0 = 1,T= 1. The polynomial generated by the RS Verification Code derived from formula (13-2) is

= (13-4)
According to the polynomial operation, the formula (13-3) and formula (13-4) can obtain

M3X5 + m2X4 + M1X3 + M0X2 + Q1X+ Q0 = (X-α )(X-α 2)Q(X)

When usingX= α andX= When the 2nd generation is in the upper formula, the following equations are obtained,

After sorting, we can obtain the validation equation of the (6, 4) RS code represented by a matrix:

You can obtain the verification symbol after solving the equations:

When reading data, the school administrator can calculate as follows:

 

[Example: 13.3]In Example 13.2, if K0 = 0,T= 1. The polynomial generated by the RS Verification Code derived from formula (13-2) is

= (13-5)
According to the polynomial operation, the following equations can be obtained from (13-3) and (13-5:


α in EquationIIt can also be viewed as the position of a symbol.I= 0, 1 ,..., 5.

After solving the equations, we can obtain two symbols of the RS verification code: Q1 and q0,

(13-6)

Assume thatMiIs the following value:

 

Information symbol

M3 = α 0 = 001

M2 = α 6 = 101

M1 = α 3 = 011

M0 = α 2 = 100

Verification symbol

Q1 = Alpha 6 = 101

Q0 = α 4 = 110

School Administrator

S0 = 0

S1 = 0

You can obtain the verification symbol by using the formula 13-6:

Q1 = Alpha 6 = 101

Q0 = α 4 = 110

13.2.3 RS code Correction Algorithm

The error correction process of the RS code is divided into three steps: (1) Calculation of syndrome, (2) Calculation of the error location, and (3) Calculation of the error value. This section uses example 13.3 as an example to introduce the RS code correction algorithm.

The school administrator uses the following equations for calculation:

For the sake of simplicity, it is assumed that the information symbols m3, M2, M1, m0 and the resulting verification symbols Q1 and q0 are both 0, the reading symbols are mm3', m2', m1', m1', q0' and q0 ′.

If the calculated S0 and S1 values are not all 0, there is an error, but you do not know how many errors there are, and where the error is located and the error value. If there is only one error, the problem is simple. Assume that the error location is α.XThe error value is M.X, You can solve the following equations:

The location and value of the error.

If S0 = α 2 and S1 = α 5 are calculated, α can be obtained.X= α 3 and mX= α 2 indicates that M1 has an error. Its error value is α 2. M1 = m1 '+ m after correctionXIn this example, M1 = 0.

If S0 = 0 and S1 = 0 are calculated, we can conclude that there are at least two errors. Of course, more than two errors may not be S0 = 0 and S1 = 0. If two errors occur and you can locate them, you can correct them. If two errors and their locations are known, then solve the equations:

You can see the two error values.

Error Correction Codes in CD-ROM CIRC and reed-solommon product codes (REEDSOlomonPRoduct-LIkeCOde, RSPC) is exported using the above method.

Turn: http://wmct.blog.sohu.com/52759669.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.