## 2 Preliminaries and Problem Formulation
### Problem Formulation  
Consider a generic single-hop network where \(N\) nodes contend to transmit packets to a central node (_i.e._, the coordinator) using the IEEE 802.15.4 slotted CSMA/CA protocol. Each node \(i\) is assigned a throughput demand of \(1/t_{i}\). For convenience, \(1/t_{i}\) is defined as the ratio of the number of successful packets to the number of time slots during a certain time period, _i.e._, on average node \(i\) needs to successfully transmit a packet every \(t_{i}\) slots. Due to the backoff failure and packet collision, packet transmissions may fail and the packet success rate of node \(i\)\(p_{PSR_{i}}\) is smaller than 1. It is assumed in this paper that packet loss due to MAC layer contention dominates other forms of packet loss such as path loss and channel fading. This assumption is reasonable as for most applications that operate in close proximity, packet loss on physical layer is usually negligible [11,28]. Assume node \(i\) has a transmission rate of \(1/\lambda_{i}\) (e.g., \(\lambda_{i}=100\) means node \(i\) on average initialize a new packet transmission every 100 slots) and assume that \(\lambda_{i}\) can be arbitrary tuned to meet the throughput demand. This feature applies to a wide variety of wireless industrial network systems [29, 30, 31]. For example, for network control systems employing data rate theorem [32], the transmission rate needs to be tuned frequently according to the channel condition to stabilize the control system. Another example would be a model-based network control system [31], where the sensor packet generation needs to be tuned according to the dynamics of the control system. \(1/\lambda_{i}\) can also be viewed as a probability that node \(i\) initializes a new packet transmission in a random time slot. Further assume that each packet lasts for \(L\) slots and no retransmission is implemented on MAC layer (retransmission can be implemented on higher layer though). The objective of the proposed algorithm is for each node to find a suitable transmission rate \(1/\lambda_{i}\) in a distributed manner such that:  
\[\frac{p_{PSR_{i}}}{\lambda_{i}}=\frac{1}{t_{i}} \tag{1}\]  
Denote the vector \(\lambda=(\lambda_{1},\lambda_{2},...,\lambda_{N})\) the optimal operating point where every node meets its throughput demand. It is assumed in this paper that such a point always exists, _i.e._, the throughput demand is feasible. This assumption is reasonable in most sensor networks performing monitoring and control tasks as the data traffics generated by these nodes are usually below the capacity of the network. In order to model the interactions in the network, it is essential to characterize the relationship between the two parameters of node \(i\), namely the probability that node \(i\) starts to perform CCA in a random time slot \(\alpha_{i}\) and the probability that the CCA result is busy, namely busy channel probability \(\beta_{i}\). Higher \(\beta_{i}\) indicates that a node will on average perform more backoffs for a certain packet and thus higher \(\alpha_{i}\), and _vice versa_. This relationship can be quantified by calculating the average number of CCAs that node \(i\) experiences for each packet as follows:  
\[\alpha_{i}=\left(\sum_{k=0}^{m-1}(k+1)(1-\beta_{i}){\beta_{i}}^{k}+(m+1){ \beta_{i}}^{m}\right)/\lambda_{i}=\frac{1-{\beta_{i}}^{m+1}}{(1-\beta_{i}) \lambda_{i}} \tag{2}\]  
where \(\sum_{k=0}^{m-1}(k+1)(1-\beta_{i}){\beta_{i}}^{k}+(m+1){\beta_{i}}^{m}\) enumerates all the possible number of CCAs and their corresponding probability. Furthermore, \(\beta_{i}\) also depends on every other node's probability of starting to perform CCA in a random time slot \(\alpha_{j}\). This relationship can be characterized by the channel state model in Figure 1[5]. The idea of the channel state model lies in the property of the CSMA/CA that a node needs to sense two successive idle slots before transmitting a packet. The channel state model is thus constructed to figure out what is the probability that a random adjacent slot-pair is idle.