Chapter 3 MAC (Media Address Control) Layer

Post on 03-Jan-2016

38 views 1 download

description

Chapter 3 MAC (Media Address Control) Layer. Chapter 3 Outline. 3.1. 802.11 碰撞議題相關研究 3.2. 802.11 MAC 機制 3.3. 802.11 節能、省電議題相關研究 3.4. 802.15.4 MAC 3.5. MAC protocols for WSN. Chapter 3 Outline. 3.1. 802.11 碰撞議題相關研究 3.2. 802.11 MAC 機制 3.3. 802.11 節能、省電議題相關研究 - PowerPoint PPT Presentation

Transcript of Chapter 3 MAC (Media Address Control) Layer

Chapter 3 MAC (Media Address Control) Layer

Chapter 3 Outline

3.1. 802.11 碰撞議題相關研究 3.2. 802.11 MAC機制 3.3. 802.11 節能、省電議題相關研究 3.4. 802.15.4 MAC 3.5. MAC protocols for WSN

2

Chapter 3 Outline

3.1. 802.11 碰撞議題相關研究 3.2. 802.11 MAC機制 3.3. 802.11 節能、省電議題相關研究 3.4. 802.15.4 MAC 3.5. MAC protocols for WSN

3

Collision avoidance

4

Reservation based

Reservation based

Contention based

Contention based

Hybrid Hybrid

TDMA 、 FDMA 、CDMA

(Slotted)ALOHA 、CSMA 、 MACA

DAMA

Reservation based TDMA → 一個點可以用到的較多頻寬,輪到時間較短。

5

F( 頻帶 )

T( 時間 )1 2 3 4 … n 1

Reservation based FDMA → 一個點可以一直傳送,但頻寬較少。

6

Guard Band

F( 頻帶 )

T( 時間 )

CDMA can transmission in thesame space and time

FDMA 、 TDMA can useresource

Reservation based CDMA

7

Code

Frequency

Time

Contention based

Pure ALOHA當想要傳送 Data時就直接往外傳送。特點: traffic load low → 成功率高,反之碰撞率高

Slotted ALOHA加入 slotted概念,在每個 slot的開始點才可以傳送。特點:改善了隨時隨地都有可能有結點來撞封包的缺點。

8

0.4

0.3

0.2

0.1

0 0.5 1.0 1.5 2.0 3.0

G (Attempts per Packet Time)

Slotted ALOHA

Pure ALOHAS

(Th

rough

pu

t per P

acket

Tim

e)

Contention based

9

Contention based p-persistent CSMA

When medium is Idle → transmit probability:

transmit probability : p defer probability : 1−p

Busy → listen until medium is idle

10

Note:For 1-persistent CSMA Transmit probability

1) transmit probability : 12) defer probability : 0

Note:For 1-persistent CSMA Transmit probability

1) transmit probability : 12) defer probability : 0

Contention based MACA (Multiple Access with Collision Avoidance) NAV (Network Allocation Vector)

RTS CTS

GET RTS- Can transmit but can’t receive Disadvantage :GET CTS- Can receive but can’t transmit Can’t check frame

GET CTS and RTS- Can’t transmit and receive transmission success or not

11

Sender Receiver Sender Receiver

Hybrid

DAMA (Demand Assigned Multiple Access)Two phases

1) Contention-based: use slotted ALOHA

2) Reservation-based: use reservation list

Disadvantage : Maintain reservation list

12

SlottedALOHA

SlottedALOHA

SlottedALOHAreserved reserved

time

Chapter 3 Outline

3.1. 802.11 碰撞議題相關研究 3.2. 802.11 MAC機制 3.3. 802.11 節能、省電議題相關研究 3.4. 802.15.4 MAC 3.5. MAC protocols for WSN

13

MAC

Medium Access Control(MAC)無線網路中主要的功能為

碰撞控制 存取控制 排程機制 醒睡省電機制

Layer 7 Application layer

Layer 6 Presentation layer

Layer 5 Session layer

Layer 4 Transport layer

Layer 3 Network layer

Layer 2 Data-Link layer

LLC MAC

Layer 1 Physical layer(Wireless STD)

14

802.11訊框結構 (Frame Structure)

15

2 byte 2 byte 6+6+6 byte 2 byte 6 byte 0 ~ 2312 byte 4 byte

2 bit 2 bit 4 bit 1 bit 1 bit 1 bit 1 bit 1 bit 1 bit 1 bit

Version Type Subtype To DS MFFrom DS Retry Pwr. OW

