chapter 7 reed-solomon code - الصفحات...

16
١ ١ Chapter Chapter 7 Reed Reed-Solomon Code Solomon Code Ammar Abu-Hudrouss Islamic University Gaza Spring 2009 Slide ٢ Channel Coding Theory Introduction A Reed Solomon code is a special case of a BCH code in which the length of the code is one less than the size of the field over which the symbols are defined. It consists of sequences of length q — 1 whose roots include 2t consecutive powers of the primitive element of GF(q). The Fourier transform over GF(q) will contain 2t consecutive zeros. Note that because both the roots and the symbols are specified in GF(q), the generator polynomial will have only the specified roots; (NO Conjugates)

Upload: lamthien

Post on 15-Apr-2019

220 views

Category:

Documents


0 download

TRANSCRIPT

١

١

Chapter Chapter 77

ReedReed--Solomon CodeSolomon Code

Ammar Abu-Hudrouss Islamic University Gaza

Spring 2009

Slide ٢Channel Coding Theory

Introduction

A Reed Solomon code is a special case of a BCH code in which the length of the code is one less than the size of the field over which the symbols are defined.

It consists of sequences of length q — 1 whose roots include 2t consecutive powers of the primitive element of GF(q).

The Fourier transform over GF(q) will contain 2t consecutive zeros.

Note that because both the roots and the symbols are specified in GF(q), the generator polynomial will have only the specified roots; (NO Conjugates)

٢

Slide ٣Channel Coding Theory

Introduction

To construct the generator for a Reed Solomon code, and we decide that the roots will be from i to i+2t-1, the generator polynomial will be

Example: Suppose we wish to construct a double-error correcting, length 7 RS code; we first construct GF(8) using the primitive polynomial X3 + X + 1 as shown. We decide to choose i = 0, placing the roots from 0 to 3. The generator polynomial is

12221 titiii XXXXxg

3210 XXXXxg 6525324 XXXXxg

Slide ٤Channel Coding Theory

Time Domain Encoding

The encoding of a Reed Solomon code can be done by a long division method similar to that of Chapter 4

Example For the Reed Solomon code above, encode the data sequence

111001111.

The data maps to the symbols 5 0 5.

Four zeros are appended, corresponding to the four parity checks to be generated, and the divisor is the generator sequence.

٣

Slide ٥Channel Coding Theory

Time Domain Encoding

The remainder is 6 5 0 1 so that the codeword is 5 0 5 6 5 0 1 . Expressed as a binary

sequence this is 11101111101111001010.

Slide ٦Channel Coding Theory

Time Domain Encoding

The encoder circuit for a Reed Solomon code is shown

+

U(X)

g1

++ +

g2gn-k-1g0

٤

Slide ٧Channel Coding Theory

Time Domain Encoding

For our example the encoder will be

+

U(X)

5

++ +

52 6

Slide ٨Channel Coding Theory

Decoding Reed Solomon Code

The frequency domain algebraic decoding method explained in Chapter 6.

Error value calculation can be done using the Forney algorithm. Where we found that

Where (z) is the connection polynomial, E (z) is syndrome in frequency domain and (z) is t - 1 order evaluator polynomial

1202 tkzzzfzEzA t

٥

Slide ٩Channel Coding Theory

Decoding Reed Solomon Code

We calculate the error evaluator polynomial and also '(z), the formal derivative of the connection polynomial. This is found to be

In other words, get rid of the zero coefficient of A and then set all the odd terms in the resulting series to zero.

The error value in position m is now

evaluated at z = m. The parameter i is the starting location of the roots of the generator polynomial.

14

32

1even

t

tt

t zzt

13

21odd

t

tt

t zzt

zzze im '/ 1

Slide ١٠Channel Coding Theory

Decoding Reed Solomon Code

Example Consider the codeword 5 0 5 6 5 0 1 previously generated for the double-error correcting (7, 3) RS code. We create errors in positions 5 and 3, assuming that we receive 5 4 5 3 5 0 1 . The frequency domain syndrome of this sequence is

010535450 S

11025334554651 ...... S

012045631534552 ...... S

0...... 13065235514453 S

٦

Slide ١١Channel Coding Theory

