Energy-Efficient Multi-hop Routing Algorithm Based on LEACH He Yang1,2 , Jia Xu2,3 , Ruchuan Wang2,3 , and Liyang Qian1 1
2 3
College of Computer, Nanjing University of Posts and Telecommunications Jiangsu High Technology Research Key Laboratory for Wireless Sensor Networks Key Lab of Broadband Wireless Communication and Sensor Network Technology of Ministry of Education, Nanjing 210003, China yanghe
[email protected],
[email protected]
Abstract. In order to reduce network energy consumption and prolong the lifetime of wireless sensor networks, this paper improves the LEACH to an energy efficient multi-hop routing algorithm. LEACH in the cluster creation, data transmission, the update phase of the cluster was modified in proposed algorithm. The algorithm updates the cluster head reasonably and adjusts the structure of the cluster to reduce the energy consumption in cluster establishment phrase. In data transmission, it lowers energy consumption by inter-cluster and intra-cluster multi-hop transmission. The simulation runs the algorithm on NS2. The results show that the new algorithm’s effectiveness in reducing energy consumption by comparing it with LEACH, LEACH-C,DEEUC. Keywords: wireless sensor network, intra-cluster, clustering routing algorithm, energy-efficient.
1
Introduction
Wireless sensor network (WSN) is multi-hop and self-organizing network, which is composed of numerous sensor nodes scattered in a certain region by wireless communication. Battery-powered nodes in the network severely resulted in energy constraints because of their large number, wide distribution and complex environment [1]. Generally, the energy of nodes in wireless sensor network is limited and no supplement. In addition, there are lots of nodes while the can only obtain part of topology information to build the routing. Therefore, it needs a better routing algorithm in wireless sensor network to achieve energy optimization. Low Energy Adaptive Clustering Hierarchy [2] (LEACH) is a kind of routing algorithm in wireless sensor network, which is comparatively mature and commonly used at present. It reduces the energy consumption in data transmission through dynamic clustering, data fusion of cluster members to transfer data to the sink node by cluster head. Combined with multi-hop transmission, this paper puts forward a new algorithm based on LEACH. The new algorithm effectively save energy by adopting methods such as electing cluster heads according to R. Wang and F. Xiao (Eds.): CWSN 2012, CCIS 334, pp. 578–587, 2013. c Springer-Verlag Berlin Heidelberg 2013
Energy-Efficient Multi-hop Routing Algorithm Based on LEACH
579
their residual energy, communicating in clusters through muti-hop and using chain structure in communication between clusters. Simulation shows that new algorithm is superior at aspects of balancing energy consumption of each node, reducing energy consumption of the network and extending the network lifetime to LEACH and other algorithms based on it.
2 2.1
Related Research LEACH
The basic idea of LEACH is to lower energy consumption and prolong the network lifetime by means of cyclically electing cluster heads at random and evenly distributing the consumption of the network to each node. The process of LEACH is cyclical. At the phrase of establishing clusters in each round, a random number between 0 and 1 can be generated by each node. If the random number is less than the threshold T (n), the node will become a cluster head. T (n) is calculated as follows: T (n) =
p , 1 1−p·(r mod ( p ))
n ∈ G;
0,
others.
(1)
Then, cluster head broadcasts a message that it is a cluster head. According to the intense of radio signal, nodes receiving the message decide which cluster to join in and reply to the cluster head. At the phrase of data transmission, all nodes in cluster send data to the head within the distributed TDMA time slot. Meanwhile, the head fuse data received from other nodes and send fusion to base station. After some time for Stable work, the network begins to start next round of electing cluster heads to rebuild clusters. The following problems are found after analysis of LEACH. 1) The election of cluster heads In Formula(1), it is obvious that whether a node can be a cluster head only depends on rCthe random number and no other factors. It will cause some situations that are bad for efficient use of energy in the network. If cluster heads are concentrated in a small area, communication between distant nodes and cluster heads consume more energy. In addition, nodes with low energy which are elected as cluster heads may die soon [3]. 2) Energy consumption of communication between clusters The way of inter-cluster communication in LEACH is that cluster heads directly send data to base station. Because of the random election of cluster heads, it will waste more energy in data transmission for the cluster heads far from base station, which is bound to accelerate the death of them.
580
H. Yang et al.
3) Energy consumption of rebuilding clusters In each round, it should reelect cluster heads and create new clusters, which results in larger energy consumption in reconstruction of clusters and is not conductive to prolong the network lifetime. 2.2
Improved Algorithm Based on LEACH
In order to improve quality of cluster, Heinzelman put forward centralized cluster construction algorithm LEACH-C [5]. The basic idea of LEACH-C is that base station collects the position and energy information of all nodes and calculates the average energy while the nodes with energy over the average are able to become cluster heads. As we can see from cluster heads election mechanism, cluster heads are generated under the control of base station in LEACH-C so that cluster heads have more energy and clusters are distributed more evenly to LEACH. However, in LEACH-C base station needs to know the location and energy information of each node resulting in the increase of data amount and energy consumption. PEGASIS [6] algorithm proposed by Lindsey organizes all nodes in a chain, by which data is fused and transferred to base station. It constructed a chain with greedy algorithm. Due to local optimum of the greedy algorithm, the chain structure isnt the best and there may be a circuity. In addition, it needs to reconstruct the chain once a node is found dead. If constructed chain is too long, a waste of energy is inevitable [7]. Two-stage clustering protocol TPC constructs multi-hop routes in clusters to save energy [8]. Yang Guang proposed a kind of multi-hop routing algorithm [9] by angle limit to further save energy. These methods reduce energy consumption through multi-hop transmission in the cluster. But it is not conducive to the real scene because nodes need to have precise positioning equipment and design of routing algorithm is complex.
3 3.1
Energy-Efficient Multi-hop Routing Algorithm Based on LEACH Network Model and Energy Model
1) Sensor nodes are randomly distributed in a square area A(a ∗ a) 2) There is a unique base station (BS) in a fixed location within the region A. 3) Nodes dont move once deployed. All nodes have a similar capacity, equal status and same limited energy. 4) Nodes can adjust its distance from information source according to the intensity of received signal. 5) Transmission power is controllable so that nodes can adjust it in terms of transmission distance. 6) The energy model adopts multipath fading model.
Energy-Efficient Multi-hop Routing Algorithm Based on LEACH
581
Energy consumed in sending can be calculated in accordance with Formula (2) while energy consumed in receiving can be calculated in accordance with Formula (3). k · Eelec + k · εf s · d2 , d < d0 ; Etx (k, d) = (2) k · Eelec + k · εamp · d4 , d ≥ d0 . In Formula (2), Etx (k, d) is energy consumed by sending k bit data to receiving node d m far away. Eelec is energy consumption of transmission circuit. εf s and εamp are different coefficient of amplifier. d0 represents reference distance. Etr (k, d) = k · Eelec
(3)
In Formula (3), Etr (k, d) is the energy consumed by receiving k bit data from d m away. Eelec is energy consumption [8] of receiving circuit. 3.2
Algorithm Description
Through the analysis of LEACH and its improved algorithm, in order to save energy and extend the network life, energy-efficient multi-hop routing algorithm based on LEACH is proposed, which makes improvements in the phrase of establishment of clusters, data transmission and update of cluster. 1) Establishment of clusters At the beginning of establishment, each sensor node generates a random number (0–1) and compares it with the threshold. If the random number is less than the threshold, the node will be elected as a cluster head. Considering the residual energy of nodes, the energy factor Ei /Eaverage is added into the threshold value, which makes nodes with larger energy become cluster head with more probability. Eaverage can be estimated by the following Formula [10]. Etotal − r · Eround (4) N In Formula (4), Eaverage is the average energy of each node. Etotal means the total energy of the whole network. Eround represents average energy consumption in each round. r is the current round number. N is the amount of living nodes in the network. T (n) is calculated in accordance with the following Formula. p Ei · , n ∈ G; 1 (5) T (n) = 1−p·(r mod ( p )) Eaverage 0, others. Eaverage =
In Formula (5), p is the percentage that a node becomes a cluster head, r is the current round number. G is the collection of nodes which are not cluster heads in the recent 1/p round. Ei is the residual energy of node i. Eaverage is average residual energy of all nodes.
582
H. Yang et al.
Cluster head set H to 0 (H is the hop from the cluster head, H = 0 indicates that the node is the cluster head) and CH (cluster heads ID of the cluster) to node ID. Then the head broadcasts the message that it is cluster head (H = 0, CH). Assumed that node j receives the clustering broadcast message (H = 0, CH) and join the cluster, it sets its own CH to the CH of the message, Hj to H + 1 = 1 and P ID (ID of its parent node) to P ID = IDj . After that, node j continues to broadcast the message (Hj , CH). Similarly, the node receiving node j broadcast message (Hj , CH) sets its own H, CH and P ID and keeps on broadcasting. If a node receives multiple broadcast messages, it should compare the H in messages with its H. Assumed that node p has set its Hp , CHp and P IDp , it received a message (Hq , CHq ) from node q. If Hp ≤ Hq + 1, then do nothing; if Hp > Hq + 1, then reset Hp to Hp = Hq + 1, CHp to CHp = CHq , P IDp to P IDp = IDq and continues to broadcast the messages (Hp , CHp ) In order to prevent the unlimited broadcasting of the clustering message, the initial value of H of each node should be set to the maximum Hmax in advance. When broadcast message is received, the node does nothing but stop broadcasting if Hmax ≤ H + 1. As nodes are randomly distributed√in a square area, the maximum distance between two points of the region is 2a and the distance of single hop communication distance within the cluster is R, then Hmax can be applied in accordance with the Formula (6). √ 2·a +1 (6) Hmax = R Take nodes A, B, C, D, E, F, G, I ,J as examples. Assume that A and I are elected as cluster head, cluster structure are shown in Fig.1 and Fig.2 according to the above method.
簇头 A C
A H=0 CH=A
B
B H=1 CH=A PID=A
D F
G
E
D H=1 CH=I PID=I
簇头 I
J
Fig. 1. cluster head selection
C H=1 CH=A PID=A F H=1 CH=A PID= C
I H=0 CH=I
E H=1 CH=I PID=I G H= 2 CH=A PID=C J H=1 CH=I PID=I
Fig. 2. clusters after broadcast
2) Data transmission At the phase of inter-cluster communication, nodes packet their data and remaining energy at regular intervals and sends them to their parent nodes by P ID. Parent nodes continue to send packets to their own parent nodes. Eventually the packets reach the cluster head node by multi-hop.
Energy-Efficient Multi-hop Routing Algorithm Based on LEACH
583
At the phase of communication between clusters, the cluster head node extracts data from the packet, transmits data in chain structure like PEGASIS. It starts from the furthest cluster head away from the base station, chooses the closest cluster head from it as next hop and reaches the base station at last. 3) Update of cluster Updating cluster is mainly to solve cluster heads update. After a round of data transmission, remaining energy of cluster head may not be sufficient for the next round of data transmission. So cluster head must be replaced to prolong lifetime of the network. Meanwhile, in order to reduce energy consumption caused by cluster reconstruction, it is necessary to choose the node with the most residual energy in the cluster as a candidate cluster head, avoiding re-clustering of the entire network. Replacement of cluster head node starts after a round of data transmission. It is to find out the node with the most residual energy in nodes which are in the same cluster and never has been cluster head before. The selected node will be cluster head in next round and . When next round begins, the cluster head in last round sets its own H to Hmax and notify the new cluster head. Then the new cluster head broadcasts message that it is the cluster head to update the cluster structure. After 1/p round or all nodes in the cluster have been cluster head, cluster head can be randomly selected according to the threshold and broadcasts clustering message to re-cluster the entire network. Take node A, B, C, D, E, F, G, I for an example. Assumed that A is the current cluster head, cluster structure is shown in Fig.3. If B is chosen as the new cluster head, updated cluster structures is shown in Fig.4. I H=1 CH=A PID=A A H=0 CH=A E H=2 CH=A PID=I B H=1 CH=A PID=A
I H=2 CH=B PID=A A H=1 CH=B PID=B E H=3 CH=B PID=I B H=0 CH=B
C H=1 CH=A PID=A D H=2 CH=A PID=C
F H=2 CH=A PID= C G H= 3 CH=A PID=F
Fig. 3. cluster head selection
4
C H=1 CH=B PID=B D H=2 CH=B PID=C
F H=2 CH=B PID= C G H= 3 CH=B PID=F
Fig. 4. clusters after broadcast
Simulation
This article uses NS2 to simulate the new algorithm and compare it with LEACH, LEACH-C protocol. Simulation scene is set as follows: 100 sensor nodes randomly are deployed in the area of 100m 100m. The base stations location is (50, 50). The initial energy of each node is 2J. The energy loss in sending and receiving data is 50nJ/bit. The energy consumption of data fusion is 5nJ/bit. The size of one packet is 4000 bit. The reference distance d0 is 87.7m. This paper compares
584
H. Yang et al. 100 90 80 70 60 50 40 30 20 10 0
0
20
40
60
80
100
Fig. 5. the network topology structure of new algorithm in first round
the new algorithm with LEACH, LEACH-C and DEEUC in terms of total energy consumption of the network, average energy consumption of each round, the amount of surviving nodes in the network and the amount of data in each round. Fig 5 is the network topology structure of new algorithm in first round (‘+’ is base stations, ‘*’ is cluster head, ‘o’ is node in cluster).
200 LEACH LEACH−C DEEUC new algorithm
total energy consumption of the network
180 160 140 120 100 80 60 40 20 0
0
200
400
600
800
1000
time
Fig. 6. total energy consumption of the network
It can be seen from Fig.6 that the total energy consumption of LEACH, LEACH-C and DEEUC is almost the same while the total energy consumed by the new algorithm is obviously lower than that of LEACH, LEACH-C and DEEUC. Its main reason is that new algorithm adopts methods of selecting cluster head in LEACH-C and DEEUC to form optimal cluster structure in the cluster. In addition, multi-hop transmission is effective to reduce the cost of communication between cluster heads and base station.
Energy-Efficient Multi-hop Routing Algorithm Based on LEACH
585
average energy consunmption of each round
9 LEACH LEACH−C DEEUC new algorithm
8 7 6 5 4 3 2 1 0
0
50
100
150
200 time
250
300
350
400
Fig. 7. total energy consumption of the network
In Fig.7, we can see that the energy consumption of LEACH-C in each round is stably kept at about 4. It is mainly because the optimal cluster structure is generated each round according to location and energy information of all nodes. Therefore, energy consumption in each round is relatively balanceable. In LEACH, the energy consumption of each round is between 1 and 9. It is obvious that the scale is relatively large. Because cluster head is randomly selected in LEACH, a poor cluster scheme may be produced, which makes more energy is consumed in communication between some nodes and far cluster heads. And in DEEUC energy consumption of each round is also not very stable. However, the new algorithm keeps energy consumption of each round between 1 and 4, which is relatively stable. It changes little mainly because the new algorithm adopts methods of selecting cluster head of the LEACH-C and updating cluster head. Meanwhile, multi-hop communication saves more energy rather than single-hop communication in LEACH, LEACH-C and DEECU. Fig.8 shows that some nodes begin to die in LEACH, LEACH-C and DEEUC at the time of about 400. On the contrary, the nodes begin to die in the new algorithm when time is 550. All nodes in LEACH, LEACH-C and DEEUC have been dead respectively at 542, 578 and 667. But in the new algorithm all nodes die at 994. This shows that the new algorithm effectively reduces the energy consumption of the whole network, which avoids premature death of some nodes for overloading and extends the life of the network. From Fig.9, it can be seen that the amount of data sent in each round in LEACH-C, DEEUC and the new algorithm is relatively stable, while it changes a lot in LEACH. This is mainly because the energy problem is not considered in cluster head election of LEACH. If a low-energy node is elected as a cluster head so that it can not complete communication of a round, it will inevitably lead to small amount of data. However, LEACH-C, DEEUC and the new algorithm take energy factor into consideration when selecting cluster head. Thus the amount of data of communication in each round is relatively stable.
586
H. Yang et al. 100 LEACH LEACH−C DEEUC new algorithm
90
the amount of surviving nodes
80 70 60 50 40 30 20 10 0
0
200
400
600
800
1000
time
Fig. 8. total energy consumption of the network
1800 LEACH LEACH−C DEEUC new algorithm
the amount of data in each round
1600 1400 1200 1000 800 600 400 200 0
0
200
400
600
800
1000
time
Fig. 9. total energy consumption of the network
5
Conclusion
This paper studies LEACH and its improved algorithm and analyzes their own problems from the perspective of energy consumption. Therefore, in order to save energy and prolong the network lifetime, this paper have made improvements on the phrase of clusters construction, data transmission and clusters update in LEACH, which proposed energy-efficient multi-hop routing algorithm based on LEACH. By replacing the cluster head reasonably and multi-hop transmission in cluster, energy consumption is saved and network lifetime is extended. The simulation experiment on NS2 has proved this point. Meanwhile, it is found in
Energy-Efficient Multi-hop Routing Algorithm Based on LEACH
587
the experiment that the amount of data in communication of each round in new algorithm was relatively low. How to reduce energy consumption while increasing the amount of data will be the next target in research. Acknowledgement. The subject is sponsored by the National Natural Science Foundation of P.R China (No. 61100199, 61171053), the Natural Science Foundation for Higher Education Institutions of Jiangsu Province(10KJB520014, 12KJA520002) and Scientific and Technological Support Project (Industry) of Jiangsu Province (No.BE2012183).
References 1. Ren, F., Huang, H., Lin, C.: Wireless Sensor Networks. Journal of Software 7, 1282–1291 (2003) 2. Heinzelman, W., Chandrakasan, A., Balakrishnan, H.: Energy-efficient communication protocol for wireless microsensor networks. In: Proceedings of the 33rd Annual Hawaii International Conference on System Sciences, Maui, HI, pp. 1–10 (2000) 3. Zhang, H., Li, L.-Y.: Energy-balancing Routing Algorithm Based on LEACH Protocol. Computer Engineering 37(4), 91–93 (2011) 4. Shang, F., Lei, Y.: Energy Efficient Clustering Algorithm for Wireless Sensor Networks. Journal of Chinese Computer Systems 30(5), 839–842 (2009) 5. Heinzelman, W., Chandrakasan, A., Balakrishnan, H.: An application-specific protocol architecture for wireless micro-sensor networks. IEEE Transactions on Wireless Communications 1(4), 660–670 (2002) 6. Lindsey, S., Raghavendra, C.S.: PEGASIS: Power-efficient gathering in sensor information systems. In: Aerospace Conference Proceedings, pp. 1125–1130. IEEE (2002) 7. Yu, Y.-C., Wei, G.: An Improved PEGASIS Algorithm in Wireless Sensor Network. Acta Electronica Sinica 36(7), 1309–1313 (2008) 8. Choi, W., Shah, P.: A framework for energy-saving data gathering using two-phase clustering in wireless sensor networks. In: Mobile and Ubiquitous Systems: Networking and Services, MOBIQUITOUS 2004, pp. 203–212 (2004) 9. Guang, Y., Guisheng, Y.: Intra-cluster multi-hop routing algorithm based on forwarding restriction angle in WSNs. In: Control and Decision Conference, CCDC 2008, pp. 2035–2039 (2008) 10. Shang, F., Mehran, A., Tadeusz, W.: Distributed energy efficient unequal clustering algorithm for wireless sensor networks. Journal on Communications 30(10), 34–42 (2009)