You are on page 1of 36

Chapter 2

Medium Access Control (MAC)

Sanoop Mallissery
Assistant Professor (Sr. Scale)
Dept. of Information & Communication Technology

Department of Information and Communication Technology


Manipal Institute of Technology, Manipal University

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

1 / 36

Medium Access Control (MAC)


Critical issue in the design of Wireless Sensor Networks
(WSNs)
Two nodes sending data at the same time over the same transmission medium,
is a great concern in WSNs.

Must employ a MAC protocol to arbitrate access to the shared medium in order
to avoid data collision

Efficiently share the bandwidth resources among multiple sensor nodes


MAC protocols can be classified into different categories:
Centralized and distributed
single-channel based and multiple-channel based
Contention based and contention free etc

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

2 / 36

MAC Contd.

Time division multiple access (TDMA), frequency division multiple access (FDMA),
code division multiple access (CDMA), and carrier sense multiple access (CSMA)
are typical MAC protocols

These protocols do not take into account the unique characteristics of sensor
networks

E.g., denser levels of node deployment, higher unreliability of sensor nodes, and
severe power, computation, and memory constraints

Traditional MAC protocols cannot be applied directly to sensor networks without


modification

Sensor networks, in particular, energy efficiency and network scalability must be


taken into account

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

3 / 36

Fundamental MAC Protocols used in Wireless Networks I


Contention-Based MAC Protocols

All nodes share a common medium and contend for the medium for transmission
So collision may occur during the contention process
To avoid collision, a MAC protocol can be used to arbitrate access to the shared
channel through some probabilistic coordination

E.g., ALOHA and CSMA


Pure ALOHA, a node simply transmits whenever it has a packet to send
If collision, then the sender just waits a random period of time and then transmits
the packet again

slotted ALOHA, time is divided into discrete timeslots and each node is allocated
a timeslot

However it requires global time synchronization, which complicates the system


implementation

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

4 / 36

Fundamental MAC Protocols used in Wireless Networks II

CSMA differs from ALOHA in that it uses carrier sense; that is, it allows a node
to listen to the shared medium before transmission

CSMA has several different versions, including non-persistent, 1-persistent, and


n-persistent

Non- persistent CSMA - if a node detects a busy medium, it will wait a random
period of time and start to listen again

1-persistent CSMA - the node will continue to listen until the medium becomes
idle

n-persistent - if a node detects an idle medium, it will transmit with probability


p, and back off and restart carrier sense with probability (1-p).

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

5 / 36

Fundamental MAC Protocols used in Wireless Networks I


Contention-Free MAC Protocols

A shared medium is divided into a number of sub-channels in terms of time,


frequency, or orthogonal pseudo-noise codes

sub-channels are allocated to individual nodes with each node occupying one
sub-channel

This allows different nodes to access the shared medium without interfering with
each other and thus effectively avoids collision from different nodes

E.g., TDMA, FDMA, and CDMA


TDMA divides the shared channel into a fixed number of timeslots and configures
these timeslots into a frame that repeats periodically

The major advantage of TDMA is its energy efficiency because those nodes that
do not transmit can be turned off

FDMA divides the shared channel into a number of non-overlapping fre- quency
subbands and allocates these subbands to individual nodes

Disadvantage: a guard band is needed between two adjacent subchannels


Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

6 / 36

Fundamental MAC Protocols used in Wireless Networks II

CDMA divides the shared channel by using orthogonal pseudo-noise codes


All nodes can transmit in the same channel simultaneously, but with different
pseudo-noise codes

The major advantage of CDMA is that it does not require strict time syn- chronization and avoids the channel allocation problem in FDMA

Disadvantage: the energy consumption for coding and decoding

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

7 / 36

MAC Design for Wireless Sensor Networks I


Network Characteristics

Cellular system
Mobile Ad-hoc Networks (MANETs)
Bluetooth
WSNs have the following unique characteristics:
Larger number of sensor nodes. The number of sensor nodes can be several
orders of magnitude.

Powered by battery and limited in power capacity. Difficult or impossible


to change or recharge batteries. The lifetime of a sensor network largely
depends on the lifetime of its sensor nodes.

Deployed in an ad-hoc fashion without careful planning and engineering.


Organize themselves into a communication network.

