On the Optimization of the IEEE 802.11 DCF: A Cross-Layer Perspective

This paper is focused on the problem of optimizing the aggregate throughput of the Distributed Coordination Function (DCF) employing the basic access mechanism at the data link layer of IEEE 802.11 protocols. In order to broaden the applicability of the proposed analysis, we consider general operating conditions accounting for both non-saturated and saturated traffic in the presence of transmission channel errors, as exemplified by the packet error rate $P_e$. The main clue of this work stems from the relation that links the aggregate throughput of the network to the packet rate $\lambda$ of the contending stations. In particular, we show that the aggregate throughput $S(\lambda)$ presents two clearly distinct operating regions that depend on the actual value of the packet rate $\lambda$ with respect to a critical value $\lambda_c$, theoretically derived in this work. The behavior of $S(\lambda)$ paves the way to a cross-layer optimization algorithm, which proved to be effective for maximizing the aggregate throughput in a variety of network operating conditions. A nice consequence of the proposed optimization framework relies on the fact that the aggregate throughput can be predicted quite accurately with a simple, yet effective, closed-form expression, which is also derived in the article. Finally, theoretical and simulation results are presented throughout the work in order to unveil, as well as verify, the key ideas.


I. INTRODUCTION
DCF represents the main access mechanism at the Medium Access Control (MAC) layer [1] of the IEEE802.11 series of standards, and it is based on Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA).
Many papers, following the seminal work by Bianchi [2], have addressed the problem of modeling, as well as optimizing, the DCF in a variety of traffic load models and transmission channel conditions. Let us provide a survey of the recent literature related to the problem addressed in this paper. Papers [3]- [7] model the influence of real channel conditions on the throughput of the DCF operating in saturated traffic conditions. Paper [3] investigates the saturation throughput of IEEE 802.11 in presence of non ideal transmission channel and capture effects.
The behavior of the DCF of IEEE 802.11 WLANs in unsaturated traffic conditions has been analyzed in [8]- [13], whereby the authors proposed various bi-dimensional Markov models for unsaturated traffic conditions, extending the basic bi-dimensional model proposed by Bianchi [2]. In [14], the authors look at the impact of channel induced errors and of the received Signal-to-Noise ratio (SNR) on the achievable throughput in a system with rate adaptation, whereby the transmission rate of the terminal is modified depending on either direct, or indirect measurements of the link quality.
The effect of the contention window size on the performance of the DCF has been investigated in [15]- [22] upon assuming a variety of transmission scenarios. In [15]- [17], the authors addressed the optimization of the contention window in such a way as to optimize the saturated throughput of the DCF.
As a starting point for the derivations which follow, we adopt the bi-dimensional model proposed in a companion paper [12] (see also [13]). Briefly, in [12] the authors extended the saturated Bianchi's model by introducing a new idle state, not present in the original Bianchi's model, accounting for the case in which the station queue is empty. The Markov chain of the proposed contention model was solved for obtaining the stationary probabilities, along with the probability τ that a station starts transmitting in a randomly chosen time slot.
In this paper the focus is different in many respects. Firstly, we investigate the behavior of the aggregate throughput as a function of the traffic load λ of the contending stations, and note that the aggregate throughput S(λ) presents two distinct operating regions identified, respectively, by Below Link Capacity (BLC) region and Link Capacity (LC) region. Derived in closed-form in this work, and identified by S m throughout the paper, the link capacity of the considered scenario corresponds to the maximum throughput that the network can achieve when the contending stations transmit with a proper set of network parameters.
We show that the network operates in the BLC region when the actual value of the packet rate λ is less than a critical value λ c , theoretically derived in this work.
The second part of this article is focused on the optimization of the DCF throughput. We propose a cross-layer algorithm whose main aim is to allow the network to operate as close as possible to the link capacity S m . The proposed optimization algorithm relies on a number of insights derived by the behavior of the aggregate throughput S(λ) as a function of the traffic load λ, and aims at choosing either an appropriate value of the minimum contention window W 0 , or a proper size of the transmitted packets depending on the network operating region.
Finally, we derive a simple model of the optimized throughput, which is useful for predicting the aggregate throughput without resorting to simulation.
The rest of the paper is organized as follows. Section II briefly presents the Markov model at the very basis of the proposed optimization framework, whereas Section III investigates the behavior of the aggregate throughput as a function of the traffic load λ. The proposed optimization algorithm is discussed in section IV. Section V presents simulation results of the proposed technique applied to a sample network scenario, while Section VI draws the conclusions.

