Analysis of S-MAC/T-MAC Protocols For Wireless Sensor Networks

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Proceedings of the 10th WSEAS International Conference on COMMUNICATIONS, Vouliagmeni, Athens, Greece, July 10-12, 2006 (pp260-265)

Analysis of S-MAC/T-MAC Protocols for Wireless Sensor Networks


WOOCHUL LEE*, YUTAE LEE*, SOONGHEE LEE**, DONGIL KIM*
*Department of Information and Communications Engineering
Dong-Eui University,
996 Eomgwan-no, Busanjin-gu, Busan 614-714, Korea
**Department of Information and Communications Engineering
InJe University
607 Obang-dong, Gimhae, Gyeongnam 621-749, Korea

Abstract: - In this paper, S-MAC(Sensor MAC) is based on the concept of the ‘listen/sleep mode cycle’ and is
single-frequency contention-based protocol for sensor networks. This applies message passing to reduce
contention latency for sensor-network applications that require store-and-forward processing as data moves
through the network. However, unlike the S-MAC, where the duration of the cycle is fixed, T-MAC(Time-out
MAC) introduces an adaptive duty cycle in a novel way: by dynamical 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. The novel idea of the T-MAC protocol is to reduce idle listening by
transmitting all messages in bursts of variable length, and sleeping between bursts. In this paper we discuss the
design of these two Protocols. We analyze them from the aspect of power savings using the OMNET++ simulator
and real environment with MICA Mote2 kit on MIB510 Sensor board with simulation application, Surge-View.

Key-Words: - sensor networks, S-MAC/T-MAC protocol, Energy-Efficiency

1 Introduction Therefore in this paper, we more focus on the


contention-based MAC protocol.
Wireless sensor networks have an additional aspect:
as sensor nodes are generally battery-operated, energy 2 S-MAC
consumption is very important. And it consists of a
considerable amount of smart sensor nodes with S-MAC[1] is a contention-based random access
limited battery life and energy expensive short-range protocol with a fixed listen/sleep cycle. It uses a
radio communication. Due to these energy critical coordinated sleeping mechanism, similar to the power
characteristics and high probability of network failure, saving mechanism of IEEE 802.11[7]. A time frame in
wireless sensor networks need an efficient MAC S-MAC is divided into two parts: one for a sleeping
protocol design. Especially, minimizing power session and the other for a listening session (See Fig.
consumption is a main goal in sensor MAC protocol 1). Just only for a listen period, sensor nodes are able
design because a power drain of each sensor node can to communicate with other nodes and send some
stop all the necessary functions of sensor networks. control packets such as SYNC, RTS, and CTS.
Over the years power-saving issues, therefore, have The real goal in S-MAC design is to reduce energy
received much attention on developing energy consumption from all the sources that we have
efficient MAC protocols in wireless sensor networks identified to cause energy waste(collision, overhearing,
[1-6]. These protocols can be classified into 2 parts, idle listening, and control overhead) while supporting
schedule-based [3, 4] and contention-based [1, 2, 5, 6]. good scalability and collision avoidance. To achieve
Schedule-based protocols are naturally energy the design goal, we will discuss the S-MAC that
preserving in that they have a duty cycle built-in with consists of three major components: periodic listen
an inherent collision-free nature, but they often have and sleep, collision and overhearing avoidance, and
high complexity in design due to a non-trivial problem message passing.
of synchronization in wireless sensor networks.
Proceedings of the 10th WSEAS International Conference on COMMUNICATIONS, Vouliagmeni, Athens, Greece, July 10-12, 2006 (pp260-265)

