Top Banner
MAC Protocols MAC Protocols AT THE END OF THIS SECTION, YOU SHOULD HAVE AN UNDERSTANDING OF THE MAC LAYER PROTOCOLS FOR SENSOR NETWORKS LAYER PROTOCOLS FOR SENSOR NETWORKS AND THEIR BASIC CHARACTERISTICS References… 2 H. Karl and A. Willing. Protocols and Architectures for Wireless Sensor Networks. John Wiley & Sons, 2005. H. Karl and A. Willing. Protocols and Architectures for Wireless Sensor Networks. John Wiley & Sons, 2005. (General) C. Schurgers, V. Tsiatsis, S. Ganeriwal, and M. Srivastava. “Optimizing Sensor Networks in the Energy-Latency-Density Design Space”, in IEEE Trans. on Mobile Computing, Vol. 1, No. 1, pp. 70-80, January-March 2002. (STEM) W. Ye, J. Heidemann, and D. Estrin. “An Energy-Efficient MAC Protocol for Wireless Sensor Networks”, in the Proc. of IEEE INFOCOMM, pp. 1567-1576, June 2002.(S-MAC) E. H. Callaway,Jr. Wireless Sensor Networks: Architectures and Protocols, Auerbach Publications, Chapter 4, 2004. (The meditation device protocol) L. C. Zhong, R. Shah, C. Guo, and J. Rabaey. “An Ultra-Low Power and Distributed Access Protocol for Broadband Wi l S N t k ” i th P f IEEE B db d Wi l S it M (Wk di ) Wireless Sensor Networks, in the Proc. of IEEE Broadband Wireless Summit, May 2001. (Wakeup radio) A. Woo and D. E. Culler. “A Transmission Control Scheme for Media Access in Sensor Networks”, in Proc. of the 7 th Annual Int’l Conf. on Mobile Computing and Networking (MobiCom), July 2001. (CSMA) S. Singh and C. S. Raghavendra. “PAMAS-Power Aware Multi-Access Protocol with Signaling for Ad Hoc Networks”, in ACM SIGCOMM Computer Communication Review Vol 28 Issue 3 pp 5-26 July 1998 (PAMAS) ACM SIGCOMM Computer Communication Review, Vol. 28, Issue 3, pp. 5 26, July 1998. (PAMAS) W. R. Heinzelman, A. Chandrakasan, and H. Balakrishnan. “Energy-Efficient Communication Protocol for Wireless Microsensor Networks”, in the Proc. of the 33 rd Hawaii Int’l Conf. on System Sciences, Vol 2, 1o pp , January 2000. (LEACH) K. Sohrabi, J. Gao, V. Ailawadhi, and G. J. Pottie. “Protocols for Self-Organization of a Wireless Sensor Network”, in IEEE Personal Communications, Vol. 7, issue 5, pp. 16-27, October 2000. (SMACS) V. Rajendran, K. Obraczka, and J. J. Garcia-Luna-Aceves. “Energy-Efficient Collusion-Free Medium Access Control for Wireless Sensor Networks”. In the Proc. of the 1 st Int’l Conf. on Embedded Networked Sensor Systems (SenSys), pp. 181-192, November 2003. (TRAMA) / d d i fh i d df i l di LAN/MAN Standards Committee of the IEEE Computer Society. IEEE Standard for … Part 15.4: Wireless Medium Access Control (MAC) and Physical (PHY) … October 2003. (IEEE 802.15.4 MAC) Medium Access Control (MAC)3 T i l f th t k ll th t i i Typical of other networks as well, the transmission medium must be “shared” in WSN. This is known as channel allocationor multiple accessproblem channel allocation or multiple access problem. The objective of a MAC protocol is to regulate access t th h d i l di h th t th to the shared wireless medium such that the performance requirements of the “application” are t met. MAC protocols have been extensively studied in ( i l ) i d d i i (wireless) voice and data communications. MAC protocols: Issues… 4 Nodes need to exchange some information for the right Nodes need to exchange some information for the right to access the communication channel at any given time. This requires the use of the communication channel itself This requires the use of the communication channel itself (recursive use?)! Spatial distribution of the nodes further complicates the problem, as any information gathered by a node is at least as old as the time required for its propagation… T it t i d f t i fl th t bh i Two intertwined factors influence the aggregate behavior of a distributed MAC: the intelligence of the decision (to allow a node to transmit) made by the intelligence of the decision (to allow a node to transmit) made by the protocol the overhead involved
17

MAC Protocols - Department of Computer Sciencecomp7860/08R-Fall/LectureNotes/03MACProtocols-4u… · MAC protocols: Performance metrics… 5 yDelay—the amount of time a data packet

May 26, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: MAC Protocols - Department of Computer Sciencecomp7860/08R-Fall/LectureNotes/03MACProtocols-4u… · MAC protocols: Performance metrics… 5 yDelay—the amount of time a data packet

MAC ProtocolsMAC Protocols

A T T H E E N D O F T H I S S E C T I O N , Y O U S H O U L D H A V E A N U N D E R S T A N D I N G O F T H E M A C

L A Y E R P R O T O C O L S F O R S E N S O R N E T W O R K S L A Y E R P R O T O C O L S F O R S E N S O R N E T W O R K S A N D T H E I R B A S I C C H A R A C T E R I S T I C S

References…2

