Optimal Back-Off Distribution for Maximum Weighted Throughput in CSMA

We consider a generalized version of Carrier-Sense Multiple Access (CSMA), where the contention window size is a constant and the back-off probability distribution can be varied. We address the optimization of a weighted throughput metric, identifying the optimal back-off Probability Density Function (PDF). We give a simple fixed-point algorithm to compute the optimal PDF and prove that the solution is unique. The weighted throughput definition caters for aspects other than the mere channel utilization. It reduces to plain utilization (normalized throughput) when all weights are equal to 1. We also reconnect our result to the classic analysis of saturated non-persistent CSMA, as introduced in the seminal paper by Tobagi and Kleinrock, proving formally that the modeling assumptions of that work, that lead to a Geometric PDF of back-off, actually correspond to the throughput-optimal choice, provided that the ratio of the Geometric PDF is suitably chosen.


I. INTRODUCTION
A LOT of interest has been given to scalable MAC approaches able to present good performance in cases where high node density needs to be supported or where nodes send sporadic, but relevant communication due to some sensed activity, so needing to maximize their success probability.
Carrier-Sense Multiple Access (CSMA) holds a prominent position in the arena of MAC protocols, having been adopted as the primary basis for the channel sharing procedure by most versions of WiFi, by sensors networks (e.g., IEEE 802.11ah), by vehicular networks (e.g., IEEE 802.11p/bd), and RFID networks.Optimizing CSMA algorithms has been intensely investigated.
Quite interesting contributions based on CSMA/CA techniques for WSN or RFID systems [1], [2] have been proposed.Some extensions of these techniques have been integrated into industrial delay-sensitive control networks, monitoring applications, IoT over WiFi or vehicular networks [3], [4], [5], [6].A recent trend about MAC strategies is focusing on protocols where contending nodes do not change the Contention Window (CW) after collisions, but rather dynamically change the contention probability to improve the success probability or the throughput [7], [8].Even in this case, it is crucial to set carefully the CW size and the contention probability.Both the performance and the optimized CW size of these approaches can be too sensitive to the number of nodes, making them suitable for limited communication range and low deployment densities, but not performing well in massive high-density scenarios.
To face these problems, CSMA back-off policies based on a slotted fixed window with uniform and non-uniform attempt probability distributions have been proposed in [1], [8], [9], and [10].
Throughput and delay performance of these approaches are almost independent of the number of contenders, achieving simplicity and good throughput under both low and high contention levels, so promoting these techniques as suitable for massive IoT and high-density WSN [11].
In this paper we derive the optimal back-off Probability Density Function (PDF) of a CSMA protocol with fixed contention size so as to maximize a notion of generalized weighted throughput, which reduces to plain channel utilization (also referred to as normalized throughput in the following) when all weights are equal to 1. Specifically, the optimal PDF is derived for the case where all contention slots are uniformly weighted, which leads to the classic notion of normalized throughput, and under the condition where slots can have different weights to match different application contexts.As a matter of example, energy-constrained scenarios require to reduce the contention time, and this is obtained by weighting more lower index back-off slots, i.e., stations get a higher reward if access is attempted early.To the best of our knowledge, no work focused on the optimal PDF able to maximize the (weighted) throughput.
We define a unified framework, encompassing limited contention window size (so called 'no skip' option) as well as the possibility of having unlimited contention window size ('skip' option).We derive a fixed point algorithm yielding the optimal back-off PDF under any contention window size, and any set of weights.It is proved that the fixed point iteration converges to a unique solution.
We also reconnect our result to the classic analysis of saturated non-persistent CSMA, as introduced in the seminal paper by Tobagi and Kleinrock [12], proving formally that the modeling assumptions of that work, that lead to a Geometric PDF of back-off, actually correspond to the best possible choice (i.e., the one maximizing channel utilization), provided that the ratio of the Geometric PDF is suitably chosen.
The paper is organized as follows.Section II reviews the related literature.Our proposed system model along with the main assumptions and notation is detailed in Section III.Section IV presents main results, stating the fixed-point algorithms with uniform and not uniform weighted throughput.Numerical and simulation results are given in Section V. Finally, conclusions are presented in Section VI.Mathematical details and proofs are postponed to a dedicated Appendix.

