Abstract
Wireless Sensor Network (WSN) consists of small lowcost, lowpower multifunctional nodes interconnected to efficiently aggregate and transmit data to sink. Clusterbased approaches use some nodes as Cluster Heads (CHs) and organize WSNs efficiently for aggregation of data and energy saving. A CH conveys information gathered by cluster nodes and aggregates/compresses data before transmitting it to a sink. However, this additional responsibility of the node results in a higher energy drain leading to uneven network degradation. Low Energy Adaptive Clustering Hierarchy (LEACH) offsets this by probabilistically rotating cluster heads role among nodes with energy above a set threshold. CH selection in WSN is NPHard as optimal data aggregation with efficient energy savings cannot be solved in polynomial time. In this work, a modified firefly heuristic, synchronous firefly algorithm, is proposed to improve the network performance. Extensive simulation shows the proposed technique to perform well compared to LEACH and energyefficient hierarchical clustering. Simulations show the effectiveness of the proposed method in decreasing the packet loss ratio by an average of 9.63% and improving the energy efficiency of the network when compared to LEACH and EEHC.
1. Introduction
Wireless Sensor Network (WSN) finds extensive application in both civilian and military applications. It has been extensively used in target tracking, surveillance, monitor natural disasters, biomedical applications, habitat monitoring, and building management systems [1]. Sensor nodes in natural disasters sense/detect an environment to forecast disasters. In biomedical applications, sensor surgical implants monitor patient’s health. In seismic sensing, sensors ad hoc deployment in a volcanic area detects earthquakes/eruptions [2]. WSN nodes use nonrechargeable storage device with restricted energy and in general replacing batteries is not possible. Thus, energy efficiency is an important issue, and designing powerefficient protocols is critical to prolong life of the sensors [3]. Typically WSNs monitor specific areas using sensors collect data and send to base station (BS). A typical WSN organized hierarchically is shown in Figure 1. In hierarchical structure, to save energy some nodes selected based on the objective function act as Cluster Head (CH) and aggregate data from its entire neighbor. The CH then sends the data to the BS and thus reduces network overheads to ultimately save energy in each node.
WSNs unlike traditional networks have their own design/resource constraints which include limited energy, shorter transmission range, limited bandwidth, and minimal processing power in nodes. Based on the deployment scheme, network size varies with the environment. One of the most important activities in WSN is data aggregation which is the process of gathering data from multiple sensors, fusion of the data, and reduction of redundant transmission. Hierarchical techniques have been found to be quite effective in data aggregation.
LEACH randomizes rotation of nodes as CH and thus distributes energy load among network sensors evenly. The idea of LEACH protocol is that nodes become CH periodically with every period having two stages. The first stage is cluster construction and the next is data communication [4]. During the cluster formation each node selects a random number and compares with threshold values . If the number is less than , then it is chosen as CH; else it remains as a regular node in that round. The threshold is given by where is the percentage of the Cluster Heads over all nodes. is the round number. is the set of nodes that have not been CH in the first rounds.
Table 1 reviews popular hierarchical data aggregation protocols [5].
From Table 1 it can be observed that clustering objectives are varied with one of the key objectives being improvement in the network lifetime. Often a clustering objective facilitates meeting application requirements [6–10].
As LEACH depends on probability model efficiency in energy savings may not be obtained as CHs may be close to each other [11]. To overcome the disadvantages of LEACH many protocols have been proposed in literature to overcome the suboptimal solution. Various heuristic algorithms based on Genetic Algorithm (GA), Particle Swarm Optimization (PSO), and Artificial Bee Colony (ABC) algorithm have been proposed.
In this work, investigations were carried out using the firefly heuristic. A novel firefly heuristic to avoid the local minimum problem is proposed. Firefly heuristic is based on the light intensity produced by fireflies. The intensity of light produced is mapped to the objective function and hence fireflies with low intensity are attracted towards fireflies with higher light intensity. In this work, a hybrid firefly algorithm, synchronous firefly algorithm, is proposed based on(i)ranked sexual reproduction capability of select fireflies,(ii)the fireflies created by this method having the best genes from the ranked fireflies.The advantages of the proposed technique are(i)faster convergence,(ii)avoidance of multiple local optima.
2. Related Work
Hussain et al. [12] presented a wide taxonomy on CH selection techniques in WSN with comparative analysis. Hu et al. [13] proposed a multihop heterogeneous clusterbased optimization algorithm (MHCOA) which reduces the number of CHs, saving an average of 16.7% network energy with minimal end to end delay. Peng et al. [14] presented an energyefficient prediction clustering algorithm to reduce energy consumption when broadcasting in clustering phase and prolong network lifetime. Bencan et al. [15] proposed an energyheterogeneous clustering scheme (EHCS) which allows variations in the initial energy of the nodes based on the distance to sink to avoid the energyhole problem.
Optimization techniques for cluster formation and CH selection using PSO, GA, and ACO have been extensively proposed in the literature. Kuila and Jana [16] proposed PSO based CH selection technique with a multiobjective function considering energy consumption of the CHs and delay in forwarding the data packets. In the proposed system, each particle’s dimension is equal to the number of sensor nodes in the network. Natarajan et al. [17] applied LEACH and PSO for optimal selection of energyaware clusters and CHs. Ma et al. [18] proposed Dual Cluster Heads using Niching Particle Swarm Optimization (DCHNPSO) which generated two CHs per cluster: Master Cluster Head (MCH) and the Slave Cluster Head (SCH). Ma et al. [19] proposed Adaptive AssistantAided Clustering Protocol using Niching Particle Swarm Optimization (AAACNPSO) to improve system lifespan and data delivery by optimizing energy dissipation in the networks. Shankar et al. [20] discussed an optimal radius algorithm and hybrid PSO algorithm for selection of CH to extend the lifetime of the network. Ali and Shahzad [21] studied PSO, ACO for routing overhead, route optimality, and energy consumption. Simulation results conclude that PSO and ACO based protocols are efficient routing optimization approaches for WSNs.
Rana and Zaveri [22] proposed an integrated approach of CH selection and routing in twotier WSN using GA based CH selection with AStar algorithm based routing to extend life of WSN. This approach leads to significant improvements in the network lifetime over other techniques. Peiravi et al. [23] proposed a multiobjective twonested Genetic Algorithm (GA) based clustering for optimizing the network lifetime for different delay values. Kuila et al. [24] proposed a GA based load balanced clustering algorithm for WSN. Gupta et al. [25] presented GA based routing (GAR) to optimize the distance travelled by the data to reduce energy consumption. New routing schedules were calculated by the proposed GA based on the current network state. Cheng et al. [26] presented Dynamic Load Balanced Clustering Problem (DLBCP) and a dynamic GAs based solution to solve the dynamic network optimization requirements. Özdemir et al. [27] employed Multiobjective Evolutionary Algorithm based on Decomposition (MOEA/D) to optimize clusterbased WSNs. The proposed technique improved coverage and network lifetime compared to NSGA II.
Karaboga et al. [28] presented a novel energyefficient clustering mechanism, based on Artificial Bee Colony algorithm to prolong the network lifetime. Kumar and Kim [29] proposed a new Efficient Learning Automata Based Cell Clustering Algorithm (ELACCA) for WSNs. Hoang et al. [30] proposed a harmony search algorithm for development of centralized clusterbased protocols by minimizing the intracluster distances between the cluster members and their CHs.
From literature it can be seen that GA, PSO, and ACO have been extensively used for CH selection. Though GA has good global search characteristics, convergence is poor. Representation of weights in PSO is done arbitrarily and hence search is limited to either global or local space. In this work, it is proposed to investigate the firefly metaheuristic which finds optimal global solution with fast convergence even under multiparameter optimization strategy.
Yang [31, 32] demonstrated that though PSO achieves better global optima for various test functions for multimodal optimization than GA firefly algorithm is superior to both PSO and GA in terms of both efficiency and success rate. Similarly, Łukasik and Żak [33] demonstrated the superiority of firefly algorithm in continuous constrained optimization tasks when compared to PSO. Fister Jr. et al. [34] reviewed the use of firefly algorithm in various application domains. The authors conclude that the firefly can efficiently handle multimodal problems, has fast convergence, and is effectively used for general, global, and also local search heuristic.
3. Problem Formulation
WSN can be represented by graph with vertices and edges . Each edge has weights which represents certain network parameters denoted bywhere () represents parameters of the network.
can be defined by
The objective of the heuristic algorithm is given by where is the th objective to be minimized for the problem.
In this work, three quality of service parameters, packet loss rate, end to end delay, and remaining energy, are considered to build the objective function as a minimization problem.
4. Methodology
The first order energy model for energy consumed when communication occurs between two nodes is shown in Figure 2.
For distance between two nodes, the transmitter energy consumption [34] for transmitting bit is given by The energy consumed by the receiver is given by In the above equations, transmitting and receiving 1 bit data’s energy consumption is denoted by . , represent the coefficients of energy consumption for different channel propagation models. is a threshold value denoted as , to distinguish freespace path loss model from a multipath fading model. Energy consumption for integration of data packets of bit is expressed as , where is energy consumption for integration of data of 1 bit.
4.1. Proposed Firefly for Cluster Head Formation
Firefly algorithm metaheuristics work on the principle of the flashing lights of fireflies. The intensity of the light helps a firefly swarm move to brighter and attractive locations which can be mapped to an optimal solution in the search space. The algorithm standardizes some of the firefly characteristics and can be listed as follows:(i)Each firefly can be attracted to another irrespective of their sex.(ii)The brightness produced by the firefly is directly proportional to its attractiveness and between two fireflies, the firefly with higher brightness attracts the one which has lower brightness. A firefly moves randomly if it is not able to find a brighter neighboring firefly.(iii)In the mathematical model, firefly’s brightness is based on the objective function.Firefly metaheuristic is chosen for its capability of providing optimal solutions for multiobjective problems. In this work, a novel fitness function considering energy, end to end delay, and packet loss rate is proposed and given by where is the number of dropped packets. is the total number of packets sent. is the remaining energy in node . is the initial energy. is the end to end delay. is the maximum allowable delay.
The cluster formation and CH selection in firefly are given in Algorithm 1.

