• No results found

Improving Network Lifetime of Wireless Sensor Networks Using Modified Firefly Algorithm

N/A
N/A
Protected

Academic year: 2020

Share "Improving Network Lifetime of Wireless Sensor Networks Using Modified Firefly Algorithm"

Copied!
6
0
0

Loading.... (view fulltext now)

Full text

(1)

ISSN(Online): 2320-9801

ISSN (Print) : 2320-9798

I

nternational

J

ournal of

I

nnovative

R

esearch in

C

omputer

and

C

ommunication

E

ngineering

(An ISO 3297: 2007 Certified Organization)

Vol. 4, Issue 3, March 2016

Improving Network Lifetime of Wireless

Sensor Networks Using Modified Firefly

Algorithm

R.Priyadarshini1, J.Senthilkumar2

PG Scholar, Dept. of I.T., Sona College of Technology, Salem, Tamilnadu, India1

Professor, Dept of IT., Sona College of Technology, Salem, Tamilnadu, India2

ABSTRACT: Wireless sensor networks (WSNs) are a vast domain that is being used in many applications and is

growing enormously in the recent years. From traffic monitoring to military surveillance WSNs are used almost in all areas. The sensor networks contain a battery, transmitter, receiver and a processing unit. The sensor network is formed by these small battery powered sensor nodes. The nodes are usually randomly deployed in the environment to be monitored. During data collection, the energy in the nodes gets reduced, and the lifetime of the network decreases. In order to maximise the lifetime of the network, the energy consumption of the individual nodes should be minimised. Clustering is one the technique that is used to optimize the energy in the sensor network. Firefly Algorithm is one of the bio inspired algorithm that is used for clustering in WSNs. The algorithm is developed based on the behaviour of the fireflies and the light released by them. In this paper clustering using modified firefly algorithm is simulated. The new cost function reduces the intra cluster distance and allows nodes to move their positions before clustering is done. This reduces the energy consumed for the movement of nodes while clustering and thus helps to prolong the lifetime of the network. The performance of the algorithm is compared with the Firefly algorithm and Artificial Bee Colony algorithm.

KEYWORDS: Wireless Sensor Networks (WSNs), Clustering, Firefly Algorithm, Modified Firefly Algorithm.

I.INTRODUCTION

WSNs are made up of small autonomous devices called sensor nodes that are deployed to monitor the physical and environmental condition [3]. They are smaller in size and the cost also varies widely. Each sensor network consists of a base station that communicates with the other nodes. The nodes can also communicate among themselves to sense data, store, aggregate them and send it to the base station. The number of nodes varies in hundreds to thousands, so the network is not so easy to establish and difficult to maintain. Once the nodes are deployed, it is the responsibility of individual nodes to reorganise, establish connection and communicate among them. The users can retrieve information from a network with the help of queries. There are various types of sensors such as thermal, bio, seismic, magnetic, optical sensor which can monitor a vast range of environmental conditions.

Energy consumption [3] is one of the major challenges in wireless sensor network because the sensor nodes contain limited and non replaceable power sources. The nodes collect data from the environment and transfer it to the base station. Since the nodes continuously sense data, there is decrease in the energy of the nodes and this minimizes the network lifetime. Hence methods to reduce energy consumption are introduced.

A. Clustering in wireless sensor networks

(2)

ISSN(Online): 2320-9801

ISSN (Print) : 2320-9798

I

nternational

J

ournal of

I

nnovative

R

esearch in

C

omputer

and

C

ommunication

E

ngineering

(An ISO 3297: 2007 Certified Organization)

Vol. 4, Issue 3, March 2016

network is to re-elect the cluster head nodes periodically. Clustering is performed to obtain energy efficient and to improve network scalability. Clustering is also used in applications that require efficient data aggregation. Various techniques are used for clustering in WSNs. Clustering is classified into two basic types; they are centralised and distributed clustering. In centralised technique the base station manages the clustering process. The base station decides the cluster heads and the members of each cluster. Unlike centralised clustering, in distributed clustering the cluster head nodes and the clusters are autonomously determined among the sensor nodes. Each sensor node runs its own algorithm and takes the decision of becoming the cluster head. Sometimes the implementation of hybrid scheme is also done.