II. RELATED WORK
Many works have been proposed in literature to consider scalable MAC strategies able to maintain good performance even under high-density network scenarios [13], [14].Some of these works considered also situations where it is hard to get accurate estimates of node density due to multiple network events such as link-failures, node mobility, sleep mode strategies [15].In these cases, knowing theoretical bounds on MAC performance in terms of throughput can be a key point, especially to compare or integrate different technologies such as new generations of wireless interfaces (WiFi) [16], [17], [18].
CSMA plays a prominent role in the realm of wireless multiple access.Several variants of CSMA have been employed, e.g., CSMA with Collision Avoidance (CSMA/CA) is the cornerstone of the MAC protocol defined for the WiFi.Variants of the basic CSMA/CA are also used in sensor networks (e.g., IEEE 802.15.4) or RFID networks [9], [19].The success of CSMA and the ensuing wide availability of low-cost chipsets is a strong motivation to continue referring to this technology, while trying to improve its performance especially with growing number of nodes.
Analysis and optimization of throughput in CSMA networks has been intensely investigated, since the seminal paper of Tobagi and Kleinrock [12] and the analysis of CSMA/CA in Bianchi's work [20].Also more general optimization problems have been addressed, e.g., optimization of throughput and energy consumption [14], [21].
Two major approaches can be identified to the optimization of CSMA throughput.
A first group of works follows the CSMA/CA approach and propose ways to set the contention window size to optimize the throughput, while the back-off probability distribution is uniform [19], [22], [23], [24], [25], [26], [27], [28].An adaptive algorithm to tune the contention window size to its optimal value is given in [24].The proposed algorithm is consistent with IEEE 802.11CSMA/CA.It is based on the estimate of the number of consecutive idle back-off slots between two consecutive packet transmissions.Optimal throughput is achieved by properly setting the target contention window size, as a function of the number of contending stations.Other adaptation algorithm for setting the contention window size at an optimal level are given in [25] and [26].More recently, machine learning and reinforcement learning approaches have been considered as well, to adapt the contention window size of CSMA/CA in IEEE 802.11 and thus to steer the protocol towards optimized performance, e.g., see [27] and [28].Summarizing, the first group of works generally follows a Distributed Coordination Function (DCF)-like CSMA/CA approach.They adjust the initial backoff window size or control the amount of traffic entering the network, by proposing some modifications to the scheme implemented by the IEEE 802.X families.This strategy is notoriously short-term unfair, with long transients before reaching convergence and too sensitive to the number of nodes [16], [18].These impairments make these approaches generally useful for limited communication range and low deployment densities, but not in massive highdensity scenarios.In addition, they do not relate the access parameters to the optimization metrics in a straightforward way prone to flexible optimized solutions.
An alternative approach, closely related to the variable contention window size optimization, is state the CSMA model in terms of transmission probability of a backlogged node.Then, the transmission probability is set so as to optimize the throughput [20], [29], [30], [31].A key assumption of those works is that the attempt rate of all other nodes from the point of view of a tagged node is a constant.This assumptions is consistent with assuming that a Geometric probability distribution of the back-off duration.
Calì et al. [29] analyze CSMA from the standpoint of throughput.They propose replacing the uniform-distribution contention window of 802.11 with a p-persistent back-off protocol [29].By estimating the population size, they maximize system throughput when all nodes always have a packet ready for transmission.They show that 802.11 yields sub-optimal throughput under this workload.A fixed point equation yielding the optimal transmission probability is determined in [20].There is a strict connection between the optimal transmission probability τ * and the optimal contention window size W * , at least in a symmetric case (statistically equivalent nodes).Namely, τ * = 2/(1 + W * ) relates the expressions of the saturation throughput obtained in the two cases.
A second group of works considers a fixed contention window size and tries to find suitable back-off probability distributions to improve CSMA performance [8], [9], [11], [32], [33], [34].Cai et al. [32] propose a polynomial distribution for non-persistent CSMA contention slot selection.Their distribution is optimal over the space of all polynomial functions, whereas ours is optimal over the space of all probability density functions.An in-depth analysis of the fixed point equation yielding the optimal transmission probability of CSMA is presented in [30] and [31].This works follow the classic model of CSMA/CA, where it is assumed that a backlogged station attempts transmission with a fixed probability after sensing an idle back-off slot, i.e., the probability distribution of back-off is Geometric.While the optimal transmission probability is found, there is no proof that the Geometric PDF of back-off need necessarily be the best choice for throughput.In [8] a non-uniform CSMA distribution able to reduce the latency for the delivery of event reports has been proposed.The scheme needs to estimate the total number of contenders in the network and is not optimal in terms of throughput.In [9] authors propose a Geometric Distribution Reader Anti-collision (GDRA) where RFID readers used a truncated geometric distribution function to select a contention slot, instead of the typical uniform distribution function.Also approaches merging contention window adaptation (or robustness to such a change) and non-uniform PDFs have been proposed.Authors in [33] propose a priority control method using non-uniform backoff probability density to accommodate different performance metrics, such as latency or throughput, based on the application requirements.A Binary Exponential Backoff (BEB) has been applied in [34], where nodes intelligently determines overlapped contention slots and probabilistically minimizes their selection chances.Authors replace the classical uniform distribution in the BEB with a dynamic non-uniform distribution, able to increase the system throughput also reducing the delay for increasing number of stations.In [11] a slotted non-persistent CSMA/CA with nonuniform contention probability distribution has been proposed, designed to reduce at the same time latency of contenders and preserve a high successful access probability.It is shown to be insensitive to the number of contenders and very robust with respect to contention window size, packet length, and impairments such as frame synchronization errors.
The examined works give useful insights into the need to devise CSMA/CA strategies able to manage different targets in a flexible way, and the possibilities provided by non-uniform probability densities to pursue this goal.
Our work belongs to this second group of approaches.In a nutshell, our model and analysis can accommodate a family of metrics wider than the traditional channel utilization, providing the optimal PDF through a simple fixed point algorithm.Noticeably, we highlight that the optimality results we obtain are new even under the scope of traditional normalized throughput.
More in dept, a general framework is defined for a CSMA network, where the back-off probability distribution can be arbitrary, while the contention window size is fixed.We cover both the cases of a finite contention window size and inifinite size.The latter is obtained by introducing a model parameter (the skip variable), that allows the contention window size to extend without limits.We use the back-off probability distribution as the degree of freedom to optimize CSMA throughput, providing a fixed point algorithm to compute the optimal back-off PDF for each given number of contending stations.Our general framework also solves a long-standing issue, i.e., we can prove formally the optimality of the widely used Geometric PDF for back-off.Moreover, it lends itself to encompass in a unique optimization framework additional requirements to be traded-off with respect to throughput optimization, thanks to the notion of weighted throughput.We present an example of this feature of our modeling approach in Section V-B.Those are the main new contributions that we propose, with respect to existing literature.

