control theoretic optimization of 802.11 wlans: implementation … · 2014-10-11 · control...

15
Control theoretic optimization of 802.11 WLANs: Implementation and experimental evaluation Pablo Serrano a,, Paul Patras b , Andrea Mannocci a,c , Vincenzo Mancuso a,c , Albert Banchs a,c a University Carlos III de Madrid, Avda. Universidad, 30, 28911 Leganés (Madrid), Spain b Hamilton Institute, National University of Ireland Maynooth, Maynooth, Co. Kildare, Ireland c Institute IMDEA Networks, Avenida del Mar Mediterraneo, 22, 28918 Leganés (Madrid), Spain article info Article history: Received 14 November 2011 Received in revised form 5 June 2012 Accepted 1 September 2012 Available online 21 September 2012 Keywords: WLAN 802.11 Control theory Experimentation abstract In 802.11 WLANs, adapting the contention parameters to network conditions results in substantial performance improvements. Even though the ability to change these parame- ters has been available in standard devices for years, so far no adaptive mechanism using this functionality has been validated in a realistic deployment. In this paper we report our experiences with implementing and evaluating two adaptive algorithms based on control theory, one centralized and one distributed, in a large-scale testbed consisting of 18 com- mercial off-the-shelf devices. We conduct extensive measurements, considering different network conditions in terms of number of active nodes, link qualities, and data traffic. We show that both algorithms significantly outperform the standard configuration in terms of total throughput. We also identify the limitations inherent in distributed schemes, and demonstrate that the centralized approach substantially improves performance under a large variety of scenarios, which confirms its suitability for real deployments. Ó 2012 Elsevier B.V. All rights reserved. 1. Introduction The IEEE 802.11 standard for Wireless LANs [1] has be- come one of the most commonly used technologies to pro- vide broadband connectivity to the Internet. The default channel access mechanism employed in IEEE 802.11 net- works is based on a CSMA/CA scheme, regulated by a set of parameters that determines the aggressiveness of the stations when trying to access the channel. In particular, the contention window (CW) parameter controls the prob- ability that a station defers or transmits a frame once the medium has become idle, and therefore has a key impact on the WLAN performance. Commercial devices implement a fixed CW configura- tion, which is known to yield suboptimal performance [2]. Indeed, for a fixed CW, if too many stations contend the collision rate will be very high, while if few stations are backlogged the channel will be underutilized most of the time. This behavior has been analyzed by several works in the literature, e.g. [2–4], which have shown that adapt- ing the CW to the number of backlogged stations signifi- cantly improves performance. Following the above result, an overwhelming number of solutions have proposed to adapt the 802.11 MAC behavior to the observed network conditions with the goal of max- imizing the WLAN performance [5–15]. However, as we detail in the related work section, these previous works suffer from both theoretical and practical limitations. In this paper, we present our experiences with the implementation of two adaptive algorithms, namely the Centralized Adaptive Control (CAC) [16] and the Distributed Adaptive Control (DAC) [17], both based on a Proportional Integrator (PI) controller that dynamically tunes the CW configuration to optimize performance. In contrast to pre- vious proposals [5–13,18,14,15], both algorithms are supported by solid theoretical foundations from control theory and can be easily implemented with unmodified 1389-1286/$ - see front matter Ó 2012 Elsevier B.V. All rights reserved. http://dx.doi.org/10.1016/j.comnet.2012.09.010 Corresponding author. Address: Universidad Carlos III de Madrid, Avenida de la Universidad 30, E-28911 Leganés, Madrid, Spain. Tel.: +34 91 624 6236; fax: +34 91 624 8749. E-mail address: [email protected] (P. Serrano). Computer Networks 57 (2013) 258–272 Contents lists available at SciVerse ScienceDirect Computer Networks journal homepage: www.elsevier.com/locate/comnet

Upload: others

Post on 26-Jul-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Control theoretic optimization of 802.11 WLANs: Implementation … · 2014-10-11 · Control theoretic optimization of 802.11 WLANs: ... The IEEE 802.11 standard for Wireless LANs

Computer Networks 57 (2013) 258–272

Contents lists available at SciVerse ScienceDirect

Computer Networks

journal homepage: www.elsevier .com/locate /comnet

Control theoretic optimization of 802.11 WLANs: Implementationand experimental evaluation

Pablo Serrano a,⇑, Paul Patras b, Andrea Mannocci a,c, Vincenzo Mancuso a,c, Albert Banchs a,c

a University Carlos III de Madrid, Avda. Universidad, 30, 28911 Leganés (Madrid), Spainb Hamilton Institute, National University of Ireland Maynooth, Maynooth, Co. Kildare, Irelandc Institute IMDEA Networks, Avenida del Mar Mediterraneo, 22, 28918 Leganés (Madrid), Spain

a r t i c l e i n f o

Article history:Received 14 November 2011Received in revised form 5 June 2012Accepted 1 September 2012Available online 21 September 2012

Keywords:WLAN802.11Control theoryExperimentation

1389-1286/$ - see front matter � 2012 Elsevier B.Vhttp://dx.doi.org/10.1016/j.comnet.2012.09.010

⇑ Corresponding author. Address: Universidad CAvenida de la Universidad 30, E-28911 Leganés, Ma91 624 6236; fax: +34 91 624 8749.

E-mail address: [email protected] (P. Serrano).

a b s t r a c t

In 802.11 WLANs, adapting the contention parameters to network conditions results insubstantial performance improvements. Even though the ability to change these parame-ters has been available in standard devices for years, so far no adaptive mechanism usingthis functionality has been validated in a realistic deployment. In this paper we report ourexperiences with implementing and evaluating two adaptive algorithms based on controltheory, one centralized and one distributed, in a large-scale testbed consisting of 18 com-mercial off-the-shelf devices. We conduct extensive measurements, considering differentnetwork conditions in terms of number of active nodes, link qualities, and data traffic.We show that both algorithms significantly outperform the standard configuration interms of total throughput. We also identify the limitations inherent in distributed schemes,and demonstrate that the centralized approach substantially improves performance undera large variety of scenarios, which confirms its suitability for real deployments.

� 2012 Elsevier B.V. All rights reserved.

1. Introduction

The IEEE 802.11 standard for Wireless LANs [1] has be-come one of the most commonly used technologies to pro-vide broadband connectivity to the Internet. The defaultchannel access mechanism employed in IEEE 802.11 net-works is based on a CSMA/CA scheme, regulated by a setof parameters that determines the aggressiveness of thestations when trying to access the channel. In particular,the contention window (CW) parameter controls the prob-ability that a station defers or transmits a frame once themedium has become idle, and therefore has a key impacton the WLAN performance.

Commercial devices implement a fixed CW configura-tion, which is known to yield suboptimal performance[2]. Indeed, for a fixed CW, if too many stations contend

. All rights reserved.

arlos III de Madrid,drid, Spain. Tel.: +34

the collision rate will be very high, while if few stationsare backlogged the channel will be underutilized most ofthe time. This behavior has been analyzed by several worksin the literature, e.g. [2–4], which have shown that adapt-ing the CW to the number of backlogged stations signifi-cantly improves performance.

Following the above result, an overwhelming number ofsolutions have proposed to adapt the 802.11 MAC behaviorto the observed network conditions with the goal of max-imizing the WLAN performance [5–15]. However, as wedetail in the related work section, these previous workssuffer from both theoretical and practical limitations.

In this paper, we present our experiences with theimplementation of two adaptive algorithms, namely theCentralized Adaptive Control (CAC) [16] and the DistributedAdaptive Control (DAC) [17], both based on a ProportionalIntegrator (PI) controller that dynamically tunes the CWconfiguration to optimize performance. In contrast to pre-vious proposals [5–13,18,14,15], both algorithms aresupported by solid theoretical foundations from controltheory and can be easily implemented with unmodified

Page 2: Control theoretic optimization of 802.11 WLANs: Implementation … · 2014-10-11 · Control theoretic optimization of 802.11 WLANs: ... The IEEE 802.11 standard for Wireless LANs

P. Serrano et al. / Computer Networks 57 (2013) 258–272 259

existing devices. Further, as compared to the few existingimplementations of adaptive MAC mechanisms thatrequire complete interface redesign and enhanced compu-tational capabilities [15] or rely on proprietary firmwarecode and are tight to a specific platform [18], our proto-types can be deployed with off-the-shelf devices, demandminimal system resources and do not alter the networkingstack, as they are executed as userland processes.

