# Narrowband-Internet of Things Device-to-Device Simulation: An Open-Sourced Framework
## 5 Conclusions and Future Work  
An NB-IoT network topology in the implementation of the LEACH protocol reduced the queuing delays (latency) at the BS, thus decreasing energy consumption, increasing battery lifetime, minimizing communication cost, permitting better network wrapping, maintaining efficient bandwidth use, and preventing malicious node attacks. These advantages enhanced the whole network's lifetime and performance. Moreover, our NB-IoT D2D framework allows researchers and system designers to evaluate different parameters and develop improved NB-IoT designs, increase performance, and reduce the cost of building, operating, and maintaining them since wireless communication of the future will be heavily influenced by the QoS experienced in communication and devices' expected battery lifetime. In future, this study could be used to transfer the NB-IoT D2D attocell network to domotic applications in microcells, such as smart homes, and industrial applications to be incorporated into larger systems, such as suburban and urban scenarios involving smart cities, smart grids, smart vehicles, and rural areas comprised of smart farms, as well as the implementation of mobile users' equipment. This research could also be used to detect different selective malicious node attacks that compromise the routing protocols in the networking layer of NB-IoT systems, study their effects, and use machine learning-powered  
Figure 36: Number of live nodes per round \(r\) without the LEACH algorithm (i.e., conventional NB-IoT). Figure 37: Final result when all nodes die. network communication management. This simulation tool will also contain Simulink models as devices to represent communication features in the physical and application layers, including Excel data sets for managing the input and output variables for analysis purposes. We also hope to improve our simulation to be integral and compatible with new technologies, such as sixth-generation wireless networks. In future, we also intend to develop a cross-layer involving MAC (OFDMA, SC-OFDMA) and LEACH using AI techniques with NB-IoT D2D. Supplementary Materials: Supplementary Materials are available online at [[https://www.mdpi.com/1424-8220/21/5/1824/s1](https://www.mdpi.com/1424-8220/21/5/1824/s1)]([https://www.mdpi.com/1424-8220/21/5/1824/s1](https://www.mdpi.com/1424-8220/21/5/1824/s1)). Conceptualization, O.S.A. and M.D. ; methodology, O.S.A. and M.D. ; software, O.S.A. and M.D. ; validation, O.S.A. and M.D. ; formal analysis, O.S.A. and M.D. ; investigation, O.S.A. and M.D. ; resources, O.S.A. and M.D. ; data curation, O.S.A. and M.D. ; writing--original draft preparation, O.S.A. ; writing--review and editing, O.S.A. and M.D. ; visualization, O.S.A. and M.D. ; supervision, O.S.A. and M.D. ; project administration, O.S.A. ; funding acquisition, O.S.A. and M.D. All authors have read and agreed to the published version of the manuscript. Conceptualization, O.S.A. and M.D. ; methodology, O.S.A. and M.D. ; software, O.S.A. and M.D. ; formal analysis, O. * [PERSON] et al. (2017) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] Narrowband internet of things: Simulation and modeling. _IEEE Internet Things J._**2017**, \(5\), 2304-2314. [CrossRef]
* [PERSON] et al. (2012) [PERSON]; [PERSON]; [PERSON] Studying different propagation models for LTE-A system. In Proceedings of the IEEE 2012 International Conference on Computer and Communication Engineering (ICCCE), Kuala Lumpur, Malaysia, 3-5 July 2012; pp. 848-853. * [PERSON] et al. (2019) [PERSON] [PERSON]; [PERSON] [PERSON]; [PERSON] [PERSON]; [PERSON] [PERSON] On the latency-energy performance of nb-iot systems in providing wide-area iot connectivity. _IEEE Trans. Green Commun. Netw._**2019**, \(4\), 57-68. [CrossRef]
* [PERSON] et al. (2017) [PERSON]; [PERSON] [PERSON]; [PERSON] [PERSON]; [PERSON] [PERSON]; [PERSON] [PERSON]; [PERSON], [PERSON] Evaluation methodologies for the NB-IOT system: Issues and ongoing efforts.