0% found this document useful (0 votes)
1 views202 pages

5 MAC Protocols

Chapter 5 discusses MAC protocols in Wireless Sensor Networks (WSNs), focusing on objectives such as collision avoidance, energy efficiency, and scalability. It outlines challenges faced by MAC in WSNs, including limited energy resources and processing capabilities, and highlights the need for low-power and simple protocols. Various MAC protocols are categorized into contention-based, reservation-based, and hybrid protocols, with detailed explanations of CSMA/CA and its issues like hidden and exposed terminal problems.

Uploaded by

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

5 MAC Protocols

Chapter 5 discusses MAC protocols in Wireless Sensor Networks (WSNs), focusing on objectives such as collision avoidance, energy efficiency, and scalability. It outlines challenges faced by MAC in WSNs, including limited energy resources and processing capabilities, and highlights the need for low-power and simple protocols. Various MAC protocols are categorized into contention-based, reservation-based, and hybrid protocols, with detailed explanations of CSMA/CA and its issues like hidden and exposed terminal problems.

Uploaded by

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

Chapter 5:

MAC Protocols
Objectives of MAC Protocols
 Collision Avoidance
 Energy Efficiency
 Scalability
 Latency
 Fairness
 Throughput
 Bandwidth Utilization

Wireless Sensor Networks


Akyildiz/Vuran 2
POWER CONSUMPTION
RADIO

20

15
Power (mW)

10

SENSOR CPU TX RX IDLE SLEEP

Wireless Sensor Networks


Akyildiz/Vuran 3
Major Sources of Energy Waste

* Idle Listening

* Transmitter Common to all wireless networks


* Receiver

OBJECTIVE: Reduce energy consumption !!

Wireless Sensor Networks


Akyildiz/Vuran 4
Challenges for MAC in WSNs
 1. WSN Architecture
 High density of nodes
 Increased collision probability
 Signaling overhead should be minimized to prevent
further collisions
 Sophisticated and simple collision avoidance protocols
required

Wireless Sensor Networks


Akyildiz/Vuran 5
Challenges for MAC in WSNs
 2. Limited Energy Resources
 Connectivity and the performance of the network is affected as
nodes die
 Transmitting and receiving consumes almost same energy
 Frequent power up/down eats up energy
 Need very low power MAC protocols
 Minimize signaling overhead
 Avoid idle listening
 Prevent frequent radio state changes (active<->sleep)

Wireless Sensor Networks


Akyildiz/Vuran 6
Challenges for MAC in WSNs
 3. Limited Processing and Memory Capabilities
 Complex algorithms cannot be implemented
 Conventional layered architecture may not be appropriate
 Centralized or local management is limited
 Simple scheduling algorithms required
 Cross-layer optimization required
 Self-configurable, distributed protocols required

Wireless Sensor Networks


Akyildiz/Vuran 7
Challenges for MAC in WSNs
 4. Limited Packet Size
 Unique node ID is not practical
 Limited header space
 Local IDs should be used for inter-node communication
 MAC protocol overhead should be minimized
 5. Cheap Encoder/Decoders
 Cheap node requirement prevents sophisticated encoders/decoders to be
implemented
 Simple FEC codes required for error control
 Channel state dependent MAC can be used to decrease error rate

Wireless Sensor Networks


Akyildiz/Vuran 8
Challenges for MAC in WSNs
 6. Inaccurate Clock Crystals
 Cheap node requirement prevents expensive crystals to be
implemented
 Synchronization problems
 TDMA-based schemes are not practical
 7. Event-based Networking
 Observed data depends on physical phenomenon
 Spatial and temporal correlation in the physical phenomenon
should be exploited
BOTTOMLINE: Existing MAC protocols cannot be used for WSNs!!!

Wireless Sensor Networks


Akyildiz/Vuran 9
MAC Protocols for WSN
 ?-MAC (pick your letter!)  MMAC, MR-MAC, nanoMAC,
 μ-MAC, AI-LMAC, B-MAC, O-MAC, PACT, PEDAMACS,
PicoRadio, PMAC, PMAC, Q-
Bit, BMA, CC-MAC, CMAC,
MAC, Q-MAC, QMAC, RATE
Crankshaft, CSMA-MPS,
EST, RL-MAC, RMAC, RMAC,
CSMA/ARC, DMAC, E2- S-MAC, S-MAC/AL, SCP-MAC,
MAC, EMACs, f-MAC, SEESAW, Sift, SMACS, SS-
FLAMA, Funneling-MAC, G- TDMA, STEM, T-MAC, TA-
MAC, HMAC, LMAC, LPL… MAC, TICER, TRAMA, U-MAC,
WiseMAC, X-MAC, Z-MAC
http://www.st.ewi.tudelft.nl/~koen/MACsoup/

Wireless Sensor Networks


Akyildiz/Vuran 10
Overview of MAC Protocols for WSNs
 1. Contention (RANDOM/CSMA)-Based MAC Protocols
 Sleep-MAC, BMAC, T-MAC, X-MAX, CCMAC, etc…

 2. Reservation-Based (TDMA BASED) MAC Protocols


 TRAMA, FLAMA, etc…

 3. HYBRID (CSMA/TDMA) MAC Protocols


 ZMAC, ….
Wireless Sensor Networks
Akyildiz/Vuran 11
Contention (Random)-Based MAC
Protocols
 Channel access through carrier sense mechanism.

 Provide robustness and scalability to the network.

 Collision probability increases with increasing node


density.

Wireless Sensor Networks


Akyildiz/Vuran 12
IEEE 802.11
IEEE 802.11, “Wireless LAN medium access control (MAC)
and physical layer (PHY) specifications,” 1999

 Originally developed for WLANs

Wireless Sensor Networks


Akyildiz/Vuran 13
REMINDER BASIC KNOWLEDGE
BASIC CSMA/CA (FLOWCHART)
(Distributed Foundation Wireless Medium Access Control - Distributed Coordinated
Function CSMA/CA (DFWMAC-DCF) for IEEE 802.11)

Wireless Sensor Networks


Akyildiz/Vuran 14
BASIC CSMA/CA

Contention Window
IFS IFS (Randomized Back-off
Mechanism)

Medium Busy Next Frame


t
Station
senses Direct access if Slot Time
the channel medium is free  IFS
and it is idle

Wireless Sensor Networks


Akyildiz/Vuran 15
BASIC CSMA/CA
 A station with a frame to transmit senses the medium (channel).

 IF IDLE  waits to see if the channel remains idle for a time equal to
IFS (Inter-frame spacing). If so, the station may transmit immediately.

 IF BUSY  (either because the station initially finds the channel


busy
or because the channel becomes busy during the IFS idle time), the
station defers transmission and continues to monitor the channel
until the current transmission is over.

Wireless Sensor Networks


Akyildiz/Vuran 16
BASIC CSMA/CA
 Once the current transmission is over, the station delays another IFS.
 If the medium remains idle for this period, the station backs off using
a binary exponential backoff scheme and again keeps sensing the
medium.

 Backoff scheme
 The station picks up a random number of slots (the initial value of
backoff counter) within a contention window to wait before
transmitting its frame.

Wireless Sensor Networks


Akyildiz/Vuran 17
BASIC CSMA/CA
 MAC runs a random number generator to set a BACKOFF CLOCK for
every contending station.

 When the CONTENTION WINDOW starts in which all stations having


packets for transmission run down their BACKOFF clocks.

 The first station with its clock expiring starts transmission.


 Other terminals sense the new transmission and freeze their clocks to
be restarted after the completion of the current transmission in the
next contention period.

Wireless Sensor Networks


Akyildiz/Vuran 18
CSMA/CA Algorithm

 If Collisions (Control or Data)


  Binary exponential increase (doubling) of CW; Length
of backoff time is exponentially increased as the station
goes through successive retransmissions.