CAC and DAC have been carefully designed followingdetailed performance analyses of 802.11 and employingcontrol-theoretic techniques, to ensure both optimal per-formance and system stability. While previous simulationresults illustrate the benefits of these algorithms [16,17],in this paper we demonstrate the feasibility of running thesemechanisms on real devices, and extensively assess theirbehavior in a real deployment under a wide range of net-work conditions.

First, we provide a detailed description of the implemen-tation of our adaptive mechanisms with commodity hard-ware and open-source drivers. The algorithms run as userspace applications and rely on standardized system callsto estimate the contention level in the WLAN and adjustthe CW configuration of 802.11 stations. We also provide in-sights into the differences between the theoretical designand the practical implementation of the algorithms, whicharose with the inherent limitations of the real devices. Sec-ond, by conducting exhaustive experiments in a large-scaletestbed consisting of 18 devices, which is able to emulaterealistic deployments such as office environment, and sem-inar room, we evaluate the performance of our proposalsunder non-ideal channel effects and different traffic condi-tions. Additionally, we compare the performance of ouralgorithms against the default IEEE 802.11 configuration,and identify those scenarios where a network deploymentcan benefit from using such adaptive mechanisms.

Our results confirm that both approaches outperformthe standard’s default scheme, improving the performanceby up to 50%. Our experiments also reveal that the distrib-uted algorithm suffers from a number of problems withheterogeneous radio links, which are inherent in its distrib-uted nature and the limitations of the wireless interfaces. Incontrast, the centralized scheme exhibits remarkable per-formance under a wide variety of network conditions. Theconclusions drawn from our analysis prove the feasibilityof using adaptive MAC mechanisms in realistic scenariosand provide valuable insights for their design.

The remainder of the paper is organized as follows. Sec-tion 2 summarizes the IEEE 802.11 EDCA protocol and theunderlying principles of CAC and DAC. Section 3 details theimplementation of the functionality comprised by the pro-posed schemes. Section 4 describes our testbed and Section5 validates the implementation of the algorithms. Section 6presents a thorough experimental study of the algorithms ina wide set of network conditions. Finally, Section 7 summa-rizes the related work and Section 8 concludes the paper.

2. Background

This section summarizes the behavior of IEEE 802.11EDCA [1] and the two adaptive protocols implemented inthis paper.

2.1. IEEE 802.11 EDCA

The IEEE 802.11 Enhanced Distributed Channel Access(EDCA) mechanism [1] is a CSMA/CA-based protocol thatoperates as follows. If a station with a new frame to trans-mit senses the channel idle for a period of time equal to thearbitration interframe space parameter (AIFS), the stationtransmits. Otherwise, if the channel is busy (either imme-diately or during the AIFS period), the station continues tomonitor the channel until it is sensed idle for an AIFS inter-val, and then executes a backoff process.

Upon starting the backoff process, stations compute arandom integer uniformly distributed in the range½0;CW � 1�, and initialize their backoff time counter withthis value. The CW value is called the contention window,and depends on the number of failed transmission at-tempts. For the first transmission attempt the minimumcontention window (CWmin) is used. In case of a collision,its value doubles, up to a maximum value CWmax. The back-off time counter is decremented once every time slot if thechannel is sensed idle, frozen when a transmission is de-tected on the channel, and reactivated when the channelis sensed idle again for an AIFS time. When the backoff timecounter reaches zero, the station transmits its frame in thenext time slot.

When two or more stations start transmitting simulta-neously, a collision occurs. Acknowledgment (ACK) framesare used to notify a transmitting station of successfully re-ceived frames. In the case of a failed transmission, the sta-tion doubles its CW and reenters the backoff process. Oncea frame has been successfully transmitted or the retrylimit has been exceeded, the CW value is set again toCWmin. To prevent duplicates, the standard uses a retryflag R to mark those frames that are being retransmitted,i.e., the flag is set to 0 on the first transmission attempt,and set to 1 on every retransmission (see Fig. 1). As wediscuss later, our algorithms exploit this functionality toinfer the network conditions and adapt the CW of the sta-tions accordingly.

To support service differentiation, EDCA implementsdifferent access categories (ACs) at every station, each hav-ing a different backoff configuration. The parameters ofeach AC are announced by the Access Point using the Bea-con Frames. In the rest of the paper we do not consider ser-vice differentiation and assume that all stations onlyexecute the Best Effort AC.

2.2. Optimal point of operation of the WLAN

Both CAC and DAC share the goal of adjusting the CW todrive the WLAN to the optimal point of operation thatmaximizes the total throughput given the observed net-work conditions. Let p denote the probability that a trans-mission attempt collides. Following the work of [2], thatderives the optimal transmission probability sopt , the cor-responding optimal conditional collision probability canbe computed as

pcol ¼ 1� ð1� soptÞn�1 ¼ 1� 1� 1n

ffiffiffiffiffiffiffiffi2Te

Tc

s !n�1

; ð1Þ

Page 3: Control theoretic optimization of 802.11 WLANs: Implementation … · 2014-10-11 · Control theoretic optimization of 802.11 WLANs: ... The IEEE 802.11 standard for Wireless LANs

R=0 R=1R=0 collisionother station R=0

U[0,CWmin-1] U[0,CWmin WC,0[U]1- min-1]U[0,2xCWmin-1]

Fig. 1. Retry flag marking upon collisions.

Fig. 2. CAC algorithm.

2 In our experiments we use the PHY layer parameters of IEEE 802.11a,hence m ¼ 6 is chosen.

3 This is the default beacon interval value recommended by the 802.11specification and standard compliant devices must be able to update theirconfiguration with this frequency. Existing devices support setting this

260 P. Serrano et al. / Computer Networks 57 (2013) 258–272

which, following [16,17], can be approximated for large nby

popt � 1� e�ffiffiffiffiffi2TeTc

p; ð2Þ

where Te is the duration of an idle slot (a PHY layer con-stant) and Tc is the average duration of a collision. Further,previous simulations demonstrate that this approximationdoes not impact the performance even when n is small[16,17]. Therefore, popt does not depend on the number ofstations, but only on the average duration of a collisionTc , i.e.,

Tc ¼ TPLCP þLCþ EIFS; ð3Þ

where TPLCP is the duration of the Physical Layer Conver-gence Protocol (PLCP) preamble and header, C is the mod-ulation rate, EIFS is a PHY layer constant and L denotes theframe length.1

2.3. Centralized Adaptive Control algorithm

The Centralized Adaptive Control (CAC) algorithm [16],illustrated in Fig. 2, is based on a PI controller located atthe Access Point (AP). This controller computes the config-uration of the CWmin parameter as an integer ranging be-tween the default minimum and maximum valuesdefined by the standard specification, while CWmax is set

1 The duration of a collision is given by the longest packet involved in acollision. For simplicity, here we consider a fixed frame length, but theanalysis can be easily extended for the case of different frame sizesfollowing [4].

as CWmax ¼ 2mCWmin, following the standard binary expo-nential backoff procedure.2 By adjusting the CW configura-tion to be used by the stations, the AP controls the collisionprobability in the WLAN, with the goal of driving the net-work to the optimal point of operation that maximizesthroughput.

Following the above, the controller performs two tasksevery beacon interval (approx. 100 ms)3: (i) it estimatesthe current point of operation of the WLAN as given by theobserved collision probability pobs, and (ii) based on this esti-mation and popt , it computes the CW configuration to be usedduring the next beacon interval and sends it to the stationsin a beacon frame.

The computation of pobs is based on the observation ofthe retry flag of successful frames. Let us denote byR1ðR0Þ the number of observed frames with the retry bitset (unset) during a beacon interval. Assuming that noframes exceed the retry limit given by the MAX_RETRYparameter,4 and that transmission attempts collide with aconstant and independent probability,5 the observed proba-

parameter to different values, however larger values may slow the reactionto network changes.

4 Note that this assumption is accurate as in an optimally configuredWLAN the collision probability is very low.

5 This assumption has been widely used and shown to be accurate, seee.g. [2].

Page 4: Control theoretic optimization of 802.11 WLANs: Implementation … · 2014-10-11 · Control theoretic optimization of 802.11 WLANs: ... The IEEE 802.11 standard for Wireless LANs

P. Serrano et al. / Computer Networks 57 (2013) 258–272 261

bility of a collision in the WLAN can be estimated with (see[16]):

pobs ¼R1

