An Adaptive Energy-Efficient MAC Protocol For Wireless Sensor Networks
An Adaptive Energy-Efficient MAC Protocol For Wireless Sensor Networks
An Adaptive Energy-Efficient MAC Protocol For Wireless Sensor Networks
Koen Langendoen
K.G.Langendoen@its.tudelft.nl
ABSTRACT
1. INTRODUCTION
In this paper we describe T-MAC, a contention-based Medium Access Control protocol for wireless sensor networks.
Applications for these networks have some characteristics
(low message rate, insensitivity to latency) that can be exploited to reduce energy consumption by introducing an
active/sleep duty cycle. To handle load variations in time
and location T-MAC introduces an adaptive duty cycle in
a novel way: by dynamically ending the active part of it.
This reduces the amount of energy wasted on idle listening,
in which nodes wait for potentially incoming messages, while
still maintaining a reasonable throughput.
We discuss the design of T-MAC, and provide a head-tohead comparison with classic CSMA (no duty cycle) and
S-MAC (fixed duty cycle) through extensive simulations.
Under homogeneous load, T-MAC and S-MAC achieve similar reductions in energy consumption (up to 98 %) compared
to CSMA. In a sample scenario with variable load, however,
T-MAC outperforms S-MAC by a factor of 5. Preliminary
energy-consumption measurements provide insight into the
internal workings of the T-MAC protocol.
General Terms
Design, Experimentation, Measurement, Performance
Keywords
Ad-hoc, sensor networks, MAC protocol, energy-efficiency
Permission to make digital or hard copies of all or part of this work for
personal or classroom use is granted without fee provided that copies are
not made or distributed for profit or commercial advantage and that copies
bear this notice and the full citation on the first page. To copy otherwise, to
republish, to post on servers or to redistribute to lists, requires prior specific
permission and/or a fee.
SenSys03, November 57, 2003, Los Angeles, California, USA.
Copyright 2003 ACM 1-58113-707-9/03/0011 ...$5.00.
2.1 mA
1.6 A
10 mA
4 mA
20 A
1.4 Outline
We present T-MACTimeout-MAC, an adaptive energyefficient MAC protocol for wireless sensor networks that
minimizes idle listening, while considering wireless sensor
communication patterns and hardware limitations. In Section 2, we will describe some existing energy-saving solutions. Then, in Section 3, we will elaborate on the design
of the T-MAC protocol, problems we encountered, and the
novel way in which we solved these problems. In Section 4,
we will describe our simulation setup, followed by a detailed
report of our results. In Section 5 we report the measured
energy consumption of a limited T-MAC implementation
running on a pair of Eyes nodes.
2. RELATED WORK
There are several solutions addressing the problem of energy waste due to idle listening. In general, some kind of
duty cycle is involved, which lets each node sleep periodically. For example, TDMA-based protocols are naturally
energy preserving, because they have a duty cycle built-in,
and do not suffer from collisions [2]. However, maintaining
a TDMA schedule in an ad-hoc network is not an easy
task and requires much complexity in the nodes. Keeping a
list of neighbors schedules takes valuable memory capacity.
Allocating TDMA slots is a complex problem that requires
coordination. Furthermore, as TDMA divides time into very
small slots, the effect of clock drift can be disastrous; exact
timing is critical.
Another way of energy saving is to use an extra radio
the so-called wake-up radio, which operates on a different
frequency than the radio used for communication [7]. As the
wake-up radio is only for waking up other nodes, it needs
no data processing and therefore uses much less energy. It
does, however, require an extra component on the node and
most wireless sensor nodes currently used in research only
have a single radio that operates on a single frequency.
Introducing a duty cycle into a contention-based (CSMA)
protocol that only uses a single frequency requires some kind
of in-band signalling. The well known IEEE 802.11 protocol,
for example, has power-saving features, even when working
in ad-hoc mode [4]. However, this protocol was designed
with the presumption that all nodes are located in a single
network cell, while wireless sensor networks will often be
multi-hop. Adaptations for multi-hop networks have been
proposed, but seem to require more complexity and dynamic
state than would generally be available in wireless sensor
networks [10].
The TinyOS project [14] includes a sensor-networks specific optimization of the basic CSMA protocol that tackles the idle-listening problem: by sending out a very long
preamble, receivers only need to weak up periodically to
sense activity. This shifts the cost from the receiver (the frequent case) to the transmitter (the rarer case). The TinyOS
approach, briefly discussed in [3], is basically an optimization at the physical layer and may be applied in combination
with link-layer (MAC) solutions discussed next.
Another protocol specifically designed for sensor networks
is S-MAC [12]. The basic idea of this single-frequency contention-based protocol is that time is divided intofairly
largeframes. Every frame has two parts: an active part
and a sleeping part. During the sleeping part, a node turns
off its radio to preserve energy. During the active part, it
normal
normal
active time
active state
sleep state
S-MAC
3.
TA
sleep time
TA
TA
T-MAC
A node will sleep if it is not in an active period. Consequently, TA determines the minimal amount of idle listening
per frame.
The described timeout scheme moves all communication
to a burst at the beginning of the frame. Since messages
between active times must be buffered, the buffer capacity
determines an upper bound on the maximum frame time.
1
Through a Received Signal Strength Indication (RSSI)
signal from the radio.
contend
RTS
CTS
DATA
ACK
B
C
contend
TA
RTS retries
When a node sends an RTS, but does not receive a CTS
back, one of three things has happened:
1. the receiving node has not heard the RTS due to collision; or
2. the receiving node is prohibited from replying due to
an overheard RTS or CTS; or
3. the receiving node is asleep.
When the sending node receives no answer within the interval TA, it might go to sleep. However, that would be wrong
in cases 1 and 2: we would then have a situation where the
sending node goes to sleep, while the receiving node is still
awake. Since this situation might occur even at the first
message of the frame, the throughput would (and did, in
our preliminary experiments) dramatically decrease.
Therefore, a node should retry by re-sending the RTS if it
receives no answer. If there is still no reply after two retries,
it should give up and go to sleep.
Determining TA
contend
RTS
CTS
DATA
ACK
B
C
D
contend
RTS
CTS DS
DATA
ACK
B
contend
active
C
sleep
RTS?
TA
contend
active
active
FRTS
RTS
TA
Future request-to-send
The first solution is a scheme that we call future request-tosend. The idea is to let another node know that we still
have a message for it, but are ourselves prohibited from
using the medium. It works as follows: if a node overhears a
CTS packet destined for another node, it may immediately
send a future-request-to-send (FRTS) packet, like node C
in Figure 5. The FRTS packet contains the length of the
blocking data communication (this information was in the
CTS packet). A node must not send an FRTS packet if
it senses communication right after the CTS, or if it is
prohibited from sending due to a prior RTS or CTS.
A node that receives an FRTS packet knows it will be
the future target of an RTS packet and must be awake by
that time. The node can determine this from the timing
information in the FRTS packet.
As the FRTS packet would otherwise disturb the data
packet that follows the CTS, the data packet must be postponed for the duration of the FRTS packet. To prevent
any other node from taking the channel during this time,
the node that sent the initial RTS (node A in Figure 5)
transmits a small Data-Send (DS) packet. After the DS
packet, it must immediately send the normal data packet.
Since the FRTS packet has the same size as a DS packet,
it will collide with the DS packet, but not with the following
data packet. The DS packet is lost, but that is no problem:
it contains no useful information.
For the FRTS solution to work, TA must be increased
with the length of a control packet (CTS), as follows from
Figure 5. Implementing the FRTS feature increased the
maximum throughput in unidirectional communication patterns by approximately 75%. However, due to the somewhat
higher overhead of DS and FRTS packets, energy consumption also increases slightly. One may want to use FRTS
packets only if a reasonably high load in a more or less
unidirectional communication pattern is expected. Note,
however, that when the load is low, the number of exchanged
packets, and therefore the increased overhead, is also low.
contend
contend
B
C
contend
RTS
RTS CTS
DATA
ACK
TA
4.
EXPERIMENTS
4.2 Results
We start with a simple benchmark, where network load
is homogeneous. We then introduce experiments based on
communication patterns and end with a complete, realistic
scenario.
Except for the complete scenario, we exercised all experiments with multiple network loads. The load is on the
horizontal axes of the graphs. The vertical axes show the
energy consumption in the network, since this is our main
design criterion.
Since throughput is not completely unimportant, we will
end each graph at the point where less than 90% of the
messages are correctly received. In a multi-hop pattern, like
nodes-to-sink, this means that we want 90% of all messages
to finally reach the sink node. We do not use the 90%restriction for CSMA: since CSMA has no built-in retransmits, it is far less reliable.
The message lengths are data payload sizes, and do not
include the MAC header: 4 bytes for CSMA, 6 bytes for
S-MAC and T-MAC.
3.5
3.5
energy used [avg. mA/node]
3
2.5
2
1.5
1
3
2.5
2
1.5
1
0.5
0.5
CSMA
S-MAC
T-MAC
CSMA
S-MAC
T-MAC
0
0
20
40
60
80
100
20
40
60
80
100
Figure 7: Homogeneous local unicast for small (left) and large messages (right). The numbers on the S-MAC
line indicate the length of the active time per 1-second frame.
Nodes-to-sink, msglength=100
4.5
3.5
3.5
energy used [avg. mA/node]
Nodes-to-sink, msglength=20
4.5
3
2.5
2
1.5
1
3
2.5
2
1.5
1
0.5
0.5
CSMA
S-MAC
T-MAC
CSMA
S-MAC
T-MAC
0
0
6
8
load [byte / node / s]
10
12
6
8
load [byte / node / s]
10
12
Figure 8: Nodes-to-sink performance for small (left) and large messages (right).
We expect that the homogeneous experiment is the best
case for the S-MAC protocol, since the load is constant in
both time and location. We see that the T-MAC protocol
performs as well as the (per load tuned) S-MAC protocol.
The fact that the T-MAC protocol uses even less energy
than S-MAC is due to the fact that we tested the S-MAC
protocol only with a limited number of discrete lengths of
the active time. To get an optimal parameter value for each
load, the S-MAC protocol would require complicated tuning,
as it would in real deployment. The adaptive behavior of
T-MAC, on the other hand, requires no explicit tuning.
Figure 7(right) shows that that the maximum throughput of the T-MAC protocol with large messages (100 byte
payload) is less than that of the S-MAC protocol. This is
mainly due to variations on the early sleeping problem as
described in Section 3.5.
Nodes-to-sink communication
(Figure 8) In this experiment, nodes send messages to a
single sink node at the corner of the network. Messages
are routed from node to node with a (slightly randomized)
shortest path algorithm. No data aggregation is used. For
the T-MAC protocol, we used overhearing avoidance, the
full-buffer priority mechanism, and the FRTS mechanism.
1.2
4.5
4
0.8
FRTS + prio
1
FRTS
0.6
prio
0.4
no measures
0.2
3.5
3
2.5
2
1.5
1
CSMA
S-MAC
T-MAC
0.5
0
0
0
20
60
80
100
120
140
160
40
3
2.5
2
1.5
1
0.5
0
CSMA
S-MAC
T-MAC
5. REAL IMPLEMENTATION
After optimizing the T-MAC protocol using simulations,
we implemented most of the protocol on the actual EYES
hardware [13]. We did not implement all features. To test
the effectiveness of the full-buffer-priority and future-RTS
schemes, a large-scale experiment is needed, involving a lot
of nodes. Since there was no time to do such an experiment,
implementation of these features was senseless.
We have also not implemented the possibility to keep
multiple schedules yet. Although this is fairly easy to implement, we have only tested T-MAC with single-cluster
configurations.
During testing, we noted that the nodes schedules would
drift apart relatively fast. Even though the time-keeping on
20
25
18
RTS
16
DATA
RTS
DATA
RTS
DATA
20
12
current [mA]
current [mA]
14
10
8
15
10
6
4
TA
CONTEND
CTS
2
0
CTS
ACK
CONTEND
CTS
ACK
CONTEND
ACK
0
0
10
6.18
6.2
time [s]
6.22
6.24
6.26
6.28
time [s]
20
18
16
current [mA]
14
12
10
8
6
4
2
0
0
10
time [s]
Figure 13: Trace of the electrical current, transmitting node, full speed.
all nodes is based on ticks of a quartz crystal, some of the
nodes became unreachable within as little as 10 minutes.
We had not simulated this effect.
To solve the drift problem, we used a simple correction
scheme: when a node receives a SYNC message that contains almost, but not exactly, its own schedule, the node
adjusts its own schedule towards the received schedule. To
allow a converging situation, the schedule is only adjusted
for 50% of the difference between the two schedules.
The drift correction solved the problem: an experiment
showed that nodes were still perfectly synchronized after
more than 10 hours.
The final implementation performs well. When sending a
continuous stream of data messages, the nodes rarely go
to sleep. But when no messages are sent, the indication
LEDs on the nodes blink peacefully. The radio is then in
the receive mode for 15 ms out of every 610 ms, which is
less than 2.5% of the time.
transmit mA
receive mA
0
1
10
0.138
0.400
1.516
0.138
0.246
0.890
max
9.590
7.473
6.
7.
ACKNOWLEDGEMENTS
8.
REFERENCES