Transcript Document

MAC Layer Protocols for
Sensor Networks
Prasun Sinha
Department of Computer Science and Engineering
Ohio State University
April 25th, 2007
(some slides adapted from authors presentations found on the Internet)
1
Introduction

Wireless sensor network





Special ad hoc wireless network
Large number of nodes w/ sensors & actuators
Battery-powered nodes
energy efficiency
Unplanned deployment
self-organization
Node density & topology change
robustness
Sensor-net applications
• Nodes cooperate for a common task
• In-network data processing
2
Some Applications of Sensor Networks

Data Collection Networks



Sensing Movement of Glaciers
Environment Monitoring
Habitat Monitoring



Habitat Monitoring of Storm Petrels in Great Duck Island
Microsoft’s Effort to put every sensor on the web
Event Triggered Networks

Structural Monitoring


Precision Agriculture



Hardware Manufacturing facilities
Military Applications
Environment Monitoring


Oregon and British Columbia Vineyards
Condition based Maintenance


Golden Gate Bridge
Poisonous gas, pollutants etc.
National Asset Protection

Coastline, Border Patrol, Roadways, Oil/gas pipelines, Secure facilities
3
Talk Outline

SMAC: http://www.isi.edu/~weiye/pub/smac_ton.pdf

“Medium Access Control With Coordinated Adaptive Sleeping for Wireless
Sensor Networks”, Wei Ye, John Heidemann, and Deborah Estrin, Transactions
on Networking, 2004, (also Infocom 2002)

BMAC: http://www.polastre.com/papers/sensys04-bmac.pdf

“Versatile Low Power Media Access for Wireless Sensor Networks”, Joseph
Polastre, Jason Hill and David Culler, ACM SENSYS 2004

CMAC: http://www.cse.ohio-state.edu/~prasun/publications/conf/secon07-cmac.pdf

“CMAC: An Energy Efficient MAC Layer Protocol Using Convergent Packet
Forwarding for Wireless Sensor Networks”, Sha Liu, Kai-Wei Fan and Prasun
Sinha, IEEE SECON 2007
4
Medium Access Control in Sensor Nets

Important attributes of MAC protocols
1.
2.
3.
4.
5.
6.
7.
Collision avoidance
Energy efficiency
Scalability in node density
Latency
Fairness
Throughput
Bandwidth utilization
Primary
Secondary
5
Energy Efficiency in MAC

Major sources of energy waste (cont.)

Idle listening

Dominant in sensor nets
Long idle time when no sensing event happens
• Collisions
• Control overhead
• Overhearing
Common to all
wireless networks
We try to reduce energy consumption from
all above sources
Combine benefits of TDMA + contention
protocols
6
Sensor-MAC (S-MAC) Design

Tradeoffs
Latency
Fairness
Energy
Major components in S-MAC
•
•
•
•
Periodic listen and sleep
Collision avoidance
Overhearing avoidance
Massage passing
7
Periodic Listen and Sleep


Problem: Idle listening consumes significant
energy
Solution: Periodic listen and sleep
listen
sleep
listen
sleep
• Turn off radio when sleeping
• Reduce duty cycle to ~ 10% (200ms on/2s off)
Latency
Energy
8
Periodic Listen and Sleep

Schedules can differ
Node 1
Node 2
listen
sleep
listen
listen
sleep
sleep
listen
sleep
• Prefer neighboring nodes have same schedule
— easy broadcast & low control overhead
Schedule 1
Schedule 2
Border nodes:
two schedules
broadcast twice
9
Periodic Listen and Sleep

Schedule Synchronization

Remember neighbors’ schedules
— to know when to send to them



Each node broadcasts its schedule every few
periods of sleeping and listening
Re-sync when receiving a schedule update
Schedule packets also serve as beacons for new
nodes to join a neighborhood
10
Collision Avoidance



Problem: Multiple senders want to talk
Options: Contention vs. TDMA
Solution: Similar to IEEE 802.11 ad hoc mode
(DCF)




