Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 Chapter 3 MAC (Media Address Control) Layer

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. 802.15.4 適用於感測網路的特性  3.6. MAC protocols for WSN  3.7. Homework Assignment - LEACH 2

3 Chapter 3 Outline  3.1. 802.11 碰撞議題相關研究  3.2. 802.11 MAC 機制  3.3. 802.11 節能、省電議題相關研究  3.4. 802.15.4 MAC  3.5. 802.15.4 適用於感測網路的特性  3.6. MAC protocols for WSN  3.7. Homework Assignment - LEACH 3

4 Collision avoidance 4 Reservation based Contention based Hybrid TDMA 、 FDMA 、 CDMA (Slotted)ALOHA 、 CSMA 、 MACA DAMA

5 Reservation based  TDMA → 一個點可以用到的較多頻寬,輪到時間較短。 5 F( 頻帶 ) T( 時間 ) 1 2 3 4 … n 1

6 Reservation based  FDMA → 一個點可以一直傳送,但頻寬較少。 6 Guard Band F( 頻帶 ) T( 時間 )

7 CDMA can transmission in the same space and time FDMA 、 TDMA can use resource Reservation based  CDMA 7 Code Frequency Time

8 Hybrid  DAMA (Demand Assigned Multiple Access) Two phase 1) Contention-based use slotted ALOHA 2) Reservation-based use reservation list Disadvantage : maintain reservation list 。 8 Slotted ALOHA Slotted ALOHA Slotted ALOHA reserved time

9 Contention based  Pure ALOHA 當想要傳送 Data 時就直接往外傳送。 特點: traffic load low → 成功率高,反之碰撞率高  Slotted ALOHA 加入 slotted 概念,在每個 slot 的開始點才可以傳送。 特點:改善了隨時隨地都有可能有結點來撞封包的缺點。 9 0.4 0.3 0.2 0.1 00.51.01.52.0 3.0 G (Attempts per Packet Time) S (Throughput per Packet Time) Slotted ALOHA Pure ALOHA

10 Contention based  1-persistent CSMA  When medium is  Idle → Transmit  Busy → Continue listening(Carrier Sense)  Non-persistent CSMA  When medium is  Idle → transmit  Busy →Wait an amount of time drawn from a probability distribution and repeat to listen 10

11 Contention based  p-persistent CSMA  When medium is  Idle → transmit probability :  transmit probability : p  defer probability : 1−p  Busy → listen until medium is idle 11 Note : For 1-persistent CSMA Transmit probability 1) transmit probability : 1 2) defer probability : 0 Note : For 1-persistent CSMA Transmit probability 1) transmit probability : 1 2) defer probability : 0

12 Contention based  MACA (Multiple Access with Collision Avoidance)  NAV (Network Allocation Vector) RTS CTS GET RTS- Can transmit Disadvantage : GET CTS- Can’t transmit Can’t check frame GET CTS and RTS- Can’t transmit transmission success or not 12 SenderReceiverSenderReceiver

13 Chapter 3 Outline  3.1. 802.11 碰撞議題相關研究  3.2. 802.11 MAC 機制  3.3. 802.11 節能、省電議題相關研究  3.4. 802.15.4 MAC  3.5. 802.15.4 適用於感測網路的特性  3.6. MAC protocols for WSN  3.7. Homework Assignment - LEACH 13

14 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 LLCMAC Layer 1 Physical layer (Wireless STD) 14

15 802.11 訊框結構 (Frame Structure) 15 2 byte 6+6+6 byte2 byte6 byte0 ~ 2312 byte4 byte 2 bit 4 bit1 bit VersionTypeSubtypeTo DSMF From DS RetryPwr.OW Frame control DurationAddress 1 ~ 3Seq.Address 4DataChecksum

16 802.11 訊框結構 (Frame Structure) 16 Frame type (Data 、 Control 、 Management) VersionTypeSubtypeTo DSMF From DS RetryPwr.OW Different type for each frame type (EX-in type Control has subtype - CTS/RTS)

17 802.11 訊框結構 (Frame Structure) 17 VersionTypeSubtypeTo DSMF From DS RetryPwr.OW BSS2 BSS1 STA AP1AP2 STA IBSS Distribution System Portal 802.X (EX:802.3 、 802.16) ESS To DS =0 From DS =0 To DS =1 From DS =1 To DS =0 From DS =1 To DS =1 From DS =0

18 802.11 訊框結構 (Frame Structure) 18 VersionTypeSubtypeTo DSMF From DS RetryPwr.OW More fragment? Retransmit ? Sleep ?

