SlideShare a Scribd company logo
1 of 38
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
RS Code Encoder & Decoder

More Related Content

What's hot

Error Control Coding -Introduction
Error Control Coding -IntroductionError Control Coding -Introduction
Error Control Coding -IntroductionBurdwan University
Β 
7 convolutional codes
7 convolutional codes7 convolutional codes
7 convolutional codesVarun Raj
Β 
Bch and reed solomon codes generation in frequency domain
Bch and reed solomon codes generation in frequency domainBch and reed solomon codes generation in frequency domain
Bch and reed solomon codes generation in frequency domainMadhumita Tamhane
Β 
Implementation of reed solomon codes basics
Implementation of reed solomon codes basicsImplementation of reed solomon codes basics
Implementation of reed solomon codes basicsRam Singh Yadav
Β 
Error control coding using bose chaudhuri hocquenghem bch codes
Error control coding using bose chaudhuri hocquenghem bch codesError control coding using bose chaudhuri hocquenghem bch codes
Error control coding using bose chaudhuri hocquenghem bch codesIAEME Publication
Β 
5 stream ciphers
5 stream ciphers5 stream ciphers
5 stream ciphersHarish Sahu
Β 
Turbo codes.ppt
Turbo codes.pptTurbo codes.ppt
Turbo codes.pptPrasant Barik
Β 
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE ShivangiSingh241
Β 
Digital Communication: Information Theory
Digital Communication: Information TheoryDigital Communication: Information Theory
Digital Communication: Information TheoryDr. Sanjay M. Gulhane
Β 
Linear block coding
Linear block codingLinear block coding
Linear block codingjknm
Β 
Information Theory and coding - Lecture 2
Information Theory and coding - Lecture 2Information Theory and coding - Lecture 2
Information Theory and coding - Lecture 2Aref35
Β 
Worldwide attacks on SS7/SIGTRAN network
Worldwide attacks on SS7/SIGTRAN networkWorldwide attacks on SS7/SIGTRAN network
Worldwide attacks on SS7/SIGTRAN networkP1Security
Β 
Channel coding
Channel codingChannel coding
Channel codingPiyush Mittal
Β 

What's hot (20)

Reed solomon codes
Reed solomon codesReed solomon codes
Reed solomon codes
Β 
Turbo code
Turbo codeTurbo code
Turbo code
Β 
Information theory
Information theoryInformation theory
Information theory
Β 
Error Control Coding -Introduction
Error Control Coding -IntroductionError Control Coding -Introduction
Error Control Coding -Introduction
Β 
7 convolutional codes
7 convolutional codes7 convolutional codes
7 convolutional codes
Β 
Bch and reed solomon codes generation in frequency domain
Bch and reed solomon codes generation in frequency domainBch and reed solomon codes generation in frequency domain
Bch and reed solomon codes generation in frequency domain
Β 
Implementation of reed solomon codes basics
Implementation of reed solomon codes basicsImplementation of reed solomon codes basics
Implementation of reed solomon codes basics
Β 
Error control coding using bose chaudhuri hocquenghem bch codes
Error control coding using bose chaudhuri hocquenghem bch codesError control coding using bose chaudhuri hocquenghem bch codes
Error control coding using bose chaudhuri hocquenghem bch codes
Β 
5 stream ciphers
5 stream ciphers5 stream ciphers
5 stream ciphers
Β 
Chap 3
Chap 3Chap 3
Chap 3
Β 
Turbo codes.ppt
Turbo codes.pptTurbo codes.ppt
Turbo codes.ppt
Β 
Ece414 chapter3 w12
Ece414 chapter3 w12Ece414 chapter3 w12
Ece414 chapter3 w12
Β 
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
Β 
Channel coding
Channel coding  Channel coding
Channel coding
Β 
Digital Communication: Information Theory
Digital Communication: Information TheoryDigital Communication: Information Theory
Digital Communication: Information Theory
Β 
Linear block coding
Linear block codingLinear block coding
Linear block coding
Β 
MIMO in 4G Wireless
MIMO in 4G WirelessMIMO in 4G Wireless
MIMO in 4G Wireless
Β 
Information Theory and coding - Lecture 2
Information Theory and coding - Lecture 2Information Theory and coding - Lecture 2
Information Theory and coding - Lecture 2
Β 
Worldwide attacks on SS7/SIGTRAN network
Worldwide attacks on SS7/SIGTRAN networkWorldwide attacks on SS7/SIGTRAN network
Worldwide attacks on SS7/SIGTRAN network
Β 
Channel coding
Channel codingChannel coding
Channel coding
Β 

Similar to RS Code Encoder & Decoder