R0 þ R1; ð4Þ

which can also be seen as the probability that the firsttransmission attempt from a station collides. Given theshort length of a frame transmission relative to the bea-con interval, on average there will be a large number ofsamples to accurately compute pobs. Still, in order to pre-vent inaccuracies, if the number of available samples ofR0 and R1 is smaller than 20, the update is deferred untilthe next beacon, which results in a good accuracy forour purposes as experiments demonstrate.

To calculate the new CWmin, CAC employs a PI controllerthat takes as input an error signal e, computed as the dif-ference between the observed collision probability pobs

and the target value popt:

e ¼ pobs � popt: ð5Þ

In this way, when the observed collision probability isabove the target value, the error signal will be positiveand trigger an increase of the CWmin, and consequently adecrease of the collision rate in the next beacon interval.Similarly, when the collision probability is below the targetvalue, CWmin is decreased in order to increase the activityon the channel. The operation of CAC is summarized inAlgorithm 1.

Algorithm 1. Centralized Adaptive Control algorithm.

1: while true do2: repeat3: if new frame sniffed then4: retrieve retry flag5: if retry flag is set then6: Increment R1

7: else8: Increment R0

9: end if10: end if11: until new beacon interval12: compute pobs½t� using (4)13: e½t� ¼ pobs½t� � popt

14: CWmin½t� ¼ CWmin½t � 1� þ KP � e½t�15: þðKI � KPÞ � e½t � 1�16: send beacon with new CW configuration17: end while

The fKP;KIg parameters of the PI controller are obtainedusing the Ziegler–Nichols rules, to achieve a proper trade-off between stability and speed of reaction to changes. Spe-cifically, these are computed as Kp ¼ 0:4Ku, respectivelyKi ¼ Kp=ð0:85TiÞ, where Ku is the Kp value that turns thesystem unstable when Ki ¼ 0 and Ti is the oscillation per-iod under these conditions [19]. Then, Kp and Ki are config-ured as follows:

KP ¼0:8

p2opt 1þ popt

Pm�1k¼0 ð2poptÞ

k� � ;

KI ¼0:4

0:85 � p2opt 1þ popt

Pm�1k¼0 ð2poptÞ

k� � : ð6Þ

The detailed computation of the fKP ;KIg parameters andthe proof that the system behaves stably with this config-uration are given in [16].

2.4. Distributed Adaptive Control algorithm

The Distributed Adaptive Control (DAC) algorithm [17]employs an independent PI controller at each station tocompute its CW configuration, to drive the overall collisionprobability to the target value popt . As illustrated in Fig. 3,each controller computes the CWmin value employed byits Network Interface Card (NIC), based on the locally ob-served network conditions. Similarly to CAC, CWmax is setas CWmax ¼ 2mCWmin.

While with centralized approaches all stations use thesame configuration provided by a single entity, and there-fore fairly share the channel, with distributed approachesthis is not necessarily the case. Indeed, given that thecollision probability in a network of n stations isp ¼ 1�

Qni¼1ð1� siÞ, in general there are multiple

ðs1; . . . ; snÞ solutions that satisfy p ¼ popt , with si – sj.These solutions maximize the total network throughputbut result in dissimilar allocations among stations. There-fore, to guarantee a fair throughput distribution, the errorsignal utilized in DAC consists of two terms: one to drivethe WLAN to the desired point of operation, and anotherone to achieve fairness between stations. More specifically,the error signal at station i is given by

ei ¼ ecollision;i þ efairness;i: ð7Þ

The first term of (7) ensures that the collision probability inthe network is driven to the target value:

ecollision;i ¼ pobs;i � popt; ð8Þ

where pobs;i denotes the collision probability as measuredby station i. When the collision probability observed bystation i is larger than the target value, the above termyields a positive error that increases the CW of station i,thereby reducing the collision probability.

The second term of (7) is computed as

efairness;i ¼ pobs;i � pown;i; ð9Þ

where pown;i is the collision probability experienced bystation i. The purpose of this second component of ei

is to drive the CW of all stations to the same value. In-deed, the higher the CWmin, the lower the number ofcollisions caused, and thereby, the lower the observedcollision probability pobs;i is. Therefore, a station will in-crease its CWmin if it experiences less collisions thanthe others.

With the above, the error signal at the input of the con-troller can be expressed as:

ei ¼ 2 � pobs;i � pown;i � popt: ð10Þ

Page 5: Control theoretic optimization of 802.11 WLANs: Implementation … · 2014-10-11 · Control theoretic optimization of 802.11 WLANs: ... The IEEE 802.11 standard for Wireless LANs

Fig. 3. DAC algorithm.

262 P. Serrano et al. / Computer Networks 57 (2013) 258–272

Algorithm 2. Distributed Adaptive Control algorithm.

6 Applications rarely request service differentiation using e.g. the ‘‘Typeof Service’’ field (ToS) within the IP header. Therefore the MAC layer isunable to classify the received packets, which are assigned to a singlequeue. Still, it should be noted that our scheme could be extended to thecase of multiple access categories, as we did in [20] for the case of videotransmission in the presence of data traffic.

1: while true do2: repeat3: if new frame sniffed then4: retrieve retry flag and5: increment R0 or R1 accordingly6: end if7: until beacon received8: compute pobs;i using (4)9: fetch T and F from driver stats10: compute pown;i using (11)11: e½t� ¼ 2 � pobs;i½t� � pown;i½t� � popt

12: CWmin½t� ¼ CWmin½t � 1� þ KP � e½t�13: þðKI � KPÞ � e½t � 1�14: update the local CW configuration15: end while

To compute the error signal, each station needs to mea-sure pobs;i and pown;i. The former is computed as pobs in CAC.For the computation of pown;i, we rely on the following sta-tistics which are readily available from wireless cards: thenumber of successful transmission attempts T and thenumber of failed attempts F. With these statistics, pown;i iscomputed as:

pown;i ¼F

F þ T: ð11Þ

Each station will estimate pobs;i and pown;i and compute theerror signal ei, which is provided to the PI controller for thecomputation of the new CWmin;i. Like in CAC, we choose totrigger an update of the CWmin;i every beacon interval, asthis is compatible with existing 802.11 hardware, whichis able to update the EDCA configuration at the beaconfrequency.

Although the analysis of DAC, based on multivariablecontrol theory, significantly differs from the analysis ofCAC, based on standard control theory, the fKP ;KIg param-eters that each station uses are the same ones of (6), asproved in [17]. The DAC operation is summarized in Algo-rithm 2.

Finally, it is important to notice that both approaches donot require to estimate the number of active stations in theWLAN and do not introduce any signaling among nodes,thus scale well with the network size. However, DAC fitsmore naturally the ad hoc mode of operation where thereis no entity maintaining node synchronization and propa-gating the MAC parameters through beacons. On the otherhand, we will show that by having a global view of theWLAN conditions, CAC can ensure better fairness amongstations. Therefore, there exists tradeoff between through-put fairness and operation paradigm when choosing one ofthe two approaches in a practical deployment.

3. Implementation details

A major advantage of CAC and DAC is that they arebased on functionalities already available in IEEE 802.11devices, and therefore can be implemented with commer-cial off-the-shelf (COTS) hardware. We address the WLANoperation with nodes employing a single access category,namely best-effort, as this the usual case in existingWLANs.6 In what follows we describe the hardware usedin our deployment and the implementation of the function-ality required by CAC and DAC.

Page 6: Control theoretic optimization of 802.11 WLANs: Implementation … · 2014-10-11 · Control theoretic optimization of 802.11 WLANs: ... The IEEE 802.11 standard for Wireless LANs

P. Serrano et al. / Computer Networks 57 (2013) 258–272 263

3.1. Implementation overview

We have implemented our algorithms using Soekrisnet4826-48 devices [21]. These are low-power, low-costscomputers equipped with 233 MHz AMD Geode SC1100CPUs, 2 Mini-PCI sockets, 128 Mbyte SDRAM and 256Mbyte compact flash circuits for data storage. To accom-modate the installation of current Linux distributions, wehave extended the storage capacity of the boards with 2-GB USB drives. As wireless interfaces, we used AtherosAR5414-based 802.11a/b/g devices.

