# Modeling Network-Controlled Device-to-Device Communications in SimuLTE
## 4 Overview of the SimuLTE Architecture
### Modeling Message Transmission and Interference
Therefore, the list of which eNB uses which RB can be constructed by simply querying the eNB's MAC layers. Since a transmission occurring at TTI \(t\) is decoded at TTI \(t+1\), each eNB must keep track of the allocations at the previous TTI, which is done by flipping between an actual and a past allocation maps on each TTI. For the UL transmissions, however, the situation is slightly more complex. The eNBs do have a map of which UE was granted which RBs on each TTI, but UEs may use a grant only partially or not at all, hence relying on the eNB allocation maps would sometimes create inconsistencies. Our choice is to maintain a global UL transmission map (UTM) data structure (stored within the Binder) that keeps track of which UEs were using which RBs at both the current and the previous TTIs. When a UE's PHY layer transmits the message, it registers which RBs it is using in the Binder's UTM. The receiving eNB, then, computes the set of interferers on each RB by scanning the UTM. Note that the number of UEs using a given RB is at most one per cell (unless frequency reuse is in place, which happens with D2D transmissions--see Section 5.2), hence interference computation is generally fast. The above mechanism allows a correct accounting of the effects of interference, as well as arbitrarily complex channel models, without the need to simulate symbol transmission at the PHY layer. SimuLTE defines the ChannelModel as an interface, i.e., a C++ abstract class with pure virtual functions only, and also provides an implementation of a realistic model, which accounts for pathloss, fading and shadowing. There are several benefits in using the above approach: the first one is simplicity of implementation, which is self-evident. The second is scalability: in a simulation with many UEs \(N\)  
Figure 6: Example of BLER curves. every UE should listen to the PDCCH every TTI, most often to discover that there is no information for it on the PDSCH. This requires O(\(N\)) operations per TTI. Using the above approach, only the (considerably fewer) UEs that are recipients of an ongoing transmission, let them be \(N_{r}\), receive a message through a sendDirect(). These are at most as many as the RBs in a subframe, \(M\), and often considerably fewer, since a MAC PDU may occupy more than one RB. Since \(N_{r}\leq M<<N\), this makes the simulator more scalable. For instance, in the simulations in [27], with UEs receiving VoIP, \(N\approx 31\cdot N_{r}\). A third, non-negligible benefit is evolvability and upgradability: more physical transmission schemes at the PHY of LTE have been added throughout the releases. Adding new physical transmission schemes (e.g., a new higher-order modulation) in SimuLTE only requires adding the related BLER curves, and possibly specializing the ChannelModel accordingly. As we shown below, the above modeling is in fact what made adding D2D to SimuLTE a relatively simple effort. Of course, the above modeling approach has drawbacks as well: for instance, it makes SimuLTE unsuitable to evaluate physical-layer details and functions, such as transmissions schemes or receiver algorithms, which have to be abstracted to fit our model. As already observed, this is in fact the domain of link-level simulators (e.g., [22]).