Frame control Duration Address 1 ~ 3 Seq. Address 4 Data Checksum

802.11訊框結構 (Frame Structure)

16

Frame type (Data 、 Control 、 Management)

Version Type Subtype To DS MFFrom DS Retry Pwr. OW

Different type for each frame type(EX-in type control has subtype - CTS/RTS)

802.11訊框結構 (Frame Structure)

17

Version Type Subtype To DS MFFrom DS Retry Pwr. OW

BSS2BSS2BSS1BSS1

STA

STA

AP1 AP2

STA STASTA

STA

IBSSIBSS

Distribution SystemDistribution System

Portal802.X

(EX:802.3 、 802.16)

ESSESS

To DS =0From DS =0

To DS =1From DS =1

To DS =0From DS =1

To DS =1From DS =0

802.11訊框結構 (Frame Structure)

18

Version Type Subtype To DS MFFrom DS Retry Pwr. OW

More fragment?

Retransmit ?

Sleep ?

802.11訊框結構 (Frame Structure)

19

2 byte 2 byte 6+6+6 byte 2 byte 6 byte 0 ~ 2312 byte 4 byte

Frame control Duration Address 1 ~ 3 Seq. Address 4 Data Checksum

Duration of frame

Four address : (by To DS/ From DS)1.Source Address(SA) 2.Destination Address(DA)3.Transmitter Address(TA) – (now address)4.Receiver Address(RA) – (next address)

20

MACExtent

免競爭式服務( 具時限傳輸 )

Distributed Coordination Function (DCF)

競爭式服務( 非同步傳輸 )

Point Coordination Function (PCF)

MAC Architecture

21

Distributed Coordination Function (DCF) The fundamental access method for the 802.11 MAC, known as

Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA).

Shall be implemented in ALL stations and APs. Used within both ad hoc and infrastructure configurations.

Point Coordination Function (PCF) An alternative access method Shall be implemented on top of the DCF A point coordinator (polling master) is used to determine which

station currently has the right to transmit. Shall be built up from the DCF through the use of an access

priority mechanism.

MAC Architecture

802.11傳遞模式

22

APtime

Beacon

PCF period

DCF period , 節點與節點間傳送是互相競爭傳送權的

CF_END Beacon

STA2NAV

STA1

PCF period , 根據排程好的傳送者進行傳送

DCF period

Super frame Super frame

PCF 週期中沒拿到資料傳送權的 STA ,會進入 NAV 休息狀態

802.11 傳遞模式 - PCF週期

23

AP

STA1

STA2

PCF Beacon

DL

ACK

Polling

UL

ACK DL Polling ACK

ACK UL

time

Polling

UL

ACK

DL- 下傳封包 ACK- 回應封包 Polling- 詢問是否有資料上傳 UL- 上傳封包

沒傳完的資料怎辦? 去 DCF 競爭 or 等待下一個 PCF(DCF 沒競爭到 )

AP

STA1

STA2 time

CF_END Beacon

Data

Data Data

The beginning of DCF

PIFS (PCF Interframe Space ) , 一段固定的等待時間 , (DIFS > PIFS)

Defer beacon

Random backoff , 亂數等待時間

DIFS (DCF Interframe Space ) , 一段固定的等待時間

802.11 傳遞模式 - PCF週期

24

Piggyback機制 Problem in Original PCF ?

封包來回傳遞太多次,浪費資源。 One frame in multi-message Piggyback

25

AP

STA1

STA2

Beacon

time

DL1+Polling1

ACK+DL2+

Polling2

ACK+UL1

ACK+UL2

ACK+DL3+

Polling3

DL1+Polling1

ACK+UL1

CF_END

STA3 沒回 ACK( 超過 PIFS 認定他不在 )

PIFS (PCF Interframe Space )

26

DCF Operation MAC begins frame transmission

If both PHY and virtual carrier sense mechanisms indicate the medium is idle for an interval of DIFS (or EIFS if previously received frame contained errors).

If medium is busy during the DIFS interval, Backoff interval is selected and increment retry counter

For each slot time, if medium is detected to be idle, decrement backoff interval; MAC begins to transmit if backoff interval is expired.

If the transmission is not successful (I.e. collision), CW is doubled and new backoff interval is selected and countdown is begun, again. When to stop?

Example of Backoff Intervals

busy

busy

busy

busy

DIFS DIFS DIFS DIFSBackoff=9 Backoff=4Backoff=2

Backoff=5

