下載/瀏覽Download

Download Report

Transcript 下載/瀏覽Download

Class Report
林格名:
Reed Solomon Encoder
Reed-Solomom Error Correction
• When a codeword is decoded, there are three
possible outcomes
– If 2s + r < 2t (s errors, r erasures) then the original
transmitted code word will always be recovered
– The decoder will detect that it cannot recover the original
code word and indicate this fact
– The decoder will mis-decode and recover an incorrect
code word without any indication
• The probability of each of the three possibilities
depends on the particular Reed-Solomom code and
on the number and distribution of errors
• Reed-Solomon codes are particularly suited to
correcting burst errors (a series of bit errors)
• One symbol error means one bit or more than one
bits in a symbol are incorrect
RS(15,9) Example Parameters
• Any valid code polynomial must a multiple of the
generator polynomial
• It implies that it must have roots the same 2t
consecutive powers of  that form the roots of g(x)
Block length
Message length
Code rate
Parity-check symbols length
Minimum distance
Error-correction capability
Finite field order
Field generator
Code generator polynomial
n = 15 symbols
k = 9 symbols
r = k/n = 60%
n – k = 6 symbols
d = n – k + 1 symbols
t = (n – k)/2 = 3 symbols
q = n + 1 = 2m = 24 = 16 symbols
p(x) = x4 + x + 1
g(x) = x6 + 10x5 + 14x4
+ 4x3 + 6x2 + 9x + 6
DVB RS(204,188) Code

Reed-Soromon RS(204,188,8) is applied.
 Code length 204
 Data length 188
 Correct up to 8 random erroneous bytes
 Overhead 16/204 = 7.84%
 Code Generator Polynomial with  = 02HEX
g(x) = (x+0)(x+ 1)(x+ 2)(x+ 15)
 Field Generator Polynomial
p(x) = x8 + x4 + x3 + x2 +1
SYNC 0
SYNCn
187 bytes Randomized Data
16 Parity bytes
Reed-Solomon RS(204,188,8) error protected packets
RS(n,k,t) Code Encoding
C ( x)  D( x)  x  [ D( x)  x mod G( x)]
2t
2t
Where C(x) is the transmitted codeword polynomial,
of degree n-1
D(x) is the user data polynomial of degree k-1
G(x) is the generator polynomial of the code
of degree 2t
n – k = 2t
c2t-1 c2t-2
c1
Parity
c0
dk-1
dk-2
d1
User Data
d0
Encoding of Systematic RS Codes
• To encode RS code in a systematic manner, the codeword
polynomials generated by a use of the division algorithm.
Dividing the shifted message polynomial xd-1m(x) by g(x), we
obtain
c( x)  x d 1m( x)  p( x)
p ( x)  x
d 2
m( x) mod g ( x)   p j x j
d 1
j 0
where g(x) is the generator polynomial and p(x) is the parity
Check polynomial. The codeword vector will be in a form of
c = (p0, p1,  , pd-2, m0, m1,  , mk-1)
Example: Consider the (15,9) RS code with g(x) = x6 + 10x5 + 14x4
+ 4x3 + 6x2 + 9x +  and m(x) = 11x. Then,
c(x) = x6m(x) + (x6m(x) mod g(x))
= (x6)(11x) + (x6)(11x) mode g(x)
= 11x7 + 8x5 + 10x4 + 4x3 + 14x2 + 8x + 12
The message symbol appears unchanged in the encode codeword.
Finding Parity Check Symbols by LFSR
• RS is a cyclic code and often implemented as a LFSR with
GF(2m) operators
• Example
G(x) = (x + 0)(x + 1)(x + 2)(x + 3)
LFSR: Linear Feedback Shift Register
g0
6
g1
L4
5
6
g2
L3
5
g2t-1
2
3
Galois Multiply
L1
3
Output
Data
Parity Path
s-bit register
Galois Addition
2
L2
Input Data
(parity byte, input messages) = (6 2 3 3 3 6 1)
1
6
3
Finite Field – Galois Field GF(24)
Primitive polynomial: x4 +x +1 = 0
Power
Repre.
Binary
Repre.
0
1