In firefly algorithm [30], variation of light intensity and the formulation of the problem in terms of attractiveness are crucial as the objective function is encoded into it. The light intensity is calculated using ; the fixed light absorption coefficient and the light intensity can be computed based on distance such that where is the original light intensity. Approximating using Gaussian law we haveThe attractiveness of a firefly is given in where is the attractiveness at .
In twodimensional space the distance between two fireflies can be given by their Euclidean distance as . A firefly moves to a more attractive firefly by In this work, binary values are used to represent the nodes in each solution. The challenge in this type of encoding is between the realvalued vector space and binary space and given by where and .
In the proposed synchronous firefly algorithm, the fireflies are ranked and the best fireflies selected using tournament selection. The selected fireflies reproduce among themselves by crossover and mutation. An example of the proposed technique is shown. Table 2 shows the partial solution for the best fireflies obtained using tournament selection.
After crossover and mutation, the reproduced fireflies are given by Table 3.
The new solutions are added to the firefly pool and the next iteration of the firefly is continued.
4.2. Parameters for Network Simulation
The performance evaluation of the proposed algorithm was carried out using MATLAB. The base station is located 50 meters away from of the network. The base station is assumed to have infinite power source:(i)Nodes are static and do not change location after deployment.(ii)All nodes have uniform energy at the time of deployment.(iii)Base station is located outside the network area.(iv)Each node has a unique ID.(v)The transmission power in the node varies based on the distance between the communicating devices.
Table 4 shows the simulation parameters used in this work.
5. Result and Discussion
Simulations were carried out using LEACH, EEHC, firefly, and synchronous firefly algorithm. LEACH was used to compare the proposed algorithm due to its popularity in the literature and being a random method. Table 5 tabulates the simulation results of packet loss rate and end to end delay for various clustering techniques. Figures 3–5 show the results number of clusters formed, lifetime computation, and remaining energy, respectively.
The proposed hybrid firefly algorithm minimized the packet loss rate by 2.27% when compared to firefly based clustering with 225 nodes and by 39.74% when compared to LEACH with 450 nodes. The proposed hybrid firefly algorithm minimized the end to end delay by 6.42% when compared to firefly based clustering with 450 nodes and by 8.69% when compared to LEACH with 150 nodes. Figure 3 shows number of clusters formed for various clustering techniques for different number of nodes.
It is observed that the proposed algorithm increases the number of clusters hence reducing the energy consumption significantly. Figure 4 shows the lifetime computation in the form of percentage of nodes alive for various clustering techniques when the number of nodes used is 225.
The proposed hybrid firefly algorithm increased lifetime by 66.67% when compared to firefly based clustering in 400 rounds and by 66.67% when compared to LEACH in 600 rounds.
Figure 5 shows the remaining energy computation for various clustering techniques when the number of nodes is 225. The proposed hybrid firefly algorithm has an overall average remaining energy of 88.37% when compared to firefly based clustering in 500 rounds and by 28.57% when compared to LEACH in 600 rounds.
6. Conclusion
This work proposed a novel firefly based clustering protocol to select Cluster Head in WSNs. LEACH protocol needs the user to specify probability for use with a threshold function to determine whether a node will become a CH or not leading to NP problem. In the proposed hybrid firefly algorithm, the best fireflies selected using tournament selection are allowed to reproduce among themselves by crossover and mutation. The proposed method achieves faster convergence and avoids multiple local optima. Simulation results demonstrate the efficiency of the proposed method in decreasing the packet loss rate by 15.4% to 39.74% when compared to LEACH and by 6.16% to 30.66% when compared to energyefficient hierarchical clustering. The proposed hybrid firefly algorithm also increased the lifetime of the network. Future work can be carried out to investigate the impact on increasing specific quality of service parameter.
Conflict of Interests
The authors declare that they have no competing interests.