Efficient Asynchronous Low Power Listening for Wireless Sensor ...

7 downloads 232 Views 185KB Size Report
compromising the reliability of wireless communication?2 We present the design ... Low power listening (LPL) is a common method used by asynchronous ...
Efficient Asynchronous Low Power Listening for Wireless Sensor Networks Rajesh Krishna Panta, James A. Pelletier, Gregg Vesonder AT&T Labs – Research 180 Park Avenue, Florham Park, NJ 07932 Email: {rpanta,jap,gtv}@research.att.com

Abstract—Energy conservation and reliability of wireless communications are two crucial requirements of practical sensor networks. Radio duty cycling is a widely used mechanism to reduce energy consumption of sensor devices and to increase the lifetime of the network. A side effect of radio duty cycling is that it can cause the wireless communications to be unreliable—if a sender node transmits a packet while the receiver is asleep, the communication fails. Early duty cycling protocols like B-MAC that were designed for bit streaming radios achieve low duty cycle by keeping the radio transceiver awake for short time periods. However, they require a transmitter node to precede a packet transmission with a long preamble to ensure the reliability of wireless communication. Furthermore, they cannot be used with modern packet radios like widely used IEEE 802.15.4 based radio transceivers, which cannot transmit arbitrarily long preambles. Recent duty cycling schemes like X-MAC, on the other hand, reduce the length of the preamble and are designed to work with packet radios. However, in order to ensure that a receiver can reliably detect a transmitter’s preamble transmission, these schemes need to turn the radio transceiver on for longer time durations than the early schemes like B-MAC. In this paper, we present a novel duty cycling scheme called QuickMAC, that achieves a very low duty cycle without compromising the reliability of wireless communication. Furthermore, QuickMAC is stateless, compatible with packet (and bit stream) radios, and does not require synchronization among sensor nodes. From our experiments using TMote sky motes, we show that QuickMAC reduces duty cycle by a factor of about 4 compared to XMAC, and yet maintains the same level of reliability of wireless communication as X-MAC. Keywords-Communication reliability, Duty cycling, Sensor networks.

I. I NTRODUCTION Reducing energy consumption is one of the crucial challenges in wireless sensor networks (WSNs). In many practical deployments, sensor nodes need to run on a pair of batteries for several years. Changing or recharging batteries may be difficult due to the scale of the deployment, or in some cases, infeasible because the sensor nodes may be deployed in places which are difficult to access physically [1], [2]. Thus it is important to reduce energy consumption of sensor nodes to increase the lifetime of the network. Radio activities are generally the most energy-expensive operations in WSNs [3], [4]. Energy is consumed not only during packet transmission and reception, but also during idle listening—the time period for which the radio transceiver of a sensor node is awake listening to the wireless medium even

though no packets are being transmitted to that node. Over a long run during the lifetime of a sensor node, idle listening is generally the most significant source of energy consumption [5], [6]. Duty cycling is a common mechanism used to reduce the energy cost due to idle listening. In this approach, each sensor node puts its radio transceiver to sleep mode for most of the time and wakes it up periodically for brief time durations to sample the wireless medium1 to check if there is any radio transmission intended for it. Although duty cycling reduces the idle listening energy cost, it can also cause the wireless communication to be unreliable—if a sensor node transmits a packet when the receiver is asleep, the communication fails. Thus reliability of wireless communication should be carefully considered when designing a duty cycling scheme. Ideally, if two nodes can communicate in the absence of duty cycling, they should also be able to communicate in the presence of duty cycling. In this paper, we explore the following question: How can we reduce the radio awake period as much as possible without compromising the reliability of wireless communication?2 We present the design, implementation, and evaluation of a novel duty cycling mechanism that reduces the energy consumption of sensor nodes by a factor of about 4 compared to the existing state of the art scheme [7], while still maintaining the same level of reliability as the existing scheme. Duty cycling can be done either synchronously or asynchronously. In synchronous approaches [8], [9], wake up times of the nodes that need to communicate with each other are synchronized. If synchronization error can be made small, both low duty cycle and high reliability of wireless communication can be achieved. The main drawback of such schemes is the extra energy overhead required for time synchronization. Sensor nodes need to exchange synchronization control packets regularly, even when there are no actual data communications taking place. Low power listening (LPL) is a common method used by asynchronous protocols that avoid the need for time synchronization among the nodes by having the transmitter transmit 1 In this paper, we use the terms “sampling wireless medium”, “sampling channel”, and “scanning channel” interchangeably. 2 In practical WSNs, unreliability of wireless communications can be caused not only by duty cycling, but by many other factors, e.g. temporal and spatial link dynamics, harsh and unpredictable environment in which the network may be deployed, low power radios, link asymmetry, external interference, etc. In this paper, we focus on unreliability due to low radio duty cycle.

