WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 1
Medium Access Control For Sensor
Network
9/21/2019
Dr. Vrince Vimal
Computer Science and Engineering
At the end of this unit, we would be able
to understand following
-Fundamentals of MAC protocols
- Low duty cycle protocols and wakeup concepts
– Contention based protocols
- Schedule-based protocols - SMAC - BMAC
- Traffic-adaptive medium access protocol (TRAMA) -
The IEEE 802.15.4 MAC protocol
- Zigbee protocol
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 2
Classification Of MAC
• MAC are classified as follows
• Scheduled based MAC
• Contention Based MAC
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 3
Scheduled based MAC
• Based on a-priory condition or scheduling
• Central authority or access point regulates medium
access.
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 4
• Eg. TDMA
• Access point
• Node a
• Node b
• Node c
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 5
Scheduled based MAC
Frame
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 6
Contention Based MAC
▪ No open or fixed time lot is available
▪ Node has to content for access to the Medium
▪ Data transmitted in On-demand fashion
Contention Based MAC
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 7
Why MAC for WSN
• Multi-hop Network
• Energy Constraint
• Ad-hoc deployment of 1000s of node. (Self Org)
• In WSN MAC must achieve two goals
• Create network infrastructure
• Allow fair and efficient sharing of resources.
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 8
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 9
Energy Efficiency
• Reasons for waste of energy
➢ Idle Listening
➢ Collisions
➢ Overhearing
• Source of energy waste
➢ Protocol over head
➢ Traffic fluctuations
MAC Performance
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 10
• For Efficient operations sensor network need to provide
certain operational guarantee to achieve benchmark.
• Following are the key features of MAC
➢Effective collision avoidance.
➢Scalability and adaptability.
➢Efficient Channel utilization
➢latency
MAC Performance
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 11
➢ Throughput & fairness.
• Energy performance and trade-off
➢ Number of Physical channels used.
➢ Degree of Organization between nodes
➢ The method of notifying node of incoming
message,
MAC protocol for WSN
• Contention Based
• TDMA variants
• S-MAC and Variants
• Self Organizing MAC
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 12
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 13
Contention Based MAC
• Preamble Sampling
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 14
Contention Based MAC
• WISEMAC
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 15
TDMA Variants
• EMACS
Time slots are divided into
➢ Contention Phase
➢ Traffic control section
➢ Data section
• LMACS
➢ Every sensor node has pre-allocated time slot,
➢ All sensor nodes have a time slot
• AI- LMAC
➢ Adaptive
➢ No. of slots vary according to traffic conditiond
➢ Allocation done locally on node level
➢ Upto 3 hops with no overlapping timeslots
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 16
TDMA Variants
• Z-MAC
➢ Nodes are allocated some time slots but can utilize any
time slot using CSMA
• TRAMA (Traffic Adaptive Medium Access)
➢ Node broadcasts id of neighbours and traffic through
them.
➢ Each node is aware of its 2 hop neighbour.
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 17
S-MAC
• Sensor Medium Access Control
• Designed specifically for WSN
• Primary goal: Energy efficiency
Disadvantages of existing Scheme
• TDMA: Useless in high node density app
• FDMA: Ineffective B/W utilization
• 802.11: idle listning
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 18
SMAC & Variants
• S-MAC
➢ Assumes node have single operation and have long idle
periods.
➢ Virtual clustering to manage sync.
➢ Coarse –grained sleep/wakeup cycle to allow node to
sleep longer to save energy.
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 19
SMAC & Variants
• Dynamic S-MAC
➢ Nodes assume dynamic duty cycle owing to traffic
conditions and energy conditions
• Timeout -MAC
➢ It uses timer to acknowledge end of active period
instead of relying on fixed duty cycle scheme.
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 20
S-MAC Features
▪ Periodic Listening
▪ Overhearing avoidance
▪ Collision avoidance
▪ Message Passing
▪ Trade- off
▪ Latency, fairness Energy efficiency
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 21
S-MAC Design
▪ Idle listening wastes energy solution Periodic Listening
SleepListen Listen
T f
• Turnoff radio while asleep
• Reduced duty cycle by10%
• Preferably neighbouring nodes follow same duty cycle.
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 22
Choosing and Maintaining Schedule
▪ Nodes exchange their schedule by periodically broadcasting
sync packets.
▪ Node select their schedule by following 2 steps.
▪ Listen for sync packet for fixed duration of time.
▪ Condition 1: No sync packet
▪ Condition 2: Sync packet received
▪ Condition 3: Multiple Sync received
▪ Schedule-1 Schedule-2
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 23
S-MAC Design- Listen and Sleep
cycle
Receiver For sync For RTS For CTS
Listen
Sleep
Sender-1
Sender-2
CS Tx Sync
CS Tx CTS Got CS
Sending Data
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 24
S-MAC Design; Adaptive listening
• Reduce multi-hop latency due to periodic sleep
• Neighbouring node wake up for short duration at
the end of each communication.
1 2 3 4
RTS
CTS CTS
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 25
S-MAC Design; Escaping Overhearing
• All immediate neighbours are put to sleep on
x’mission of RTS and CTS
• Neighbouring node do not over hear data and
following acknowledgements
• Duration field in packet indicates sleep duration.
RTS
CTS
1 2 3 4
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 26
S-MAC Design; Message Fragmentation
Data
Sync
Collision
1
2
3
Data/Ack Data/Ack Data/Ack Data/Ack
Contention for medium
• Large data is broken into small fragments of data.
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 27
S-MAC Design
• S-MAC achieves better energy efficiency as compared
to always listening protocols.
• S-MAC efficiently elevates the network lifetime.
1
Source node
2
Sink
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 28
T-MAC
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 29
DS-MAC
• Good latency
• Collision
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 30
Low duty Cycle and wake up concepts
• System Remains in sleep state
• Wakes up to trans-receive.
B
Sleep
Listen
T f
ListenA ➢ short beacon
➢ Frequent req
b
e
a
r
e
q
r
e
q
r
e
q
r
e
q
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 31
Wake up concepts
• Simple low-power (power less) receiver wakes up
main receiver.
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 32
Data Channels CS Other channel
idle channel → node xmitts rec id and channe id-→ rec
wakes up its transreceiver-→data trans mission starts
-→after wards transreceiver goes to sleep mode,
Bussy
Drawbacks
• No hardware available.
• Range
• Complexity
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 33
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 34
STEM & B-MAC
Assingment-1
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 35
IEEE 802.15.4
MAC
PHY
Network
Application IEEE802.15.4
IEEE802.15.4
IEEE802.15.4
IEEE802.15.4
IEEE802.15.4
ZigBee
6LoWPAN
WirelessHART
MiWi
ISA100.11a
Used by many IoT protocols:
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 36
IEEE 802.15.4
• LR WPAN
• 2.4 Ghz; 16 channels of 5 Mhz.
• 250kbps PHY→ 50kbps
• Peak current depends on bits / symbol
• Like 802.11→ DSSS; CSMA CS; beacon; coordinator
• 64 bit EUI
1b- U/M 1b- G/L 22b- OUI 40 b Manufacturer
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 37
• NO Segmentation / Reassembly
TOPOLOGIES
RFD
CO
FFD
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 38
• FFD can become coordinator and route the data packets.
• RFDs can not become coordinator and can only be a leaf.
• FFD that starts a PAN become the coordinator.
• In star topology, all communication is to/from
coordinator.
• In P2P topology, FFDs can communicate directly.
• Each piconet has a PAN ID and is called a cluster.
• Nodes Join a cluster by sending association request to the
coordinator. Coordinator assign a 16-bit short address to
the device. Device can use either the short address or
EUI-64 address.
IEEE 802.15.4
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 39
Super frame Structure
9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 40
THANKS

