Energy Efficient MAC Protocol for Wireless Sensor Network Haozhi Xiong Department of Electrical and Computer Engineering The Ohio State University
Outline • General view on MAC protocol in WSN • Requirements • Problems • MAC protocols for WSN • Conclusion
General Purposes of MAC Protocol • MAC protocol is to ensure that the channel can be accessed by multiple users, dealing with the situation of interference. • Has a direct bearing on how reliably and efficiently data can be transmitted
Requirement of WSN • Application-level performance is the goal as opposed to per-node fairness • Long battery life • Delay • Surveillance, Low traffic, Regular update • Emergency, Quick response, Bursty heavy load
Requirement of WSN cont’d • Adaptive to changing topology • Nodes die out • Mobile nodes • Applicable with limited computing capability
MAC Protocol for WSN • Energy-efficient in sense of achieved throughput • Delay-optimized • Robust • As simple as possible
Major problems in WSN MAC design • Idle listening • Listening when no traffic is sent • Overhearing • Receiving packets destined to other nodes • Collision • Retransmission • Overhead • Headers for signaling
Overhearing • Receiving packets that are not destined to the node • Interception, waste of energy in receiving, error responding will cause potential collision
Traffic Pattern • Local broadcast • Schedule exchange/update between neighbors • Omni-directional transmission is desired • Nodes to sink report • Payload and signaling • In favor of directional transmission
Classification • Basic idea • Control the active time of radio • Control the times of on-off switches • Scheduling: time-slotted system, wake-up by schedule, clock shift can be disastrous • LPL (Low Power Listening): preamble sampling, wake-up tone
S-MAC (Sensor-MAC) • Single frequency, schedule-based • Active time interval, larger sleep interval • Duty cycle = listen interval / frame length
S-MAC cont’d • Total frame length is limited by latency requirement, buffer space, and active time • Active time depends on message rate; fragmentation is used while transmitting large messages
S-MAC cont’d • Synchronization period • Nodes exchange schedules by sending SYNC packets to immediate neighbors at their scheduled listen time
S-MAC cont’d • Flat topology • Virtual cluster comprises nodes with common schedule • No coordination from cluster head
S-MAC cont’d • Coordinating sleeping • listen for a fixed amount of time • Following the existing schedule or • Establishing new schedule if no schedule exists and announcing new schedule by SYNC
S-MAC cont’d • New schedule received by node A • Discard current schedule if node A has no other neighbor • or • Adopt both schedules if node A has other neighbors
S-MAC cont’d • Periodical neighbor discovery • reasons • SYNC is corrupted by collision or interference • SYNC is delayed due to busy medium • The lesser neighbors a node has, the more frequent it search for neighbors.
S-MAC cont’d • Adaptive listening • To resolve sleep latency • Potential delay on every hop! • Basic idea • Let the nodes who overhear its neighbor’s transmission (ideally RTS or CTS) go to sleep and wake up for a short period at the end of transmission
S-MAC cont’d • Additional collision avoidance • Record transmission time as NAV (Network Allocation Vector) • Check if NAV = 0 before transmission attempt • NAV = 0 indicates ongoing transmission is over
S-MAC cont’d • Message passing • Divide long messages into small fragments • Transmit fragments in a burst through reserved channel
S-MAC cont’d • Features: • Loose synchronized due to large scale of intervals, no need for precise synchronization • Virtual cluster • Adaptive listen to reduce sleep delay • Message passing
S-MAC cont’d • Cons: • Sleep latency • Active time must be long enough to handle expected highest load, inefficient when load is lower. • Essentially S-MAC trades energy with latency
T-MAC (Timeout-MAC) • Minimize idle listening • Using timeout to be adaptive to traffic during wakeup period • Transmitting all messages in burst of variable length • RTS/CTS provides both collision avoidance and reliable transmission
T-MAC cont’d • An active period ends when no activation event has occurred for a time TA
T-MAC cont’d • Definition of activation event: • The firing of a periodic frame timer (the beginning) • The reception of any data on the radio • The sensing of traffic (during collision) • The end-of-transmission of a node’s own data packet or acknowledgement • End of neighbor’s transmission (knowledge from prior overhearing)
T-MAC cont’d • Node successfully transmitting 3 packets
T-MAC cont’d • Determining TA • RTS starts transmission, the TA should be at least long enough to hear the CTS • TA > RTS + CTS + Turn_around_Time
T-MAC cont’d • Early sleeping problem • Reason: asymmetric communication • Node to sink • Border of highly active part of network
T-MAC cont’d • Solution1 • Future request-to-send
T-MAC cont’d • Use of FRTS • Send FRTS when overhearing CTS destined to another nodes • Do not send FRTS if communication is sensed right after CTS • Do not send FRTS if the node has already been prohibited by prior RTS/CTS • Receiver of FRTS wakes up as dictated by FRTS (FRTS contains transmission time from CTS)
T-MAC cont’d • DS (data-send) packet is used to occupy the channel while giving time for FRTS to be sent
T-MAC cont’d • Solution 2 • Full buffer priority
T-MAC cont’d • Nodes with buffer almost full may prefer sending to receiving • After a node receiving RTS, it sends its own RTS without responding CTS. • A node may take advantage of full buffer priority only after several failed contentions (for example 2)
T-MAC cont’d • Pros: • Adaptive active time • Cons: • Early sleeping problem
P-MAC (Pattern-MAC) • A node’s sleep-wakeup schedule is determined by its own traffic and the traffic of its neighbors.
P-MAC cont’d • Pattern • Pattern is a string of bits indicating the tentative sleep-wake plan and is subject to change. • ‘1’: wake at a slot • ‘0’: sleep at a slot • Pattern is NOT equal to schedule. • Schedule is derived from a node’s own pattern and its neighbors’ pattern.
P-MAC cont’d • Pattern generation • Let Pj be the pattern of node j • A sequence of N slots is called a period • Pj repeats over N slots if the length of Pj is lesser than N
P-MAC cont’d • Example of a pattern • N = 5, Pj =01, then the tentative plan will be 01010 • 01010 is denoted as 031 • 0m1, m = 0,1,...,N-1
P-MAC cont’d • Pattern growing • If the node has no data to send, the number of ‘0’ doubles in current pattern until threshold th. • Beyond threshold, the number of ‘0’ increases by 1. • 1, 01, 021, 041, …, 0th1, 0th01, 0th021, 0th031, …, 0N-11 • If the node has data to send, the pattern is restored to default ‘1’
P-MAC cont’d • Pattern exchange • STF (Super Time Frame) • PRTF (Pattern Repeat Time Frame)
P-MAC cont’d • PETF (Pattern Exchange Time Frame) • The last generated pattern during PRTF becomes the pattern for next PRTF, and will be advertised to neighbors during PETF.
P-MAC cont’d • w : a slot in PRTF for all nodes to stay awake, downstream nodes can update pattern to ‘1’ and wake up quickly
P-MAC cont’d • TR is chosen long enough to handle a complete data transmission (CW+RTS+CTS+DATA+ACK) • TE is chosen long enough to broadcast a pattern.
P-MAC cont’d • Schedule generation
X-MAC • Asynchronous protocols like B-MAC and Wise-MAC, rely on LPL (low power listening) also called preamble sampling.
X-MAC (cont’d) • LPL drawbacks: • Extended waiting time even if the receiver has already wake up • Cannot tell who’s the intended receiver until the end of preamble
X-MAC (cont’d) • Strobed preamble • Allowing interruption and wake up faster • Short preamble • embedded with address information of the target
X-MAC (cont’d) • Energy-efficient • Low latency (reduced preamble length) • No need for synchronization • Low overheads • Less complex
Conclusion • The special requirement for MAC design in WSN • Energy-efficient • Delay-optimized • Robust • Simple • Synchronous MAC based on schedule • SMAC, TMAC, PMAC • Asynchronous MAC based on preamble • XMAC (BMAC, WiseMAC) Big Mac ?