II. MARKOV MODELING
The bi-dimensional Markov Process of the contention model proposed in [12], and shown in Fig. 1 for completeness, governs the behavior of each contending station through a series of states indexed by the , whereby i identifies the backoff stage. On the other hand, the index k, which belongs to the set [0, W i − 1], identifies the backoff counter. By this setup, the size of the ith contention window is W i = 2 i W 0 , ∀i ∈ [1, m], while W 0 is the minimum size of the contention window.
An idle state, identified by I in Fig. 1, is introduced in order to account for the scenario in which after a successful transmission there are no packets to be transmitted, as well as for the situation in which the packet queue is empty and the station is waiting for a new packet arrival. The proposed Markov model accounts for packet errors due to imperfect channel conditions, by defining an equivalent probability of failed transmission, identified by P eq , which considers the need for a new contention due either to packet collisions (P col ) or to channel errors (P e ) on the transmitted packets, i.e., P eq = P col + P e − P e · P col (1) It is assumed that at each transmission attempt each station encounters a constant and independent probability of failed transmission, independently from the number of retransmissions already suffered.
The stationary solution of the Markov Model in Fig. 1 is employed to compute τ , the probability that a station starts a transmission in a randomly chosen time slot. First of all, observe that a packet transmission takes place when a station goes in one of the states b i,0 , ∀i ∈ {0, m}. Therefore, the probability τ can be evaluated by adding up the probabilities b i,0 over the set i ∈ {0, . . . , m}. Upon imposing the normalization condition 1 on the Markov model in Fig. 1, and expressing the probabilities b i,k , ∀k ∈ {1, . . . , W i − 1}, as a function of the probabilities b i,0 , the probability τ can be rewritten as follows: As in Bianchi's work [2], we assume that: 1) the probability τ is constant across all time slots; 2) the probability P col is constant and independent of the number of collisions already suffered.
Given τ , the probability of collision P col , can be defined as follows: Finally, the term q in (2) is the probability of having at least one packet waiting for transmission in the station queue after an average slot duration.
Let us spend few words on the evaluation of q. Upon assuming that the packet interarrival times are exponentially distributed with mean 2 1/λ, the probability q can be well approximated by the following relation in a scenario where the contending stations employ queues of small sizes [9]: where E[S ts ], the expected time per slot, is useful to relate the states of the Markov chain to the actual time spent in each state. As a note aside, notice that e −λE [Sts] in (4) corresponds to the probability that zero packets are received from the upper layers when the packet interarrival times are exponentially distributed.
The other terms involved in E[S ts ] are defined as follows [2], [12]. σ is the duration of an empty time slot; P t is the probability that there is at least one transmission in the considered time slot, with N stations contending for the channel, each transmitting with probability τ ; P s is the conditional probability that a packet transmission occurring on the channel is successful; T c , T e and T s are, respectively, the average times a channel is sensed busy due to a collision, the transmission time during which the data frame is affected by channel errors, and the average time of successful data frame transmission.

