Professional Documents
Culture Documents
Storage Monitoring
Analysis
Processing
Internet
App
Tran
Net
Adaptation
Sample Phase
Phy
Raw data
Network layer (routing)
Physical layer
time
2
7
3 9
4
1 8
6
❖ Recall
✓ Transmissions are costly (in terms of consumed energy)
✓ Receiving about as expensive as transmitting
✓ Only listening (not transmitting nor receiving) is also expensive
❖ Energy problems
✓ Collisions - wasted energy when two packets collide
✓ Note that collisions happen at the receiver
From 2 to 3 From 5 to 3
2 3 5
❖ Energy problems
✓ Collisions - wasted energy when two packets collide
✓ Overhearing – wasted energy in receiving a packet destined for
another node
❖ Example:
✓ Node 2 overhears the packet destined for node 5
✓ Node 3 uses an omnidirectional antenna (the broadcast nature of
wireless)
From 3 to 5 From 3 to 5
2 3 5
❖ Energy problems
✓ Collisions - wasted energy when two packets collide
✓ Overhearing – wasted energy in receiving a packet destined for
another node
✓ Idle listening - sitting idly and trying to receive when nobody is
sending
❖ Example:
✓ Node 5 is listening while 2 and 3 do not transmit
2 3 5
❖ Energy problems
✓ Collisions - wasted energy when two packets collide
✓ Overhearing – wasted energy in receiving a packet destined for
another node
✓ Idle listening - sitting idly and trying to receive when nobody is
sending
✓ Protocol overhead – how many extra bits to regulate access to
the channel
❖ Energy problems
✓ Collisions - wasted energy when two packets collide
✓ Overhearing – wasted energy in receiving a packet destined for another node
✓ Idle listening - sitting idly and trying to receive when nobody is sending
✓ Protocol overhead – how many extra bits to regulate access to the channel
❖ Design criteria
✓ Minimize collisions
✓ Minimize overhearing
✓ Minimize idle listening
✓ Minimize protocol overhead
❖ How to solve so many hard problems at once?
✓ There is no universal solution, we need to make certain tradeoffs
Centralized Distributed
2 3 5 2 3 5
time
slot 2 3 5
Centralized Distributed
2 2 2
time
2
3 3
time
3
slot wasted slot
❖ Idea: We accept the risk of colliding packets here and there with the hope that
the coordination overhead required by schedule-based MACs can be
saved/eliminated
✓ In other words, occasional packet re-transmissions could be more
efficient than the coordination overhead in schedule-based MACs
✓ Typical involves some form of randomization when transmitting
Centralized Distributed
From 2 to 1 From 3 to 1
2 1 3
From 2 to 1 From 3 to 1
2 1 3
data ready data ready
2 2
3 3 time
2 2
3 time
data ready
From 2 to 1 From 3 to 1
2 1 3
2 2
slot 3 3 time
data ready
2
slot 3 time
data ready
2 1 3
CS (sense the channel) CS
2 2
3 3 time
data ready
1 2 2 2
3 3 3 time
data ready
CS CS CS CS
random
CS backoff CS
data ready
1 2
3 time
successful successful
transmission transmission
Note:
• DIFS: Distributed Inter-Frame Spacing
• SIFS: Short Inter-Frame Spacing
• Backoff: a random number from the set {1,2,…, CW} - is expressed in short time (time
slot); CW is the maximum duration Backoff.
• NAV (Network Allocation Vector) – duration of current transmission
MAC protocols for wireless (sensor) networks need to address two important
challenges
✓ Hidden terminal problem
✓ Exposed terminal problem
❖ In the shown network scenario, node 2 is not aware of node 3 (they do not
fall in the transmission ranges of each other
❖ Nodes 2 and 3 are said to be hidden from each other
collision at node 1
2 to 1 3 to 4
2 1 3 4
1 to 2 3 to 4
2 1 3 4
❖ RTS/CTS mechanism makes sense only if the size of control packets significantly
smaller than the size of data packets. Why?
❖ RTS/CTS help but do not completelly solve the problem
1 2 3 4
RTS
CTS
RTS
CTS
Data
Data
ACK
❖ Sensor nodes are usually battery-operated, therefore MAC protocols must be energy
efficient
✓ Indeed, sending or receiveing over a radio channel is very costly operation
(in terms of energy consumption)
✓ Since MAC protocols have a full control over when to send or receive, the
design of MAC protocols can contribute significantly to the energy consumption
❖ CSMA/CA MAC protocols are simple and robust but
✓ Require a node to be awake most of the time and listen for channel activity
✓ This can quickly exhaust the energy of on a sensor node (think a bit about your
mobile phone battery when WiFi is switched on)
✓ We need a better solution
❖ Solution:
✓ Put a node to sleep whenever possible (use low duty cycle)
✓ How to coordinate access to common channel?
cycle
active sleep
2 2 2
time
2
3 3 3
time
3
❖ Idea: To enable two sensor nodes to exchange packets, S-MAC ensures that
neighboring nodes turn on simultaneously
✓ A node wakes up (first time) and listens on the channel for some time.
✓ If the node does not receive anything, it chooses its own schedule according to
which it will periodically go to sleep (and wake up)
✓ The node sends its own schedule to the channel
✓ The node goes to sleep
✓ Next time it wakes up, the node will first send its own schedule
send
wake up schedule go sleep wake up wake up wake up
2 2 2 2
time
2 nothing
received
❖ Idea: To enable two sensor nodes to exchange packets, S-MAC ensures that
neighboring nodes turn on simultaneously
✓ If a new/second node receives a schedule, it will join this schedule (at this point
the two nodes are in sync and will wake up together)
receive
wake up schedule go sleep
2 1 1 1
time
1
send
wake up schedule go sleep
2 2 2 2
time
2 nothing receive
received wake up schedule sleep wake up
2 3 3
time
3
sensor nodes get synchronized
2 1 CTS ACK 1
time
1
send
wake up schedule go sleep sleep
2 2 RTS Data 2
time
defer access
2 nothing sleep
received
NAV (Base on RTS)
sleep
❖ Maintaining Synchronization
✓ Clock drifts – not a major concern (listen time = 0.5s – 105 times longer than
typical drift rates)
✓ Need to mitigate long term drifts – schedule updating using SYNC packet
(sender ID, its next scheduled sleep time – relative);
✓ Listen is split into 2 parts – for SYNC and RTS/CTS
✓ Once RTS/CTS is established, data (if available) sent in sleep interval
Active/Listen
Sleep For SYNC For RTS For CTS Sleep
❖ Example Scenarios
❖ Example Scenarios
DATA
Sleep Sleep
TA TA TA
❖ Requirement: a node should not sleep while its neighbors are communicating,
potential next receiver
❖ TA > C+R+T
✓ C – Contention interval length (Nodes wait for a random time within a
contention interval after detecting a collision.)
✓ R – RTS packet length;
✓ T – Turn-around time, time between the end of RTS and start of CTS
❖ TA = 1.5 * (C+R+T)
TA
R
CTS
T
Wireless Sensor Networks 46 MAC protocols in WSNs
MSc Nguyen Khanh Loi
LPL: Low-Power Listening
❖Goal: minimize listen cost
❖RX: Clear Channel AssessmentCCA to sample, ON to receive packet
✓ Extremely short CCA (500 us)
❖Tx uses short ‘chirp’ messages as preamble
✓ Addressing → minimizes overhearing cost
✓ Data time → receive cost independent of sample period
❖Nodes wake up for a short period and check for channel activity.
✓ Return to sleep if no activity detected.
❖If a sender wants to transmit a message, it sends a long preamble to make sure that
the receiver is listening for the packet.
✓ Preamble has the size of a sleep interval
❖Very robust
✓ No synchronization required
✓ Instant recovery after channel disruption
preamble data
listen
channel sniff
Target
address
preamble data
listen data
listen