H. Karl and A. Willing. Protocols and Architectures for Wireless Sensor Networks. John Wiley & Sons, 2005. H. Karl and A. Willing. Protocols and Architectures for Wireless Sensor Networks. John Wiley & Sons, 2005. (General)C. Schurgers, V. Tsiatsis, S. Ganeriwal, and M. Srivastava. “Optimizing Sensor Networks in the Energy-Latency-Density Design Space”, in IEEE Trans. on Mobile Computing, Vol. 1, No. 1, pp. 70-80, January-March 2002. (STEM)W. Ye, J. Heidemann, and D. Estrin. “An Energy-Efficient MAC Protocol for Wireless Sensor Networks”, in the Proc. of IEEE INFOCOMM, pp. 1567-1576, June 2002.(S-MAC)E. H. Callaway,Jr. Wireless Sensor Networks: Architectures and Protocols, Auerbach Publications, Chapter 4, 2004. (The meditation device protocol)L. C. Zhong, R. Shah, C. Guo, and J. Rabaey. “An Ultra-Low Power and Distributed Access Protocol for Broadband Wi l S N t k ” i th P f IEEE B db d Wi l S it M (W k di )Wireless Sensor Networks”, in the Proc. of IEEE Broadband Wireless Summit, May 2001. (Wakeup radio)A. Woo and D. E. Culler. “A Transmission Control Scheme for Media Access in Sensor Networks”, in Proc. of the 7th

Annual Int’l Conf. on Mobile Computing and Networking (MobiCom), July 2001. (CSMA)S. Singh and C. S. Raghavendra. “PAMAS-Power Aware Multi-Access Protocol with Signaling for Ad Hoc Networks”, in ACM SIGCOMM Computer Communication Review Vol 28 Issue 3 pp 5-26 July 1998 (PAMAS)ACM SIGCOMM Computer Communication Review, Vol. 28, Issue 3, pp. 5 26, July 1998. (PAMAS)W. R. Heinzelman, A. Chandrakasan, and H. Balakrishnan. “Energy-Efficient Communication Protocol for Wireless Microsensor Networks”, in the Proc. of the 33rd Hawaii Int’l Conf. on System Sciences, Vol 2, 1o pp , January 2000. (LEACH)K. Sohrabi, J. Gao, V. Ailawadhi, and G. J. Pottie. “Protocols for Self-Organization of a Wireless Sensor Network”, in , , , g ,IEEE Personal Communications, Vol. 7, issue 5, pp. 16-27, October 2000. (SMACS)V. Rajendran, K. Obraczka, and J. J. Garcia-Luna-Aceves. “Energy-Efficient Collusion-Free Medium Access Control for Wireless Sensor Networks”. In the Proc. of the 1st Int’l Conf. on Embedded Networked Sensor Systems (SenSys), pp. 181-192, November 2003. (TRAMA)

/ d d i f h i d d f i l diLAN/MAN Standards Committee of the IEEE Computer Society. IEEE Standard for … Part 15.4: Wireless Medium Access Control (MAC) and Physical (PHY) … October 2003. (IEEE 802.15.4 MAC)

Medium Access Control (MAC)…( )3

T i l f th t k ll th t i i Typical of other networks as well, the transmission medium must be “shared” in WSN. This is known as “channel allocation” or “multiple access” problem channel allocation or multiple access problem. The objective of a MAC protocol is to regulate access t th h d i l di h th t th to the shared wireless medium such that the performance requirements of the “application” are

tmet.MAC protocols have been extensively studied in ( i l ) i d d i i(wireless) voice and data communications.

MAC protocols: Issues…p4

Nodes need to exchange some information for the right Nodes need to exchange some information for the right to access the communication channel at any given time.This requires the use of the communication channel itself This requires the use of the communication channel itself (recursive use?)!Spatial distribution of the nodes further complicates the p pproblem, as any information gathered by a node is at least as old as the time required for its propagation…T i t t i d f t i fl th t b h i Two intertwined factors influence the aggregate behavior of a distributed MAC:

the intelligence of the decision (to allow a node to transmit) made by the intelligence of the decision (to allow a node to transmit) made by the protocol the overhead involved

Page 2: MAC Protocols - Department of Computer Sciencecomp7860/08R-Fall/LectureNotes/03MACProtocols-4u… · MAC protocols: Performance metrics… 5 yDelay—the amount of time a data packet

MAC protocols: Performance metrics…p5

Delay the amount of time a data packet spends in the Delay—the amount of time a data packet spends in the MAC layerThroughput—the rate at which packets are servicedThroughput the rate at which packets are servicedRobustness—combination of reliability, availability, and dependability requirementsp y qScalability—the ability to meet the performance requirements regardless the size of the networkStability—the ability to handle the traffic load over sustained periods of timeF i ll ti f th h l it lFairness—allocation of the channel capacity evenlyEnergy efficiency—paramount issue importance in WSNs

MAC protocols: Classification…p6

MAC t lMAC protocols

Fixed assignment

Demand assignment

Randomassignment

FDMA centralized ALOHA

TDMA

CDMA

distributed CSMA

…CDMA

SDMA

MAC protocols: Classification…2p7

Schedule based regulating participants:Schedule based—regulating participants:Who may use which resource at which time (TDMA) Which frequency band can be used in a given physical space Which frequency band can be used in a given physical space (with a given code, CDMA)Schedule can be fixed or computed on demand

Contention basedRisk of colliding packets is deliberately taken C di i h d b d l i i ll Coordination overhead can be saved, resulting in overall improved efficiencyMechanisms to handle/reduce probability/impact of collisions Mechanisms to handle/reduce probability/impact of collisions required Usually randomization used

MAC protocols: Fixed assignment…p g8

Th il bl ll t d b t th The available resources are allocated between the nodes; no competition…

A d b di h h ( di ) FDMA—used by radio systems to share the (radio) spectrum; requires frequency synchronizationTDMA—a digital technology that uses a single frequency channelCDMA—spread spectrum based scheme that allows multiple nodes to transmit simultaneouslySDMA—spatial separation of the nodes is used to separate their transmissionsp