III. THROUGHPUT ANALYSIS
The computation of the normalized system throughput relies on the numerical solution of the nonlinear system obtained by jointly solving (1) and (2). The solution of the system, which corresponds to the values of τ and P eq , is used for the computation of the normalized system throughput, i.e., the fraction of the time during which the channel is used to successfully transmit payload bits: whereby E[P L] is the average packet payload length, and P t · P s can be rewritten as [2]: In order to gain insights on the behavior of the aggregate throughput S, let us investigate the theoretical behavior of (5) as a function of the packet rate λ for two different values of the packet error probability P e , and minimum contention window W 0 = 32, in a scenario with N = 10 contending stations transmitting at the bit rate 1 Mbps.
The two rightmost subplots of Fig. 2 show the theoretical behavior of the throughput in (5), as well as simulation results obtained with NS2 by employing the typical MAC layer parameters for IEEE802.11b given in Table I [1]. Other parameters are noticed in the label of the figure. Let us spend a few words about the simulation setup in ns-2. In order to account for imperfect channel transmissions, the channel model is implemented using the suggestions proposed in [23], where the outcomes of a binary, equiprobable random variable are used to establish whether each packet is received erroneously. In other words, the random variable is equal to 1 with probability P e (erroneous transmission), and 0 with probability 1 − P e .
We notice in passing that the theoretical model developed is independent on the specific propagation channel. The only parameter needed is P e , which can be appropriately linked to the specific wireless propagation channel upon specifying a threshold of the signal-to-noise ratio allowing perfect reception at the receiver [24].
We adopted the patch NOAH (NO Ad-Hoc), available on the authors' website 3 , for emulating a wireless network in infrastructure mode.
The employed traffic model is implemented by generating an exponentially distributed random variable with expected value 1/λ, in accordance to the theoretical model developed in Section II.
Let us focus on the curves noticed in the two rightmost subplots in Fig. 2. Basically, there are two different operating regions of the throughput in (5). As λ → 0 + , i.e., all the contending stations approach unloaded traffic conditions, the throughput can be approximated as a straight line passing through the point (S, λ) = (0, 0): This relation follows from the theoretical throughput noticed in (5) upon approximating the probabilities P t and P s in the limit λ → 0 + .
Furthermore, as λ → 0 + , (6) can be approximated by the following relation: Upon substituting (8) in (5), the theoretical throughput can be well approximated as follows: This linear model is depicted in the subplots of Fig Moreover, the results depicted in Fig. 2 denote that the derived linear model is valid up to a critical value of λ (identified by λ c throughout the paper), above which the aggregate throughput no longer increases linearly with λ. We note in passing that, given λ c , there is no need to simulate the network to obtain the aggregate throughput: it is very well approximated by the theoretical relation derived in (9) for any Once again, let us focus on the results shown in the rightmost subplots of Fig First, rewrite the throughput in (5) as a function of τ by using the relations that define P t and P s in terms of the probability τ . Then, equate to zero the derivative of the throughput in (5) with respect to τ , and obtain a solution identified by τ m . By doing so, the value of τ for which the throughput gets maximized is easily obtained: Finally, evaluate the throughput in (5) on the solution τ m noticed in (10). Upon following these steps, the maximum throughput takes on the following form The critical value of λ acts as a transition threshold between two operating regions. In the first region, i.e., for λ ∈ [0, λ c ], the transmissions are affected by relatively small equivalent error probabilities, P eq .
In this operating region 4 , collisions among stations occur rarely (P col is small) because of the reduced traffic load of the contending stations, and the stations experience good channel quality (P e is very small).
For any λ ≤ λ c , the network is not congested, and the N contending stations are able to transmit data below the link capacity limit denoted by S m . This is the reason for which the aggregate throughput grows linearly with the traffic load λ.
On the other hand, the aggregate throughput tends to be upperbounded by S m in (11) for λ ≥ λ c . The reason is simple: the aggregate throughput in this region 5 is affected either by the increasingly effects of the collisions among the stations, or by worse channel conditions as exemplified by P e ≫ 0. Further insights on this statement can be gained by the results discussed below in connection with the curves shown in Fig. 4.
The critical value of λ can be found as the abscissa where the linear model of the throughput in (7) equates to S m in (11): The procedure for obtaining λ c , is clearly highlighted in all the four subplots of Fig. 2.
Let us investigate the behavior of the critical value λ c in (12) against some key network parameters. As long as the packet size increases, the aggregate throughput shows an increasing slope in the linear region characterized by traffic loads λ ∈ [0, λ c ], as suggested by the theoretical model in (9). Moreover, the value of λ c tends to decrease because each station tends to occupy the channel longer. The three 4 In what follows, this operating region will be identified by the acronym BLC, short for Below Link Capacity region.
lower thick curves, labeled by P L = 128 bytes, are associated to three different values of packet error probabilities, P e . Note that the value of λ c decreases for increasing values of P e , thus reducing the region characterized by small equivalent error probabilities. As long as P e → 1, both λ c and S m tend to zero, The next two subsections address separately the two optimization strategies, while Section V presents the optimization algorithm jointly implementing the two strategies.

