0% found this document useful (0 votes)
13 views37 pages

MAC Protocol

Uploaded by

backaman6377
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views37 pages

MAC Protocol

Uploaded by

backaman6377
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

Medium Access Control in Wireless

Sensor Networks
Dr. Om Jee Pandey
Wireless Sensor Networks (WSNs)
 In WSNs, sensor nodes must operate for a number of years to make
applications economically viable

 This puts severe constraints on energy consumption, because nodes are


usually battery powered and changing batteries is not an option

 Also from a cost perspective, sensor networks must function autonomously


without (much) external control

 WSN must be resilient to errors of all kinds; nodes may die when running out
of energy; radio communication may be distorted by external interference;
and low-cost sensors may malfunction and produce erroneous readings

 Data generated periodically has to be relayed to a gateway for further


processing and for generating an appropriate response
Wireless Sensor Networks (WSNs)
 The need for energy-efficient operation of a wireless network of resource-
scarce devices has prompted the development of novel protocols in all layers of
the communication stack

 Given that the radio is the most power-consuming component of a typical


sensor node, large gains can be achieved at the link layer where the MAC
protocol is controlling the usage of the radio

 Therefore, a whole range of energy-efficient MAC protocols have been


developed taking into consideration, application characteristics discussed above

 These WSN-specific MAC protocols typically trade off classical performance


parameters (throughput, latency, and fairness) for a reduction in energy
consumption to maximize the lifetime of the network. Each MAC protocol has
its own policy for switching off the radio leading to a different trade-off
Wireless Sensor Networks (WSNs)
 Basic protocols implement a fixed duty cycle, while others adapt to changes in
traffic over time and place; whether or not the additional reduction in energy
consumption outweighs the increase in complexity depends on the particular
application and channel conditions at hand

 WSNs are in many aspects quite similar to MANETs and Wireless Mesh
Networks, but two distinct characteristics call for a different approach

 First, the need for energy-efficient operation severely constrains the


capabilities of individual sensor nodes; processing, memory, and
communication are limited resources. Second, WSN deployment scenarios
highly structure the communication between nodes in the network; in
particular, communication between two arbitrary nodes in the network, being
part of many ad hoc and mesh scenarios, does not occur in WSNs where most
information is relayed either between neighbors or to/from the sink
Limited Resources with WSN
 CPUs become faster and provide more memory, radios transmit at higher bit
rates. The power consumption of the complete system (CPU+radio) stays
more or less constant around 100 mW
Limited Resources with WSN
 The effective lifetime of a sensor node, however, heavily depends on how
much time it spends in sleep state (with the CPU and radio powered off);
running a sensor node flat out will drain a pair of AA batteries (3000 mAh) in
about 100 hours, or just 4 days

 This demonstrates that power management is a must, especially at the MAC


layer since the radio uses up a large fraction of the total energy consumed by
a sensor node

 Compared to today’s WLAN standards (55 Mbps and up), the bandwidth
provided by sensor node radios (10-250Kbps) is very low indeed

 However, most WSN applications need only a fraction of that, so in fact,


bandwidth is not an issue. What does matter is the rather poor performance
in terms of range (10s of meters) and link quality
Limited Resources with WSN
 This is caused by simple modulation schemes being sensitive to noise and
poor (integrated) antennas showing irregular reception patterns

 Another important factor for MAC design is the setup time needed to switch
the radio from sleep into receive/transmit mode

 This time is largely spent on waiting for oscillator circuits to stabilize,


effectively consuming precious energy while doing nothing

 As a consequence, switching a radio into sleep mode only saves energy when
doing so for a long time

 This, in turn, may delay sensor data from being injected into the network,
effectively increasing the end-to-end latency
MAC Design for WSN
 The driving force behind WSN research is to develop systems that can operate
unattended for years, which calls for robust and energy efficient solutions
both at the hardware and software level

 Since the radio is the component of a sensor node that consumes most
energy, it should be managed carefully

 Usually, one has to be prepared to pay a price in terms of performance for the
desired reduction in energy consumption

 Fortunately, many WSN applications are rather undemanding and can get by