Backoff=7 Backoff=2

Station 1

Station 2

Station 3

Station 4

Packet arrival at MAC

(1)

(2) (3)

(4)

(5)

(1) After packet arrival at MAC, station 3 senses medium free for DIFS, so it starts transmission immediately (without backoff interval).

(2) For station 1,2, and 4, their DIFS intervals are interrupted by station 3. Thus, backoff intervals for station 1,2, and 4, are generated randomly (i.e. 9,5, and 7, respectively).

(3) After transmission of station 2, the remaining backoff interval of station 1 is (9-5)=4.

(4) After transmission of station 2, the remaining backoff interval of station 4 is (7-5)=2.

(5) After transmission of station 4, the remaining backoff interval of station 1 is (4-2)=2.

Random backoff 機制 Backoff Counter :

when network busy → B.C. freeze network idle → B.C. decrease

28

STA1

STA2

STA3

STA4

BC=5

BC=3

BC=2

BC=3

BC=5

DIFS

Backoff time = CW* Random() * Slot time

CW = starts at CWmin and doubles after each failure until reaching CWmax and remains there in all remaining retries e.g., CWmin = 7, CWmax = 255

Random() = (0,1)

Slot Time = Transmitter turn-on delay +

medium propagation delay +

medium busy detect response time

DCF: the Random Backoff Time

8

CWmax

CWmin715

31

第二次重送第一次重送

第三次重送初始值

63127127

255255 255255

Priority Scheme

Goal : Let each frame has different priority SIFS → PIFS → DIFS → EIFS 802.11 DSSS – SIFS(10μs) , PIFS(30μs) , DIFS(50μs) , EIFS(>50μs)

30

SIFS

PIFS

DIFS

time

1st Priority 2nd Priority 3rd Priority

CSMA/CA with RTS/CTS

Hidden terminal problem → Collision

Exposed terminal problem → Waste bandwidth

31

A B C

D

A B C D

C can send data.But carrier the network is busy

CSMA/CA with RTS/CTS

Solve hidden terminal problem High overhead

32

Sender

Receiver

SenderNeighbor

ReceiverNeighbor

Sender Receiver

NAV(RTS) [LOCK]

NAV(CTS) [LOCK]

RTS

CTS

Data

ACK

time

Chapter 3 Outline

3.1. 802.11 MAC機制 3.2. 802.11 碰撞議題相關研究 3.3. 802.11 節能、省電議題相關研究 3.4. 802.15.4 MAC 3.5. MAC protocols for WSN

33

802.11內建省電模式 In 802.11 Power Saving mode

802.11 Infrastructure mode的省電模式Have AP

Ad-hoc mode的省 802.11電模式Only node

34

802.11 Infrastructure mode的省電模式 TIM(Traffic Indication Map)

TIM record data : Association ID 、 Buffered(0/1) Mechanism

Listen Beacon 1. TIM (if Buffered is 0)

Go to SLEEP STATE

2. If Buffer is 1: a. in PCF

waiting AP transmit data b. in DCF

1. STA send PS-Poll to AP 2. AP receive PS-Poll and transmit buffered data

35

0 : no data 1 : have data

802.11 Ad-hoc mode的省電模式

36

DataSTA1

STA2

STA3

TBIT window

ATIM window

Beacon interval

Beacon

ATIM

ATIM_ACK

Beacontime

Beacon interval

DATA /ACK

Sleep Active

ACK

References

[1] Andrew S. Tanenbaum , “Computer Network 4/e” , PHPTR

[2] 曾煜棋 , 潘孟鉉 , 林致宇 , “無線網域及個人網路 -隨意及感測網路之技術與應用” , 知城

[3] N. Abramson, “The ALOHA system – another alternative for computer communications” , in proc. Fall Joint Computer Conference.

[4] Jung-Hyon Jun, Young-June Choi, and Saewoong Bahk , “Affinity-Based Power Saving MAC Protocol in Ad Hoc Network” , in proc. IEEE PerCom2005

[5] V. Bharghavan, A. Demers, S. Shenker, and L. Zhang, “ MACAW: A media access protocol for wireless LAN's.” in proc. ACM SIGCOMM '94

[6] IEEE Std 802.11-1997

[7] IEEE Std 802.11a-1999

[8] IEEE Std 802.11b-1999

37

Chapter 3 Outline

3.1. 802.11 MAC機制 3.2. 802.11 碰撞議題相關研究 3.3. 802.11 節能、省電議題相關研究 3.4. 802.15.4 MAC 3.5. MAC protocols for WSN

