ZigZag - Institute of Network Coding

Cross-Layer Approach to Wireless Collisions
Dina Katabi
802.11 devices are increasingly prevalent
office
Home
City mesh
distributed and bursty access
Two devices access medium together  Collision
Job of the MAC:
Avoid Collisions!
And when they happen?
Be in denial!
In This Talk
• Collisions are not harmful
– We can decode colliding packets as efficiently
as if they were sent separately
• Collisions are beneficial
– We can exploit strategic collisions to increase
throughput  Analog Network Coding
The Hidden Terminals Problem
Collision!
Alice
Bob
The Hidden Terminals Problem
Retransmissions
More Collisions!
Bob
Alice
Can’t get any useful traffic!
Can we take two collisions and
produce the two packets?
Pa
Pb
Pa
Pb
Yes, we
can!
ZigZag
Exploits 802.11’s behavior
• Retransmissions
Same packets collide again
• Senders use random jitters
 Collisions start with interference-free bits
∆1
Pa
Pb
∆2
Interference-free Bits
Pa
Pb
How Does ZigZag Work?
1
1
∆1
∆2
∆1 ≠∆2
Find a chunk that is interference-free in one
collisions and has interference in the other
Decode and subtract from the other collision
How Does ZigZag Work?
1
1
∆1
∆2 2
∆1 ≠∆2
Find a chunk that is interference-free in one
collisions 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
Find a chunk that is interference-free in one
collisions 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
Find a chunk that is interference-free in one
collisions 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
Find a chunk that is interference-free in one
collisions 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
Find a chunk that is interference-free in one
collisions 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
Find a chunk that is interference-free in one
collisions 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 in 2 timeslots
• Delivered 2 packets
Find
a chunk
that is interference-free
As
if packets
didn’t collide in one
collisions and has interference in the other
• Decode
Low-complexity
decoder
and subtract linear
from the
other collision
• No need for synchronization
AP received a collision signal
Time
∆
How does the AP know it is a collision and
where the second packet starts?
Detecting Collisions and the Value of ∆
AP received signal
Correlate
Time
Packets start with
known preamble
AP correlates known
Preamble
preamble with signal
∆
Correlation
• Detect collision and the value of ∆
• WorksCorrelation
despite interference because correlation
Time
with an independent signal is zero
How Does the AP Subtract the Signal?
• Channel’s attenuation or phase may change
between collisions
Alice’ s signal in
first collision
Alice’ s signal in
second collision
• Can’t simply subtract a chunk across collisions
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
• Now, can subtract!
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 [JB07, WKSK07]
ZigZag Generalizes
ZigZag Generalizes
• Flipped order
∆2
1
∆1
2
2
1
ZigZag Generalizes
• Flipped order
• Different packet sizes
1
1
∆1
2
∆2 2
ZigZag Generalizes
• Flipped order
• Different packet sizes
• Multiple colliding packets
11
22
33
11
11
22
22
33
33
ZigZag Generalizes
•
•
•
•
Flipped order
Different packet sizes
Multiple colliding packets
Capture effect
Pa1
Pb
Pa2
Pb
3 packets in 2 timeslots better than no
collisions
Performance
Implementation
•
•
•
•
USRP Hardware
GNURadio software
Carrier Freq: 2.4-2.48GHz
BPSK modulation
Testbed
USRPs
• 10% HT, 10% partial HT,
80% perfectly sense each
other
• Each run randomly picks
an AP and two clients
• Co-located 802.11a nodes
that measure HTs. The
USRPs use the same
collision patterns as
802.11
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
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
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
Hidden Terminals get
high throughput
0
0.5
ZigZag
802.11
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
ZigZag
802.11
0
0.5
1
1.5
2
Throughput
ZigZag improved average Throughput by 25%
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
Hidden
Terminals
ZigZag
802.11
0
0.5
1
1.5
2
Improved hidden terminals loss rate from
72% to 0.7%
Throughput
Is ZigZag as efficient as if the colliding
packets were sent in separate slots?
• For every SNR,
Check that ZigZag can match the BER of
collision-free receptions
Is ZigZag as efficient as if packets were
collision-free Receptions?
Bit Error Rate (BER)
1.E-02
1.E-03
1.E-04
1.E-05
5
6
7
8
SNR in dB
9
10
11
12
Is ZigZag as efficient as if packets were
collision-free Receptions?
Bit Error Rate (BER)
1.E-02
Collision-Free
Receptions
1.E-03
1.E-04
1.E-05
5
6
7
8
SNR in dB
9
10
11
12
Is ZigZag as efficient as if packets were
collision-free Receptions?
Bit Error Rate (BER)
1.E-02
Collision-Free
Receptions
1.E-03
ZigZag-Decoded
Collisions
1.E-04
1.E-05
5
6
7
8
9
10
11
12
SNR in dBas if the colliding
ZigZag is as efficient
packets were sent separately
ZigZag makes collisions harmless
But can collisions be beneficial?
Current Wireless
Alice
Bob
Current Wireless
Bob
Alice
Current approach requires 4 time slots
Can we do better?
Naive Application of ZigZag
Alice
Collision!
Bob
Naive Application of ZigZag
Alice
Decode Collisions
Bob
Naïvely applying ZigZag requires 4 time slots
Decoding collisions at AP doesn’t reduce
timeslots
But the AP doesn’t need to decode!
What if the AP doesn’t decode?
Alice
Collision!
1) Alice and Bob transmit simultaneously
Bob
What if the AP doesn’t decode?
Alice
Collision!
Bob
1) Alice and Bob transmit simultaneously
2) AP amplifies and broadcasts the collision
What if the AP doesn’t decode?
Bob
Alice
Bob’s pkt
1fhj
1
1fhj1
Alice’s pkt
1
1
1) Alice and Bob transmit simultaneously
2
time
slots
instead
of
4
2) AP amplifies and broadcasts the collision
3) Alice subtracts her packet from the collision
 Throughput Gain of 2x
Extends Network Coding to Signals
Traditional network coding: nodes forward linear
combinations of received packets
New approach: channel naturally creates linear
combinations of signals
Analog Network Coding (ANC)!
Theoretical Limits
Theorem [Katti et al. ISIT’07]:
Informal version:
“For a symmetric two-way relay channel the rate
achieved by analog network coding at high SNR
is double the rate achieved by pure forwarding”
Performance
Implemented in software radio
Evaluated in a similar testbed
Metric
Gain = Throughput in ANC /Current Throughput
Throughput Gain for the Alice-Bob Scenario
1
0.8
CDF
0.6
0.4
0.2
0
1
1.2
1.4
1.6
1.8
2
Throughput gain
Median Throughput Gain is 1.7x
Related Work
• Network Coding and Physical-layer Network Coding
– Our ANC decoder linear modulation-independent and
works without synchronization
• Joint Decoding & 2-way relay
– Requires senders synchronization  hard in practice
• Interference Cancellation
– Requires exponential difference in power or code-rate
Conclusion
• Cross-layer design changes how we perceive
collisions
• Collisions need not be harmful
– ZigZag decodes collisions as efficiently as if the colliding
packets were sent in separate time slots
• Collisions can be beneficial
– Analog network coding induces strategic collisions to
increase throughput
Softcast: cross-layer wireless video without CSI