Page 3: MAC Protocols - Department of Computer Sciencecomp7860/08R-Fall/LectureNotes/03MACProtocols-4u… · MAC protocols: Performance metrics… 5 yDelay—the amount of time a data packet

MAC protocols: Demand assignment…p g9

T i h l tili ti b ll ti th To improve channel utilization by allocating the channel to contending nodes (near-)optimally

d l h i bi Need a control mechanism to arbitrate access Centralized—polling

a master control devices queries each slave node in a predetermined order

i ib d i d kDistributed—reservation and tokenSet a time slot for reservation messagesToken holder can transmit

MAC protocols: Random assignment…p g10

Add th h t i f fi d ( t ti ) Address the short comings of fixed (static) assignment schemesO i i ll d l d f l di li k d lli Originally developed for long radio links and satellite communicationsALOHA—pure, slottedCSMA—CD, CA

Carrier Sensing ContentionNon-persistent CSMA, persistent CSMA, backoffBusy-tone, RTS/CTS

Hidden/exposed terminal problem…/ p p11

Th hidd t i lThe hidden-terminal:Consider the following three nodes: A and B are in mutual range and B and C are in mutual range But A and C cannot range, and B and C are in mutual range. But A and C cannot hear each other, thus their packets may collide.

The exposed-terminal:The exposed terminal:B transmits a packet to A, and C wants to transmit a packet to D, but it cannot, because it hears B’s activity.

A B C D

RTS/CTS handshake…/12

A B C DA B C D

RTS

CTS

Channel

Data

busy Channel busy

AckAck

Page 4: MAC Protocols - Department of Computer Sciencecomp7860/08R-Fall/LectureNotes/03MACProtocols-4u… · MAC protocols: Performance metrics… 5 yDelay—the amount of time a data packet

RTS/CTS failure…/13

A B C DA B C D

RTS

CTSRTS

RTSData

CTS

RTS/CTS failure…2/14

A B C DA B C D

RTS

CTS RTS

Data CTS

D tData

MAC Protocols for WSNs…15

The balance of requirements is different in WSNsThe balance of requirements is different in WSNs.Transmission is costly; receiving often has the same cost as transmission; idling can be cheaper but also as expensive as receiving; sleeping is almost free butreceiving; sleeping is almost free, but…

Energy problems on the MAC layer:Collusion

U l i d i i l i i Useless receive costs at destination, useless transmission costs at sender

OverhearingR i i k t dd d f lReceiving a packet addressed for someone elseSometimes good, though, when collecting information about the WSN

Protocol overheadMAC l d l k MAC related control packets, …

Idle listeningCostly; useless in low network loads

Energy conserving…gy g16

A b f diff t MAC t l d A number of different MAC protocols are proposed for wireless sensor networks based on their ability to conserve energy:conserve energy:

Protocols that explicitly attack the idle listening problemContention based protocols are probabilistic as the nodes risk Contention-based protocols are probabilistic as the nodes risk collusions. Thus, these protocols have collusion avoidance mechanismsSchedule-based protocols, where only one node gets an opportunity based on an allocated slot

Page 5: MAC Protocols - Department of Computer Sciencecomp7860/08R-Fall/LectureNotes/03MACProtocols-4u… · MAC protocols: Performance metrics… 5 yDelay—the amount of time a data packet

Idle listening: Low duty cycle protocols…g y y p17

Try to avoid spending much time in the idle state and Try to avoid spending much time in the idle state and to reduce the communication activities to a minimum.minimum.Periodic wakeup schemes

