Node Localization in Sensor Networks

Download Report

Transcript Node Localization in Sensor Networks

Medium Access Control Protocols
Lecture 7
(Lecture material contributed by K. Langendoen(TUDelft) and W. Ye(USC/ISI))
September 23, 2004
EENG 460a / CPSC 436 / ENAS 960
Networked Embedded Systems &
Sensor Networks
Andreas Savvides
[email protected]
Office: AKW 212
Tel 432-1275
Course Website
http://www.eng.yale.edu/enalab/courses/eeng460a
Protocol stack
OSI
Network
Layer 3
Data Link
MAC Protocol
Layer 2
Physical
Layer 1
Data link layer:
 mapping network
packets  radio frames
 transmission and
reception of frames over
the air
 error control
 security (encryption)
Medium Access Control
Control access to the shared medium (radio channel)
 avoid interference between transmissions
 mitigate effects of collisions (retransmit)
Approaches
 contention-based: no coordination
 schedule-based: central authority (access point)
Collision-based MAC protocols
ALOHA :
 packet radio networks
 send when ready
 18-35% channel utilization
CSMA (Carrier Sense Multiple Access):
 “listen before talk”
 50-80% channel utilization
Hidden terminal problem
A
Carrier sense at
sender
may not prevent
collision at receiver
Time
cs
B
C
cs
CSMA/CA: Collision Avoidance
A
Blocked
MACAW (Wireless)
 additional ACK
cs
C
Time
MACA:
 Request To Send
 Clear To Send
 DATA
B
Exposed terminal problem
A
B
C
Collision avoidance can
be too restrictive!
Blocked
Parallel CSMA transfers
are synchronized by
CSMA/CA
Time
cs
D
IEEE 802.11
Operation
 infrastructure mode (access point)
 ad-hoc mode
Power save mechanism; not for multi-hop networks
Protocol
 carrier sense
 collision avoidance (optional)
IEEE 802.11
DIFS
SIFS
RTS
DATA
Sender
SIFS
SIFS
CTS
ACK
DIFS
Receiver
NAV(CTS)
NAV(RTS)
Contention Window
Others
Network Allocation Vector (NAV)
 collision avoidance
 overhearing avoidance: other nodes may sleep
Schedule-based MAC protocols
Communication is scheduled in advance
 no contention
 no overhearing
 support for delay-bound traffic (voice)
Time-Division Multiple Access
 time is divided into slotted frames
 access point broadcasts schedule
 coordination between cells required
TDMA
Frame n
TC
Frame n+1
downlink
Frame n+2
uplink
CP
Typical WLAN setup
 no direct communication between nodes
 access point broadcast Traffic Control (TC) map
 (new) nodes signal needs in Contention Period
(CP)
Requirements for Sensor Networks
Handle scarce resources
 CPU: 1 – 10 MHz
 memory: 2 – 4 KB RAM
 radio: ~100 Kbps
 energy: small batteries
Unattended operation
 plug & play, robustness
 long lifetime
Sensor Node Energy Roadmap (DARPA)
Average Power (mW)
10,000
• Deployed (5W)
-Rehosting to Low Power COTS
1,000
(10x)
• PAC/C Baseline (.5W)
100
-Simple Power Management
-Algorithm Optimization
(10x)
• (50 mW)
-System-On-Chip
-Adv Power Management
-Algorithms
(50x)
10
 (1mW)
1
2000
2002
2004
software does it!
[Srivastava:2002]
Energy consumption (mW)
25
20
15
10
Transceiver
Processor
LED
Sensors
Light
Compass
LED
Standby
1 MHz
5 MHz
Sleep
Receive
Transmit
0
Accelerometer
5
[Hoesel:2004]
Energy-Efficient MAC Design
 Power save (PS) mode in IEEE 802.11 DCF