II.RELATED WORK

Dr.Sarma and Mahesh Gopi[6] introduces energy efficient clustering for wireless sensor networks using Firefly algorithm. The Firefly Algorithm is one of the bio inspired algorithms that is used in many applications. This algorithm is used for energy optimization in the network. This algorithm is modelled after the flashing behaviour of fireflies and their attractiveness towards another firefly with higher brightness. Since it is a centralised algorithm, the base station runs the algorithm and determines the best cluster heads that minimizes the cost function. The new cost function can take the greatest distance between the cluster head and cluster members and the remaining energy of the cluster heads in to account. The base station identifies the optimal number of cluster heads and the members of the cluster heads. The energy consumption of the network is reduced and the network lifetime is higher compared with other clustering protocols.

Dr.Sarma and Mahesh Gopi[7] proposed a centralized, energy aware cluster‐based protocol to increase network lifetime with Jumper Firefly algorithm. The Jumper Firefly Algorithm [1] is based on Firefly algorithm and helps to increase the performance of agents to find more accurate solutions by modifying the agent’s situations and hence the possibility of obtaining the optimal solution is improved. A status table is used to record and observe the fireflies behaviour. The status table helps to take decisions on whether the agents should jump into new situations. The proposed algorithm provides better performance and also increases the probability of getting the optimal solution and also remembers the history of the situations.

P.Leela and K.Yogitha[4] proposed a hybrid clustering approach to minimize the energy of the network is proposed to increase the lifetime of the wireless sensor network. The hybrid algorithm takes the advantages of both Artificial Bee Colony (ABC) and Firefly algorithm. The clustering based on firefly and ABC algorithm is employed for energy optimization. The position of the node is a random location as given by the rand command. The algorithm functions in rounds and the node with the energy greater than the energy required for that round is only chosen as the cluster head. For energy based switching Firefly Algorithm is used and for the random selection of cluster heads the ABC algorithm is used. Using this hybrid algorithm the energy in the network can be conserved and hence the life of network increased.

III. PROTOCOL DESCRIPTION

A. Firefly algorithm

Fireflies produces a flashing light that is used for communication and attracting the prey. Dr Xin-She Yang[8] developed the Firefly algorithm in 2008 based on this flashing behaviour. The objective of firefly algorithm is to find the position of the particle that provides best results in evaluating a fitness function. The three main rules of Firefly algorithm are

 The fireflies are unisexual. One firefly is attracted by another firefly regardless of their sex.

 The attractiveness of the firefly is directly proportional to the brightness and as the distance increases, attractiveness and brightness decreases. The less brighter firefly will move towards the more brighter firefly. If there is no brighter one, they move randomly.

 The brightness of the firefly is given by the objective function.

The firefly’s attractiveness is directly proportional to the light intensity seen by other fireflies; we now define the attractiveness β with the distance r as

β = β0 exp (-ᵧᵣm) eq. (1)

where β0 is the attractiveness at r=0. ri,j is the distance between any two fireflies i and j, which are at positions

(3)

ISSN(Online): 2320-9801

ISSN (Print) : 2320-9798

I

nternational

J

ournal of

I

nnovative

R

esearch in

C

omputer

and

C

ommunication

E

ngineering

(An ISO 3297: 2007 Certified Organization)

Vol. 4, Issue 3, March 2016

rij = ∑ ( , − , ) eq. (2)

where xi,k is the kth element of the spatial coordinate xi of the firefly i and d is the number of dimensions.

The movement of a firefly i towards more another (brighter) firefly j is given by xi= xi + β0e-ᵧᵣ2i,j(xj-xi) + αε eq. (3)

where the second term is due to attraction and α is a random factor. B. Cluster formation using firefly algorithm

The base station runs the algorithm as it is centralised. The best K cluster heads that minimize the cost function are obtained.

Cost= β × a1 + (1-β) × a2 eq. (4)

a1 = max , ,… ∑

( , , )

| , | ∀

, eq. (5)

a2 =

∑ ( )

∑ ( , ) eq. (6)

a1 is the maximum average Euclidean distance of individual nodes to the associated cluster heads. |Cp,k| is the