Cycled receiver; sleep periodically to receive packets (needs Cycled receiver; sleep periodically to receive packets (needs knowledge of the listeners)Observations:

S ll d l i i i l d lSmall duty cycle transmitter is in sleep mode mostlySmall duty cycle traffic to a given node is concentrated in a small time window; significant competition under heavy loadsLong sleep period significant per-hop latencyShort sleep periods high startup costs

Idle listening: STEMg18

Sparse topology and energy management (STEM)Sparse topology and energy management (STEM)Does not cover all aspects of a MAC protocol but provides a solution for idle listening problem and to provide fast a solution for idle listening problem and to provide fast transition into the transfer state, if necessary.Targets networks with wait-and-report behaviorg p“topology” in the name: as nodes enter and leave sleep mode, network topology changes.Key requirement: the network stays connected even if some nodes are sleepingN t k t tNetwork states

Monitor stateTransfer state

Idle listening: STEM…2g19

T h lTwo channelsWakeup—time slots (wakeup periods of length T)D t f d l i MAC t lData—for underlying MAC protocolListen period of length TRX << T and a sleep period

Wakeup period

Listen period

p p

Sleep period WakeupWakeupchannel

Datachannel

Idle listening: STEM-B…g20

The transmitter issues beacons on the wakeup The transmitter issues beacons on the wakeup channel periodically without carrier sensing

Beacon contains MACs for the sender and the receiverBeacon contains MACs for the sender and the receiver

Receiver sends an ACK on the wakeup channel on the receipt of the beacont e ece pt o t e beacoBoth nodes switch transmitters and execute regular MAC protocolpOther nodes receiving the beacon not destined to them, will continue sleepingp gBeacon is sent continuously for at least one full wakeup period

Page 6: MAC Protocols - Department of Computer Sciencecomp7860/08R-Fall/LectureNotes/03MACProtocols-4u… · MAC protocols: Performance metrics… 5 yDelay—the amount of time a data packet

Idle listening: STEM-T…g21

T itt d b t ( dd Transmitter sends a busy tone (no address information) on the control channel for a long time to hit on the receivers listen periodto hit on the receivers listen periodAll neighbor nodes switch on their data channelPacket exchange will start; all not-involved nodes will go back to sleep

Idle listening: STEM: Discussion…g22

In STEM B beacon collusions cause the scheme to fall In STEM-B beacon collusions cause the scheme to fall back to STEM-T; the transmitter transmits the beacons for the maximum time, then switches to the data channel ,and tries the conversation with the receiverA node entering into listen period remains silentLow load situations STEM-T is preferable over STEM-B (why?)W k l t i l t d t k ti TWakeup latency is related to wakeup time TSTEM-B can achieve half the wakeup latency of STEM-T if no collusions occur on the wakeup channel (how?)if no collusions occur on the wakeup channel (how?)STEM-T can have energy consumption advantages

Idle listening: S-MAC…g23

D l d t UCLA MAC (S MAC) t l Developed at UCLA, sensor-MAC (S-MAC) protocol provides mechanisms to circumvent the key energy problemsproblemsAdopts a similar wakeup scheme as STEM, but

i l i l h lrequires only a single channelListen period can be used to receive and transmit

Listen period

Wakeup period

l i d

Listen period

Sleep period

For SYNCH For RTS For CTS

Idle listening: S-MAC: Listen phases…g p24

SYNCH phaseSYNCH phaseNode x accepts SYNCH packets (describing their schedule) from its neighborsgDivided into time slots

RTS phasepx listens for RTS packets from neighboring nodes (RTS/CTS procedure is used to reduce collisions of data packets due to hidden node problemhidden node problem

CTS phaseNode x transmits a CTS packet if an RTS packet is received in Node x transmits a CTS packet if an RTS packet is received in the previous phase. After this, packet exchange continues (into x’s sleep period)

Page 7: MAC Protocols - Department of Computer Sciencecomp7860/08R-Fall/LectureNotes/03MACProtocols-4u… · MAC protocols: Performance metrics… 5 yDelay—the amount of time a data packet

Idle listening: S-MAC: the protocol…g p25

Wh ti f th di th d When competing for the medium, the nodes use RTS/CTS handshake (including the virtual carrier sense mechanism via NAV); NAV can also be used to sense mechanism via NAV); NAV can also be used to avoid overhearingWh b d ti ( SYNCH k t ) th d When broadcasting (e.g., SYNCH packets), the nodes use CSMA with backoff

i hb h h d l ( f i l )Neighbors agree on the same schedule (of time slots) and create virtual clusters

Idle listening: S-MAC: Virtual clusters…g26

Node x listens for at least the globally known Node x listens for at least the globally known synchronization period.

x receives a SYNCH packet from a neighborAd t th d h d lAdopts the announced scheduleBroadcasts is in one of the neighbors’ next listen period

x picks a schedule and broadcasts ith d ’ h d l d h b d k ’x receives another node’s schedule during the broadcast packet’s

contention period; drops its own and follows the otherx receives a new schedule after its own

Some neighbors use his schedule—transmits its SYNCH and data packets according to both schedulesNo neighbor share its schedule—drops own and adopts the otherg p p

x periodically listens for a whole synchronization period to relearn its neighbors

Idle listening: S-MAC: Virtual clusters…2g27

A l ltih t k i titi d i t “i l d A large multihop network is partitioned into “islands of schedule synchronization”

d d h f ll h d l Border nodes have to follow two or more schedules (more energy consumption!)Nodes spend much time in the sleep mode

Pay the price in latency; per-hop latency equals to the sleep i d!period!

Adaptive-listening reduces the latency by half

Idle listening: S-MAC: Synchronized islands…d e ste g: S C: Sy c o ed s a ds…28

A A A A A

B B B B

A

B

TimeC

E E E EE E E

28

TimeC C C C

D D D

C

D

Page 8: MAC Protocols - Department of Computer Sciencecomp7860/08R-Fall/LectureNotes/03MACProtocols-4u… · MAC protocols: Performance metrics… 5 yDelay—the amount of time a data packet

Idle listening: S-MAC: Message passing…g g p g29

A message larger than a packet is meaningful to an A message larger than a packet is meaningful to an applicationIn-network processing requires aggregating node to In network processing requires aggregating node to receive a message completelyBut, on wireless media, it is advisable to break a long gpacket into smaller onesSolution: Fragmentation:

A series of fragments is transmitted with a single RTS/CTS exchange between nodes A (sender) and B (receiver)B Acks each;Duration field (in “all” the packets) indicates the “remaining time” for the whole transaction

Idle listening: S-MAC: Message passing…2g g p g30

Th f t ti h i i il t th d The fragmentation scheme is similar to the one used in 802.11

I 8 CTS d RTS th di f l th ti In 802.11, CTS and RTS reserves the medium for only the time of the first fragment, and any other frames does it for the next fragmentgS-MAC can be unfair at times, but fairness has a lesser weight

T-MAC is a variation of S-Mac, where it adaptively T MAC is a variation of S Mac, where it adaptively shortens the listen period

Idle listening: Mediation device protocol…g p31

C tibl ith th P P i ti d f Compatible with the P2P communication mode of the 802.15.4 WPAN standard

h d i l i di ll d k f Each node go into sleep periodically and wakeup for short periods to receive packets from neighborsNo global time, each node has its own scheduleAt wakeup, a node transmits a short query beacon with its node address; no packets? Go back to sleepDynamic synchronization is used y y

A meditation device

Idle listening: Wakeup radio…g p32

Id ll d i i i i t t h k t i Ideally, a node is in receiving state when a packet is transmitted for it, and a node is in transmitting state when it has a packet to transmit All other times it when it has a packet to transmit. All other times, it should sleep no idle time!O d k MAC t l th One proposed wakeup MAC protocol assumes the presence of several data channels (it basically

t d CSMA i t lti h l CSMA) extends CSMA into multi-channel CSMA) A separate, ultra low power radio is used

Page 9: MAC Protocols - Department of Computer Sciencecomp7860/08R-Fall/LectureNotes/03MACProtocols-4u… · MAC protocols: Performance metrics… 5 yDelay—the amount of time a data packet

Idle listening: Wakeup radio—The algorithm…d e ste g: Wa eup ad o e a go t …33

A d i hi t t it ill d l i k A node wishing to transmit will randomly pick up a channel. If busy, will continue selecting a channel until found one else set a timer for each and backoffuntil found one, else set a timer for each and backoffThe node then transmits a wakeup signal over its

k di h l t th i ki it t wakeup radio channel to the receiver asking it to turn on its main radio

i idl i l h k di i dDuring idle times, only the wakeup radio is turned on

Idle listening: Wakeup radio—The algorithm…2d e ste g: Wa eup ad o e a go t …34

P blProblems:No such radio existsR f b th di h b id ti lRanges of both radios much be identical

Shorter range for wakeup radio—not all potential nodes can be woken uppWider range for wakeup radio—potential hazard in addressing

The wakeup radio has to be able to carry information higher complexity

Contention-based: CSMA protocols…p35

CSMA t l t ti b d h CSMA protocols are contention-based, where neighbors try their luck to transmit their packets

d C ll id l ih k i h Woo and Culler consider a multihop network with a single or a few sinks with the same traffic pattern as STEMSTEM

Contention-based: CSMA—The protocol…p36

IdleC: …A: numtrials = 0

C: busy & numtrials = MaxA: failure

Random Delay

A: numtrials 0

C: non or foreign CTS & numtrials = MaxA: failure

ListenC: idleA: send RTS

C: timeoutA: …

C: no Ack & numtrials = MaxA: failure

Await CTS

BackoffA: send RTS

C: got CTS d dC f i CTS & t i l < M

C: busy & numtrials < MaxA: numtrials++; set timer

Await Ack

A: send dataC: got AckA: success

C: non or foreign CTS & numtrials < MaxA: numtrials++; set timer

IdleC: no Ack & numtrials < MaxA: numtrials++; set timer

Page 10: MAC Protocols - Department of Computer Sciencecomp7860/08R-Fall/LectureNotes/03MACProtocols-4u… · MAC protocols: Performance metrics… 5 yDelay—the amount of time a data packet

Contention-based: CSMA—The protocol…2p37

Energy saving measuresEnergy saving measuresthe node’s transceiver can sleep

during the random delayin the backoff mode

Have been investigated:N d d lNo random delayRandom listening time vs constant listening timeFixed window backoff vs exponentially increasing backoff vsp y gexponentially decreasing backoff vs no backoff

Protocols with random delay, fixed listen time, and a backoff algorithm with sleeping radio transceiver give the backoff algorithm with sleeping radio transceiver give the best throughput and lowest aggregate energy consumptionp

Contention-based: PAMAS…38

Th P A M lti ith Si li The Power Aware Multi-access with Signaling (PAMAS) is originally designed for ad hoc networks,

d t il d h i id h idetailed overhearing avoid mechanismno idle listening solutionCombines busy tone with RTS/CTS handshakingCombines busy tone with RTS/CTS handshakingUses two channels: data and signaling

Contention based: PAMAS—The protocol…p39

No packet or noise No CTS or Busy toneNew RTS;

Receive RTS;Send CTS*

Receive RTS;Send CTS*

IdleAwait packet

1 time unitBEB

Await CTS

No packet or noise Packet to send; sendRTS to destinationif not transmitting

No CTS or Busy toneor unrelated RTS

New RTS;Send CTS*

End of transmission

Receive CTSPacket receivedPacket is arriving;Transmit busy tone

Receive RTS;Send CTS*

Time expired and destinationis not transmitting; Send RTS

Receive packet

Transmit packet

y

*if data channel is idle and

Busy tone > 2*CTS length

No noise over signaling channel

Receive other RTS; Transmit busy Tone. Ignore all CTSs received Ignore RTS/CTS transmissions

Contention-based: PAMAS—To power off or...Co te t o based: S o po e o o ...40

Conditions to power off:Conditions to power off:No packet to transmit and a neighbor is begins transmittingOne neighbor is transmitting and another is receiving

T o q estions to ans erTwo questions to answer:How long to power off?

When a packet transmission begins in the neighborhood, sleep lWh k if th d t h l i b b k t l b t h l ? When wakeup, if the data channel is busy, go back to sleep, but how long? Probe protocol

Send a probe(l) message l is max packet lengthDoes a binary search to determine when the last transmission endsy

What happens if a neighbor wishes to transmit when sleeping?Nothing important…

Good power savingsGood power savingsSparse network, light load 20-30% (high load 10%; longer contention)Dense network, light load 60-70% (high load 30-40%)

Page 11: MAC Protocols - Department of Computer Sciencecomp7860/08R-Fall/LectureNotes/03MACProtocols-4u… · MAC protocols: Performance metrics… 5 yDelay—the amount of time a data packet

Schedule-based: LEACH…41

Th L Ad ti Cl t i Hi h The Low-energy Adaptive Clustering Hierarch (LEACH) assumes dense, homogeneous sensor network with energy constraint nodes and the base network with energy constraint nodes and the base station is far away from the sensors themselvesN d titi d i t l t ith d di t d Nodes are partitioned into clusters, with a dedicated clusterhead node in each cluster (other nodes are

b d )member nodes)