a (long) preamble sequence before each packet transmission. The preamble duration is at least as long as the sleep period of the nodes. This enhances the reliability of wireless communication because when a node wakes up to sample the channel, it is guaranteed to hear the preamble. If a node detects a preamble, it turns its radio on until the packet is received. Duty cycling MAC protocols reduce the idle listening energy consumption because the radio awake period (to sample the channel) is significantly smaller than the radio sleep period. In other words, these protocols achieve a low duty cycle—the ratio of awake period to the sum of awake and sleep periods. Compared to early duty cycling protocols like B-MAC [10], the recent protocols like X-MAC [7] cannot achieve the same level of duty cycle and the reliability of wireless communication. The radio awake period is significantly longer in these protocols. There are several reasons for this. First, early protocols like B-MAC were designed for bit streaming radios (e.g. CC1000 [11]) which can generate preambles of arbitrary length. So a transmitter can transmit a long preamble of length at least equal to the sleep period of the receiver. Thus even by sampling the channel for a short time period, a receiver is guaranteed to detect a packet transmission if one exists. However, most of the recent sensor nodes (e.g. MicaZ, Tmote, Telosb, iMote, etc.) use radio transceivers based on IEEE 802.15.4 standard (e.g. CC2420). These are packet radios and the standard limits the maximum size of the packet (128 bytes). In LPL schemes designed for such radios, the preamble sequence is not an uninterrupted bit sequence, but a series of preamble packets with quiet gaps between the successive packets. In order to ensure the reliability of wireless communication, a receiver, therefore, has to sample the channel for a slightly longer time period than the quiet gap period. Otherwise, the wireless communication can fail because the channel sampling may happen during the quiet gap and the receiver may miss the packet transmission intended for it. We will discuss in section II-A that the quiet gaps cannot be made arbitrarily small. Packetized preambles are also necessary to reduce the preamble length. When a receiver wakes up and detects the preamble targeted to it (the preamble contains the destination address), it can send an ACK to the transmitter in the quiet gap to indicate that the transmitter can stop transmitting the preamble and transmit the packet immediately. On average, this mechanism reduces the preamble length of unicast transmission by half compared to schemes that do not use the ACK mechanism. The quiet gaps are significantly longer than the time period a receiver needs to sample the channel if the channel is modulated continuously as in early LPL protocols. For example, in default TinyOS [12] implementation of X-MAC3 , each node samples the channel for about 11ms. On the other hand, if the channel is modulated continuously with a long preamble, the receiver can detect the preamble transmission by scanning the 3 TinyOS implements a slightly modified version of X-MAC. Data packets are themselves transmitted as preamble packets.

channel for less than a millisecond. Except for very high data rate applications, this increase in awake period increases the duty cycle and energy consumption significantly. It should be noted that if each node maintains some state about the awake time instants of its neighbors, short channel scans can be used to detect the packetized preambles. For example, in a very recent duty cycling scheme, ContikiMAC [13], after a receiver detects a transmitter’s first transmission, the transmitter caches the awake time instant of the receiver. For subsequent transmissions to the same receiver, the transmitter starts the preamble packet transmission at the expected awake time of the receiver. If the clocks of the nodes have not drifted significantly, the receiver has a high probability of detecting the first preamble packet transmission. If the nodes fall out of synchronization, there is still some probability of the receiver detecting at least one of the remaining preamble packets. State maintenance and time synchronization are the disadvantages of such approaches. In this paper, we present the design and evaluation of a novel duty cycling protocol called QuickMAC that has five important goals—1) Short radio awake period: Each node should sample the channel quickly to reduce duty cycle. 2) Reliability of wireless communication: The reduction in radio awake period should not degrade the reliability of wireless communications. 3) Compatibility with packet radios: The transmitter should use packetized preambles to be compatible with recent packet radios and to reduce the preamble length for unicast transmissions. 4) Asynchronous operation: The protocol should not incur extra energy overhead due to time synchronization. 5) Stateless: Sensor nodes should not maintain any state about the wake up times of the neighbors. Simple stateless protocols like B-MAC and X-MAC are known to scale well and perform better in practice. Existing works assume an inherent tradeoff between these requirements. They achieve one or the other, but not all of these goals simultaneously. For example, B-MAC is asynchronous, stateless, and uses short channel scans, but cannot be used with packet radios. X-MAC is asynchronous, stateless, and compatible with packet radios, but uses long channel scan periods. ContikiMAC is compatible with packet radio, uses short channel scans, but needs to maintain neighbor states. To the best of our knowledge, QuickMAC is the first protocol that achieves all five goals simultaneously. The main idea used by QuickMAC is simple—instead of sampling the channel for a time period slightly longer than the quiet gaps in the preamble transmission, a receiver performs n number of short channel scans and opportunistically takes quick naps in between the channel scans. The timing of these scans are chosen such that a receiver is guaranteed to perform a channel scan at least once during the preamble packet transmission. We discuss how the value of n is chosen in section II-B. Even though QuickMAC performs n channel scans instead of one channel scan as in X-MAC, the total awake time for n channel scans in QuickMAC is significantly smaller than one channel scan in X-MAC. We implement QuickMAC on top of X-MAC in TinyOS. From an extensive

set of experiments, we find that QuickMAC reduces duty cycle by a factor of about 4 compared to X-MAC. The rest of the paper is organized as follows: Section II presents the design of QuickMAC. Detailed evaluation of QuickMAC is presented in Section III. Section IV surveys the related work and Section V concludes the paper with some possible future work directions. II. Q UICK MAC D ESIGN To reduce energy consumption, a sensor node should put its radio to sleep state as much as possible. However, the radio needs to be turned on not just to transmit or receive packets, but also to check if there is any packet transmission destined to it. Except for very high data rate applications, idle listening is the most significant source of energy consumption. To reduce idle listening energy cost, a node should sample the channel as quickly as possible. However, in order to ensure a certain level of reliability of wireless communication, the channel scan period cannot be made arbitrarily small. Thus channel scan period is a crucial factor in determining the achievable duty cycle and reliability of wireless communication. In this section, before presenting the detail QuickMAC design, we first explain the factors affecting the channel scan period. A. Length of channel scan period As mentioned above, early LPL schemes like B-MAC were designed for bit streaming radios. As shown in figure 1-a, in such schemes, when a transmitter has a packet to send, it precedes the packet with a long preamble such that Tpreamble > Tsleep

(1)

where Tpreamble is the preamble duration and Tsleep is the sleep duration of the receiver4 . This condition is necessary to ensure the reliability of wireless communication—when a receiver wakes up and scans the channel, it is guaranteed to detect the preamble. When there is no ongoing packet transmission as shown in the left side of figure 1-a, a sensor node needs to be awake for a very short time period Tscan to scan the channel. As a result, a small duty cycle can be achieved. In spite of its simplicity and small duty cycle, B-MAC is not used in recent sensor nodes because the long preamble has several disadvantages. First, even if the receiver wakes up at the start of the preamble, the transmitter has to transmit the entire preamble and the receiver needs to be awake until it receives the packet, thereby wasting energy both at the transmitter and the receiver. Second, nodes which are within the transmission range of the transmitter but not the target of the transmitter need to be awake during the entire preamble length to find out if the packet is intended for them. Third, latency on each hop is increased because the receiver has to wake up for the entire preamble length. Fourth, most of the recent packet radios based on IEEE 802.15.4 cannot transmit preambles long enough to span the sleep period of the receiver. 4 Each node needs to know the maximum time period T sleep for which a node in the network can sleep.

