- Open Access
A modified cluster-head selection algorithm in wireless sensor networks based on LEACH
EURASIP Journal on Wireless Communications and Networking volume 2018, Article number: 287 (2018)
In order to overcome drawbacks of unreasonable cluster-head selection and excessive energy consumption in wireless sensor networks (WSNs), a modified cluster-head selection algorithm based on LEACH (LEACH-M) was proposed. Based on distributed address assignment mechanism (DAAM) of ZigBee, both residual energy and network address of nodes were taken into account to optimize cluster-head threshold equation. Furthermore, by leveraging a cluster-head competitive mechanism, LEACH-M successfully balanced the network energy burden and dramatically improved energy efficiency. The simulation results in NS-2.35 show that the proposed algorithm can prolong the network lifetime, minimize the energy consumption, and increase the amount of data received at base station whether region is in a 100 × 100m2or in a 300 × 300m2.
Wireless sensor networks (WSNs) consist of a great amount of small nodes which have sensing, computing, and communication abilities. Owing to characteristics like convenient deployment, easy self-organizing, and real-time monitoring, WSNs are extremely popular in a variety of applications such as green agriculture, healthcare, and environmental surveillance [1, 2]. However, most of the sensor nodes are battery-driven, to change or recharge their batteries is a tremendous challenge. Therefore, it is critical to design an energy-efficient routing protocol to wisely use the limited energy of WSNs [3, 4].
There are mainly two kinds of routing protocols in WSNs: flat architecture and hierarchical architecture. Flat architecture protocols suffer from data overload when the density of nodes increases and consequently result in uneven energy distribution and limited scalability. As a result, hierarchical routings have gained more and more global attentions in recent years. There are some hierarchical protocols proposed for WSNs: low-energy adaptive clustering hierarchy (LEACH) , adaptive threshold-sensitive energy-efficient sensor network (APTEEN) , and power-efficient gathering in sensor information systems (PEGASIS) . Among them, LEACH is the most traditional and representative one.
As shown in Fig. 1, LEACH can divide the entire network into different layers and use cluster head to form an upper hierarchy, which may simplify the management of clusters, decrease the number of routing packets, and conserve network energy to some extent . Nevertheless, due to its dynamical but random cluster-head selection approach, it suffers from unsymmetrical cluster-head distribution, imbalanced energy burden, and roundabout data transmission .
In response to these problems, this paper presents a modified cluster-head selection algorithm based on LEACH (LEACH-M). By taking residual energy and network address into account, LEACH-M can optimize cluster-head threshold equation, which ensures a relatively stable and energy-saving cluster structure.
The rest of the paper is organized as follows. Section 2 presents related works. Section 3 describes the design of LEACH-M. Section 4 evaluates the simulation results. Finally, Section 5 concludes the paper and presents our future work.
LEACH is regarded as the most classical cluster-based hierarchical routing strategy designed by Heinzelman from MIT . By dividing the entire network into several clusters, LEACH can reduce the number of data transmitted to base station (BS) and save network energy to some extent. However, it utilizes a random way to choose cluster head, which leads the selected cluster head may not be optimal, and even drawbacks like uneven energy consumption, short lifetime, and limited communication range.
In order to ameliorate these shortcomings, a great deal of researches have been expanded. Several valuable developments of original LEACH algorithm are carried out in what follows.
LEACH-C (centralized LEACH)  was a kind of improved LEACH protocol. By minimizing the total sum of squared distances between all cluster members and the closest cluster head, LEACH-C reduced the amount of energy consumption caused by transmitting data from non-cluster-head nodes to their cluster-head. However, isolated nodes cannot transmit their coordinates and residual energy to the BS, which may result in serious data loss and degrade the network performance.
LEACH-F (fuzzy LEACH)  was another type of improved LEACH algorithm. Different from LEACH-C, BS offered a cluster-head list for every cluster so that the cluster head was elected in order of the list. Although this method decreased clustering overhead, the unreasonable circumstance that nodes with less remaining power became cluster head may sometimes happen.
Arumugam and Ponnuchamy  introduced an energy-efficient LEACH (EE-LEACH) protocol for data gathering. It helped to provide better packet delivery ratio with less energy utilization. But it may suffer from security attacks because they only focused on reducing the energy consumption and ignored the confidentiality and integrity of data.
Pachlor and Shrimankar  presented a centralized routing protocol called Base-station controlled dynamic clustering protocol (BCDCP), which evenly distributed the energy dissipation among all sensor nodes to average energy savings and improve network lifetime. Nevertheless, the design idea and algorithm process of BCDCP were not given in detail.
By considering the advantages of channel resource and employing uneven clustering method, Pei et al.  developed a low-energy adaptive uneven clustering hierarchy (LEAUCH) for cognitive radio sensor network (CRSN). It can not only remarkably balance network load in CRSN but also efficiently extend network life span. However, most of the existing WSNs operate in the crowded public unlicensed spectrum band while LEAUCH was only experimented and evaluated in CRSN; thus, it may not be suitable for real applications in WSNs.
This study proposes a modified cluster-head selection algorithm based on LEACH——LEACH-M. Based on distributed address assignment mechanism (DAAM) of ZigBee, LEACH-M takes both residual energy and network address into account to adjust cluster-head threshold equation, which ensures a relatively stable and energy-saving cluster structure. Furthermore, the leveraging of a cluster-head competitive mechanism in LEACH-M balances the network energy burden, which dramatically improves energy efficiency and prolongs the network lifecycle.
The design of LEACH-M
In this study, the aim is to solve the problems of unreasonable cluster-head selection and excessive energy consumption in LEACH. Similar to LEACH , LEACH-C , and EE-LEACH , LEACH-M also uses a general radio model. If a k-bit data message is forwarded between two nodes separated by a distance of r meters, then the energy expanded can be described as:
where ETx and ERx are the per bit energy dissipations for transmission and reception, respectively, efs and empdenote transmit amplifier parameters corresponding to the free-space and the two-ray models, respectively, and r0 is the threshold distance given by
Assume that there are N nodes distributed uniformly in a M × Mregion. If dtoBSis the distance from the cluster head node to the BS, then we can find the optimal number of clusters by
Different from LEACH, LEACH-C, and EE-LEACH, LEACH-M uses the network address of every node to modify their cluster-head threshold. In order to calculate the network address of them, DAAM of ZigBee is utilized.
In a ZigBee cluster-tree WSN, network nodes can be divided into three categories: coordinator, router nodes, and end nodes. If the network depth of a sensor node is d, then its address space Cskip(d) can be calculated by
where Cm reflects the maximum number of child nodes, Rm indicates the biggest amount of router nodes, and Lm is the inmost depth of network.
According to different types of child nodes, calculation approach of their network address varies . If the short address of a father node is Af, then the network address of its ith router node and jth end node should meet (6) and (7), respectively:
Pioneered by the “exchanging depth for width” address allocation scheme in reference , the proper parameters are set as: Cm = 5, Rm = 3, and Lm = 4.
One example to calculate Cskip(d), Ai and Aj is as follows:
If d = 2 and Af = 2, then Cskip(d) = 6, Ai = 3 = 15 and Aj = 2 = 22.
The main contribution of LEACH-M is that it utilizes network address Ai, j figured out by (6) or (7) and residual energy Eres to adjust the calculation equation of T(n):
The definitions of notations in (8) are shown in Table 1.
Equation (8) means nodes with more residual energy and better network address will have higher cluster-head threshold, that is, they are more likely to become cluster head, which can effectively improve the robustness of the whole network and make the cluster-head selection more reasonable.
The modified cluster-head selection strategy used in LEACH-M is expressed in the pseudo code below.
A cluster-head competitive mechanism
In a conventional cluster-tree WSN, a cluster head should not only forward the messages from cluster members but also communicate with other cluster heads and BS. Hence, they consume excessive energy and tend to die too early and too fast, which leads deteriorating and even paralyzed network routes.
Aiming at this problem, this section integrates a cluster-head competitive mechanism into LEACH-M to balance the network energy load. As shown in Fig. 2, at the beginning of every round, BS will count current Eres of every node and then calculate average energy Eaver by
Once Eres of a certain cluster head is less than current Eaver, BS will announce a cluster-head election news to dismiss this old cluster heads and vote for a new one. After receiving the election news, all other nodes will report their current Eres and Ai, j to BS for making a cluster-head request. If their Eres is less than Eaver, BS will ignore their requests because they consume a lot of energy in the past several rounds and hence are not qualified candidates. Otherwise, BS will use (8) to calculate their T(n) and designate the candidate whose T(n) is the largest to be cluster head. Then, new cluster head will broadcast its ID number and wait for child nodes joining its cluster.
One great advantage of this mechanism is that the ex-cluster head avoids running out of its energy and still serves as a “subordinate” for the new “commander” after becoming ordinary child node. Using this intelligent mechanism, LEACH-M successfully maintains the integrity of original WSN structure within a certain period.
Results and discussion
In this section, we adopt a useful network simulation platform named NS-2.35 to compare the performance of our proposed LEACH-M with the existing LEACH-C , EE-LEACH , and original LEACH . The main steps of simulation experiments are as follows:
Install VMware Workstation 12.0 (VM12) in Windows 7.
Run Ubuntu 16.04 in VM12 and download NS-2.35 software in Ubuntu 16.04 operating system.
Obtain the original LEACH package (mit.tar.gz) from MIT μAMPS project.
Modify the network layer codes of LEACH.
Program TCL scripts to perform simulation experiments.
Utilize Linux Shell to extract significant data from trace file and use Gnuplot to draw comparison figures.
Simulation experiments are performed under two different topology scenarios: 100 × 100m2 and 300 × 300m2. Table 2 summarizes the detailed simulation parameters.
Simulation results of a 100 × 100m2 network topology
In this section, Mis set as 100. Figure 3 shows there are 50 sensor nodes randomly distributed in a 100 × 100m2 network topology. The simulation experiments of LEACH-M include three performance standards: network lifetime, energy consumption, and number of data received at BS. Except for energy consumption, the other two indexes are evaluated by using the assessment criteria in reference : first node dies (FND), half of the nodes alive (HNA), and last node dies (LND).
As shown in Fig. 4, the number of alive nodes of four algorithms decreases over time. However, their FND, HNA, and LND vary a lot. Table 3 demonstrates that the FND, HNA, and LND of LEACH-M are 500 s, 590 s, and 650 s, respectively, which are much larger than that of LEACH, LEACH-C, and EE-LEACH. Compared with LEACH-C and EE-LEACH, LEACH-M outperforms them 16% and 28% in FND, 18% and 9% in HNA, and 14% and 8% in LND, respectively. Hence, LEACH-M can better equal the energy load and dramatically extend network lifecycle.
Figure 5 shows that energy consumption of four algorithms gradually increases with time. Obviously, the total energy consumption of LEACH-M is much lower than that of LEACH, LEACH-C, and EE-LEACH all the time. Specifically, Table 4 indicates that the energy usage of LEACH in 200 s, 350 s, and 500 s is 21.59 J, 48.15 J, and 78.79 J, respectively. Compared with LEACH-C and EE-LEACH, LEACH-M reduces power consumption by 46% and 34% in 200 s, 31% and 23% in 350 s, and 18% and 15% in 500 s, respectively. Therefore, LEACH-M can lower battery consumption and raise energy utilization.
Figure 6 shows all of these algorithms have a climbing tendency of data received at BS. As is expected, LEACH-M has bigger packets quantity of BS, especially after 200 s. Table 5 illustrates that the data received at BS of LEACH-M in FND, HNA, and LND are 731883 bit, 753875 bit, and 762024 bit, respectively. Compared with LEACH-C and EE-LEACH, LEACH-M increases data quantity by 37% and 36% in FND, 35% and 15% in HNA, and 33% and 14% in LND, respectively. Thus, LEACH-M can provide a greater number of data received at BS whether in FND, HNA, or LND.
Simulation results of a 300 × 300m2 network topology
Similar to Section 4.1, M is set as 300 to perform simulations again while maintaining all other parameters unchanged.
Figure 7 shows there are 50 sensor nodes randomly distributed in a 300 × 300m2 network topology.
As shown in Fig. 8, the number of alive nodes of four algorithms reduces over time. Similar to Table 3, Table 6 also shows that LEACH-M outperforms LEACH-C and EE-LEACH in terms of FND, HNA, and LND. However, its FND, HNA, and LND are smaller than that in 100 × 100m2. This is because when the region becomes larger, the distance from one node to another also gets bigger. Hence, transmitting a same k-bit data message will consume more energy, which leads sensor nodes to die in advance.
Figure 9 shows that energy consumption of four algorithms increases a lot along with time. Table 7 demonstrates that LEACH-M expends less energy than LEACH-C and EE-LEACH during the whole period. Nevertheless, when the range of region enlarges from 300 × 300m2 to 100 × 100m2, the total energy consumption of LEACH-M is always higher than before, whether the time is 200 s, 350 s, or 500 s.
Similar to Fig. 6, Fig. 10 also shows four algorithms have an increasing tendency of data received at BS. Table 8 illustrates that compared with LEACH-C and EE-LEACH, LEACH-M does receive more data at BS. However, when the area is enlarged to 300 × 300m2, the amount of data packets sent to BS becomes smaller. This is because after some nodes suffer an early death, there are less alive nodes transmitting their sensory data to BS in the whole WSN.
This paper presents a modified LEACH-based cluster-head selection algorithm for WSNs. Based on DAAM of ZigBee, LEACH-M synthetically considers both remaining energy and network address to revise cluster-head threshold equation and exploits a cluster-head competitive mechanism to average the network energy load. Simulation results demonstrate that whether region is in a 100 × 100m2or in a 300 × 300m2, the proposed algorithm outperforms LEACH, LEACH-C, and EE-LEACH in aspects like network lifetime, energy conservation, and amount of data.
In the future, factors such as distance between cluster head and BS, space from a cluster member to its cluster head, and energy consumption in last round will be taken into consideration to optimize LEACH-M and to provide a more reasonable and reliable cluster-head selection.
Base-station controlled dynamic clustering protocol
Cognitive radio sensor network
First node dies
Half of the nodes alive
Low energy adaptive clustering hierarchy
Modified cluster-head selection algorithm based on LEACH
Last node dies
Massachusetts Institute of Technology
VMware Workstation 12.0
Wireless sensor networks
H. Wu, Z. Miao, Y. Wang, M. Lin, Optimized recognition with few instances based on semantic distance. Vis. Comput. 31(4), 1–9 (2015)
B Lin, W Guo, N Xiong, G Chen, A V Vasilakos, H Zhang. A Pretreatment Workflow Scheduling Approach for Big Data Applications in Multicloud Environments. IEEE Transactions on Network & Service Management, 2016. 13(3):pp. 581-594.
J. Ma, S. Wang, C. Meng, Y. Ge, J. Du, Hybrid energy-efficient APTEEN protocol based on ant colony algorithm in wireless sensor network. EURASIP J. Wirel. Commun. Netw. 2018(1), 102 (2018)
H Zheng, W Guo, N Xiong. A Kernel-Based Compressive Sensing Approach for Mobile Data Gathering in Wireless Sensor Network Systems. IEEE Transactions on Systems Man & Cybernetics Systems, 2017. PP(99): pp. 1–13.
W.R. Heinzelman, A. Chandrakasan, H. Balakrishnan, in Hawaii International Conference on System Sciences. Energy-efficient communication protocol for wireless microsensor networks (2000), p. 8020
S. Misra, R. Kumar, in International Conference on Innovations in Information, Embedded and Communication Systems. An analytical study of LEACH and PEGASIS protocol in wireless sensor network (2018)
X.-X. Ding, M. Ling, Z.-J. Wang, F.-L. Song, Dk-leach: an optimized cluster structure routing method based on leach in wireless sensor networks. Wirel. Pers. Commun. 96(4), 6369–6379 (2017)
R. Elkamel, A. Cherif, R. Elkamel, A. Cherif, R. Elkamel, A. Cherif, Energy-efficient routing protocol to improve energy consumption in wireless sensors networks: energy efficient protocol in WSN. Int. J. Commun. Syst. 30(6), e3360 (2017)
W.B. Heinzelman, A.P. Chandrakasan, H. Balakrishnan, An application-specific protocol architecture for wireless microsensor networks. IEEE Trans. Wirel. Commun. 1(4), 660–670 (2002)
P. Nayak, A. Devulapalli, A fuzzy logic-based clustering algorithm for WSN to extend the network lifetime. IEEE Sensors J. 16(1), 137–144 (2016)
G.S. Arumugam, T. Ponnuchamy, EE-LEACH: development of energy-efficient LEACH Protocol for data gathering in WSN. EURASIP J. Wirel. Commun. Netw. 2015(1), 1–9 (2015)
R. Pachlor, D. Shrimankar, VCH-ECCR: a centralized routing protocol for wireless sensor networks. J. Sens. 2017.1(2017), 1–10
E. Pei, H. Han, Z. Sun, B. Shen, T. Zhang, LEAUCH: low-energy adaptive uneven clustering hierarchy for cognitive radio sensor network. EURASIP J. Wirel. Commun. Netw. 2015(1), 122 (2015)
J. Mu, W. Wang, B. Zhang, W. Song, An adaptive routing optimization and energy-balancing algorithm in ZigBee hierarchical networks. EURASIP J. Wirel. Commun. Netw. 2014(1), 1–11 (2014)
Z. Ren, P. Li, J. Fang, H. Li, Q. Chen, SBA: an efficient algorithm for address assignment in ZigBee networks. Wirel. Pers. Commun. 71(1), 719–734 (2013)
S.A. Sert, H. Bagci, A. Yazici, MOFCA: multi-objective fuzzy clustering algorithm for wireless sensor networks. Appl. Soft. Comput. J. 30, 151–165 (2015)
The authors would like to thank the anonymous reviewers and the editor for their helpful comments.
This work is financially supported by the National Natural Science Foundation of China (Grant No. 61673190/F030101), self-determined research funds of CCNU from the colleges’ basic research and operation of MOE (CCNU 18TS042), and Graduate Innovation Program of CCNU (2017CXZZ097).
Liang Zhao is currently working towards the Ph.D. degree in the Department of Electronics and Information Engineering at Central China Normal University. His research interests include Internet of Things and wireless sensor networks.
Shaocheng Qu is currently a full Professor in the Department of Electronics and Information Engineering, College of Physical Science and Technology, Central China Normal University, Wuhan. His main research interests are in the areas of control theory and applications, embedded systems, and wireless sensor networks. He has published over 70 papers on these topics and provided consultancy to various industries.
Yufan Yi is currently pursuing the Master’s degree in communication and information system at Central China Normal University. His research interests are wireless sensor networks and artificial intelligence.
The authors declare that they have no competing interests.
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.