19 802.11 訊框結構 (Frame Structure) 19 2 byte 6+6+6 byte2 byte6 byte0 ~ 2312 byte4 byte Frame control DurationAddress 1 ~ 3Seq.Address 4DataChecksum Long 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 802.11 傳遞模式  Super frame  Point Coordination Function (PCF)  By AP polling  ( 聽 Beacon 封包來決定 PCF 開始否 )  Distributed Coordination Function (DCF)  Use contention  ( 聽 CF_END 封包來決定 DCF 開始否 ) 20

21 802.11 傳遞模式 21 AP time Beacon PCF period DCF period, 節點與節點間傳送是互相競爭傳送權的 CF_ENDBeacon STA2 NAV STA1 PCF period, 根據排程好的傳送者進行傳送 DCF period Super frame PCF 週期中沒拿到資料傳送權的 STA ,會進入 NAV 休息狀態

22 802.11 傳遞模式 - PCF 週期 22 AP STA1 STA2 PCF Beacon DL ACK Polling UL ACKDLPollingACK UL time Polling UL ACK  DL- 下傳封包  ACK- 回應封包  Polling- 詢問是否有資料上傳  UL- 上傳封包  沒傳完的資料怎辦?  去 DCF 競爭 or 等待下一個 PCF(DCF 沒競爭到 )

23 AP STA1 STA2 time CF_ENDBeacon Data The beginning of DCF PIFS (PCF Interframe Space ), 一段固定的等待時間, (DIFS > PIFS) Defer beacon Random backoff, 亂數等待時間 DIFS (DCF Interframe Space ), 一段固定的等待時間 802.11 傳遞模式 - PCF 週期 23

24 Piggyback 機制  Problem in Original PCF ?  封包來回傳遞太多次,浪費資源。  One frame in multi message  Piggyback 24 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 )

25 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) 25 SIFS PIFS DIFS time 1 st Priority2 nd Priority3 rd Priority

26 Random backoff 機制  Backoff Counter :  when network busy → B.C. freeze  network idle → B.C. decrease 26 STA1 STA2 STA3 STA4 BC=5 BC=3 BC=2 BC=3 BC=5 DIFS

27 CSMA/CA with RTS/CTS  Hidden terminal problem → Collision  Exposed terminal problem → Waste bandwidth 27 AB C D ABCD C can send data. But carrier the network is busy

28 CSMA/CA with RTS/CTS  Solve hidden terminal problem  High Overhead 28 Sender Receiver Sender Neighbor Receiver Neighbor SenderReceiver NAV(RTS) [LOCK] NAV(CTS) [LOCK] RTS CTS Data ACK time

29 Chapter 3 Outline  3.1. 802.11 MAC 機制  3.2. 802.11 碰撞議題相關研究  3.3. 802.11 節能、省電議題相關研究  3.4. 802.15.4 MAC  3.5. 802.15.4 適用於感測網路的特性  3.6. MAC protocols for WSN  3.7. Homework Assignment - LEACH 29

30 802.11 內建省電模式  In 802.11 Power Saving mode  802.11 Infrastructure mode 的省電模式  Have AP  Ad-hoc mode 的省 802.11 電模式  Only node 30

31 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 31 0 : no data 1 : have data

32 802.11 Ad-hoc mode 的省電模式 32 Data STA1 STA2 STA3 TBIT window ATIM window Beacon interval Beacon ATIM ATIM_ACK Beacon time Beacon interval DATA /ACK SleepActive ACK

33 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 33

34 Chapter 3 Outline  3.1. 802.11 MAC 機制  3.2. 802.11 碰撞議題相關研究  3.3. 802.11 節能、省電議題相關研究  3.4. 802.15.4 MAC  3.5. 802.15.4 適用於感測網路的特性  3.6. MAC protocols for WSN  3.7. Homework Assignment - LEACH 34

35 IEEE 802.15.4 MAC  Architecture IEEE 802.15.4 MAC Applications ZigBee Network IEEE 802.15.4 PHY Channel acquisition Contention Window 35

36  Architecture IEEE 802.15.4 MAC Applications ZigBee Network IEEE 802.15.4 PHY Device join and leave Frame routing And so on 36 IEEE 802.15.4 MAC

37 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 37 IEEE 802.15.4 MAC

38 FFD RFD Communications flow Master/slave PAN coordinator 38 IEEE 802.15.4 MAC - Star Topology