Member node

Clusterhead

Schedule-based: LEACH…242

Randomized (and dynamic) rotation of clusterheadsRandomized (and dynamic) rotation of clusterheadsSelf election with a certain probability

Self elected clusterheads broadcasts their status to othersSelf elected clusterheads broadcasts their status to othersNodes determine their clusterheadsOnce the cluster is formed, the clusterhead creates a Once the cluster is formed, the clusterhead creates a “schedule” for its nodes (nodes turn off their radios during other slots)

L l “d t f i ” (d t ti ) t d Local “data fusion” (data aggregation) to reduce energy dissipation and enhanced system lifetimeCompress data is sent to the base stationCompress data is sent to the base station

High energy operation, but only a few nodes operate

Schedule-based: LEACH…3343

Th b f l t i iti lThe number of clusters is criticalFewer larger energy consumption (distance to the base is far)far)More more transmissions to the sink; larger energy consumptionp5% of the nodes being clusterheads is optimal

7x-8x energy reduction compared to direct 7 gy pcommunication

Schedule-based: LEACH—The algorithm…g44

Broken up into rounds; each round has two phases:Broken up into rounds; each round has two phases:Setup phase

(Clusterhead) advertisement phaseCSMA MAC protocol: cluster heads advertise, nodes select

Schedule creationBased on the number of members the clusterhead creates and Based on the number of members, the clusterhead creates and broadcasts a TDMA schedule