Decoding Reed Solomon Code

Now we form the key equation for which the solution is

Which leads to

And the connection polynomial is

The roots for the connection polynomial is 4 and 2

001

12

0 01

02

1

21 1

2

01221 zzz

Slide ١٢Channel Coding Theory

Decoding Reed Solomon Code

Having found two roots for a connection polynomial of degree 2 indicates successful error correction with errors located at positions -4 and -2, i.e. positions 3 and 5. We now calculate the error evaluator polynomial, taking the powers from 0 to t — 1 of S(z)A(z).

Therefore

Evaluating at m = 3 and 5

000110 SzSSz

04 zz

mm zz

m zz

zzze

2

04

'

٧

Slide ١٣Channel Coding Theory

Decoding Reed Solomon Code

This leads to

The received symbol 3 at position 3 is therefore corrected to 6. The received symbol 4 at position 5 is corrected to 0. This successfully completes the decoding.

432

034

3

e

552

054

5

e

Slide ١٤Channel Coding Theory

Frequency domain encoding of RS Code

As the Fourier transform of a Reed Solomon code word contains n — k consecutive zeros, it is possible to encode by considering the information to be a frequency domain vector, appending the appropriate zeros and inverse transforming.

Example We will choose again a (7, 3) double-error correcting RS code

over GF(23). Let the information be 2, 5, 0

The frequency domain code word is 2500000, and the inverse is 5056501

We now create a two-symbol error, say 5 in position 5 and 4 in position 3, as in our previous example. The received sequence is 5453501

٨

Slide ١٥Channel Coding Theory

Frequency domain encoding of RS Code

The decoding proceed with finding the Fourier transform of the sequence which gives 5230010 with syndrome being 0010

We now form the key equation with t = 2 and A0 = 1 :

The solution is

001

12

0 001

02

1

21 1

2

Slide ١٦Channel Coding Theory

Frequency domain encoding of RS Code

We use the shift register shown to generate the code sequence in the frequency domain

In our example 0 = 1, 1 = 2, and 2 = . E3 = 0, E2 = . Cyclic the shift register generates 133, which are the

frequency domain error at locations 4,5 and 6.

٩

Slide ١٧Channel Coding Theory

Frequency domain encoding of RS Code

The next two values generates 01 which are the syndrome components S0 and S1. so the code will repeat

The complete error sequence in the frequency domain is 3310010 .

Adding this to the Fourier transform of the received sequence which is 5230010 .

The result is 2500000, which is the original codeword without errors with four zeros syndrome

Slide ١٨Channel Coding Theory

Frequency domain encoding of RS Code

Example 2 For the previous example consider three errors have occurred,

and the received sequence is 6 4 5 3 5 0 1.

The Fourier transform is

The key equations are found to be

Or 0 = 1, 1 = 0, and 2 = 2.

332233465563 zzzzzzzR

021

32

3 03

12

23

١٠

Slide ١٩Channel Coding Theory

Frequency domain encoding of RS Code

The shift register become

After initializing the shift register with 3 2 . The output is 2

6 5 followed by 5 which is not S0. this means that there is an error which we cannot correct.

Slide ٢٠Channel Coding Theory

Frequency domain encoding of RS Code

Example 3 For the previous example consider single errors have occurred,

and the received sequence is 5 4 5 6 5 0 1.

The Fourier transform is

The key equations are found to be

Or 0 = 1, 1 = 5, and 2 = 0.

532136455366 zzzzzzzR

011

32

5 06

11

23

١١

Slide ٢١Channel Coding Theory

Frequency domain encoding of RS Code

The shift register become

After initializing the shift register with 6 . The output is 4 2

0 followed by 5 which is the value of s0.

The complete error sequence is 420 6 5 0 1 .

Adding this to 5 4 5 6 5 0 1.The result is 2500000,

Slide ٢٢Channel Coding Theory

Erasure Decoding

Reed-Solomon has the ability to recover event known as erasure

Erasure is a symbol which is more likely to be in error

Example Consider the same previous example but with one error a

position 5 and two erasures in positions 6 and 1 The received sequence will be taken as 0 4 5 6 5 0 1.

The Fourier transform is

