## 5 Analytical Models for the Proposed MAC  
In this section, we design the Markov chain model as shown in Figure 8 to analyze the channel access scheme during the contention period for the associated devices in the network. Based on the notations given in Table 1, the analytical model is designed taking the unsaturated traffic condition. Let \(N\) be the number of devices associated with a PAN coordinator in a smart home for data communications. Let \(s(t)\) and \(c(t)\) represent the backoff stage for \(NB\) and backoff counter for \(CW\) at time \(t\), respectively for the stochastic processes as shown in Figure 8. Let,  
\[S_{j,k}=\lim_{t\rightarrow\infty}P\{s(t)=j,c(t)=k\}\]  
where \(k\) is the index of the backoff counter and \(k\in\{-1,...,CW_{i}-1\}\), while \(CW_{i}\) is the contention window for \(i\)-th device, \(j\) is the index of backoff stage and \(j\in\{0,...,NB_{max}\}\), while \(NB_{max}\) is the \begin{table}
\begin{tabular}{c c} \hline \hline
**Notation** & **Value** \\ \hline \(N\) & Number of devices attached to PAN coordinator; \\ \(p_{1}\) & Packet generation probability; \\ \(\sigma\) & Unit backoff slot duration; \\ \(p_{2}\) & Probability to defer transmission; \\ \(\phi\) & Probability of channel access for first time; \\ \(\alpha\) & Probability of channel busy during CCA; \\ \(P_{b}(\zeta)\) & Probability of bit error rate; \\ \(P_{s}\) & Probability of transmission attempt successful; \\ \(T_{cca}\) & Time duration for CCA; \\ \(T_{pkt}\) & Average data packet transmission duration; \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Notation table. Figure 8: Markov chain model for the proposed channel access mechanism. maximum number of allowable backoff stages. The state \(S_{j,-1}\) represents the start of the channel access at the \(j\)-th backoff stage, where \(j\in\{0,...,NB_{max}\}\). In our model, the states \(I\), \(R\), \(T\) stand for the idle state, ready state and transmit state, respectively. Let, \(p_{1}\) be the probability that the device has a packet to transmit. After generating the packet, a device goes to the ready state \(R\), chooses a random backoff and goes to the state \(S_{0,k}\), where \(k\in\{0,1,...,CW_{i}-1\}\). The state \(S_{j,k}\) represents the backoff state. Let \(\alpha\) be the channel busy probability during the CCA and \(p_{2}\) be the transmission deferred probability due to the current remaining time in the CAP period being insufficient to carry out the data transmission. Whenever a device finds the channel idle during CCA, it enters into the transmission state and tries to transmit packets. Let \(P_{s}\) be the probability of successful packet transmission. We can derive the transition probabilities as follows based on the proposed Markov chain model as given in Figure 8. A device after having a packet to transmit goes to the ready state, and the corresponding transition probability from the initial state to the ready state is:  
\[P\{R|I\}=p_{1}. \tag{3}\]  
The device initially goes for the random backoff before accessing the channel and moves from the ready state to the first time backoff state \(S_{0,k}\). The corresponding transition probability is deduced as follows. \[P\{S_{0,k}|R\}=\frac{1}{CW_{i}}\;\;for\;0\leq k\leq CW_{i}-1. \tag{4}\]  
After reaching a backoff state, the backoff counter is decremented with probability one. The corresponding transition probability is deduced as:  
\[P\{S_{j,k}|S_{j,k+1}\}=1\;\;for\;0\leq j\leq NB_{max}\;and\;0\leq k\leq CW_{i} -1. \tag{5}\]  
The tagged device reaches the channel sensing state provided the current remaining time in the CAP period is sufficient to carry out the data transmission. The corresponding transition probability can be derived as follows. \[P\{S_{j,-1}|S_{j,0}\}=1-p_{2}\;\;for\;0\leq j\leq NB_{max}. \tag{6}\]  
However, the tagged device will go for the random backoff again, if the current remaining time in the CAP period is insufficient to carry out the data transmission. The corresponding transition probability can be derived as follows.