Journal of Robotics, Networking and Artificial Life, Vol. 4, No. 1 (June 2017) 102–105___________________________________________________________________________________________________________Improvement on LEACH Agreement of Mine Wireless Sensor Network
Yun-xiang Liu, Wei Zhang, Lan-feng Zhou

Computer and Information Engineering College, Shanghai Institute of Technology, Shanghai, China
E-mail: yxliu@sit.edu.cn

Abstract
Based on the characteristics of wireless sensor network communication in mine, LEACH protocol clustering is
optimized, and the factors of energy and distance are considered fully. The selection of cluster head nodes is
optimized, and a routing algorithm based on K-means ++ clustering is proposed. The problem of uneven
distribution of cluster head nodes, uneven energy consumption and network stability in LEACH algorithm isimproved effectively. Simulation results show that the proposed algorithm can improve the energy consumption of
the whole network and improve the energy utilization rate, extending the network life cycle effectively.
Keywords: Wireless sensor networks, LEACH, K-means++, Minerequirements, therefore in this paper, we propose aroute-based K-means++ clustering algorithm named
LEACH-KPPE, to enable it efficient and stable to workin the mine environment. The clustering algorithm isoptimized by K-means clustering algorithm, and fully
consider the factor of energy and distance to control theselection of cluster head nodes. The problem of uneven
distribution of cluster head nodes, uneven energy
consumption and network stability in LEACH algorithm
is effectively improved.

1. Introduction
Wireless Sensor Network is composed of a large
number of data acquisition, data processing andcommunication capabilities of Sensor nodes to be selforganization formed a dynamic Network topology [1-3].
Which has a strong anti-destruction, self-adaptable andcapable of rapid deployment and other advantages, it iswidely used in important areas of industrial control,
environmental monitoring, traffic control, health care,military and other [4-5]. Coal mining operations mainly indownhole and before the wireless sensor network has
not been popular in the mine the wireline
communication device is still in use. Wiredcommunication there are some drawbacks, unable topinpoint the underground site of the incident and thestaff position when a security incident, coal groundpersonnel could not get the downhole specificinformation timely and accurately, it is not conducive tothe underground work and security management.
According to the characteristics of the coal minetunnel, the network topology is banded, and thecommunication environment is relatively poor. Same as
the general wireless communications networks, thenodes work in some of the unmanned monitoring area,
not easy to maintain and are limited and not renewableenergy, so efficient, stable, energy-efficient routing
protocol for the entire wireless sensor network is very
important. Low Energy Adaptive Clustering Hierarchy(LEACH) protocol is widely used at present hierarchicalrouting [6-7], which can be applied to the general
working environment. But for the special conditions in
the mine under, LEACH protocol can’t meet their

2. LEACH Protocol
LEACH protocol is the wider application of ahierarchical routing protocol in wireless sensor
networks, the workflow is divided into two steps:
generation and transmission of data clusters. The wholeprocess will be repeated periodically, so that the process
can be called a period of "round". In each round several
more suitable node will be selected as a cluster headnode from the network nodes randomly, before selecting
cluster head, LEACH algorithm is given a pre-defined
threshold value T(n)，the threshold value is calculated
as:𝑝𝑛∈ 𝐺
1 ,(1)
T(𝑛) = � 1−𝑝∗�𝑟 𝑚𝑚𝑚 𝑝�
0,others
Wherein 𝑝 is the networks cluster head node proportion
accounted for all the expectations, 𝑟 is the current cycleof the number of rounds selected cluster head, 𝐺 is acollection of which is not a cluster head node.
After completing the clustering work, the wirelesssensor network begins to work. The nodes in the cluster

