A Hybrid Clustering Approach for Increasing the Lifetime of Wireless Sensor Networks Based on Bayesian Network

Wireless sensor networks (WSNs) consist of a number of nodes and one or two base stations (BS). Each node has limited energy. Therefore, the energy each node is very important parameter in network since accessing the nodes and re-charging them are difficult or in some cases, are impossible. Thus, the main purpose of this article is to increase the lifetime of the wireless sensor networks by finding the optimal route to send the data to the base station in order to save the energy of each node. In this paper, a hybrid clustering method called Hybrid based on Bayesian Networks (HBN) is proposed based on Bayesian network which considers the radio range of each nodes. In this algorithm, four different parameters are considered including residual energy, the distance to the base station, distance to the neighbor nodes and the radio range of the sensor nodes. According to the simulation results, this algorithm enables an increase in network lifetime in comparison to other similar algorithms.


Introduction
Wireless Sensor Network are applied in various fields such as environment and wildlife surveillance in which accessing each node and recharging them are impossible [1]. Therefore, one of the most important issues of these networks is that the energy of each node is limited. Over the last decade, reducing the energy consumption in each node has been of an interest [2][3][4][5][6][7][8][9][10]. Transferring data between two nodes and aggregating the data are the most considerable issues which can influence the network lifetime [11][12][13]. Finding the optimal route to transfer the data to the base station is one of the methods to reduce energy consumption in these networks. Clustering is usually performed according to two base methods including dynamic and static protocols. Recently, some hybrid methods have been proposed to address the disadvantages of the static and dynamic methods. For this purpose, the presented algorithm is based on a hybrid method in which clustering is performed in each round according to the dynamic protocols and the clusters remain the same during several rounds of clustering, similar to the static protocols. This algorithm consists of four main parameters including residual energy, the distance to the base station and to the neighboring nodes and the radio range of the sensor nodes and utilizes a Bayesian probability.

Related Work
During the last decades, tremendous research has been reported in the field of WSN clustering which are either based on centralized clustering or decentralized clustering methods [14][15][16]. LEACH algorithm is one of the main and earliest distributed clustering algorithms which aims in reducing the energy consumption of WSNs in which CH selection is performed based on a random rotation [17]. If the same nodes are selected as the cluster heads in each round, their energy will finish very rapidly. Therefore, in this algorithm the energy consumption is distributed throughout the network. MECH algorithm [18] is another algorithm in which the clustering is performed on the basis of nodes' radio range and the number of nodes in each cluster. Another widely used algorithm is DDCHS [19]. In this algorithm, some virtual areas have been considered for clusters and for each hexagon a CH is selected. A Z-LEACH [20] is a modified LEACH algorithm in which the residual energy of each node is considered in CH selection. This algorithm enables a decrease in the number of data transfers throughout the network. On the other hand, A Hybrid Clustering Approach for Increasing the Lifetime of Wireless Sensor Networks Based on Bayesian Network 2 no limitation for energy and topology of the network has been taken into account in DWEHC algorithm [21]. Only the radio range and maximum transfer energy to the CHs are considered in DWEHC. In ARPEES [22] all nodes are silent in the first round until they sense the event and it is when they become active. Therefore, the best way to save the energy of each node is to consider them to be silent while there is no event occurring. The next algorithm which is based on Games Theory is CROSS [23] that proposed two approaches considering whether the nodes has introduced themselves as a CH or not. DCGT [24] algorithm is an optimization of CROSS which selects the CHs by a Game theory-based approach and considers a number of parameters including residual energy of the nodes, distance of the nodes to the BS and to the neighboring nodes. ECPF is proposed in 2012 in which clustering is performed using a fuzzy logic-based approach with the aim of reducing the network overhead by covering the whole selection region [25]. Ducrocq et al. [26] introduced BLAC algorithm and they considered the density of the nodes for clustering together with the energy and the coverage of the nodes. This algorithm aims in balancing the energy consumption among the nodes and consequently, increases the network lifetime. Furthermore, HEED [26] was proposed for WSN clustering and reducing energy consumption by considering two main parameters including residual energy and the communication cost. In this algorithm, all member nodes elect the least communication cost for joining the CHs. Other algorithm that was proposed to increase the lifetime of the network is LEACH-GA [27]. This algorithm has difference inter-cluster topology compared to LEACH algorithm. AlHajri et al. [28] proposed hybrid methods in which they used the hybrid of RSS and DOA algorithm to reduce the energy consumption in the network.