In order to overcome these problems due to long preambles, in more recent protocols like X-MAC, the transmitter transmits a series of preamble packets with quiet gaps as shown in figure 1-b. Let Tprepkt and Tgap be the durations of each preamble packet and the quiet gap, respectively. The preamble packets contain the address of the destination node. When the intended receiver wakes up and detects the preamble packet, it sends a link-layer ACK in the quiet gap period. The transmitter then sends the data packet and goes back to sleep. On average, X-MAC reduces the preamble length by half compared to B-MAC. In X-MAC, a receiver may miss a packet transmission targeted to it if (a) the sequence of preamble packets transmitted by the transmitter lies completely within the receiver’s sleep period, i.e. Tpreamble ≤ Tsleep , or (b) the channel scan by the receiver lies completely within the quiet gap, i.e. Tscan ≤ Tgap . Thus, to make sure that nodes running X-MAC can communicate with each other reliably, following conditions need to be satisfied: Tpreamble > Tsleep

(2)

Tscan > Tgap

(3)

It should be noted that TinyOS [14] implements a slightly modified version of X-MAC. Instead of using separate explicit preamble packets, data packets themselves are transmitted as preamble packets. The above conditions hold for X-MAC implementation in TinyOS also. A major drawback of the modern LPL schemes like X-MAC designed for packet radios is that the time period required to scan the channel, Tscan , is significantly higher than in LPL schemes designed for bit-stream radios like B-MAC. Note that in B-MAC, Tscan should be large enough only to detect channel activity and avoid false positives—detecting that the channel is busy due to noise, not due to a legitimate packet. On the other hand, in X-MAC, the channel scan period should be greater than the size of the quiet gap as shown in condition 3. Thus, a node has to keep its radio on for significantly longer duration in X-MAC than in B-MAC. This results in a proportional increase in duty cycle. A natural question that arises is: Can quiet gaps be made small so that the channel scan period can be reduced? A quiet gap period is composed of various components. First, some hardware and software delays are incurred in transitioning the radio transceiver from transmit state to the receive state. Then the radio should wait for at least one ACK period (e.g. 352 microseconds for IEEE 802.15.4 based radios) to see if the receiver has sent an ACK. After that the radio has to perform CCA (Clear Channel Assessment) checks to see if the channel is free. If it is not free, then the node has to backoff for some time period and repeat the CCA check. This process needs to be repeated until the channel is detected to be free or a threshold number of attempts have failed. Finally, if the channel is not busy, the radio transceiver has to transition from receive state to the transmit state. This incurs more hardware and software delays. Thus, the size of the quiet gap is nondeterministic and can be quite large, especially in the presence

A request to transmit a packet is received from higher layer Channel scan Long preamble

Channel scan Sender Tscan

Tsleep

Send data

Tpreamble Channel scan

Channel scan

B-MAC

Channel scan Wait

Receiver Tscan

time

Receive data

time

Tsleep (a)

A request to transmit a packet is received from higher layer Tpreamble Tprepkt Tgap Quiet

Channel scan

Channel scan

ACK received Send data

gap

Sender Tscan

Tsleep

Channel scan

Preamble packets Channel scan

Channel scan

X-MAC

Wait

Receiver Tscan

Tsleep

time

Receive data

time

Send ACK (b)

A request to transmit a packet is received from higher layer Tpreamble Tprepkt Tgap Quiet

Channel scan

Channel scan

ACK received Send data

gap

Sender Tsleep

Preamble packets

Channel scan

QuickMAC

Channel scan Wait

Tsleep

Receiver

time

Tscan Tnap Tburst

Tscan Tnap Tburst

Receive data

time

Send ACK

(c) Fig. 1. Operations of (a) B-MAC, (b) X-MAC, and (c) QuickMAC. QuickMAC allows sensor nodes to perform short channel scans, and yet allows the transmitter to insert quiet gaps in the preamble sequence. Obviously the figure is not drawn to scale.

of congestion where a transmitter needs to perform several CCA checks and multiple backoffs. In default TinyOS implementation of X-MAC, each node scans the channel for about 11ms. This value has been empirically found to be good for many practical cases. On the other hand, if the transmitter sends a long preamble (as in B-MAC), we find from our experiments that even a channel scan as short as 0.7 milliseconds is sufficient. As a result duty cycle is significantly increased in modern LPL schemes like X-MAC. B. Design Details The core idea behind QuickMAC is simple—when a node needs to sample the wireless medium to check if there is an ongoing transmission destined to it, instead of performing a channel scan for a time duration slightly longer than the quiet

gap period, it performs n number of short channel scans in a quick succession, and sleeps between the two successive scans. The time instants of these n short channel scans are chosen such that at least one channel scan is guaranteed to overlap in time with at least one preamble packet transmission. Fig 1-c illustrates this. Here, a transmitter node transmits a series of preamble packets (each of duration Tprepkt ) with quiet gaps (each of duration Tgap ) in between the successive preamble packets. For the sake of our discussion, let us assume that the data packets are themselves transmitted as preamble packets, as in TinyOS implementation of X-MAC. Note that QuickMAC also works with the original version of X-MAC. In QuickMAC, each node sleeps for Tsleep time period and wakes up to perform n short channel scans, each of length Tscan . In between two successive channel scans, the node goes to sleep briefly for Tnap . Let Tburst = nTscan + (n − 1)Tnap be the

