Title: Media Access Control in Wireless Sensor Networks - II
1Media Access Control in Wireless Sensor Networks
- II
2What We Have Learned Last Time
-
- B-MAC ?
- CSMA LPL Noise Floor Estimation Explicit
ACK - X-MAC ?
- B-MAC Early ACK Encoded preamble
3Outline
- Overview
- TDMA/CSMA
- Advantages and disadvantages
- S-MAC
- Z-MAC
- Design concepts, performance evaluation and issues
4Classification of Multiple Access Protocols
Multiple Access Protocols
Random Access
Controlled Access
ALOHA
Static channel allocation
CSMA
B-MAC
TDMA (FDMA, CDMA)
X-MAC
X-MAC
5CSMA
- 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 dont interrupt others!
Me too
I want to talk now
6TDMA
- 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
7Medium Access Paradigms
- Contention Based (CSMA)
- Random-back off and carrier-sensing
- Simple, no time synch, and robust to network
changes - High 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 free - Requires 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
8TDMA 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
?????????????
?????????????
?????????????
?????????????
9TDMA vs. CSMA for Sensor Networks cont
Parameter TDMA CSMA
Scalability Bad Good
Latency Bad/Good Good/Bad
Dealing with node failures, new node arrivals Bad Good
Energy for collision Avoidance Good Bad
?????????????
?????????????
?????????????
?????????????
10How about combine TDMA and CSMA?
- S-MAC for the benefit of Energy Efficiency
- Z-MAC for the benefit of throughput
11Z-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 NetworksWei Ye,
John Heidemann and Deborah Estrin
TON 2004
Sensys 2005
12S-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
13S-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
14Periodic sleeping
listen
listen
sleep
sleep
- 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)
Difference between S-MAC toggling and B-MAC
toggling?
15- Deal with global synchronization
Schedules can differ, prefer neighbouring nodes
to have same schedule
Border nodes may have to maintain more than one
schedule.
16Overhearing 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
17SMAC 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.
18Z-MAC Motivation Throughput
19Z-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
Channel Utilization
MAC
Low Contention
High Contention
CSMA
High
Low
TDMA
Low
High
20Z-MAC Features
- Adaptability to the level of contention in the
network - Under low contention behaves like CSMA
- Under high contention behaves like TDMA
CSMA
Channel Utilization
TDMA
of Contenders
21Z-MAC Design
- Z-MAC has the setup phase in which the following
operations are run in sequence - Neighbor discovery
- Time slot assignment (DRAND)
- Local frame exchange
- Time synchronization
22Neighbor discovery
- When a node starts up, it runs a neighbor
discovery protocol - Periodically broadcasts a ping to its one-hop
neighbors - Ping 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? Whats the reality?
23Timeslot 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.
24DRAND slot assignment
Radio Interference Map
1
0
3
2
DRAND slot assignment
0
1
Input Graph
25Z-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
26Z-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
27Transmission 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.
28Transmission 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.
29Z-MAC Transmission Control (Continued)
30Z-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
31Experimental 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.
32Z-MAC Two-Hop Experiments
Sink
Sources
Sources
- 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
33Experimental 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.
34Multi 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 ?
35Multi Hop Results Energy Efficiency
B-MAC
Z-MAC HCL
MULTI-HOP
36Summary 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).
37Discussion
38Take Away Messages
- Asynchronous MAC
- B-MAC CSMA LPL Noise Floor Estimation
Explicit ACK - X-MAC B-MAC Early ACK Encoded preamble
- Hybrid Synchronous MAC
- S-MAC lite-802.11 Scheduling
- Z-MAC CSMA within TDMA slots
39MAC 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.