III. SYSTEM MODEL AND ANALYSIS
In this section we introduce the modeling assumptions and the notation used in the paper (Section III-A).Then, we derive the expression of the saturation throughput in Section III-B, introducing a notion of weighted throughput that generalizes the usual normalized throughput definition.
The main result of the paper, the derivation of the PDF of back-off countdown that maximizes the weighted throughput, is presented in Section IV.

A. Assumptions and Notation
The considered CSMA framework is a generalization of non-persistent CSMA, where a general PDF for the backoff count is allowed, i.e., the number of back-off slot times to be counted down by a backlogged contending station is drawn according to a general PDF, to be defined according to a specific target, e.g., throughput maximization.
We consider n stations sharing the wireless channel, and we make the usual assumptions established since Bianchi's seminal work [20]: • stations are saturated, i.e., they always have packets ready to send; • stations can hear each other, i.e., there is no hidden station.As a consequence of these assumptions, all stations see the same channel status.To keep notation simple and gain the most insight provided by models, we also assume that unlimited retransmission is allowed and that channel holding time is the same for all stations, once they win the contention.
Let us now outline the contention procedure adopted by a station.
As soon as the channel gets back to idle after a transmission, the station waits for the channel to stay idle for a fixed time (Inter-Frame Space (IFS)).We identify this time with the back-off slot time, denoted with δ, without loss of generality.Then, the station draws an integer value k with probability q k , with 1 ≤ k ≤ m.The set of probabilities {q k } 1≤k≤m is referred to as the back-off probability distribution.The number m ≥ 2 is the contention round (CR) length, also referred to as the contention window size.A back-off counter is initialized to k − 1 and the transmission countdown starts.The station decrements the back-off counter at the end of the current back-off slot time, if the channel is sensed as idle during that back-off slot time.The countdown continues until the counter hits 0. When the counter hits 0, the station starts transmitting.The channel is then held busy for a time that includes transmission of one or more packets, inter-frame spaces and possibly an acknowledgment.We do not enter the details of the MAC packet format and timing, rather we define an overall transmission time T , encompassing all activities performed by a station when it wins the channel.
If during the countdown another transmission starts, the station whose countdown has been interrupted by the start of another transmission deems itself as having lost the contention, resets its counter, waits for the end of the transmission.When the transmission ends and the channel gets back to the idle state, the station repeats the whole procedure anew, i.e., it draws another independent value of the random counter and starts a fresh new countdown.
Note that a collision event occurs whenever two or more stations draw the same initial back-off counter value and all other stations draw a bigger back-off counter value.As a matter of example, if there are four contending stations and two of them draw k = 3, while the other two stations draw k > 3, the first two stations will count off (k − 1) = 2 idle back-off slot times after the IFS, and then they will start transmitting, thus ending up into a collision at slot k = 3.
As a consequence of the proposed back-off procedure, the time evolution of the channel is split in contention cycles (CCs).A CC consists of a contention round (CR), possibly followed by an activity time (AT).CR consists of a number of consecutive idle back-off slot times, whereas AT lasts a time T .Figure 1 illustrates an example of time evolution of the CSMA protocol described in this section.On the right of the figure, two consecutive CCs are shown, the first one ending with a skip (no transmission attempt takes place, after all m = 16 back-off slot times have been counted off), the second one ending with a transmission attempt.
The slotted non-persistent CSMA introduced in the classic paper of Kleinrock and Tobagi [12] corresponds to the contention procedure described so far with the special choice m = ∞ and Geometric PDF for the back-off counter k.The CSMA/CA procedure defined in WiFi assumes a uniform probability distribution for the back-off counter.Moreover, a backlogged node freezes its counter in case its countdown is interrupted by other nodes' transmissions.In that case, the node checks the channel until transmission is over and the channel is sensed back to idle state.At that point, the node resumes the countdown.Eventually, the countdown expires and the node does transmit.If successful, the node is done and can move on to the next backlogged packet.If instead the node runs into a collision, Binary Exponential Back-off is used, i.e., the countdown window size is doubled before drawing the new initial countdown value.
We will see that giving up to BEB, the simpler Geometric PDF for the initial countdown selection turns out to optimize the channel utilization (i.e., normalized throughput).In other words, a higher saturation throughput can be achieved, if stations follow a simpler scheme, where a new initial countdown value is selected always from the same (Geometric) PDF, irrespective of the number of (re-)transmission attempts for the same packet.We will prove that a similar result applies when the more general weighted throughput function is introduced.In that case, not even the Geometric PDF is optimal.Nevertheless, our approach is able to derive the optimal scheme, customized to the given target.Moreover, our approach lends itself to throughput optimization also in the case where a constraint is set on the mximum back-off window, i.e., by considering finite support back-off probability distributions.
The multiple access algorithm defined so far corresponds to the contention procedure described in Section II of [1].We extend it now by considering a modified probability distribution over m + 1 values, namely {q i } 1≤i≤m+1 .The algorithm remains as stated before, except that a station drawing the value m + 1 skips the current contention cycle, without competing, i.e., it gives up the contention for the current cycle.Hence, a contention cycle ends: (i) when one or more stations start transmitting having hit 0 with their counters (initialized at values k ≤ m); or (ii) when m idle back-off slots go by on the channel and no transmission starts (i.e., all backlogged stations have chosen the skip option).Whichever of the two events occurs first will determine the end of the current CC.As soon as the CC ends, each backlogged station draws another random value to initialize its counter and enters a new CC.
The motivation of the skip option is as follows.Variability of the access delay implied by non persistent CSMA can be mitigated by setting a limit to the maximum number of back-off slot times to be counted down before attempting transmission.This is done, e.g., by choosing a uniform backoff PDF over the interval [1, m], as done in WiFi.Questions we aim to answer in this paper are then: (i) How far is uniform probability distribution from the optimal back-off PDF? (ii) How does the optimal back-off PDF with a given contention window length m look like?A further question that arises after having introduced the optimal back-off PDF with a limited contention window size is: How much is a maximum contention window length m penalizing in terms of throughput?In other words, we aim to assess the potential throughput gain obtained by relaxing the constraint on the maximum number of back-off slot times m.To embrace this analysis in the same modeling framework used for finite contention window length m, we introduced the skip option, which essentially means extending the contention window length to ∞.
In this paper we derive the optimal probability distributions maximizing the system throughput for both cases with and without skip option.To use a common framework and notation, we denote by s a 0/1 skip flag.Specifically, if s = 0 the skip is not allowed, and q m+1 is set to 0 as a constraint.Vice versa, if s = 1 the skip is allowed and the skip probability q m+1 is left as an output of the optimizer.An example of a CC with skip is shown in Figure 1.
Table I summarizes the main notation used in the paper.