As software platform we installed Gentoo Linux OS (ker-nel 2.6.24) and the popular MadWifi open-source WLANdriver (version v0.9.4) [22], which we modified as follows:(i) we enabled the dynamic setting of the EDCA parametersfor the best effort AC, since the driver disables by defaultchanging the configuration of the parameters for this cate-gory (which is not inline with the standard specification);(ii) we overwrote the drivers’ EDCA values for the best-ef-fort traffic with the standard recommended ones [1], and(iii) for the case of DAC we modified the driver to enablethe stations to employ the locally computed EDCA configu-ration using standardized system calls (as described in Sec-tion 3.4). The source code of the modified drivers and ourimplemented prototypes is available online [23].

Fig. 4 illustrates the main modules of our implementa-tion of CAC and DAC. The algorithms do not require intro-ducing modifications to the hardware/firmware nor havetight timing constraints, and therefore they can run asuser-space applications that communicate with the driverby means of IOCTL calls. We also take advantage of theability of the MadWifi driver to support multiple virtualdevices using different operation modes (master/man-aged/monitor) with a single physical interface. In the fol-lowing we detail the implementation of the differentmodules.

Fig. 4. CAC (left) and DAC (ri

3.2. Estimation of pobs

Both algorithms require to estimate the collision proba-bility observed in the WLAN. For the case of CAC this is per-formed only at the AP and results in pobs, while for the caseof DAC this is performed independently at each station iand results in pobs;i. The estimators are computed with(4), which relies on observing the retry flag of the over-heard frames. We next explain how these values are ob-tained from a practical perspective.

To overhear frames, we utilize a virtual device operatingin the so called monitor mode with promiscuous configu-ration. With this configuration, the device passes all trafficto user-space applications, including frames not addressedto the station. We also configure the device to pass the re-ceived frames with full IEEE 802.11 link layer headers, suchthat the Frame Control field of the frames (where the retryflag resides) can be examined.

With this set-up, the algorithms open a raw socket tothe driver, which enables the reception of Layer 2 frames.Through this socket, the algorithms listen for transmittedframes and process their headers in an independent thread(the ‘‘Frame Sniffer’’ module of Fig. 4). For every observedframe, one of the counters used in the estimation of thecollision probability is incremented: R0 if the retry flagwas unset, R1 if the retry flag was set. Every beacon intervalthe computation of pobs or pobs;i using (4) is triggered, andthen the counters are reset to zero.

3.3. Estimation of pown

In addition to the observed collision probability pobs;i,the DAC algorithm requires to estimate the experiencedcollision probability pown;i. We perform this computationin the ‘‘Statistics Collector’’ module of Fig. 4 using informa-tion recorded by the wireless driver. More specifically, at

ght) implementations.

Page 7: Control theoretic optimization of 802.11 WLANs: Implementation … · 2014-10-11 · Control theoretic optimization of 802.11 WLANs: ... The IEEE 802.11 standard for Wireless LANs

264 P. Serrano et al. / Computer Networks 57 (2013) 258–272

the end of a beacon interval we open a communicationchannel with the driver instance, configured in managed

mode, and perform a SIOCGATHSTATS IOCTL request.Upon this request, the driver populates an ath_stats datastructure, which contains detailed information about thetransmitted and received frames since the Linux kernelhas loaded the driver module. Out of the statistics re-trieved, the records that are of particular interest for ourimplementation are:

� ast_tx_packets: number of unique frames sent to thetransmission interface.� ast_tx_noack: number of transmitted frames that do

not require ACK.� ast_tx_longretry: number of transmission retries of

frames larger than the RTS threshold. As we do not usethe RTS/CTS mechanisms, this is the total number ofretransmissions.� ast_tx_xretries: number of frames not transmitted

due to exceeding the retry limit, which is set by theMAX_RETRY parameter.

To compute pown;i we need to count the number of suc-cessful transmissions and the number of failed attempts.To compute the former, we subtract from the number ofunique frames those that are not acknowledged (e.g., man-agement frames) and those that were not delivered,

Successes ¼ ast tx packets� ast tx xretries

� ast tx noack: ð12Þ

Similarly, to compute the number of failed attempts, out ofthe total number of retransmissions we do not count thoseretransmissions caused by frames that were eventuallydiscarded because the MAX_RETRY limit was reached,therefore,

Failures ¼ ast tx longretry

� ast tx xretries � MAX RETRY: ð13Þ

With the above, the terms F and T of (11) used to estimatepown;i are computed as

F½t� ¼ Failures½t� � Failures½t � 1�;T½t� ¼ Successes½t� � Successes½t � 1�;

ð14Þ

where t denotes the time of the current beacon intervaland t � 1 the previous one. Note that in the above we takethe difference between the total number of failures andsuccesses, respectively, counted by the driver at the endof the current and previous intervals, as these countersaccumulate values since the driver module has beenloaded in the kernel and cannot be reset by the user.

3.4. Contention window update

With the estimated collision probabilities, CAC and DACcompute the error signal at the end of a beacon intervalaccording to (5) and (7), respectively. Depending on thisvalue, the PI controller triggers an update of the CWmin tobe used in the next beacon interval t, according to the fol-lowing expression:

CWmin½t� ¼ CWmin½t � 1� þ KP � e½t� þ ðKI � KPÞ � e½t � 1�:ð15Þ

To ensure a safeguard against too large and too smallCWmin values we impose lower and upper bounds for theCWmin. We set these bounds to the default CWDCF

min andCWDCF

max values specified by the standard, which are 16 and1024, respectively, for IEEE 802.11a [24].

The algorithms assume that the CWmin can take anyinteger value in the ½16;1024� range. However, with ourdevices only integer powers of 2 are supported (i.e.,CWmin 2 f16;32; . . . ;1024g). Therefore, the value actuallyused is obtained as:

CW½t� ¼ powð2;rintðlog2ðCWmin½t�ÞÞÞ: ð16Þ

where rint(x) is a function that returns the integer valuenearest to x.

To commit the computed CW configuration, first we re-trieve the list of private IOCTLs supported by the deviceto search for the call that sets the CWmin. Once this callhas been identified, we prepare an iwreq data structurewith the following information: the interface name, thebase-2 exponent of the CW computed with Eq. (16), the ac-cess category index as defined by the standard (0 for BestEffort) and an additional parameter that identifies if the va-lue is intended to be used locally or propagated. For thecase of DAC this value is set to 0, as the CW is only intendedto the local card, while for the case of CAC is set to 1, there-by requesting the driver to broadcast the new CW withinthe EDCA Parameter Set element of the next scheduledbeacon frame.

4. Testbed description

In this section we describe our testbed and analyze thelink qualities between each node and the AP, showing thatour set-up is able to mimic a realistic deployment with sig-nificant differences in terms of SNR.

Our testbed is located in the Torres Quevedo building atUniversity Carlos III de Madrid. It consists of 18 devices de-ployed under the raised floor, a placement that providesphysical protection as well as radio shielding to some ex-tent (see [25]).

Fig. 5 illustrates the location of the nodes. We placedone node towards the center of the testbed, which acts asthe Access Point throughout our experiments and we de-note as AP, while stations are distributed at different dis-tances from the AP and numbered from 1 to 17 indecreasing order of their links’ SNR values towards theAP, which we measure as explained next. In this way, ourdeployment emulates several popular scenarios, e.g. cafés,offices, conference rooms, both in terms of number ofnodes and mobility. Indeed, in such scenarios nodes aremostly static, experiencing dissimilar link qualities to-wards the AP with small variations, as our measurementsconfirm. Although we focus on a single AP topology, inthe considered scenarios careful channel allocation is usu-ally performed to avoid inter-AP interference, and there-fore our algorithms can be independently executedwithin each WLAN.

Page 8: Control theoretic optimization of 802.11 WLANs: Implementation … · 2014-10-11 · Control theoretic optimization of 802.11 WLANs: ... The IEEE 802.11 standard for Wireless LANs

Fig. 5. Deployed testbed.

30

40

50

60

70

SNR

[dB]

P. Serrano et al. / Computer Networks 57 (2013) 258–272 265

All nodes are equipped with 5 dBi omnidirectionalantennas and are configured to operate on channel 64(5.32 GHz) of IEEE 802.11a standard [24], where no otherWLANs were detected. All nodes use the 16-QAM modula-tion and coding scheme, which provides 24 Mbps channelbit rate, as calibration measurements showed that thiswas the highest rate achievable by the node with the worstlink to the AP (node 17). Additionally, we disabled the RTS/CTS, rate adaptation, turbo, fast frame, bursting andunscheduled automatic power save delivery functionality,as well as the antenna diversity scheme for transmission/reception.

