Research Article
Optimal sleep time controller based on traffic prediction and residual energy in duty-cycled wireless sensor networks
International Journal of Distributed Sensor Networks 2017, Vol. 13(12) Ó The Author(s) 2017 DOI: 10.1177/1550147717748909 journals.sagepub.com/home/dsn
Haibo Luo1,2,3, Minghua He1, Zhiqiang Ruan2,3 and Xiaxia Zeng2,3
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 Duty-cycled wireless sensor networks, sleep time controller, energy efficiency, latency, residual energy
Date received: 17 May 2017; accepted: 14 November 2017 Handling Editor: Yee Wei v
Introduction Wireless sensor networks (WSNs) always consist of hundreds of sensor nodes, which are often batteryoperated 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 tradeoff 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. 1
College of Physics and Information Engineering, Fuzhou University, Fuzhou, China 2 Department of Computer Science, Minjiang University, Fuzhou, China 3 Fujian Provincial Key Laboratory of Information Processing and Intelligent Control, Minjiang University, Fuzhou, China Corresponding author: Haibo Luo, College of Physics and Information Engineering, Fuzhou University, No. 2 Xueyuan Road, Fuzhou 350108, China. Email:
[email protected]
Creative Commons CC BY: This article is distributed under the terms of the Creative Commons Attribution 4.0 License (http://www.creativecommons.org/licenses/by/4.0/) which permits any use, reproduction and distribution of the work without further permission provided the original work is attributed as specified on the SAGE and Open Access pages (http://www.uk.sagepub.com/aboutus/ openaccess.htm).
2
International Journal of Distributed Sensor Networks
Figure 1. Application scenarios.
Figure 2. Network topology of applications.
Many existing works have studied duty cycle control mechanism. Van Dam and Langendoen4 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. 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
Luo et al. 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. The main contributions of this article include the following: 1.
2.
3.
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
3 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 dutycycling 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. DutyCon12 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-toend requirement problem into a set of single-hop delay requirement problem. Byun and Yu8 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
4 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, endto-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. 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 t3 period time. However, all packets arrived during idle slot (t3 ) can only be forwarded to
International Journal of Distributed Sensor Networks
Figure 3. Synchronous duty-cycled scheduling model (t1 : beacon, t2 : active, and t3 : idle).
destination in next active slot, so longer sleep time will result in longer packet latency, and the more the data buffered during t3 , the longer the average time delay. Obviously, requirements of power-saving and latency cannot be satisfied at the same time in duty-cycled WSNs, and a fixed value of sleep time cannot address them well. However, if we can forecast the amount of data in the near future, then we can control sleep time according to it. We shorten sleep time to reduce average latency when network traffic is predicted heavier. Otherwise, we prolong sleep time to improve energy efficiency when network traffic is predicted lighter.
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 ^ i + 1 is found by period i + 1, the smoothed value D computing38 ^ i + 1 = aDi + ð1 aÞD ^i D
ð1Þ
^ i + 1 denotes predicted number of packet during where D ^ i + 1 is calculated by both of predicted Ti + 1 period. D ^ i ) and actual value (Di ) of Ti period. a is the value (D smoothing factor that satisfies 0\a\1. This model can be applied to transmission transactions that have a certain pattern to follow. Continual and drastic traffic change may lead to huge estimated error. Furthermore, theoretically, bigger a can adapt to traffic change more quickly, but it is apt to ignore history patterns. Thus, a proper a should be set based on application traffic scenarios. 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
Luo et al.
5
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.
Theorem 1. In duty-cycled WSNs, let the average power consumption of nodes in beacon, active, and idle slot be PR , PA , and PS , respectively. If we optimize the balance between energy consumption and packet time delay, then the value of sleep time must satisfy 2½ti1 ðPR PS Þ + ti2 ðPA PS Þ ti3 = ^i+1 gD
1=2 (ti1 + ti2 ) ð2Þ
where g is a parameter to coordinate energy efficiency with latency. Proof. As discussed above, consumed power of period Ti in Figure 3 is P ð Ti Þ =
ti1 PR + ti2 PA + ti3 PS ti1 + ti2 + ti3
ð3Þ
Obviously, in order to prolong node’s lifetime, we should minimize the value of P(Ti ). However, the amount of data arrived during idle slot (ti3 ) is predicted ^ i + 1 according to equation (1).We suppose that as D packets arrive in a uniform distribution during ti3 period, so the latency weighted by these data packets can be deduced as equation (4) ^i+1 ^ i + 1 = ti3 D L D 2
ð4Þ
^ i + 1 ) should also be minimized to improve perforL(D mance of average time delay. To minimize P(Ti ) and ^ i + 1 ) at the same time, we exploit a multi-objective L(D optimization method to address these two problems, and we propose the optimal objective function with respect to ti3 as follows ^ i + 1 = ti1 PR + ti2 PA + ti3 PS f min ðti3 Þ = PðTi Þ + gL D ti1 + ti2 + ti3 ti3 ^ + g Di + 1 ð5Þ 2
where g(g.0) is a weighting factor to coordinate the energy efficiency and latency. To minimize f min (ti3 ), we take the first derivative of f min (ti3 ) with respect to ti3 as shown in equation (6)
ð6Þ
This global minimum/maximum can be deduced as follows
Optimal sleep time controller
ti1 ðPS PR Þ + ti2 ðPS PA Þ ∂f min ðti3 Þ ∂ti3 = ðti1 + ti2 + ti3 Þ2 ^i+1 gD =0 + 2
2½ti1 ðPR PS Þ + ti2 ðPA PS Þ ðti3 Þop = ^i+1 gD
1=2 ðti1 + ti2 Þ ð7Þ
Then, we take the second derivative of f min (ti3 ) with respect to ti3 as shown in equation (8) 2½ti1 ðPR PS Þ + ti2 ðPA PS Þ ∂2 f min ðti3 Þ ∂ti3 2 = ðti1 + ti2 + ti3 Þ3
ð8Þ
Since power consumption of beacon slot and active slot are greater than that of idle slot, namely, PR .PS and PA .PS , so we obtain ∂2 f min (ti3 )=∂ti3 2 .0, and equation (7) is the global minimum with respect to equation (5). Therefore, the optimal sleep time controller can be given by equation (2), and the proof of Theorem 1 is finished.
Stability analysis of controller We analyze the system stability of our proposed sleep ^ i + 1 . The time controller in case of variable of g and D sleep time of a cycle period must be greater than zero, then we have ðti3 Þop =
1 2½ti1 ðPR PS Þ + ti2 ðPA PS Þ 2 ðti1 + ti2 Þ.0 ^i+1 gD
ð9Þ
Thus, the parameter g must satisfy the following relationship g\
2½ti1 ðPR PS Þ + ti2 ðPA PS Þ ^i+1 ðti1 + ti2 Þ2 3 D
ð10Þ
Equation (10) means that the value of g should be small enough to make sleep time controller stable. In equation (10), all the parameters are predefined except ^ i + 1 , and the maximum value of g will become smaller D ^ i + 1 becomes bigger. Thus, we should set a maxwhen D ^ i + 1 (Dmax ) to obtain the upper limit imum threshold of D on g. However, if there is no data transmission in the ^ i + 1 ! 0 and ti3 ! ‘. network for a long time, then D In such a case, the end node keeps asleep permanently without beacon listening, then it will be disconnected from its router. Therefore, we should also set up a mini^ i + 1 (Dmin ) to avoid limitless of sleep mum threshold of D
6
International Journal of Distributed Sensor Networks
Algorithm 1. TPMAC-S Input: address list of buffered packets (Alist ), time stamp for time synchronization (Tstamp ), residual energy of receivers (REn ). Output: optimal sleep time (ti3 ), and transmitting scheduling. Event: a router receives, buffers and relays packets to end nodes in Ti period. ^ i+1 ^i 1. D aDi + ð1 aÞD ^ i+1\Dmin : D ^ i+1 = Dmin . 2. if D ^ i+1 .Dmax : D ^ i+1 = Dmax . 3. if D n o1=2 2½ti1 ðPR PS Þ + ti2 ðPA PS Þ ðti1 +ti2 Þ: 4. ti3 ^ gD i+1
5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16.
router broadcasts beacon to end nodes, Tstamp and ti3 are attached. for each node n, receives and extracts beacon, then do: time synchronization, starts timer Tnext = ti2+ti3. end for router transmits packets based on the order of REn . for each node n, do if n 2 Alist , then keep listening until packets are received. else go to sleep until Tnext time out. end if end for
time. Only by this way can nodes switch to work after a certain time even if there is no traffic in the network. Moreover, we can use Dmin to set the upper limit on latency. In conclusion, the optimal sleep time of our controller is
2½ti1 ðPR PS Þ + ti2 ðPA PS Þ ti3 = ^i+1 gD ^ i + 1 2 ½Dmin , Dmax s:t: D g2
0,
1=2 (ti1 + ti2 )
! 2½ti1 ðPR PS Þ + ti2 ðPA PS Þ ðti1 + ti2 Þ2 3 Dmax ð11Þ
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 tradeoff optimization algorithm for synchronous scheduling duty cycle WSNs, called traffic prediction MAC (TPMAC-S). Algorithm 1 depicts the pseudocode of ^ i + 1 and TPMAC-S. In Algorithm 1, router calculates D ti3 . The for-loop in lines 6–8 and lines 10–16 are
^ i + 1 and ti3 are operated by each end node separately. D calculated only once during each cycle, so the time complexity of TPMAC-S is O(1).
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.
Luo et al.
7 As deduced in sections ‘‘Optimal sleep time controller’’ and ‘‘Stability analysis of controller,’’ we can also get the optimal sleep time controller of node n ðti3 Þn =
2½ti1 ðPR PS Þ + ti2 ðPA PS Þ 1=2 (ti1 + ti2 ) ^ i + 1 REn gD
^ i + 1 2 ½Dmin , Dmax s:t: D g2
Figure 4. Asynchronous duty-cycled scheduling model.
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. We let residual energy of node n be REn , and its power consumed during period Ti is Pn (Ti ). Then, the remaining lifetime of this node can be expressed as c Tn = REn =Pn ðTi Þ
ð12Þ
c Tn is the evaluated survival time if node n operates at power Pn (Ti ). For each node n, Pn (Ti ) is calculated as equation (3). Obviously, c Tn must be maximized to extend lifetime. Besides, in consideration of average ^ i + 1 ) in equation (4), we formulate a packet latency L(D multi-object optimization function as follows ^ i + 1 = ti1 PR + ti2 PA + ti3 PS gnmin ðti3 Þ = 1=c Tn + gL D ðti1 + ti2 + ti3 ÞREn ti3 ^ + g Di + 1 ð13Þ 2
0,
! 2½ti1 ðPR PS Þ + ti2 ðPA PS Þ ðti1 + ti2 Þ2 3 Dmax 3 IEn ð14Þ
where IEn denotes initial energy of node n and satisfies IEn REn . In asynchronous scheduling duty-cycled WSNs, if a node is equipped with inexhaustible power resource, then we can let REn = IEn ! ‘, so we have (ti3 )n ! 0. This means this node can always be in active state, and there is no need for router to send beacon for it. Thus, latency of this type of node will be significantly reduced by our proposed controller in equation (14). More importantly, we can select different values of g and a for some specific nodes to meet QoS requirements. 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 differ^ i + 1 and ti3 must be calculated for ent to TPMAC-S. D each node individually, thus the time complexity of TPMAC-A is OðnÞ.
Performance evaluation To fully analyze the performance of our proposed controller, we first study the impact of smoothing factor
Algorithm 2. TPMAC-A Input: address list of buffered packets (Alist ), time stamp for time synchronization (Tstamp ), residual energy of each node (REn ). Output: optimal sleep time of each node (ðti3 Þn ), and transmitting scheduling. Event: a router receives, buffers and relays packets to end nodes. 1. for each node n, if it is in its beacon slot, do ^ ^i + 1 a (D ) + ð 1 a Þ D 2. D n i n i n n n ^ i + 1 \Dmin : D ^ i + 1 = Dmin . 3. if D n n ^ i + 1 .Dmax : D ^ i + 1 = Dmax . 4. if D n n 1=2 2½ti1 ðPR PS Þ + ti2 ðPA PS Þ 5. (ti3 )n ðti1 + ti2 Þ: ^ i + 1 Þ REn g ðD n 6. router broadcasts beacon to end nodes, Tstamp and (ti3 )n are attached. 7. time synchronization, starts timer ðTnext Þn = ti2 + (ti3 )n. 8. if n 2 Alist , then 9. keep listening until packets are received. 10. else 11. go to sleep until ðTnext Þn time out 12. end for
8
International Journal of Distributed Sensor Networks
Experiment settings
Table 1. Simulation parameters. Parameters
Value
Size of a beacon Size of a packet Data rate ti1 ti2 Initial energy of nodes (IEn )
8 bytes 100 bytes 20 kbps 8*8/200 kbps = 0.32 ms 10 ms 1J
under constantly changing traffic load. Then, we evaluate TPMAC-S under different values of smoothing factor (a) and weighting factor (g). Finally, we compare TPMAC-S and TPMAC-A with U-MAC and algorithm in Byun and Yu,8 because they are similar to our proposed scheme in various duty cycles. U-MAC is a well-known duty cycle–controlled MAC. It fixes scheduling iteration but adjusts duty cycle of each node according to their own calculated utilization, which reflects different traffic loads. The protocol in Byun and Yu8 is a new approach that adjusts sleep time according to queue length of a relay node. To do this, it designs a feedback controller, which adapts sleep time to traffic change, and the active time is fixed to a certain value.
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’’: 1.
2.
3.
4.
5.
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.
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 mW, respectively, which are the same with U-MAC and protocol in Byun and Yu.8 Dmin and Dmax of our controller is 1 packet and 50 packets. Our experiment runs for 100 s totally. In order to change traffic load, packets are alternately generated more or less in 250 rounds. Furthermore, we assume that packet arrives in uniform distribution and only three nodes are randomly selected as the destinations during each cycle. The average packet arrival rate increases from 10 to 150. Other simulation parameters are listed in Table 1.
Impact of smoothing factor in prediction model First, we evaluate the impact of smoothing factor (a) in terms of prediction accuracy and prediction error. As our application scenario concerned, we let packets randomly generated for each scheduling cycle, but the upper limit on packets is varied periodically. To do this, we set 250 cycles in total. In each cycle, the number of packet is random from one to the upper limit value. More specifically, the upper limit on packet of every 10 cycles is set to alternate between 150 and 450, that is, the upper limit on packet from cycle 1 to 10 is 150, but that is 450 from cycle 11 to 20, and so on. Figure 5 shows the prediction performance results of the first 80 cycles. Figure 5(a) illustrates the predicted value under different a values versus actual generated packets, and Figure 5(b) demonstrates the prediction error, which is calculated by prediction value minus actual one. From Figure 5(a), we can see that actual number of packets are randomly changed from 0 to 450 and will increase or decrease every 10 cycles. Besides, greater a can better adapt to traffic change. The value and the trend are the closest to actual one when a is 0.7. There exists prediction hysteresis of all a, and the greater the value of a, the smaller the hysteresis. However, from Figure 5(b), the prediction error of all a is around zero, but it will increase sharply when traffic changes rapidly, which results from prediction hysteresis. Furthermore, prediction error is smaller with a greater a, but hysteresis error of a greater a has greater magnitude of error than that of a smaller a. In conclusion, we should select a proper smoothing factor to improve prediction accuracy and meet application requirements. 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
Luo et al.
9
Figure 5. Prediction results with different smoothing factors: (a) predicted number of packets versus actual one and (b) prediction error.
packet arrival rate under any value of a. When packet arrival rate is fixed to a certain value, greater value of a will increase power consumption but reduces time delay. Moreover, average latency is far greater than others when a = 0:01, but its energy consumption is relatively far lower than other values of a. However, the difference between two adjacent a becomes narrower as a becomes higher. These results coincide with the prediction model, that is, higher a will better follow traffic change; when network load becomes higher, packet number of each cycle changes rapidly, then a higher a will adapt to it and result in reduction of latency and increment of power expenditure. On the basis of the study of a, we can select a proper value according to traffic model and application requirement. However, if the traffic and its variation are not known in advance, we should set a relatively higher a for latency or a relatively lower a for energy saving. Besides, router can record the traffic situation within a certain period of time, then adapt a to meet requirements.
Impact of weighting factor on the controller According to equations (11) and (14), IEn = 1 J, then we can obtain g 2 (0, (2½ti1 (PR PS ) + ti2 (PA PS ))= ((ti1 + ti2 )2 3 Dmax )) = (0, 0:0063) for both of TPMACS and TPMAC-A. We select the value of g from 0.001 to 0.006 to evaluate the impact of g on the controller. From equations (5) and (11), we can trade-off the performance between energy and latency with different weighting factor (g) values. In this section, we evaluate the influence of weighting factor to the synchronous controller performance in terms of latency and energy consumption, which is illustrated in Figure 7. From
Figure 7(a) and (b), we can see that higher value of g is good for latency, but it is bad for energy consumption. The reason is, g in function f min (ti3 ) is added to time side to construct the energy-latency multi-objective optimization function. We also notice that the gap between two adjacent curve becomes narrower when g becomes higher.
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 a = 0:3 and g = 0:005 of our controller. For U-MAC, the maximum and minimum duty cycle thresholds are set to 80% and 10%, respectively. The increment and decrement duty cycle amounts are set to 5%. The thresholds of high traffic load and low traffic load are set to 0.3 and 0.1, respectively. For protocol in Byun and Yu,8 the time period of duty cycle control is set to 0.4 s, and the active time period is set
10
International Journal of Distributed Sensor Networks
Figure 6. Evaluation results with different smoothing factor for TPMAC-S: (a) average latency and (b) average energy consumption.
Figure 7. Evaluation results with different g for TPMAC-S: (a) average latency and (b) average energy consumption.
to 0.01 s. We set b = 0:0005 and g = 0:001 in its controller. Accordingly, each node successfully transmits one packet to router during every active period. These parameters are set as the same as Byun and Yu.8 Besides, All nodes are initialized as 20% duty cycle for our algorithm and the other two compared one. Packets are generated in uniform distribution and average arrival rate is varied to study the impact of traffic load. Each point in the graphs represents an average of 1000 iterations. 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 Yu8 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 Yu8 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.
Luo et al.
11
Figure 8. Average queue length: (a) full view and (b) local enlarged view.
Figure 9. Average latency: (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 Yu8 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. 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
12
Figure 10. Average duty cycle.
Figure 11. Average energy consumption.
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 Yu8 is about 0.01 W, but that of TPMAC-S and TPMAC-A is only 0.009 and 0.008 W, respectively. 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.
International Journal of Distributed Sensor Networks
Figure 12. Variance of residual energy.
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 Yu8 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. 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 Yu8 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
Luo et al. 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. 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.
13
2.
3.
4.
5.
6.
7.
8.
9.
10.
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).
References 1. Verma A, Singh MP, Singh JP, et al. Survey of MAC protocol for wireless sensor networks. In: Proceedings of
11.
12.
13.
14.
15.
second international conference on advances in computing and communication engineering, Dehradun, India, 1–2 May 2015, pp.92–97. New York: IEEE. Pantazis NA, Nikolidakis SA and Vergados DD. Energy-efficient routing protocols in wireless sensor networks: a survey. IEEE Commun Surv Tut 2013; 15(2): 551–591. Carrano RC, Passos D, Magalhaes LCS, et al. Survey and taxonomy of duty cycling mechanisms in wireless sensor networks. IEEE Commun Surv Tut 2014; 16(1): 181–194. Van Dam T and Langendoen K. An adaptive energyefficient MAC protocol for wireless sensor networks. In: Proceedings of international conference on embedded networked sensor systems, Los Angeles, CA, 5–7 November 2003, pp.171–180. New York: ACM. Yang SH, Tseng HW, Wu HK, et al. Utilization based duty cycle tuning MAC protocol for wireless sensor networks. In: Proceedings of IEEE GLOBECOM, St. Louis, MO, 28 November–2 December 2005, pp.3258–3262. New York: IEEE. Xie R, Liu A and Gao J. A residual energy aware schedule scheme for WSNs employing adjustable awake/sleep duty cycle. Wireless Pers Commun 2016; 90(4): 1859–1887. Shiokawa S and Chen D. Dynamic sleep control using location based clustering scheme in mobile sensor networks. Wireless Pers Commun 2016; 86(4): 1931–1946. Byun H and Yu J. Adaptive duty cycle control with queue management in wireless sensor networks. IEEE T Mobile Comput 2013; 12(6): 1214–1224. Aydin N, Karaca M and Ercetin O. Scheduling and power control for energy-optimality of low duty cycled sensor networks. Int J Distrib Sens N 2015; 11(5): 1–11. Ayele ED, Wen J, Ansar Z, et al. An adaptive sleep-time management model for wireless sensor networks. In: Proceedings of international conference on computer communications and networks, Las Vegas, NV, 3–6 August 2015, pp.1–7. New York: IEEE. Ye W, Heidemann J and Estrin D. An energy-efficient MAC protocol for wireless sensor networks. In: Proceedings of IEEE INFOCOM, New York, 23–27 June 2002, pp.1567–1576. New York: IEEE. Wang X, Wang X, Xing G, et al. Dynamic duty cycle control for end-to-end delay guarantees in wireless sensor networks. In: Proceedings of international workshop on quality of service, Beijing, China, 16–18 June 2010, pp.1– 9. New York: IEEE. Ghidini G and Das SK. An energy-efficient Markov chain-based randomized duty cycling scheme for wireless sensor networks. In: Proceedings of international conference on distributed computing systems, Minneapolis, MN, 21–24 June 2011, pp.67–76. New York: IEEE. Chan WHR, Zhang P, Nevat I, et al. Adaptive duty cycling in sensor networks with energy harvesting using continuous-time Markov chain and fluid models. IEEE J Sel Area Commun 2015; 33(12): 2687–2700. Pramanick M, Basak P, Chowdhury C, et al. Analysis of energy efficient wireless sensor networks routing schemes. In: Proceedings of international conference on emerging
14
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
International Journal of Distributed Sensor Networks applications of information technology, Kolkata, India, 19–21 December 2014, pp.379–384. New York: IEEE. Zhang D, Li G, Zheng K, et al. An energy-balanced routing method based on forward-aware factor for wireless sensor networks. IEEE T Ind Inform 2014; 10(1): 766–773. Luo J, Hu JY, Wu D, et al. Opportunistic routing algorithm for relay node selection in wireless sensor networks. IEEE T Ind Inform 2015; 11(1): 112–121. Toklu S and Ayhan Erdem O. BSC-MAC: energy efficiency in wireless sensor networks with base station control. Comput Netw 2014; 59(3): 91–100. Klaes M. Scheduling and power control for energyoptimality of low duty cycled sensor networks. Int J Distrib Sens N 2014; 2014(2): 8. Wang J, Cao Z, Mao X, et al. Sleep in the dins: insomnia therapy for duty-cycled sensor networks. In: Proceedings of IEEE INFOCOM, Toronto, ON, Canada, 27 April–2 May 2014, pp.1186–1194. New York: IEEE. Xiao M, Wu J and Huang L. Time-sensitive utility-based single-copy routing in low-duty-cycle wireless sensor networks. IEEE T Parall Distr 2015; 26(5): 1452–1465. Mao Y, Yves AJ and Xu F. Delay-bounded data forwarding in low-duty-cycle sensor networks. Intell Autom Soft Co 2012; 18(7): 795–806. Luo H, He M and Ruan Z. Time-aware and energyefficient opportunistic routing with residual energy collection in wireless sensor networks. Int J Commun Syst 2016; 30: e3231. Ghadimi E, Landsiedel O, Soldati P, et al. Opportunistic routing in low duty-cycle wireless sensor networks. ACM T Sensor Network 2016; 10(4): 1–67. Zhao YZ, Ma M and Miao CY. An energy-efficient and low-latency MAC protocol with adaptive scheduling for multi-hop wireless sensor networks. Comput Commun 2010; 33(12): 1452–1461. Tang H, Sun C, Liu Y, et al. Low-latency asynchronous duty-cycle MAC protocol for burst traffic in wireless sensor networks. In: Proceedings of international wireless communications and mobile computing conference, Sardinia, 1–5 July 2013, pp.412–417. New York: IEEE. Tong F, Zhang R and Pan J. One handshake can achieve more: an energy-efficient, practical pipelined data collection for duty-cycled sensor networks. IEEE Sens J 2016; 16(9): 3308–3322.
28. Li ZT, Chen Q, Zhu GM, et al. A low latency, energy efficient MAC protocol for wireless sensor networks. Int J Distrib Sens N 2015; 2015: 946587. 29. Xu L, Chen G, Cao J, et al. Optimizing energy efficiency for minimum latency broadcast in low-duty-cycle sensor networks. ACM T Sensor Network 2015; 11(4): 1–57. 30. Fan Z, Bai S, Wang S, et al. Delay-bounded transmission power control for low-duty-cycle sensor networks. IEEE T Wirel Commun 2015; 14(6): 3157–3170. 31. Wu S, Niu J, Cheng L, et al. Energy efficient flooding under minimum delay constraint in synchronous lowduty-cycle wireless sensor networks. In: Proceedings of IEEE computers, communications and IT applications conference, Beijing, China, 20–22 October 2015, pp.121–126. New York: IEEE. 32. Kim SC, Jeon JH and Kim JJ. Energy and delay efficient duty-cycle MAC protocol for multi-hop wireless sensor networks. Int J Multimed Ubiquitous Eng 2015; 10: 361–370. 33. Yoo H, Shim M and Kim D. Dynamic duty-cycle scheduling schemes for energy-harvesting wireless sensor networks. IEEE Commun Lett 2012; 16(2): 202–204. 34. Vazifehdan J, Prasad RV and Niemegeers I. Energy-efficient reliable routing considering residual energy in wireless ad hoc networks. IEEE T Mobile Comput 2014; 13(2): 434–447. 35. Naderi MY, Basagni S and Chowdhury KR. Modeling the residual energy and lifetime of energy harvesting sensor nodes. In: Proceedings of IEEE GLOBECOM, Anaheim, CA, 3–7 December 2012, pp.3394–3400. New York: IEEE. 36. Alkalbani AS and Mantoro T. Residual energy effects on wireless sensor networks (REE-WSN). In: Proceedings of international conference on informatics and computing, Mataram, Indonesia, 28–29 October 2016, pp.288–291. New York: IEEE. 37. Feeney LM. An energy consumption model for performance analysis of routing protocols for mobile ad hoc networks. Mobile Netw Appl 2001; 6(3): 239–249. 38. Chan KY, Dillon TS, Singh J, et al. Neural-networkbased models for short-term traffic flow forecasting using a hybrid exponential smoothing and Levenberg–Marquardt algorithm. IEEE T Intell Transp 2012; 13(2): 644–654.