B. Derivation of Throughput
Regardless of selected strategy s = 0/1, in order to derive an expression of the system throughput, let K(ℓ) denote the random variable representing the countdown value drawn by station ℓ at the beginning of a new contention cycle.The random variables K(1), . . ., K(n) are i.i.d., namely K(ℓ) ∼ K, ∀ℓ, and q k = P(K = k) for k = 1, . . ., m+1.The random Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

TABLE I MAIN NOTATION USED IN THE PAPER
variable K takes values in {1, . . ., m + 1}, where the special value K = m + 1 means that the station skips the current contention round.
The number of idle back-off slot times making up a contention round is J = min{m, min{K(1), . . ., K(n)}}.At the end of the contention round, either all stations choose to skip transmission or at least one station transmits.The former event is only possible if min{K(1), . . ., K(n)} = m + 1.If instead min{K(1), . . ., K(n)} ≤ m, an AT follows the CR.
Let C be the duration of a CC, δ the back-off slot time, T the duration of the AT.We have 1
1 More generally, stations wait for the channel to stay idle for an IFS > δ before starting the new CR.However, this does not affect our analysis and derivations, since the fixed duration (IFS−δ) can be embedded as an additive constant into the first line of Equation (1) (and, consequently, embedded in T ).We choose IFS = δ for simplicity.
The probability of a CC ending with a successful transmission (i.e., exactly one attempt out of the possible n ones) is The mean duration of a CC is where E is the event "at least one station transmits in this cycle".We have and where we have used the two identities G m+1 = q m+1 and G 1 = 1.Putting pieces together, we get The normalized saturation throughput, briefly referred to as simply throughput in the following, is defined by the mean fraction of time that the channel is used for successful transmissions.It is expressed as follows where β = δ/T .Given β, n and m, ρ n is a function of the back-off PDF {q j } 1≤j≤m+1 .We introduce also the notion of weighted saturation throughput of the n nodes, expressed as follows: where is the weighted probability of success.In Equation ( 6), α j ≥ 0 is the reward obtained by a station winning the contention at slot j.The meaning of α j is application dependent (e.g., see Section V-B). 2ue to its versatility, in this section we aim at maximizing Equation (6).Note that for α 1 = α 2 = • • • = α m = 1 the weighted throughput reduces to the plain throughput in Equation ( 5), just accounting for channel utilization.
Before proceeding to derive the optimal PDF, we recall a well-known back-off PDF commonly used in literature.Let the back-off PDF be Geometric with ratio 1 − τ , namely q i = (1 − τ ) i−1 τ , i = 1, . . ., m, and q m+1 = (1 − τ ) m .Let us also confine ourselves to the case of non-weighted throughput (α j = 1, ∀j).After some calculations, it is found from Equation (5) that regardless of m, which is consistent with the memoryless property of the Geometric PDF.This last expression is reminiscent of the saturation throughput expression holding for CSMA/CA models [12], [20].More in depth, according to Bianchi's model of CSMA/CA of WiFi [20], the saturation throughput in a symmetric network, as assumed here, is expressed just as in Equation ( 7).Bianchi's model is known to provides highly accurate predictions of saturated throughput, at least in the parameter value range of interest to CSMA/CA of WiFi.
In [20], τ is found as the unique solution (fixed point) of the equation system: where ν is the maximum number of allowed re-transmissions, κ j = (W j + 1)/2 and W j = min{CW max , CW min • 2 j } is the contention window size at stage j of the binary exponential back-off algorithm, j = 0, 1, . . ., ν.In the original Bianchi's model it is ν = ∞ and CW max = ∞.In that case, Equation ( 8) simplifies to where CW min is the base contention window size.The throughput achieved by CSMA/CA of WiFi is largely suboptimal, especially as n grows.