Unless otherwise specified, all nodes use the sametransmission power level of 17 dBm. Given the node place-ment of Fig. 5, this setting results in dissimilar link quali-ties between each station and the AP (e.g., node 1 is veryclose to the AP, while e.g. node 16 is far away, which willaffect the perceived SNR). To confirm this link heterogene-ity, we designed the following experiment. For a givennode, we ran a 10-s ping test between the station andthe AP, recording the SNR values of the received framesas obtained by the wireshark packet analyzer [26] fromthe radiotap header.7 This test was performed on a

7 With the radiotap option, the driver provides additional informationabout received frames to user-space applications, including the signal-to-noise ratio.

node-by-node basis, and repeated for 18 h. The averageand standard deviation of the SNR for each link are shownin Fig. 6.

5. Validation of the algorithms

Our first set of experiments aims at confirming that thegood operation properties of CAC and DAC, obtained ana-

20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

Station index

Fig. 6. SNR of the links between each node and the Access Point.

Page 9: Control theoretic optimization of 802.11 WLANs: Implementation … · 2014-10-11 · Control theoretic optimization of 802.11 WLANs: ... The IEEE 802.11 standard for Wireless LANs

1y p

16

32

64

128

256

CW

min

CWmin,1CWmin,10CWmin,13CWmin,14

266 P. Serrano et al. / Computer Networks 57 (2013) 258–272

lytically and via simulations in [16,17], are also achieved ina real testbed. Specifically, we want to confirm that the useof the algorithms results in stable behavior despite the de-scribed hardware/software limitations and the impair-ments introduced by the channel conditions, and alsoassess their resource consumption in terms of CPU andmemory usage.

0

0.25

0.5

0.75

0 5 10 15 20 25 30

Col

lisio

n pr

obab

ilit

time [s]

ownpobspopt

Fig. 8. CWmin used by four selected nodes (1, 10, 13 and 14) and theestimated pobs and pown for node 10 with DAC.

5.1. Point of operation

We consider a scenario with N ¼ 10 stations randomlyselected, namely 1, 2, 5, 6, 8, 9, 10, 12, 13, and 14, whichcorresponds to a network with heterogeneous link quali-ties. Stations are constantly backlogged with 1500-ByteUDP frames, which they send to the AP utilizing iperf

[27] for a duration of 5 min. For the case of the centralizedalgorithm (CAC) we log its key variables, namely, the CW

announced in beacon frames and the observed collisionprobability pobs. Both are obtained every 100 ms and de-picted in Fig. 7.

As the 30-s snapshot in the figure shows, CAC drives theWLAN to the desired point of operation. Indeed, the an-nounced CW oscillates between the two power of 2 valuesclosest to the optimal CWmin (i.e., 64 and 128), while pobs

fluctuates stably around the desired popt given by (2). Weconclude that, despite the hardware limitations imposedon the values of CW and the channel impairments, CAC isable to drive the WLAN to the desired point of operation.

Next we validate the operation of the distributed algo-rithm (DAC). We consider the same scenario as before, log-ging the key parameters of the algorithm at each station,namely CWmin;i; pown;i and pobs;i. In Fig. 8 we depict in theupper subplot the evolution of the CWmin used by four rep-resentative nodes. More specifically, we select out of the 10considered nodes the one with the best link (node 1) andthe one with the worst link (node 14), as well as two sta-tions with similar link qualities, (nodes 10 and 13). Addi-tionally, in the lower subplot we show the collisionprobabilities estimated by node 10 (pobs;10 and pown;10).

From the two subplots we see that DAC also drives theaverage collision probability in the WLAN to the desiredvalue. However, there is a key difference as compared tothe previous case: while with CAC all stations use the same

0

0.25

0.5

0.75

1

0 5 10 15 20 25 30

Col

lisio

n pr

obab

ility

time [s]

pobspopt

16

32

64

128

256

CW

min

Fig. 7. Announced CWmin and observed collision probability with CAC.

CWmin value, with DAC they operate at different averageCWmin. Indeed, the four stations considered in the experi-ment use average CWmin values of 300, 92, 92 and 64,respectively. As we will explain in Section 6.2, this behav-ior is caused by the relative differences in link qualities,combined with the inability of the wireless interface toidentify the reasons for a packet loss.

5.2. Resource consumption

In addition to analyzing the performance of CAC andDAC, it is also important to assess their resource consump-tion. For this purpose, we analyzed the CPU and memoryusage of the algorithms utilizing the top Linux application,which provides a dynamic real-time view of a running sys-tem. With this tool, we recorded the used shares of the CPUtime and available physical memory with a frequency of 1sample per second and computed the average usage. CAC,which runs exclusively at the AP, demands on average14% of the CPU time and only 0.8% of the physical memory.For the case of DAC, which runs at every station, the aver-age CPU time consumption is 17%, while the physicalmemory consumption is 0.9%. Given the low speed of thenodes’ CPU (233 MHz) and their reduced physical memory(128 MB), these results show that both CAC and DAC aresuitable for commercial deployments as they do not posestringent resource requirements.8

6. Performance evaluation

We next assess the performance of the algorithms un-der a large number of different scenarios and evaluate theirimprovements over the default EDCA configuration, whichwe use as a benchmark. Each considered experiment runsfor 2 min and is repeated 10 times to obtain average valuesof the measured metrics with good statistical significance.

8 In order to have a benchmark to compare against, we measured theCPU and memory usage of the popular packet sniffer tcpdump, running onthe same device type. Measurements revealed that tcpdump consumes 28%of the CPU time, while its memory usage reaches 4.3%, these values beingsignificantly larger than the ones for CAC and DAC.

Page 10: Control theoretic optimization of 802.11 WLANs: Implementation … · 2014-10-11 · Control theoretic optimization of 802.11 WLANs: ... The IEEE 802.11 standard for Wireless LANs

0

5

10

15

20

EDCA CAC DAC

Tota

l thr

ough

put [

Mbp

s]

Fig. 9. Total throughput with UDP traffic.

0

0.5

1

1.5

2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

Indi

vidu

al th

roug

hput

[Mbp

s]

Station index

EDCACACDAC

Fig. 10. Throughput per station with UDP traffic.

9 Since in most scenarios the network operates close to saturation and allnodes have the same traffic requirements, we argue that JFI is the mostsuitable metric for assessing the fairness properties of CAC and DAC.Specifically, our goal is to quantify the dissimilarity in the resourcedistribution, independent of the number of users.

0

0.5

1

1.5

2

30 40 50 60 70

Per n

ode

thro

ughp

ut [M

bps]

SNR [dB]

EDCACACDAC

Fig. 11. Per node throughput obtained vs. SNR.

P. Serrano et al. / Computer Networks 57 (2013) 258–272 267

We evaluated the behavior of the proposed algorithmswith both unidirectional (UDP) and bidirectional (TCP)traffic, under diverse conditions in terms of link qualitiesand number of active nodes. Unless otherwise stated, weassume nodes have similar traffic demands and areconstantly backlogged, thus the network is mostlysaturated.

6.1. UDP throughput

We first measure the achievable throughput betweenthe nodes and the AP when all the stations are transmittingUDP traffic at the same time. Fig. 9 plots the average andstandard deviation of the total throughput obtained witheach mechanism. We observe that the EDCA default config-uration achieves around 11 Mbps, while the use of DACand CAC results in a performance gain of approximately45%. Therefore, we confirm that both approaches, by prop-erly adapting the CW configuration to the number of con-tending stations, achieve a much higher efficiency.

To further examine the performance of the algorithmswe plot the per-station throughput in Fig. 10. Accordingto the figure, the use of the EDCA recommended valuesnot only provides the lowest overall throughput figures,but also fails to provide a fair sharing of the available band-width. Indeed, it can be seen that, e.g., the node with thebest link quality to the AP (node 3) achieves more thanthree times the throughput obtained by the station withthe poorest link (node 15).

While DAC provides a larger total throughput thanEDCA, it does not improve the level of fairness. Actually,it results in a somehow opposite performance as the oneobtained with EDCA: stations that obtained a relativelylarge bandwidth with EDCA (e.g., nodes 3 and 6) now ob-tain a relatively small bandwidth with DAC. Furthermore,due to the poor short-term fairness properties of 802.11MAC [28], the results show a notable variability. The useof CAC, on the other hand, provides the best performanceboth in terms of total throughput and fairness, as it pro-vides all stations with very similar throughput values.

