# Narrowband-Internet of Things Device-to-Device Simulation: An Open-Sourced Framework
## 1 Introduction  
The Internet of Things (IoT) is as an emerging technology that can connect trillions of embedded devices at once. This enables innovative applications in almost every sector. Examples are intelligent connected vehicles, monitoring systems that share real-time information, unmanned aerial vehicles, the smart grid, smart homes, smart cities, and smart farming. The IoT is changing the world of logistics, construction, healthcare, operation and maintenance of infrastructure, and a lot more. The IoT has increasingly gained research awareness with its ability to forecast, monitor, prevent, and track infectious disease epidemics. IoT-based health management schemes offer instantaneous observation from wearable appliances and Artificial Intelligence (AI), including neural networks, deep learning algorithms, and remote tests through cloud computing to conduct health investigations [1]. As a result, medical staff can detect the coronavirus disease-2019 (COVID-19) without jeopardizing their lives or causing the virus to spread to other locations [2]. IoT-based healthcare systems can be an important advancement in the measures to combat the current pandemic [1]. For IoT connectivity, there are different communication technologies to connect the actuators and sensors. Wireless Fidelity (Wi-Fi, based on IEEE 802.11) networking is one of the most widely used protocols for connectivity. Users' equipment can access the network through a single access point. The topologies in Wi-Fi involve peer-to-peer andstar topologies with an expanded coverage of up to 100 m. The topology of peer-to-peer connectivity is compatible with an advanced feature of 5G mobile peer-to-peer connections, notably Device-to-Device (D2D) communications. This has allowed emergency systems based on IoT to collect and send information automatically and reliably over the Internet [3]. In addition, Wi-Fi (IEEE 802.11 AC) is a 2.4 to 5 GHz band system. Due to its geographic range and high data rate, Wi-Fi infrastructure yields high energy consumption. Therefore, it is typically used in situations that need high data rates such as wireless monitoring cameras [3]. Bluetooth Low Energy (BLE) has also helped IoT to grow rapidly [4]. The number of nodes that can be supported by Wi-Fi or BLE depends on operational circumstances. However, the number of devices on Wi-Fi can reach up to 250, depending on the capabilities of the access points [5]. On BLE, up to seven devices can be linked simultaneously and can exchange data using the BLE standard. The main performance metrics that Wi-Fi can achieve involve performing at a high data rate, improving the scalability of the number of nodes, protecting user identity, mobility, reliability, and zero complexity. However, long battery life has not been achieved successfully with Wi-Fi, whilst long range has not been achieved with BLE. Neither of the two can ensure a guaranteed Quality of Service (QoS), which is because of the use of license-exempt spectrum. These embedded connectivity technologies have been deployed over short ranges, but they have proven to be unsuccessful at meeting the escalating demands of IoT devices. These principally require technologies that consume low energy and long communications range [6; 7]. As a result, Low-Power Wide Area Network (LPWAN) technologies have arisen. The most advanced LPWAN systems providing large-scale coverage are Narrowband-Internet of Things (NB-IoT), (to some extent) Long Term Evolution for Machines (LTE-M), LoRa, and SigFox. Cellular networks have been implemented to provide larger connectivity coverage, but because of the high energy usage on nodes, they were not as effective [6; 7]. Furthermore, the growing use of LPWANs in industry and the research community is driven by the long-range, low cost, and low-energy functionalities of these systems. However, NB-IoT introduces a guaranteed QoS when compared wtih SigFox or LoRa due to the use of licensed spectrum. QoS assurance is an important concern for industrial IoT.