Upload
jonas-williams
View
213
Download
0
Tags:
Embed Size (px)
Citation preview
2
Outline
• MAC goals
• MAC protocol assignment categories Random Fixed On-demand
• WLAN MAC
Aloha, CSMA, TDMA, FDMA
• Challenges in WSN
• WSN MAC protocols Basic MAC S-MAC B-MAC O-MAC
4
Reading
• A Transmission Control Scheme for Media Access in Sensor Networks, D. Culler, A. Woo
• Versatile Low Power Media Access for Wireless Sensor Networks, J. Polastre et al.
• An Energy-Efficient MAC Protocol for Wireless Sensor Networks, D. Estrin et al.
http://www.isi.edu/~johnh/PAPERS/Ye04b.pdf
• Ultra-Low Duty Cycle MAC with Scheduled Channel Polling, Wei Ye et al.
5
Introduction
• Important attributes of MAC protocols
Collision avoidance
Basic task — medium access control Energy efficiency Scalability and adaptivity
Number of nodes changes overtime Latency Fairness Throughput Bandwidth utilization
6
MAC protocol categories
1. Random assignment
ALOHA, CSMA (Carrier Sense) Predominantly used in wireless networks 802.11, 802.15, etc.
2. Fixed assignment
TDMA (Time Division), CDMA (Code division), FDMA (Frequency division)
Unsuitable for dynamic, bursty traffic in wireless networks
3. On-demand assignment
Token ring Hard to implement: requires static topology or neighbor
discovery
7
Random assignment
• Aloha
Hawaii 1970 Node sends a data when it has data If no ACK received, data is re-send after random backoff No carrier sensing Works for low network contention, peak performance 18%
8
Random assignment
• Contention-based protocols
CSMA — Carrier Sense Multiple Access
Ethernet
Not enough for wireless
Collision detection not possible as in Ethernet
Collision avoidance using carrier sense
A B CHidden terminal: A is hidden from
C’s CS
9
Random assignment
• Contention-based protocols
MACA — Multiple Access w/ Collision Avoidance
RTS/CTS for hidden terminal problem
RTS/CTS/DATA
Node wishing to send data sends a Request to Send frame
Destination node replies with a Clear To Send frame.
Node receiving either the RTS or the CTS frame
refrains from sending data for a given time. MACAW — improved over MACA
RTS/CTS/DATA/ACK
Fast error recovery at link layer IEEE 802.11 Distributed Coordination Function
Largely based on MACAW
10
Fixed assignment
• TDMA (Scheduled protocol)
Each node gets full bandwidth for a pre-allocated time in turns Not suitable for networks whose node density changes
• FDMA (Scheduled protocol)
Each node gets a permanent share of bandwidth Poor bandwidth utilization
• CDMA
Spread spectrum technology Analogous to speaking different languages Multiple coders/decoder needed
11
Energy Efficiency in MAC Design
• Energy is primary concern in sensor networks
• What causes energy waste?
Collisions Control packet overhead Overhearing unnecessary traffic Long idle time
bursty traffic in sensor-net apps
Idle listening consumes 50—100% of the power for receiving
11
12
Energy Efficiency in MAC Design
• TDMA vs. contention-based protocols
TDMA can easily avoid energy waste from all above sources Contention protocols disadvantage in all 4 areas TDMA has limited scalability and adaptivity
Hard to dynamically change frame size or slot assignment when new nodes join
Restrict direct communication within a cluster Contention protocols easily accommodate node changes and
support multi-hop communications
12
13
WSN MAC challenges
• The network tends to operate as a collective structure, rather than supporting many independent point-to-point flows
− Deep multi-hop dynamic topologies, route-through traffic exceeds originating traffic
− Guarantees or fairness over multi-hop communication is challenging due to contention at every hop
• Traffic tends to be variable and highly correlated− Little or no activity/traffic for longer periods and intense traffic
over shorter periods
• Highly constrained resources and functionality− Radio should be turned off most of the time
14
WSN MAC design considerations
• Fairness of the bandwidth allocated to each node for end to end data delivery to sink
Each node acts as a router as well as data originator The traffics compete for the same upstream bandwidth RATE CONTROL!
• Hidden node problem
Solution without RTS/CTS
• Energy efficiency
Transmit, receive, idle consume roughly same amount of energy The cost of dropping a packet varies with place and the packet
15
Contributions of Woo-Culler03
• A Transmission Control Scheme for Media Access in Sensor Networks, D. Culler, A. Woo. ACM Mobicom 2003
• Considers converge-cast,
• bursty traffic model
16
Contributions of Woo-Culler03
• How to avoid sending event synchronization?
Highly synchronized nature of the traffic causes collisions Random listening period?
Listening is costly Use random delay + fixed short listening Turn off radio during the fixed delay period
• Random backoff when channel was busy
This alone not enough Nodes are forwarders and originators If source transmission failed, application needs to randomly
backoff Phase shift to reduce synchrony-livelock This also helps in achieving fairness
17
Contributions of Woo-Culler03
• Implicit acknowledgements
Overhearing forwarding counts as an acknowledgement
• Heuristic for alleviating hidden-node problem
No rts/cts Child reduces potential hidden node problem with its grand parent Does not send packets between “t” and “t+x+packettime” after overhearing packet transmission at t by its parent
• Rate control
Control the rate of originating data of a node
to allow route-through traffic to reach the base station
Linear increase, multiplicative decrease Penalize route-thru traffic less than originating traffic
18
Overall
Advantages:
• Lightweight, control packet overhead is reduced
Disadvantages:
• Assumes periodicity of the originating traffic
• Assumes a converge-cast scenario
19
S-MAC: Introduction
• Sensor-MAC — by Ye, Heidemann and Estrin
• Tradeoffs
Latency / fairness poor Energy efficiency high
• Major components in S-MAC
− Periodic listen and sleep
− Collision avoidance
− Overhearing avoidance
− Message passing
20
Periodic Listen and Sleep
• Problem: Idle listening consumes significant energy
• Solution: Periodic listen and sleep
• Turn off radio when sleeping
• Reduce duty cycle to ~ 10% (150ms on/1.5s off)
sleeplisten listen sleep
21
Periodic Listen and Sleep
• Schedules can differ
• Prefer neighboring nodes have same schedule— easy broadcast & low control overhead
Node 1
Node 2
sleeplisten listen sleep
sleeplisten listen
Schedule 2Schedule 1
Border nodes: two schedules; broadcast twice
22
Periodic Listen and Sleep
• Schedule Synchronization
New node tries to follow an existing schedule Remember neighbors’ schedules
— to know when to send to them Each node broadcasts its schedule once every few periods Re-sync when receiving a schedule update
• Periodic neighbor discovery
Keep awake in a full sync interval over long periods
23
Listen and Sleep - Maintaining Synchronization
• The listen time is divided into two parts:
For sending/receiving SYNC signal. For sending/receiving Data.
24
Collision Avoidance
• Problem: Multiple senders want to talk
• Options: Contention vs. TDMA
• Solution: Similar to IEEE 802.11 ad hoc mode (DCF)
Physical and virtual carrier sense Randomized backoff time RTS/CTS for hidden terminal problem RTS/CTS/DATA/ACK sequence
25
Overhearing Avoidance
• Problem: Receive packets destined to others
• Solution: Sleep when neighbors talk
• Who should sleep?
− All immediate neighbors of sender and receiver
How long to sleep?
− The duration field in each packet informs other nodes the sleep interval
26
Message Passing
• Problem: Sensor net in-network processing requires entire message
• Solution: Don’t interleave different messages
Long message is fragmented & sent in burst RTS/CTS reserve medium for entire message Fragment-level error recovery — ACK
— extend Tx time and re-transmit immediately
• Other nodes sleep for whole message time
• Fairness is lost
Energy efficiency is gained
27
Experiments: two-hop network
• Topology and measured energy consumption on source nodes
Source 1
Source 2
Sink 1
Sink 2
• Each source node sends 1-10 messages /second
• Listen interval 115ms• Duty cycle 50%
28
Experiments: two-hop network
The graph shows the mean energy on radios of source nodes
Idle listening rarely happens
Periodic sleep for Idle listening
• Low load – periodic sleep is key• High load – overhearing
avoidance is key
2929
Adaptive Listen
• Reduces latency due to periodic sleep
• At end of each transmission, nodes wake up for a short time
• Next transmission can start right away
• Example: data flow ABC
A sends RTS, B replies CTS, C overhears CTS C will wake up when AB is done BC can start right away
A B C
30
10-hop Experiments
• Compare S-MAC in 3 different modes
• 10-hop linear network with 11 nodes
0 2 4 6 8 100
5
10
15
20
25
30Energy consumption on radios in the entire network
Message inter-arrival period (S)
En
erg
y co
nsu
mp
tion
(J)
10% duty cycle without adaptive listen10% duty cycle with adaptive listen No periodic sleep
0 2 4 6 8 100
2
4
6
8
10
12Average message latency under the lowest traffic load
Number of hops
La
ten
cy (
S)
10% duty cycle without adaptive listen10% duty cycle with adaptive listen No periodic sleep
31
Summary: SMAC
Advantages
• Well-designed, complete protocol
• addresses deficiencies of 802.11 applied to WSN
• Significantly lower power operation than 802.11
Disadvantages
• SMAC incurs some drawbacks of TDMA schemes
• Topology maintenance, need for synchronization
• Additional complexity at border nodes between two schedules
• Designed for a general set of workloads User sets radio duty cycle; SMAC takes care of rest
• Combines carrier sense, link-layer reliability, RTS/CTS and sleep scheduling into MAC layer.
32
Some thoughts on projects
Currently chosen:
Home network – Brian Mcqueen
Emergency Evacuation - Bryan Lemon
DSP programming on Beagleboard - Purnima
Wireless hart for industrial control - Nambu
camera networks for face recognition – Srikanth
Snapshots implementation – SriCharan
Exploiting Cooperative MIMO for sensor networks - Omar
33
Some thoughts on projects
Imote Platform evaluation / linux installation / camera testing
Desync
Cyclic automata
Higher layer protocols for cooperative comm physical layer
Smart phone applications – for elder care, home networking, anything that uses an element of communication, not standalone
Consensus protocols, survey and evaluation
34
Some thoughts on projects
Camera network calibration, survey and simple implementation
Vehicular networks
intra and inter vehicle
evaluation and testing of existing protocols
Wireless network security for electric grids and cyber infrastructure
Robotics, coordinated actuation
Clustering protocol – evaluation
35
BMAC: versatile low power MAC
• Flexible and tunable
small core and factored functionality bidirectional (set and get) interfaces to MAC functionalities
applications can turn them on and off for adapting to radio environment
RTS/CTS, ACKs may be implemented above BMAC
• Low power operation
Clear Channel Assessment (reducing idle listening) Low Power Listening
36
CCA
• Automatic gain control
Signal strength samples taken when channel is assumed to be free
Samples go in a FIFO queue (sliding window) Median added to an EWMA filter Noise floor is established
• Comparing one signal strength reading with noise floor causes false negatives (noise amplitude fluctuates)
• Instead, detect outliers:
Samples whose energy is significantly below noise floor. This can’t happen if packet is being sent.
38
LPL
• Sleep cycles
Wake up, do carrier sensing Use CCA reduce idle listening If idle go back to sleep Else, synchronize using preamble
• Preamble length matches channel checking period
No explicit synchronization required (unlike S-MAC) Packet checking period and Preamble length - configurable
39
Low Power Listening: Preamble Sampling
Sender
Receiver
Preamble Send data
Preamble samplingActive to receive a message
S
R
|Preamble| ≥ Sampling period|Preamble| ≥ Sampling period
• Preamble is not a packet but a physical layer RF pulse
Minimize overhead
40
LPL effect
• 1-hop 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)
• Better to have large preamble than to check more often
41
Analyzing lifetime
Periodic data gathering
• Periodic sampling
• Periodic transmission
• Tree communication structure
Simplified periodic model
• Each node receives r packets from all its neighbors per second
• Each node broadcasts r packets per second
• Neighborhood size n
42
Effect of Neighborhood Size
0 20 40 60 80 1000
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
0.09
0.1
Number of neighboring nodes
Eff
ecti
ve d
uty
cyc
le (
%)
200ms check interval100ms check interval50ms check interval25ms check interval10ms check interval
Effect of neighborhood size on node duty cycle• To find optimum check interval
• Lowest point along y-axis for given neighborhood size
44
Effect of Neighborhood Size
• Neighborhood Size affects amount of traffic in a cell
Network protocols typically keep track of neighborhood size
Bigger Neighborhood More traffic
0 20 40 60 80 1000
20
40
60
80
100
120
140
160
180
200
Neighborhood size
Ch
ann
el A
ctiv
ity
Ch
eck
Inte
rval
(m
s)
Expected Lifetime Contour
0.25
0.5
0.75
11.25
1.522.5
45
Implementing RTS/CTS
• RTS-CTS can be implemented over BMAC:
Send RTS using LPL Listen for CTS using LPL Once CTS is heard, disable LPL, CCA Send data as burst Send link layer ACK Re-enable LPL, CCA
• RTS – CTS/ ACK used depending on the situation
46
Throughput
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)
N nodes equidistant from receiver
Send as fast as possible with collision avoidance
47
Throughput vs power consumption
10 nodes within cell
Increase traffic slowly
Latency bound by 10 seconds
49
Summary - BMAC
Pros
• Flexibility to implement application specific optimization
• Zero protocol overhead for synchronization
Cons
• Each transmission wakes up all nodes in range
• Low duty cycle = high sender preamble
50
Dominant Receiver Power Consumption
Large portion of energy is consumed in receiver radio
One typical surveillance application:
Receiver Radio~2100 J/day
Signal processing ~60 J/day
Everything else ~8 J/day
Receiver Radio
Signal Processing
Other
O-Mac : Receiver centric MAC
51
Receiver Centric vs. Transmitter Centric
Transmitter Centric MAC design
Transmitter implicitly knows receiver will wakeup during transmission
Collision avoidance is transmitter driven (i.e., RTS-CTS, CCA)
Receiver Centric MAC design
Receiver explicitly communicates its wakeup schedule to transmitter
Collision avoidance is receiver driven (i.e., receivers use TDMA)
TransmitterReceiver
TransmitterReceiver
Transmitter
Receiver
52
A problem
• Consider 10 hop linear network from source to destination. For a given 100 byte packet to be sent from source, maximum latency allowed is 2 seconds.
Time to transmit 100 bytes at any node =30mS
Time to poll channel = 3 ms
What is the highest check interval that can be chosen in B-MAC that will achieve given latency?
If this is a repeating pattern [one packet sent every 2 seconds], what is the B-MAC duty cycle?
What is the maximum sleep interval possible in S-MAC (listen window is 115 mS)
What is the S-MAC duty cycle in that case?