bmac - versatile low power media access for wireless sensor networks
TRANSCRIPT
BMAC - Versatile Low Power Media Access for Wireless Sensor Networks
Introduction• What is BMAC?
– A configurable MAC protocol for WSNs– Small core
• Factors out higher-level functionality– Energy efficient
• Goals– Low Power operation– Effective collision avoidance– Simple and predictable– Small code size and RAM usage– Tolerable to changing RF/networking conditions– Scalable to large numbers of nodes
MAC design approaches• Traditional (e.g. SMAC)
– “Black-box” design• Users pre-configure duty cycle• Applications rely on S-MAC to adjust its operation as things change• Designed (and optimized) for a set of workloads that might not always be applicable
• Minimalistic (BMAC)– Small core functionality: media access control– RTS/CTS, ACKs, etc are considered higher layer functionality (services)
• Applications can turn them on and off– More flexible and more tunable
BMAC basics
• Use long preambles (010101010)
• Sleeping nodes will eventually wake up, check the channel and detect that it is active (preamble) and then begin to listen
• It is required that the preamble be long enough so that all nodes will be awake for the data transmission.
BMAC trade-off
• If the time between channel samples is long, then the preamble must be very long.– The preamble must last about as long as the time between checking if the channel is busy
• The amount of energy used transmitting long preambles depends on how often data is sent.
– E.g., if data must be sent only once a day, it might be ok to have a preamble that last an hour, since that would allow a very long time between checking the channel.
– Letting • PT be the power used during transmission of a preamble
• TP be the duration of the preamble
• R the rate of sending data (pkts/sec)
• Echeck the energy required to check the channel
• Then:• Energy for transmitting =
• Energy for receiving =
• Energy for forwarding =
• Optimal value of TP
BMAC trade-off
• If the time between channel samples is long, then the preamble must be very long.– The preamble must last about as long as the time between checking if the channel is busy
• The amount of energy used transmitting long preambles depends on how often data is sent.
– E.g., if data must be sent only once a day, it might be ok to have a preamble that last an hour, since that would allow a very long time between checking the channel.
– Letting • PT be the power used during transmission of a preamble
• TP be the duration of the preamble
• R the rate of sending data (pkts/sec)
• Echeck the energy required to check the channel
• Then:• Energy for transmitting =
• Energy for receiving =
• Energy for forwarding =
• Optimal value of TP =
PT Tpreamble R PTsize
rate
PR Tpreamble
2 R PR
size
rate Echeck 1
Tpreamble
PT Tpreamble R PTsize
rate PR Tpreamble
2 R PR
size
rate Echeck 1
Tpreamble
Tpreamble R PT PR2
2PTsize
rate Echeck 1
Tpreamble
E check
R PTPR2
LPL check interval
• Single-hop application doing periodic data sampling
• Sampling rate (traffic pattern) defines optimal check interval
• Check interval– Too small: energy wasted on idle
listening
– Too large: energy wasted on transmissions (long preambles)
• In general, it’s better to have larger preambles than to check more often!
Sensor sample period – controls the packet rate
Time between listening (checking if the channel is idle)
lifetime 1
total energy 1
PT Tpreamble R E check 1Tpreamble
LPL and neighborhood size
• More neighbors: more transmissions
– More time spent receiving packets– Less time left to go to sleep
• To find the best check interval– Set the reporting rate– Estimate neighborhood size– Best result: check interval that
gives lowest effective duty cycle
Energy vs Latency
• 10-hop network
• Source sends a 100-byte packet every 10 seconds
• SMAC: change the default config
• BMAC: choose optimal check interval
• SMAC again performs worse...– Reason: sync packets, probability
of multiple schedules---less time to sleep
0 2000 4000 6000 8000 100000
50
100
150
200
250
300
350
400
450
500
550
Latency (ms)
En
erg
y (m
J)
Effect of latency on mean energy consumption
B-MACS-MACAlways On
S-MAC Default Configuration
B-MAC Default Configuration
11 10 9 3 2 111 10 9 3 2 1
Throughput vs power consumption
• 10 nodes in a neighborhood• Data must arrive within 10 seconds• Average power consumption per node• Low data rates: SMAC is better
– Very low duty cycle• Power vs throughput
– SMAC: linear– BMAC: sub-linear
• Reason: SMAC duty cycle must increase– More active periods, more SYNC periods
• BMAC: larger preambles at low throughput, progressively becoming smaller
Experimental results: throughput
• “BMAC is about 4.5 faster than SMAC-unicast”
– Not as fast when ACK or RTS/CTS is used
– No combined results...– Differences less pronounced as #
of nodes increases– Another issue: BMAC has CCA,
thus it backs off less frequently (and perhaps the backoff timer is faster)
0 5 10 15 200
2000
4000
6000
8000
10000
12000
14000
16000
0 5 10 15 200
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Throughput of a congested channel
Number of nodes
Per
cen
tag
e o
f C
han
nel
Cap
acit
y
B-MACB-MAC w/ ACKB-MAC w/ RTS-CTSS-MAC unicastS-MAC broadcastChannel Capacity
Th
rou
gh
pu
t (b
ps)
Clear Channel Assessment
• MAC must accurately determine if channel is clear– Need to tell what is noise and what is a signal
– Ambient noise is prone to environmental changes
• BMAC solution: ‘software automatic gain control’– initialization
• Signal strength samples taken when channel is assumed to be free so that a noise floor is found.
– Check channel• Samples go in a FIFO queue (sliding window)• Median of FIFO is added to an EWMA filter. When the EWMA filter exceeds a threshold, then it is assumed that
the channel is active.– The median filter is known to be robust to impulse noise/outliers– EWMA is not a particularly good way to find a change of state. – A better approach is based on statistical change-point detection (see next slide)
• Once noise floor is established, a TX requests starts monitoring RSSI from the radio
Change point detection
likelihood ratioP observed | change has occured
P observed | no change has occured
If the likelihood ratio is small, then 1. it is unlikely that what we observed could have occured and the change, and 2, it is likely that what was observed occured without the change
typical likelihood ratio PY1Y2 . . .Yn | change has occuredPY1Y2 . . .Yn | no change has occured
PY1 | change has occuredPY2 | change has occured. . .PYn | change has occured
PY1 | no change has occuredPY2 | no change has occured. . .PYn | no change has occured
typical log-likelihood ratio logPY1Y2 . . .Yn | change has occuredPY1Y2 . . .Yn | no change has occured
logPY i | change has occuredPY i | no change has occured
But, if the distributions are Gaussian, then this can be changed into a cummulative summation
S k 1 max0,S k Yk
if Sk >Thresh, then the change has occurred. This is the optimal approach in terms of detecting a change fastest with a given false-alarm rate
CCA: single-sample thresholding vs outlier detection
• Common approach: take single sample, compare to noise floor– Large number of false negatives
• BMAC: search for outliers in RSSI– If a sample has significantly lower energy than the noise floor during the
sampling period, then channel is clear
CCA results
• 0=busy, 1=clear• Packet arrives between 22 and 54 ms• Single-sample thresholding produces several false ‘busy’ signals
Low Power Listening
• Goal: minimize listen cost
• Principles– Node periodically wakes up, turns radio on and checks channel
• Wakeup time fixed
• “Check time” variable
– If energy is detected, node powers up in order to receive the packet– Node goes back to sleep
• If a packet is received
• After a timeout
– Preamble length matches channel checking period• No explicit synchronization required
– Noise floor estimation used to detect channel activity during LPL
Radio powerup sequence of operations
• Goals– Minimize time radio is on– Minimize number of times radio
gets started– Minimize sampling time (stage e)
Conlcusions• BMAC appears to be better than SMAC
– Easier to tune– Has better channel assessment – Doesn’t use explicit sync packets– Doesn’t use RTS/CTS/ACK if it doesn’t have to– Is smaller and less complex
• Are large preambles always good?– Not sure, but:
• They do mention ‘cyclic packet transmissions’• They can be turned off:
– Enable LPL– Send first packet, disable LPL– Send remaining packets in a big burst– Re-enable LPL