Abstract
In wireless sensor networks (WSNs), the sensed data of each node are usually gathered through a data collection tree rooted at the sink node. The data collection tree generated randomly usually does not have the longest network lifetime. How to prolong the network lifetime is one of the main challenges in WSNs. In this paper, we propose a switching algorithm with prediction strategy (SAPS) to enhance the lifetime of WSNs through reducing the load of the node with the highest load by switching its descendants. In SAPS, the shortest path to the sink is chosen for each switched node to ensure that the routing tree is shortest, thus reducing the delay and energy expenditure of data collection. Furthermore, a prediction strategy which ensures that the highest load in the network decreases in each switching is developed to guarantee high efficiency and fast convergence of the algorithm. A distributed version of our algorithm, called DSAPS, is also designed. Simulation results demonstrate that our algorithms outperform existing methods in terms of network lifetime, maximum level of the routing tree, energy expenditure of switching, energy expenditure of data collection in each round, and rate of convergence.
1. Introduction
With the rapid development of electronics and computer technology, wireless sensor networks (WSNs) have been widely used in various applications, such as industrial prognostics and health management [1], agricultural activities [2], traffic lights management [3], urban search and rescue activities [4], and public safety and military systems [5]. In such applications, a number of sensors are deployed in the monitoring field to collect the needed information and transmit the sensed data to the sink node periodically. In most scenarios, the sensor nodes are organized into a data collection tree rooted at the sink node, and the sensed data are routed through the data collection tree to the sink by multihops.
In WSNs, sensors are usually powered by energy-limited batteries, and it may be cost prohibitive to replace exhausted batteries or even impossible in harsh environment such as active volcanoes, battlefields, or nuclear polluted regions [5, 6]. Therefore, maximizing network lifetime has become an important target in protocol design for data collection. Extensive researches have been proposed on this topic, and many popular energy conservation techniques are proposed such as efficient duty-cycling [7–10], sink mobility [11–14], topology control for redundant nodes [15–17], and load balancing [6, 10, 18, 19], among others.
During the process of data collection, power of each sensor node is consumed mainly by transmitting and receiving data packets, while the power of sensing and computation is negligible. The 1-hop nodes, which are the children of the sink, are usually the bottleneck nodes of the network because replaying more packets will deplete their energy quickly. Many of the existing load balancing-based methods prolonged the network lifetime by reducing the load of the bottleneck nodes. However, the rates of convergence of these approaches are slow and their lifetimes can be improved further. The algorithms we propose in this paper can efficiently solve the above problems.
The major contributions of this paper are as follows:
We propose a switching algorithm with prediction strategy (called SAPS) which minimizes the load of the bottleneck node for maximizing network lifetime. The routing tree is kept shortest during the process of switching, thus minimizing delays and energy consumption of data collection. Whether a node is switchable is determined by the prediction strategy which ensures every switching lowers the highest load in the network to achieve fast convergence. As far as we know, our algorithm is the fastest approach for maximizing network lifetime. The simulation results show that SAPS is converged after several iterations while maximizing network lifetime. We also provide distributed implementation of the proposed algorithm, called DSAPS. The simulation results demonstrate that DSAPS outperforms existing approach in the literature [19] in terms of lifetime, rate of convergence, and energy expenditure.
The rest of the paper is organized as follows. Section 2 presents the related works. The definitions and analyses of the problem are introduced in Section 3. The proposed algorithms are detailed and analyzed in Section 4 and the simulation results are presented in Section 5. Finally, we give some concluding remarks in Section 6.
2. Related Work
The problem of network lifetime maximization of WSNs has been extensively investigated in recent years. Many researchers prolong network lifetime by using energy-efficient techniques, such as efficient duty-cycling [7–10], sink mobility [11–14], topology control for redundant nodes [15–17], and load balancing [6, 10, 18, 19], among others.
MAC-based solutions which exploit the possibility to tune the duty-cycle have been used for energy saving in WSNs. In [7], a low duty-cycle data gathering protocol, called BailighPulse, was presented for mostly off WSN applications. BailighPulse incorporated a novel multihop wake-up scheme that allowed for energy-efficient recovery of network synchronization, with which the radio duty-cycles were reduced efficiently and the energy consumption during wake-up was minimized. In [8], the accurate models for determining the neighbor discovery time were proposed for the main asynchronous schedule-based duty-cycle mechanisms, which considered message loss probability and yielded more precise estimations than the traditional models. In [9], an energy-efficient cross-layer MAC protocol based on the integrated use of a scheduling schema and a switched-beam antenna was presented and validated, in which the MAC scheduler managed the activation of the antenna sectors based on information coming from both MAC and network layers. In [10], a holistic approach was proposed to prolong the network lifetime, which integrated intraroute coordination (at MAC layer) and interroute coordination (at network layer).
In [11–14], sink mobility was considered for maximizing network lifetime. Linear programming and column generation approaches were described in [11]. However, these algorithms cannot be easily extended into distributed versions. The optimal sink scheduling problem in WSNs was investigated in [12]. A novel notation placement pattern was developed to bound time varying routes with the placement of sinks which transformed the problem from time domain into pattern domain and thus significantly decreased the problem complexity. In [13], a cluster-based mobile sink exploration scheme was presented to guide data packets efficiently to mobile sinks, in which a source node could identify the sink location without knowledge of node locations, and multiple routing paths were established from a sensor to the sink to enhance network lifetime. In [14], optimal sensor deployment, activity scheduling, and data routing were taken into consideration for maximizing network lifetime, as well as sink mobility.
Some scholars exploit node redundancy to enhance network lifetime. In [15], a distributed self-stabilizing and wear-out-aware algorithm was presented to achieve resiliency by maintaining a necessary set of working nodes and replacing failed ones when needed. The algorithm in [16] exploited the redundancy in the sensor network to prolong the network lifetime while guaranteeing the coverage requirement. The authors in [17] explored a scheme for generating random sensor networks by deploying a minimum number of active nodes required to achieve a fully connected network topology and essentially full area coverage, while increasing the network lifetime. Several graph metric properties of the networks were also explored for getting further optimized networks.
Recently, load balancing is also used to maximize the lifetime of WSNs. The main idea is to route packets through nodes with lower loads such that nodes with higher loads can participate less in data transmission. As a result, the minimum nodal lifetime in the network may be extended and the network lifetime may be prolonged.
A distributed top-down algorithm was presented in [6], which constructed the load balanced routing tree layer by layer such that each layer was optimally extended, using a network flow model. The major contribution is to address the need for time sensitive data gathering to guarantee minimum delay when maximizing network lifetime, whereas the residual energy of sensor nodes is not taken into consideration when establishing routing paths.
In [18], it was assumed that the bottleneck nodes of a data collection tree were 1-hop nodes, and the load balance and energy efficiency of 1-hop nodes were taken into account. The descendants or the loads of 1-hop nodes were allocated in a balanced way according to the predicted residual energy of each node, whereas this algorithm is a centralized solution, and the assumption that the bottleneck nodes were 1-hop nodes is not always realistic.
Path load was taken into account when selecting a new parent in [19], and a randomized switching algorithm (called RaSMaLai) was proposed to maximize the network lifetime based on the concept of bounded balanced trees. Distributed implementation called D-RaSMaLai was also provided. However, the optimal bounded balanced tree constructed by RaSMaLai or D-RaSMaLai is not always the tree with the maximum lifetime, and the level of the data collection tree after switching may increase, which will result in higher delays and more energy consumption for forwarding packets. Furthermore, the randomized switching strategy may lead to more iterations and slower convergence.
To address the issues concerned, we present an efficient switching algorithm with prediction strategy (called SAPS) and its distributed version (called DSAPS), which achieve the converged state much faster while maximizing network lifetime.
3. System Model and Problem Statement
3.1. Network Model
In this paper, we consider a wireless sensor network with n sensor nodes
A data collection tree T rooted at the sink node S is constructed for data collection. The random shortest path tree is constructed as follows: The root S broadcasts a routing message including its own ID and its level
A node
3.2. Problem Statement
We assume that the sink has infinite power supply, while every sensor is energy limited. A sensor will be a failure node if it runs out of its energy. In this paper, we concentrate on extending the lifetime of the bottleneck node in WSNs to prolong the network lifetime. To simplify the descriptions of the issue, a few definitions are introduced as follows.
Definition 1 (round).
A round of data collection denotes the process when the sink broadcasts a collecting message till the data of each sensor reaches the sink.
Definition 2 (lifetime of a node).
The lifetime of a node is the number of data collection rounds in which it can participate before running out of its energy.
Let
The current residual energy of
Definition 3 (lifetime of a tree).
The lifetime of a data collection tree T is the lifetime of the node that runs out of its energy first; in other words, it is the minimum lifetime of all nodes in the tree. Formally,
The network lifetime of a tree-based WSN is just the lifetime of the data collection tree T in the network.
Definition 4 (load of a node).
The load
Obviously, the node with the highest load must be the one with the minimum lifetime, which is called the bottleneck node.
Definition 5 (path load).
In a given data collection tree T, the path from a node
If
Definition 6 (lifetime maximization problem, LMP).
The lifetime maximization problem in tree-based WSN is to maximize the lifetime of the bottleneck node with the minimum lifetime in the data collection tree T. Formally,
Substituting formula (4) into formula (6),
It can be seen that the lifetime maximization problem can be converted to minimizing the highest load among all nodes in the network. But in the RaSMaLai algorithm, the lifetime maximization problem was resolved into the bounded load balanced tree problem, which considered that the optimal δ-bounded balanced tree with the minimum δ would be the tree with the maximum lifetime, where δ was defined as the highest path load of all leaf nodes minus the lowest path load of all leaf nodes. However, we find that this consideration does not work in all situations. The following example will illustrate this problem.
Figure 1 depicts two different data collection trees