with low bandwidth and long end-to-end latency. In addition, the resource
limitations imposed by typical node hardware call for solutions that require
minimal processing and have a small memory footprint. These considerations
limit the design space of medium access control
MAC Design for WSN
 Many WSN-specific MAC protocols have been proposed, each shooting for a
different tradeoff between energy consumption and performance

 All protocols, address the same sources of overhead and can be conveniently
grouped into three main classes based on the degree of organization between
nodes

Sources of overhead: When running the standard IEEE 802.11 (CSMA/CA)


protocol developed for Wireless LANs on a sensor network with little traffic,
much energy is wasted due to the following sources of overhead:

Idle listening: only a fraction of the available bandwidth is needed for


communication, but without any further information a MAC protocol cannot tell
when a message will be sent. Therefore, the radio must be kept “ON” at all
times, or a node would miss some of the messages being sent to it
MAC Design for WSN
 This so-called idle-listening overhead is the main source of energy waste as
typical radios consume much more energy in receive mode (even when no
data is arriving) than in sleep mode

Overhearing: another effect of always listening for incoming traffic, is that a


node will receive all messages including those that concern its neighbors only.
Overhearing these messages is simply a waste of energy and becomes
problematic in dense networks with many nodes inside the reception range of a
node. Dense deployments are not uncommon because the sensing range of
many physical parameters (e.g., temperature) is much smaller than the
communication range

Collisions: although senders are using random back-off within a contention


window, collisions can still occur because the switch between carrier sense and
transmit takes time
MAC Design for WSN
 The usual cure of retransmitting messages may actually degrade performance
because of the additional traffic causes more collisions, in turn triggering even
more retransmissions, and cascading into total collapse in the worst case

Traffic fluctuations: traffic generated by WSN applications often fluctuates in


time (event-based reporting) and in place (converge cast). The resulting peak
loads may drive the network into congestion, or alternatively enforce the use of
long contention window (overprovisioning). In either case, energy consumption
rises to undesired levels

Protocol overhead: MAC headers and control messages are considered overhead
because they do not contain useful application data yet consume energy. In the
case of WLAN traffic these costs can be amortized, but the small WSN payloads
shift the boundary considerably, which essentially rules out sophisticated
protocols that exchange detailed information
MAC Design for WSN
 Most of these overheads are incurred by other contention-based protocols
too, although the relative importance may vary. For example, collisions can be
remedied at the expense of protocol overhead

 The alternative of using a schedule-based approach (i.e., TDMA) may seem


rather attractive at first glance because idle-listening, overhearing, and
collisions simply do not occur; after having received the traffic schedule it is
clear in which slots a node should receive and transmit

 The problem, however, is the price to be paid in terms of reduced flexibility


leading to overprovisioning, protocol overhead, and complexity

 Dynamically changing the number of slots in a frame is infeasible, which


forces the choice of some upper bound leading to overprovisioning
MAC Design for WSN
 Collision-free slot assignment implies a large memory footprint for storing the
state of the nodes in the two-hop neighborhood

 These concerns show that by organizing nodes many of the classic sources of
overhead can be avoided, but only at the expense of introducing new ones

The classic S-MAC paper by Ye et al. in 2002 [1], in which they introduce Sensor
MAC, inspired the development of a whole string of energy efficient MAC
protocols

[1] W. Ye, J. Heidemann, and D. Estrin, An energy-efficient MAC protocol for


wireless sensor networks, in 21st Conference of the IEEE Computer and
Communications Societies (INFOCOM), vol. 3, June 2002, pp. 1567–1576
MAC Design for WSN
 More than 50 have been documented with all of them addressing the sources
of overhead discussed earlier, and with many claiming their own letter (S-
MAC, T-MAC, B-MAC, etc.)
Different MAC Protocols for WSN
 Different WSN-specific MAC protocols will classify them according to how
nodes organize access to the shared radio channel

 Three different classes of organization. The simplest being random access, in


which nodes do not organize time and contend for access to the radio
channel. To reduce idle listening, protocols in this class shift the costs from
the receiver to the sender by extending the MAC header (i.e., the preamble),
allowing nodes to check the channel periodically and sleep most of the time

 A slightly more complex organization is to divide time into slots. Slotted access
