CS434/534: Topics in Networked (Networking)...

Preview:

Citation preview

CS434/534: Topics in Networked (Networking) Systems

Wireless Foundation: Wireless Mesh Networks

Yang (Richard) YangComputer Science Department

Yale University208A 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

3

4

Recap: The Hidden Terminal Problem

BA C

❒ A is sending to B, but C cannot detect the transmission

❒ Therefore C sends to B

❒ In summary, A is “hidden” from C

DE

5

Recap: 802.11 RTS-CTS-data-ACK

t

SIFS

DIFS

data

ACK

defer access

otherstations

receiver

senderdata

DIFS

new contention

RTS

CTSSIFS SIFS

NAV (RTS)NAV (CTS)

10 usec

6

Recap: 802.11 CSMA/CA

data

waitB1 = 5

B2 = 15

B1 = 25

B2 = 20

data

wait

B1 and B2 are backoff intervalsat nodes 1 and 2cw = 31

B2 = 10busy

busy

7

Recap: PIFS

tNAV

polledwirelessstations

point coordinator

NAV

PIFSD

USIFS

SIFSD

contentionperiod

contention free periodmediumbusy

D: downstream poll, or data from point coordinatorU: data from polled wireless station

8

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

Slotted ALOHA Ethernet

Hidden-terminalCollision detection/prevention

Zigzag decoding

+CS+CD+EB

+CA+ACK+ RTS/CTS

Recap: ZigZag Decoding

Exploits 802.11’s behavior❒ Retransmissions àSame packets collide again

❒ Senders use random jittersà Collisions start with interference-free bits

∆1 ∆2Pa

Pb

PaPb

Interference-free Bits

ZigZag Algorithm

∆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

}

1

∆1 ≠∆2

1

∆21

2

1∆1

How Does ZigZag Work?

∆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

}

∆21

22∆1

How Does ZigZag Work?

3

∆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

}

∆21

2 4∆1

How Does ZigZag Work?

3 3

∆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

}

∆21

2 44∆1

How Does ZigZag Work?

3 5

∆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

}

∆21

6∆1

How Does ZigZag Work?

3 5 5

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

}

∆21

66∆1

How Does ZigZag Work?

2 4

3 5 7

∆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

}

∆21

6 8∆1

How Does ZigZag Work?

2 4

3 5 77

∆1 ≠∆2

Delivered 2 packets in 2 timeslotsAs efficient as if the packets did not collide

while (exists a chunk that is interference-free in one collision and has interference in the other) {

decode and subtract from the other collision

}

18

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

19

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

Packets start with known preamble

AP correlates known preamble with signal

Correlation

Time

Correlate

Matching Collision

❒ Question to think offline: Given (P1 + P2(D)) and (P1’, P2’(D’)), how to determine that P1 = P1’ and P2 = P2’

PaPb

P’aP’b

22

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?

• 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

12

12

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

12

12

What if AP Makes a Mistake?

∆1 ∆21 1

22

Bad News: Errors can propagate

3

Can we deal with these errors?

What if AP Makes a Mistake?

∆1 ∆2

What if AP Makes a Mistake?

Good News: Temporal DiversityA bit is unlikely to be affected by noise in both collisions

Get two independent decodings

Errors propagate differently in the two decodings

For each bit, AP picks the decoding that has a higher PHY confidence

Which decoded value should the AP pick?

∆1 ∆2

1 1

22

3

AP Decodes Backwards as well as Forwards

29

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

USRPsTestbed

• 10% HT,

• 10% partial HT,

• 80% perfectly sense each other

802.11a

Throughput Comparison

802.11

Throughput

CD

F of

con

curre

nt fl

ow p

airs

Hidden Terminals

Partial Hidden Terminals

Perfectly Sense

00.10.20.30.40.50.60.70.80.9

1

0 0.5 1 1.5 2

Throughput Comparison

ZigZag

Throughput

CD

F of

con

curre

nt fl

ow p

airs

802.11

Hidden Terminals get high throughput

00.10.20.30.40.50.60.70.80.9

1

0 0.5 1 1.5 2

ZigZag Exploits Capture Effect

Capture Effect❒ Subtract Alice and combine Bob’s packet

across collisions to correct errors

∆1 ∆2Pa1

Pb

Pa2Pb

3 packets in 2 time slots à better than no collisions

36

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

37

