Upload
allyson-carter
View
274
Download
2
Embed Size (px)
Citation preview
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 112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
Collision Avoidance
4
Reservation based
Reservation based
Contention based
Contention based
Hybrid Hybrid
TDMA 、 FDMA 、CDMA
(Slotted)ALOHA 、CSMA 、 MACA
DAMA
112/04/18Jang Ping Sheu
CDMA can transmission in thesame space and time
FDMA 、 TDMA can useresource
Reservation Based
CDMA
7
Code
Frequency
Time
112/04/18Jang Ping Sheu
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)
112/04/18Jang Ping Sheu
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
112/04/18Jang Ping Sheu
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
112/04/18Jang Ping Sheu
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
112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
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
112/04/18Jang Ping Sheu
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)
112/04/18Jang Ping Sheu
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
112/04/18Jang Ping Sheu
802.11訊框結構 (Frame Structure)
18
Version Type Subtype To DS MFFrom DS Retry Pwr. OW
More fragment?
Retransmit ?
Sleep ?
112/04/18Jang Ping Sheu
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)
112/04/18Jang Ping Sheu
20
MACExtent
Contention-Free
Services
(Real-time)
Distributed Coordination Function (DCF)
Contention-
Service
(Asynchronous)
Point Coordination Function (PCF)
MAC Architecture
112/04/18Jang Ping Sheu
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
112/04/18Jang Ping Sheu
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休息狀態
112/04/18Jang Ping Sheu
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 沒競爭到 )
112/04/18Jang Ping Sheu
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 Inter-frame Space ) , 一段固定的等待時間
802.11 傳遞模式 - PCF週期
112/04/18Jang Ping Sheu24
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 )112/04/18Jang Ping Sheu
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?
112/04/18Jang Ping Sheu
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.
112/04/18Jang Ping Sheu27
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 112/04/18Jang Ping Sheu
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
CWmin7
1531
第二次重送第一次重送
第三次重送初始值
63127127
255255 255255
112/04/18Jang Ping Sheu29
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 Priority112/04/18Jang Ping Sheu
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
112/04/18Jang Ping Sheu
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
112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
802.11內建省電模式 In 802.11 Power Saving mode
802.11 Infrastructure mode的省電模式 Have AP
Ad-hoc mode 的 802.11省電模式 Only node
34 112/04/18Jang Ping Sheu
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 to transmit data b. in DCF
1. STA send PS-Poll to AP 2. AP receives PS-Poll and transmits buffered data
35
0 : no data 1 : have data
112/04/18Jang Ping Sheu
802.11 Ad-hoc mode的省電模式
36
DataSTA1
STA2
STA3
TBIT (Time Between Idle Time) window
ATIM (Announcement TIM) window
Beacon interval
Beacon
ATIM
ATIM_ACK
Beacontime
Beacon interval
DATA /ACK
Sleep Active
ACK
112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
IEEE 802.15.4 MAC Architecture
IEEE 802.15.4 MAC
Applications
ZigBee Network
IEEE 802.15.4PHY
• Channel acquisition• Contention Window
39 112/04/18Jang Ping Sheu
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
112/04/18Jang Ping Sheu
Network topology FFD vs. RFD Full function device (FFD)
Any topology Network coordinator capability 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
112/04/18Jang Ping Sheu
FFD
RFD Communications flow
Master/Slave
PANCoordinator
42
IEEE 802.15.4 MAC - Star Topology
112/04/18Jang Ping Sheu
Point to point Cluster tree
PANCoordinators
FFD
RFD Communications flow43
IEEE 802.15.4 MAC - Tree and Mesh Topologies
112/04/18Jang Ping Sheu
CAP CFP
Active portion Inactive portion
Beacon interval
GTS
Beacon frameBeacon frame sent from
coordinator
CAP ︰ Contention-Access PeriodCFP ︰ Contention-Free PeriodGTS ︰ Guaranteed Time Slot
Transfer mode – Superframe Structure
44 112/04/18Jang Ping Sheu
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 time
45 112/04/18Jang Ping Sheu
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)
112/04/18Jang Ping Sheu
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)
112/04/18Jang Ping Sheu
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
112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
Beacon-enable Networks
Slotted CSMA/CA Algorithm Every device in the PAN shall be aligned with the
superframe slot
51
112/04/18Jang Ping Sheu
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
112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
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
112/04/18Jang Ping Sheu
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
112/04/18Jang Ping Sheu
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
112/04/18Jang Ping Sheu
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 WSNs
61 112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
Energy Problems on the MAC Layer
Collision Overhearing Control-packet overhead The major problem is “idle listening”
63 112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
MAC Protocols for WSNs
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 112/04/18Jang Ping Sheu
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.
66 112/04/18Jang Ping Sheu
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
67 112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
S-MAC Every node should wakeup in Listen period
Synchronization period
Control period (RTS/CTS)
Listen period
Sender CS 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 data
69 112/04/18Jang Ping Sheu
S-MAC Re-transmit message problem
Long message => re-transmission will take a long time Short message => large control overhead (RTS/CTS)
message passing
1 2 3 54 3Sender
Receiver
Neighbor of receiver sleep sleep
RTS CTS Transmit data ACK
okRe-transmit 3
70 112/04/18
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 data transmission.
If the node is the next-hop node => remain active after data transmission, prepare to forwarding its neighbor’s message.
If the node does not receive anything during the adaptive listening => go back to sleep.
71 112/04/18Jang Ping Sheu
S-MAC-Summary
Locally time synchronization between neighbors Power saving method: Fixed wakeup/sleep interval Transmit Characteristic: Contention transmission through CSMA
72 112/04/18Jang Ping Sheu
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
73 112/04/18Jang Ping Sheu
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
74 112/04/18Jang Ping Sheu
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
TATA
sleepsleepListenListen
Listensleep
time
RTS CTS
TA
Cycle period Cycle period Cycle period
Transmit data / ACK
75 112/04/18Jang Ping Sheu
Timeout T-MAC The data forwarding problem
Early sleeping problem, consider the case that A sends data to D
RTS 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 112/04/18Jang Ping Sheu
Timeout T-MAC Solution of early sleeping problem
Future request-to-send (FRTS) Forwarding node uses FRTS awake next hop node and
destination node
RTS CTS Transmit data / ACK
FRTS Data-Send packet, avoid collision
Node A
Node B
Node C
Node Dawake
awake
Sleep
Sleep
TA
TA
78 112/04/18Jang Ping Sheu
Timeout T-MAC
Taking priority on full buffers When a node’s transmit/routing buffers are almost full, it
may prefer sending than receiving
RTS CTS Transmit data / ACK
Node A
Node B
Node C
Node D
TA
Buffer Full
79 112/04/18Jang Ping Sheu
Timeout T-MAC-Summary
Locally time synchronization between neighbors
Power saving method: Dynamic wakeup/sleep interval
Transmit Characteristic: Contention transmission through CSMA
80 112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
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
82 112/04/18Jang Ping Sheu
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
83 112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
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
Sender
Receiver Listen
TX preamble
Sender arrive
RX preamble
cycle cycle
TX data
RX data
cycle
Listen
c
Wait data
112/04/18Jang Ping Sheu86
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
87 112/04/18Jang Ping Sheu
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
88 112/04/18Jang Ping Sheu
MAC protocols for WSN Asynchronous MAC protocols
No synchronization or coordinate schedule between neighbor nodes
S-MAC,T-MAC, B-MAC, … Synchronous MAC protocols
Time synchronization is achieved externally or synchronization is managed by specific node
TRAMA, DMAC, …
89 112/04/18Jang Ping Sheu
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
90 112/04/18Jang Ping Sheu
TRAMA
Nodes need globally synchronized Time divided into:
Random access periods Scheduled access periods
Three main protocols: Neighbor Protocol (NP) Adaptive Election Algorithm (AEA) Schedule Exchange Protocol (SEP)
91 112/04/18Jang Ping Sheu
TRAMA
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 112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
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
112/04/18Jang Ping Sheu
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
95 112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
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 112/04/18Jang Ping Sheu
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
100 112/04/18Jang Ping Sheu
TRAMA- Summary Advantages
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
Disadvantages Higher delay problem Substantial memory/CPU requirements for schedule
computation
101 112/04/18Jang Ping Sheu
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
102 112/04/18Jang Ping Sheu
103
DMAC
The data forwarding interruption problem (DFI) Only the next hop of receiver can overhear the data
transmission Nodes out of hearing range will sleep until next
cycle/interval
timeActive nodes Sleep nodes
0
μ
2μ
3μ
4μ
T+2μ
T+3μ
T+μ
source sink
In S-MAC, DFI causes sleep delay112/04/18
Jang Ping Sheu
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 (a node will only send one packet every 5μ in DMAC in order to avoid collision)
data gathering treetime
node
0
μ
2μ
3μ
4μ
source sink
5μ
6μ
7μ
receive node send nodesleep node
sink
112/04/18Jang Ping Sheu
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
112/04/18Jang Ping Sheu
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
106 112/04/18Jang Ping Sheu
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
107 112/04/18Jang Ping Sheu
MAC 特性比較
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
108 112/04/18Jang Ping Sheu
112/04/18Jang Ping Sheu109
References1. 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,”