CS434/534: introduction - Yale "Zoo"

CS434/534: Topics in Networked
(Networking) Systems
Wireless Foundation:
Wireless Mesh Networks
Yang (Richard) Yang
Computer Science Department
Yale University
208A Watson
Email: [email protected]
http://zoo.cs.yale.edu/classes/cs434/
Outline
r
r
Recap
Wireless background
m
m
m
m
m
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
m
From single-hop MAC to multi-hop mesh
• wireless mesh network capacity
• maximize mesh capacity
Admin.
r PS2 questions
r Project first check point
m Due Thursday after break
3
Recap: The Hidden Terminal Problem
E
D
A
B
C
r A is sending to B, but C cannot detect the
transmission
r Therefore C sends to B
r In summary, A is “hidden” from C
4
Recap: 802.11 RTS-CTS-data-ACK
DIFS
sender
data
RTS
SIFS
receiver
other
stations
CTS SIFS
10 usec
SIFS
NAV (RTS)
NAV (CTS)
defer access
ACK
DIFS
data
t
new contention
5
Recap: 802.11 CSMA/CA
busy
B1 = 25
B1 = 5
wait
data
data
B2 = 20
busy
cw = 31
wait
B2 = 15
B2 = 10
B1 and B2 are backoff intervals
at nodes 1 and 2
6
Recap: PIFS
PIFS
point
coordinator
D
D
SIFS
U
polled
wireless
stations
NAV
SIFS
NAV
medium
busy
contention free period
contention
period
t
D: downstream poll, or data from point coordinator
U: data from polled wireless station
7
Recap: Wireless Link Access Control
r 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
Zigzag decoding
Collision detection/
prevention
8
Recap: ZigZag Decoding
Exploits 802.11’s behavior
r Retransmissions
Same packets collide again
r Senders use random jitters
 Collisions start with interference-free bits
∆1
Pa
Pb
∆2
Interference-free Bits
Pa
Pb
ZigZag Algorithm
1
1
∆1
∆2
∆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
1
∆1
∆2 2
∆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
3
∆1
2
∆2 2
∆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
∆1
3
3
∆2 2
4
∆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
∆1
3
5
4
∆2 2
4
∆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
∆1
3
5
5
∆2 2
4
6
∆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
∆1
3
5
7
6
∆2 2
4
6
∆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
∆1
3
5
7
7
∆2 2
4
6
8
∆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
}
Delivered 2 packets in 2 timeslots
As efficient as if the packets did not collide
Outline
r Admin. and recap
r Media access control
m Slotted Aloha
m Hidden terminal
m Example: 802.11
m Hidden terminal with 802.11 revisited
• Overall idea
• Technical issues
– Collision detection
18
Collision Detection: How does the AP know it is a
Collision and Where the Second Packet Starts?
Time
∆
19
Detecting Collisions and the Value of ∆
AP received signal
Correlate
Time
Packets start with
known preamble
AP correlates known
preamble with signal
∆
Correlation
Time
Matching Collision
Pa
Pb
P’a
P’b
r Question to think offline: Given (P1 + P2())
and (P1’, P2’(’)), how to determine that
P1 = P1’ and P2 = P2’
Outline
r Admin. and recap
r Media access control
m Slotted Aloha
m Hidden terminal
m Example: 802.11
m Hidden terminal with 802.11 revisited
• Overall idea
• Technical issues
– Collision detection
– Subtracting chunks
22
1
How Does the AP
Subtract the Signal?
2
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
Subtracting a Chunk
1
2
1
2
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
What if AP Makes a Mistake?
What if AP Makes a Mistake?
Bad News: Errors can propagate
1
3
∆1 2
1
∆2 2
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
Get two independent decodings
AP Decodes Backwards as well as Forwards
2
∆1
3
1
2
∆2
1
Errors propagate differently in the two decodings
Which decoded value should the AP pick?
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
29
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
• 10% HT,
• 10% partial HT,
• 80% perfectly
sense each other
USRPs
802.11a
CDF of concurrent flow pairs
Throughput Comparison
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
Perfectly
Sense
Partial Hidden
HiddenTerminals
Terminals
802.11
0
0.5
1
Throughput
1.5
2
CDF of concurrent flow pairs
Throughput Comparison
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
ZigZag Exploits
Capture Effect
Hidden Terminals get
high throughput
0
0.5
ZigZag
802.11
1
Throughput
1.5
2
Capture Effect
Subtract Alice and combine Bob’s packet
across collisions to correct errors
∆1
Pa1
Pb
∆2
Pa2
Pb
3 packets in 2 time slots  better than no collisions
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
Infrastructure Mode Wireless
802.11 by default operates in infrastructure mode.
AP: Access Point
AP
wired network
AP
AP
Problems of infrastructure mode wireless networks?
37
Mesh Networks
AP: Access Point
AP
AP
wired network
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?
38
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
40
Mesh Transmission Constraints
Interference constraint
transmission
successful if there are
no other transmitters
within a distance
(1+)r of the receiver
receiver
(1+)r
r
Radio interface constraint
a single half-duplex
transceiver at each
node:
either transmits or
receives
transmits to only one
receiver
receives from only one
sender
sender
41
Model
Domain is a disk of unit area
There are n nodes in the domain
The transmission rate is W bits/sec
42
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
43
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
1
1
2
2
3
3
4
4
5
5
bit time 1
bit time 2
bit time t
bit time WT
45
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
46
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
T
WTn
h(b) 

