0% found this document useful (0 votes)
9 views36 pages

Wsnarg 05 Mac

The document discusses MAC protocols for wireless sensor networks, focusing on their energy efficiency and operational characteristics. It covers various MAC types, including contention-based and schedule-based protocols, and evaluates their performance in terms of energy consumption, throughput, and fairness. The summary concludes that there is no universally 'best' MAC protocol, as the optimal choice depends on specific application requirements.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views36 pages

Wsnarg 05 Mac

The document discusses MAC protocols for wireless sensor networks, focusing on their energy efficiency and operational characteristics. It covers various MAC types, including contention-based and schedule-based protocols, and evaluates their performance in terms of energy consumption, throughput, and fairness. The summary concludes that there is no universally 'best' MAC protocol, as the optimal choice depends on specific application requirements.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

Institut für Telematik | Universität zu Lübeck

Wireless Sensor Networks

Chapter 5: MAC Protocols

Stefan Fischer
Dennis Pfisterer
Learning Goals 5-2

 Understand what is different about radio MACs and especially sensor


network MACs
 Know the most important MACs
 Know the differences in efficiency
Content 5-3

 Requirements for MACs in sensor networks


 Contention-based MACs
 CSMA/CA
 S-MAC
 T-MAC
 B-MAC
 WiseMAC
 Schedule-based MACs
 LMAC
 Bluetooth
 Zigbee
 Evaluation
Media Access (MAC) 5-4

 Controls access to shared medium


 Avoid mutual disturbances
 Part of ISO OSI data link layer (2)
 Important factor for energy consumption
 Radio is primary consumer
 Main goal: reduction of energy consumption
Energy Consumption in the Radio 5-5

 Energy Consumption in the Radio


 Send / receive = 1 ... 2
 Receive / listen = 1 ... 2
 Listen / sleep >> 100
 Mode switches can take a while
- 10us – 2ms
 Implications
 Sleep as much as possible (but then you are deaf)
 Switch the mode only seldomly
Waste of Energy 5-6

 Where is the potential for energy savings in existing protocols?


 Useless listening
 ... for incoming packets

 Collisions
 Messages get lost through signal interference of simultaneous
transmissions
 Receiver hears several senders simultaneously
 Sender cannot recognize collisions
- Not in the reception area of other senders
-  hidden-terminal problem

 Overhearing
 ... of messages destined to other receivers

 Protocol overhead
 Packet headers
 Additional messages
Tradeoffs 5-7

 In order to save energy, one has to accept compromises with other


properties
 Additional messaging delays, especially over multi-hop
 Throughput (payload per time)
 Fairness (nodes are not discriminated)
Traffic Patterns 5-8

 Further saving potential through observation/usage of typical pattern


in the message flow
 Message flow
 Convergecast: all sensors send to the sink (with aggregation)
 Broadcast: sink sends to all nodes
 Local interactions: neighbors exchange messages among
each other
 Geo Routing: send to a certain position
 Message generation
 Constant data streams
- Regular sensor readings
 Bursts
- Silence for long periods
- Events trigger activity in nearby nodes at the same time
 Application-specific properties
 Cross-Layer!
MAC Protocols 5-9

 Two classes:
 Contention
 Random access to the medium
 Collision avoidance as far as possible
- Listening on the medium (CSMA), random waiting, reservations
 When collision: re-transmission
 Schedule
 Exclusive assignment of the medium to the nodes
- Time slots (TDMA)
 Node is only active during ist time slot, sleeps otherwise
 No collisions, no unnecessary listening or overhearing
 BUT:
- Need for time sync
- Adaptivity?
CSMA/CA 5-10

 CSMA: listen on channel, send when free


 Problem: „hidden terminals“
 CA: reservation of the channel
 RTS: Request To Send with announcing the necessary
sending time T
 CTS: Clear To Send: acknowledgement with T
 DATA: after receiving CTS
 ACK: after receiving DATA
 All nodes which hear RTS/CTS delay messages by T

T
CSMA/CA: Collisions 5-11

 Collisions are possible anyway


 Which ones?
 Recognition through missing ACK
 Re-send after random delay
 Delay strategies
 Randomly chosen, equally distributed delay from
a given time window which is split in slots
 Problem: with many nodes you have many collisions
1 2 3 4 5 6
- Especially due to message bursts!
 Binary Exponential Backoff (BEB)
 Double the time window after each new
collision
 Adapt to number of nodes
 Problem: very long delays may occur
Sift 5-12

 Anternative for BEB


 Fixed time window, but slot selction is not
equally distributed
 Only a few nodes choose an early slot
 Probability for collision is smaller for early slots

(1   ) CW r
pr  
1 CW
CSMA/CA for WSN 5-13

 Useless listening
 Switch off radio during T
 Problem: other RTS/CTS may be missed
- Additional collisions
- Throughput may be up to 25% less
 Protocol Overhead
 RTS/CTS/ACK for every packet!
- Inefficient with small packets
 Single reservation for several packets
- Fairness vs. energy!
S-MAC 5-14

 CSMA/CA with Duty Cycling


 Brief activity phase followed by long sleeping phase
 Nodes are synchronized among each other
 RTS/CTS only during active phase
 Data will be transferred before and into the sleeping phase
 SYNCH/RTS/CTS
 CSMA phases with random
delay Active period

 If unsuccessful try in the next Wakeup period

active phase
Sleep period

For SYNCH For RTS For CTS


S-MAC: Synchronization 5-15

 Nodes send schedule packets during SYNCH


 New node
 Listen and accept schedule
 Otherwise use own schedule
 Problem: neighbors with diferrent schedules
 „islands“ have to be integrated
 Use schedules of all neighbors

