# Analysis of Bidirectional ADR-Enabled Class B LoRaWAN Networks in Industrial Scenarios
## 6 Results  
The network was simulated for the following cases:  
- No ADR with fixed SF;  
- R implementation class A only;  
- ADR implementation for downlink with class B end devices. Firstly, the correct behavior of the ADR mechanism implemented was tested by checking the changes in SF according to SNR, ED positions, and time. Fixing an upload periodicity of one packet every 1800 s, the ADR mechanism was configured with different counter limits to perform the maximum SNR calculation. This was studied in order to check the time intervals and delays in SF change and later assess the impact on PDR and power consumption. Figure 8 shows the evolution of the number of EDs that reach each SF during simulations for a SNR\({}_{\text{sc}}\) of 5, reaching SF7 in 270 min, while Table 6 shows the resulting values for all configurations. The representation of the SF evolution for the other configurations follows the same shape, but with longer time intervals (for the same upload periodicity and SNR\({}_{\text{sc}}\) configured as 20, SF7 is reached in 720 min). The results show that further end devices were never able to perform any data rate change, while nearer devices were able to reach SF7. This behavior can be seen clearly in Figure 9 for the uplink. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multicolumn{2}{c}{**Configuration**} & \multicolumn{1}{c}{**PDR**} & \multicolumn{1}{c}{**PDR**} & \multicolumn{1}{c}{**PDR**} & \multicolumn{1}{c}{**PDR**} & \multicolumn{1}{c}{**Time to**} \\ \hline \multirow{2}{*}{ \begin{tabular}{c} **Upload** \\ **Periodicity** \\ \end{tabular}  } & \multirow{2}{*}{ \begin{tabular}{c} **SNR\({}_{\text{sc}}\)** \\ **Vplink ADR** \\ \end{tabular}  } & \multirow{2}{*}{ \begin{tabular}{c} **Uplink ADR** \\ **Update ADR First warehouse** \\ \end{tabular}  } & \multirow{2}{*}{ \begin{tabular}{c} **Uplink First warehouse** \\ **(SF12)** \\ \end{tabular}  } & \multirow{2}{*}{ \begin{tabular}{c} **Uplink First warehouse** \\ **(SF7)** \\ \end{tabular}  } & \multirow{2}{*}{\ \begin{tabular}{c} **Downlink ADR** \\ **(SF7)** \\ \end{tabular}  } & \multirow{2}{*}{ \begin{tabular}{c} **Optimal SF** \\ \end{tabular}  } \\ \hline \multirow{3}{*}{300 s} & 5 & 93.90\% & 94.03 & & & 99.26\% & 45 min \\ \cline{2-7}  & 10 & 93.90\% & 94.03 & & & 99.26\% & 1 h 10 min \\ \cline{2-7}  & 20 & 93.90\% & 94.03 & & & 99.26\% & 2 h \\ \  
Regarding the resulting map for the proposal of using ADR in the downlink stage, Figure 10 shows that more than one-half of the EDs were able to operate in SF7 and SF8, instead of those predefined by the standard's recommendation of SF9. Under the same scenario, the results with and without ADR enabled were compared in order to check the impact on several metrics, such as PDR and energy consumption. The PDR achieved for the SNR sample counter simulated shows that reducing the number of samples needed for the ADR mechanism to start changing the SF in EDs did not impact the PDR in this scenario. This allows assuming that in the conditions studied, it is better to react faster and adapt to the channel conditions so EDs reach the optimal SF more rapidly. Nevertheless, there was an increase in PDR when sending fewer messages (as in upload periodicity = 1800 s), which could be seen in all configurations. These better PDR results for higher upload periodicity were expected as LoRaWAN MAC protocol is similar to pure Aloha in terms of scalability performance, meaning that the performance degrades when the load on the link increases. On the other hand, configuring the network with the lower SF without any ADR mechanism achieved overall similar results, with a difference of less than 0.5% between SF7 and ADR. Nevertheless, there were areas where using the ADR showed the advantage of using different SFs to avoid collisions. This is reflected in Table 6, as the statistics for the simulation without ADR enabled were calculated for the nearest warehouse, which is the more critical area.