To quantify the throughput fairness achieved by theconsidered mechanisms we compute the Jain’s fairness in-

dex (JFI) [29].9 The resulting JFI values are 0.865, 0.997 and0.817 for the case of EDCA, CAC and DAC, respectively. Thesefigures confirm the good fairness properties of CAC, andshows that DAC and EDCA suffer from a higher level ofunfairness, a result that we analyze next.

6.2. Impact of SNR on throughput

We have seen that link quality affects throughput distri-bution, in particular for EDCA and DAC. To analyze this im-pact, we plot in Fig. 11 the average UDP throughput perstation vs. the SNR of the link between the station andthe AP. Note that, in this analysis we do not modify sta-tions’ SNR by tuning their transmission power, but insteadwe investigate how the SNR dissimilarity that arises due totheir relative position to the AP affects the throughput per-formance of CAC and DAC as compared to EDCA. For ease ofvisualization we also plot natural smoothing splines overthe data points.

Page 11: Control theoretic optimization of 802.11 WLANs: Implementation … · 2014-10-11 · Control theoretic optimization of 802.11 WLANs: ... The IEEE 802.11 standard for Wireless LANs

0

1

2

3

4

5

6

STA #10 STA #13

Thro

ughp

ut [M

bps]

EDCACACDAC

Fig. 12. Performance with hidden nodes.

0.8

0.9

1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

JFI

Number of stations

EDCACACDAC

10

12

14

16

18

Thro

ughp

ut [M

bps]

Fig. 13. Total throughput and fairness for different number of stations.

268 P. Serrano et al. / Computer Networks 57 (2013) 258–272

From the figure we observe that: (i) for EDCA there is anoticeable and positive correlation between SNR andthroughput; (ii) for CAC, performance is not much affectedby SNR dissimilarities, as significantly better link qualitiesresult in very small throughput improvements; (iii) forDAC there is a large and negative correlation betweenSNR and throughput, with small differences in terms ofSNR causing large differences in terms of throughput.

For the case of EDCA, the positive correlation is causedby the capture effect [30]. With this effect, in case of a col-lision the receiver can decode the packet with the higherSNR. As a result, stations with better link quality obtainhigher throughput. In contrast, the use of CAC reducesthe number of collisions in the WLAN, and therefore theimpact of the capture effect is significantly reduced.

For the case of DAC, the negative correlation is also dri-ven by the capture effect as follows. Nodes with high cap-ture probability will experience smaller collision rates thanthe others, and therefore will have pown;i smaller than pobs;i.This will cause a positive error signal according to theefairness;i term in (9), which will result in large CWmin values.Conversely, nodes with low capture probability will expe-rience larger pown;i values and smaller pobs;i ones, and there-fore will have smaller CWmin configurations. In this way,capturing nodes will transmit less often and therefore willobtain low throughput figures, while the other nodes willtransmit more often and experience a higher throughput.Additional experiments with different transmission powersettings, not reported due to space constraints, confirmedthat a careful equalization of the link qualities is able to re-store fairness to some extent.

6.3. Hidden nodes scenario

Our adaptive algorithms have been designed for scenar-ios where all stations are in radio range of each other andcoordinate their transmissions by means of carrier sensing.However, in real deployments hidden nodes may be pres-ent, and therefore we want to investigate their behaviorunder such circumstances.

To this aim, we ran extensive measurements, selectingdifferent topologies and different transmission power set-tings, to determine the most pathological scenario. This isobtained when node 1 acts as AP, and nodes 10 and 13act as stations, using a transmission power level of5 dBm. With this setting, each EDCA station transmittingin isolation (i.e., with the other station silent) obtainsabout 16.3 Mbps of UDP throughput, while if both stationstransmit simultaneously the throughput of each one dropsto 1.6 Mbps. Thereby we managed to reproduce a hiddennode scenario.

We then repeated the experiment with CAC and DAC,and obtained the results depicted in Fig. 12. We observethat the use of DAC does not improve performance overEDCA. In contrast, CAC provides a dramatic throughput in-crease, i.e., more than three times the throughput attainedwith the other mechanisms. We conclude that CAC detectsthe large collision rate and commands hidden nodes to beless aggressive by announcing a higher CWmin, which less-ens (but does not eliminate) the hidden node problem. Onthe other hand, a station running DAC is not able to over-

hear MAC (re-)transmissions from hidden nodes, andhence cannot correctly estimate the collision probabilityin the network.

6.4. Impact network size

We next evaluate the performance of the algorithms asa function of the number of stations. To this aim, we mea-sure the total throughput and JFI for an increasing numberof contending nodes, adding new stations in ascending or-der of their link quality. We plot the obtained results inFig. 13.

We observe that for both DAC and CAC the totalthroughput performance is practically flat, regardless ofthe number of stations. This result confirms that both ap-proaches are able to adapt the CW to the number of sta-tions present in the WLAN.

For the case of EDCA, performance degrades with thenumber of stations, which is the expected result from theuse of a fixed set of (relatively small) contention parame-ters. However, for N > 15 the total throughput perfor-mance slightly grows again, a behavior caused by thecapture effect as the last nodes to be added in our experi-ments are the ones experiencing better link qualities

Page 12: Control theoretic optimization of 802.11 WLANs: Implementation … · 2014-10-11 · Control theoretic optimization of 802.11 WLANs: ... The IEEE 802.11 standard for Wireless LANs

0

5

10

15

20

EDCA CAC DAC

Tota

l thr

ough

put [

Mbp

s]

Fig. 14. Total throughput of FTP-like traffic.

0

0.5

1

1.5

2

2.5

3

3.5

4

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

Indi

vidu

al th

roug

hput

[Mbp

s]

Station index

EDCACACDAC

Fig. 15. Throughput per station with FTP-like traffic.

P. Serrano et al. / Computer Networks 57 (2013) 258–272 269

(nodes 2 and 1). This is confirmed by the fairness values, asfor N > 15 there is a drop in the JFI for the case of EDCA. JFIvalues also confirm that DAC is more sensitive to heteroge-neous link conditions, as its performance noticeably de-grades with N. In contrast, with CAC the fairness index ispractically constant for all N values.

6.5. TCP throughput

We next evaluate performance in scenarios in whichstations use TCP. We start by evaluating the throughputand fairness performance when all stations are constantlybacklogged sending TCP traffic to the AP, replicating bulkyFTP transfers. Note that this scenario is substantially differ-ent from the ones considered in the previous subsections,as TCP congestion control10 introduces a ‘‘closed loop’’ thatcan lead to extreme unfairness conditions and even starva-tion [32]. Precisely, we expect nodes that use a more aggres-sive CW configuration to leave less channel accessopportunities for the more conservative ones, thus causingthe latter to reach congestion much faster and reduce theirTCP windows more frequently. This behavior will exacerbatethe difference in the throughput values they obtain and im-pact the fairness performance more severely.

We plot in Fig. 14 the total throughput values for thethree mechanisms. According to the results, both CACand DAC significantly outperform EDCA, improvingthroughput by 50% and 40%, respectively.

The per-station throughput distribution is depicted inFig. 15. With EDCA, the node with the poorest link quality(node 17) suffers from a large performance degradation,this being worse than in the UDP case (see Fig. 9). Theuse of DAC with TCP traffic also exacerbates the uneven-ness in the traffic distribution, with node 15 clearly out-standing among the other nodes. DAC results also presenta large deviation, caused by relatively frequent TCP time-outs from nodes with weak radio link (e.g., node 17). Con-versely, CAC yields a remarkably fair and stable throughputdistribution.

10 The Linux distribution used in our deployment executes the TCP CUBICvariant [31].

Like in the UDP case, we compute the JFI values for theresulting throughput distributions. In this case, the valuesfor EDCA, CAC and DAC are 0.787, 0.996 and 0.692, respec-tively. We conclude that, as expected, the performance ofEDCA and DAC worsens with TCP, while CAC preservesits good properties in this scenario.

6.6. TCP transfer delay

We finally consider a scenario involving finite-size TCPconnections. More specifically, all stations alternate peri-ods of activity—during which a transmission of 10 MB oc-curs—with silent periods exponentially distributed withmean k�1 [33]. We consider three different values for k,corresponding to three different levels of activity, namelyhigh, moderate and low. For each case we ran 1-h experi-ments, logging all transfer durations and computing theper-station average delay. We use a box-and-whisker dia-gram to illustrate the distribution of the average delayamong nodes: we provide the median, first and third quar-tiles of the average delay, as well as its maximum and min-imum values.