IV. OPTIMIZATION OF WEIGHTED THROUGHPUT
In this section we address the identification of the PDF {q j } 1≤j≤m+1 that maximizes the weighted throughput for n stations, referred to as the optimal PDF.In the following, we denote by τ j the hazard rate of the back-off PDF, i.e., τ j = P(K = j | K ≥ j).We can view τ j as the probability that a backlogged station transmits at slot j, conditional on being silent in the previous (idle) j − 1 slots.Given its definition, we can relate τ j to the PDF and CDF of the backoff counter K as follows: For n = 1 the optimal PDF is obviously given by q j * = 1 and q j = 0 for j ̸ = j * , with j * given by In the following we assume therefore n ≥ 2.
The main result is summarized in the following theorem.We refer to appendices for the detailed proof.
Before proceeding, let us provide some insight about Algorithm 1 and the rationale behind it.Specifically, Algorithm 1 define an iteration of the form k being the iteration index, with starting value ν 0 = 0 (Algorithm 1 line 2), where the function Ψ α (•) is a continuous map of [0, α max ] into itself, with α max = max j {α j }.Specifically, for any ν k entering the Ψ α (•) computation (at Algorithm 1 lines 7 and 9), a PDF is obtained (at Algorithm 1 lines 18, 21) as a function of ν k , which works as a seed for the PDF computation.Finally, the new value ν k+1 is generated (at Algorithm 1 lines 22, 24), and coincides with the throughput achieved by q(ν k ), i.e.
Starting from ν k+1 , the updated PDF q(ν k+1 ) is calculated in the next iteration of Algorithm 1.
Note that, by construction, Ψ α (ν) is the restriction of throughput function (6) from the set of all feasible PDFs to the subset of PDFs generated by Algorithm 1 lines 6-21 for any given value of ν.By inspection, it can be noticed that Algorithm 1 terminates when a fixed-point value ν * of Ψ α (•) is found3 Note that throughput (6) (and, consequently, the fixed-point function Ψ α (•) in ( 15)) is bounded above by α max .Thus, we can reduce ν domain to the interval [0, α max ] (nonempty compact convex set).Therefore, by invoking Brouwer's fixed point theorem, it follows that there exists at least a fixed point ν * .In Appendix A we prove the following result.
Theorem 2: The global optimum ρ * n of ( 6) is both a fixed point of Ψ α (ν) and its maximum, i.e., any other ν ∈ [0, α max ], Furthermore, the optimal PDF q * belongs to the subset Q ′ in (17) and corresponds to the seed ν := ρ * n , i.e., q * ≡ q(ρ * n ).Then, in Appendix B we prove that the derived fixed-point system exactly admits one fixed point (i.e., the global optimum), and Algorithm 1 converges to it.
Remark: We explicitly stress that in Appendix A we led derivations assuming α j > 0 to be concise.In fact, Algorithm 1 Pseudo-Code of q j 's Computation (α j ≥ 0) for j = m + s − 1, . . ., 1 do 9: x j ← max {0, α j + νβ(j + − j) − σ} /(n − 1) 10: end for 16: for j = 1, . . ., m do 18: 19: end for 21: ν ← ρ n 25: end while Equation (29) ceases to be useful (or even valid) when α j = 0. Nevertheless, one can prove that Algorithm 1 continue to achieve the optimal PDF under the more general condition α j ≥ 0, so long as to consider the assignment statements in line 10 and line 13 of Algorithm 1 in the limit for the weight tending to 0, i.e.

:
We use the symbol ← in Algorithm 1 to emphasize this point.In the remaining part of this section we restrict ourselves to the case of un-weighted throughput (α j = 1, ∀j).The computation of the dummy variables x j , j = 1, . . ., m, in this setting is simpler than in the general case.The full specialized algorithm, including the fixed point loop iteration, is presented in Algorithm 2.
We prove that, in case s = 1, the optimal PDF leads to a simple Geometric PDF for the backoff countdown.This result proves, for the first time to the best of our knowledge, that the typical assumption made in the analysis of nonpersistent CSMA, ever since the seminal paper by Kleinrock and Tobagi [12], is actually the best possible choice under the respect of throughput.
Formally, we have the following statement (see Appendix C for its proof).
Theorem 3: The PDF of back-off that maximizes the unweighted throughput in Equation ( 5) when skip is allowed is a Geometric distribution defined by Algorithm 2 Pseudo-Code of x j 's Computation (α j = 1) for j = m + s − 2, . . ., 1 do 7: x 12: end for 14: ρ n ← ρ ′ n 18: end while i = 1, . . ., m, and q m+1 = (1 − τ ) m , where τ is the unique solution in (0, 1) of the equation It is an intriguing result that the possibly simplest PDF of back-off is also the best possible choice as far as throughput is concerned and skip allowed.Moreover, the Geometric PDF dissipates the effect of the contention window size m, so that the optimized normalized throughput is independent of m.This property is consistent with the memoryless property of the Geometric PDF.This is also quite easy to implement, since it requires only one parameter, namely the unique solution τ * of Equation (19).In general, τ * is dependent on n.It can be verified numerically however that τ * is weakly dependent on n, except for very small values of n.Its approximation to the leading term is expressed as τ * ≈ ξ/n, where ξ is the unique solution of It turns out that ξ/n provides an accurate approximation of τ * for essentially all values of n and it is asymptotically sharp as n → ∞.

V. NUMERICAL RESULTS
Numerical examples to assess properties of the optimal PDF of back-off and its impact on CSMA performance are given in Section V-A.A specific use case of the weighted throughput, in an energy constrained scenario, is then presented in Section V-B.

