Tree-Based Multihop Routing Method for Energy Efficiency of Wireless Sensor Networks

In wireless sensor networks (WSNs), due to the limited energy of sensor nodes, how to design efficient hierarchical routing algorithms to balance network resources and extend network life is an important problem to be solved. Aiming at the problems such as random selection of cluster head, redundancy of working node, and construction of cluster head transmission path, which affect network energy consumption, this paper proposes a multihop routing algorithm based on path tree (MHRA-PT) to optimize the network energy. Firstly, some nodes are those close to the base station and have large remaining energy which are selected to construct a cluster head set. Then, after clustering, each cluster is divided into different regions, and in each region, nodes with residual energy greater than the average residual energy of the cluster are selected as a working node. Finally, the cluster heads are sorted according to their distance from base station, and the next hop node is selected for each cluster head in turn until a path tree rooted at base station is formed completely, leading to data transmission from working node to base station. Simulation results show that the proposed algorithm can effectively reduce network energy consumption, balance network resources, and prolong network life cycle.


Introduction
Wireless sensor networks (WSNs) have been widely used in many fields including environmental monitoring, smart space, military reconnaissance, and medical systems [1][2][3][4]. However, how to efficiently use energy of the network node is still a valuable problem to be studied in WSNs [5,6]. Cluster routing algorithms are effective methods of energy management related to WSNs [7,8], the most classic of which is the LEACH algorithm proposed by Daanoune et al. [9]. This algorithm divides nodes in the network into cluster heads and cluster members by clustering, which can fully use network node resources and effectively lengthen the life cycle of the network. In addition, algorithms such as PEGASIS [10] and TEEN [11] employed clustering idea to reduce the number of nodes those directly communicate with base station. By periodically changing cluster head, the energy consumption is balanced among nodes in the network; it is used to prolong the network life cycle.
Although the LEACH algorithm has good energy saving effects, it still has some problems. For example, the LEACH algorithm completely relies on a random number to select cluster heads. As a result, some nodes with less residual energy may be selected as cluster heads for several times, resulting in the death of those nodes. In addition, cluster head or working node that has a long distance from the base station may consume a large amount of energy in transmitting.

Related Work
Many research works have been done to improve the LEACH algorithm. Using the isolated node method, Leu et al. proposed a clustering routing algorithm to prolong the network life cycle [12]. Leu et al.'s algorithm constructs a cluster head selection threshold according to the node's own remaining energy and the average remaining energy of all nodes and assigns nodes with more energy as the cluster head preferentially, then uses distance between isolated nodes and base station to judge whether isolated nodes should directly communicate with the base station or else. Thus, premature death of cluster heads and isolated nodes due to excessive energy consumption may be avoided. Neamatollahi et al. developed a clustering routing algorithm using the mechanism of cluster head rotation [13]. The algorithm utilizes the current remaining energy of the cluster heads to determine whether to reselect the cluster head. It not only ensures that the cluster head has enough energy but also reduces the energy consumption caused by repeated clustering. However, in literatures [12,13], the way in which the cluster head transmits data to the base station is single-hop transmission. If the distance between the cluster head and the base station is far, the cluster head will die prematurely because of large energy consumption corresponding to long distance transmission.
To solve the problem of energy consumption caused by long distance communication between cluster head and base station, the literature [14] proposed an IMHT-LEACH algorithm by combining the LEACH algorithm with multihop strategy. This algorithm assigns the different level of cluster heads according to the distance between the cluster heads and the base station. The low-level cluster heads nearby the base station are selected as the relay nodes, and the network energy consumption is reduced by the multihop transmission method. However, this algorithm fastens the structure of WSNs and may reduce the diversity of cluster head alternative paths. Arora et al. proposed a distributed multihop routing approach (DMATEB) to tackle this problem [15]. The DMATEB algorithm marks the cluster head that is closer to the base station than the current cluster head as neighbor cluster heads and then selects the cluster head with the largest remaining energy in the neighbor cluster heads as the next hop, which effectively reduces the network energy consumption. However, Arora et al.'s algorithm does not consider the transmission energy consumption between cluster heads. If some cluster heads far from base station are selected as the relay, they will still consume a lot of energy too. In short, the existing algorithms are mainly focused on saving energy of WSNs, while balance energy consume of WSNs is rarely considered.