Infrastructure Mode Wireless

APAP

AP wired networkAP: Access Point

Problems of infrastructure mode wireless networks?

802.11 by default operates in infrastructure mode.

38

Mesh Networks

ad-hoc (mesh) mode

APAP

AP wired networkAP: Access Point

Benefits❍ fast and low-cost deployment❍ no central point of failure❍ no APs overhead for users

who can reach each other

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

40

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

41

Mesh Transmission Constraints

❒ transmissionsuccessful if there areno other transmitterswithin 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

42

Model

❒Domain is a disk of unit area❒There are n nodes in the domain❒The transmission rate is W bits/sec

43

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

45

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 2 bit time t bit time WTbit time 1

1

2

3

5

4

1

2

3

5

4

46

Transmission Model: End-to-end Perspective❒ Assume the network sends a total of lT 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 rb

h denote the hop-length of the h-th hop of the b-th bit

2

1

2

lT

47

Hop-Count Constraint

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

b

WTnbhl

1 2)(

2

48

m

k

(1+D)r’

r’

Area Constraint❒ Consider two simultaneous

transmissions at a bit-time

i

j

(1+D)r

r

Djm + r >= Dim >= (1+D)r’

ÞDjm >= (r+r’) D /2

Djm + r’ >= Djk >= (1+D)r

½ Dr

½ Dr’

49

Area Constraint

❒ For each transmissionwith distance r from sender to receiver, we draw a circle with radius ½ D r

❒ These circlesdo not overlap

50

Area Constraint: Global Picture

2

51

Area Constraint: Global Picture

sum over all circles, since each circle has at least ¼ of its area in the unit disk,

2

52

Summary: Two Constraints

❒ transmissionsuccessful if there areno other transmitters

within a distance (1+D)r of the receiver

Interference constraint❒ a single half-duplex

transceiver at each node

Radio interface constraint

å=

£T

b

nWTbhl

1 2)(

21

)(

1

2 16)(D

£åå= = p

l WTrT

b

bh

h

hb

receiver

sender

r(1+D)r

53

Capacity Bound åå==

£÷ø

öçè

æ n

ii

n

ii xnx

1

22

1Note:

Let L be the average (direct-line) distance for all lT end-to-end bits.

åå= =

£T

b

bh

h

hbrTL

l

l1

)(

1

ååååå= === =

££

®T

b

bh

h

hb

T

b

T

b

bh

h

hb rbhrTL

lll

l1

)(

1

2

11

)(

1)()(

nWTWTWTnTLD

=D

£

®

ppl 816

2 2

nWLD

£

®

pl 8 Discussion: what does the result mean?

å=

£T

b

nWTbhl

1 2)(

21

)(

1

2 16)(D

£åå= = p

l WTrT

b

bh

h

hb

54

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

n1

µ

55

Achieving Capacity: Example

❒ n/2 senders and receivers:

❒ lL=

56

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

58

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 l(n) bits/sec for all ODpairs

59

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) :

)(nrL

)()(nrLnnl

60

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

)()(nrLnnl

2222 )(16

16/)(1

nrnr D=

D pp

22 )(16nrW

Dp

61

Random Networks: Capacity

Required ≤ offered

Þ

Þ

22 )(16

)()(

nrW

nrLnn

D£p

l

)( 16)( 2 nnrWLn

D£p

l

62

Connectivity Constraint

❒ Need routes between origin-destination pairs - places a lower bound on transmit range r(n)

Not connected Connected

A D AD

To maintain connectivity with a high probability, requires r(n) on the order: n

nlog

63

Random Networks: Capacity

Required ≤ offeredÞ

Þ

Þnn

Lnlog1)( µl

22 )(16

)()(

nrW

nrLnn

D£p

l

)( 16)( 2 nnrWLn

D£p

l

nnnr log)( µ

64

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

65

Improving Wireless Mesh Capacity

❒ transmissionsuccessful if there areno other transmitters

within a distance (1+D)r of the receiver

Interference constraint❒ a single half-duplex

transceiver at each node

Radio interface constraint

å=

£T

b

nWTbhl

1 2)(

21

)(

1

2 16)(D

£åå= = p

l WTrT

b

bh

h

hb

nWLD

£p

l 8 rate*distance

capacity:

Reduce LIncrease

W

Approx.optimal

Multipletransceivers

Reduceinterf. area

Recommended