20
1 The University of Iowa. Copyright© 2005 A. Kruger Introduction to Wireless Sensor Networks Medium Access Control (MAC) 21 February 2005

Introduction to Wireless Sensor Networks

  • Upload
    thanh

  • View
    38

  • Download
    0

Embed Size (px)

DESCRIPTION

Introduction to Wireless Sensor Networks. Medium Access Control (MAC) 21 February 2005. Organizational. Class Website. www.engineering.uiowa.edu/~ece195/2005/. Class Time. Office Hours. Contention-Based MAC Protocols. Channel are not divided, but shared channel allocated on-demand - PowerPoint PPT Presentation

Citation preview

Wireless Sensor NetworksA. Kruger
Medium Access Control (MAC)
A. Kruger
Room 3220 SC
Please note that the room numbers are different for Mondays and Thursdays.
Monday
5:20-6:20
A. Kruger
Advantages
More flexible (no need to for clusters, hierarchies) peer-to-peer directly supported
Don’t require fine-grained synchronization as in TDMA
Major disadvantage
A. Kruger
Question – what causes energy waste from a MAC perspective?
Collision
Overhearing
When a node receives packets that are destined for another node
Control packet overhead
Adaptation
The University of Iowa. Copyright© 2005
A. Kruger
Central idea – listen (carrier sense) before transmitting
Variants
1-Persistent CSMA
If medium busy, keep listening and transmit when medium becomes free
p-Persistent CSMA
If medium busy, transmit with probability (1-p). If medium free transmit with probability p.
The University of Iowa. Copyright© 2005
A. Kruger
Hidden Terminal Problem in CSMA
Node a, b, and c can only hear their immediate neighbors
When node a send to b, c is unaware of a, its carrier sense indicates carrier free
Node c starts transmitting
a
b
c
A. Kruger
CSMA/CA - Carrier Sense Collision Avoidance
Establish a brief handshake between sender and receiver before sending data
Sender sends Request-to-Send (RTS) packet to intended receiver
Receiver replies with Clear-to-Send (CTS) packet
Only then does transmitter send data
RTS-CTS packets announce to neighbors
Node c hears CTS packets from b to a, and does not transmit
Does not eliminate collisions, but collisions are now mostly (brief) RST
a
b
c
A. Kruger
Variations
MACA – RST and CTS packets indicate size on data so other nodes know how long to back off
MACAW – adds an Acknowledge ACK packet
RTS-CTS-DATA-ACK
The University of Iowa. Copyright© 2005
A. Kruger
Energy Conservation in Contention Protocols
Basic idea, put radio to sleep with it is not used
This makes it difficult for nodes to communicate
Beacons
A. Kruger
Beacon synchronizes all nodes
All nodes are awake during ATIM
Then CSMA
Assumption: all nodes can hear each other. Generalizing to multi-hop is not easy
The University of Iowa. Copyright© 2005
A. Kruger
Data
Control
Upon wakeup, probe control channel for activity related to destination node
Neighbor answer probe? Yes, go back to sleep
Probing eliminated interference with transmission in data channel
More complex to implement (two channels)
PAMAS does not reduce idle listening.
The University of Iowa. Copyright© 2005
A. Kruger
Idle listening, collision, overhearing and control overhead
Course-grained sleep/wakeup cycle
Schedules are shared with neighbors
The University of Iowa. Copyright© 2005
A. Kruger
S-MAC Scheduling
Share schedules with neighbors
Node then schedule transmissions during listen times of neighbors
If a wants to send to b, it just waits for b’s listen cycle to start
The University of Iowa. Copyright© 2005
A. Kruger
S-MAC Scheduling
S-MAC encourages neighbors to adopt identical schedules
When it configures itself, a node listens for a synchronization period, and adopts the first schedule it hears
Nodes periodically does neighbor discovery, by listing for an entire frame
1-10% Duty cycle
A. Kruger
Contention happens only during listen interval
S-MAC puts a duration field in each packet (some other protocols have it only at the start)
Nodes that don’t have medium access, know how long to sleep even if they try to gain medium access in the middle of an ongoing conversation
Application-Level Message Passing
Reserves medium
Burst mode
Variation Adaptive Listening
Rather than wait until the next scheduled listen interval, nodes wake up immediately after RTS-CTS-DATA-ACK
The University of Iowa. Copyright© 2005
A. Kruger
Cons
Relatively Complex (especially since CSMA is often touted as being simple…)
Increased Latency
Periodic sleep provides excellent energy performance at light loads
Adaptive listen adjusts to traffic to achieve same performance as no-sleep at heavy load
The University of Iowa. Copyright© 2005
A. Kruger
A. Kruger
A. Kruger
A. Kruger
Review Questions
Briefly describe channel probing in MAC protocols (e.g., the PAMAS MAC protocol). List disadvantages
True or false – Without adaptive listening latency in S-MAC is linear with the number of hops
Contrast application-level message passing with MAC fragments. Explain why this is relevant in WSNs
Explain how application-level message passing is implemented in S-MAC
True or false – CSMA is an example of a contention-based MAC protocol
Explain the difference between non-persistent, 1-persistent, and p-persistent CSMA
What is the hidden-terminal problem as it relates to CSMA in WSNs
What are RTS and CTS packets?
Explain how handshaking is used to reduce collisions in CSMA
What are “beacons” as it relates to CSMA
Explain the advantage of adding the message duration to each packet in S-MAC
What does “S-MAC” stand for?