38

IEEE 802.15.4 MAC Architecture

IEEE 802.15.4 MAC

Applications

ZigBee Network

IEEE 802.15.4PHY

• Channel acquisition• Contention Window

39

Architecture

IEEE 802.15.4 MAC

Applications

ZigBee Network

IEEE 802.15.4PHY

• Device join and leave• Frame routing• And so on

40

IEEE 802.15.4 MAC

Network topology FFD vs. RFD Full function device (FFD)

Any topology Network coordinator capable Talks to any other device

Reduced function device (RFD) Limited to star topology Cannot become a network coordinator Talks only to a FFD Very simple implementation

41

IEEE 802.15.4 MAC

FFD

RFD Communications flow

Master/slave

PANcoordinator

42

IEEE 802.15.4 MAC - Star Topology

Point to point Cluster tree

PANcoordinators

FFD

RFD Communications flow43

IEEE 802.15.4 MAC – Tree and Mesh Topologies

CAP CFP

Active portion Inactive portion

Beacon interval

GTS

Beacon frame

Beacon frame CAP ︰ Contention-Access PeriodCFP ︰ Contention-Free PeriodGTS ︰ Guaranteed Time Slot

Transfer mode – Superframe Structure

44

Transfer mode – GTS Concepts

Beacon interval = aBaseSuperframeDuration × 2SO symbols

aBaseSuperframeDuration 為 IEEE 802.15.4預設參數。 Active portion的長度為 : aBaseSuperframeDuration × 2BO

symbols (BO≦ SO≦ 14)

當 SO =15時,代表不使用 superframe的架構。 A Guaranteed Time Slot (GTS) allows a device to operate on

the channel within a portion of the superframe

A GTS shall only be allocated by the PAN coordinator

The PAN coordinator can allocated up to seven GTSs at the

same time45

Transfer mode – GTS Allocation If and only if PAN coordinator has enough capacity for the

requested GTS GTSs shall be allocated on a first-come-first-served basis

by the PAN coordinator

46

Coordinator MAC

DeviceMAC

GTSrequest

ACK Beacon(with GTS descriptor)

Transfer mode – GTS deallocation PAN coordinator shall update the final CAP slot subfield of

the superframe

47

Coordinator MAC

DeviceMAC

GTSrelease

ACK Beacon(with GTS descriptor)

Transfer mode – GTS reallocation The deallocation of a GTS may result in the superframe

becoming fragmented.

48

CAP CFP

GTS1 GTS2 GTS3

8 10 13

Transfer mode – GTS reallocation

49

CAP CFP

GTS1 GTS3

11 13

Maximize CAP

Data Transfer Model - Channel Access

Beacon-enable networks With beacon frame Slotted CSMA/CA channel access mechanism

Non Beacon-enable networks No beacon frame Unslotted CSMA/CA channel access mechanism

50

Beacon-enable Networks

Slotted CSMA/CA Algorithm Every device in the PAN shall be aligned with the

superframe slot

51

NB=0, CW=2

CSMA/CA

BE=macMinBE

Locate backoffPeriod boundary

Delay for random(2BE-1) unit backoff period

Perform CCA onbackoff period boundary

Channel idle?

CW=2,NB=NB+1BE=min(BE+1, macMaxBE)

NB>macMaxCSMABackoffs?

CW=CW - 1

CW=0?

Failure Success

Y

YY

N N

N

Slotted CSMA/CA Algorithm

52

CCA: Clear Channel Assessment

Slotted CSMA/CA Algorithm Random Backoff

BE : the backoff exponent which is related to how many backoff periods

NB ︰ number of backoff (periods)

Channel busy → NB=NB+1 , BE=min(BE+1,aMaxBE)

STA1

STA2

BC (Backoff Counter) = random(2BE-1) periods

NB=0BC=3

BC=1

CW=1

CW=0

NB=1BE=BE+1CW=2

if NB > macMaxCSMABackoffs then failure (NB > macMaxCSMABackoffs it means that the channel is very busy and not suitable to transmit)

if NB > macMaxCSMABackoffs then failure (NB > macMaxCSMABackoffs it means that the channel is very busy and not suitable to transmit)

BeaconBeacon

Inactive portion

53

Slotted CSMA/CA Algorithm Random Backoff

CW : the number of backoff slots that needs to be clear of channel activity before transmission can commence.

Channel idle → CW=CW-1

CW = 0 → transmission

STA1

STA2BC=1