A. Link Capacity region: Contention Window Optimization
The first optimization strategy proved to be effective for improving the aggregate throughput in the LC region, i.e., for λ > λ c . The key idea here is to force the contending stations to transmit with a probability τ equal to the one that maximizes the aggregate throughput S(λ). In this respect, the probability τ m in (10) plays a key role.
Finally, by equating (13) to τ m in (10), and solving for W 0 , we obtain the optimal minimum contention window size in terms of the key network parameters: This relation yields the value of the minimum contention window W 0 that maximizes the aggregate throughput when the number of contending stations N, the packet error rate over the channel P e , and the number of backoff stages m, are given. As a note aside, notice that, using W OP , the maximum throughput equates to the link capacity S m in (11).
Moreover, we notice that for m = 0, i.e., no exponential backoff is employed, W OP in (15) can be simplified as follows: Considering τ m as a function of N, and neglecting the multiplicative constant terms, it is simple to notice that τ m in (10) goes roughly as 1/N when N ≫ 1. Therefore, the optimal contention window W OP grows linearly with the number of contending stations N (when N ≫ 1) in order to mitigate the effects of the collisions due to an increasing number of contending stations in the network.
In the following, we present simulation results accomplished in NS-2 for validating the theoretical models, as well as the results presented in this section. The adopted MAC layer parameters for IEEE802.11b are summarized in Table I  Notice also that the value of λ c is independent from the minimum contention window chosen.
The key observation from the subplots of Fig. 2 concerns the fact that the aggregate throughput of the optimized network can be modeled as follows: As emphasized by the curves in Fig. 2, this model shows a very good agreement with both theoretical and simulation results. Once again, notice that the aggregate throughput may be predicted quite accurately without resorting to simulation.
Let us focus on the results shown in Fig. 6 The saturation throughput in each simulated scenario reaches a maximum corresponding to the abscissas W 0 = W OP predicted by (15) and noticed beside each maximum. We notice that W OP tends to be quite insensitive from the packet error rate P e , whose main effect corresponds to a reduction of the maximum achievable throughput.

B. Below Link Capacity region: Payload Size Optimization
The analysis of the aggregate throughput in Section III revealed the basic fact that for traffic loads λ less than λ c , the network is not congested, and each station achieves a throughput roughly equal to E[P L] · λ (the aggregate throughput is thus S(λ) = N · E[P L] · λ). We note in passing that the throughput does not depend on the minimum contention window W 0 in the LC region. Therefore, given N contending stations, the throughput can only be improved by increasing the payload size E[P L] when the traffic load satisfies the relation λ ≤ λ c .
Before proceeding any further, let us discuss two important issues in connection with the choice of the packet size E[P L].
As long as the erroneous bits are independently and identically distributed over the received packet 6 , the packet error probability P e can be evaluated as where, and In the previous relations, MACh and P HY h are, respectively, the sizes (in bits) of the MAC and PLCP 7 headers, and E[P L] is the size of the data payload in bits. Equ. (18) accounts for the fact that a packet containing the useful data, is considered erroneous when at least one bit is erroneously received. Relation (16) is obtained by noting that a packet is received erroneously when the errors occur either in the PLCP part of the packet, or in the information data.
We notice that the relations (16) through (18) are valid either with the use of convolutional coding, whereby the bit error rate performance does not depend on the code block size [24], or for protocols that do not employ channel encoding at the physical layer.
From (18) it is quite evident that the higher the payload size, the higher the packet error rate; and viceversa. As a note aside, we notice that this behavior does not hold when concatenated convolutional channel codes [25]- [27], as well as low-density parity-check codes, are employed as channel codes. Indeed, for these codes the packet error rate depends on the size of the encoded block of data, with longer packets having smaller probability of error compared to shorter packets.
The second issue to be considered during the choice of E[P L] is related to the critical value λ c , which depends on the packet error probability (P e defined in (16)), and consequently on the payload size. Given a traffic load λ, any change in E[P L] could affect the network operating region, which might move from the BLC region to the LC region. 6 We notice that wireless transceivers make use of interleaving in order to break the correlation due to the frequency selectivity of the transmission channel [24]. 7 PLCP is short for Physical Layer Convergence Protocol.
Let us discuss a simple scenario in order to reveal this issue 8 . Consider a network (identified in the following as scenario A) where N = 10 contending stations with traffic load λ = 8 pkt/s transmit packets of size E[P L] = 1024 bytes. Assume that the bit error probability due to the channel conditions is P b = 10 −5 , which corresponds to a packet error rate P e = 8.248 · 10 −2 (from (16)). Upon using the network parameters summarized in Table I, the critical load in (12) corresponds to λ c = 9.61 pkt/s. Since λ < λ c , the network is in the BLC operating region. If the stations increase the payload size up to E[P L] = 2048 bytes, the packet error rate increases to the value P e = 1.546 · 10 −1 , with the side effect of decreasing λ c to 4.71 pkt/s. Therefore, for the given traffic load λ = 8 pkt/s, the network starts operating into the LC region.
Based on the considerations deduced in the scenario A, the proposed optimization technique aims to optimize the payload size in two consecutive steps. In the first step, we find the size of the payload in such a way that the critical threshold λ c equals the actual traffic load λ, in order for the network not to operate beyond the BLC region.
The second step verifies whether the packet error rate associated to this payload size, is below a predefined PER-target (identified by PER t ), which defines the maximum error level imposed by the application layer. First of all, given an estimated bit error probability at the physical layer, solve (18) for E[P L]. Then, solve (16) for 1 − P e (DAT A), and substitute the relation in place of 1 − P e (DAT A).
Considering P e =PER t , the following maximum payload size follows: whereby ⌈·⌉ is the ceil of the enclosed number.
Let us consider again the scenario A discussed previously with the application of this algorithm. Consider 10 stations transmitting packets of size E[P L] = 1024 bytes at the traffic load λ = 5 pkt/s. Assume that the bit error rate imposed by the specific channel conditions is P b = 10 −5 , yielding P e = 8.248 · 10 −2 and λ c = 9.6 pkt/s. Moreover, assume a target PER equal to 9 PER t = 8 · 10 −2 .
Since λ < λ c , after the first step, the algorithm selects the optimal size E[P L] * 1 = 1938 bytes, which moves the working point near the link capacity and leads to the actual packet error rate P e = 1.47 · 10 −1 .
Since the constraint P e ≤PER t is not satisfied, the proposed method estimates the size E[P L] in order to attain the PER t constraint. The packet size becomes eventually E[P L] * 2 = 991 bytes (from (19)), yielding a packet error rate P e ≃ 8 · 10 −2 and a λ * c = 9.92 pkt/s, thus leaving the working point in the BLC region.
Finally, the optimal payload size is: where P L max = 2312 bytes is the maximum packet size imposed by the standard [1].
Simulation results of a sample network employing the algorithm described above, are presented in the next section, along with a sample code fragment summarizing the key steps of the optimization technique.