requires nodes to synchronize on some common time of reference such that
they can wake-up collectively at the beginning of each slot, exchange
messages when available, and then go back to sleep for the rest slot
Different MAC Protocols for WSN
 S-MAC is the prime example from this class of slotted access, and improves on
CSMA/CA by implementing a fixed duty cycle and overhearing avoidance

 The most complicated class schedules the channel access. Time is divided into
frames containing a fixed number of slots. Frame-based protocols differ in
how slots are assigned to nodes

 Classic TDMA has an access point controlling this for a single cell. LMAC on the
other hand employs a distributed slot-selection mechanism that self-
organizes a multi-hop network into a conflict-free schedule

 The increase in the degree of organization allows for tighter control of who is
communicating when, but at the expense of being less flexible to
accommodate changing conditions. Therefore, several hybrid protocols have
been developed aiming at combining the best of both worlds
MAC Protocols for WSNs
 MAC protocols differ from typical WLAN access protocols in that they trade off
performance (latency and throughput) for a reduction in energy consumption
to maximize the lifetime of the network

 This is in general achieved by duty cycling the radio, and it is the MAC layer
that controls when the radio is switched on and off

 An important consequence is that a MAC protocol needs to be aware of its


neighbors’ sleep/active schedules, since sending a message is only effective
when the destination node is awake

 An obvious solution is to have all nodes synchronize on one global schedule,


so no separate neighbor state is required, which maps well onto the resource
limitations of typical sensor nodes
MAC Protocols for WSNs
 However, grouping communication into small (active) periods increases the
chance on collisions, hence, other forms of organization have been proposed

 The historic development of, the three most common styles of medium access
control for WSNs: random, slotted, and frame-based organization
Random Access
 This class of CSMA-style protocols does not restrict when nodes may access
the channel. This provides a lot of flexibility to handle different nodes
densities and traffic loads, so nothing has to be decided before deployment
and dynamic changes can be accommodated easily. Also, nodes need not
synchronize their clocks, making these protocols rather simple. The down side
of this relaxed, random access approach is that lots of energy is often wasted
due to idle listening and collisions

 Handling collisions has been extensively studied before, both in wired and
wireless systems. Unfortunately, the standard solutions cannot be applied ‘out
of the box’ because of the tight WSN constraints. Collision Avoidance
signalling is considered prohibitive because of the short payloads, and
contention resolution by means of random backoff leads to overprovisioning
with nodes listening for long contention windows or to collapse when using
short windows
Random Access
 The binary exponential backoff (BEB) procedure addresses the latter
concerns, but at the expense of considerable protocol complexity. A much
simpler approach was proposed as part of the Sift protocol

 The key contribution of Sift is that instead of using a uniform random


selection within the contention window, a sender competing for channel
access uses a skewed distribution giving preference towards the end of the
window

 This greatly reduces the possibility of collisions (i.e., senders selecting the
same “slot” within the contention window) because the low chance of
selecting an early slot usually leads to just one lucky winner when many
compete, and with few competitors the chance of a collision is already low to
begin with. The optimal distribution depends on the number of competing
senders, which in practice is unknown
Low-Power Listening and Preamble Sampling
 A low-level scheme in which nodes can periodically sense the channel (saving
energy) and still not lose any messages (due to sleeping most of the time)

 The idea is to prepend each message with a kind of “busy tone” to alert
potential receivers about an upcoming message transfer

 Nodes sensing a busy tone would then keep their radios on until the end of
the message. By making the busy tone longer than the sleep interval, a sender
is guaranteed to wake up the intended receiver
Low-Power Listening and Preamble Sampling

 A convenient way to implement the busy tone is to stretch the length of the
standard preamble (part of the physical layer header)

 The beauty of it is that the costs shift from the receiver (reduced idle
listening) to the sender (long preamble). Since there are many more receivers
than senders and the amount of traffic is low, a lot of energy is saved

 Since the periodic sampling effectively occurs at the physical layer, it can be
combined with any MAC protocol in the link layer

 Hill et al. combined it with CSMA and named it Low-Power Listening, LPL for
short. El-Hoiydi combined it with ALOHA and named it Preamble Sampling
Low-Power Listening and Preamble Sampling
 The exact savings of these protocols depend on the ratio of the time it takes
to do a carrier sense and the length of the sleep interval

 A duty cycle of around 10% is certainly possible without compromising latency


