Appraisal of PSO Algorithm over Genetic Algorithm in WSN Using NS2

Page 1

IJSRD - International Journal for Scientific Research & Development| Vol. 3, Issue 12, 2016 | ISSN (online): 2321-0613

Appraisal of PSO Algorithm over Genetic Algorithm in WSN Using NS2 1,2

Vishwaraj1 Tathappa Rachannanavr2 Department of Electronics and Communication Engineering 1,2 UBDT college of Engineering, Karnataka, India

Abstract— A Wireless Sensor Networks is a group of spatially distributed and dedicated autonomous sensors with a communication infrastructure for monitoring and recording environmental conditions and or Genetic Algorithm the collected data as central location. The nodes in WSNs (Wireless Sensor Networks) are very prone to failures due to energy depletion, defective hardware and environmental conditions and breakdown in the onboard electronics. Loosing network connectivity has an adverse effect on the applications and hinders the coordination among some nodes. Thus fault tolerance is one of major issue in WSNs. This paper mainly focuses on the parameter comparison indeed the advantages of PSO (Practical Swarm Optimization) Algorithm over GA (Genetic Algorithm) in the WSNs using network simulator version 2. This paper considers the energy efficiency and some other parameters of the nodes and compares the algorithm for the same. Key words: PSO Algorithm, NS2, Genetic Algorithm I. INTRODUCTION Practically all over the place we can see the WSN networks, so which got the global attention now a days because of its vast applications. WSN lessens the Genetic Algorithm between the real world and the virtual world by acting as a bridge among them. The improvements in the wireless technology resulted the enhancement in data collection and data processing capability. WSNs comprises of functional communication nodes equipped with processors, sensors and communication devices such as short-range transceivers over wireless channels as shown in Fig 1.

Memory

Sensor/actuator

Microcontroller

Transceiver

Power Supply

Fig. 1: Basic components of a WSN node These distributed nodes over large area have to cooperate with the neighbor nodes to perform their specific task. For this the node should possess sufficient energy and dissipation of energy must be slower. If the energy decay is faster, results in the shutdown of a functional node, which intern results in the leakage of transmission of data. Also the WSN node has restricted amount of energy which cannot be

supplanted, hence energy should utilized in an efficient manner. In WSNs, a node with the sufficient energy has to relay information to the destination, and if relay repeats involving similar node, results in shut down after reaching its operational threshold. So sink node has to find the alternative path for transmission with path having low transmission loading and high data handling capacity with the sufficient energy. Here the nodes developed are of distributive type. As the communication starts the energy dissipation initiates. To recover the in-active nodes resulted after reaching the operational threshold, we can use Genetic Algorithm as well as the PSO algorithm which is the enhancement for the Genetic Algorithm. A. Theoretical comparison of PSO Algorithm and Genetic Algorithm. Unlike Genetic Algorithm (Evolutionary programming and evolutionary strategy), in PSO, there is an absence of ‘Selection’ process. The main characteristic of Genetic Algorithm is the fitness function to determine the best chromosome which is contrary to PSO algorithm where all the participants of the population are kept for the course of operation. Genetic Algorithm is known for its optimal search capacity i.e. a balance between global and local search which is done by probability (strategic) parameters. But the same balance is done in PSO algorithm by suitable initial weight factors. Genetic Algorithm is used to recover the nodes in general but which is more energy and time consuming along with its complexity compared to PSO algorithm because of the number of steps involved. Thus this paper illustrates the advantages of PSO algorithm over Genetic Algorithm and compares both the algorithm in terms of energy efficiency. B. Genetic Algorithm Genetic Algorithms were developed by John Holland and his students at the University of Michigan during 1960s. Here Active nodes and in-Active nodes are encoded in the form of strings (chromosomes) based on the node parameters, which serves as the input for the Genetic Algorithm [11]. Two strings are considered for further process. These strings undergoes in further steps of Genetic Algorithm. There are 5 steps in Genetic Algorithm known as Initialization, Evaluation, Selection, Crossover, and Mutation. 1) Initialization In this step the Genetic Algorithm generates chromosomes by using binary strings feed as input. 2) Evaluation For the generated chromosomes fitness value is calculated. 3) Selection: This step keeps the best fit part of chromosome for further step.

All rights reserved by www.ijsrd.com

254


Appraisal of PSO Algorithm over Genetic Algorithm in WSN Using NS2 (IJSRD/Vol. 3/Issue 12/2016/065)

4) Crossover In this step the best fit part of chromosomes are swapped to obtain the new chromosome with the improved fitness. 5) Mutation Recover the inactive nodes by introducing certain traits into the chromosome. Figure 2 shows the steps involved in the Genetic Algorithm [10] [11].

The modification of the particle’s position can be mathematically modeled according the following equation. Vin+1 = wVin +c1 rand1(…) x (pbesti-sin) + c2 rand2(…) x (gbest-sin) (1) Where, vin: velocity of agent i at iteration n, w:weighting function, cj:weighting factor, rand : uniformly distributed random number between 0 and 1 sin: current position of agent i at iteration n, pbesti: pbest of agent i, gbest: gbest of the group. The following weighting function is usually utilized in (1) w = wMax-[(wMax-wMin) x iter]/maxIter (2) Where wMax: initial weight, wMin : final weight maxIter : maximum iteration number, iter : current iteration number. sin+1 = sin + Vin+1 (3) Larger w - greater global search ability Smaller w - greater local search ability By linearly decreasing the inertia weight from a relatively large value to a small value through the course of the PSO run gives the best PSO performance compared with fixed inertia weight settings. Here nodes are developed as shown in the figure.5 and both the algorithms applied simultaneously. Graphs are plotted for various parameters and compared where we can see the advantages of PSO algorithm over Genetic Algorithm.

