AutoSync: Automatic Duty-Cycle Control for Synchronous Low-Power ...

3 downloads 324 Views 263KB Size Report
a X-MAC variant as the standard MAC protocol in TinyOS. LPL [6] reduces the idle ... Presentation of AutoSync implementation details, includ- ing its energy and timing ..... in terms of program memory was 4KB, 10KB, and 9KB for WiseMAC ...
AutoSync: Automatic Duty-Cycle Control for Synchronous Low-Power Listening Morten Tranberg Hansen

Branislav Kusy and Raja Jurdak

Koen Langendoen

Aarhus University Denmark

CSIRO ICT Centre Brisbane Australia

Delft University of Technology The Netherlands

Abstract—Low power listening (LPL) has been widely adopted to save energy in wireless sensor networks. However, LPL is ineffective in adapting to dynamic networks with asymmetric traffic patterns, as it sets a network-wide check interval. As a result, nodes with low data traffic waste significant energy resources doing idle listening. This problem is particularly exacerbated in multi-radio networks where majority of data comes through the most reliable radio and the duty cycles of other radios could be reduced. We address this issue in AutoSync, a protocol that combines synchronous LPL with automatic selection of check intervals to reduce energy consumption in both single and multi-radio networks. We first present the justification for AutoSync’s design, and we then discuss our implementation of AutoSync in TinyOS. We compare AutoSync against existing protocols in both simulations and empirical experiments. Results show that AutoSync attains a substantial increase in the operational lifetime and mean power consumption over existing protocols in single radio networks and even more in dual radio networks.

I. I NTRODUCTION Energy efficiency has been a driving force behind the development of sensor networks. As the radio is a major consumer of energy, a lot of work has been devoted on MAC protocols that duty cycle the radio to prolong the lifetime of the network. Of all proposed MACs, the class of LowPower Listening (LPL) protocols has gained wide adoption in the research community, primarily through the inclusion of a X-MAC variant as the standard MAC protocol in TinyOS. LPL [6] reduces the idle listening power consumption in sensor networks by enforcing long radio off times with periodic channel checks. Senders transmit for a longer time to ensure that the duty cycled receiver will detect their transmission. Much of the efficiency of LPL depends on selecting the correct check interval. An interval that is too short results in wasted energy, whereas a longer than necessary interval results in large delays and packet loss (queue overflows). A complicating factor is that LPL uses a single check interval (duty-cycle) throughout the network, which typically leads to over-provisioning in the case of dynamic networks with asymmetric traffic patterns (e.g., a converge-cast tree rooted at the sink). The check interval is set to match the traffic load at the busiest node, effectively wasting energy at all other nodes in the network. Robustness is a second concern for software developers as sensor networks are expected to operate out-of-the-box, for several years with minimal maintenance. The performance of

the wireless channel is known to be dependent on a number of unpredictable, time-varying environmental conditions. As such researchers have looked at deploying multiple radios per sensor node to enhance network reliability [11]. This, however, further exacerbates the inefficiency of static networkwide check intervals as often only one radio is used at a time and this wastes energy on other radio interfaces. We have developed AutoSync to handle the network asymmetry problem, induced by traffic patterns and radio diversity. It builds on the more energy efficient synchronous LPL protocols that synchronize senders to their respective receiver’s wakeup schedule allowing the usage of short preambles. The main contribution of AutoSync is to enable adaptive pernode setting of LPL check intervals in synchronous LPL. In doing so, nodes optimize their local power consumption as they adapt check intervals to the current data traffic. For senders to quickly re-establish synchronization after the check interval of a receiver is dynamically adapted, AutoSync sends preambles with exponentially increasing length until it receives an acknowledgment from the receiver. As changes to the check interval are usually small, this preamble exponential increase has proven to be very effective. AutoSync also addresses one of the main weaknesses of asynchronous adaptive LPL protocols (such as ZeroCal [13]). AutoSync dissociates the energy spent for packet transmissions from the length of LPL intervals. Nodes can thus select their LPL intervals just based on the observed reception packet rates, requiring less information sharing and considerably simpler LPL interval selection algorithm. Consequently, AutoSync is able to handle arbitrary traffic patterns and achieves higher energy efficiency due to its synchronous nature. To quantify the benefits of dynamically adapting the duty cycle of LPL protocols, we provide practical TinyOS implementations of four flavors of LPL: asynchronous vs. synchronous, and static vs. adaptive. These implementations have been used in a number of experiments, both in simulation (TOSSIM) and in a testbed. The results show that AutoSync outperforms the other protocols with an increase in network lifetime by 40% in single radio networks, and even more in dual radio networks, where AutoSync’s increase in network lifetime can grow to 50%. The paper makes the following contributions: • Proposal of AutoSync that automatically selects check intervals within a synchronous LPL layer, using an ex-

