Performance Measurement of Wireless Sensor Network using Dijkstra ...

14 downloads 85 Views 583KB Size Report
Sep 8, 2015 - Wireless sensor network is a collection of ad-hoc networks and many ... there are many number of small companies that effect the hardware ...
IJCSMS (International Journal of Computer Science & Management Studies) Vol. 18, Issue 01 Publishing Month: September 2015 An Indexed and Referred Journal with ISSN (Online): 2231 –5268 www.ijcsms.com

Performance Measurement of Wireless Sensor Network using Dijkstra Algorithm Monika Goyal1, Vinit Kumar2 and Anu Dahiya3 1

Lecturer, VMM, Rohtak, Haryana (India) [email protected]

2

Assistant Professor, VCE, MDU, Rohtak, Haryana (India), [email protected] 3

AP, VCE, MDU, Rohtak, Haryana (India) Publishing Date: 8th September, 2015

many number of algorithms that find the shortest path between the nodes. Dijkstra’s is an all pair shortest path algorithm that finds the shortest path between source to destination and every other node. It will find the route with positive edge weight only. It cannot find route with negative edge. To find route with negative edge weight bellman-ford algorithm is used. That find the route with negative edges. Bellman-ford has two distributed approaches that are: distance vector algorithm and link state algorithm. In distance vector algorithm weight are update periodically with the help of route metric and hop count. And a table is sent to all others neighbours . In link state algorithm only information passed is between node is connectivity related. There are many other algorithms that provides the shortest path for improving performance.

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. This paper provides the shortest path between source to destination for improving performance. In this, bellman ford distributed approach is used that is distance vector algorithm. It will help in finding shortest path with dynamically assigned nodes and it avoids malicious nodes and intrusion. We use dijkstra’s algorithm to find malicious nodes and we generate random graphs and it will give calculate the distance between the nodes.

Keywords: Wireless sensor network, dijkstra’s, bellman ford, distance vector, random, MATLAB.

1. Introduction Wireless sensor network is a collection of many adhoc networks which provide facility like communication, computation and sensing capability. Wireless sensor node built up from few to thousand of nodes where each node is connected to one or several sensors. Wireless sensor has to produced many tiny nodes and low cost.In this network cooperatively pass their data through the network to main location. Wireless sensor connect the physical world with digital world and provide understanding of our environment. Wireless sensor network must be reliable and scalable to support large applications. They must be accurate in providing required information while performing in network to avoid data load. Wireless sensor nodes provide many applications like. Military, health monitoring, entertainment, smart building, industrial, planning etc. In Wireless sensor network there are many number of small companies that effect the hardware and software design. There are

2. Problem description In performance measurement of dijkstra’s using wireless sensor network the problem formulation is based on the time complexity of the different algorithms that’s are used in estimating the shortest path in various routing algorithm. The dijkstra’s algorithm found shortest path with positive edge weight cycles. In bellman ford algorithm and there are negative edge weight cycles that are not able to give the least time complexity in wireless sensor network. Both algorithms have the worst time complexity in nature. And bellman-ford is slower than dijkstra’s for some problem, but more versatile, as it is capable of handling graph in which some of the edge weight are negative number. In such a case, the bellman ford can detect negative cycle and report there existence. A distributed variant of IJCSMS www.ijcsms.com

1

IJCSMS (International Journal of Computer Science & Management Studies) Vol. 18, Issue 01 Publishing Month: September 2015 An Indexed and Referred Journal with ISSN (Online): 2231 –5268 www.ijcsms.com

bellman-ford is distance vector routing. Distance vector algorithm is iterative and asynchronous and each local iteration is caused by, local link cost change and distance vector update message from neighbour. A distance vector routing protocol require that a router inform its neighbour of topology changes periodically as compared to link state protocols, which require a router to inform all the nodes in a network of topology changes. The distance vector have less computational complexity. In link state routing this contrast with distance-vector routing protocol, which works by having each node share its routing table with its neighbours. In link state protocol the only information passed between node is connectivity require. The distance vector avoid loop formation but suffer from increased complexity. To avoid the increased complexity in distance vector, make distance vector algorithm dynamic. By making algorithm dynamic graphs are dynamically created and avoid loop formation, malicious nodes can not be occurred and there is no intrusion attack. That reduced the time complexity and improve the performance of the algorithm. This gives least time complexity to the wireless sensor network. With the help of dijkstra’s it is easy to find the malicious nodes and choose the best one. The random selection of nodes can take more time and increased the time complexity. The random selection of nodes are developed with dijkstra algorithm.