Frequent topology change due to both node failure and mobility.


Sensor nodes have very limited computational capacity and memory.

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

8 / 36

Objectives of MAC Design


Basic function of a MAC protocol is to arbitrate access to a shared medium in order to
avoid collisions from different nodes
Other objectives are:

Energy Efficiency: Energy consumed per unit of successful communication; in


order to maximize not only the lifetime of individual sensor nodes, but also the
lifetime of the entire network

Scalability: Ability to accommodate the change in network size; must be scalable


to such changes in network size

Adaptability: Ability to accommodate the changes in node density and network


topology

Channel Utilization: bandwidth utilization for effective communication


Latency: Delay from the time a sender has a packet to send until the time the
packet is successfully received by the receiver

Throughput: Amount of data successfully transferred from a sender to a receiver


in a given time, usually measured in bits or bytes per second

Fairness: Ability of different sensor nodes to equally share a common transmission


channel
Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

9 / 36

Energy Efficiency in MAC Design


Energy waste comes from four major sources: collision, overhearing, control overhead,
and idle listening

Collision: Two sensor nodes transmit their packets at the same time. Packets are
corrupted and thus have to be discarded. Retransmissions of the packets increase
both energy consumption and delivery latency.

Overhearing: A sensor node receives packets that are destined for other nodes.
Unnecessary waste of energy and such waste can be very large when traffic load
is heavy and node density is high.

Idle Listening: A sensor node is listening to the radio channel to receive possible
data packets. The node will stay in an idle state for a long time, which results in
a large amount of energy waste.

Control Overhead: A MAC protocol requires sending, receiving, and listening to


a certain necessary control packets, which also consumes energy not for data
communication.

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

10 / 36

MAC PROTOCOLS FOR WIRELESS SENSOR


NETWORKS
Contention-Based Protocols
S-MAC
Sensor-MAC (S-MAC) is an energy-efficient MAC protocol specifically designed
for WSNs

S-MAC tries to reduce energy consumption from all the major sources that
cause inefficient use of energy

But some performance degradation in both per-hop fairness and latency


To reduce idle listening, S-MAC introduces a periodic listen and sleep
mechanism

A complete cycle of listen and sleep periods is called a frame


Frame begins with a listen period and followed by a sleep period

Figure 1 : Periodic listen and sleep in S-MAC.


Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

11 / 36

Sensor-MAC (S-MAC) I
SYNC packet is very short and contains the address of the sender and the next
sleep time of the sender

Use of RTS/CTS mechanism


network allocation vector (NVA)
S-MAC introduces a transmission mechanism called message passing to efficiently
transmit a long message

In-network data processing or aggregation


Long message - Corrupted - Retransmission - High transmission cost
Long message - Segmented - Small fragments - Larger control overhead - Longer
delay because RTS and CTS

S-MAC segments a long message - small fragments - burst - One RTS and one
CTS - reserve the medium for transmitting all fragments

Fragment is acknowledged - retransmitted if the ACK packet is not received


Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

12 / 36

Sensor-MAC (S-MAC) II

due to the fixed sleep time/awake time ratio, some portion of the bandwidth is
always unusable and the delay is higher

Overhearing is avoided for unicast traffic, but for broad- cast or carrier sense
traffic, overhearing is still an unsolved problem

high message delivery latency as S-MAC is designed to sacrifice latency for energy
saving

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

13 / 36

MAC PROTOCOLS FOR WIRELESS SENSOR


NETWORKS

DS-MAC

Dynamic Sensor-MAC (DS-MAC) is an S-MAC protocol with a dynamic duty


cycle

Functionalities same as S-MAC, but each receiver node keeps track of its own
energy consumption level and average latency

Dynamically adjust its sleep wakeup cycle time based on the current energy
consumption level and the average latency

latency becomes intolerable - double the original duty cycle - reduce the sleep No change in the listening period

additional storage overhead and processing overhead

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

14 / 36

MAC PROTOCOLS FOR WIRELESS SENSOR


NETWORKS
MS-MAC

Mobility - aware Sensor-MAC (MS-MAC) to address the mobility issue in mobile


sensor

Ex: smart patient assistance, rare animal monitoring


Highly mobile sensor nodes and level of mobility vary significantly
MS-MAC adapts design of S-MAC feature and extends it
Stationary scenario - operates like S-MAC and for highly mobile scenario
switches to an operating mode similar to IEEE 802.11

Change in the received signal level of periodic SYNC message is indication of


mobility

Mobility handling mechanisms - Dynamic adjustment frequency based on


presence of mobile nodes and its moving speed.

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

15 / 36

MAC PROTOCOLS FOR WIRELESS SENSOR


NETWORKS I
D-MAC

is an energy-efficient and low-latency MAC protocol for data gathering in WSNs


to address the data forwarding interruption problem in multihop data delivery
Activesleep duty cycles (e.g., S-MAC) - suffer - data forwarding interruption
problem - nodes on the multihop path cannot be aware of the on-going data
delivery

E.g. - duty-cycle adjusting mechanism - node remains active - overhears


ongoing transmissions

D-MAC address the above mentioned problem


D-MAC employs a staggered wake-up schedule to enable continuous data
forwarding on a multihop path

primary traffic is for data gathering from sensor nodes to a sink


data flows are unidirectional and all nodes except the sink forward the packets
Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

16 / 36

MAC PROTOCOLS FOR WIRELESS SENSOR


NETWORKS II
D-MAC staggers the schedule of the nodes on the multihop path and allows the
nodes to wake up sequentially like a chain reaction

an interval is divided into three periods (or states): receiving, sending, and
sleeping

receiving period: node is expected to receive a packet and send an ACK packet
back to the sender

sending period: node tries to send a packet to its next hop and receive an ACK
packet

sleeping period: node turns off its radio to save energy


multihop chain - each node periodically goes into the receiving, sending, and
sleeping states

nodes on the multihop path to increase their duty cycles

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

17 / 36

MAC PROTOCOLS FOR WIRELESS SENSOR


NETWORKS III

Figure 2 : An aggregation tree in D-MAC and its implementation

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

18 / 36

MAC PROTOCOLS FOR WIRELESS SENSOR


NETWORKS I
Sift

CSMA based MAC protocol


for handling contention in event-driven WSNs
sensor networks - event driven - spatially correlated contention
multiple sensors are deployed - same geographical area - share the same radio
medium

multiple sensors - messages - same time - cause contention - for radio medium called spatially correlated contention

In WSN, number of contending nodes changes over time


In WSN, MAC protocol not only handle spatial correlation, but also adapt to
the changes in the number of contending nodes.

Key difference b/n sift and traditional MAC is probability distribution for
selecting transmission slot in the contention window.

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

19 / 36

MAC PROTOCOLS FOR WIRELESS SENSOR


NETWORKS II

With non uniform probability distribution, a node competes for contention slot
with in the contention window with other nodes based on a shared belief of the
current population size N.

N is bound to change after every slot with no transmission.


If No transmission in the first slot, each node will reduce its belief of the
number of competing nodes by multiplicatively increasing its transmission
probability for the second slot.

Winner will transmit, others back off

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

20 / 36

MAC PROTOCOLS FOR WIRELESS SENSOR


NETWORKS I
T-MAC

Timeout-MAC is an adaptive energy-efficient MAC protocol


Idea
Dynamic duty cycle
Reduce idle time
Transmit all messages in bursts of variable size in active periods and sleep
between active periods

T-MAC dynamically determines length of active period by timing out if nothing


is heard

Each node periodically wakes up to communicate with its neighbors and goes to
sleep until next frame

Transmit all messages in bursts of variable length and sleep between burst
RTS / CTS / ACK Scheme
Synchronization similar to S-MAC
Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

21 / 36

MAC PROTOCOLS FOR WIRELESS SENSOR


NETWORKS II

A node keeps listening and potentially transmitting as long as it is in an active


period

If no activation event occurs for a threshold time period, an active period will
end and the node will go to sleep.

An activation event can be:

Sanoop Mallissery

the timing out of a periodic frame timer


reception of a data packet in the radio
sensing of the communication in the radio
End of transmission of nodes own data/ack
end of transmission of neighbors data packet
All nodes transmit in the beginning of activation period

8th September 2016

Medium Access Control (MAC)

22 / 36

MAC PROTOCOLS FOR WIRELESS SENSOR


NETWORKS
Contention-Free Protocols
Traffic-Adaptive Medium Access (TRAMA)
TRAMA protocol is a TDMA based MAC protocol

to provide energy-efficient collision-free channel access in WSNs while maintaining


good throughput, acceptable latency, and fairness

ensuring collision-free data transmissions


nodes to switch to a low-power idle state when they are not transmitting or
receiving

TRAMA uses a transmitter-election algorithm - to maintain throughput and fairness - promotes channel reuse as a function

A random-access period (signaling slot); scheduled-access period (transmission


slot)

Figure 3 : Time-slot structure in TRAMA


Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

23 / 36

TRAMA Protocol I
TRAMA protocol consists of three components: the Neighbor Protocol (NP), the
Schedule Exchange Protocol (SEP), and the Adaptive Election Algorithm (AEA)

NP and the SEP allow nodes to exchange 2-hop neighborhood information and
their schedules

AEA uses the neighbor and schedule information to select transmitters and receivers for the current timeslot

allowing all other nodes to switch to a low-power mode


NP collects 2-hop neighborhood information by exchanging small signaling packets among neighboring nodes during the random access periods

A node times out a neighbor if it does not hear from that neighbor for a certain
period of time

Transmission slots are used for transmitting data traffic and also for exchanging
traffic-based schedule information between neighboring nodes - transmitter (i.e.,
slot reuse) and receiver (i.e., sleep-state switching) selection

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

24 / 36

TRAMA Protocol II

node has to announce its schedule via a schedule packet using the SEP before
actual data transmissions

The SEP updates the schedule information periodically during the scheduledaccess periods and thus maintains consistent schedule information among neighbors.

AEA is used to select transmitters and receivers to achieve collision-free transmissions using the information obtained by the NP and the SEP

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

25 / 36

MAC PROTOCOLS FOR WIRELESS SENSOR


NETWORKS
Self-Organizing Medium Access Control

SMACS is a distributed MAC protocol


nodes to discover their neighbors and establish schedules for communicating with
them without the need for any local or global master nodes

each node is able to turn its radio on and off, and tune the carrier frequency to
different bands

Each node maintains a TDMA-like frame called superframe, in which it schedules


different timeslots to communicate with its known neighbors

To reduce the likelihood of collisions, each link operates on a different frequency,


which is chosen randomly from a large pool of frequencies when the links are
established

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

26 / 36

MAC PROTOCOLS FOR WIRELESS SENSOR


NETWORKS
Distributed Energy-Aware MAC
DE-MAC protocol is a TDMA based MAC protocol

employs a periodical listening and sleeping mechanism to avoid idle listening and
overhearing

DE-MAC treats those critical nodes (i.e., with lower energy) differently by using
them less frequently to achieve load balancing among all nodes

The criticality of a sensor node can be based on local state information - relative
energy levels within a group of neighbor nodes

group of neighbor nodes periodically perform a local election process based on


their energy levels to elect the worst-off node(s) as the winner(s) and let the
winner(s) sleep more than its (or their) neighbor nodes

Once an election is initiated, each node sends its energy level to all of its neighbors
At the end of the election process, the node with the minimum energy level is
elected as a winner

all the losers reduce the number of their timeslots by a constant factor (e.g., two)
and the winners have timeslots twice the number of the losers
Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

27 / 36

MAC PROTOCOLS FOR WIRELESS SENSOR


NETWORKS
Implicit Prioritized MAC

based on earliest deadline first (EDF)


to address the MAC problem in a cellular structure network
a cellular structure network, the network is spatially divided into multiple cells
Within each cell, the sensor nodes are fully connected in peer to peer and intra-cell
messages are exchanged using EDF

Between adjacent cells, frequency division multiplexing (FDM) is used to avoid


conflicts

The inter-cell messages are first sent to the router node within the same cell and
then forwarded by the router node through the network hop by hop

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

28 / 36

MAC PROTOCOLS FOR WIRELESS SENSOR


NETWORKS

Contention-Free Scheduling TDMA MAC

TDMA based MAC protocol with a contention-free message scheduler at each


node

message scheduler uses a periodic message model to construct a contention-free


schedule for transmitting and receiving the messages

each node needs to schedule the messages of its own


complexity of each node grows with the number of messages transmitted and
received by that node

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

