# Verification of a Probabilistic Model and Optimization in Long-Range Networks
## 3 Results
This effect is particularly noticeable in scenarios with longer ToA, such as those with higher SF values or narrower BW. For example, at \(\lambda\) = 1 packets per second, the probability of packet loss is significantly higher compared to \(\lambda\) = 0.1 packets per second, especially for SF = 12 and BW = 125 kHz as it is seen in Figures 8 and 9 compared to Figures 10 and 11. These findings underscore the importance of carefully selecting and balancing SF, BW, and transmission power to optimize LoRa network performance. In environments with high node density or high traffic loads, using a lower SF and a wider BW can help reduce the ToA and minimize packet collisions. However, in scenarios where long-range communication or higher receiver sensitivity is required, a higher SF and narrower BW may be necessary, despite the increased risk of packet loss. Adaptive algorithms that dynamically adjust these parameters based on real-time network conditions could further enhance the reliability and efficiency of LoRa networks. Figure 8: The graph shows the packet loss probability (\(p_{loss}\)) as a function of the spreading factor (SF) for different bandwidths (BW) in a LoRa network with \(\lambda=1\). Figure 7: The graph shows the relationship between packet loss probability (\(p_{loss}\)) and time on air (ToA) for different spreading factors (SF) with \(\lambda=10\). Figure 9: The graph shows the relationship between packet loss probability (\(p_{loss}\)) and time on air (ToA) for different spreading factors (SF) with \(\lambda=1\). Beyond optimizing network performance, the choice of LoRa parameters also has a direct impact on energy consumption, which is a crucial factor in battery-powered IoT devices. To provide a comprehensive understanding of energy consumption in LoRa networks, the power usage of the Reyax KJLR998 is analyzed in the modules under different parameter configurations. To provide a comprehensive understanding of energy consumption in LoRa networks, we analyzed the power usage of the Reyax RYLR998 module under various parameter configurations. Energy consumption was measured using a high-precision power analyzer, and the results were recorded for different spreading factors (SFs), transmission power levels (PWR), and bandwidth settings (BW). The spreading factor (SF) significantly influences both the airtime of packets and the energy consumption of the device. Higher SF values result in longer airtimes, which increase the energy required for each transmission. This relationship is critical for battery-powered IoT devices, as selecting an optimal SF that balances communication range and energy efficiency is essential. In our experiments, we maintained a fixed payload size of 20 bytes (160 bits), which is typical for IoT applications such as environmental monitoring and smart agriculture. The airtime (\(T_{\text{airtime}}\)) for a LoRa packet can be calculated using the following formula:  
Figure 11: The graph shows the relationship between packet loss probability (\(p_{loss}\)) and time on air (ToA) for different spreading factors (SF) with \(\lambda\) = 0.1. Figure 10: The graph shows the packet loss probability (\(p_{loss}\)) as a function of the spreading factor (SF) for different bandwidths (BW) in a LoRa network with \(\lambda\) = 0.1. \[T_{\text{airtime}}=\frac{\text{Payload Size}\times\text{CR}\times\text{SF}}{\text{BW} \times\text{4}}\]  
where the payload size is 20 bytes (160 bits), CR represents the coding rate (e.g., 4/5), SF denotes the spreading factor, and BW corresponds to the bandwidth (e.g., 125 kHz). Using this formula, we computed the airtime for different SF values, as shown in Table 2. For example, with SF = 7 and BW = 125 kHz:  
\[T_{\text{airtime}}=\frac{160\times 4/5\times 7}{125\times 4}=50\text{ ms}.\]  
The energy consumption per packet (\(E_{\text{packet}}\)) was then calculated using the formula:  
Figure 5:0  
where \(P_{\text{tx}}\) is the transmission power in watts.