medium access control in wireless sensor networks & challenges
TRANSCRIPT
![Page 1: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/1.jpg)
Medium Access Control in Wireless Sensor Networks &
challenges!
Prof. Congduc Pham!http://www.univ-pau.fr/~cpham!
Université de Pau, France!!
Autumn school!“Sensor Networks, measures &
environment” !LabSTICC, UBO, Brest!
October 26th, 2012!
![Page 2: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/2.jpg)
Les couches d’accès au support dans les réseaux de
capteurs sans fils et les défis associés!
Prof. Congduc Pham!http://www.univ-pau.fr/~cpham!
Université de Pau, France!!
École d’automne!“Réseaux de capteurs, mesures et
environnement” !LabSTICC, UBO, Brest!
26 octobre, 2012!
![Page 3: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/3.jpg)
3
WSN are ad-hoc networks!
q Infrastructure-less networks!q MANET (Mobile Adhoc NETworks)!
![Page 4: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/4.jpg)
4
Wireless Medium is a Shared Medium!
Collisions when multiple transmissions Need to control access to the medium
![Page 5: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/5.jpg)
5
Multiple Access Schemes!
q 3 orthogonal Schemes: q Frequency Division Multiple Access
(FDMA)!q Time Division Multiple Access (TDMA)!q Code Division Multiple Access
(CDMA)!
![Page 6: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/6.jpg)
6
Frequency Division Multiple Access!
q Each mobile is assigned a separate frequency channel for the dura7on of the call
q Sufficient guard band is required to prevent adjacent channel interference
q Usually, mobile terminals will have one downlink frequency band and one uplink frequency band
q Different cellular network protocols use different frequencies q Frequency is a precious and scare resource. We are running out
of it
frequency �
![Page 7: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/7.jpg)
7
Time Division Multiple Access!
• Time is divided into slots and only one node transmits during each slot!
• Each user is given a specific slot. No competition!
Guard 7me – signal transmiGed by mobile terminals at different loca7ons do no arrive at the base sta7on at the same 7me�
![Page 8: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/8.jpg)
8
Code Division Multiple Access!
q Use of orthogonal codes to separate different transmissions q Each symbol of bit is transmiGed as a larger number of bits using the
user specific code – Spreading q Bandwidth occupied by the signal is much larger than the informa7on
transmission rate q But all users use the same frequency band together�
Orthogonal among users �
![Page 9: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/9.jpg)
9
Review of Communication Architecture!
Routing protocols!
Medium Acces !Control!
![Page 10: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/10.jpg)
10
Other wireless network technologies!
q Mobile phone !q GSM, !q 3G!q LTE, 4G,…!
q Bluetooth!q Wifi 802.11!
![Page 11: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/11.jpg)
11
Downlink
Uplink
Channels �
0 1 2 3 4 5 6 7 0 7 … …
8 Time Slots per frame
Duration of a TDMA frame = 4.62 ms
time
GSM (2G)!
![Page 12: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/12.jpg)
12
3G and beyond!
q 3G and beyond use CDMA techniques!
uplink
Voice Data
CDMA codes (Walsh) 1 2 3
![Page 13: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/13.jpg)
13
Bluetooth!
q 802.15 : Personal Area Network!q 802.15.1 -> 802.15.3!
q Master-slave, Piconet organization!
q Master will poll slaves for data!
![Page 14: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/14.jpg)
14
Wifi 802.11!
q Uses CSMA/CA, a contention-based access method!
Access Point
![Page 15: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/15.jpg)
15
CSMA/CA!
q Collision Avoidance with RTS/CTS to limit the hidden terminal problem!
q DCF (Distributed Coordination Function)!
source
others
DATA DIFS
ACK SIFS
wait
Backoff
SIFS
CTS
RTS SIFS
NAV (RTS) NAV (CTS) NAV (Données)
random
destination
![Page 16: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/16.jpg)
16
What technology for WSN?!
q TDMA is possible but wastes a lot of resources, difficult to scale!
q FDMA is not very flexible for dynamic, spontaneous ad-hoc networks!
q CDMA is not very suitable for ad-hoc network, without master or base stations!
q Wifi consumes a lot of energy, but the contention-based access seems the most suitable!
![Page 17: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/17.jpg)
Medium Access Control in IEEE 802.15.4
![Page 18: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/18.jpg)
Principles • IEEE 802.15.4 MAC defines the following data transfer models – To/From coordinator node – Peer-‐to-‐peer
• The coordinator mode defines a star tolopogy and severals MAC mechanisms can be used: beacon and non-‐beacon mode, GTS,…
• Peer-‐to-‐Peer data transfer model allows any node to communicate with other nodes provided that they are in (radio) communica7on range. Non-‐beacon unsloGed CSMA/CA is used.
![Page 19: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/19.jpg)
Supported topologies
Figure from IEEE document standard on 802.15.4
Figure from IEEE document standard on 802.15.4
![Page 20: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/20.jpg)
Beacon-‐enabled PAN • “The standard allows the op7onal use of
a superframe structure. The format of the superframe is defined by the coordinator.”
• “The superframe is bounded by network beacons sent by the coordinator (see Figure 4a) and is divided into 16 equally sized slots. Op7onally, the superframe can have an ac7ve and an inac7ve por7on (see Figure 4b).”
• “The beacon frame is transmiGed in the first slot of each superframe. If a coordinator does not wish to use a superframe structure, it will turn off the beacon transmissions.”
Figure and text from IEEE document standard on 802.15.4
![Page 21: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/21.jpg)
Beacons-‐mode and CAP • “The beacons are used to synchronize the aGached devices,
to iden7fy the PAN, and to describe the structure of the superframes.”
• “Beacon-‐enabled PANs use a sloGed CSMA-‐CA channel access mechanism, where the backoff slots are aligned with the start of the beacon transmission. The backoff slots of all devices within one PAN are aligned to the PAN coordinator”
• “Any device wishing to communicate during the conten7on access period (CAP) between two beacons competes with other devices using a sloGed CSMA-‐CA mechanism. All transac7ons are completed by the 7me of the next network beacon.”
Text from IEEE document standard on 802.15.4
![Page 22: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/22.jpg)
Hybrid access • “For low-‐latency applica7ons or applica7ons requiring specific data
bandwidth, the PAN coordinator may dedicate por7ons of the ac7ve superframe to that applica7on. These por7ons are called guaranteed 7me slots (GTSs).”
• “The GTSs form the conten7on-‐free period (CFP), which always appears at the end of the ac7ve superframe star7ng at a slot boundary immediately following the CAP, as shown in Figure 5.”
• “All conten7on-‐based transac7ons is completed before the CFP begins. Also each device transmidng in a GTS ensures that its transac7on is complete before the 7me of the next GTS or the end of the CFP.”
Figure and text from IEEE document standard on 802.15.4
GTS mode needs a PAN coordinator which will allocate up to 7 GTS slots in the frame. Nodes can reserved a given number of GTS slots to send data to the PAN coordinator, which acts as the sink.
![Page 23: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/23.jpg)
Superframe defini7on • The structure of the superframe is described by the values of
macBeaconOrder and macSuperframeOrder. • The MAC PIB aGribute macBeaconOrder , describes the interval at which
the coordinator shall transmit its beacon frames. The value of macBeaconOrder, BO , and the beacon interval, BI, are related as follows: for 0≤ BO ≤ 14, BI = aBaseSuperframeDuration * 2BO symbols.
• PANs that do not wish to use the superframe structure (referred to as a non beacon-‐enabled PAN) shall set both macBeaconOrder and macSuperframeOrder to 15. Transmissions use unsloGed CSMA/CA and GTSs shall no be permiGed.
Figure and text from IEEE document standard on 802.15.4
![Page 24: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/24.jpg)
Beacon, Data and ACK frame structure
Figure and text from IEEE document standard on 802.15.4
![Page 25: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/25.jpg)
25
802.15.4 MAC is far from perfect!
q Radio circuits, if always on, can consume all the battery’s energy!
q WSN have a very sporadic behavior: idle for a long period of time, then burst of data!
q Passive listening, i.e. receiving a packet that is not for you, can consumes as much as energy than packet transmission!!
![Page 26: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/26.jpg)
Duty-‐cycled MAC based on CSMA(/CA), with op7onal
beacons
![Page 27: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/27.jpg)
listen sleep
listenInterval
listen sleep listen
sleepInterval
cycleLength=listenInterval+sleepInterval listenInterval=dutyCycle*cycleLength -> cycleLength=listenInterval/dutyCycle sleepInterval=listenInterval/dutyCycle-listenInterval -> sleepInterval=listenInterval*(1-dutyCycle)/dutyCycle
Radio module
Principles • Alternate « listen » and « sleep » periods. In « sleep » period, the radio is
shut off to save energy • Note: most of duty-‐cycled MAC means duty-‐cycling the radio module, not
the MAC module • Op7onal beacons can be used as a « preamble » to inform the receiver of
imminent data packet arrival. This preamble length should usually be at least longer than the sleep period. See the Low Power Listening sec7on for more informa7on.
![Page 28: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/28.jpg)
Wireless channel
Example with op7onal beacons
listen Radio module SENDER
MAC module
Network module
RECEIVER Radio module
MAC module
Network module
sleep listen sleep
beacon
be
acon
be
acon
be
acon
CS If carrier sense == CLEAR, send beacons before DATA
remainingBeaconsToTx=(int)ceil(sleepInterval*beaconIntervalFraction/beaconTxTime)
beacon
TX
DATA
DA
TA
If not in TX suspend the duty-‐cycled behavior, cancel any pending CS
beacon
be
acon
sleep
0≤beaconIntervalFrac7on≤1, could improve the way beacons are sent: back-‐to-‐back, following a given paGern.
Therefore, extending the listen period to get the data.
TX
TX
If pending packet to transmit
sleep listen Otherwise, resume the listen/sleep paGern
![Page 29: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/29.jpg)
Synchronized MAC: SMAC, TMAC,...
![Page 30: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/30.jpg)
S-‐MAC -‐ Sensor MAC
• Nodes periodically sleep such as duty-‐cycled approach
• Proposes a synchroniza7on mechanisms between neighboring nodes to leverage the issues related to unsynchronous duty-‐cycled approaches
• Synchroniza7on issues can become tough, nodes can be synchronized to 2 masters
![Page 31: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/31.jpg)
Choosing and Maintaining Schedules
• Each node maintains a schedule table that stores schedules of all its known neighbors.
• To establish the ini7al schedule (at the startup) following steps are followed: – A node first listens for a certain amount of 7me. – If it does not hear a schedule from another node, it randomly chooses a schedule and broadcast its schedule immediately.
– This node is called a SYNCHRONIZER.
![Page 32: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/32.jpg)
• If a node receives a schedule from a neighbor before choosing its own schedule, it just follows this neighbor’s schedule.
• This node is called a FOLLOWER and it waits for a random delay and broadcasts its schedule.
• If a node receives a neighbor’s schedule arer it selects its own schedule, it adopts to both schedules and broadcasts its own schedule before going to sleep.
![Page 33: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/33.jpg)
Synchronizing with schedules listenTimeout
sleep
sleepInterval
Radio module SYNCHRONIZER
ac7ve
Radio module FOLLOWER
Radio module FOLLOWER
SYNC_TMAC_PACKET (T1)
frameTime T0 T1
ac7ve
SYNC_TMAC_PACKET (T1)
SYNC_TMAC_PACKET (T1)
sleep ac7ve ac7ve
sleep ac7ve ac7ve
![Page 34: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/34.jpg)
Timing Rela7onship of Possible Situa7ons
![Page 35: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/35.jpg)
T-‐MAC -‐ Timeout MAC
• Transmit all messages in bursts of variable length and sleep between bursts
• Synchroniza7on similar to S-‐MAC but reduces the listening period if no ac7vity is detected
Delayed TX! Assume re-TX!
![Page 36: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/36.jpg)
Low Power Listening MAC: LPL, BMAC, XMAC, ...
![Page 37: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/37.jpg)
Principles
• Low Power Listening usually refers to the usage of a preamble to announce an imminent data packet
• Can be similar to duty-‐cycled with beacon packet, but strictly speaking, LPL needs radio capabili7es to listen for the preamble with a lower energy consump7on
• Need to dis7nguish preamble from noise floor
![Page 38: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/38.jpg)
LPL illustrated
From R. Kuntz
![Page 39: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/39.jpg)
B-‐MAC
• Berkeley-‐MAC, based on LPL
• Improved LPL with Clear Channel Assessment • Measures the SNR by taking a moving average when there seems to
be no traffic • Reduces the number of false nega7ve
• Known problems • Long preamples are
constly for the sender • High cost of collisions
due to long preamples • S7ll the overhearing
problem
overhearing
![Page 40: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/40.jpg)
Overhearing avoidance
• Include destination address in short preambles • Non-receiver avoids overhearing
![Page 41: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/41.jpg)
Early ACK
• Receiver acknowledges preamble à Sender stops sending preamble
![Page 42: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/42.jpg)
Lot’s of variants!!
C. Cano, B. B
ellalta
, A. Sfairo
poulou
, M. O
liver. Low
ene
rgy op
era7
on in W
SNs:
A survey of p
ream
ble sampling MAC
protocols. Com
puter N
etworks, 55(2011).
Elsevier
![Page 43: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/43.jpg)
Lot’s of variants, con’t
• Packet-‐dependent behavior • Duty-‐cycle length adapta7on
– Based on traffic load – Based on topology informa7on
• Adapted for broadcast traffic – Hash of data in short packets – Iden7fy « best » receiver for early ACK
• Combined with synchronized approaches
![Page 44: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/44.jpg)
47
Challenges for MAC protocols in WSN (1)!
q Energy efficiency!q Low latencies!q Fairness!!! A CHALLENGE FOR MISSION-CRITICAL
APPLICATION t0 t1
![Page 45: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/45.jpg)
48
Challenges for MAC protocols in WSN (2)!
q Synchronous MAC!q Adds latency!q Difficult to maintain sync along the
path!q Duty-cycle length adaptation!
q How to adapt?!q Both traffic-based or topology-
based do not take into account criticality!
![Page 46: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/46.jpg)
49
Image sensors for mission-critical surveillance!
q Intrusion detection, identification, disambiguation!
q Situation awareness!
![Page 47: Medium Access Control in Wireless Sensor Networks & challenges](https://reader033.vdocuments.fr/reader033/viewer/2022042318/625cb927fa71ef37a61635a7/html5/thumbnails/47.jpg)
50
Our current research on MAC layer!
q Duty-cycled MAC (e.g. SMAC)!
!q Link the listening time to the
criticality model!
Listen Sleep t Listen Sleep
Neighbors of a sentry nodes should have longer listening time. Can optimize for nodes on the path to the sink.