## 5 Simulations
### Simulation Setup  
A realistic radio signal strength environment is simulated in MATLAB. The pseudo-code in Algorithm 2 shows the principle of the simulation setup. The simulation setup uses the extended log-normal shadowing model given in the Equation (2). There are two transmitter nodes, namely the server and client nodes fixed at positions (\(-\)30,0) and (30,0), respectively, in a 100 \(\times\)100 m 2D space. The receiver is the (mobile) relay node, and its initial position is chosen randomly based on the simulation cases. The distance from the source to the receiver (relay robot) is calculated based on the Euclidean norms.  
The radio environment parameters, such as the propagation constant \(\eta\) and the path loss values at reference distance \(PL_{d_{0}}\) (which can be quite different for the \"server to relay\" link and the \"client to relay\" link), are set based on empirical observations made in [6].  
The channel noise in the radio signals are not accurately measurable by most of the commercial wireless transceivers; therefore, we restrict our measurements to only the RSS values (instead of SNR values), although we do present an example simulation scenario where we assume measuring SNR values and consider a localized noise source as in [16,17] in order to show the flexibility of our algorithm.  
Figure 6 plots the histogram of the standard deviation of the RSS values measured in a tunnel environment at CERN. As it is clear from this figure that the stochastic parts (shadowing and multipath effects) of the RSS are indeed Gaussian [18], we model them as spatio-temporal noise in the RSS measurements using zero-mean Gaussian random variables (\(std_{server}\) and \(std_{client}\)) in the simulations. Based on the measurements, we found that the standard deviation of the RSS owing to shadowing effects can range from 0.5 dBm to 2 dBm with an average of about 1 dBm at each point in space. Hence, to replicate as realistic an environment as possible in our simulations, we consider the stochastic noise in RSS with up to 4 dBm\({}^{2}\) variance. A simulated RSS environment for the server and the client nodes is shown in Figure 7 without and with a Gaussian noise (of 4 dBm\({}^{2}\) variance) in the RSS.  
```
1[x,y]=meshgrid(-50:0.1:50)%Generatingameshgridof104m2 with0.1 mresolution%(\(x_{c},y_{c}\))and(\(x_{s},y_{s}\))arethepositionsofttheclientandservernodesrespectively.
3\(Pt_{s}=17,Pt_{c}=17\)%Transmitpower(dBm)oftheserverandclientnodesPL_{d_{0}}=40\)%Pathloss(dB)atthereferenceddistance(\(d_{0}=1m\))
5\(\eta_{c}=2.52,\eta_{s}=3.02\)%Path-lossexponentforrelay-clientandserver-relaylinks\(std_{server}=0+\sigma_{s}\)*randn(50,50,1)%Spatio-temporalGaussiannoiseinserver-relaylink\(std_{client}=0+\sigma_{c}\)*randn(50,50,1)%Spatio-temporalGaussiannoiseinrelay-clientlinkforxin-50 to50
6 foryin-50 to50
7 if(x==\(x_{c}\)&&y==\(y_{c}\))%forrelay-clientlink\(RSS_{c}(x,y)=Pt_{c}\)else
8\(RSS_{c}(x,y)=Pt_{c}-(PL_{d_{0}}-10\eta_{c}\log_{10}(\frac{\sqrt{(x-x_{c})^{2} +(y-y_{c})^{2}}}{d_{0}})-std_{client}(x,y))\)
9 end
10 if(x==\(x_{s}\)&&y==\(y_{s}\))%forserver-relaylink\(RSS_{s}(x,y)=Pt_{s}\)else
11\(RSS_{s}(x,y)=Pt_{s}-(PL_{d_{0}}-10\eta_{s}\log_{10}(\frac{\sqrt{(x-x_{s})^{2} +(y-y_{s})^{2}}}{d_{0}})-std_{server}(x,y))\)
12 end
13 end
```  
**Algorithm 2** Simulation setup for the RSS environment.  
Figure 6: Histogram of RSS variations.