Contribution
In this paper, inspired by the idea of LEACH, this paper proposes a multihop routing algorithm using path tree (MHRA-PT) to optimize network energy. The MHRA-PT algorithm is composed of three stages such as the cluster heads selecting, working nodes assigning, and transmission paths generating. In WSNs, the proposed algorithm can reduce network energy consumption and balance energy consumption of different nodes, thus significantly improving the energy utilization rate and leading to life cycle extension of WSNs. Overall, the main contributions of this paper can be summarized as follows: (i) A cluster head selection strategy with network energy balancing is developed. This strategy not only avoids the data inverse transmission caused by cluster heads far from the base station but also prevents cluster heads with less residual energy premature death caused by energy consumption in data transmitting. Thus, MHRA-PT effectively prolongs the network life cycle (ii) A working node selection strategy based on cluster region division is developed to construct the set of working nodes. This strategy can dynamically wake up nodes with more residual energy to perform some tasks, thus avoiding network resource waste caused by using excessive node of WSNs. Thus, MHRA-PT can effectively save the energy of WSNs (iii) In traditional data transmission, multiple cluster heads transmit data to the base station by forming a data link. Thus, faults of any cluster head in the data link may lead to data transmission failure. To improve the stability of data transmission, MHRA-PT assigns the path weight of the path tree according to the directivity of the cluster head data transmission, the residual energy of the cluster head, the data transmission energy consumption, and so on The remainder of this work is organized as follows. Section 4 introduces the system model and conventional method, including the network model, improved energy consumption model, and main steps of the LEACH algorithm. Section 5 describes the implementation process of the MHRA-PT algorithm in detail. To evaluate the proposed algorithm, some simulation results are presented in Section 6; besides, some analyses are done in this section. Section 7 summarizes all works of this paper.  Figure 1.

System Model and Conventional Method
Moreover, three assumptions related to the model of WSNs are as follows: (1) Each sensor node has limited energy, and their initial energy is the same (2) Each sensor node has its own ID, and their positions are fixed after deployment (3) The location of the base station is fixed, its energy is unlimited, and its information processing and storage capabilities can always meet the network requirements 4.1.2. Energy Consumption Model. The energy of sensor nodes is mainly used to transmit data, receive data, and process data [16]. Figure 2 shows the energy consumption model of sensor.

Journal of Sensors
Let E TX and E RX denote the energy consumption of sensor related to transmitting data and receiving data, respectively. Similar to the model of sensor energy. Consumption described in [17], E TX can be defined as where E TX-elec , E RX-elec , and E TX-amp are the energy consumption of transmitter, energy consumption of receiver, and energy consumption of amplifier, respectively; ε fs and ε mp are coefficient amplify of free space and coefficient amplify of multipath, respectively; E elec is the energy consumption of 1-bit data processing related to node, k is bits of data; d is the distance between the transmitter and receiver; and d 0 is the critical communication distance.

LEACH Algorithm.
The LEACH algorithm divides the working process into several rounds, and each round is composed of clustering stage and data transmission stage. Details of LEACH are described as follows.

Clustering Stage.
In the LEACH algorithm, whether or not, a noden i inside a cluster to be assigned as cluster head is determined by cluster head selection thresholdTðn i Þ described by equation (3). Namely, a node n i is assigned as a cluster head if Tðn i Þ is greater than a uniformly distributed random number between 0 and 1.
where p is the percentage of cluster head in the total number of nodes in the WSNs, r is the number of running rounds, and G is the noncluster head set in the cycle of 1/p.

Journal of Sensors
Once a node is assigned as a cluster head, it should broadcast signal, and each noncluster head according to the received signal strength joins in the nearest cluster.

Data Transmission Stage.
In the data transmission stage, each node within cluster sends monitoring data to the cluster head in sequence. After fusing the received data, the cluster head transmits data to the base station.

The Proposed MHRA-PT Algorithm
Using models described in Sections 4, this paper proposes the MHRA-PT algorithm to optimize and balance energy consumption of WSNs. The overall framework of the MHRA-PT algorithm is shown in Figure 3.
According to the overall framework of MHRA-PT algorithm, some details related to the cluster head selection are discussed, the working node selection and data transmission path selection in this section.