• Assumption: all nodes are synchronized and can
hear each other (single hop)
• Nodes in PS mode periodically listen for beacons &
ATIMs (ad hoc traffic indication messages)
• Beacon: timing and physical layer parameters
o All nodes participate in periodic beacon generation
• ATIM: tell nodes in PS mode to stay awake for Rx
o ATIM follows a beacon sent/received
o Unicast ATIM needs acknowledgement
o Broadcast ATIM wakes up all nodes — no ACK
Energy-Efficient MAC Design
 Unicast example of PS mode in 802.11 DCF
Communication patterns
WSN applications:
 local collaboration when
detecting a physical
phenomenon
 periodic reporting to sink
<1000 bps
Characteristics
 low data rates ~25 bytes
 small messages
 fluctuations (in time and space)
local gossip
convergecast
[Kulkarni:2004]
Design guidelines
 switch radio off when possible (duty cycle)
 AND, minimize number of switches
 low complexity (memory footprint)
 trade off performance for energy
 optimize for traffic patterns
Energy-efficient medium access control
Performance/Cost trade-off
 latency
 throughput
 fairness
 energy consumption
Organizational/Flexibility trade-off
 contention-based
 schedule-based
Sources of overhead
 idle listening (to handle potentially incoming
messages)
 collisions (wasted resources at sender and receivers)
 overhearing (communication between neighbors)
 protocol overhead (headers and signaling)
 traffic fluctuations (overprovisioning and/or
collapse)
 scalability/mobility (additional provisions)
Contention-based vs. Schedule-based
performance
cost
source of overhead
(latency, throughput, fairness) (energy-efficiency)
idle listening
collisions
C
C
overhearing
C
C
protocol overhead
C,S
C,S
traffic fluctuations
C,S
C,S
scalability/mobility
S
S
Energy-efficient MAC protocols
WSN-specific protocols
 starting from 2000 (1 paper)
 exponential growth (2004, 16+ papers)
Classification (up to May 2004, 20 papers)
 the number of channels used
 the degree of organization between nodes
 the way in which a node is notified of an incoming
msg
Protocol classification
Protocol
Channels
Organization
Notification
FDMA
frames
schedule
PACT [28]
single
frames
schedule
PicoRadio [10]
CDMA+tone
random
wakeup
STEM [33]
data+ctrl
random
wakeup
Preamble sampling [6]
single
random
listening
Arisha [2]
single
frames
schedule
S-MAC [36]
single
slots
listening
PCM [18]
single
random
listening
Low Power Listening [13]
single
random
listening
2000
SMACS [34]
2001
2002
Protocol classification
2003
Sift [17]
single
random
listening
EMACs [15]
single
frames
schedule
T-MAC [5]
single
slots
listening
TRAMA [30]
single
frames
schedule
WiseMAC [7]
single
random
listening
BMA [24]
single
frames
schedule
Miller [27]
data+tone
random
wakeup+list
DMAC [26]
single
slots
listening
SS-TDMA [23]
single
frames
schedule
LMAC [14]
single
frames
listening
B-MAC [29]
single
random
listening
2004
Case Study: S-MAC
 S-MAC — by Ye, Heidemann and Estrin
 Tradeoffs
Latency
Fairness
 Major components in S-MAC
•
•
•
•
Periodic listen and sleep
Collision avoidance
Overhearing avoidance
Massage passing
Energy
Coordinated Sleeping
 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% (120ms on/1.2s off)
Latency
Energy
Coordinated Sleeping
 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 or
broadcast twice
Coordinated Sleeping
 Schedule Synchronization
• New node tries to follow an existing schedule
• 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
 Periodic neighbor discovery
• Keep awake in a full sync interval over long periods
Coordinated Sleeping
 Adaptive listening
• Reduce multi-hop latency due to periodic sleep
• Wake up for a short period of time at end of each
transmission
2
1
3
4
RTS
CTS
listen
CTS
listen
t1
 Reduce latency by at least half
listen
t2
Collision Avoidance
 S-MAC is based on contention
 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
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
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
Energy
Fairness
Msg-level latency
Implementation on Testbed Nodes
 Platform
• Mica Motes (UC Berkeley)
o 8-bit CPU at 4MHz,
o 128KB flash, 4KB RAM
o 20Kbps radio at 433MHz
• TinyOS: event-driven
 Configurable S-MAC options