29 / 36

MAC PROTOCOLS FOR WIRELESS SENSOR


NETWORKS I
CDMA Sensor MAC

CDMA Sensor MAC (CS-MAC) protocol is a self-organizing location-aware MAC


protocol

The assumptions for the protocol design include the following:


each node starts up at approximately the same time
each node is able to estimate its location using GPS
each node is static during the network lifetime - estimation of its location
only needs to be performed once

network formation process consists of several different phases

Figure 4 : Network formation phases


Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

30 / 36

MAC PROTOCOLS FOR WIRELESS SENSOR


NETWORKS II
Location broadcast phase: broadcasts its location information to the neighbors
within its radio range

each node gets a list of neighbors within its radio range with their locations, called
Redundant Neighbor List (RNL)

TORN (Turning Off Redundant Node) phase: node that is redundant for a sensing
application is turned off to conserve energy and reduce network interference

densely deployed - high probability - redundant neighbors - within a radius Sensing


Resolution (SR)

node that gets the medium to transmit - inform its redundant neighbor(s) - to
turn off by including their ID numbers in a request

The resulting neighbor list in each active node is called Non-redundant Neighbor
List (NNL)

Select Minimum Neighbor (SMN) phase: select its neighbors from the NNL called Minimum Neighbor List (MNL) (multihop)

Channel setup phase: CSMA/CA is used by nodes to set up connections with


each other

Once a node wins the channel, it will hold the channel until it finishes the channel
allocation with all its neighbors in the MNL
Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

31 / 36

MAC PROTOCOLS FOR WIRELESS SENSOR


NETWORKS I
Hybrid Protocols (Contention Based + Contention Free)
Spatial TDMA and CSMA with Preamble Sampling

All sensor nodes have two communications channels: data channel and control
channel

Data channel: transport periodic and frequent data


Control channel: transport sporadic signaling traffic
In classic CSMA, a node has to listen to the channel all the time except during
its transmission

idle listening consumes much energy, classic CSMA is not preferred for a sensor
network

In this protocol: a low-power CSMA protocol using preamble sampling


technique

Send a preamble of Size Tp

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

32 / 36

MAC PROTOCOLS FOR WIRELESS SENSOR


NETWORKS II

receiver will sleep and wake up every Tp - check idle or busy


preamble is detected, the receiver will continue to listen until the beginning of
the packet is found and the packet is received

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

33 / 36

MAC PROTOCOLS FOR WIRELESS SENSOR


NETWORKS
Zebra-MAC (Z-MAC)

Zebra-MAC uses CSMA as the basic MAC mechanism


TDMA is used to improve contention resolution
timeslot assignment is performed at the time of deployment
each node reuses its assigned slot periodically in every predetermined period,
call frame

A node assigned to a timeslot is called an owner of that slot and the others the
non-owners of that slot

Unlike TDMA, a node may transmit during any timeslot in Z-MAC


Before a node transmits during a slot it always performs carrier sensing and
transmits a packet when the channel is idle.

an owner of that slot always has a higher priority over its non-owners in
accessing the channel

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

34 / 36

MAC PROTOCOLS FOR WIRELESS SENSOR


NETWORKS
Funneling-MAC

where events generated in a sensor field travels hop-by-hop in a many-to-one


traffic pattern toward one or more sinks

Figure 5 : Funneling effect in wireless sensor networks


This funneling effect results in a significant increase in transit traffic intensity
and thus packet congestion, collision, loss, delay, and energy consumption as
events move closer toward the sink(s)
Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

35 / 36

Comparison of Various MAC Protocols used in Wireless


Sensor Networks I
Compare the MAC protocols in terms of energy consumption, workload, traffic
generated, congestion, collision, latency, throughput etc

Whether contention based MAC protocols is better than contention free MAC
protocols? If yes/no, justify the reasons for your answer.

Design an WSN application scenario and use an appropriate MAC protocol.


Also discuss the advantages and disadvantages of the MAC scheme which you
have selected. Justify the reasons.

Propose a MAC protocol for WSN which can use less number of hops to
transmit the data to the sink node and ensure that the proposed protocol is
congestion free and consumes less energy.

Sanoop Mallissery

8th September 2016

Medium Access Control (MAC)

36 / 36

You might also like