number of nodes that belong to cluster Ck of particle p. a2 is the function which is the ratio of sum of initial

energy of all nodes(ni=1,2,3..N) to the sum of the current energy of the cluster heads in the current iteration. β is

a user defined constant.

In a sensor network with N nodes, clustering is done as follows: 1. Set the particles with randomly selected cluster heads. 2. Calculate the cost function

i) For each node ni=1,2,3...N

a)Calculate distance between node ni and all the cluster heads.

b)Assign a node ni to a cluster head if the distance between the node and the cluster head is

minimum.

ii) Calculate the cost function using (4) to (6). 3. Rank the nodes and find the best.

4. Update the position.

5. The new position is mapped with the closest x,y coordinates.

6. Repeat the steps 2 to 5 till the maximum number of iterations is reached. The optimal number of cluster heads and its associated cluster members are identified.

C. Advantages and disadvantages of Firefly Algorithm

Firefly algorithm is a constructive optimisation tool because of the attractiveness function. It also includes improvement among its own space from the former stages along with self improving process in the current space. The disadvantage of firefly algorithm includes getting trapped into local optima. The parameters of the algorithm are fixed and do not vary with time. Since the algorithm does not remember the history of better situation, the firefly may move into new situation than its previous better situation.

2. Modified firefly algorithm

(4)

ISSN(Online): 2320-9801

ISSN (Print) : 2320-9798

I

nternational

J

ournal of

I

nnovative

R

esearch in

C

omputer

and

C

ommunication

E

ngineering

(An ISO 3297: 2007 Certified Organization)

Vol. 4, Issue 3, March 2016

firefly 1 2 ... n position

fitness

worst eligibility

Table- I Status table

In the status table, position denotes the location of each and every firefly at ith stage. Fitness denotes the quality of each firefly at ith stage. The number of worst solution obtained by every firefly in comparison with the other fireflies is denoted by worst. Eligibility denotes the cost of firefly from the starting of the search process to the analysis moment in the table.

Eligibility gets updated as

Eligibility (i) = fitness (i) + eligibility (i-1) eq.(7)

Based on Status Table, firefly (m) is in risk and needs to use jump option if its values in status table is as shown below

Worst (firefly (m)) = max (worst) > ε eq. (8) Eligibility (firefly (m)) = min (eligibility) eq. (9) Eligibility (firefly (m)) = AVE (eligibility) < π eq. (10)

AVE (Eligibility) indicates the mean of the eligibility row in Status Table, ε is a user defined variable that prevents a firefly from jumping in the beginning of the search process in the new algorithm and π is a constant. Based on risk condition, agents involved in risk are the agents that have attained low quality solutions. So, the algorithm offers the agents with jump option by which they can reorganise themselves in a new position and start a new life. New position for fireflies means rearranging the firefly in new location. The rearrangement of the agents is done randomly. Update of Status Table for the agents by means of the jump option is as shown below

Position (firefly (m)) = new position (firefly (m)) eq. (11) Fitness (firefly (m)) = fitness of new solution eq. (12) Eligibility (firefly (m)) = AVE (eligibility) eq. (13) Our objective is to implement this modified firefly algorithm for clustering in WSNs.

The cluster setup of modified firefly algorithm is similar to the firefly algorithm. The base station runs modified firefly algorithm instead of firefly algorithm

Algorithm: Clustering using modified firefly algorithm Data:

 Generate S particles to contain k randomly selected clusters.

 Define the constants like ε, π, β.

 Map the randomly generated positions with the closest(x,y) coordinates.

 Generate the status table.

Result: Cluster head positions are obtained. While (t< Max Generation)

Check for the risk condition in equation If any firefly is in risk

Put the firefly in the new position randomly. Update the status table using equation.

Map the positions with closest(x,y) coordinates Evaluate the cost function

(5)

ISSN(Online): 2320-9801

ISSN (Print) : 2320-9798

I

nternational

J

ournal of

I

nnovative

R

esearch in

C

omputer

and

C

ommunication

E

ngineering

(An ISO 3297: 2007 Certified Organization)

Vol. 4, Issue 3, March 2016

Update the particles positions;

