Firefly Algorithm Solution to Improving Threshold Distributed Energy Efficient Clustering Algorithm for Heterogeneous Wireless Sensor Networks

ABSTRACT

(Threshold Distributed Energy Efficient Clustering). This protocol increases the network lifetime by introducing a new threshold based on the residual energy to become CH [9]. Contrariwise, TDEEC assumes that the nearest nodes to base station must communicate with their cluster head. Thus there is a loss of energy in the construction of the clusters and in intra-cluster communication. To resolve this problem, the authors in [10] proposed a novel approach called ITDEEC (Improving Threshold Distribution Energy Efficient Clustering Algorithm for heterogeneous WSN) based on elimination of the nearest nodes to the base station in the election process of the cluster heads. Then, with this approach the network contains two types of the nodes: the excluded and not excluded. The new energy total of the network is introduced, which depend on the number of excluded nodes and number of clusters. This energy is nonlinear, which requires efficient optimization. The mathematical analysis occupies a large space of memory and processor of nodes [11]. Over the last years, the new algorithms based on the behavior of swarms have appeared to solve the nonlinear problems such as swarm optimization, bat algorithm, firefly algorithm and cuckoo search [12]. Between these algorithms, firefly algorithm is able in treatment of optimization problems [13]. In this paper, we apply the Firefly Algorithm to find the optimal number of cluster head and the optimal number of excluded nodes in order to prolong the network lifetime.
The rest of the paper organization is done as follows: Section II summarizes the related work. The problem statement and proposed method are provided respectively in section III and IV. The system model is analyzed in section V. The Simulation results are carried out in section VI. Finally we conclude our research work and give some perspectives in section VII.

RELATED WORK
Over the last years, the researchers located their ideas around the clustered heterogeneous WSN with the goal to prolong the lifetime of these tiny nodes. Q. Li et al. have proposed Distributed Energy Efficient Clustering Protocol (DEEC) [8], which selects the cluster head by a new value of probability witch depend on the energy residual of each node and average energy of the network. They applied their ideas in multilevel and two level energy heterogeneous schemes.
Parul Saini et al. in Threshold Distributed Energy Efficient Clustering [9] propose a new form of threshold that each node decides to become a cluster head in the current round based on the ratio of residual energy and average energy of that round in respect to the optimum number of cluster heads. Unfortunately both protocols do not take into account the nodes that closest to the base station, which consume more energy by forming their clusters.
B. mostafa et al. in Improving Threshold Distribution Energy Efficient Clustering Algorithm for heterogeneous WSN [10], proposed a new technique to find solution to this problem by eliminating the closest nodes to the base station from the election process. These nodes communicate directly with the base station which causes loss energy if their number becomes larger. To find the limit of these nodes, it must optimize the total of energy consumption which can do by the mathematical analytics but occupy much space of memory and processing.

PROBLEM STATEMENT
In this paper, we consider a set of nodes, which are uniformly deployed randomly in an area to monitoring certain events, as shown in Figure 1. Furthermore, in this paper we consider a cluster-based topology in which each CH routes in every time the data received from the member nodes to the base station. Generally, many searchers applied the dynamic algorithm for CH election in which based on the probability of a node to become a cluster head. In a certain time, this method can introduces a loss of energy caused by closest nodes which consume more energy since they send the data towards their cluster head. To solve this problem, the authors in [10], propose to elimination of these not from the CH election. However, the increase of these notes dissipates the energy total of the network because the direct communication increases as well.

PROPOSED METHOD
This article proposes to improve Threshold Clustering Distributed Energy efficient using the firefly algorithm called (FTDEEC) in order to increase the stable region and decrease the unstable region. In [5], the authors ameliorate this protocol by elimination of the closest nodes to the base station the election process. They introduced the new total energy consumption which depends not only on the number of cluster head but on the excluded nodes as well. To optimize this energy, the empirical method is proposed, which has many disadvantages such as minimum energy value is to be determined by the linear derivation and the values of the closest nodes are chosen arbitrarily. If the values of these nodes become larger, the network gradually start losing its energy as they send the data directly to the base station. All this is due to the nondetermination of the maximum value of the excluded nodes. To solve these problems, we propose to use the nonlinear optimization of the energy consumption in the order to fund the optimal values of number of cluster heads and number of excludes nodes. The analytical methods are unfavorable because the devices are limited in the processing and memory capacity. In this few last years, the nature inspired optimization algorithms are presented. One of famous bio-inspired optimization algorithm that will be used mainly in this paper is the Firefly algorithm.

SYSTEM MODEL 5.1. Network Model
This section describes the network model and other basic assumptions: 1. N sensors are uniformly distributed within a square field of area . The Base Station is positioned at the center of the square region. The number of sensor nodes N to be deployed depends specifically on the application. 2. All nodes are deployed randomly and can fall in the one of two types of regions which can be defined by the threshold distance from the base station. 3. In this case we define two types of nodes, Excluded and not Excluded nodes. The Excluded are the nodes that not enter in the clustering process because there are closed to the base station and the other are far. 4. All sensors are heterogeneous, i.e., they not have the same capacities.
All the sensor nodes have a particular identifier (ID) allocated to them. Each cluster head coordinates the MAC and routing of packets within their clusters in Figure 2.

Radio Energy Model
This study assumes a simple model for the radio hardware where the transmitter dissipates energy for running the radio electronics to transmit and amplify the signals, and the receiver runs the radio electronics for reception of signals [7]. Multipath fading model ( power loss) for large distance transmissions and the free space model ( power loss) for proximal transmissions are considered. Thus to transmit a message over a distance , the radio expends: Where do is the distance threshold for swapping amplification models, which can be calculated as: To receive a message the receiver expends: To aggregate data signals of length , the energy consumption was calculated as:

Energy Consumption
Basing on the network model described above, the energy consumption is equal to: Where s is the number of the excluded nodes and N is number of the nodes. This energy can be explained as follow: Where c denoting the number of the clusters. The graphical representation of this energy in the case that is illustrated in Figure 3. As is clear in the equation number (8) and Figure 3 that the energy dissipated in the network does not only depend on the number of cluster heads but also on the number of excluded nodes, that produces the optimal value 4,83J at 10 excluded nodes and 7 clusters. Unfortunately, the most analytical methods are unsuitable for WSNs, because they take up a lot of memory and require heavy processing. A new bioinspired algorithm has appeared and it has showed a great ability to solve difficult problems, which is Firefly algorithm.

Firefly Algorithm
The Firefly Algorithm, developed by Xin-She Yang in 2008, belongs with nature-inspired metaheuristic algorithms. It was based on behavior of the flashing characteristics of the fireflies in order to join their mating companions (communication) or to attract prey [6]. To simplify the calculations, the algorithm is generated by three fundamental rules: 1. Regardless of gender, a firefly will be attracted to bright fireflies. 2. For any two flashing fireflies, the less bright one will moves to the brighter one. Thus their attractiveness is proportional with their brightness. If there is no brighter firefly, it will move at random. 3. The brightness of the firefly relates to objective problems. 4. From these three rules, the Figure 4 shows the flowchart of firefly algorithm: The attractiveness of a firefly is proportional to light intensity of the adjacent fireflies and it is given by the equation (8): Where r is the distance between two fireflies that is given by (9), represents the initial attractiveness at and is an absorption coefficient which controls the decrease of light intensity.
Moreover, the movement of firefly i which is attracted by a brighter firefly j is given by the following equation (11): Where and are the current positions of the firefly i and j, respectively, and is the correspondent attractiveness function. In the case where there isn't any brighter one, it moves randomly with a coefficient of randomization [ 1]. In our contribution, we begin by generating the random population of n fireflies. Each particle calculates their light intensity (fitness). At every time, all fireflies are sorted by order decreasing according to their fitness and find the best one. After a pairwise comparison of the light intensity, the firefly less light moves toward a more brilliant. This movement depends on the distance between tow fireflies. During the loop, the best so far solution is updated until terminal criteria are satisfied. The flowchart of FA applied to improving TDEEC is shown in Figure 4.
The results of firefly algorithm and the location of fireflies are shown in Figures 5 and 6. As shown, even after only 100 iterations, the algorithm correctly identifies the local scope of the Optima.

SIMULATION RESULTS
In this section, we simulate the performance of FTDEEC protocol under different scenarios using MATLAB. We consider a model illustrate in the Figure 2 with 1 nodes randomly distributed in a 1 1 field. The radio model and network parameters are given in Table 1, whereas FA parameters settings are shown in Table 2.
The performance of the proposed method is compared with ITDEEC and TDEEC protocols in terms of network lifetime, energy use per round and data receive at base station.  To evaluate the proposed method, we consider two performance metrics which are First Node Dies (FND), or stability period and Last Node Dies (LND), or instability period.  Figure 7, the simulation result shows that the proposed method outperforms TDEEC and ITDEEC protocols in terms of FND round. The FND for the proposed method is 1807 rounds, while TDEEC and ITDEEC can only achieve 1224 rounds and 1591 respectively. Around 48% of lifetime improvement compares to TDEEC protocol and 13.58% compare to ITDEEC protocol. The significant improvement is mainly due to a better choice of number of CH and number excluded nodes. TDEEC consider the closest nodes to the base station must form their clusters; contrariwise, ITDEEC don't fix the number limit of these nodes which will drain more energy if they became numerous. Meanwhile the proposed method considers the optimum number of both critical factors such as number of cluster heads and number of excluded nodes. Figure 8. Total residual energy of the network over rounds Figure 9. Throughput of the network over rounds Figure 8 shows the variation of energy levels between the nodes at each round. It clearly shows that energy residual in every round for proposed method is height. After the LND, both protocols TDEEC and ITDEEC dissipated their entire network residual energy in 4217 and 5488 rounds respectively; however, the proposed method conserves more energy and don't lose it after 5615 rounds. Because it does not consider all the nodes nearest the base station should send their data directly to it, but limits the number of this nodes by optimizing the total network energy.
To prolong the network lifetime, it is important to maintain continuous the data from sensor nodes to the base station. The Figure 9 shows this data received at the base station at each round. It is clear that the proposed approach provide better throughput compared to TDEEC and ITDEEC protocols, this increase is justified by the extension of the network lifetime which give the FTDEEC protocol.
Generally, we can illustrate the increase of the proposed protocol in the Figures 10 and 11. It's noted that performance metrics such as FND, LND, Throughput and Energy increase as much than TDEEC and ITDEEC due to its energy efficiency Figure 10. FTDEEC vs. TDEEC increase Figure 11. FTDEEC vs. ITDEEC increase

CONCLUSION
The elimination of the closest nodes to the base station from the election process provides a new problem that is the number of nodes that send directly the data towards base station increase significantly. In this paper, an energy efficient protocol FTDEEC based on firefly algorithm has been proposed to solve this problem by optimizing the energy consumption of the network. The simulation results by Matlab, demonstrate the ability of developed algorithm to prolong life time network significantly and increase the number of packet messages received by the base station. As future work, we will test this protocol for different values of attractiveness, randomness, absorption and number of fireflies.