A. Optimal PDF Performance
Figure 2 shows the normalized throughput (i.e., channel utilization) as a function of the window size m, for different values of β and α j = 1, j = 1, . . ., m).Two cases are shown: n = 30 STAs (upper plot), and n = 90 STAs (lower plot).We compare three back-off PDFs: i) optimal PDF strategy Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
From Figure 2 we obtain some useful insights.First, as one can expect, s-PDF is the best performing, due to the additional 'skip' degree of freedom.Second, the smaller is β, the higher is the m value s-PDF needs to achieve performance provided by s-PDF (to appreciate this fact, Figure 2(a) is in linear scale); however, the sensitivity is low and convergence is achieved within m of the order of 26 both in Figure 2(a) and Figure 2(b), emregardless of the value of n.Noticeably, we explicitly point out that optimal PDFs s-PDF and s-PDF equalize the ndependence, i.e., their performance slightly depend on n.This is compliant with a well-known property that characterizes optimized CSMA/CA systems [11], [20], [29].Fourth, optimal PDFs significantly outperform uniform distribution strategies.This is particularly evident in Figure 2(b), where we show performance up to m = 2048 (logarithmic scale), for n = 90.Unlike s-PDF, the u-PDF optimized contention window size m strongly depends on both β and n, and rapidly increases with the latter.This confirms the discussion in Section II about uniform distribution sensitivity to system parameters and the need of adaptation algorithms to properly set m.In fact, this is a (still open) issue, being adaptation algorithms notoriously short-term unfair and with long transients.They are a major bottleneck in random access, especially for massive scenarios.To provide an example, the optimized m value spans from around 64 for β = 1/10, n = 30 (beyond the range depicted in Figure 2(a)) to more than 512 for β = 1/100, n = 90 (Figure 2(b))), and rapidly become unpractical in massive high-density scenarios, or whenever an application-dependent constraint on m must be considered (for instant, latency constraints for event-driven and/or safety services).
Finally, noticeably, s-PDF's throughput is independent of m.This is confirmed by Figure 3, showing fixed-point function ρ out = Ψ(ρ in ) of Algorithm 1 and its intersection with the bisector (namely, the fixed-points related to PDFs stable optimized performance) for different values of m.For s = 1, there is a common fixed-point, regardless of m (Figure 3(a)), whereas, for s = 0, fixed-points converge to the optimal one provided by s-PDF for increasing values of m (Figure 3(b)).
Concerning sensitivity to starting setting ρ in , curves in Figure 3(b) are approximately flat for any m, thus indicating s-PDF is extremely robust with respect to the tentative value ρ in used to initialize Algorithm 1. Conversely, s-PDF is more sensitive to ρ in for relatively low values of m, despite its optimal point being independent of m (see Figure 3(a)).Hence, Figure 3 provides a trade-off among performance and sensitivity (equivalently, time needed to converge to the optimal distribution).Nevertheless, Table II indicates that computational complexity to converge to fixed-point is limited to just a few iterations of Algorithm 1, when ρ in = 0 is used as starting point and 1e−8 and 1e−12 are set as numerical tolerance, respectively.
Moving to the case with non-uniform weights, we define three weight vectors α (1) , α (2) and α (3) , each of size m = 36.Their values are listed in Table III.The weight values can be  interpreted as rewards for winning the contention upon a given back-off slot, and their setting is context and application dependent. 4Note that α (1) corresponds to the baseline uniform   3) , achieved by the PDF optimized for channel utilization (α (1)  in the legend) and the PDF explicitly optimized for the considered scenario (α (3) in the legend), for m = 36, n = 30.
weights case (i.e., channel utilization).From a theoretical point of view, we say that each weight vector characterizes a different MAC channel.For the considered weight vectors α (1) , α (2) and α (3) , Figure 4(a) plots the corresponding optimal conditional probabilities τ j , j = 1, . . ., m (see Table I and Equation ( 11)) for s = 1 (skip allowed), as a function of j, for 1 ≤ j ≤ m.Some valuable insights can be obtained by inspecting these curves.First, for α (1) (i.e., uniform case), we have: τ 1 = τ 2 = . . .= τ m = τ , i.e., the Geometric PDF is the optimal back-off distribution, 5 confirming the established theoretical results.Second, curves in Figure 4(a) show that the Geometric PDF is no longer optimal for the block-type channel rewards α (2) and α (3) .Specifically, the optimized conditional access probability τ i is in general a function of the slot index i.Finally, to obtain some insights about performance gain offered by the PDF optimized for a considered MAC channel, Figure 4(b) shows, for different values of β, the weighted throughput when the channel is characterized by weights α (3) .We compare the Geometric PDF (bars labeled with α (1) in the figure), and the s-PDF explicitly optimized for the α (3)  weights (bars labeled with α (3) in the figure).More in dept, we compare the obtained average reward achieved by the 'general purpose' Geometric PDF maximizing channel utilization, and the PDF explicitly tuned for the considered reward scenario.Accordingly, in both cases the weighted throughput is measured using the rewards provided by the vector α (3) , so that the Geometric PDF is actually mismatched.From Figure 4(b), optimal s-PDF's throughput gain over Geometric one spans from 9% to 53% in the considered β settings.Interestingly, Figure 4(b) shows that reducing β (i.e., increasing packet length, hence the packet transmission time T ) is not sufficient to properly boost CSMA/CA performance, unless the optimal PDF is used.As an example, by decreasing β from 1/10 to 1/200 (i.e., a 20× factor), Geometric throughput increase is limited to 91%, while the optimal one is 167%.