39 Point to point Cluster tree PAN coordinators FFD RFD Communications flow 39 IEEE 802.15.4 MAC – Tree and Mesh Topologies

40 Coordinator MAC Device MAC Association request Transfer mode – Association  If device wait a aResponseWaitTime and no any Association response, then Association failure ACK aResponseWaitTime Data request ACK Association response ACK 40

41 Transfer mode – Disassociation 41 Device MAC Disassociation Notification  If device want Disassociation, then disassociated even if the acknowledgment is not received  If coordinator want to disassociate device then disassociated device and waits device request Coordinator MAC ACK By Device: By Coordinator: Beacon frame (with Disassociation ) Disassociation Notification Data request ACK

42 Coordinator MAC Device MAC Data request Transfer mode – Synchronizing Beacon(with data pending) Beacon Timer to expire before the next beacon single synchronization track synchronization 42

43 CAPCFP Active portionInactive portion Beacon interval GTS Beacon frame CAP ︰ Contention-Access Period CFP ︰ Contention-Free Period GTS ︰ Guaranteed Time Slot Transfer mode – Superframe structure 43

44 Transfer mode – GTS Concepts  Beacon interval = aBaseSuperframeDuration × 2 SO symbols  aBaseSuperframeDuration 為 IEEE 802.15.4 預設參數。  Active portion 的長度為 : aBaseSuperframeDuration × 2 BO symbols (SO ≦ BO ≦ 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 44

45 Transfer mode – GTS Allocation  If and only if PAN coordinator has enough capacity is available for the requested GTS  GTSs shall be allocated on a first-come-first-served basis by the PAN coordinator 45 Coordinator MAC Device MAC GTS request ACKBeacon(with GTS descriptor)

46 Transfer mode – GTS deallocation  PAN coordinator shall update the final CAP slot subfield of the superframe 46 Coordinator MAC Device MAC GTS release ACKBeacon(with GTS descriptor)

47 Transfer mode – GTS reallocation  The deallocation of a GTS may result in the superframe becoming fragmented. 47 CAPCFP GTS1GTS2GTS3 81013

48 Transfer mode – GTS reallocation 48 CAPCFP GTS1GTS3 1113 Maximize CAP

49 Data Transfer Model - Channel Access  Non Beacon-enable networks  No beacon frame  unslotted CSMA/CA channel access mechanism  Beacon-enable networks  With beacon frame  Slotted CSMA/CA channel access mechanism 49

50 Slotted CSMA/CA Algorithm  Every device in the PAN shall be aligned with the superframe slot 50

51 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(2 BE -1) periods NB=0 BC=3 BC=1 CW=1 CW=0 NB=1 BE=BE+1 CW=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) Beacon Inactive portion 51

52 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 STA2 BC=1 CW=1 CW=0 BC=6 CW=0 CW=1 LIFS Beacon Inactive portion 52

53 Slotted CSMA/CA Algorithm IFS(interframe space) 53 Long frame  Acknowledgement transmission:  Unacknowledgement transmission: t ack ACK LIFS Short frame t ack ACK SIFS Long frame LIFS Short frame SIFS

54 NB=0, CW=2 CSMA/CA BE=macMinBE Locate backoff Period boundary Delay for random(2 BE -1) unit backoff period Perform CCA on backoff period boundary Channel idle? CW=2,NB=NB+1 BE=min(BE+1, macMaxBE) NB> macMaxCSMABackoffs? CW=CW - 1 CW=0? Failure Success Y Y Y NN N Slotted CSMA/CA Algorithm 54 CCA: Clear Channel Assessment

55 Coordinator MAC Device MAC 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

56 Coordinator MAC Device MAC Beacon frameData 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. Data request ACK 56

57 Coordinator MAC Device MAC ACK FP=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 Pending ACK FP=1 Data request Data ACK 57

58 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

59 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

60 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 … aMaxFrameRetries times before failure

61 Chapter 3 Outline  3.1. 802.11 MAC 機制  3.2. 802.11 碰撞議題相關研究  3.3. 802.11 節能、省電議題相關研究  3.4. 802.15.4 MAC  3.5. 802.15.4 適用於感測網路的特性  3.6. MAC protocols for WSN  3.7. Homework Assignment - LEACH 61

62 感測網路的問題  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  Main issue: Energy-efficient, Scalability and adaptability  Secondary issue : latency, throughput, and bandwidth utilization…etc. 62

63 感測網路的問題 - 能源浪費的原因  Collision  Overhearing  Control-packet overhead  Over emitting  The major problem is “idle listening” 63

