# Narrowband-Internet of Things Device-to-Device Simulation: An Open-Sourced Framework
## 1 Introduction
Moreover, the energy efficiency of NB-IoT is significantly higher than in LTE-M. The battery life of a device can be more than 10 years in the case of NB-IoT, but it is only 5-10 years in LTE-M. Maximum data rates for NB-IoT, SigFox, and LoRa are 250 kbps, 100 bps, and 50 kbps, respectively. In addition, NB-IoT provides lower latency compared to SigFox and LoRa. The authors in [8] argue that because of new developments to miniaturize devices while maintaining higher processing capabilities and low-power networking, it possible for IoT to be deployed widely everywhere. Unfortunately, these advancements require modifications in network structure, software, hardware design, energy sources, and data management. Since regular maintenance and replacement of batteries are unlikely in locations that are difficult to access, IoT devices must consume ultra-low energy so as to last for years. Hence, NB-IoT is a promising solution and is indeed becoming increasingly common as it is extremely energy efficient, whilst offering operational advantages as discussed above. In this paper, we prove that NB-IoT can be power optimized further with the latest 3 rd Generation Partnership Project (3 GPP) tools. These include Device-to-Device (D2D) communications, which is a promising solution for extending the battery life of IoT devices. D2D connectivity between devices near to each other is characterized as direct data traffic. It offers significant promise to enhance power effectiveness, spectrum performance, and throughput, while it minimizes latency and maintains QoS assurances [9; 10]. The recovery of local area networking and the development of spectrum performance are two core issues of LTE-Advanced. D2D communication, which provides mobile peer-to-peer connectivity, can solve these issues [10]. Initially, D2D connectivity was suggested as a new model for optimizing network efficiency in cellular networks [10]. The main \"selling point\" of NB-IoT is its low energy consumption which increases the battery life time of embedded devices [11; 12; 13]. This study considers the NB-IoT'senergy consumption, throughput, and performance model to determine the power profile achieved in an attocell IoT network formed by D2D links. Findings are validated through a developed simulator that uses a Graphical User Interface (GUI) for the NB-IoT protocol with a stack that operates in up and downlinks, multiple users, Multiple-Input Multiple-Output (MIMO) PHY arrays, a Low Energy Adaptive Clustering Hierarchy (LEACH) protocol, Adaptive Modulation and Coding (AMC), and scheduling procedures. This framework is proposed to help reduce the energy consumption of NB-IoT further, and thus aid the rollout of billions of connections over the coming years. The design of the NB-IoT physical layer inherits the main features of LTE. Empirical models are typically used to predict the propagation paradigms for LTE and LTE-Advanced networks [14]. However, NB-IoT presents three physical channels and three signaling channels for downlink: Narrowband Physical Downlink Control Channel (NPDCCH), Narrowband Physical Broadcast Channel (NPBCH), Narrowband Physical Downlink Shared Channel (NPDSCH), Narrowband Primary Synchronization Signal (NPSS), Narrowband Reference Signal (NRS) and Narrowband Secondary Synchronization Signal (NSSS). Two more channels are offered during the uplink: Narrowband Physical Uplink Shared Channel (NPUSCH), and Narrowband Physical Random-Access Channel (NPRACH) [7; 15; 16]. NB-IoT's physical channels, therefore, vary slightly from those of LTE, because NB-IoT's physical channels and signals are multiplexed over time. Of all these downlink and uplink channels, NB-IoT most benefits the data re-transfer mechanism. This leads to lower-order modulation and the diversity of time to upgrade both the efficiency of demodulation and coverage [17; 18].