## 5 Collision Calculation Through Packet Error Rate  
Path loss model used for simulation in this paper is Hata Model [42] with correction factor of urban environment (9 dB) and described as follows:  
\[L=26.1\text{log}_{10}(f)-13.8\text{log}_{10}(h_{B})-3.2(\text{log}_{10}(11.5h _{M}))^{2}-4.9+[44.9-\text{log}_{10}(h_{B})]log_{10}(d) \tag{15}\]  
where \(L\) is the path loss, \(d\) represents the distance between transmitter and receiver, \(f\) is the frequency of operation \(h_{B}\) is the height of base station and \(h_{M}\) is the height of the LoRa device. The sensitivity of LoRa is given in Equation (16). \[S=-174+10\text{log}_{10}BW+NF+SNR \tag{16}\]  
Equation (15) follows the long-distance path loss model [42] of radio propagation, and thus the received power of an individual node \(n\) at gateway \(k\) is given by Equation (17), which presents the long-distance path loss model used to estimate signal attenuation as a function of distance, helping with network planning, link budgeting, predicting signal strength, and interference management. \[LR_{n,k}^{r}=P_{n}^{t}-\overline{PL}(d_{0})-10\gamma\log(\frac{d_{n,k}}{d_{0} })-Y_{\sigma} \tag{17}\]  
where \(P_{n}^{t}\) is the transmitted power, while the mean path loss is represented as \(\overline{PL}(d_{0})\), \(d_{0}\) is the reference distance for the calculation of path loss, and \(d_{n,k}\) defines the distance from node \(n\) and gateway \(k\). \(Y_{\sigma}=N(0,\sigma)\) represents a random variable with a Gaussian distribution, while \(\sigma\) is standard deviation with mean 0. Packet generation is considered to follow Poisson distribution. The probability of each LoRa station represented as \(n\) transmitting \(l\) packets over a period \(T\) is \(c(l)=\frac{(\phi T)^{l}e^{-\phi T}}{l}\), where \(\phi\) is the message sending rate of LoRa;thus, the non-transmission probability of LoRa will be \(Q(l=0)=\prod\limits_{i=1}^{N}e^{-\phi T}=e^{-\phi TN}\). LoRa uses ALOHA for transmission and has quasi-orthogonality [43] to different SFs by means of capture effect [44], which enables successful reception in case of overlapping transmissions with 6 dB difference, i.e., same SF and different SF: The reception at the LoRa gateway is decoded on the basis of a threshold SNR and interference value. The delivery ratio \(D_{n}\) of a node \(n\) transmitting to \(k\) gateways will depend on the number of \(n\) transmitting devices in that window with same SF and the distance of such nodes from each other and gateway \(k\). Successful reception will also be a function of ToA (\(T_{s}\)) and interfering LoRa devices also transmitting with same SF represented as \(IF_{n.SF}\)[44] and given as Equation (18). \[D_{n}=\prod\limits_{SF=7}^{12}e^{-\phi T_{1}IF_{n.SF}}=\exp\left(-\phi\sum \limits_{SF=7}^{12}T_{s}.IF_{n.SF}\right) \tag{18}\]  
Packet transmission rate is \(\phi\beta_{s}\), where \(\beta_{s}\) is packet generation rate following a Poisson distribution and defined as \(\beta_{s}=1-100(1-\beta)\phi T_{s}\). Delivery ratio incorporating effects of duty cycling can be further improved as given in Equation (19). \[D_{n,\beta_{s}}=\exp(-\phi\sum\limits_{SF=7}^{12}T_{s}.IF_{n.SF}\beta_{s}) \tag{19}\]  
LoRa gateways work in a star of stars, and devices are not associated with any single gateway, thus transmissions are received by multiple gateways, which forward messages to the network server for weeding out duplicate messages. A collision occurs when two or more than two LoRa devices transmit and generate interference, taking that at least one node transmits \(N_{n}^{1,2}\) and generates no interference event denoted as \(C_{N_{n}^{1,2}}\), its complement will be case of collision given as \(C_{N_{n}^{1,2}}^{\prime}\), probability of such event will be \(\mathrm{P}(C_{N_{n}^{1,2}}^{\prime})\) and further given in Equation (20), also describing probability of a complementary event in a communication system, involving collision avoidance or successful transmission in a multi-node network.