# New Results for the Error Rate Performance of LoRa Systems over Fading Channels
## 4 Numerical Results  
In this section, numerical results are presented to validate the proposed error rate analysis. Analytical results are compared with equivalent ones obtained using Monte-Carlo simulations. A number of random samples equal to \(10^{5}\) is used to ensure statistical convergence. The simulation methodology is described in Algorithm 1. Unless otherwise specified, values of SF of 7 and 12 have been assumed. ```
Number of samples \(\geq 0\)\(E_{s}\leftarrow\) SNR errors \(\leftarrow\) 0 Number of samples \(\gets 10^{5}\) whileNumber of samples \(\
eq 0\)do  generate random channel coefficient \(h\) for a given fading distribution generate noise coefficient \(\phi_{i}\) from a normal distribution generate \(\rho^{2}\) as the maximum of exponential random variables if\(\rho^{2}>|h\sqrt{E_{s}}+\phi_{i}|^{2}\)then  errors \(\leftarrow\) errors \(+\) 1 endif  Number of samples \(\leftarrow\)Number of samples \(-\)  endwhile
```  
**Algorithm 1** Monte-Carlo simulation methodology. Figures 2 and 3 depict the BER of LoRa modulation in the presence of Nakagami-\(m\) fading as a function of \(\gamma\) for \(m\in\{1,1.5,2,3,3.55\}\), and SF of 7 and 12, respectively. In both figures, approximate BER results for \(m>1\) were obtained using the approximation presented in Proposition 2 as well as the moment matching method in Proposition 3. The exact BER values were obtained using the two-fold integral in (9), the single integral expression in Proposition 1 and Monte-Carlo simulation based on (5), using \(10^{5}\) random samples. For \(m=1\), i.e., Rayleigh fading, approximate results were obtained using (23). As it can be observed, the approximate formulas obtained using Proposition 2 match well the exact results in the entire SNR region. In addition, the moment matching method yields accurate results for low values of \(m\); nevertheless, deviations from the exact results are observed for \(m>2\) and high SNR values. Finally, for Rayleigh fading, (23) yields very accurate results that are practically indistinguishable from the exact ones. Figure 2: BER of LoRa systems operating in the presence of Nakagami-\(m\) fading as a function of the SNR, \(\gamma\), for SF = 7 and various values of \(m\). Figures 4 and 5 depict the BER of LoRa modulation in the presence of Rice fading as a function of \(\gamma\) for \(K\in\{1,5,10\}\), and SF of 7 and 12, respectively. The exact BER values were obtained using both the two-fold integral in (9) as well as the single integral expression in Proposition 4. In both figures, approximate BER results have also been obtained using the approximation presented in Proposition 5. As it can be observed, the approximate formulas obtained using Proposition 2 match well the exact results in the entire SNR region for all values of \(K\). Figure 4: BER of LoRa systems operating in the presence of Rice fading as a function of the SNR, \(\gamma\), for SF = 7 and various values of \(K\). Figure 3: BER of LoRa systems operating in the presence of Nakagami-\(m\) fading as a function of the SNR, \(\gamma\), for SF = 12 and various values of \(m\). Next, we estimate the BER of LoRa systems in an agricultural environment, described in detail in [41]. In that work, an experimental test bed exploiting smartphone components was utilized in a measurement campaign, performed under realistic, in terms of agriculture, conditions. Specifically, part of the measurement campaign focused on measuring the Received Signal Strength Indicator (RSSI) for various distances between the LoRa radio modules participating in the experiments and for various transmit power level settings. Both LoRa radios had their transmit power adjusted to 10 dBm, the SF was set to either 7 or 11 and the bandwidth (BW) was 125 kHz or 250 kHz. It has also further been assumed that small scale fading is modeled by the Rice distribution with \(K=2.63\) dB, a typical value encountered in rural environments [42]. The noise power equals \(-85\) dBm.