Signyourd digital signature certificate provider
Signyourd   digital signature certificate providerSignyourd   digital signature certificate provider
Signyourd digital signature certificate providerKishankant Yadav
Β 
Integration techniques
Integration techniquesIntegration techniques
Integration techniquesKrishna Gali
Β 
Rosser's theorem
Rosser's theoremRosser's theorem
Rosser's theoremWathna
Β 
Rsa documentation
Rsa documentationRsa documentation
Rsa documentationFarag Zakaria
Β 
Precalculus 1 chapter 2
Precalculus 1 chapter 2Precalculus 1 chapter 2
Precalculus 1 chapter 2oreves
Β 
Matlab differential
Matlab differentialMatlab differential
Matlab differentialpramodkumar1804
Β 
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docxDivide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docxjacksnathalie
Β 
Calculus 08 techniques_of_integration
Calculus 08 techniques_of_integrationCalculus 08 techniques_of_integration
Calculus 08 techniques_of_integrationtutulk
Β 
Natural and Clamped Cubic Splines
Natural and Clamped Cubic SplinesNatural and Clamped Cubic Splines
Natural and Clamped Cubic SplinesMark Brandao
Β 
It3416071612
It3416071612It3416071612
It3416071612IJERA Editor
Β 
Informe laboratorio nΒ°1
Informe laboratorio nΒ°1Informe laboratorio nΒ°1
Informe laboratorio nΒ°1luisescobedo38
Β 
Tensor Train data format for uncertainty quantification
Tensor Train data format for uncertainty quantificationTensor Train data format for uncertainty quantification
Tensor Train data format for uncertainty quantificationAlexander Litvinenko
Β 
Hamming codes
Hamming codesHamming codes
Hamming codesGIGI JOSEPH
Β 
functions limits and continuity
functions limits and continuityfunctions limits and continuity
functions limits and continuityPume Ananda
Β 
Functions limits and continuity
Functions limits and continuityFunctions limits and continuity
Functions limits and continuitysudersana viswanathan
Β 
2018 mtap for g10 with answers
2018 mtap for g10 with answers2018 mtap for g10 with answers
2018 mtap for g10 with answersJashey Dee
Β 
Algebra Revision.ppt
Algebra Revision.pptAlgebra Revision.ppt
Algebra Revision.pptAaronChi5
Β 

Similar to RS Code Encoder & Decoder (20)

Signyourd digital signature certificate provider
Signyourd   digital signature certificate providerSignyourd   digital signature certificate provider
Signyourd digital signature certificate provider
Β 
Integration techniques
Integration techniquesIntegration techniques
Integration techniques
Β 
Rosser's theorem
Rosser's theoremRosser's theorem
Rosser's theorem
Β 
Rsa documentation
Rsa documentationRsa documentation
Rsa documentation
Β 
Precalculus 1 chapter 2
Precalculus 1 chapter 2Precalculus 1 chapter 2
Precalculus 1 chapter 2
Β 
Matlab differential
Matlab differentialMatlab differential
Matlab differential
Β 
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docxDivide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Β 
Calculus 08 techniques_of_integration
Calculus 08 techniques_of_integrationCalculus 08 techniques_of_integration
Calculus 08 techniques_of_integration
Β 
Natural and Clamped Cubic Splines
Natural and Clamped Cubic SplinesNatural and Clamped Cubic Splines
Natural and Clamped Cubic Splines
Β 
It3416071612
It3416071612It3416071612
It3416071612
Β 
Informe laboratorio nΒ°1
Informe laboratorio nΒ°1Informe laboratorio nΒ°1
Informe laboratorio nΒ°1
Β 
Tensor Train data format for uncertainty quantification
Tensor Train data format for uncertainty quantificationTensor Train data format for uncertainty quantification
Tensor Train data format for uncertainty quantification
Β 
Hamming codes
Hamming codesHamming codes
Hamming codes
Β 
functions limits and continuity
functions limits and continuityfunctions limits and continuity
functions limits and continuity
Β 
DEV Project
DEV ProjectDEV Project
DEV Project
Β 
Functions limits and continuity
Functions limits and continuityFunctions limits and continuity
Functions limits and continuity
Β 
RSA ALGORITHM
RSA ALGORITHMRSA ALGORITHM
RSA ALGORITHM
Β 
2018 mtap for g10 with answers
2018 mtap for g10 with answers2018 mtap for g10 with answers
2018 mtap for g10 with answers
Β 
1050 text-bop
1050 text-bop1050 text-bop
1050 text-bop
Β 
Algebra Revision.ppt
Algebra Revision.pptAlgebra Revision.ppt
Algebra Revision.ppt
Β 

Recently uploaded

CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
Β 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
Β 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
Β 
Call Us ≽ 8377877756 β‰Ό Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 β‰Ό Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 β‰Ό Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 β‰Ό Call Girls In Shastri Nagar (Delhi)dollysharma2066
Β 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoΓ£o Esperancinha
Β 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
Β 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
Β 
πŸ”9953056974πŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
πŸ”9953056974πŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...πŸ”9953056974πŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
πŸ”9953056974πŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...9953056974 Low Rate Call Girls In Saket, Delhi NCR
Β 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
Β 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
Β 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
Β 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
Β 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
Β 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
Β 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
Β 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
Β 
EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIkoyaldeepu123
Β 

Recently uploaded (20)

CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
Β 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
Β 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
Β 
Call Us ≽ 8377877756 β‰Ό Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 β‰Ό Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 β‰Ό Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 β‰Ό Call Girls In Shastri Nagar (Delhi)
Β 
young call girls in Rajiv ChowkπŸ” 9953056974 πŸ” Delhi escort Service
young call girls in Rajiv ChowkπŸ” 9953056974 πŸ” Delhi escort Serviceyoung call girls in Rajiv ChowkπŸ” 9953056974 πŸ” Delhi escort Service
young call girls in Rajiv ChowkπŸ” 9953056974 πŸ” Delhi escort Service
Β 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Β 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
Β 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
Β 
πŸ”9953056974πŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
πŸ”9953056974πŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...πŸ”9953056974πŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
πŸ”9953056974πŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
Β 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
Β 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Β 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
Β 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
Β 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
Β 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
Β 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
Β 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
Β 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
Β 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
Β 
EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AI
Β 

RS Code Encoder & Decoder

  • 1. 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
  • 2. 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
  • 3. 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.
  • 4. 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).
  • 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 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
  • 8. 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.
  • 9. 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
  • 10. 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
  • 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 double error 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 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
  • 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 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
  • 16. 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
  • 17. 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
  • 18. 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.
  • 19. 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.
  • 20. 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 .
  • 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 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
  • 24. 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
  • 25. 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
  • 26. 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
  • 27. 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
  • 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-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
  • 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 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.
  • 34. 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:
  • 35. 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
  • 36. 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
  • 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