Limit the change in particles position value; Update the status table with the new position. End

End End

Estimate the information utility and cost. Rank the fireflies and find the current best; End

Post process the results End procedure.

IV.SIMULATION AND RESULTS

The performance of the Modified Firefly Algorithm is estimated using ns2. Ns2 is an object oriented, discrete event simulator that provides substantial support to simulate many number of protocols like TCP, FTP, UDP, HTTP and DSR. It is unix based and uses tcl as scripting language. It is easier to simulate both wired and wireless networks using ns2.The simulated network is for 100nodes in a 200m× 200m network area. The performance of new protocol is compared with the Firefly Algorithm (FFA), and Artificial Bee Colony Algorithm (ABC). The optimal number of clusters is formed. The simulations are continued until all the nodes consumed all their energy.

Fig.1. Network Lifetime

Figure 1 shows the network lifetime which proves that the proposed protocol provides improved network lifetime than the other previously used protocols. This is because of the jump option provided to the nodes to move their positions into a nearest cluster rather than transferring to a cluster head that is far from the node. This reduces the energy wasted by the nodes to transmit information to the cluster head and hence increases the lifetime of the network.

(6)

ISSN(Online): 2320-9801

ISSN (Print) : 2320-9798

I

nternational

J

ournal of

I

nnovative

R

esearch in

C

omputer

and

C

ommunication

E

ngineering

(An ISO 3297: 2007 Certified Organization)

Vol. 4, Issue 3, March 2016

Figure 2 shows the average energy consumed by the algorithm. The graph clearly indicates that the proposed protocol consumes energy in fewer amounts than the other compared protocols. This is because the energy lost due to the movement of nodes during the formation of cluster is reduced.

Fig.3. Delay

Figure 3 shows the delay in the packet transmission of the proposed algorithm. The proposed protocol provides better performance than the other two compared protocols since the data can travel from node to node and to the endpoint in a lesser time.

V.CONCLUSION

In this paper clustering using modified firefly algorithm is done. The cost function makes use of the distance between the nodes and the cluster head and the energy of the nodes. The new protocol allows nodes to take new positions and become member of an efficient cluster for transmission. The simulation results shows that the algorithm provides low energy consumption and prolonged network lifetime than the other protocols. Future scope includes combination of other bio-inspired algorithms and introduces hybrid techniques for efficient clustering in WSNs.

REFERENCES

1. M. Bidar and H. R. Kanan, “Jumper firefly algorithm,” International Conference on Computer and Knowledge Engineering (ICCKE-2013), pp. 267–271,Oct-Nov 2013.

2. CholavendhanSelvaraj et al, “A Survey on Application of Bio-Inspired Algorithms”(IJCSIT) International Journal of Computer Science and Information Technologies, Vol. 5 (1) , 2014, 366-370.

3. Kamaldeep Kaur, Parneet Kaur, Er. Sharanjit Singh “Wireless Sensor Network: Architecture, Design Issues and Applications”, International Journal of Scientific Engineering and Research (IJSER) ISSN (Online): 2347-3878 Volume 2 Issue 11, November 2014. 4. P.Leela, K.Yogitha, “Hybrid Approach for Energy Optimization in Wireless Sensor Networks”, International Journal of Innovative

Research in Science, Engineering and Technology, Volume 3, Special Issue 3, March 2014.

5. Liliana M. Arboleda C. and Nidal Nasser, “Comparison of Clustering Algorithms and Protocols for Wireless Sensor Networks”, IEEE CCECE/CCGEI, Ottawa, May 2006.

6. Prof. N.V.S.N Sarma and Mahesh Gopi,“Implementation of Energy Efficient Clustering Using Firefly Algorithm in Wireless Sensor Networks”, IPCSIT vol. 59 (2014) © (2014) IACSIT Press, Singapore.

7. Prof. N.V.S.N Sarma, Mahesh Gopi, “Energy Efficient Clustering using Jumper Firefly Algorithm in Wireless Sensor Networks” ,International Journal of Engineering Trends and Technology (IJETT) – Volume 10 Number 11 - Apr 2014.

Figure

Fig.1.  Network Lifetime
Fig.3. Delay

References

Related documents