# Social-Aware-Based Resource Allocation for NOMA-Enhanced D2D Communications
## 4 Simulation and Performance Analysis  
This section investigates the performance of the proposed resource allocation algorithm with MATLAB. Figure 1 presents the system model, and the cell radius is 300 m. The channel gain is composed of large-scale fading and small-scale fading. The large-scale fading is based on distance loss and can be defined as \(\kappa d^{-\alpha}\), where \(d\) denotes the transmission distance and \(\kappa\) and \(\alpha\) denote the possible fading and pathloss exponent. The small-scale fading is based on Rayleigh fading which follows \(CN(0,1)\)[16]. We list the simulation parameters in Table 1.  
Figure 4 shows the impact of the number of D2D content requesters on the average number of swap operations in the matching game. As the number of D2D content requesters increases, the number of swap operations also increases, which indicates that the number of swap-blocking pairs in the system increases. In the meanwhile, the number of cellular channels could affect the number of D2D users who can access the cellular channel. Hence, the number of potential swap-blocking pairs increases as the number of cellular channels increases. Therefore, both the cellular channel and D2D content requester could affect the swap operations. When there are 6 D2D content requesters and 5 cellular channels in the cell, the average number of swap operations is about 15. As a consequence, the matching game converges with a small number of iterations. \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Cellular radius & 300 m \\ Maximum D2D communication range & 50 m \\ Noise power & \(-\)174 dBm \\ Number of files & 50 \\ Request probability & 0.2 \\ Cache probability & 0.5 \\ Social relationship & [0, 1] \\ Weighting factor & (0.6, 0.2, 0.2) \\ Maximum D2D clusters on cellular channel & 3 \\ Cellular transmit power & 23 dBm \\ Maximum D2D transmit power & 20 dBm \\ Cellular SINR threshold & 1.8 dB \\ D2D SINR threshold & 1.8 dB \\ Possible fading & 0.01 \\ Path loss exponent & 4 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Simulation parameters. Figure 5 shows the impact of the number of D2D content providers on the accessed probability of D2D content requesters. D2D accessed probability indicates that D2D users communicate through D2D mode, which depends on two conditions: (1) the D2D content requester succeeds in finding D2D content providers within the D2D communication range, and filters them into the D2D cluster and (2) the D2D cluster communicates by reusing the cellular channel, and each user's QoS must be ensured on the cellular channel. If any user's QoS cannot be ensured, the D2D content requester in this D2D cluster cannot communicate in the D2D mode. It can be seen from Figure 5 that as the number of D2D content providers increases, the D2D accessed probability continues to increase while the trend slows down. This is because D2D content providers correspond to the first condition we proposed. As the number of D2D content providers increases, the possibility of forming the D2D clusters increases. Hence, the D2D accessed probability increases. However, it becomes saturated for D2D content requesters with more and more D2D content providers, and more D2D content providers are less meaningful for clustering. As a consequence, the curve tends to be flat. Moreover, the number of cellular channels corresponds to the second condition. The more cellular channels, the more channels D2D users can choose, which also has a certain impact on D2D accessed probability. Figure 4: Average swap operations for different numbers of cellular channels with different D2D content requesters. Figure 5: Accessed probability for different numbers of cellular channels with different numbers of D2D content providers, \(N=5\). Figure 6 illustrates the impact of the number of D2D content providers on the D2D accessed probability.