Protocol Performance
The proposed algorithm is a hybrid clustering approach based on Bayesian network to optimize the energy consumption. In this case, a hybrid of the static and dynamic methods is used for clustering in which clustering is not executed in every round. In fact, at first step the residual energy of each CH is saved in their memory after clustering, when each setup phases is finished. Then the distance of each node to the base station and their neighbors are calculated. The proposed algorithm assumes that the nodes can detect their own distance to the base station using frequency power. In third step, each node examines its residual energy. If the node does not have enough energy to become a CH, it won't be selected as a CH. In addition, the simulation results illustrate that the proposed algorithm can select the best CH and find the optimal route for transferring the data to the BS using a Bayesian approach.
The Bayesian formula which is used to select the best CH is: P(H|D,E,B) ~ P(D,E,B| H) P(H) = P(D|H)P(E|H)P(B|H)P(H) In this formula D, E and B represent the average distance of each node to its neighbors, the residual energy and the distance to the BS, respectively. D and B are calculated using their own frequency power. When each node understands their position it sends this information to the BS and the BS starts to layer the network using this information.
Some assumptions of the network model are as follows:  All nodes and the BS are fixed.  All nodes have the same level of initial energy.  N sensor nodes are distributed randomly in M*M area. The different number of nodes used in simulation to support this assumption.  Nodes are heterogeneous.  CH can aggregate the data.

Network Model
After choosing the best cluster heads using a Bayesian network, the transferring phase is started in which nodes start to send their data to the nearest CH. The TDMA protocol is used to receive the data from the member nodes and the radio model of energy consumption is based on LEACH protocol. When the network is divided into clusters and the CHs are selected, it consumes some energy to receive the data. The energy is calculated as follows:

Erx = k. Eelec
ETx is the amount of energy which is consumed for transmitting k-bit data.
All mentioned parameters are listed in Table1.

Results and Discussion
The main purpose of this algorithm is to decrease the energy consumption in each node and increase the network lifetime by considering the radio range of each node. For this purpose, simulation is performed in MATLAB programming environment. Furthermore, this algorithm was compared to Z-LECH, DCGT and DCBN algorithms to evaluate network efficiency. Simulation was performed in 50 periods.

Evaluation of Live Nodes
The network lifetime is one of the most important criteria to evaluate the efficiency of the algorithm. The average number of live nodes is displayed in figure 1. It can be seen that within the proposed algorithm there are 100, 100 and 10 live nodes in rounds 1250, 1500 and 2300, respectively having the most live nodes in comparison to the other three algorithms.

Evaluation of Energy Consumption
Energy consumption is evaluated in figure 2 where the energy of each node is shown in different rounds. The simulation results indicate that the remaining energy of each node in HBN is more than other three algorithms (Z-LECH, DCGT and DCBN). It can be seen that in the proposed algorithm the energy consumption is distributed throughout the whole network which can reduce the total energy consumption and consequently, increase the network lifetime.

Evaluation of Network Efficiency When the First Node Dies
For evaluating the efficiency of the proposed HBN algorithm over other three algorithms, the first node that dies in the network is compared. As it can be seen in figure  3, the first node of HBN algorithm dies later than other three algorithms. The first node dies in round 1500 in HBN while the first node dies in round 1350, 1200 and 800 in DCBN, DCGT, Z-LEACH, respectively. It is when 100 nodes are implemented within the network. Also, it is shown that the stability of the network in HBN is significantly more than other three algorithms.

Evaluation of Network Lifetime When Half of the Nodes are Alive
For evaluating the efficiency of the proposed HBN algorithm over other three algorithms, simulations have been done with different number of nodes. As it can be seen in figure 4, HBN has the best result in comparison with others. It can be observed that in round 1800, HBN has half of the alive nodes in network with 50 nodes while Z-LEACH has same result in round 300.
A Hybrid Clustering Approach for Increasing the Lifetime of Wireless Sensor Networks Based on Bayesian Network 4

Conclusions
The main purpose of this paper is to present a combination of dynamic and static clustering method based on a Bayesian network for WSNs. Simulation results indicate that the proposed HBN algorithm enables a reduction in the energy consumption and finally increases the network lifetime in comparison to Z-LEACH, DCGT and DCBN algorithms. In addition, HBN is able to balance energy consumption in the network and improve the network efficiency and throughput.