2
3
4
5
6
7
8
9
10
11
12
13
14
0000
0001
0010
0100
1000
0011
0110
1100
1011
0101
1010
0111
1110
1111
1101
1001
Polynomial
Representation
0
1

2
3
1+
 + 2
2 + 3
1 +  + 3
1 + 2
 + 3
1 +  + 2
 + 2 + 3
1 +  + 2 + 3
1 + 2 + 3
1 + 3
Q4
Q D
Q3
Q D
Q2
Q D
Q1
Q D
CLK
 GF Addition
and subtraction is
the same by using the
exclusive OR operation
 Example of GF multiplication
4  5 = (1 + )  ( + 2)
=  + 2 + 2 + 3
=  + 3
= 9
 Example of GF division
4 / 10 = 4  (15-10) = 9
Example of Reed-Solomon Encoder
Message: m(x) = x14 + 2x13 + 3x12 + 4x11 + 5x10 + 6x9 + 7x8 + 8x7 + 9x6 + 10x5 + 11x4
Generator: g(x) = x4 + 15x3 + 3x2 + x + 12
Remainder: r(x) = 3x3 + 3x2 + 12x + 12
Codeword: c(x) = m(x) + r(x)
Linear Feedback Shift Register
g0
g1
12
1
6
0
3
g2
15
4
D
D
g3
12
D
D
Parity (12 12 3 3)
Input (11 10 9 8 7 6 5 4 3 2 1)
Control
k
j
k
j
(j+k) mod 15 
j  k
Output
Initial
0 0
1
g(x)1 1 15
latch
15
2
g(x)13
13
latch
g(x)7
latch
g(x)10
latch
g(x)1
latch
g(x)0
latch
g(x)12
latch
g(x)0
latch
g(x)2
latch
g(x)11
latch
g(x)1
latch
0
0
3
3
1 12
1 12
7 4
4 5
3
7 11
14
4
10
13
1
Pipelined
Polynomial
Division for (15,11)
Reed-Solomon
Encoder
3
3
9 7 2
8 4 2
12 13 10 1
4 9 8 1
5
1 15 3 1
6 11 0
6
0
0 0
11 0
7
12 8
8
8
0
12
12
0
12
0
0
7 12 15
11 12 15
0 0 0 0
11 12 15 0
9
2 13 6 2 11
1 9 2 11
10
11 3 14 11 13
10 12 0 13 0
11
1 15 3
1 12
3 3 12 12
Message: m(x) = x14 + 2x13 + 3x12 + 4x11
+ 5x10 + 6x9 + 7x8 + 8x7
+ 9x6 + 10x5 + 11x4
Generator: g(x) = x4 + 15x3 + 3x2 + x + 12
Remainder: r(x) = 3x3 + 3x2 + 12x + 12
Codeword: c(x) = m(x) + r(x)
Polynomial Division
Message: x14 + 2x13 + 3x12 + 4x11 + 5x10 + 6x9 + 7x8 + 8x7 + 9x6 + 10x5 + 11x4
Generator: x4 + 15x3 + 3x2 + x + 12, Remainder: 3x3 + 3x2 + 12x + 12, c(x) = m(x) + r(x)
 x10
13x9
7x8
10x7
x6
0x5
12x4
0x3
2x2
11x1
1x0
x14 x13 x12 x11
1
2
3
4
1 15
3
1
13
0
5
13
7
4
7
1
7 11
10
10
x10 x9
5
6
12
9
6
13
3
4
5
9
7
13
2
12 13
1 15
1 15
0
0
x8
7
7
2
5
10
15
3
12
0
12
12
x7
8
8
1
9
1
8
0
8
8
0
0
x6 x5
9 10
9
12
5
0
5
7
2
0
2
2
10
0
10
12
6
0
6
13
11
11
x4
11
11
15
4
0
4
6
2
3
1
1
x3
0
x2
0
x1
0
x0
0
0
0
0
2
2
14
12
15
3
0
11
11
11
0
3
3
0
13
13
1
12
0
12
12