Swayambhoo JainMSEEUniversity of Minnesota, Twin CitiesMedia Access Control (MAC) in Wireless Sensor Networks-II
OutlineTraditional MAC familiesTime Division Multiple Access (TDMA)Carrier Sense Multiple Access (CSMA)Challenges in MAC  design for Wireless Sensor Networks (WSN)Taxonomy of MAC protocols in WSNSchedule based protocolsTSMPProtocols with common active periodsS-MACPreamble sampling protocolsHybrid ProtocolsZ-MACIEEE 802.15.4 (Zigbee)
Traditional MAC: TDMATDMA is a reservation based strategy in which medium is accessed in a time slotted fashion.Critical Requirements:Synchronization Slot Assignment Algorithm (Not easy… Optimal Slot Assignment is NP-Hard problem)Choice of frame size and slot size affects the performance  What should be kept in mind before selecting slot size and frame size ?Slot123546Frame
Traditional MAC : CSMACSMA is a contention based strategySimple probabilistic MAC protocol in which  shared medium is sensed before transmittingThe rule is  “If medium is idle transmit otherwise defer the transmission”.Flavors of CSMA : Non-persistant CSMAp-persistant CSMA	CSMA/CA used in wireless networks avoids collision by random backoffs.StartStartNo  NoMedium    idle? Medium    idle? Wait for random back off timeWait  until medium is freeYesYesProbability 1TransmitTransmitProbability pEndEndNon Persistant CSMACSMA
Reservation based v/s Contention basedCSMA :Requires no infrastructureNo synchronization and robust to changes in network topologyHigh amount of idle listening and overhearing overheadProne to collisionsThroughput decreases as traffic increasesTDMA :Suited for Base Station/Remote-Station architecturesRequires synchronization and not robust to topology changesNo collisionsHas potential for saving energy Low throughput even under low trafficOne-hop collisions or two-hop collisions ?What are the conditions for no collisions ?
Reservation based v/s Contention basedReservation Based1.00.90.80.70.60.50.40.30.20.1  00.01-persistent CSMANonpersistent CSMA0.1-persistent CSMAThroughput0.5-persistent CSMA1-persistent CSMASlotted AlohaAloha0          1           2           3           4          5            6           7          8           9Offered Load
Challenges in design of MAC for WSNsHigh energy efficiency for network longevity ScalabilitySmall footprintRobustness towards :Time varying channel conditions and Dynamic network topologyLoss in synchronizationLow latencyFairness(How can topology change in WSNs?)(Is Fairness really an issue ? )
Questions / DiscussionFor Wireless Sensor Networks which one is better CSMA or TDMA ?BadGoodGood at low trafficGood at high trafficBadGoodBadGoodGoodBadDepends on trafficDepends on trafficBadGoodGoodBad
Sources Energy Wastage in WSNsCan be solved by Contention Energy Efficiency is the prime requirement for MAC design in WSNMAC layer is most suitable level to address the issue of energy efficiencyFirst we need to identify the possible sources of energy wastage in WSNs.There are many-many types of MACs primarily designed to tackle one or more sources of energy wastageCan be solved by Reservation
Taxonomy of MAC protocols in WSNScheduling based protocolsProtocols with common active periodPreamble sensing MACsHybrid MACs
Scheduled Based MACsScheduling based protocolsMedium is shared based on a schedule (requires synchronization)Variants of TDMA combined with FDMA Suited for periodic and high loadTSMP (Time Synchronized Mesh Protocol ) is an interesting example of this familyTypes of Scheduling done Scheduling of communication linkScheduling of senders Scheduling of receiversHelps in avoiding collisions , idle listening and over hearing
TSMP (Scheduling based) It is a TDMA based protocol which uses FDMA and frequency hopping. This allows a node to participate in multiple frames at the same time thereby allowing multiple synchronization rates for different tasks.Sink generates the scheduling table based on, the list of the nodes, their neighbors and their requirements.Precise sense of time is maintained and only offset information is exchanged together with usual data and ACK packetsch 1ch 2ch.1ch 3ch 4ch.2ch.3ch 5t1t2t3
Ch. 15Ch. 14Ch. 13ECh. 12FACh. 11To Avoid interferenceBCh. 10Ch. 9Sink(G)HPros:Very less collisionsNo overhearingMinimized idle listeningCons:ComplexScalabilityReduced flexibilityMemory footprintCh. 8CCh. 7DCh. 6Ch. 5Ch. 4Ch. 3Ch. 2Ch. 1Ch. 0t1t2t3t5t7t10t4t6t8t9
Scheduled Based MACs – Various Approaches
MACs with Common Active PeriodsProtocols with common active periodsEnergy is saved by common active/sleep periods across a set of nodes Suited for periodic trafficSMAC (Sensor MAC) typical example of this familyRadio  onRadio  onRadio  onRadio offRadio off
SMAC (Common Active Period Protocol)Set of nodes periodically become active/sleep in a synchronized fashion. This set of nodes is called Virtual Cluster Active periods are divided into two periods, one for exchanging SYNC packets and other for exchanging DATA packets  Active periods are fixed to a pre-recalculated size optimized for expected traffic. Collisions are avoided by RTS/CTS mechanism Radio  onRadio  onRadio  onRadio offRadio offReduces idle listeningFor SyncFor DataReduces Over hearingRTS/CTS/DATA/ACKSYNC
SMACSchedule 1Schedule 2At the start, a node listens to the channel for at least one active period and sleep period and; if it does not receive SYNC packet it chooses its own schedule and broadcasts it to its neighbors.There can be different SYNC packets in the network and hence the network is, more often, made up of many virtual clusters.The border nodes have to adapt to the schedule of both the neighboring clusters.
SMACThe long data packets are broken into small packets and transmitted in a burst (RTS/CTS used only in transmitting first fragment) Pros:Saves energy by avoiding Idle listening, Overhearing.Well-designed, complete protocol that addresses deficiencies of 802.11 if applied to a sensor network.Cons:Suited only for the periodic traffic patterns; irregular traffic patterns may lead to collisions.Rigidity due to pre-fixed active periodsSleep Delay
Common Active Periods – Various Approaches
Preamble Sampling MACsPreamble Sampling ProtocolsEach node chooses to be active/to sleep independent of othersNodes sleep most of the time and wake up periodically to check if there is a transmissionBMAC is a typical example of this family  (Already Covered in detail)SenderDataPreambleCheck IntervalReceiverRadio OffRadio OnPeriodic Channel Sampling
Preamble Sampling – Various Approaches
Hybrid MACsHybrid ProtocolsDue diverse set of applications the WSNs target Hybrid protocols are needed one particular approach is not perfect.\As WSNs inherently have variable traffic patterns schemes suitable for one traffic type are not sufficientCan’t be classified in any of the above categories as they use the combination of above techniques.ZMAC and IEEE 802.15.4 (Zigbee) are typical examples# of ContendersCSMATDMAChannel Utilization
Z-MAC (Zebra-MAC) – A hybrid MAC schemeZ-MAC is a hybrid MAC scheme :Uses CSMA for high throughput at low contention and hints from TDMA schedule for better performance at high contentionImplemented on the top of B-MAC i.e. uses CCA, LPL etc.CSMA is a baseline scheme :Robust to Synchronization errors  and dynamic topology changesAt worst it always falls back to CSMA performanceThe design is best understood by the setup phase Z-MAC.Neighbor discoveryTime slot assignmentLocal frame exchangeGlobal time synchronizationThe idea is that the high initial setup cost is eventually paid back by improved network performance
Z-MAC – Neighbor DiscoveryThe sensor nodeinitially broadcasts periodic pings to its 1-hop neighborsPing message contains list of node’s 1-hop neighborsList builds up as time passesEventually every sensor has the list of their 1-hop as well as 2-hop neighborsCurrent implementation takes 30 seconds The list is used as an input to slot assignment algorithm
Z-MAC – The Slot Assignment (DRAND)DRAND :Distributed implementation of RANDWell suited for WSNs, does not require any extra infrastructure Two hop list from neighbor discovery is used to come up with a slot assignment such that no two nodes in 2-hop neighborhood have the same slot.Slot number assigned does not exceed the number of nodes in a neighborhoodScalable.Slot assignment is highly efficient.
Z-MAC – The Slot Assignment (DRAND)EACDBFEEAADCDCFBFBRadio Interference Map(𝐸𝑛𝑒𝑟𝑔𝑦 𝐶𝑜𝑠𝑡 ) α  (𝑁𝑒𝑖𝑔h𝑏𝑜𝑢𝑟h𝑜𝑜𝑑 𝑆𝑖𝑧𝑒) DRAND slot assignment10320Time slot1Input Graph1234567How to decide this ?Time Frame
Z-MAC – Local Frame ExchangeTime frame Rule:  “ 𝐼𝑓 𝑓𝑜𝑟 𝑎 𝑛𝑜𝑑𝑒 𝑖, 𝑀𝑎𝑥𝑖𝑚𝑢𝑚 𝑆𝑙𝑜𝑡 𝑁𝑢𝑚𝑏𝑒𝑟 𝑖𝑛  𝑡𝑤𝑜 h𝑜𝑝  𝑛𝑒𝑖𝑔h𝑏𝑜𝑟 𝑖𝑠 𝐹𝑖,     𝑇𝑖𝑚𝑒 𝑓𝑟𝑎𝑚𝑒 𝑖𝑠 2𝑎 𝑤h𝑒𝑟𝑒 ′𝑎′ 𝑠𝑎𝑡𝑖𝑠𝑓𝑖𝑒𝑠  2𝑎−1 ≤ 𝐹𝑖< 2𝑎 ”Time frame decided on the basis of local information. (Advantages / Disadvantages ?)May lead to slot wastage on a global scaleAllows for robustness towards local topology changes Only local synchronization is needed 1(5)EC3(5)AF2(5)0(2)BD1(2)5(5)G4(5)5(5)H
Z-MAC - Transmission ControlAfter slot and frame assignment each node sends these details to its two-hop neighbors.Two modes of operation :HCL (High Contention Load)LCL (Low Contention Load)Node is normally in LCL until it receives explicit contention notification message from two-hop neighbors within last  𝑡𝐸𝐶𝑁 period.Rules:Common rule : “Owner of the slot has highest priority”LCL Tx. rule :   “Any node can compete for a transmission in a particular slot”HCL Tx. Rule : “Only owners and their 1-hop neighbors can compete for a slot”How these rules are imposed  ?    …. Answer is in next slide 
Z-MAC - Transmission ControlBusyOwner Accessing ChannelBusyOwner Accessing ChannelRandom Backoff (Backoffs within fixed 𝑇𝑜) BusyNon-owner Accessing Channel𝑇𝑜 BusyNon-owner Accessing Channel𝑇𝑜 Random Backoff (Backoffs within 𝑇𝑜𝑎𝑛𝑑 𝑇𝑛𝑜) OwnerNon Owner𝒔𝒚𝒏𝒄 𝒆𝒓𝒓𝒐𝒓≤𝑻𝒐⇒𝒂𝒕 𝒎𝒐𝒔𝒕 𝟐 𝒕𝒐 𝟑 𝒐𝒘𝒏𝒆𝒓𝒔 𝒇𝒐𝒓 𝒂 𝒔𝒍𝒐𝒕 Trade off between slot size and network delay 𝑻𝒊𝒎𝒆 𝑺𝒍𝒐𝒕>𝒄𝒉𝒆𝒄𝒌 𝒑𝒆𝒓𝒊𝒐𝒅+ 𝑻𝒐+ 𝑻𝒏𝒐+𝑪𝑪𝑨 𝒑𝒆𝒓𝒊𝒐𝒅+𝒑𝒓𝒐𝒑𝒂𝒈𝒂𝒕𝒊𝒐𝒏 𝒅𝒆𝒍𝒂𝒚 
ZMAC – Transmission ControlExplicit Contention Notification (ECN) messages notify the two hop neighbors not to act as hidden terminal under high loadNodes make local decision of high contention :By keeping track of ACKs from a particular destination and see packet loss rateSince two hop collision are highly correlated to packet loss rateBy checking the noise level of the channel by measuring the average number of noise backoffs before transmitting a packetBased on the fact that there is high correlation between the noise backoffs and trafficFlooding ECN is avoided by selective forwarding of ECNs :Wait for a random period before transmitting ECN messages.
Z-MAC - SynchronizationZ-MAC performs like CSMA with or without synchronization at low traffic.At high traffic , Z-MAC behaves as TDMA , synchronization is necessary for improved performance.Synchronization is achieved by sending sync. control message limited to certain fraction of the data sending rate.  ( How does this help? )Sync. control messages from unsynchronized node should be given less priority.𝐶𝑎𝑣𝑔=1−𝛽𝑡𝐶𝑎𝑣𝑔+ β𝑡𝐶𝑎𝑣𝑔 , 𝑤h𝑒𝑟𝑒 β𝑡 𝑖𝑠 𝑡𝑟𝑢𝑠𝑡 𝑓𝑎𝑐𝑡𝑜𝑟Question: In Z-MAC do we need local synchronization or global synchronization ? 
Z-MAC – Performance EvaluationPerformance was measured for single-hop, two-hop, multiple hop configurations.It was compared mainly against BMAC (Default MAC in TinyOS) on the following metrics :ThroughputEnergy EfficiencyPlatform:ns2Mica28-bit CPU at 4MHz8KB flash, 256KB RAM916MHz radioTinyOS event-driven
Z-MAC – Performance EvaluationSingle hop configurationNodes are kept equidistant from the receiver in a circleEach node transmits with full transmission powerTwo-hop configuration:Nodes are organized into two clusters of 7-8 node (Dumb-Bell shaped topology)Aim was to measure performance in presence of a Hidden TerminalTransmission Power was 1 dBm (1.3 mW) to control number of  hidden terminalsMultihop Configuration:42 Mica2 nodes placed in different rooms of a buildingRouting paths were fixed after one run of Mint (default routing protocol of TinyOS)
Z-MAC – Experiment result multi-hop
Z-MAC- Experiment result multi-hop
Z-MAC – Limitations What are the limitations of Z-MAC ?
Hybrid Protocols : Various Approaches
Zigbee / IEEE 802.15.4 - IntroductionA group of companies (Zigbee Alliance) started working on a technology for a low data rate, low power consumption, low cost, wireless networking protocol targeted towards control and sensor networks.Around same time IEEE 802.15.4 (LR-WPAN MAC Protocol) committee started working on a low data rate standard.IEEE 802.15.4 and Zigbee Alliance joined hands to work on this technology and Zigbee is a commercial name of this technology.
Zigbee Application InterfaceNetwork LayerMAC Layer (IEEE 802.15.4)MAC LayerPHY LayerApplicationCustomer802.2  LLCZigbeeAllianceSSCSIEEESiliconZigbee StackApplication
IEEE 802.15.4 based LR-WPAN Device Classification:Fully functional device (FFD) :Can talk to FFD as well as RFDCan function as PAN coordinator or as a deviceCan be used in any topology Reduced functional device (RFD):Can only talk to FFD Does extremely simple tasks.Limited to Star topologyNetwork is made up many PANs each managed by a PAN Coordinator.  PANs are identified by unique PAN ID.Network Topologies :StarPeer to peerMeshCluster TreeSTARMeshCluster Tree   FFD   PAN CoordinatorRFD
IEEE 802.15.4 based LR-WPANTwo types of Communication modes :Beacon EnabledBeacon is transmitted by FFD periodically after each BI (Beacon Interval)Super frame structure is followedSuited for higher data rate kind of applicationsNon Beacon EnabledSimply reduces to CSMA/CA MACSuited for very simple applications like periodic sensingSynchronization is achieved by :Beacon tracking mode Node simply synchronizes to first beacon and uses the information to switch on just before the next beaconNon-Tracking modeSync done only  when the data needs to be transmitted
IEEE 802.15.4 based LR-WPANIEEE 802.15.4 MAC provides following services:MAC Data Service – responsible for transmission and reception of MPDU (MAC protocol data units) across the PHY data serviceMAC Management Services – interfacing to MLME-SAP (MAC Layer Management Entity – Service Access Points)  Features :Beacon  and GTS ManagementChannel AccessFrame Validation and acknowledge frame deliveryAssociation & DissociationIEEE 802.15.4 PHY provides following services :PHY data service – responsible for transmission and reception of PPDU (PHY protocol data units) across the channel PHY management service – interfacing to PLME-SAP (PHY Layer Management Entity – Service Access Point)Features :ED (Energy Detection)LQI (Link quality Indication)CCA (Clear Channel Assessment)
IEEE 802.15.4 MAC – Super FrameSuperframe consists of :Active period, whose length is defined by SD (Superframe Duration), is divided in 16 equal slots :Slot zero is reserved for BeaconCAP (Contention Access Period)  starts in the next slot after beacon is transmitted and nodes compete using slotted CSMA/CACFP (Contention Free period) starts in the slot after CAP. GTS (Guaranteed time slots ) are used for data transfer.Inactive period Node sleeps in inactive period
IEEE 802.15.4 MAC Layer – The Super Frame ( Transmitted by PAN Coordinator, is of variable length for GTS allocation )≥𝑎𝑀𝑖𝑛𝐶𝐴𝑃𝑙𝑒𝑛𝑔𝑡h Nodes Sleep hereSlotted CSMA if Beacon enabledAt MAX 7  GTS of one or more slots. GTS can uplink or downlink𝟎≤𝑺𝑶 ≤𝑩𝑶 ≤𝟏𝟒 Questions:  1) Duty Cycle ?  &  2) How should the radio be in sync in non tracking mode ?
IEEE 802.15.4 MAC Layer – Data ServicesDirect Data TransferMessage Sequence Diagram
IEEE 802.15.4 MAC Layer – Data ServicesIndirect Data TransferMessage Sequence Diagram
IEEE 802.15.4 MAC Layer – MLME
IEEE 802.15.4 - AssociationMessage Sequence Diagram
IEEE 802.15.4 - Dissociation
IEEE 802.15.4 - Orphaning
Slotted CSMA/CA in IEEE 802.15.4SlottedCSMADelay for random(2𝐵𝐸 −1) unit backoff  periods NB= 0 , CW= 0 Battery Life Extension ?BE = min(2, 𝑚𝑎𝑐𝑀𝑖𝑛𝐵𝐸) Perform CCA on backoff period boundaryYBE = 𝑚𝑎𝑐𝑀𝑖𝑛𝐵𝐸 Channel Idle ?YNNLocate backoff period boundary𝐶𝑊=2, 𝑁𝐵=𝑁𝑆+1, 𝐵𝐸=min⁡(𝐵𝐸+1, 𝑎𝑀𝑎𝑥𝐵𝐸) 𝐶𝑊=𝐶𝑊−1 NNB > macMacCSMABackoffs ?𝐶𝑊=0 ? NYYFailureSuccessUsed in Beacon Enabled mode
Unslotted CSMA/CA in IEEE 802.15.4UnslottedCSMANB= 0 , BE =macMinBE YDelay for random(2𝐵𝐸 −1) unit backoff  periods NB > macMacCSMABackoffs ?NPerform CCAFailureChannel Idle ?YSuccessNUsed Beacon Disabled Mode𝑁𝐵=𝑁𝑆+1, 𝐵𝐸=min⁡(𝐵𝐸+1, 𝑎𝑀𝑎𝑥𝐵𝐸) 
WSN MAC protocols summary
References[1]  InjongRhee, AjitWarrier, Mahesh Aia and Jeongki Min, “ZMAC:aHybrid MAC for Wireless Sensor Networks”, IEEE/ACM Transactions on Networking (TON) Vol. 16 ,  Issue 3  (June 2008) [2]  Wei Ye, John Heidemann and Deborah Estrin, “An Energy-Efficient MAC Protocol for Wireless Sensor Networks”, INFOCOM 2002. Twenty-First Annual Joint Conference of the IEEE Computer and Communications Societies. Proceedings. IEEE[3] Sunil Kumar , Vineet S. Raghavan and Jing Deng,“Medium Access Control protocols for ad hoc wireless networks: A survey”, Ad Hoc Networks Volume 4, Issue 3, May 2006, [4]  Abdelmalik Bachir,   Mischa Dohler, Tomas  Watteyne, and  Kin K. Leung, “MAC Essentials for Wireless Sensor Networks”, IEEE Communication Surveys & Tutorials, Vol. 12, No.2, Second-Quarter 2010[5]  IlkerDemirkol, CemErsoy, and FatihAlagöz, “MAC Protocols for Wireless Sensor Networks: A Survey”, IEEE Communication Magazine, April 2006, Vol. 44 Issue 4[6] Anurag Kumar, D. Manjunath and Joy Kuri, “Wireless Networking” , 2008 Edition[7] SinemColeriErgen, “ZigBee/IEEE 802.15.4 Summary”