Physical and virtual carrier sense
Randomized backoff time
RTS/CTS for hidden terminal problem
RTS/CTS/DATA/ACK sequence
11
Overhearing Avoidance


Problem: Receive packets destined to others
Solution: Sleep when neighbors talk



Basic idea from PAMAS (Singh, Raghavendra 1998)
But we only use in-channel signaling
Who should sleep?
• All immediate neighbors of sender and receiver
How long to sleep?
• The duration field in each packet informs other
nodes the sleep interval
12
Message Passing


Problem: Sensor net in-network processing
requires entire message
Solution: Don’t interleave different messages




Long message is fragmented & sent in burst
RTS/CTS reserve medium for entire message
Fragment-level error recovery — ACK
— extend Tx time and re-transmit immediately
Other nodes sleep for whole message time
Fairness
Energy
Msg-level latency
13
Msg Passing vs. 802.11 fragmentation

S-MAC message passing
Data 19
RTS 21
ACK 18
CTS 20
...
Data 17
ACK 16
Data 1
...
ACK 0
 Fragmentation in IEEE 802.11
• No indication of entire time — other nodes keep listening
• If ACK is not received, give up Tx — fairness
Data 3
RTS 3
CTS 2
Data 3
ACK 2
...
ACK 2
Data 1
...
ACK 0
14
Implementation on Testbed Nodes
Platform
Motes (UC Berkeley)
8-bit CPU at 4MHz,
8KB flash, 512B RAM
916MHz radio
TinyOS: event-driven
Compared MAC modules
1. IEEE 802.11-like protocol w/o sleeping
2. Message passing with overhearing avoidance
3. S-MAC (2 + periodic listen/sleep)
15
Experiments

Topology and measured energy consumption
Average energy consumption in the source nodes
on source nodes
1800
Source 2
Sink 1
Sink 2
• Each source node sends
10 messages
— Each message has 400B
in 10 fragments
• Measure total energy over
time to send all messages
802.11-like protocol
Overhearing avoidance
S-MAC
1600
Energy consumption (mJ)
Source 1
1400
1200
1000
800
600
400
200
0
2
4
6
8
10
Message inter-arrival period (second)
16
S-MAC Conclusions


S-MAC offers significant energy efficiency
over always-listening MAC protocols
S-MAC can function at 10% duty cycle
17
Talk Outline

SMAC: http://www.isi.edu/~weiye/pub/smac_ton.pdf

“Medium Access Control With Coordinated Adaptive Sleeping for Wireless
Sensor Networks”, Wei Ye, John Heidemann, and Deborah Estrin, Transactions
on Networking, 2004, (also Infocom 2002)

BMAC: http://www.polastre.com/papers/sensys04-bmac.pdf

“Versatile Low Power Media Access for Wireless Sensor Networks”,
Joseph Polastre, Jason Hill and David Culler, ACM SENSYS 2004

CMAC: http://www.cse.ohio-state.edu/~prasun/publications/conf/secon07-cmac.pdf

“CMAC: An Energy Efficient MAC Layer Protocol Using Convergent Packet
Forwarding for Wireless Sensor Networks”, Sha Liu, Kai-Wei Fan and Prasun
Sinha, IEEE SECON 2007
18
BMAC Objectives



Information sharing with higher layers
Control and reconfiguration of link protocol
Tradeoffs in link protocols
19
B-MAC Design

Principles







Backoff/Timeouts
Duty Cycle
Acknowledgements
Feedback to higher
protocols
Minimal implementation
Minimal state
Primary Goals

Reconfigurable MAC
protocol
Flexible control
Hooks for sub-primitives









Low Power Operation
Effective Collision Avoidance
Simple/Predicable Operation
Small Code Size
Tolerant to Changing
RF/Networking Conditions
Scalable to Large Number of
Nodes
Implementation is on Mica2
motes with CC1000
20
B-MAC Link Protocol Interaction

Reconfiguration and control of link layer protocol parameters
 Acknowledgements, Backoff/Timeouts, Power Management,

