# Secure On-Off Transmission in UAV Relay-Assisted mmWave Networks
## 3 Secrecy Evaluation
### Preliminary Analysis  
For an UAV relay \(R_{x}\), the probability of including in the decoding set \(\hat{\Phi}\) depends on the distance from \(S\) to \(R_{x}\). To be specific, the UAV relay \(R_{x}\) is more likely to be contained in \(\hat{\Phi}\) when it is closed to \(S\)  
Figure 3: Scheduling period of the relay selection and on-off transmission processes.  
Figure 2: Illation of 3D antenna gain.  
Meantime, the channels between \(S\) and \(R_{x}\) with different \(x\) are independent, then \(\hat{\Phi}\) can be regarded as an inhomogeneous PPP. The density of the point process is derived as  
\[\begin{split}\hat{\lambda}\left(x\right)&=\lambda_{U} \Pr\left(C_{SR_{x}}>C_{th}\right)\\ &=\lambda_{U}\Pr\left(\frac{P_{t}G_{SR_{x}}|_{SR_{x}}|^{2}L\left( d_{SR_{x}}\right)}{N_{0}}>2^{C_{th}}-1\right)\\ &=\lambda_{U}\Pr\left(|h_{SR_{x}}|^{2}>\frac{N_{0}\left(2^{C_{th} }-1\right)}{P_{t}G_{SR_{x}}L\left(d_{SR_{x}}\right)}\right)\\ &=\lambda_{U}\sum\limits_{j\in\left\{L,N\right\}}p_{j}\left(r \right)\,\frac{\Gamma\left(N_{j},\frac{N_{0}\left(2^{C_{th}}-1\right)a_{SR_{x} }^{j}}{P_{t}G_{SR_{x}}C_{j}^{j}}\right)}{\Gamma\left(N_{j}\right)}\end{split} \tag{3}\]  
where \(r\) is the horizontal distance from \(S\) to \(R_{x}\).  
The opportunistic relay selection assumes the selected UAV relay \(R_{0}\), which offer the lowest path loss to \(D\), is selected to forward \(S\)'s messages. It is easy to know that \(R_{0}\) is the nearest relay in \(\hat{\Phi}_{L}\) (\(\hat{\Phi}_{N}\)) from \(D\), where \(\hat{\Phi}_{L}\) (\(\hat{\Phi}_{N}\)) is the LOS (NLOS) decoding UAV relay set with density \(p_{L}\left(r\right)\hat{\lambda}\left(x\right)\) (\(p_{N}\left(r\right)\hat{\lambda}\left(x\right)\)).  
**Lemma 1**.: _Denoting the horizontal distance from \(D\) to the nearest LOS (NLOS) UAV relay as \(r_{L}\left(r_{N}\right)\), the PDF of \(r_{j}\), \(j\in\left\{L,N\right\}\) is presented as_  
\[f_{r_{j}}\left(r\right)=\sum\limits_{i=1}^{T}w_{i}^{\left(\theta\right)}rp_{j} \left(r\right)\hat{\lambda}\left(r,\theta_{i}\right)e^{v_{j}\left(r\right)}, \tag{4}\]  
_where \(T\) is the abscissas of the quadrature by using Gauss-Chebyshev integration, \(\theta_{i}=\pi\left(1+\cos\frac{\left(2i-1\right)\pi}{2T}\right)\), \(w_{i}^{\left(\theta\right)}=\frac{\pi}{T}\sqrt{\theta_{i}\left(y-\theta_{i} \right)}\), and \(v_{j}\left(r\right)\) is written as_  
\[v_{j}\left(r\right)=-\sum\limits_{i,j,k=1}^{T}w_{i}^{\left(\theta\right)}w_{k} ^{\left(r\right)}r_{k}p_{j}\left(r_{k}\right)\hat{\lambda}\left(r_{k}\theta_{i }\right), \tag{5}\]  
_where \(r_{k}=\frac{r}{2}\left(1+\cos\frac{\left(2k-1\right)\pi}{2T}\right)\), \(w_{k}^{\left(r\right)}=\frac{\pi}{T}\sqrt{r_{k}\left(y-r_{k}\right)}\)._  
Proof.: See Appendix A.  
**Lemma 2**.: _Giving that the selected UAV relay is LOS, the conditional PDF of \(r_{L}\) is written as_  
\[g_{r_{L}}\left(r\right)=\frac{f_{r_{L}}\left(r\right)}{A_{L}}e^{v_{N}\left( \max\left(0,\sqrt{\left(\frac{C_{N}}{C_{L}}\right)^{\frac{2}{N_{N}}}\left(r^{2 }+H^{2}\right)^{\frac{a_{L}}{N_{N}}}-H^{2}}\right)}\right), \tag{6}\]  
_where \(A_{L}\) is the probability that \(R_{0}\) is LOS, and its expression is given as_  
\[A_{L}=\sum\limits_{k=0}^{T}w_{k}^{\left(r\right)}e^{v_{N}\left(\max\left(0, \sqrt{\left(\frac{C_{N}}{C_{L}}\right)^{\frac{2}{N_{N}}}\left(r^{2}+H^{2} \right)^{\frac{a_{L}}{N_{N}}}-H^{2}}\right)\right)}f_{r_{L}}\left(r_{k}\right). \tag{7}\]  
Proof.: See Appendix B.  
Similar to (6), giving that the selected UAV relay is NLOS, the conditional PDF of \(r_{N}\) is written as  
\[g_{r_{N}}\left(r\right)=\frac{f_{r_{N}}\left(r\right)}{A_{N}}e^{v_{ L}\left(\min\left(\mathcal{Q}\sqrt{\left(\frac{C_{L}}{S_{N}}\right)^{\frac{2}{L}} \left(r^{2}+H^{2}\right)^{\frac{\alpha_{N}}{2L}}-H^{2}}\right)\right)}, \tag{8}\]  
where \(A_{N}=1-A_{L}\) is the probability that \(R_{0}\) is NLOS.