Schedule 1 Schedule 2
S-MAC: Latency 5-16

 Expected delay per hop = half the length of the


sleeping phase
 Problem with long paths!
 Improvement:
 Path: 1 -> 2 -> 3
 Node 3: hears CTS, after T additional active phase
 Node 2: send an RTS directly after ACK 1 2 3

T
T-MAC 5-17

 S-MAC: fixed length of activity phase


 Unused capacity when not much traffic
 Too short with much traffic
 T-MAC: adaptive length of the active phase
 Early switch to sleeping phase if nothing happened for a certain time TA
 „nothing“
- No activity on the channel and
- No activity at neighbors (we know this through RTS/CTS)
T-MAC: Early Sleeping 5-18

 Problem: D starts sleeping too early


 C has data for D, but cannot send
RTS to D because medium is blocked
by CTS
 Solution: special RTS for the future
 When receiving CTS, node C sends
FRTS to D
 contains T from CTS
 additional dummy packet DS
- Why?
Preambles 5-19

 Problem: both S-MAC and T-MAC need synchronization


 Several schedules per node ...
 Different approach
 Unsynchronized, very short activity phases
 Sender has to send long preamble before data
- How long?
 If node hears preamble during active phase, he remains awake in order
to receive data
 Moves the load to the sender

Preamble Data
Preambles: Optimizations 5-20

 Problem: full sending of preamble


though station is already awake Preamble Data
 Waste of energy
 repeated sending of data instead
of preamble
 Repeated sending of wakeup packets
instead of preamble
Data Data Data
 Contains point in time when data
transmission starts

W WWWWWW Data
B-MAC 5-21

 Is based on simple preambles


 Philosophy: minimum functionality with simple interface (TinyOS)
 Length of sleeping phase is adjustable
 Length of preamble is adjustable
 Fixed-length active phase with preamble detection
 CSMA with simple random backoff
 Optional ACKs
 Additional functionality has to be implemented separately
 RTS/CTS, ...
 Maximum flexibility
 Standard MAC in TinyOS
WiseMAC 5-22

 Preambles and synchronization (!)


 First, a long preamble
 ACK contains schedule
 Now, the sender roughly knows, when the receiver will wake up the next
time
 Shorter preamble
 Additional specialties
 „More!“ Bit in data packet for bursts
 Repeat data instead of long preambles

Preamble Data ACK P Data ACK


MAC with Schedules 5-23

 Division of time in slots


 Every node gets some slots during which it is allowed to send
 Many variants in assigning slots
 centralized vs. distributed
 Static vs. usage-oriented
LMAC 5-24

 32 time slots per frame


 Every node gets one slot
 In ist slot, node can send messages to neighbors
 Neighbors hear TC, sync
 Only neighbors, which are addressed, also hear the data
 No ACK, no retransmission when failure occurs

Slot 1 Slot 2 Slot 3 ... Slot N Slot 1 Slot 2 Slot 3 ...

TC Data

Snd Rcv Slots ...

011011101000000...0000
LMAC: Slot Assignment 5-25

 TC.Slots contains a bit vector of all used slots


 As seen by the sender
 New node
 Listens to neighbors for one frame (TC.Slots) and then choises randomly
a free slot
 Mobility may lead to collisions (double slot usage)
 Colliding stations randomly choose a new slot

1011
0011
3
4

1 2
1010
LMAC: Restrictions 5-26

 Density of the network is restrictred by the number of slots


 Neighbors must not use the same slot
 Maximum bandwidth per node is limited
 Channel bandwidth / number of slots
 Bad when communication volume of nodes varies a lot
Bluetooth 5-27

 Bit transmission
 79 channels
 Pseudo-random frequency hopping S
S
 Bandwidth ~ 1 mbps
M
- Energy efficient with high data volume S S
 MAC based on scheduling
B
 Piconet: 1 master + max. 7 slaves S
- Master synchronizes slaves and announces M
S
hopping pattern S
- Every slave has a time slot during which S
it can communicate with the master
 Scatternets: overlapping piconets
- Bridge: common node
IEEE 802.15.4 („Zigbee“) 5-28

 Bit transmission
 20 – 250 kbps in different frequency ranges (868 kHz, 926 kHz, 2.4 GHz)
 Usage of multiple channels possible
 Roles of nodes
 PAN Coordinator (always active)
 Coordinator (always active!) D
D
 Device
P
 Node types
D D D
 Full Function Device
D
 Reduced Function Device D
- just „Device“ role D C
 Network topologies D
P
 Star D
 Peer-to-Peer
Other Approaches 5-29

 There is a plethora of further proposals for WSN MAC protocols


 We looked at the most relevant ones
 Other assumptions concerning bit transmission
 So far: all stations use the smae channel/frequency
 Chossable channel (as in Bluetooth)
 Several channels at the same time
 Several radions per node
- Wakeup Radio
 Directed antennae instead of omni-directional ones
 ...
The best MAC? 5-30

 Is there a „best“ MAC protocol?


 Resource need
 Energy efficiency
 Throughput
 Loss of data
 scenarios
 Point-to-point
 Local interactions
 Protocols
 802.11: Standard CSMA/CA
 S-MAC
 T-MAC
 LPL: preambles (B-MAC)
 LMAC
Resources 5-31
Energy when inactive 5-32
Throughput: 3x3 Grid 5-33
Energy: Point-to-Point 5-34
5-35
Energy: Local Interaction
Summary 5-36

 „winner“ wrt. energy


 Low data volume: T-MAC
- Through adaptivity
 High data volume: LMAC
- No collisions
 Further observations
 802.11 is very competitive with high data volume
 There is no „best“ MAC, depends on the application

You might also like