2.1 Periodic Sleep and Listen state There is a duration field in each transmitted packet
Each of nodes in sensor network actually has a that indicates how long the remaining transmission
fixed cycle consisting of three different states, will be. So if a node receives a packet destined to
initiation, sleep, and listen. The first step, init state, another node, it knows how long it has to keep silent.
when a node is spread into the field, is to initiate and The node records this value in an variable called the
start its own schedule, and then each node goes to network allocation vector (NAV) [1] and sets a timer
sleep for some time and then wakes up to listen if any for it. Every time when the NAV timer fires, the node
other node wants to talk to it. So the cycle for decrements the NAV value until it reaches zero. When
sleep/listen period is repeated until it is switched off a node has data to send, it first looks at the NAV. If its
due to its battery life. For the sleep period, the node value is not zero, the node determines that the medium
turns off its radio, and determine a timer to awake is busy. This is called virtual carrier sense.
itself later. All nodes are free to choose their own Physical carrier sense is performed at the physical
listen/sleep schedules. However, to reduce control layer by listening to the channel for possible
overhead, we prefer neighboring nodes to synchronize transmissions. The randomized carrier sense time is
together. This means they listen at the same time and very important for collision avoidance. The medium is
go to sleep concurrently. It should be noticed that not determined as free if both virtual and physical carrier
all neighboring nodes can synchronize together in a sense indicate that it is free. All senders perform
multi-hop network. Nodes broadcast their schedules carrier sense before initiating a transmission.
to exchange their own for its immediate neighbors. Broadcast packets are sent without using RTS/CTS.
If there are multiple neighbors, Nodes should Unicast packets follow the sequence of
contend for the medium by using RTS (Request To RTS/CTS/DATA/ACK between the sender and the
Send) and CTS (Clear To Send) packets when the receiver.
node is listening. The node who first sends out the
RTS packet wins the medium, and the receiver will 2.4 Message Passing
reply with a CTS. After they start data transmission, This subsection describes how to efficiently
they do not follow their sleep schedules until they transmit a long message. A message can be a long
finish transmission. series of packets, and usually the receiver needs to
obtain all the data units before it can perform
2.2 Overhearing Avoidance in-network data processing or aggregation. The
In proposed MAC like IEEE 802.11, each node disadvantage of transmitting a long message as a
overhears lots of packets that are not directed to itself. single packet is the high cost of re-transmitting the
This is a significant waste of energy, especially when long packet if only a few bits have been corrupted in
node density is high and traffic lode is heavy. S-MAC the first transmission. S-MAC approach is to fragment
tries to avoid overhearing by letting interfering nodes the long message into many small fragments, and
go to sleep after they hear an RTS or CTS packet. transmit them in burst. Only one RTS packet and one
Since DATA packets are normally much longer than CTS packet are used. They reserve the medium for
control packets, the approach prevents neighboring transmitting all the fragments. Every time a data
nodes from overhearing long DATA packets and the fragment is transmitted, the sender waits for an ACK
following ACKs. Therefore, all immediate neighbors from the receiver. If it fails to receive the ACK, it will
of both the sender and the receiver should sleep after extend the reserved transmission time for one more
they hear the RTS or CTS packet until the current fragment, and re-transmit the current fragment
transmission is over. immediately. All packets have the duration field,
which is now the time needed for transmitting all the
remaining data fragments and ACK packets. If a
2.3 Collision Avoidance neighboring node hears a RTS or CTS, it will go to
Collision due to multiple senders may occur when sleep for the time that is needed to transmit all the
more then two node want to send some packet to same fragments. Switching the radio from sleep to active
node in the multi-hop network. So S-MAC adapt the does not occur instantaneously. Therefore, it is
RTS/CTS mechanism to address the Collision and the desirable to reduce the frequency of switching modes.
hidden terminal problem[15]. In order to achieve that The message passing scheme tries to put nodes into
mechanism efficiently, it uses the physical and virtual sleep state as long as possible, and hence reduces
carrier sensing.
Proceedings of the 10th WSEAS International Conference on COMMUNICATIONS, Vouliagmeni, Athens, Greece, July 10-12, 2006 (pp260-265)