Strategy for Cluster Head Selection.
Cluster head selection is performed in the cluster routing algorithm based on the cluster head selection threshold. Suppose N sensor nodes are randomly distributed in the square area of S M . The optimal number of cluster head K opt [18] and the optimal percentage of cluster head to the total number of all nodes P opt are shown in the following: In equation (5), the cluster head selection threshold T m ðn i Þ is constructed by probability P b [10], f d ðn i Þ factor relating to distance between n i and base station, and remaining energy factor f e ðn i Þ.
where α and β are weight parameters of T m ðn i Þ and, at the same time, α + β = 1; d nb ðn i Þ ≜ kn i − Bk 2 , B is the coordinate of base station, n i is the coordinate of node n i , d nb max ≜ max fd nb ðn i Þg, and d nb min ≜ min fd nb ðn i Þg; and E r ðn i Þ is the remaining energy of n i , and E 0 ðn i Þ is the initial energy of n i . Besides, G ′ is the node set that has not been selected as the cluster head in the cycle of 1/P opt . Observing equations (4)- (8), it is obvious that some nodes with properties such as being closer to base station and larger remaining energy have large cluster head selection threshold, thus having greater probability of being selected as the cluster head. In addition, nodes selected as the cluster head are added to the cluster head set C, and the nodes not selected as the cluster head are added to the noncluster head set N.

Strategy for Working Node Selection.
It is obvious that using all nodes in WSNs to work may consume excess energy. Therefore, it should partition each cluster to reducing number of working nodes while guaranteeing network coverage.
An example is used to describe in Figure 4 to illustrate the details of partition. Assume that the farthest distance between cluster head CH and cluster member CM is r and the maximum sensing radius of node is r/2. Thus, the cluster's coverage area is a circle with the position of cluster head as the center and a radius r. Z 1 is defined as the circular area with the position of cluster head as the center and r/2 as the radius; Z 2 is the ring area with the position of cluster head as the center r/2 and r as the inner radii and outer radii, respectively. It can be found that the area of cluster may be divided into eight parts which are marked as ①~⑧, respectively.
In Figure 4, it is clear that sensing range of nodes in each part of Z 1 areas and nodes in each part of Z 2 areas can cover the entire cluster since the maximum sensing radius of node is r/2.
So, it should, respectively, choose working nodes in each part of the entire cluster to guarantee sensing range of nodes covering the entire cluster. In addition, it can compare the remaining energy E r ðn j Þ of node n j with the average remaining energy E avg of all nodes described in equation (9) to determine whether or not assign noden j is the working node.
In equation (9), Cu is the set of all nodes within the cluster, E r ðn k Þ is the remaining energy of node n k , m is the cardinal of the Cu. Specifically, if E r ðn j Þ ≥ E avg , the node n j joins in the working node set W. On the contrary, the node n j joins in the sleep node set S. Assuming the remaining energy of each node in a part of cluster less than E avg , it should assign the node with the largest remaining energy as the working node.

Strategy for Data Transmission Path Selection.
In the data transmission phase, multihop transmission strategy can be used to reduce energy consumption caused by long distance single-hop data transmission. This paper constructs path tree which assigns cluster head as the branch node so that each cluster head can transmit data to the base station along its 4 Journal of Sensors branch path. The path tree between the base station and cluster head is shown in Figure 5. Models of path tree construction are described in the following: where C 0 is a new cluster head set by sorting the elements in the cluster head set C, jCj is the cardinal of C, CH i is the ith cluster head, CH i is the coordinate corresponding to CH i , and B is the coordinate corresponding to base station. It can conclude the details of path tree construction as follows. Firstly, sorting cluster head according to the distance d toBS between cluster head and base station, cluster head should choose the cluster head closer to the base station as parent node. Secondly, it successively assigns the parent node to each cluster head according to ascending order of the distance d toBS between the cluster head and the base station. Now, taking as an example ( Figure 6), it chooses the cluster head CH 1 , CH 2 , and CH 3 in C 0 to display the details related to path tree construction.
(Step 1) Add first branch node CH 1 of path tree and record path information.
According to equations (10) and (11), cluster head CH 1 closest to the base station, so as described in equation (12) can directly choose the base station as the parent node of itself ( Figure 6(b)). Meanwhile, as described in equations (13), (14), and (15),CH 1 records path information itself. where Step 2) Add cluster head CH i ði ≠ 1Þ other than CH 1 to path tree, and record path information of themselves.