B. Energy Consumption Use Case
As an example of applicability of the weighted throughput in Equation ( 6) to a practical use case, in this subsection we tailor the weight vector α to take account of STAs' energy consumption in a typical IoT setting, inspired to IEEE 802.11ah.In energy sensitive application scenarios, the target is not only to maximize network throughput, but also to minimize the consumed energy per successfully delivered packet.In this regards, Table IV lists the energy consumption of a STA in different modes, taken from [35] and [36].Accordingly, for i = 1, . . ., m, let the energies consumed within each Contention Cycle (CC).More in dept, Equation ( 21) is the energy consumed by a STA that wins the contention at slot i, whereas Equation ( 22) is the energy consumed by the whole network in case contention is won by a STA at slot i.To take into account energy consumption while maximizing throughput, we propose the following two weight settings, α (ST A) and α (N ET ) , so defined Roughly speaking, under framework (23) STAs are selfishoriented, only considering their own consumed energy in throughput weighting, and always assume to be the winning STA while planning the PDF strategy.On the contrary, under framework (24) contention is network oriented, also accounting for sensing and sleeping energies of STAs that lose the contention.We compare the three settings α (ST A) , α (N ET ) , α (P HY ) = 1 m = [1, 1, , . . ., 1], the last one corresponding to the PDF maximizing channel utilization (and, consequently, PHY throughput).Without ambiguity, with a slight abuse of notation, we refer to α (ST A) , α (N ET ) , α (P HY ) also to denote the corresponding PDF distributions.Table V lists network parameters used in simulations, which refer to IEEE 802.11ah technology [35].Unless otherwise stated, each plotted point is an average over 10 5 CCs.
Figure 5 and Figure 6 show throughput and energy performance in basic access mode (no RTS/CTS), for m = 64 slots and s = 0 (no skip allowed), in terms of successfully transmitted Mbits/s (i.e., PHY throughput) and average consumed energy per successful packet transmission.For each PDF strategy, we test modulation and coding scheme 0 (MCS 0), Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.corresponding to the basic data rate, and MCS 8, corresponding to 256-QAM (see Table V).
Some valuable insights can be obtained by the examination of these results.First, throughput performance of all PDFs are quite stable w.r.t. the number n of competing STAs, making them particularly attractive in application scenarios where a massive number of devices may compete for the channel in a short period of time, as a consequence of a triggering event (i.e., for massive machine type communication scenarios (mMTC)).Figure 5 shows that throughput only slightly decreases for increasing n.This is a consequence of the proposed optimal framework, which equalizes such a dependence.Second, α (P HY ) achieves the best throughput performance, as expected.Nevertheless, α (ST A) throughput is almost indistinguishable, whereas α (N ET ) PDF is only slightly less efficient.
Concerning energy efficiency, Figure 6 shows that both α (ST A) and α (N ET ) outperform α (P HY ) .More in dept, the energy saving is particularly relevant for α (N ET ) , and the slight reduction in its throughput performance (see Figure 5) is the price to pay for such an achievement in terms of energy efficiency.As an insightful example, α (P HY ) consumes up to    (MCS 8, n = 160) and 48% (MCS 0, n = 160) more as compared to α (N ET ) .Despite this, throughput loss of α (N ET ) in comparison with α (P HY ) is limited up to 12% (both MCS 0 and MCS 8) (see Figure 5).
Table VI provides some additional metrics to explain the rationale behind differently optimized PDF strategies.Specifically, energy consumption critically depends on the non trivial trade-off between the number of contention cycles per successful packet transmission #CCs, and the average CC duration.As one can notice from Table VI, α (ST A) and α (N ET ) are more aggressive compared to α (P HY ) , especially α (N ET ) , resulting in an increased collision probability P c , which negatively affects throughput and #CCs.Nevertheless, α (ST A) and α (N ET ) strongly reduce the average number of idle slots #ISs per CC, and, consequently, the average CC duration.The optimized final trade-off is responsible for the energy gain in Figure 6.
Finally, from Figure 5 it can be recognized that throughput marginal loss of α (N ET ) rapidly stabilizes for increasing n (i.e., the α (N ET ) curves are approximately flat for high values of n), while the energy saving is more and more relevant as network size increases, which makes the use of the derived energy-oriented PDFs particularly advantageous in massive scenarios.To conclude, for the considered system parameters and MCS 0, Table VII provides the uniform distribution (u-PDF) throughput reduction w.r.t the throughput benchmark provided by α (P HY ) (throughput loss), and the energy consumption increase per successfully delivered packet w.r.t. the energy benchmark provided by α (N ET ) (energy loss), respectively.

VI. CONCLUSION
A major component of multiple access system, namely the CSMA protocol, is addressed and saturation throughput optimization is investigated.The special perspective of this work consists of assuming as degree of freedom in the optimization process the probability distribution of the backoff countdown, given the maximum size m of the contention window.The baseline CSMA, as presented in analytical works and as implemented in WiFi, adopts consistently a Geometric (memoryless) distribution of back-off or a uniform probability distribution over a variable contention window size, due to binary exponential back-off.The aim of this paper is investigating the opportunity offered by an alternative approach to CSMA throughput optimization.
To this end, a generalized notion of weighted throughput is introduced, which encompasses the traditional saturation throughput as a special case.Then, we present two major results.The optimal PDF of back-off in the general case of arbitrary non-negative weights is determined, providing a numerical algorithm for its construction.Moreover, in the particular case of weights all equal to 1, we have proved that the optimal PDF of back-off reduces to a Geometric distribution when contention window skip is allowed, thus unveiling an interesting property of this popular probability distribution of back-off, often simply justified in previous works for easiness of analysis.Here it is formally proved that it is actually the best possible choice, as far as saturation throughput is concerned.
Further work in the direction of this paper can be developed following two lines.On a practical side, distributed and adaptive algorithms for adjusting the probability distribution of back-off of a set of stations should be defined, to turn the result presented in this paper into an operative algorithm in a CSMA network where the number of contending stations varies over time.From a modeling point of view, more general optimization problems could be considered, involving multi-objectives, beside saturation throughput, e.g., time deadlines, or using utility functions to take traffic importance into account.

