WiFi MAC Models David Malone November 26, MACSI Hamilton Institute, NUIM, Ireland
Talk outline Introducing the 82.11 CSMA/CA MAC. Finite load 82.11 model and its predictions. Issues with standard 82.11, leading to 82.11e. Finite load 82.11e model and its predictions. Beyond infrastructure mode networks. Why do these models work? Hamilton Institute, NUIM, Ireland 1
The 82.11 MAC Data Ack Select Random Number in [,31] Pause Counter Resume Counter Expires; Transmit Decrement counter SIFS DIFS SIFS DIFS Figure 1: 82.11 MAC operation Hamilton Institute, NUIM, Ireland 2
82.11 MAC Summary After transmission choose rand(, CW 1). Wait until medium idle for DIFS(5µs), While idle count down in slots (2µs). Transmission when counter gets to, ACK after SIFS (1µs). If ACK then CW = CW min else CW = 2. Ideally produces even distribution of packet transmission. Hamilton Institute, NUIM, Ireland 3
Modelling approaches P-persistent: approximate the back-off distribution be a geometric with the same mean. Exemplified by Marco Conti and co-authors. Asymptotic full system analysis: Bordenave, McDonald and Proutiere + Sharma, Ganesh and Key. Bianchi s mean-field Markov model: treat stations individually; network relationship between stations gives a set of coupling equations. In simplest form: constant transmission probability τ gives throughput S = nτ(1 τ) n 1, (1) and collision probability 1 p = (1 τ) n 1. (2) Hamilton Institute, NUIM, Ireland 4
Mean-field Markov Overview Mean field approximation: each individual station s impact on overall network is small. Assume a fixed probability of collision given attempted transmission p. Each station s back-off counter then a Markov chain. Stationary distribution gives the probability the station attempts transmission in a typical slot τ(p). Network coupling then gives a system of equations relating all stations p and τ, which determines everything. Real-time quantities determined through a relation involving the average real-time that passes during a counter decrement. Following to appear in IEEE/ACM ToN (Duffy, Leith, Malone). Hamilton Institute, NUIM, Ireland 5
Mean-field Markov Model s Chain (1 q)(1 p) (1 q)(1 p) (1 q) q(1 p)(1 p)(1 q) (1 q) (1 q) (1 q) (,) e (,1) e (, CW 2) e (, CW 1) e q(1 p) q q(1 p)p qp q q (,) 1 (,1) 1 (, CW 2) 1 (, CW 1) q(1 p) p (1,) 1 (1,1) 1 1 (1, 2CW 2) (1, 2CW 1) p Figure 2: Individual s Markov Chain Hamilton Institute, NUIM, Ireland 6
Mean-field Markov Model Solution Stationary distribution of Markov chain gives: ( τ(p, q, W, m) = η 1 q 2 ) W q2 (1 p), (3) (1 p)(1 q)(1 (1 q) W ) 1 q where ( ) η = (1 q) + q2 W (W +1) 2(1 (1 q) W ) + q(w +1) q 2 W 2(1 q) + p(1 q) q(1 1 (1 q) W ( ) ( ) p)2 pq + 2 W 2(1 q)(1 p) (1 1 (1 q) W p)2 1 p p(2p) 2W m 1 1 2p + 1. Hamilton Institute, NUIM, Ireland 7
Network coupling For given loads q 1,...,q n, define τ j = τ(p j,q j, W, m) and then n coupling equations: 1 p i = j i(1 τ j ). Solve to determine (p 1, τ 1 ),...,(p n,τ n ). If all packets are the same length, L bytes taking T L time on the medium, then S i = τ i (1 p i )L n i=1 (1 τ i)δ + (1 n i=1 (1 τ i))t L. Hamilton Institute, NUIM, Ireland 8
Relating q to offered load Taking lim q 1 models saturation. For small buffers, a crude approximation: q = min(expected slot length/mean inter-packet time,1). If packets arrive a Poisson manner with rate λ l, then q l is 1 exp( λ l Expected slot length). Possible to produce a relation of this sort that uses conditional information. Hamilton Institute, NUIM, Ireland 9
Model Predictions.35.3 normalised throughput.25.2.15.1.2.4.6.8 1 1.2 1.4 1.6 normalised total offered load 16 stations (sim) (model unif) (model Pois) (model Cond) 2 stations (sim) (model unif) (model Pois) (model Cond) 24 stations (sim) (model unif) (model Pois) (model Cond) Throughput as the traffic arrival rate is varied. Results for three load relationships (uniform, Poisson and conditional) shown. Hamilton Institute, NUIM, Ireland 1
Model Predictions.2.18 model class 1 model class 2 simulation normalised per-node throughput.16.14.12.1.8.6.4.2.5 1 1.5 2 2.5 3 total offered normalised load Normalized per-station throughput, where n 1 = 12, n 2 = 24. The offered load of a class 2 station is 1/4 of a class 1 station. Hamilton Institute, NUIM, Ireland 11
TCP Upload Scenario Access Point Stations with competing TCP uploads Figure 3: Competing TCP uploads. Hamilton Institute, NUIM, Ireland 12
TCP Uploads 1.8 1.6 1.4 TCP throughput (Mbps) 1.2 1.8.6.4.2 1 2 3 4 5 6 7 8 9 1 Number of the upstream connection Figure 4: Competing TCP uploads, 1 stations (NS2 simulation, 82.11 MAC, 3s duration). Hamilton Institute, NUIM, Ireland 13
The 82.11e MAC The three most significant 82.11e MAC parameters on traffic prioritization are TXOP, W and AIFS. Four traffic classes per station. Station transmits for max duration TXOP (one packet without 82.11e). Per class, W is 2 n, n {,1,...}. Per class, AIFS = DIFS + kδ, k { 2, 1,, 1,...}. Hamilton Institute, NUIM, Ireland 14
The 82.11 MAC Data Ack Select Random Number in [,W 1] Pause Counter Resume Counter Expires; Transmit Decrement counter SIFS AIFS SIFS AIFS Figure 5: 82.11 MAC operation Hamilton Institute, NUIM, Ireland 15
Existing 82.11e models Saturated 82.11e multi-class models. R. Battiti and Bo Li, University of Trento Technical Report DIT-3-24 (23). J.W. Robinson and T.S. Randhawa, IEEE JSAC 22:5 (24). Z. Kong, D. H.K. Tsang, B. Bensaou and D. Gao, IEEE JSAC 22:1 (24). Following (maybe!) to appear in IEEE Trans. Mob. Computing, with Clifford, Duffy, Foy, Leith and Malone. Hamilton Institute, NUIM, Ireland 16
Modelling 82.11e Added complications: Need hold states for AIFS. P h = (1 n 1 j=1 (1 τ(1) j ) n 2 j=1 (1 τ(2) j )) 1 + (1 n 1 j=1 (1 τ(1) j ) n 2 j=1 (1 τ(2) j )) D i=1 P i S 1 D i=1 P i S 1. (4) Hamilton Institute, NUIM, Ireland 17
New coupling equations 1 p (1) i = (1 τ (1) j )(P h + (1 P h ) j i 1 p (2) i = n 1 j=1 n 2 j=1 (1 τ (2) j )) (5) (1 τ (1) j ) (1 τ (2) j ). (6) j i Hamilton Institute, NUIM, Ireland 18
How good is it?.25 model class 1 model class 2 simulation.25 model class 1 model class 2 simulation.25 model class 1 model class 2 simulation.2.2.2 Per station throughput (Mbps).15.1.5 Per station throughput (Mbps).15.1.5 Per station throughput (Mbps).15.1.5 5 1 15 2 25 3 Total offered load (Mbps) (a) D = 5 1 15 2 25 3 Total offered load (Mbps) (b) D = 2 5 1 15 2 25 3 Total offered load (Mbps) (c) D = 4 Throughput for a station in each class vs. offered load. 1 class 1 stations offering one quarter the load of 2 class 2 stations. Range of D values, the difference in AIFS between class 2 and class 1 (NS2 simulation and model predictions, 82.11e MAC, 11Mbps PHY, 1s duration. ). Hamilton Institute, NUIM, Ireland 19
How good is it?.25 model class 1 model class 2 simulation.25 model class 1 model class 2 simulation.25 model class 1 model class 2 simulation.2.2.2 Per station throughput (Mbps).15.1.5 Per station throughput (Mbps).15.1.5 Per station throughput (Mbps).15.1.5 5 1 15 2 25 3 Total offered load (Mbps) (d) W (1) = 32, W (2) = 16 5 1 15 2 25 3 Total offered load (Mbps) (e) W (1) = 32, W (2) = 64 5 1 15 2 25 3 Total offered load (Mbps) (f) W (1) = 32,W (2) = 256 Throughput for a station in each class vs. offered load. There are 1 class 1 stations each offering one quarter the load of 2 class 2 stations. Range of W values (NS2 simulation and model predictions, 82.11e MAC 11Mbps PHY, 1s duration). Hamilton Institute, NUIM, Ireland 2
How do you use it? 6 5 W 1 =1 W 1 =2 W 1 =4 W 1 =8 W 1 =16 W 1 =32.9.8.7 W 1 =1 W 1 =2 W 1 =4 W 1 =8 W 1 =16 W 1 =32 Throughput of Data Stations (Mbps) 4 3 2 Ratio of lost traffic to offered load.6.5.4.3.2 1.1 5 1 15 2 Difference in AIFS 5 1 15 2 Difference in AIFS (g) Data throughput (h) ACK loss 1 stations (15 byte packets) and AP transmitting (6 byte packets) at half achieved data rate. Hamilton Institute, NUIM, Ireland 21
Does it work? 1.2.6 1.5 TCP Throughput (Mbps).8.6.4 TCP Throughput (Mbps).4.3.2.2.1 1 2 3 4 5 6 7 8 9 1 11 12 Number of the upstream connection 1 2 3 4 5 6 7 8 9 1 11 12 Number of the upstream connection Competing TCP uploads, 12 stations experiment without and with prioritization (82.11e MAC, 3s duration). Hamilton Institute, NUIM, Ireland 22
Why stop with single infrastructure mode network? Basic behavior of individual stations is independent of the network in which they exist. Change the network coupling, change the network. Hamilton Institute, NUIM, Ireland 23
Typical mesh issue.4.35.3 throughput (Mbs).25.2.15.1 NS r 1 NS r 2.5 5 1 15 2 25 #conversations Example of aggregate throughput vs number of voice calls for the multi-hop 82.11b WLAN topology. Voice packets are transported between l 1 1 and l 2 1,...,l 2 N by node r 1 /r 2 which denotes a relay station with two radios. Hamilton Institute, NUIM, Ireland 24
Mesh Following in IEEE Comms. Letters (26), (Duffy, Leith, Li and Malone). M distinct local zones on common frequency. For n {1,..., M} local stations L n = {l n 1,...} and relay stations R n = {r n,...}. Mean field gives for each station c R n L n : 1 p c = b R n L n, b =c (1 τ b ). (7) The stationary probability the medium is idle is p idle = b R n L n (1 τ b ). The mean state length is E n = p idle σ + L(1 p idle ), where each packet takes L seconds and idle slot-length is σ seconds. Added difficulty: for each n, l L n, q l is given, but q r is not known a priori for each relay station. Hamilton Institute, NUIM, Ireland 25
Mesh The parameter q r is determined through relay traffic. For each n, l L n, a fixed route f l from its zone to a destination zone. f l = {l, s 1...,s m, d}. If m =, then l and d are in the same zone and no relaying occurs. We assume routes are predetermined by an appropriate wireless routing protocol. Hamilton Institute, NUIM, Ireland 26
Mesh For each s L n R n, let E(s) = E n. For k {1,...,m} Let Q l,sk be offered load from l arriving at s k and Q sk be the total load offered to s k. From these we calculate: S sk = τ s k (1 p sk ) E n and then assume: Q sk+1 = Q l,sk Q sk S sk to calculate the load in the next network. Hamilton Institute, NUIM, Ireland 27
Buffering Limitations of small buffers particularly apparent in mesh. Need to introduce queue empty probability to model queue: r n. Model queues as M/G/1. E(B(p)) = W 2(1 2p) (1 p p(2p)m ). (8) r n = min(1, B(p n )log(1 q n )) (9) Simply replaces τ(p) relation. To appear, IEEE Comms. Letters (27), (Duffy, Ganesh). Seeing some interaction between buffering and service. Hamilton Institute, NUIM, Ireland 28
Unfairness One conversation, N data stations 5 4 Conv. throughput, small buffer Data throughput, when conversation has small buffer Conv. throughput, large buffer Data throughput, when conversation has large buffer 64 kbps 4 35 3 Throughput (kbps) 3 2 <-- Mean delay, conv., large buffer 25 2 15 Delay (milli seconds) 1 1 5 5 1 15 2 25 Number of data stations, N Figure 6: NS packet-level simulation results and model predictions Hamilton Institute, NUIM, Ireland 29
Understanding the Models Models are inexact in several ways. Constant p replaces complex Markov chain with direct sum. Throughput relationship assumes independent. Do assumptions hold or are stationary distributions similar? Hamilton Institute, NUIM, Ireland 3
Is p constant?.6.5 Average P(col) P(col on 1st tx) P(col on 2nd tx) 1./32 1./64.3.25.4.2 Probability.3 Probability.15.2.1.1.5 1 2 3 4 5 6 7 8 Offered Load (per station, pps, 496B UDP payload) (a) 2 Stations Average P(col) P(col on 1st tx) P(col on 2nd tx) 4 6 8 1 12 14 16 18 Offered Load (per station, pps, 486B UDP payload) (b) 1 Stations Figure 7: Measured collision probabilities as offered load is varied. Hamilton Institute, NUIM, Ireland 31
Independence of Transmissions 4 35 3 Throughput (Kbps) 25 2 15 1 5 Throughput (measured) Throughput (model) Throughput (model + measured Ts/Tc) Throughput (model + measured Ts/Tc/p) 2 4 6 8 1 12 14 Number of STA(s) Figure 8: Overall throughput in a network of saturated stations as the number of stations is varied. The measured values are compared to model predictions. Hamilton Institute, NUIM, Ireland 32
Conclusions 82.11/82.11e CSMA/CA models that are simple, solvable, yet complex enough to predict data throughput. Model gives insight into 82.11 MAC behavior. Model gives insight into effect of 82.11e parameters. Prioritization schemes can now be designed quickly based on the model. Extensible to network scenarios. Interesting questions on buffering and foundations remain to be answered. Hamilton Institute, NUIM, Ireland 33