Wireless Sensor Networks


Akyildiz/Vuran 19
Inter-frame Spaces (IFS)

DIFS DIFS
PIFS
SIFS Backoff
Medium Busy Window
Next Frame
t
Direct access if
medium is free  DIFS

Wireless Sensor Networks


Akyildiz/Vuran 20
Inter-frame Spaces (IFS)
 Priorities are defined through different inter frame spaces
 SIFS (Short Inter Frame Spacing)
Highest priority packets such as ACK, CTS, polling
response

Used for immediate response actions


Wireless Sensor Networks
Akyildiz/Vuran 21
Inter-frame Spaces (IFS)
 PIFS (PCF IFS) - Point Coordination Function Inter-Frame
spacing

 Medium priority, for real time service using PCF


 SIFS + One slot time
 Used by centralized controller in PCF scheme when using
polls

Wireless Sensor Networks


Akyildiz/Vuran 22
Inter-frame Spaces (IFS)
 DIFS (DCF, Distributed Coordination Function IFS)

 Lowest priority, for asynchronous data service

 SFIS + Two slot times

 Used as minimum delay of asynchronous frames


contending for access

Wireless Sensor Networks


Akyildiz/Vuran 23
DFWMAC-DCF CSMA/CA with ACK
 Station has to wait for DIFS before sending data
 Receiver ACKs immediately (after waiting for SIFS < DIFS) if the packet
was received correctly (CRC))

 Receiver transmits ACK without sensing the medium.


 If ACK is lost, retransmission is performed.
 Automatic retransmission of data packets in case of transmission errors

Wireless Sensor Networks


Akyildiz/Vuran 24
DFWMAC-DCF CSMA/CA with ACK
DIFS

Sender Data
SIFS
Receiver ACK

DIFS
Other Contention W
Stations
t
Waiting Time
Contention
Wireless Sensor Networks Window 25
Akyildiz/Vuran
Problems with CSMA/CA

 Hidden terminal problem

 Exposed terminal problem

Wireless Sensor Networks 26


Akyildiz/Vuran 26
Hidden Terminal Problem

DATA
A B C
DATA

 A senses the channel free and sends DATA


 C cannot hear A and senses the channel free
 DATA packet collides at B

Wireless Sensor Networks 27


Akyildiz/Vuran 27
Exposed Terminal Problem

DATA DATA Tx
A B C inhibited D

 B sends DATA to A (overheard by C)


 C inhibits its transmission to D since channel is busy
 A cannot hear C
 C-D transmission can actually take place without collisions

Wireless Sensor Networks 28


Akyildiz/Vuran 28
DFWMAC-DCF CSMA/CA with RTS/CTS
 Transmitter sends an RTS (Request To Send) after medium has been
idle for time interval more than DIFS.

 Receiver responds with CTS (Clear To Send) after medium has been
idle for SIFS.

 Then data is transmitted.


 RTS/CTS is used for reserving channel for data transmission so that
the collision can only occur in control message.

Wireless Sensor Networks


Akyildiz/Vuran 29
DFWMAC-DCF CSMA/CA with RTS/CTS

 Use short signaling packets for Collision Avoidance

 RTS (Request To Send) Packet (20 Bytes):


A sender requests the right to send from a receiver with a short RTS packet before it
sends a data packet

 CTS (Clear To Send) Packet (16 Bytes):


The receiver grants the right to send as soon as it is ready to receive

They contain: (Sender Address; Receiver Address; Packet Size)

Wireless Sensor Networks


Akyildiz/Vuran 30
DFWMAC-DCF CSMA with RTS/CTS
DIFS SIFS
RTS Data Time
Source
SIFS SIFS

Destination CTS ACK

DIFS Contention Window

Other Next Frame

Defer Access Backoff After Defer

Wireless Sensor Networks


Akyildiz/Vuran 31
Problems with CSMA/CA

 Hidden terminal problem

 Exposed terminal problem

Wireless Sensor Networks


Akyildiz/Vuran 32
Hidden Terminal Problem

RTS
CTS
A CTS B C
DATA

 A sends RTS
 B sends CTS
 C overhears CTS
 C inhibits its own transmitter
 A successfully sends DATA to B

Wireless Sensor Networks


Akyildiz/Vuran 33
Hidden Terminal Problem

How does C know how long to wait before it can attempt a


transmission?
 A includes length of DATA that it wants to send in the RTS
packet
 B includes this information in the CTS packet
 C, when it overhears the CTS packet, retrieves the length
information and uses it to set the inhibition time

Wireless Sensor Networks


Akyildiz/Vuran 34
Exposed Terminal Problem

RTS RTS
A B C Tx not D
CTS Cannot hear CTS inhibited

 B sends RTS to A (overheard by C)


 A sends CTS to B
 C cannot hear A’s CTS
 C assumes A is either down or out of range
 C does not inhibit its transmissions to D

Wireless Sensor Networks


Akyildiz/Vuran 35
Collisions
 Still possible – RTS packets can collide!
 Binary exponential backoff performed by stations that experience RTS
collisions

 RTS collisions not as bad as data collisions in CSMA (since RTS


packets are typically much smaller than DATA packets)

Wireless Sensor Networks


Akyildiz/Vuran 36
DFWMAC-DCF CSMA/CA with RTS/CTS
(Network Allocation Vector (NAV))
 Both Physical Carrier Sensing and Virtual Carrier Sensing
used in 802.11

 If either function indicates that the medium is busy, 802.11


treats the channel to be busy

 Virtual Carrier Sensing is provided by the NAV (Network


Allocation Vector)

Wireless Sensor Networks


Akyildiz/Vuran 37
DFWMAC-DCF CSMA/CA with RTS/CTS
(Network Allocation Vector (NAV))
 Most 802.11 frames carry a duration field which is used to
reserve the medium for a fixed time period

 Tx sets the NAV to the time for which it expects to use the
medium

 Other stations start counting down from NAV to 0


 As long as NAV > 0, the medium is busy
Wireless Sensor Networks
Akyildiz/Vuran 38
DFWMAC-DCF CSMA/CA with RTS/CTS
(Network Allocation Vector (NAV))
 CHANNEL VIRTUALLY BUSY  a NAV is turned on!

 The transmission will be delayed until the NAV expires.

 When the channel is virtually available, then MAC checks


for PHY condition of the channel.

Wireless Sensor Networks


Akyildiz/Vuran 39
Illustration
SIFS

Sender RTS DATA

SIFS SIFS

Receiver CTS ACK

NAV RTS
CTS

Wireless Sensor Networks


Akyildiz/Vuran 40
CSMA/CA with RTS/CTS (NAV)
 If receiver receives RTS, it sends CTS (Clear to Send) after
SIFS.

 CTS again contains duration field and all stations receiving


this packet need to adjust their NAV

 Sender can now send data after SIFS, acknowledgement via


ACK by receiver after SIFS

Wireless Sensor Networks


Akyildiz/Vuran 41
CSMA/CA with RTS/CTS (NAV)
 Every station receiving the RTS that is not addressed to it, will go to
the Virtual Carrier Sensing Mode for the entire period identified in the
RTC/CTS communication, by setting their NAV signal on.

 Network Allocation Vector (NAV) is set in accordance with the


duration of the field

 NAV specifies the earliest point at which the station can try to access
the medium

Wireless Sensor Networks


Akyildiz/Vuran 42
CSMA/CA with RTS/CTS (NAV)
 Thus, the source station sends its packet without
contention.

 After completion of the transmission, the destination


terminal sends an ACK and NAV signal is terminated,
opening the contention for other users.

Wireless Sensor Networks


Akyildiz/Vuran 43
CSMA/CA with RTS/CTS (NAV)

DIFS

Sender RTS data


SIFS SIFS
SIFS

Receiver CTS ACK

NAV (RTS) DIFS


Other
NAV (CTS) RTS
Stations
t
defer access

Wireless Sensor Networks Contention


Akyildiz/Vuran Window 44
MAC Protocols for WSNs
 Contention (RANDOM/CSMA)-Based MAC Protocols
 Sleep-MAC
 BMAC
 CCMAC

Wireless Sensor Networks


Akyildiz/Vuran 45
S-MAC: SLEEP MAC
W. Ye, et. al., “Medium Access Control with Coordinated Adaptive
Sleeping for Wireless Sensor Networks,'‘ IEEE/ACM Trans. on
Networking, June 2004.

 Problem: “Idle Listening” consumes significant energy


 Solution: Periodic listen and sleep

listen sleep listen sleep


time
• During sleeping, radio is turned off
• Reduce duty cycle to ~ 10% (Listen for 200ms and sleep for
1.8s)
Latency Energy
Wireless Sensor Networks
Akyildiz/Vuran 46
S-MAC
 Each node goes into periodic sleep mode during which it
switches the radio off and sets a timer to awake later

 When the timer expires it wakes up and listens to see if any


other node wants to talk to it

Wireless Sensor Networks


Akyildiz/Vuran 47
S-MAC
 The duration of the sleep and listen cycles are application
dependent and they are set the same for all nodes

 Requires a periodic synchronization among nodes to take


care of any type of clock drift

Wireless Sensor Networks


Akyildiz/Vuran 48
Periodic Sleep and Listen
 All nodes are free to choose their own listen/sleep
schedules.

 To reduce control overhead, neighboring nodes are


synchronized together.

 They listen at the same time and go to sleep at the same


time (synchronized sleep).

Wireless Sensor Networks


Akyildiz/Vuran 49
Synchronization

 SYNC packets are exchanged periodically to maintain schedule


synchronization.
SYNC PACKET
Sender Node ID Next Sleep Time

 SYNCHRONIZATION PERIOD: Period for a node to send a SYNC packet.


 Receivers will adjust their timer counters immediately after they receive the SYNC packet

Wireless Sensor Networks


Akyildiz/Vuran 50
PERIODIC LISTEN AND SLEEP

Wireless Sensor Networks


Akyildiz/Vuran 51
Maintaining Synchronization
Listen interval is divided into two parts: one for receiving SYNC packets and other
for transmitting/receiving RTS (Request To Send)

Wireless Sensor Networks


Akyildiz/Vuran 52
Choosing and Maintaining Schedules
 Each node maintains a schedule table that stores
schedules of all its known neighbors
 For initial schedule, DO:
A node first listens to the medium for a certain
amount of time (at least the synchronization
period)

Wireless Sensor Networks


Akyildiz/Vuran 53
Choosing and Maintaining Schedules
 If it does not hear a schedule (SYNC packet) from
another node, it randomly chooses a schedule
and broadcasts its schedule with a SYNC packet
immediately

 This node is called a Synchronizer

Wireless Sensor Networks


Akyildiz/Vuran 54
Choosing and Maintaining Schedules
 If a node receives a schedule from a neighbor
before choosing its own schedule,
Follows this neighbor’s schedule
Becomes a Follower
Waits for a random delay and broadcasts its
schedule

Wireless Sensor Networks


Akyildiz/Vuran 55
Coordinated Sleeping

 In a large network, we cannot guarantee that all nodes


follow the same schedule.
 The node on the border will follow both schedules.
 When it broadcasts a packet, it needs to do it twice, first for
nodes on schedule 1 and then for those on schedule 2.

Schedule 1
Schedule 2

Wireless Sensor Networks


Akyildiz/Vuran 56
Border Nodes
 Border nodes have less time to sleep and consume more
energy than others.

 OPTION: Let border node adopt only one schedule (received


first).

Wireless Sensor Networks


Akyildiz/Vuran 57
Collision Avoidance
 S-MAC is based on contention, i.e., if multiple neighbors
want to talk to a node at the same time, they will try to send
when the node starts listening.

 Similar to IEEE802.11, i.e. use RTS/CTS mechanism to


address the hidden terminal problem

 Perform carrier sense before initiating a transmission


Wireless Sensor Networks
Akyildiz/Vuran 58
Collision Avoidance
 If a node fails to get the medium, it goes to sleep and wakes
up when the receiver is free and listening again

 Broadcast packets are sent without using RTS/CTS.

 Unicast data packets follow the sequence of


RTS/CTS/DATA/ACK between the sender and receiver

Wireless Sensor Networks


Akyildiz/Vuran 59
Collision Avoidance
 Duration field in each transmitted packet indicates how
long the remaining transmission will be, so if a node
receives a packet destined to another node, it knows how
long it has to keep silent

 The node records this value in network allocation vector


(NAV) and sets a timer for it

Wireless Sensor Networks


Akyildiz/Vuran 60
Collision Avoidance
 When a node has data to send, it first looks at NAV.

 If this value is not zero, then medium is busy (virtual carrier


sense)

Wireless Sensor Networks


Akyildiz/Vuran 61
Collision Avoidance
 The medium is determined as free if both virtual and
physical carrier sense indicate the medium is free

 All immediate neighbors of both the sender and receiver


should sleep after they hear RTS or CTS packet until the
current transmission is over

Wireless Sensor Networks


Akyildiz/Vuran 62
Adaptive Listening Feature

Reduce multi-hop latency due to periodic sleep

BASIC IDEA: Let the node which overhears its neighbor’s


transmission stay awake

Wireless Sensor Networks


Akyildiz/Vuran 63
Adaptive Listening Feature
1 2 3 4

RTS
CTS CTS

listen listen listen


t0 t t
2
1
 Both neighbors will learn about how long the transmission is from
the duration field in the RTS and CTS packets.
 They are able to adaptively wake up when the transmission is
over.
 Reduce latency by at least half (e.g., CTS of 2 is heard by 3 also. 3
remains awake!!)
Wireless Sensor Networks
Akyildiz/Vuran 64
Message Passing Feature
 Long messages are broken down into smaller packets and
sent continuously once the channel is acquired by RTS/CTS
handshake.

 Increases the sleep time, but leads to fairness problems.

Wireless Sensor Networks


Akyildiz/Vuran 65
S-MAC - EXAMPLE
 Topology
 Two-hop network with two sources and two sinks

 Sources periodically generate a sensing message which is divided


into fragments

 Traffic load is changed by varying the inter-arrival period of the


messages: (for inter-arrival period of 5s, message is generated every
5s by each source. Here it varies between 1-10s).

Wireless Sensor Networks


Akyildiz/Vuran 66
S-MAC - EXAMPLE

Wireless Sensor Networks


Akyildiz/Vuran 67
S-MAC - EXAMPLE
 In each test, there are 10 messages generated on each
source node.

 Each message has 10 fragments, and each fragment has 40


bytes (200 data packets to be passed from their sources to
their sinks).

 The total energy consumption of each node is measured for


sending this fixed amount of data.

Wireless Sensor Networks


Akyildiz/Vuran 68
Experiments
Average energy consumption in the source nodes A&B
1800

1600

Energy consumption (mJ) 1400

802.11-like protocol
1200
without sleep S-MAC without
1000 periodic
sleep
800

600

400

200 S-MAC with Periodic Sleep

0 2 4 6 8 10
Message inter-arrival period (traffic load) (second)
(small value  heavy traffic load)
Wireless Sensor Networks
Akyildiz/Vuran 69
Experiments
 S-MAC consumes much less energy than 802.11-like
protocol without sleeping

 At heavy load, idle listening rarely happens, energy savings


from sleeping is very limited. SMAC achieves energy
savings by avoiding overhearing and efficiently transmitting
long messages.

 At light load, periodic sleeping plays the key role


Wireless Sensor Networks
Akyildiz/Vuran 70
Energy Consumption over Multi-Hops
Ten-hop (11 nodes; 1m apart) linear (tandem) network at different traffic
load; inter-arrival time 0-10s; source node sends 20 messages with each
100 bytes long.

3 configurations for S-MAC: No sleep cycles


10% duty cycle without adaptive listening
10% duty cycle with adaptive listening

Periodic listen interval: 115ms; 10% duty cycle means a frame length for
1.15sec.

Wireless Sensor Networks


Akyildiz/Vuran 71
Energy Consumption over Multi-Hops
Aggregate energy consumption at different
 At light traffic load, 30
traffic load in the entire network
periodic sleeping has

Energy consumption (J)


significant energy 25

savings over fully active No sleep


20 cycles
mode
15

 Adaptive listen saves 10


10% duty cycle
more at heavy load by without adaptive listen
reducing latency 5

10% duty cycle with adaptive


0 listen
0 2 4 6 8 10
Message inter-arrival period (S)
Wireless Sensor Networks
Akyildiz/Vuran 72
Latency as Hops Increase
 Adaptive listen significantly reduces latency caused by periodic sleeping
Latency under lowest traffic load Latency under highest traffic load
12 12

Average message latency (S)


Average message latency (S)

10 10
10% duty cycle without
adaptive listen
8 8 10% duty cycle without
adaptive listen

6 6

4 10% duty cycle with 4


adaptive listen 10% duty cycle with adaptive listen
2 2

No sleep cycles No sleep cycles


0 0
0 2 4 6 8 10 0 2 4 6 8 10
Number of hops Number of hops

Wireless Sensor Networks


Akyildiz/Vuran 73
Throughput as Hops Increase
Effective data throughput under highest traffic load
 Adaptive listen

Effective data throughput (Byte/S)


220
significantly 200

increases throughput 180


No sleep cycles

 Uses less time to


160
140

pass the same 120


100
amount of data 80
10% duty cycle
with adaptive listen
60
40
20 10% duty cycle without adaptive listen

0
0 2 4 6 8 10
Number of hops

Wireless Sensor Networks


Akyildiz/Vuran 74
S-MAC - CONCLUSIONS

 A mainly static network is assumed


 Trades off latency for reduced energy
consumption
 Redundant data is still sent with increased
latency
 Increased collision rate due to sleep
schedules

Wireless Sensor Networks


Akyildiz/Vuran 75
B-MAC
J. Polastre, J. Hill, D. Culler, “Versatile Low Power
Media Access for WSNs”, Proc. of ACM SenSys, Nov. 2004.

 Keep core MAC simple


 Provides basic CSMA access
 Optional link level ACK, no link level RTS/CTS
 CSMA backoffs configurable by higher layers
 Carrier sensing using Clear Channel Assessment (CCA)
 Sleep/Wake scheduling using Low Power Listening (LPL)

Wireless Sensor Networks


Akyildiz/Vuran 76
Goals of BMAC
 Low Power Operation
 Effective Collision Avoidance
 Simple Implementation, Small Code and RAM Size
 Efficient Channel Utilization
 Reconfigurable by Network Protocols
 Tolerant to Changing RF/Networking Conditions
 Scalable to Large Numbers of Nodes

Wireless Sensor Networks


Akyildiz/Vuran 77
B-MAC Design
 Clear Channel Assessment (CCA)

 Packet Backoffs

 Link Layer Acknowledgments

 Low Power Listening (LPL)

Wireless Sensor Networks


Akyildiz/Vuran 78
B-MAC TinyOS Interfaces
 Interfaces for flexible control of
BMAC by higher layer services.
 Allow services to toggle CCA and
ACKs
 Set backoffs on a per message
basis
 Change the LPL mode for transmit
and receive

Wireless Sensor Networks


Akyildiz/Vuran 79
Clear Channel Assessment
 Effective collision avoidance

 Find out whether the channel is idle


 If too pessimistic: waste bandwidth
 If too optimistic: more collisions

Wireless Sensor Networks


Akyildiz/Vuran 80
Clear Channel Assessment
 Key observation
 Ambient noise may change significantly depending on
the environment
 Packet reception has fairly constant channel energy
 Need to tell what is noise and what is a signal

 Software approach to estimating the noise floor


 -> BMAC solution!!!
Wireless Sensor Networks
Akyildiz/Vuran 81
Clear Channel Assessment
 Take a signal strength sample when the channel is assumed
to be free/idle
 WHEN?
 Right after a packet is transmitted or when no valid data
is received

 Samples are entered into a FIFO queue

Wireless Sensor Networks


Akyildiz/Vuran 82
Clear Channel Assessment
 Median of the queue is added to an exponentially weighted moving
average with decay a

 Median signal strength is used as a simple low pass filter to add


robustness to the noise floor estimate.

 At = a * St + (1 - a) * St-1

 where a’s value is assumed to be 0.06 and FIFO queue size of 10.

Wireless Sensor Networks


Akyildiz/Vuran 83
Clear Channel Assessment
 Once a good estimate of the noise floor is established, a
request to transmit a packet starts the process of
monitoring the received signal from the radio.

Wireless Sensor Networks


Akyildiz/Vuran 84
Single-Sample Thresholding vs Outlier
Detection
 Common approach: take single sample, compare to noise floor
 Large number of false negatives  lower effective channel BW
 BMAC: search for outliers in received signal (RSSI)

 If a sample has significantly lower energy than the noise floor


during the sampling period, then the channel is clear

 If 5 samples are taken and no outlier is found, the channel is busy.

Wireless Sensor Networks


Akyildiz/Vuran 85
CCA vs. Threshold Techniques

Idle

Signal Strength
ndicator (RSSI)
rom transceiver

Wireless Sensor Networks


Akyildiz/Vuran 86
CCA vs. Threshold Techniques
 Threshold: waste channel utilization
 CCA: Fully utilize the channel since a valid packet could
have no outlier significantly below the noise floor
 A packet arrives between 22 and 54ms.
 The middle graph shows the output of a thresholding
CCA algorithm. ( 1: channel clear, 0: channel busy)
 Bottom shows the output of an outlier detection algorithm

Wireless Sensor Networks


Akyildiz/Vuran 87
Clear Channel Assessment
 Before transmission – take a sample of the channel
 If the sample is below the current noise floor, channel clear, send
immediately.

 If five samples are taken, and no outlier found => channel busy, take a
random backoff

 Noise floor updated when the channel is known to be clear, e.g., just
after packet transmission

Wireless Sensor Networks


Akyildiz/Vuran 88
Clear Channel Assessment
 CCA can be turned on/off (see BMAC-TinyOS interface)

 If turned off, a schedule-based protocol can be


implemented above B-MAC

 If turned on, B-MAC uses an initial channel backoff when


sending a packet

Wireless Sensor Networks


Akyildiz/Vuran 89
Clear Channel Assessment
 B-MAC does not set the backoff time, instead an event is
signaled to the service that send the packet via the
MacBackoff interface.

 The service may either return an initial backoff time or


ignore the event

Wireless Sensor Networks


Akyildiz/Vuran 90
Clear Channel Assessment

 If ignored, a small random backoff is used.

 After the initial backoff, the CCA outlier algorithm is run.

 If the channel is not clear, an event signals the service for a


congestion backoff time.

Wireless Sensor Networks


Akyildiz/Vuran 91
Clear Channel Assessment

 If no backoff time is given, again a small random backoff is


used.

 Enabling or disabling CCA and configuring the backoff


allows services to change the fairness and available
throughput.

Wireless Sensor Networks


Akyildiz/Vuran 92
Low Power Listening
 Goal: Minimize “Listen Cost”
 Principles
 Node periodically wakes up, turns radio on and checks