ponential preamble increase method for coping with LPL schedule changes. • Presentation of AutoSync implementation details, including its energy and timing features. • Performance evaluation of AutoSync through simulations and empirical experiments to confirm its benefits in reducing the energy cost of sensor networks with dynamic traffic patterns, including dual radio networks. The remainder of the paper is organized as follows. Section II presents the related work on low power listening methods. We revisit LPL existing mechanisms in Section III and present the basic AutoSync design. We then discuss our implementation of AutoSync in Section IV and validate and validate it through simulations and experiments in Section V. Section VI concludes the paper. II. R ELATED W ORK We only review low-power listening contention-based MAC protocols; the reader is referred to surveys like [9], [10], [12] for a comprehensive overview of the myriad of energyefficient MAC protocols developed to date. A. Low-Power Listening The idea behind Low-Power Listening, or LPL for short, is that listening for incoming packets is by far the most energy consuming action of the MAC layer and can be optimized at the expense of making the send operation consume more energy. The nodes periodically check (poll) the wireless channel for an incoming packet. If the poll operation fails, the node switches off the radio until the next poll, otherwise, a message is received. Transmitting a message now requires the sender to prepend it with a preamble that spans the complete length of the poll interval to ensure that the receiving node will observe it regardless of when it wakes up. LPL was pioneered by Hill and Culler [6] and refined by B-MAC [16]. Packet-based 802.15.4 radios do not have control over the preamble length, which required adaptation of the LPL protocols. The most straightforward solution, as introduced by SpeckMAC [19], is to mimic a long preamble by sending out a stream of back-to-back packets. This has the added benefit of allowing the receiver to send an ACK back as soon as it has received a first packet in the the stream, thus allowing both sender and receiver to go back to sleep. This optimization requires a bit of “space” between packets, for the receiver’s ACK, and roughly halves the energy required for sending a packet. This strobing concept is part of X-MAC [1], BoXMAC-2 [15], and MX-MAC [14] amongst others. When running at ultra-low duty cycles, the strobing sequence takes up quite some time, locking out all other nodes in the neighborhood that have a packet ready in their transmit queue. To address this performance issue, receiver-initiated protocols like RI-MAC [17] and A-MAC [3] have been developed. In these protocols nodes periodically send out an explicit poll packet, after which a sender can transmit its queued packet(s) for that node. Note that senders now passively listen until the right poll packet is aired instead of actively strobing

packets, reducing channel occupation to near zero; the price is an increase in polling costs. B. LPL Synchronization For static networks and fixed traffic patterns, which cover the majority of sensor network deployments, it is more efficient to send a short strobe just before the next poll as described in WiseMAC protocol [4]. Receiver schedule is inferred from ACK messages, which allows senders to compute the length of the required preamble based on the maximum clock drift and time elapsed since the last message exchange. This strategy results in short preambles being used for frequent traffic, and long preambles for low loads, effectively saving energy and channel capacity when it matters most. Several researchers have successfully bolted WiseMACstyle synchronization onto strobing LPL to make it available on 802.15.4 and other packet radios [7], [14], [18]. The general approach is to deduce the receiver’s wakeup schedule from the arrival time of the last ACK message, assuming the polling interval is known and a bounded processing delay at the receiving node. For the next packet, the sender will estimate the receiver’s wakeup time and start strobing just before. If the estimate was correct, the strobe will be cut short after one or two packets. Otherwise, the strobe will last -worst case- for the complete poll interval. The results in Section V show that synchronous LPL is quite effective. C. LPL Interval Control A difficulty with running LPL is that the polling interval needs to be set appropriately. The optimal interval depends on many factors including node density, traffic load, and channel conditions. The early protocols used one interval for the complete network, but as traffic load heavily depends on proximity to the sink, more recent protocols set the interval length on a per-node basis. With Adaptive Low Power Listening (ALPL) nodes regularly beacon their LPL interval so neighboring nodes can use the appropriate preamble length [8]. ALPL is based on BMAC and computes the length of the poll interval (i.e. duty cycle) to match the traffic load at individual nodes. The setting of the interval is done repeatedly to allow for load balancing in the routing layer. ZeroCal [13] takes the automatic tuning of the LPL interval one step further and considers the dependencies between parent and child nodes in converge-cast trees. If a parent increases its polling interval, the children’s energy consumption increases as they need longer strobes. To enhance the network lifetime, nodes select an LPL interval to equalize their energy consumption with that of their busiest child, while ensuring enough uptime to handle the traffic load. Nodes may only use a shorter interval than any of its children otherwise it might miss their preambles. This last constraint causes ZeroCal to adapt slowly to reductions in load, while it manages to rapidly adjust duty cycles on traffic increases.

III. AUTO S YNC D ESIGN Low Power Listening (LPL) shifts the energy burden from receivers to senders by forcing the latter to send longer preambles. Most LPL protocols for packet-based radios wake up nodes every TLP L seconds to probe the channel for a potential incoming packet. A sender will send out a strobe of repeated data packets interluded with gaps for the receiver ACKs. The length of the strobe is TLP L s unless cut short by an ACK of the intended receiver, thus the expected rendezvous entails overhead of TLP L /2 s. A common optimization is to keep the radio on for another Tdelay s after successful reception, enabling nodes to send additional packets without the strobe overhead. This optimization also reduces the utilization of the wireless channel, lowering the chance of collisions. The selection of the check interval must be done by hand, preferably based on the traffic demands at the busiest node. Most users, however, run LPL with the check interval set per feeling to somewhere between 100 ms and 2000 ms, aiming at a reasonable compromise between throughput and energy consumption. AutoSync is designed to reduce the load from both the sender and the receiver by combining synchronous LPL with automatic check interval selection. Receivers monitor their traffic and automatically select an appropriate check interval, while senders learn the wakeup schedule of their intended receivers and send short preambles. We describe in the subsequent sections AutoSync’s algorithms for synchronous low power listening and automatic interval selection. A. Synchronous LPL A source of inefficiency in asynchronous LPL protocols is the strobe overhead of TLP L /2 s on average. AutoSync implements two strategies to minimize the overhead. First, it uses Tdelay optimization at a receiver to enable senders to efficiently transmit multiple packets without the strobe overhead. Second, AutoSync explicitly shares the wakeup schedule between neighbors, allowing a transmitter to send the strobe just before the receiver wakes up. As will be outlined in Section IV-B, AutoSync embeds the receiver schedule in software acknowledgements, thus ensuring high update rate of the schedules and low miscommunication rates between nodes. Note that as it is impossible to acknowledge a broadcast packet, synchronous LPL protocols transmit broadcast packets for the full LPL period (just like asynchronous LPL protocols do). To account for clock drifts, a sender in AutoSync starts transmitting the strobe a set time (Tguard ) before the receiver’s wakeup time. Since Tguard  TLP L , the sender is expected to send few packets in the strobe and the energy required to transmit packets can be assumed independent of the receiver LPL interval. Consequently, the main source of energy overhead is idle listening of the receiver, which is inversely proportional to TLP L .

