這份投影⽚片是 2007 年製作的,雖
然內容有點舊,但是很多觀念是相
通的,由於沒時間準備公司的「技
術分享會議」只好拿舊東西來說了
說明
2
Medium Access Control
(MAC) Protocols for
Wireless Sensor Networks
!
!
Presented by Chih-Yu
3
Outline
● Introduction
● MAC Protocols
● Contention-based
● Schedule-based
● Hybrid
● Conclusion
4
Outline
● Introduction
● MAC Protocols
● Contention-based
● Schedule-based
● Hybrid
● Conclusion
5
Introduction
● Wireless Sensor Networks
⽕火災、⼟土⽯石流
6
Introduction
● Why do we need MAC?
● Wireless channel is a shared medium
● Radios transmitting in the same frequency band
interfere with each other
!
● The role of Medium Access Control
● Controls when and how each node can transmit in
the wireless channel
● Solves the contention and collision
7
Introduction
● MAC Protocols for WSNs
● Primary Concern
● Energy Efficiency
● Reduction of significance
● Contention/Collision (basic task)
● Scalability
● Latency
● Communication Patterns
● Adaptability to changes
● Fairness
● Throughput
8
Introduction
● Major Sources of Energy Wastes
● Control Packet Overhead
● E.g., RTS/CTS
● Collision
● Retransmission
● Overhearing
● The receiver of a packet is not the intended receiver of
that packet
● Idle Listing
● Listening to possible traffic that is not sent
ab
9
Outline
● Introduction
● MAC Protocols
● Contention-based
● Schedule-based
● Hybrid
● Conclusion
10
Classification of MAC
Protocols
● Contention-based protocols
● Nodes compete in probabilistic coordination
● Examples: ALOHA (pure & slotted), CSMA
● Simple, no time synch, and robust to network
changes
● High idle listening and overhearing overheads
● Solve this by duty cycling
11
Classification of MAC
Protocols
● Schedule-based protocols
● Schedule nodes onto different sub-channels
● Examples: TDMA, FDMA, CDMA
● 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
12
Outline
● Introduction
● MAC Protocols
● Contention-based
● Schedule-based
● Hybrid
● Conclusion
13
Contention-based MAC
Protocols for WSNs
● S-MAC
● B-MAC
14
S-MAC
W. Ye, J. Heidemann, and D. Estrin, “An Energy-efficient MAC Protocol
for Wireless Sensor Networks,” in Proc. of IEEE Infocom, Jun. 2002, pp.
1567–1576.
● Basic Idea
● Trades energy efficiency for lower throughput and
higher latency
● Main Components
● Periodic Listen and Sleep
● Collision Avoidance
● Overhearing Avoidance
● Message Passing
15
Periodic Listen and Sleep
● Nodes periodically sleep
● Turn off radio when sleeping
● Reduce duty cycle to ~10% (150ms on vs. 1.5s off)
● Trades energy efficiency for lower throughput
and higher latency
Listen Sleep tSleepListen
Listen Sleep Listen t
Both the synchronization issue and the schedule maintenance issue
can be found in the paper.
16
Collision Avoidance
● Similar to IEEE 802.11
● Virtual Carrier Sense
● NAV (Network Allocation Vector)
● Physical Carrier Sense
● Four-way handshake
● RTS/CTS/DATA/ACK
17
Overhearing Avoidance
● Basic Idea
● A node can go to sleep whenever its neighbor is
talking with another node
● Who should sleep?
● The immediate neighbors of sender and receiver
● How to they know when to sleep?
● By overhearing RTS or CTS
● Hog long should they sleep?
● NAV
18
Message Passing
● How to transmit a long message?
● Transmit it as a single long packet
● Easy to be corrupted
● Transmit as many independent packets
● Higher Control Overhead & Longer Delay
● Divide into fragments, but transmit all in burst
!
!
!
● RTS/CTS reserve medium for the entire sequence
RTS
CTS
Data
CTS
Data
CTS
Data
CTS
19
B-MAC (Overview)
● B-MAC is implemented in TinyOS
!
● Major Feature: reconfigurable
● Above B-MAC, one can implement an RTS-CTS
scheme or a TDMS-like scheduling protocol
!
● A small core of media access functionality
● arbitration, reliability, low power communication
J. Polastre, J. Hill, and D. Culler, “Versatile low power media access for
wireless sensor networks,” in SenSys, Nov. 2004, pp. 95–107.
20
B-MAC (Overview)
● Channel Arbitration
● Clear Channel Assessment (CCA) & Backoffs
!
● Reliability
● Link-layer acknowledgment
!
● Low Power Communication
● Low Power Listening (LPL)
21
Clear Channel Assessment
● This paper proposes a way to estimate noise
floor using signal-processing techniques
● Noise floor can be viewed as a threshold
!
● Where a node intend to transmit a packet
● 802.15.4: takes a single sample and compares it to
the noise floor
● B-MAC: outlier detection algorithm
22
Clear Channel Assessment
23
Clear Channel Assessment
● MacControl
● command result_t EnableCCA();
● command result_t DisableCCA();
!
● By disabling CCA, a scheduling protocol may be
implemented above B-MAC
!
● If CCA is enabled
● event uint16_t initialBackoff(void* msg);
● event uint16_t congestionBackoff(void* msg);
24
Link-layer Acknowledgment
● Similar to traditional MAC protocols
!
● MacControl
● command result_t EnableAck();
● command result_t DisableAck();
!
● RTS/CTS/DATA/ACK ?
25
Low Power Listening
● Low Power Listening
● Sender (Transmit mode)
● Send preamble before transmit the data
● Preamble Length
!
● Receiver (Listening mode)
● Check Interval
!
● To reliably receive data, the preamble length is matched to
the interval that the channel is checked for activity
● If the channel is checked every 100 ms, the preamble must
be at least 100 ms long
26
Low Power Listening
Sender
Receiver 1
Receiver 2
Backoff
& CCA
Preamble
wakeup
Data
wakeup
Check Interval
27
Outline
● Introduction
● MAC Protocols
● Contention-based
● Schedule-based
● Hybrid
● Conclusion
28
Schedule-based MAC
Protocols for WSNs
● TDMA MAC Protocols
● TRAMA
● Convergecast in Tree-based Wireless Sensor
Networks
29
Traditional TDMA MAC
Protocols
● Divide time into cycles
● A cycle consists of several slots
!
!
!
● Advantages
● Collision-Free, Low Idle Listing and Overhearing Overheads
● Disadvantages
● Synchronization, Low Channel Utilization
!
● An important Issue
● Slot Assignment Strategy
1 2 3 4 5 6 7 1 2 3
Cycle
3 4 5 cc 1 2 3 4 5 6 7
Cycle
30
Slot Assignment Strategy
● Basic Slot Assignment Strategy
● A node should own a slot different from its one-
hop and two-hop neighbors
R
S
S
Collision
One-hop
R
R
S S
Collision
Collision
Two-hop
RS R S
Three-hop
Acknowledgement?
31
TRAMA
● TRAMA (TRaffic-Adaptive Medium Access)
● Avoid assigning slots to nodes with no traffic
● Allow nodes to determine when they can switch off
!
● Main Components
● Neighbor Protocol
● Schedule Exchange Protocol
● Adaptive Election Algorithm
V. Rajendran, K. Obraczka, and J. Garcia-Luna-Aceves, “Energyefficient,
collision-free medium access control for wireless sensor networks,”
Wireless Networks, vol. 12, no. 1, pp. 63–78, Feb. 2006.
32
Neighbor Protocol
To accommodate topology dynamics:
1. Dynamic: interval between random access periods could be larger
2. Static: interval could be smaller
33
Schedule Exchange Protocol
Random
Access
SCHEDULE_INTERVAL
SCHEDULE_INTERVAL
Winning Slot
(Intended Receiver: a, b, c)
Winning Slot
(Intended Receiver: d, e, f)
Winning Slot
(Intended Receiver: φ)
34
Adaptive Election Algorithm
x
a y
b 10080
60
20
30
50
10 120
90
130
35
Convergecast in Tree-based
Wireless Sensor Networks
6
4
5
4
1 2 3 1
0 1 0
3
MAXSLOT=7
2
Level 0
L1
L2
L3
1. Construct a BFS tree T
!
2. Traverse the nodes of T in a
bottom-up manner
a) if the node v is a leaf node,
assign a min slot s(v) which is
not interference with its
interference neighbors
b) if v is the in-tree node, choose
the min slot s(v) which is larger
than the children’s slot and do
not interference with others
!
3. Re-assign the slot in a top-down
mannerY.-C. Tseng and M.-S. Pan, “Quick
Convergecast in ZigBee/IEEE 802.15.4
Tree-Based Wireless Sensor Networks”,
ACM MobiWac, 2006.
36
Outline
● Introduction
● MAC Protocols
● Contention-based
● Schedule-based
● Hybrid
● Conclusion
37
Hybrid TDMA/CSMA
● Z-MAC
● Funneling-MAC
38
Z-MAC
● Z-MAC (Zebra MAC)
● A hybrid TDMA and CSMA MAC scheme
● The main feature is its adaptability to the level of
contention in the network
● under low contention, it behaves like CSMA, and
● under high contention, like TDMA
I. Rhee, A. Warrier, M. Aia, and J. Min, “Z-MAC: a hybrid MAC for
wireless sensor networks,” in SenSys, Nov. 2005, pp. 90–101.
39
Z-MAC
● Design of Z-MAC
● Neighbor Discovery and Slot Assignment
● Local Framing
● Transmission Control of ZMAC
● Explicit Contention Notification
● Receiving Schedule of ZMAC
● Local Time Synchronization
40
Funneling-MAC
● Funneling effect in sensor networks
G.-S. Ahn, E. Miluzzo, A. T. Campbell, S. G. Hong, and F. Cuomo “Funneling-
MAC: A localized, sink-oriented MAC for boosting fidelity in sensor networks,” in
SenSys ’06
41
Funneling-MAC
● The authors propose a localized, sink-
oriented funneling-MAC
!
● Localized
● Using local TDMA scheduling in the intensity
region only
● Sink-oriented
● Manage TDMA scheduling
● Compute and maintain the depth of the intensity
region
42
Conclusion
● MAC Protocols in WSNs
● Energy Efficiency and Other Concerns
● Contention-based/Schedule-based/Hybrid
!
● Future Directions
● Taking the traffic features of WSNs into
consideration
● Communication Patterns: Convergecast, Broadcast,
Local Gossip, Event Reporting, etc.

