# On the Performance of Underlay Device-to-Device Communications
## 5 Simulation Results
Hence, from Figures 4 and 6, the impact of the \(P_{\text{tot}}\) on the performance of the OP and Pcov is contrary. In particular, increasing \(P_{\text{tot}}\) is beneficial for the D2D receiver. However, it is detrimental for the cellular user. As a consequence, figuring out an optimal total transmit power of the D2D networks that both guarantees the quality-of-service (QoS) of the cellular networks and ameliorates the performance of the D2D networks is an important extension direction. Figure 6 also confirms the findings in Figure 5 that scaling up the \(R_{C}\) will reduce the Pcov. Figure 5: Coverage probability vs. \(R_{C}\). Solid lines are plotted by employing (21) and markers are Monte Carlo simulation. Figure 6: Coverage probability vs. \(P_{\text{tot}}\) under the random scheme. Solid lines are plotted by employing (21) and markers are Monte Carlo simulation. Figure 7 studies the performance of the average rate of the first D2D user, \(\overline{\mathcal{R}}_{1}\) versus \(P_{\text{tot}}\) under three power allocation schemes. We observe that, under the current setup, the \(\overline{\mathcal{R}}_{1}^{ran}\) outperforms the others. The rationale behind this phenomenon is that the allocated power of the random scheme is larger than ones utilized equal and path-loss based allocation, e.g., \(\alpha_{1}>\frac{1}{N}>\frac{\Omega_{\mathcal{R}_{1},d_{1}}}{\sum\limits_{k=1 }^{N}\Omega_{\mathcal{R}_{k},d_{k}}}\). Nonetheless, the gap between these schemes is negligible, for example, \(\overline{\mathcal{R}}_{1}^{ran}\) is only better than \(\overline{\mathcal{R}}_{1}^{pl}\) by approximately 2 bits/s/Hz when \(P_{\text{tot}}=60\) dBm. Furthermore, the \(\overline{\mathcal{R}}_{1}\) is a monotonic increasing function with respect to \(P_{\text{tot}}\). Nevertheless, \(\overline{\mathcal{R}}_{1}\) linearly goes up as \(P_{\text{tot}}\) is small or moderate, e.g., when \(P_{\text{tot}}\leq 30\) dBm, then it fairly improves when \(P_{\text{tot}}>30\). The average sum rate of the D2D networks versus \(P_{\text{tot}}\) is given in Figure 8. Generally, the path-loss based scheme achieves the highest performance, although the difference between the best and the worst ones is minor, especially when \(P_{\text{tot}}\) is small. However, it is expected that the gap will be increased significantly providing that the number of D2D users is enormous. Figure 8: Average Sum Rate of D2D networks vs. \(P_{\text{tot}}\) under three power allocation methods. Solid lines are plotted by employing (16) and markers are Monte Carlo simulation. Figure 7: Average rate of the first D2D pairs vs. \(P_{\text{tot}}\) under three power allocation methods. Solid lines are plotted by employing (13) and markers are Monte Carlo simulation. Figure 9 unveils the amount of fading of the third D2D receiver with respect to the \(P_{\text{tot}}\). We see that AoF simply boosts up with \(P_{\text{tot}}\), and the random scheme experiences the highest AoF while the path-loss based scheme is the lowest one for this receiver. Figure 10 depicts the outage performance of the first D2D receiver with respect to \(R\) under the path-loss-based allocation scheme with various values of the network radius \(O\). It is noted that the position of all devices (both D2D transmitters, receivers, and cellular users) in the considered networks is randomly distributed for each realization and the outcomes are drawn on an average of 1000 realizations. It is certain that increasing the network radius will ameliorate the outage performance. The rationale behind this trend is that increasing \(O\) will increase the distances between pairs of D2D transceivers and cellular users. As a result, the interference from both D2D and cellular networks declines. Figure 11 stretches the average sum rate of the D2D networks with different network radius, i.e., O = 500, 1000, and 2000 m. Similarly, this figure is plotted by assuming that all nodes are randomly distributed under the coverage area of the BS for each realization.