performance of these. These algorithm are used in many other algorithms to reduced the time complexity. These can be used in many real time application where these provide less computational complexity.

4. Algorithm used Implementation:

4.1 Dijkstra’s and its Implementation: Dijkstra’s algorithm is discovered by Edsger W.dijkstra in 1956 and published three year later. The algorithm solves the single shortest path problem on a weighted directed graph. It can find shortest path between many nodes and a single node. Dijkstra’s algorithm is used in many fields like artificial intelligence and its variant is known as uniform cost search and its idea is breath first search. Dijkstra’s help in finding the route in robot motion planning problem. Dijkstra’s is also known as shortest path problem.

4.1.1 Steps for dijkstra’s algorithm: 1. 2. 3. 4. 5.

3. Objectives  

   



during

Improve the performance of distance vector algorithm. Making distance vector algorithm dynamic and randomly it reduced the increased complexity of the algorithm. Avoid loop formulation and malicious attacks. Improve the space and time complexity of dijkstra’s and bellman-ford algorithm. Improve the space complexity for random generated graph in dijkstra’s algorithm. Improve the run time complexity of dijkstra’s, bellman-ford and distance vector algorithm. It give accuracy to the wireless sensor network.

6. 7. 8. 9. 10. 11. 12. 13.

Initialize S with the start vertex, s, and VS with the remaining vertices. For all v in V-S Set p[v] to s. If there is an edge(s,v) Set d[v] to w(s,v). Else Set d[v] to ∞. While V-S is not empty For all u in V-S, find the smallest d[u]. Remove u from V-S and add u to S. For all v adjacent to u in V-S If d[u]+w(u,v)is less than d[v]. Set d[v] to d[u]+w(u,v). Set p[v] to u.

In dijkstra algorithm assign to every node a tentative distance value: set initial node to zero and to infinity to all other nodes. Mark all node unvisited. Set initial node as current node. Create a set of the unvisited nodes called the unvisited set consisting of all the nodes except the initial node. For current node, consider all of its unvisited neighbours and calculate their tentative distance.

These algorithm are used in many other areas like, estimation, routing estimation etc. These algorithms help in minimizing the distance between the nodes, and improve the complexity and

IJCSMS www.ijcsms.com

2

IJCSMS (International Journal of Computer Science & Management Studies) Vol. 18, Issue 01 Publishing Month: September 2015 An Indexed and Referred Journal with ISSN (Online): 2231 –5268 www.ijcsms.com

distance vector algorithm is implemented in steps as shown below.

4.2 Bellman-Ford Algorithm: Bellman-ford algorithm also solves the single shortest path problem. Bellman-ford is slower than dijkstra algorithm because it find the shortest route with negative edge weight cycles. In this the result is true when the graph contain the no negative weight cycle. The dijkstra’s and bellman-ford gives the same functionality for finding the shortest path. Dijkstra’s take less time in finding the path where as bellman-ford take more because of negative edge weight nodes.

4.3.1.1 Steps for distance vector routing algorithm: Let the node at which we are starting be called the initial node. Let the distance of node Y be the distance from the initial node to Y. Distance vector routing algorithm will assign some initial distances values and will try to improve them step by step: o

4.3 Distance vector algorithm and its method:

o

Distance vector algorithm is distributed approach of bellman ford. It is originally designed in 1969. The distance vector algorithm that calculate shortest path between all the pair of nodes the dynamic network. In distance vector each node has its own distance. When there is a need of updating the distance the router informs all its neighbour about topology changes periodically. The next distance is calculated with the help of route metric and hop count. It will give the minimum distance. Router using distance-vector protocols do not have knowledge of the entire path to a destination. Instead they use two methods: o o

Assign to every node a tentative distance for our initial node and to infinity for all other nodes. Mark all nodes unvisited. Set the initial node as current. Create a set of the unvisited nodes called the unvisited set consisting of all the nodes except the initial node.

4.3.2 Computational Cost Summery The maximum time of the algorithms is depend upon number of nodes in the network. o

The cost complexity for dijkstra’s is higher than distance vector algorithm in some application.

4.3.2.1 Efficiency o

Direction in which a packet should be forwarded. Distance from its destination o

