# Modeling Network-Controlled Device-to-Device Communications in SimuLTE
## 1 Introduction  
The now ubiquitous diffusion of 4G cellular networks, under the commercial names of Long Term Evolution (LTE) and LTE-Advanced (LTE-A), makes them ideal candidates to support new scenarios such as Smart Cities, Connected Vehicles, Machine-to-machine (M2M) communications [1] and Industry 4.0. LTE-A runs on licensed spectrum, which is therefore reliable, has plug-and-play capabilities, built-in security features and QoS mechanisms. It is also foreseeable that the upcoming 5G standards will embody the basic design principles of LTE-A, evolving them to fit the new paradigm. A feature that has appeared in the latest LTE-A standards, which also represents a pillar of current 5G-oriented research, is device-to-device (D2D) communications, whereby two User Equipments (UEs) can communicate directly, without their traffic being relayed by the evolved Node-B (eNB) as in traditional cellular communications. The benefits of D2D communications are manifold, for both thenetwork operator and the user. From an operator standpoint, D2D transmissions can be supervised by the eNB, in a network-controlled approach: the eNB remains in charge of the scheduling and resource allocation, but cuts itself off from data-plane transmission. This makes D2D transmissions reliable, unlike those in ad-hoc networks, where single mobiles have to contend for spectrum access through carrier sensing, collisions and backoffs. This very feature allows the eNB to enforce frequency reuse, allowing simultaneous D2D transmissions to occur on the same frequency resources, provided that the respective receivers are distant enough, which enhances scalability. From a user standpoint, D2D transmissions are normally faster, since they require a single hop instead of two (i.e., uplink first to the serving eNB, and downlink next to the receiving UE). Moreover, they enable proximity services, i.e., services where the endpoints of the communications must be in geographical proximity. Proximity services include those for IoT transmissions (e.g., [2; 3]) and those for vehicular systems (e.g., for platooning [4; 5] or collision alert [6]). A different paradigm, still based on D2D communications, is that of network-unassisted communications, whereby LTE-A UEs setup either point-to-point or point-to-multipoint communications without the help of the eNB. This is useful, for instance, in public-safety scenarios, where UEs can setup an emergency infrastructureless network, or to extend network coverage using UEs as relays [7]. The main issues with network-unassisted D2D, such as device discovery and synchronization, are different from those of network-controlled D2D, such as frequency reuse and mode selection. This paper deals with network-controlled D2D communications (henceforth, D2D communications). D2D communications introduce several challenges that have been studied by the research community [8]. However, evaluating services based on D2D communications in LTE-A is a challenging task. To date, few testbeds, if any, have been made available to the public. In any case, testbeds are unlikely to scale to the levels required to test these systems effectively (i.e., with interference from competing non-D2D transmissions, across multiple cells, and in mobility). On the other hand, link-level simulators (e.g., [9]) are designed for different purposes: they model the channel--specifically, the D2D channel or sidelink (SL)--sometimes to a great level of accuracy, but they neglect the upper layers of the system, which--as we show in this paper--play a crucial role in the performance of such services. In this paper, we show how D2D communications are modeled in SimuLTE, an open-source simulation library for system-level simulation of LTE/LTE-A cellular networks based on OMNeT++, which is widely used in the research community [10; 11]. By simulation library, we mean a collection of models with well-defined interfaces, which can be instantiated and connected to build arbitrarily complex simulation scenarios.