Abstract
In duty-cycled wireless sensor networks, energy efficiency and packet latency are two most important metrics in the design of medium access control and routing algorithms. However, these two problems cannot be addressed well at the same time. In this article, we investigate the trade-off between energy consumption and latency and formulate them into a multi-objective optimization problem. By applying the single exponential smoothing method, we estimate the amount of data of next period and design two optimal sleep time controllers according to time scheduling model of network, so as to dynamically adjust the duty cycle of end node. Our controllers also consider the residual energy of end node. Finally, we propose two dynamic and adaptive medium access control algorithms for synchronous and asynchronous duty-cycled wireless sensor networks, respectively. We evaluate our protocols with different parameters and compare them with existing works. Performance results show that our proposed algorithms can balance power consumption among nodes and improve power efficiency while guaranteeing packet latency is minimized.
Keywords
Introduction
Wireless sensor networks (WSNs) always consist of hundreds of sensor nodes, which are often battery-operated and required to be alive for years after deployment. How to improve energy efficiency and prolong network lifetime becomes a challenging problem when designing medium access control (MAC) and routing algorithms.1,2 To do this, nodes can go to sleep and wake up to communicate with each other from sleep mode periodically, so they can shut down the radio and put themselves into ultra-low power state when in sleep mode. The network operated in this way is called duty-cycled WSNs. 3 In duty-cycled WSNs, if next hop is dormant, the forwarder needs to buffer packet until the receiver switches to active state. Therefore, hop-to-hop packet latency is increased due to the delayed transmission. So, duty cycle will significantly affect performances in terms of packet delay and energy consumption. Obviously, it is a trade-off between decreasing energy cost by lower duty cycle and reducing latency by higher one. Thus, these two problems of improving energy efficiency and reducing packet latency cannot be addressed well at the same time in duty-cycled WSNs, and how to control duty cycle is a determining factor to address them.
Many existing works have studied duty cycle control mechanism. Van Dam and Langendoen 4 and Yang et al. 5 adjust active time to control duty cycle, and other works6–10 change sleep time to do so. However, few works use fixed and preconfigured duty cycle according to requirement of latency or energy, 11 and most existing works have designed dynamic duty cycle method based on network conditions or application requirements, such as traffic load change, network congestion, or quality-of-service (QoS) requirement.4–6,8,12–14
Actually, in many applications of WSNs, traffic load always varies with certain regularity. For example, (1) in smart home sensor network, network packet will increase when somebody walks in a living room or does the cooking in the kitchen, but it may decrease when all family members go out or go to bed in the middle of the night. (2) In sensor network of vehicles and loads, traffic load always varies periodically. It will become high when a street is in heavy traffic during rush hours and becomes light when no car passes by. Consequently, it is very important to design a dynamic sleep time control scheme based on traffic load, so as to balance power consumption with time delay. That is, minimize packet latency while improving energy efficiency.
In this work, we focus on cluster-tree topology network. Figure 1 shows three application scenarios of our work: linear green belt, greenhouse, and smart office. In these applications, there exist two types of device from the perspective of energy supply, namely, battery-powered and AC adapter–powered devices. For example, lights and switches are always connected to AC adapter, so their power can be considered unlimited. Other devices are all equipped with primary or rechargeable battery, such as solar sensor, temperature/humidity sensor, wearable device, rolling blind controller, and water spray. These devices should operate in an energy-saving manner.

Application scenarios.
Figure 2 demonstrates the corresponding network topology. In these applications, the AC adapter–powered devices can be selected as routers to forward packets without sleep, and routers can communicate with each other. For energy saving, battery-powered devices act as end nodes, which must connect to a router, and switch to sleep mode periodically. As showed in Figure 2, routers and end nodes are colored in red and green, respectively. Consequently, all the nodes are connected as a cluster-tree topology network.

