Dynamic tuning of the IEEE 802.11 distributed coordination function to derive a theoretical throughput limit

IEEE 802.11 is the most popular and widely used standard for wireless local area network communication. It has attracted countless numbers of studies devoted to improving the performance of the standard in many ways. In this article, we performed theoretical analyses for providing a solution to the maximum throughput problem for the IEEE 802.11 distributed coordination function, and an algorithm using a binary cubic equation for obtaining a much closer approximation of the optimal solution than previous algorithms. Moreover, by studying and analyzing the characteristics of the proposed algorithm, we found that the effects of backoff counter consecutive freeze process could be neglected or even disregarded. Using the NS2 network simulator, we not only showed that the proposed theoretical analysis complied with the simulated results, but also verified that the proposed approach outperformed others in achieving a much closer approximation to the optimal solution


Introduction
Advances in wireless communication technology have increased the demand for wireless networks. The IEEE 802.11 standard [1] defines the specifications for medium access control (MAC) and the physical layers in a wireless local area network (WLAN). The IEEE 802.11 standard provides two mechanisms for the MAC protocol: the point coordination function (PCF) and the distributed coordination function (DCF). The PCF utilizes a basic access mechanism that supports contention-free services. Therefore, the PCF requires a base station that coordinates channel access among nodes. On the other hand, the DCF utilizes an access mechanism that supports contention-based services. The DCF access mechanism dictates that all the nodes should randomly access channels using the carrier sense multiple access/collision avoidance (CSMA/CA) mechanism. This mechanism employs the acknowledgment (ACK) feature to detect transmission failures. In other words, if an ACK response is not received, it is assumed that packet transmission has failed. The nodes wait for an interframe space (IFS), and then invoke the binary exponential Backoff algorithm, which uses a uniform random distribution called a contention window (CW) to generate a random Backoff value within the range of [0, CW -1].
In this study, the initial value of CW is set to CW min (the minimum CW). Subsequently, the CW value is doubled when packet transmission fails. For a node to obtain a Backoff value, it must first determine whether the channel is in use. If the channel is not busy, then the Backoff value decreases by 1 in every time slot and the node transmits the data when the Backoff value reaches zero. However, if the channel is busy, then the Backoff counter freezes. When the channel is in an idle state, it waits for a DCF IFS (DIFS) time period after which the Backoff value begins to decrease again. If the packet transmission continues to fail, then the CW value increases to CW max (the maximum CW); when the node receives an ACK packet, CW is reset to CW min . If a node receives an error packet, it must wait for an extended IFS (EIFS) time period. Then, the node determines again whether the channel is in an idle state. If it is, then after a DIFS time, the Backoff value decreases by 1 after each idle slot.
Currently, the methods of improving Backoff performance can be divided into two categories: (1) adjusting the CW size according to the number of times that collisions have occurred [1][2][3], and (2) dynamically adjusting the CW size by detecting changes in the network environment [4][5][6][7]. In the first type of method, the adjustment of CW size only occurs after a collision; the consequences are that the cost for collision must first be paid before the method can find the most appropriate CW size, and that this entire process is repeated when the data are transferred successfully. In contrast, the second type of method immediately adjusts to the most appropriate CW size when network environment changes are detected. Therefore, such a method has the ability to find the appropriate CW size without the cost of collision, and clearly outperforms the first type of method in many ways. For the reasons mentioned above, this article proposed an algorithm called the dynamic contention window (DCW) algorithm by adopting the second approach. Unlike other algorithms, DCW uses a binary cubic equation that has the ability to quickly and efficiently calculate the most appropriate CW size according to the network environment.
The rest of this article is organized as follows. Previous related work is presented in Section 2. Various theoretical analyses are performed in Section 3. The proposed DCW algorithm and consecutive freeze process (CFP) analysis are presented in Section 4. Simulations and performance evaluations of our proposed algorithm are conducted in Section 5. Finally, we conclude our work in Section 6