CW=1

CW=0

BC=6CW=0

CW=1 BeaconBeacon

Inactive portion

54

Coordinator MAC

DeviceMAC

Beacon frame(slotted CSMA/CA)

Data

ACK

Data Transfer Model Data transferred from device to coordinator

In a Beacon-enable network, using slotted CSMA/CA to transmit its data.

In a non Beacon-enable network, device simply transmits its data using unslotted CSMA/CA

55

Data Transfer Model Data transferred from coordinator to device

In a Beacon-enable network, the coordinator indicates in the beacon that “data is pending.”

Device periodically listens to the beacon and transmits a MAC command request using slotted CSMA/CA if necessary.

Coordinator MAC

DeviceMAC

Beacon frame Data

Data request

ACK

ACK

56

Coordinator MAC

DeviceMAC

ACKFP=0

Data Transfer Model

Data transferred from coordinator to device In a non Beacon-enable network, a device transmits a

MAC command request using unslotted CSMA/CA. If the coordinator has its pending data, the coordinator

transmits data frame using unslotted CSMA/CA.

Data request

FP=Frame PendingACKFP=1

Data request

Data

ACK

57

Data Transfer Model – Reliable transmission (1) Successful data transmission: originator receives

acknowledgment in the period of macAckWaitDuration time

58

originator

recipient ACK

Data

macAckWaitDuration timer to expire

Data Transfer Model– Reliable transmission(2) Lost data frame : recipient does not receive the

Data frame and so does not respond with an acknowledgment

59

originator

recipient

Data

macAckWaitDuration timer to expire

Data

Data Transfer Model– Reliable transmission(3) Lost acknowledgment frame : originator does not receive

acknowledgment frame and its timer expires. Repeat aMaxFrameRetries times

60

originator

recipient

Data

macAckWaitDuration timer to expire

ACK

Data … Data

aMaxFrameRetries times before failure

Chapter 3 Outline

3.1. 802.11 MAC機制 3.2. 802.11 碰撞議題相關研究 3.3. 802.11 節能、省電議題相關研究 3.4. 802.15.4 MAC 3.5. MAC protocols for WSN

61

Main Issues of WSN

Lower the device's duty-cycles is a difficult problem. duty-cycles: work period occupy proportion entire cycle

Properties of a well-defined MAC protocol for WSN Main issues: Energy-efficient, scalability, and adaptability Secondary issues : latency, throughput, and bandwidth

utilization, etc.

62

Energy Problems on the MAC Layer

CollisionOverhearingControl-packet overheadThe major problem is “idle listening”

63

standard 802.15.4 802.11b 802.15.1

Application Focus

Monitoring & Control

Web, Email, Video

Cable Replacement

Battery Life(days)

100-1000+ 0.5-5 1-7

Network Size > 1000 < 100 < 10

Bandwidth(KB/s)

250 11,000+ 720+

Success Metrics

Reliability, Power

Speed, Flexibility

Cost, Convenience

802.15.4適用於感測網路之特性Comparison Between WPAN

64

MAC Protocols for WSN

Asynchronous MAC protocols No synchronization or coordinate schedule between

neighbor nodes S-MAC, T-MAC, B-MAC, Wise MAC, etc.

Synchronous MAC protocols Time synchronization is achieved externally or

synchronization is managed by specific node TRAMA, DMAC, LEACH, etc.

65

S-MAC

S-MAC assume sensor networks to be composed of many small nodes deployed in an ad hoc fashion.

The large number of nodes can also take advantage of short-range, multi-hop communication to conserve energy.

Most communication will be between nodes as peers, rather than to a single base-station.

6666

S-MAC

S-MAC designed for reduce energy consumption and support self-configuration To reduce energy consumption in listening to an idle

channel, nodes periodically sleep Neighboring nodes form virtual clusters to auto-synchronize

on sleep schedules S-MAC applies message passing to reduce contention

latency for sensor-network applications

6767

S-MAC Locally managed synchronizations periodic sleep–listen schedules

Virtual cluster

Sleep Active

Listen Listensleep sleep sleep

time

AC B DCluster 1 Cluster 2

68

S-MAC Every node should wakeup in Listen period

Synchronization period Control period (RTS/CTS)

69

Listen period

senderCS CS

receiver

Sending data / sleep period

RX CTS

RX RTS

TX sync

CS

TX dataTX RTS

TX CTS

※ Node use CSMA before sending any packet

RX data69

S-MAC Re-transmit message problem

