## 2 Network Model  
We study a downlink underlying CR-NOMA system consisting of one secondary transmitter, one cooperative relay, two secondary users, one EH user, one primary user and one eavesdropper. The cooperative relay operates in half-duplex mode and implements the decode-and-forward (DF) protocol. Figure 1 illustrates the system model; the nearby secondary user is U1, and we assume there is no direct link between the transmitter and the distant secondary user, U2, because of path obstruction. User 3 (denoted as U3) is the EH user and the primary user is denoted as PU. The system model involves two phases. In Phase 1, the transmitter serves the secondary users and sends a superimposed signal, \(x\), composed of Message 1, Message 2, and Message 3 corresponding to the close, distant and EH users' messages, respectively. Then, U1 and the relay receive the messages. In Phase 2, the relay retransmits Message 2 to U2 and U1. In the following, we provide a detailed description of the two phases. Concerning Phase 1, let \(x_{1}\), \(x_{2}\in\mathbb{C}\) denote the messages for U1 and U2, with transmit powers of \(p_{1}\) and \(p_{2}\) respectively. According to the NOMA concept, the transmission power level for the user with the lower channel gain should be higher than the transmission power level of the user with the higher channel gain. Therefore, we consider \(p_{2}>p_{1}\). The energy signal intended for the EH user, \(x_{3}\), can be a signal known to both secondary users prior to information transmission. At the secondary transmitter, \(x_{3}\) is sent with a transmit power of \(p_{3}\). Then, the transmit signal is defined as \(x=\sqrt{p_{1}}x_{1}+\sqrt{p_{2}}x_{2}+\sqrt{p_{3}}x_{3}\). The channels from the transmitter to User 1, User 3, the relay, and the eavesdropper are denoted as \(\tilde{h}_{T\tilde{u}_{1}}\), \(\tilde{h}_{T\tilde{u}3}\), \(\tilde{h}_{TR}\) and \(\tilde{h}_{TE}\), respectively. The channels from the relay to User 1, User 2, and the eavesdropper are denoted as \(\tilde{g}_{R\tilde{u}_{1}}\), \(\tilde{g}_{R\tilde{u}_{2}}\), and \(\tilde{g}_{RE}\), respectively. We assume that the variance in the noise of the users, the relay, and the eavesdropper is the same, and we define them as \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Abbreviation** & **Term** & **Abbreviation** & **Term** \\ \hline NOMA & non-orthogonal multiple access & PSO & particle swarm optimization \\ OMA & orthogonal multiple access & QoS & quality of service \\ SIC & successive interference cancellation & TDMA & time-division multiple access \\ PLS & physical layer security & U1 & nearby secondary user \\ SEE & secrecy energy efficiency & U2 & distant secondary user \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Nomenclature. \(\sigma^{2}=\sigma_{R}^{2}=\sigma_{Ev}^{2}=\sigma_{u_{1}}^{2}=\sigma_{u_{2}}^{2}\). We also assume that U1 and U2 can cancel the interference from known symbol \(x_{3}\). In Phase 1, since the relay decodes Message 2 (considering Message 1 as interference), the rate of Message 2 at the relay is given by  
\[R_{x_{2},TR}=\frac{1}{2}{\rm log}_{2}(1+\frac{p_{2}h_{TR}}{p_{1}h_{TR}+\sigma_{ R}^{2}}), \tag{1}\]  
where \(h_{TR}=\left|\tilde{h}_{TR}\right|^{2}\). At the eavesdropper, the rate of Message 1 is:  
\[R_{x_{1},TE}=\frac{1}{2}{\rm log}_{2}(1+\frac{p_{1}h_{TE}}{p_{2}h_{TE}+p_{3}h_ {TE}+\sigma_{Ev}^{2}}), \tag{2}\]  
where \(h_{TE}=\left|\tilde{h}_{TE}\right|^{2}\). The energy harvested by User 3 in Phase 1 can be expressed as  
\[E_{3}^{(1)}=\left|\tilde{h}_{T\Omega 3}\right|^{2}(p_{1}+p_{2}+p_{3})\, \tau=\frac{h_{T\Omega 3}\left(p_{1}+p_{2}+p_{3}\right)}{2}, \tag{3}\]  
where \(h_{T\Omega 3}=\left|\tilde{h}_{T\Omega 3}\right|^{2}\), \(\tau\in(0,1)\), \(\tau=\frac{1}{2}\) is the transmission time fraction for Phase 1. In Phase 2, the relay retransmits Message 2.