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 .
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
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