64 standard802.15.4802.11b802.15.1 Application Focus Monitoring & Control Web, Email, Video Cable Replacement Battery Life(days) 100-1000+0.5-51-7 Network Size> 1000< 100 < 10 Bandwidth (KB/s) 25011,000+720+ Success Metrics Reliability, Power Speed, Flexibility Cost, Convenience 802.15.4 適用於感測網路之特性 Comparison Between WPAN 64

65 References [1] Sinem Coleri Ergen, “ ZigBee/IEEE 802.15.4 Summary ” [2] 曾煜棋, 潘孟鉉, 林致宇, “ 無線網域及個人網路 - 隨意及感測網路之技 術與應用 ”, 知城 [3] ATMEL, “ IEEE 802.15.4 MAC user guide ” [4] IEEE Std 802.15.4-2003 [5] IEEE Std 802.15.4-2006 [6] 華亨科技股份有限公司,“ZigBee 無線定位開發系統 IEEE802.15.4 標準 & ZigBee 協定規範 ” 65

66 Chapter 3 Outline  3.1. 802.11 MAC 機制  3.2. 802.11 碰撞議題相關研究  3.3. 802.11 節能、省電議題相關研究  3.4. 802.15.4 MAC  3.5. 802.15.4 適用於感測網路的特性  3.6. MAC protocols for WSN  3.7. Homework Assignment - LEACH 66

67 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, …etc 67

68 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. 68

69 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 69

70 S-MAC  Locally managed synchronizations periodic sleep– listen schedules  Virtual cluster SleepActive Listen sleep time AC B D Cluster 1 Cluster 2 70

71 S-MAC  Every node should wakeup in Listen period  Synchronization period  Control period (RTS/CTS) 71 Listen period sender 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 71

72 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 23543 sender Receiver Neighbor of receiver sleep RTS CTS Transmit data ACK okRe-transmit 3 72

73 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. 73

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

75 S-MAC  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 75

76 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 76

77  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 77 TA sleep Listen sleep time RTS CTS TA Cycle period Transmit data / ACK 77

78 78 Timeout T-MAC TA = 1.5 (T contention interval + T RTS + T RTS2CTS )

79 Timeout T-MAC  The data forwarding problem  Early sleeping problem, A sends data to D 79 RTSCTS 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 D TASleep awake Sleep TA 79

80 Timeout T-MAC  Solution of early sleeping problem  Future request-to-send (FRTS)  Forwarding node use FRTS awake next hop node and destination node 80 RTSCTS Transmit data / ACK FRTSData-Send packet, avoid collision Node A Node B Node C Node D awake Sleep TA 80

81 Timeout T-MAC  Taking priority on full buffers  When a node’s transmit/routing buffers are almost full, it may prefer sending to receiving RTSCTS Transmit data / ACK Node A Node B Node C Node D TA Buffer Full 81

82 Timeout T-MAC  Locally time synchronization between neighbors  Power saving method :  Dynamic wakeup/sleep interval  Transmit Characteristic :  Contention transmission through CSMA 82

83 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 83

84 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 84

85 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 85

86 Low Power Listening: Preamble Sampling Sender Receiver Preamble Send data Preamble sampling Active to receive a message S R |Preamble| ≥ Sampling period  Preamble is not a packet but a physical layer RF pulse  Minimize overhead 86

87 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 ms 87

88 B-MAC  Clear channel assessment (CCA) can be turned on/off  If turned off, a scheduling protocol may be implemented above B-MAC  If turned on, initial channel backoff when sending a message  B-MAC does not set the backoff time, but signals an event to the higher service that sent the packet  The higher level service may return an initial backoff time or ignore the event  If ignored, use a short random delay  After the initial backoff, the CCA outlier algorithm is run. If the channel is not clear, an event signals the service for a congestion backoff time.  If no backoff time is given, again a small random backoff is used 88

89 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 89 sender receiver Listen TX preamble Sender arrive RX preamble cycle TX data RX data cycle Listen c Wait data 89

90 B-MAC  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 90

91 B-MAC  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 91

92 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 92

93 TRAMA  TRAMA reduces energy consumption by ensuring that unicast and broadcast transmissions incur no collisions  TRAMA assumes that time is slotted and uses a distributed election scheme  TRAMA avoids assigning time slots to nodes with no traffic to send 93

94 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) 94

95 TRAMA 95 Random access periodScheduled access period cycle Learning about their two-hop neighborhood Using neighborhood exchange protocol (NP) Update information in randomly selected time slots Nodes exchange schedules Using 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 95

