# Modeling Network-Controlled Device-to-Device Communications in SimuLTE
## 4 Overview of the SimuLTE Architecture
### Modeling Message Transmission and Interference  
The main purpose of SimuLTE is to allow users to simulate the effects of LTE communications and resource allocation on the higher layers, e.g., to test resource allocation algorithms or to propose enhancements to protocol layers. An accurate modeling of OFDMA signal propagation, such as the one sometimes found in link-level simulators, is instead outside of its scope. This inspired specific choices regarding the modeling of the PHY and the air channel, which simplify the coding, improve the performance, and make the simulator more evolvable and maintainable. The PHY of LTE is composed of several physical channels, which carry control and data information. For instance, downlink scheduling commands (i.e., which UE is the intended recipient of which set of RBs in a TTI) are sent on the Physical Downlink Control Channel (PDCCH), using a specific (and robust) modulation. The PDDCH is sent on the first three OFDMA symbols of a TTI. On the other hand, the MAC PDU for a given UE is sent on the Physical Downlink Shared Channel (PDSCH), using the modulation and coding chosen by the eNB. The PDSCH is mapped on the remaining symbols of the same TTI, which are transmitted later than the PDCCH's. One could simulate transmission and reception of individual OFDMA symbols on both channels, apply some model of the path loss to individual symbols, and then come out with either correct reception or decoding errors. This is, in fact, the approach followed in [22], and it is time consuming from a performance standpoint. SimuLTE follows a different approach: the transmission of a MAC PDU (from the eNB to the UE in the DL, and vice versa for the UL) is modeled by having the transmitter's PHY module send an OMnTeT++ message to the receiver's PHY. This message, sent through OMnTeT's sendDirect() method, contains a pointer to its MAC PDU. The recipient of such message then checks if the transmission was successful, by doing the following: for each RB \(k\) occupied by the transmission, the Signal to Interference and Noise Ratio (SINR) is computed according to the formula  
\[SINR(k)=P_{RX}^{y}/N+\sum_{e\
eq y}P_{RX}^{e}(k),\]  
where the numerator is the power received from the transmitter and the denominator is the sum of the power received from every transmitter using RB \(k\), plus noise. In both cases, the received powers  
Figure 4: LTE NIC module architecture. Figure 5: Example of inheritance of NED structure and C++ class. are computed starting from the transmission power of the source, and applying the channel model for the channel between the recipient itself and the source. Once per-RB SINR have been computed, the recipient computes a per-RB probability of correct reception by using Block Error Rate (BLER) curves. BLER curves have the SINR as an abscissa and an error probability as an ordinate. Figure 6 reports sample BLER curves employed within SimuLTE, where the error probability decreases with the SINR for the same CQI value. More efficient modulations (i.e., CQIs) require larger SINRs to allow correct decoding. BLER curves are available as outputs of link-level simulations (see, e.g., [40]), but can also be replaced by the user if needed. The per-RB error probabilities are then combined to obtain a per-transmission error probability, assuming independence between RBs and using standard probability manipulations. The correct reception is then assessed by extracting a random value from a standard uniform distribution and checking whether it is below or above the per-transmission error probability. According to the above modeling, the recipient of the OMNeT++ message receives _only_ the message intended for it, whereas it does not receive messages transmitted to other destinations. This means that the information about interfering transmissions must be obtained through different means. In the DL, this is fairly straightforward: each eNB generates a map of the allocated RBs, as part of its resource allocation process, as explained in the next subsection.