switching overhead. The purpose of using ACK after packet transmissions may occur in the corresponding
each data fragment is to prevent the hidden terminal listen period, every node still has to be awake and just
problem. It is possible that a neighboring node wakes waste their energies-refer to Fig.1(a).
up or a new node joins in the middle of a transmission.
If the node is only the neighbor of the receiver but not 3 T-MAC
the sender, it will not hear the data fragments being
sent by the sender. If the receiver does not send ACK A solution with a fixed duty cycle like the
frequently, the new node may mistakenly infer from S-MAC[1] is not optimal. The nodes must be deployed
its carrier sense that the medium is clear. If it starts with an active time that can handle the highest
transmitting, the current transmission will be expected load. And whenever the load is lower than
corrupted at the receiver. Each data fragment and that, the active time is not optimally used and energy
ACK packet also has the duration field. In this way, if will be wasted on idle listening.
a node wakes up or a new node joins in the middle, it The idea of the T-MAC[9] protocol is to reduce idle
can properly go to sleep no matter if it is the neighbor listening by transmitting all messages in bursts of
of the sender or the receiver. variable length, and sleeping between bursts. To
maintain an optimal active time under variable load,
2.5 S-MAC problem we dynamically determine its length. T-MAC end the
S-MAC has the long listen interval, divided into active time in an intuitive way.
three parts for SYNC, RTS, and CTS packets,
respectively. The overall listen interval in the current 3.1 T-MAC Protocol design
S-MAC implementation on Mica motes[11] Fig. 2 shows the basic scheme of the T-MAC
Fig. 1. shows the basic scheme of the S-MAC protocol. Every node periodically wake up to
protocol. In this figure, node A wins the competition communicate with its neighbors, and then goes to
for sending out its SYNC packet. Assuming to have sleep again until the next frame. Meanwhile, new
data traffic towards node B in its queue, node A again messages are queued. Nodes communicate using a
wins the competition for sending a RTS packet (Fig. RTS, CTS and ACK.
1(b)). Upon receiving this RTS, node B may
acknowledge to node A with its CTS packet.
Successful exchange of RTS/CTS packets between
two nodes implies that they should stay awake in the
whole sleep period, followed by the current listen
interval, for the completion of their data
communication (i.e., until the next listening
interval).Again, all other nodes that are not involved in
data communication can enter a sleep mode. A node will keep listening and potentially
transmitting, as long as it is in an active period. An
active period ends when no activation event has
occurred for a time TA. An activation event is “the
periodic frame timer, “the reception of any data on the
radio”, “the end-of-transmission of a node’s own data
packet or acknowledgement”, “the overhearing prior
RTS and CTS packets”. A node will sleep if it is not in
an active period. Consequently, TA determines that
minimal amount of idle listening per frame.
The described timeout scheme moves all
Fig. 1. Basic mechanism of S-MAC communication to a burst at the beginning of the
frame. Since messages between active times must be
Although S-MAC can reduce the idle listening time, it buffered, the buffer capacity determines an upper
is not optimal due to a fixed interval of listening mode. bound on the maximum frame time.
The problem is that, while no nodes have data traffic to
send during some time frame and hence no RTS/CTS 3.2 RTS operation and choosing TA
Proceedings of the 10th WSEAS International Conference on COMMUNICATIONS, Vouliagmeni, Athens, Greece, July 10-12, 2006 (pp260-265)

