## 6 Results and Discussion
### Transfer Learning Actor-Critic Solution for Energy-Efficient Data Protection Scheme
\begin{table}
\begin{tabular}{c l c} \hline \hline
**Symbol** & **Description** & **Value** \\ \hline \(\gamma_{i}\) & Average SNR of the sensed channel (dB) & \(-10\) \\ \(P_{AA^{\prime}},P_{AA}\) & Transition probabilities between states (\(A\) and \(\bar{A}\)) of the primary user & 0.2 \\ \(E_{ca}\) & Battery capacity (packets) & 160 \\ \(E_{s}\) & Energy consumption for the whole spectrum sensing process (packets) & 1 \\ \(E_{Nk}\) & Energy consumption for data encryption using the Advanced Encryption & \(\{4,6,8\}\) \\ Standard (AES) algorithm with key length \(Nk\in\{128,192,256\}\) (packets) & \\ \(e_{h,avg}\) & Average harvested energy (packets) & \(\{2,4,6,8,10\}\) \\ \(e_{tr}\) & Average energy consumption for data transmission (packets) & 40 \\ \(\eta\) & Discount factor & 0.9 \\ \(a_{c}\) & Critic learning rate & 0.2 \\ \(a_{a}\) & Actor learning rate & 0.1 \\ \(\epsilon(0)\) & Initial transfer rate & 0.5 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Simulation parameters for transfer learning actor–critic (TLAC) [20]. Figure 13: Actor–critic training convergence rate, \(e_{h,avg}=4\). In Figure 14, we show the efficiency of the proposed scheme compared with the POMDP-based and myopic schemes under the effect of harvested energy. As can be seen from the figure, a larger harvested energy yields a higher reward, indicating that data are protected better. The reason is that, if the SU can harvest more energy, it has a greater chance to operate in transmission mode, and can transmit more data to the FC. Furthermore, the result of the proposed TLAC algorithm is better than the myopic one and a little lower than the POMDP method. To explain this, in the myopic scheme, the SU makes a decision on its working mode without considering the effect of this action on the future reward. In particular, if the primary channel is found free via spectrum sensing, the SU uses too much energy for data encryption to enhance data protection, which causes the SU to stay in idle mode over many time slots due to limited remaining energy. Regarding the POMDP-based solution, the SU is assumed to already have information about the harvested energy model, which is hardly ever true in practice. As a result, by using value iteration-based programming, we can compute all possible happening states and the corresponding occurrence probabilities to find the optimal policy beforehand. Consequently, the SU can predict the next state of the primary user and the upcoming harvested energy before effectively distributing the energy over future time slots. Meanwhile, employing the TLAC algorithm requires the SU to frequently interact with the environment to determine the dynamics of the arrival of harvested energy, which can result in a locally optimal policy [22]. In particular, the SU makes decisions based on a predefined policy (i.e., local or immediate consideration), which is updated at the end of every time slot, to improve future behavior without needing to have any information about the environment's dynamics. Figure 15 illustrates the channel utilization by the SU for its data communications, computed as the ratio of the total number of successful data transmissions to the total time slots in which the primary user is sensed as inactive. From the figure, we can see that the primary channel is utilized more effectively when harvested energy \(e_{h,avg}\) increases. In addition, the proposed TLAC algorithm utilizes the free channel better than the myopic scheme about 2% of the total successful transmissions. We can also see that the POMDP technique provides an optimal solution to the problem of the operation mode decision. However, the TLAC solution without requiring too much effort in mathematical computation or prior information about the environment's dynamics can provide the SU with a locally optimal policy that almost reaches the result of the POMDP scheme, especially when the amount of harvested energy is large.