## 7 Results and Discussion
### Experiment 2: Comparison of the GD Algorithm with Previous Reported Algorithms  
In this experiment, the simulation was conducted to compare DER values between the GD algorithm at the optimal \(p\) = 0.5, the default ADR scheme [11], and previously reported algorithms, namely, EXPLoRa [14], QCVM [19], and SD [20]. Tables 6 and 7 display the SF assignment for uniform random and fixed patterns, respectively. The result in Figure 10 clearly addresses a substantial impact of SF distribution on the DER value. Optimizing the SF distribution with the GD algorithm results in the overall highest DER, with a 4.8% and 14.3% improvement over the default ADR scheme for uniform random and fixed patterns, respectively. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Algorithm** & **\%SF7** & **\%SF8** & **\%SF9** & **\%SF10** & **\%SF11** & **\%SF12** \\ \hline Default ADR & 70.00 & 16.53 & 13.47 & 0.00 & 0.00 & 0.00 \\ \hline EXPLoRa & 16.67 & 16.67 & 16.67 & 16.67 & 16.67 & 16.67 \\ \hline QCVM & 33.40 & 33.40 & 33.20 & 0.00 & 0.00 & 0.00 \\ \hline SD & 25.60 & 37.47 & 14.27 & 14.47 & 6.33 & 1.87 \\ \hline GD & 34.73 & 33.13 & 24.60 & 4.07 & 2.07 & 1.40 \\ (\(p\) = 0.5) & & & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 6: SF allocation from the GD algorithm at \(p\) = 0.5, default ADR scheme, and previous algorithms for the uniform random pattern. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Algorithm** & **\%SF7** & **\%SF8** & **\%SF9** & **\%SF10** & **\%SF11** & **\%SF12** \\ \hline Default ADR & 89.67 & 5.40 & 4.93 & 0.00 & 0.00 & 0.00 \\ \hline EXPLoRa & 16.67 & 16.67 & 16.67 & 16.67 & 16.67 & 16.67 \\ \hline QCVM & 33.40 & 33.40 & 33.20 & 0.00 & 0.00 & 0.00 \\ \hline SD & 35.20 & 32.73 & 17.33 & 12.67 & 1.33 & 0.73 \\ \hline GD & 45.53 & 27.67 & 16.93 & 5.40 & 2.67 & 1.80 \\ (\(p\) = 0.5) & & & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 7: SF allocation from the GD algorithm at \(p\) = 0.5, default ADR scheme, and previous algorithms for the fixed pattern. Figure 9: DER values after applying the GD algorithm to the fixed and uniform random patterns. Experiment 3: Network Performance Evaluation of the GD Algorithm Based on Coverage Area, Payload Size, and Energy Consumption  
We aimed at assessing the GD algorithm on the expansion of the coverage area as it is a crucial factor that influences SF assignment [19,20]. By expanding the coverage area from 2 to 5 km (to reflect the actual farm area), the proposed GD algorithm achieved a DER of 74%, higher than other algorithms, as shown in Figure 11. The DER of the default ADR scheme also improved at 4-5 km due to more node allocation to SF8 and SF9. We also assessed the GD algorithm on the payload size, which plays an important role in defining the range of transmitted data. From Figure 12, a decline in DER as the payload size increases is observed for all algorithms. Remarkably, the proposed algorithm demonstrates notable improvement, surpassing the default ADR scheme by more than 13% at a payload size of 255 bytes. This finding indicates the potential of the GD algorithm to successfully carry the larger load over the air. Figure 11: The DER values vs. the coverage area within different algorithms. Figure 10: DER comparison between different algorithms for fixed and uniform random patterns. Node energy consumption is primarily influenced by Time-on-Air (ToA) and node power. As shown in Equations (4) and (5), ToA is a function of spreading factor (SF), implying that different SF allocation algorithms will result in varying ToA and, thus, node energy consumption. Figure 13 shows the total ToA when increasing the simulation time from 1 h to 12 h. While gateway and server energy consumption in existing LoRaWAN networks remains largely unaffected by SF allocation algorithms, node energy consumption is a significant factor differentiating the overall network energy usage.