activity on the channel
 Wakeup time fixed (time spend sampling RSSI?)
 “Check time” variable
 If energy/activity on the channel is detected, node powers
up and stays awake for the time required to receive the
incoming packet

Wireless Sensor Networks


Akyildiz/Vuran 93
Low Power Listening
 Node goes back to sleep
 If the packet is received successfully
 After a timeout (if no packet received (a false positive))
 Preamble length matches channel checking period
 No explicit synchronization required
 Noise floor estimation used to detect channel activity during
LPL

Wireless Sensor Networks


Akyildiz/Vuran 94
Check Interval for Channel Activity
 To reliably receive data, the preamble length is matched to
the interval that the channel is checked for activity

 If the channel is checked for every 100 ms, the preamble


must be at least 100 ms long for a node to wake up, detect
activity on the channel, receive the preamble and then
receive the message

Wireless Sensor Networks


Akyildiz/Vuran 95
Check Interval for Channel Activity

 Interval between LPL samples is maximized so that the time


spent sampling the channel is minimized.

 Transmit mode ~~ Preamble length


 Listening mode ~~ Check interval

Wireless Sensor Networks


Akyildiz/Vuran 96
LPL- Preamble Sampling
Preamble is not a packet but a physical layer RF pulse (Minimize overhead)

Preamble Send data


Sender
S

Receiver
Preamble sampling Active to receive a message

|Preamble| >= Sampling period


Wireless Sensor Networks
Akyildiz/Vuran 97
LPL Check Interval
 Sampling rate (traffic pattern) defines optimal check interval
 Check interval
 Too small: energy wasted on idle listening
 Too large: energy wasted on transmissions (long preambles)
 In general, it is better to have larger preambles than to check more
often!
 More frequent checking of the radio
 Shorter transmission time
 More energy consumption

Wireless Sensor Networks


Akyildiz/Vuran 98
LPL Check Interval

Lifetime in years

Check Interval (ms)


Wireless Sensor Networks
Akyildiz/Vuran 99
Experimental Results: Throughput
 “BMAC is about 4.5 faster than SMAC-unicast”
 Not as fast when ACK or RTS/CTS is used
 Differences less pronounced as # of nodes increases
 Another issue: BMAC has CCA, thus it backs off less
frequently (and perhaps the backoff timer is faster)
 What about hidden terminal without RTS/CTS?

Wireless Sensor Networks


Akyildiz/Vuran 100
Throughput vs Power Consumption
 10 nodes in a neighborhood
 Data must arrive within 10 seconds
 Average power consumption per node

Wireless Sensor Networks


Akyildiz/Vuran 101
Throughput vs Power Consumption

ALWAYS ON

Power Consumed (mJ/sec)

SMAC
BMAC

Traffic
Wireless Sensor Load (bps)
Networks
Akyildiz/Vuran 102
Throughput vs Power Consumption
 Low data rates: SMAC is better
 Very low duty cycle
 Power vs throughput
 SMAC: linear
 BMAC: sub-linear
 Reason: SMAC duty cycle must increase
 More active periods, more SYNC periods
 Cost of resynchronizing?
 BMAC: larger preambles at low throughput,
progressively becoming smaller

Wireless Sensor Networks


Akyildiz/Vuran 103
Energy vs Latency
 10-hop network
 Source sends a 100-byte packet every 10 seconds
 SMAC: 10% Duty Cycle w. Adaptive Listening
 BMAC: choose optimal check interval

Wireless Sensor Networks


Akyildiz/Vuran 104
LATENCY

Wireless Sensor Networks


Akyildiz/Vuran 105
Energy vs Latency
 SMAC again performs worse...
 Reason: sync packets, probability of multiple
schedules---less time to sleep

Wireless Sensor Networks


Akyildiz/Vuran 106
Comparison of S-MAC and B-MAC
S-MAC B-MAC
Collision avoidance CSMA/CA CSMA

ACK Yes Optional

Message passing Yes No

Overhearing avoidance Yes No

Listen period Pre-defined + adaptive listen Pre-defined

Listen interval Long Very short

Schedule synchronization Required Not required

Packet transmission Short preamble Long preamble

Code size 6.3KB 4.4KB (LPL & ACK)

Wireless Sensor Networks


Akyildiz/Vuran 107
Collaborative MAC (CC-MAC) Protocol
M.C. Vuran, and I. F. Akyildiz, “Spatial Correlation-based Collaborative Medium Access
Control in Wireless Sensor Networks,” IEEE/ACM Transactions on Networking, vol. 14,
no. 2, pp. 316 -329, April 2006

 WSN are characterized by dense deployment of sensor nodes

Exploit spatial correlation to reduce transmissions in


MAC layer !

Wireless Sensor Networks


Akyildiz/Vuran 108
Collaborative MAC (CC-MAC) Protocol
 Main Components
 Iterative Node Selection (INS) Algorithm (@Sink)
Determines protocol parameters (required distance
(rcorr) for correlation neighbors)
 Event MAC (@Sensors)
Filters out correlated data
 Network MAC (@Sensors)
Provides prioritization for route-thru packets
Wireless Sensor Networks
Akyildiz/Vuran 109
Spatial Correlation Theory
M. C. Vuran, O. B. Akan, and I. F. Akyildiz, “Spatio-Temporal Correlation: Theory and Applications for
Wireless Sensor Networks," Computer Networks Journal (Elsevier), June 2004.

N1
S1 Y1
S X1 Encoder Decoder S
N2
S2 X2 Y2 X i Si  N i
Encoder
Wireless Yi  f i ( X i )
Ni
Sensor ^
Si Xi Encoder Yi
S g Y1;.....; YN 
Network
^
NN D E  d ( S , S )

SN XN YN  
Encoder
 S  event source  Yi  the encoded values
 Si  the samples of this event S at the  fi  the encoding function
sensor location
(N sensors)
 g  estimation function
 Ni the observation (noise) error  s^ estimation of the event at the
 Xi  the overall observed value of the event sink
Wireless Sensor Networks  D  distortion function 110
 E  encoders for the channel to transmit
Akyildiz/Vuran 110
Spatial Correlation Theory

 Distortion achieved by using M out of N sensor readings

 Need
  – Noise variance (Sensing board property)

  – Signal variance (Physical phenomenon property)