Steady-state phaseNodes transmit during their allocated transmission time (uses Nodes transmit during their allocated transmission time (uses minimal energy, because of the clusterhead selection) Nodes can sleep until their time (and has data to transmit)Cl t h d i d t t th d d t b t tiClusterhead receives data, aggregates them, and send to base stationTo reduce interference clusters use different CDMA codes (and informs the members)

Page 12: MAC Protocols - Department of Computer Sciencecomp7860/08R-Fall/LectureNotes/03MACProtocols-4u… · MAC protocols: Performance metrics… 5 yDelay—the amount of time a data packet

Schedule-based: LEACH—Rounds…45

Fixed-length round

Setup phase Steady-state phase

Time slot

1…Time

slot 2

Time slot

n

Time slot 1

…Self-election ofl h d

Advertisement phase

Cluster setup phase

Broadcast schedule

clusterheads

Clusterheads compete with CSMA

Members compete with CSMAwith CSMA

Schedule-based: SMACS…46

Self organizing Medium Access Control for Sensor Self-organizing Medium Access Control for Sensor Networks (SMACS)It is a protocol in a suite for organization, routing, It is a protocol in a suite for organization, routing, management for MANETs to optimize for QoSIt is an infrastructure-building protocol that forms a flat topology for sensor networksSMACS is a distributed protocol which enables a collection of nodes to discover neighbors and establish collection of nodes to discover neighbors and establish schedules for communicating with them without the need of a “master” nodeNeighbor discovery and channel assignment phases are combined

Schedule-based: SMACS—Assumptions…p47

Th il bl t i bdi id d i t h l The available spectrum is subdivided into many channels (and many CDMA codes are available)Each node can tune to an arbitrary channelEach node can tune to an arbitrary channelMost of the nodes are stationary and remain as such for a long timelong timeEach node divides its time locally into fixed-length superframes of Tframe lengthsupe a es o frame e gtSuperframes are subdivided into timeslots

A

FC

D

A

BC

Schedule-based: SMACS—Self-organization…Sc edu e based: S CS Se o ga at o …48

N S h h d l d i tiNon Synchronous scheduled communicationsTrans. SLOT

Recv SLOT

fx fx… …

TframeRecv. SLOT

Node D

D and A find each other

fx fx… …

Td

Node A

Ta

fy … Node B

Tb

Node Cfy

B and C find each other

Tc

Page 13: MAC Protocols - Department of Computer Sciencecomp7860/08R-Fall/LectureNotes/03MACProtocols-4u… · MAC protocols: Performance metrics… 5 yDelay—the amount of time a data packet

Schedule-based: SMACS—Node discovery…y49

fy …Tb

Node B

B and C find each other

…Tc

Node Cfy

c

Node BNode B

Node C

Initial listening timeType 1Type 2

Type 3Type 4

Node C

Node G (not shown)

Type 3Type 1 Type 2

ode G ( ot s o )

Schedule-based: SMACS—Nodes finding…g50

Nodes wake up at random times, and listen to the channel for a random amount of Nodes wake up at random times, and listen to the channel for a random amount of timeA node (C) will transmit an invitation (TYPE 1) by the end of its initial listen time if not heard the same from othersNodes hearing the invitation (B and G not shown) broadcast a response (TYPE 2) Nodes hearing the invitation (B and G, not shown), broadcast a response (TYPE 2) during the interval following the reception of TYPE 1 at a random timeIf responses don’t collide and heard by C, C must chose only one respondent (first)Node C sends TYPE 3 immediately after the interval following TYPE 1 to notify all y g yrespondents of the chosen oneNode G was not chose, it turns off its transmitter for a while and starts the search againIf C is already attached it’ll transmit its schedule info along with the time its next If C is already attached, it ll transmit its schedule info along with the time its next superframe will start in the body of TYPE 3Node B compares the schedules and time offsets and arrives at a set of two free time intervals as the slots assigned to the link between B and CB d thi i f ti ith th d l l t d f b d t d C i B sends this information with the randomly selected frequency band to node C in the body of TYPE 4After a pair of short test messages, the link is added to the nodes’ schedules permanently

Schedule-based: SMACS—Startup messages…Sc edu e based: S CS Sta tup essages…51

TYPE 1TYPE 1A short invitation containing a node’s ID and number of attached neighbors (send by inviter)

TYPE 2R t TYPE b i i i th i it d i it ’ ID d i it ’ tt h d Response to TYPE 1 by an invitee; gives the inviter and invitee’s IDs and invitee’s attached state

TYPE 3Response to TYPE 2; indicating which invitee is chosen. Depending on the node’s attached p g p gstate contains:

Inviter not attached: noneBoth attached; inviter’s schedule and frame epochInvitee not attached, inviter attached: proposed channel for the link

TYPE 4Response to TYPE 3; contains

None attached: channel determined by the inviteeInvitee not attached, inviter attached: noneInvitee not attached, inviter attached: noneInvitee attached, inviter not attached: channel determined by the inviteeBoth attached: channel determined from own and inviter’s schedule information

Schedule-based: TRAMA…52

The Traffic-Adaptive Medium Access Protocol (TRAMA) The Traffic-Adaptive Medium Access Protocol (TRAMA) reduces energy consumption by providing collision-free transmissions and low-power idle state

i l i l d h l d Assumes single time-slotted channel and uses a distributed election scheme to determine which node can transmit at a particular slotpDivides time into:

Random access: signaling slotsSched led access transmission slotsScheduled access: transmission slots

Consists of:Neighbor protocol (NP)g pSchedule exchange protocol (SEP)Adaptive election algorithm (AEA)

Page 14: MAC Protocols - Department of Computer Sciencecomp7860/08R-Fall/LectureNotes/03MACProtocols-4u… · MAC protocols: Performance metrics… 5 yDelay—the amount of time a data packet

Schedule-based: TRAMA…253

NPNPPropagates one-hop neighbor information among neighboring nodes during random access period (contention based channel g p (acquisition and signaling)

SEPExchange traffic-based information, or schedules (information on traffic originating from a node), with neighbors

AEAAEASelects transmitters and receivers to achieve collision-free transmission using the information from NP and SEPg

Random transmission collisionsTransmitters without receivers energy waste

Schedule-based: TRAMA—Packet contents…54

Type Sourceaddress

Destinationaddress DelNum Deleted

Node IDsAdded

Node IDsAddNum

Signal header

Type Sourceaddress

Destinationaddress Timeout NumSlots Bitmap

Data header

Sourceaddress Timeout NumSlots BitmapsWidth … Bitmaps

Schedule packetN=4; 4 one-hop neighbors

… …

Reserved GiveupScheduleannouncementannouncement

Changeover Slot

Schedule-based: TRAMA—NP…55

TRAMA starts in random access mode where each node TRAMA starts in random access mode where each node selects a slot randomlyNodes can only join the network during the random

i d ( f i d i k )access periods (occur more often in dynamic networks)NP gathers neighborhood information by exchanging small signaling packets carrying incremental small signaling packets, carrying incremental neighborhood updatesIf no updates, the signaling packets serve as “keep-alive” bbeaconsA node times out its neighbor if it does not hear from it for a certain period of timefor a certain period of timeThe updates are transmitted to ensure 99% probability of success

Schedule-based: TRAMA—SEP…56

Establishes and maintains traffic-based schedule information Establishes and maintains traffic-based schedule information required by the transmitter (e.g. slot re-use) and the receiver (i.e. sleep state switching)A node’s schedule captures a window of traffic to be A node s schedule captures a window of traffic to be transmitted by the node; schedules have timeoutsNodes announce their schedule via schedule packetsThe intended receiver information is conveyed using a bitmapA schedule summary is also send during data transmission to minimize effects of packet loss in schedule disseminationminimize effects of packet loss in schedule disseminationNodes maintain schedule information for their one-hop neighbors, which is consulted when neededA d l t i ll d Ch l t ll d li t An unused slot is called Changeover slot; all nodes listen during the Changeover slot of the transmitter to synchronize their schedule

Page 15: MAC Protocols - Department of Computer Sciencecomp7860/08R-Fall/LectureNotes/03MACProtocols-4u… · MAC protocols: Performance metrics… 5 yDelay—the amount of time a data packet

Schedule-based: TRAMA—AEA…57

At i ti l t t d i th h d l d At any given time slot t during the scheduled access period, the state of a node u is determined based on its two hop neighborhood information and the its two-hop neighborhood information and the schedules of it’s one-hop neighbors; possible states are: transmit (TX) receive (RX) or sleep (SL)are: transmit (TX), receive (RX), or sleep (SL)

Node u is in TX state if (1) u has the highest priority among its contending set and (2) u has data to sendcontending set and (2) u has data to sendNode u is in RX state when it is the intended receiver of the current transmitterOtherwise the node can be turned off to SL state

Schedule-based: TRAMA—Winners…58

The state of a node u depends on the Absolute WinnerThe state of a node u depends on the Absolute Winnerand the schedules of its one-hop neighborsFrom node u’s perspective, the Absolute Winner at a time From node u s perspective, the Absolute Winner at a time slot t can be:

Node u itselfNode v that lies in the two-hop neighborhood of node u in which case the Alternate Winner atx(u) is to be considered if hidden from node vNode w that lies in node u’s one-hop neighborhood

The Absolute Winner is the assumed transmitter unless the Alternative Winner is hidden from the Absolute the Alternative Winner is hidden from the Absolute Winner and it belongs to the Possible Transmitter Set

The IEEE 802.11.4 MAC protocol…4 p59

Th t d d b th th h i l d th MAC The standard covers both the physical and the MAC layers of a low-rate Wireless Personal Area Network (WPAN)(WPAN)The (asymmetric) MAC protocol combines both contention-based and schedule-based schemescontention based and schedule based schemesTwo types of nodes:

Full Function Device (FFD); it can be a PAN coordinator a simple Full Function Device (FFD); it can be a PAN coordinator, a simple coordinator, and a deviceA Reduced Function Device (RFD); can operate as only a device

A device must be associated with a FFD to form a star network.

The coordinator…60

M ll ti f i t d d iManages a collection of associated devicesDeals with device addressing

Assigns short addresses to its devices

Regularly transmits frame beacon packetsAnnounces the PAN identifier, list of outstanding frames, etc.

Exchanges data packets with devices and with peer coordinators

Page 16: MAC Protocols - Department of Computer Sciencecomp7860/08R-Fall/LectureNotes/03MACProtocols-4u… · MAC protocols: Performance metrics… 5 yDelay—the amount of time a data packet

The superframe…p61

The coordinator operating in beacon mode organizes channel access The coordinator operating in beacon mode organizes channel access and data transmission with the help of superframe structureThe lengths of the active and inactive periods as well as the length of a single time slot and the usage of GTS slots are configurable

A ti i d I ti i dActive period Inactive period

BeaconContention

access period(CAP)

Guaranteed time slots

(GTS)(CAP) ( )

GTS management…g62

Th di t The coordinator allocates GTS to devices when receive requests packets (for a transmit or a receive slot) during the CAPtransmit or a receive slot) during the CAPAnswers the request packets in two steps:

An immediate acknowledgementAn immediate acknowledgementAfter receiving the acknowledgement, the device must track the coordinator’s beacons for a while to see when the required time slots are allocated The device can use the slots as long as they are slots are allocated. The device can use the slots as long as they are announced in the GTS descriptor

Allocates GTS to a node if has sufficient resources and, until ,resources become scarce and the GTS is explicitly deallocated

Devices can renegotiate if a GTS allocation request fails

Data transfer…63

If d i h ll t d t it GTS it k If a device has an allocated transmit GTS, it wakes up just before the slot and sends its packet immediately

Thi i l ibl if th ll t d l t l h t This is only possible if the allocated slots are large enough to hold the data, as well as the coordinator acknowledgment and appropriate InterFrame Spaces (IFSs)pp p p ( )Otherwise, the data is sent during the CAP using a slotted CSMA protocolThe coordinator always sends an acknowledgement packet

When the coordinator is unable to use a receive GTS (of the device), a simple handshake protocol is executed and the coordinator transmits the data

Slotted CSMA-CA protocol…p64

NB=0; CW=2;BE=macMinBE

N

Await next backoff period

boundaryCW--; CW=0?

SuccessTransmit data

Y

N

y

Random delay FailureRandom delay

NB++; CW=2; NB>M

Y Y

Channelidle?

NB++; CW=2;BE=min(BE+1,a

MaxBE)

NB>MaxCSMA

Backoffs?

CCA on backoffperiod boundary

N

N

N

Page 17: MAC Protocols - Department of Computer Sciencecomp7860/08R-Fall/LectureNotes/03MACProtocols-4u… · MAC protocols: Performance metrics… 5 yDelay—the amount of time a data packet

Nonbeaconed mode…65

The coordinator does not send beacon frames nor is The coordinator does not send beacon frames, nor is there any GTS mechanism (time synchronization is disabled))All packets are transmitted using a unslotted CSMA-CA protocolCoordinators must always be on, but devices can follow their own sleep schedule and wake up when

