CS434/534: Topics in Networked (Networking) Systems Wireless Foundation: Wireless Mesh Networks Yang (Richard) Yang Computer Science Department Yale University 208A Watson Email: yry@cs.yale.edu http://zoo.cs.yale.edu/classes/cs434/
Outline Recap Wireless background Frequency domain Modulation and demodulation Wireless channels Wireless PHY design Wireless MAC design (one hop) wireless access problem and taxonomy wireless resource partitioning dimensions media access protocols From single-hop MAC to multi-hop mesh wireless mesh network capacity maximize mesh capacity
Admin. PS2 questions Project first check point Due Thursday after break
Recap: The Hidden Terminal Problem A is sending to B, but C cannot detect the transmission Therefore C sends to B In summary, A is “hidden” from C
Recap: 802.11 RTS-CTS-data-ACK DIFS RTS data 10 usec sender SIFS SIFS CTS SIFS ACK receiver NAV (RTS) DIFS data other stations NAV (CTS) t defer access new contention
B1 and B2 are backoff intervals Recap: 802.11 CSMA/CA busy B1 = 25 B2 = 20 B1 = 5 data wait data wait B2 = 10 B2 = 15 busy B1 and B2 are backoff intervals at nodes 1 and 2 cw = 31
Recap: PIFS D: downstream poll, or data from point coordinator SIFS D D point coordinator SIFS U polled wireless stations NAV NAV contention free period t medium busy contention period D: downstream poll, or data from point coordinator U: data from polled wireless station
Recap: Wireless Link Access Control Problem: single shared medium, hence if two transmissions overlap on all dimensions [time, space, frequency, and code], then it is a collision +CS+CD+EB Slotted ALOHA Ethernet +CA +ACK + RTS/CTS Hidden-terminal Collision detection/ prevention Zigzag decoding
Recap: ZigZag Decoding Exploits 802.11’s behavior Retransmissions Same packets collide again Senders use random jitters Collisions start with interference-free bits Pa Pa ………… How do we leverage these interference free bits to decode the collisions? ∆1 Pb ∆2 Pb Interference-free Bits
ZigZag Algorithm ∆1 ≠∆2 ∆1 ∆2 1 1 while (exists a chunk that is interference-free in one collision and has interference in the other) { decode and subtract from the other collision }
How Does ZigZag Work? ∆1 ≠∆2 ∆1 ∆2 1 1 2 while (exists a chunk that is interference-free in one collision and has interference in the other) { decode and subtract from the other collision }
How Does ZigZag Work? ∆1 ≠∆2 ∆1 ∆2 1 3 2 2 while (exists a chunk that is interference-free in one collision and has interference in the other) { decode and subtract from the other collision }
How Does ZigZag Work? ∆1 ≠∆2 ∆1 ∆2 1 3 3 2 4 while (exists a chunk that is interference-free in one collision and has interference in the other) { decode and subtract from the other collision }
How Does ZigZag Work? ∆1 ≠∆2 ∆1 ∆2 1 3 5 4 2 4 while (exists a chunk that is interference-free in one collision and has interference in the other) { decode and subtract from the other collision }
How Does ZigZag Work? ∆1 ≠∆2 ∆1 ∆2 1 3 5 5 2 4 6 while (exists a chunk that is interference-free in one collision and has interference in the other) { decode and subtract from the other collision }
How Does ZigZag Work? ∆1 ≠∆2 ∆1 ∆2 1 3 5 7 6 2 4 6 while (exists a chunk that is interference-free in one collision and has interference in the other) { decode and subtract from the other collision }
How Does ZigZag Work? ∆1 ≠∆2 ∆1 ∆2 1 3 5 7 7 2 4 6 8 while (exists a chunk that is interference-free in one collision and has interference in the other) { decode and subtract from the other collision } Thus, even in the face of collisions, we are able to correctly receive 2 packets in 2 timeslots. Delivered 2 packets in 2 timeslots As efficient as if the packets did not collide
Outline Admin. and recap Media access control Slotted Aloha Hidden terminal Example: 802.11 Hidden terminal with 802.11 revisited Overall idea Technical issues Collision detection
Collision Detection: How does the AP know it is a Collision and Where the Second Packet Starts? Time ∆
Detecting Collisions and the Value of ∆ Time AP received signal Correlate Packets start with known preamble AP correlates known preamble with signal ∆ Correlation Time
Pa Pb P’a P’b Matching Collision Question to think offline: Given (P1 + P2()) and (P1’, P2’(’)), how to determine that P1 = P1’ and P2 = P2’ Determine offset first Correlation of P2() and P2’(’)
Outline Admin. and recap Media access control Slotted Aloha Hidden terminal Example: 802.11 Hidden terminal with 802.11 revisited Overall idea Technical issues Collision detection Subtracting chunks
How Does the AP Subtract the Signal? 1 2 Channel’s attenuation or phase may change between collisions Can’t simply subtract a chunk across collisions Alice’s signal in first collision Alice’s signal in second collision Now that the AP knows where the second packet starts, it is going to take the interference-free chunk from at the start of the first collision and subtract it from the second. In practice, it is not that simple…………..
Re-modulate bits to get channel-free signal 1 2 Subtracting a Chunk Decode chunk into bits Removes effects of channel during first collision Re-modulate bits to get channel-free signal Apply effect of channel during second collision Use correlation to estimate channel despite interference The solution to this problem however is simple. …….. Now the AP can subtract the first chunk. The AP iterates this process to decode both the whole packet.
What if AP Makes a Mistake? But, as is the usual case, channel adds noise which could lead to decoding errors.
What if AP Makes a Mistake? Bad News: Errors can propagate 1 3 1 ∆1 ∆2 2 2 For example, if the channel was noisy it can cause a decoding error in chunk 1. Since we subtract chunks across collisions, errors in the first collision can propagate to the second collision For example, Now when we subtract, the error in chunk 1 can lead to a decoding mistake in chunk 2, which itself could propagate further. Can we deal with these errors?
What if AP Makes a Mistake? Good News: Temporal Diversity A bit is unlikely to be affected by noise in both collisions ∆1 ∆2 The good new is that we have temporal diversity. Each bit appears twice on the channel. It is unlikely that the same bit is in error in both collisions. We can leverage this property by decoding each bit twice using two independent decodings. But how do we get these two independent decodings? I have already described to u … one way of decoding. Get two independent decodings
AP Decodes Backwards as well as Forwards ∆1 ∆2 2 2 3 1 1 Errors propagate differently in the two decodings Which decoded value should the AP pick? But in addition to this forward decoding method we can also decode backwards. For each bit, AP picks the decoding that has a higher PHY confidence
Outline Admin. and recap Media access control Slotted Aloha Hidden terminal Example: 802.11 Hidden terminal with 802.11 revisited Overall idea Technical issues Collision detection Subtracting chunks Deployment
Acknowledgement Use as much synchronous acknowledgement as possible for backward compatibility
Implementation USRP Hardware GNURadio software Carrier Freq: 2.4-2.48GHz BPSK modulation
Testbed USRPs 802.11a 10% HT, 10% partial HT, 80% perfectly sense each other Blah blah blah… Since Software radios do all operations in software in user mode, they cannot perform carrier sense accurately. So, to capture carrier sense, each of our nodes have both 802.11 and USRP radios. We first run the experiment using the 802.11 nodes which apply carrier sense. Then we repeat the same experiment the USRP nodes, while forcing them to have the same number of collisions as the corresponding 802.11 nodes.
Throughput Comparison Perfectly Sense Partial Hidden Terminals Hidden Terminals CDF of concurrent flow pairs 802.11 We see three regions. Some nodes are complete hidden terminals and hardly get any throughput. Others are partial hidden terminals and get sub-optimal throughput, and the rest are get good throughput. Throughput
Throughput Comparison ZigZag Exploits Capture Effect Hidden Terminals get high throughput CDF of concurrent flow pairs ZigZag 802.11 … what used to be hidden terminals, they get excellent throughput. Throughput
3 packets in 2 time slots better than no collisions Capture Effect Subtract Alice and combine Bob’s packet across collisions to correct errors Pa1 Pa2 ∆1 ∆2 Pb Pb Finally, ZigZag makes a better use of capture effects. Capture effect can happen when the AP can decode Alice’s packets despite interference from Bob. But in ZigZag, the AP also subtract Alice’s packets from the collision signals to get Bob’s packets. Since Bob’s signal is so weak it is unlikely that one collision is sufficient to decode it. But ZigZag can combine the results of decoding Bob’s packet across both collisions to improve performance. 3 packets in 2 time slots better than no collisions
May 21, 2007 May 21, 2007 Summary Basic lesson: Traditional thinking was on avoiding collisions Zigzag changed the way of thinking: decoding collisions Many extensions of the Zigzag idea: decoding collisions, instead of avoiding collisions See Remap in Backup Slides A good area for creative thinking 36 Yale University Yale University 36
Infrastructure Mode Wireless 802.11 by default operates in infrastructure mode. AP wired network AP: Access Point AP AP Problems of infrastructure mode wireless networks?
Mesh Networks ad-hoc (mesh) mode Benefits fast and low-cost deployment AP wired network AP: Access Point AP AP Benefits fast and low-cost deployment no central point of failure no APs overhead for users who can reach each other ad-hoc (mesh) mode Issues?
Outline Recap Wireless background Frequency domain Modulation and demodulation Wireless channels Wireless PHY design Wireless MAC design (one hop) From single-hop MAC to multi-hop mesh understanding: wireless mesh network capacity
Capacity of Mesh Networks The question we study: how much traffic can a mesh wireless network carry, assuming an oracle to avoid the potential overhead of distributed synchronization (MAC)? Why study capacity? learn the fundamental limits of mesh wireless networks separate the spatial reuse perspective and system design perspective gain insight for designing effective wireless protocols
Mesh Transmission Constraints transmission successful if there are no other transmitters within a distance (1+D)r of the receiver receiver sender r (1+D)r Interference constraint a single half-duplex transceiver at each node: either transmits or receives transmits to only one receiver receives from only one sender Radio interface constraint
Model Domain is a disk of unit area There are n nodes in the domain The transmission rate is W bits/sec
Capacity of Mesh Wireless Network Consider two types of networks arbitrary networks: place nodes optimally to derive overall upper bound random network: nodes are placed randomly
Outline Recap Wireless background Frequency domain Modulation and demodulation Wireless channels Wireless PHY design Wireless MAC design (one hop) From single-hop MAC to multi-hop mesh understanding: wireless mesh network capacity setting arbitrary networks: place nodes optimally to derive overall upper bound
Transmission Model: Bit-time Perspective Chop time into a total of WT bit-times in T seconds The transmission decision is made for each bit bit time 1 bit time 2 bit time t bit time WT 1 2 3 5 4 1 2 3 5 4
Transmission Model: End-to-end Perspective Assume the network sends a total of T end-to-end bits in T seconds Assume the b-th bit makes a total of h(b) hops from the sender to the receiver Let rbh denote the hop-length of the h-th hop of the b-th bit 1 2 T 2
Hop-Count Constraint 2 Since there are a total of WT bit-times, and during each bit-time there are at most n/2 simultaneous transmissions, we have
Area Constraint m k (1+)r’ r’ i j (1+)r r ½ r’ ½ r Consider two simultaneous transmissions at a bit-time i j (1+)r r ½ r’ ½ r Djm + r >= Dim >= (1+)r’ Djm + r’ >= Djk >= (1+)r Djm >= (r+r’) /2
Area Constraint For each transmission with distance r from sender to receiver, we draw a circle with radius ½ r These circles do not overlap
Area Constraint: Global Picture 2
Area Constraint: Global Picture 2 sum over all circles, since each circle has at least ¼ of its area in the unit disk,
Summary: Two Constraints Radio interface constraint Interference constraint a single half-duplex transceiver at each node transmission successful if there are no other transmitters within a distance (1+D)r of the receiver receiver sender r (1+D)r
Discussion: what does the result mean? Capacity Bound Note: Let L be the average (direct-line) distance for all T end-to-end bits. Discussion: what does the result mean?
Discussion L depends on traffic pattern (who needs to talk to whom) and positions of the end-to-end (application-level) senders and (application-level) receivers If end-to-end senders and receivers are spread out throughout the network, L is large per node capacity Otherwise, L will be small as network becomes denser
Achieving Capacity: Example n/2 senders and receivers: L=
Results: Arbitrary Networks Protocol Model
Outline Recap Wireless background Frequency domain Modulation and demodulation Wireless channels Wireless PHY design Wireless MAC design (one hop) From single-hop MAC to multi-hop mesh understanding: wireless mesh network capacity setting arbitrary networks: place nodes optimally to derive overall upper bound random networks: uniform distribution of nodes and senders/receivers
Uniform Random Networks Uniform distribution of n nodes n origin-destination (OD) pairs Each node chooses same power level P, and thus equal radius r(n) Equal throughput (n) bits/sec for all OD pairs
Random Networks: Required Bits Assume: average length of each OD pair is L Average number of hops: Total required bit transmissions per second to support l(n) :
Random Networks: Offered Bits Required bit transmissions per second: What is the maximum number of transmissions (of bits) in one second? space used per transmission (interference limited): at least ¼ p [Dr(n)/2]2 = pD2r2(n)/16 number of simultaneous transmissions at most (interference limited): total bits per second
Random Networks: Capacity Required ≤ offered
Connectivity Constraint Need routes between origin-destination pairs - places a lower bound on transmit range r(n) A A D D Connected Not connected To maintain connectivity with a high probability, requires r(n) on the order:
Random Networks: Capacity Required ≤ offered
Measurement Measured scaling law: throughput declines worse with n than theoretically predicted: 1/n1.68 Remaining story line wireless mesh networks may have low scalability, and need techniques to increase capacity
Improving Wireless Mesh Capacity Reduce interf. area Radio interface constraint Interference constraint a single half-duplex transceiver at each node transmission successful if there are no other transmitters within a distance (1+D)r of the receiver Multiple transceivers Approx. optimal Reduce L Increase W rate*distance capacity: