# Performance Analysis of DF Relay-Assisted D2D Communication in a 5G mmWave Network
## 3 Problem Formulation and Analysis
### Performance Analysis  
#### 3.3.1 Coverage Probability of D2D Users  
In this subsection, the expressions for the coverage probability of the D2D users are derived by using stochastic geometry as an analytical tool. The message transmitted from users \(D1\) and \(D2\) to the relay node are encoded and broadcast towards the receiver D2D users. Therefore, the coverage probability of the D2D users should be above a certain threshold value for seamless communication to occur, as well as to maintain the QoS constraints. Thus, the coverage probability of the D2D users in the presence of the DF relay can be expressed as follows,  
\[P_{cov}=1-\mathbb{P}(\gamma_{AR}^{2}\geq\gamma_{th})\mathbb{P}(\gamma_{BR}^{2} \geq\gamma_{th})\mathbb{P}(\gamma_{RA}^{2}\geq\gamma_{th})\mathbb{P}(\gamma_{ RB}^{2}\geq\gamma_{th}) \tag{31}\]  
The last expression in Equation (31) is obtained by applying the independent property of random variables. As it is evident that \(\gamma_{j}\) where \(\{je1,2,\ldots,4\}\) is an exponentially distributed random variable, the PDF of \(\gamma_{j}\) can be expressed as,  
\[f_{y_{1}}(\theta)=\frac{1}{\tilde{\gamma_{1}}}exp(-\frac{\theta}{\tilde{ \gamma_{1}}}) \tag{32}\]  
where \(\theta>0\) and the value for \(\tilde{\gamma_{1}}\) is given by,  
\[\tilde{\gamma_{1}}=\frac{P_{AR}vh_{AR}d_{AB}^{-\alpha}}{N_{0}} \tag{33}\]  
Here, \(\
u\) represents the parameter of the exponential distribution of random variables. Similarly, from Equation (10), we obtain,  
\[\tilde{\gamma_{th}}=\frac{P_{C}vh_{C2B}d_{C2B}^{-\alpha}}{N_{0}} \tag{34}\]  
Now, the probability of different SINR terms involved in Equation (31) can be expressed as follows,  
\[\begin{split}\mathbb{P}(\gamma_{AR}^{2}\leq\gamma_{th})& =1-\mathbb{P}[\frac{\gamma_{1}}{I_{R}+1}]\\ &=1-\int_{0}^{\infty}\mathbb{P}[I_{R}\leq\frac{\gamma_{1}}{ \gamma_{th}}-1]f_{y_{1}}(\theta)d\theta\\ &=1-\int_{0}^{\infty}[\frac{1}{I_{R}}\int_{0}^{(\frac{\theta}{ \gamma_{th}}-1)}exp(\frac{-y}{\tilde{\gamma_{th}}})dy]f_{y_{1}}(\theta)d\theta \\ &=1+\frac{1}{\tilde{\gamma_{1}}}\int_{0}^{\infty}[exp(\frac{1- \frac{\theta}{\gamma_{th}}}{\tilde{\gamma_{th}}})-1]exp(-\frac{\theta}{\tilde {\gamma_{th}}})d\theta\\ &=\frac{exp(\frac{1}{\tilde{\gamma_{th}}})}{\tilde{\gamma_{1}}( \frac{1}{\tilde{\gamma_{1}}}+\frac{1}{\tilde{\gamma_{th}}\gamma_{th}})}\end{split} \tag{35}\]  
Similarly, other relations can be obtained as follows,  
\[\mathbb{P}(\gamma_{BR}^{2}\leq\gamma_{th})=\frac{exp(\frac{1}{\tilde{\gamma_{ 1}}})}{\tilde{\gamma_{2}}(\frac{1}{\tilde{\gamma_{2}}}+\frac{1}{\tilde{\gamma _{th}}\gamma_{th}})} \tag{36}\]\[\mathbb{P}(\gamma_{RA}^{2}\leq\gamma_{th})=\frac{exp(\frac{1}{\gamma_{th}})}{ \tilde{\gamma_{3}}(\frac{1}{\tilde{\gamma_{3}}}+\frac{1}{\tilde{\gamma_{th}} \gamma_{th}})} \tag{37}\]  
and,  
\[\mathbb{P}(\gamma_{RB}^{2}\leq\gamma_{th})=\frac{exp(\frac{1}{\tilde{\gamma_{ th}}})}{\tilde{\gamma_{4}}(\frac{1}{\tilde{\gamma_{4}}}+\frac{1}{\tilde{\gamma_{ th}}\gamma_{th}})} \tag{38}\]  
Thus, substituting these values into Equation (31), we obtain the expression for the coverage probability of the D2D users as follows,  
\[\begin{split} P_{cov}=1&-\{1-\frac{exp(\frac{1}{ \gamma_{th}})}{\tilde{\gamma_{1}}(\frac{1}{\tilde{\gamma_{1}}}+\frac{1}{ \gamma_{th}\gamma_{th}})}\}\times\{1-\frac{exp(\frac{1}{\gamma_{th}})}{\tilde {\gamma_{2}}(\frac{1}{\tilde{\gamma_{2}}}+\frac{1}{\tilde{\gamma_{th}}\gamma_ {th}})}\}\\ &\times\{1-\frac{exp(\frac{1}{\gamma_{th}})}{\tilde{\gamma_{3}}( \frac{1}{\tilde{\gamma_{3}}}+\frac{1}{\tilde{\gamma_{th}}\gamma_{th}})}\} \times\{1-\frac{exp(\frac{1}{\gamma_{th}})}{\tilde{\gamma_{4}}(\frac{1}{ \tilde{\gamma_{4}}}+\frac{1}{\tilde{\gamma_{th}}\gamma_{th}})}\}\end{split} \tag{39}\]