Distance –vector protocols are based on calculating the direction and distance to any link in a network. Direction usually means the next hope address. The distance should be minimum. Each node maintain a vector of minimum distance to every other node. The cost of reaching a destination is calculated using various route metrics and hop count. Updates are performed periodically in a distance-vector protocols where all or part of a router’s routing table is sent to all its neighbours that are configured to use same distance-vector routing protocols.

o o

o

Distance vector algorithm is faster then dijkstra’s while performing in wireless network. And network traffic load is less for distance vector algorithm. Speed for dijkstra’s is faster for same number of process run. Dijkstra’s perform very faster in random selection of nodes. With increasing number of process dijkstra’s algorithm eventually becomes faster because no communication occurs. Distance vector algorithm has better average delay in network and others.

4.3.2.2 Time Complexity: o

4.3.1 Applying distance vector routing algorithm for route discovery:

o

The distance vector algorithm is used to find the shortest route between source and destination. The

Time complexity of the shortest path algorithms is depend on the number of vertices, number of edges and edge length. It is observed that time complexity of the dijkstra’s algorithm depends on the number of

IJCSMS www.ijcsms.com

3

IJCSMS (International Journal of Computer Science & Management Studies) Vol. 18, Issue 01 Publishing Month: September 2015 An Indexed and Referred Journal with ISSN (Online): 2231 –5268 www.ijcsms.com

o

o

vertices and is inversely proportional to the number of vertices. Time complexity is least for distance vector algorithm but time complexity was higher for bellman-ford than dijkstra’s. Time complexity in distance vector algorithm is depend on the route metric and hope count.

node. It could not find the shortest route for two nodes. It degrades the performance of the algorithm. To improve the performance distance vector is used.

4.3.2.3 Performance and Efficiency: o

o

o

o

Finding the distance with lower number of nodes the bellman-ford is better and for higher number of nodes the dijkstra’s is better and efficient. The distance vector is more efficient because it need some calculation for every node in the network and each node has local information and no chances of failure of nodes. Distance vector algorithm is better in average delay and traffic load. Distance vector has best convergence result

Fig:1

5. Result In this paper the complete focus is on performance measurement. While analysing the result for the application it consider the performance of dijkstra’s, bellman-ford and its distributed approach distance vector algorithm. It is noted that dijkstra’s finds the shortest route between source to destination and other node also. But here it has to be analyzed that the performance of dijkstra’s while performing for malicious node detection and random generated graphs in the network. And bellman-ford is used to find the route with negative edge weight cycle. Its distributed approach distance vector algorithm is used here that reduced the time complexity and give the result with minimum weight. Following points give the result analysis of the different algorithm for some application specific:

Fig: 1.1

5.2 Result using Distance Vector In this result distance vector is used here for finding shortest path between nodes. The numbers of nodes are defined 7 in (fig 2). Then source and destination node are 3and 7. This graph shows the route from node 3 to 7 wia node 2 with shortest distance.

Here the comparison shown between previous method and distance vector algorithm for shortest path finding:

5.1 Result using Previous Approaches In this number of nodes can be created but to minimize the complexity only 6 nodes are created (fig1). A graph is shown with their weights. And second graph shows the shortest distance to each IJCSMS www.ijcsms.com

4

IJCSMS (International Journal of Computer Science & Management Studies) Vol. 18, Issue 01 Publishing Month: September 2015 An Indexed and Referred Journal with ISSN (Online): 2231 –5268 www.ijcsms.com

Fig:3

5.3.1 An Example of Travel Guide using Distance Vector:

Fig: 2

An example is shown using distance vector algorithm. A map is created of Andhra pardesh there are number of cities defined. In this four icons are created for easy access of this travel guide. The four options are info, loop, travel and exit. Info give instruction how to use. Loop connect all the cities and travel used for finding optimal path for this select two cities then optimal route is shown with pink colour. And then exit from the travel guide.

Fig: 2.1

5.3 Result on X, Y Coordinates using Distance Vector: Another type of result is displayed here with X, Y coordinates and it also finding the shortest route by using distance vector algorithm. In this a target is defined and numbers of obstacles are created by using left mouse button. Then select the initial node then it will calculate the shortest route between initial and target within less time.

Fig:4

5.4 A Random Selection of Route and find Malicious Path using Dijkstra: In this result dijkstra’s algorithm is used. This type of result is used in measurement of robots IJCSMS www.ijcsms.com

5

IJCSMS (International Journal of Computer Science & Management Studies) Vol. 18, Issue 01 Publishing Month: September 2015 An Indexed and Referred Journal with ISSN (Online): 2231 –5268 www.ijcsms.com

