# LoRa Resource Allocation Algorithm for Higher Data Rates
## 3 LRA Algorithm Framework
### Resource Allocation Algorithm
For the SF = 7 and 9 combination, the BR improvement is 24.97%, 16.06%, and 18.25% across the same BWs. Figure 12 illustrates the energy consumption profile of our parallel setup using the proposed LRA algorithm, based on Equations (14)-(18). The transmitter amplifier and the receiver low noise amplifier consume the largest portion of the total energy. However, SF combinations 7 and 8, and 7 and 9 significantly reduce transmission time, allowing the amplifiers to remain active for shorter durations compared to a single transceiver setup. As a result, the LRA algorithm demonstrates better energy efficiency than the traditional single setup for SF combinations 7 and 8, and 7 and 9 across all BW values. Figure 11: Bit rate improvement of parallel setup compared to single setup. Figure 10: \(T_{x}\) improvement of parallel setup compared to single setup. Next, we measured the ratio of errored bits to the total image bits to calculate the BER of the LC with a BW of 125 kHz and varying SFs. The experiments are carried out in the same location as earlier in this subsection, with the transmit power altered at the transmitter to have SNR values in the range of \([-30,0]\) dB. Figure 13 illustrates the BER of different parallel communication setups compared to the analytical BER of a single LoRa physical channel with a BW of 125 kHz and SFs of 7, 8, and 9, as reported in [25]. The solid lines represent the theoretical BER of single LoRa communication links in an LoS scenario with the presence of Additive White Gaussian Noise (AWGN). It is evident that utilizing a lower SF increases the probability of error in LoRa communications. In our proposed parallel setup, higher SF combinations achieve better BER with SF = 8 and 9 lying just above single SF = 8, outperforming single SF = 7. LCs operating on SF = 7 and 9 and SF = 7 and 8, which improve the \(T_{tx}\), perform worse than a single transceiver on SF = 7 in terms of probability of error. This is reasonable due to the inter-SF interference of a parallel communication link and the fact that our results are derived from experimental data rather than theoretical models. As shown in Figure 13, for SNR values greater than \(-5\) dB, the BER remains within acceptable limits, demonstrating the viability of our parallel communication setup. Finally, the quality of the images received through the LC are investigated. Allowing sufficient delay time for packet processing at the receiver along with maintaining an adequate SNR value (higher than \(-5\) dB for LoS communication link), results in high-quality images with BER of approximately \(10^{-3}\) or less. However, reducing delay times to minimize the total \(T_{tx}\) or maintaining a lower signal power to reduce energy consumption will compromise image quality by increasing the probability of errors in the received data. Figure 14 illustrates the impact of utilizing delay times shorter than those derived from our experiments (left column) and the effect of SNR values below \(-5\) dB (right column) on the quality of the received image for the parallel setup operating on SFs 7 and 8 and \(\text{BW}=250\) kHz. The quality of the received image is measured in terms of the ratio of bits received in error to the total number of bits (Error) and packet delivery rate (PDR). Additionally, the Structural Similarity Index Measure (SSIM) of the received image under different delay times and SNR values is calculated. Figure 15 presents the SSIM maps for those received images where lighter gray corresponds to higher similarity (SSIM values closer to 1) and darker gray indicates lower similarity (SSIM values closer to 0). The reference image for this metric is the transmitted image. Figure 13: Comparison of BER of our LC (dashed lines) with single transceiver setup (solid lines) using SFs 7, 8, and 9. Figures 14 and 15 highlight the tradeoff between the quality of the image received and the \(T_{tx}\) or SNR.