Related work
To the best of our knowledge, most studies on performance analysis of IEEE 802.11 MAC protocols use the results presented in [4] for their theories or discussions [8][9][10][11][12][13].
The following equation is derived from the analytic work in [4]: where M is the total number of nodes in the network, the t slot the total duration spent in a time slot, and p is the Backoff value sampled from a geometric distribution with parameter p. First, we use (1) to solve E[Idle], which we then substitute into (2) to solve p. Using this value of p, we can derive the value of parameter p for the geometric distribution from the Backoff value of maximum throughput.
When solving (1) and (2), an optimal solution cannot be solved directly; instead, a numerical method is needed to approximate the optimal solution. Therefore, the effectiveness of this method is fully dependent on how fast the numerical method can find the approximation of the optimal solution. Additionally, ref. [4] assumes that the values of E[Coll] and E[N c ] in (1) and (2) can be derived by measuring the network condition. Unfortunately, this is not entirely true in practice. There is no collision detection capability due to the characteristics of the wireless networks.
Based on the solutions of (1) and (2) and by observing the solution while solving the value of p, the values of E [N c ] and E[Coll] mostly remain constant [4]. Therefore, (1) can be further simplified as follows: where Φ(Idle, N c ) is a constant. Although (3) can be used to replace (1), a numerical method is still needed for this equation to approximate the optimal solution. The performance of this approach is fully dependent on the efficiency of the numerical method when finding the approximation of the optimal solution. Therefore, to save the time consumed by the numerical method, we propose a binary cubic equation with the ability to obtain a much closer approximation of the optimal solution in less time.

Analysis of proposed method
In this study, we assume that (1) each node is in a saturated condition (i.e., always having a packet to transmit) and (2) the channel is error-free. Packet loss is caused solely by collisions in the process of packet transmission. The hidden terminal problem is not considered in this article.

Analysis of collision probability
First, we divided the timeline into discrete time slots, where the probability of transmission for each time slot is equal to τ, in accord with [14,15]. Therefore, τ = 2/E [CW], where E[CW] is the expected value of the CW. Suppose that there are M nodes in the network, where τ x (x = 1,2,...,M) is the probability of transmission for node x in each time slot, ACK x (x = 1,2,...,M) is the number of ACK packets successfully received by each node, and Coll x (x = 1,2,...,M) is the number of packets that do not receive ACK. The collision probability can then be defined as follows: Each time slot can be classified into three states: idle (no data transmission), successfully transmitted, and collision. Therefore, the probability of each state can be calculated as follows.
The probability of an idle time slot is calculated as (5) and referred to as P i : The probability of a successfully transmitted time slot is calculated as (6) and referred to as P s : The probability of a collision time slot is calculated as (7) and referred to as P c : Because collision only occurs when there are at least two nodes simultaneously transmitting data in a single time slot. Therefore, we define k as the average number of nodes involved in a collision, where k can be calculated as follows: Therefore, the value of Coll x for all the nodes involved in a simultaneous data transmission is incremented by 1. Hence, when a collision occurs in a time slot, it is necessary to calculate the average number of nodes involved in the collision to facilitate calculation of the collision probability P c . In addition, the collision probability in (4) can be rewritten using (5)-(8): By dividing the numerator and denominator, respectively, by the total number of time slots in the network (referred as total_slot), (4) can be represented by the probabilities P s , P i , and P c . In other words, if there are three simultaneous data transmissions, the time slots will collide and each of the three nodes involved in this collision will increase their Coll x value by 1. However, P c represents the collision probability that occurs in a time slot. Therefore, when a collision occurs in a time slot, we calculate the value of k, which represents the average number of nodes involved in simultaneous data transmissions during that time. Therefore, When the system converges into a stable state, we assume that τ 1 = τ 2 = τ 3 = ... = τ M = τ. Hence, we can rewrite (5), (6), and (7) as follows.
The probability of an idle time slot is calculated as (10) and referred to as Pi: The probability of a successfully transmitted time slot is calculated as (11) and referred to as P s : The average number of nodes involved in simultaneous data transmission during a collision is given as follows: We then substitute (10), (11), and (12) into (9) and derive the collision probability as follows: In (13), the collision probability can be calculated using the total number of nodes, M, and the probability of transmission, τ, during a time slot under conditions of a fully utilized throughput environment. The result of (13) also shows that it is easy to calculate and analyze the collision probability.