total duration of n channel scans, i.e. from the start of the first channel scan to the end of the nth channel scan. After performing n channel scans, if there is no ongoing packet transmission destined to it, the node goes back to sleep again for Tsleep period. If there is a packet transmission destined to it, the node’s channel scan should satisfy the following conditions in order to ensure that at least one of the channel scans overlaps with at least one preamble packet transmission for reliability of wireless communication: Tpreamble > Tsleep

(4)

Tburst > Tgap

(5)

Tnap < Tprepkt

(6)

Like in B-MAC and X-MAC, the condition Tpreamble > Tsleep ensures that the preamble sequence transmitted by the transmitter does not lie completely within the sleep period of the receiver. The condition Tburst > Tgap ensures that the receiver does not perform all n channel scans during the quiet gap of the preamble sequence. Finally, the condition Tnap < Tprepkt ensures that the naps taken by the receiver in between two channel scans is short enough so that the preamble packet transmitted by the transmitter does not lie completely within the nap period. These three conditions ensure that at least one channel scan overlaps with at least one preamble packet transmission, enabling the receiver to detect the packet transmission destined to it. As mentioned in the previous section, Tgap is nondeterministic and can be large in the presence of congestion. Thus deciding the value of Tburst is non trivial. QuickMAC chooses the value of Tburst as follows. In default TinyOS implementation of X-MAC, each node performs the channel scan for about 11ms. This implies that the TinyOS implementation implicitly assumes that Tgap is smaller than 11ms. Note that, as mentioned in the previous section, in very congested networks, Tgap can be larger than 11ms. In such situations, a receiver may not be able to receive some of the packet transmissions destined to it. However, in TinyOS, the channel scan period of 11ms is empirically chosen because it yields good reception performance for most of the cases. In the evaluation section, we show that it performs reasonably well even in congested networks. Based on this observation, QuickMAC also assumes that Tgap is less than 11ms. So, Tburst is chosen to be slightly longer than 11ms. This ensures that the packet reception performance of QuickMAC is at least as good as that of default X-MAC implementation in TinyOS. In order to satisfy the condition Tnap < Tprepkt , we need to first find out the value of Tprepkt . In the original version of X-MAC, the preamble packets are of fixed size. Thus Tprepkt is fixed and Tnap can be chosen accordingly. However, in TinyOS implementation of X-MAC, data packets are themselves transmitted as preamble packets. Since the size of the data packet, i.e. Tprepkt , is application dependent, choosing Tnap is also not trivial. One possible approach is to choose Tnap smaller than the smallest possible value of Tprepkt , i.e. transmission time of a packet with no application

payload and with only minimum network headers. However, choosing small Tnap means that a sensor node needs to choose a large n (i.e. number of channel scans) in order to satisfy the condition Tburst > Tgap . Small Tnap and large n reduce the time period for which a radio transceiver sleeps, thereby increasing the duty cycle. Thus, in our current implementation of QuickMAC, we make every preamble packet 128 bytes long (maximum size allowed by IEEE 802.15.4 standard). At the transmitter side, the application payload along with the network stack headers are padded with required number of “don’t care” bytes by QuickMAC such that the total packet size is 128 bytes. At the receiver side, when QuickMAC receives a packet, it removes the padded bytes and gives the actual packet contents to the higher layer. With this technique, Tprepkt has a known value (about 4ms) and Tnap is chosen accordingly to satisfy the second condition Tnap < Tprepkt . In our current implementation of QuickMAC, we choose n = 4, Tnap = 3.6ms, Tscan = 0.708 milliseconds, which yields Tburst approximately equal to 13.6ms. This is larger than the channel scan period used by X-MAC (11ms). So, wireless communications in QuickMAC are at least as reliable as in X-MAC. In section III-A, we will verify this by using an extensive set of experiments. In fact, since the value of Tburst used by QuickMAC is greater than the channel scan period of X-MAC, the packet reception performance of QuickMAC is slightly better than that of X-MAC for congested networks. QuickMAC reduces duty cycle significantly compared to LPL approaches like X-MAC because it reduces the awake time period needed to sample the medium. For n = 4, a sensor node sleeps for (n − 1) ∗ Tnap = 10.8ms and remains awake for 2.8ms during Tburst = 13.6ms. On the other hand, in X-MAC, a sensor node remains awake during the entire channel scan period of 11ms. Thus QuickMAC reduces duty cycle significantly. QuickMAC bridges the gap between LPL schemes like B-MAC and more recent LPL schemes like X-MAC—it allows sensor nodes to perform short channel scans like B-MAC (in fact, slightly longer than B-MAC) and yet allows the transmitter to have periodic quiet gaps in the preamble sequence suitable for modern IEEE 802.15.4 based packet radios. As we will show in section III, the radio duty cycle can be further reduced by choosing n = 3, Tnap = 3.6ms and Tscan = 0.708ms. In this case, each sensor node remains awake for only n∗Tscan = 2.124ms in each duty cycle period. However, Tburst is reduced to 9.3ms ((n−1)∗Tnap +n∗Tscan), which is smaller than 11ms of channel scan period in X-MAC. Thus the packet reception reliability is degraded compared to X-MAC. In QuickMAC we choose n = 4 because this reduces duty cycle significantly compared to X-MAC, and yet the effective channel scan period, i.e. Tburst , is still higher than that in X-MAC. As a result, QuickMAC maintains a slightly higher reliability of wireless communication than X-MAC. C. Discussion Size of preamble packet: It should be noted that a preamble packet is generally longer in QuickMAC than in X-MAC.

