## 5 Optimal Power Allocation Design and Energy Efficiency Analysis
### Optimal Power Allocation Design  
According to [28], the EE can be defined as the ratio of the network total transmission rate and total transmit power. And the EE can be maximized through maximizing total transmission rate with the same total transmit power. In addition, according to [32], when optimizing each node's power, the \(P_{P}\) is assumed to be constant. At the same time, the OPA should consider the requirement of the interference threshold of PUs without affecting the normal communication of the PUs. In such case, in order to further improve the network EE and achieve energy-efficient transmission, each node's power in the secondary network will be optimized through maximizing the total transmission rate with the same total transmit power under the requirement of PUs' interference threshold \(Q\). With the found \(P_{th}\), the OPA can be presented as follows. 1. When \(P_{T}>P_{th}\), the interference from SU\({}_{1}\) and SU\({}_{2}\) to PUs should satisfy \(P_{1}{\left|{{l_{1}}}\right|}^{2}+P_{2}{\left|{{l_{2}}}\right|}^{2}=Q\) to assure the PUs' performance. At the same time, according to [18; 25], the transmit power of SR\({}_{\text{b}}\) is constrained not only by the harvested energy but also by the interference threshold of PUs. Therefore, with (3), the optimized transmit power of SRcan be expressed as \(P_{R}^{s}=\min\biggl{\{}P_{R_{r}},\frac{Q}{|t_{r}|^{2}}\biggr{\}}\). Subsequently, let \(Q_{1}=\frac{Q}{|t_{1}|^{2}}\) and \(Q_{2}=\frac{Q}{|t_{2}|^{2}}\), to maximize the EE through maximizing the total transmission rate with the same total transmit power and the requirement of \(Q\), the optimal problem can be described as  
\[\max_{\varepsilon} R_{1}^{s}+R_{2}^{s}\] (20a) s.t. \[P_{1}=\varepsilon Q_{1} \tag{20b}\] \[P_{2}=(1-\varepsilon)Q_{2}\] (20c) \[0\leq\{P_{1},P_{2}\}\leq P_{T}^{\max} \tag{20d}\]  
where \(\varepsilon\) is the power distribution factor under the interference threshold, and \(P_{T}^{max}\) is the maximum transmit power. With the \(\varepsilon\), the \(P_{1}\) and \(P_{2}\) also satisfy \(P_{1}|{l_{1}}|^{2}+P_{2}|{l_{2}}|^{2}=Q\). Observing the optimal problem of (20a), it can be found that through finding the optimal \(\varepsilon\) under the Q, the total transmission rate can be maximized. Let \(U^{s}=\frac{(1-\rho)\rho\eta P_{1}|{l_{1}}|^{2}|{g_{b}}|^{2}}{\varepsilon_{1}+ N_{1}}\) and \(Z^{s}=\frac{(1-\rho)\rho\eta P_{1}|{l_{1}}|^{2}|{g_{b}}|^{2}}{\varepsilon_{2}+ N_{2}}\), and the optimal problem can be re-described as  
\[\max_{\varepsilon} \frac{1}{2}[\log_{2}(1+U^{s})+\log_{2}(1+Z^{s})]\] (21a) s.t. \[P_{1}=\varepsilon Q_{1} \tag{21b}\] \[P_{2}=(1-\varepsilon)Q_{2}\] (21c) \[0\leq\{P_{1},P_{2}\}\leq P_{T}^{\max} \tag{21d}\]  
where \(e_{1}=(1-\rho)\rho\eta P_{P}|{f_{b}}|^{2}|{l_{r}}|^{2}+(1-\rho)P_{P}|{l_{1}}|^ {2}\) and \(e_{2}=(1-\rho)\rho\eta P_{P}|{g_{b}}|^{2}|{l_{r}}|^{2}+(1-\rho)P_{P}|{l_{2}}|^ {2}\). Substituting (21b) and (21c) into (21a), the maximum of the total transmission rate can be obtained with the following equation:  
\[\max_{\varepsilon}\ [\log_{2}(1+U^{s})+\log_{2}(1+Z^{s})]=\frac{ \partial[\log_{2}(1+U^{s})+\log_{2}(1+Z^{s})]}{\partial\varepsilon}=0 \tag{22}\]  
Solving (22), the optimal \(\varepsilon=\frac{Q_{1}a_{2}-Q_{2}a_{1}+Q_{1}Q_{2}a_{1}a_{2}}{2Q_{1}Q_{2}a_{1 }a_{2}}\) and \(1-\varepsilon=\frac{Q_{2}a_{1}-Q_{1}a_{2}+Q_{1}Q_{2}a_{1}a_{2}}{2Q_{1}Q_{2}m}\) can be obtained, where \(a_{1}=\frac{(1-\rho)\rho\eta|f_{b}|^{2}|{g_{b}}|^{2}}{\varepsilon_{1}+N_{1}}\) and \(a_{2}=\frac{(1-\rho)\rho\eta|f_{b}|^{2}|{g_{b}}|^{2}}{\varepsilon_{2}+N_{2}}\). Then, with (21b) and (21c), the optimal transmit powers can be finally obtained as  
\[ \begin{cases}P_{1}^{s}=\frac{Q_{1}a_{1}-Q_{2}a_{2}+Q_{1}Q_{2}a_{1}a_{2}}{2(Q_ {2}a_{1}a_{2}}\\ P_{2}^{s}=\frac{Q_{2}a_{2}-Q_{1}a_{1}+Q_{1}Q_{2}a_{1}a_{2}}{2(Q_{1}a_{1}a_{2}} \end{cases}  \tag{23}\]  
2. When \(P_{T}\leq P_{thr}\), \(P_{1}|{l_{1}}|^{2}+P_{2}|{l_{2}}|^{2}=Q\) also should be satisfied.