## 4 Simulation Results  
In order to evaluate the effectiveness of the proposed scheme, we implemented a simulation using MATLAB. In this section, we present the performance comparisons among the proposed scheme, the _Myopic_ scheme and the _Direct Link Only_ scheme. In the _Myopic_ scheme, we only considered the throughput for the current time slot to select optimal action. In the _Direct Link Only_ scheme, the source always uses the direct link to transmit data packet to the destination. The parameters used for our simulation are shown in Table 2.  
In Figure 5 shows the average throughput of the system according to the required transmission energy of relay node. According to Figure 5, the throughput of the system decreases as the required transmission energy increases. The reason is as follows: For a large amount of the required transmission energy, the source will have fewer opportunities to transmit the data packet via relay when the jammer appears since the relay lacks energy for the forwarding process. It is obvious that the increase in the required transmission energy does not affect the average throughput of the _Direct Link Only_ scheme. The figure verifies that the proposed scheme outperforms the _Myopic_ scheme and the _Direct Link Only_ scheme. Figure 6 shows the relation between average throughput and battery capacity in the relay. We can see that the average throughput of the system increases as the battery capacity of the relay increases. The reason is why the relay has more energy to assist communication between the source and destination. On the other hand, the battery capacity of the relay does not affect the _Direct Link Only_ scheme, and corresponding throughput is not changed. The figure shows that the proposed scheme can provide higher throughput than the _Myopic_ and the _Direct Link Only_ schemes. \begin{table}
\begin{tabular}{c l c} \hline \hline
**Symbol** & **Description** & **Value** \\ \hline \(\gamma\) & SNR of the channel between the source and the jammer & \(-10\) dB \\ \(T\) & Total time frame & \(0.02\) s \\ \(f_{s}\) & Sensing bandwidth & \(0.2\times 10^{6}\) Hz \\ \(P_{d}\) & Probability of detection & \(0.8\) \\ \(P_{H_{1}}\) & Initial belief that the jammer is present & \(0.7\) \\ \(P_{JJ}\) & Transition probability from state J to itself & \(0.6\) \\ \(P_{JJ}\) & Transition probability from state \(\overline{J}\) to state J & \(0.8\) \\ \(E_{ca}\) & Total capacity of the battery & \(10\) \\ \(e_{mean}^{h}\) & Mean value of the harvested energy & \(2\) \\ \(E_{tr}\) & Transmission energy & \(6\) \\ \(\alpha\) & Discount factor & \(0.9\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Simulation parameters. Figure 5: Average throughput versus required transmitted energy. Figure 7 shows average throughput of the proposed scheme according to the battery capacity of relay node for different values of detection probability \(P_{d}\). It is observed that average throughput of the proposed scheme increased as the battery capacity of relay node increases for a fixed value of \(P_{d}\). However, the average throughput of the proposed scheme goes into a saturation mode for a certain value of the battery capacity. That is, as the battery capacity reaches a certain value, the average throughput of the proposed scheme cannot be enhanced. Figure 7 also shows that more detection probability of jammer, the more the average throughput. To do this, however, we need more accurate sensing scheme at the source node. Finally, Figure 8 shows the average throughput of the proposed scheme according to the detection probability of jammer for different values of the required transmission energy of the relay node. As like the previous observation, the more required transmission energy of the relay node, the less the average throughput. For a fixed value of the required transmission energy of the relay node, the average throughput of the proposed scheme is improved as the detection probability of jammer increases. Figure 6: Average throughput versus capacity of battery.