Comparison with ContikiMAC: ContikiMAC [13] is a very recent MAC protocol that is perhaps closest to QuickMAC. [13] provides a very brief description of this protocol. It uses two short consecutive channel scans separated by 0.5ms. As mentioned above, since quiet gaps can be larger than 0.5ms, these channel scans can lie completely within a quiet gap. As we will show in the next section, our experiments show that the percentage of successfully received packets with 3 short channel scans is about 17% lower than that with 4 short channel scans. If only 2 channels scans are used as in ContikiMAC, there is even greater probability that the channel scans lie completely within a quiet gap. To solve this problem, in ContikiMAC, once a receiver detects the transmission from a transmitter and replies back with a link-layer ACK, the transmitter caches the awake time of the receiver. After that, when the transmitter needs to send a packet to the same receiver, it starts the preamble transmission exactly at the awake time of the receiver. Thus, even with two short channel scans, the receiver is likely to receive the preamble transmission. If a receiver misses the first preamble transmission due to synchronization error, there is still some probability of the receiver detecting one of the remaining preamble packets. Note that preamble packets are transmitted for at least the duration of the receiver’s sleep period. Unlike ContikiMAC, QuickMAC is completely stateless and asynchronous. [13] does not mention whether CCA checks are performed in between the preamble packets in ContikiMAC. Note that the most significant component of a quiet gap is the backoff that a node needs to perform if a CCA check fails. If no CCA checks are used, the size of the quiet gap can be reduced and even 2 channel scans separated by 0.5ms can generally detect the preamble packet. However, that makes the scheme more vulnerable to interference. Fast retransmission of preamble packets: Some radio transceivers provide a test mode which enables the transmissions of a packet in a quick succession with small gaps between the successive packets. The microcontroller first needs

to store the packet to be transmitted in the radio transceiver’s transmit buffer and enable the test mode. For example, on a CC2420 chip, this feature can be enabled by modifying the TX MODE setting in the MDMCTRL1 register [15]. On Atmel AT86RF230 radio, this can be achieved by toggling its TST mode input pin [16]. As a result, small scan period is sufficient for a receiver to detect the nearby transmission. However, this approach has several drawbacks. First, not all radio transceivers provide this feature because it is not part of IEEE 802.15.4 standard. Second, even if this feature is available, the transmitter needs to transmit a long preamble sequence (like in B-MAC) because the receiver cannot send an ACK after receiving the packet. As a result, extra energy overhead is incurred at the transmitter side because unnecessary preamble packets are transmitted even after the receiver has already received the packet. Third, these unnecessary preambles also cause the wireless channel to be occupied by the transmitter for longer time durations than actually required, thereby starving other potential transmitters. QuickMAC avoids all these problems without compromising the achievable duty cycle and reliability of wireless communication. III. E VALUATIONS We implement QuickMAC in TinyOS [14] and compare it with the X-MAC implementation in TinyOS. The experiments are performed using TMote sky motes [17]. As mentioned earlier, QuickMAC parameters are chosen as n = 4, Tnap = 3.6ms, Tscan = 0.708ms, and Tburst = 13.6ms because these values ensure that the probability of a receiver node detecting a preamble packet with short channel scans in QMAC is at least as good as in X-MAC implementation in TinyOS. A. Reliability of QuickMAC 100

Reception percentage

It is 128 bytes long in QuickMAC whereas in X-MAC, it is equal to the length of the data packet. So, except for applications where data packets are themselves 128 bytes long, QuickMAC needs to transmit longer preamble packets than X-MAC. But the large preamble packets have negligible negative impact on the performance of QuickMAC. As we will show in the next section, the packet reception quality of QuickMAC is at least as good as X-MAC, even in the presence of congestion. Furthermore, although each preamble packet is longer in QuickMAC than in X-MAC, the length of the entire preamble sequence is the same in both protocols (see conditions 2 and 4). In other words, the time period for which a node turns its radio on while transmitting a packet is same in both protocols. Since receive and transmit energy are almost same for modern radios like CC2420, the large preamble packet does not increase transmission energy cost in QuickMAC.

QuickMAC XMAC

80 60 40 20 0 1

2

3 5 Number of transmitters

10

15

Fig. 2. The percentage of successfully received packets in QuickMAC is at least as good as in X-MAC.

Since QuickMAC uses very short channel scans instead of a long channel scan as in X-MAC, an important metric that needs to be evaluated is reliability—can a sensor node running QuickMAC receive packets destined to it reliably? As discussed in the design section, in principle, QuickMAC should be at least as reliable as X-MAC. To verify this experimentally, we perform the following experiment. T transmitter nodes transmit 1000 packets each to a receiver node. The time interval between two successive packets transmitted by each

8 XMAC QuickMAC

Duty cycle (%)

6

4

2

0

Fig. 3.

200

400 600 Sleep period (ms)

800

1000

Steady steady duty cycle as a function of sleep period.

transmitter is uniformly distributed between 0.5 seconds and 1.5 seconds. We vary the number of transmitters T (1, 2, 3, 5, 10, and 15). All node are within transmission range of each other. Each experiment is repeated 5 times and the results presented here are the average values. Figure 2 shows the percentage of the packets successfully received by the receiver node as a function of the number of transmitters. We find that QuickMAC is at least as reliable as X-MAC. As the number of transmitters increases, the percentage of successfully received packets drops in both QuickMAC and X-MAC. This is because the increase in number of transmitters increases the congestion. Note that each node transmits at an average rate of one packet per second. Interestingly, we find that QuickMAC is slightly better than X-MAC in the presence of congestion. In congested networks, quiet gaps in the preamble sequence can become large compared to non-congested networks because a transmitter may need to backoff multiple times before a CCA check succeeds. As a result, a longer channel scan period (Tburst in QuickMAC and Tscan in X-MAC) may be required to make sure that the channel scan overlaps with at least one preamble packet. Since Tburst in QuickMAC is slightly longer than Tscan in XMAC (13.6ms vs 11ms), QuickMAC exhibits slightly better reliability than X-MAC in congested networks. B. Steady state duty cycle Next we compare steady state duty cycle achieved by QuickMAC and X-MAC. By steady state duty cycle, we mean the duty cycle experienced by a node when there is no packet transmission going on in its neighborhood. In such situations, as shown in the left side of figure 1-b and 1-c, a node sleeps for Tsleep period, wakes up for Tscan period in X-MAC and Tburst period in QuickMAC to scan the channel, and repeats the process. In X-MAC, it wakes up for about 11ms, while in QuickMAC, it wakes up for short channel scan durations and takes a nap between the successive scans. Steady state duty cycle is a very good approximation of actual duty cycle experienced by sensor nodes in many practical deployments. For example, in applications with infrequent data transmissions (e.g. rare event detection), the actual duty cycle is very close to the steady state duty cycle. As we will show