Copyright © 2017, the Authors. Published by Atlantis Press.
This is an open access article under the CC BY-NC license (http://creativecommons.org/licenses/by-nc/4.0/).
102

Journal of Robotics, Networking and Artificial Life, Vol. 4, No. 1 (June 2017) 102–105___________________________________________________________________________________________________________

begin to collect the required information, and then send
the collected data to the head node within their cluster.

including receiving the rest of the nodes within cluster
data information of power consumption, energy
consumption of the data fusion and sends the data tobase station:

3. LEACH-KPPE Protocol

𝑀

𝐸𝐶𝐶 = 𝐸𝑒𝑒𝑒𝑒 � − 1� 𝑏 + 𝐸𝐷𝐷

3.1 LEACH-KPPE algorithm basic idea𝑘𝑀
𝑘𝑏 + 𝜀𝑎𝑎𝑎 𝑑𝐶𝐶 4 (2)Where 𝐸𝑒𝑒𝑒𝑒 is the energy consumption of transmittingor receiving 1bit data, 𝑏 is the number of transmitted
data, 𝜀𝑎𝑎𝑎 is constant and associated with hardware,
𝐸𝐷𝐷 is the energy consumption of cluster head node
fusion data, 𝑑𝐶𝐶 is the distance between cluster headnode and the base station.
When the communication between a member node
in a cluster and cluster head node, the member node issimilar to the cluster head node, then use the free spacemodel, then the energy consumption with a member ofthe cluster node in a round of work is:
𝐸𝐶𝐶 = 𝐸𝑒𝑒𝑒𝑒 𝑏 + 𝜀𝑎𝑎𝑎 𝑑𝐶𝐶 2 𝑏(3)
Where: 𝐸𝑒𝑒𝑒𝑒 、𝑏 and 𝜀𝑎𝑎𝑎 as above, 𝑑𝐶𝐶 denotes thedistance between the member node and the cluster headnode.
Assuming that the whole 𝑁 × 𝑁 area are circularand divided into 𝑘 clusters, then the radius R = 𝑁/√𝜋𝜋.
Assuming that the probability density of nodes in acluster is ρ (x, y), then:(4)
𝐸�𝑑𝐶𝐶 2 � = ∬(𝑥 2 + 𝑦 2 ) 𝜌(𝑥, 𝑦) 𝑑𝑑 𝑑𝑑
𝐸�𝑑𝐶𝐶 2 � is the expectation of the square of the distance
between the cluster member node and the cluster headnode, by the radius R = 𝑁/√𝜋𝜋 available:

In this paper, a new LEACH-KPPE protocol isproposed based on the LEACH protocol for some
defects of traditional LEACH applications in coal mines.
LEACH-KPPE agreement in the main work process issame with the original LEACH basically, they are also
cyclical round of reconstruction, and each round also
includes two stages of the establishment of clusters andstable data transmission. In the cluster stage, the nodes
in the whole network send their own position
information and residual energy information to the basestation. After the base station integrates the data, the Kmeans++ algorithm is used to cluster the nodes within
the network area. After the K-means++ algorithm
clustering processing, the clustering is complete. Next
according to the quantity of the node residual energy
and location information to decide the optimal cluster
head nodes. After the completion of the establishmentof clusters and the choice of cluster head there will begoing on stable data transmission phase. In the LEACHKPPE protocol not only retain the original single-hop
communication,alsojoinedthemulti-hopcommunication.
Considering the correlation of meteorologicalfactors and short-term load forecasting model based on
historical load data, In this paper, the neural network
input is mainly selected temperature and humidity
meteorological factors, and then on the basis of theprevious model this paper build a meteorological factors
in the load forecasting model.

2𝜋𝑁⁄√𝜋𝜋𝐸�𝑑𝐶𝐶 2 � = ∫𝜃=0 ∫𝑟=0

𝜌 𝑟 3 𝑑𝑑 𝑑𝑑 =𝑁22𝜋𝜋(5)

By the above calculation, in each round of energy
consumption of each cluster are as follows:
𝐸𝑇 = 𝐸𝐶𝐶 + (𝑀/𝑘 − 1)𝐸𝐶𝐶(6)
At this point the whole network has a total of kclusters, and the energy consumption in each round of E
as follows:𝐸 = 𝑘𝑘𝑇 = 𝑘𝐸𝐶𝐶 + (𝑀 − 𝑘)𝐸𝐶𝐶

3.2 LEACH-KPPE algorithm implementation= �2𝑀𝐸𝑒𝑒𝑒𝑒 + 𝑀𝐸𝐷𝐷 + 𝑘𝜀𝑎𝑎𝑎 𝑑𝐶𝐶 4 +3.2.1 The optimal number of cluster nodes

𝑀𝜀𝑎𝑎𝑎

In this paper, by analyzing the traffic and energy
consumption in the network, the optimal number ofcluster head nodes can be obtained. There are M nodes
in the erected wireless area, and they all be distributedin the N×N area. The number of cluster nodes is k, thewhole network is divided into k clusters, each cluster
has M/k-1 nodes, so the number of common nodes ineach cluster is M/k-1. Multipath fading is used here, sothe energy consumption of each cluster head nodes

𝑁22𝜋𝜋− 2𝑘𝐸𝑒𝑒𝑒𝑒 − 𝜀𝑎𝑎𝑎

𝑁22𝜋�𝑏(7)Because 𝐸𝑒𝑒𝑒𝑒 , 𝐸𝐷𝐷 and 𝜀𝑎𝑎𝑎 is constant andindependent of the 𝑘, so derivative the type (7) can get
the extreme value of 𝑘 with 𝑘𝑜𝑜𝑜 as follows:
𝑘𝑜𝑜𝑜 = 𝑁�𝑀2𝜋�𝑑𝐶𝐶 4 −2𝐸𝑒𝑒𝑒𝑒 ⁄𝜀𝑎𝑎𝑎 �(8)In this way, the optimal number of cluster heads
𝑘𝑜𝑜𝑜 in the 𝑁 × 𝑁 region is obtained, that is the numberof cluster centers 𝑘 to be used by the K-means ++algorithm.

103

Journal of Robotics, Networking and Artificial Life, Vol. 4, No. 1 (June 2017) 102–105___________________________________________________________________________________________________________

3.2.2 Establish cluster stage

Base station

When building cluster, the information of location
and residual energy of all the nodes in the area will besent to the base station first, then use the K-means++algorithm to cluster the nodes within the network. Its
main working process is as follows:①The number 𝑘 ofoptimal cluster centers is obtained by the above; ②For
each node x within the region, to calculate the distanceD(x) with the nearest cluster center;③Choose a newnode as a new cluster center,;④Repeat ② and ③ until
the election of the k cluster centers;⑤Calculate thedissimilarity of k cluster centers in the rest of the nodes;⑥Re-update the k cluster centers by calculating
dimension of all the nodes in each cluster;⑦Repeat
steps ⑤ and ⑥ until the criterion function began toconvergence. Establish the cluster of flow chart shownin figure 1.

Cluster head nodeFig.3. LEACH-KPPE inter-cluster communication

4. Simulation and Result Analysis
In this paper, the traditional LEACH protocol andthe improved LEACH-KPPE protocol are simulated andanalyzed in MATLAB platform. In this paper, 𝑀 =100 sensor nodes are distributed in the 100 ×100𝑚2 network area. The parameters in the simulation
are shown in Table 1.
Table 1 Simulation parameters
Parameter Name
Parameter Value(50,120)
Base station location 𝐵1J
Node initial energy 𝐸0
Transmit/Receive circuit
50 nJ·𝑏 −1
energy 𝐸𝑒𝑒𝑒𝑒
Power amplification
0.0013 pJ·(𝑏 · 𝑚2 )−1factor 𝜀𝑎𝑎𝑎
Data fusion energy
5 nJ·𝑏 −1
consumption 𝐸𝐷𝐷
4000 𝑏
Packet length 𝑏Start
Sending node location andresidual energy information
Number of clustering
centers k
Select a node as the cluster center
randomly m = 1m<k
m=m+1
The node will tobe the newclustering centerat this time

NoYes

Calculation of each node and its recent clustering
center distance D(x),the Sum(x) with the sum ofD(x), and take a random value

The nodes are classified according to k
cluster centers
Calculate the criterion function

Random -= D(x)Random<=0NoThe threshold issatisfied

NoYes

YesEndFig. 1. Establish the cluster of flow chart

From the above parameters, we can see that thedistance between the cluster head node and the basestation of 𝑑𝐶𝐶 is in the range of 50−130, then we canknow from formula (8) that the optimal cluster headnumber is related to the value of 𝑑𝐶𝐶 . The number ofvalues ranges from 1 ≤ 𝑘𝑜𝑜𝑜 ≤ 4 . According to theparameters in Table 1, the relationship between theaverage energy consumption and the number of cluster
head nodes k in the network is shown in Figure 4.

3.2.3 Stable data transmission phase
After the cluster head node selection and cluster
work of the whole area is completed, the datatransmission is started. Single-hop communication
cannot meet the requirements of communications incoal mines, this paper based on single-hop
communication and then use multi-hop mode for datatransmission. Figure 2 and Figure 3 compare theLEACH
andLEACH-KPPE
inter-cluster
communication.
Base station

Fig.4. Relationship between cluster head node number andnetwork energy consumption

Fig.2. LEACH inter-cluster communication

104

Journal of Robotics, Networking and Artificial Life, Vol. 4, No. 1 (June 2017) 102–105___________________________________________________________________________________________________________Figure 5 shows the clustering simulation results of
LEACH and LEACH-KPPE in one round. In Figure 5(a) and (b), x represents the cluster center or thecorresponding candidate node.

5. Conclusion
In this paper, the K-means ++ clustering algorithm
is used to improve the traditional clustering method of
LEACH protocol, and the cluster head selection is
optimized based on the energy of node and multi-hop
mode is used between some cluster heads and basestations. LEACH-KPPE routing protocol, making it
more suitable for wireless communications in coalmines. The simulation results show that the improved
protocol has a significant improvement in terms ofclustering results, energy consumption and node
survivability compared with the traditional LEACH
protocol, thus improving the network life cycle
effectively and stability.

(a) LEACH-KPPE clustering results

References
1.
2.
(b) LEACH clustering result
Fig.5.The clustering simulation results of LEACH andLEACH-KPPE in one round3.

Figure 6 shows the relationship between the totalenergy consumption of the entire network and its
operating time, which is represented by the number ofrounds.

4.
5.
6.
7.

Fig.6. Network energy consumption curve

Figure 7 shows the relationship between thenumber of remaining nodes and their working time.

Fig.7. Network remaining node relationship diagram

105

Sun liming, Li jianzhong. Wireless Sensor Networks [M].
Beijing: Tsinghua University Press, 2005.
Wang Shu, Yang Yujie, Hu Fuping et. Theory andapplication of wireless sensor networks [M]. Beijing:
Beijing University of Aeronautics and Astronautics,
2007.
Zhang Haiyan, Liu Hong.Energy consumption balanced
routing algorithm for WSN based on K-means clustering[J]. Chinese Journal of Sensors and Actuators,2011，24(11):1639-1643.
Lin nan, Shi weihang.Optimization and Simulation ofWireless Sensor LEACH Algorithm [J] .Computer
Simulation, 2011,28 (1): 178-182.
Zhao xiulan, Xu xiulan, Li keqing.Different Clustering
Routing Algorithm Based on LEACH [J] .Application
Research of Computers, 2013,30 (3): 866-868.
Wei Liu,Le Le Wang. An Improved Algorithm Based on
LEACH Protocol[J]. Applied Mechanics andMaterials,2013,2560(347).
Yassein, Muneer Bani,Mistareehi, Hassan. Improvementon the Lifetime of the WSN Using Energy Efficiency
Saving of Leach Protocol (New Improved LEACH)[J].
Sensors & Transducers,2011,130(7).