Download presentation
Presentation is loading. Please wait.
Published byGastone Parisi Modified over 5 years ago
1
Medium Access Control Protocols Lecture 7 (Lecture material contributed by K. Langendoen(TUDelft) and W. Ye(USC/ISI)) September 23, EENG 460a / CPSC 436 / ENAS 960 Networked Embedded Systems & Sensor Networks Andreas Savvides Office: AKW 212 Tel Course Website
2
Protocol stack Data link layer: mapping network packets radio frames
OSI Network Layer 3 Data link layer: mapping network packets radio frames transmission and reception of frames over the air error control security (encryption) Data Link Layer 2 MAC Protocol Physical Layer 1
3
Medium Access Control Control access to the shared medium (radio channel) avoid interference between transmissions mitigate effects of collisions (retransmit) Approaches contention-based: no coordination schedule-based: central authority (access point) proactive vs. reactive
4
Collision-based MAC protocols
ALOHA : packet radio networks send when ready 18-35% channel utilization CSMA (Carrier Sense Multiple Access): “listen before talk” 50-80% channel utilization
5
Hidden terminal problem
C cs Time cs Carrier sense at sender may not prevent collision at receiver DATA DATA
6
CSMA/CA: Collision Avoidance
B C MACA: Request To Send Clear To Send DATA MACAW (Wireless) additional ACK cs Time RTS CTS Blocked DATA MACA: Medium Access with Collision Avoidance [Phil Karn, 1990] ACK
7
Exposed terminal problem
C D cs Time RTS Parallel CSMA transfers are synchronized by CSMA/CA Collision avoidance can be too restrictive! CTS Blocked DATA ACK
8
IEEE 802.11 Operation infrastructure mode (access point) ad-hoc mode
Power save mechanism; not for multi-hop networks Protocol carrier sense collision avoidance (optional)
9
IEEE 802.11 Network Allocation Vector (NAV) collision avoidance
RTS DATA Contention Window Sender Receiver Others NAV(RTS) NAV(CTS) SIFS DIFS CTS ACK Network Allocation Vector (NAV) collision avoidance overhearing avoidance: other nodes may sleep
10
Schedule-based MAC protocols
Communication is scheduled in advance no contention no overhearing support for delay-bound traffic (voice) Time-Division Multiple Access time is divided into slotted frames access point broadcasts schedule coordination between cells required
11
TDMA Typical WLAN setup no direct communication between nodes
CP Frame n Frame n+2 Frame n+1 downlink uplink Typical WLAN setup no direct communication between nodes access point broadcast Traffic Control (TC) map (new) nodes signal needs in Contention Period (CP)
12
Requirements for Sensor Networks
Handle scarce resources CPU: 1 – 10 MHz memory: 2 – 4 KB RAM radio: ~100 Kbps energy: small batteries Unattended operation plug & play, robustness long lifetime
13
Sensor Node Energy Roadmap (DARPA)
10,000 1,000 100 10 1 Deployed (5W) -Rehosting to Low Power COTS (10x) -Simple Power Management -Algorithm Optimization -System-On-Chip -Adv Power Management -Algorithms (50x) PAC/C Baseline (.5W) Average Power (mW) (50 mW) (1mW) software does it! [Srivastava:2002]
14
Energy consumption (mW)
25 20 15 10 5 Sleep 5 MHz 1 MHz LED Light Transmit Receive Standby Compass Accelerometer Transceiver Processor Sensors LED [Hoesel:2004]
15
Energy-Efficient MAC Design
Power save (PS) mode in IEEE 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
Energy-Efficient MAC Design
Unicast example of PS mode in DCF
17
Communication patterns
local gossip WSN applications: local collaboration when detecting a physical phenomenon periodic reporting to sink Characteristics low data rates small messages fluctuations (in time and space) convergecast <1000 bps ~25 bytes [Kulkarni:2004]
18
Design guidelines switch radio off when possible (duty cycle)
AND, minimize number of switches low complexity (memory footprint) trade off performance for energy optimize for traffic patterns
19
Energy-efficient medium access control
Performance/Cost trade-off latency throughput fairness energy consumption Organizational/Flexibility trade-off contention-based schedule-based
20
Sources of overhead idle listening (to handle potentially incoming messages) collisions (wasted resources at sender and receivers) overhearing (communication between neighbors) protocol overhead (headers and signaling) traffic fluctuations (overprovisioning and/or collapse) scalability/mobility (additional provisions)
21
Contention-based vs. Schedule-based
source of overhead performance (latency, throughput, fairness) cost (energy-efficiency) idle listening C collisions overhearing protocol overhead C,S traffic fluctuations scalability/mobility S
22
Energy-efficient MAC protocols
WSN-specific protocols starting from 2000 (1 paper) exponential growth (2004, 16+ papers) Classification (up to May 2004, 20 papers) the number of channels used the degree of organization between nodes the way in which a node is notified of an incoming msg
23
Protocol classification
Channels Organization Notification 2000 SMACS [34] FDMA frames schedule 2001 PACT [28] single PicoRadio [10] CDMA+tone random wakeup 2002 STEM [33] data+ctrl Preamble sampling [6] listening Arisha [2] S-MAC [36] slots PCM [18] Low Power Listening [13]
24
Protocol classification
2003 Sift [17] single random listening EMACs [15] frames schedule T-MAC [5] slots TRAMA [30] WiseMAC [7] 2004 BMA [24] Miller [27] data+tone wakeup+list DMAC [26] SS-TDMA [23] LMAC [14] B-MAC [29]
25
Latency Fairness Energy Case Study: S-MAC
S-MAC — by Ye, Heidemann and Estrin Tradeoffs Major components in S-MAC Periodic listen and sleep Collision avoidance Overhearing avoidance Massage passing Latency Fairness Energy We call our protocol Sensor-MAC or S-MAC. These are the major tradeoffs in S-MAC. We sacrifice the latency and fairness to gain better energy efficiency. S-MAC includes the following major components : periodic listen and sleep, collision avoidance, overhearing avoidance, and message passing. I’m going to talk about each of them in details.
26
Latency Energy Coordinated Sleeping
Problem: Idle listening consumes significant energy Solution: Periodic listen and sleep sleep listen Turn off radio when sleeping Reduce duty cycle to ~ 10% (120ms on/1.2s off) As we said, idle listening is a big problem. Listening consumes significant amount of energy. Our solution is to put nodes into periodic sleep state. After sleeping for some time, each node wakes up and listens to see if anyone wants to talk to it. If yes, it will stay awake. If no, it will go to sleep again. During the sleep time, the node turns off its radio. In our implementation , we have reduced the node duty cycle to about 10%, which is listening for 200 milliseconds and sleeping for 2 seconds. The major tradeoff here is the latency vs. energy savings. Latency is increased due to the periodic sleep. Latency Energy
27
Coordinated Sleeping Schedules can differ Node 1 Node 2 Schedule 1
listen Prefer neighboring nodes have same schedule — easy broadcast & low control overhead Schedule 2 Schedule 1 Before nodes perform periodic listen and sleep, they need to choose a schedule about when to listen and when to sleep. This figure shows that even if two nodes have different schedules, they can still talk to each other as long as they know each others’ schedules. For example, if node 1 wants to talk to node 2, it just wait until node 2 is listening. However, we prefer neighboring nodes to have the same schedule, so that it’s easy to do broadcast and the control overhead is low. But in a large network, we cannot guarantee that all nodes follow the same schedule. For example, in this figure, there are two different schedules on each side. The node on the border will follow both schedules. When it broadcasts a packet, it needs to do it twice, first for nodes on schedule 1 and then for those on schedule 2. Border nodes: two schedules or broadcast twice
28
Coordinated Sleeping 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 Here are some procedures for synchronization on schedules. Nodes need to remember their neighbors’ schedules so that they know when to send to each other. Each node periodically broadcasts its schedule and re-synchronizes on a neighbor’s schedule when receiving an update. This prevents long-term clock drift. The schedule packets also serve as beacons for new nodes to join a neighborhood.
29
Coordinated Sleeping t1 t2 Adaptive listening
Reduce multi-hop latency due to periodic sleep Wake up for a short period of time at end of each transmission 1 2 3 4 RTS CTS CTS t1 t2 listen listen Reduce latency by at least half
30
Collision Avoidance S-MAC is based on contention
Similar to IEEE ad hoc mode (DCF) Physical and virtual carrier sense Randomized backoff time RTS/CTS for hidden terminal problem RTS/CTS/DATA/ACK sequence The second component in S-MAC is collision avoidance. If multiple senders want to talk to the same receiver, they need to avoid collisions. We argue that contention-based protocols have better scalability in node density than TDMA protocols, and S-MAC is contention based. The collision avoidance procedure is similar to that in ad hoc mode. That is, RTS/CTS/DATA/ACK sequence.
31
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 The third component in S-MAC is overhearing avoidance. Receiving packets destined to other nodes is a waste of energy. The basic solution is to put a node into sleep when its neighbors are talking. This idea is from PAMAS. PAMAS uses a second control channel to achieve the goal. In our solution, we only use in-channel signaling. To appropriately put nodes into sleep, we need to answer two questions. The first is, who should sleep. The short answer is, all immediate neighbors of the sender and receiver should go to sleep. The second question is, how long for them to sleep. In S-MAC, each packet has a duration field, which is the remaining time that is needed for current transmission. If a node receives any packet from its neighbor, it will learn from the duration field about how long it should sleep.
32
Energy Fairness Msg-level latency 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 The last component in S-MAC is message passing. It is motivated by the in-network data processing, which requires efficient transmission of a meaningful unit of message, which can be quite long. Our approach is to fragment a long message into short ones, and transmit them in burst. The key is that do not interleave the transmission of different messages, since the receiver cannot start data processing if only partial of a message is received. The RTS and CTS reserve medium for the entire message. The receiver will send ACK for each received fragment. If an ACK is not received, the sender will extend transmission time and immediately re-transmit current fragment. Other nodes will sleep for long time until the whole message transmission is done. The major tradeoff here is, the fairness vs. energy and message-level latency. It’s unfair for a node with a short message to wait for a long transmission even if there are errors in the middle. Energy savings is obtained by putting nodes into sleep for long time. Message-level latency can be reduced by not interleaving different messages and by the fast retransmission of erroneous fragments. Fairness Energy Msg-level latency
33
Implementation on Testbed Nodes
Platform Mica Motes (UC Berkeley) 8-bit CPU at 4MHz, 128KB flash, 4KB RAM 20Kbps radio at 433MHz TinyOS: event-driven Configurable S-MAC options Low duty cycle with adaptive listen Low duty cycle without adaptive listen Fully active mode (no periodic sleeping)
34
Experiments: two-hop network
Topology and measured energy consumption on source nodes 2 4 6 8 10 200 400 600 800 1000 1200 1400 1600 1800 Average energy consumption in the source nodes Message inter-arrival period (second) Energy consumption (mJ) like protocol without sleep Overhearing avoidance S-MAC w/o adaptive listen Source 1 Source 2 Sink 1 Sink 2 S-MAC consumes much less energy than like protocol w/o sleeping At heavy load, overhearing avoidance is the major factor in energy savings At light load, periodic sleeping plays the key role We used a simple topology in our experiments. It’s a two-hop network with 2 source nodes and two sinks. In each test, there are 10 messages generated on each source node. Each message has 10 fragments, and each fragment has 40 bytes. We measure the total energy consumption of each node for sending this fixed amount of data. This is the measured energy consumption on the source nodes. The X-axis indicates the traffic load. It’s denoted by the message inter-arrival time in seconds. For example, the point 2 means that every 2 seconds, there will be a message generated on each source node. So a small value indicates a heavy traffic load. The Y-axis is the energy consumption of the radio in milli-joule. The red line is the result of the like protocol without sleeping. The blue line is the message passing plus overhearing avoidance. The black one is the complete S-MAC which incorporates the periodic listen and sleep. We can see that in all cases, the blue line and black line outperform the always listening MAC. When traffic load is high, the blue line and the black line are about the same. In this case, there are few chances to go to periodic sleep, and the energy savings is mainly due to the overhearing avoidance. When traffic becomes lighter, the periodic sleep plays a key role, and makes S-MAC much better than the always-listening MAC.
35
Energy Consumption over Multi-Hops
Ten-hop linear network at different traffic load 3 configurations of S-MAC 2 4 6 8 10 5 15 20 25 30 Message inter-arrival period (S) Energy consumption (J) 10% duty cycle without adaptive listen No sleep cycles 10% duty cycle with adaptive listen Energy consumption at different traffic load At light traffic load, periodic sleeping has significant energy savings over fully active mode Adaptive listen saves more at heavy load by reducing latency
36
Latency as Hops Increase
Adaptive listen significantly reduces latency causes by periodic sleeping 2 4 6 8 10 12 Latency under lowest traffic load 2 4 6 8 10 12 Latency under highest traffic load 10% duty cycle without adaptive listen 10% duty cycle without adaptive listen Average message latency (S) Average message latency (S) 10% duty cycle with adaptive listen 10% duty cycle with adaptive listen No sleep cycles No sleep cycles Number of hops Number of hops
37
Throughput as Hops Increase
Adaptive listen significantly increases throughput 2 4 6 8 10 20 40 60 80 100 120 140 160 180 200 220 Effective data throughput under highest traffic load Using less time to pass the same amount of data No sleep cycles Effective data throughput (Byte/S) 10% duty cycle with adaptive listen 10% duty cycle without adaptive listen Number of hops
38
Combined Energy and Throughput
Energy-time cost on passing 1-byte data from source to sink 2 4 6 8 10 0.5 1 1.5 2.5 3 Periodic sleeping provides excellent performance at light traffic load With adaptive listening, S-MAC achieves about the same performance as no-sleep mode at heavy load No sleep cycles Energy-time product per byte (J*S/byte) 10% duty cycle without adaptive listen 10% duty cycle with adaptive listen Message inter-arrival period (S)
39
IEEE 802.15.4 MAC Protocol Based on an IEEE standard for WPAN
Goal: Ultra-low cost, low power radios Support multiple configurations (e.g point-to-point, groups, ad-hoc etc) CSMA-CA based protocol Each packet can be individually acknowledged Key features Three types of node functionalities PAN Coordinator, Coordinator and Device Two device types FFD – Full Function Device RFD – Reduced Function Device
40
Frequencies and Data Rates
BAND COVERAGE DATA RATE # OF CHANNEL(S) 2.4 GHz ISM Worldwide kbps 868 MHz Europe kbps 915 MHz ISM Americas kbps See class website for more information about Zigbee More abut MAC protocols on the next lecture
41
Paper Reading [Elson02] Fine-Grained Network Time Synchronization using Reference Broadcasts, Jeremy Elson, Lewis Girod and Deborah Estrin In Proceedings of the Fifth Symposium on Operating Systems Design and Implementation (OSDI 2002), Boston, MA. December UCLA Technical Report You should all read this paper closely before lecture 9!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.