To send a data/control packet to the coordinatorTo send a data/control packet to the coordinatorTo fetch a packet destined to self from the coordinator using the data request/acknowledgement/data/acknowledgement handshakeData request packet is sent through unslotted CSMA-CA mechanism (device must stay awake for a certain period of time)

IEEE 802.11 and Bluetooth…66

Given a number of wireless MAC protocols particularly IEEE Given a number of wireless MAC protocols particularly IEEE 802.11 and Bluetooth) , why not use them?

Bluetooth is designed as a WPAN with one major applicationConnection of devices to a PCConnection of devices to a PCIt is already been tried for a wireless sensor network applicationDrawbacks:

Constantly need a master polling its slavesy p gLimited number of active slaves (8) per piconet

IEEE 802.11 family of protocols have several physical layers to share a single MAC protocol

Drawbacks:A node x must constantly be in listen mode since another node y may attempt transmitting to x at the same timeNodes need to overhear RTS/CTS to adjust their NAVs properlyNodes need to overhear RTS/CTS to adjust their NAVs properlyTailored for higher bit ratesIt is a single-hop protocol for both infrastructure and ad hoc scenarios

Summary…y67

Protocol Flat/Clustered

# ofChannels

Idle listening

Overhearing Collusion

OverheadAvoidance

STEM Both 2 Periodic sleep STEM-B Depends on wakeup STEM Both 2 Periodic sleep STEM B Depends on MAC

wakeup beacons

S-MAC Flat 1 Periodic sleep NAV RTS/CTS RTS/CTS; SYNC; …

M di ti Flat 1 Periodic sleep implicit No Mediator Mediation device

Flat 1 Periodic sleep implicit No Mediator service; …

Wakeup radio Flat ≥2 Wakeup signal Wakeup signal Multichannel CSMA

Wakeup radio

CSMA Flat 1 --- Sleep RTS/CTS RTS/CTS

PAMAS Flat 2 --- Yes RTS/CTS; busy tone

Signaling channel

LEACH R t ti TDMA TDMA TDMA Cl tLEACH Rotating clusters

1 TDMA TDMA TDMA Clusterformation; …

SMACS Flat Many TDMA TDMA TDMA Channel setup;…

TRAMA Flat 1 Scheduling Scheduling Scheduling NP; SEP