Ability to choose tradeoffs – “knobs”
 Fairness, Latency, Energy Consumption, Reliability

Power consumption estimation through analytical and empirical
models
 Feedback to network protocols
 Lifetime estimation

Mechanisms to achieve network protocols’ goals
21
Low Power Listening (LPL)
Higher level communication scheduling



Properties



Overhear all data packets in cell
Duty cycle depends on number of neighbors
and cell traffic
Node 2
sleep
sleep
TX
sleep
RX
sleep
sleep
wakeup
Node 1
wakeup

wakeup

Wakeup time fixed
“Check Time” between wakeups variable
Preamble length matches wakeup interval
wakeup

wake up, sample channel, sleep
wakeup

Example of a typical low level
protocol mechanism
Periodically
wakeup

Energy Cost = RX + TX + Listen
Start by minimizing the listen cost
wakeup

time
sleep
time
22
Effect of Neighborhood Size

Neighborhood Size affects amount of
traffic in a cell
Network protocols typically keep track of
neighborhood size
Bigger Neighborhood  More traffic


Effect of neighborhood size on node duty cycle
180
0.09
160
0.08
Effective duty cycle (%)
25
0.
0.1
140
120
5
0.
100
75
0.
1
1.25
1.5
80
2
2.5
Channel Activity Check Interval (ms)
Expected Lifetime Contour
200
0.07
0.06
0.05
0.04
60
0.03
40
0.02
20
0.01
0
0
20
40
60
Neighborhood size
80
100
200ms check interval
100ms check interval
50ms check interval
25ms check interval
10ms check interval
0
0
20
40
60
Number of neighboring nodes
80
23
100
B-MAC Performance
Experimental Setup:

16000
1
B-MAC never worse than
traditional approach


n nodes send as quickly as
possible to saturate the
channel
14000

Reliable transport (Acks)
Hidden Terminal support
(RTS-CTS)
Protocol
ROM
3046
166
B-MAC w/ ACK
3340
168
B-MAC w/ Duty Cycling
4092
170
B-MAC w/ DC & ACK
4386
172
6274
12000
4
topology
7
5
6
0.7
10000
0.6
8000
0.5
0.4
6000
RAM
B-MAC
S-MAC
0
8
Flexible configuration yields
efficient:

3
9
Often much better
2
10
B-MAC
B-MAC w/ ACK
1
B-MAC w/ RTS-CTS
S-MAC unicast
0.9
S-MAC broadcast
Channel Capacity
0.8
516
0.3
4000
0.2
2000
0
0
0.1
5
10
Number of nodes
0
20
15
24
Percentage of Channel Capacity

Throughput of a congested channel
Throughput (bps)

Fragmentation Support

S-MAC

B-MAC w/app control




RTS-CTS Fragmentation Support
Network protocol sends initial data packet with
number of fragments pending
Disable backoff & LPL for rest of fragments

Measure energy
consumption at C
(bottleneck node)
Minimizing power relies
on controlling link layer
primitives
10 packets every 10 seconds
Mean energy consumption per byte (10 second sample period)
0.4
B
D
B-MAC w/ no app control
B-MAC w/ app control
S-MAC
T-MAC (simulated)
Optimal Schedule
0.3
0.25
0.2
0.15
0.1
0.25
0.2
0.15
0.1
0.05
0.05
0
0
C
10 packets every 100 seconds
0.35
Energy per byte (mJ/byte)
Energy per byte (mJ/byte)
0.3
E
Mean energy consumption per byte (100 second sample period)
0.4
B-MAC w/ no app control
B-MAC w/ app control
S-MAC
T-MAC (simulated)
Optimal Schedule
0.35
A
50
100
150
Fragment size (bytes)
200
250
0
0
50
100
150
Fragment size (bytes)
200
250
25
BMAC Conclusions


Coordination with higher protocols is essential for
long lived operation
Feedback allows protocols to make informed
decisions
26
Talk Outline

SMAC: http://www.isi.edu/~weiye/pub/smac_ton.pdf