Long message => re-transmit will take a long time Short message => large control over head (RTS/CTS)

message passing

1 2 3 54 3sender

Receiver

Neighbor of receiver sleep sleep

RTS CTS Transmit data ACK

okRe-transmit 3

70

S-MAC

Adaptive-Listening Node who overhears its neighbor’s transmissions (ideally

only RTS or CTS) wake up for a short period of time at the end of the transmission.

If the node is the next-hop node => remain active, prepare to forwarding its neighbor’s message.

If the node does not receive anything during the adaptive listening => go back to sleep.

71

S-MAC-Summary

Locally time synchronization between neighbors Power saving method: Fixed wakeup/sleep interval Transmit Characteristic: Contention transmission through CSMA

7272

S-MAC-Summary

Advantage Idle listening is reduced by sleep schedules Time synchronization overhead may be prevented by sleep

schedule announcements Disadvantage

Adaptive listening incurs overhearing or idle listening Sleep and listen periods are predefined and constant

7373

Timeout T-MAC

To improve the idle listening problem of the fixed duty cycle solution, such like S-MAC

T-MAC protocol is to reduce idle listening by transmitting all messages in bursts of variable length, and sleeping between bursts

An adaptive duty cycle in a novel way: by dynamically ending the active part of it

7474

Improvement of S-MAC T-MAC have variable “Listen Period”

The listen period ends when no activation event has occurred for a time threshold TA

Timeout T-MAC

75

TATA

sleepsleepListenListen

Listensleep

time

RTS CTS

TA

Cycle period Cycle period Cycle period

Transmit data / ACK

75

76

Timeout T-MAC

TA = 1.5 (Tcontention interval + TRTS + TRTS2CTS)

Timeout T-MAC The data forwarding problem

Early sleeping problem, Consider the case that A sends data to D

77RTS CTS Transmit data / ACK

When node D go sleeping before C forward data, the data transmission process may delay to next cycle.

Node A

Node B

Node C

Node DTA Sleep

awake

Sleep

Sleep

TA

TA

77

Timeout T-MAC Solution of early sleeping problem

Future request-to-send (FRTS) Forwarding node uses FRTS awake next hop node and

destination node

78RTS CTS Transmit data / ACK

FRTS Data-Send packet, avoid collision

Node A

Node B

Node C

Node Dawake

awake

Sleep

Sleep

TA

TA

78

Timeout T-MAC

Taking priority on full buffers When a node’s transmit/routing buffers are almost full, it

may prefer sending to receiving

RTS CTS Transmit data / ACK

Node A

Node B

Node C

Node D

TA

Buffer Full

79

Timeout T-MAC-Summary

Locally time synchronization between neighbors

Power saving method: Dynamic wakeup/sleep interval

Transmit Characteristic: Contention transmission through CSMA

8080

Timeout T-MAC

Advantage Enhance the poor results of the S-MAC protocol under

variable traffic loads

Disadvantage Early sleeping problem Higher latency than S-MAC

8181

B-MAC

B-MAC Goals : Low Power operation Effective collision avoidance Simple implementation Small code size and RAM usage Efficient channel utilization at low & high data rates Scalable to large numbers of nodes …

B-MAC employs an adaptive preamble sampling scheme to reduce duty cycle and minimize idle listening

8282

B-MAC

Low power listening (LPL) Goal: minimize listen cost

Nodes periodically wakeup at every cycle check if preamble signals

If signal is detected, node powers up in order to receive the packet

Sender use long preamble to notify receiver Sender and receiver turn off radios after data receive or time-

out

8383

Low Power Listening: Preamble Sampling

Sender

Receiver

Preamble Send data

Preamble sampling Active to receive a message

S

R

|Preamble| ≥ Sampling period|Preamble| ≥ Sampling period

Preamble is not a packet but a physical layer RF pulse Minimize overhead

84

B-MAC

Clear channel assessment (CCA) CCA effectiveness for a typical wireless channel CCA is used to determine the state of the medium

0=busy, 1=clear, Packet arrives between 22 and 54 ms85

B-MAC

Check if any preamble signal Clear channel assessment (CCA)

Before transmit, adapts to noise floor by sampling channel when it is assumed to be free

86

sender

receiver Listen

TX preamble

Sender arrive

RX preamble

cycle cycle

TX data

RX data

cycle

Listen

c

Wait data

B-MAC- Summary

B-MAC is a non-time-synchronization method, it uses a long enough preamble to notify the receiver.

