# Narrowband-Internet of Things Device-to-Device Simulation: An Open-Sourced Framework
## 2 Overview of D2D Communications in Cellular Networks  
A communications device can be used to transmit information, instruct, and establish a connection between a sending and a receiving device. Similarly, Device-to-Device (D2D) communication pertains to a radio technology that allows direct wireless links between mobile users to establish a connection to communicate with each other directly without routing data paths through a network infrastructure. In other words, this type of communication can be used between cellular devices and assists to transmit signals and communicate without traversing the BS. According to study [28], D2D transmission gives a procedure for sending the narrowband user equipment procured information to the BS, efficiently utilizing the spatially close mobile device, which considers transferring hubs to help distribute D2D in task rounds. All communications between devices must be done through the BS in conventional cellular networks regardless of whether D2D communication is within two mobile users' reach [29]. Communications between devices through BS sets off customary low data mobile services. For example, these services can include voice calls and texting. Nonetheless, at present mobile users utilize high data mobile rate services for communication. For example, this can contain social media, localizing (position-based services), and live videos, which they might be in a reach for direct communications (short distances) such as D2D communication. Moreover, D2D communications in such situations can enormously expand the network spectral utilization and effectiveness, which aids cellular network performance. Consequently, D2D communications can also enhance energy efficiency, throughput, fairness, higher data rates and latency reduction, as well as offer novel applications [29; 30]. In 2012, after the Long-Term Evolution (LTE) Release 12, D2D communication in cellular networks was first introduced to enable peer-to-peer communications between spatially adjacent mobile devices [28]. D2D interaction is normalized in the 3 GPP to find and impart between two gadgets. The design allowed a D2D device to discover close-by gadgets. Moreover, LTE also sends information to the anchor BS utilizing resources of the close-by device given by the BS as an alternative once the immediate connection to the BS is impossible. In addition to this, this helps to use re-usability of spectrum effectively. Definitively, this will also play a significant role in accomplishing data sending/receiving with lower power consumption [28]. D2D communication is applicable to IoT, mainly when the power budget of embedded devices prohibits direct communications with the cellular network infrastructure [31]. IoT is an emerging paradigm and refers to a system of interrelated computing devices that can collect and exchange data using embedded sensors over a wireless network without human intervention. In contrast, D2D communication is considered a promising technology to make ultra-low latency communication possible. The concatenation of D2D with the IoT can produce energy-efficient and low-latency interconnected wireless networks. For example, the Internet of Vehicles (IoV) is a D2D-based IoT network where real-time communication occurs among two or more devices. These devices can be cars, smartphones, wearables, or roadside units, among others. Furthermore, the IoV ensures efficiency and safety aspects. For instance, at high speed, a vehicle cautions compact vehicles by D2D communication before the vehicle speed declines or moves to another lane [32]. These little gadgets ought to work over a reasonable distance without devouring an excessive amount of power. These small gadgets exchange small amounts of data/information but consume significant power for communications, compared to data gathering and processing. Therefore, a D2D NB-IoT communication framework seems a viable solution to the problem [31]. According to [PERSON] et al.