052631435666 zzzzzzzR

١٢

Slide ٢٣Channel Coding Theory

Erasure Decoding

The lower terms of R forms the syndrome The erasure polynomial is

The error locator polynomial is

and the product is

By convolution with the syndrome polynomial

111 5216 zzzzz

11 zz

1152

1503

1 zzzzz

011

641

351

0

Slide ٢٤Channel Coding Theory

Erasure Decoding

Which means that 1 = 5. which leads to

The following circuit can be used for recursive extension

12135 zzzz

١٣

Slide ٢٥Channel Coding Theory

Erasure Decoding

Loading with values 5 6 1 and shifting gives the sequence 1 1

0 and then regenerating the syndrome 0 5 6. The decoding is successful.

The terms 0 1 1 are added to component 6 6 3 from the Fourier transform of the received sequence yo give the recovered information 2 5 0

If we choose Forney algorithm to correct errors in time domain

We need also the formal derivative of (z)(z) which is 5 z2

05254mod zzzzzzSz

Slide ٢٦Channel Coding Theory

Erasure Decoding

Therefore at position i the error value is

Evaluating this at -6 and -1 which are the roots of (z) and -5

which is root of (z) and found by Chien search. The results are

The received sequence then is 5056501, corresponding to the original codeword.

izi zzze

35

0525

56

55

01 ,, eee

١٤

Slide ٢٧Channel Coding Theory

Welch-Berlekamp Algorithm

Consider the previous double error –correction examples we transmit a codeword from a (7,3) RS code with roots 3,2 , 1 , and 0.

To start with, we need to calculate some values needed as input for the algorithm

Therefore g3 = 3 , g2= 3 , g1= 3, and g0 = 3

For error value calculation, we compute

362532101

01

XXXXXX

XXgxg

kn

jknii

102010110 knknC

Slide ٢٨Channel Coding Theory

Welch-Berlekamp Algorithm

For our example C = 6. we now need for each data location to find the value hi = C /g(i) . The values are found to be

Assume now we receive 5453501,. The first step is to compute the syndrome by long division.

This found to be s3 = 0 , s2= 2 , s1= 0, and s0 = 6

The input to WB algorithm is the set of point (Sj, j ) where Sj = sj/gj

6066

5165

2466

/

/

/

hhh

١٥

Slide ٢٩Channel Coding Theory

Welch-Berlekamp Algorithm

The input points are therefore (0, 3),(4, 2),(1, 1),(3, 0). We need to find two polynomials Q(X) and N(X) for which

And the length L[Q(X) ,N(X)], defined as the maximum of deg[Q(X)] and deg[N(X)]+1 has the minimum possible value

10 knjforNSQ jj

j

Slide ٣٠Channel Coding Theory

Welch-Berlekamp Algorithm

The steps of the algorithms are now1. Set Q0(X ) = 1, N0(X ) = 0, W0(X ) = X, V0(X ) = 1 and d = 0.2. Evaluate D1 = Qd(d )Sd + Nd(d )3. If D1 = 0, set Wd+1 = Wd(X+ d ), Vd+1 = Vd(X+ d ) and go to step

6. otherwise, set D2 = Wd(d )Sd + Vd(d ) 4. Set Qd+1 = Qd(X+ d ), Nd+1 = Nd(X+ d ) , Wd+1 = Wd + QdD2/D1,

Vd+1 = Vd + NdD2/D1,5. Check whether L[Wd , Vd] was less than or equal to L[Qd , Nd];

if it was then swap Qd+1 , Nd+1 with Wd+1 , Vd+1

6. increment d7. If d < n – k, return to step 1; otherwise, Q(X) = Qd(X), N(X)=

Nd(X).

١٦

Slide ٣١Channel Coding Theory

Welch-Berlekamp Algorithm

For our example

The error locator polynomial is X2 + 2 X+ 1 which has roots 3

and 5 . The error values in the data positions are

k

k

kk QNhe'

Slide ٣٢Channel Coding Theory

Welch-Berlekamp Algorithm

Where Q’(X) is the formal derivative of Q(X). In this case Q’(X) = 2 .

The received information therefore is 5 0 5.

523555 / e