wireless lan mac protocols murat demirbas suny buffalo cse dept
TRANSCRIPT
Wireless LAN MAC protocols
Murat Demirbas
SUNY Buffalo
CSE Dept.
2
MAC protocol categories
1. Fixed assignment
TDMA (Time Division), CDMA (Code division), FDMA (Frequency division) Unsuitable for dynamic, bursty traffic in wireless networks
2. Random assignment
ALOHA, CSMA (Carrier Sense) Predominantly used in wireless networks 802.11, 802.15, etc.
3. On-demand assignment
Token ring Hard to implement: requires static topology or neighbor discovery
E.g., cellular networks use ALOHA for registration and CDMA for communication
3
Goal of MAC layer
• The goal is to provide access control to manage multiple access
Multiple nodes share a common channel to communicate (in contrast to point-to-point)
Maximization of throughput (channel utilization) Minimization of latency Fairness Stability
4
Challenges for MAC layer
1. Transmitter collision detection is impossible
The transmit power at the node swamps its receiver Pausing while transmission does not help since collisions happen on the
receiver side and not necessarily at the sender!
• Mechanisms to cope with it
CSMA/CD (Collision Detection) as in Ethernet is not viable CSMA/CA (Collision Avoidance) is used: Random backoff upon detecting
channel busy Also receiver-side CD may be used to inform any senders about a
collision
5
Challenges for MAC layer
2. Hidden terminal problem
Two senders not in range of each other (Carrier Sensing fails), but in range of a common receiver
• Mechanisms to cope with it
RTS/CTS handshake alleviates the problem for unicast traffic
A sending node wishing to send data sends a Request to Send frame. The destination node replies with a Clear To Send frame. Any other node receiving either the RTS or the CTS frame should refrain from sending data for a given time.
6
Challenges for MAC layer
• Exposed terminal problem
Sensing the medium as busy and not sending, even though no collision will occur at the receiver
• Mechanisms to cope with it
RTS/CTS Not as serious a problem as hidden terminal Also this is the right behavior for protocols that require an ACK
7
Challenges for MAC layer
• Power saving
Listening idly costs almost as much power as transmitting Scheduling sleep cycles is hard since sender and receiver should be wake
up at the same time
• Mechanisms to cope with it
Smart scheduling of sleep cycles
8
Challenges for MAC layer
• No support for reliable broadcast
ACKs are useful only for unicast traffic, for multicast/bcast ACK implosion occurs
• Mechanisms to cope with it
Use a dedicated slot to report collisions only
May not address fading effects
9
Wireless LAN MAC protocols
• ALOHA
• CSMA
• BTMA
• MACA
• GAMA
• EY-NPMA
• WSN MAC implementations
10
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%
11
CSMA
• Carrier sensing: before sending the node monitors the channel, if channel is busy, the node backoffs for a random time
• Used in 802.11, 802.15, WSN MAC layers, etc.
12
BTMA
• Busy-tone multiple access
• Each node has two freqs: data and control
• Solves the hidden & exposed terminal problem as follows:
While a node is receiving on the data channel, it places a busy-tone on the control channel
A sender sends iff it does not hear a busy-tone
• Downsides
Having two frequencies sufficiently apart for each node is impractical
Can be emulated (though expensive) via special busy-tone time-slot; pays off for applications with long data transfers
Links are asymmetric: not hearing busy does not imply collision freedom
Amplitude busy-tone
13
MACA
• Multiple access Collision Avoidance
• First-time RTS/CTS used
All nodes (except the original sender) hearing CTS will defer transmission Solves hidden and exposed terminal problems
14
GAMA
• Group Allocation Multiple Access
• Contention period and Data period (CSMA + TDMA)
• In the contention period, nodes that have data to send contend via CSMA
• In the data period nodes in the transmission group transmit data respectively
• When network is lightly loaded GAMA behaves as CSMA, when it is crowded GAMA behaves as TDMA
15
EY-NPMA
• Efficient leader election idea
An elimination round where each node bcast a [random | priority-based] length burst determines which node will have access to the channel in the communication round.
The leader node will know it won because when it stops transmission of its burst the channel will be idle.
• Does not solve hidden terminal problem
Might be useful for WSN MAC where best-effort light-weight solutions are preferred
16
Remaining big challenge: Multihop
Guarantees or fairness over multihop communication is challenging due to contention at every hop
17
WSN MAC implementations
• Best-effort light-weight solutions
CSMA is implemented Later MACs implement RTS/CTS Some MACs implement ACK
• Popular TinyOS MACs:
CC1000 MAC (default with TinyOS ≤1.1.x) SMAC BMAC
18
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
• 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
A Transmission Control Scheme for Media Access in Sensor Networks [2003]
19
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 resulting in two kinds of traffic
The traffics compete for the same upstream bandwidth RATE CONTROL!
• Hidden node problem
Solution without RTS/CTS
• Energy efficiency
Transmit, receive and idle consume roughly the same amount of energy The cost of dropping a packet varies with place and the packet
20
Contributions of Woo-Culler03
• Reduce idle listening
Turn off radio during backoff
• Initial MAC delay to avoid event synchronization
Highly synchronized nature of the traffic causes collisions
• Phase shift to reduce synchrony-livelock and achieve fairness
Apply back off as a phase shift to the periodicity of the application so that the synchronization among periodic streams of traffic can be broken
• Implicit acknowledgements
Overhearing forwarding counts as an acknowledgement
21
Contributions of Woo-Culler01
• Heuristic for alleviating hidden-node problem
Child reduces a potential hidden node problem with its grand parent by not sending 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
Configure a, b accordingly
a is the linear increase to allowable traffic rate: add a to p (probability to send)
b is the multiplicative decrease to allowable traffic rate: multiply p by b
Originating traffic should have less increase than route-thru: a_orig=a_route/(n+1)
Penalize route-thru traffic less than originating traffic: so b_route=1.5*b_orig
22
Overall
Advantages:
• Lightweight, control packet overhead is reduced
Disadvantages:
• Assumes periodicity of the originating traffic
23
SMAC [2002]
• Designed for energy efficiency and collision avoidance
• The major sources of energy waste are:
collision
overhearing
control packet overhead
idle listening
• S-MAC reduce the waste of energy from all the sources mentioned in exchange of some reduction in both per-hop fairness and latency
24
SMAC
• Protocol consist of three major components:
periodic listen and sleep
collision and overhearing avoidance
• Contributions of S-MAC are:
The scheme of periodic listen and sleep helps in reducing energy consumption by avoiding idle listening. The use of synchronization to form virtual clusters of nodes on the same sleep schedule
In-channel signaling puts each node to sleep when its neighbor is transmitting to another node (solves the overhearing problem and does not require additional channel)
Message passing technique to reduce application-perceived latency and control overhead (per-node fragment level fairness is reduced)
Evaluating an implementation of S-MAC over sensor-net specific hardware
25
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
26
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.
27
CCA…
Packet arrives between 22 and 54 ms
28
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
29
LPL…
• 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
30
Implementing RTS/CTS
• RTS-CTS is 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
31
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
cent
age
of C
hann
el C
apac
ity
B-MACB-MAC w/ ACKB-MAC w/ RTS-CTSS-MAC unicastS-MAC broadcastChannel Capacity
Thro
ughp
ut (b
ps)
32
Throughput vs power consumption
Reliable Broadcasting via Collision Detection
Murat Demirbas
SUNY Buffalo
34
Why single-hop reliable broadcast?
• Reliable broadcast is important
Safety (consistency) reasons: Sensor/actuator devices coordinating regulator valves should take consistent decisions to prevent a malfunction
Performance (goodput) reasons: Hidden terminal problem wastes a lot of the bandwidth
• Reliable broadcast is hard
RTS/CTS solutions are not directly or efficiently generalizable to broadcast
TDMA solutions require topology information and impose overhead via static scheduling of slots
35
Collision detection
• Collision detection enables reliable broadcasting efficiently
1. Use tiny control messages to test for clear-to-send & send data later
2. Use control messages to convey unary information even when messages collide
• Transmitter cannot detect collisions
Collisions occur at the receiver end
Collisions should be detected at the receiver end
Optionally communicate CD back to the transmitter
36
MAC layer
• MAC is implemented as a state machine (CC1000RadioIntM.nc)
idle, synchronizing, receiving, prepare-to-transmit, and transmit states
• In the idle state when a node detects a preamble byte
preamble (a predefined byte signalling that a message is about to be transmitted) synchronizing state (receiving the rest of the preamble bytes) receive state finally returns to idle state
37
Receiver side CD
• Sample the channel in the idle state
When the node detects intense activity in the medium CD is signaled
Good indication of a collision: Had this been a clear message, the node would be able to detect a preamble and be in the receive state
• Genuine activity is distinct from idle noise
Noise has significant variance in channel energy Genuine activity has fairly constant channel energy
• Our carrier sensing at the idle state searches for the pits:
If for a long period no pit is found, this is a good indication of genuine activity
For CD we use the same carrier sensing method as the CCA in prepare-to-transmit !
38
CRC based CD
• CRC for filtering the messages received with errors
The receiver calculates a running CRC for the message it receives compares this calculated CRC with the CRC appended to the transmitted
message The messages that fail the test are thrown away
• Raise a collision detection at the MAC layer when CRC fails
since it indicates that the receiver dropped a message
39
Preamble based CD
• Shadowing effect
While a node j is receiving a message, if the preambles of a stronger message arrives in the middle of the first message, the stronger message dominates the first message and renders it undeliverable
j synchronizes to this latter message and ignores the first message CRC for the first message does not even get computed so a collision
detection would not be triggered
• To detect this case we use a preamble based collision detection
In the absence of any collision, the preamble bytes are only heard in the synchronizing state, and no preamble is heard in the receive state
When j receives a preamble byte in receive state, this is a good indication of a collision
40
Why did CD receive no attention?
• CD is incompatible with unicast model
When a node receives a collision, the node can not decide whether it should complain or not
It can never be certain that the communication was addressed to itself
When all communication is broadcast (addressed to all nodes) a node is justified in complaining about any collision it detects
• There is a need for communicating receiver side CD information to the transmitter efficiently and reliably
Our protocols address this issue effectively by dedicating a slot for CD detected feedback
CD detected feedback uses at-least-one semantics
Collision of feedback also conveys information
41
Robcast: A reliable broadcast protocol
• Receiver
1. Listen
2. Received(Col) Send NCTS
3. Received(RTS) Listen
• Transmitter
1. Transmit RTS
2. Receive(NCTS) backoff
3. Transmit DATA
RTS NCTS DATAjkl
42
BEMA: Busy elimination multiple access
• Control phase serves two purposes:
1. Deferring new senders in the presence of an ongoing data transmission
Locked nodes transmit for the entire duration of Δ
2. Arbitration between multiple senders
Each potential sender would transmit for random period of time bounded by fj(Δ)
Transmitter of signal with the longest duration wins: each contender listens for a busy signal or collision AFTER it completes its busy signal transmission
DATAjkl
Control
43
Simulations
•PROWLER wireless sensor simulation tool
5x5 grid of motes varying the number of motes contending to transmit data
•BSMA
RTS to all neighbors; start data transmission upon receiving at least one CTS;
Upon NAK; retransmit data
•BMMM’
RTS/CTS handshake with all neighbors; data transmission
44
Number of collisions
• Collisions in BEMA and BMMM’ remain largely constant with increase in traffic load
45
Goodput
• BMMM’ suffers heavily due to high control overhead
• BSMA goodput decreases almost linearly as the number of collisions increase
• CSMA goodput is high and constant because the data loss due to collisions is compensated by the speed gain due to NO overhead in transmission
46
Round synchronization in BEMA
• Always-on solution:
FTSP time synchronization protocol
BEMA starts after FTSP completes its initial synchronization round
Periodic time synchronization messages of FTSP sent over BEMA to prevent interference with BEMA protocol
• On-demand ad-hoc solution:
Exploit collision detection info & reliable broadcast protocol structure
In BEMA collisions occur only in the control phase
Upon hearing a collision, set phase to control; reset the round timer
Scheme should converge quickly for small number of hops