In IEEE 802.11, contention-based protocols, nodes T-MAC experiments, TA = 1.5 × (C + R + T), which
wait for a random time within a contention interval proved to be satisfactory. A larger TA increases the
after detecting a collision. Usually, a back-off scheme energy used.
is used: the contention interval increases when traffic
is higher, because the back-off scheme reduces the 3.3 T-MAC Problem
probability of collisions when the load is high. In Fig. 4. Each of the nodes A though D in the
In the T-MAC protocol, every node transmits its picture forms a cell with its neighbors. Messages flow
queued messages in a burst at the start of the frame. from top to bottom, so node A sends only to B, B only
During this burst, the medium is saturated: messages to C, and C only to D. Now consider node C. Every
are transmitted at maximum rate. An increasing time it wants to send a message to D, it must contend
contention interval is not useful, since the load is for the medium and may loose to either node B (by
mostly high and does not change. Therefore, RTS receiving an RTS packet) or to node A (indirectly, by
transmission in T-MAC starts by waiting and listening overhearing a CTS packet from node B). If node C
for a random time within a fixed contention interval. looses contention because of an RTS packet from
This interval is tuned for maximum load. The node B, it will reply with a CTS packet, which can
contention time is always used, even if no collision also be heard by node D. In that case, node D will be
has occurred yet. awake when the communication between C and B
ends. However, if node C looses contention because it
overhears a CTS packet from B to A (see Fig. 4), C
must remain silent. Since D does not know of the
communication between A and B, its active time will
end, and node D will go to sleep. Only at the start of
the next frame will node C have a new chance to send
to node D.
When the sending node receives no answer within Thus for every packet that node C wants to send to
the interval TA, it might go to sleep. However, that node D, it may either succeed or fail (by loosing to
would be wrong in cases 1 and 2: we would then have node A). Both of these events have equal probability.
a situation where the sending node goes to sleep, Failure implies that the frame ends and C can send no
while the receiving node is still awake. Since this more packets. We can therefore calculate that, in this
situation might occur even at the first message of the simplified setup, node C has a 50% probability of
frame, the throughput dramatically decreases. sending a single packet to node D, a 25% probability
Therefore, a node should retry by re-sending the RTS of sending two packets (it must succeed twice),
if it receives no answer. If there is still no reply after etcetera, in each frame. We call the observed effect
two retries, it should give up and go to sleep. the early sleeping problem, since a node goes to sleep
when a neighbor still has messages for it. In the
nodes-to-sink communication pattern, the early
3.2.1 Determining TA
sleeping problem reduced the total possible
A node should not go to sleep if its neighbors are
throughput of T-MAC to less than half of the
still communicating, since it may be the receiver of a
maximum throughput of traditional protocols or
subsequent message. Receiving the start of the RTS or
S-MAC. In later experiments, we have also
CTS packet from a neighbor is enough to trigger a
encountered this problem at the border of a highly
renewed interval TA. Since a node may not hear,
active part of the networks. We believe that the
because it is not in range, the RTS that starts a
problem may occur in any asymmetric
communication with its neighbor, the interval TA
communication pattern.
must be long enough to receive at least the start of the
CTS packet (Fig. 3). This observation gives us a lower
limit on the length of the interval TA:
TA > C + R + T
where C is the length of the contention interval, R is
the length of an RTS packet, and T is the turn-around
time (i.e. the short time between the end of the RTS
packet and the beginning of the CTS packet). In
Proceedings of the 10th WSEAS International Conference on COMMUNICATIONS, Vouliagmeni, Athens, Greece, July 10-12, 2006 (pp260-265)

4 Experiments
The purpose of the experiments is to measure the
energy consumption of two protocols: S-MAC,
T-MAC. To evaluate the performance of two
protocols, we use OMNET++ simulator performing
the tests on a simple topology of 10 nodes and 20 Fig 6 MPR400CB(MICA2),
nodes. We change the number of nodes in order to MPR500CA(MICA2DOT)
measure energy consumption in different traffic load. We did not implement all features of the T-MAC
protocol onto the MICA2 hardware. To test the
effectiveness of the full-buffer-priority and
future-RTS schemes, a large-scale experiment is
needed, involving a lot of nodes. We have not
implemented the possibility to keep multiple
schedules yet.
Although this is fairly easy to implement, we have
only tested with single-cluster configurations. During
testing, we noted that the nodes’ schedules would drift
apart relatively fast. Even though the time-keeping on
all nodes is based on ticks of a quartz crystal, some of
In the Fig. 5 events occur in the network with a the nodes became unreachable within as little as 10
frequency of one per 10 seconds. Events have an minutes. we used a simple correction scheme: when a
average duration of 5 seconds and affect an area of node receives a SYNC message that contains almost,
approximately 10 nodes. A neighbor that receives one but not exactly, it s own schedule, the node adjusts its
of these messages replies with a probability of 20%. own schedule towards the received schedule. To allow
We performed multiple measurements, with different a converging situation, the schedule is only adjusted
message frequencies during events. This frequency is for 50% of the difference between the two schedules.
on the horizontal axis of the graph (Fig. 5). T-MAC is This paper correction solved the problem: an
using overhearing avoidance but no full-buffer experiment showed that nodes were still perfectly
priority. T-MAC uses much less energy than the synchronized after more than 10 hours. The final
S-MAC, especially when the message frequency implementation performs well.
during events increases. However, the maximum T-MAC setup has the following functions.
frequency that T-MAC can handle is lower than that 1) Adaptive duty-cycle operation on radio
of S-MAC, Thus it may occur that the energy - periodic listen and sleep
consumption increases if the traffic load and the 2) Broadcast only uses CSMA
number of nodes is increasing. Again, T-MAC suffers 3) Many features for uni-cast
from the early sleeping problem. - RTS/CTS for hidden terminal problem
- fragmentation support for a long message A long
5 Real Implementation on T-MAC message is divided (by upper layer) into
multiple fragments. The RTS/CTS reserves the
In this section, we use the term power instead of medium for the entire message. ACK is used for
energy to emphasize that we are talking about actual each fragment for immediate error recovery.
electrical characteristics. In strict sense, the terms are - Node goes to sleep when its neighbors are
mostly interchangeable : power is energy divided by talking to other nodes.
time. We also speak of power usage, or energy
consumption, when we should strictly say electrical 5.1 Power usage
current. This is permitted, since the voltage is constant After the implementation of the T-MAC protocol,
(joules are consumed at a rate of (I ×3V) per second). we performed a number of a power usage experiments.
In these experiments, one node was sending, another
receiving.
Proceedings of the 10th WSEAS International Conference on COMMUNICATIONS, Vouliagmeni, Athens, Greece, July 10-12, 2006 (pp260-265)