Mac

  • 1.
    WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 1 Medium Access Control For Sensor Network 9/21/2019 Dr. Vrince Vimal Computer Science and Engineering
  • 2.
    At the endof this unit, we would be able to understand following -Fundamentals of MAC protocols - Low duty cycle protocols and wakeup concepts – Contention based protocols - Schedule-based protocols - SMAC - BMAC - Traffic-adaptive medium access protocol (TRAMA) - The IEEE 802.15.4 MAC protocol - Zigbee protocol 9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 2
  • 3.
    Classification Of MAC •MAC are classified as follows • Scheduled based MAC • Contention Based MAC 9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 3
  • 4.
    Scheduled based MAC •Based on a-priory condition or scheduling • Central authority or access point regulates medium access. 9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 4
  • 5.
    • Eg. TDMA •Access point • Node a • Node b • Node c 9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 5 Scheduled based MAC Frame
  • 6.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 6 Contention Based MAC ▪ No open or fixed time lot is available ▪ Node has to content for access to the Medium ▪ Data transmitted in On-demand fashion
  • 7.
    Contention Based MAC 9/21/2019WSN;IOT;V sem, GEHU by Dr. Vrince Vimal 7
  • 8.
    Why MAC forWSN • Multi-hop Network • Energy Constraint • Ad-hoc deployment of 1000s of node. (Self Org) • In WSN MAC must achieve two goals • Create network infrastructure • Allow fair and efficient sharing of resources. 9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 8
  • 9.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 9 Energy Efficiency • Reasons for waste of energy ➢ Idle Listening ➢ Collisions ➢ Overhearing • Source of energy waste ➢ Protocol over head ➢ Traffic fluctuations
  • 10.
    MAC Performance 9/21/2019WSN; IOT;Vsem, GEHU by Dr. Vrince Vimal 10 • For Efficient operations sensor network need to provide certain operational guarantee to achieve benchmark. • Following are the key features of MAC ➢Effective collision avoidance. ➢Scalability and adaptability. ➢Efficient Channel utilization ➢latency
  • 11.
    MAC Performance 9/21/2019WSN; IOT;Vsem, GEHU by Dr. Vrince Vimal 11 ➢ Throughput & fairness. • Energy performance and trade-off ➢ Number of Physical channels used. ➢ Degree of Organization between nodes ➢ The method of notifying node of incoming message,
  • 12.
    MAC protocol forWSN • Contention Based • TDMA variants • S-MAC and Variants • Self Organizing MAC 9/21/2019WSN; IOT;V sem, GEHU by Dr. Vrince Vimal 12
  • 13.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 13 Contention Based MAC • Preamble Sampling
  • 14.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 14 Contention Based MAC • WISEMAC
  • 15.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 15 TDMA Variants • EMACS Time slots are divided into ➢ Contention Phase ➢ Traffic control section ➢ Data section • LMACS ➢ Every sensor node has pre-allocated time slot, ➢ All sensor nodes have a time slot • AI- LMAC ➢ Adaptive ➢ No. of slots vary according to traffic conditiond ➢ Allocation done locally on node level ➢ Upto 3 hops with no overlapping timeslots
  • 16.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 16 TDMA Variants • Z-MAC ➢ Nodes are allocated some time slots but can utilize any time slot using CSMA • TRAMA (Traffic Adaptive Medium Access) ➢ Node broadcasts id of neighbours and traffic through them. ➢ Each node is aware of its 2 hop neighbour.
  • 17.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 17 S-MAC • Sensor Medium Access Control • Designed specifically for WSN • Primary goal: Energy efficiency Disadvantages of existing Scheme • TDMA: Useless in high node density app • FDMA: Ineffective B/W utilization • 802.11: idle listning
  • 18.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 18 SMAC & Variants • S-MAC ➢ Assumes node have single operation and have long idle periods. ➢ Virtual clustering to manage sync. ➢ Coarse –grained sleep/wakeup cycle to allow node to sleep longer to save energy.
  • 19.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 19 SMAC & Variants • Dynamic S-MAC ➢ Nodes assume dynamic duty cycle owing to traffic conditions and energy conditions • Timeout -MAC ➢ It uses timer to acknowledge end of active period instead of relying on fixed duty cycle scheme.
  • 20.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 20 S-MAC Features ▪ Periodic Listening ▪ Overhearing avoidance ▪ Collision avoidance ▪ Message Passing ▪ Trade- off ▪ Latency, fairness Energy efficiency
  • 21.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 21 S-MAC Design ▪ Idle listening wastes energy solution Periodic Listening SleepListen Listen T f • Turnoff radio while asleep • Reduced duty cycle by10% • Preferably neighbouring nodes follow same duty cycle.
  • 22.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 22 Choosing and Maintaining Schedule ▪ Nodes exchange their schedule by periodically broadcasting sync packets. ▪ Node select their schedule by following 2 steps. ▪ Listen for sync packet for fixed duration of time. ▪ Condition 1: No sync packet ▪ Condition 2: Sync packet received ▪ Condition 3: Multiple Sync received ▪ Schedule-1 Schedule-2
  • 23.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 23 S-MAC Design- Listen and Sleep cycle Receiver For sync For RTS For CTS Listen Sleep Sender-1 Sender-2 CS Tx Sync CS Tx CTS Got CS Sending Data
  • 24.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 24 S-MAC Design; Adaptive listening • Reduce multi-hop latency due to periodic sleep • Neighbouring node wake up for short duration at the end of each communication. 1 2 3 4 RTS CTS CTS
  • 25.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 25 S-MAC Design; Escaping Overhearing • All immediate neighbours are put to sleep on x’mission of RTS and CTS • Neighbouring node do not over hear data and following acknowledgements • Duration field in packet indicates sleep duration. RTS CTS 1 2 3 4
  • 26.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 26 S-MAC Design; Message Fragmentation Data Sync Collision 1 2 3 Data/Ack Data/Ack Data/Ack Data/Ack Contention for medium • Large data is broken into small fragments of data.
  • 27.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 27 S-MAC Design • S-MAC achieves better energy efficiency as compared to always listening protocols. • S-MAC efficiently elevates the network lifetime. 1 Source node 2 Sink
  • 28.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 28 T-MAC
  • 29.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 29 DS-MAC • Good latency • Collision
  • 30.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 30 Low duty Cycle and wake up concepts • System Remains in sleep state • Wakes up to trans-receive. B Sleep Listen T f ListenA ➢ short beacon ➢ Frequent req b e a r e q r e q r e q r e q
  • 31.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 31 Wake up concepts • Simple low-power (power less) receiver wakes up main receiver.
  • 32.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 32 Data Channels CS Other channel idle channel → node xmitts rec id and channe id-→ rec wakes up its transreceiver-→data trans mission starts -→after wards transreceiver goes to sleep mode, Bussy Drawbacks • No hardware available. • Range • Complexity
  • 33.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 33
  • 34.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 34 STEM & B-MAC Assingment-1
  • 35.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 35 IEEE 802.15.4 MAC PHY Network Application IEEE802.15.4 IEEE802.15.4 IEEE802.15.4 IEEE802.15.4 IEEE802.15.4 ZigBee 6LoWPAN WirelessHART MiWi ISA100.11a Used by many IoT protocols:
  • 36.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 36 IEEE 802.15.4 • LR WPAN • 2.4 Ghz; 16 channels of 5 Mhz. • 250kbps PHY→ 50kbps • Peak current depends on bits / symbol • Like 802.11→ DSSS; CSMA CS; beacon; coordinator • 64 bit EUI 1b- U/M 1b- G/L 22b- OUI 40 b Manufacturer
  • 37.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 37 • NO Segmentation / Reassembly TOPOLOGIES RFD CO FFD
  • 38.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 38 • FFD can become coordinator and route the data packets. • RFDs can not become coordinator and can only be a leaf. • FFD that starts a PAN become the coordinator. • In star topology, all communication is to/from coordinator. • In P2P topology, FFDs can communicate directly. • Each piconet has a PAN ID and is called a cluster. • Nodes Join a cluster by sending association request to the coordinator. Coordinator assign a 16-bit short address to the device. Device can use either the short address or EUI-64 address. IEEE 802.15.4
  • 39.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 39 Super frame Structure
  • 40.
    9/21/2019WSN; IOT;V sem,GEHU by Dr. Vrince Vimal 40 THANKS