B. Adaptive Interval Selection Fixed polling intervals of LPL protocols incur overheads under light traffic loads. Adaptive polling techniques aim to decrease this overhead by letting nodes run on different LPL schedules. For example, leaf nodes often run light traffic loads and thus can use larger LPL intervals. Adaptive interval selection is attractive as it increases network lifetime, i.e. the time until the first node dies. However, it requires the exchange of information between communicating nodes. In particular, the sending node needs to know the LPL interval of the receiver to set the length of its LPL strobe. Additionally, the receiver needs to know the transmission rates of all nodes that route traffic through it to guarantee that the selected interval can handle the application packet load. AutoSync’s LPL interval selection algorithm optimizes energy consumption of a node in a greedy fashion. As discussed in Section III-A, the transmit energy in synchronous LPL protocols only depends on the Tguard time and is independent of the TLP L time. In order to maximize a node’s lifetime, the best strategy is thus to select the highest possible polling interval, subject to the following application bandwidth constraint: best TLP L



1 u∗RRX

(1)

where RRX is the rate of received packets at the parent and u is the uncertainty factor: a tuning parameter that accounts for incoming retransmissions occupying the channel. For high traffic loads a short interval is selected; for low traffic loads a long interval is preferred. We cap the interval length to a predefined maximum so that we can support broadcast traffic, e.g., routing beacons, which need to be strobed for a complete check interval. As the environmental conditions and the network topology might change, each node periodically updates the received packet rate RRX and adjusts the LPL interval if the rate changes. LPL intervals in AutoSync can thus change frequently and senders must be prepared to miss the next wakeup instant. We handle this opportunistically. The packet strobe is sent out according to the synchronous protocol as outlined above. When the sender does not receive an ACK within the set Tguard + Tsample time (where Tsample is the time it takes to sample the channel), it assumes synchronization is off. We use exponential doubling of the strobe length to re-establish synchronization with the receiver, limited to the predefined maximum. This approach is guaranteed to work for arbitrary schedule changes, yet keeps overheads low in the case packets are lost due to interference. C. Discussion The main goal of AutoSync is to adapt synchronous low power listening to dynamically changing asymmetric traffic. Previous implementations of synchronous LPL protocols (cf. WiseMAC in Section II) suffer from over-provisioning on a network-wide scale even when they reduce the strobing burden on senders. The manual network-wide check interval is typically set according to the busiest node in the network, wasting energy at all other nodes; energy may even be wasted

at the busiest node when the traffic rate is overestimated. This problem is aggravated on multi radio platforms, as it is impossible to predict prior to deployment which radio link will carry what traffic. Thus, the LPL interval on each radio must be set to handle the maximum load. The key feature of adaptive synchronous LPL is in the simplicity of its energy balancing equation when compared to asynchronous LPL (cf. ZeroCal in Section II). Energy required to transmit packets with synchronous LPL is independent of the actual LPL interval selection (TLP L ) as TLP L only influences the idle listening energy spent at the receiver. Consequently, nodes can maximize energy savings by simply increasing TLP L subject to the bandwidth constraint in Equation. (1). In contrast, asynchronous LPL protocols must balance the energy consumed by a node and its children given the TLP L setting, as higher LPL intervals save energy at the node, but incur more energy at its children[13]:

CTP Send

Link Estimator

Receive

CTP Multi Layer SendN

=

argmin TLP L

max(PNp ODE ,

max

children c

PNc ODE ) (2)

where PNp ODE , PNc ODE stand for power consumption of parent and its children, respectively. Each node needs to estimate the power PNc ODE consumed by each of their children. As a consequence, asynchronous balancing LPL protocols typically target specific network topologies, such as fixed converge-cast trees, while AutoSync works in arbitrary network topologies. IV. I MPLEMENTATION We implemented WiseMAC, ZeroCal, and AutoSync in TinyOS and used the Collection Tree Protocol [5] (CTP) for evaluation. We provide an overview of the implementation in Figure 1 and discuss implementation details below. A. Radio Stack Extensions Most of our extensions follow the approach of reusing functionality of original radio stack components. This enables a clean and simple transition to updated versions and bug fixes of the original code. 1) CTP Multi: Instead of modifying the original CTP protocol, we introduced a new layer, CTP multi, that transparently dispatches packets on the best radio interface. CTP multi must maintain link quality estimates to all neighbors on all radios, thus it runs a link estimator per each radio. Additionally, CTP multi layer duplicates CTP beacons on both radios and handles dispatching data packets to the preferred radio. CTP beacons need to be duplicated to disseminate information to children that have connectivity only on one of the radios. 2) AM Multi: The Active Message (AM) layer in TinyOS functions as a dispatch and access layer between the link and network layers. The AM layer implements a round-robin buffer to control access of multiple protocols to the radio. The AM Multi Layer extends AM layer to maintain a separate roundrobin buffer for each radio and expose radio-parametrized send and receive interfaces.

