## 8 Conclusions  
This research endeavored to enhance the performance of the LoRaWAN by addressing collision probability issues, specifically aiming to reduce instances of the same SF. Various algorithms employed in the past often incorporated RSSI optimization on random and normally distributed node patterns. Our contribution to this domain introduced a novel algorithm based on the geometric distribution (GD), where we applied this algorithm to real-world scenarios that possessed certain node patterns with biased SFs. One outstanding attribute of the GD algorithm is its adaptability in selecting the weight factor (\(w\)) through the \(p\)-value, allowing for precise customization of SF distribution. Results from our study indicated that the proposed algorithm achieved significant improvements in both optimal SF assignment and DER values compared to previous algorithms. Specifically, the fixed pattern exhibited an impressive enhancement of 14.3%, while the uniform random pattern exhibited a 4.8% enhancement over the default ADR scheme. Expanding the coverage area and increasing the package size further underscored the efficacy of the proposed algorithm, consistently yielding the highest DER values. However, it was important to note that achieving these improvements required allowing higher energy consumption and time-on-air since larger SF values were also assigned. To effectively manage energy consumption, it is advisable to limit the proportion of larger SFs. However, this may inevitably impact the DER. Consequently, a careful balance between DER and energy consumption must be considered, necessitating appropriate adjustments to the algorithm. Additionally, as highlighted in a previous study [19], the GD algorithm's performance may be less optimal in environments with uniformly distributed or non-dominant SFs. To address this limitation, a preliminary assessment of the node distribution pattern could be conducted using an additional function within the algorithm. Looking ahead, the GD algorithm emerges as a valuable tool for resource allocation, especially in scenarios where there are mostly the same SF nodes in one area. This algorithm holds promise for optimizing resource distribution and finding the most efficient pathways. To enhance the GD algorithm's performance, integrating machine learning techniques such as long short-term memory (LSTM) and deep learning [27] could be beneficial. LSTM can be used to predict energy consumption patterns, enabling more efficient packet transmission timing and reducing overall energy consumption. Deep learning  
Figure 14: Energy consumptions from 1 h to 12 h of simulation time within different algorithms. can be applied to optimize coverage capacity by leveraging LoRaWAN traffic models. Decentralized approaches employing multi-class support vector machines (SVMs) and artificial neural networks (ANNs) [28] can be applied to effectively allocate nodes into clusters for optimal SF allocation. Additionally, a deep generative model like the variational autoencoder (VAE) model [29] can be applied to identify the optimal SF settings for various scenarios by simplifying the complex relationships between different parameters that affect SF allocation. These advancements could potentially expand the applicability of this algorithm beyond LoRaWAN to other wireless communication technologies, including Sigfox, Wi-Fi, and 5G. The adaptability and effectiveness of the geometric distribution algorithm position it as a potential solution for future advancements in long-range wireless communication optimization. Conceptualization, P.T. and R.S. ; methodology, P.T. and R.S. ; software, P.T. ; validation, P.T. and R.S. ; formal analysis, P.T. and R.S. ; investigation, P.T. ; resources, P.T. ; data curation, P.T. ; writing--original draft preparation, P.T. and R.S. ; writing--review and editing, R.S. ; visualization, P.T. ; supervision, R.S. ; project administration, R.S. ; funding acquisition, R.S. All authors have read and agreed to the published version of the manuscript.