2
b 1
47
Area Constraint
Consider two simultaneous
transmissions at a bit-time
(1+)r’
(1+)r
½ r
j
r
Djm + r >= Dim >=
(1+)r’
Djm + r’ >= Djk >=
(1+)r

Djm >= (r+r’)  /2
m ½ r’
r’
k
i
48
Area Constraint
For each transmission
with distance r from
sender to receiver,
we draw a circle
with radius ½  r
These circles
do not overlap
49
Area Constraint: Global Picture
2
50
Area Constraint: Global Picture
2
sum over all circles, since each circle has at least ¼ of its area in
the unit disk,
51
Summary: Two Constraints
Radio interface constraint
a single half-duplex
transceiver at each
node
Interference constraint
transmission
successful if there are
no other transmitters
within a distance
(1+)r of the receiver
receiver
(1+)r
T
n
h(b)  WT

2
b 1
r
sender
T h ( b )
16WT
(r ) 

2


b 1 h 1
h 2
b
52
Capacity Bound
n


Note:   xi   n xi2
i 1
 i 1

T
n
h(b)  WT

2
b 1
Let L be the average (direct-line) distance for all
T end-to-end bits.
T h ( b )
TL    rbh

TL    rbh 

T h ( b )
h 2
(
r
 b ) 
b 1 h 1
T h ( b )
b 1 h 1
T
 h(b)
b 1
n
b 1 h 1
T h ( b )
16WT
2
h 2
(
r
 b )
b 1 h 1
WTn 16WT
8 WT
TL 

2
2

 

8W
L 
 
2
n
n
Discussion: what does the result mean?
53
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
1
per node capacity 
n
Otherwise, L will be small as network
becomes denser
54
Achieving Capacity: Example
n/2 senders and receivers:
L=
55
Results: Arbitrary Networks
Protocol Model
56
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
58
Random Networks: Required Bits
Assume: average length of each OD pair is L
Average number of hops:
L
r (n)
Total required bit transmissions per second to
support (n) :
L
n (n)
r ( n)
59
Random Networks: Offered Bits
Required bit transmissions per second:
L
n (n)
r ( n)
What is the maximum number of transmissions (of
bits) in one second?
space used per transmission (interference limited):
• at least ¼  [r(n)/2]2 = 2r2(n)/16
number of simultaneous transmissions at most
(interference limited):
1
16
 2
2
2
 r (n) / 16  r (n) 2
total bits per second
16W
2
2
 r (n)
60
Random Networks: Capacity
Required ≤ offered

L
16W
n (n)
 2
2
r (n)  r (n)

16W
 ( n) L  2
 nr (n)
61
Connectivity Constraint
Need routes between origin-destination
pairs - places a lower bound on transmit
range r(n)
A
D
Not connected
A
D
Connected
To maintain connectivity with a high
probability, requires r(n) on the order:
log n
n
62
Random Networks: Capacity
Required ≤ offered

L
16W
n (n)
 2
2
r (n)  r (n)

16W
 ( n) L  2
 nr (n)
log n
r ( n) 
n

1
 ( n) L 
n log n
63
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
64
Improving Wireless Mesh Capacity
Reduce
interf. area
Radio interface constraint
Interference constraint
a single half-duplex
transceiver at each
node
Multiple
transmission
successful if there are
no other transmitters
within a distance
(1+)r of the receiver
transceivers
T
n
h(b)  WT

2
b 1L
Reduce
rate*distance
capacity:
T h ( b )
Approx.
optimal
16WT
(r ) 

2


b 1 h 1
h 2
b
Increase
W
8W
 L
n
 
65