Receive beacon

Link EstimatorN

ReceiveN

Send beaconN

LPL ControlN

Receive beaconN

Low Power ListeningN

AM Multi Layer SendN

ReceiveN Low Power ListeningN

MAC Monitor Layer N SendN

ReceiveN

Synchronous LPL Layer N SendN

ReceiveN

Low Power ListeningN

LPL Layer N SendN

ReceiveN

Data ACK Layer N SendN

best TLP L

Send beacon

ReceiveN

Radio N

Fig. 1. AutoSync implementation overview. Synchronous functionality is contained within the Synchronous LPL layer, while adaptive interval control is done in the LPL Control layer.

3) MAC Monitor: We implemented a MAC independent MAC Monitor Layer that goes beyond estimating energy based on packet rates. The MAC monitor layer performs software energy metering of the underlying MAC states at runtime. We make use of software based on-line energy estimation [2], and use these measurements in our ZeroCal implementation to estimate a nodes power consumption in Equation 2. Similar to the ZeroCal paper we assume a linear relation between the transmit and idle power consumption and the current LPL check interval. B. Synchronous LPL The default TinyOS radio stack includes implementation of an asynchronous LPL layer. Our Synchronous LPL layer is a thin layer on top of the asynchronous layer that simply delays the send operation until a short time (Tguard ) before the target node’s wakeup time. Although time synchronization could be used to decrease Tguard , we opted for simplicity and use a 50 ppm clock skew estimate for adjusting Tguard . We furthermore add a random offset between 0 and 5 ms to Tguard to decrease the chance of collisions between contenting senders. In our experience, inferring the neighbor wakeup schedules from the time of arrival (as described in WiseMAC [4]) was not reliable enough due to the delay-after-receive optimization or packets received in ACK transmission periods. We therefore embedded explicit wakeup times of receivers in software ACKs. This is done by our generic Data ACK Layer. C. Adaptive LPL Control We implemented the duty-cycle control of AutoSync in the LPL Control Layer (see Figure 1). The purpose of this layer is to control a radio’s duty-cycle by setting its LPL interval.

AutoSync Optimal LPL [ms]

1200 1100 1000 900 800 700 Optimal LPL Changes

600 500 0

1000

2000 3000 Time [s]

4000

5000

Fig. 2. Calculation of optimal AutoSync LPL interval of a duty-cycled root in a 9 node TOSSIM grid network. Error bars show the bounds on the current estimate based on δrate and δET X . In order for the current estimate (blue line) to change (red dots), the current LPL interval (last red dot) must exceed the bounds of the current estimate.

As discussed in Section III-A, AutoSync’s LPL interval selection is independent of the power consumption of neighboring nodes. AutoSync monitors the incoming packets to estimate RRX and packet retransmissions reported in the received packets to estimate the uncertainty factor u in Equation 1. To avoid frequent changes of a node’s interval, with the risk of neighbors losing synchronization, we use weighted moving averages (EWMAs) to estimate the mean µ and deviation δ of the rate and ETX parameters in our equations. We change the interval as follows: best TLP L =

1 µrate µET X ,

(3)

if and only if the following condition is true: TLP L


or

1 (µrate −δrate )(µET X −δET X ) .

Equation 3 allows AutoSync to adjust the LPL check interval to the exact traffic conditions of the network. Figure 2 illustrates these changes. Note that the check interval stabilizes after nearly 3000 seconds with AutoSync. Note that at this point the performance of AutoSync (adaptive) and WiseMAC (fixed) would be identical if WiseMAC was pre-set with the optimal LPL interval. However, the optimal interval is difficult to predict a priori, as it involves knowledge of the application data rates, the network topology, and the quality of primary radio links to account for packet retransmissions. When the LPL interval changes, the node updates its neighbors through software ACKs. We include the wakeup time and interval, 6 bytes in total, in acknowledgments. Furthermore, we extend routing packets with a 1 byte count of retransmissions, so that the receiving node can accurately estimate the incoming ETX used together with the rate in Equation 3. The maximum LPL interval can significantly affect the performance of both ZeroCal and AutoSync. Choosing a low interval leaves little space for automatic duty-cycle control whereas a large interval makes beacons expensive. In terms of energy the maximum LPL interval can be estimated by