S

   – Correlation coefficient (Physical phenomenon


(i,j s,i

property)
Wireless Sensor Networks
Akyildiz/Vuran 111
Corollaries From Theory

 Choose M nodes such that


 They are located as close to the event source as possible
 They are located as farther apart from each other as possible.

 RESULT: If two nodes are located closer than a specific distance,


i.e., rcorr, their observations are correlated
Wireless Sensor Networks
Akyildiz/Vuran 112
Corollaries From Theory

Representative nodes are not located close to each


other, the probability of collision decreases

RESULT: Exploiting spatial correlation not only


improves the distortion but also utilizes the wireless
channel by avoiding collisions

Wireless Sensor Networks


Akyildiz/Vuran 113
@Sink: Iterative Node Selection
(INS) Algorithm

 Find rcorr such that maximum distortion Dmax is met


 How is the correlation radius, rcorr calculated?
1. INS performs vector quantization (VQ) techniques to form
Voronoi regions, i.e., correlation regions
2. Correlation distance (rcorr) is found
 rcorr is then used in the distributed algorithm at sensors

Wireless Sensor Networks


Akyildiz/Vuran 114
@Sink: Iterative Node Selection (INS) Algorithm

 Estimate  ,  and
S (i,j s,i

 Estimate signal parameters from received samples


 Find r
corr

 Iteratively find minimum M such that D is met


*
max

 Form Voronoi regions


 Find r
corr

Wireless Sensor Networks


Akyildiz/Vuran 115
INS: Parameter Estimation

 Sensors send their observations


S3
based on query (for one cycle)
S1 S4  INS estimates the variance sS2
S5 from the collected data (via
S2 variance estimation techniques)
 Estimate correlation parameters

Wireless Sensor Networks


Akyildiz/Vuran 116
INS: Parameter Estimation

 Correlation coefficient
 d (i,j) /1
 (i, j)  K ( d )  e
 d(i,j) – distance between nodes
 q1 – correlation parameter
 Use S1, S2, S3 … to calculate empirical K(d)
SiS j  d (i, j ) /1
K (i, j ) ( d )  e
S

 Estimate average q1
 Use q1 for further calculations
INS: Find rcorr

 Start calculating D(M) by setting M=N


 N all nodes (in the interested region or the whole network)
 If D(M) < Dmax
 Decrease M by k (system parameter)
 runVQ
 Generate multiple topologies with M nodes
 Sensors have different locations for each topology
 Calculate  ,  using 
(s,i) (i,j) 1
 Calculate D(M)
 Repeat while D(M) < D max

Wireless Sensor Networks


Akyildiz/Vuran 118
INS: Find rcorr

 End result M =argmin{D(M) < D


*
max }

Wireless Sensor Networks


Akyildiz/Vuran 119
INS: Find rcorr

Correlation region

Wireless Sensor Networks


Akyildiz/Vuran 120
INS: Find rcorr

Correlation neighbors

Wireless Sensor Networks


Akyildiz/Vuran 121
INS: Find rcorr

Representative Node

Wireless Sensor Networks


Akyildiz/Vuran 122
INS: Find rcorr

2*rcorr

Wireless Sensor Networks


Akyildiz/Vuran 123
INS: Find rcorr

 Find avg. distance between selected M *


nodes = 2rcorr

 Sink sends r corr to each node in the network

 CC-MAC distributed operation is based only on r corr

Wireless Sensor Networks


Akyildiz/Vuran 124
Definitions

Wireless Sensor Networks


Akyildiz/Vuran 125
Definitions
 Suppose a node n i

 Correlation neighbors
 Nodes inside the
correlation region of node
ni ni
Representative node (node ni)
 A node that represents all
the nodes inside a
correlation region

Wireless Sensor Networks


Akyildiz/Vuran 126
Definitions
 Correlation region
 Region of radius rcorr
centered around node ni
 Correlation neighbors
 Nodes inside the
rcorr correlation region of node
ni
 Representative node (node ni)
 A node that represents all
the nodes inside a
correlation region

Wireless Sensor Networks


Akyildiz/Vuran 127
Definitions
 Correlation region
 Region of radius rcorr
centered around node ni
 Correlation neighbors
 Nodes inside the
rcorr correlation region of node
ni
 Representative node (node ni)
 A node that represents all
the nodes inside a
correlation region

Wireless Sensor Networks


Akyildiz/Vuran 128
Definitions
 Correlation region
 Region of radius rcorr
centered around node ni
 Correlation neighbors
 Nodes inside the
rcorr correlation region of node
ni
 Representative node (node ni)
 A node that represents all
the nodes inside a
correlation region

Wireless Sensor Networks


Akyildiz/Vuran 129
@Sensors: Collaborative MAC (CC-MAC)
Protocol
 Two reasons for medium access
Sink  Source function: Transmit event
information
 Router function: Forward packets
from other nodes in the multi-hop
path to the sink
 Two components
 Event MAC (E-MAC)
 Network MAC
(N-MAC)

Wireless Sensor Networks


Akyildiz/Vuran 130
@Sensors: Collaborative MAC (CC-MAC)
Protocol
 Two reasons for medium access
Sink  Source function: Transmit event
information
 Router function: Forward packets
from other nodes in the multi-hop
path to the sink
 Two components
 Event MAC (E-MAC)
 Network MAC
(N-MAC)

Event Area
Wireless Sensor Networks
Akyildiz/Vuran 131
@Sensors: Collaborative MAC (CC-MAC)
Protocol
 Two reasons for medium access
Sink  Source function: Transmit event
information
 Router function: Forward packets
from other nodes in the multi-hop
path to the sink
 Two components
 Event MAC (E-MAC)
 Network MAC
(N-MAC)

Event Area
Wireless Sensor Networks
Akyildiz/Vuran 132
@Sensors: Collaborative MAC (CC-MAC)
Protocol
 Two reasons for medium access
Sink  Source function: Transmit event
information
 Router function: Forward packets
from other nodes in the multi-hop
path to the sink
 Two components
 Event MAC (E-MAC)
 Network MAC
(N-MAC)

Event Area
Wireless Sensor Networks
Akyildiz/Vuran 133
@Sensors: Collaborative MAC
(CC-MAC) Protocol
 Two reasons for medium access
Sink  Source function: Transmit event
information
 Router function: Forward packets
from other nodes in the multi-hop
path to the sink
 Two components
 Event MAC (E-MAC)
 Network MAC
(N-MAC)

Event Area
Wireless Sensor Networks
Akyildiz/Vuran 134
Event MAC (E-MAC)

 Aims to filter out correlated sensor records


 Choose representative nodes distributively
 Form correlation-based clusters
 How will a node know it should perform E-MAC?

Wireless Sensor Networks


Akyildiz/Vuran 135
Packet Structure
 First Hop (FH) field
differentiates between newly
generated packet and route
thru packet
 E-MAC or N-MAC is run
accordingly
 Representative nodes set
the FH field for sensed data

Wireless Sensor Networks


Akyildiz/Vuran 136
Event MAC (E-MAC)

 First Contention Phase (FCP)

Event Area

Wireless Sensor Networks


Akyildiz/Vuran 137
Event MAC (E-MAC)
 First Contention Phase (FCP)

FH=1 Event Area


RTS

Wireless Sensor Networks


Akyildiz/Vuran 138
Event MAC (E-MAC)
 First Contention Phase (FCP)

rcorr Event Area

Wireless Sensor Networks


Akyildiz/Vuran 139
Event MAC (E-MAC)

 First Contention Phase (FCP)


Nodes contend using IEEE 802.11 structure for
the first time
Winner nodes are the representative nodes
Representative nodes set the FH field in their
packets for further communication

Wireless Sensor Networks


Akyildiz/Vuran 140
Event MAC (E-MAC)

r is used to determine if neighbor nodes are


corr
correlation neighbors
 After a node ni captures the channel all the correlation
neighbors of ni
 Drop their packets
 Enter Suspicious Sleep State (SSS)
 Stay in SSS for T sec.
SSS

Wireless Sensor Networks


Akyildiz/Vuran 141
Event MAC (E-MAC)

 Suspicious Sleep State (SSS)


 Wake up at random times to look for incoming traffic
 Maintain connectivity and save energy
 All nodes enter First Contention Period (FCP) after T
SSS
sec. to maintain equal load-sharing

Wireless Sensor Networks


Akyildiz/Vuran 142
Event MAC (E-MAC)

Wireless Sensor Networks


Akyildiz/Vuran 143
Network MAC (N-MAC)

 Since correlation is filtered out by E-MAC, route-thru


packet has higher priority
 Route thru packets may traverse through multiple
event areas
 Router nodes clear the FH field to indicate N-MAC
should be used for the route thru packet

Wireless Sensor Networks


Akyildiz/Vuran 144
Network MAC (N-MAC)

FH=1
RTS

Wireless Sensor Networks


Akyildiz/Vuran 145
Network MAC (N-MAC)

FH=0
RTS

Wireless Sensor Networks


Akyildiz/Vuran 146
Network MAC (N-MAC)

FH=0
RTS

FH=1
RTS

Wireless Sensor Networks


Akyildiz/Vuran 147
Network MAC (N-MAC)

FH=0
RTS

Backoff

Wireless Sensor Networks


Akyildiz/Vuran 148
Network MAC (N-MAC)
 N-MAC prioritizes route-thru packets during medium access
using
 Smaller backoff window size
 Smaller inter-frame spacing during contention
 Router nodes have higher prioritization over representative
nodes

Wireless Sensor Networks


Akyildiz/Vuran 149
Network MAC (N-MAC)

Wireless Sensor Networks


Akyildiz/Vuran 150
CC-MAC Performance
 Energy consumption
decreases with increasing
reporting period
 Increasing rcorr decreases
the number of
representative nodes, i.e.
energy consumption
 Energy conservation of
56% is possible going from
rcorr=30m to rcorr=100m
Avg. energy
consumption/node for
different rcorr Wireless Sensor Networks
Akyildiz/Vuran 151
CC-MAC Performance
 60% increase in energy
consumption by
decreasing TSSS from 150s
to 30s
 Decreased TSSS results in
equal load sharing
 For small TSSS, energy
consumption is increased
due to more frequent
contention periods, i.e.,
Avg. energy consumption/node FCP
for different TSSS
Wireless Sensor Networks
Akyildiz/Vuran 152
CC-MAC Performance

Medium Access Delay


Wireless Sensor Networks
Akyildiz/Vuran 153
CC-MAC Performance

Packet Drop Rate


Wireless Sensor Networks
Akyildiz/Vuran 154
CC-MAC Performance

Goodput
Wireless Sensor Networks
Akyildiz/Vuran 155
CC-MAC Performance

Avg. Energy Consumption


Wireless Sensor Networks
Akyildiz/Vuran 156
MAC Protocols for WSNs
 1. Contention (RANDOM/CSMA)-Based MAC Protocols
 Sleep-MAC, BMAC, T-MAC, CCMAC, etc…

 2. Reservation-Based (TDMA BASED) MAC Protocols


 TRAMA, FLAMA, etc…

 3. HYBRID (CSMA/TDMA) MAC Protocols


 ZMAC, ….
Wireless Sensor Networks
Akyildiz/Vuran 157
TRAMA: Energy Efficient Collision-Free MAC
V. Rajendran, K. Obraczka, and J. J. Garcia-Luna-Aceves,
``Energy-Efficient, Collision-Free Medium Access Control for Wireless Sensor Networks,'' Proc.
ACM SenSys 2003, LA, CA, Nov. 2003.

 A time-slotted structure

115.2 kbps  transmission slot 46ms (512-byte segments)

Wireless Sensor Networks


Akyildiz/Vuran 158
TRAMA
Time divided into PERIODS:

 Random Access Period


 Used for signaling: synchronization and updating
two-hop neighbour information. Collision!!

 Scheduled Access Period:


 Used for contention free data exchange between nodes.
 Supports unicast, multicast and broadcast communication.

Wireless Sensor Networks


Akyildiz/Vuran 159
TRAMA
 SIGNALING SLOTS: are used by the so-called NEIGHBOR
PROTOCOL (NP)
 Propagate one-hop neighbor information among
neighboring nodes during the random access period.

 A consistent two-hop topology information across all nodes


is obtained

Wireless Sensor Networks


Akyildiz/Vuran 160
TRAMA
 TRANSMISSION SLOTS:
1. For collision free data exchange
2. For schedule propagation

 Nodes use SEP (Schedule Exchange Protocol) to exchange


traffic based information or schedules with neighbors

Wireless Sensor Networks


Akyildiz/Vuran 161
TRAMA Components
 Neighbor Protocol (NP)
 Gather 2-hop neighbourhood information
 Schedule Exchange Protocol (SEP)
 Gather 1-hop traffic information for SCHEDULING
 Adaptive Election Algorithm (AEA)
 Select transmitters, receivers for current time slot leave
other nodes in liberty to switch to low power mode using
the NP and SEP results

Wireless Sensor Networks


Akyildiz/Vuran 162
Neighbor Protocol (NP)
 Main Function:
 Gather two-hop neighborhood information by using
signaling packets during the random access period.

 If no updates, signaling packets are sent as “keep alive”


beacons

Wireless Sensor Networks


Akyildiz/Vuran 163
Neighbor Protocol
 A node times out if nothing is heard from its neighbor.
 Updates retransmitted to guarantee packet delivery

Wireless Sensor Networks


Akyildiz/Vuran 164
Packet Formats

Wireless Sensor Networks


Akyildiz/Vuran 165
Schedule Exchange Protocol (SEP)
 Each node computes a SCHEDULE INTERVAL (SCHED)
based on the rate at which packets are produced.

 SCHED represents # of slots for which the node can


announce the schedule to its neighbors according to its
current state (queue)

Wireless Sensor Networks


Akyildiz/Vuran 166
Schedule Exchange Protocol (SEP)

 The node pre-computes # of slots in the interval


[t, t+SCHED]

for which it has the highest priority among its two-


hop neighbors (contenders)  WINNING SLOTS

Wireless Sensor Networks


Akyildiz/Vuran 167
Schedule Exchange Protocol (SEP)
 The node announces the intended receivers for these slots.
 The last winning slot is used for broadcasting the node’s schedule for the
next interval.

 If these winning slots cannot be filled by the node the


remaining vacant slots can be released to other nodes.

Wireless Sensor Networks


Akyildiz/Vuran 168
Schedule Exchange Protocol (SEP)
EXAMPLE: Node u  SCHED is 100 slots.
During time slot 1000, u computes its winning slots
between [1000,1100].
Assume: These slots are 1009, 1030, 1033, 1064,
1075, 1098.
u uses slot 1098 to announce its next schedule by
looking ahead from [1098,1198].

Wireless Sensor Networks


Akyildiz/Vuran 169
Schedule Exchange Protocol (SEP)
Nodes announce their schedules via SCHEDULE PACKETS.
BITMAP: with the length equal to # of one-hop
neighbors.
Each bit corresponds to one particular receiver.
Example: One node with 4 neighbors 14,7,5 and 4.
BITMAP  size 4 ..
For broadcast: all bitmap bits are set to 1.

Wireless Sensor Networks


Akyildiz/Vuran 170
Schedule Packet Format

Wireless Sensor Networks


Akyildiz/Vuran 171
Schedule Exchange Protocol (SEP)

SourceAddr: Node announcing the schedule.


Timeout: # of of slots for which the schedule is valid
(starting from the current slot)
Width: Length of the neighbor bitmap (# of one hop
neighbors)
numSlots: total # of winning slots (# of bitmaps
contained in the packet)

Wireless Sensor Networks


Akyildiz/Vuran 172
Adaptive Election
 Given: Each node knows its two-hop neighborhood and their current
schedules
 How to decide which slot (in scheduled access period) a node can
use?
 Use node identifier x and globally known hash function h
 For time slot t, compute priority p = h (x XOR t)
 Compute this priority for next k time slots for node itself and all
two-hop neighbors
 Node uses these time slots for which it has the highest priority

Wireless Sensor Networks


Akyildiz/Vuran 173
Simulation Results
 Broadcast traffic using
Poisson arrivals.

 50 nodes, 500x500 area.

 512 byte data.

 Average node density: 6

Delivery Ratio
Wireless Sensor Networks
Akyildiz/Vuran 174
Energy Savings

Percentage Energy Savings


Wireless Sensor Networks
Akyildiz/Vuran 175
TRAMA Limitations
 Complex election algorithm and data structure.
 Overhead due to explicit schedule propagation.
 Higher queueing delay.

Wireless Sensor Networks


Akyildiz/Vuran 176
MAC Protocols for WSNs
 1. Contention (RANDOM/CSMA)-Based MAC Protocols
 Sleep-MAC, BMAC, T-MAC, CCMAC, etc…

 2. Reservation-Based (TDMA BASED) MAC Protocols


 TRAMA, FLAMA, etc…

 3. HYBRID (CSMA/TDMA) MAC Protocols


 ZMAC, ….
Wireless Sensor Networks
Akyildiz/Vuran 177
Z(ebra)-MAC: A HYBRID MAC PROTOCOL
I. Rhee, A. Warrier,M. Aia, J. Min, ACM SenSys 2005, Nov 2005.

Channel Utilization
MAC Low Contention High Contention
CSMA High Low
TDMA Low High

* Combines the strengths of both CSMA and TDMA at the same time
offsetting their weaknesses.
* High channel efficiency and fair

Wireless Sensor Networks


Akyildiz/Vuran 178
Effective Throughput
CSMA vs. TDMA

IDEAL

Channel TDMA
Utilization

CSMA

# of Contenders
Wireless Sensor Networks
Akyildiz/Vuran 179
Z-MAC
 Uses the TDMA schedule created by DRAND as a 'hint' to
schedule transmissions.

 The owner of a time-slot always has priority over the non-


owners while accessing the medium.

 Unlike TDMA, non-owners can 'steal' the time-slot when


the owners do not have data to send.

Wireless Sensor Networks


Akyildiz/Vuran 180
Z-MAC
 This enables Z-MAC to switch between CSMA and TDMA
depending on the level of contention
 Under low contention,
 Z-MAC acts like CSMA (i.e. high channel utilization and
low latency),
 Under high contention,
 Z-MAC acts like TDMA (i.e. high channel utilization,
fairness and low contention overhead)

Wireless Sensor Networks


Akyildiz/Vuran 181
DRAND (Distributed TDMA Scheduling) – Algorithm
E
A
C D
B
F
Radio
Interference
Map 0 1
A E A E
2 3
C D C D
B F B F
1 DRAND Slot 0
Input Graph Assignment
Wireless Sensor Networks
Akyildiz/Vuran 182
DRAND – Algorithm – Successful Round
B B
F F
A Request A Grant
C E C E
G D G
D
Step 1. Broadcast Request Step 2. Receive Grants
B
F B
F
A Release
C E A
C E Two Hop Release

D G
D G
Step 3. Broadcast Release
Step 4. Broadcast Two Hop Release
Wireless Sensor Networks
Akyildiz/Vuran 183
DRAND – Algorithm – Unsuccessful
Round B
F B
F
A Request Grant A Reject
C E C E
Grant
G D G
D
Step 1. Broadcast Request Step 2. Receive Grants from
A,B,D but Reject from E
B
F
A Fail
C E

D G

Step 3. Broadcast Fail


Wireless Sensor Networks
Akyildiz/Vuran 184
Local Frames
 After DRAND, each node needs to decide on the frame size.
 Conventional wisdom – Synchronize with rest of the network on
Maximum Slot Number (MSN) as the frame size.

 Disadvantage:
 MSN must be broadcast across the entire network.
 Unused slots if neighborhood small, e.g., A and B would have
to maintain frame size of 8, in spite of having small
neighborhood.

Wireless Sensor Networks


Akyildiz/Vuran 185
Local Frames - Example
E 1(5)
F 3(5)
A B C D
G 4(5)
0(2) 1(2) 2(5) 0(5)
H 5(5)

Label is the assigned slot, number in parenthesis is


maximum slot number within two hops

Wireless Sensor Networks


Akyildiz/Vuran 186
Local Frames
 Time Frame Rule (TF Rule)
 Let node i be assigned to slot si, according to DRAND and MSN within two hop
neighborhood be Fi, then i's time frame is set to be 2a, where positive integer a is
chosen to satisfy condition
2a-1 <= Fi < 2a – 1

 In other words, i uses the s -th slot in every 2


i
a
time frame (i's slots are L * 2a + si,
for all L=1,2,3,...)

Wireless Sensor Networks 187


Akyildiz/Vuran 187
Local Frames - Example

Wireless Sensor Networks


Akyildiz/Vuran 188
Transmission Control

 Slot Ownership
 If current timeslot is the node's assigned time-slot, then
it is the Owner, and all other neighbouring nodes are Non-
Owners.

Wireless Sensor Networks


Akyildiz/Vuran 189
Transmission Control
 Low Contention Level – Nodes compete in all slots, albeit with
different priorities. Before transmitting:
 Owner
Backoff = Random(To)
 Non-Owner
Backoff = T + Random(T )
o no

 After backoff, sense channel, if busy repeat above, else


send.

Wireless Sensor Networks


Akyildiz/Vuran 190
Transmission Control
 Switches between CSMA and TDMA automatically depending on
contention level

 Performance depends on specific values of T o and Tno

 From analysis, T o = 8 and Tno = 32 are used for best performance

Wireless Sensor Networks


Akyildiz/Vuran 191
Transmission Control

Ready to Send, Start Random(To) Backoff After Backoff, CCA Idle


Ready to Send, Start To + Random(Tno) Backoff After Backoff, CCA Busy

Time 0 1 2 0
Slots

A(0)

Owner Backoffs

B(1)

Non-Owner Backoffs
Wireless Sensor Networks
Akyildiz/Vuran 192
Explicit Contention Notification (ECN)
 Informs all nodes within two-hop neighborhood not to
send during its time-slot

 When a node receives ECN message, it sets its HCL flag

 ECN is sent by a node if it experiences high contention

Wireless Sensor Networks


Akyildiz/Vuran 193
Explicit Contention Notification
 High contention detected by lost ACKs or congestion
backoffs.

 On receiving one-hop ECN from i, forward two-hop ECN if


it is on the routing path from i.

Wireless Sensor Networks


Akyildiz/Vuran 194
Explicit Contention Notification
Thick Line – Routing Path  C experiences high contention
Dotted Line – ECN Messages
 C broadcasts one-hop ECN message to
F A, B, D.
forward  A, B not on routing path (C->D->F), so
discard ECN.
D
forward  D on routing path, so it forwards ECN as
two-hop ECN message to E, F.
C E  Now, E and F will not compete during
C's slot as Non-Owners.
A B  A, B and D are eligible to compete during
discard discard C's slot, albeit with lesser priority as
Non-Owners.
Wireless Sensor Networks
Akyildiz/Vuran 195
Two-Hop Experiments
 Setup – Two-Hop
 Dumbbell shaped topology
 Transmission power varied between low (50) and high
(150) to get two-hop situations.
 Aim – See how Z-MAC works when Hidden Terminal
Problem manifests itself.

Sink
Sources Sources

Wireless Sensor Networks


Akyildiz/Vuran 196
Experimental Setup - Testbed
 40 Mica2 sensor motes
 Wall-powered and
connected to the
Internet via Ethernet
ports
 Programs uploaded via
the Internet, all mote
interaction via wireless
 Links vary in quality,
some have loss rates up
to 30-40%
 Asymmetric links also
present (14-->15)

Wireless Sensor Networks


Akyildiz/Vuran 197
Single-Hop Throughput

Z-MAC

B-MAC

Wireless Sensor Networks


Akyildiz/Vuran 198
Multi Hop Results – Throughput

MULTI-HOP

Z-MAC

B-MAC

Wireless Sensor Networks


Akyildiz/Vuran 199
Multi Hop Results – Energy Efficiency (KBits/Joule)

Z-MAC

B-MAC

MULTI-HOP

Wireless Sensor Networks


Akyildiz/Vuran 200
MAC Protocols for WSNs
 1. Contention (RANDOM/CSMA)-Based MAC Protocols
 Sleep-MAC, BMAC, T-MAC, CCMAC, etc…

 2. Reservation-Based (TDMA BASED) MAC Protocols


 TRAMA, FLAMA, etc…

 3. HYBRID (CSMA/TDMA) MAC Protocols


 ZMAC, ….
Wireless Sensor Networks
Akyildiz/Vuran 201
Open Research Issues

1. Mobility Support
2. Real-time Communication

Wireless Sensor Networks


Akyildiz/Vuran 202

You might also like