Analysis of maximum throughput
According to [14], throughput is defined as follows: where payload is the time spent to transmit data, t slot is an idle slot time (aSlotTime), and t success is the time spent to transmit a packet successfully. Notably, t success = DATA + SIFS + ACK + DIFS when the algorithm does not utilize the RTS/CTS method. Furthermore, t coll is the time spent during packet collision, and t coll = DATA max + DIFS when the algorithm does not utilize the RTS/CTS method. DATA max is the maximum waiting time when a packet collision occurs. Most other studies have assumed that DATA max is equal to DATA. However, according to the IEEE 802.11 standard presented in [1], nodes involved in a collision must wait for one more EIFS in addition to DATA. Hence, this article assumes that DATA max = DATA + EIFS × (M -k)/M, where M is the total number of nodes in the network and k is the average number of nodes involved in simultaneous data transmissions. This assumption makes it clear that there are k nodes on an average that are busy transmitting data, and that the transmission nodes are unable to receive any other packets from other nodes. Therefore, because the transmission nodes need not wait for another EIFS, the number of transmission nodes must be deducted from the equation.
By substituting (7), (10), and (11) into (14) and simplifying, we get the following: To solve the maximum throughput, we differentiate τ in (15) (as shown in Appendix A). To reduce the complexity of solving the maximum throughput, we assume that t coll is a constant. This gives us the equation below: The right-hand side of (16) assumes a value between 0 and 1 because t coll >t slot . The left-hand side of (16) is equal to 1 when τ = 0; however, it is 0 if τ = 1/M. When 0 <τ < 1/M, the left-hand side becomes a decreasing function that varies between 1 and 0. Therefore, the optimal solution for τ can be obtained.
The Abel-Ruffini theorem (also known as Abel's impossibility theorem) [16] states that there is no general algebraic solution to polynomial equations of the fifth degree or higher. For this reason, an algebraic solution is impossible with (16) when M is greater than 5. Therefore, with the network parameters provided in Table 1 we adopt a numerical method to solve (16) while all nodes in the network are transmitting constant length data packets, and observe the relation between the CW (2/τ) and M.
In Figure 1, the x-axis represents the number of nodes, the y-axis represents the CW (2/τ), and the numbers 500, 1500, and 2312 represent constant packet sizes in bytes. Figure 1 clearly shows that the relationship between the CW (2/τ) and M is linear (other packet size have the same linear relationship). Therefore, we conducted regression analyses to solve the relationship between the CW (2/τ) and M, the results of which are shown in Table 2. (The results of different packet sizes are illustrated in Appendix C.) In Table 2 the value of R 2 is almost equal to 1. This verifies that the result of the regression analysis is almost consistent with the solution of (16).
The results of Appendix C indicate that different packet sizes lead to different results for regression analysis. Figure  2 shows the relationship of the packet size to the firstdegree coefficient and the constant in Appendix C.
In Figure 2, the x-axis represents the length of the packet, and the y-axis represents the first-degree coefficient and the constant. The curves for the coefficient of M and constant represent the first-degree coefficients and the constant, respectively. The results of Figure 2 clearly show that the packet length is linearly related to both the first-degree coefficient and the constant term. Therefore, by applying quadratic regression analysis to Figure 2, we obtained the coefficients of determination for the coefficients of M and the constant term in Table 3.
As shown in the table, the R 2 values are both greater than 0.975. This implies that the quadratic fit to the results in Figure 2 is good. In order to obtain the CW size of maximum throughput, we must first substitute the packet length into Table 3 to solve the number of nodes and the coefficients of the linear equation of the CW, and then substitute the number of nodes into the target linear equation. We thereby obtain the CW size of maximum throughput. Therefore, in the next section, we propose the DCW algorithm.

DCW algorithm
In order to achieve maximum throughput with the analyses from Appendix C and Table 3 with the network environment parameters presented in Table 1 we combined the equations from Appendix C and Table 3 into (17). Here, the size of the CW is strongly related to the number of nodes (M) and the packet length (X).
In (17), we only need to substitute the packet length into X and the number of nodes into M to obtain the CW size of maximum throughput.
The proposed DCW algorithm (DCW) is shown in Figure 3.
When transmitting data using DCW, it is called upon to obtain the Backoff value regardless of the success or failure (data retransmission required) of data transmission. After each aSlotTime, the Backoff Time reduces an aSlotTime, and if the medium is busy during an aSlotTime, the reduction of an aSlotTime from Backoff Time is stopped until the medium is once again idle. When the medium becomes idle, it must wait for a DIFS time before continuing the countdown of the Backoff Time. The countdown goes on until the Backoff Time reaches 0, after which data transmission begins.
There have already been many methods proposed by other authors to estimate the number of nodes in the network [17,18], by applying these methods in the proposed DCW. DCW is then suitable for network environments in which the number of nodes changes dynamically.

Backoff counter CFP
In IEEE 802.11, when a node completes its data transmission, it obtains another Backoff value via the Backoff procedure before it starts another round of data transmission. If the Backoff value obtained from the Backoff procedure is 0, it indicates that the node that has a Backoff value of 0 may transmit data packets immediately without reducing its value, while it also indicates that other nodes may not reduce their Backoff values. However, a transiting node that consecutively obtains a Backoff value of 0 will result in all other nodes to freeze their reduction in the Backoff procedure. This type of phenomenon is referred to as a Backoff Counter CFP [15,19].
The occurrence probability of CFP is determined by the number of nodes and the CW size. There are two conditions in CFP. First, if a node successfully transmits its data packets, the CFP occurrence probability is 1/  CW because only one node may obtain a Backoff value of 0 (condition (1)). Second, if multiple nodes transmit data packets simultaneously, the average CFP occurrence probability is 1 -(1 -1/CW) k (when a collision occurs, k is the average number of nodes that participates in the collision) (condition (2)). This is because there are k nodes on average trying to transmit data packets simultaneously, and hence k nodes on average may obtain a Backoff value of 0. The DCW did not take the phenomenon of CFP into consideration during the analysis process. This is because the occurrence probability of CFP is very low in DCW; in particular, when the number of nodes increases, the occurrence probability of CFP declines. In DCW, CW = C1 * M + C2, where M is the number of nodes, C1 and C2 are constants (8.5 <C1 < 16.3; -9.8 <C2 < -7.9), and the range of packet lengths is 1-2312 bytes. Therefore, when the number of nodes increases, the CW also increases in concert. Yet the occurrence probability of CFP in condition (1) decreases when the number of nodes increases. As for the occurrence probability of CFP in condition (2), the k nodes on average that participate in a collision must be used for the analysis. Thus, we set the value of M in (9) to be a value that approaches infinity, and then check whether k approaches a constant value.
In (18), e denotes a natural number. The detailed proof is available in Appendix B. From (18), the value of k approaches a constant value as the number of nodes increases. Figure 4 uses the network environment parameters presented in Table 1; x-axis represents the number of nodes, y-axis represents the k value, and the numbers 500, 1500, and 2312 represent packet sizes in bytes. The results of different packet lengths are presented in Appendix C.
From the results obtained from Appendix C and Figure 4, the range for k is 2-2.081. This is because shorter the data packet length, the larger the value of k. However, it is impossible to have a data packet less than 1 byte. Therefore, the maximum value of k is the same as the data packet length of 1 byte. Therefore, the occurrence probability of CFP in condition (2) is less than 1 -(1 -1/CW) 2.81 , although CW increases as the number of  nodes increases where the occurrence probability of CFP in condition (2) becomes increasingly smaller. From the above analysis on the occurrence probability of CFP, the occurrence probability of CFP is very low when using the DCW method. This also implies that in situations where the number of nodes propagates, the impact of CFP may be neglected.

Environmental settings
In this article, we use NS2 [20] as the simulation tool and use the network environment parameters presented in Table 1 as simulation parameters. Each simulation runs for 100 simulated seconds. The simulation uses the normalized throughput indicated in (14)

Different data packet lengths
We are currently using DCW and different data packet lengths to verify the analyses of (9) and (14). In Figure 5, the x-axis represents the number of nodes, y-axis represents the collision probability, and the numbers 500, 1500, and 2312 are the numerical results for the corresponding packet sizes in bytes substituted into (9), and 500, 1500, and 2312 are the simulation results for the corresponding packet sizes in bytes. The different data packet lengths show similar results, as shown in Figure 5. CW is an integer, and it is essential to round 2/τ off to an integer. For this reason, the analysis results show non-smooth characteristics. The results of Figure 5 show that the simulated and analytical results are very close.
In Figure 6, the x-axis represents the number of nodes, y-axis represents the normalized throughput, and the numbers 500, 1500, and 2312 are the numerical results for the corresponding packet sizes in bytes substituted into (14), and 500, 1500, and 2312 are the simulated results using the corresponding packet sizes in bytes. The different data packet lengths show similar results, as shown in Figure 6. CW is an integer, and it is essential to round 2/τ off to an integer. For this reason, the analysis results also show non-smooth characteristics. The results of Figure 6 show that the simulated and analytical results are very close.

Comparison between different algorithms
We compare DCW with other algorithms to verify that the DCW is able to provide a relatively close approximation to the maximum throughput. In order to show the differences in IEEE 802.11 + [4] and DCW, the scale for the y-axis in Figure 7a, c, e (DCF versus DCW) as well as Figure 7b, d, f (IEEE 802.11 + versus DCW) is different. IEEE 802.11 + is very close to the maximum throughput; however, by narrowing the distance between the y-axis scale spans, we can clearly see that the DCW provides an even closer approximation to the maximum throughput than IEEE 802.11 + .
In Figure 7, the xand y-axes represent the number of nodes and the collision probability, respectively. The DCF curve uses the standard IEEE 802.11 algorithm, and the curve for IEEE 802.11 + uses the algorithm presented in [4] where the number of nodes is known. Similar results are obtained for different packet lengths, as shown in Figure 7. From these results, the collision probability is lower in DCW than in the other two algorithms. The DCF shows lower collision probability only when the number of nodes is between 2 and 4.
In Figure 8, the xand y-axes represent the number of nodes and the normalized throughput, respectively. The   DCF curve uses the standard IEEE 802.11 algorithm, and the curve for IEEE 802.11 + uses the algorithm presented in [4] where the number of nodes is known. Similar results are obtained for the different packet lengths, as shown in Figure 8. From these results, the normalized throughput is higher in DCW than in the other two algorithms. Although IEEE 802.11 + and DCW show similar results when the packet lengths are 1500 and 2312 bytes, DCW still shows relatively high normalized throughput. Using the t distribution and under 99% confidence level, the DCF experiments sampling error for 500, 1500, and 2312 bytes is within ± 0.413%, ± 0.556%, and ± 0.768%, respectively, and the IEEE 802.11 + experiments sampling error for 500, 1500, and 2312 bytes is within ± 0.664%, ± 0.669%, and ± 0.678%, respectively.

Conclusions
In this article, we take the influence of EIFS into consideration whereas previous literatures did not. In doing so, we are able to provide analysis results that are much closer to simulated results. An observation of the results clearly indicates that the influence of EIFS should not be ignored. Moreover, this article also proposes an algorithm that is distinct from others that only use numerical methods. This algorithm is able to find the CW size of maximum throughput immediately by substituting the packet length and number of nodes into a binary cubic equation. From the mathematical analyses provided in this article, it is shown that the influence of CFP is extremely small or even negligible using proposed algorithm.
For studies in the near future, other parameters of network environments can be considered for multidimensional experiments. For example, different values for DataRate can be used for a more realistic wireless network environment.
From the results of (B5), when the number of nodes approaches infinity and DCW is used, k approaches a constant value. Table 1 and packet size in the range of 1-2312 bytes. When solving the relationship between contention window (2/τ) and M, we obtain the results presented in table 4 using regression analysis, where lim