# An Adaptive Data Rate Algorithm for Power-Constrained End Devices in Long Range Networks
## 5 Adaptive Data Rate Algorithm Design
### Adaptive Data Rate Control Algorithm Based on Network Performance Optimization
#### 5.2.2 Adaptive Data Rate Algorithm for Network Performance Optimization
At the same time, the average latency of the EDs under the proposed ADR algorithm is slightly lower than that of the other three algorithms. This is primarily due to the proposed algorithm's link state awareness, which obtains the transmission power and a list of selectable data rates for each ED, optimizing the stability and reliability of communication links. To further optimize network performance metrics, the algorithm \begin{table}
\begin{tabular}{l l} \hline \hline
**Parameter** & **Value** \\ \hline BW & 62.5 kHz \\ SF & 12 \\ Coding Rate & 4/5 \\ Preamble Length & 10 Bytes \\ Packet Length & 20 Bytes \\ Transmission Power & 20 dBm \\ Channel Frequency & 500 MHz \\ Packet Generation Rate & 1 packet every 20 s \\ \hline \hline \end{tabular}
\end{table} 
Table 11: Initial communication parameter configuration of EDs in the network. Figure 19: Actual deployment of GW and EDs. continuously adjusts the data rates of the EDs, ultimately finding a set of optimal data rate combinations that minimize packet collision probability, maximize network throughput, and minimize average latency. By comprehensively considering the link state of the EDs and network performance, the algorithm minimizes average power consumption while maximizing network throughput and minimizing average latency. ### Algorithm Complexity Analysis

On a standard server equipped with a 2.4 GHz CPU and 8 GB of memory, the execution time of the algorithm can be divided into two parts. First, the transmission power and selectable data rate list for each ED are extracted based on the link state, with the algorithm's complexity being. The runtime for a single ED is 8.012 ms, which includes saving the relevant information. Second, based on the selectable communication parameters of the EDs in the network, the data rate required to achieve optimal network performance for each ED is calculated, with the complexity increasing as the number of EDs in the network grows. In a scenario with 50 EDs and 500 iterations, the total execution time of the algorithm is 0.95 s. This demonstrates that the algorithm can meet application requirements. ## 7 Conclusions and Future Work

This paper proposes an ADR algorithm specifically designed for LoRa networks with EDs constrained by limited power in actual deployments. First, based on link state

Figure 21: Comparison of network throughput and average latency of EDs for different ADR algorithms. Figure 20: Comparison of average power consumption of EDs for different ADR algorithms. awareness, the algorithm assesses the transmission power and optional data rate list for each ED in the network. Second, considering network throughput, average ED power consumption, and average ED delay, an optimization model is established to determine the objective function for network performance enhancement, leading to the design of an algorithm capable of adaptively adjusting the data rate. Finally, the proposed algorithm is validated in a deployed LoRa network. The proposed ADR algorithm achieves adaptability in static ED scenarios through link state awareness and dynamic adjustments. Specifically, the algorithm dynamically selects appropriate transmission power and data rates by real-time evaluation of link states such as SNR and RSSI. This effectively addresses fluctuations in channel quality, interference, and changes in network topology, ensuring optimal communication performance across various scenarios. The proposed algorithm, based on real-time monitoring and parameter adjustment, demonstrates adaptability in multiple scenarios, including static and dynamic node deployments and variations in network density. Additionally, by integrating ED power consumption, network throughput, and delay models, the algorithm can flexibly optimize communication parameters to enhance overall network performance.