equalizing the energy used for beacon transmissions and channel sampling. While doing so, however, we observed severe reliability problems in our experiments, which prompted us to use a tighter bound. We restrict the maximum LPL using Equation 1 with an uncertainty factor u of 1. The implementation overhead on a dual radio platform in terms of program memory was 4 KB, 10 KB, and 9 KB for WiseMAC, ZeroCal, and AutoSync, respectively, while all protocols used below 256B of RAM. In general a standard application, such as the one used in Section V, requires about 50K of ROM and 7K of RAM. Per packet overheads of ZeroCal is 8 bytes (4byte node power and 4byte transmission power), while AutoSync uses just 1 additional byte (retransmissions count). V. E VALUATION In this section we evaluate AutoSync through simulation and testbed experiments to study its effectiveness in automatically tuning the duty-cycle with respect to the offered traffic load and network conditions. For reference we compare AutoSync’s performance to LPL, WiseMAC, and ZeroCal on both single and dual-radio platforms. A. Methodology We deployed a testbed consisting of nine sensor nodes, each equipped with two 802.15.4 radios: 2.4 GHz Atmel RF230 radio and 900 MHz Atmel RF212 radio. We arranged nodes in a 3x3 grid and enforced multi-hop by installing 50dBm attenuators on antenna connectors. Both radios can adjust their transmission power by 20 dBm, which we used to further control the network topology. We focus our empirical evaluation on two network topologies: a good network that is close to a star topology and a poor network with several nodes 3 hops away from the base station. To study the effects in large networks we extended the standard TOSSIM simulation environment to support multiple radios. We run simulations on both unconstrained and fixed topologies. Fixed topologies let us evaluate best-case energy consumption of ZeroCal and we implement them by enforcing a fixed (tree) topology in CTP. In the experiments, all nodes, including the sink node, are duty-cycled and when dual radios are used, duty-cycling of each band is done independent of the other band. Our test application uses CTP to transmit packets to a static root with a fixed inter-packet interval (IPI). The tested MAC protocols are used both to transmit unicast packets in the routing layer as well as to broadcast packets in the link estimation layer. Each node includes a number of statistics in the packets: ID, sequence number, total number of transmitted, retransmitted, and received packets, total number of transmitted and received CTP beacons, CTP churn, values of LPL periods used on both radios and the total energy used (measured by software metering). In addition, each forwarder adds its ID and the radio it uses for forwarding the packet, which allows us to reconstruct the spanning tree. The overall packet length was 82 bytes, including the MAC and routing headers.

12

12 2

3

4

5

6

1 Mean Level Power [mW]

Mean Level Power [mW]

1 10 8 6 4 2 0

LPL

ZeroCal

WiseMAC

5

6

4 2 LPL

ZeroCal

WiseMAC

AutoSync

(a) IPI=30 s

12

12 1

2

3

4

5

6

1

10

Mean Level Power [mW]

Mean Level Power [mW]

4

6

(a) IPI=30 s

8 6 4 2 0

3

8

0

AutoSync

2

10

LPL

ZeroCal

WiseMAC

(b) IPI=60 s

3

4

5

6

8 6 4 2 0

AutoSync

2

10

LPL

ZeroCal

WiseMAC

AutoSync

(b) IPI=60 s

Fig. 3. Mean power consumption per level in a 63-node binary tree (TOSSIM, single radio).

Fig. 4. radio).

We evaluate protocols using standard metrics from the literature. Packet reception ratio (PRR) is calculated as the fraction of packets delivered at the base station. Network lifetime is defined as the time until the first node in the network runs out of energy and can be inferred from the maximum energy used by all nodes over the course of the experiment. We also report the mean power used by the nodes to illustrate the energy used by the whole network. The energy is measured on-line through software based energy metering [2]. To reduce overhearing, we use address matching in all experiments, so that nodes will only receive packets destined to them or the IEEE 802.15.4 broadcast address. Even though CTP’s routing improves with overhearing we believe that address matching is an important feature in networks where power consumption is an issue. Similar to the CTP paper [5] we use a minimum beacon period of 64 ms and a maximum period of an hour. This enables CTP to quickly adapt to changes in the environment while maintaining a low overhead in a stable network. In all LPL and WiseMAC experiments the network-wide LPL interval is set to be the optimal for the busiest possible node in the network. We used Equations (2) and (1) and searched ranges from a few tens of microseconds to a few seconds to determine the optimal LPL intervals. For WiseMAC and ZeroCal we adopt an uncertainty factor of 3 from the ZeroCal paper [13].

using a fixed binary tree topology where nodes can only communicate with their direct children, their sibling, and their parent. All results are averaged over 500 packets sent per node. We first evaluate the average power consumption at each level of the binary tree for all protocols. Figure 3 shows how the protocols perform using a single radio. Note that the critical nodes are located at the second level as the sink is not transmitting data over the radio. Under LPL with a pernode IPI of 30 s, these critical nodes consume 7.1 mW, which equates to a duty cycle of 11 %. ZeroCal outperforms LPL by balancing the power at critical nodes. Due to restrictions on the maximum LPL interval ZeroCal is not able to balance all levels. The 24 % increase in network lifetime (i.e., reduction in maximum energy consumption) confirms earlier results in the ZeroCal paper [13]. WiseMAC outperforms LPL by using less power for transmissions at all levels and performs similarly to ZeroCal in terms of network lifetime. ZeroCal outperforms WiseMAC in the mean energy used due to its lowering the check intervals at levels close to leafs. AutoSync outperforms all other protocols by combining the benefits of balancing and synchronous wake-up schedules. An important factor is that AutoSync accommodates to the actual traffic, while WiseMAC includes an uncertainty factor of three (in accordance with [13]) in its optimal LPL calculation leading to over-provisioning. In this network with good links and limited interference the uncertainty could be reduced towards one, in which case the energy consumption of WiseMAC approaches that of AutoSync. Figure 4 shows the effect of adding a second radio to the experiment. Note that setting the duty-cycle of the second ra-

B. Fixed Topologies To minimize the effect of routing decisions on the performance of the MAC protocols, we first evaluate protocols

