## 2 System Model
### RF Channel Model  
The jamming signal is designed in such a way that it will only affect the illegal eavesdropper without degrading the quality of the main transmission. When communicating, the signal interference to noise ratio (SINR) of the illegal eavesdropper can be written as follows:  
\[\gamma_{S_{G}S_{J}E}=\frac{\gamma_{S_{G}E}}{\gamma_{S_{J}E}+1} \tag{7}\]  
where \(\gamma_{S_{G}E}=\frac{P_{S_{G}}}{\sigma_{E}^{2}\mathrm{d}_{S_{G}E}^{2}}\big{|} h_{S_{G}E}\big{|}^{2}\), \(\gamma_{S_{J}E}=\frac{P_{S_{J}}}{\sigma_{E}^{2}\mathrm{d}_{S_{J}E}^{2}(N_{S_{J} }-1)}\|\mathrm{h}_{S_{J}E}W\|^{2}=\frac{\rho\eta\eta_{R}\big{|}h_{S_{J}E}\big{|} ^{2}\|h_{S_{J}E}W\|^{2}}{(1-\rho)N_{0}(N_{S_{J}}-1)d_{S_{J}E}^{2}}\).  
The RF links between source and relay obey the Rayleigh fading. The instantaneous SNR \(\gamma_{k}\)'s PDF and CDF at the RF link can be mathematically expressed as the following formula:  
\[\mathrm{f}_{\gamma_{k}}(\gamma)=\frac{1}{\Omega_{k}}\mathrm{exp}\bigg{(}\frac {-\gamma_{k}}{\Omega_{k}}\bigg{)} \tag{8}\]  
\[\mathrm{F}_{\gamma_{k}}(\gamma)=1-\mathrm{exp}\bigg{(}\frac{-\gamma_{k}}{\Omega _{k}}\bigg{)} \tag{9}\]  
where \(\mathrm{k}\in\{S_{G}R,S_{G}E\}\), and \(\Omega_{S_{G}R}=\frac{P_{S_{G}}\Delta_{S_{G}E}}{\sigma_{E}^{2}\mathrm{d}_{S_{ G}R}^{2}}\) and \(\Omega_{S_{G}E}=\frac{P_{S_{G}}\Delta_{S_{G}E}}{\sigma_{E}^{2}\mathrm{d}_{S_{ G}E}^{2}}\) represent the average power channel gain between the corresponding RF channels, respectively.  
It is known from [24] that the CDF of the optimal user is  
\[\begin{array}{l}\mathrm{pr}\{\max(x_{1},x_{2},x_{3},\ldots x_{M})<x\}\\ =pr\{x_{1}<x\}pr\{x_{2}<x\}pr\{x_{3}<x\}\ldots pr\{x_{M}<x\}\\ =F^{M}(x)\end{array} \tag{10}\]  
Using (9) and (10), the CDF of the instantaneous SNR of the optimal user interference \(\gamma_{S_{J}E}\) is obtained as follows:  
\[F_{\gamma_{S_{J}E}}(\gamma)=\Bigg{[}1-\mathrm{exp}\Bigg{(}\frac{-\gamma_{S_{ J}E}}{\Omega_{S_{J}E}}\Bigg{)}\Bigg{]}^{M}=\sum_{h=0}^{M}\bigg{(}\begin{array}{c}M \\ \mathrm{h}\end{array}\bigg{)}\Bigg{[}1-\mathrm{exp}\Bigg{(}\frac{-\gamma_{S_{ J}E}}{\Omega_{S_{J}E}}\Bigg{)}\Bigg{]}^{h} \tag{11}\]  
Calculating the corresponding derivative of (11) gives the PDF of the instantaneous interference SNR of the optimal user as  
\[\mathrm{f}_{\gamma_{S_{J}E}}(\gamma)=M\Bigg{[}1-\mathrm{exp}\Bigg{(}\frac{- \gamma_{S_{J}E}}{\Omega_{S_{J}E}}\Bigg{)}\Bigg{]}^{M-1}\frac{1}{\Omega_{S_{J}E }}\mathrm{exp}\Bigg{(}\frac{-\gamma_{S_{J}E}}{\Omega_{S_{J}E}}\Bigg{)} \tag{12}\]where \(\Omega_{S_{j}E}=\Psi\frac{\lambda_{S_{j}E}}{\Omega_{S_{j}E}^{*}}\) is the average power channel gain between the optimal user \(S_{J}\) and the illegal eavesdropper E, and \(\Psi=\frac{\rho_{B}\eta_{R}N_{S_{j}}}{(1-\rho)\sigma_{k}^{2}\delta_{S_{j}}^{2}}\).  
The CDF of the instantaneous SNR \(\gamma_{S_{C}S_{j}E}\) can be obtained using (7)-(9) and (12) as follows [25]:  
\[\begin{split}& F_{\gamma_{S_{C}S_{j}E}}\bigg{(}\frac{\gamma_{S_{C}E}}{ \gamma_{S_{j}E+1}}<\gamma_{\text{th}}\bigg{)}=\int_{0}^{\infty}F_{\gamma_{S_{ C}E}}[\gamma_{th}(\gamma_{I}+1)]f_{\gamma_{S_{j}E}}(\gamma_{I})d\gamma_{I}\\ &=\frac{M}{\Omega_{S_{j}E}}\sum_{h=0}^{M-1}C_{M-1}^{h}(-1)^{h} \left[\frac{\Omega_{S_{j}E}}{h+1}-e\text{exp}\Big{(}\frac{-\gamma_{th}}{\Omega _{S_{C}E}}\Big{)}\frac{1}{\frac{\gamma_{th}}{\Omega_{S_{C}E}}+\frac{h+1}{ \Omega_{S_{j}E}}}\right]\end{split} \tag{13}\]  
Applying the derivative operation to the CDF represented by (13), the corresponding PDF is obtained as  
\[\begin{split}\text{f}_{S_{C}S_{j}E}(\gamma)=\frac{M}{\Omega_{S_{ j}E}}\sum_{h=0}^{M-1}C_{M-1}^{h}(-1)^{h}\left[\frac{1}{\Omega_{S_{C}E}}e\text{ exp}\bigg{(}\frac{-\gamma}{\Omega_{S_{C}E}}\bigg{)}\left(\frac{1}{\frac{ \gamma}{\Omega_{S_{C}E}}+\frac{h+1}{\Omega_{S_{j}E}}}+\frac{1}{\left(\frac{ \gamma}{\Omega_{S_{C}E}}+\frac{h+1}{\Omega_{S_{j}E}}\right)^{2}}\right)\right] \end{split} \tag{14}\]