too much

 For example, on a CC1000 radio a carrier sense takes about 2 ms leading to an


extended preamble of 20 ms, which is acceptable given the delay-tolerant
nature of many WSN applications

 A potential drawback is that receiving or overhearing a message has become


more expensive, because the time between waking up and receiving the start
symbol of the actual message is on average half the length of the stretched
preamble (i.e., 10 ms)
Low-Power Listening and Preamble Sampling

 Note that for every scenario (data rate, node density) an optimal sleep
interval exists that balances the costs between receivers and sender

 The B-MAC protocol allows for runtime configuration of the sleep interval to
provide the possibility for application developers to optimize their energy
savings

 Another contribution of B-MAC is that it includes an optimized carrier sense


procedure. Instead of taking a single sample, B-MAC takes five consecutive
samples and assesses the channel as being clear if any of those readings falls
below a predefined threshold. This effectively eliminates random noise
(interference), hurting the original LPL implementation due to too many false
alarms (a busy channel, but no preamble)
WiseMAC Protocol
 A first refinement to Preamble Sampling was introduced by El-Hoiydi in the
WiseMAC protocol

 With a little bookkeeping, the need for sending out long preambles can be
largely avoided

 Given that a node typically communicates with just a few nodes, or actually
just one (its parent), maintaining the phase offset of when a destination node
wakes up becomes feasible. The idea is to start transmitting a message just
before the intended receiver wakes up to sample the channel

 This saves energy both at the sender, who sends out short preambles, as well
as at the receiver since the busy-waiting time for the start symbol is reduced
to half the length of the short preamble
Wake-up Radio Protocol
 A radically different approach to reducing the idle listening overhead is to
equip nodes with a second ultra low-power radio used for simple signalling

 By default, nodes sleep with the main radio turned off. They can be awoken
by sending a kind of wireless interrupt over the second radio, after which the
main radio is switched on to receive the message

 The attractive idea of using a low-power wake-up radio was first coined by the
PicoRadio project detailing a design out of passive components consuming as
little as 100 µW

 The down side of such extremely simple radios is that they are quite
susceptible to noise (generating false alarms) and use broadcast signals
(waking up all neighbors) because they cannot even encode a few address bits
specifying the identity of a target node
Slotted Access
 The basic idea behind this class of contention-based protocols is to save
energy by having nodes agree on a common sleep/active pattern allowing
them to operate the radio at arbitrarily low duty cycles

 Time is divided into slots, and nodes wake up at the beginning of each slot to
handle pending messages waiting for transmission

 Channel access is based on contention as with the random-access protocols,


but the possibility of collision is much higher due to all communication being
grouped into the (small) active part of a slot

 Apart from this issue, slotted protocols mainly differ in their policy on when to
switch back from active to sleep mode
S-MAC
 The main contribution of Sensor-MAC protocol is that fixed duty-cycle
approach is both simple and effective in reducing idle listening overhead

 The only complicated part is the synchronization of the nodes on the basic
slot structure shown in below figure

 Nodes regularly broadcast SYNC packets including a time stamp at the


beginning of a slot, which allows others to adjust their local clocks to
compensate for drift
S-MAC
 New nodes wanting to join the ad-hoc network start off with listening for an
initialization period spanning multiple slots waiting for a SYNC packet to
inform them about the common schedule. If no SYNC packet is received a
node concludes it is the first one to form a so-called virtual cluster and starts
broadcasting SYNC packets so others can join in later

 Once nodes have joined the (global) slot schedule they will start duty cycling
their radio switching it off after every active period

 The S-MAC implementation for the Mica2 motes uses a fixed-length active
period of 300 ms and a configurable slot length in the order of 1-3 s

 Collision avoidance by means of an RTS/CTS handshake is included in the


protocol, which features a fixed-length contention window of about 9 ms
T-MAC
 The simplicity of S-MAC using a fixed duty cycle has two drawbacks. First, an
application developer is left with the burden of selecting the optimal duty
cycle before deployment commences. Second, traffic fluctuations can only be
dealt with by overprovisioning, that is, by setting the duty cycle to the
(anticipated) maximum load at any moment, at any location in the network

 In this regard converge cast and event-based reporting leave S-MAC wasting