protocol, uses significantly less energy than fixed duty


cycle, such as the S-MAC protocol, when applied to
an environment with varying message rates. The exact
advantage depends on the amount of variation in the
message rate. T-MAC protocol can be advantageous,
since it requires no tuning to the specific message rate,
while the S-MAC protocol must be tuned precisely for
optimal energy savings. The performance of
T-MAC[3] under low peak load having a low traffic is
Fig 7. Power usage trace idle. better than the S-MAC in same condition in small
networks.[6] Future work is needed more research on
virtual clustering, both in static and in mobile
networks.

Acknowledgement

This work was supported by grant No.


R01-2001-000-00007-0 from the Basic Research
Fig. 8. Power usage trace, Program of the Korea Science & Engineering
transmitting node, 10 messages / second. Foundation.

We measured the power consumption of both the References:


sending and the receiving node. The message length is
20 bytes. The voltage over the resistor is a measure for [1] M. Stemm and R. H. Katz, “Measuring and
the electrical current. This voltage was measured reducing energy consumption of network interfaces in
using Surge View, which is a Java application that hand-held devices”, IEICE Transactions on
comes standard in the TinyOS Tools distribution. The Communications, E80-B(8), pp.
Surge View is useful for monitoring a sensor network 1125-1131, 1997.
and analyzing mesh network performance. At the [2] W. Ye, J. Heidemann, and D. Estrin. “An
computer, we captured the values. After precise energy-efficient MAC protocol for wireless
calibration, we could measure the electrical current sensornetworks,” in IEEE INFOCOM 2002, June
through the node with a precision of approximately 2002.
15µA. [3] T. V. Dam and K. Langendoen, "An adaptive
Fig 7. shows a power usage trace of an idle node. energy-efficient MAC protocol for wireless sensor
The power consumption is low most of the time. At networks," in ACM Sensys’03, Nov. 2003.
regular intervals (0.61 seconds, the frame time) we see [4] Katayoun Sohrabi, Jay Gao, Vishal Ailawadhi,
spikes to 4mA. These are the active times, during and Gregory J. Pottie., “Protocols for
which the radio is on. We also see two higher spikes. self-organization of a wireless sensor network,” in
These are SYNC packet transmissions. Fig 8. shows a IEEE Personal Communications, pp.16-27, Oct. 2000.
close up of a node transmitting 3 messages during a [5] V. Rajendran, K. Obraczka, and J.J.
single frame. We expected that there is no control Garcia-Luna-Aceves, “Energy-efficient,
packet like RTS/CTS/ACK causing reasonable power collision-free medium access control for wireless
consumptions. sensor networks,” in ACM Sensys’03, Nov. 2003.
[6] J.M. van Dam An Adaptive Energy-Effcient MAC
Protocol for Wireless Sensor Networks, June, 2003
6 Conclusions [7] P. Lin, C. Qiao, and X. Wang “Medium Access
Control With A Dynamic Duty Cycle For Sensor
In this paper, we have simply focused on the
Networks,” in WCNC, Mar 2004.
performance of MAC power consumption[2] and
[17]http://www.chipcon.com/files/CC1000_Data_she
identified a problem with the T-MAC which saves
et_2_1.pdf
energy by turning off the radio as much as possible.
[18]http://webs.cs.berkeley.edu/retreat-1-04/slides/jo
The time-out scheme, as implemented by the T-MAC
ep-nest-cc1000.ppt

You might also like