## 5 Simulation Experiment
### Receiver Utility  
In several experiments, it can be seen in Figure 4 that in a scenario where the legitimate user's channel gain ratio \(k\) is the same as the attacker's channel gain, the greater is the average utility of the receiving end for smaller legal training sample \(\rho\). The figure reveals that for 1000 experiments, the average return value at \(\rho=10\) is 2.4238, which is a 17% increase compared to the average utility value at \(\rho=20\). The result depicts that a smaller SINR value of the training sample yields a better experimental result. The accuracy of IAD is improved by taking into account the SINR of legal training samples. According to the hypothesis test, \(\lambda\) influences the detection accuracy, i.e., FAR and MDR. Thus, the FAR and MDR can be expressed as  
\[P_{1}(\lambda)=1-\mathcal{F}_{\lambda_{2\lambda}^{2}}^{2}\left(\frac{2\theta \lambda}{2\theta^{2}+\omega\theta\delta^{2}}\right), \tag{16}\]  
Figure 3: Test threshold of IAD changes with the increasing number of experiments.  
\[P_{2}(\lambda)=\mathcal{F}^{2}_{\lambda\lambda^{2}_{2\mathcal{M}}}\left(\frac{2 \theta\lambda}{2\theta^{2}+(1+q)\theta\delta^{2}}\right), \tag{17}\]  
where \(\mathcal{F}^{2}_{\lambda\lambda^{2}_{2\mathcal{M}}}\) denotes the cumulative distribution function having \(2\mathcal{M}\) degrees of freedom. \(\omega\) is the relative variation rate in the channel gain and \(\delta^{2}\) is the average power gain of the received signal. \(\theta\) is the SINR of the legal training sequence and \(q\) is the ratio of the channel gain between authentic and unauthentic nodes. Furthermore, based on Equations (16) and (17), the computation of AER is expressed as  
\[P_{AER}=P_{1}(\lambda)+P_{2}(\lambda). \tag{18}\]  
In our proposed SARSA-based method, we aim to evaluate the performance of AER, MDR, and FAR. The Q-learning algorithm is also compared with the impersonation attack model based on the SARSA algorithm. Therefore, we need to analyze the AER, MDR, and FAR in comparison to the traditional Q-learning algorithm. We consider a simulation area of \(20\times 20\) square meters. We assume that the number of nodes in the simulation area is distributed randomly. Similar to [3], all channel gains follow the normal distribution \(\xi(0,1)\). Moreover, we assume that \(T\) consists of \(20\) training signals in one time slot. For the analysis of FAR, MDR, and AER, the initial values in the simulation environment are set to be \(\theta=10\) dB, \(\omega=3\) dB, \(q=0.2\), and \(\delta^{2}=5\).  
In our recommended SARSA-based technique, we intend to investigate the FAR, MDR, and AER. The Q-learning method is evaluated compared to the IAM based on the SARSA algorithm. As a result, we need to examine the FAR, MDR, and AER compared to the conventional Q-learning approach. The simulation environment is set-up with an area of \(20\times 20\) square meters, and the number of nodes is randomly scattered. All channel gains follow the normal distribution \(\xi(0,1)\)[13]. It is assumed that there are \(T=20\) training signals in one slot, and the center frequency of the signals is \(f_{0}=2.4\) GHz, \(g_{0}=6\), \(g_{1}=9,c_{0}=2,\text{ and }c_{1}=4\). The parameter values used in the SARSA algorithm are \(\varepsilon=0.1,\text{ }\alpha=0.6\), and \(\eta=0.8\). The initial values are given to calculate FAR, MDR, and AER are \(\theta=10\) dB, \(b=3\) dB, \(q=0.2\), and \(\delta^{2}=5\).