Power saving method: Self-defined wakeup/sleep interval Long preamble notification

Transmit Characteristic: Contention method through Clear Channel Assessment

algorithm

8787

B-MAC- Summary

Advantage Doesn’t need any synchronization RTS/CTS (optional) Clean and simple interface

Disadvantage Transmission delay will be long Bad performance when heavy traffic load

8888

MAC protocols for WSN Asynchronous MAC protocols

No synchronization or coordinate schedule between neighbor nodes

S-MAC,T-MAC, B-MAC, …etc

Synchronous MAC protocols Time synchronization is achieved externally or

synchronization is managed by specific node TRAMA, DMAC, …etc

8989

Traffic-Adaptive Medium Access Protocol- TRAMA TRAMA reduces energy consumption by ensuring

that unicast and broadcast transmissions incur no collisions TRAMA assumes that time is slotted and divides time into

random access periods and schedule-access periods.

TRAMA avoids assigning time slots to nodes with no traffic to send

9090

TRAMA

Nodes need globally synchronized Time divided into

Random access periods Scheduled access periods

Three main protocol Neighbor Protocol (NP) Adaptive Election Algorithm (AEA) Schedule Exchange Protocol (SEP)

9191

TRAMA

92

Random access period Scheduled access period

cycle

Learning about their two-hop neighborhoodUsing neighborhood exchange protocol (NP)Update information in randomly selected time slots

Nodes exchange schedulesUsing schedule exchange protocol (SEP)Nodes announce the schedule to its neighbors

Using Adaptive Election Algorithm (AEA)Compute the priority within two hop neighbors

Send data

92

TRAMA

Neighborhood Exchange Protocol A node picks randomly a number of time slots and transmits

small control packets in these without carrier sensing These packets contain incremental neighbor information,

that is only those neighbors that belong to new neighbors or neighbors missing during the last cycle

Schedule Exchange Protocol A node transmits its current transmission schedule and also

picks up its neighbors’ schedules

93

94

TRAMA Schedule Exchange Protocol

Each node compute the length of SCHEDULE_INTERVAL based on the rate at which packets are produced by higher layer application.

Nodes use AEA algorithm pre-compute the number of slots in time interval [t, t + SCHEDULE_INTERVAL].

Node select the highest priority slots in the duration of SCHEDULE_INTERVAL as its transmitting slots

Node uses its last transmitting slot in this duration, to announce its next schedule by looking ahead the next SCHEDULE_INTERVAL

Nodes announce their schedule via schedule packets

TRAMA

How Adaptive Election Algorithm (AEA) to decide which slot a node can use in scheduled access period? Use node identifier x Use globally known hash function h For a time slot t, compute

priority p = h (x XOR t) Compute this priority for next k time slots for node itself and all

two-hop neighbors Node uses those time slots for which it has the highest priority

9595

TRAMA

For example Both A and D could transmit in the timeslot because they

have the highest priority in their two hop neighbors

BA

CD

Priority 100Priority 95 Priority 79

Priority 200

96

TRAMA

During time slot is 1000 When SCHEDULE_INTERVAL is 100 The node need to compute the transmitting slots between

[1000,1100]

1009 1030 1033 1064 1075 1098

SCHEDULE_INTERVAL 1000 1100

Using for transmit data

If does not have enough packet to send ,it announces gives up the corresponding slot

Node uses the last slot to send its next schedule

time

97

TRAMA

Inconsistency problem If B looks at its schedule information and D will transmit

data to C, B switch to sleep mode. B will end up missing A’s transmission

BA

CD

Priority 100Priority 95 Priority 79

Priority 200

Sleep

98

TRAMA

Solution of Inconsistency Problem Node B will denote node A as Alternate Winner if node A

want to transmit data to node B If Alternate Winner and the Absolute Winner (node D) are

not interfered for each other then both nodes can transmit concurrently

99

TRAMA- Summary

Global synchronized time slot Power saving method:

Higher percentage of sleep time and less collision probability is achieved compared to CSMA based protocols

Transmit Characteristic: Contention-Free TDMA Adaptive Election Algorithm decide transmission

100100

TRAMA- Summary Advantage

Only use two hop neighbor information can decide transmission priority

Higher percentage of sleep time, less collision probability and higher maximum throughput than contention-based S-MAC

Disadvantage Only using local two hop information, cannot avoid collision

over three hops Higher delay problem Substantial memory/CPU requirements for schedule

computation

101101

DMAC

DMAC achieves very low latency for convergecast communications DMAC could be summarized as an improved Slotted Aloha