Mean power consumption in a 63-node binary tree (TOSSIM, dual

15 Power Consumption [mW]

LPL

WiseMAC

AutoSync

10

5

0

Good−1

Good−2

Bad−1

Bad−2

(a) Mean Node Power 30 LPL Power Consumption [mW]

dio is independent of the duty-cycle of the first radio. The idle listening costs of LPL and WiseMAC increase as they have to keep a high duty-cycle to handle the bandwidth on the busiest node, on both radios. In this dual radio scenario ZeroCal actually outperforms WiseMAC with a per-node IPI of 30 s (see Figure 4(a)), but as the benefit of synchronization increases at lower packet rates, WiseMAC outperforms ZeroCal again with a per-node IPI of 60 s (see Figure 4(b)). WiseMAC’s and AutoSync’s energy savings are proportional to the 50% data rate decrease. AutoSync consistently outperforms the other protocols for both low and high IPIs. LPL and ZeroCal both exhibit only 35% energy savings at 60 s IPI despite the 50% decrease in data rate. This is because optimal LPL intervals for WiseMAC and AutoSync depend only on the data rate, while ZeroCal needs to consider the increased communication cost related to longer preambles. In summary, the fixed topology experiments with limited dynamics show that synchronous LPL and duty-cycle control each have an advantage over regular LPL. However, it is only the combination of the two that provides improvements over LPL under a wide range of traffic rates.

WiseMAC

AutoSync

25 20 15 10 5 0

Good−1

Good−2

Bad−1

Bad−2

(b) Max Node Power 120 LPL

C. Dynamic Topologies

WiseMAC

AutoSync

100 80 PRR [%]

In this section, we evaluate the protocols using realistic topologies without any software enforced topology control. Thus the topology might change for every run depending on CTP’s routing decisions. We do these experiments both empirically on our dual-radio testbed and through TOSSIM simulations on a 36-node grid network. While running these experiments we noticed that ZeroCal gave rather poor results, which we attribute to the additional volatility introduced by CTP switching routes; ZeroCal had only been evaluated with fixed routing topologies allowing it to adjust the LPL interval only once, while in our experiments every CTP routing switch forces ZeroCal to adjust its settings. As there is little value in showing results of a protocol operating outside its design envelope, we limit our discussion of the effects of dynamic topologies to LPL, WiseMAC, and AutoSync. 1) Testbed Evaluation: As discussed in Section V-A, we used a combination of antenna attenuators and variable RF transmission power to control the radio range and link qualities of our testbed. We locked in on two network settings, referred to as good and bad, and ran a series of CTP experiments for each protocol, both using a single radio and dual radios. We repeated each experiment at four different times of day, to sample different interference and multipath fading dynamics in the environment. We ran ten additional experiments in bad topologies, to achieve higher confidence in the presented statistics. We average our performance metrics across all runs and present the mean and standard deviation in our results. We let the CTP beaconing period stabilize for an hour and then transmit 200 packets with a 10 s IPI. We calculate the optimal/maximum preamble lengths at this traffic rate to be 177 ms, 427 ms, and 1280 ms for LPL, WiseMAC, and AutoSync, respectively.

60 40 20 0

Good−1

Good−2

Bad−1

Bad−2

(c) Mean Node PRR Fig. 5. Energy consumption and PRR of LPL, WiseMAC, and AutoSync running with CTP in our two testbed settings using single radio (Good-1 and Bad-1) and a dual radios (Good-2 and Bad-2). Each datapoint corresponds to the mean of 4 runs for the good network and 14 runs for the bad network. Error bars show the standard deviation.

Figures 5(a) and 5(b) compare the mean and maximum power consumption for all protocols, where the maximum power consumption is directly related to network lifetime. In general, these experiments confirm that synchronous protocols (WiseMAC and AutoSync) out-perform asynchronous LPL by approximately 50 % in terms of both network lifetime and mean power consumed in the network. Additionally, AutoSync outperforms WiseMAC in all cases. The power figures show that benefits of AutoSync compared to WiseMAC increases when adding a second radio. This is explained by the high degree of asymmetry in the usage of the dual radios at individual nodes. WiseMAC needs to set its LPL check intervals conservatively, assuming that all radio traffic is received over a single radio interface. AutoSync can balance the check intervals based on the observed traffic and thus save significantly on energy spent by idle listening. AutoSync effectively shuts down a radio that is not in use by setting its check interval to the predefined maximum.

PathLen TxRetry

LPL-1

WM-1

AS-1

LPL-2

WM-2

AS-2

2.6 91

2.6 63

2.8 44

1.3 2

1.5 15

1.5 5

100 AutoSync Improvement [%]

TABLE I T ESTBED EXPERIMENTS IN BAD NETWORK SINGLE ( PROTOCOL -1) AND DUAL ( PROTOCOL -2) RADIO EXPERIMENTS : AVERAGE PATH LENGTH AND NUMBER OF RETRANSMISSIONS PER NODE .

Mean Node Power Max Node Power 80 60 40 20 0

20

40

60 80 Per Node IPI [s]

100

120

(a) Single radio 100 AutoSync Improvement [%]

