View
231
Download
2
Category
Tags:
Preview:
Citation preview
CHAPTER 5.
Medium Access Control (MAC) PROTOCOLS
CS5602: Principles and Techniques for Sensors and Information Perception
1
What is a MAC protocol?
CS5602: Principles and Techniques for Sensors and Information Perception
2
Objectives of MAC Protocols
Collision Avoidance Energy Efficiency Scalability Latency Fairness Throughput Bandwidth Utilization
CS5602: Principles and Techniques for Sensors and Information Perception
3
POWER CONSUMPTION
CS5602: Principles and Techniques for Sensors and Information Perception
4
SENSOR
0
5
10
15
20
Po
wer
(mW
)
CPU TX RX IDLE SLEEP
RADIO
Major Sources of Energy Waste
CS5602: Principles and Techniques for Sensors and Information Perception
5
* Idle Listening
* Transmitter* Receiver
OBJECTIVE: Reduce energy consumption !!
Common to all wireless networks
Challenges for MAC in WSNs
1. WSN ArchitectureHigh density of nodes Increased collision probabilitySignaling overhead should be minimized to prevent
further collisionsSophisticated and simple collision avoidance
protocols required
CS5602: Principles and Techniques for Sensors and Information Perception
6
Challenges for MAC in WSNs
2. Limited Energy Resources Connectivity and the performance of the network is affected
as nodes die Transmitting and receiving consumes almost same energy Frequent power up/down eats up energy Need very low power MAC protocolsMinimize signaling overhead Avoid idle listening Prevent frequent radio state changes (active<->sleep)
CS5602: Principles and Techniques for Sensors and Information Perception
7
Challenges for MAC in WSNs
3. Limited Processing and Memory CapabilitiesComplex algorithms cannot be implementedConventional layered architecture may not be
appropriateCentralized or local management is limitedSimple scheduling algorithms requiredCross-layer optimization requiredSelf-configurable, distributed protocols required
CS5602: Principles and Techniques for Sensors and Information Perception
8
Challenges for MAC in WSNs
4. Limited Packet Size Unique node ID is not practical Limited header space Local IDs should be used for inter-node communication MAC protocol overhead should be minimized
5. Cheap Encoder/Decoders Cheap node requirement prevents sophisticated encoders/decoders to
be implemented Simple FEC codes required for error control Channel state dependent MAC can be used to decrease error rate
CS5602: Principles and Techniques for Sensors and Information Perception
9
Challenges for MAC in WSNs 6. Inaccurate Clock Crystals Cheap node requirement prevents expensive crystals to be
implemented Synchronization problems TDMA-based schemes are not practical
7. Event-based Networking Observed data depends on physical phenomenon Spatial and temporal correlation in the physical phenomenon
should be exploited
CS5602: Principles and Techniques for Sensors and Information Perception
10
BOTTOMLINE: Existing MAC protocols cannot be used for WSNs!!!
MAC Protocols for WSN
?-MAC (pick your letter!) μ-MAC, AI-LMAC, B-
MAC, Bit, BMA, CC-MAC, CMAC, Crankshaft, CSMA-MPS, CSMA/ARC, DMAC, E2-MAC, EMACs, f-MAC, FLAMA, Funneling-MAC, G-MAC, HMAC, LMAC, LPL…
MMAC, MR-MAC, nanoMAC, O-MAC, PACT, PEDAMACS, PicoRadio, PMAC, PMAC, Q-MAC, Q-MAC, QMAC, RATE EST, RL-MAC, RMAC, RMAC, S-MAC, S-MAC/AL, SCP-MAC, SEESAW, Sift, SMACS, SS-TDMA, STEM, T-MAC, TA-MAC, TICER, TRAMA, U-MAC, WiseMAC, X-MAC, Z-MAC
CS5602: Principles and Techniques for Sensors and Information Perception
11
http://www.st.ewi.tudelft.nl/~koen/MACsoup/
Overview of MAC Protocols for WSNs
1. Contention (RANDOM/CSMA)-Based MAC ProtocolsSleep-MAC, BMAC, T-MAC, X-MAX, CCMAC, etc…
2. Reservation-Based (TDMA BASED) MAC ProtocolsTRAMA, FLAMA, etc…
3. HYBRID (CSMA/TDMA) MAC ProtocolsZMAC, ….
CS5602: Principles and Techniques for Sensors and Information Perception
12
Overview of MAC Protocols for WSNs
CS5602: Principles and Techniques for Sensors and Information Perception
13
Contention (Random)-Based MAC Protocols
Channel access through carrier sense mechanism.
Provide robustness and scalability to the network.
Collision probability increases with increasing node density.
CS5602: Principles and Techniques for Sensors and Information Perception
14
IEEE 802.11
IEEE 802.11, “Wireless LAN medium access control (MAC) and physical layer (PHY) specifications,” 1999
Originally developed for WLANs
CS5602: Principles and Techniques for Sensors and Information Perception
15
REMINDER BASIC KNOWLEDGE
BASIC CSMA/CA (FLOWCHART)(Distributed Foundation Wireless Medium Access Control - Distributed Coordinated Function CSMA/CA (DFWMAC-DCF) for IEEE 802.11)
CS5602: Principles and Techniques for Sensors and Information Perception
16
BASIC CSMA/CA
CS5602: Principles and Techniques for Sensors and Information Perception
17
Slot TimeDirect access if medium is free IFS
t
Medium Busy
IFSIFS
Next Frame
Contention Window(Randomized Back-offMechanism)
Stationsensesthe channel and it is idle
BASIC CSMA/CA
A station with a frame to transmit senses the medium (channel).
IF IDLE waits to see if the channel remains idle for a time equal to IFS (Inter-frame spacing). If so, the station may transmit immediately.
IF BUSY (either because the station initially finds the channel busy or because the channel becomes busy during the IFS idle time), the station defers transmission and continues to monitor the channel until the current transmission is over.
CS5602: Principles and Techniques for Sensors and Information Perception
18
BASIC CSMA/CA
Once the current transmission is over, the station delays another IFS.
If the medium remains idle for this period, the station backs off using a binary exponential backoff scheme and again keeps sensing the medium.
Backoff scheme The station picks up a random number of slots (the initial
value of backoff counter) within a maximum contention window to wait before transmitting its frame.
CS5602: Principles and Techniques for Sensors and Information Perception
19
BASIC CSMA/CA
MAC runs a random number generator to set a BACKOFF CLOCK for every contending station.
Then the CONTENTION WINDOW starts in which all stations with packets for transmission run down their BACKOFF clocks.
The first station with its clock expiring starts transmission.
Other terminals sense the new transmission and freeze their clocks to be restarted after the completion of the current transmission in the next contention period.
CS5602: Principles and Techniques for Sensors and Information Perception
20
CSMA/CA Algorithm
If Collisions (Control or Data) Binary exponential increase (doubling) of CW;
Length of backoff time is exponentially increased as the station goes through successive retransmissions.
CS5602: Principles and Techniques for Sensors and Information Perception
21
Inter-frame Spaces (IFS)
CS5602: Principles and Techniques for Sensors and Information Perception
22
t
Medium Busy SIFS
PIFS
DIFSDIFS
Next FrameBackoffWindow
Direct access if medium is free DIFS
Inter-frame Spaces (IFS)
Priorities are defined through different inter frame spaces
SIFS (Short Inter Frame Spacing)
Highest priority packets such as ACK, CTS, polling response
Used for immediate response actions
CS5602: Principles and Techniques for Sensors and Information Perception
23
Inter-frame Spaces (IFS)
PIFS (PCF IFS) - Point Coordination Function Inter-Frame spacing
Medium priority, for real time service using PCF
SIFS + One slot time
Used by centralized controller in PCF scheme when using polls
CS5602: Principles and Techniques for Sensors and Information Perception
24
Inter-frame Spaces (IFS)
DIFS (DCF, Distributed Coordination Function IFS)
Lowest priority, for asynchronous data service
SFIS + Two slot times
Used as minimum delay of asynchronous frames contending for access
CS5602: Principles and Techniques for Sensors and Information Perception
25
DFWMAC-DCF CSMA/CA with ACK
Station has to wait for DIFS before sending data
Receiver ACKs immediately (after waiting for SIFS < DIFS) if the packet was received correctly (CRC))
Receiver transmits ACK without sensing the medium.
If ACK is lost, retransmission is performed.
Automatic retransmission of data packets in case of transmission errors
CS5602: Principles and Techniques for Sensors and Information Perception
26
DFWMAC-DCF CSMA/CA with ACK
CS5602: Principles and Techniques for Sensors and Information Perception
27
t
SIFS
DIFS
Contention W
ACK
Waiting Time
OtherStations
Receiver
Sender Data
DIFS
ContentionWindow
CSCE 496/896: Sensor Networks 28CS5602: Principles and Techniques for Sensors and Information Perception
28
Problems with CSMA/CA
Hidden terminal problem
Exposed terminal problem
CSCE 496/896: Sensor Networks 29CS5602: Principles and Techniques for Sensors and Information Perception
29
Hidden Terminal Problem
A senses the channel free and sends DATA C cannot hear A and senses the channel free DATA packet collides at B
A B CDATA
DATA
CSCE 496/896: Sensor Networks 30CS5602: Principles and Techniques for Sensors and Information Perception
30
Exposed Terminal Problem
B sends DATA to A (overheard by C) C inhibits its transmission to D since channel is busy A cannot hear C C-D transmission can actually take place without collisions
A B C DDATA DATA Tx
inhibited
DFWMAC-DCF CSMA/CA with RTS/CTS
Transmitter sends an RTS (Request To Send) after medium has been idle for time interval more than DIFS.
Receiver responds with CTS (Clear To Send) after medium has been idle for SIFS.
Then data is transmitted.
RTS/CTS is used for reserving channel for data transmission so that the collision can only occur in control message.
CS5602: Principles and Techniques for Sensors and Information Perception
31
DFWMAC-DCF CSMA/CA with RTS/CTS
Use short signaling packets for Collision Avoidance
RTS (Request To Send) Packet (20 Bytes): A sender requests the right to send from a receiver with a short RTS packet before it
sends a data packet
CTS (Clear To Send) Packet (16 Bytes): The receiver grants the right to send as soon as it is ready to receive
They contain: (Sender Address; Receiver Address; Packet Size)
CS5602: Principles and Techniques for Sensors and Information Perception
32
DFWMAC-DCF CSMA with RTS/CTS
CS5602: Principles and Techniques for Sensors and Information Perception
33
DIFS
Next Frame
CTS
RTS
Other
Source
Destination
DIFS
SIFS
Contention Window
Defer Access Backoff After Defer
SIFS
Data
SIFS
ACK
Time
Problems with CSMA/CA
Hidden terminal problem
Exposed terminal problem
CS5602: Principles and Techniques for Sensors and Information Perception
34
Hidden Terminal Problem
A sends RTS B sends CTS C overhears CTS C inhibits its own transmitter A successfully sends DATA to B
CS5602: Principles and Techniques for Sensors and Information Perception
35
A B CRTS
DATA
CTSCTS
Hidden Terminal Problem
How does C know how long to wait before it can attempt a
transmission? A includes length of DATA that it wants to send in the RTS
packet B includes this information in the CTS packet C, when it overhears the CTS packet, retrieves the length
information and uses it to set the inhibition time
CS5602: Principles and Techniques for Sensors and Information Perception
36
Exposed Terminal Problem
B sends RTS to A (overheard by C) A sends CTS to B C cannot hear A’s CTS C assumes A is either down or out of range C does not inhibit its transmissions to D
CS5602: Principles and Techniques for Sensors and Information Perception
37
A B C DRTS RTS
CTS Cannot hear CTSTx notinhibited
Collisions
Still possible – RTS packets can collide!
Binary exponential backoff performed by stations that experience RTS collisions
RTS collisions not as bad as data collisions in CSMA (since RTS packets are typically much smaller than DATA packets) for traditional wireless networks!
CS5602: Principles and Techniques for Sensors and Information Perception
38
DFWMAC-DCF CSMA/CA with RTS/CTS (Network Allocation Vector (NAV))
Both Physical Carrier Sensing and Virtual Carrier Sensing used in 802.11
If either function indicates that the medium is busy, 802.11 treats the channel to be busy
Virtual Carrier Sensing is provided by the NAV (Network Allocation Vector)
CS5602: Principles and Techniques for Sensors and Information Perception
39
DFWMAC-DCF CSMA/CA with RTS/CTS (Network Allocation Vector (NAV))
Most 802.11 frames carry a duration field which is used to reserve the medium for a fixed time period
Tx sets the NAV to the time for which it expects to use the medium
Other stations start counting down from NAV to 0
As long as NAV > 0, the medium is busy
CS5602: Principles and Techniques for Sensors and Information Perception
40
DFWMAC-DCF CSMA/CA with RTS/CTS (Network Allocation Vector (NAV))
CHANNEL VIRTUALLY BUSY a NAV is turned on!
The transmission will be delayed until the NAV expires.
When the channel is virtually available, then MAC checks for PHY condition of the channel.
CS5602: Principles and Techniques for Sensors and Information Perception
41
Illustration
CS5602: Principles and Techniques for Sensors and Information Perception
42
Sender
Receiver
NAV
RTS
CTS
DATA
ACK
SIFS
SIFS
SIFS
RTSCTS
CSMA/CA with RTS/CTS (NAV)
If receiver receives RTS, it sends CTS (Clear to Send) after SIFS.
CTS again contains duration field and all stations receiving this packet need to adjust their NAV
Sender can now send data after SIFS, acknowledgement via ACK by receiver after SIFS
CS5602: Principles and Techniques for Sensors and Information Perception
43
CSMA/CA with RTS/CTS (NAV)
Every station receiving the RTS that is not addressed to it, will go to the Virtual Carrier Sensing Mode for the entire period identified in the RTC/CTS communication, by setting their NAV signal on.
Network Allocation Vector (NAV) is set in accordance with the duration of the field
NAV specifies the earliest point at which the station can try to access the medium
CS5602: Principles and Techniques for Sensors and Information Perception
44
CSMA/CA with RTS/CTS (NAV)
Thus, the source station sends its packet without contention.
After completion of the transmission, the destination terminal sends an ACK and NAV signal is terminated, opening the contention for other users.
CS5602: Principles and Techniques for Sensors and Information Perception
45
CSMA/CA with RTS/CTS (NAV)
CS5602: Principles and Techniques for Sensors and Information Perception
46
t
SIFS
DIFS
RTS
ACK
defer access
OtherStations
Receiver
Sender data
DIFS
ContentionWindow
RTS
CTS
SIFS SIFS
NAV (CTS)NAV (RTS)
MAC Protocols for WSNs
Contention (RANDOM/CSMA)-Based MAC ProtocolsSleep-MACBMACCCMAC
CS5602: Principles and Techniques for Sensors and Information Perception
47
S-MAC: SLEEP MACW. Ye, et. al., “Medium Access Control with Coordinated Adaptive Sleeping for Wireless Sensor Networks,'‘ IEEE/ACM Trans. on Networking, June 2004.
Problem: “Idle Listening” consumes significant energy Solution: Periodic listen and sleep
CS5602: Principles and Techniques for Sensors and Information Perception
48
• During sleeping, radio is turned off• Reduce duty cycle to ~ 10% (Listen for 200ms and
sleep for 1.8s)
Latency Energy
sleeplisten
listen
sleeptime
S-MAC
Each node goes into periodic sleep mode during which it switches the radio off and sets a timer to awake later
When the timer expires it wakes up and listens to see if any other node wants to talk to it
CS5602: Principles and Techniques for Sensors and Information Perception
49
S-MAC The duration of the sleep and listen cycles are application
dependent and they are set the same for all nodes
Requires a periodic synchronization among nodes to take care of any type of clock drift
CS5602: Principles and Techniques for Sensors and Information Perception
50
Periodic Sleep and Listen
All nodes are free to choose their own listen/sleep schedules.
To reduce control overhead, neighboring nodes are synchronized together.
They listen at the same time and go to sleep at the same time (synchronized sleep).
CS5602: Principles and Techniques for Sensors and Information Perception
51
Synchronization
CS5602: Principles and Techniques for Sensors and Information Perception
52
SYNC packets are exchanged periodically to maintain schedule synchronization.
SYNCHRONIZATION PERIOD: Period for a node to send a SYNC packet. Receivers will adjust their timer counters immediately after they receive the
SYNC packet
Sender Node ID Next Sleep Time
SYNC PACKET
PERIODIC LISTEN AND SLEEP
CS5602: Principles and Techniques for Sensors and Information Perception
53
Maintaining Synchronization
CS5602: Principles and Techniques for Sensors and Information Perception
54
Listen interval is divided into two parts: one for receiving SYNC packets and other for transmitting/receiving RTS (Request To Send)
Choosing and Maintaining Schedules
Each node maintains a schedule table that stores schedules of all its known neighbors
For initial schedule, DO:
A node first listens to the medium for a certain amount of time (at least the synchronization period)
CS5602: Principles and Techniques for Sensors and Information Perception
55
Choosing and Maintaining Schedules
If it does not hear a schedule (SYNC packet) from another node, it randomly chooses a schedule and broadcasts its schedule with a SYNC packet immediately
This node is called a Synchronizer
CS5602: Principles and Techniques for Sensors and Information Perception
56
Choosing and Maintaining Schedules
If a node receives a schedule from a neighbor before choosing its own schedule, Follows this neighbor’s scheduleBecomes a Follower Waits for a random delay and broadcasts
its schedule
CS5602: Principles and Techniques for Sensors and Information Perception
57
Coordinated Sleeping
In a large network, we cannot guarantee that all nodes follow the same schedule.
The node on the border will follow both schedules. When it broadcasts a packet, it needs to do it twice,
first for nodes on schedule 1 and then for those on schedule 2.
CS5602: Principles and Techniques for Sensors and Information Perception
58
Schedule 2Schedule 1
Border Nodes
Border nodes have less time to sleep and consume more energy than others.
OPTION: Let border node adopt only one schedule (received first).
CS5602: Principles and Techniques for Sensors and Information Perception
59
Collision Avoidance
S-MAC is based on contention, i.e., if multiple neighbors want to talk to a node at the same time, they will try to send when the node starts listening.
Similar to IEEE802.11, i.e. use RTS/CTS mechanism to address the hidden terminal problem
Perform carrier sense before initiating a transmission
CS5602: Principles and Techniques for Sensors and Information Perception
60
Collision Avoidance
If a node fails to get the medium, it goes to sleep and wakes up when the receiver is free and listening again
Broadcast packets are sent without using RTS/CTS.
Unicast data packets follow the sequence of RTS/CTS/DATA/ACK between the sender and receiver
CS5602: Principles and Techniques for Sensors and Information Perception
61
Collision Avoidance
Duration field in each transmitted packet indicates how long the remaining transmission will be so if a node receives a packet destined to another node, it knows how long it has to keep silent
The node records this value in network allocation vector (NAV) and sets a timer for it
CS5602: Principles and Techniques for Sensors and Information Perception
62
Collision Avoidance
When a node has data to send, it first looks at NAV.
If this value is not zero, then medium is busy (virtual carrier sense)
CS5602: Principles and Techniques for Sensors and Information Perception
63
Collision Avoidance
The medium is determined as free if both virtual and physical carrier sense indicate the medium is free
All immediate neighbors of both the sender and receiver should sleep after they hear RTS or CTS packet until the current transmission is over
CS5602: Principles and Techniques for Sensors and Information Perception
64
Multi-hop Latency
Multi-hop latency due to periodic sleep
CS5602: Principles and Techniques for Sensors and Information Perception
65
Adaptive Listening Feature
Reduce multi-hop latency due to periodic sleep
BASIC IDEA: Let the node which overhears its neighbor’s transmission stay awake
CS5602: Principles and Techniques for Sensors and Information Perception
66
Adaptive Listening Feature
CS5602: Principles and Techniques for Sensors and Information Perception
67
1 2
CTS
RTS
CTS
· Both neighbors will learn about how long the transmission is from the duration field in the RTS and CTS packets.
· They are able to adaptively wake up when the transmission is over.
· Reduce latency by at least half (e.g., CTS of 2 is heard by 3 also. 3 remains awake!!)
listen
listent
1t0
3 4
Message Passing Feature
Long messages are broken down in to smaller packets and sent continuously once the channel is acquired by RTS/CTS handshake.
Increases the sleep time, but leads to fairness problems.
CS5602: Principles and Techniques for Sensors and Information Perception
68
S-MAC - EXAMPLE
Topology Two-hop network with two sources and two sinks
Sources periodically generate a sensing message which is divided into fragments
Traffic load is changed by varying the inter-arrival period of the messages: (for inter-arrival period of 5s, message is generated every 5s by each source. Here it varies between 1-10s).
CS5602: Principles and Techniques for Sensors and Information Perception
69
S-MAC - EXAMPLE
CS5602: Principles and Techniques for Sensors and Information Perception
70
S-MAC - EXAMPLE
In each test, there are 10 messages generated on each source node.
Each message has 10 fragments, and each fragment has 40 bytes (200 data packets to be passed from their sources to their sinks).
The total energy consumption of each node is measured for sending this fixed amount of data.
CS5602: Principles and Techniques for Sensors and Information Perception
71
Experiments
CS5602: Principles and Techniques for Sensors and Information Perception
72
0 2 4 6 8 10
200
400
600
800
1000
1200
1400
1600
1800
Average energy consumption in the source nodes A&B
Message inter-arrival period (traffic load) (second)(small value heavy traffic load)
En
erg
y c
on
su
mp
tion
(m
J)802.11-like protocolwithout sleep
S-MAC with Periodic Sleep
S-MAC without periodic
sleep
Experiments
S-MAC consumes much less energy than 802.11-like protocol without sleeping
At heavy load, idle listening rarely happens, energy savings from sleeping is very limited. SMAC achieves energy savings by avoiding overhearing and efficiently transmitting long messages.
At light load, periodic sleeping plays the key role
CS5602: Principles and Techniques for Sensors and Information Perception
73
Energy Consumption over Multi-Hops
Ten-hop (11 nodes; 1m apart) linear (tandem) network at different traffic load; inter-arrival time 0-10s; source node sends 20 messages with each 100 bytes long.
CS5602: Principles and Techniques for Sensors and Information Perception
74
3 configurations for S-MAC: No sleep cycles10% duty cycle without adaptive listening 10% duty cycle with adaptive listening
Periodic listen interval: 115ms; 10% duty cycle means a frame length for
1.15sec.
Energy Consumption over Multi-Hops
CS5602: Principles and Techniques for Sensors and Information Perception
75
0 2 4 6 8 100
5
10
15
20
25
30
Message inter-arrival period (S)
En
erg
y c
on
su
mp
tion
(J)
10% duty cycle without adaptive listen
No sleep cycles
10% duty cycle with adaptive listen
Aggregate energy consumption at different traffic load in the entire
network At light traffic load,
periodic sleeping has significant energy savings over fully active mode
Adaptive listen saves more at heavy load by reducing latency
Latency as Hops Increase
Adaptive listen significantly reduces latency caused by periodic sleeping
CS5602: Principles and Techniques for Sensors and Information Perception
76
0 2 4 6 8 100
2
4
6
8
10
12Latency under highest traffic load
Number of hops
Ave
rage
mes
sag
e la
tenc
y (S
)
10% duty cycle withoutadaptive listen
10% duty cycle with adaptive listen
No sleep cycles
0 2 4 6 8 100
2
4
6
8
10
12Latency under lowest traffic load
Number of hops
Ave
rage
mes
sag
e la
tenc
y (S
)
10% duty cycle withoutadaptive listen
10% duty cycle withadaptive listen
No sleep cycles
Throughput as Hops Increase
Adaptive listen significantly increases throughput
Uses less time to pass the same amount of data
CS5602: Principles and Techniques for Sensors and Information Perception
77
0 2 4 6 8 100
20
40
60
80
100
120
140
160
180
200
220
Effective data throughput under highest traffic load
Number of hops
Effe
ctiv
e d
ata
thr
oug
hput
(B
yte/
S)
No sleep cycles
10% duty cycle with adaptive listen
10% duty cycle without adaptive listen
S-MAC - CONCLUSIONS
A mainly static network is assumedTrades off latency for reduced energy
consumptionRedundant data is still sent with
increased latencyIncreased collision rate due to sleep
schedules
CS5602: Principles and Techniques for Sensors and Information Perception
78
Keep core MAC simpleProvides basic CSMA accessOptional link level ACK, no link level RTS/CTSCSMA backoffs configurable by higher layersCarrier sensing using Clear Channel Assessment
(CCA)Sleep/Wake scheduling using Low Power Listening
(LPL)
CS5602: Principles and Techniques for Sensors and Information Perception
79
B-MACJ. Polastre, J. Hill, D. Culler, “Versatile Low Power Media Access for WSNs”, Proc. of ACM SenSys, Nov. 2004.
Goals of BMAC
Low Power Operation Effective Collision Avoidance Simple Implementation, Small Code and RAM Size Efficient Channel Utilization Reconfigurable by Network Protocols Tolerant to Changing RF/Networking Conditions Scalable to Large Numbers of Nodes
CS5602: Principles and Techniques for Sensors and Information Perception
80
B-MAC Design
Clear Channel Assessment (CCA)
Packet Backoffs
Link Layer Acknowledgments
Low Power Listening (LPL)
CS5602: Principles and Techniques for Sensors and Information Perception
81
B-MAC TinyOS Interfaces
CS5602: Principles and Techniques for Sensors and Information Perception
82
Interfaces for flexible control of BMAC by higher layer services.
Allow services to toggle CCA and ACKs
Set backoffs on a per message basis
Change the LPL mode for transmit and receive
Clear Channel Assessment
Effective collision avoidance
Find out whether the channel is idle If too pessimistic: waste bandwidth If too optimistic: more collisions
CS5602: Principles and Techniques for Sensors and Information Perception
83
Clear Channel Assessment
Key observationAmbient noise may change significantly depending
on the environmentPacket reception has fairly constant channel
energyNeed to tell what is noise and what is a signal
Software approach to estimating the noise floor -> BMAC solution!!!
CS5602: Principles and Techniques for Sensors and Information Perception
84
Clear Channel Assessment
Take a signal strength sample when the channel is assumed to be free/idleWHEN?Right after a packet is transmitted or when no valid
data is received
Samples are entered into a FIFO queue
CS5602: Principles and Techniques for Sensors and Information Perception
85
Clear Channel Assessment
Median of the queue is added to an exponentially weighted moving average with decay a
Median signal strength is used as a simple low pass filter to add robustness to the noise floor estimate.
At = a * St + (1 - a) * St-1
where a value is assumed to be 0.06 and FIFO queue size of 10.
CS5602: Principles and Techniques for Sensors and Information Perception
86
Clear Channel Assessment
Once a good estimate of the noise floor is established, a request to transmit a packet starts the process of monitoring the received signal from the radio.
CS5602: Principles and Techniques for Sensors and Information Perception
87
Single-Sample Thresholding vs Outlier Detection
Common approach: take single sample, compare to noise floor Large number of false negatives lower effective channel
BW BMAC: search for outliers in received signal (RSSI)
If a sample has significantly lower energy than the noise floor during the sampling period, then the channel is clear
If 5 samples are taken and no outlier is found, the channel is busy.
CS5602: Principles and Techniques for Sensors and Information Perception
88
CCA vs. Threshold Techniques
CS5602: Principles and Techniques for Sensors and Information Perception
89
Idle
Signal StrengthIndicator (RSSI)from transceiver
CCA vs. Threshold Techniques
Threshold: waste channel utilization CCA: Fully utilize the channel since a valid packet
could have no outlier significantly below the noise floor
A packet arrives between 22 and 54ms. The middle graph shows the output of a
thresholding CCA algorithm. ( 1: channel clear, 0: channel busy)
Bottom shows the output of an outlier detection algorithm CS5602: Principles and Techniques for Sensors
and Information Perception90
Clear Channel Assessment
Before transmission – take a sample of the channel
If the sample is below the current noise floor, channel clear, send immediately.
If five samples are taken, and no outlier found => channel busy, take a random backoff
Noise floor updated when the channel is known to be clear, e.g., just after packet transmission
CS5602: Principles and Techniques for Sensors and Information Perception
91
Clear Channel Assessment
CCA can be turned on/off (see BMAC-TinyOS interface)
If turned off, a schedule-based protocol can be implemented above B-MAC
If turned on, B-MAC uses an initial channel backoff when sending a packet
CS5602: Principles and Techniques for Sensors and Information Perception
92
Clear Channel Assessment
B-MAC does not set the backoff time, instead an event is signaled to the service that sent the packet via the MacBackoff interface.
The service may either return an initial backoff time or ignore the event
CS5602: Principles and Techniques for Sensors and Information Perception
93
Clear Channel Assessment
If ignored, a small random backoff is used.
After the initial backoff, the CCA outlier algorithm is run.
If the channel is not clear, an event signals the service for a congestion backoff time.
CS5602: Principles and Techniques for Sensors and Information Perception
94
Clear Channel Assessment
If no backoff time is given, again a small random backoff is used.
Enabling or disabling CCA and configuring the backoff allows services to change the fairness and available throughput.
CS5602: Principles and Techniques for Sensors and Information Perception
95
Low Power Listening (LPL)
Goal: Minimize “Listen Cost” PrinciplesNode periodically wakes up, turns radio on and
checks activity on the channel Wakeup time fixed (time spend sampling RSSI?) “Check time” variable
If energy/activity on the channel is detected, node powers up and stays awake for the time required to receive the incoming packet
CS5602: Principles and Techniques for Sensors and Information Perception
96
LPL- Preamble Sampling
Preamble is not a packet but a physical layer RF pulse (Minimize overhead)
CS5602: Principles and Techniques for Sensors and Information Perception
97
Sender
Receiver
Preamble Send data
Preamble sampling Active to receive a message
S
R
|Preamble| >= Sampling period
Low Power Listening
Node goes back to sleep If the packet is received successfullyAfter a timeout (if no packet received (a false
positive)) Preamble length matches channel checking periodNo explicit synchronization required
Noise floor estimation used to detect channel activity during LPL
CS5602: Principles and Techniques for Sensors and Information Perception
98
Check Interval for Channel Activity
To reliably receive data, the preamble length is matched to the interval that the channel is checked for activity
If the channel is checked for every 100 ms, the preamble must be at least 100 ms long for a node to wake up, detect activity on the channel, receive the preamble and then receive the message
CS5602: Principles and Techniques for Sensors and Information Perception
99
Check Interval for Channel Activity
Interval between LPL samples is maximized so that the time spent sampling the channel is minimized.
Transmit mode ~~ Preamble length Listening mode ~~ Check interval
CS5602: Principles and Techniques for Sensors and Information Perception
100
LPL Check Interval
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 is better to have larger preambles than to check
more often! More frequent checking of the radio Shorter transmission timeMore energy consumption
CS5602: Principles and Techniques for Sensors and Information Perception
101
LPL Check Interval
CS5602: Principles and Techniques for Sensors and Information Perception
102
Lif
eti
me in
years
Check Interval (ms)
Experimental Results: Throughput
“BMAC is about 4.5 faster than SMAC-unicast”Not as fast when ACK or RTS/CTS is usedDifferences less pronounced as # of nodes
increases Another issue: BMAC has CCA, thus it backs off
less frequently (and perhaps the backoff timer is faster)
What about hidden terminal without RTS/CTS?
CS5602: Principles and Techniques for Sensors and Information Perception
103
Throughput vs Power Consumption
10 nodes in a neighborhoodData must arrive within 10 secondsAverage power consumption per node
CS5602: Principles and Techniques for Sensors and Information Perception
104
Throughput vs Power Consumption
CS5602: Principles and Techniques for Sensors and Information Perception
105
ALWAYS ON
SMAC
BMAC
Pow
er
Con
su
med
(m
J/sec)
Traffic Load (bps)
Throughput vs Power Consumption
Low data rates: SMAC is betterVery low duty cycle
Power vs throughputSMAC: linearBMAC: sub-linear
Reason: SMAC duty cycle must increaseMore active periods, more SYNC periodsCost of resynchronizing?
BMAC: larger preambles at low throughput, progressively becoming smaller
CS5602: Principles and Techniques for Sensors and Information Perception
106
Energy vs Latency
10-hop networkSource sends a 100-byte packet every 10
secondsSMAC: 10% Duty Cycle w. Adaptive ListeningBMAC: choose optimal check interval
CS5602: Principles and Techniques for Sensors and Information Perception
107
LATENCY
CS5602: Principles and Techniques for Sensors and Information Perception
108
Energy vs Latency
SMAC again performs worse...Reason: sync packets, probability of multiple
schedules---less time to sleep
CS5602: Principles and Techniques for Sensors and Information Perception
109
Comparison of S-MAC and B-MACS-MAC B-MAC
Collision avoidance CSMA/CA CSMA
ACK Yes Optional
Message passing Yes No
Overhearing avoidance Yes No
Listen period Pre-defined + adaptive listen Pre-defined
Listen interval Long Very short
Schedule synchronization Required Not required
Packet transmission Short preamble Long preamble
Code size 6.3KB 4.4KB (LPL & ACK)
CS5602: Principles and Techniques for Sensors and Information Perception
110
Standards
BMAC has become the standard in TinyOS – Why?
CS5602: Principles and Techniques for Sensors and Information Perception
111
Collaborative MAC (CC-MAC) Protocol M.C. Vuran, and I. F. Akyildiz, “Spatial Correlation-based Collaborative Medium Access Control in Wireless Sensor Networks,” IEEE/ACM Transactions on Networking, vol. 14, no. 2, pp. 316 -329, April 2006
WSN are characterized by dense deployment of sensor nodes
CS5602: Principles and Techniques for Sensors and Information Perception
112
Exploit spatial correlation to reduce transmissions in MAC layer !
CS5602: Principles and Techniques for Sensors and Information Perception
113
Spatial Correlation Theory
113
),(
;.....;
)(
^
1
^
i
SSdED
YYgS
XfY
NSX
N
iii
ii
M. C. Vuran, O. B. Akan, and I. F. Akyildiz, “Spatio-Temporal Correlation: Theory and Applications for Wireless Sensor Networks," Computer Networks Journal (Elsevier), June 2004.
S event source Si the samples of this event S at
the sensor location (N sensors) Ni the observation (noise) error Xi the overall observed value of the
event E encoders for the channel to
transmit
Yi the encoded values fi the encoding function g estimation function s^ estimation of the event at
the sink D distortion function
S
Wireless
Sensor
Network
DecoderEncoder
N1S1 X1Y1
Encoder
N2
S2 X2 Y2
Encoder
Ni
Si Xi Yi
Encoder
NNXN YN
S
SN
Spatial Correlation in WSN
Each observed sample, Xi, of sensor i is represented as
CS5602: Principles and Techniques for Sensors and Information Perception
114
ii NSX i
where i also denotes the spatial location of the sensor, i.e., (xi, yi).
Si is the realization of the space-time process s(xi,yi) and Ni
is a sequence of i.i.d. Gaussian random variables of zero mean and
variance σ2N.
The noise each sensor node encounters is independent of each other,
i.e., Ni and Nj are independent for i=/j.
Spatial Correlation in WSN
S
jijijiji
jiSji
Si
i
SSEdKSScorr
SScorrSS
S
SE
2,),(
2
2
][)(},{
},{ },{ cov
}{ var
0}{
CS5602: Principles and Techniques for Sensors and Information Perception
115
The sink is interested in reconstructing the source S according to observations of sensor nodes ni which observe the spatially correlated version of S at (xi,yi), i.e., Si.
The physical phenomenon is modeled as JGRVs at each observation point as
Spatial Correlation in WSN
CS5602: Principles and Techniques for Sensors and Information Perception
116
where di,j = ||si – sj || denotes the distance between nodes ni and nj located at coordinates si and sj. Kς(.) is the correlation model.The covariance function is assumed to be non-
negative and decreases monotonically with the distance d =||si – sj || with limiting values of 1 at d=0 and 0 at
d=inf.
Generally, covariance models can be classified into four groups:
Spherical, Power Exponential, Rational Quadratic, Matern.
For Θ2=1, the model becomes exponential while for Θ2=2 squared exponential.
Θ gives the relation between correlation and distance.
NOTE: The larger Θ, the less is the correlation.
Spatial Correlation in WSN
]2,0( 0 ;)(},{ 21)/(
,),(
21
forandforedKSScorr d
jijiji
CS5602: Principles and Techniques for Sensors and Information Perception
117
Spatial Correlation in WSN
Each sensor node i sends to the sink an encoded version Yi
of the observed sample Xi according to encoding power constraint PE:
where ss and σN are the variances of the event information
Si and observation noise Ni.
CS5602: Principles and Techniques for Sensors and Information Perception
118
NiXP
Y iNS
E ,...,1 ,22i
Spatial Correlation in WSN
Sink tries to estimate Si to obtain the overall estimation of event S.
Assume that only M out of N samples are received by the sink where N samples from N sensor nodes which are observing the event.
Assume sink decodes each Yi using the Minimum Mean Square Error Estimation (MMSE) technique.
CS5602: Principles and Techniques for Sensors and Information Perception
119
Spatial Correlation in WSN
Event source can simply be computed by taking the average of all the event information received at the sink.
Then S^, the estimate of S is given as:
CS5602: Principles and Techniques for Sensors and Information Perception
120
M
ii
i
ii YYE
YSE
MMS
12][
][1)(^
Spatial Correlation in WSN
22NS
EP
CS5602: Principles and Techniques for Sensors and Information Perception
121
)(][
][2222
2
NSi
Sii
YE
YSE
]))(^[()( 2MSSEMD
The distortion achieved by using M packets (samples) to estimate the event S is given as
where we use the mean-squared error as the distortion metric.Denoting
and
Spatial Correlation in WSN
CS5602: Principles and Techniques for Sensors and Information Perception
122
M
i
M
ijji
NS
SM
iis
NS
SS MM
MSSEMD
1),(2222
6
1),(22
42
2
)(12
)(
]))([()(
Substituting these values into S^(M) formula above,
then the distortion function D(M) can be rewritten as:
Spatial Correlation in WSN
D(M) is the distortion achieved at the sink as a function of
the number of nodes M that send information to the sink
and correlation coefficients ρi,j and ρs,i between nodes ni and
nj and the event source S and node ni, respectively.
i.o.w., the difference between the overall estimation of the event at
the sink and the actual value of the event.
CS5602: Principles and Techniques for Sensors and Information Perception
123
Spatial Correlation in WSN
Parameters in the Example: In a 500x500 grid we deployed
50 nodes.
We use Power Exponential Model (one of the 4 covariance models) with
Θ2=1 and Θ1={10,50,...,10000} for the cov function K.
Parameter Θ1 controls the relation between the distance of
nodes and the correlation coefficient.
CS5602: Principles and Techniques for Sensors and Information Perception
124
Spatial Correlation in WSN Observed event distortion D(M) decreases with increasing M (number of sensor
nodes) With increasing Θ1, the observed event distortion decreases since close nodes
become less correlated with increasing Θ1. Spatial-correlation can be exploited to minimize the energy consumption by regulating which sensor nodes should transmit
CS5602: Principles and Techniques for Sensors and Information Perception
125
Spatial Correlation Theory
Distortion achieved by using M out of N sensor readings
Need
sN – Noise variance (Sensing board property)
sS – Signal variance (Physical phenomenon property)
r(i,j) , r(s,i) – Correlation coefficient (Physical phenomenon
property)
CS5602: Principles and Techniques for Sensors and Information Perception
126
M
i
M
ijji
NS
SM
iis
NS
SS MM
MSSEMD
1),(2222
6
1),(22
42
2
)(12
)(
]))([()(
Corollaries From Theory
Choose M nodes such that They are located as close to the event source as possible They are located as farther apart from each other as possible.
RESULT: If two nodes are located closer than a specific distance, i.e., rcorr, their observations are correlated
CS5602: Principles and Techniques for Sensors and Information Perception
127
Corollaries From Theory
CS5602: Principles and Techniques for Sensors and Information Perception
128
Representative nodes are not located close to each
other, the probability of collision decreases
RESULT: Exploiting spatial correlation not only improves the distortion but also utilizes the
wireless channel by avoiding collisions
Collaborative MAC (CC-MAC) Protocol
Main Components Iterative Node Selection (INS) Algorithm (@Sink)Determines protocol parameters (required
distance (rcorr) for correlation neighbors)
Event MAC (@Sensors)Filters out correlated data
Network MAC (@Sensors)Provides prioritization for route-thru packets
CS5602: Principles and Techniques for Sensors and Information Perception
129
@Sink: Iterative Node Selection (INS) Algorithm
Find rcorr such that maximum distortion Dmax is met
How is the correlation radius, rcorr calculated?
1. INS performs vector quantization (VQ) techniques to form Voronoi regions, i.e., correlation regions
2. Correlation distance (rcorr) is found
rcorr is then used in the distributed algorithm at sensors
CS5602: Principles and Techniques for Sensors and Information Perception
130
@Sink: Iterative Node Selection (INS) Algorithm
Estimate sS, r(i,j) , and r(s,i)
Estimate signal parameters from received samples
Find rcorr
Iteratively find minimum M* such that Dmax is met
Form Voronoi regions
Find rcorr
CS5602: Principles and Techniques for Sensors and Information Perception
131
INS: Parameter Estimation
Sensors send their observations based on query (for one cycle)
INS estimates the variance sS2
from the collected data (via variance estimation techniques)
Estimate correlation parameters
CS5602: Principles and Techniques for Sensors and Information Perception
132
S1
S2
S3
S4
S5
INS: Parameter Estimation
Correlation coefficient
d(i,j) – distance between nodes q1 – correlation parameter Use S1, S2, S3 … to calculate empirical K(d)
Estimate average q1
Use q1 for further calculations
CS5602: Principles and Techniques for Sensors and Information Perception
133
1),( /),( )( jidji edK
1),( /),( )(
jid
S
jiji e
SSdK
INS: Find rcorr
Start calculating D(M) by setting M=N N all nodes (in the interested region or the whole network)
If D(M) < Dmax
Decrease M by k (system parameter) runVQ
Generate multiple topologies with M nodes Sensors have different locations for each topology Calculate r(s,i), r(i,j) using q1
Calculate D(M) Repeat while D(M) < Dmax
CS5602: Principles and Techniques for Sensors and Information Perception
134
INS: Find rcorr
End result M*=argmin{D(M) < Dmax}
CS5602: Principles and Techniques for Sensors and Information Perception
135
INS: Find rcorr
CS5602: Principles and Techniques for Sensors and Information Perception
136
Correlation region
INS: Find rcorr
CS5602: Principles and Techniques for Sensors and Information Perception
137
Correlation neighbors
INS: Find rcorr
CS5602: Principles and Techniques for Sensors and Information Perception
138
Representative Node
INS: Find rcorr
CS5602: Principles and Techniques for Sensors and Information Perception
139
2*rcorr
INS: Find rcorr
Find avg. distance between selected M* nodes = 2rcorr
Sink sends rcorr to each node in the network
CC-MAC distributed operation is based only on rcorr
CS5602: Principles and Techniques for Sensors and Information Perception
140
Definitions
CS5602: Principles and Techniques for Sensors and Information Perception
141
Definitions
Suppose a node ni
Correlation neighbors
Nodes inside the correlation region of node ni
Representative node (node ni)
A node that represents all the nodes inside a correlation region
CS5602: Principles and Techniques for Sensors and Information Perception
142
ni
Definitions
Correlation region Region of radius rcorr
centered around node ni
Correlation neighbors Nodes inside the
correlation region of node ni
Representative node (node ni) A node that represents all
the nodes inside a correlation region
CS5602: Principles and Techniques for Sensors and Information Perception
143
rcorr
Definitions
Correlation region Region of radius rcorr
centered around node ni
Correlation neighbors Nodes inside the
correlation region of node ni
Representative node (node ni) A node that represents all
the nodes inside a correlation region
CS5602: Principles and Techniques for Sensors and Information Perception
144
rcorr
Definitions
Correlation region Region of radius rcorr
centered around node ni
Correlation neighbors Nodes inside the
correlation region of node ni
Representative node (node ni) A node that represents all
the nodes inside a correlation region
CS5602: Principles and Techniques for Sensors and Information Perception
145
rcorr
@Sensors: Collaborative MAC (CC-MAC) Protocol
Two reasons for medium access Source function: Transmit event
information Router function: Forward packets
from other nodes in the multi-hop path to the sink
Two components Event MAC (E-MAC) Network MAC
(N-MAC)
CS5602: Principles and Techniques for Sensors and Information Perception
146
Sink
@Sensors: Collaborative MAC (CC-MAC) Protocol
Two reasons for medium access Source function: Transmit event
information Router function: Forward packets
from other nodes in the multi-hop path to the sink
Two components Event MAC (E-MAC) Network MAC
(N-MAC)
CS5602: Principles and Techniques for Sensors and Information Perception
147
Sink
Event Area
@Sensors: Collaborative MAC (CC-MAC) Protocol
Two reasons for medium access Source function: Transmit event
information Router function: Forward packets
from other nodes in the multi-hop path to the sink
Two components Event MAC (E-MAC) Network MAC
(N-MAC)
CS5602: Principles and Techniques for Sensors and Information Perception
148
Sink
Event Area
@Sensors: Collaborative MAC (CC-MAC) Protocol
Two reasons for medium access Source function: Transmit event
information Router function: Forward packets
from other nodes in the multi-hop path to the sink
Two components Event MAC (E-MAC) Network MAC
(N-MAC)
CS5602: Principles and Techniques for Sensors and Information Perception
149
Sink
Event Area
@Sensors: Collaborative MAC (CC-MAC) Protocol
Two reasons for medium access Source function: Transmit event
information Router function: Forward packets
from other nodes in the multi-hop path to the sink
Two components Event MAC (E-MAC) Network MAC
(N-MAC)
CS5602: Principles and Techniques for Sensors and Information Perception
150
Sink
Event Area
Event MAC (E-MAC)
Aims to filter out correlated sensor recordsChoose representative nodes distributivelyForm correlation-based clusters
How will a node know it should perform E-MAC?
CS5602: Principles and Techniques for Sensors and Information Perception
151
Packet Structure First Hop (FH) field
differentiates between newly generated packet and route thru packet
E-MAC or N-MAC is run accordingly
Representative nodes set the FH field for sensed data
CS5602: Principles and Techniques for Sensors and Information Perception
152
Event MAC (E-MAC)
First Contention Phase (FCP)
CS5602: Principles and Techniques for Sensors and Information Perception
153
Event Area
Event MAC (E-MAC)
First Contention Phase (FCP)
CS5602: Principles and Techniques for Sensors and Information Perception
154
Event AreaFH=1
RTS
Event MAC (E-MAC)
First Contention Phase (FCP)
CS5602: Principles and Techniques for Sensors and Information Perception
155
Event Arearcorr
Event MAC (E-MAC)
First Contention Phase (FCP)Nodes contend using IEEE 802.11 structure for
the first timeWinner nodes are the representative nodesRepresentative nodes set the FH field in their
packets for further communication
CS5602: Principles and Techniques for Sensors and Information Perception
156
Event MAC (E-MAC)
rcorr is used to determine if neighbor nodes are correlation neighbors
After a node ni captures the channel all the correlation neighbors of ni
Drop their packetsEnter Suspicious Sleep State (SSS)
Stay in SSS for TSSS sec.
CS5602: Principles and Techniques for Sensors and Information Perception
157
Event MAC (E-MAC)
Suspicious Sleep State (SSS)Wake up at random times to look for incoming trafficMaintain connectivity and save energy
All nodes enter First Contention Period (FCP) after TSSS sec. to maintain equal load-sharing
CS5602: Principles and Techniques for Sensors and Information Perception
158
Event MAC (E-MAC)
CS5602: Principles and Techniques for Sensors and Information Perception
159
Network MAC (N-MAC)
Since correlation is filtered out by E-MAC, route-thru packet has higher priority
Route thru packets may traverse through multiple event areas
Router nodes clear the FH field to indicate N-MAC should be used for the route thru packet
CS5602: Principles and Techniques for Sensors and Information Perception
160
Network MAC (N-MAC)
CS5602: Principles and Techniques for Sensors and Information Perception
161
FH=1
RTS
Network MAC (N-MAC)
CS5602: Principles and Techniques for Sensors and Information Perception
162
FH=0
RTS
Network MAC (N-MAC)
CS5602: Principles and Techniques for Sensors and Information Perception
163
FH=1
RTS
FH=0
RTS
Network MAC (N-MAC)
CS5602: Principles and Techniques for Sensors and Information Perception
164
FH=0
RTS
Backoff
Network MAC (N-MAC)
N-MAC prioritizes route-thru packets during medium access usingSmaller backoff window sizeSmaller inter-frame spacing during contention
Router nodes have higher prioritization over representative nodes
CS5602: Principles and Techniques for Sensors and Information Perception
165
Network MAC (N-MAC)
CS5602: Principles and Techniques for Sensors and Information Perception
166
CC-MAC Performance Energy consumption
decreases with increasing reporting period
Increasing rcorr decreases the number of representative nodes, i.e. energy consumption
Energy conservation of 56% is possible going from rcorr=30m to rcorr=100m
CS5602: Principles and Techniques for Sensors and Information Perception
167
Avg. energy consumption/node for
different rcorr
CC-MAC Performance 60% increase in energy
consumption by decreasing TSSS from 150s to 30s
Decreased TSSS results in equal load sharing
For small TSSS, energy consumption is increased due to more frequent contention periods, i.e., FCP
CS5602: Principles and Techniques for Sensors and Information Perception
168
Avg. energy consumption/node for
different TSSS
CC-MAC Performance
CS5602: Principles and Techniques for Sensors and Information Perception
169
Medium Access Delay
CC-MAC Performance
CS5602: Principles and Techniques for Sensors and Information Perception
170
Packet Drop Rate
CS5602: Principles and Techniques for Sensors and Information Perception
171
CC-MAC Performance
Goodput
CC-MAC Performance
CS5602: Principles and Techniques for Sensors and Information Perception
172
Avg. Energy Consumption
MAC Protocols for WSNs
1. Contention (RANDOM/CSMA)-Based MAC ProtocolsSleep-MAC, BMAC, CCMAC, DSMAC, T-MAC, STEM,
WiseMAC, CSMA-MPS, Sift (read from the book)
2. Reservation-Based (TDMA BASED) MAC ProtocolsTRAMA, FLAMA, etc…
3. HYBRID (CSMA/TDMA) MAC ProtocolsZMAC, ….
CS5602: Principles and Techniques for Sensors and Information Perception
173
MAC Protocols for WSNs
1. Contention (RANDOM/CSMA)-Based MAC ProtocolsSleep-MAC, BMAC, CCMAC, etc…
2. Reservation-Based (TDMA BASED) MAC ProtocolsTRAMA, FLAMA, etc…
3. HYBRID (CSMA/TDMA) MAC ProtocolsZMAC, ….
CS5602: Principles and Techniques for Sensors and Information Perception
174
TRAMA: TRaffic-Adaptive MAC V. Rajendran, K. Obraczka, and J. J. Garcia-Luna-Aceves,``Energy-Efficient, Collision-Free Medium Access Control for Wireless Sensor Networks,'' Proc. ACM SenSys 2003, LA, CA, Nov. 2003.
A time-slotted structure
CS5602: Principles and Techniques for Sensors and Information Perception
175
115.2 kbps transmission slot 46ms (512-byte segments)
TRAMA
Time divided into PERIODS:
Random Access Period Used for signaling: synchronization and updating two-hop neighbour information. Collision!!
Scheduled Access Period: Used for contention free data exchange between nodes. Supports unicast, multicast and broadcast communication.
CS5602: Principles and Techniques for Sensors and Information Perception
176
TRAMA Components
Neighbor Protocol (NP)Gather 2-hop neighbourhood information
Schedule Exchange Protocol (SEP)Gather 1-hop traffic information for SCHEDULING
Adaptive Election Algorithm (AEA)Select transmitters, receivers for current time slot
leave other nodes in liberty to switch to low power mode using the NP and SEP results
CS5602: Principles and Techniques for Sensors and Information Perception
177
TRAMA
SIGNALING SLOTS: are used by the so-called NEIGHBOR PROTOCOL (NP) Propagate one-hop neighbor information among
neighboring nodes during the random access period.
A consistent two-hop topology information across all nodes is obtained
CS5602: Principles and Techniques for Sensors and Information Perception
178
TRAMA
TRANSMISSION SLOTS:
1. For collision free data exchange
2. For schedule propagation
Nodes use SEP (Schedule Exchange Protocol) to exchange traffic based information or schedules with neighbors
CS5602: Principles and Techniques for Sensors and Information Perception
179
Neighbor Protocol (NP)
Main Function:Gather two-hop neighborhood information by using
signaling packets during the random access period.
If no updates, signaling packets are sent as “keep alive” beacons
CS5602: Principles and Techniques for Sensors and Information Perception
180
Neighbor Protocol
A node times out if nothing is heard from its neighbor.
Updates retransmitted to guarantee packet delivery
CS5602: Principles and Techniques for Sensors and Information Perception
181
Schedule Exchange Protocol (SEP)
Each node computes a SCHEDULE INTERVAL (SCHED) based on the rate at which packets are produced.
SCHED represents # of slots for which the node can announce the schedule to its neighbors according to its current state (queue)
CS5602: Principles and Techniques for Sensors and Information Perception
182
Schedule Exchange Protocol (SEP)
The node pre-computes # of slots in the interval
[t, t+SCHED]
for which it has the highest priority among its two-
hop neighbors (contenders) WINNING SLOTS
CS5602: Principles and Techniques for Sensors and Information Perception
183
Schedule Exchange Protocol (SEP)
The node announces the intended receivers for these slots.
The last winning slot is used for broadcasting the node’s schedule for the next interval.
CS5602: Principles and Techniques for Sensors and Information Perception
184
If these winning slots cannot be filled by the node the remaining vacant slots can be released to other nodes.
Schedule Exchange Protocol (SEP)
EXAMPLE: Node u SCHED is 100 slots.
During time slot 1000, u computes its winning slots
between [1000,1100].
Assume: These slots are 1009, 1030, 1033, 1064,
1075, 1098.
u uses slot 1098 to announce its next schedule by
looking ahead from [1098,1198].
CS5602: Principles and Techniques for Sensors and Information Perception
185
Schedule Exchange Protocol (SEP)
Nodes announce their schedules via SCHEDULE PACKETS.
BITMAP: with the length equal to # of one-hop
neighbors.
Each bit corresponds to one particular receiver.
Example: One node with 4 neighbors 14,7,5 and 4.
BITMAP size 4 ..
For broadcast: all bitmap bits are set to 1.
CS5602: Principles and Techniques for Sensors and Information Perception
186
Schedule Packet Format
CS5602: Principles and Techniques for Sensors and Information Perception
187
Schedule Exchange Protocol (SEP)
CS5602: Principles and Techniques for Sensors and Information Perception
188
SourceAddr: Node announcing the schedule.Timeout: # of of slots for which the schedule
is valid(starting from the current slot)Width: Length of the neighbor bitmap (# of
one hop neighbors)numSlots: total # of winning slots (# of
bitmaps contained in the packet)
Data Packet
Timeout: # of slots for which the schedule is valid NumSlots: # of winning slots Bitmap: Indicates whether the node is transmitting or not (|
Bitmap| = NumSlots)
CS5602: Principles and Techniques for Sensors and Information Perception
189
Adaptive Election Algorithm (AEA)
Given: Each node knows its two-hop neighborhood and their current schedules
How to decide which slot (in scheduled access period) a node can use? Use node identifier x and globally known hash function h For time slot t, compute priority p = h (x © t) Compute this priority for next k time slots for node itself and
all two-hop neighbors Node uses these time slots for which it has the highest
priority
CS5602: Principles and Techniques for Sensors and Information Perception
190
Simulation Results Broadcast traffic using
Poisson arrivals.
50 nodes, 500x500 area.
512 byte data.
Average node density: 6
CS5602: Principles and Techniques for Sensors and Information Perception
191
Delivery Ratio
Energy Savings
CS5602: Principles and Techniques for Sensors and Information Perception
192
Percentage Energy Savings
TRAMA Limitations
Complex election algorithm and data structure. Overhead due to explicit schedule propagation. Higher queueing delay.
CS5602: Principles and Techniques for Sensors and Information Perception
193
MAC Protocols for WSNs
1. Contention (RANDOM/CSMA)-Based MAC ProtocolsSleep-MAC, BMAC, T-MAC, CCMAC, etc…
2. Reservation-Based (TDMA BASED) MAC ProtocolsTRAMA, PMAC, Energy-aware TDMA, BMA-MAC,
Adaptive Low Power Res-based (read from the book)
3. HYBRID (CSMA/TDMA) MAC ProtocolsZMAC, ….
CS5602: Principles and Techniques for Sensors and Information Perception
194
Z(ebra)-MAC: A HYBRID MAC PROTOCOLI. Rhee, A. Warrier,M. Aia, J. Min, ACM SenSys 2005, Nov 2005.
CS5602: Principles and Techniques for Sensors and Information Perception
195
* Combines the strengths of both CSMA and TDMA at the same time offsetting their weaknesses.
* High channel efficiency and fair
MAC Channel Utilization
CSMA
TDMA
Low Contention High ContentionHigh Low
Low High
Effective Throughput CSMA vs. TDMA
CS5602: Principles and Techniques for Sensors and Information Perception
196# of Contenders
Channel Utilization
TDMA
CSMA
IDEAL
Z-MAC
CS5602: Principles and Techniques for Sensors and Information Perception
197
Uses the TDMA schedule created by DRAND as a 'hint' to schedule transmissions.
The owner of a time-slot always has priority over the non-owners while accessing the medium.
Unlike TDMA, non-owners can 'steal' the time-slot when the owners do not have data to send.
CS5602: Principles and Techniques for Sensors and Information Perception
198
This enables Z-MAC to switch between CSMA and TDMA depending on the level of contention
Under low contention, Z-MAC acts like CSMA (i.e. high channel utilization and
low latency), Under high contention, Z-MAC acts like TDMA (i.e. high channel utilization,
fairness and low contention overhead)
Z-MAC
Z-MAC Operation
CS5602: Principles and Techniques for Sensors and Information Perception
199
Setup phaseNeighbour discoverySlot assignmentLocal frame exchangeGlobal time synchronization
Communication phaseSetup phase is not used until a significant change in
topology
DRAND (Distributed TDMA Scheduling) – Algorithm
CS5602: Principles and Techniques for Sensors and Information Perception
200
C D
A
FB
C D
A E
B
E
F
Radio Interference Map
Input Graph
C DA E
B FDRAND
Slot Assignme
nt
0
0
1
32
1
DRAND – Algorithm – Successful Round
CS5602: Principles and Techniques for Sensors and Information Perception
201
AF
D G
E
B
CRequest
Step 1. Broadcast Request
Grant
Step 2. Receive Grants
AF
D G
E
B
C
AF
D G
E
B
CA
F
D G
E
B
C Two Hop Release
Step 4. Broadcast Two Hop Release
AF
D G
E
B
CRelease
Step 3. Broadcast Release
DRAND – Algorithm – Unsuccessful Round
CS5602: Principles and Techniques for Sensors and Information Perception
202
AF
D G
E
B
CRequest
Step 1. Broadcast Request
Reject
Step 2. Receive Grants from A,B,D but Reject from E
AF
D G
E
B
CGrant
AF
D G
E
B
CFail
Step 3. Broadcast Fail
Grant
Local Frames
CS5602: Principles and Techniques for Sensors and Information Perception
203
After DRAND, each node needs to decide on the frame size. Conventional wisdom – Synchronize with rest of the network on
Maximum Slot Number (MSN) as the frame size.
Disadvantage:MSN must be broadcast across the entire network. Unused slots if neighborhood small, e.g., A and B would have to
maintain frame size of 8, in spite of having small neighborhood.
Local Frames - Example
CS5602: Principles and Techniques for Sensors and Information Perception
204
4(5)
A
H
G
F
E
DCB
2(5)1(2) 0(5)3(5)
2(5)
1(5)
0(2)
Label is the assigned slot, number in parenthesis is maximum slot number within two hops
205CS5602: Principles and Techniques for Sensors
and Information Perception205
Local Frames
Time Frame Rule (TF Rule)
Let node i be assigned to slot si, according to DRAND and MSN within two hop neighborhood be Fi, then i's time frame is set to be 2a, where positive integer a is chosen to satisfy condition
2a-1 <= Fi < 2a – 1
In other words, i uses the si-th slot in every 2a time frame (i's slots are L * 2a + si, for all L=1,2,3,...)
Local Frames - Example
CS5602: Principles and Techniques for Sensors and Information Perception
206
Transmission Control
CS5602: Principles and Techniques for Sensors and Information Perception
207
Slot Ownership If current timeslot is the node's assigned time-slot, then it
is the Owner, and all other neighboring nodes are Non-Owners.
Transmission Control
CS5602: Principles and Techniques for Sensors and Information Perception
208
Low Contention Level – Nodes compete in all slots, albeit with different priorities. Before transmitting:Owner
Backoff = Random(To)
Non-Owner
Backoff = To + Random(Tno)
After backoff, sense channel, if busy repeat above, else send.
Transmission Control
CS5602: Principles and Techniques for Sensors and Information Perception
209
Switches between CSMA and TDMA automatically depending on contention level
Performance depends on specific values of To and Tno
From analysis, To = 8 and Tno = 32 are used for best performance
Transmission Control
CS5602: Principles and Techniques for Sensors and Information Perception
210
Time SlotsA(0)
B(1)
0 021
Ready to Send, Start Random(To) Backoff Ready to Send, Start To + Random(Tno)
Backoff
After Backoff, CCA Idle
After Backoff, CCA Busy
Non-Owner Backoffs
Owner Backoffs
Explicit Contention Notification (ECN)
CS5602: Principles and Techniques for Sensors and Information Perception
211
Informs all nodes within two-hop neighborhood not to send during its time-slot
When a node receives ECN message, it sets its HCL flag
ECN is sent by a node if it experiences high contention
Explicit Contention Notification
CS5602: Principles and Techniques for Sensors and Information Perception
212
High contention detected by lost ACKs or congestion backoffs.
On receiving one-hop ECN from i, forward two-hop ECN if it is on the routing path from i.
Explicit Contention Notification C experiences high contention C broadcasts one-hop ECN message to
A, B, D. A, B not on routing path (C->D->F), so
discard ECN. D on routing path, so it forwards ECN as
two-hop ECN message to E, F. Now, E and F will not compete during C's
slot as Non-Owners. A, B and D are eligible to compete during
C's slot, albeit with lesser priority as Non-Owners.
CS5602: Principles and Techniques for Sensors and Information Perception
213
A
F
E
D
B
C
discarddiscard
forward
forward
Thick Line – Routing PathDotted Line – ECN Messages
Two-Hop Experiments
CS5602: Principles and Techniques for Sensors and Information Perception
214
Setup – Two-HopDumbbell shaped topologyTransmission power varied between low (50) and high
(150) to get two-hop situations.Aim – See how Z-MAC works when Hidden Terminal
Problem manifests itself.
Sources SourcesSink
Single-Hop Throughput
CS5602: Principles and Techniques for Sensors and Information Perception
215
Z-MAC
B-MAC
Experimental Setup - Testbed 40 Mica2 sensor motes Wall-powered and
connected to the Internet via Ethernet ports
Programs uploaded via the Internet, all mote interaction via wireless
Links vary in quality, some have loss rates up to 30-40%
Asymmetric links also present (14-->15)
CS5602: Principles and Techniques for Sensors and Information Perception
216
Multi Hop Results – Throughput
CS5602: Principles and Techniques for Sensors and Information Perception
217
Z-MAC
B-MAC
MULTI-HOP
Multi Hop Results – Energy Efficiency (KBits/Joule)
CS5602: Principles and Techniques for Sensors and Information Perception
218
Z-MAC
B-MAC
MULTI-HOP
MAC Protocols for WSNs
1. Contention (RANDOM/CSMA)-Based MAC ProtocolsSleep-MAC, BMAC, T-MAC, CCMAC, etc…
2. Reservation-Based (TDMA BASED) MAC ProtocolsTRAMA, FLAMA, etc…
3. HYBRID (CSMA/TDMA) MAC ProtocolsZMAC, ….
CS5602: Principles and Techniques for Sensors and Information Perception
219
Open Research Issues
1. Mobility Support
2. Real-time Communication
CS5602: Principles and Techniques for Sensors and Information Perception
220
Recommended