algorithm in which slots are assigned to the sets of nodes based on a data gathering tree

DMAC also adjusts the duty cycles adaptively according to the traffic load in the network

102102

103

DMAC

The data forwarding interruption problem (DFI) Only the next hops of receiver can overhear the data

transmission Nodes out of hearing range will sleep until next cycle/interval

timeActive nodes Sleep nodes

0

μ

T+2μ

T+3μ

T+μ

source sink

In S-MAC, DFI causes sleep delay.

104

DMAC

Staggered Wakeup Schedule Data gathering from sensor nodes to sink by data

gathering tree Nodes on multi-hop path to wake-up sequentially like a

chain reaction

data gathering tree

time

node

0

μ

source sink

receive node send nodesleep node

sink

105

DMAC When nodes has multiple packets to send

DMAC use slot-by-slot mechanism Piggyback a more data flag in MAC header

Node not active at next slot, but schedule a 3μ sleep then goes to receiving state.

RX TX RX TXsleep

RX TX RX TXsleep

RX TX RX TXsleep

RX TX RX TXsleep

time

sink

sleep

sleep

sleep

More data flag

More data flag

More data flag

DMAC-Summary

Need external time synchronized in prescribe area Power saving method:

Sleep schedule of a node an offset that depends upon its depth on the tree

Transmit Characteristic: Improved Slotted Aloha algorithm Contention-Free slots are assigned based on a data gathering

tree

106106

DMAC-Summary

Advantage: DMAC achieves very good latency compared to other

sleep/listen period assignment methods

Disadvantage Collision avoidance methods are not utilized, if number of

nodes that have the same schedule try to send to the same node, collisions will occur.

107107

MAC 特性比較

108

Time sync needed

typeAdaptive to

changes

S-MAC/

T-MACno CSMA Good

B-MAC no CSMA/CCA Good

WiseMAC no np-CSMA Good

TRAMA yes TDMA/CSMA Good

DMAC yesTDMA/

Slotted Alohaweak

LEACH yes TDMA/CDMA weak

Comparison of MAC protocols

108

References

1. Ilker Demirkol, Cem Ersoy, Fatih Alagöz , “MAC Protocols for Wireless Sensor Networks: A Survey,” Communications Magazine, IEEE , April 2006

2. Deborah Estrin, John Heidemann, and Wei Ye, “An Energy-Efficient MAC Protocol for Wireless Sensor Networks,”IEEE INFOCOM 2002.

3. W. Ye, J. Heidemann, and D. Estrin, “Medium Access Control with Coordinated Adaptive Sleeping for Wireless Sensor Networks,” IEEE/ACM Trans. Net. 2004 ,

4. Koen Langendoen and Tijs van Dam, “An Adaptive Energy-Efficient MAC Protocol for Wireless Sensor Networks,” The First ACM Conference on Embedded Networked Sensor Systems (Sensys & 03), pp. 171--180, 2003

5. DavidCuller, JasonHill, and JosephPolastre, “Versatile Low Power Media Access for Wireless Sensor Networks,” the 2nd ACM Conference on Embedded Networked Sensor Systems (SenSys), November 3-5, 2004

6. A. El-Hoiydi, “Spatial TDMA and CSMA with Preamble Sampling for Low Power Ad Hoc Wireless Sensor Networks,” Proc. ISCC 2002

7. C. C. Enz et al., “WiseNET: An Ultralow-Power Wireless Sensor Network Solution,” IEEE Comp., vol. 37, no. 8, Aug. 2004.

8. V. Rajendran, K. Obraczka, and J. J. Garcia-Luna-Aceves, “Energy-Efficient, Collision-Free Medium Access Control for Wireless Sensor Networks,” Proc. ACM SenSys ‘03, Los Angeles, CA, Nov. 2003, pp. 181–92.

9. W. Rabiner Heinzelman, A. Chandrakasan, and H. Balakrishnan, “Energy-Efficient Communication Protocols for Wireless Microsensor Networks,” Hawaii International Conference on System Sciences (HICSS '00), January 2000.

10. G. Lu, B. Krishnamachari, and C. S. Raghavendra, “An Adaptive Energy-Efficient and Low-Latency MAC for Data Gathering in Wireless Sensor Networks,” Proc. 18th Int’l. Parallel and Distrib. Processing Symp., Apr.2004, p. 224.

11. Holger Karl,Andreas Willig , “Protocols and architectures for wireless sensor networks,” 109