paper-3 applications of rs code in real world implementation
TRANSCRIPT
-
7/30/2019 Paper-3 Applications of RS Code in Real World Implementation
1/12
International Journal of Computational Intelligence and Information Security, November 2012 Vol. 3, No. 9
ISSN: 1837-7823
20
Applications of RS code in Real World Implementation
Deepa TiwariMTech Scholar, Faculty of Engineering and Technology, Mewar University,
NH-79,Gangrar,Chittorgarh, Rajasthan,India
AbstractThe main aim of any communication system is to transmit maximum data without degrading the quality using
minimum bandwidth. A study of RS code, a branch of block code is given in this paper when used in a cell
phone in concatenated with a convolutional encoder, improves the sound quality. In this paper the no. of errors
and their magnitude is analysed through Matlab software in a digital communication system. The transmission
quality depends on the bit error probability Pb at the receiver. Therefore its BER curve for AWGN channel usingFSK modulation scheme is also analysed for different code rates.
Keywords- Galois field arithmetic, RS code, Interleaving, RS encoding and decoding.
1. Introduction
In digital communication there are two types of Forward error control codes.
1-Convolutional Codes
2-Block Codes
The convolutional codes are the codes which have a memory and used the property of convolution. It convolves
the message with the impulse response of the system. The common techniques to decode this coding are Viterbi
Algorithm.
In the block codes the stream of the bits is divided in fixed length blocks which are referred to a frame.
The code word is formed by adding proper redundant bits in the message bits. Since each code is different from
the previous one. Therefore the code is memory less. RS codes are linear block codes. In burst error channel the
code which suited best is RS code because of their capability to translate consecutive corrupted bits to few
erroneous symbols.
Reed Solomon code is the popular block codes which operate on m-bit symbols, not bits. As its name
implies it is discovered by Irving S. REED and GHUS SOLOMAN in 1960. The RS codes are a class of non-
binary cyclic codes[1]. These codes are detected and correct the errors in symbols. In binary codes the magnitude
of the error is always one, but in RS codes we have to find out the magnitude and location of the error both. This
difference can separate RS codes from Binary codes. The RS codes works in Galois field like other codes but themain difference between other codes and RS is here the base field and the extension field are taken to be the
same. RS codes are the most used codes in practical and real world implementations. Since RS codes are non
binary so the code word symbols are transmitted in the form of a string of bits across a binary channel Because
Reed-Solomon codes detect and correct symbol errors rather than bit errors. In fact the main difference in both
the codes is that the RS codes symbols are lies in GF (q), in which the q is a prime number or any power of a
prime number.
A cyclic RS code can be implemented for extending the length to q or even for q+ but the output code
will no longer be cyclic [2] for example the field GF (256) can be represented as an 8 bit sequence or byte oflength 255, so it is very popular error correction coding. Reed-Solomon codes can be used to perform a form of
forward error correction in computer networks. The specific type of correction is called erasure correction.
Mostly the channel error comes in bursts like in a CD. Any scratch can cause errors in several consecutive bursts
or in a hard disc or in a tape any blemish in magnetic medium may cause errors. The conventional block error
correction code is not sufficient for that purpose. A single error burst can lead to many errors in code words so it
needs a strong coding system which is suitable for bursting errors.
2. Finite field ArithmeticIt is the requirement of the RS codes principle to understand the operation in finite field called Galois field
named to its inventor ""EVARISTE GALOIS"(1811-1832 the fields which are having the finite number of
elements called finite field. The fields are expressed as GF (q) where q is the base field elements. The roots of
the polynomials are used to construct the field. RS code is a q -ary bch code having block length q-1,let q=2m so
-
7/30/2019 Paper-3 Applications of RS Code in Real World Implementation
2/12
International Journal of Computational Intelligence and Information Security, November 2012 Vol. 3, No. 9
ISSN: 1837-7823
21
symbols and the roots are lies in GF(2m), a t error correcting RS code is a non-binary cyclic code having
generator polynomial is the least degree polynomial with ,2,
3,.................
2tas its roots and the alpha belongs
to GF(2m) the minimal polynomial of GF(2
m) of an element alpha in GF(2
m) is the factor of r=X+ So the
generator polynomial of RS code is as G(X)=(X+)(X+2)................(X+2t) ,The degree of a RS(n,k) cycliccode is (n-k=2t).Since dmin=2t+1 (here 2t can be replaced by n-k) therefore dmin=n-k+1, so we can say that RS
codes takes the max distance[3]. Therefore we can say it belongs to a class of maximum distance code (MDS).
2.1 Additive and multiplicative inverseFor learning finite field arithmetic we need to learn the additive and multiplicative inverse of a finite field.
The additive inverse of a is -a and the multiplicative inverse of a is a- 1 (a~=0).Therefore subtraction of two field
elements can be done as adding the additive inverse of one to other for example a-b=a+(-b), the division of two
elements is as multiplying one by the multiplicative inverse of other. for example a/b=a*b-1.In GF(q) If q is a
prime number or any powers of prime number then this field is called the primitive field.
Table 1: Addition and multiplication in Galois Field(GF)
2.2 Irreducible PolynomialA polynomial is called irreducible over GF (2) if it is not divisible by any polynomial over GF (2) of a
positive & non zero degree having lower than m. For example if a polynomial is having even no. of terms then it
is divisible by X+1.
The polynomial of degree 2 X2,X
2+1,X
2+X are divisible by X or X+1 so the polynomials are not
irreducible. But X2+X+1 is an irreducible polynomial because they are not divisible by any polynomial of degree
one .so the polynomial X2+X+1 are an irreducible of degree 2. Similarly the polynomial X3+X+1 and X4+X+1 is
an irreducible over GF (2) of degree 3 and 4 continuously. So we can say that if m>=1 the irreducible
polynomial does exists.
2.3 Irreducible and Primitive PolynomialsThe polynomials for GF (23) GF (24) and GF (25) is X3+X+1, X4+X+1 and X5+X2+1 continuously. The each
polynomial can be factorized by only 1 and the polynomial itself. So these polynomials are irreducible and
primitive polynomials. The table is shown below for these irreducible primitive polynomials of degree m.
-
7/30/2019 Paper-3 Applications of RS Code in Real World Implementation
3/12
International Journal of Computational Intelligence and Information Security, November 2012 Vol. 3, No. 9
ISSN: 1837-7823
22
Table 2: List of some Primitive Polynomial.
For any positive integer m there must be at least one irreducible polynomial of degree m. The irreduciblepolynomial of degree m divides Xr +1 where r=2m-1.This test can be used to identify the irreducible polynomial
(but this condition is not for some special cases). For example X3+X+1 will divide X7+1 and gives X4+X2+X+1
quotient and remainder zero so X3+X+1 is irreducible [7]. Similarly X
4+X+1 will divide X
15+1 and gives the
quotient X11+X8+X7+X5+X3+X2+X+1 and remainder zero. So X4+X+1 is an irreducible polynomial.
2.4 Test for primitiveIn continuation of test for irreducible we can now able to show that X3+X+1 should not divide other than
X7+1 we divide X
6+1 by X
3+X+1 and find that remainder is X
2it means full division is not possible so we can
say that X3+X+1 is primitive.
3. A case study
Figure1: Block diagram of speech coding system for a mobile
The microphone transforms the sound waves of our voices (and other generated noise) into an electrical signal
Since GSM is a digital system, so this analog signal cant be used in GSM network. Therefore it has to be
converted into digital form [4]. This is accomplished by A/D converter.
We have to compress the input data of sound wave, so the analog signal is inputted into a band pass filter. Band
pass filter only allows a desirable frequency range to pass through it, and all undesired signals are cut off,or attenuated. This compressed analog signal is processed to A/D converter. In the cell phone, the analog signal
which is generated by a microphone is passed to the A/D converter. The A/D converter measures the analog
signal, or samples it 8000 times per second. ADC takes a sample of the output of the Band pass signal every .125
sec or 125 s. Each sample is quantized with a 14-bit data block. 14 bits per sample at 8000 samples per second,
-
7/30/2019 Paper-3 Applications of RS Code in Real World Implementation
4/12
International Journal of Computational Intelligence and Information Security, November 2012 Vol. 3, No. 9
ISSN: 1837-7823
23
we calculate a data rate of 112,000 bits per second, or 112 kb/s. A data rate of 112 kbps is very large. and is
impractical to handle by a radio transmitter. For reducing the bitrate, the signal is passed through a speech
encoder.
The speech encoder compresses the data of a speech signal. Many speech encoding schemes are available.
The scheme used in GSM is referred as the Linear Predictive Coding (LPC). The ADC quantifies each audio
sample by a 14-bit "word". In LPC, 280 of the 14-bit samples from the converter are saved up and stored intoshort-term memory. The sample is taken at every 125 s, this audio block having 2240 bits. LPC analyses each
block of data and finds 8 coefficients which are used for filtering. LPC identifies some specific bits that can be
correlate with specific characteristics of human voice, like a vocal system of human (teeth, tongue, etc.) and
relate coefficients to them. The excitation signal can be relate to the things such as pitch and loudness. LPC can
recognize a number of parameters of human voice and redundancies in human speech and removes them. TheLPC sequence is sent to a Long-Term Prediction (LTP) Analysis tool. The LTP function compares the sequence
it receives with the reference stored in its memory and chooses the sequence which most resembles the sequence
of the current analysis. The LTP function now calculates the difference between these two sequences. The LTP
function now translates the difference value with a pointer indicating earlier sequence it used for doing
comparison. this action prevents encoding of the redundant data using LPC and LTP, the speech encoder reduces
(compresses) the 20ms block from 2,240 bits to 280 bits.as we see that this is a reduction by eight times. 280 bits
every 20ms gives us a net data rate of 14 kilobits per second (kbps).
To prevent the sound quality degradation from handset to base station transmitter using radio link, the data
stream is put through a series of error detection and error correction procedures called error correction coding.
The first phase of channel coding is called linear block coding. In this module RS coding is used now RS coding
adds 3 parity bits with 4 tail bits, so, a 280-bit code becomes a 287-bit code. This block of 287-bit is then fed into
a convolutional code. When the last data bit enters the register, it uses the remaining four bits to calculate the
redundancy bit for the last data bit. After convolutional coding, now the audio block is 456 bits, nothing can be
done if the entire 456-bit block of data is lost or some burst of errors is occur. For protecting data against burst
errors, the bits have to arrange in different order and partitioned to eight individual sub-blocks. If one sub-block
will be lost or corrupted then only one-eighth of the data of each audio block will be lost and it can be recovered
through the convolutional code on the decoder. This process of changing the order and making partition is called
interleaving. Interleaving is done in a block called Interleaver and in the decoder the de-interleaving process is
done.
4. InterleavingPractically the best method to correct burst errors is interleaving but in theory it is the worst method to deal
with burst errors. The best error structure can be spoiled by the interleave[5] and it make the error random. An
interleave takes a sequence of symbols and permutes them. At the receiver the sequence is permuted back into
original order by a de-interleaver. Interleaver has a good ability in dealing with burst of errors. because it
shuffles the symbols at the receiver. Block interleaver is very popular for this purpose. block interleaving is also
a permutation formatting that is opposite of the permutation done for interleaving, this ensures that the original
data is correctly restored from the interleavers output data. Interleaving is of two kinds one is block interleaving
and other is cross interleaving or convolutional interleaving. Here we explained only block interleaving.
4.1 Block InterleavingBlock interleaving can be done in two types in row and in column. A block is an array of n Rows and m
columns.
Figure 2: Block Interleaving
-
7/30/2019 Paper-3 Applications of RS Code in Real World Implementation
5/12
International Journal of Computational Intelligence and Information Security, November 2012 Vol. 3, No. 9
ISSN: 1837-7823
24
4.2 Row Interleaving
The row 2 is replaced by row 1 and row 3 is replaced by row 2 and row 1 is replaced by row 3 in the encoding
end.
4.3 Column Interleaving
The column (4,2,1,3) means column 4 is replaced by column 1, column 2 is not changed. column 1 is replaced by
column 3 and column 3 is replaced by column 4.
-
7/30/2019 Paper-3 Applications of RS Code in Real World Implementation
6/12
International Journal of Computational Intelligence and Information Security, November 2012 Vol. 3, No. 9
ISSN: 1837-7823
25
4.4 De-Interleaving in the decoding end
In de-interleaving first we revert back the changes in column matrix then in row and see how we get the original
data back. The biggest side effect of the interleaving techniques is the latency of the system it increases latency.
Also structure of the error is not defined. Other advanced decoding algorithms can be used in place of inerleaver
and achieve more reliable communication.
5. RS EncoderThe RS Encoding has the 3 most important parameters that is (n,k,t). where n is the number of symbols per
code word, k is the number of message symbols and t is the capability of the encoder to correcting the symbol
error. Since n-k=2t so t=n-k/2. The generator polynomial can therefore be expressed as below
G(X) = g0 + g1X+ g2X2
+ + g2t- 1X2t- 1
+X2t
for example for an (15,11) error correcting code t=n-k/2, t=15-11/2=2, so it will correct two errors. Since 2t=4
so it will have 4 roots and the generator polynomial will look like this G(X)=(X-) (X-2) (X-
3) (X-4)
by solving this we get the generator polynomial as follows
G(X)=3 - X + X
2 - 3X3 + X4..................................(a)
but we know = -, putting it in equation (a) we get
G(X)=3+ X + X
2+ 3X3 + X4...................................(b)
5.1 Systematic EncoderThe systematic encoding of RS codes is done in Linear Feedback Shift Register (LFSR) the message
polynomial m(x) is shifted into the right most k stages of a code word [6]. After that the code word is appended
by a parity polynomial p(x) in the leftmost (n-k) stages.
-
7/30/2019 Paper-3 Applications of RS Code in Real World Implementation
7/12
International Journal of Computational Intelligence and Information Security, November 2012 Vol. 3, No. 9
ISSN: 1837-7823
26
Figure 3: Systematic Encoder
The operation of the LFSR is explained below [7]
When switch (1) is closed, the first k clock cycles is allowed to shift the message symbols in the shift register.
When switch 2 is in downward Position, the first k close cycles allow the direct transfer of the message symbols
to the output of the LFSR. When switch 1 open & switch 2 in upward position (closed). Now the parity symbolsin the shift register by shifting them to the output of the LFSR with the help of the (n-k) clock cycles. When the n
clock cycles ends .Then the o/P contents of the LFSR is p(X)+Xn-k m(X) where p(X) is the parity symbols and
m(X) is the message polynomials.
For Example if we take the symbols 010,110,111 it means 010 , and 110 means 3,and 111 means
5 the
rightmost symbol is the first symbol.
Table 3: LFSR Operation
Input Clock cycles Register Contents feedback 0 0 0 0 0
5
1 1
5
1
0
2 3 0
2
2
4
- 3 -
When the third clock cycle is over, then the register contains the four parity symbols, 0,
2,
4, and
6, which is
shown in the table above. After that switch 1 of the LFSR circuit is opened, switch 2 is connected to the upward
position, and the register contents which are four parity symbols shifted to the output of the LFSR. So the output
of the LFSR having the code word, C(X), which can be written in the polynomial form.
So the output word is
C(X)= 0
+ 2X +
4X
2+
6X
3+
1X
4+
3X
5+
5X
6
= (100) + (001) X + (011) X2
+ (101) X3
+ (010) X4
+ (110) X5
+ (111) X6
So we can say that the roots are same for the codeword as well as for generator polynomial. So a valid code word
is in the following form C(X)=m(X)*G(X) and the other evaluated code word at any root of G(X) must yields
zero.
-
7/30/2019 Paper-3 Applications of RS Code in Real World Implementation
8/12
International Journal of Computational Intelligence and Information Security, November 2012 Vol. 3, No. 9
ISSN: 1837-7823
27
Table 4: Some standard RS code with their parameters
6. Decoding of RS CodesA logical approach for decoding the RS code is shown in the form of a flow chart in the figure below.
Figure 4: Steps in the decoding of the RS code
-
7/30/2019 Paper-3 Applications of RS Code in Real World Implementation
9/12
International Journal of Computational Intelligence and Information Security, November 2012 Vol. 3, No. 9
ISSN: 1837-7823
28
The decoder receives the encoded code word and detects the error with the help of check symbols [8]. As soon
as the decoder receives the encoded code word it detect the errors with the help of checksymbols and correctsthem. Due to the noise present in the channel the decoded code word may differ from the original code word,
now using the different polynomials to detects the location and magnitude of the error.
The Received code word is in the form , R(x)=Transmitted code word R(x)+E(x)
The following steps are used in the decoding of the RS encoded code word.1. In the first step a syndrome polynomial is to be generated. Then an error polynomial is generated. Sothat we can locate the error.
The error can be located using any of the 4 methods given.
Figure 5: Taxonomy of Error Locating Polynomial
2. Computation of the roots of the error locator polynomial. The method used in this process is ChienSearch. When the decoder determines the error locator polynomial then the decoder calculates the
polynomial so that the location of the error can be find out. The method generally used is a trial and
error method referred as chien search. In which the decoder replaces the every possible root -e
the e is
the location in the code word into the error locator polynomial. If the result is zero it means that there is
an error in that particular location.
3. When the error location is known the decoder uses the forneys equation and find the value of the error.Since RS codes are non-binary therefore the error values must also be computed by the followingformula.
Then the equation of the error locator polynomial can be expressed as
The error evaluator polynomial can be expressed as
Where t is the no. of check symbols divide by 2
7.Analysis and findings
7.1 Analysis of errors using Matlab software.The simulation is run for 2 times. One time sample message is taken for GF( 2
5) and the sample of
the transmitted message taken is 0, the length of the code is 25-1=31.the other time the transmitted
message sample is taken 1, the length of the code is 24-1=15,the error is introduced. After simulating
-
7/30/2019 Paper-3 Applications of RS Code in Real World Implementation
10/12
International Journal of Computational Intelligence and Information Security, November 2012 Vol. 3, No. 9
ISSN: 1837-7823
29
the error magnitude ,error location and the corrected message is find out. We transmitted the message
in first case zero(0) since the length of the message is 31,so the message is 31 times 0.the error is
introduced in the 3,5,6 locations ,and the magnitude of the error is 2,3,2 continuously, so after error
correction the original message is recovered similarly in the other case the message.
Figure 7: Screen Shot of transmitted and received sequence using Matlab
7.2 Analysis for BER Vs Eb/No using Matlab
BER Vs Eb/No curve for different RS Codes using Matlab [14] over AWGN channel, for FSK
modulation is shown in figure. 8
-
7/30/2019 Paper-3 Applications of RS Code in Real World Implementation
11/12
International Journal of Computational Intelligence and Information Security, November 2012 Vol. 3, No. 9
ISSN: 1837-7823
30
Figure 8: BER Vs Eb/No for RS Code over AWGN channel, for FSK modulation
As we can see from the BER Vs Eb/No curve that the BER is an exponentially decreasing function of
block length.so with the increasing code length the BER improves. It is observed from the above curve
that large code size reduces the noise means increases the signal. observation is taken for 5 different
types of codes shown in Table 5.
Table 5: The Analysed data
Code length RS code Set Code Rate Error correcting
capability(t)
7 RS(7,3) .428 2
15 RS(15,11) .738 2
31 RS(31,21) .677 5
63 RS(63,39) .619 12
255 RS(255,183) .717 36
8. ConclusionIn mobile communication the signal travels from handset to the base station transmitter because of the data
loss due to fading and other atmospheric conditions sound quality degrades. Many softwares and hardwaresare available in the market in different forms for both the encoder and decoder. These soft encoding and
decoding process can be implemented in different supported platforms like c/c++ , matlab, code composer
studio, and in VHDL. Which may use many digital signal processing architectures like TMS320C5X series,
TMS320C6X series.
For protecting the sound quality in cell phone the data stream is passed through the RS error correction
modules which is used as a concatenated code with an interleaver to lower the error rate and enhances the quality
of data transmission.RS codes are also used in deep space communication, Consumer Electronics(like in CDs,
DVDs, Blue ray disks. A pair of cross-interleaved Reed- Solomon codes is used in a compact disk system),
Spread spectrum systems, data transmission technologies-DSL and wimax, in broadcast system -DVB, ATSC.
The encoding and decoding techniques of RS code is very efficient. It has a good burst error correcting
capability. For making the mobile and optical communication system reliable communication medium the RS
codes are the best error correcting codes that can give the reliability performance in the field of mobilecommunication. Since RS codes are very nearer to obtaining the Shanons limit, so in future it can also be used
-
7/30/2019 Paper-3 Applications of RS Code in Real World Implementation
12/12
International Journal of Computational Intelligence and Information Security, November 2012 Vol. 3, No. 9
ISSN: 1837-7823
31
in every digital communication field including in the next generation of mobile phones ,other space missions and
the next generation of RAID(after RAID 6).
References
[1] I.S. Reed and G. Solomon,(1960) Polynomial Codes Over Certain Finite Fields, SIAM Journal of Applied
Mathematics, vol. 8, pp. 300304.[2] S. B. Wicker,(1995), Error control systems for digital communication and storage, Prentice hall.
[3] Salvatore Gravano Introduction to Error Control Codes,Oxford university of Press.[4] www.gsmfordummies.com
[5] Todd K. Moon,(1995), Error correction coding Mathematical Methods and Algorithms, JOHN WILEY & SONS,INC., PUBLICATION.
[6] .Shu Lin and D.J.Costello ,(1983), Error Control Coding fundamental and Applications, Prentice hall.
[7] Bernard Sklar,(2001), Digital Communications (Fundamental and Applications), 2nd Edition. Prentice
Hall
[8] Lionel Biard, Dominique Noguet (2008) Reed-Solomon Codes for Low Power Communications,Journalof communications, Vol. 3, No. 2.
[9] Anish S. Sanghvi, Nishant B. Mishra, Rajkumar Waghmode and Kiran T. Talele (2011) Performance of
Reed-Solomon Codes in AWGN Channel, International Journal of Electronics and Communication
Engineerin, Volume 4, pp. 259-266.
[10] Reed-Solomon II (May 2011),Mega-Core Function User Guide Altera
[11] Saurabh Mahagan and Gurupadam Singh (2011), Reed-Solomon Code Performance for M-ary Modulation
over AWGN Channel, International Journal of Engineering Science and Technology (IJEST),Vol. 3 No.1.
[12] NPTEL lesson 34 block codes (IIT Kharagpur).
[13] www.wikipedia.com
[14]www.mathworks.com
http://www.mathworks.com/http://www.mathworks.com/http://www.mathworks.com/http://www.mathworks.com/