start

For each particle position(p) evaluate the fitness Loop until max iter

Fig. 2: Flowchart for Genetic Algorithm C. Particle Swarm Optimization Algorithm PSO technique was developed in 1995 by James Kennedy (social-psychologist) and Russell Eberhart (electrical engineer). Which is a robust stochastic optimization technique based on the movement and intelligence of swarms. PSO applies to the concept of social interaction to problem solving. It uses a number of agents (particles) that constitute a swarm moving around in the search space looking for the best solution. Each particle is treated as a point in an Ndimensional space which adjusts its “flying” according to its own flying experience as well as the flying experience of other particles. Each particle tries to modify its position using the following information:  The current positions,  The current velocities,  The distance between the current position and pbest,  The distance between the current position and the gbest.

Loop until all particles exhaust

Initialize particles with random position and velocity vectors

If fitness P is better then fitness Pbest then pbest = p Set best of pbests as gbest Updates particle velocities ( equation 1 and 3)

Stop giving gbest optimal solution Fig. 3: Flowchart for PSO Algorithm II. SIMULATION COMPARISON OF PSO ALGORITHM AND GENETIC ALGORITHM

Ns2 is used for simulation. It is suitable for designing new protocols, comparing different protocols and traffic estimations. It is open source.

All rights reserved by www.ijsrd.com

255


Appraisal of PSO Algorithm over Genetic Algorithm in WSN Using NS2 (IJSRD/Vol. 3/Issue 12/2016/065)

Following figure shows the node operation, which are taken from the nam window and trace graph of network simulator.

Fig. 4: Node development and communication of nodes

Fig. 5: Active nodes shown by yellow colour after energy dissipation III. RESULTS AND DISCUSSION The Genetic Algorithm is apllied first and after PSO Agorithm. Following figures of graph shows the comparision of various parameters like throughput, packet drop and energy of respective algorithms.

Fig. 7: Comparison of packet drop

Fig. 8: Energy Comparison IV. CONCLUSIONS This paper compares the Genetic algorithm and PSO algorithm in WSN. And reveals the advantage of PSO over GENETIC ALGORITHM. This optimized the replacement cost, energy consumption, throughput and packet drop of sensor nodes also replaced non-functional sensor nodes and reuses the most routing paths in most efficient manner, resulting in increased WSN lifespan. REFERENCES

Fig. 6: Throughput comparison

[1] Muhammad Asim, Hala Mokhtar and Madjid Merabti, “A self-managing fault management mechanism for wireless sensor networks” in proc of IJWMN Vol.2, No.4, November 2010. [2] Abolfazal Akbari1, Arash Dana, Ahmad Khademzadeh and Neda Beikmahdavi, “Fault Detection and recovery in Wireless Sensor Network Using Clustering” in proc of IJWMN Vol.3, No.1, February 2011. [3] Ehsan Heidari and Ali Movaghar, “An efficient method based on genetic algorithm to solve sensor network optimization problem” in proc of International Journal on applications of graph theory in wireless ad hoc networks and sensor networks, Vol.3 No.1, March 2011.

All rights reserved by www.ijsrd.com

256


Appraisal of PSO Algorithm over Genetic Algorithm in WSN Using NS2 (IJSRD/Vol. 3/Issue 12/2016/065)

[4] Song Jia, Wang Bailing, Peng Xiyuan, Li Jiangeng and Zhong Cheng, “A Recovery Based on Minimum Distance redundant Nodes Fault Management in WSNs” in proc of Internatinal Jpurnal of Cpntrol and Automation, Vol.6, No.2, April 2013. [5] Hong-chi Shih, Jiun-Huei Ho, Bin-Yih Liao and JengShyang Pan, “Fault Node Recovery Algorithm for Wireless Sensor Networks” in proc of IEEE Sensors Journal, Vol. 13, No.7 2013 [6] A. Manikandan, S.Rathinagowri, “An Efficient Detection and Recovery of Fault node in Wireless Sensor Networks” in proc of IJIRSET, Vol.3, Special Issue 1, February 2014. [7] Jiun-Huei Ho, Hong-Chi Shih, Bin-Yih Liao, ShuChuan Chu, “A ladder diffusion algorithm using ant colony optimization for wireless sensor networks” in proc of Information Sciences 192, 204-212, April 2011. [8] Jiun-Huei Ho, Hong-Chi Shih, Bin-Yih Liao, JengShyang pan, “Grade diffusion algorithm”, in proc of applied mechanics and materials, Vol 284-287, 2013. [9] Qinghai Bai, “Analysis of Practical Swarm Optimization Algorithm”, in proc of computer and information science, Vol.3, NO1, Feb 2010. [10] Babatunde Oluleye, Armstrong Leisa, Jinsong Leng and Diepeveen Dean, A genetic algorithm based feature selection, International Journal of Electronics communication and computer engineering Vol.5 Issue 4 [11] Vishwaraj, Karthik S.P, Sreedharamurthy S.K “Kannada Handwritten Character Recognition using Genetic Algorithm”, International Journal of Modern trends in Engineering and Research, Aug 2015

All rights reserved by www.ijsrd.com

257


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.