Results are depicted in Fig. 16. With k�1 ¼ 30 s, whichcorresponds to high activity, we see that CAC providesthe smallest and most uniform distribution of transfer de-lay among nodes, with practically no difference betweenthe best and worst performing node. In case of EDCA, thedelay shows a larger median and higher variability. How-ever, the small distance between the first and third quar-tiles shows that most of the stations experience similarperformance. Finally, for the case of DAC, despite the med-ian is similar to the one of CAC, results show a much largerdispersion. This further confirms that, although DACachieves the main objective of optimizing the totalthroughput, nodes adjust their CW based on different, lo-cally observed conditions, which results in some stationsbeing more aggressive than others, and correspondinglyyields large variations in the delay figures.

When the traffic activity is moderate (k�1 ¼ 60 s), theabsolute values decrease, but the relative results are simi-lar, i.e., CAC provides again the smallest and most uniformdelays among nodes. Finally, when the activity of the

Page 13: Control theoretic optimization of 802.11 WLANs: Implementation … · 2014-10-11 · Control theoretic optimization of 802.11 WLANs: ... The IEEE 802.11 standard for Wireless LANs

0

100

200

300

400

500

600

700

Tran

sfer

tim

e [s

]

(a) λ-1 = 30 [s]

EDCACACDAC

0

50

100

150

200

250

300

Tran

sfer

tim

e [s

]

(b) λ-1 = 60 [s]

EDCACACDAC

0

10

20

30

40

50

60

Tran

sfer

tim

e [s

]

(c) λ-1 = 90 [s]

EDCACACDAC

Fig. 16. TCP delay performance.

270 P. Serrano et al. / Computer Networks 57 (2013) 258–272

nodes is low (k�1 ¼ 90 s), medians are very similar but stillCAC provides the most fair distribution of the transfer de-lays. From these experiments, we conclude that CAC alsoprovides the best performance under dynamic trafficscenarios.

7. Related work

The scientific literature offers many examples of MACoptimization approaches. Many of them are based on acentralized entity, responsible for monitoring system per-formance and adapting the system parameters to current

conditions. Other works focus on distributed approachesto adapt MAC parameters. Very little experimental workis available, and it is based on complex algorithms, non-standard functionality and small-sized networks. In thefollowing we review the most significant contributions ineach of these areas and describe the novelty of our work.

7.1. Centralized approaches

A significant number of approaches exists in the litera-ture [5,7,14,16] that use a single node to compute the set ofMAC parameters to be used in the WLAN. With the excep-tion of our CAC algorithm [16], the main drawbacks ofthese approaches are that they are either based on heuris-tics, thereby lacking analytical support for providing per-formance guarantees [5,7], or they do not consider thedynamics of the WLAN under realistic scenarios [14].

7.2. Distributed approaches

Several works [8,10,13,34,35] have proposed mecha-nisms that independently adjust the backoff operation ofeach stations in the WLAN. The main disadvantages ofthese approaches are that they change the rules of the IEEE802.11 standard and therefore require introducing signifi-cant hardware or firm-ware modifications.

7.3. Implementation experiences

Very few schemes to optimize WLAN performance havebeen developed in practice [14,15,18]. While the idea be-hind Idle Sense [13] is fairly simple, its implementation[18] entails a significant level of complexity, introducingtight timing constraints that require programming at thefirmware level. Nonetheless, the microcode that achievesthe desired functionality is proprietary and thus subjectto portability constraints. Similar limitations hold for theapproach of [15], which introduces changes to the MACprotocol that require redesigning the whole NIC imple-mentation. Further, this involves complex DSP and FPGAprogramming and demands non-negligible computationalresources. Finally, the work of [14] does not propose orevaluate any adaptive algorithm to adapt the CW but justevaluates the performance of static configurations. Addi-tionally, our testbed is substantially larger than the oneused in these previous works.

8. Conclusions

We have prototyped with standard 802.11 devices twoadaptive mechanisms that tune the contention windowbased on the observed network conditions. In contrast toother proposals that require complex modifications, thesemechanisms rely on functionalities already supported byCOTS hardware/firmware, and do not introduce any exten-sions to the standard 802.11 MAC. We have extensivelyevaluated the performance of the mechanisms in an 18-nodes testbed, considering a large variety of network con-ditions. With our experimental study we have identifiedthe key limitations of the distributed scheme, inherent in

Page 14: Control theoretic optimization of 802.11 WLANs: Implementation … · 2014-10-11 · Control theoretic optimization of 802.11 WLANs: ... The IEEE 802.11 standard for Wireless LANs

P. Serrano et al. / Computer Networks 57 (2013) 258–272 271

realistic scenarios, and we have confirmed that the central-ized mechanism significantly improves network through-put, transfer delay and fairness among stations in a broadrange of circumstances, including the pathological case ofhidden nodes. A major conclusion from our work is that,by simply adding a few lines of code at the AP to exploitthe functionality readily available, we can achieve perfor-mance improvements of up to 50%. We believe that the re-sults presented herein pave the way for a widespreaddeployment of the centralized mechanism.

Acknowledgement

This work has been supported by the European Com-munity’s Seventh Framework Programme (FP7-ICT-2009-5) under Grant Agreement No. 257263 (FLAVIA project).

References

[1] IEEE 802.11, Wireless LAN Medium Access Control (MAC) andPhysical Layer (PHY) Specifications, Revision of IEEE Std 802.11-1999, 2007.

[2] G. Bianchi, Performance analysis of the IEEE 802. 11 distributedcoordination function, IEEE Journal on Selected Areas inCommunications 18 (3) (2000) 535–547.

[3] A. Banchs, L. Vollero, Throughput analysis optimal configuration of802. 11e EDCA, Computer Networks 50 (11) (2006).

[4] P. Serrano, A. Banchs, P. Patras, A. Azcorra, Optimal configuration of802. 11e EDCA for real-time data traffic, IEEE Transactions onVehicular Technology 59 (5) (2010) 2511–2528.

[5] J. Freitag, N.L.S. da Fonseca, J.F. de Rezende, Tuning of 802. 11enetwork parameters, IEEE Communications Letters 10 (8) (2006)611–613.

[6] L. Scalia, I. Tinnirello, J.W. Tantra, Chuan Heng Foh, Dynamic MACparameters configuration for performance optimization in 802.11enetworks, in: Proc. GLOBECOM, San Francisco, CA, USA, Dec 2006, pp.1–6.

[7] A. Nafaa, A. Ksentini, A. Ahmed Mehaoua, B. Ishibashi, Y. Iraqi, R.Boutaba, Sliding contention window (SCW): towards backoff range-based service differentiation over IEEE 802. 11 wireless LANnetworks, IEEE Network 19 (4) (2005) 45–51.

[8] Y. Yang, J.J. Wang, R. Kravets, Distributed optimal contentionwindow control for elastic traffic in single-cell wireless LANs, IEEETransactions on Networking 15 (6) (2007) 1373–1386.

[9] Q. Xia, M. Hamdi, Contention window adjustment for IEEE 802.11WLANs: a control-theoretic approach, in: Proc. InternationalConference on Computer Communications (ICC), Istanbul, Turkey,June 2006.

[10] Q. Ni, I. Aad, C. Barakat, T. Turletti, Modeling and analysis of slow CWdecrease for IEEE 802.11 WLAN, in: Proc. IEEE Personal, Indoor, andMobile Radio Communications Conference (PIMRC), Beijing, 2003.

[11] Lijun Chen, Steven H. Low, John C. Doyle, Joint congestion controland media access control design for wireless ad hoc networks, in:Proc. IEEE INFOCOM, Miami, Florida, March 2005.

[12] Lijun Chen, Steven H. Low, John C. Doyle, Random access game andmedium access control design, IEEE Transactions on Networking 18(4) (2010) 1063–6692.

[13] Martin Heusse, Franck Rousseau, Romaric Guillier, Andrzej Duda,Idle Sense: an optimal access method for high throughput andfairness in rate diverse wireless LANs, in: Proc. ACM SIGCOMM,Philadelphia, PA, USA, 2005, pp. 121–132.

[14] Vasilios A. Siris, George Stamatakis, Optimal CWmin selection forachieving proportional fairness in multi-rate 802.11e WLANs: test-bed implementation and evaluation, in: Proceedings of the 1stInternational Workshop on Wireless Network Testbeds,Experimental Evaluation & Characterization, Los Angeles, CA, USA,2006, pp. 41–48.