Journal of Sensors
Assuming that the cluster head of currently selected parent node is CH i (CH i ∈ C 0 and i ≠ 1), the set of all optional parent nodes of CH i is defined as CH J = f CH j j j=1,⋯,i−1 g. Specifically, in Figure 6(c), CH i = CH 2 and CH J = fCH 1 g.
Whether or not choosing CH j as the parent node of the CH i is determined by the path weight W CH i ðCH j Þ described in  Figure 6: The process of path tree construction.
Steps to build path tree 1. Initialization, get CHnum (Cluster head number), d toBS (Distance between cluster head and base station) 2. Sort cluster head according to d toBS , and get C 0 Record path information of CH 1 according to equ. (13)-(15) 7. else 8.
Determine set CH J of optional parent nodes of cluster head CH i 9.
Select parent node according to equ. (17)   Journal of Sensors where Observing equations (16) to (20), it can be concluded that path weights W CH i ðCH j Þ are positively correlated with the remaining energy of CH j and negatively correlated with the energy consumption of data transmission from CH i to CH j , respectively. Thus, it may choose the node with the largest path weight in the CH J as the parent node of CH i and record path information related to CH i . (Step 3) Determine whether or not CH i should be assigned children nodes of the base station.
After selecting the parent node, CH i can obtain the total communication energy consumption E co ðCH i , P CH i Þ by searching its record information first. Then, total energy consumption E tr ðCH i , BSÞ related to direct communication between CH i and base station can be obtained by equation (14). Therefore, it decided whether CH i should be assigned as children nodes of the base station by condition threshold If T c ðCH i Þ = 1, CH i should be assigned as children nodes of the base station and update its path information, else, not.
(Step 4) Determine whether or not path tree is constructed completely.
If current cluster head CH i is the last element of C 0 , it means the path tree is completed; otherwise, it will go back step 2 to select the parent node of the next cluster head. As shown in Figure 6(d), sequentially execute step 2, step 3, and step 4 to select the parent node of cluster head CH 3 and so on, until all cluster heads in C 0 have been selected.
In summary, the pseudocode related to path tree constructing is shown in Pseudocode 1.
The symbolic instructions in the path tree building steps above are shown in Table 1.  Figure 7.
In order to clearly describe the MHRA-PT algorithm, some pseudocodes are shown in Pseudocode 2.
MHRA-PT algorithm 1. Initialization, getM(Node set) and r max (Maximum number of rounds of the algorithm) 2. for r = 1 : if ðT m ðn i Þ ≥ T r ðn i ÞÞ then //If the node n i is selected as cluster head 5.
C ← n i //The node n i joins C (Cluster head set) 6. else 7.
N ← n i //The node n i joins N (Non-cluster head set) 8.
end if 9. end for 10. for∀n j ∈ Cu do // Cu is any cluster set in the network 11.
if ðT w ðn j Þ = 1Þ then //If the node n j is selected as working node 12.
W ← n j //The node n j joins W (working node set) 13. else 14.
S ← n j //The node n j joins S (Sleep node set) 15.
if ðCH i = CH 1 Þ then //If CH i is the first cluster head of the set C 0 20.    Journal of Sensors

Simulation Results and Analysis
In this section, it uses the performance comparison of different approaches to demonstrate the advantages of the proposed MHRA-PT algorithm.

Experimental Parameters.
In order to verify the feasibility and effectiveness of the proposed MHRA-PT algorithm, it is compared with three algorithms IMHT-LEACH [14], DMA-TEB [15], and CEED [19] in terms of cluster head energy consumption, network energy balance, and network node survival time through MATLAB simulation platform. Assume that N sensor nodes are randomly deployed in a monitoring area with an area of S M , and base station is located at the center of the monitoring area ( Figure 8).
The parameters used in the simulation are given in Table 2.