in the next section, except for very high data rate applications, the actual duty cycle is close to the steady state duty cycle. Figure 3 compares the steady state duty cycle of QuickMAC with that of X-MAC as a function of the sleep period Tsleep . Obviously an increase in sleep period reduces the duty cycle. We find that for every sleep period, the steady state duty cycle in X-MAC is about 3.9 times that in QuickMAC. Since radio activity is the major source of energy consumption in WSNs, a 3.9 factor improvement in duty cycle translates to significant saving of energy and increase in lifetime of the sensor node. We also find that if we choose n = 3, Tnap = 3.6ms, then Tburst would be about 9.3ms. This reduces the duty cycle by about 35.6% compared to the results shown in figure 3 for n = 4. However, with n = 3, Tburst (= 9.3ms) is smaller than the channel scan period of X-MAC (11ms). As a result, for the similar experiments as in figure 2, we find that QuickMAC with n = 3 reduces the percentage of successfully received packets at the receiver by about 17% compared to X-MAC. Thus, in this paper, we present results only for QuickMAC with n = 4. However, it should be noted that if an application can tolerate some packet losses (say by using retransmission policy at the higher layer), QuickMAC can be configured to achieve even better duty cycle than the results presented in this paper. C. Duty cycle in the presence of packet transmissions Next we compare the duty cycle of X-MAC and QuickMAC in the presence of packet transmissions. In this experiment, T transmitters transmit 1000 packets each to a receiver node. The interval between two successive packets transmitted by each transmitter is uniformly distributed between τ /2 to 3τ /2 where τ is the average inter packet interval. We vary the number of transmitters T and average packet interval τ in our experiments. Each experiment is repeated 3 times and the results presented here are the average values. Figure 4-a, b, c, and d show the average duty cycle experienced by the receiver node as a function of τ for 1, 5, 10, and 15 transmitters, respectively. Note that, in X-MAC the awake time period of a node depends on the size of the packet transmitted. Thus each figure has 2 plots for X-MAC. The first plot (X-MAC large packet) is for the case where application payload of the transmitted packet is 113 bytes long. Considering the headers added by the lower layers, the total size of the packet is close to 128 bytes, the maximum packet size allowed in IEEE 802.15.4 standard. In the second XMAC plot (X-MAC small packet), the application layer puts one byte as the payload in the packet to be transmitted and lower layers add their headers to it. These two cases thus approximately represent the packet sizes at the two extreme ends. Note that in QuickMAC, the preamble packets are all 128 bytes long. Figure 4 shows that QuickMAC reduces the duty cycle at the receiver significantly compared to X-MAC. X-MAC with large packet has slightly higher receiver duty cycle than XMAC with small packet. For other packet packet sizes, the duty cycle lies within this range. As the inter packet interval

XMAC_large_packet XMAC_small_packet QuickMAC

4 3 2 1 0

0

20

40 60 80 100 Average inter-packet interval (sec)

Receiver duty cycle (%)

Receiver duty cycle (%)

5

4

2

0

120

XMAC_large_packet XMAC_small_packet QuickMAC

6

0

20

(a) 10

8

Receiver duty cycle (%)

Receiver duty cycle (%)

120

(b)

10 XMAC_large_packet XMAC_small_packet QuickMAC

6 4 2 0

40 60 80 100 Average inter-packet interval (sec)

0

20

40 60 80 100 Average inter-packet interval (sec)

120

(c) Fig. 4.

XMAC_large_packet XMAC_small_packet QuickMAC

8 6 4 2 0

0

20

40 60 80 100 Average inter-packet interval (sec)

120

(d)

Receiver duty cycle for (a) 1, (b), 5, (c) 10, and (d) 15 transmitters transmitting to a single receiver.

increases, the receiver duty cycle approaches the steady state duty cycle. At average inter packet interval of 120 seconds, the receiver duty cycle is very close to the steady state duty cycle, especially for small number of transmitters. The receiver duty cycle decreases with the increase in packet interval. Beyond some interval, the receiver duty cycle becomes almost constant because for higher packet interval, the awake time for a node to receive the packets is negligible compared to awake time for idle listening. Obviously, duty cycle is high for large number of transmitters than for small number of transmitters because with more transmitters, the receiver needs to be awake for longer time period to receive large number of packets. Compared to highly congested situation where many transmitters transmit packets at high rate, QuickMAC’s advantage over X-MAC is more pronounced in less congested situations. This is obvious, because in congested network, the awake time of a receiver is dominated by the time it turns its radio transceiver on to receive the packets while in less congestion scenarios, the awake time is dominated by the idle listening periods. Figure 5 shows the average duty cycle experienced by a transmitter for the same experiments. The results are similar to the receiver duty cycle results in figure 4 except that the transmitter duty cycle is higher than receiver duty cycle for high data rates. This is because, while transmitting a packet, a transmitter is awake for the entire preamble transmission duration. The receiver, on the other hand, wakes up at some time instant after the preamble transmission has started. Thus, the receiver remains awake for shorter time period to receive

