# Secrecy Rate of Resource-Constrained Mobile Relay Model under Two-Way Wiretap Channel
## 3 Results  
Numerical results are provided in this section to evaluate the performance of the resource-constrained two-way relay network. In particular, the distance-dependent path-loss model \(\varrho_{i,m}=\varrho_{0}\cdot(\frac{d_{i,m}}{d_{0}})^{-\alpha}\) is adopted, where \(d_{i,m}\) is the distance from user 1 ([PERSON]: user 1; [PERSON]: user 2) to the \(m\)th stopping point of the relay; \(\varrho_{0}=10^{-3}\) is the path loss at distance \(d_{0}=1\) m; and \(\alpha\) is the path-loss exponent set to be 2.5 [6; 27]. Based on the path-loss model, channels \(\mathbf{h}_{m}\) and \(\mathbf{g}_{m}\) are generated according to \(\mathcal{CN}(\mathbf{0},\varrho_{i,m}\mathbf{I}_{N})\). Similarly, the wiretap channels \(h_{e}\), and \(\mathbf{g}_{e,m}\) are generated according to \(\mathcal{CN}(\mathbf{0},\varrho_{e}\mathbf{I}_{N})\) and \(\mathcal{CN}(\mathbf{0},\varrho_{e,m}\mathbf{I}_{N})\) respectively, where \(\varrho_{e}\) and \(\varrho_{e,m}\) are the distance-dependent path loss of uplink and downlink wiretap channels, respectively. The receiver noise powers are set to \(\sigma_{r}^{2}=\sigma_{u}^{2}=-70\) dBm and \(\sigma_{e}^{2}=-60\) dBm. Furthermore, within the duration of \(T=50\) s, the energies available at Alice and relay are \(Q=300\) mJ and \(E=1000\) J, respectively. Each point in the figures is obtained by averaging over 100 simulation runs.  
Based on the above settings, we simulate the secrecy rate map in a 20 m \(\times\) 20 m = 400 m\({}^{2}\) square area [14; 27], which is a typical size of a smart warehouse. Inside this map, 2 IoT users, 1 eavesdropper, 1 relay with 8 (\(N=8\)) antennas, and \(M=15\) vertices representing stopping points are randomly scattered, with the eavesdropper being near to the starting point of the relay.  
To verify the convergence of Algorithm 2 in the previous section, Figure 3 shows the relationship between the secrecy rate and the number of iterations. It can be seen that with \(L=3\), a stable result is obtained. This verifies the convergence of our proposed algorithm with a moderate number of iterations.  
Figure 3: Secrecy rate vs. iterations.  
In order to illustrate the proposed scheme's performance gains, Figure 4 shows a comparison between the fixed relay case and mobile relay scheme. The secrecy rate under the mobile relay scheme is much higher than that of the fixed case, which is almost zero due to the relay being near to Eve. Moreover, the performance gap concisely quantifies the secrecy rate gain brought by mobile relay, which demonstrates the advantage of employing movement of the relay.  
To gain more insight into the mobile relay scheme, Figure 5 can be observed, from which it can be observed that Algorithm 2 can automatically determine where to move and how far to move. The relay can smartly avoid the dangerous zones that are close to the eavesdropper.  
Furthermore, to show how the mobile relay scheme works effectively, we set \(\sigma_{e}^{2}=-90\) dBm and obtained Figure 6. Compared with Figure 5 (\(\sigma_{e}^{2}=-60\) dBm), it  
Figure 4: Secrecy rate comparison between fixed relay case and moving relay scheme.  
Figure 5: path for mobile relay with M = 15 when noise power \(\sigma_{e}^{2}=-60\) dBm.  
can be seen in Figure 6 that the visiting path includes more far-way stopping points. This is because when the eavesdropper's noise power is decreased, denoting that Eve has a stronger wiretap ability, the mobile relay has to move far way to guarantee secure transmission.