# Optimal Data Collection Time in LoRa Networks--A Time-Slotted Approach
## 3 The Problem of Bulk Data Collection
### Data Collection Using Pure and Slotted Aloha MAC  
In this subsection, we formulate a data collection time minimisation problem, as a function of the minimum required transmission rate and a given success probability of delivery. We show that reliable bulk data collection in Aloha (Pure and Slotted) cannot be achieved in a short amount of time even for a low number of nodes. In Table 1 we define a set of notations and their meaning to assist in the understanding of remainder of the presentation. Aloha-based MAC protocols, such as used in LoRaWAN, do not apply any mechanism to coordinate packet transmissions. Indeed, each node transmits its packets whenever data are available and the duty cycle restrictions are met. In this case, some of the packets are delivered while others are lost due to collisions. Specifically, the collision rate depends on this transmission rate. For example, allowing the nodes to transmit in sparse intervals decreases the collisions but prolongs the data collection time. Assuming that all nodestransmit the same amount of packets \(pkt\), the average data collection time is then equal to \(pkt/\theta\), where \(\theta\) is the packet transmission rate. In order to model an Aloha MAC behaviour for the bulk data collection scenario, we assume that all nodes' packets are equal in length and their transmissions follow a Poisson distribution with intensity \(\theta\) packets/s. Assuming the best-case scenario of no inter-SF collisions, transmissions only collide when they overlap in SF, time, and power [6]. Given the analysis provided in [17], if a node at distance \(x\) from the gateway transmits a packet with SF \(f\), the transmission will be successful if it does not overlap with any other packets in the network having the same SF within the transmission time \(T_{f}\). Alternatively, due to the capture effect, the packet can be decoded if the received power of other packets with the same SF is less than the current one by at least \(P_{\rm{thd}}\). As shown in Figure 1, considering a log-distance path loss model, the potential interfering nodes are those whose distance from the gateway is below \(xR\) with \(R=10^{\frac{P_{\rm{thd}}}{10T_{f}}}>1\)[17], where \(\gamma\) is the path loss exponent. Consequently, given a uniform distribution of nodes with SF \(f\), the number of potential interfering nodes is \(N_{f}\frac{\pi(\min(Rx,d))^{2}}{\pi d^{2}}\), where \(N_{f}\) is the number of nodes with SF \(f\) and \(d\) is the range of the deployment for the given SF: The probability of successful delivery \(P_{f}(x)\) is that within a vulnerability period with duration \(2T_{f}\), none of those potential interfering nodes starts a transmission. Hence, we have:  
\[P_{f}(x)=e^{-2T_{f}\theta N_{f}\frac{(\min(xR,d))^{2}}{d^{2}}}. \tag{1}\]  
The shorter the distance \(x\) to the gateway, the higher the probability \(P_{f}(x)\) of success delivery due to less interferers. The worst case situation appears for nodes that are on the border of the deployment range (i.e., \(x\to d\)). In this case, all nodes with the same \begin{table}
\begin{tabular}{l l} \hline \hline
**Notations** & **Meaning** \\ \hline \(f\) & Spreading Factor (SF) value \\ \(N_{f}\) & Number of nodes with SF \(f\) \\ \(T_{f}\) & Transmission time with SF \(f\) \\ \(payload_{f}\) & Payload size per SF \(f\) \\ \(\theta\) & Packet data rate \\ \(\frac{P_{\rm{pri}}}{L_{pl}}(),d_{0},\gamma,\sigma\) & Path-loss model parameters \\ \(P_{f}^{min}\) & Minimum success probability for SF \(f\) \\ \(P_{given}\) & Minimum required success probability \\ \(C\) & Radio duty cycle constraint (0–1) \\ \(F\) & Set of available SFs \\ \(\mathcal{F}_{i}\) & Set of possible SFs per node \(i\) \\ \(pkt_{i}\) & Number of transmit packets per node \(i\) \\ \(\tau\) & Guard time length \\ \(\Gamma\) & Upper limit in number of slots in a frame \\ \(\mathcal{T}_{f}\) & Number of slots in frame for SF \(f\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Notations and their meaning.