Upload
posy-barton
View
214
Download
0
Tags:
Embed Size (px)
Citation preview
1
Media Access Control in Wireless Sensor Networks - II
Media Access Control in Wireless Sensor Networks - II
2
What We Have Learned Last TimeWhat We Have Learned Last Time
B-MAC = ?
CSMA + LPL + Noise Floor Estimation + Explicit ACK
X-MAC = ?
B-MAC + Early ACK + Encoded preamble
3
OutlineOutline
Overview
TDMA/CSMA
Advantages and disadvantages
S-MAC
Z-MAC
Design concepts, performance evaluation and issues
4
Classification of Multiple Access ProtocolsClassification of Multiple Access Protocols
Multiple Access Protocols
Random Access Controlled Access
CSMA
TDMA (FDMA, CDMA)
ALOHA Static channel allocation
B-MAC
X-MACX-MAC
S-MACZ-MAC
5
CSMACSMA
CSMA: listen before transmit:If channel sensed idle: transmit entire pkt
If channel sensed busy, defer transmission
Persistent CSMA: retry immediately with probability p when channel becomes idle (may cause instability)Non-persistent CSMA: retry after random interval
human analogy: don’t interrupt others!
I want to talk now
Me too
6
TDMATDMA
TDMA: Time Division Multiple Access
Access to channel in "rounds"
Each station gets a fixed length slot (length = pkt Tx time) in each round
Unused slots go idle
Example: 6-station LAN, 1,3,4 have pkts, slots 2,5,6 idle
7
Medium Access ParadigmsMedium Access Paradigms
Contention Based (CSMA)
Random-back off and carrier-sensingSimple, no time synch, and robust to network changesHigh idle listening and overhearing overheads• Solve this by duty cycling
TDMA Based (or Schedule based)
Nodes within interference range transmit during different times, so collision freeRequires time synch and not robust to changes.Low throughput and high latency even during low contention.Low idle listening and overhearing overheads• Wake up and listen only during its neighbor transmission
8
TDMA vs. CSMA for Sensor NetworksTDMA vs. CSMA for Sensor Networks
Parameter TDMA CSMA
Energy for Synchronization
Bad Good
Throughput Good for multiple sources
Good for single source
complexity Bad Good
Fairness Good Bad
?????????????
?????????????
?????????????
?????????????
9
TDMA vs. CSMA for Sensor Networks cont …TDMA vs. CSMA for Sensor Networks cont …
Parameter TDMA CSMAScalability Bad Good
Latency Bad/Good Good/Bad
Dealing with node failures, new node arrivals Bad Good
Energy for collision Avoidance
Good Bad
?????????????
?????????????
?????????????
?????????????
10
How about combine TDMA and CSMA?How about combine TDMA and CSMA?
S-MAC: for the benefit of Energy Efficiency
Z-MAC: for the benefit of throughput
11
Z-MAC: a Hybrid MAC for Wireless Sensor Networks
-Injong Rhee, Ajit Warrier, Mahesh Aia and Jeongki Min
Z-MAC: a Hybrid MAC for Wireless Sensor Networks
-Injong Rhee, Ajit Warrier, Mahesh Aia and Jeongki Min
Medium Access Control with Coordinated Adaptive Sleeping for Wireless Sensor Networks
Wei Ye, John Heidemann and Deborah Estrin
Medium Access Control with Coordinated Adaptive Sleeping for Wireless Sensor Networks
Wei Ye, John Heidemann and Deborah Estrin
Sensys 2005
TON 2004
12
S-MAC: IntroductionS-MAC: Introduction
S-MAC stands for Sensor-MAC
Key Idea in SMAC:
Combine key advantages of scheduled (TDMA) and unscheduled (CSMA) protocols
S-MAC = lite-802.11 + Scheduling
13
S-MAC: Energy savingsS-MAC: Energy savings
S-MAC tries to reduce wastage of energy from at least 3 sources of energy inefficiency:
Nodes periodically sleep to reduce energy consumption in listening to an idle channel
Resolve contention by using RTS and CTS
Avoid overhearing – S-MAC sets the radio to sleep during transmissions of other nodes
14
Periodic sleepingPeriodic sleeping
Problem: Idle listening consumes significant energy
Solution: Periodic listen and sleep
Turn off radio when sleeping
Reduce duty cycle to ~ 10% (120ms on/1.2s off)
listen listensleep sleep
Difference between S-MAC toggling and B-MAC toggling?
15
Deal with global synchronization Deal with global synchronization
Node 1
Node 2
sleeplisten listen sleep
sleeplisten listen sleep
Schedule 2
Schedule 1
Schedules can differ, prefer neighbouring nodes to have same schedule
Border nodes may have to maintain more than one schedule.
16
Overhearing AvoidanceOverhearing Avoidance
Problem:
Receive packets destined to others
Solution: Sleep when neighbors talk
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
17
SMAC: Pros and ConsSMAC: Pros and Cons
Pros
Well-designed, complete protocol that addresses deficiencies of 802.11 if applied to a sensor network.
Schedules sleep and transmit times to enable low-power data transfer with reasonable-latency.
Cons
SMAC incurs some drawbacks of TDMA schemes• Topology maintenance, need for synchronization, additional
complexity at border nodes between two schedules…
Monolithic system architecture similar to 802.11• Combines carrier sense, link-layer reliability, RTS/CTS and sleep
scheduling into MAC layer.
18
Z-MAC Motivation: Throughput Z-MAC Motivation: Throughput
# of Contenders
Channel Utilization
IDEAL
CSMATDMA
19
Z-MAC: Hybrid Contention ResolutionZ-MAC: Hybrid Contention Resolution
Z-MAC (Zebra MAC) – a Hybrid MAC protocol combines the strengths of both CSMA and TDMA at the same time discounting their weaknesses
Z-MAC uses a base TDMA schedule as a hint to schedule the transmissions of the nodes, and it differs from TDMA by allowing non-owners of slots to 'steal' the slot from owners if they are not transmitting
MAC Channel Utilization
CSMA
TDMA
Low Contention High Contention
High Low
Low High
20
Z-MAC FeaturesZ-MAC Features
Adaptability to the level of contention in the network
Under low contention behaves like CSMA
Under high contention behaves like TDMA
# of Contenders
Channel Utilization
IDEAL
CSMATDMA
21
Z-MAC DesignZ-MAC Design
Z-MAC has the setup phase in which the following operations are run in sequence:
1. Neighbor discovery
2. Time slot assignment (DRAND)
3. Local frame exchange
4. Time synchronization
22
Neighbor discoveryNeighbor discovery
When a node starts up, it runs a neighbor discovery protocol
Periodically broadcasts a ping to its one-hop neighborsPing message contains the current list of its one-hop neighbors
Through this message, each node gathers neighbor information
Q: How many hops neighbor information is need to avoid interference?
1 Hop, 2 Hop, More than 2 Hop? What’s the reality?
23
Timeslot AssignmentTimeslot Assignment
The two-hop neighbor list is used as an input to a time-slot assignment algorithm
Current implementation of Z-MAC uses DRAND – a distributed implementation of RAND to assign time slots to every node in the network
DRAND ensures no two nodes within a two-hop communication neighborhood are assigned to the same slot.
This assignment guarantees that no transmission by a node to any of its one-hop neighbors interferes with any transmission by its two-hop neighbors.
24
DRAND slot assignmentDRAND slot assignment
C D
A
FB
C D
A E
B
E
F
Radio Interference Map
Input Graph
C D
A E
B FDRAND slot assignment
0
0
1
32
1
25
Z-MAC Transmission ControlZ-MAC Transmission Control
A node can be in one of two modes:
Low Contention Level (LCL) or
High Contention Level (HCL)
Node is in HCL only:
when it receives an explicit contention notification (ECN) message from a two-hop neighbor within the last tECN period.
Otherwise, the node is in LCL.
A node sends an ECN when it experiences high contention
26
Z-MAC Transmission Control cont…Z-MAC Transmission Control cont…
In LCL, any node can compete to transmit in any slot
But in HCL, only the owners of the current slot and their one-hop neighbors are allowed to compete for the channel
In both modes, owners have higher priority over non-owners.
If a slot does not contain an owner or its owner does not have data to send, non-owners can steal the slot.
This feature achieves high channel utilization even under low contention as a node can transmit as soon as the channel is available.
Z-MAC implements LCL and HCL using the back off, CCA and LPL interfaces of B-MAC
27
Transmission rule (for the owner)Transmission rule (for the owner)
Owner takes a random back off within a fixed time period To
When the back off timer expires, it runs CCA and if the channel is clear, transmits the data.
If the channel is not clear, then it waits until the channel is not busy and repeats the above process.
Busy Owner Accessing Channel
Random Back off within To (Contention Window)
28
Transmission rule (non owner - LCL)Transmission rule (non owner - LCL)
Waits for To and then performs a random back off within a contention window [To, Tno]
When the back off timer expires, it runs CCA and if the channel is clear, then it starts transmission.
If the channel is not clear, it waits until the channel is clear, and repeats the above process.
Busy Non-owner Accessing ChannelTo
Random Back off within [To, Tno] (Contention Window)
29
Z-MAC Transmission Control (Continued)Z-MAC Transmission Control (Continued)
A A B B BA A A A B B B
TDMA and Z-MAC under high contention (Two node example)
A A A A A A
TDMA under no contention (Two node example)
A A A A A AA A A A A A
Z-MAC under no contention (Two node example)
30
Z-MAC – Performance EvaluationZ-MAC – Performance Evaluation
Setup:
Single-hop, Two-hop and Multi-hop topology experiments on Mica2 motes.
Comparisons with B-MAC (default MAC of Mica2), with different back-off window sizes
Metrics: Throughput & energy efficiency
31
Experimental Setup – Single HopExperimental Setup – Single Hop
Single-Hop Experiments:
Mica2 motes equidistant from one node in the middle.
All nodes within one-hop transmission range.
Tests repeated 10 times and average/standard deviation errors reported.
32
Z-MAC – Two-Hop ExperimentsZ-MAC – 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
Sources SourcesSink
33
Experimental Setup - Test bedExperimental Setup - Test bed
42 Mica2 sensor motes in a Lab.
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%.
34
Multi Hop Results – ThroughputMulti Hop Results – Throughput
Why B-MAC is better than Z-MAC in low traffic ?
Why B-MAC is worse than Z-MAC in high traffic ?
Z-MAC
B-MAC
MULTI-HOP
35
Multi Hop Results – Energy EfficiencyMulti Hop Results – Energy Efficiency
B-MAC
Z-MAC HCL
MULTI-HOP
36
Summary of Z-MACSummary of Z-MAC
Hybrid MAC :Combines strengths of TDMA and CSMA
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.
This enables Z-MAC to switch between CSMA and TDMA depending on the level of contention.
Hence, under low contention, Z-MAC acts like CSMA (i.e. high channel utilization and low latency), while under high contention, Z-MAC acts like TDMA (i.e. high channel utilization, fairness and low contention overhead).
37
DiscussionDiscussion
Limitation of Z-MAC
38
Take Away MessagesTake Away Messages
Hybrid Synchronous MAC S-MAC = lite-802.11 + Scheduling
Z-MAC = CSMA within TDMA slots
Asynchronous MAC B-MAC = CSMA + LPL + Noise Floor Estimation + Explicit ACK
X-MAC = B-MAC + Early ACK + Encoded preamble
39
MAC SummaryMAC Summary
Commercial MAC (802.X, Bluetooth) are suitable for wireless LAN with much more powerful devices. Energy is secondary concern compared with throughput.
Asynchronous MAC (B/X-MAC) is flexible and works well in low traffic scenario (why is so widely used!)
Hybrid synchronous MAC (S/Z-MAC) can achieve better performance in high traffic scenario.