Mac protocols sensor_20071105_slideshare

  • 1.
  • 2.
    2 Medium Access Control (MAC)Protocols for Wireless Sensor Networks ! ! Presented by Chih-Yu
  • 3.
    3 Outline ● Introduction ● MACProtocols ● Contention-based ● Schedule-based ● Hybrid ● Conclusion
  • 4.
    4 Outline ● Introduction ● MACProtocols ● Contention-based ● Schedule-based ● Hybrid ● Conclusion
  • 5.
    5 Introduction ● Wireless SensorNetworks ⽕火災、⼟土⽯石流
  • 6.
    6 Introduction ● Why dowe need MAC? ● Wireless channel is a shared medium ● Radios transmitting in the same frequency band interfere with each other ! ● The role of Medium Access Control ● Controls when and how each node can transmit in the wireless channel ● Solves the contention and collision
  • 7.
    7 Introduction ● MAC Protocolsfor WSNs ● Primary Concern ● Energy Efficiency ● Reduction of significance ● Contention/Collision (basic task) ● Scalability ● Latency ● Communication Patterns ● Adaptability to changes ● Fairness ● Throughput
  • 8.
    8 Introduction ● Major Sourcesof Energy Wastes ● Control Packet Overhead ● E.g., RTS/CTS ● Collision ● Retransmission ● Overhearing ● The receiver of a packet is not the intended receiver of that packet ● Idle Listing ● Listening to possible traffic that is not sent ab
  • 9.
    9 Outline ● Introduction ● MACProtocols ● Contention-based ● Schedule-based ● Hybrid ● Conclusion
  • 10.
    10 Classification of MAC Protocols ●Contention-based protocols ● Nodes compete in probabilistic coordination ● Examples: ALOHA (pure & slotted), CSMA ● Simple, no time synch, and robust to network changes ● High idle listening and overhearing overheads ● Solve this by duty cycling
  • 11.
    11 Classification of MAC Protocols ●Schedule-based protocols ● Schedule nodes onto different sub-channels ● Examples: TDMA, FDMA, CDMA ● 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
  • 12.
    12 Outline ● Introduction ● MACProtocols ● Contention-based ● Schedule-based ● Hybrid ● Conclusion
  • 13.
    13 Contention-based MAC Protocols forWSNs ● S-MAC ● B-MAC
  • 14.
    14 S-MAC W. Ye, J.Heidemann, and D. Estrin, “An Energy-efficient MAC Protocol for Wireless Sensor Networks,” in Proc. of IEEE Infocom, Jun. 2002, pp. 1567–1576. ● Basic Idea ● Trades energy efficiency for lower throughput and higher latency ● Main Components ● Periodic Listen and Sleep ● Collision Avoidance ● Overhearing Avoidance ● Message Passing
  • 15.
    15 Periodic Listen andSleep ● Nodes periodically sleep ● Turn off radio when sleeping ● Reduce duty cycle to ~10% (150ms on vs. 1.5s off) ● Trades energy efficiency for lower throughput and higher latency Listen Sleep tSleepListen Listen Sleep Listen t Both the synchronization issue and the schedule maintenance issue can be found in the paper.
  • 16.
    16 Collision Avoidance ● Similarto IEEE 802.11 ● Virtual Carrier Sense ● NAV (Network Allocation Vector) ● Physical Carrier Sense ● Four-way handshake ● RTS/CTS/DATA/ACK
  • 17.
    17 Overhearing Avoidance ● BasicIdea ● A node can go to sleep whenever its neighbor is talking with another node ● Who should sleep? ● The immediate neighbors of sender and receiver ● How to they know when to sleep? ● By overhearing RTS or CTS ● Hog long should they sleep? ● NAV
  • 18.
    18 Message Passing ● Howto transmit a long message? ● Transmit it as a single long packet ● Easy to be corrupted ● Transmit as many independent packets ● Higher Control Overhead & Longer Delay ● Divide into fragments, but transmit all in burst ! ! ! ● RTS/CTS reserve medium for the entire sequence RTS CTS Data CTS Data CTS Data CTS
  • 19.
    19 B-MAC (Overview) ● B-MACis implemented in TinyOS ! ● Major Feature: reconfigurable ● Above B-MAC, one can implement an RTS-CTS scheme or a TDMS-like scheduling protocol ! ● A small core of media access functionality ● arbitration, reliability, low power communication J. Polastre, J. Hill, and D. Culler, “Versatile low power media access for wireless sensor networks,” in SenSys, Nov. 2004, pp. 95–107.
  • 20.
    20 B-MAC (Overview) ● ChannelArbitration ● Clear Channel Assessment (CCA) & Backoffs ! ● Reliability ● Link-layer acknowledgment ! ● Low Power Communication ● Low Power Listening (LPL)
  • 21.
    21 Clear Channel Assessment ●This paper proposes a way to estimate noise floor using signal-processing techniques ● Noise floor can be viewed as a threshold ! ● Where a node intend to transmit a packet ● 802.15.4: takes a single sample and compares it to the noise floor ● B-MAC: outlier detection algorithm
  • 22.
  • 23.
    23 Clear Channel Assessment ●MacControl ● command result_t EnableCCA(); ● command result_t DisableCCA(); ! ● By disabling CCA, a scheduling protocol may be implemented above B-MAC ! ● If CCA is enabled ● event uint16_t initialBackoff(void* msg); ● event uint16_t congestionBackoff(void* msg);
  • 24.
    24 Link-layer Acknowledgment ● Similarto traditional MAC protocols ! ● MacControl ● command result_t EnableAck(); ● command result_t DisableAck(); ! ● RTS/CTS/DATA/ACK ?
  • 25.
    25 Low Power Listening ●Low Power Listening ● Sender (Transmit mode) ● Send preamble before transmit the data ● Preamble Length ! ● Receiver (Listening mode) ● Check Interval ! ● To reliably receive data, the preamble length is matched to the interval that the channel is checked for activity ● If the channel is checked every 100 ms, the preamble must be at least 100 ms long
  • 26.
    26 Low Power Listening Sender Receiver1 Receiver 2 Backoff & CCA Preamble wakeup Data wakeup Check Interval
  • 27.
    27 Outline ● Introduction ● MACProtocols ● Contention-based ● Schedule-based ● Hybrid ● Conclusion
  • 28.
    28 Schedule-based MAC Protocols forWSNs ● TDMA MAC Protocols ● TRAMA ● Convergecast in Tree-based Wireless Sensor Networks
  • 29.
    29 Traditional TDMA MAC Protocols ●Divide time into cycles ● A cycle consists of several slots ! ! ! ● Advantages ● Collision-Free, Low Idle Listing and Overhearing Overheads ● Disadvantages ● Synchronization, Low Channel Utilization ! ● An important Issue ● Slot Assignment Strategy 1 2 3 4 5 6 7 1 2 3 Cycle 3 4 5 cc 1 2 3 4 5 6 7 Cycle
  • 30.
    30 Slot Assignment Strategy ●Basic Slot Assignment Strategy ● A node should own a slot different from its one- hop and two-hop neighbors R S S Collision One-hop R R S S Collision Collision Two-hop RS R S Three-hop Acknowledgement?
  • 31.
    31 TRAMA ● TRAMA (TRaffic-AdaptiveMedium Access) ● Avoid assigning slots to nodes with no traffic ● Allow nodes to determine when they can switch off ! ● Main Components ● Neighbor Protocol ● Schedule Exchange Protocol ● Adaptive Election Algorithm V. Rajendran, K. Obraczka, and J. Garcia-Luna-Aceves, “Energyefficient, collision-free medium access control for wireless sensor networks,” Wireless Networks, vol. 12, no. 1, pp. 63–78, Feb. 2006.
  • 32.
    32 Neighbor Protocol To accommodatetopology dynamics: 1. Dynamic: interval between random access periods could be larger 2. Static: interval could be smaller
  • 33.
    33 Schedule Exchange Protocol Random Access SCHEDULE_INTERVAL SCHEDULE_INTERVAL WinningSlot (Intended Receiver: a, b, c) Winning Slot (Intended Receiver: d, e, f) Winning Slot (Intended Receiver: φ)
  • 34.
    34 Adaptive Election Algorithm x ay b 10080 60 20 30 50 10 120 90 130
  • 35.
    35 Convergecast in Tree-based WirelessSensor Networks 6 4 5 4 1 2 3 1 0 1 0 3 MAXSLOT=7 2 Level 0 L1 L2 L3 1. Construct a BFS tree T ! 2. Traverse the nodes of T in a bottom-up manner a) if the node v is a leaf node, assign a min slot s(v) which is not interference with its interference neighbors b) if v is the in-tree node, choose the min slot s(v) which is larger than the children’s slot and do not interference with others ! 3. Re-assign the slot in a top-down mannerY.-C. Tseng and M.-S. Pan, “Quick Convergecast in ZigBee/IEEE 802.15.4 Tree-Based Wireless Sensor Networks”, ACM MobiWac, 2006.
  • 36.
    36 Outline ● Introduction ● MACProtocols ● Contention-based ● Schedule-based ● Hybrid ● Conclusion
  • 37.
  • 38.
    38 Z-MAC ● Z-MAC (ZebraMAC) ● A hybrid TDMA and CSMA MAC scheme ● The main feature is its adaptability to the level of contention in the network ● under low contention, it behaves like CSMA, and ● under high contention, like TDMA I. Rhee, A. Warrier, M. Aia, and J. Min, “Z-MAC: a hybrid MAC for wireless sensor networks,” in SenSys, Nov. 2005, pp. 90–101.
  • 39.
    39 Z-MAC ● Design ofZ-MAC ● Neighbor Discovery and Slot Assignment ● Local Framing ● Transmission Control of ZMAC ● Explicit Contention Notification ● Receiving Schedule of ZMAC ● Local Time Synchronization
  • 40.
    40 Funneling-MAC ● Funneling effectin sensor networks G.-S. Ahn, E. Miluzzo, A. T. Campbell, S. G. Hong, and F. Cuomo “Funneling- MAC: A localized, sink-oriented MAC for boosting fidelity in sensor networks,” in SenSys ’06
  • 41.
    41 Funneling-MAC ● The authorspropose a localized, sink- oriented funneling-MAC ! ● Localized ● Using local TDMA scheduling in the intensity region only ● Sink-oriented ● Manage TDMA scheduling ● Compute and maintain the depth of the intensity region
  • 42.
    42 Conclusion ● MAC Protocolsin WSNs ● Energy Efficiency and Other Concerns ● Contention-based/Schedule-based/Hybrid ! ● Future Directions ● Taking the traffic features of WSNs into consideration ● Communication Patterns: Convergecast, Broadcast, Local Gossip, Event Reporting, etc.