a packet compared to the transmitter awake time. But for low data rates, the awake time is dominated by idle listening in both transmitter and the receiver. Thus receiver and transmitter duty cycles are comparable for low data rates and approach steady state duty cyle as the data rate decreases. D. Single hop latency From the above experiments, we find that for a given sleep period Tsleep , QuickMAC reduces the duty cycle significantly compared to X-MAC, while maintaining slightly better reliability of wireless communications. Alternatively, since QuickMAC’s channel scan period is much smaller than that of X-MAC, QuickMAC can achieve same duty cycle as X-MAC, even by using smaller Tsleep . The reduction in Tsleep results in proportional reduction in per-hop latency and increase in throughput. For many WSN applications, packet delivery delay may not be an important metric. Nevertheless, in some cases it may be significant because the overall endto-end delay accumulates over multiple hops. For example, the communication pattern can be bursty in many practical applications. Reducing delay during burst transmissions can be significant in such cases. Figure 6 plots sleep periods of X-MAC and QuickMAC as a function of steady state duty cycle. Note that, the actual duty cycle experienced by sensor nodes are close to the steady state duty cycle except for very high data rate applications. In QuickMAC, a sensor node needs to sleep about one fourth the time period it needs to sleep in X-MAC to achieve the same

Transmitter duty cycle (%)

Transmitter duty cycle (%)

8 XMAC_large_packet XMAC_small_packet QuickMAC

6

4

2

0

0

20

40 60 80 100 Average inter-packet interval (sec)

8

6

4

2

0

120

XMAC_large_packet XMAC_small_packet QuickMAC

0

20

(a)

8

Transmitter duty cycle (%)

Transmitter duty cycle (%)

10 XMAC_large_packet XMAC_small_packet QuickMAC

6 4 2

0

20

40 60 80 100 Average inter-packet interval (sec)

120

(c) Fig. 5.

Sleep period(ms)

XMAC_large_packet XMAC_small_packet QuickMAC

6 4 2 0

0

20

40 60 80 100 Average inter-packet interval (sec)

120

Average transmitter duty cycle for (a) 1, (b), 5, (c) 10, and (d) 15 transmitters transmitting to a single receiver.

2000 XMAC QuickMAC

1600 1200 800 400

0

8

(d)

duty cycle.

0

120

(b)

10

0

40 60 80 100 Average inter-packet interval (sec)

0.5

1 1.5 Duty cycle(%)

2

Fig. 6. Even by sleeping for about one fourth the sleep period of X-MAC, QuickMAC achieves the same duty cycle as X-MAC.

IV. R ELATED W ORK Reliability of wireless communications and energy conservation are two important research topics in the WSN community. Many techniques can be used at various layers of the communication stack to achieve these goals. Reliability and energy conservation often present conflicting requirements. For example, retransmission is a commonly used technique in link, network, and higher layers for enhancing the reliability of communication. On the other hand, various protocols operating in these layers also attempt to reduce the number of radio transmissions to save energy. In this paper, we focus on radio

duty cycling scheme implemented in link layer to achieve reliability and low energy consumption. Existing radio duty-cycling approaches can be broadly classified into three categories — synchronous, asynchronous, and hybrid. Synchronous approaches like SMAC [8], TMAC [9], and DW-MAC [6] use TDMA like mechanisms to activate the radios of the sensor nodes simultaneously so that they can communicate with each other. The requirement of time synchronization among the nodes is the biggest disadvantage of such schemes. In practical WSN deployments, synchronization is complicated by various factors, e.g. scale of the network, node mobility, etc. The sensor nodes need to exchange synchronization control packets regularly, causing extra energy overhead. Asynchronous approaches like B-MAC [10] and X-MAC [7], on the other hand, do not require time synchronization among the sensor nodes. They use low power listening (LPL) where a sender transmits a long preamble before each MAC frame. Since the preamble is made at least as long as the sleep period of the receiver, the receiver is guaranteed to receive the frame. Early LPL schemes like B-MAC can achieve low duty cycle by using short channel scans, but they cannot be used with modern packet radios. Recent LPL schemes like X-MAC can be used with modern packet radios, but they need longer channel scans. Hybrid schemes [18], [19], [20] achieve low duty cycle if sensor nodes are synchronized, and provide reliable but high duty cycle functionality if they are out of sync. In WiseMAC

[18], each node stores the wake-up times of the neighbors with which it needs to communicate. WiseMAC reduces the preamble length by transmitting the packet close to the wake up time of the receiver. The length of the channel scan period in WiseMAC is similar to that in X-MAC. ContikiMAC [13] is similar to WiseMAC except that it uses short channel scans. Since a transmitter synchronizes its transmission time with the receiver’s awake time, a receiver can generally detect the preamble packets even with the short channel scans. Unlike WiseMAC and ContikiMAC, QuickMAC is a completely stateless and asynchronous protocol. SCP-MAC [20] attempts to align the receive check instants of the sensor nodes. Z-MAC [19] increases channel utilization and fairness by combining TDMA time slots with channel sampling functionality of asynchronous protocols. The above mentioned protocols are sender oriented—a sender initiates the transmission by transmitting preamble packets. In receiver oriented schemes [5], [21], [22], [23], each node periodically transmits short probes to let the potential transmitters know that it is awake and can receive the packet. Receiver oriented schemes do not require long preambles and handle hidden terminal problems better than sender oriented schemes [21]. However, periodic probes in receiver oriented schemes are more energy expensive than channel scans in sender oriented protocols [24]. V. C ONCLUSION AND FUTURE WORK In this paper, we presented a detail study of the relationship between energy conservation and reliability caused by low power link layer duty cycling mechanism used in WSNs. We presented the design, implementation, and evaluation of QuickMAC—a novel duty cycling protocol for WSNs. QuickMAC reduces the radio duty cycle by a factor of about 4 compared to the state of the art scheme X-MAC, and still guarantees the same level of reliability of wireless communication as X-MAC. QuickMAC reduces the energy consumption due to idle listening by using short channel scans, and yet allows the transmitter to transmit packetized preambles with quiet gaps in between the preamble packets. QuickMAC is a completely asynchronous and stateless protocol. We plan to investigate the reduction in duty cycle due to QuickMAC in multi-hop networks, where sensor nodes transmit sensor data to central collection points via multiple hops, using a collection routing protocol like Ctp [25]. We plan to study the effect of low power listening on end to end reliability of the collection protocol. Also, it will be interesting to analyze the latency caused by low power listening as a function of number of hops in the routing path. We also plan to study the actual reduction in energy consumption achieved by QuickMAC compared to X-MAC. R EFERENCES [1] I. Talzi, A. Hasler, S. Gruber, and C. Tschudin, “Permasense: investigating permafrost with a wsn in the swiss alps,” Proceedings of the 4th ACM workshop on Embedded networked sensors, pp. 8–12, 2007. [2] J. Koo, R. Panta, S. Bagchi, and L. Montestruque, “A tale of two synchronizing clocks,” Proceedings of the 7th ACM Conference on Embedded Networked Sensor Systems, pp. 239–252, 2009.