APPENDIX A THE OPTIMAL THROUGHPUT AS A SOLUTION OF THE FIXED POINT SYSTEM IN ALGORITHM 1
In this appendix we prove that the fixed point system in Algorithm 1 derives from a one-to-one manipulation (i.e., the pair-wise difference) of partial derivatives of the weighted throughput objective function, and corresponds to the study of their sign within the feasible region, in search of relative maxima.
The countdown PDF is given by a row vector q = [q 1 , . . ., q m+1 ] of size m + 1.We first consider the case s = 1.Since the sum of the components of the probability vector q must be 1, we have m independent variables, composing the vector q ′ = [q 1 , . . ., q m ], with the constraint that q i ≥ 0, i = 1, . . ., m and q 1 + • • • + q m ≤ 1.We can re-write the weighted throughput in the following way, so that only the probabilities in q ′ are involved: In this appendix, we omit the (α) superscript in throughput notation without any ambiguity.We regard ρ n as a function of q ′ and let where and We lead derivations assuming α j > 0 in this section, to be concise.We now derive an algorithm producing the optimal PDF q ′ in terms of the related auxiliary variables for j = 1, . . ., m, with x j ∈ [0, +∞[.Hence, once the optimal x j are computed, from (29) and τ j 's definition (11) we obtain probabilities τ j and q j as τ j = x j α j + x j (30) for j = 1, . . ., m, and for j = 1, . . ., m + 1, being, by position, τ m+1 = 1. 6ecursion Equation ( 31) can be solved, yielding To maximize ρ n in (25), we study the sign of its partial derivatives, which are where for j = 1, . . ., m.Note that, for any feasible q ′ , we have D(q ′ ) > 0. As a consequence, the sign of (33) only depends on the sign of N j (q ′ ).We proceed backwards in the study of it, for j = m, . . ., 1.
Base case (j = m): (34) simplifies to By studying its sign, i.e., by solving the inequality N m (q ′ ) ≥ 0, we get the following inequality where we used the position (29).Therefore, at the optimal point we have the following two possibilities: i) ρ n > α m : in this case ( 36) is never satisfied, N m (q ′ ) is always negative and ρ n is a decreasing function of x m , resulting in the optimal value x m = 0 and, consequently, τ m = 0 and q m = 0; ii) ρ n ≤ α m : in order for ρ n to be a maximum it has to be, strictly, , which results in N m (q ′ ) = 0 and (see (33)) ∂ρ n (q ′ )/∂q m = 0. Thus, in a compact notation, at the optimum we have7 x and In the following, we use (38) as base case (j = m) to inductively proof backward such a result for any j = m − 1, . . ., 1.
For the given j, there are two possibilities: i) I + j = ∅.In such a case, since q i = 0 for any i > j, (34) simplifies to Similarly to what done above for N m (q ′ ), by studying its sign, at the optimal point we get with N j (q ′ ) = 0 if x j > 0, i.e., (40) is satisfied also for i = j, i.e., for i ∈ {j} ∪ I + j and the induction is complete.
Algorithm 1 includes the above derived equations and both frameworks (s = 1 and s = 0) in a single formulation.It also includes the slightly more general setting α ∈ (R + 0 ) m −{0 m }, that can be derived as a limit case.
Theorem 3 follows as a direct application of this result to the normalized throughput, which can be considered as the m-fold concatenated problem of the base case m = 1, α = 1.Eq. ( 19) directly follows from the study of the derivative of (7).

Fig. 1 .
Fig. 1.Example of time evolution of the generalized CSMA defined in Section III-A.Examples of both Contention Cycles without and with skip are shown on the right of the diagram.The CC ending with a skip comprises m = 16 back-off slot times and no transmission.The ensuing CC is composed of 8 back-off slot times, after which one or more stations start transmitting.

Fig. 4 .
Fig. 4. (a) Conditional back-off probabilities τ j with skip (s = 1) for the optimal back-off PDF as a function of m, with the three different set of weights shown in TableIII, for β = 1/10 and n = 30.(b) Throughput related to metrics α(3) , achieved by the PDF optimized for channel utilization (α(1)  in the legend) and the PDF explicitly optimized for the considered scenario (α(3) in the legend), for m = 36, n = 30.

TABLE VI COLLISION
PROBABILITY (Pc), NUMBER OF CCS PER SUCCESSFUL PACKET TRANSMISSION (#CCS), AVERAGE NUMBER OF IDLE SLOTS PER CC (#ISS) (n = 120)

TABLE VII u
-PDF THROUGHPUT LOSS AND ENERGY LOSS (W.R.T. α (P HY ) AND α (N ET ) , RESPECTIVELY), FOR m = 64, MCS 0 AND IEEE 802.11AHPARAMETERS GIVEN IN