96 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 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 96

97 TRAMA  Inconsistency problem  Both A and D could transmit in the timeslot because they have the highest priority in their two hop neighbors B A C D Priority 100 Priority 95 Priority 79 Priority 200 97

98 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 B A C D Priority 100 Priority 95 Priority 79 Priority 200 Sleep 98

99 99 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

100 TRAMA  During time slot is 1000  When SCHEDULE_INTERVAL is 100  The node need to compute the transmitting slots between [1000,1100] 100910301033106410751098 SCHEDULE_INTERVAL 10001100 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 100

101 TRAMA  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 transmit other 101

102 TRAMA  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 hop.  Higher delay problem  Substantial memory/CPU requirements for schedule computation 102

103 DMAC  DMAC achieve 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 103

104 104 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 time Active nodes Sleep nodes 0 μ 2μ2μ 3μ3μ 4μ4μ T+2μ T+3μ T+μT+μ sourcesink In S-MAC, DFI causes sleep delay.

105 105 DMAC  Staggered Wakeup Schedule  Local data exchange and aggregation  Dispatch of control packets and interest packets from sink  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 sink

106 106 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. RXTXRXTX sleep RXTXRXTX sleep RXTXRXTX sleep RXTXRXTX sleep time sink sleep More data flag

107 DMAC  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 107

108 DMAC  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. 108

109 Chapter 3 Outline  3.1. 802.11 MAC 機制  3.2. 802.11 碰撞議題相關研究  3.3. 802.11 節能、省電議題相關研究  3.4. 802.15.4 MAC  3.5. 802.15.4 適用於感測網路的特性  3.6. MAC protocols for WSN  3.7. Homework Assignment - LEACH 109

110 Homework Assignment  Extension reading Wireless Sensor MAC protocol paper  LEACH (Low-Energy Adaptive Clustering Hierarchy) 110 Energy-Efficient Communication Protocols for Wireless Microsensor Networks W. Rabiner Heinzelman, A. Chandrakasan, H. Balakrishnan, Hawaii International Conference on System Sciences (HICSS '00), January 2000 110

111 Homework Assignment - LEACH  LEACH uses TDMA and CDMA for data transmission, and it divide network into clusters  Localized coordination and control for cluster set-up and operation  Randomized rotation of the cluster “base stations” or “cluster-heads” and the corresponding clusters  Local compression to reduce global communication 111

112 Homework Assignment - LEACH  Global time synchronization and Clustering-based TDMA transmission schedule  Power saving method :  Distribute energy dissipation evenly among the sensors  Incorporates data fusion into the routing protocol to reduce the amount of information that must be transmitted to the base station  Transmit Characteristic:  Hierarchical communication structure  Clustering-based contention-free TDMA and CDMA 112

113 Homework Assignment - LEACH 113

114 Homework Assignment - LEACH  Hierarchical transmission mode  Each cluster head will aggregate data of members and transmit to sink 114 sink Cluster head 1 Cluster head 2 …… Cluster head n Member 1 Member 2 Member m …… Cluster heads use CDMA code, and relay all member’s data to other cluster or sink Cluster 1 114

115 Homework Assignment - LEACH 115 Advertisement phaseCluster setup phaseBroadcast schedule Time slot 1 Time slot 2 Time slot 3 Setup phaseSteady-state phase Self-election of cluster heads Cluster heads compete with CSMA Members compete with CSMA Cluster head Broadcast CDMA code to members Fixed-length cycle 115

116 Homework Assignment - LEACH  Cluster-head election process  A sensor determines whether to become a cluster head by generating a random number  and compare this value with a threshold  A node becomes a cluster head if the random number is less than the threshold the set of nodes that have not being selected as a cluster-head in the last r rounds. P: the desired percentage to become a cluster-head; r: the current round116116116 116

117 Homework Assignment - LEACH  Advantage  Total low energy consumption  Low collision problem  Disadvantage  Need time synchronization  Not able to cover large geographical area because cluster head cannot reach sink 117

118 MAC 特性比較 118 Time sync needed type Adaptive to changes S-MAC/ T-MAC noCSMAGood B-MACnoCSMA/CCAGood WiseMACnonp-CSMAGood TRAMAyesTDMA/CSMAGood DMACyes TDMA/ Slotted Aloha weak LEACHyesTDMA/CDMAweak  Comparison of MAC protocols 118

119 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,” 119


Download ppt "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."

Similar presentations


Ads by Google