## 5 Markov Model and Calculations  
### Markov Model  
To quantitatively assess the proposed protocol, especially the CSMA period, a Markov model is proposed in this section. Note that the transmission under unsaturated traffic is considered. Two stochastic processes are defined, in which \(S(t)\) represents the backoff stage and \(w(t)\) represents the backoff counter. As shown in Figure 11, the stochastic processes are divided into four states, backoff state (\(s(t)\geq 0\)), transmission stage (\(s(t)=-1\)), and ACK state (\(s(t)=-2\)) and idle state (\(s(t)=-3\)). Then we obtain the backoff window length:  
\[W_{i}=2^{\min(aMaxBE,\ MinBE+i)}W\ \ \ \ \ \ \ \ i\ \in\ (0,\ m) \tag{1}\]  
Figure 11: Markov model of the CSMA process. \begin{table}
\begin{tabular}{l} \hline
**Adaptive Slots Allocation Method** \\ \hline
**Start** \\ Collect the data packets in the CSMA period and calculate \\ \(K\gets 1\) \\ For \(i\ \gets 1\) to \(N_{\textit{burst\_max}}\) \\ refresh \(F[M][N]\) \\ Count the number of idle slots \(N_{\textit{life}}\) and find the last idle slot \(\textbf{S}(r)\) \\ Sort \(\textbf{\emph{q}}(i)\) and find the largest value \(\textbf{\emph{q}}(j)\) \\ If \(N_{\textit{life}}>0\) \\ then \(F[i][j]\gets 1\) \\ end \\ Wait for the next superframe \\ If \(\overline{q}\geq Q\) then \\ \(L_{\textit{max}}\leftarrow\max\Bigl{(}L_{\textit{max}}+2^{\frac{1}{2}},L_{ \textit{max}}.\max\Bigr{)}\) \\ else if \(\overline{q}=0\) then \\ \(K\gets 0\) \\ \(L_{\textit{cosm}}\gets L_{\textit{cosm}}-2\) \\
**Stop** \\ \hline \end{tabular}
\end{table} 
Table 4: _Cont._The transition probabilities of the Markov chain can be subsequently derived as follows:  
1. During the backoff process, the backoff counter decreases when a slot arrives: \[p\{i,k|i,k+1\}=1\hskip 28.452756 pti\ \in\ (0,\ m),\ k\in(0,\ w_{i}-2)\] (2)
2. When the value of backoff counter reaches zero, a clear channel assessment (CCA) is performed. Data packets will be sent if CCA success. Let \(p\) be the probability of a channel being occupied: \[\left\{ \begin{array}{ll}p\{-1,0|i,0\}=1-p&i\ \in\ (0,\ m)\\ p\{-1,k|-1,k-1\}=1&k\ \in\ (1,\ G-1)\end{array} \right.\] (3)
3. If the channel is occupied and CCA fails, the backoff stage increases and the value of backoff counter will be randomly chosen: \[p\{i,k|i-1,0\}=p/w_{i},\hskip 28.452756 pti\ \in\ (1,\ m),\ k\in(0,\ w_{i}-1)\] (4)
4. If a packet is successfully received, an ACK will be sent. Otherwise, the lack of ACK indicates a node collision event. Let \(p_{c_{\circ}}\) denote the probability of node collision: \[\left\{ \begin{array}{ll}p\{-2,1|-1,G-1\}=1-p_{c_{\circ}}\\ p\{-2,-1|-1,G-1\}=p_{c_{\circ}}\end{array} \right.\] (5) After a packet transmission, the backoff process will be restarted if the data buffer is not empty. Otherwise, the node will transit to the idle state: \[\left\{ \begin{array}{ll}p\{0,k|-2,1\}=(1-q_{1})/w_{0},&k\in(0,\ w_{0}-1)\\ p\{-3,0|-2,1\}=q_{1}\end{array} \right.\] (6) When a collision occurs, the packet will be retransmitted unless it reaches the retransmission limit \(R\). In that case, it will be transited to the idle state or restart the backoff process with the same probability distribution in a successful transmission. Let \(p_{retx}\) denote the probability of retransmission, then we have: \[\left\{ \begin{array}{ll}p\{0,k|-2,-1\}=p_{retx}+(1-p_{retx})(1-q_{1})/w_{0} &k\in(0,\ w_{0}-1)\\ p\{-3,0|-2,-1\}=q_{1}(1-p_{retx})\end{array} \right.\] (7) At the end of the backoff process, when the backoff stage reaches its maximum, if the channel is still occupied, the transmission will be cancelled. Later, if new packets arrive, the backoff process will be restarted. Otherwise, the node becomes idle: \[\left\{ \begin{array}{ll}p\{0,k|m,0\}=p(1-q_{1})/w_{0},&k\in(0,\ w_{0}-1)\\ p\{-3,0|m,0\}=p\cdot q_{1}\end{array} \right.\] (8) During the idle state, if a new packet arrives, the backoff process will be restarted. Otherwise, the node will remain idle. Let \(q_{2}\) denote the probability of having no new packet, then we have: \[\left\{