• Low duty cycle with adaptive listen
• Low duty cycle without adaptive listen
• Fully active mode (no periodic sleeping)
Experiments: two-hop network
 Topology and measured energy consumption on
source nodes
Average energy consumption in the source nodes
Source 1
1800
Sink 1
Source 2
•
•
•
Sink 2
S-MAC consumes much less
energy than 802.11-like protocol
w/o sleeping
At heavy load, overhearing
avoidance is the major factor in
energy savings
At light load, periodic sleeping
plays the key role
Energy consumption (mJ)
1600
1400
802.11-like protocol
without sleep
1200
1000
Overhearing
avoidance
800
600
400
S-MAC w/o adaptive listen
200
0
2
4
6
8
Message inter-arrival period (second)
10
Energy Consumption over Multi-Hops
 Ten-hop linear network at different traffic load
 3 configurations
of S-MAC
Energy consumption (J)
 At light traffic load,
periodic sleeping has
significant energy savings
over fully active mode
 Adaptive listen saves more
at heavy load by reducing
latency
Energy consumption at different traffic load
30
25
No sleep cycles
20
15
10
10% duty cycle without
adaptive listen
5
10% duty cycle with adaptive listen
0
0
2
4
6
8
Message inter-arrival period (S)
10
Latency as Hops Increase
 Adaptive listen significantly reduces latency
causes by periodic sleeping
Latency under highest traffic load
Latency under lowest traffic load
12
Average message latency (S)
Average message latency (S)
12
10
10% duty cycle without
adaptive listen
8
6
4
10% duty cycle with
adaptive listen
2
10
10% duty cycle without
adaptive listen
8
6
4
10% duty cycle with adaptive listen
2
No sleep cycles
0
0
2
4
6
Number of hops
8
No sleep cycles
10
0
0
2
4
6
Number of hops
8
10
Throughput as Hops Increase
 Adaptive listen significantly increases
throughput
Effective data throughput under highest traffic load
• Using less
time to pass
the same
amount of
data
Effective data throughput (Byte/S)
220
200
180
160
No sleep cycles
140
120
100
10% duty cycle
with adaptive listen
80
60
40
10% duty cycle without adaptive listen
20
0
0
2
4
6
Number of hops
8
10
Combined Energy and Throughput
 Periodic sleeping
provides excellent
performance at light
traffic load
 With adaptive
listening, S-MAC
achieves about the
same performance
as no-sleep mode at
heavy load
Energy-time product per byte (J*S/byte)
Energy-time cost on passing 1-byte data from source to sink
3
2.5
No sleep cycles
2
1.5
1
10% duty cycle without
adaptive listen
0.5
0
10% duty cycle with adaptive listen
0
2
4
6
8
Message inter-arrival period (S)
10
IEEE 802.15.4 MAC Protocol
 Based on an IEEE standard for WPAN
• Goal: Ultra-low cost, low power radios
• Support multiple configurations (e.g point-to-point,
groups, ad-hoc etc)
• CSMA-CA based protocol
o Each packet can be individually acknowledged
 Key features
• Three types of node functionalities
o PAN Coordinator, Coordinator and Device
• Two device types
o FFD – Full Function Device
o RFD – Reduced Function Device
Frequencies and Data Rates
2.4 GHz
BAND
COVERAGE
DATA RATE
ISM
Worldwide
250 kbps
16
Europe
20 kbps
1
Americas
40 kbps
10
868 MHz
915 MHz
ISM
# OF CHANNEL(S)
See class website for more information about Zigbee
More abut MAC protocols on the next lecture
Paper Reading


[Elson02] Fine-Grained Network Time Synchronization using Reference
Broadcasts, Jeremy Elson, Lewis Girod and Deborah Estrin
In Proceedings of the Fifth Symposium on Operating Systems Design and
Implementation (OSDI 2002), Boston, MA. December 2002. UCLA Technical
Report 020008.
You should all read this paper closely before lecture 9!