Cluster Head Energy Consumption
6.2.1. Transmission Path of Cluster Head. When cluster head transmits data to base station, it will cause different energy consumptions due to different transmission paths. Taking the network running to the 500th round as an example, Figure 9 shows the cluster head transmission paths in the CEED, DMATEB, IMHT-LEACH, and MHRA-PT.
Comparing the four subgraphs in Figure 9, under the condition that cluster heads are located at the same position, the cluster head transmission path of the CEED algorithm adopts chain structure, so that the data transmission appears to be oriented away from the base station. However, the cluster head transmission paths of DMATEB, IMHT-LEACH, and MHRA-PT algorithms adopt tree structure to avoid the deviation and improve the stability of data transmission from cluster head to base station. However, the data transmission paths of cluster heads related to three algorithms are very different due to their different path selection strategies. The MHRA-PT algorithm takes the directivity and path weight of the data transmitted from the cluster head to the base station into full consideration to construct the path tree as the data transmission path of the cluster head. Comparisons of four algorithms demonstrate the effectiveness of the MHRA-PT algorithm. Figure 10 shows the curve of total energy consumption of cluster head. It describes the energy consumption of transmitting between the cluster head and the base station, over the number of the network running rounds.

Energy Consumption of Cluster Head.
In this figure, the curves of four algorithms all show an upward trend, but they have different rates of rise. It is clear that when network runs to the 900th round, the rising rate of the corresponding curve of four algorithms decreases. The reason is that the number of selected cluster heads decreases due to the death of a large number of nodes in the network. It is clear that energy consumption of the MHRA-PT algorithm is always lower than that of the other three algorithms. Specifically, when the network runs to the 1100th round, the total energy consumption of the cluster head of CEED, DMATEB, IMHT-LEACH, and MHRA-PT algorithms is 15.2732 J, 10.5168 J, 9.3494 J, and 7.0444 J, respectively. Compared with the other algorithms, the MHRA-PT algorithm saves 53.9%, 33.1%, and 24.7% of energy, respectively. The above analysis shows that the MHRA-PT algorithm can effectively reduce cluster head energy consumption. Figure 11 shows the average remaining energy of cluster heads of CEED, DMATEB, IMHT-LEACH, and MHRA-PT at different times during the network operation.