the dijkstra’s algorithm based application are better. The distance vector algorithm is more efficient algorithm if the distance is assigned dynamically to the nodes. That help in reducing the malicious node and network traffic. Distance vector is works as routing protocol in the wireless sensor network.

motion. But here it is used for random selection of source and destination route. When a route is found it will give a sound and when no route is found it will show the malicious node found message.

References [1] Habib, Asif. "Sensor network security issues at network layer." Advances in Space Technologies, 2008. ICAST 2008. 2nd International Conference on. IEEE, 2008. [2] Aschenbruck, Nils, et al. "A security architecture and modular intrusion detection system for WSNs." Networked Sensing Systems (INSS), 2012 Ninth International Conference on. IEEE, 2012. [3] Haiyun Luo, Petros Zerfos, Jiejun Kong, Songwu Lu, Lixia Zhang, “Self-securing Ad Hoc Wireless Networks,” IEEE ISCC (IEEE Symposium on Computers and Communications) 2002, Italy. [4] Du, Wenliang, Lei Fang, and Ning Peng. "Lad: Localization anomaly detection for wireless sensor networks." Journal of Parallel and Distributed Computing66.7 (2006): 874-886. [5] Pires Jr, Waldir Ribeiro, et al. "Malicious node detection in wireless sensor networks." Parallel and Distributed Processing Symposium, 2004. Proceedings. 18th International. IEEE, 2004. [6] Curiae, D-L., et al. "Malicious node detection in wireless sensor networks using an autoregression technique." Networking and Services, 2007. ICNS. Third International Conference on. IEEE, 2007. [7] Panos, Christoforos, Christos Xenakis, and Ioannis Stavrakakis. "A Novel Intrusion Detection System for MANETs." Security and Cryptography (SECRYPT), Proceedings of the 2010 [8] Musznicki, Bartosz, Mikolaj Tomczak, and Piotr Zwierzykowski. "Dijkstra-based localized multicast routing in Wireless Sensor Networks."Communication Systems, Networks & Digital Signal Processing (CSNDSP), 2012 8th International Symposium on. IEEE, 2012. [9] Abuarqoub, Abdelrahman, et al. "Simulation Issues in Wireless Sensor Networks: A Survey." SENSORCOMM 2012, The Sixth International Conference on Sensor Technologies and Applications. 2012. [10] Asmaa shaker Ashoor “performance analysis between distance vector algorithm and link state algorithm for routing vector” international journal of scientific and

Fig: 5

Fig: 5.1

6. Conclusion In the result of the study it found that none of the algorithm is capable to handle the bottleneck in the network. Following conclusion are drawn from the study for each algorithm. As per the algorithmic analysis performed conclude that dijkstra algorithm is more efficient if nodes are randomly generated and it helps in easily detection of malicious nodes. The application where the network traffic is more

IJCSMS www.ijcsms.com

6

IJCSMS (International Journal of Computer Science & Management Studies) Vol. 18, Issue 01 Publishing Month: September 2015 An Indexed and Referred Journal with ISSN (Online): 2231 –5268 www.ijcsms.com

technology research volume 4, issue 02, february 2015 . [11] V. Gambiroza, P. Yuan, L. Balzano, Y. Liu, S. Sheafor, and E. Knightly, "Design, Analysis, and Implementation of DVSR: A Fair HighPerformance Protocol for packet Rings," In IEEE/ACM Transaction on Network, Vol. 12, No. 1, 2004. [12] William Stalling, "Data and Computer Communications, pearson Education, Inc., Publishing as Prentice Hall, New Jersey, 2011. [13] Z.Xu and et.al, "A more Efficient Distance Vector Routing Algorithm," In proc. IEEE MILCOM '97 Proceeding, Vol.2, 1997. [14] Roch Guerin and Ariel Orda, " Computing Shortest Paths for any Number of Hops," In IEEE Transaction on Network, Vol. 10, No. 5, 2002. [15] T.H Comrmen, C.E. Leiserson, and R.L. Rivest, "An Introduction to Algorithms," Second Edition, MIT Press, Boston, 2002. [16] Y. Mourtada,"Routing Basics & Protocol," Internet draft, 2000. [17] Distributed Scalable Routing Based on Link State Vectors’, Jochen Behrens, J.J.GarciaLuna-Aceves, 1994.

IJCSMS www.ijcsms.com

7