[3] P. Zhang, C. Sadler, S. Lyon, and M. Martonosi, “Hardware design experiences in ZebraNet,” Proceedings of the 2nd ACM International Conference on Embedded Networked Sensor Systems, pp. 227–238, 2004. [4] C. Sadler and M. Martonosi, “Data compression algorithms for energyconstrained devices in delay tolerant networks,” Proceedings of the 4th International Conference on Embedded Networked Sensor Systems, pp. 265–278, 2006. [5] Y. Sun, O. Gurewitz, and D. Johnson, “Ri-mac: a receiver-initiated asynchronous duty cycle mac protocol for dynamic traffic loads in wireless sensor networks,” Proceedings of the 6th ACM conference on Embedded network sensor systems, pp. 1–14, 2008. [6] Y. Sun, S. Du, O. Gurewitz, and D. Johnson, “Dw-mac: a low latency, energy efficient demand-wakeup mac protocol for wireless sensor networks,” Proceedings of the 9th ACM international symposium on Mobile ad hoc networking and computing, pp. 53–62, 2008. [7] M. Buettner, G. Yee, E. Anderson, and R. Han, “X-mac: a short preamble mac protocol for duty-cycled wireless sensor networks,” Proceedings of the 4th international conference on Embedded networked sensor systems, pp. 307–320, 2006. [8] W. Ye, J. Heidemann, and D. Estrin, “An energy-efficient mac protocol for wireless sensor networks,” Proceedings of the 21st IEEE International Conference on Computer Communications, 2002. [9] T. Van Dam and K. Langendoen, “An adaptive energy-efcient mac protocol for wireless sensor networks,” Proceedings of the 1st ACM International Conference on Embedded Networked Sensor Systems, pp. 171–180, 2003. [10] J. Polastre, J. Hill, and D. Culler, “Versatile low power media access for wireless sensor networks,” Proceedings of the 2nd international conference on Embedded networked sensor systems, pp. 95–107, 2004. [11] [Online]. Available: http://www.chipcon.com [12] J. Hill, R. Szewczyk, A. Woo, S. Hollar, D. Culler, and K. Pister, “System architecture directions for networked sensors,” ACM Sigplan Notices, vol. 35, no. 11, pp. 93–104, 2000. [13] A. Dunkels, L. Mottola, N. Tsiftes, F. Osterlind, J. Eriksson, and N. Finne, “The announcement layer: Beacon coordination for the sensornet stack,” 8th European Conference on Wireless Sensor Networks, 2011. [14] [Online]. Available: http://www.tinyos.net [15] [Online]. Available: http://www.ti.com [16] [Online]. Available: http://www.atmel.com [17] J. Polastre, R. Szewczyk, and D. Culler, “Telos: enabling ultra-low power wireless research,” Information Processing in Sensor Networks, 2005. IPSN 2005. Fourth International Symposium on, pp. 364–369, 2005. [18] A. El-Hoiydi, J. Decotignie, C. Enz, and E. Le Roux, “Poster abstract: wisemac, an ultra low power mac protocol for the wisenet wireless sensor network,” Proceedings of the 1st international conference on Embedded networked sensor systems, pp. 302–303, 2003. [19] I. Rhee, A. Warrier, M. Aia, J. Min, and M. Sichitiu, “Z-mac: a hybrid mac for wireless sensor networks,” IEEE/ACM Transactions on Networking (TON), vol. 16, no. 3, pp. 511–524, 2008. [20] W. Ye, F. Silva, and J. Heidemann, “Ultra-low duty cycle mac with scheduled channel polling,” Proceedings of the 4th international conference on Embedded networked sensor systems, pp. 321–334, 2006. [21] P. Dutta, S. Dawson-Haggerty, Y. Chen, C. Liang, and A. Terzis, “Design and evaluation of a versatile and efficient receiver-initiated link layer for low-power wireless,” Proceedings of the 8th ACM Conference on Embedded Networked Sensor Systems, pp. 1–14, 2010. [22] Y. Sun, O. Gurewitz, S. Du, L. Tang, and D. Johnson, “Adb: an efficient multihop broadcast protocol based on asynchronous duty-cycling in wireless sensor networks,” Proceedings of the 7th ACM Conference on Embedded Networked Sensor Systems, pp. 43–56, 2009. [23] A. El-Hoiydi and J. Decotignie, “Low power downlink mac protocols for infrastructure wireless sensor networks,” Mobile Networks and Applications, vol. 10, no. 5, pp. 675–690, 2005. [24] P. Dutta, S. Dawson-Haggerty, Y. Chen, C. Liang, and A. Terzis, “Design and evaluation of a versatile and efficient receiver-initiated link layer for low-power wireless,” Proceedings of the 8th ACM Conference on Embedded Networked Sensor Systems, pp. 1–14, 2010. [25] O. Gnawali, R. Fonseca, K. Jamieson, D. Moss, and P. Levis, “Collection tree protocol,” Proceedings of the 7th ACM Conference on Embedded Networked Sensor Systems, pp. 1–14, 2009.