MAC Layer Design for Wireless Sensor Networks Wei Ye USC Information Sciences Institute 1 Introduction Wireless sensor network Large number of densely distributed nodes Battery powered Multi-hop ad hoc wireless network Node positions and topology dynamically change Self-organization Sensor-net applications Nodes cooperate for a common task In-network data processing 2 Introduction Important attributes of MAC protocols Collision avoidance Basic task — medium access control Energy efficiency Scalability and adaptivity Number of nodes changes overtime Latency Fairness Throughput Bandwidth utilization 3 Overview of MAC protocols Contention-based protocols CSMA — Carrier Sense Multiple Access Ethernet Not enough for wireless (collision at receiver) C A B Hidden terminal: A is hidden from C’s CS MACA — Multiple Access w/ Collision Avoidance RTS/CTS for hidden terminal problem RTS/CTS/DATA 4 Overview of MAC Protocols Contention-based protocols (contd.) MACAW — improved over MACA RTS/CTS/DATA/ACK Fast error recovery at link layer IEEE 802.11 Distributed Coordination Function Largely based on MACAW Protocols from voice communication area TDMA — low duty cycle, energy efficient FDMA — each channel has different frequency CDMA — frequency hopping or direct sequence 5 Example: IEEE 802.11 DCF Distributed coordinate function: ad hoc mode Virtual and physical carrier sense (CS) Network allocation vector (NAV), duration field Binary exponential backoff RTS/CTS/DATA/ACK for unicast packets Broadcast packets are directly sent after CS Fragmentation support RTS/CTS reserve time for first (frag + ACK) First (frag + ACK) reserve time for second… Give up tx when error happens 6 Example: IEEE 802.11 DCF Timing relationship 7 Energy Efficiency in MAC Design Energy is primary concern in sensor networks What causes energy waste? Collisions Control packet overhead Overhearing unnecessary traffic Dominant in sensor nets Long idle time bursty traffic in sensor-net apps Idle listening consumes 50—100% of the power for receiving (Stemm97, Kasten) 8 Energy Efficiency in MAC Design TDMA vs. contention-based protocols TDMA can easily avoid or reduce energy waste from all above sources Contention protocols needs to work hard in all directions TDMA has limited scalability and adaptivity Hard to dynamically change frame size or slot assignment when new nodes join Restrict direct communication within a cluster Contention protocols easily accommodate node changes and support multi-hop communications 9 TDMA Protocols Bluetooth Clustering (piconet) FH-CDMA between clusters TDMA within each cluster Centralized control by cluster head Only master-slave communication Master polling slave and schedule tx At most 8 active nodes can be in a cluster — scalability problem 10 TDMA Protocols LEACH: Low-Energy Adaptive Clustering Hierarchy — by Heinzelman, et al. Similar to Bluetooth CDMA between clusters TDMA within each cluster Static TDMA frame Cluster head rotation Node only talks to cluster head Only cluster head talks to base station (long dist.) The same scalability problem 11 TDMA Protocols Self-Organaiztion — by Sohrabi and Pottie Have a pool of independent channels Frequency band or spreading code Potential interfering links select different channels Talk to each neighbor in different time slots Sleep during unscheduled time 1 Example 3 4 2 6 different channels Each node has its own scheduled time slots — superframe 12 TDMA Protocols Self-Organaiztion (Contd.) Result (if a node has n neighbors) Uses n different channels to talk to each of them Schedules n time slots to send to each of them and n time slots to receive from each of them Looks like TDMA, but actually FDMA or CDMA Any pair of two nodes can talk at the same time Low bandwidth utilization 13 Contention-Based Protocols PAMAS: Power Aware Multi-Access with Signalling — by Singh and Raghavendra Improve energy efficiency from MACA Avoid overhearing by putting node into sleep Control channel separates from data channel RTS, CTS, busy tone to avoid collision Probe packets to find neighbors transmission time Increased hardware complexity Two channels need to work simultaneously, meaning two radio systems. 14 Contention-Based Protocols Piconet — by Bennett, Clarke, et al. Low duty-cycle operation — energy efficient Sleep for 30s, beacon, and listen for a while Sending node needs to listen for receiver’s beacon first, then Carrier sense before sending data May wait for long time before sending Tx rate control — by Woo and Culler Carrier sense + adaptive rate control Promote fair bandwidth allocation Helps for congestion avoidance 15 Contention-Based Protocols 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 All nodes participate in periodic beacon generation ATIM: tell nodes in PS mode to stay awake for Rx ATIM follows a beacon sent/received Unicast ATIM needs acknowledgement Broadcast ATIM wakes up all nodes — no ACK 16 Contention-Based Protocols Example of PS mode in IEEE 802.11 DCF 17 Energy Efficiency: Contention Extend 802.11 PS mode for Multi-hops — By Tseng, et al. at IEEE Infocom 2002 Nodes do not synchronize with each other Designed 3 sleep patterns — ensure nodes listen intervals overlap, example: Periodically fully-awake interval: similar to S-MAC Problem on broadcast — wake up each neighbor 18 S-MAC: Introduction S-MAC — by Ye, Heidemann and Estrin Tradeoffs Latency Fairness Energy Major components in S-MAC • • • • Periodic listen and sleep Collision avoidance Overhearing avoidance Massage passing 19 Periodic Listen and Sleep 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% (150ms on/1.5s off) Latency Energy 20 Periodic Listen and Sleep 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 broadcast twice 21 Periodic Listen and Sleep 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 22 Collision Avoidance Problem: Multiple senders want to talk Options: Contention vs. TDMA Solution: 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 23 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 24 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 Fairness Energy Msg-level latency 25 Msg Passing vs. 802.11 fragmentation S-MAC message passing Data 19 RTS 21 ACK 18 CTS 20 ... Data 17 ACK 16 Data 1 ... ACK 0 Fragmentation in IEEE 802.11 • No indication of entire time — other nodes keep listening • If ACK is not received, give up Tx — fairness Data 3 RTS 3 CTS 2 Data 3 ACK 2 ... ACK 2 Data 1 ... ACK 0 26 Implementation on Testbed Nodes Platform Mica Motes (UC Berkeley) 8-bit CPU at 4MHz, 128KB flash, 4KB RAM 433MHz radio TinyOS: event-driven Compared MAC modules 1. IEEE 802.11-like protocol w/o sleeping 2. Message passing with overhearing avoidance 3. S-MAC (2 + periodic listen/sleep) 27 Experiments: two-hop network Topology and measured energy consumption on source nodes Average energy consumption in the source nodes 1800 Source 2 Sink 1 Sink 2 • Each source node sends 10 messages — Each message has 400B in 10 fragments • Measure total energy over time to send all messages 802.11-like protocol w/o sleep Overhearing avoidance S-MAC 1600 Energy consumption (mJ) Source 1 1400 1200 1000 800 600 400 200 0 2 4 6 8 10 Message inter-arrival period (second) 28 Recent Progress: Adaptive Listen Reduces latency due to periodic sleep At end of each transmission, nodes wake up for a short time Next transmission can start right away Example: data flow ABC A B C A sends RTS, B replies CTS, C overhears CTS C will wake up when AB is done BC can start right away 29 Recent Progress: 10-hop Experiments Compare S-MAC in 3 different modes 10-hop linear network with 11 nodes Energy consumption on radios in the entire network Average message latency under the lowest traffic load 30 10% duty cycle without adaptive listen 10% duty cycle with adaptive listen No periodic sleep 10 20 15 6 10 4 5 2 0 0 10% duty cycle without adaptive listen 10% duty cycle with adaptive listen No periodic sleep 8 Latency (S) Energy consumption (J) 25 12 2 4 6 8 Message inter-arrival period (S) 10 0 0 2 4 6 8 10 Number of hops 30 S-MAC Information URL: http://www.isi.edu/scadds/ Released S-MAC source code (for TinyOS 0.6.1) Currently porting to nesC environment (TinyOS 1.0) 31
© Copyright 2026 Paperzz