“Medium Access Control With Coordinated Adaptive Sleeping for Wireless
Sensor Networks”, Wei Ye, John Heidemann, and Deborah Estrin, Transactions
on Networking, 2004, (also Infocom 2002)

BMAC: http://www.polastre.com/papers/sensys04-bmac.pdf

“Versatile Low Power Media Access for Wireless Sensor Networks”, Joseph
Polastre, Jason Hill and David Culler, ACM SENSYS 2004

CMAC: http://www.cse.ohio-state.edu/~prasun/publications/conf/secon07cmac.pdf

“CMAC: An Energy Efficient MAC Layer Protocol Using Convergent Packet
Forwarding for Wireless Sensor Networks”, Sha Liu, Kai-Wei Fan and
Prasun Sinha, IEEE SECON 2007
27
Existing MAC Layer Approaches

Synchronized Solutions


SMAC, TMAC, DMAC
Unsynchronized Solutions

BMAC, GeRaF
28
Synchronized Approaches

Unnecessary power consumption on
synchronization message exchanges


Can be improved if synchronization is infrequent
Can not achieve very low duty cycles

10% level
29
Unsynchronized Approaches - BMAC

Long Preamble Approach
Sender
Receiver

Sleep
Sleep
Long Preamble
Receiving Preamble
Packet
Packet
Wasteful if the receiver wakes up early
30
Our Approach - CMAC


Unsynchronized Duty Cycling
Flow Initialization



Aggressive RTS
Anycasting for Packet Forwarding
Flow Stabilization

Convergent Packet Forwarding
31
CMAC: Aggressive RTS

Aggressive RTS
Sender
Receiver
Sleep
RTS
Sleep
RTS
RTS RX
RX CTS
Packet
Sleep
Packet
Sleep
32
CMAC: Aggressive RTS
(Double Channel Check)
The receiver only needs to check if the channel is busy after
waking up
Check the channel twice to avoid missing activities
Time between the two checks





Larger than inter-RTS separation
Smaller than RTS duration
RTS
RTS
(a)
RTS
RTS
(b)
Channel check
RTS
(c)
(shouldn’t
happen)
Channel check
RTS
Channel check
33
CMAC: Anycasting

Anycast Packet Forwarding


Exploits network density
Nodes other than the target receiver may


wake up earlier
can make some progress toward the sink
34
Contention Among Anycast Receivers

Anycast to nodes which are



awake
closer to the destination
More than one potential participants

Nodes closer to the sink send CTS’s earlier
35
Contention Among Anycast Receivers

Anycast candidate prioritization
mini-slot
Sender
Node in R1
Node in R1
Node in R2
Node in R3
RTS
CTS slot
Canceled RTS
CTS
Canceled CTS
Canceled CTS
Canceled CTS
36
CMAC: Convergent Forwarding


Anycast has higher overhead than unicast
Nodes stay awake for a short duration after
receiving a packet


For how long?
Switch from anycast to unicast if


Node is able to communicate with a node in R1
Cannot find a better next hop than current one
37
CMAC: Convergent Forwarding Illustration
Time 1
Active nodes
Sleeping nodes
Time 2
Time 3
Unicast links
Anycast links
38
Experiments

Testbed: Kansei Testbed


7 x 15 XSM nodes
Metrics

Normalized Energy Consumption




Average energy consumption to deliver one packet
Throughput: Number of packets received by sink
Latency
Scenarios:


Static Event
Moving Event
39
Experimental Results: Static Scenario



Sink is at one corner of the network
The node that is diagonally opposite to sink sends data
to the sink
Vary data rates
40
Experimental Results: Moving Event



One node generates data at any point for the sink
The node generating data (event) moves along one
side of the network that does not include the sink.
Vary moving speeds
41
CMAC Conclusion

CMAC supports high throughput, low latency and
consumes less energy than existing solutions.

CMAC’s performance difference from existing
approaches increases with speed of the moving event.
42
Thanks for your attention!
For more information on my research
please check my webpage at
http://www.cse.ohio-state.edu/~prasun
43