Swayambhoo Presentation (2)

  • 1.
    Swayambhoo JainMSEEUniversity ofMinnesota, Twin CitiesMedia Access Control (MAC) in Wireless Sensor Networks-II
  • 2.
    OutlineTraditional MAC familiesTimeDivision Multiple Access (TDMA)Carrier Sense Multiple Access (CSMA)Challenges in MAC design for Wireless Sensor Networks (WSN)Taxonomy of MAC protocols in WSNSchedule based protocolsTSMPProtocols with common active periodsS-MACPreamble sampling protocolsHybrid ProtocolsZ-MACIEEE 802.15.4 (Zigbee)
  • 3.
    Traditional MAC: TDMATDMAis a reservation based strategy in which medium is accessed in a time slotted fashion.Critical Requirements:Synchronization Slot Assignment Algorithm (Not easy… Optimal Slot Assignment is NP-Hard problem)Choice of frame size and slot size affects the performance What should be kept in mind before selecting slot size and frame size ?Slot123546Frame
  • 4.
    Traditional MAC :CSMACSMA is a contention based strategySimple probabilistic MAC protocol in which shared medium is sensed before transmittingThe rule is “If medium is idle transmit otherwise defer the transmission”.Flavors of CSMA : Non-persistant CSMAp-persistant CSMA CSMA/CA used in wireless networks avoids collision by random backoffs.StartStartNo NoMedium idle? Medium idle? Wait for random back off timeWait until medium is freeYesYesProbability 1TransmitTransmitProbability pEndEndNon Persistant CSMACSMA
  • 5.
    Reservation based v/sContention basedCSMA :Requires no infrastructureNo synchronization and robust to changes in network topologyHigh amount of idle listening and overhearing overheadProne to collisionsThroughput decreases as traffic increasesTDMA :Suited for Base Station/Remote-Station architecturesRequires synchronization and not robust to topology changesNo collisionsHas potential for saving energy Low throughput even under low trafficOne-hop collisions or two-hop collisions ?What are the conditions for no collisions ?
  • 6.
    Reservation based v/sContention basedReservation Based1.00.90.80.70.60.50.40.30.20.1 00.01-persistent CSMANonpersistent CSMA0.1-persistent CSMAThroughput0.5-persistent CSMA1-persistent CSMASlotted AlohaAloha0 1 2 3 4 5 6 7 8 9Offered Load
  • 7.
    Challenges in designof MAC for WSNsHigh energy efficiency for network longevity ScalabilitySmall footprintRobustness towards :Time varying channel conditions and Dynamic network topologyLoss in synchronizationLow latencyFairness(How can topology change in WSNs?)(Is Fairness really an issue ? )
  • 8.
    Questions / DiscussionForWireless Sensor Networks which one is better CSMA or TDMA ?BadGoodGood at low trafficGood at high trafficBadGoodBadGoodGoodBadDepends on trafficDepends on trafficBadGoodGoodBad
  • 9.
    Sources Energy Wastagein WSNsCan be solved by Contention Energy Efficiency is the prime requirement for MAC design in WSNMAC layer is most suitable level to address the issue of energy efficiencyFirst we need to identify the possible sources of energy wastage in WSNs.There are many-many types of MACs primarily designed to tackle one or more sources of energy wastageCan be solved by Reservation
  • 10.
    Taxonomy of MACprotocols in WSNScheduling based protocolsProtocols with common active periodPreamble sensing MACsHybrid MACs
  • 11.
    Scheduled Based MACsSchedulingbased protocolsMedium is shared based on a schedule (requires synchronization)Variants of TDMA combined with FDMA Suited for periodic and high loadTSMP (Time Synchronized Mesh Protocol ) is an interesting example of this familyTypes of Scheduling done Scheduling of communication linkScheduling of senders Scheduling of receiversHelps in avoiding collisions , idle listening and over hearing
  • 12.
    TSMP (Scheduling based)It is a TDMA based protocol which uses FDMA and frequency hopping. This allows a node to participate in multiple frames at the same time thereby allowing multiple synchronization rates for different tasks.Sink generates the scheduling table based on, the list of the nodes, their neighbors and their requirements.Precise sense of time is maintained and only offset information is exchanged together with usual data and ACK packetsch 1ch 2ch.1ch 3ch 4ch.2ch.3ch 5t1t2t3
  • 13.
    Ch. 15Ch. 14Ch.13ECh. 12FACh. 11To Avoid interferenceBCh. 10Ch. 9Sink(G)HPros:Very less collisionsNo overhearingMinimized idle listeningCons:ComplexScalabilityReduced flexibilityMemory footprintCh. 8CCh. 7DCh. 6Ch. 5Ch. 4Ch. 3Ch. 2Ch. 1Ch. 0t1t2t3t5t7t10t4t6t8t9
  • 14.
    Scheduled Based MACs– Various Approaches
  • 15.
    MACs with CommonActive PeriodsProtocols with common active periodsEnergy is saved by common active/sleep periods across a set of nodes Suited for periodic trafficSMAC (Sensor MAC) typical example of this familyRadio onRadio onRadio onRadio offRadio off
  • 16.
    SMAC (Common ActivePeriod Protocol)Set of nodes periodically become active/sleep in a synchronized fashion. This set of nodes is called Virtual Cluster Active periods are divided into two periods, one for exchanging SYNC packets and other for exchanging DATA packets Active periods are fixed to a pre-recalculated size optimized for expected traffic. Collisions are avoided by RTS/CTS mechanism Radio onRadio onRadio onRadio offRadio offReduces idle listeningFor SyncFor DataReduces Over hearingRTS/CTS/DATA/ACKSYNC
  • 17.
    SMACSchedule 1Schedule 2Atthe start, a node listens to the channel for at least one active period and sleep period and; if it does not receive SYNC packet it chooses its own schedule and broadcasts it to its neighbors.There can be different SYNC packets in the network and hence the network is, more often, made up of many virtual clusters.The border nodes have to adapt to the schedule of both the neighboring clusters.
  • 18.
    SMACThe long datapackets are broken into small packets and transmitted in a burst (RTS/CTS used only in transmitting first fragment) Pros:Saves energy by avoiding Idle listening, Overhearing.Well-designed, complete protocol that addresses deficiencies of 802.11 if applied to a sensor network.Cons:Suited only for the periodic traffic patterns; irregular traffic patterns may lead to collisions.Rigidity due to pre-fixed active periodsSleep Delay
  • 19.
    Common Active Periods– Various Approaches
  • 20.
    Preamble Sampling MACsPreambleSampling ProtocolsEach node chooses to be active/to sleep independent of othersNodes sleep most of the time and wake up periodically to check if there is a transmissionBMAC is a typical example of this family (Already Covered in detail)SenderDataPreambleCheck IntervalReceiverRadio OffRadio OnPeriodic Channel Sampling
  • 21.
    Preamble Sampling –Various Approaches
  • 22.
    Hybrid MACsHybrid ProtocolsDuediverse set of applications the WSNs target Hybrid protocols are needed one particular approach is not perfect.\As WSNs inherently have variable traffic patterns schemes suitable for one traffic type are not sufficientCan’t be classified in any of the above categories as they use the combination of above techniques.ZMAC and IEEE 802.15.4 (Zigbee) are typical examples# of ContendersCSMATDMAChannel Utilization
  • 23.
    Z-MAC (Zebra-MAC) –A hybrid MAC schemeZ-MAC is a hybrid MAC scheme :Uses CSMA for high throughput at low contention and hints from TDMA schedule for better performance at high contentionImplemented on the top of B-MAC i.e. uses CCA, LPL etc.CSMA is a baseline scheme :Robust to Synchronization errors and dynamic topology changesAt worst it always falls back to CSMA performanceThe design is best understood by the setup phase Z-MAC.Neighbor discoveryTime slot assignmentLocal frame exchangeGlobal time synchronizationThe idea is that the high initial setup cost is eventually paid back by improved network performance
  • 24.
    Z-MAC – NeighborDiscoveryThe sensor nodeinitially broadcasts periodic pings to its 1-hop neighborsPing message contains list of node’s 1-hop neighborsList builds up as time passesEventually every sensor has the list of their 1-hop as well as 2-hop neighborsCurrent implementation takes 30 seconds The list is used as an input to slot assignment algorithm
  • 25.
    Z-MAC – TheSlot Assignment (DRAND)DRAND :Distributed implementation of RANDWell suited for WSNs, does not require any extra infrastructure Two hop list from neighbor discovery is used to come up with a slot assignment such that no two nodes in 2-hop neighborhood have the same slot.Slot number assigned does not exceed the number of nodes in a neighborhoodScalable.Slot assignment is highly efficient.
  • 26.
    Z-MAC – TheSlot Assignment (DRAND)EACDBFEEAADCDCFBFBRadio Interference Map(𝐸𝑛𝑒𝑟𝑔𝑦 𝐶𝑜𝑠𝑡 ) α  (𝑁𝑒𝑖𝑔h𝑏𝑜𝑢𝑟h𝑜𝑜𝑑 𝑆𝑖𝑧𝑒) DRAND slot assignment10320Time slot1Input Graph1234567How to decide this ?Time Frame
  • 27.
    Z-MAC – LocalFrame ExchangeTime frame Rule: “ 𝐼𝑓 𝑓𝑜𝑟 𝑎 𝑛𝑜𝑑𝑒 𝑖, 𝑀𝑎𝑥𝑖𝑚𝑢𝑚 𝑆𝑙𝑜𝑡 𝑁𝑢𝑚𝑏𝑒𝑟 𝑖𝑛  𝑡𝑤𝑜 h𝑜𝑝  𝑛𝑒𝑖𝑔h𝑏𝑜𝑟 𝑖𝑠 𝐹𝑖,     𝑇𝑖𝑚𝑒 𝑓𝑟𝑎𝑚𝑒 𝑖𝑠 2𝑎 𝑤h𝑒𝑟𝑒 ′𝑎′ 𝑠𝑎𝑡𝑖𝑠𝑓𝑖𝑒𝑠  2𝑎−1 ≤ 𝐹𝑖< 2𝑎 ”Time frame decided on the basis of local information. (Advantages / Disadvantages ?)May lead to slot wastage on a global scaleAllows for robustness towards local topology changes Only local synchronization is needed 1(5)EC3(5)AF2(5)0(2)BD1(2)5(5)G4(5)5(5)H
  • 28.
    Z-MAC - TransmissionControlAfter slot and frame assignment each node sends these details to its two-hop neighbors.Two modes of operation :HCL (High Contention Load)LCL (Low Contention Load)Node is normally in LCL until it receives explicit contention notification message from two-hop neighbors within last 𝑡𝐸𝐶𝑁 period.Rules:Common rule : “Owner of the slot has highest priority”LCL Tx. rule : “Any node can compete for a transmission in a particular slot”HCL Tx. Rule : “Only owners and their 1-hop neighbors can compete for a slot”How these rules are imposed ? …. Answer is in next slide 
  • 29.
    Z-MAC - TransmissionControlBusyOwner Accessing ChannelBusyOwner Accessing ChannelRandom Backoff (Backoffs within fixed 𝑇𝑜) BusyNon-owner Accessing Channel𝑇𝑜 BusyNon-owner Accessing Channel𝑇𝑜 Random Backoff (Backoffs within 𝑇𝑜𝑎𝑛𝑑 𝑇𝑛𝑜) OwnerNon Owner𝒔𝒚𝒏𝒄 𝒆𝒓𝒓𝒐𝒓≤𝑻𝒐⇒𝒂𝒕 𝒎𝒐𝒔𝒕 𝟐 𝒕𝒐 𝟑 𝒐𝒘𝒏𝒆𝒓𝒔 𝒇𝒐𝒓 𝒂 𝒔𝒍𝒐𝒕 Trade off between slot size and network delay 𝑻𝒊𝒎𝒆 𝑺𝒍𝒐𝒕>𝒄𝒉𝒆𝒄𝒌 𝒑𝒆𝒓𝒊𝒐𝒅+ 𝑻𝒐+ 𝑻𝒏𝒐+𝑪𝑪𝑨 𝒑𝒆𝒓𝒊𝒐𝒅+𝒑𝒓𝒐𝒑𝒂𝒈𝒂𝒕𝒊𝒐𝒏 𝒅𝒆𝒍𝒂𝒚 
  • 30.
    ZMAC – TransmissionControlExplicit Contention Notification (ECN) messages notify the two hop neighbors not to act as hidden terminal under high loadNodes make local decision of high contention :By keeping track of ACKs from a particular destination and see packet loss rateSince two hop collision are highly correlated to packet loss rateBy checking the noise level of the channel by measuring the average number of noise backoffs before transmitting a packetBased on the fact that there is high correlation between the noise backoffs and trafficFlooding ECN is avoided by selective forwarding of ECNs :Wait for a random period before transmitting ECN messages.
  • 31.
    Z-MAC - SynchronizationZ-MACperforms like CSMA with or without synchronization at low traffic.At high traffic , Z-MAC behaves as TDMA , synchronization is necessary for improved performance.Synchronization is achieved by sending sync. control message limited to certain fraction of the data sending rate. ( How does this help? )Sync. control messages from unsynchronized node should be given less priority.𝐶𝑎𝑣𝑔=1−𝛽𝑡𝐶𝑎𝑣𝑔+ β𝑡𝐶𝑎𝑣𝑔 , 𝑤h𝑒𝑟𝑒 β𝑡 𝑖𝑠 𝑡𝑟𝑢𝑠𝑡 𝑓𝑎𝑐𝑡𝑜𝑟Question: In Z-MAC do we need local synchronization or global synchronization ? 
  • 32.
    Z-MAC – PerformanceEvaluationPerformance was measured for single-hop, two-hop, multiple hop configurations.It was compared mainly against BMAC (Default MAC in TinyOS) on the following metrics :ThroughputEnergy EfficiencyPlatform:ns2Mica28-bit CPU at 4MHz8KB flash, 256KB RAM916MHz radioTinyOS event-driven
  • 33.
    Z-MAC – PerformanceEvaluationSingle hop configurationNodes are kept equidistant from the receiver in a circleEach node transmits with full transmission powerTwo-hop configuration:Nodes are organized into two clusters of 7-8 node (Dumb-Bell shaped topology)Aim was to measure performance in presence of a Hidden TerminalTransmission Power was 1 dBm (1.3 mW) to control number of hidden terminalsMultihop Configuration:42 Mica2 nodes placed in different rooms of a buildingRouting paths were fixed after one run of Mint (default routing protocol of TinyOS)
  • 34.
    Z-MAC – Experimentresult multi-hop
  • 35.
  • 36.
    Z-MAC – LimitationsWhat are the limitations of Z-MAC ?
  • 37.
    Hybrid Protocols :Various Approaches
  • 38.
    Zigbee / IEEE802.15.4 - IntroductionA group of companies (Zigbee Alliance) started working on a technology for a low data rate, low power consumption, low cost, wireless networking protocol targeted towards control and sensor networks.Around same time IEEE 802.15.4 (LR-WPAN MAC Protocol) committee started working on a low data rate standard.IEEE 802.15.4 and Zigbee Alliance joined hands to work on this technology and Zigbee is a commercial name of this technology.
  • 39.
    Zigbee Application InterfaceNetworkLayerMAC Layer (IEEE 802.15.4)MAC LayerPHY LayerApplicationCustomer802.2 LLCZigbeeAllianceSSCSIEEESiliconZigbee StackApplication
  • 40.
    IEEE 802.15.4 basedLR-WPAN Device Classification:Fully functional device (FFD) :Can talk to FFD as well as RFDCan function as PAN coordinator or as a deviceCan be used in any topology Reduced functional device (RFD):Can only talk to FFD Does extremely simple tasks.Limited to Star topologyNetwork is made up many PANs each managed by a PAN Coordinator. PANs are identified by unique PAN ID.Network Topologies :StarPeer to peerMeshCluster TreeSTARMeshCluster Tree FFD PAN CoordinatorRFD
  • 41.
    IEEE 802.15.4 basedLR-WPANTwo types of Communication modes :Beacon EnabledBeacon is transmitted by FFD periodically after each BI (Beacon Interval)Super frame structure is followedSuited for higher data rate kind of applicationsNon Beacon EnabledSimply reduces to CSMA/CA MACSuited for very simple applications like periodic sensingSynchronization is achieved by :Beacon tracking mode Node simply synchronizes to first beacon and uses the information to switch on just before the next beaconNon-Tracking modeSync done only when the data needs to be transmitted
  • 42.
    IEEE 802.15.4 basedLR-WPANIEEE 802.15.4 MAC provides following services:MAC Data Service – responsible for transmission and reception of MPDU (MAC protocol data units) across the PHY data serviceMAC Management Services – interfacing to MLME-SAP (MAC Layer Management Entity – Service Access Points) Features :Beacon and GTS ManagementChannel AccessFrame Validation and acknowledge frame deliveryAssociation & DissociationIEEE 802.15.4 PHY provides following services :PHY data service – responsible for transmission and reception of PPDU (PHY protocol data units) across the channel PHY management service – interfacing to PLME-SAP (PHY Layer Management Entity – Service Access Point)Features :ED (Energy Detection)LQI (Link quality Indication)CCA (Clear Channel Assessment)
  • 43.
    IEEE 802.15.4 MAC– Super FrameSuperframe consists of :Active period, whose length is defined by SD (Superframe Duration), is divided in 16 equal slots :Slot zero is reserved for BeaconCAP (Contention Access Period) starts in the next slot after beacon is transmitted and nodes compete using slotted CSMA/CACFP (Contention Free period) starts in the slot after CAP. GTS (Guaranteed time slots ) are used for data transfer.Inactive period Node sleeps in inactive period
  • 44.
    IEEE 802.15.4 MACLayer – The Super Frame ( Transmitted by PAN Coordinator, is of variable length for GTS allocation )≥𝑎𝑀𝑖𝑛𝐶𝐴𝑃𝑙𝑒𝑛𝑔𝑡h Nodes Sleep hereSlotted CSMA if Beacon enabledAt MAX 7 GTS of one or more slots. GTS can uplink or downlink𝟎≤𝑺𝑶 ≤𝑩𝑶 ≤𝟏𝟒 Questions: 1) Duty Cycle ? & 2) How should the radio be in sync in non tracking mode ?
  • 45.
    IEEE 802.15.4 MACLayer – Data ServicesDirect Data TransferMessage Sequence Diagram
  • 46.
    IEEE 802.15.4 MACLayer – Data ServicesIndirect Data TransferMessage Sequence Diagram
  • 47.
    IEEE 802.15.4 MACLayer – MLME
  • 48.
    IEEE 802.15.4 -AssociationMessage Sequence Diagram
  • 49.
    IEEE 802.15.4 -Dissociation
  • 50.
  • 51.
    Slotted CSMA/CA inIEEE 802.15.4SlottedCSMADelay for random(2𝐵𝐸 −1) unit backoff periods NB= 0 , CW= 0 Battery Life Extension ?BE = min(2, 𝑚𝑎𝑐𝑀𝑖𝑛𝐵𝐸) Perform CCA on backoff period boundaryYBE = 𝑚𝑎𝑐𝑀𝑖𝑛𝐵𝐸 Channel Idle ?YNNLocate backoff period boundary𝐶𝑊=2, 𝑁𝐵=𝑁𝑆+1, 𝐵𝐸=min⁡(𝐵𝐸+1, 𝑎𝑀𝑎𝑥𝐵𝐸) 𝐶𝑊=𝐶𝑊−1 NNB > macMacCSMABackoffs ?𝐶𝑊=0 ? NYYFailureSuccessUsed in Beacon Enabled mode
  • 52.
    Unslotted CSMA/CA inIEEE 802.15.4UnslottedCSMANB= 0 , BE =macMinBE YDelay for random(2𝐵𝐸 −1) unit backoff periods NB > macMacCSMABackoffs ?NPerform CCAFailureChannel Idle ?YSuccessNUsed Beacon Disabled Mode𝑁𝐵=𝑁𝑆+1, 𝐵𝐸=min⁡(𝐵𝐸+1, 𝑎𝑀𝑎𝑥𝐵𝐸) 
  • 53.
  • 54.
    References[1] InjongRhee,AjitWarrier, Mahesh Aia and Jeongki Min, “ZMAC:aHybrid MAC for Wireless Sensor Networks”, IEEE/ACM Transactions on Networking (TON) Vol. 16 , Issue 3 (June 2008) [2] Wei Ye, John Heidemann and Deborah Estrin, “An Energy-Efficient MAC Protocol for Wireless Sensor Networks”, INFOCOM 2002. Twenty-First Annual Joint Conference of the IEEE Computer and Communications Societies. Proceedings. IEEE[3] Sunil Kumar , Vineet S. Raghavan and Jing Deng,“Medium Access Control protocols for ad hoc wireless networks: A survey”, Ad Hoc Networks Volume 4, Issue 3, May 2006, [4] Abdelmalik Bachir,   Mischa Dohler, Tomas  Watteyne, and  Kin K. Leung, “MAC Essentials for Wireless Sensor Networks”, IEEE Communication Surveys & Tutorials, Vol. 12, No.2, Second-Quarter 2010[5] IlkerDemirkol, CemErsoy, and FatihAlagöz, “MAC Protocols for Wireless Sensor Networks: A Survey”, IEEE Communication Magazine, April 2006, Vol. 44 Issue 4[6] Anurag Kumar, D. Manjunath and Joy Kuri, “Wireless Networking” , 2008 Edition[7] SinemColeriErgen, “ZigBee/IEEE 802.15.4 Summary”

