1 / 100

Week 8 Lectures

Week 8 Lectures. MAC Layer in WSNs. Outline. Introduction to MAC MAC attributes and trade-offs Scheduled MAC protocols Contention-based MAC protocols Case studies Summary. Introduction to MAC. The role of medium access control (MAC)

akira
Télécharger la présentation

Week 8 Lectures

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Week 8 Lectures MAC Layer in WSNs Medium Access Control in WSNs

  2. Outline • Introduction to MAC • MAC attributes and trade-offs • Scheduled MAC protocols • Contention-based MAC protocols • Case studies • Summary Medium Access Control in WSNs

  3. Introduction to MAC • The role of medium access control (MAC) • Controls when and how each node can transmit in the wireless channel • Why do we need MAC? • Wireless channel is a shared medium • Radios transmitting in the same frequency band interfere with each other – collisions • Other shared medium examples: Ethernet Medium Access Control in WSNs

  4. Application layer Transport layer End-to-end reliability, congestion control Network layer Routing Link/MAC layer Per-hop reliability, flow control, multiple access Physical layer Packet transmission and reception Where Is the MAC? • Network model from Internet • A sublayer of the Link layer • Directly controls the radio • The MAC on each node only cares about its neighborhood Medium Access Control in WSNs

  5. Media access in wireless • In wired link, • Carrier Sense Multiple Access with Collision Detection • send as soon as the medium is free, listen into the medium if a collision occurs (original method in IEEE 802.3) • In wireless • Signal strength decreases in proportional to at least square of the distance • Collision detection only at receiver • Half-duplex mode • Furthermore, CS is not possible after propagation range Medium Access Control in WSNs

  6. What’s New in Sensor Networks? • A special wireless ad hoc network • Large number of nodes • Limited computation ability and RAM • Battery powered • Topology and density change • Nodes for a common task • In-network data processing • Sensor-net applications • Sensor-triggered bursty traffic • Can often tolerate some delay • Speed of a moving object places a bound on network reaction time Medium Access Control in WSNs

  7. Energy efficiency Scalability & Self-configuration Adaptivity Adaptivity Fairnessnotimportant Trade for energy Characteristics of Sensor Network • A special wireless ad hoc network • Large number of nodes • Battery powered • Topology and density change • Nodes for a common task • In-network data processing • Sensor-net applications • Sensor-triggered bursty traffic • Can often tolerate some delay • Speed of a moving object places a bound on network reaction time Message-levelLatency Medium Access Control in WSNs

  8. Primary Concerns of MAC Attributes • Collision avoidance • Basic task of a MAC protocol • Determine when and how to access the medium • Energy efficiency • One of the most important attributes for sensor networks, since most nodes are battery powered • Affect the overall node lifetime Medium Access Control in WSNs

  9. Primary Concerns of MAC Attributes • Scalability and adaptivity • Network size, node density and topology change • Deployed ad-hoc and operate in uncertain environments • Nodes die • Nodes join later • Nodes move • Good MAC accommodates changes gracefully Medium Access Control in WSNs

  10. Other Concerns of MAC Attributes • Channel utilization • How well is the channel used? • Also called bandwidth utilization or channel capacity • Latency • Delay from sender to receiver • Its importance depends on application • single hop or multi-hop Medium Access Control in WSNs

  11. Other Concerns of MAC Attributes • Throughput • The amount of data transferred from sender to receiver in unit time • Affected by efficiency of collision avoidance, channel utilization, latency, control overhead… • Goodput? • Fairness • Can nodes share the channel equally? • All nodes cooperate for a single common task • Less important in sensor networks Medium Access Control in WSNs

  12. Dominant factor Energy Efficiency in MAC Design • Energy is primary concern in sensor networks • What causes energy waste? • Collisions • Retransmission • Long idle time • bursty traffic in sensor-net apps • Idle listening consumes 50—100% of the power for receiving (Stemm97, Kasten) Medium Access Control in WSNs

  13. Energy • What causes energy waste? • Overhearing unnecessary traffic • Can be a dominant factor of energy waste when • Heavy traffic load • High node density • Control packet overhead • Reduce effective goodput • Computation complexity • With Motes, radio and CPU are two major energy consumers Medium Access Control in WSNs

  14. Classification of MAC Protocols • Schedule-based protocols • Schedule nodes onto different Time slots or sub-channels • Examples: TDMA, FDMA, CDMA • Contention-based protocols • Nodes compete in probabilistic coordination • Examples: ALOHA (pure & slotted), CSMA, S-MAC Medium Access Control in WSNs

  15. Schedule-based protocols Medium Access Control in WSNs

  16. Scheduled Protocols: TDMA • Time division multiple access • Divide time into subchannels • Advantages • No collisions • Energy efficient — easily support low duty cycles • Disadvantages • Difficult to accommodate node changes • Requires strict time synchronization • Could limit available throughput Medium Access Control in WSNs

  17. subChannel 1 subChannel 2 Bandwidth subChannel 3 subChannel 4 Time Frequency Division Multiple Access (FDMA) • Available frequency subdivided into a number of subchannels • FDMA is used in nearly all first generation mobile communication systems, like AMPS (30 KHz channels) • Require frequency synchronization, narrowband filters, tunable receiver • Transceiver more complex Medium Access Control in WSNs

  18. Code Division Multiple Access (CDMA) • Use different codes to separate the transmissions • Users encoded by different codes (keys) coexist in time and frequency domains • All parallel transmissions using other codes appears as noise • English vs. French • Code management is complex and critical Medium Access Control in WSNs

  19. Scheduled Protocols: Polling • Master-slave configuration • The master node decides which slave can send by polling the corresponding slave • Only direct communication between the master and a slave • A special TDMA without pre-assigned slots • Examples • IEEE 802.11 infrastructure mode (CPF) • Bluetooth piconets Medium Access Control in WSNs

  20. Scheduled Protocols: Bluetooth • Wireless personal area network (WPAN) • Short range, moderate bandwidth, low latency • IEEE 802.15.1 (MAC + PHY) is based on Bluetooth • Nodes are clustered into piconet • Each piconet has a master and up to 7 active slaves – scalability problem • The master polls each slave for transmission • CDMA among piconets • Multiple connected piconets form a scatternet • Difficult to handle inter-cluster communications Medium Access Control in WSNs

  21. Scheduled Protocols: Bluetooth • Bluetooth (Cont.) • How about Bluetooth radio with sensor networks? • Scalability is a big problem • Lack of multi-hop support • No commercial Bluetooth radio supports scatternet so far • Use two radios – expensive and energy inefficient • A node temporarily leave one piconet and joins another – high overhead and long delay • Connection maintenance is expensive even with a low-duty-cycle mode ([Leopold + 2003]) Medium Access Control in WSNs

  22. Scheduled Protocols: Self-Organization • By Sohrabi and Pottie [Sohrabi+ 2000] • Have a pool of independent channels • Frequency band or spreading code • Potential interfering links select different channels • Talk to neighbors in different time slots • Sleep in unscheduled time slots • Looks like TDMA, but actual multiple access is accomplished by FDMA or CDMA • Any pair of two nodes can talk at the same time • Low bandwidth utilization Medium Access Control in WSNs

  23. Scheduled Protocols: LEACH • Low-Energy Adaptive Clustering Hierarchy — by Heinzelman, et al. [Heinzelman+ 2000] • 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 Medium Access Control in WSNs

  24. Contention-based protocols Medium Access Control in WSNs

  25. Contention Protocols: Classics • ALOHA • Pure ALOHA: send when there is data • Slotted ALOHA: send on next available slot • Both rely on retransmission when there’s collision • CSMA — Carrier Sense Multiple Access • Listening (carrier sense) before transmitting • Send immediately if channel is idle • Backoff if channel is busy • non-persistent, 1-persistent and p-persistent Medium Access Control in WSNs

  26. ALOHA, Slotted-ALOHA • Mechanism • random, distributed (no central arbiter), time-multiplex • Slotted Aloha additionally uses time-slots, sending must always start at slot boundaries • Aloha • Slotted Aloha collision sender A sender B sender C t collision sender A sender B sender C t Medium Access Control in WSNs

  27. c a b Node a is hidden from c’s carrier sense Contention Protocols: CSMA/CA • Hidden terminal problem • CSMA is not enough for multi-hop networks (collision at receiver) • CSMA/CA (CSMA with Collision Avoidance) • RTS/CTS handshake before send data • Node c will backoff when it hears b’s CTS Medium Access Control in WSNs

  28. Hidden terminal problem • Hidden terminals • A sends to B, C cannot receive A • C wants to send to B, C senses a “free” medium (CS fails) • collision at B, A cannot receive the collision (CD fails) • A is “hidden” for C A B C Medium Access Control in WSNs

  29. Exposed terminal problem • Exposed terminals • B sends to A, C wants to send to D • C has to wait, CS signals a medium in use • but A is outside the radio range of C, thus waiting is not necessary • C is “exposed” to B A B C D Medium Access Control in WSNs

  30. Contention Protocols: MACA and MACAW • MACA — Multiple Access w/ Collision Avoidance [Karn 1990] • Based on CSMA/CA • Add duration field in RTS/CTS informing other node about their backoff time • MACAW [Bharghavan+ 1994] • Improved over MACA • RTS/CTS/DATA/ACK • Fast error recovery at link layer Medium Access Control in WSNs

  31. Contention Protocols: IEEE 802.11 • IEEE 802.11 ad hoc mode (DCF) • 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 (fragment + ACK) • First (fragment + ACK) reserve time for second… • Give up transmission when error happens Medium Access Control in WSNs

  32. Contention Protocols: IEEE 802.11 (cont.) • 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 Medium Access Control in WSNs

  33. Contention Protocols: IEEE 802.11 (cont.) • Unicast example of PS mode in 802.11 DCF Medium Access Control in WSNs

  34. Contention Protocols: Tx Rate Control • By Woo and Culler [woo+ 2003] • Based on a special network setup • A base station tries to collect data equally from all sensors in the network • CSMA + adaptive rate control • Promote fair bandwidth allocation to all sensors • Nodes close to the base station forward more traffic, and have less chances to send their own data • Helps in congestion avoidance Medium Access Control in WSNs

  35. Self-Organizing Medium Access Control for Sensor network (SMACS) [Sohrabi+ 2000] • Note: this is SMACS, not S-MAC (which will be discussed later) • Trades bandwidth for increased energy efficiency • Superframe, Tframe Channel: a pair of time intervals • Four types of message: • TYPE1: a short invitation containing a node’s ID and number of attached neighbors. • TYPE2: a response to TYPE1, containing a node’s address and attached state. • TYPE3: response to TYPE2, including the sender’s decision about communication peer, timing information, schedule of sender’s existing link. • TYPE4: response to TYPE3. It identifies the time slots available to both sender and receiver, determines the channel for the new communication link. Medium Access Control in WSNs

  36. SMACS Operation Medium Access Control in WSNs

  37. Eavesdrop-And-Register (EAR) protocol • EAR extends SMACS for use with mobile devices. • Stationary nodes periodically broadcast a Broadcast Invitation (BI) message to invite other nodes to join. • A mobile node selects a BI from many BIs that it got, then reply with a Mobile Invite (MI) message • If the stationary node accepts MI request, it selects slots for communication and replies with a Mobile Response (MR) message. • As the received SNR along the channel improves or degrades, mobile nodes request a connection or disconnection (with an MD) based on predetermined threshold Medium Access Control in WSNs

  38. Scheduled vs. Contention Protocols Medium Access Control in WSNs

  39. Energy Efficiency in Contention Protocols Medium Access Control in WSNs

  40. Energy Efficiency in Contention Protocols • Contention-based protocols need to work hard in all directions for energy savings • Reduce idle listening – support low duty cycle • Better collision avoidance • Reduce control overhead • Avoid unnecessary overhearing Medium Access Control in WSNs

  41. Energy-Efficient MAC Design • Piconet scheme — [Bennett+ 1997] • This scheme is not the same piconet in Bluetooth • 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 • CSMA before sending data • May wait for long time before sending Medium Access Control in WSNs

  42. Energy-Efficient MAC Design • PAMAS: Power Aware Multi-Access with Signalling — [Singh+ 1998] • Improve energy efficiency from MACA • Avoid overhearing by putting node into sleep • Use separate control and data channels • 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. Medium Access Control in WSNs

  43. E C A B D F Power Aware Multi-Access protocol with Signaling (PAMAS) • Using a separate signaling channel. • Avoids the overhearing among neighboring nodes • Nodes shut themselves off when overhear transmissions. • If a node has nothing to transmit, and one of its neighbors begins transmitting • If at least one neighbor of a node is transmitting or receiving • A is sending data packets to B, C and D power off Medium Access Control in WSNs

  44. PAMAS • Every node makes the decision to power off independently • Node sends RTS on the signal channel before transmitting data • If no other transmission going on, target node replies a CTS • If any neighboring node is receiving a transmission, it responds with a busy tone; if a CTS is sent, it collides with the busy tone. Then the sender will backoff and retry later. • A node only powers off its data channel. The signaling interface stays on all the time • Powering off radios does not have any effect on the message latency Medium Access Control in WSNs

  45. Energy-Efficient MAC Design • Asynchronous sleeping – by Tseng, et al. • Extend 802.11 PS mode to Multi-hops • 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 Medium Access Control in WSNs

  46. Energy-Efficient MAC Design • ZigBee • Industry standard through application profiles running over IEEE 802.15.4 radios • Target applications are sensors networks, interactive toys, smart badges, remote controls, and home automation Medium Access Control in WSNs

  47. Contention Protocols: ZigBee • Based on IEEE 802.15.4 MAC and PHY • Three types devices • Network Coordinator • Full Function Device (FFD) • Can talk to any device, more computing power • Reduced Function Device (RFD) • Can only talk to a FFD, simple for energy conservation • CSMA/CA with optional ACKs on data packets • Optional beacons with superframes • Optional guaranteed time slots (GTS), which supports contention-free access Medium Access Control in WSNs

  48. Contention Protocols: ZigBee (cont.) • Low power, low rate (250kbps) radio • MAC layer supports low duty cycle operation • Target node life time > 1 year Medium Access Control in WSNs

  49. Sensor Mac: Case Studies Medium Access Control in WSNs

  50. Latency Fairness Energy Case Study 1: S-MAC • By Ye, Heidemann and Estrin • Tradeoffs • Major components in S-MAC • Periodic listen and sleep • Collision avoidance • Overhearing avoidance • Message passing Medium Access Control in WSNs

More Related