Example of δ-bounded balanced trees
We can conclude that the optimal δ-bounded balanced tree constructed by RaSMaLai is not always the tree with the maximum lifetime. For maximizing the network lifetime, the highest load among all nodes in the data collection tree should be minimized, as presented in formula (7).
4. The Proposed Algorithms
4.1. Design of the SAPS Algorithm
As mentioned in the last section, our goal is to minimize the highest load among all nodes, that is, to minimize the load
It can be seen that the load
If node
Furthermore, after switching
To overcome these problems, the level of the data collection tree is taken into account in our SAPS algorithm. When
In some particular cases, the highest load on
In addition, no parameter is needed to control the maximum number of iterations in SAPS, which is different from RaSMaLai. SAPS terminates automatically when there is no node switched, which means the algorithm is converged.
4.2. Details of the SAPS Algorithm
SAPS starts with a random shortest path tree, and the pseudocode is shown in Algorithm 1. All the major symbols used in the algorithm are given as follows:
V: the set of all nodes in a WSN.
(1) Calculate (2) Select the node (3) while (true) (4) { (5) queue (6) while ( (7) { Remove node (8) (9) if ( (10) else (11) { Select the node (12) Estimate the path load (13) if ( (14) else (15) { Switch (16) If (17) Update (18) (19) } (20) } (21) } (22) if ( (23) else Select the node (24) }
The details of the SAPS algorithm are described as follows.
Step 1.
First, the load
Step 2.
The flag variable
Step 3.
If
Step 4.
When α becomes empty, the switching of the descendants of the bottleneck node
4.3. DSAPS: A Distributed Version of SAPS
A distributed version of SAPS, called DSAPS, is developed in this section.
SAPS terminates automatically when there is no node switched. However, in the distributed algorithm, transmitting and receiving the control messages may consume the energy of a node continually during the switching process. Thus, the load of a node will still increase continually while keeping the number of its descendants constant, which is not conducive for convergence of our algorithm. In order to improve the speed of convergence, a parameter
In the distributed algorithm, downward path load is calculated at each node and forwarded to the sink; thus, the sink can pick out the maximum load in the network. The definition of downward path load is as follows.
Definition 7 (downward path load).
The downward path load of a node
Similar to SAPS, DSAPS also starts with a random tree, which then proceeds with the following phases.
Phase 1.
Each node
Phase 2.
Each node calculates its path load from top to bottom. The sink first broadcasts a PathLoadUpdate message to its children with its path load
Phase 3.
The task of Phase 3 is to find the bottleneck node with the highest load. First, the sink sends a Find message to its child
Phase 4.
The task of this phase is to switch the descendants of the bottleneck node to the other subtrees for lowering the maximum load in the tree.
Step 1.
The current node (initialized with
Step 2.
If
Step 3.
The following operations should be done for switching Node Node Node
Step 4.
If a node
Phase 5.
When the sink receives the SwitchAck message, the switching of the descendants of
5. Performance Evaluation
For comparing the performances of SAPS, DSAPS, RaSMaLai, and D-RaSMaLai, we conducted extensive simulations of these algorithms based on the WSN simulator in [20]. The sensor nodes were randomly placed in a square area of
We carried out our simulations in two different scenarios. In Scenario 1, the sink was placed at the center of the field with coordinate (50 m, 50 m). In Scenario 2, the sink was placed at the edge with coordinate (100 m, 50 m). We then evaluated the following metrics:
Lifetime, measured as the number of data collection rounds until the first node runs out of energy. Number of iterations required for convergence. Maximum level of the data collection tree after switching. Energy expenditure for data collection in each round. Energy expenditure for switching, measured as the amount of energy spent to transmit and receive the control messages in DSAPS and D-RaSMaLai. Note that a node receives messages within its hearing distance even if it is not the intended recipient, which also causes energy loss for receiving these irrelevant messages.
5.1. Setup of Control Parameters
SAPS does not have any control parameters, while DSAPS has a parameter

Impact of
RaSMaLai has two control parameters which dominate the performance of RaSMaLai: δ, the maximum allowable difference among the path loads of leaf nodes, and
For different networks, the optimum values of δ,
Parameter settings for RaSMaLai and D-RaSMaLai.
5.2. Performance Analysis and Discussions
The experimental results discussed in this subsection were obtained using the parameters in Section 5.1.
5.2.1. Network Lifetime
The experimental results on the lifetime are shown in Figures 3(a) and 3(b) for Scenarios 1 and 2, respectively. We observe that SAPS has the highest lifetime in both scenarios. The lifetime of DSAPS is slightly less than that of SAPS because of the energy expenditure for switching but is greater than that of RaSMaLai, and D-RaSMaLai achieves the minimum lifetime.

(a) Lifetime in Scenario 1. (b) Lifetime in Scenario 2.
As shown in Figure 3, the lifetimes of SAPS, DSAPS, and RaSMaLai tend to increase in Scenario 1 as the network size increases, which is opposite to the trend in Scenario 2. This is because in Scenario 1 in which the sink is placed at the center of the field, as the network size increases, the distribution of nodes in the network becomes more uniform, which is conducive to load balance. Thus, the lifetime increases efficiently after switching, which is even higher than that of the smaller network. But this is not the case in Scenario 2 in which the sink is on the border. This is because, as the network size increases, the loads of the nodes near the sink become higher even after switching, although the distribution of nodes in the network becomes more uniform. Thus, the lifetime decreases. Figure 3 also shows that the lifetime of D-RaSMaLai tends to decrease in both scenarios as the network size increases. This is because, as the network size increases, D-RaSMaLai tries to save the energy expenditure for switching by reducing the number of iterations or increasing the value of δ, both of which reduce the effect of load balance. Thus, the lifetime decreases.
5.2.2. Number of Iterations
The experimental results on the number of iterations are shown in Table 2 for both scenarios. We can see that the numbers of iterations of SAPS and DSAPS are much less than those of RaSMaLai and D-RaSMaLai. With fewer iterations, the lifetimes of the routing trees produced by RaSMaLai and D-RaSMaLai are lower. Figures 4(a) and 4(b) show the results on the lifetime of the routing trees produced after 5 iterations and 10 iterations, respectively, for Scenario 2. We observe that, under the condition of the same number of iterations, the lifetimes of SAPS and DSAPS are about 30 to 180 percent higher than those of RaSMaLai and D-RaSMaLai. Similar results were obtained also for Scenario 1, but we do not report them here due to lack of space. In conclusion, RaSMaLai and D-RaSMaLai need more iterations to achieve higher lifetime. However, SAPS and DSAPS can achieve maximum lifetime just after several iterations.
Iterations of each algorithm.

Lifetime in Scenario 2: (a) after 5 iterations and (b) after 10 iterations.
5.2.3. Maximum Level of the Routing Tree after Switching
Figures 5(a) and 5(b) show the results on the maximum level of the routing tree after switching for Scenarios 1 and 2, respectively. The maximum levels of the routing trees produced by SAPS and DSAPS are the same as that of the random shortest path tree before switching in both scenarios. However, the maximum levels of the routing trees produced by RaSMaLai and D-RaSMaLai are increased obviously and are over 2 times greater than those of SAPS and DSAPS in most cases, which result in longer delays and more energy expenditure for data collection in each round.

(a) Maximum level in Scenario 1. (b) Maximum level in Scenario 2.
5.2.4. Energy Expenditure for Switching
In DSAPS and D-RaSMaLai, the energy of each node is spent continually for transmitting and receiving the control messages during the switching process. The results on the energy expenditure for switching of DSAPS and D-RaSMaLai are shown in Figure 6. We observe that, as the number of nodes increases, the energy expenditure for switching of DSAPS does not increase as much as that of D-RaSMaLai in both scenarios, and DSAPS achieves lower energy expenditure for switching than D-RaSMaLai, which benefits from fewer iterations and shorter routing trees. Figure 6 also shows that the energy expenditure for switching in Scenario 1 is lower than that in Scenario 2 for both DSAPS and D-RaSMaLai. This is because the sink is on the border in Scenario 2 which results in higher routing tree (as shown in Figure 5); thus, some control messages are relayed by more hops.

Energy expenditure for switching in the two scenarios.
5.2.5. Energy Expenditure for Data Collection in Each Round
The results on the energy expenditure for data collection in each round are shown in Figures 7(a) and 7(b) for Scenarios 1 and 2, respectively. We observe that, in both scenarios, as the number of nodes increases, the energy expenditure values in each round of SAPS and DSAPS do not increase as much as those of RaSMaLai and D-RaSMaLai. Figure 6 also shows that the energy expenditure value of SAPS is equal to that of DSAPS and less than those of RaSMaLai and D-RaSMaLai in both scenarios. RaSMaLai has the highest energy expenditure in each round for both scenarios because the routing tree produced by RaSMaLai is the highest (as shown in Figure 5).

Energy expenditure for data collection in each round: (a) in Scenario 1 and (b) in Scenario 2.
6. Conclusion
In this paper, we presented an efficient switching algorithm with prediction strategy, called SAPS, which maximizes the network lifetime by means of load balancing. When a node is considered for switching, the neighbor with lower level and minimum path load is chosen as the new parent. A prediction strategy is then provided to make sure that each switching lowers the maximum load in the tree, which results in faster convergence of the algorithm. A distributed version of SAPS is also implemented, called DSAPS. The simulation results indicate that our approaches can produce the shortest path trees with higher lifetime after fewer iterations, and they consume less energy for switching and data collection in each round.
Footnotes
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
Acknowledgments
This work is supported by the National Natural Science Foundation of China (61272084, 61572263, 61300240, 61373015, and 41301407), the Key Project of Natural Science Research of Jiangsu University (14KJB520027), the National Natural Science Foundation of Jiangsu Province (BK20130819, BK20151511), the National Natural Science Cultivation Foundation of China (NS2012023), the Postdoctoral Science Foundation of China (2013M540447, 2013M541703), and the Postdoctoral Science Foundation of Jiangsu (1301020C, 1301042B).
