Reed Solomon
Prepared By
Mohammed Abdulmahdi Mohammedali AL_ShamiReed Solomon
encoder and decoder
Encoder & Decoder with MATLAB
Code
Contact Us
Kuh.muh2@atu.edu.iq
ma82bsmaram@gmail.com
Ph No+964 7812165825
Contents
1- introduction
2-the code generator polynomial
3-Reed–Solomon encoding
4-the Massey FSR Synthesis Algorithm
5-Forney’s Equation for Error Magnitude
6- Reed–Solomon decoding (autoregressive model)
7-Application Of Reed-Solomon Codes
Introduction
• One of the most error control codes is Reed-Solomon codes.
• These codes were developed by Reed & Solomon in June, 1960.
• Reed-Solomon coding operates on a finite field called Galios Field GF(2ℳ).
• The Reed-Solomon codes (RS codes) are non binary cyclic codes with code
symbols from a Galois field GF(2ℳ).
• An RS(n,k) code is used for encoding m-bit symbols into block.
• Reed-Solomon (RS) codes have many applications such as compact disc (CD,
VCD, DVD), HDTV, computer memory, and spread-spectrum systems.
Introduction
• In systematic RS code, the encoding process does not alter the message symbols
and the protection symbols are added as a separate part of the block. This is
shown diagrammatically in Fig.(1).
Reed Solomon Codes
• One of the most important features of RS codes is that the minimum distance of
an (n, k) RS code is n–k+1. Codes of this kind are called “maximum-distance-
separable codes (MDS Codes)”.
• Let α be a primitive element in GF((2ℳ). For any positive integer t ≤ 𝟐ℳ−1
,
there exists a
• t-symbol-error-correcting RS code with symbols from GF(2ℳ) and the
following parameters:
- Code Length: n = 2m-1
- No. of information symbols: k = 2m-1-2t
- No. of parity check symbols: n-k = 2t
- Symbol Error correcting capability: t
- the code minimum distance dmin =2t+1=n-k+1
Reed Solomon Codes
• Example 1: A popular Reed-Solomon code is RS(255,223) with 8-bit symbols.
Each code word contains 255 code word bytes, of which 223 bytes are data and
32 bytes are parity. For this code:
n = 255, k = 223
2t = 32, t = 16
The decoder can correct any 16 symbol errors in the code word: i.e. errors in up
to 16 bytes anywhere in the code word can be automatically corrected
The code Generator Polynomial
An (n, k) Reed-Solomon code is constructed by forming the code generator polynomial g(x),
the roots of which are consecutive elements of the Galois field.
Thus the code generator polynomial takes the form:
𝒈(𝒙)=(𝒙+𝜶)(𝒙+𝜶^𝟐 )(𝒙+𝜶^𝟑 )……(𝒙+𝜶^𝟐𝒕 )
Or: 𝒈(𝒙)=(𝒙−𝜶)(𝒙−𝜶^𝟐 )(𝒙−𝜶^𝟑 )……(𝒙−𝜶^𝟐𝒕 )
The degree of generator polynomial will always be 2t
For a (15, 11) code, the block length is 15 symbols, 11 of which are information symbols and
the remaining 4 are parity words. Because t=2, the code can correct errors in up to 2 symbols in
a block. Substituting for n in: n =2𝑚
-1
The code Generator Polynomial
gives the value of ℳ as 4, so each symbol consists of a 4-bit word and the code is based on the GF(16) shown in table
below.
Galois field elements of GF(23
)
Primitive polynomial f(x)=1+x+x3
Galois field elements of GF(23
)
Primitive polynomial f(x)=1+x2+x3
Example2
Consider the double error correcting RS code of block length n=15 over GF(16) describe
the generator polynomial
Primitive polynomial 1 + x + x4
Sol:
When GF(16) :M=4, t=2
Primitive polynomial : 𝑓 𝑥 = 𝑥4 + 𝑥 + 1
The generator polynomial can written as:
g(x) = ( x – α ) ( x – α2 ) ( x – α3 ) ( x – α4 )
g(x)= ( x2 – (α + α2 ) x + α3 ) ( x2 – (α3 + α4 ) x + α7 )
g(x)= ( x2 – (α5 ) x + α3 ) ( x2 – (α7 ) x + α7 )
.
.
g(x)= x4 + α13 x3 + α6 x2 + α3 x+ α10
Example3
Consider the ( 7 , 3 ) double-symbol error correcting R-S code, describe the generator polynomial
of it. Primitive polynomial 𝟏 + 𝐱 + 𝐱𝟑
Ans.
RS(n,k)=RS(7,3), n = 2𝑚-1 : m=3 2t = n – k = 4 roots
g(x) = ( x – α ) ( x – α2 ) ( x – α3 ) ( x – α4 )
= ( x2 – (α + α2 ) x + α3 ) ( x2 – (α3 + α4 ) x + α7 )
= ( x2 – α4 x + α3 ) ( x2 – α6 x + α0 )
= x4 – (α4 + α6) x3 + (α3 + α10 + α0) x2 – (α4 + α9 ) x + α3
= x4 – α3 x3 + α0 x2 – α1 x + α3
Following the format of low order to high order, and changing negative signs to positive, since in
the binary field +1 = - 1 , the generator polynomial becomes :
g(x) = α3 + α1 x + α0 x2 + α3 x3 + x4
H.W1
Consider the double error correcting RS code of block
length n=15 over GF(16) describe the generator
polynomial Primitive polynomial 1 + x + x4
output
D
m(x)
D
D
(n-k) shift register stages
+
+
+
α3
α1 α0 α3
+
control
D
Encoding Circuit is a Division Circuit
g(x)= α3
+ α1
x+x2
+α3
x3
+x4
Reed-Solomon Encoding
1
Example
4
Consider the ( 7 , 3 ) double-symbol error correcting R-S code with the generator polynomial of
it. g(x) = (α3 + α x+ α3 x3+ x4) if the input sequence x2+x find the systematic output codeword
Polynomial
Ans.
RS(n,k)=RS(7,3), n = 2𝑚-1 : m=3 t = 2
g(x) = (α3 + α x+ α3 x3+ x4)
C(x)= xn-k d(x) + rem(x)
C(x)= x4 (x2+x )+ rem(x)
C(x)= (x6+x5 )+ p(x)
p(x)= (x6+x5 ) mod g(x)
p(x) = α x3 + α3 x + α C(x)= x6+x5 + α x3 + α3 x + α
Example
5
consider a message d(x) consisting of eleven 4-bit symbols to be encode using our (15, 11)
RS code. Where;
d(x)= x10 + α x9 + α4 x8 + α2 x7 + α8 x6 + α5 x5 + α10 x4 + α3 x3 + α14 x2 + α9 x + α7
• d(x) is then multiplied by x4 to become :
x4 d(x) = x14 + α x13 + α4 x12 + α2 x11 + α8 x10 + α5 x9 + α10 x8 + α3 x7 + α14 x6 + α9 x5 + α7x4
to allow space for the four parity symbols. This polynomial is then divided by the code polynomial, to
produce the four parity symbols as a remainder. The division produces the remainder:
• rem(x)= α4 x3 + α4 x2 + α6 x+ α6
The transmitted code word c(x) is given by
• C(x)= x2 d(x) + rem(x)
C(x) = x14 + α x13 + α4 x12 + α2 x11 + α8 x10 + α5 x9 + α10 x8 + α3 x7 + α14 x6 + α9 x5 + α7x4 + α4
x3 + α4 x2 + α6 x + α6
H .W2&3
consider a message d(x) consisting of eleven 4 bitsymbols to be
encode using our (15, 11) RS code. Where; d(x)= x10 + α x9 + α4 x8 +
α2 x7 + α8 x6 + α5 x5 + α10 x4 + α3 x3 + α14 x2 + α9 x + α7
============================================================
Consider the RS (7,3) double-symbol correcting (𝑡 = 2) Reed Solomon
Code with generator polynomial
𝑔 𝑥 = 𝛼3
+ 𝛼𝑥 + 𝑥2
+ 𝛼3
𝑥3
+ 𝑥4
. If the input sequence 𝑚(𝑥) = 𝑥,
find the systematic output codeword polynomial.
Primitive polynomial 1 + x + x3
Decoding block diagram of RS Codes
calculate the
syndrome
From the error
location polynomial
𝝈 𝑿
calculate the error
values
Forney method
Chien search of error
positions
Data delay
Input r
output
The Massey FSR Synthesis Algorithm
1- Compute syndrome values:𝑺𝒌−𝟏 , 𝟏 ≤ 𝒌 ≤ 𝟐𝒕 − 𝟏
2- Initialize algorithm variables:𝝈 𝑿 = 𝟏 , 𝑳 = 𝟎 𝒂𝒏𝒅 𝑻 𝑿 = 𝑿 , 𝒌 = 𝟏
3- Take in new syndrome value and compute Discrepancy (error) “∆”
∆= 𝑺𝒌−𝟏 +
𝒊=𝟏
𝑳
𝝈𝒊𝑺𝒌−𝟏−𝒊
4- Test Discrepancy: If ∆ = 0, go to step9, otherwise, go to step5.
5- Modify connection polynomial:𝝈∗ 𝑿 = 𝝈 𝑿 + ∆. 𝑻(𝑿)
6- Test register length: if 𝟐𝑳 ≥ 𝑲, go to step8, otherwise, go to step7.
The Massey FSR Synthesis Algorithm
7- Changes register length and update correction term 𝑳 = 𝑲– 𝑳 𝒂𝒏𝒅 𝑻(𝒙)
= 𝝈(𝑿)/∆
8- Update connection polynomial:𝝈 𝑿 = 𝝈∗(𝑿)
9- Update correction term: 𝑻 𝑿 = 𝑿. 𝑻(𝑿)
10- Update syndrome counter:𝑲 = 𝑲 + 𝟏
11- Test syndrome counter: if 𝑲 < 𝟐𝒕 + 𝟏, go to step3 otherwise, stop.
Forney's Equation for the Error Magnitude
𝑆 𝑋 = 𝑆𝑏+2𝑡−1𝑋2𝑡−1 + ⋯ + 𝑆𝑏+1𝑋 + 𝑆𝑏
𝑆𝑖= 𝑟(𝛼𝑖
𝑆𝑖 = 𝑟𝑛−1 𝛼𝑖 𝑛−1
+ 𝑟𝑛−2 𝛼𝑖 𝑛−2
+ ⋯ + 𝑟1 𝛼𝑖 + 𝑟0
The key equation can then be written as:
𝛺 𝑋 = 𝑆 𝑋 𝜎 𝑋 𝑚𝑜𝑑𝑋2𝑡
According to Forney's algorithm, the error value is given by:
𝒀𝒋 = 𝑿𝒋
𝟏−𝒃
𝜴(𝑿𝒋
−𝟏
)
𝝈′(𝑿𝒋
−𝟏
)
Where 𝜎′(𝑋𝑗
−1
) is the derivative of𝜎(𝑋) for 𝑋 = 𝑋𝑗
−1
When b=1, the 𝑋𝑗
1−𝑏
term
disappears, the value of b is defined in Equation .
YES
No
Start
Calculate the syndrome 𝑆𝑖= 𝑟(𝛼𝑖
Initialize the variable K=1 𝜎 𝑥 =1,L=0,T(x)=X
Compute (error) ∆= 𝑠𝑘−1 + 𝑖=1
𝐿
𝜎𝑖𝑠𝑘−1−𝑖
IF ∆=0
Modify polynomial σ∗
x = σ x + ∆.T(x)
IF 2L ≥ K
Compute L=k-L , 𝑇 𝑥 =
𝜎 𝑥
∆
Update 𝜎 x = 𝜎∗
(x)
T x = 𝑋T x K=k+1
IF k≤ 2t
Compute the root of 𝑥 to get the position of error
Ω(x) =(S(x) x ) mod x2t
Compute the magnitude of error 𝑦𝑗 = 𝑥𝑗
1−𝑏 𝛺(𝑥𝑗
−1
)
σ′ 𝑥𝑗
−1
End
YES
YES
No
No
C(x) =r(x) +e(x)
Example
6
For a (15,11) RS code, for correcting up to 2 error words introducing two errors in the sixth (x9 term) and thirteenth
(x2 term) symbols of the coded message e(x)=e 9x9+e 2x2 decode the received signal using Massey FSR Synthesis
Algorithm if , Primitive polynomial 1 + x + x4
r(x)= x14 + α x13 + α4 x12 + α2 x11 + α8 x10 + α7 x9 + α10 x8 + α3 x7 + α14 x6 + α9 x5 + α7 x4 + α4 x3 + x2 + α6 x + α6
Sol
We have n=15 k=11 t=2
si=r(α i)
s0=r(α0)= α12
s1=r(α 1)= α4
s2=r(α 2)= α2
s3=r(α 3)= α6
K=1 initialize the algorithm variable K=1 𝜎 x =1 L=0
T(x)=X
Compute the discrepancy (error) ∆:
∆= 𝑠𝑘−1 + 𝑖=1
𝐿
𝜎𝑖𝑠𝑘−1−𝑖 𝑠1−1 + 𝑖=1
0
𝜎𝑖𝑠𝑘−1−𝑖 ∆=s0 = α12
𝜎∗ x = 𝜎 x + ∆. T(x) =1+ α12 x
when 2L<K so set L=k-L =1-0=1
T 𝑥 =
𝜎 x
∆
=
1
α12
= α3
𝜎 x = 𝜎∗ x = 1+ α12 x 𝑇 𝑋
= 𝑋. 𝑇 𝑋 = α3. 𝑋 = α3𝑋
Example
6
K=2 initialize the algorithm variable K=2 𝜎 x = 1+ α12 x
L=1 T(x)=α3𝑋
Compute the discrepancy (error) ∆:
∆= 𝑠𝑘−1 + 𝑖=1
𝐿
𝜎𝑖𝑠𝑘−1−𝑖 ∆= 𝑠2−1 + 𝑖=1
1
𝜎1𝑠2−1−1
∆=s1 + 𝜎1 s0 = α4 + α12 .α12 = α4 + α9 = 1+α + α + α3 = α14
𝜎∗ x = 𝜎 x + ∆. T(x) =1+ α12 x + α14.α3𝑋=1+ (α12 + α2) 𝑋= 1+ α7 x
when 2L ≥ K will skip some steps
𝜎 x = 𝜎∗ x = 1+ α7 x 𝑇 𝑋 = 𝑋. 𝑇 𝑋 = α3𝑋. 𝑋 = α3x2
Increment K→3 ≤ 2t=4 , so continue
Example
6
K=3 initialize the algorithm variable K=3 𝜎 x = 1+ α7 x
L=1 T(x)=α3x2
Compute the discrepancy (error) ∆:
∆= 𝑠𝑘−1 + 𝑖=1
𝐿
𝜎𝑖𝑠𝑘−1−𝑖 ∆= 𝑠3−1 + 𝑖=1
1
𝜎1𝑠3−1−1
∆=s2 + 𝜎1 s1 = α2 + α7 .α4 = α2 + α4 = α + α3 = α9
𝜎∗
𝑥 = 𝜎 𝑥 + ∆. 𝑇(𝑥) =1+ α7 x + α9.α3x2 = 1+ α7 x + α12x2
when 2L > K L=k-L =3-1=2 T 𝑥 =
𝜎 x
∆
=
1+ α7 x
α9 = α6+ α13 x
𝜎 𝑥 = 𝜎∗ 𝑥 = 1+ α7 x + α12x2 𝑇 𝑋 = 𝑋. 𝑇 𝑋 = α6x+ α13x2
Example
6
ment K→4 ≤ 2t=4 , so
continue
K=4 initialize the algorithm variable K=4 𝜎 x = 1+ α7 x + α12x2 L=2
T(x)=α6x+ α13x2
Compute the discrepancy (error) ∆:
∆= 𝑠𝑘−1 + 𝑖=1
𝐿
𝜎𝑖𝑠𝑘−1−𝑖 ∆= 𝑠4−1 + 𝑖=1
2
𝜎1𝑠2−𝑖 ∆=s3 + 𝜎1 s2 + 𝜎2 s1
∆= α6 + α7 .α2+ α12 .α4= α6 + α9 +α = α2 + α3 +α+ α3 +α = α2
𝜎∗ 𝑥 = 𝜎 𝑥 + ∆. 𝑇(𝑥) = [1+ α7 x + α12x2] + α2[α6x+ α13x2]
𝜎∗ 𝑥 =1+ α11 x + α11x2
when 2L ≥ K will skip some steps
𝜎 𝑥 = 𝜎∗ 𝑥 = 1+ α11 x + α11x2 𝑇 𝑋 = 𝑋. 𝑇 𝑋 = α6x+ α13x2
Increment K→5 ≤ 2t=4 , so the process is completed
Example
6
We have two errors in the sixth (x9 term) and thirteenth (x2 term)
X1=
1
𝛼
6 =𝛼
9
X2=
1
𝛼
13 =𝛼
2
Ω(x)=(S(x)𝜎 𝑥 )mod x2t
𝜎 𝑥 = 1+ α11 x +α11x2
S(x)=s0+s1x+s2x2+s3x3 =𝛼12
+ 𝛼4
𝑥 +𝛼
2
𝑥
2
+𝛼6
𝑥3
S(x)𝜎 𝑥 =(𝛼12 + 𝛼4𝑥 + 𝛼
2
𝑥
2
+𝛼6𝑥3)(1+ α11 x + α11x2)=𝜶𝟏𝟐 + 𝜶𝟓𝒙 + 𝜶
𝟏𝟒
𝒙
𝟒
Ω(x)=(S(x)𝜎 𝑥 )mod x4 = 𝜶𝟏𝟐
+ 𝜶𝟓
𝒙 x4 𝜶𝟏𝟐 + 𝜶𝟓𝒙
+ 𝜶
𝟏𝟒
𝒙
𝟒
𝜶 14
𝜶𝟏𝟐 + 𝜶𝟓𝒙
Example
6
𝒚𝒋 = 𝒙𝒋
𝟏−𝒃
𝜴(𝒙𝒋
−𝟏
)
𝛔′ 𝒙𝒋
−𝟏
σ x = 1+ α11 x + α11x2 σ′ 𝑥𝑗
−1
= 𝜶
𝟏𝟏
Ω(x) = 𝜶𝟏𝟐 + 𝜶𝟓𝒙
𝑦1 = 𝜶
𝟗 𝛼12+𝛼5.𝛼6
𝛼
11 = 𝜶
𝟗 𝛼
12
+𝛼11
𝛼11 = 𝛼13
𝑦2 = 𝜶𝟐 𝛼12+𝛼5.𝛼13
𝛼11 = 𝜶
𝟐 𝛼12+𝛼18
𝛼11 = 𝛼
e(x)=α13x9+ αx2
C(x)=r(x)+e(x)= x14 + α x13 + α4 x12 + α2 x11 + α8 x10 + α7 x9 + α10 x8 + α3 x7 + α14 x6 + α9 x5 +
α7 x4 + α4 x3 + x2 + α6 x + α6 + α13x9+ αx2
Example
6
Using the B-M algorithm, decode the received vector r= (000 000 100 000 100 000 000) for the
RS code CRS (7,3), over GF (23) (prime polynomial Pi(x)=1+x2+x3).
• Solution: According to the received vector, converted into its
polynomial form:
𝑟 𝑋 = 𝑋2 + 𝑋4
S0= 0 , S1= 𝛼5 , S2= 𝛼3 , S3=𝛼3
• 𝑲 = 𝟏 :
• 𝐾 = 1 𝑠𝑜 𝑇 𝑋 = 𝑋 , 𝐿 = 0 𝑠𝑜 𝜎 𝑋 = 1
• Δ = 𝑆𝑘−1 + 𝑖=1
𝐿
𝜎𝑖𝑆𝑘−1−𝑖 = 𝑆0 = 0
• 𝑇 𝑋 = 𝑋. 𝑇 𝑋 = 𝑋 . 𝑋 = 𝑋2
• Increment 𝐾 → 2 ≤ 2𝑡 = 4, so continue.
Example
7
• 𝑲 = 𝟐 :
• 𝐾 = 2 𝑠𝑜 𝑇 𝑋 = 𝑋2, 𝐿 = 0 𝑠𝑜 𝜎 𝑋 = 1
• Δ = 𝑆1 = 𝛼5
• 𝜎∗
𝑋 = 𝜎 𝑋 + ∆. 𝑇 𝑋 = 1 + 𝛼5
𝑋2
• 2𝐿 ≤ 𝐾 so: 𝐿 = 𝐾 − 𝐿 = 2 − 0 = 2
• 𝑇 𝑋 =
𝜎 𝑋
∆
= 𝛼2
• 𝜎 𝑋 = 𝜎∗ 𝑋 = 1 + 𝛼5𝑋2
• 𝑇 𝑋 = 𝑋. 𝑇 𝑋 = 𝑋 . 𝛼2 = 𝛼2𝑋
• Increment 𝐾 → 3 ≤ 2𝑡 = 4, so continue.
Example
7
• 𝑲 = 𝟑 :
• 𝐾 = 3 𝑠𝑜 𝑇 𝑋 = 𝛼2𝑋 , 𝐿 = 2 𝑎𝑛𝑑 𝜎 𝑋 = 1 + 𝛼5𝑋2
• Δ = 𝑆2 + 𝜎1𝑆1 + 𝜎2𝑆0 = 𝛼3 + 0 + 0 = 𝛼3
• 𝜎∗
𝑋 = 𝜎 𝑋 + ∆. 𝑇 𝑋 = 1 + 𝛼5
𝑋2
+ 𝛼3
. 𝛼2
𝑋 = 1 + 𝛼5
𝑋
+ 𝛼5𝑋2
• 2𝐿 > 𝐾 so:
• 𝜎 𝑋 = 𝜎∗ 𝑋 = 1 + 𝛼5𝑋 + 𝛼5𝑋2
• 𝑇 𝑋 = 𝑋. 𝑇 𝑋 = 𝑋. 𝛼2𝑋 = 𝛼2 𝑋2
• Increment 𝐾 → 4 ≤ 2𝑡 = 4, so continue.
Example
7
• 𝑲 = 𝟒 :
• 𝐾 = 4 𝑠𝑜 𝑇 𝑋 = 𝛼2 𝑋2, 𝐿 = 2 𝑎𝑛𝑑 𝜎 𝑋 = 1 + 𝛼5𝑋
+ 𝛼5𝑋2
• Δ = 𝑆3 + 𝜎1𝑆2 + 𝜎2𝑆1 = 𝛼3 + 𝛼5. 𝛼3 + 𝛼5. 𝛼5 = 𝛼
• 𝜎∗
𝑋 = 𝜎 𝑋 + ∆𝑇 𝑋 = 1 + 𝛼5
𝑋 + 𝛼5
𝑋2
+ 𝛼 𝛼2
𝑋2
= 1
+ 𝛼5 𝑋 + 𝛼6𝑋2
• 2𝐿 = 𝐾, so, we skip some steps, then:
• 𝜎 𝑋 = 𝜎∗ 𝑋 = 1 + 𝛼5 𝑋 + 𝛼6𝑋2
• 𝑇 𝑋 = 𝑋. 𝑇 𝑋 = 𝑋. 𝛼2 𝑋2 = 𝛼2𝑋3
• Increment 𝐾 → 5 > 2𝑡 = 4, so the process is complete and:
• 𝜎 𝑋 = 𝛼6𝑋2 + 𝛼5𝑋 + 1
Example
7
• The roots of 𝜎 𝑋 is 𝛼3 and 𝛼5 i.e. X1=
1
𝛼3 = 𝛼4, X2=
1
𝛼5 = 𝛼2 which mean the
error locations.
• 𝑆 𝑋 = 0 + 𝛼5𝑋 + 𝛼3𝑋2 + 𝛼3𝑋3.
• 𝛺 𝑋 = 𝑆 𝑋 𝜎 𝑋 𝑚𝑜𝑑𝑋2𝑡
𝜶𝟓
𝑿 + 𝜶𝟔
𝑿𝟒
+ 𝜶𝟐
𝑿𝟓
) 𝑴𝒐𝒅 𝑿𝟒
• 𝛺 𝑋 = 𝜶𝟓𝑿 = 𝑟𝑒𝑚(𝑋)
• 𝜎′ 𝑋𝑗
−1
= 𝛼5
• Calculating the error values:
• 𝑌
𝑗 = 𝑋𝑗
1−0 𝛼6𝑋𝑗
−2
+1
𝛼5
• 𝑌1 = 𝜶𝟒 𝜶𝟓.𝜶𝟑
𝜶𝟓 = 𝜶𝟕 = 𝟏
• 𝑌2 = 𝜶𝟐 𝜶𝟓.𝜶𝟓
𝜶𝟓 = 𝜶𝟕= 𝟏
• 𝒆 𝑿 = 𝑿𝟐 + 𝑿𝟒
• ∴ 𝐶 𝑋 = 𝑟 𝑋 + 𝒆 𝑿 = 𝑋2
+ 𝑋4
+ 𝑿𝟐
+ 𝑿𝟒
= 0
• The decoded vector is finally the all-zero vector.
Application Of Reed-Solomon Codes
• Data Storage:
 Reed-Solomon is very widely used in mass storage systems to correct burst errors associated with media
defects.
 Special properties of Reed-Solomon codes make the sound quality of the CD as impressive as it is.
Reed-Solomon is a main component of CD Compact Disc.
 In CD a scheme known as Cross-Interleaved Reed Solomon Coding (CIRC) is used.
• Bar Code:
 All the two dimensional bar codes such as PDF-417, Maxi Code, Data matrix, QR Code, and Aztec
Code use Reed-Solomon error correction to allow the correct reading even if some portions of bar code
are damaged.
 When the bar code symbol is not recognized by the bar code scanner it will treat it as an erasure.
• Satellite Broadcasting:
Spread-Spectrum Systems:
Reed-Solomon codes can be used in designing the hopping sequences. If these sequences are
carefully selected, the interference caused by the other users in a multiple access environment can be
greatly reduced
• Error Control for Systems with Feedback:
Wicker and Bartz examined various means for using Reed-Solomon codes in applications that allow
transmission of information from receiver to the transmitter. These applications include mobile data
transmission systems and high reliability military communication systems
• Ultra Wideband (UWB):
UWB is a wireless technology for transmitting the digital data at very high rates over a wide
spectrum of frequency by using very low power. It makes it possible to transmit data at rate over
100Mbps within 10 meters. To preserve the important header information, Reed-Solomon (23, 17)
code. In receiver, RS decoder needs high speed and low latency and for this efficient hardware is
used
As a given in Ex:4
%RS ( 7 , 3 ),t=2,g(x) = (α3 + α x+ α3 x3+ x4) msg= x2+x enc & dec
% C(x)= x6+x5 + α x3 + α3 x + α
clc;clear;
m = 3; % Number of bits per symbol
n = 2^m - 1; % Codeword length
k = 3; % Message length
%%
msg = gf([1 1 0],m) % Create three messages based on GF(8)
%%
ccode = rsenc(msg,n,k) % Generate RS (7,3) codewords
disp('C(x)= x6+x5 + ax3 + a3 x + a')
%%
errors = gf([2 0 0 0 0 5 0],m)
%%
noisycode = ccode + errors
%%
[txcode,cnumerr] = rsdec(noisycode,n,k)
NOTE The capaability of correcting error(t)
cnumerr =-1 if the errors no exceed the capability means errors > t
• Bernard Sklar, ”Digital Communication Fundamentals and
Applications”, Prentice Hall PTR, Upper Saddle River, New Jersey,
2007.
• Dr. Ahmed. A, “Channel Coding”, Lecture notes. •
• C.K.P. Clarke, “Reed-Solomon error correction”, R&D White Paper,
July 2002.
References
Reed Solomon encoder and decoder \ ريد سلمون

Reed Solomon encoder and decoder \ ريد سلمون

  • 1.
    Reed Solomon Prepared By MohammedAbdulmahdi Mohammedali AL_ShamiReed Solomon encoder and decoder Encoder & Decoder with MATLAB Code Contact Us Kuh.muh2@atu.edu.iq ma82bsmaram@gmail.com Ph No+964 7812165825
  • 2.
    Contents 1- introduction 2-the codegenerator polynomial 3-Reed–Solomon encoding 4-the Massey FSR Synthesis Algorithm 5-Forney’s Equation for Error Magnitude 6- Reed–Solomon decoding (autoregressive model) 7-Application Of Reed-Solomon Codes
  • 3.
    Introduction • One ofthe most error control codes is Reed-Solomon codes. • These codes were developed by Reed & Solomon in June, 1960. • Reed-Solomon coding operates on a finite field called Galios Field GF(2ℳ). • The Reed-Solomon codes (RS codes) are non binary cyclic codes with code symbols from a Galois field GF(2ℳ). • An RS(n,k) code is used for encoding m-bit symbols into block. • Reed-Solomon (RS) codes have many applications such as compact disc (CD, VCD, DVD), HDTV, computer memory, and spread-spectrum systems.
  • 4.
    Introduction • In systematicRS code, the encoding process does not alter the message symbols and the protection symbols are added as a separate part of the block. This is shown diagrammatically in Fig.(1).
  • 5.
    Reed Solomon Codes •One of the most important features of RS codes is that the minimum distance of an (n, k) RS code is n–k+1. Codes of this kind are called “maximum-distance- separable codes (MDS Codes)”. • Let α be a primitive element in GF((2ℳ). For any positive integer t ≤ 𝟐ℳ−1 , there exists a • t-symbol-error-correcting RS code with symbols from GF(2ℳ) and the following parameters: - Code Length: n = 2m-1 - No. of information symbols: k = 2m-1-2t - No. of parity check symbols: n-k = 2t - Symbol Error correcting capability: t - the code minimum distance dmin =2t+1=n-k+1
  • 6.
    Reed Solomon Codes •Example 1: A popular Reed-Solomon code is RS(255,223) with 8-bit symbols. Each code word contains 255 code word bytes, of which 223 bytes are data and 32 bytes are parity. For this code: n = 255, k = 223 2t = 32, t = 16 The decoder can correct any 16 symbol errors in the code word: i.e. errors in up to 16 bytes anywhere in the code word can be automatically corrected
  • 7.
    The code GeneratorPolynomial An (n, k) Reed-Solomon code is constructed by forming the code generator polynomial g(x), the roots of which are consecutive elements of the Galois field. Thus the code generator polynomial takes the form: 𝒈(𝒙)=(𝒙+𝜶)(𝒙+𝜶^𝟐 )(𝒙+𝜶^𝟑 )……(𝒙+𝜶^𝟐𝒕 ) Or: 𝒈(𝒙)=(𝒙−𝜶)(𝒙−𝜶^𝟐 )(𝒙−𝜶^𝟑 )……(𝒙−𝜶^𝟐𝒕 ) The degree of generator polynomial will always be 2t For a (15, 11) code, the block length is 15 symbols, 11 of which are information symbols and the remaining 4 are parity words. Because t=2, the code can correct errors in up to 2 symbols in a block. Substituting for n in: n =2𝑚 -1
  • 8.
    The code GeneratorPolynomial gives the value of ℳ as 4, so each symbol consists of a 4-bit word and the code is based on the GF(16) shown in table below.
  • 9.
    Galois field elementsof GF(23 ) Primitive polynomial f(x)=1+x+x3 Galois field elements of GF(23 ) Primitive polynomial f(x)=1+x2+x3
  • 10.
    Example2 Consider the doubleerror correcting RS code of block length n=15 over GF(16) describe the generator polynomial Primitive polynomial 1 + x + x4 Sol: When GF(16) :M=4, t=2 Primitive polynomial : 𝑓 𝑥 = 𝑥4 + 𝑥 + 1 The generator polynomial can written as: g(x) = ( x – α ) ( x – α2 ) ( x – α3 ) ( x – α4 ) g(x)= ( x2 – (α + α2 ) x + α3 ) ( x2 – (α3 + α4 ) x + α7 ) g(x)= ( x2 – (α5 ) x + α3 ) ( x2 – (α7 ) x + α7 ) . . g(x)= x4 + α13 x3 + α6 x2 + α3 x+ α10
  • 11.
    Example3 Consider the (7 , 3 ) double-symbol error correcting R-S code, describe the generator polynomial of it. Primitive polynomial 𝟏 + 𝐱 + 𝐱𝟑 Ans. RS(n,k)=RS(7,3), n = 2𝑚-1 : m=3 2t = n – k = 4 roots g(x) = ( x – α ) ( x – α2 ) ( x – α3 ) ( x – α4 ) = ( x2 – (α + α2 ) x + α3 ) ( x2 – (α3 + α4 ) x + α7 ) = ( x2 – α4 x + α3 ) ( x2 – α6 x + α0 ) = x4 – (α4 + α6) x3 + (α3 + α10 + α0) x2 – (α4 + α9 ) x + α3 = x4 – α3 x3 + α0 x2 – α1 x + α3 Following the format of low order to high order, and changing negative signs to positive, since in the binary field +1 = - 1 , the generator polynomial becomes : g(x) = α3 + α1 x + α0 x2 + α3 x3 + x4
  • 12.
    H.W1 Consider the doubleerror correcting RS code of block length n=15 over GF(16) describe the generator polynomial Primitive polynomial 1 + x + x4
  • 13.
    output D m(x) D D (n-k) shift registerstages + + + α3 α1 α0 α3 + control D Encoding Circuit is a Division Circuit g(x)= α3 + α1 x+x2 +α3 x3 +x4 Reed-Solomon Encoding 1
  • 14.
    Example 4 Consider the (7 , 3 ) double-symbol error correcting R-S code with the generator polynomial of it. g(x) = (α3 + α x+ α3 x3+ x4) if the input sequence x2+x find the systematic output codeword Polynomial Ans. RS(n,k)=RS(7,3), n = 2𝑚-1 : m=3 t = 2 g(x) = (α3 + α x+ α3 x3+ x4) C(x)= xn-k d(x) + rem(x) C(x)= x4 (x2+x )+ rem(x) C(x)= (x6+x5 )+ p(x) p(x)= (x6+x5 ) mod g(x) p(x) = α x3 + α3 x + α C(x)= x6+x5 + α x3 + α3 x + α
  • 15.
    Example 5 consider a messaged(x) consisting of eleven 4-bit symbols to be encode using our (15, 11) RS code. Where; d(x)= x10 + α x9 + α4 x8 + α2 x7 + α8 x6 + α5 x5 + α10 x4 + α3 x3 + α14 x2 + α9 x + α7 • d(x) is then multiplied by x4 to become : x4 d(x) = x14 + α x13 + α4 x12 + α2 x11 + α8 x10 + α5 x9 + α10 x8 + α3 x7 + α14 x6 + α9 x5 + α7x4 to allow space for the four parity symbols. This polynomial is then divided by the code polynomial, to produce the four parity symbols as a remainder. The division produces the remainder: • rem(x)= α4 x3 + α4 x2 + α6 x+ α6 The transmitted code word c(x) is given by • C(x)= x2 d(x) + rem(x) C(x) = x14 + α x13 + α4 x12 + α2 x11 + α8 x10 + α5 x9 + α10 x8 + α3 x7 + α14 x6 + α9 x5 + α7x4 + α4 x3 + α4 x2 + α6 x + α6
  • 16.
    H .W2&3 consider amessage d(x) consisting of eleven 4 bitsymbols to be encode using our (15, 11) RS code. Where; d(x)= x10 + α x9 + α4 x8 + α2 x7 + α8 x6 + α5 x5 + α10 x4 + α3 x3 + α14 x2 + α9 x + α7 ============================================================ Consider the RS (7,3) double-symbol correcting (𝑡 = 2) Reed Solomon Code with generator polynomial 𝑔 𝑥 = 𝛼3 + 𝛼𝑥 + 𝑥2 + 𝛼3 𝑥3 + 𝑥4 . If the input sequence 𝑚(𝑥) = 𝑥, find the systematic output codeword polynomial. Primitive polynomial 1 + x + x3
  • 17.
    Decoding block diagramof RS Codes calculate the syndrome From the error location polynomial 𝝈 𝑿 calculate the error values Forney method Chien search of error positions Data delay Input r output
  • 18.
    The Massey FSRSynthesis Algorithm 1- Compute syndrome values:𝑺𝒌−𝟏 , 𝟏 ≤ 𝒌 ≤ 𝟐𝒕 − 𝟏 2- Initialize algorithm variables:𝝈 𝑿 = 𝟏 , 𝑳 = 𝟎 𝒂𝒏𝒅 𝑻 𝑿 = 𝑿 , 𝒌 = 𝟏 3- Take in new syndrome value and compute Discrepancy (error) “∆” ∆= 𝑺𝒌−𝟏 + 𝒊=𝟏 𝑳 𝝈𝒊𝑺𝒌−𝟏−𝒊 4- Test Discrepancy: If ∆ = 0, go to step9, otherwise, go to step5. 5- Modify connection polynomial:𝝈∗ 𝑿 = 𝝈 𝑿 + ∆. 𝑻(𝑿) 6- Test register length: if 𝟐𝑳 ≥ 𝑲, go to step8, otherwise, go to step7.
  • 19.
    The Massey FSRSynthesis Algorithm 7- Changes register length and update correction term 𝑳 = 𝑲– 𝑳 𝒂𝒏𝒅 𝑻(𝒙) = 𝝈(𝑿)/∆ 8- Update connection polynomial:𝝈 𝑿 = 𝝈∗(𝑿) 9- Update correction term: 𝑻 𝑿 = 𝑿. 𝑻(𝑿) 10- Update syndrome counter:𝑲 = 𝑲 + 𝟏 11- Test syndrome counter: if 𝑲 < 𝟐𝒕 + 𝟏, go to step3 otherwise, stop.
  • 20.
    Forney's Equation forthe Error Magnitude 𝑆 𝑋 = 𝑆𝑏+2𝑡−1𝑋2𝑡−1 + ⋯ + 𝑆𝑏+1𝑋 + 𝑆𝑏 𝑆𝑖= 𝑟(𝛼𝑖 𝑆𝑖 = 𝑟𝑛−1 𝛼𝑖 𝑛−1 + 𝑟𝑛−2 𝛼𝑖 𝑛−2 + ⋯ + 𝑟1 𝛼𝑖 + 𝑟0 The key equation can then be written as: 𝛺 𝑋 = 𝑆 𝑋 𝜎 𝑋 𝑚𝑜𝑑𝑋2𝑡 According to Forney's algorithm, the error value is given by: 𝒀𝒋 = 𝑿𝒋 𝟏−𝒃 𝜴(𝑿𝒋 −𝟏 ) 𝝈′(𝑿𝒋 −𝟏 ) Where 𝜎′(𝑋𝑗 −1 ) is the derivative of𝜎(𝑋) for 𝑋 = 𝑋𝑗 −1 When b=1, the 𝑋𝑗 1−𝑏 term disappears, the value of b is defined in Equation .
  • 21.
    YES No Start Calculate the syndrome𝑆𝑖= 𝑟(𝛼𝑖 Initialize the variable K=1 𝜎 𝑥 =1,L=0,T(x)=X Compute (error) ∆= 𝑠𝑘−1 + 𝑖=1 𝐿 𝜎𝑖𝑠𝑘−1−𝑖 IF ∆=0 Modify polynomial σ∗ x = σ x + ∆.T(x) IF 2L ≥ K Compute L=k-L , 𝑇 𝑥 = 𝜎 𝑥 ∆ Update 𝜎 x = 𝜎∗ (x) T x = 𝑋T x K=k+1 IF k≤ 2t Compute the root of 𝑥 to get the position of error Ω(x) =(S(x) x ) mod x2t Compute the magnitude of error 𝑦𝑗 = 𝑥𝑗 1−𝑏 𝛺(𝑥𝑗 −1 ) σ′ 𝑥𝑗 −1 End YES YES No No C(x) =r(x) +e(x)
  • 22.
    Example 6 For a (15,11)RS code, for correcting up to 2 error words introducing two errors in the sixth (x9 term) and thirteenth (x2 term) symbols of the coded message e(x)=e 9x9+e 2x2 decode the received signal using Massey FSR Synthesis Algorithm if , Primitive polynomial 1 + x + x4 r(x)= x14 + α x13 + α4 x12 + α2 x11 + α8 x10 + α7 x9 + α10 x8 + α3 x7 + α14 x6 + α9 x5 + α7 x4 + α4 x3 + x2 + α6 x + α6 Sol We have n=15 k=11 t=2 si=r(α i) s0=r(α0)= α12 s1=r(α 1)= α4 s2=r(α 2)= α2 s3=r(α 3)= α6
  • 23.
    K=1 initialize thealgorithm variable K=1 𝜎 x =1 L=0 T(x)=X Compute the discrepancy (error) ∆: ∆= 𝑠𝑘−1 + 𝑖=1 𝐿 𝜎𝑖𝑠𝑘−1−𝑖 𝑠1−1 + 𝑖=1 0 𝜎𝑖𝑠𝑘−1−𝑖 ∆=s0 = α12 𝜎∗ x = 𝜎 x + ∆. T(x) =1+ α12 x when 2L<K so set L=k-L =1-0=1 T 𝑥 = 𝜎 x ∆ = 1 α12 = α3 𝜎 x = 𝜎∗ x = 1+ α12 x 𝑇 𝑋 = 𝑋. 𝑇 𝑋 = α3. 𝑋 = α3𝑋 Example 6
  • 24.
    K=2 initialize thealgorithm variable K=2 𝜎 x = 1+ α12 x L=1 T(x)=α3𝑋 Compute the discrepancy (error) ∆: ∆= 𝑠𝑘−1 + 𝑖=1 𝐿 𝜎𝑖𝑠𝑘−1−𝑖 ∆= 𝑠2−1 + 𝑖=1 1 𝜎1𝑠2−1−1 ∆=s1 + 𝜎1 s0 = α4 + α12 .α12 = α4 + α9 = 1+α + α + α3 = α14 𝜎∗ x = 𝜎 x + ∆. T(x) =1+ α12 x + α14.α3𝑋=1+ (α12 + α2) 𝑋= 1+ α7 x when 2L ≥ K will skip some steps 𝜎 x = 𝜎∗ x = 1+ α7 x 𝑇 𝑋 = 𝑋. 𝑇 𝑋 = α3𝑋. 𝑋 = α3x2 Increment K→3 ≤ 2t=4 , so continue Example 6
  • 25.
    K=3 initialize thealgorithm variable K=3 𝜎 x = 1+ α7 x L=1 T(x)=α3x2 Compute the discrepancy (error) ∆: ∆= 𝑠𝑘−1 + 𝑖=1 𝐿 𝜎𝑖𝑠𝑘−1−𝑖 ∆= 𝑠3−1 + 𝑖=1 1 𝜎1𝑠3−1−1 ∆=s2 + 𝜎1 s1 = α2 + α7 .α4 = α2 + α4 = α + α3 = α9 𝜎∗ 𝑥 = 𝜎 𝑥 + ∆. 𝑇(𝑥) =1+ α7 x + α9.α3x2 = 1+ α7 x + α12x2 when 2L > K L=k-L =3-1=2 T 𝑥 = 𝜎 x ∆ = 1+ α7 x α9 = α6+ α13 x 𝜎 𝑥 = 𝜎∗ 𝑥 = 1+ α7 x + α12x2 𝑇 𝑋 = 𝑋. 𝑇 𝑋 = α6x+ α13x2 Example 6 ment K→4 ≤ 2t=4 , so continue
  • 26.
    K=4 initialize thealgorithm variable K=4 𝜎 x = 1+ α7 x + α12x2 L=2 T(x)=α6x+ α13x2 Compute the discrepancy (error) ∆: ∆= 𝑠𝑘−1 + 𝑖=1 𝐿 𝜎𝑖𝑠𝑘−1−𝑖 ∆= 𝑠4−1 + 𝑖=1 2 𝜎1𝑠2−𝑖 ∆=s3 + 𝜎1 s2 + 𝜎2 s1 ∆= α6 + α7 .α2+ α12 .α4= α6 + α9 +α = α2 + α3 +α+ α3 +α = α2 𝜎∗ 𝑥 = 𝜎 𝑥 + ∆. 𝑇(𝑥) = [1+ α7 x + α12x2] + α2[α6x+ α13x2] 𝜎∗ 𝑥 =1+ α11 x + α11x2 when 2L ≥ K will skip some steps 𝜎 𝑥 = 𝜎∗ 𝑥 = 1+ α11 x + α11x2 𝑇 𝑋 = 𝑋. 𝑇 𝑋 = α6x+ α13x2 Increment K→5 ≤ 2t=4 , so the process is completed Example 6
  • 27.
    We have twoerrors in the sixth (x9 term) and thirteenth (x2 term) X1= 1 𝛼 6 =𝛼 9 X2= 1 𝛼 13 =𝛼 2 Ω(x)=(S(x)𝜎 𝑥 )mod x2t 𝜎 𝑥 = 1+ α11 x +α11x2 S(x)=s0+s1x+s2x2+s3x3 =𝛼12 + 𝛼4 𝑥 +𝛼 2 𝑥 2 +𝛼6 𝑥3 S(x)𝜎 𝑥 =(𝛼12 + 𝛼4𝑥 + 𝛼 2 𝑥 2 +𝛼6𝑥3)(1+ α11 x + α11x2)=𝜶𝟏𝟐 + 𝜶𝟓𝒙 + 𝜶 𝟏𝟒 𝒙 𝟒 Ω(x)=(S(x)𝜎 𝑥 )mod x4 = 𝜶𝟏𝟐 + 𝜶𝟓 𝒙 x4 𝜶𝟏𝟐 + 𝜶𝟓𝒙 + 𝜶 𝟏𝟒 𝒙 𝟒 𝜶 14 𝜶𝟏𝟐 + 𝜶𝟓𝒙 Example 6
  • 28.
    𝒚𝒋 = 𝒙𝒋 𝟏−𝒃 𝜴(𝒙𝒋 −𝟏 ) 𝛔′𝒙𝒋 −𝟏 σ x = 1+ α11 x + α11x2 σ′ 𝑥𝑗 −1 = 𝜶 𝟏𝟏 Ω(x) = 𝜶𝟏𝟐 + 𝜶𝟓𝒙 𝑦1 = 𝜶 𝟗 𝛼12+𝛼5.𝛼6 𝛼 11 = 𝜶 𝟗 𝛼 12 +𝛼11 𝛼11 = 𝛼13 𝑦2 = 𝜶𝟐 𝛼12+𝛼5.𝛼13 𝛼11 = 𝜶 𝟐 𝛼12+𝛼18 𝛼11 = 𝛼 e(x)=α13x9+ αx2 C(x)=r(x)+e(x)= x14 + α x13 + α4 x12 + α2 x11 + α8 x10 + α7 x9 + α10 x8 + α3 x7 + α14 x6 + α9 x5 + α7 x4 + α4 x3 + x2 + α6 x + α6 + α13x9+ αx2 Example 6
  • 29.
    Using the B-Malgorithm, decode the received vector r= (000 000 100 000 100 000 000) for the RS code CRS (7,3), over GF (23) (prime polynomial Pi(x)=1+x2+x3). • Solution: According to the received vector, converted into its polynomial form: 𝑟 𝑋 = 𝑋2 + 𝑋4 S0= 0 , S1= 𝛼5 , S2= 𝛼3 , S3=𝛼3 • 𝑲 = 𝟏 : • 𝐾 = 1 𝑠𝑜 𝑇 𝑋 = 𝑋 , 𝐿 = 0 𝑠𝑜 𝜎 𝑋 = 1 • Δ = 𝑆𝑘−1 + 𝑖=1 𝐿 𝜎𝑖𝑆𝑘−1−𝑖 = 𝑆0 = 0 • 𝑇 𝑋 = 𝑋. 𝑇 𝑋 = 𝑋 . 𝑋 = 𝑋2 • Increment 𝐾 → 2 ≤ 2𝑡 = 4, so continue. Example 7
  • 30.
    • 𝑲 =𝟐 : • 𝐾 = 2 𝑠𝑜 𝑇 𝑋 = 𝑋2, 𝐿 = 0 𝑠𝑜 𝜎 𝑋 = 1 • Δ = 𝑆1 = 𝛼5 • 𝜎∗ 𝑋 = 𝜎 𝑋 + ∆. 𝑇 𝑋 = 1 + 𝛼5 𝑋2 • 2𝐿 ≤ 𝐾 so: 𝐿 = 𝐾 − 𝐿 = 2 − 0 = 2 • 𝑇 𝑋 = 𝜎 𝑋 ∆ = 𝛼2 • 𝜎 𝑋 = 𝜎∗ 𝑋 = 1 + 𝛼5𝑋2 • 𝑇 𝑋 = 𝑋. 𝑇 𝑋 = 𝑋 . 𝛼2 = 𝛼2𝑋 • Increment 𝐾 → 3 ≤ 2𝑡 = 4, so continue. Example 7
  • 31.
    • 𝑲 =𝟑 : • 𝐾 = 3 𝑠𝑜 𝑇 𝑋 = 𝛼2𝑋 , 𝐿 = 2 𝑎𝑛𝑑 𝜎 𝑋 = 1 + 𝛼5𝑋2 • Δ = 𝑆2 + 𝜎1𝑆1 + 𝜎2𝑆0 = 𝛼3 + 0 + 0 = 𝛼3 • 𝜎∗ 𝑋 = 𝜎 𝑋 + ∆. 𝑇 𝑋 = 1 + 𝛼5 𝑋2 + 𝛼3 . 𝛼2 𝑋 = 1 + 𝛼5 𝑋 + 𝛼5𝑋2 • 2𝐿 > 𝐾 so: • 𝜎 𝑋 = 𝜎∗ 𝑋 = 1 + 𝛼5𝑋 + 𝛼5𝑋2 • 𝑇 𝑋 = 𝑋. 𝑇 𝑋 = 𝑋. 𝛼2𝑋 = 𝛼2 𝑋2 • Increment 𝐾 → 4 ≤ 2𝑡 = 4, so continue. Example 7
  • 32.
    • 𝑲 =𝟒 : • 𝐾 = 4 𝑠𝑜 𝑇 𝑋 = 𝛼2 𝑋2, 𝐿 = 2 𝑎𝑛𝑑 𝜎 𝑋 = 1 + 𝛼5𝑋 + 𝛼5𝑋2 • Δ = 𝑆3 + 𝜎1𝑆2 + 𝜎2𝑆1 = 𝛼3 + 𝛼5. 𝛼3 + 𝛼5. 𝛼5 = 𝛼 • 𝜎∗ 𝑋 = 𝜎 𝑋 + ∆𝑇 𝑋 = 1 + 𝛼5 𝑋 + 𝛼5 𝑋2 + 𝛼 𝛼2 𝑋2 = 1 + 𝛼5 𝑋 + 𝛼6𝑋2 • 2𝐿 = 𝐾, so, we skip some steps, then: • 𝜎 𝑋 = 𝜎∗ 𝑋 = 1 + 𝛼5 𝑋 + 𝛼6𝑋2 • 𝑇 𝑋 = 𝑋. 𝑇 𝑋 = 𝑋. 𝛼2 𝑋2 = 𝛼2𝑋3 • Increment 𝐾 → 5 > 2𝑡 = 4, so the process is complete and: • 𝜎 𝑋 = 𝛼6𝑋2 + 𝛼5𝑋 + 1 Example 7
  • 33.
    • The rootsof 𝜎 𝑋 is 𝛼3 and 𝛼5 i.e. X1= 1 𝛼3 = 𝛼4, X2= 1 𝛼5 = 𝛼2 which mean the error locations. • 𝑆 𝑋 = 0 + 𝛼5𝑋 + 𝛼3𝑋2 + 𝛼3𝑋3. • 𝛺 𝑋 = 𝑆 𝑋 𝜎 𝑋 𝑚𝑜𝑑𝑋2𝑡 𝜶𝟓 𝑿 + 𝜶𝟔 𝑿𝟒 + 𝜶𝟐 𝑿𝟓 ) 𝑴𝒐𝒅 𝑿𝟒 • 𝛺 𝑋 = 𝜶𝟓𝑿 = 𝑟𝑒𝑚(𝑋) • 𝜎′ 𝑋𝑗 −1 = 𝛼5 • Calculating the error values: • 𝑌 𝑗 = 𝑋𝑗 1−0 𝛼6𝑋𝑗 −2 +1 𝛼5 • 𝑌1 = 𝜶𝟒 𝜶𝟓.𝜶𝟑 𝜶𝟓 = 𝜶𝟕 = 𝟏 • 𝑌2 = 𝜶𝟐 𝜶𝟓.𝜶𝟓 𝜶𝟓 = 𝜶𝟕= 𝟏 • 𝒆 𝑿 = 𝑿𝟐 + 𝑿𝟒 • ∴ 𝐶 𝑋 = 𝑟 𝑋 + 𝒆 𝑿 = 𝑋2 + 𝑋4 + 𝑿𝟐 + 𝑿𝟒 = 0 • The decoded vector is finally the all-zero vector.
  • 34.
    Application Of Reed-SolomonCodes • Data Storage:  Reed-Solomon is very widely used in mass storage systems to correct burst errors associated with media defects.  Special properties of Reed-Solomon codes make the sound quality of the CD as impressive as it is. Reed-Solomon is a main component of CD Compact Disc.  In CD a scheme known as Cross-Interleaved Reed Solomon Coding (CIRC) is used. • Bar Code:  All the two dimensional bar codes such as PDF-417, Maxi Code, Data matrix, QR Code, and Aztec Code use Reed-Solomon error correction to allow the correct reading even if some portions of bar code are damaged.  When the bar code symbol is not recognized by the bar code scanner it will treat it as an erasure. • Satellite Broadcasting:
  • 35.
    Spread-Spectrum Systems: Reed-Solomon codescan be used in designing the hopping sequences. If these sequences are carefully selected, the interference caused by the other users in a multiple access environment can be greatly reduced • Error Control for Systems with Feedback: Wicker and Bartz examined various means for using Reed-Solomon codes in applications that allow transmission of information from receiver to the transmitter. These applications include mobile data transmission systems and high reliability military communication systems • Ultra Wideband (UWB): UWB is a wireless technology for transmitting the digital data at very high rates over a wide spectrum of frequency by using very low power. It makes it possible to transmit data at rate over 100Mbps within 10 meters. To preserve the important header information, Reed-Solomon (23, 17) code. In receiver, RS decoder needs high speed and low latency and for this efficient hardware is used
  • 36.
    As a givenin Ex:4 %RS ( 7 , 3 ),t=2,g(x) = (α3 + α x+ α3 x3+ x4) msg= x2+x enc & dec % C(x)= x6+x5 + α x3 + α3 x + α clc;clear; m = 3; % Number of bits per symbol n = 2^m - 1; % Codeword length k = 3; % Message length %% msg = gf([1 1 0],m) % Create three messages based on GF(8) %% ccode = rsenc(msg,n,k) % Generate RS (7,3) codewords disp('C(x)= x6+x5 + ax3 + a3 x + a') %% errors = gf([2 0 0 0 0 5 0],m) %% noisycode = ccode + errors %% [txcode,cnumerr] = rsdec(noisycode,n,k) NOTE The capaability of correcting error(t) cnumerr =-1 if the errors no exceed the capability means errors > t
  • 37.
    • Bernard Sklar,”Digital Communication Fundamentals and Applications”, Prentice Hall PTR, Upper Saddle River, New Jersey, 2007. • Dr. Ahmed. A, “Channel Coding”, Lecture notes. • • C.K.P. Clarke, “Reed-Solomon error correction”, R&D White Paper, July 2002. References