Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
MASTER OF TECHNOLOGY
In
COMPUTER SCIENCE
Supervised By:
Submitted By:
Dr R. L. UJJWAL
(Assistant Professor)
DECLARATION
The work titled Comparative Study for Improving Routing Protocol in Sensor Networks
in this report as part of my thesis (JanuaryMay, 2016) under the guidance of Dr R. L.
Ujjwal has not been submitted anywhere else.
Any work that is not our original has been duly and appropriately referred by us by
mentioning it in the 'References' section.
Any academic misconduct and dishonesty found in regard to above or otherwise shall be
solely and entirely my responsibility. In such a situation, I understand that a strict disciplinary
action can be undertaken by the concerned authorities of the University and I shall abide by
it.
SIDHARTH DHADRA
M T ECH (CSE)
01616404814
ii
ACKNOWLEDGEMENT
This work required a lot of guidance and assistance and I am extremely fortunate to get to have
got this all along my thesis. I would like to express my thanks to our esteemed faculty, Dr R. L.
Ujjwal whose proper guidance and supervision has steered me to complete this work. I am
thankful to him whose help and cooperation is invaluable in progress of my work for its solid
foundation. It was their valuable guidance and kind support due to which I am able to complete
this work. I have benefited tremendously from their efficiency, expertise and professionalism.
I would like to place a word of appreciation on records for all those who have directly or
indirectly helped me with full support and encouragement that lead to the culmination of this
project.
SIDHARTH DHADRA
M TECH (CSE)
01616404814
iii
CERTIFICATE
This is to certify that the work titled Comparative Study for Improving Routing Protocol in
Sensor Networks in this report as part of thesis (January May, 2016) was conducted under my
guidance and is an original work of this student to the best of my knowledge and it has not been
submitted anywhere else.
Dr R. L. UJJWAL
USICT
iv
ABSTRACT
Wireless sensor network is a collection of ad-hoc networks and many mobility sensor nodes.
Wireless sensor network has many sensing nodes which provide facility like, communication,
computation.
Wireless sensor network provide facility of finding shortest path. It will help in finding shortest
path with dynamically assigned nodes and it avoids malicious nodes and intrusion. (Akkaya &
Younis, 2003)
Routing in an ad hoc sensor networks is a problem of concern for a wide range of applications.
This study talks about finding the shortest path between source to destination with the help
different algorithm for improving performance.
We introduce the concept of backtracking and controlled suboptimal aspect to sensor routing,
with the intent of improving the flexibility and efficiency by accounting restricted capabilities of
the sensor nodes and the need for a prompt delivery of data. Koenig (1998; 2006, 2006; 2010;
1999; 2014)
TABLE OF CONTENTS
DECLARATION..ii
CERTIFICATEiii
ACKNOWLEDGEMENTiv
ABSTRACT..v
TABLE OF CONTENTS..vi
LIST OF FIGURES...vii
LIST OF TABLES.viii
1. Chapter 1 INTRODUCTION.10
1.1.Brief outline of thesis..10
1.1.1.About Network Model.10
1.1.2.About Routing Protocols..11
1.1.3.About Sensor Network.12
1.2.Problems and Challenges.13
Problems related to Sensor Network..13
1.3.Problem statement15
1.4.Motivation of thesis..16
1.5.Outline of thesis16
2. Chapter 2 LITERATURE SURVEY...17
2.1.Definition17
2.2.Declaration of variable used in th algorithm.18
2.3.Novel method ....20
3. Chapter 3 Proposed Work..22
3.1.Generate-and-Test...22
3.2.Hill climbing22
vi
LISTS OF FIGURES
1. Ad hoc routing protocol10
2. Basic Component of Wireless Sensor Network Node12
3. LRTA* algorithm with a lookahead of one.19
4. The novel nLRTS algorithm.21
5. The local maximum..24
6. Plateau24
7. Ridge..25
8. Example of Best First Search26
9. Visual Studio Environment...34
10. Welcome Window...38
11. Node Selection39
12. Freezing of node..40
13. Starting node...41
14. Destination node..42
15. Route Selection...43
16. Routing pathing with distance calculation..44
17. Shortest Path choosen from algorithm...45
Vii
LIST OF TABLES
1. Table1 depicting the line Graph for various using different algorithm in various
network45
2. Table2 depicting the Bar Graph for various using different algorithm in various
network46
Viii
Chapter 1 INTRODUCTION
1.1 Brief outine of thesis
1.1.1
Ad hoc Networks
Infrastructure Network These networks are network with fixed and wired gateways and
bridges for these networks are called base station. A mobile unit within these networks
connects to, communicates with, the nearest base station that is within its communication
radius. As the mobile travels out of range of one base station into another handoff occurs.
Ad hoc Network- These mobile networks have no fixed infrastructure, and support
applications for military users, post-disaster rescuers.
Figure 1 as proposed by (Bulitko, Sturtevant, & Kazakevich, 2005; Bulitko et al., 2005; Jain &
Shrivastava, 2011, 2011; Karp & Kung, 2000, 2000, 2000; Koenig, 1998, 1998; Lee et al., 2006,
2006, 2006; Pellier et al., 2010, 2010; Royer & Toh, 1999, 1999, 1999, 1999; Sturtevant &
Bulitko, 2014, 2014)
Ad-hoc networks: These mobile networks have no fixed infrastructure, and support
applications for military users, post-disaster rescuers.
Sensor networks: Comprised of small sensors, these mobile networks can be deployed with very
large numbers of nodes, and have very impoverished per-node resources. Minimization of state
per node in a network of tens of thousands of memory-poor sensors is crucial.
Rooftop networks: Proposed by Shepard, these wireless networks are not mobile, but are
deployed very densely in metropolitan areas (the name refers to an antenna on each buildings
roof, for line-of-sight with neighbors) as an alternative
to wired networking offered by traditional telecommunications providers. Such a network also
provides an alternate infrastructure in the event of failure of the conventional one, as after a
disaster.
A routing system that self-configures (without a trusted authority to configure a routing
hierarchy) for hundreds of thousands of such nodes in a metropolitan area represents a significant
scaling challenge. (Karp & Kung, 2000)
1.1.2
A. Routing
Routing is the process of selecting the best route for data transmission between sender and
receiver. Many routing protocols were established for routing purpose and are divided into two
categories like topology and position based.
Topology is further divided into three categories Proactive, Reactive and Hybrid. The main aim
of each routing protocol is to find the appropriate path for forwarding of data packets. Some
algorithms like Ad Hoc On demand Distance Vector Routing protocol (AODV), Destination
Sequenced Distance Vector (DSDV), Distance Vector Routing (DVR) protocol were established.
These were generally based on the concept of finding the shortest path on the basis of distance
only. For successful transmission of data we dont consider distance as a main factor for finding
the best path.
B. Distance Vector Routing (DVR)
Distance Vector Routing protocol generally maintains a vector in which the distance of
source node to all other neighbor nodes must be manipulated. The node with shortest
distance must be selected as the next node.
This process further repeats itself for selecting all other nodes in a path. Any router which
uses the DVR protocol must knows
a) Distance to destination node
b) Direction in which traffic should be directed.
Here each node knows how to reach the next node and the cost to reach there. This
protocol generally requires periodically updates of routing tables. Example of DVR- a)
Interior Gateway Routing Protocol (IGRP) b) Routing Information Protocol (RIP)
Sensor Networks can be classified on the basis of their mode of functioning and the type of target
application into two major types. They are
a) Proactive Networks
The nodes in this network switch on their sensors and transmitters periodically, sense the data
and transmit the sensed data. They provide a snapshot of the environment and its sensed data at
regular intervals. They are suitable for applications that require periodic data monitoring like
moisture content of a land in agriculture.
b) Reactive Networks
The nodes in this network react immediately to sudden and drastic changes in the value of the
sensed attribute. They are therefore suited for time critical applications like military surveillance
or temperature sensing.
Some Applications of Sensor Network
Seismic Monitoring
Small node size: Since sensor nodes are usually deployed in a harsh or hostile
environment in large numbers, reducing node size can facilitate node deployment. It will
also reduce the power consumption and cost of sensor nodes.
(ii)
Low node cost: Since sensor nodes are usually deployed in a harsh or hostile
environment in large numbers and cannot be reused, reducing cost of sensor nodes is
important and will result into the cost reduction of whole network.
(iii)
Low power consumption: Since sensor nodes are powered by battery and it is often very
difficult or even impossible to charge or recharge their batteries, it is crucial to reduce the
power consumption of sensor nodes so that the lifetime of the sensor nodes, as well as the
whole network is prolonged.
(iv)
Reliability: Network protocols designed for sensor networks must provide Error control
and correction mechanisms to ensure reliable data delivery over noisy, error-prone, and
time-varying wireless channels.
(v)
Scalability: Since the number sensor nodes in sensor networks are in the order of tens,
hundreds, or thousands, network protocols designed for sensor networks should be
scalable to different network sizes.
(vi)
(vii)
(viii)
Fault tolerance: Sensor nodes are prone to failures due to harsh deployment
environments and unattended operations. Thus, sensor nodes should be fault tolerant and
have the abilities of self testing, self-calibrating, self-repairing, and self recovering.
(ix)
Adaptability: In sensor networks, a node may fail, join, or move, which would result in
changes in node density and network topology. Thus, network protocols designed for
sensor networks should be adaptive to such density and topology changes.
(x)
(xi)
Connectivity: High node density in sensor networks precludes them from being
completely isolated from each other. Therefore, sensor nodes are expected to be highly
connected. This, however, may not prevent the network topology from being variable and
the network size from being shrinking due to sensor node failures. In addition,
connectivity depends on the, possibly random, distribution of nodes.
(xii)
Data Aggregation: Since sensor nodes may generate significant redundant data, similar
packets from multiple nodes can be aggregated so that the number of transmissions is
reduced. Data aggregation is the combination of data from different sources according to
a certain aggregation function, e.g., duplicate suppression, minima, maxima and average.
This technique has been used to achieve energy efficiency and data transfer optimization
in a number of routing protocols.
(xiii)
)+h(s,
),
computes f(
to the closest goal state. The node then plans to move the neighbor
with
the smallest f value. Planning can be divided into off-line and on-line planning.
In off-line planning, the planners build solution plans, and then execute the all the actions of the
plan. They use very good heuristic functions that drive the search efficiently toward the goal.
However, although they find solution plans very quickly on sufficiently easy problems, these
may fall if they have not enough time to find a solution plan.
Conversely, in on-line planning, the agent repeatedly executes a task, called an episode or a trial.
At each step, the agent is situated in a current state, and performs a search within the space
around the current state in order to select his best action. Then the agent executes the action, and
reaches a new state.
When the agent reaches the goal state, another trial or episode is launched, and so on. When the
planners make their decision in constant time, this corresponds to Real-Time Search (RTS).
Since the pioneering Korfs work on puzzles, RTS has been strongly linked to the development
of video games in which the agents need good path-finding algorithms running in real time.
(Ahmed & Sajjadur, 2011; Braginsky & Estrin, 2002; Bulitko et al., 2005, 2005; Jain &
Shrivastava, 2011; Karp & Kung, 2000; Koenig, 1998, 1998; Lee et al., 2006, 2006, 2006; Pellier
et al., 2010, 2010, 2010; Robnik-\vSikonja, 1996; Royer & Toh, 1999; Sturtevant & Bulitko,
2014, 2014)
The node
to the goal must be at least as large as the distance of going through the neighbor with the
minimum f value. This step is called learning. Finally, the planned neighbor
next current state (this is called execution).
becomes the
One small difference in classic DVR is that the initial cost to any destination is set to infinity,
whereas in classic LRTA* these values are set to zero. In our work, we set the initial distance to
any destination to be the minimum distance to the nearest neighbor.
II.2 Declaration of the variable used in the algorithm
Current_node = current node in the wireless sensor network
Neighbour_node = neighbor node in the wireless sensor network
Initial_node = initial node in the wireless sensor network
Goal_node = goal node in the wireless sensor network
Final_node =final node in the wireless sensor network
g= distance from the state Current_node to Neighbour_node
h= heuristics estimate Neighbour_node to the closest goal state
= initial heuristics estimate
= nodes previously estimated shortest distance to the goal
= distance from the current state to the state on the frontier is weighted by
) = g(s,
)+h(s,
(0,1]
(Bulitko et al., 2005; Lee et al., 2006; Pellier et al., 2010; Sturtevant & Bulitko, 2014)
LRTA*
1 initialize the heuristic: h
2 reset the current state: Current_node Initial_node
3 while Current_node Goal_node do
4 generate children one move away from state s
5 find the state Neighbour_node with the lowest f(Neighbour_node) = g + h
6 update h(Current_node) to f(Neighbour_node) if f(Neighbour_node) is greater
7 execute the action to get to Neighbour_node
8 end while
Figure 3: LRTA* algorithm with a lookahead of one. As proposed by Bulitko et al. (2005; 2006;
2014)
A more recent algorithm, called Learning Real-Time Search (LRTS), extended the LRTA* in
Figure 4 with three enhancements: deeper lookahead, optimality weighting and
backtracking control (Bulitko & Lee 2006).
First, the distance from the
current state to the state on the frontier (i.e., the furthest
visible state) is weighted by (0, 1].
(Bulitko et al., 2005; Lee et al., 2006; Sturtevant & Bulitko, 2014)
to
) is less than
admissible.
(Bulitko et al., 2005; Lee et al., 2006; Sturtevant & Bulitko, 2014)
<
6 update
then
7 send updated
to all neighbors
8 end if
9 if Data_message + |
| Learning_threshold then
Evaluation function as a way to inject task-specific knowledge into the control process.
Example: coloured blocks
Heuristic function: the sum of the number of different
colours on each of the four sides (solution = 16).
3.2.3
3.2.3.2 Plateau
A flat area of the search space in which all neighbouring states have the same value.
3.2.3.3 Ridge
The orientation of the high region, compared to the set of available moves, makes it
impossible to climb up. However, two moves executed serially may increase the height.
Often useful when combined with other methods, getting it started right in the right
general neighbourhood.
Combining the two is to follow a single path at a time, but switch paths whenever some
competing path look more promising than the current one
OPEN: nodes that have been generated, but have not examined.
This is organized as a priority queue.
3.3.1 Algorithm
OPEN = {initial state}.
Greedy search:
o h(n) = estimated cost of the cheapest path from node n to a goal state.
Uniform-cost search:
o g(n) = cost of the cheapest path from the initial state to node n.
Algorithm A*:
f*(n) = g*(n) + h*(n)
h*(n) (heuristic factor) = estimate of h(n).
g*(n) (depth factor) = approximation of g(n) found by A* so far.
This approach along with the added functionality which are defined in the Proposed
algorithm and applied in the Implementation part. The main focus here is on finding the
legitimate result with repetitive distance learning by looking at the neighbor node from
the current node with a goal of reaching to the final node by covering minimal distance
without exceeding the Learning Threshold
This algorithm is reflection of the work being done during this study and adaptive
learning done on the basis of literature survey and other sources which is as follws:Greedy_nLRTS(Learning_threshold, u,Data_message,
1. finding direct distance
<
6. update
then
7. send updated
to all neighbors
8. end if
9 if u + |
| Learning_threshold then
10. if
11. direct path choosen
then
and return Data_message and u to Final_node
13. else
14. increase amount of learning u by |
C# is intended to be suitable for writing applications for both hosted and embedded systems,
ranging from the very large that use sophisticated operating systems, down to the very small
having dedicated functions.
Although C# applications are intended to be economical with regard to memory and processing
power requirements, the language was not intended to compete directly on performance and size
with C or assembly language.
Features
C# is the programming language that most directly reflects the underlying Common Language
Infrastructure (CLI). Most of its intrinsic types correspond to value-types implemented by the
CLI framework. However, the language specification does not state the code generation
requirements of the compiler: that is, it does not state that a C# compiler must target a Common
Language Runtime, or generate Common Intermediate Language (CIL), or generate any other
specific format. Theoretically, a C# compiler could generate machine code like traditional
compilers of C++ or Fortran.
Some notable distinguishing features of C# are:
There are no global variables or functions. All methods and members must be declared within
classes. Static members of public classes can substitute for global variables and functions.
Local variables cannot shadow variables of the enclosing block, unlike C and C++. Variable
shadowing is often considered confusing by C++ texts.
C# supports a strict Boolean datatype, bool. Statements that take conditions, such as while and if,
require an expression of a type that implements the true operator, such as the boolean type. While
C++ also has a boolean type, it can be freely converted to and from integers, and expressions
such as if(a) require only that a is convertible to bool, allowing a to be an int, or a pointer. C#
disallows this "integer meaning true or false" approach on the grounds that forcing programmers
to use expressions that return exactly bool can prevent certain types of common programming
mistakes in C or C++ such as if (a = b) (use of assignment = instead of equality ==).
In C#, memory address pointers can only be used within blocks specifically marked as unsafe,
and programs with unsafe code need appropriate permissions to run. Most object access is done
through safe object references, which always either point to a "live" object or have the welldefined null value; it is impossible to obtain a reference to a "dead" object (one which has been
garbage collected), or to a random block of memory. An unsafe pointer can point to an instance
of a value-type, array, string, or a block of memory allocated on a stack. Code that is not marked
as unsafe can still store and manipulate pointers through the System.IntPtr type, but it cannot
dereference them.
This chapter covers the implementation part of the algorithm which is done
on Microsoft Visual Studio 2010. There are snapshot shown in this chapter
covers the implementation procedure.
Starting from the welcome window which is like the introduction to the
application. Here welcome window consist of Node panel, Freeze button and
Exit button.
Second snapshot shows Node selection in the Node panel. This panel allows
us to select as many node as possible for creating a network.
Third snapshot shows Freezing of the Node in the node panel. By freezing
node its persist further addition of node for the network and as soon we click
on freeze button , two list of path selection arises naming starting node and
destination node and a calculate button.
Fourth snapshot shows the Starting node which consist of collection of all the
nodes.
Fifth snapshot shows the Destination node which consist of collection of all
the nodes.
Sixth snapshot shows route selection which covers the initial and final node
of the network.
Seventh snapshot show Routing Path with Distance Calculation in the
algorithm
Eight snapshot show Shortest Path choosen from algorithm through adaptive
Learning Greedy_nLrts approach.
5.1WelcomeWindow
5.2NodeSelection
5.3
5.4
Starting Node
5.5
Destination Node
5.6
Route Selection
Table1 depicting the line Graph for various using different algorithm in various
network
There is a bar graph which depicts the study of three approach direct
distance coverage method, nLRTS and Greedy_nLRTS on various network
such as Linear network, Star network, Ring Network and Hybrid Network.
Direct distance shows the ideal approach as it always gives the shortest
result in calculating the distance but suffers from various disturbance but
achieving ideal condition is difficult.
nLRTS used the Real time heuristic approach in the networking which
provides much unsatisfactory results in comparison to the direct approach.
Lastly, Greedy_nLRTS i.e our approach this gives us most promising result in
comparison to nLRTS and it gives best result in linear network and better
result in for hybrid network in comparison to hybrid.
Table2 depicting the Bar Graph for various using different algorithm in various
network.
Chapter 7 CONCLUSION
We have put forward to provide a Comparative Study, through implementation of Improving
Routing Protocol in Sensor Networks by a heuristic search algorithm known as Novel Algorithm
and comparing the result with other algorithm with a similar network simulation environment.
The heuristic Search algorithm are part of the artificial intelligence and is based on a general
problem-solving rule or set of rules that do not guarantee the best solution or even any solution,
but serves as a useful guide for problem-solving. Novel algorithm used the same approach to
achieve this goal.
Similar to Novel Algorithm, Hill climbing Algorithm performs Searching for a goal state then
performs Generate-and-test procedure along with direction to move. Finally, Heuristic function is
used to estimate how close a given state is to a goal state.
By using the Greedy approach of hill climbing algorithm, we enhance the accuracy of Novel
algorithm and provide an alternate method to its shortcoming by using Direct routing if time
exceeds the maximum time-stamping then system makes choice of whether to choose a routing
or the direct path.
REFERENCES
Akkaya, K. & Younis, M. (2003). An energy-aware QoS routing protocol for wireless
sensor networks. Distributed Computing Systems Workshops, 2003. Proceedings. 23rd
International
Conference
on
(pp.
710715).
via
automatic
state
abstraction.
AAAI
(Vol.
214,
pp.
13491354).
Jain, R. & Shrivastava, L. (2011). Study and performance comparison of AODV \& DSR on
the basis of path loss propagation models. International Journal of Advanced Science and
Technology,
32,
4552.
(IJAST).
Wireless
communications,
IEEE,
11(6),
628.
IEEE.
Karp, B. & Kung, H.-T. (2000). GPSR: Greedy perimeter stateless routing for wireless
networks. Proceedings of the 6th annual international conference on Mobile computing and
networking
(pp.
243254).
Intelligence
Planning
Systems,
Pennsylvania
(June
1998).
Lee, G., Bulitko, V. & Nikolaidis, I. (2006). nLRTS: Improving distance vector routing in
sensor networks. Proceedings of the National Conference on Artificial Intelligence (AAAI),
Workshop
on
Learning
For
Search
(pp.
101107).
Nikolidakis, S. A., Kandris, D., Vergados, D. D. & Douligeris, C. (2013). Energy efficient
routing in wireless sensor networks through balanced clustering. Algorithms, 6(1), 2942.