# Throughput and Packet Loss Probability Analysis of Long Range Wide Area Network
## 3 Markov Chain Model  
In LoRaWAN, time, frequency, and spreading factor are orthogonal factors to each other, so packet collision occurs only when two or more EDs transmit a packet at the same time using the same frequency channel and same spreading factor. Suppose that there are \(N\) EDs associated with a gateway. We define \(N_{ij}\) as the number of EDs who uses the spreading factor \(SF_{i}\) (\(6\leq i\leq 12\)), and the carrier frequency \(CF_{j}\) (\(1\leq j\leq 6\)). The state of the uplink channel is divided into three states: a success state during when an uplink packet is successfully transmitted, a collision state during when a collision happens, and an idle state in which there are no packet transmission activities. Let \(b_{i,j}(t)\in[0,S]\) be the stochastic process representing the time-slot counter for the uplink packet transmission of an ED with \(SF_{i}\) and \(CF_{j}\) at slot time \(t\), where \(S\) is the number of time slots required to transmit an uplink packet. In this model, a discrete and integer-type time scale is adopted, and the time-slot counter used for the uplink packet transmission decreases at the beginning of each slot time (It is noticed that this discrete time-scale does not directly relates to the system time). For given \(i\) and \(j\), we define \(s_{ij}(t)\) as the stochastic process representing the number of EDs with \(SF_{i}\) and \(CF_{j}\) which transmit or try to transmit a uplink packet at time \(t\). Here, we construct the discrete-time bi-dimensional Markov chain \(\{s_{i,j}(t),b_{i,j}(t)\}\) as depicted in Figure 1. It is noticed that this Markov chain describes only the success and collision states except idle state in order to simplify the Markov chain model. Hereafter, considering orthogonalities of spreading factor and carrier frequency, we simply denote the above Markov chain as \(\{s(t),b(t)\}\), omitting the lower index for given \(i\) and \(j\). ITU-T describes that many IoT traffic models have a common characteristic of frequent short-packet transmission with a Poisson distribution, based on the assumption that the reporting from EDs are uncorrelated[14]. Therefore, we approximate the distributions of \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**SF**} & \multirow{2}{*}{**SNR**} & \multicolumn{3}{c}{**BW**} \\ \cline{3-5}  & & **125 kHz** & **250 kHz** & **500 kHz** \\ \hline
6 & \(-5\) dB & 5.045 km & 3.615 km & 2.591 km \\ \hline
7 & \(-7.5\) dB & 6.654 km & 4.768 km & 3.417 km \\ \hline
8 & \(-10\) dB & 8.775 km & 6.288 km & 4.506 km \\ \hline
9 & \(-12.5\) dB & 11.574 km & 8.293 km & 5.943 km \\ \hline
10 & \(-15\) dB & 15.263 km & 10.938 km & 7.838 km \\ \hline
11 & \(-17.5\) dB & 20.132 km & 14.426 km & 10.33 km \\ \hline
12 & \(-20\) dB & 26.550 km & 19.026 km & 13.634 km \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Measured distance between a GW and an ED for different SF, SNR, and BW. Figure 1: Markov chain model. the length of uplink packet transmission interval using exponential distribution. Let \(p\) be the probability of an ED to try to transmit uplink packet at a time slot. Then, \(p\) is given by  
\[p=1-e^{-\lambda},\text{ where }\lambda=\frac{N_{ij}}{T_{U}}, \tag{12}\]  
where \(T_{U}\) is the length of uplink packet transmission interval of a node. In this Markov chain, the one-step transition probabilities are calculated by  
\[P\{l,k|l,k+1\}=1-p\text{ for }0\leq k\leq S-1,0\leq l\leq N_{ij}-1\] \[P\{0,S|l,0\}=1\text{ for }0\leq l\leq N_{ij}-1,\] \[P\{l,S|l-1,k\}=p\text{ for }1\leq k\leq S,1\leq l\leq N_{ij}-1,\] \[P\{N_{ij}-1,k|N_{ij}-1,k+1\}=1\text{ for }0\leq k\leq S-1. \tag{13}\]  
Let \(b_{l,k}\) be the stationary distribution of \(\{s(t),b(t)\}\), defined by \(b_{l,k}=\lim_{t\rightarrow\infty}\) for \(P\{s(t)=l,b(t)=k\}\) for \(0\leq l\leq N_{ij}-1\), \(0\leq k\leq S\).