lots of energy

 To address these issues, the Timeout MAC protocol introduces an adaptive


active period. By default, nodes listen only for a short duration at the
beginning of a slot (15 ms for T-MAC vs. 300 ms for S-MAC) and go back to
sleep when no communication happens
T-MAC
 If, on the other hand, a node engages or overhears a message transfer it will
schedule another listen period after this transfer to determine if it can then
go to sleep

 Simulations have shown that T-MAC is capable of adapting to traffic


fluctuations both in time (event-based reporting) and place (converge cast),
and that it outperforms S-MAC running at a fixed duty cycle by as much as a
factor of 5 in energy consumption

 In principle the timeout mechanism will automatically adapt the duty cycle to
the actual traffic in a node’s neighborhood

 T-MAC is a bit too aggressive in shutting down the radio, leaving messages
queued for the next slot, which effectively increases latency and reduces
throughput
Frame-based access
 Provides flexibility even further by grouping slots into frames and scheduling in
detail who is to send in each slot

 The advantage of a schedule-based (TDMA-like) approach is, of course, that


collisions do not occur, and that idle listening and overhearing can be drastically
reduced

 When scheduling communication links, that is, specifying the sender-receiver


pair per slot, nodes only need to listen to those slots in which they are the
intended receiver eliminating all overhearing

 When scheduling senders only, nodes must listen in to all occupied slots, but can
still avoid most overhearing by shutting down the radio after the MAC (slot)
header has been received. In both variants (link and sender-based scheduling)
idle listening can be reduced to a simple check if the slot is used or not
Traffic Adaptive Medium Access (TRAMA)
 Nodes regularly broadcast information about (long-term) traffic that flows
through them as well as the identities of their neighbors

 A node learns the identities of all its two-hop neighbors, which is used to
compute a collision free schedule by means of distributed hash function that
determines the winner (i.e., sender) of each slot

 The traffic load information of the one-hop neighbors is used to break ties in
favor of the busiest node. To reduce overhearing, a sender includes a bitmap in
each packet detailing the subsequent receivers it plans to be sending to in the
next 100 slots. If the actual traffic is lower than the initial estimate broadcasted
to all neighbors, a node releases its claims by zeroing out the remainder of the
bitmap. This allows others to take over and provides limited capabilities to adjust
to traffic fluctuations
Packet-based Radios
 MAC design is greatly influenced by the capabilities of the underlying hardware
platform. In this respect it is important to observe the trend in cheap, low-power
radios to upgrade from byte-level interfaces (e.g., CC1000) to packet-level
interfaces (e.g., CC2420)

 This transition can be largely attributed to the definition of the IEEE 802.15.4
standard for Low-Rate Wireless Personal Area Networks (WPANs)

 This standard specifies a Physical and MAC layer for use in consumer electronics,
and its commercial potential has brought a new generation radios on the market

 The MAC layer provides only limited support for multi-hop networking, but the
physical layer fits the WSN community rather well with higher data rates (up to
250Kbps) at the same energy consumption level as the previous generation
Packet-based Radios
 The switch to packet-based radios is a mixed blessing. On the one hand it frees
the micro controller from handling every single byte to/from the radio, which
chews up most of the processing resources on simple 8-bit processors like the
ATmega128L. On the other hand, it makes life complicated because techniques
like low-power listening can no longer be applied due to the lack of control
needed to extend the length of the preamble

 A crude solution is that, when a long preamble is needed, the message itself can
be sent out repeatedly. This works well for small messages and high-speed
radios, but reduces the granularity considerably making techniques like
scheduled channel polling less effective

 Introduction of high-speed radios using more sophisticated coding mechanisms


is also a mixed blessing
Packet-based Radios
 On the one hand, these radios provide much better energy-per-bit ratios than
simpler/slower designs and operate at much lower signal-to-noise ratios (i.e.,
cover longer ranges)

 On the other hand, the receive circuitry has become much more complex
making idle-listening an even more significant overhead.

 For example, the CC2420 radio consumes more energy when receiving than
when sending (63 vs. 57 mW)

 Also, because of the higher data rates, the relative cost of switching the radio
between send and receive mode has increased forcing MAC designers to pay
more attention to this issue
Thank You

You might also like