[15] Ralph Bernasconi, Silvia Giordano, Alessandro Puiatti, RaffaeleBruno, Enrico Gregori, Design and implementation of an enhanced802.11 MAC architecture for single-hop wireless networks, EURASIPJournal on Wireless Communications and Networking 2007 (1)(2007) 33.

[16] P. Patras, A. Banchs, P. Serrano, A control theoretic approach forthroughput optimization in IEEE 802. 11e EDCA WLANs, MobileNetworks and Applications (MONET) 14 (6) (2009) 697–708.

[17] P. Patras, A. Banchs, P. Serrano, A. Azcorra, A control theoreticapproach to distributed optimal configuration of 802. 11 WLANs,IEEE Transactions on Mobile Computing 10 (6) (2011) 897–910.

[18] Yan Grunenberger, Martin Heusse, Franck Rousseau, Andrzej Duda,Experience with an implementation of the idle sense wireless accessmethod, in: Proceedings of the ACM CoNEXT conference, New York,New York, 2007, pp. 1–12.

[19] G.F. Franklin, J.D. Powell, M.L. Workman, Digital Control of DynamicSystems, second ed., Addison-Wesley, 1990.

[20] Paul Patras, Albert Banchs, Pablo Serrano, A Control TheoreticScheme for Efficient Video Transmission over IEEE 802.11e EDCAWLANs, ACM Transactions on Multimedia Computing,Communications, and Applications (TOMCCAP) 8 (3) (2012).

[21] Soekris Engineering, Inc. <http://www.soekris.com/>.[22] The MadWifi Project. <http://madwifi-project.org/>.[23] Personal Page, <http://www.hamilton.ie/ppatras/#code>.[24] IEEE 802.11, Supplement to Wireless LAN Medium Access Control

and Physical Layer Specifications: High-speed Physical Layer in the5 GHz Band, IEEE Std 802.11a, 1999.

[25] Pablo Serrano, Carlos J. Bernardos, Antonio de la Oliva, Albert Banchs,Ignacio Soto, Michael Zink, FloorNet: Deployment and Evaluation ofa Multihop Wireless 802.11 Testbed, EURASIP Journal on WirelessCommunications and Networking, 2010.

[26] Wireshark Network Protocol Analyzer. <http://wireshark.org>.[27] Iperf Traffic Generator. <http://sourceforge.net/projects/iperf/>.[28] Gilles Berger-Sabbatel, Andrzej Duda, Martin Heusse, Franck

Rousseau, ‘‘Short-term fairness of 802.11 networks with severalhosts, in: Proceedings of the Sixth IFIP TC6/WG6.8 Conference onMobile and Wireless Communication Networks (MWCN 2004), vol.162, Paris, France, 2004, pp. 263–274(25–27).

[29] R. Jain, Chiu, D.M., W. Hawe, A Quantitative Measure of Fairness andDiscrimination for Resource Allocation in Shared Systems, DECResearch Report TR-301, 1984.

[30] Z. Hadzi-Velkov, B. Spasenovski, Capture effect in IEEE 802.11 basicservice area under influence of Rayleigh fading and near/far effect,in: Proc. IEEE Personal, Indoor, and Mobile Radio CommunicationsConference (PIMRC), 2002, vol. 1, pp. 172–176.

[31] Sangtae Ha, Injong Rhee, Lisong Xu, CUBIC: a new TCP-friendly high-speed TCP variant, ACM SIGOPS Operating Systems Review 42(2008) 64–74.

[32] O. Gurewitz, V. Mancuso, Jingpu Shi, E.W. Knightly, Measurementand modeling of the origins of starvation of congestion-controlledflows in wireless mesh networks, IEEE Transactions on Networking17 (6) (2009).

[33] P. Barford, M.E. Crovella, Generating representative web workloadsfor network and server performance evaluation, in: Proc. ACMSIGMETRICS, 1998, pp. 151–169.

[34] L. Bononi, M. Conti, E. Gregori, Runtime optimization of IEEE 802.11wireless LANs performance, IEEE Transactions on Parallel andDistributed Systems 15 (1) (2004) 66–80.

[35] F. Cali, M. Conti, E. Gregori, IEEE 802. 11 Protocol: designperformance evaluation of an adaptive backoff mechanism, IEEEJournal on Selected Areas in Communications 18 (9) (2000) 1774–1786.

Pablo Serrano received his Telecommunica-tion Engineering degree and his PhD from theUniversity Carlos III of Madrid (UC3M) in2002 and 2006, respectively. He has been withthe Telematics Department of UC3M since2002, where he currently holds the position ofAssistant Professor. In 2007 he was a VisitingResearcher at the Computer NetworkResearch Group at Univ. of MassachusettsAmherst partially suported by the SpanishMinistry of Education under a José Castillejogrant. His current work focuses on perfor-

mance evaluation of wireless networks. He has over 30 scientific papersin peer-reviewed international journal and conferences. He also serves asTPC member of several international conferences, including IEEE Globe-

com and IEEE INFOCOM.
Page 15: Control theoretic optimization of 802.11 WLANs: Implementation … · 2014-10-11 · Control theoretic optimization of 802.11 WLANs: ... The IEEE 802.11 standard for Wireless LANs

272 P. Serrano et al. / Computer Networks 57 (2013) 258–272

Paul Patras received the M.Sc. and Ph.D.degrees in telematics engineering from Uni-versity Carlos III of Madrid in 2008 and 2009,respectively. He is currently a Post-Doctoralresearch fellow at the Hamilton Institute. In2010 he was a visiting intern at the RiceNetworks Group of Rice University, Houston,USA. He serves as a reviewer for severalinternational journals and conferences,including Elsevier Computer Networks, IEEE/ACM Transactions on Networking, IEEETransactions on Communications, IEEE INFO-

COM, IEEE Globecom and IEEE ICC. His current research interests includeperformance optimization of IEEE 802.11 wireless LANs, adaptive MACmechanisms, dynamic spectrum access, prototype implementation and

testbeds.

Andrea Mannocci received a M.Sc. degree inComputer Science Engineering from Univer-sity of Pisa in 2010. His Masters thesis, enti-tled ‘‘Stepwise Evolution of Java Applicationsusing Dynamic Updates’’, was developedduring an Erasmus exchange period at TheMaersk Mc-Kinney Moller Institute, SyddanskUniversitet (University of Southern Denmark,Odense, Denmark) under the supervision ofProf. Bo Nø rregaard Jø rgensen and Dr. AllanRaundahl Gregersen. In 2011 he also receiveda M.Sc. degree in Telematics Engineering from

University Carlos III of Madrid. He is a research assistant at InstituteIMDEA Networks. His current research activities mainly focuses on theIEEE 802.11 and 802.16 protocols.

Vincenzo Mancuso received his masterdegree in Electronics from the University ofPalermo, Italy, in 2001, and a Ph.D. in Elec-tronics, Computer Science and Telecommuni-cations from the same University in 2005. In2004–2005 he was with University of Roma‘‘Tor Vergata’’, working on SATNEX, an ISTNetwork of Excellence. He was then back toUniversity of Palermo as postdoc, from June2005 to May 2009. Also, during that period hehas been visiting scholar at the ECE depart-ment of Rice University, Houston, Texas

(September 2006 to January 2008). In June 2009 he joined the MAESTROteam at INRIA Sophia Antipolis, France. Since September 2010, Vincenzois with Institute IMDEA Networks in Madrid, Spain.

Albert Banchs received his Telecommunica-tions Engineering degree from the Polytech-nical University of Catalonia in 1997, and thePh.D. degree from the same university in2002. His Ph.D. received the national awardfor best thesis on broadband networks. Hewas a visitor researcher at ICSI, Berkeley, in1997, worked for Telefonica I+D, in 1998, andfor NEC Europe Ltd., Germany, from 1998 to2003. Since 2003, he is with the UniversityCarlos III of Madrid and since 2009 he is alsoDeputy Director of IMDEA Networks. His

authors over 50 publications in peer-reviewed journals and conferencesand five patents. He is associated editor for IEEE Communications Lettersand has been guest editor for IEEE Wireless Communications and for

Computer Networks. He has served on the TPC of a number of conferencesand workshops including IEEE INFOCOM, IEEE ICC and IEEE Globecom,and was TPC chair for European Wireless 2010.