Link Layer; Media Access Control Y. Richard Yang 11/01/2012
2 Outline r Admin. and recap r Intro to link layer r Media access control
Admin. r Assignment 3 m Due date: coming Monday m Check web site for office hours and FAQs r Project proposal (due Friday) m Please send to by end of m Subject: Project Proposal m Content: Team members: Topic: One paragraph rough idea: r Exam: next Tuesday in class 3
4 Recap r App layer m Handles issues such as UI m Uses lower-layer provided abstractions, e.g., network abstraction –e.g., HttpURLConnection in GoogleSearch Example location service abstraction –e.g., Location Manager, and Location Listener in Assignment 3 r Physical layer capability m sender sends a seq. of bits to a receiver
App Layer: Logical Communications 5 E.g.: application r provide services to users r application protocol: m send messages to peer
6 Physical Communication application transport network link physical application transport network link physical application transport network link physical application transport network link physical network link physical data
7 Protocol Layering and Meta Data Each layer takes data from above r adds header (meta) information to create new data unit r passes new data unit to layer below
8 Link layer: Context r Data-link layer has responsibility of transferring datagram from one node to another node r Datagram may be transferred by different link protocols over different links, e.g., m Ethernet on first link, m frame relay on intermediate links m on last link transportation analogy r trip from New Haven to San Francisco m taxi: home to union station m train: union station to JFK m plane: JFK to San Francisco airport m shuttle: airport to hotel
9 Main Link Layer Services Framing o encapsulate datagram into frame, adding header, trailer and error detection/correction Multiplexing/demultiplexing o use frame headers to identify src, hop dest Media access control Reliable delivery between adjacent nodes o seldom used on low bit error link (fiber, some twisted pair) o common for wireless links: high error rates
10 Link Adaptors r link layer typically implemented in “adaptor” (aka NIC) m Ethernet card, modem, card r adapter is semi- autonomous, implementing link & physical layers r sending side: m encapsulates datagram in a frame m adds error checking bits, rdt, flow control, etc. r receiving side m looks for errors, rdt, flow control, etc m extracts datagram, passes to receiving node sending node frame receiving node datagram frame adapter link layer protocol
11 Outline r Recap r Introduction to link layer r Wireless link access control
12 Wireless Access Problem r Single shared broadcast channel m thus, if two or more simultaneous transmissions by nodes, due to interference, only one node can send successfully at a time
13 Wireless Access Problem r The general case is challenging and largely still open r We start with the simplest scenario (e.g., or cellular up links) in this class: m a single receiver (the Access Point)
14 Multiple Access Control Protocol r Protocol that determines how nodes share channel, i.e., determines when nodes can transmit r Communication about channel sharing must use channel itself ! r Discussion: properties of an ideal multiple access protocol.
15 Ideal Mulitple Access Protocol Efficient Fair/rate allocation Simple
16 MAC Protocols: a Taxonomy Goals r efficient, fair, simple Three broad classes: r channel partitioning m divide channel into smaller “pieces” (time slot, frequency, code) r non-partitioning m random access allow collisions m “taking-turns” a token coordinates shared access to avoid collisions
17 Outline r Recap r Introduction to link layer r Wireless link access control m partitioning dimensions
18 FDMA FDMA: frequency division multiple access r Channel divided into frequency bands r A transmission uses a frequency band frequency bands time
19 TDMA TDMA: time division multiple access r Time divides into frames; frame divides into slots r A transmission uses a slot in a frame
20 Example: GSM r A GSM operator uses TDMA and FDMA to divide its allocated frequency m divide allocated spectrum into different physical channels; each physical channel has a frequency band of 200 kHz m partition the time of each physical channel into frames; each frame has a duration of ms m divides each frame into 8 time slots (also called a burst) m each slot is a logical channel m user data is transmitted through a logical channel
21 higher GSM frame structures MHz 124 channels (200 kHz) downlink MHz 124 channels (200 kHz) uplink frequency time GSM TDMA frame ms GSM - TDMA/FDMA GSM time-slot (normal burst) µs 577 µs tailuser dataTrainingS guard space Suser datatail guard space 3 bits57 bits26 bits 57 bits1 13 S: indicates data or control
22 SDMA SDMA: space division multiple access r Transmissions at different locations, if far enough, can transmit simultaneously (same freq.) m Example: the cellular technique Suppose 24 MHz spectrum, 30 K per user #user supported: = Using cell #user supported: = Q: why not divide into infinite small cells?
23 CDMA CDMA (Code Division Multiple Access) r Unique “code” assigned to each user; i.e., code set partitioning r All transmissions share the same frequency and time; each transmission uses DSSS, and has its own “chipping” sequence (i.e., code) to encode data m e.g. code = Examples: Sprint and Verizon, WCDMA
24 DSSS Revisited user data d(t) code c(t) resulting signal X = tbtb tctc t b : bit period t c : chip period
25 Illustration: CDMA/DSSS Using BPSK r Assume BPSK modulation using carrier frequency f : y i (t) = A x i (t)c i (t) sin(2 ft) A: amplitude of signal f : carrier frequency x i (t): data of user i in [+1, -1] c i (t): code of i (a chipping sequence in [+1, -1]) r Suppose only i transmits y(t) = y i (t) r Decode at receiver i m incoming signal multiplied by c i (t) sin(2 ft) m since, c i (t) c i (t) = 1, y i (t)c i (t) sin(2 ft) = A x i (t) sin 2 (2 ft)
26 Illustration: Multiple User CDMA r Assume M users simultaneously transmit: y(t) = y 1 (t) + y 2 (t) … + y M (t) r At receiver i, incoming signal y(t) multiplied by c i (t) sin(2 ft) m consider the effect of j’s transmission y j (t)c i (t) sin(2 ft) = A c j (t)c i (t)x j (t) sin 2 (2 f c t)
27 CDMA: Deal with Multiple-User Interference r Two codes C i and C j are orthogonal, if m, where we use “.” to denote inner product, e.g. r If codes are orthogonal, multiple users can “coexist” and transmit simultaneously with minimal interference C 1 : C 2 : C 1. C 2 = 1 +(-1) (-1) (-1)+(-1)=0 Analogy: Speak in different languages!
28 Capacity of CDMA r In realistic setup, cancellation of others’ transmission is incomplete r Assume the received power at base station from all nodes is the same P (how?) r The power of the transmission with known code is increased to N P, where N is chipping expansion factor r The others remain on the order of P r Assume a total of M users r Then For IS-95 CDMA, N = 1.25M/4800 = 260 B
29 Generating Orthogonal Codes r The most commonly used orthogonal codes in current CDMA implementation are the Walsh Codes
30 Walsh Codes 1 1,1 1,-1 1,1,1,1 1,1,-1,-1 X X,X X,-X 1,-1,1,-1 1,-1,-1,1 1,-1,-1,1,1,-1,-1,1 1,-1,-1,1,-1,1,1,-1 1,-1,1,-1,1,-1,1,-1 1,-1,1,-1,-1,1,-1,1 1,1,-1,-1,1,1,-1,-1 1,1,-1,-1,-1,-1,1,1 1,1,1,1,1,1,1,1 1,1,1,1,-1,-1,-1, n 2n...
31 Orthogonal Variable Spreading Factor (OSVF) r Variable codes: Different users use different lengths spreading codes r Orthogonal: diff. users’ codes are orthogonal 1 1,1 1,-1 1,1,1,1 1,1,-1,-1 X X,X X,-X 1,-1,1,-1 1,-1,-1,1 1,-1,-1,1,1,-1,-1,1 1,-1,-1,1,-1,1,1,-1 1,-1,1,-1,1,-1,1,-1 1,-1,1,-1,-1,1,-1,1 1,1,-1,-1,1,1,-1,-1 1,1,-1,-1,-1,-1,1,1 1,1,1,1,1,1,1,1 1,1,1,1,-1,-1,-1,-1 SF=1SF=2SF=4SF=8 SF=nSF=2n... If user 1 is given code [1,1], what orthogonal codes can we give to other users?
32 WCDMA Orthognal Variable Spreading Factor (OSVF) r Flexible code (spreading factor) allocation m up link SF: 4 – 256 m down link SF: WCDMA downlink
33 Summary r SDMA, TDMA, FDMA and CDMA are basic media partitioning techniques m divide media into smaller “pieces” (space, time slots, frequencies, codes) for multiple transmissions to share r A remaining question is: how does a network allocate space/time/freq/code?
34 Outline r Recap r Introduction to link layer r Wireless link access control m partitioning dimensions m media access protocols
35 GSM Logical Channels and Request r Control channels m Broadcast control channel (BCCH) from base station, announces cell identifier, synchronization m Common control channels (CCCH) paging channel (PCH): b ase transceiver station (BTS) pages a mobile host (MS) random access channel (RACH): MSs for initial access, slotted Aloha access grant channel (AGCH): BTS informs an MS its allocation m Dedicated control channels standalone dedicated control channel (SDCCH): signaling and short message between MS and an MS r Traffic channels (TCH) r call setup from an MS BTS MS RACH (request signaling channel) AGCH (assign signaling channel) SDCCH (request call setup) SDCCH (assign TCH) SDCCH message exchange Communication
36 Slotted Aloha [Norm Abramson] r Time is divided into equal size slots (= pkt trans. time) r Node with new arriving pkt: transmit at beginning of next slot r If collision: retransmit pkt in future slots with probability p, until successful. Success (S), Collision (C), Empty (E) slots A B
37 Slotted Aloha Efficiency Q: What is the fraction of successful slots? suppose n stations have packets to send suppose each transmits in a slot with probability p - prob. of succ. by a specific node: p (1-p) (n-1) - prob. of succ. by any one of the N nodes S(p) = n * Prob (only one transmits) = n p (1-p) (n-1)
38 Goodput vs. Offered Load Curve S = throughput = “goodput” (success rate) Define G = offered load = np Slotted Aloha r when G (=p*n) < 1, as p (or n) increases m probability of empty slots reduces m probability of collision is still low, thus goodput increases r when G (=p*n) > 1, as p (or n) increases, m probability of empty slots does not reduce much, but m probability of collision increases, thus goodput decreases r goodput is optimal when G (=p*n) = 1
39 Maximum Efficiency vs. n 1/e = 0.37 At best: channel use for useful transmissions 37% of time!
40 Dynamics of (Slotted) Aloha r In reality, the number of stations backlogged is changing m we need to study the dynamics when using a fixed transmission probability p r Assume we have a total of m stations (the machines on a LAN): m n of them are currently backlogged, each tries with a (fixed) probability p m the remaining m-n stations are not backlogged. They may start to generate packets with a probability p a, where p a is much smaller than p
41 Model n backlogged each transmits with prob. p m-n: unbacklogged each transmits with prob. p a
42 Dynamics of Aloha: Effects of Fixed Probability n: number of backlogged stations 0 m successful transmission rate at offered load np + (m-n)p a new arrival rate: (m-n) p a desirable stable point undesirable stable point Lesson: if we fix p, but n varies, we may have an undesirable stable point offered load = 1 - assume a total of m stations - p a << p - success rate is the departure rate, the rate the backlog is reducing dep. and arrival rate of backlogged stations
43 Summary of Problems of Aloha Protocols r Advantages o Simple, decentralized uplink access Disadvantages o Low efficiency to carry large data frames o Offers only simple fairness
44 Ethernet Fix for Efficiency: Random Access to Carry Large Data Frames r Given collision detection, instead of wasting the whole frame transmission time (a slot), we waste only the time needed to detect collision. r Instead of a fixed probability, adapt probability according to # of collisions P P: packet size, C: contention window C C C
45 Ethernet Fix: Carrier-Sense Multiple Access /Collision Detection/Exponential Backoff get a frame from upper layer; K := 0; n := 0; // K: control wait time; n: no. of collisions repeat: wait for K * 512 bit-time; while (network busy) wait; wait for 96 bit-time after detecting no signal; transmit and detect collision; if detect collision stop and transmit a 48-bit jam signal; n ++; m:= min(n, 10), where n is the number of collisions choose K randomly from {0, 1, 2, …, 2 m -1}. if n < 16 goto repeat else give up else declare success The Ethernet algorithm Does collision detection work well in wireless?
46 The Hidden Terminal Problem BAC 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 DE
CSMA/CD + Hidden Terminals 47 get a frame from upper layer; K := 0; n := 0; // K: control wait time; n: no. of collisions repeat: wait for K * 512 bit-time; while (network busy) wait; wait for 96 bit-time after detecting no signal; transmit and detect collision; if detect collision stop and transmit a 48-bit jam signal; n ++; m:= min(n, 10), where n is the number of collisions choose K randomly from {0, 1, 2, …, 2 m -1}. if n < 16 goto repeat else give up else declare success Q: what is the outcome of CSMA/CD + hidden terminals? Hidden terminals cause collapse!
48 Discussion r How to handle hidden terminals?
Handling Hidden Terminals r Hidden terminals -> collision detection is not reliable -> if do not detect collision, there is still a chance of collision -> transmit with only prob. r CSMA/CD -> CSMA/CA/ACK (congestion avoidance) m default in m even if media is not sensed busy, transmits with a probability in real implementation, with a random delay m receiver ACK to make sure collision does not happen 49
Handling Hidden Terminals: Detect r Develop techniques to detect hidden terminals r Why cannot C detect potential collision? m Collision is spatially dependent C is at a different location than B m Only receiver can detect collision, to avoid, B should tell C that it is receiving 50 A BC
51 Hidden-Terminal Detection: Busy-tone r Used in CDPD (cellular digital packet data) r The base station sends a busy tone on the down link when receiving data
52 Hidden-Terminal Detection: Virtual Carrier Sense/ACK r Short signaling packets (virtual carrier sense) m RTS (request to send) and CTS (clear to send) m contain sender address, receiver address, transmission duration, called network allocation vector (NAV) r A node keeps quiet for NAV in CTS BAC RTSCTS D DATA
53 Comparisons: Media Access Techniques Handling Hidden Terminals r Slotted Aloha m very simple to implement but need clock sync and low efficiency r CSMA/CD (Ethernet alg.) m hidden terminal causes collapse r CSMA/CA/ACK m simple to implement m low efficiency
54 Comparisons: Media Access Techniques Handling Hidden Terminals r Busy tone m simple to implement but need a channel for busy signal r Virtual carrier sensing (RTS/CTS) m higher efficiency when a collision occurs (not waste the whole duration) m But energy consumption can be high because a node needs to monitor the environment all the time Idle:receive:send: 1:1.05:1.4 [Stemm and Katz 1997]; Digitan 2 Mbps WLAN 1:2:2.5 m many measurements show that overhead hurts performance
55 Outline r Admin. and recap r MAC in wireless networks r
56 IEEE Requirements r Design for small coverage (e.g. office, home) (implication?) r Low/no mobility (implications?) r High data-rate applications r Ability to integrate real time applications and non-real-time applications (implications?) r Use un-licensed spectrum
: Infrastructure Mode r Architecture similar to cellular m networks station (STA) terminal with access mechanisms to the wireless medium and radio contact to the access point m access point (AP) station integrated into the wireless LAN and the distribution system m basic service set (BSS) group of stations using the same AP m portal bridge to other (wired) networks m distribution system interconnection network to form one logical network (EES: Extended Service Set) based on several BSS Distribution System Portal 802.x LAN Access Point LAN BSS LAN BSS 1 Access Point STA 1 STA 2 STA 3 ESS
58 The IEEE Family ProtocolRelease Data Freq.Rate (max) ModulationRange (indoor) Legacy GHz2MbpsDSSS/FHSS~20 m a19995 GHz54 Mbps OFDM~35 m b GHz11 Mbps DSSS~38 m g GHz54 Mbps OFDM/DSSS~38 m n /5 GHz 540 Mbps OFDM~70 m
a Physical Channels 5150 [MHz] center frequency = *channel number [MHz] channel# [MHz] channel#
a Modulation r Use OFDM to divide each physical channel (20 MHz) into 52 subcarriers (20M/64=312.5 KHz each) m 48 data, 4 pilot r Adaptive modulation m BPSK: 6, 9 Mbps m QPSK: 12, 18 Mbps m 16-QAM: 24, 36 Mbps m 64-QAM: 48, 54 Mbps
MAC Layer r Traffic services m Asynchronous Data Service (mandatory) exchange of data packets based on “best-effort” support of broadcast and multicast m Time-Bounded Service (optional) exchange of bounded delay service
MAC Layer: Access Methods r DFWMAC-DCF CSMA/CA (mandatory) m collision avoidance via randomized “back-off“ m ACK packet for acknowledgements/detection r DFWMAC-DCF w/ RTS/CTS (optional) m additional virtual “carrier sensing: to avoid hidden terminal problem r DFWMAC- PCF (optional) m access point polls terminals according to a list
CSMA/CA r CSMA: Listen before transmit r Collision avoidance m when transmitting a packet, choose a backoff interval in the range [0, CW] CW is contention window r Count down the backoff interval when medium is idle m count-down is suspended if medium becomes busy r Transmit when backoff interval reaches 0
Backoff r IEEE contention window CW is adapted dynamically depending on collision occurrence m after each collision, CW is doubled m thus CW varies from CWmin to CWmax b802.11a802.11g aSlotTime20 usec9 usec20 usec (mixed); 9 usec (g-only) aCWmin31 slots15 slots
65 Congestion Avoidance: Example data wait B1 = 5 B2 = 15 B1 = 25 B2 = 20 data wait B1 and B2 are backoff intervals at nodes 1 and 2 cw = 31 B2 = 10 busy
– RTS/CTS + ACK r Sender sends RTS with NAV (Network allocation Vector, i.e. reservation parameter that determines amount of time the data packet needs the medium) r Receiver acknowledges via CTS (if ready to receive) m CTS reserves channel for sender, notifying possibly hidden stations r Sender can now send data at once, acknowledgement via ACK r Other stations store NAV distributed via RTS and CTS t SIFS DIFS data ACK defer access other stations receiver sender data DIFS new contention RTS CTS SIFS NAV (RTS) NAV (CTS)
– Inter Frame Spacing r Defined different inter frame spacing r SIFS (Short Inter Frame Spacing); 10 us in b m highest priority, for ACK, CTS, polling response r PIFS (PCF IFS); 30 us in b m medium priority, for time-bounded service using PCF r DIFS (DCF, Distributed Coordination Function IFS); 50 us in b m lowest priority, for asynchronous data service direct access if medium is free DIFS t medium busy SIFS PIFS DIFS next framecontention
b802.11a802.11g aSIFSTime10 usec16 usec10 usec aSlotTime20 usec9 usec20 usec (mixed); 9 usec (g only) aDIFTime (2xSlot+SIFS) 50 usec34 usec50 usec; 28 usec – Inter Frame Spacing
: PCF for Polling (Infrastructure Mode) t NAV polled wireless stations point coordinator NAV PIFS D U SIFS D contention period contention free period medium busy D: downstream poll, or data from point coordinator U: data from polled wireless station
802.11b Frame Format 70 SyncSFDPLCP headerCRC 2 Preamble (192 usec; or optional 96 short version) - Sync: alternating 0s and 1s (DSSS 128 bits) - SFD: Start Frame delimiter: PLCH (Phsical Layer Convergence Procedure) Header - payload length - signaling field: the rate info. - CRC: 16 bit protection of header MAC Data preamble
– MAC Data Format r Types m control frames, management frames, data frames r Sequence numbers m important against duplicated frames due to lost ACKs r Addresses m receiver, transmitter (physical), BSS identifier, sender (logical) r Miscellaneous m sending time, checksum, frame control, data Frame Control Duration/ ID Address 1 Address 2 Address 3 Sequence number Address 4 DataCRC bytes Protocol version TypeSubtype To DS More Frag Retry Power Mgmt More Data WEP 2241 From DS 1 Order bits111111
72
Example: b Throughout r Suppose TCP with 1460 bytes data payload m TCP data frame size (not including preamble) 1536 bytes ( TCP header header) m TCP ACK data frame size (not including preamble) 76 bytes r b ACK frame size 14 bytes r Suppose b at the highest rate m 8 bits per symbol m Msps Q: What is TCP/802.11b throughput? 73
802.11b Throughout TCP DataTCP Ack DIFS (us) Data (us) / = 1, / = 248 SIFS (us) ACK (us) / = Frame total (us)1, Transactions total (us) 2,084 74
Example: g Throughout r Suppose g at the highest rate (54Mbps) m symbol duration: 4 usec; 216 bits/symbol m 20 usec preamble; 6 usec “signal extension time” at the end of each frame r Suppose TCP with 1460 bytes data payload m data: 57 symbols; ACK: 3 symbols r b ACK frame size 14 bytes m 1 symbol 75
802.11g Throughout TCP DataTCP Ack DIFS (us) Data (us) *4 + 6 = * = 38 SIFS (us) ACK (us) * =3030 Frame total (us) Transactions total (us)
Example: TCP/802.11g + CTS r RTS/CTS uses b DIFS (50 usec) and long preamble (192 usec) r RTS/CTS uses b frame coding m 20 bytes RTS m 14 bytes CTS Q: What is throughput? 77
802.11g + CTS Throughout TCP DataTCP Ack DIFS (us)28 -> 50 CTS /1.375 = 203= 203 SIFS Data (us) *4 + 6 = * = 38 SIFS (us) ACK (us) * =3030 Frame total (us) Transactions total (us) 428 ->
Summary 79 Technology Transactions per sec Mbps of TCP Relative to b 11b, 11Mbps a, 54 Mbps2, g, no CTS/RTS2, g, CTS1, g, RTS/CTS
80 Outline r Admin. and recap r r hidden-terminal revisited
The Hidden Terminal Problem Collision! Alice Bob No ACK
The Hidden Terminals Problem Alice Bob One more Collision Retransmission
Question: Can we take Two Collisions and Recover the Two Packets? PaPa PbPb PaPa PbPb
ZigZag Decoding Exploits ’s behavior r Retransmissions Same packets collide again r Senders use random jitters Collisions start with interference-free bits ∆1 ∆2 PaPa PbPb PaPa PbPb Interference-free Bits
How Does ZigZag Work? ∆1 ∆2 Find a chunk that is interference-free in one collisions and has interference in the other 1 1 ∆1 ≠∆2 Decode and subtract from the other collision 1 1
∆ ∆1 How Does ZigZag Work? Find a chunk that is interference-free in one collisions and has interference in the other ∆1 ≠∆2 Decode and subtract from the other collision
∆ ∆1 How Does ZigZag Work? 3 3 Find a chunk that is interference-free in one collisions and has interference in the other ∆1 ≠∆2 Decode and subtract from the other collision
∆ ∆1 How Does ZigZag Work? Find a chunk that is interference-free in one collisions and has interference in the other ∆1 ≠∆2 Decode and subtract from the other collision
∆ ∆1 How Does ZigZag Work? Find a chunk that is interference-free in one collisions and has interference in the other ∆1 ≠∆2 Decode and subtract from the other collision
∆ ∆1 How Does ZigZag Work? Find a chunk that is interference-free in one collisions and has interference in the other ∆1 ≠∆2 Decode and subtract from the other collision
∆ ∆1 How Does ZigZag Work? Find a chunk that is interference-free in one collisions and has interference in the other ∆1 ≠∆2 Decode and subtract from the other collision
∆ ∆1 How Does ZigZag Work? Find a chunk that is interference-free in one collisions and has interference in the other ∆1 ≠∆2 Decode and subtract from the other collision Delivered 2 packets in 2 timeslots As efficient as if the packets did not collide
ZigZag Technical Issues r Collision detection r Chunk subtraction r Deployment 93 ∆ ∆1
94 Outline r Admin. and recap r hidden terminal decoding m Overall idea m Technical issues Collision detection
95 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 Correlat e ∆
Matching Collision r Given (P1 + P2( )) and (P1’, P2’( ’)), how to determine that P1 = P’ and P2 = P2’ m Determine offset first m Correlation of P2( ) and P2’( ’) PaPa PbPb P’aP’a P’bP’b
98 Outline r Admin. and recap r hidden terminal decoding m Overall idea m 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
Subtracting a Chunk r Decode chunk into bits m Removes effects of channel during first collision r Re-modulate bits to get channel-free signal r Apply effect of channel during second collision m Use correlation to estimate channel despite interference
What if AP Makes a Mistake?
∆1 ∆ Bad News: Errors can propagate 3 3 Can we deal with these errors? What if AP Makes a Mistake?
∆1 ∆2 What if AP Makes a Mistake? Good News: Temporal Diversity A 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 ∆ AP Decodes Backwards as well as Forwards
105 Outline r Admin. and recap r hidden terminal decoding m Overall idea m Technical issues Collision detection Subtracting chunks Deployment
Acknowledgement r Use as much synchronous acknowledgement as possible for backward compatibility
Implementation USRP Hardware GNURadio software Carrier Freq: GHz BPSK modulation
USRPs Testbed 10% HT, 10% partial HT, 80% perfectly sense each other a
Throughput Comparison Throughput CDF of concurrent flow pairs Hidden Terminals Partial Hidden Terminals Perfectly Sense
Throughput Comparison ZigZag Throughput CDF of concurrent flow pairs Hidden Terminals get high throughput ZigZag Exploits Capture Effect
Capture Effect r Subtract Alice and combine Bob’s packet across collisions to correct errors ∆1 ∆2 P a1 PbPb P a2 PbPb 3 packets in 2 time slots better than no collisions
Extension of Zigzag Decoding r Focuses on single channel collisions, but many real time hidden terminals are due to overlapping channel collisions r Need same packet pair r Need timeshift to bootstrap decoding 112 ∆1 ∆2 PaPa PbPb PaPa PbPb
Background r Using g as an example m Each channel has 4 groups of subcarriers: C 1 consists of G 1, G 2, G 3, G 4 ; C 2 consists of G 2, G 3, G 4, G 5 m C 1 and C 2 are overlapping adjacent channels; m C 1 and C 3 are overlapping non-adjacent channels m Bits are assigned to subcarriers E.g. bit sequences A i is assigned to subcarrier G i, i=1,2,3,4 Subcarrier Group G1G1 G2G2 G3G3 G4G4 A1A1 A2A2 A3A3 A4A4
g Overlapping-Channel Collision Bob AP a on channel C a Collision! Alice AP b on channel C b Collision! Chuck
g Overlapping-Channel Collision Bob AP a on channel C a More Collision! Alice AP b on channel C b More Collision! Chuck Retransmission
116 Remap Basic Idea: Structured Permutation Subcarrier Group G1G1 G2G2 G3G3 G4G4 A1A1 A2A2 A3A3 A4A4 Mapping π 1 A4A4 A3A3 A2A2 A1A1 Mapping π 2 A2A2 A1A1 A4A4 A3A3 Mapping π 3 A3A3 A4A4 A1A1 A2A2 Mapping π 4
117 How Permutation Helps r Non-matching collisions on adjacent channels C 1 and C 2 Subcarrier Group G1G1 G2G2 G3G3 G4G4 A1A1 A2A2 A3A3 A4A4 1 st transmission 2 nd transmission A4A4 A3A3 A2A2 A1A1 A2A2 A1A1 A4A4 A3A3 3 rd transmission A3A3 A4A4 A1A1 A2A2 4 th transmission
118 How Permutation Helps (cont’d) r Non-matching collisions on non-adjacent channels C 1 and C 3 Subcarrier Group G1G1 G2G2 G3G3 G4G4 A1A1 A2A2 A3A3 A4A4 1 st transmission 2 nd transmission A4A4 A3A3 A2A2 A1A1
119 Remap Basic Idea: Matching-collision setting Collision! Alice Bob Collision! AP a on channel C a AP b on channel C b Matching collisions on adjacent channels
120 Remap for Matching Collisions r collisions at adjacent channels C 1 and C 2 : a time and frequency view PbPb ∆1∆1 ∆2∆2 A1A1 A2 A2 A3A3 A4A4 S1S1 S2S2 SnSn Time Freq PaPa B5B5 B2 B2 B3B3 B4B4 A4A4 A3 A3 A2A2 A1A1 S1S1 S2S2 SnSn B2B2 B5 B5 B4B4 B3B3 P′bP′b P′aP′a G1G1 G3G3 G2G2 G5G5 G4G4 G2G
Outline r Admin r hidden terminal decoding r Mesh network capacity 121
122 Infrastructure Mode Wireless AP wired network AP: Access Point Problems of infrastructure mode wireless networks? by default operates in infrastructure mode.
123 Mesh Networks infrastructure mode: default ad-hoc (mesh) mode AP wired network AP: Access Point m fast and low-cost deployment m no central point of failure m no APs overhead for users who can reach each other
124 Capacity of Mesh Networks r 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)? r Why study capacity? m learn the fundamental limits of mesh wireless networks m separate the spatial reuse perspective and system design perspective m gain insight for designing effective wireless protocols
125 Two Constraints transmission successful if there are no other transmitters within a distance (1+ )r of the receiver receiver sender r (1+ )r Interference constraint r a single half-duplex transceiver at each node: m either transmits or receives m transmits to only one receiver m receives from only one sender Radio interface constraint
126 Model r Domain is a disk of unit area r There are n nodes in the domain r The transmission rate is W bits/sec
127 Capacity of Mesh Wireless Network r Consider two types of networks m arbitrary networks: place nodes optimally to derive overall upper bound m random network: nodes are placed randomly
Outline r Admin r Mesh network capacity m arbitrary networks: place nodes optimally to derive overall upper bound 128
129 Transmission Model: Bit-time Perspective r Chop time into a total of WT bit-times in T seconds r The transmission decision is made for each bit bit time 2bit time tbit time WTbit time
130 Transmission Model: End-to-end Perspective r Assume the network sends a total of T end-to-end bits in T seconds r Assume the b-th bit makes a total of h(b) hops from the sender to the receiver r Let r b h denote the hop-length of the h-th hop of the b-th bit T
131 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 2
132 m k (1+ )r’ r’r’ Area Constraint r Consider two simultaneous transmissions at a bit-time i j (1+ )r r D jm + r >= D im >= (1+ )r’ D jm >= (r+r’) /2 D jm + r’ >= D jk >= (1+ )r ½ r ½ r’
133 Area Constraint r For each transmission with distance r from sender to receiver, we draw a circle with radius ½ r r These circles do not overlap
134 Area Constraint: Global Picture 2
135 Area Constraint: Global Picture sum over all circles, since each circle has at least ¼ of its area in the unit disk, 2
136 Summary: Two Constraints transmission successful if there are no other transmitters within a distance (1+ )r of the receiver Interference constraint r a single half-duplex transceiver at each node Radio interface constraint receiver sender r (1+ )r
137 Capacity Bound Note: Let L be the average (direct-line) distance for all T end-to-end bits. Discussion: what does the result mean?
138 Discussion r L depends on m traffic pattern (who needs to talk to whom) and m positions of the end-to-end (application-level) senders and (application-level) receivers r If end-to-end senders and receivers are spread out throughout the network, L is large m per node capacity r Otherwise, L will be small as network becomes denser
139 Achieving Capacity: Example r n/2 senders and receivers: r L=
140 Results: Arbitrary Networks Protocol Model
Outline r Admin r Mesh network capacity m arbitrary networks: place nodes optimally to derive overall upper bound m random networks: uniform distribution of nodes and senders/receivers 141
142 Uniform Random Networks r Uniform distribution of n nodes r n origin-destination (OD) pairs r Each node chooses same power level P, and thus equal radius r(n) r Equal throughput (n) bits/sec for all OD pairs
143 Random Networks: Required Bits r Assume: average length of each OD pair is L r Average number of hops: Total required bit transmissions per second to support (n) :
144 Random Networks: Offered Bits r Required bit transmissions per second: r What is the maximum number of transmissions (of bits) in one second? m space used per transmission (interference limited): at least ¼ r(n)/2] 2 = 2 r 2 (n)/16 m number of simultaneous transmissions at most (interference limited): m total bits per second
145 Random Networks: Capacity Required ≤ offered
146 Connectivity Constraint r Need routes between origin-destination pairs - places a lower bound on transmit range r(n) Not connected Connected A D A D To maintain connectivity with a high probability, requires r(n) on the order:
147 Random Networks: Capacity Required ≤ offered
148 Measurement r Measured scaling law: throughput declines worse with n than theoretically predicted: 1/n 1.68 r Remaining story line m wireless networks with wide-area traffic may have low scalability, and need techniques to increase capacity
149 Wireless Network Capacity: Arbitrary transmission successful if there are no other transmitters within a distance (1+ )r of the receiver Interference constraint r a single half-duplex transceiver at each node Radio interface constraint rate*distance capacity: Reduce LIncrease W Approx. optimal Multiple transceivers Reduce interf. area Cancel/align interference
150 Change Traffic Pattern: Reduce L r Reduce L => make communications local m node placement: change the demand patterns (thus L) e.g. base stations/access points with high-speed backhaul F E A BC D BS1BS2 S T infrastructure
151 Change Traffic Pattern: Reduce L r Reduce L => make communications local by being patient and wait in a mobile network
152 Reduce Interference Footprint r Antenna design: steered/switched directional antennas A D C B A B D C
Increase W r Better physical layer for higher spectrum efficiency (MIMO) or use more spectrum (white space) 153
Multiple Input Multiple Output (MIMO) r 3x3 in 2009 r In 2010: 4x4 MIMO m m 1 m
MIMO Basics Two variables, two equations.
MIMO with Interference 156 Assume tx1 is sending to rx1 Can tx2 transmit? No Transmission in current n
MIMO with Interference Nulling tx2: for every symbol q, transmits q on first antenna and aq on second antenna. 157 interference at rx1: if tx2 picks NO interference at rx1.
Decoding at rx2: Estimate Channel - rx2 hears p from tx1 - rx2 estimates channels h12, h13 from preamble 158
Decoding at rx2: Interference from tx1 - for different symbols p from tx1, the received signal at rx2 moves along a 1-d vector - rx2 projects received signal orthogonal to 159 projection space
Decoding at rx2: Interference from tx1 - rx2 projects received signal orthogonal to, i.e., pick w2 and w3: to compute 160 projection space
Decoding at rx2: Decode from tx since rx2 does projection, it sees only Summary: concurrency w/ interference nulling.
MIMO with Interference Alignment 162 Assume both tx1 and tx2 are transmitting. If only nulling, tx3 cannot transmit nulling
MIMO with Interference Alignment 163 Assume both tx1 and tx2 are transmitting. tx3 does nulling for rx1, but interference alignment for rx2 nulling
MIMO with Nulling and Alignment 164 tx3 picks ’, ’, ’ rx2 sees: Because rx2 projects to orthogonal to, no interference from tx3 to rx2
165 Approximate Ideal Transmissions r Transmission power control, MAC scheduling, and routing to achieve max concurrency
166 Reed-Solomon Codes r Very commonly used, send n symbols for k data symbols m e.g., n = 255, k = 223 r We will discuss the original version (1960) m modern versions are slightly different; they use generator polynomial, but the idea is essentially the same r If the data we want to send is (x0, x1,…, x k-1 ), where x i are data symbols, define polynomial P(t) = x 0 + x 1 t + x 2 t + …x k-1 t k-1 r Assume is a generator of the symbol field (i.e., i not equal to j if i not equal to j) r Then for the data sequence, send P(0), P( ), P( 2 ), P( n-1 ) to receiver
167 Reed-Solomon Codes r Receive the message P(0), P( ), P( 2 ), P( n-1 ) r If no error, can recover data from any k equations: since any k equations are independent, they have a unique solution
168 Reed-Solomon Codes: Handling Errors r But, what if s errors occur during transmission? r Keep a counter (vote) for each solution r Enumerate all combinations of k equations, for each combination, solve it, and increase the counter of the solution r Identify the solution which gets the largest # of “votes”
169 Reed-Solomon Codes r The transmitted data is the correct solution for n-s equations, and thus gets votes (i.e., combinations of k equations) r An incorrect solution can satisfy at most k-1+s equations, and the # of votes it can get is at most:
170 Reed-Solomon Codes r If or (n-s > k – 1 + s) or (n-k > 2s – 1) or (n-k s), it can correct any s errors
171 Reed-Solomon Codes r The voting-based decoding algorithm proposed in 1960 is inefficient r Berlekamp introduced first truly efficient algorithm for both binary and nonbinary codes. Complexity increases linearly with number of errors r Sugiyama, et al. Showed that Euclid’s algorithm can be used to decode R-S codes r Below is a typical current decoder
172 Pure (unslotted) Aloha r Unslotted Aloha: simpler, no clock synchronization r Whenever pkt needs transmission: m send without awaiting for the beginning of slot r Collision probability increases: m pkt sent at t 0 collide with other pkts sent in [t 0 -1, t 0 +1]
173 Pure Aloha (cont.) Assume a node transmit with probability p in one unit of time P(success by a given node) = P(node transmits) * P(no other node transmits in [t 0 -1,t 0 ] * P(no other node transmits in [t 0, t 0 +1] = p. (1-p) n-1. (1-p) n-1 = p. (1-p) 2(n-1) P(success by any of N nodes) = n p. (1-p) 2(n-1) - Bound: 1/(2e) =.18
174 Goodput vs. Offered Load S = throughput = “goodput” (success rate) G = offered load = Np Pure Aloha protocol constrains effective channel throughput! Slotted Aloha