AutoSync only achieves a moderate improvement over WiseMAC in terms of network lifetime in the single-radio scenario in Figure 5(b). Detailed analysis of the logs showed that in this case the critical node is forwarding a lot of traffic, leaving little idle energy to be optimized by AutoSync. AutoSync can, however, adjust the LPL check intervals of the non-critical nodes, which results in a 50 % average power reduction over WiseMAC. The maximum improvement in power achieved by AutoSync compared to WiseMAC is in the bad network dual radio experiment where the mean node power improvement reaches 65 % and the lifetime improvement reaches 70 %. Comparing this to the improvement in the good network dual radio experiment of 60 % and 50 % in mean node power and lifetime, respectively, it seems that AutoSync performs better in bad networks. Intuitively, however, one would expect AutoSync with larger LPL check intervals to perform worse in bad networks. A detailed analysis of the logs show a high degree of parent changes in the WiseMAC experiments causing a similar high degree of CTP beacons. This increases the power consumption of WiseMAC and hence increases the AutoSync improvement. We leave to future work to explore the cause of this fluctuation. The high standard deviation for LPL in the bad network dual radio experiment is caused by one outlier (out of 14 runs), which seems to have had exceptional hard time accessing the channel, resulting in a total energy consumption exceeding twice the consumption in any other experiment. With the testbed deployed in an office environment, the cause for the decreased performance of this run can be manifold. However, we chose to include the run in the figures for completeness. We also observe that the variance of lifetime results for AutoSync is always smaller than both WiseMAC and asynchronous LPL. This suggests that AutoSync has a more deterministic maximum power consumption across all the experiments. Figure 5(c) shows the mean node PRR for all protocols in the good and bad testbed settings. For better understanding the performance of the different protocols, we show lower level network indicators for the bad network settings in Table I. Clearly, end-to-end reliability correlates with the quality of the underlying links indicated by the number of required retransmissions and the length of the routing paths. The table shows that radio diversity allows CTP to select shorted paths over more reliable links. The PRR benefits of dual radios in the well-connected network are minor. The bad network setting causes a drop in

Mean Node Power Max Node Power 80 60 40 20 0

20

40

60 80 Per Node IPI [s]

100

120

(b) Dual radios Fig. 6. Max and mean node power improvement of AutoSync compared to WiseMAC in a 36-node multi-hop 6x6 grid network with CTP routing packets to a grid corner. Each datapoint corresponds to the mean of 5 runs per protocol and error bars show the standard deviation.

PRRs across all protocols—mainly due to disconnected nodes. In the single radio case, LPL and WiseMAC’s delivery rates drop to below 80%, with AutoSync performing slightly better. The dual radio experiments exhibit an improvement in PRR of up to 10%, with similar performance for WiseMAC and AutoSync. Finally, in good networks, we observe a higher variance of AutoSync’s PRR and explain it by the larger LPL intervals that AutoSync uses to save energy at low traffic. Larger LPL intervals increase the length of CTP beacons, making them more likely to interfere with other beacons and data packets, leading to a more varying end-to-end reliability. Our empirical analysis demonstrates that AutoSync is a versatile protocol that achieves significant energy savings in low-power scenarios. Its benefits are amplified in multi-radio scenarios where the network traffic is difficult to estimate. The significant energy savings of AutoSync far outweigh the slight decrease in its reliability in some networks. The combination of the energy efficiency of AutoSync and the additional reliability achieved through network diversity, multi-radio networks can use AutoSync to match the reliability of WiseMAC while substantially increasing the network lifetime. 2) Large-scale TOSSIM Evaluation: We further evaluate WiseMAC and AutoSync at scale and under different IPIs in a 36 node TOSSIM network. The network is generated with the TOSSIM link generator and, depending on the protocol and IPI, the number of hops in the network reaches a maximum of 6 and 3 hops in the single and dual radio scenarios, respectively. In all experiments, each node sends 500 packets with the a specific per node IPI to a root placed in the corner

of the grid. As before, we let the CTP beaconing period stabilize for an hour before starting the experiments, and we average results over five runs with different random seeds. As mentioned in Section V-A the WiseMAC LPL interval is set to the optimal for the busiest possible node in the network. We validated TOSSIM simulation by comparing the empirical testbed results (Figure 5) to simulation results in similar networks topologies and observing similar trends, even for the poorly connected network. Figure 6 shows the maximum and mean node power improvement of AutoSync compared to WiseMAC when varying the per node IPI using both a single and dual radios. The error bars show standard deviation. Figure 6(a) shows that in the single radio scenario AutoSync can improve the network lifetime with more than 40 % compared to WiseMAC. This improvement is attributed to AutoSync’s automatic duty-cycle control, which is able to adjust the LPL interval at the critical node to the actual data rate. The improvement of AutoSync decreases from IPI 30 s to 120 s. Our detailed logs revealed that the increased cost and channel utilization of CTP beaconing at higher IPIs (increasing the IPI increases the maximum predefined LPL preamble length) negatively impacts both the reliability and the transmission cost at critical nodes (as well as others), decreasing the overall AutoSync savings. This implies that in some scenarios the maximum LPL interval should be further restricted based on the capabilities of the underlying LPL layer, an analysis of which we leave for future work. Figure 6(a) also shows that AutoSync saves more for non-critical nodes as it can heavily duty-cycle their radio when no data is received. Adding another radio increases the idle listening costs, and hence both the max and mean node power consumption of AutoSync and WiseMAC. Figure 6(b) shows that the AutoSync network lifetime improvement can increase to more than 50 % in this case, because WiseMAC overestimates the bandwidth of idle radios and sets the LPL interval accordingly. Comparing the above results with the testbed experiments from the previous subsections confirm the benefits of using AutoSync in larger and more dynamic (multi-radio) networks with multiple paths to the root. VI. C ONCLUSIONS To ease the effective use of duty cycling in wireless sensor network deployments we presented AutoSync, a versatile MAC protocol that combines synchronous LPL with automatic tuning of LPL check intervals. AutoSync simply monitors the incoming data rate and periodically adjusts the LPL interval to match the demand. LPL intervals are independent of the power consumption of neighbors as the synchronous nature of AutoSync results in all messages being sent with a short, fixed preamble. Thus, by setting the LPL interval to the maximum value that can handle the observed traffic, the energy consumption is minimized as the energy spent in receiving/idle listening is inversely proportional to the LPL interval. Our simulations and empirical experiments have shown that AutoSync offers significant benefits in network lifetime

and mean energy consumption over both synchronous and asynchronous LPLs. AutoSync is particularly well suited for applications with dynamic and varying network traffic flows and for multi-radio platforms, as it enables the reduction of idle-listening energy of under-utilized radios. Specifically, AutoSync enables multi-radio networks to match or even reduce the energy consumption of single radio networks, thus delivering the added reliability of multi-radio platforms with a net reduction in energy consumption. R EFERENCES [1] M. Buettner, G. V. Yee, E. Anderson, and R. Han. X-MAC: a short preamble MAC protocol for duty-cycled wireless sensor networks. In SenSys ’06, pages 307–320, Boulder, Colorado, USA, 2006. ¨ [2] A. Dunkels, F. Osterlind, N. Tsiftes, and Z. He. Software-based on-line energy estimation for sensor nodes. In EmNets ’07, pages 28–32, Cork, Ireland, 2007. [3] P. Dutta, S. Dawson-Haggerty, Y. Chen, C.-J. Liang, and A. Terzis. Design and evaluation of a versatile and efficient receiver-initiated link layer for low-power wireless. In SenSys ’10, pages 1–14, Zurich, Switzerland, Nov. 2010. [4] A. El-Hoiydi and J.-D. Decotignie. WiseMAC: An ultra low power MAC protocol for multi-hop wireless sensor networks. In ALGOSENSORS 2004, Lecture Notes in Computer Science, LNCS 3121, pages 18–31. Springer-Verlag, July 2004. [5] O. Gnawali, R. Fonseca, K. Jamieson, D. Moss, and P. Levis. Collection tree protocol. In SenSys ’09, pages 1–14, Berkeley, California, 2009. [6] J. L. Hill and D. E. Culler. Mica: A wireless platform for deeply embedded networks. IEEE Micro, 22(6):12–24, 2002. [7] J. W. Hui and D. E. Culler. IP is dead, long live IP for wireless sensor networks. In SenSys ’08, pages 15–28, Raleigh, NC, USA, 2008. [8] R. Jurdak, P. Baldi, and C. V. Lopes. Adaptive low power listening for wireless sensor networks. IEEE Transactions on Mobile Computing, 6:988–1004, Aug 2007. [9] R. Jurdak, C. V. Lopes, and P. Baldi. A survey classification and comparative analysis of medium access control protocols for ad hoc networks. IEEE Communications Surveys and Tutorials, 6:2–16, Jan. 2004. [10] K. Kredo-II and P. Mohapatra. Medium access control in wireless sensor networks. Computer Networks, 51(4):961–994, Mar. 2007. [11] B. Kusy, C. Richter, W. Hu, M. Afanasyev, R. Jurdak, M. Bruenig, D. Abbott, C. Huynh, and D. Ostry. Radio diversity for reliable communication in WSNs. In IPSN ’11, pages 270–281, Chicago, IL, USA, Apr. 2011. [12] K. Langendoen. Medium access control in wireless sensor networks. In H. Wu and Y. Pan, editors, Medium Access Control in Wireless Networks, pages 535–560. Nova Science Publishers, Inc., may 2008. [13] A. Meier, M. Woehrle, M. Zimmerling, and L. Thiele. ZeroCal: Automatic MAC protocol calibration. In DCOSS ’10, pages 31–44, Santa Barbara, CA, June 2010. [14] C. J. Merlin and W. B. Heinzelman. Schedule adaptation of low-powerlistening protocols for wireless sensor networks. IEEE Transactions on Mobile Computing, 9(5):672–685, 2010. [15] D. Moss and P. Levis. BoX-MACs: Exploiting physical and link layer boundaries in low-power networking. Technical report, Stanford, 2008. [16] J. Polastre, J. Hill, and D. Culler. Versatile low power media access for wireless sensor networks. In SenSys ’04, pages 95–107, Baltimore, MD, USA, 2004. [17] Y. Sun, O. Gurewitz, and D. B. Johnson. RI-MAC: a receiver-initiated asynchronous duty cycle MAC protocol for dynamic traffic loads in wireless sensor networks. In SenSys ’08, pages 1–14, Raleigh, NC, USA, 2008. [18] L. Tang, Y. Sun, O. Gurewitz, and D. Johnson. EM-MAC: A dynamic multichannel energy-efficient mac protocol for wireless sensor networks. In ACM MobiHoc, Paris, France, 2011. [19] K. J. Wong and D. K. Arvind. SpeckMAC: low-power decentralised MAC protocols for low data rate transmissions in specknets. In 2nd Int workshop on Multi-hop ad hoc networks, REALMAN ’06, pages 71–78, Florence, Italy, 2006.