Editor's Notes

  • #3 Tell something about MAC… why it is needed …. how important it is .. etc.
  • #4 Give Analogy for different students taking different classes in different days … then doing CSMA for asking doubts.Synchronization : Is the heart of TDMA …. problem is how to achieve this .. generally infrastructure is required for thisSlot Assignment: Optimal Slot Assignment is NP-Hard Problem…. Slot Size should be such that it allows for transmission of few data packets… It generally takes into account the delay, communication strategy (should be large enough to accommodate various packets exchanged in transmission. Frame Size: depends on the number nodes in a communication area.
  • #5 In the ambit of non-persistant CSMA .. a protocol may employ various other techniques to avoid collisions like RTS/CTS exchange. Transmit step differs in CSMA/CA
  • #6 One-hop collisions resolved by Carrier Sensing Two-hop collisions (Hidden node / Exposed Terminal node) resolved by control messaging …. But control messaging leads to energy consumptions.Efficient slot assignment is a NP-hard problem. Wireless feature allows slot reuse across independent clusters of nodes. One fixed schedule might not work in because channel conditions change.No collisions only if perfect synchronization (this requires frequent messaging)INTERFERENCE range v/s Communication range you need to find out independent set of nodes
  • #8 *In general fairness is not a issue because network has one single goal.*Fairness over short duration is allowed again it depends on the application.*Over a longer duration of time we need fairness as distributed computation of functions can get held
  • #10 Overhearing : Nodes receive the packets destined for other nodes. (Especially when routes are found … node discard packets ..)Idle listening : Listening to channel to receive the possible traffic.Overemitting : Transmission of message when destination is not ready
  • #12 Scheduling of communication Link : a pair of node are given a slot … no collision , idle listening and overhearing but large over headScheduling of Senders : Senders are given slots… Avoids idle listening , collisions …. less overhead overhearing remains a problem Scheduling of reciever : Recievers are given slots … avoids idle listening , overhearing .. less overhead but collisions remain a big problem.First two suited for periodic and high traffic load and last one for medium traffic load.
  • #24 The high amount of energy is spent on initial network setup. This is based on the assumption that there will not be drastic change in the topology. High energy initially affects the network life time. One advantage is there that amount of spent in the depends only on the local networks size
  • #28 Global Sync. Leads to high energy drain &amp; local sync leads to slot wastage. But what is more pragmatic wrt to WSNs.Some slots are anyways required for control messages so it does not lead to as much a waste as it appears.
  • #30 Note : Slot size affects the performance only under HCL because under LCL it is CSMA. If slot sizes are large then the large network delays.To is chosen by stochastic analysis to maximize throughput under the assumption that sync error is less than the one slot period.
  • #31 The problem is that the decision based noise does not help when the high contention is with the one hop neighbourhood.Two types of ECN : one hop ECN and two hop ECN…. Similar to kind of RTS/CTS …. but uses topology information to avoid two-hop collision. Far better than RTC/CTS because it uses ECN only during HCL.
  • #32 Another question : When do we need global clock synchronization. ? Answer : Needed only once at the beginning. Even with no sync the performance falls back to CSMA/CA
  • #37 Clock drifts lead to frequent running of DRAND 2) Latency and 3) Does not solve hidden node problem
  • #45 Duty Cycle = SD/BDDuration for radio to be on = ½ BI