Average Remaining Energy of Cluster Head.
As can be seen from this figure, the curves corresponding to the four algorithms keep decreasing; that is, the average Weight of cluster head threshold α, β α = 0:4, β = 0:6 Weight of path μ, λ μ = 0:3, λ = 0:7 Maximum number of running rounds r max 1800 9 Journal of Sensors residual energy of the cluster head keeps decreasing, but the curve corresponding to the MHRA-PT algorithm is always higher than curve corresponding to the other three algorithms. Specifically, when the network runs to the 1000th round, the average remaining energy of the cluster head of CEED, DMATEB, IMHT-LEACH, and MHRA-PT algorithms is 0.0343 J, 0.0599 J, 0.0604 J, and 0.1329 J, respectively. Compared with the other three algorithms, the average remaining energy of the cluster head of the MHRA-PT algorithm is 74.2%, 54.9%, and 54.6% higher, respectively. This shows that in the same running time, the MHRA-PT algorithm can effectively save the energy consumption of cluster head.
In equations (22) and (23), ΔP r max and ΔP r min are proximity of maximum remaining energy and minimum remaining energy to average remaining energy of cluster head, respectively, E ravg is the average remaining energy of all nodes, E r max is the maximum remaining energy, and E r min is the minimum remaining energy. The smaller ΔP r max and ΔP r min are (that is, E r max and E r min are closer to E r avg ), the more balanced the cluster head energy consumption is. The parameter indexes of the cluster head of CEED,  Table 3. It can be seen from Table 3 that maximum remaining energy E r max , minimum remaining energy E r min , and average remaining energy E r avg of the MHRA-PT algorithm are 0.6030 J, 0.4455 J, and 0.5495 J, respectively. Compared with the other three algorithms, the remaining energy of the cluster head of the MHRA-PT algorithm is the largest. In addition, ΔP r max of the MHRA-PT algorithm is 9.74%, which is 71.24%, 14.93%, and 23.76% lower than those of the other three algorithms, indicating the maximum remaining energy is the closest to the average remaining energy of the cluster head of the MHRA-PT algorithm. Similarly, ΔP r min of the MHRA-PT algorithm is 18.92%, which is 57.3%, 50.79%, and 32.9% lower than those of the other three algorithms, indicating the minimum remaining energy is the closest to the average remaining energy of the cluster head of the MHRA-PT algorithm. According to the above analysis, the MHRA-PT algorithm can effectively balance energy consumption.
6.3. Network Energy Balance. Network nodes are deployed at different locations in the monitoring area. The remaining energy of each node is different at each round. Taking the network running to the 500th round as an example, it can prove the validity of the MHRA-PT algorithm for balancing network energy consumption by comparing the residual energy of nodes in different locations in the CEED, DMA-TEB, IMHT-LEACH, and MHRA-PT.
In Figure 12, square box indicates the base station, which is located at the center of the monitoring area. The distribution of the remaining energy of nodes in Figures 12(a)-12(c) are approximately convex; i.e., the remaining energy of nodes located near the center of monitoring area is higher and far from the center of monitoring area is lower, and the difference of remaining energy between nodes is large. However, the distribution of remaining energy of nodes in Figure 12(d) is approximately horizontal, indicating that no matter whether it is a node in the center of monitoring area or a node far from the center of monitoring area, the difference of remaining energy between nodes is small. The above analysis shows that the MHRA-PT algorithm can effectively balance network energy. Meanwhile, in order to illustrate the change of total remaining energy of all nodes in the four algorithms, Figure 13 shows the trend of total remaining energy of all nodes in the network.
It can be shown from Figure 13 that the total remaining energy corresponding to four algorithms decreases as the network running time increases. During network operation, the total remaining energy corresponding to the MHRA-PT algorithm is always greater than the other three algorithms. When the total remaining energy of the network is 0, the round of running of CEED, DMATEB, IMHT-LEACH, and MHRA-PT is 1201, 1196, 1329, and 1577, respectively. This means that the total remaining energy of the MHRA-PT algorithm is reduced to 0 at the latest, which indicates that the MHRA-PT algorithm has the longest energy utilization time; i.e., the MHRA-PT algorithm can effectively reduce network energy consumption and prolong energy utilization time.  In the process of network operation, with the increase of node energy consumption, dead nodes will gradually appear in the network. The number of survival nodes of WSNs versus the number of round running relating to different algorithms is given in Figure 14.
It can be seen from Figure 14 that with the operation of the network, the curves corresponding to four algorithms have a cliff-like downward trend. When the first dead node appears in the network, the round of running    Journal of Sensors of CEED, DMATEB, IMHT-LEACH, and MHRA-PT is 410, 439, 617, and 864, respectively. Compared with the other algorithms, the MHRA-PT algorithm is the latest when the first dead node appears and prolongs the death time of the first node: 110.7%, 96.8%, and 40%, respectively. Besides, compared with the other algorithms, the MHRA-PT algorithm prolongs the death time of all nodes (31.3%, 31.9%, and 18.7%, respectively). This is because the MHRA-PT algorithm preferentially uses the working nodes with large residual energy in each round of operation and constructs the path tree for the cluster head when transmitting data, thereby effectively delaying death time of the node. According to the above analysis, the MHRA-PT algorithm can effectively prolong the life cycle of WSNs.

Conclusions
It is important to solve the problem of sensor node energy consumption in WSNs. Based on the LEACH algorithm, this paper comprehensively considers the impact of cluster head selection, working node selection, and data transmission path selection on network energy consumption, and the MHRA-PT algorithm based on path tree is proposed for network energy reduction and balance. This algorithm combines the probability of node being selected as cluster head, the distance factor between node and base station, and the node's residual energy factor to improve cluster head selection threshold. Within each cluster, an eight-part region partition method is introduced to reduce the number of working nodes; besides, a path tree is constructed and the transmission path from the cluster head to the base station is optimized too. The proposed MHRA-PT algorithm can effectively reduce cluster head energy consumption, balance network energy consumption, and prolong the network life cycle.

Data Availability
Supporting data come from our modeling and simulation.

Conflicts of Interest
The authors declare that they have no conflicts of interest.