V. SIMULATION RESULTS
In this section, we present simulation results for a network of N = 10 contending stations, employing the optimization strategies described in Section IV.
The basic steps of the proposed optimization algorithm are summarized in Table VI The evaluation of the critical value λ c in (12) requires the estimation of three key parameters of the network: the number of contending stations N, the packet error rate P e , and the value of the optimal τ m , which depends on N. Each station can estimate the number of contending stations by resorting to one of the algorithms proposed in [28]- [30]. On the other hand, the packet error probability P e , may be evaluated through (16), once the bit error probability P b at the physical layer is estimated. We recall that P b can be estimated by employing proper training sequences at the physical layer of the wireless receiver [24].
Finally, the value of the optimal W OP can be evaluated by each station with the parameters N and P e .
A similar reasoning applies for the estimation of the optimal packet size.
We have realized a C++ simulator implementing all the basic directives of the IEEE 802.11b protocol with the 2-way handshaking mechanism, namely exponential backoff, waiting times, post-backoff, and so on. In our simulator, the optimization algorithm is dynamically executed for any specified scenario. For the sake of analyzing the effects of the optimization, the instantaneous network throughput is evaluated over the whole simulation. The aggregate throughputs obtained in the investigated scenarios are shown in Simulation results show that the proposed algorithm guarantees improved throughput performance on the order of 160 kbps when 10 stations are active, and about 400 kbps when only 5 stations contend for the channel. We notice in passing that, despite the optimization, the aggregate throughput could not reach the maximum S m because of the low traffic load. Indeed, the capacity link S m could be achieved by using a packet size longer than either the one imposed by the standard [1], and the value obtained from (19).
For the sake to verify that the optimization of the minimum contention window does not affect the aggregate throughput in the BLC region, Fig. 7 also shows the aggregate throughput obtained by simulation using a minimum contention window equal to W OP . Notice that the related curve is superimposed to the one related to the scenario in which the contending stations employ the minimum contention window W 0 = 32 suggested by the standard [1].

VI. CONCLUSIONS
This paper proposed an optimization framework for maximizing the throughput of the Distributed       (7), while the horizontal line corresponds to Sm noticed in (11). Dashed lines, labeled Thr, refer to the theoretical throughput in (5), while dash-dotted lines labeled NS2 identify the simulation results obtained with ns-2.