## System Description
### The Probability of Non-Zero Secrecy Capacity with Different Behavior  
To investigate the physical layer security in experiment, we adopted the theories and equations in [8] with the wiretap communication model without relay, as shown in Figure 2. Then, we investigate the scenario of a relay cooperative case. Suppose a \(k\)-length message \(m^{k}\) sent from source is coded to n-length codeword \(x^{n}(x^{n}=[x(1),x(2),\ldots,x(n)])\), chosen from codebook \(\mathcal{X}^{n}(x^{n}\in\mathcal{X}^{n})\), the main channel and the wiretap channel output is described as:  
\[y_{M}(i)=h_{SD}(i)x(i)+n_{SD}, \tag{1}\]  
\[y_{W}(i)=h_{SE}(i)x(i)+n_{SE}, \tag{2}\]  
where \(h_{SD},h_{SE}\) denote the channel fading coefficients of the main channel and wiretap channel respectively with complex Gaussian distribution. Notations \(n_{SD}\), \(n_{SE}\) denote the mean circularly symmetric complex Gaussian noise in the main channel and wiretap channel respectively, and \(n_{SD}\sim CN(0,N_{M})\), \(n_{SE}\sim CN(0,N_{W})\). The channel power is limited by average transmit signal power \(P\):  
\[\frac{1}{n}\sum_{i=1}^{n}E[|x(i)|^{2}]\leq P. \tag{3}\]  
The average \(SNR\) of the main channel is given by:  
\[\gamma_{M}=P\times E[|h_{SD}|^{2}]/N_{M}. \tag{4}\]  
Similarly, the average \(SNR\) of the wiretap channel is described as:  
\[\gamma_{W}=P\times E[|h_{SE}|^{2}]/N_{W}. \tag{5}\]  
The secrecy capacity in this model is defined as \(C_{S}=C_{M}-C_{W}\):  
\[C_{S}=\left\{ \begin{array}{ll}\log\biggl{(}1+\frac{|h_{SD}|^{2}P}{N_{M}} \biggr{)}-\log\biggl{(}1+\frac{|h_{SE}|^{2}P}{N_{W}}\biggr{)}&,\;if\;\gamma_{M} >\gamma_{W}\\ 0&,\;if\;\gamma_{m}\leq\gamma_{W}\end{array} \right. \tag{6}\]  
We denote the instantaneous \(SNR\) of the main channel and wiretap channel by \({\gamma_{M}}^{\prime}\) and \({\gamma_{W}}^{\prime}\), [25]:  
\[{\gamma_{M}}^{\prime}=P\times E[|h_{SD}(i)|^{2}]/N_{M}, \tag{7}\]  
\[\gamma_{W}^{\prime}=P\times E[|h_{SD}(i)|^{2}]/N_{W}, \tag{8}\]  
from which we can see that \(\gamma\) (regardless of the footnote in different channels) is exponentially distributed as \(\gamma\propto|h|^{2}\). Then:  
\[p(\gamma)=\frac{1}{\gamma}exp\biggl{(}-\frac{\gamma}{\gamma}\biggr{)}, \tag{9}\]  
and the probability of \(C_{S}>0\) (denoted by \(P(C_{S}>0)\)) is calculated in [8], specifically:  
\[P(C_{S}>0)=\int_{0}^{\infty}\int_{0}^{\gamma_{M}}p(\gamma_{M})p(\gamma_{W})d \gamma_{W}d\gamma_{M}=\frac{\gamma_{M}}{\gamma_{M}+\gamma_{W}}. \tag{10}\]  
Then, we derive \(P(C_{S}>0)\) in relay transmission model for different relay behaviors:  
1. \(P(C_{S}>0)\) under cooperative behavior: The relay cooperatively decodes and forwards the received signal to D (or E). The destination combines the received signals from \(S\) and \(R\) by maximum ratio combining (MRC). The main channel consists of the S-R-D path and S-D path, and the wiretap channel includes the S-E and S-R-E path. \(\gamma_{M}=\gamma_{SRD}+\gamma_{SD}\) is the SNR of the main channel, and \(\gamma_{W}=\gamma_{SRE}+\gamma_{SE}\) is the \(SNR\) of the eavesdropper channel. Therefore, according to (10), the \(P(C_{S}>0)\) is given by: \[P_{C}(C_{S}>0)=\frac{\gamma_{SRD}+\gamma_{SD}}{\gamma_{SRD}+\gamma_{SD}+ \gamma_{SRE}+\gamma_{SE}},\] (11)  
Figure 2: Wiretap communication model without relay. where \(\gamma_{SD}\) is the average \(SNR\) of \(S\) to \(D\) channel, \(\gamma_{SRD}\) is the average \(SNR\) of the main channel which consists of \(S\) to \(R\), and \(R\) to \(D\) path. The average \(SNR\) of the \(S\) to \(E\) path is denoted as \(\gamma_{SE}\), and \(\gamma_{SRE}\) is the average \(SNR\) of the wiretap channel which consists of \(S\) to \(R\), and \(R\) to \(E\) path. 2. \(P(C_{S}>0)\) under selfish behavior: If the relay is selfish with the probability \(P_{off}\), then, \(\gamma_{M}=\gamma_{SD}\) and \(\gamma_{\rm W}=\gamma_{\rm SE}\), while the relay uses cooperative behavior with the probability (\(1-P_{off}\)).