Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
SEMESTER PROJECT
Submitted in partial fulfillment of the requirements for the degree of
BACHELOR OF SCIENCE
In Electrical and Computer Engineering (electronics and communication
Stream)
February - 2017
Approval
This semester project has been approved in partial fulfillment of the requirements
for the degree of Bachelor of Science in electrical and computer engineering with
specialization in electronics and communication engineering.
Team Members:
Acknowledgment
We would like to thank our advisor Mr. Fekadu Mihert (M.Sc) who advised us attentively in
time scheduled to make us successful and complete the project on time. We are also great full for
Mr. Fasile (M.Sc), who has helped by giving friendly advice for our project . We would like to
thank the Electrical Engineering staff’s who have been in the mid presentation of our project, for
their supportive idea in our progress. Finally to all Electrical Engineering staff members who
cooperated us in giving the necessary information and materials.
Abstract
The information revolution is in full swing, having matured over the last 30 years. Now a days
the reliable information transmission is very essential so, this paper deals on the basic techniques
of error detection and correction, that helps for reliable information transmission and also the
performance comparison of these different techniques of error control coding. Error control
coding is a set of techniques which contains the basic principles in detecting and correcting the
errors by identifying the error location in the received information. The design phase consists of
encoder design, decoder design and channel simulation for each error control techniques. After
accomplishing this tasks we also done the performance analyzing.
List of Acronyms
List of Figure
Figure 1 a communication system (source and channel encoder) ................................................. 2
Figure 2 Block diagram of a FEC system ....................................................................................... 9
Figure 3 block diagram of an ARQ system .................................................................................. 10
Figure 4 a code word.................................................................................................................... 11
Figure 5 This figure shows the information bit and the parity bits .............................................. 11
Figure 6 Systematic Code ............................................................................................................ 13
Figure 7 Decoding Spheres of Radius t ........................................................................................ 16
Figure 8 Hamming code................................................................................................................ 23
Figure 9 coded condition for hamming error control coding techniques..................................... 26
Figure 10 uncoded conditions for hamming error control coding technique................................ 27
Figure 11 performance comparison between coded and uncoded conditions for Hamming....... 28
Figure 12 GUI for Hamming ECC Technique .............................................................................. 29
Table of Contents
Approval ........................................................................................................................................................ i
Acknowledgment .......................................................................................................................................... ii
Abstract ........................................................................................................................................................ iii
List of Acronyms ......................................................................................................................................... iv
List of Figure................................................................................................................................................. v
CHAPTER ONE .......................................................................................................................................... 1
INTRODUCTION ........................................................................................................................................ 1
1.1 Background ........................................................................................................................................ 1
1.2 Statement of the problems................................................................................................................... 4
1.3 Objective of the project ....................................................................................................................... 5
1.3.1 General Objective ........................................................................................................................ 5
1.3.2 Specified Objective ...................................................................................................................... 5
1.4 Methodology ....................................................................................................................................... 5
1.5 Contribution of the Project.................................................................................................................. 5
1.6 Scope of the project ........................................................................................................................... 6
1.7 Organizations of the Project............................................................................................................... 6
CHAPTER TWO .......................................................................................................................................... 8
LITERATURES REVEID ............................................................................................................................ 8
2.1 Error control strategies[2] ..................................................................................................................... 8
CHAPTER THREE .................................................................................................................................... 19
SYSTEM DESING AND ANIYZING ...................................................................................................... 19
3.1 Different classes of block code ......................................................................................................... 19
3.2 Mathematical Modeling ................................................................................................................... 21
3.2 System Design and Analysis ............................................................................................................. 22
3.2.1 Design of encoder ...................................................................................................................... 22
3.2.2 Design of decoder ..................................................................................................................... 24
3.3 Implementation ................................................................................................................................ 24
3.4 Performance comparison ................................................................................................................. 24
CHAPTER FOUR....................................................................................................................................... 25
RESULT AND DISSICUTION .................................................................................................................. 25
CHAPTER ONE
INTRODUCTION
1.1 Background
In modern digital communication and storage systems design, information theory is
becoming increasingly important .In recent years; there has been an increasing demand for
efficient and reliable digital data transmission. This demand has been accelerated by the
emergence of large scale, high speed data networks for the exchange and processing of digital
information in the military, governmental and private spheres. A major concern is control of
errors, so that reliable reproduction of data can be obtained. Recent developments have
contributed toward achieving the reliability required by today’s high speed digital systems and
the use of coding for error control has become an integral part in the design of modern
communication systems and digital computers.
When we are watching TV, enjoying music on CD, talking with friend by cellular phone
etc., we encounter problem due to the impact of the noisy environment. A CD player includes
semiconductor memories, optical media, laser device, disk files, and so on. Each of them is
subject to various types of noise disturbance may come from switching impulse noise, thermal
noise, dust on disk surface, or even lightening. Error control coding (also referred to as channel
coding) is used to detect, and often correct, symbols which are received in error on digital
communications channels.
A typical digital communications system is shown below in Figure 1 The source
information is usually composed of binary or decimal digits or alphabetic information in either a
continuous waveform or a sequence of discrete symbols. The encoder transforms these messages
into a sequence of binary digits (bits) to the channel. The sequence enters the channel and is
perturbed by noise. The output enters the decoder, which makes a decision concerning which
message was sent and delivers this message to the sink.
A communication system can be represented by the following block diagram:
Channel
The fundamental of error control coding is based on Shannon’s landmark paper published
in 1948. Shannon demonstrated that by proper encoding of the information, errors induced by a
noisy channel or storage medium can be reduced to any desired level without sacrificing the rate
of information transmission or storage. Since Shannon’s work, a great deal of effort has been
expended on the problem of devising efficient encoding and decoding methods for error control
in a noisy environment.
Recent developments have contributed toward achieving the reliability required by today’s high
speed digital systems, and the use of coding for error control has become an integral part in the
design of modern communication systems and digital computers with the dramatic decreasing of
the size and cost of semiconductor devices.
Types of errors
There are two types of errors that occur on digital communications channels:
I. Random errors
II. Burst error
Random errors :- Errors that occur independently on each bit of the transmitted sequence. That is,
an error occurs on a transmitted bit independent of errors that occurred in the vicinity of the bit.
The random error channel also called as memory less channel. Good examples of random-error
1.4 Methodology
To accomplish this project we have used two stages. these are:-
I. Mathematical Model : In this section we will implement different mathematical concepts
that are applicable for Hamming error control coding techniques.
II. Simulation : In conducting our project we are going to follow the following basic steps
1. Design of
Encoder
Decoder
2. Performance analyzing:- by using graphical user interface(GIU)
There is also future work expressed for those people who are interested in this area and
further advancement areas are also mentioned.
CHAPTER TWO
LITERATURES REVEID
The traditional role for error-control coding was to make a troublesome channel acceptable by
lowering the frequency of error events. The error events could be bit errors, message errors,
or undetected errors. Coding's role has expanded tremendously and today coding can do the
following:[2]
Reduce the occurrence of undetected errors:- This was one of the first uses of error-
control coding. Today's error detection codes are so effective that the occurrence of
undetected errors is, for all practical purposes, eliminated.
Reduce the cost of communications systems:- Transmitter power is expensive, especially
on satellite transponders. Coding can reduce the satellite's power needs because messages
received at close to the thermal noise level can still be recovered correctly.
Overcome Jamming:- Error-control coding is one of the most effective techniques for
reducing the effects of the enemy's jamming.
Eliminate Interference:-As the electromagnetic spectrum becomes more crowded with
man-made signals, error-control coding will mitigate the effects of unintentional
interference. Despite all the new uses of error control coding, there are limits to what
coding can do. On the Gaussian noise channel, for example, Shannon's capacity formula
sets a lower limit on the signal-to-noise ratio that we must achieve to maintain reliable
communications. Shannon’s lower limit depends on whether the channel is power-limited
or bandwidth-limited. The deep space channel is an example of a power limited channel
because bandwidth is an abundant resource compared to transmitter power.
2.1 Error control strategies[2]
There are two strategies of error control coding with respect to the direction of information
transmission, one-way (simplex) and two-way (duplex) system. These are:-
Forward error correction(FEC)
Automatic repeat request(ARQ)
Forward error correction (FEC):- This is an error control strategy used for a one way
transmission system. That is, by employing error correcting codes which automatically correct
errors detected at the receiver. Communication systems that use the FEC approach are not able to
Automatic repeat request (ARQ):- This is used for two ways transmission system that is
information can be sent in both directions and the transmitter also acts as a receiver (a
transceiver). ARQ communication systems are based on the detection of errors in a coded block
and on the retransmission of the block when errors have been detected. In this case a two-Way
channel is needed in order to request retransmissions. For a given code, the error-detection
Capability possible in an ARQ system is higher than the error-correction capability of its FEC
counterpart, because the error control capability of the code is spent only on detection, while the
correction requires not only the detection but also the localization of the errors. Error control for
a two-way system can be accomplished using error detection and retransmission, called
automatic repeat request (ARQ). In an ARQ system, when errors are detected at the receiver, a
request is sent for the transmitter to repeat the message, and this continues until the message is
received correctly.
There are two types of ARQ systems:
stop-and-wait ARQ and
continuous ARQ
Stop-and-wait ARQ:-The transmitter sends a code word to the receiver who has the error
detecting ability and waits for response from the receiver. If no errors detected, the transmitter
sends the next code word. If errors detected, it resends the preceding code word. In some case,
the same code word may be retransmitted several times before it is correctly received and
Semester Project Documentation Page 9
BiT Error Control Coding 2017
acknowledged.
Continuous ARQ:- The transmitter sends code words to the receiver continuously and receives
acknowledgements continuously. When an error detected, the transmitter begins a
retransmission. It may back up to the code word in error and resend that word plus the words that
follow it. This is called go-back N ARQ. Alternatively, the transmitter may simply resend only
those code words that are acknowledged negatively. This is known as selective-repeat ARQ.
Selective-repeat ARQ is more efficient that go-back-N ARQ, but requires more logic and
buffering. Continuous ARQ is more efficient than stop-and-wait ARQ, but it is also more
expensive. In a satellite communication system where the transmission rate is high and the
roundtrip delay is long, continuous ARQ is normally used.
The major advantage of ARQ over FEC is that error detection requires much simpler
decoding equipment that does error correction. Also, ARQ is adaptive in the sense that
information is retransmitted only when errors occur. On the other hand, when the channel
error rate is high, retransmissions must be sent too frequently, and the system throughput,
the rate at which newly generated messages are correctly received, is lowered by ARQ.
Hence, a combination of FEC for the most frequent error patterns, together with error detection
and retransmission for the less likely error patterns, is more efficient than ARQ alone.
Transmitter Receiver
Buffer buffer
Data Transmision
(I) (I P P)
(N,K) Encoder
Figure 5 This figure shows the information bit and the parity bits
s>= t
dmin>= s+t+1
V=(V0,V1,...............Vn-1)↔V(x)=V0+V1x+........+Vn-1Xn-1.................(2.2)
Syndromes[1]:- The syndrome is the receive sequence multiplied by the transposed parity check
matrix H.
s(x) =r(x) H T.........................(2.6)
The syndrome is a (n-k) -tuple that has a one to one correspondence with the correctable error
patterns. The syndrome depends only on the error pattern and is independent of the transmitted
codeword. Most codes do not use all of the redundancy that has been added for error correction.
The only two codes known to do this are Hamming ( 2m- 1,2m - m - 1) .
Coding Theory[5]:- Coding theory is the study of methods for efficient and accurate transfer
of information from one place to another. The theory has been developed for such diverse
applications as the minimization of noise from compact disc recorders, the transmission of
financial information across telephone line, data transfer from one computer another or from
memory to the central processor, and information transmission from a distance source . The
physical medium through which the information is transmitted is called a channel. Undesirable
disturbances, called noise, may cause the information received to differ from what was
transmitted. Noise may be caused by sunspots, lightning, folds in a magnetic tape, competing.
telephone messages, random radio disturbance, or many other things. Coding theory deals with
the problem of detecting and correcting transmission errors caused by noise on the channel.
In practice, the control we have over this noise is the choice of a good channel to use for
transmission and the use of various noise filters to combat certain types of interference which
may be encountered. Once we have settled on the best mechanical system for solving these
problems, we can focus our attention on the construction of the encoder and the decoder.
Our desire is to construct these in such a way as to effect:
1. Fast encoding of information
2. Easy transmission of encoded messages
3. Fast decoding of received messages
4. Correction of errors introduced in the channel, and
5. Maximum transfer of information per unit time.
CHAPTER THREE
SYSTEM DESING AND ANIYZING
Turbo code[3]:- This coding technique consists essentially of a parallel concatenation of two
binary convolutional codes, decoded by an iterative decoding algorithm. These codes obtain an
excellent bit error rate (BER) performance by making use of three main components. They are
constructed using two systematic convolutional encoders known as recursive systematic
convolutional (RSC) encoders, which are concatenated in parallel. In this parallel concatenation,
a random inter leaver plays a very important role as the randomizing constituent part of the
coding technique. In the structure of a turbo code, two recursive convolutional encoders are
arranged in parallel concatenation, so that each input element is encoded twice, but the input to
the Second encoder passes through a random inter leaver. This coding scheme is decoded by
means of an iterative decoder that makes the resulting BER performance to be close to the
Shannon limit.
Interleaver:- Interleaving is a widely used technique in digital communication and storage
systems .An inter leaver takes a given sequence of symbols and permutes their positions,
arranging them in a different temporal order. The basic goal of an inter leaver is to randomize
the data sequence. When used against burst errors, inter leavers are designed to convert error
patterns that contain long sequences of serial erroneous data into a more random error pattern,
thus distributing errors among many code vectors. The difficulty in linear block codes is that in
an effort to approach the theoretical limit for Shannon’s channel capacity, we need to increase
the code word length of a linear block code, this in turn causes:
Computational complexity of a maximum likelihood decoder to increase exponential that
is we reach a point where complexity of the decoder is so high that it becomes physically
unrealizable.
Turbo code is one of the approaches proposed with large “equivalent” block lengths structured in
such a way that the decoding can be split into a number of manageable steps.
Convolutional code. Binary convolution codes are the most popular form of binary error
correcting codes and have found numerous applications: Wireless communications, digital
terrestrial and satellite communication and broadcasting systems, and space communication
systems, just to cite a few. A Convolutional code is an error correcting code that processes
information serially, or continuously, in short block lengths. A convolutional encoder has
memory, in the sense that the output symbols depend not only on the input symbols, but also on
previous inputs and /or outputs. In other words, the encoder is a sequential circuit.
CHAPTER FOUR
RESULT AND DISSICUTION
The results here under shows the hamming error control coding bit error rate (probability
of error) versus signal to noise ratio under the influence of AWGN channel. There are two cases
in error control coding, these are:
Coded condition and
Uncoded condition
Coded condition: it is the one which have been performed by using error control coding
techniques for reliable transmission.
Uncoded condition : it is the other case which didn’t use error control coding techniques
for reliable transmission. As we see from the graphical representation of the hamming code
performance we deduce the following remarks:
Coded condition:- Here as we see from our result as we go from left to right across the x-axis
(signal to noise ratio) the probability of error reduced dramatically than that of the uncoded one.
This indicates that the detection and correction capability of the hamming error control coding
technique increase as the signal to noise ratio increases. This means when the signal to noise
ratio is very high, the signal is very strong than the noise hence it can be reproduced easily.
Hamming code works perfect for one bit error and can detect and correct all the erroneous code
words, this also demonstrated in our project. But when we introduce two bit errors it can detect
but the correction capability is rare. In addition to this when we introduce more than two bit
errors we will get the proper detection and but not correction for the introduced errors. As a
result of this we can deduce that the hamming error control coding technique works perfectly that
means for one bit error it can detect and correct the entire erroneous bit completely. In this case
we can confidentially say that hamming error control coding technique is 100% efficient for one
bit error detection and correction. And for the other bit errors that means more than one bit we
can’t get the perfection of error control capability of the hamming code like the one bit error
capability. This can be shown graphically as follows:
Uncoded condition
As we can see from the graph below shown we can see that for the uncoded case the probability of error
large even during large signal to noise ratio. It works better when there is no noise that means when the
signal to noise ratio is very small
Index:
CHAPTER FIVE
CONCULSION AND RECOMMUNDITION
5.1 conclusion
Form what we have done we can deduce that error control coding techniques are very essential
for the proper transmission and storage of information. Here proper design and selection of
efficient error control coding technique allow us for the proper transmission of information
without being corrupted by noise. There are different error control coding technique and each of
them have their own error detecting and correcting capability based on the number of bit errors
that have been introduced in the transmitted code word. In our project we have seen that
hamming coding technique has a perfect error detecting and correcting capability for one bit
error but it cannot correct more than one bit error.
5.2 Summary
The traditional role for error-control coding was to make a troublesome channel acceptable by
lowering the frequency of error events. The error events could be bit errors, message errors,
or undetected errors. Coding's role has expanded tremendously and today coding can do the
following:
Reduce the occurrence of undetected errors
Reduce the cost of communications systems
Eliminate Interference
Overcome Jamming
There different type of error control coding techniques such as BCH, Hamming, turbo, Reed
Solomon, convolutional and so on. Among these for this semester we have developed proper
error control coding using hamming error control coding techniques.
The major error control coding problem is to design and implement the channel
encoder/decoder pair such that:
Information can be transmitted (or recorded) in a noisy environment as fast as Possible.
Reliable reproduction of the information can be obtained at the output of the channel decoder.
The cost of implementing the encoder and decoder falls within acceptable limits.
Reference
[1] John G.Prokis Masoud Salehi,"Communication Systems Engineering" ,Second Eidition,2002.
[2]. Behrouz A.Forouzan,"Data Communictions and Networking",Alan R. Apt, Fourth
Edition,2007.
[3]. Daniel J.Costello,Jr"Error Control Coding Fundamentals and Application",University of
Hawail Texas A&M University,1983.
[4]. John Wiley and Sons" Essentials Of Error-Control Coding ",University of Mar del Plata,
Argentina", Second Editions ,2006
[5]. N. Babu Anne, U. Thirunavukkarasu, Dr. S.Latifi, , (2004),“Three and Four-dimensional
Parity-check Codes for Correction and Detectionof Multiple Errors”, International Conference
on Information Technology: Coding and Computing,Volume 2, pp. 837-842.
Appendices
Appendix A: code for encoder design (using hamming error control coding technique)
m=3 % a positive integer m=3
n=2^m-1
k=2^m-m-1
p=[ 1 1 0; 0 1 1;1 1 1;1 0 1]; %parity check matrix
H=[eye(n-k) p']
G =[p eye(k)] %generator matrix
b=4 %no of bits
e1=input('enter the number of message to be sent e1 = ')
M=randint(e1,k); % message to be generated
disp('THE RANDOMLY SELECTED MESSAGE TUPLES ARE')
disp(M) ;
v=M*G;
%algorith to change the code word into 1's&0's
[a,b]=size(v);
for i=1:a;
for j=1:b;
if v(i,j)==3| v(i,j)==5| v(i,j)==7| v(i,j)==9
v(i,j)=1;
elseif v(i,j)==1
v(i,j)=1;
else
v(i,j)=0;
end
end
end
%final output
disp('the code word is:')
disp(v)
Appendix B code for channel simulation (using hamming error control coding technique)
d2=randint(1,1,[1,n]);
e=zeros(e1,n);
i=1:e1;
e(i,d2)=1;
e;
r=e+v;
[a1,b1]=size(r);
for i=1:a1;
for j=1:b1;
if r(i,j)==1|r(i,j)==3|r(i,j)==5|r(i,j)==7
r(i,j)=1;
elseif r(i,j)==1
r(i,j)=1;
else
r(i,j)=0;
end
end
end
disp('THE RECEIVED WORD IS:')
disp(r)
r
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
function gui_OpeningFcn(hObject, ~, handles, varargin)
handles.output = hObject;
v=M*G;
%algorith to change the code word into 1's&0's
[a,b]=size(v);
for i=1:a;
for j=1:b;
if v(i,j)==3| v(i,j)==5| v(i,j)==7| v(i,j)==9
v(i,j)=1;
elseif v(i,j)==1
v(i,j)=1;
else
v(i,j)=0;
end
end
end
%final output
set(handles.edit12,'string',...
num2str(v));%................3
disp('the code word is:');
disp(v);
%%%==========decoder side============
d2=randint(1,1,[1,n]);
e=zeros(e1,n);
i=1:e1;
e(i,d2)=1;
e;
v;
r=e+v;
Semester Project Documentation Page 43
BiT Error Control Coding 2017
[a1,b1]=size(r);
for i=1:a1;
for j=1:b1;
if r(i,j)==2|r(i,j)==4|r(i,j)==6|r(i,j)==8
r(i,j)=0;
elseif r(i,j)==0
r(i,j)=0;
else
r(i,j)=1;
end
end
end
set(handles.edit14,'string',...
num2str(r));%%...............4
disp('THE RECEIVED WORD IS:');
disp(r);
semilogy (x,pbe,'red')% creates a plot using a base 10 logarithmic scale for the y-axis and a
linear scale for the x-axis.
grid on;
xlabel('SNR (dB)');
ylabel('Bit error rate')
title('BER vs SNR under AWGN channel')
hold on
% for uncoded case
pbe1=0.5*(erfc(sqrt(snr)));
semilogy (x,pbe1,'blue')
surf(handles.axes1,semilogy (x,pbe,'red'),semilogy (x,pbe1,'blue'));
hold off