Network topology of applications.
The main contributions of this article include the following:
We exploit traffic prediction model to forecast traffic load. Traffic load is a major consideration to adjust duty cycle by dynamically controlling sleep time of a cycle. We also consider residual energy of end nodes to optimize energy consumption, then prolong network lifetime as long as possible.
The optimal sleep time controller is theoretically analyzed to trade-off latency and energy consumption, that is, latency is minimized while guaranteeing energy efficiency is improved.
We propose a traffic prediction–based MAC algorithm for synchronous duty-cycled WSNs (TPMAC-S) and further improve it for asynchronous network (TPMAC-A).
The remainder of this article are organized as follows: section “Related works” introduces the related works. Section “Adaptive sleep time controller for synchronous network” describes traffic prediction model and the energy-latency problem, then designs an optimal controller to address this problem. Section “Improved sleep time controller for asynchronous network” gives an improved controller for asynchronous scheduling model. The performances of our controllers are evaluated and compared with existing duty-cycled MAC protocols in Section “Performance evaluation.” Finally, the conclusions and future directions are drawn in section “Conclusion.”
Related works
In recent years, many research works have been explored to develop power-saving methods for WSNs.4,11,13–20 Traditional best-path energy-efficient routing protocols2,15,16 are proposed to find minimum energy path from source node to destination to optimize energy consumption. These protocols require additional route maintenance and topology information of whole network, which may cause excessive control message cost. Luo et al. 17 introduce an opportunistic routing method (ENS_OR) to select optimal relay node for power saving. In ENS_OR, the optimal transmission range is analyzed, and relay node of next hop is calculated based on residual energy of neighbors within transmission range. Besides, energy efficiency is also considered in MAC protocols.4,11,13,14,18–20 Sensor MAC (SMAC) 11 periodically puts nodes in active and sleep periods. The duty cycle is set to a low value of all nodes, so it does not adapt to network traffic change. In order to improve the fixed duty cycle of SMAC, timeout MAC (TMAC) 4 uses an adaptive duty cycle scheme by means of adjusting the duration of active periods, that is, if there is no packet transmitting for a certain time, TMAC can switch to sleep mode before the active period ends. Therefore, power consumption can be further reduced. Wang et al. 20 propose a framework for distributed duty-cycling protocol design under different traffic patterns. The framework incorporates the awake time and traffic pattern to reduce energy consumption. Many other algorithms for duty-cycled WSNs are also proposed to optimize energy usage, but packet latency is not taken into account in all these works.
Since latency is another key factor for time-sensitive applications, Xiao et al. 21 and Mao et al. 22 introduce utility-based methods to reduce latency for low-duty cycle WSNs, and many existing works have been proposed to study trade-off between power consumption and packet latency.5,8–10,12,23–32 Luo et al. 23 and Ghadimi et al. 24 use opportunistic routing to address these two problems. Yang et al. 5 introduce U-MAC, which balances these two problems by utilization based tuning of duty cycle and selective sleeping after transmission. U-MAC calculates “utilization function” according to the ratio of the actual transmission and reception performed by a node over the whole active period, which reflects the traffic load change of the node. Furthermore, compared with SMAC, U-MAC reduces idle listening by avoiding unnecessary scheduled listening in sleep period. DutyCon 12 designs a feedback scheme to control the duty cycle. In DutyCon, end-to-end delay is guaranteed while achieving energy efficiency. To do so, DutyCon decomposes the end-to-end requirement problem into a set of single-hop delay requirement problem. Byun and Yu 8 propose another duty cycle control-based approach through a queue management. They design a feedback controller which dynamically adjusts sleep time according to the traffic change by constraining the queue length at a predetermined value. However, the queue length threshold must be predefined and fixed to a value according to application requirement, so it cannot address energy-latency problem very well during network running.
Moreover, we can utilize residual energy to improve performance in design of MAC and routing method of WSNs.6,17,23,33–36 Except for Luo et al.,17,23 Vazifehdan et al. 34 consider the energy consumption and the remaining battery energy of nodes as well as quality of links to find energy-efficient and reliable routes that increase the operational lifetime of the network. Naderi et al. 35 provide an analytical framework providing closed-form expressions for residual energy and lifetime prediction of wireless sensor nodes. To our best knowledge, existing duty-cycled MAC algorithms do not consider residual energy to optimize latency and energy efficiency.
In our work, we exploit a network traffic load prediction model and theoretically optimize the sleep time according to: (1) estimated packets of next period and (2) residual energy of nodes. To be specific, when traffic is predicted heavier, nodes will reduce sleep time and increase duty cycle, resulting in lower average packet delay but higher power consumption. On the contrary, as traffic load becomes lighter, nodes will increase sleep time to improve energy efficiency. Furthermore, residual energy is also taken into account to balance energy consumption among nodes.
Adaptive sleep time controller for synchronous network
As illustrated in Figure 2, AC adapter–powered devices act as routers, so we assume unlimited energy resources for routers. Therefore, this work focuses on studying the power consumption of end nodes. Besides, since router can keep active to perform real-time transmitting, end-to-end packet latency will be mainly caused by the hop between router and end nodes. Furthermore, end node can awaken itself to send packet to router at any time, but a router cannot forward packets to end node until it switches to active state. Thus, latency will mainly result from packet relay to end nodes. Therefore, this work investigates the energy-latency problem of the hop from router to end nodes.
Energy-latency problem
The synchronous duty-cycled scheduling model between router and end nodes is illustrated in Figure 3. All nodes must wake up simultaneously but have different sleep times. There are three time slots in each sleep/active cycle: beacon, active, and idle. In beacon period, router will notify which node must keep listening and receive packets during coming active period and how long can nodes keep dormant during idle slot. In active period, router sends packets to nodes one by one according to receiving priority, which depends on residual energy of receivers. A node will go to sleep once its own data are completely received, or there is no data to receive in this cycle. In idle period, all nodes switch to sleep mode except router. Router can receive and buffer packets during idle period, then send data to end nodes in next active period.

Synchronous duty-cycled scheduling model (
Since energy consumption in sleep mode is much less than in active mode,
37
node should keep asleep as long as possible to reduce power consumption. It means that we should prolong
Traffic prediction model
Since network traffic always changes in one way or another, in this article, we use single exponential smoothing method for traffic prediction. Single exponential smoothing method can consider all the historical data, and its calculation is relatively small, which is suitable for resource restricted WSNs. For any time period
where
On the basis of traffic prediction, we try to let duty cycle be closely related to the number of packets, by dynamically controlling idle slot time on the basis of predicted amount of data of next cycle. By this way, sleep slot will be extended when the amount of coming packet reduces; conversely, it will be shortened when traffic packet number increases. Therefore, node can sleep longer if network is idle and transmit packets in time if traffic load is heavy.
Optimal sleep time controller
Theorem 1
In duty-cycled WSNs, let the average power consumption of nodes in beacon, active, and idle slot be
where
Proof
As discussed above, consumed power of period
Obviously, in order to prolong node’s lifetime, we should minimize the value of
where
This global minimum/maximum can be deduced as follows
Then, we take the second derivative of
Since power consumption of beacon slot and active slot are greater than that of idle slot, namely,
Stability analysis of controller
We analyze the system stability of our proposed sleep time controller in case of variable of
Thus, the parameter
Equation (10) means that the value of
Dynamic traffic prediction–based MAC algorithm for synchronous network
According to Theorem 1, the sleep time of a cycle can be dynamically set by predicted amount of data of next period. Moreover, in our work, router sends packets to end nodes one by one in the prioritization of receiver’s residual energy. That is, the node with less residual energy has higher priority to receive data, then enters sleep mode prior to the other nodes. Therefore, nodes with less residual energy will reduce idle listening and have less power consumption. This is good for energy balance among nodes in the network. On the basis of the analysis above, we design an energy-latency trade-off optimization algorithm for synchronous scheduling duty cycle WSNs, called traffic prediction MAC (TPMAC-S). Algorithm 1 depicts the pseudocode of TPMAC-S. In Algorithm 1, router calculates
Improved sleep time controller for asynchronous network
In this section, we consider that end nodes wake up asynchronously and each node can adjust sleep time according to its own traffic conditions. WSNs always consist of several different types of end nodes, which always have different traffic patterns even in the same period. For example, environmental sensors collect and transmit message periodically, so their data rate is slow and packet size is small. Traffic of motion sensors is relative to movements, which is generated more randomly, or may be silent in the night. Furthermore, since node in WSNs is always composed of sensor/actuator and radio frequency, nodes with the same radio module will consume different power due to different sensor/actuator modules. So, different types of nodes may have different power consumption models. Asynchronous scheduling can overcome the differences among nodes in terms of traffic conditions and power usage pattern, then further adapt to traffic change and residual energy of each node separately.
Furthermore, if the upper limit on latency of some nodes is important, we should set a maximum of sleep time, or a minimum of duty cycle. For synchronous network, all end nodes that belong to the same router must be restricted. However, for synchronous network, we can set the limit only for these given nodes. Obviously, this is good for energy saving.
Figure 4 shows the asynchronous duty-cycled scheduling model. Compared with synchronous scheduling in Figure 3, beacon slot of all end nodes is separated, and router must send beacon packet and handshake with each node individually. To do this, router can set a timer for each node, then form a timer list in its schedule task. Therefore, router becomes busier in asynchronous scheduling network.

Asynchronous duty-cycled scheduling model.
We let residual energy of node
As deduced in sections “Optimal sleep time controller” and “Stability analysis of controller,” we can also get the optimal sleep time controller of node
where
We also propose an optimal sleep time–controlled MAC algorithm for asynchronous scheduling duty cycle WSNs (TPMAC-A). The pseudocode of TPMAC-A is depicted in Algorithm 2. Scheduling routine and control method of TPMAC-A are quite different to TPMAC-S.
Performance evaluation
To fully analyze the performance of our proposed controller, we first study the impact of smoothing factor under constantly changing traffic load. Then, we evaluate TPMAC-S under different values of smoothing factor
Performance metrics
In this work, we define five measurable metrics to evaluate the effectiveness of our algorithms. For the sake of clarity and convenience for the readers, we give the notations of this metrics to be used throughout section “Performance evaluation”:
Average queue length: this metric reflects the average number of packet buffered in the router over all cycles.
Average latency: this metric is the average value of relay time of all packets forwarded to all nodes. Relay time is the time difference from a packet arrival at the router to successful reception by the destination, which includes buffer time and transmitting time.
Average duty cycle: we use this metric to study the relationship between duty cycle and power consumption of all end nodes.
Average energy consumption: this metric is defined as the total energy consumption of whole network times run time and number of nodes, which represents the energy efficiency of the network.
Variance of residual energy: it reflects dispersion of residual energy of all nodes, which represents the balance and fairness of power usage.
Experiment settings
We conduct the simulation experiment using MATLAB with one router and 10 end nodes. We set the transmitting, receiving/listening, and sleeping power to 24.75 mW, 13.5 mW and 15 µW, respectively, which are the same with U-MAC and protocol in Byun and Yu.
8
Simulation parameters.
Impact of smoothing factor in prediction model
First, we evaluate the impact of smoothing factor
Figure 5 shows the prediction performance results of the first 80 cycles. Figure 5(a) illustrates the predicted value under different

Prediction results with different smoothing factors: (a) predicted number of packets versus actual one and (b) prediction error.
Second, we evaluate the impact of smoothing factor on performance of latency and energy consumption for TPMAC-S. The results are demonstrated in Figure 6. To view the situation as a whole, latency and energy consumption will both increase with the increase in the packet arrival rate under any value of

Evaluation results with different smoothing factor for TPMAC-S: (a) average latency and (b) average energy consumption.
On the basis of the study of
Impact of weighting factor on the controller
According to equations (11) and (14),
From equations (5) and (11), we can trade-off the performance between energy and latency with different weighting factor

Evaluation results with different γ for TPMAC-S: (a) average latency and (b) average energy consumption.
Comparison
To show the effectiveness of our proposed scheme, we compare it with two existing algorithms, U-MAC and protocol in Byun and Yu. 8 We evaluate average performance in terms of queue length, latency, duty cycle, and energy consumption. Furthermore, variance of residual energy is also investigated to analyze the balance and fairness of power usage.
Since one hop performance is important in our scope of applicability discussed above, the topology used to evaluate our proposed scheme is a single-hop network topology, which is also studied in Byun and Yu. 8 A router and 10 end nodes are deployed in the network, and router forwards packets to end nodes.
Some parameters used for comparison are given in section “Experiment settings.” On the basis of the analysis in sections “Impact of smoothing factor in prediction model” and “Impact of weighting factor on the controller,” we set
Figure 8 shows the average queue length under different packet arrival rates. Figure 8(b) is the local enlarged view of Figure 8(a) to illustrate the difference between TPMAC with U-MAC. When the average packet arrival rate is below 5 packets per second, all the four protocols keep the queue length at a small value. However, queue length of them increases as traffic load becomes heavy and that of algorithm in Byun and Yu 8 increases rapidly when packets arrive at the rate of greater than 100 packets per second. But average queue length of our proposed algorithms increases much slower than that of U-MAC and algorithm in Byun and Yu. 8 This is because, U-MAC sets a maximum duty cycle threshold and adjusts duty cycle according to the last period rather than the overall trend of traffic change, and the controller of algorithm in Byun and Yu 8 adjusts sleep time slowly under selected certain control parameters and iteration time. But our proposed algorithm can predict traffic change and relatively adjust the sleep time in a timely manner.

Average queue length: (a) full view and (b) local enlarged view.
Figure 9 illustrates that the performance of average latency is similar to average queue length, that is, compared with U-MAC and proposed algorithms in our work, average latency of algorithm in Byun and Yu 8 increases rapidly when packet arrival rate is higher than 100 packets per second. This result coincides with that longer queue length will lead to longer packet latency. The average latency of our proposed algorithms keeps below 0.21 s as packet arrival rate increases up to 150 packets per second. We can conclude that our TPMAC-S and TPMAC-A can improve latency, especially when traffic load is heavy.

Average latency: (a) full view and (b) local enlarged view.
Furthermore, from Figures 8 and 9, average queue length of TPMAC-A is almost the same as TPMAC-S when packet arrival rate is lower than 100 packets per second. But average queue length and latency of TPMAC-A are little higher than those of TPMAC-S as packet reaches faster than 100 packets per second. The reason is that residual energy of each node will more discrete as data rate increases, which is forwarded to nodes randomly. Residual energy of some nodes will reduce rapidly, resulting in higher time delay. This is coincidence with our theoretical model in equation (14).
As showed in Figures 10 and 11, the average duty cycle and energy consumption of all the four algorithms increase as packet arrival rate increases. This is because, all the four algorithms can adapt to the increment of traffic load, then adjust duty cycle accordingly. Obviously, increment of the ratio of active time to sleep time will result in the increment of power consumption. However, as we can see from Figures 10 and 11, the duty cycle and energy consumption of our proposed algorithms increase slower than that of U-MAC and algorithm in Byun and Yu, 8 and our proposed methods have lower energy consumption than the other two algorithms when packet arrives more than 100 packets per second. When packet arrival rate is 150, The power consumption of U-MAC and algorithm in Byun and Yu 8 is about 0.01 W, but that of TPMAC-S and TPMAC-A is only 0.009 and 0.008 W, respectively.

Average duty cycle.

Average energy consumption.
We also note that TPMAC-A can further improve energy efficiency than TPMAC-S. Average duty cycle and energy consumption of TPMAC-A increase slower than those of TPMAC-S. The reason is, in TPMAC-S, the duty cycle of all nodes is controlled as a whole. So, duty cycle of each node is increased as network traffic becomes busier, even though there is no data for some nodes, resulting in idle listening for these nodes. The busier the network, the more overheard these nodes. On the contrary, idle listening will be avoided by TPMAC-A, which is attributed to the individual controller for each node.
In order to examine the balance of energy usage, the energy of all end nodes is initialized randomly from 0.2 to 1 J, and we evaluate the variance of residual energy of nodes. Figure 12 illustrates that the variance of residual energy of our proposed algorithms is reduced from 0.1 to lower than 0.065, but that of U-MAC and algorithm in Byun and Yu 8 still remains the value about 0.1 all the time. Furthermore, the variance of residual energy of our two proposed algorithms decreases as traffic load increases. It means the difference of residual energy is further reduced as network becomes busier. Besides, variance of residual energy of TPMAC-A decreases faster than that of TPMAC-S, because power of each node is individually considered in TPMAC-A. From these results, we conclude that our proposed algorithms can significantly improve the balance of energy usage among nodes.

Variance of residual energy.
In conclusion, the latency of TPMAC-S and TPMAC-A is shorter than that of U-MAC and algorithm in Byun and Yu, 8 meanwhile, the energy consumption can maintain a relatively low level when network load is lighter and keep lower than U-MAC and algorithm in Byun and Yu 8 as network load becomes heavier. Together with the balance of power usage in our protocols, we conclude that our protocols can reduce latency while minimizing power consumption, especially when network traffic becomes busier. Moreover, latency of TPMAC-A is a little higher than that of TPMAC-S, but power efficiency of TPMAC-A is further improved.
Conclusion
In this article, we focus on a specific cluster-tree topology network and study the energy-latency problem at the last hop from router to end node. We use a traffic prediction model to estimate packet number of next period and dynamically control sleep time according to network traffic condition for duty-cycled WSNs, so as to balance energy efficiency with packet time delay. We theoretically analyze the optimal sleep time and its stability, which takes residual energy of end node into consideration. Furthermore, we design an adaptive MAC algorithm for synchronous duty cycle (TPMAC-S) and an improved algorithm for asynchronous duty-cycled WSNs (TPMAC-A). The proposed algorithms are demonstrated to achieve desired latency and energy efficiency objectives.
In the future, we will use other packet predict models to evaluate our algorithm according to specific application requirements. We will also study the method to collect residual energy effectively and to solve prediction hysteresis problem, then do realistic scenario experiments to evaluate the performance. Furthermore, adaptive smoothing factor will also be studied if the traffic model is not known in advance.
Footnotes
Acknowledgements
This paper was a revised and extended version of our work presented at the fourth International Conference on Information Science and Control Engineering (ICISCE 2017). The authors wish to express their idea in more detail. More importantly, the derivation of the optimal controller is given and stability is theoretically analyzed, and the algorithm is improved for synchronous and asynchronous duty-cycled wireless sensor networks (WSNs). Residual energy of end nodes is considered in this work. Experiments are also extended.
Handling Editor: Yee Wei v
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by Fujian provincial leading project (grant no: 2017H0029); the project from the Fuzhou Science and Technology Plan (grant nos: 2015-G-52 and 2016-S-116), the Scientific Research Program of Outstanding Young Talents in Universities of Fujian Province; the Key Project of Natural Foundation for Young in Colleges of Fujian Province (grant no: JZ160466); and the Scientific Research Project from Minjiang University (grant no: MYK16001).
