Optimal Power Allocation for Achieving Secure Green Cognitive Radio Networks

: In cognitive radio networks, wireless nodes adapt to the surrounding radio environment and utilize the spectrum of licensed users. The cognitive radio environment is dynamic, and wireless channels are accessible by both legitimate and illegitimate users. Therefore, maintaining the security of cognitive radio networks is a challenging task, which must be addressed thoroughly. Further, with the recent exponential surge in wireless nodes and associated high data rate requirements, energy consumption is also growing at an unprecedented rate. Hence, energy efﬁciency becomes an important metric that must be considered in the design of future wireless networks. Accordingly, by considering the great ecological and economic beneﬁts of green wireless networks, this work focus on energy-efﬁcient resource allocation in secure cognitive radio networks. Since physical-layer security is an emerging technique that improves the security of communication devices, in this paper, an ergodic secure energy efﬁciency problem for a cognitive radio network is formulated with a primary user, a secondary user, and an eavesdropper. As the formulated problem is non-convex, a concave lower bound is applied to transform the original non-convex problem into a convex one. Further, by adopting the fractional programming and dual decomposition techniques, optimal power allocation strategies are obtained with the aim of maximizing the ergodic secure energy efﬁciency of the secondary user with constraints on the average interference power and average transmit power. Numerical examples are used to demonstrate the effectiveness of the proposed algorithm.


Introduction
Cognitive radio is a promising technique that utilizes unused spectrum bands and improves the network's spectral efficiency (SE). Apart from spectral efficiency, energy efficiency (EE) is another important design criterion that should be considered for future green wireless networks [1]. The unprecedented increase of mobile devices and the escalating high data rate requirements have contributed to the sharp growth of energy consumption and greenhouse gas emission. It is reported that 2% to 10% of the global energy consumption and 2% of the greenhouse gas are generated by information and communication technologies [2]. Accordingly, green cognitive radio is an attractive technology that can improve both the spectral efficiency and energy efficiency of a wireless network simultaneously. In such a green cognitive radio spectrum-sharing system, a secondary user (SU) coexists with the primary user (PU) and transmits information in the same spectrum bands of the PU in an energy-efficient way on the condition that the interference caused to the PU by the SU is tolerable within specific margins [3].
However, due to the dynamic nature of a cognitive radio environment, security is also an important issue that has been attracting growing attention [4]. There may exist cognitive radio networks and optimized the time allocations and beamforming vectors to minimize the energy consumption of the SU, and [17] studied the cooperative sensing scheduling by considering both sensing performance and energy efficiency under a practical scenario where both PU channels and SUs have heterogeneous characteristics. Next, the energy-efficient resource allocation in an orthogonal frequency division multipleaccess-based cognitive radio network is investigated in [18] under the constraints of the transmission power budget of the cognitive radio system, interference threshold of primary users, and traffic demands of secondary users, and a fast barrier method is developed to speed up the computation of the Newton step, while [19] studies the energy efficiency of cognitive relay networks, where a cognitive capacity harvesting network architecture was proposed, and a spectrum-and energy-efficient relay station placement strategy was developed. In [20], the authors study the energy-efficient resource allocation in heterogeneous cognitive radio networks with femtocells. The resource allocation problem is formulated as a three-stage Stackelberg game, and an iteration algorithm is given to obtain the Stackelberg equilibrium solution for the energy-efficient resource allocation. However, the authors only considered perfect channel state information scenarios in this work and did not consider uncertainties in the channel parameters. Similarly, in [21], the authors designed sensing-access strategies to maximize the energy efficiency of multi-channel cognitive radio networks using sequential channel sensing. The design problem is formulated as a stochastic sequential decision-making problem and was solved by dynamic programming. In [22], the authors studied the energy efficiency of full-duplex cognitive radio. Using discrete-time embedded Markov-chain modeling, the effect of the frequency of sensing is analyzed on the energy efficiency, throughput, and probability of collision for a target false alarm and miss detection levels. By using sleeping times in the sensing mechanism, the system performance was analyzed in different average power consumption distributions for the transmitting and sensing operations of the cognitive device. The performance of full-duplex cognitive radio was compared with a conventional half-duplex cognitive radio, and the results verified that even under poor channel conditions, the full-duplex cognitive radio can achieve a higher level of energy efficiency without compromising its throughput. Finally, in [23], the authors proposed an energy-efficient power allocation scheme by taking into consideration the various types of probabilities associated with the sensing process as performance parameters. Based on these probabilities, the authors proposed a new method to utilize PU carriers. The trade-off between the sensing quality and the achievable sum rate while using PU sub-carriers was used for allocating the optimal transmit power. Regarding the energy efficiency issue in traditional secure wireless communication networks [24][25][26][27][28], there are many challenges for energy efficiency maximization in secure green cognitive radio networks. In particular, in a secure green cognitive radio, the interference by the SU to the PU must be considered while maintaining the quality of service at the PU. Recently, energy-efficient secure communication in cognitive radio networks has been investigated in several research articles. In [29], the authors studied a secure energy efficiency maximization problem for a guaranteed minimum secrecy capacity of an SU under a peak interference power constraint and an average/peak transmit power constraint. In [30], the authors obtained the maximum secrecy energy efficiency of an underlay cognitive relay network in the presence of an eavesdropper over a multi-antenna relay. Similarly, in [31], the authors investigated a secure energy efficiency optimization problem in a multiple-input single-output underlay cognitive radio network in the presence of an unauthorized energy harvesting energy receiver. However, these works consider only the perfect channel state information scenario. To our best knowledge, the secure energy efficiency maximization problem has not been studied in secure cognitive radio from the perspective of green communications.
In this paper, unlike the above-mentioned works, an ergodic secure energy efficiency maximization problem is considered for a secure cognitive radio network, where the SU and PU coexist in the presence of an eavesdropper and fading channel, subject to the average interference power constraint identified as the metric for protecting the quality of service of the PU and the average transmit power constraint that limits the SU transmit power. An iterative algorithm is proposed to find the optimal power allocation policy for the designed framework based on dual-decomposition.
The remainder of the paper is organized as follows. Section 2 presents the system model. The ergodic secure energy efficiency maximization problem subject to the AIP and ATP constraints is presented in Section 3. Section 4 presents a model extension for robust power allocation. Section 5 presents the simulation results. Section 6 gives the concluding remarks.

System Model
In this section, we first expatiate the network model, followed by the transmission model. Lastly, we describe power constraints necessary for secondary user transmission and to protect the primary user from interference generated by the secondary user. Figure 1 shows an underlay cognitive radio model, which consists of a single PU and SU pair. The SU opportunistically accesses the spectrum unused by the PU if and only if the engendered interference is not traded off with the performance of the PU. There is a passive eavesdropper (ED) in the wire-tap link. The secure green cognitive radio system operates on a spectrum sharing program, where the SU-Tx intends to send a confidential message to the SU-Rx on the same narrow-band as the PU-Tx. At the same time, the eavesdropper tries to eavesdrop and intercept the information sent by the SU-Tx. The passive eavesdropper attempts to intercept the SU's information without modifying it or misleading the SU, and also, the SU does not receive any feedback or trust any feedback from the passive eavesdropper. All the terminals have one antenna.

Network Model
All the links between the SU-Tx and PU-Rx (interference link), Su-Tx-SU-Rx (SUlink), and SU-Tx and ED-Rx (ED-link) are block faded with independent and identically distributed (i.i.d) channel power gains with continuous probability density functions. The block fading additive white Gaussian noise channels are the general class of blockinterference channels as described in [32]. It happens that, in several wireless communication conditions, variations in the propagation environment take place on a very slow time scale with respect to the signaling rate. The channel coefficient stays constant during each transmission block, but probably changes from one block to a new block [33]. Blocks can be assumed as separated either in time (e.g., in a time division multiple access system as in [34]), as separated in frequency (e.g., in a multi-carrier system as in [35]), or as separated both in frequency and time (e.g., in a slow frequency-time hopping system as in [36]. This paper considers a point-to-point flat fading channel. A wireless channel is thought to be flat fading if its gain is constant and it has a linear phase response over a bandwidth that is greater than the bandwidth of the transmitted signal [37]. The flat fading channel can cause a decrease in the signal-to-noise ratio (SNR) [38]. The flat fading channels are also known as amplitude-varying channels or narrow-band channels as the signal is narrow with respect to the channel bandwidth [39]. This channel model is also well fitted to the case of a multi-carrier system with B parallel sub-channels, possibly located at non-adjacent carrier frequencies [40].
It is assumed that the interference at the SU-Rx and the eavesdropper from the PU-Tx are circularly symmetric complex Gaussian. This model for the interference is a worstcase model and was used in [41]. Thus, the interference and the noise at the SU-Rx and the eavesdropper are circularly symmetric complex additive white Gaussian noise with variance σ 2 ss and σ 2 se , respectively. The secondary user is assumed to have perfect knowledge of instant channel state information (CSI) for all fading states. The interference channel state information from the SU transmitter to the PU receiver can be obtained at the SU transmitter through cooperation with the PU. For the ED link, the statistical channel state information is available at the legitimate transmitter, which is generic and extensively adopted in the literature (see [21][22][23]). In practice, this corresponds to the scenario where the eavesdropper was a legacy user previously, but now identified as an eavesdropper since the SU-Tx wants to transmit some confidential message to the SU-Rx and keeps it a secret from the eavesdropper. In this work, nodes are static for simplicity, and the focus is more on the energy efficiency aspects of cognitive radio networks. Note that for readability, key notations are depicted in Table 1.

Transmission Model
In this paper, the objective is to find the optimal cognitive power that maximizes the energy efficiency for a given channel realization and with respect to power and interference constraints. The energy efficiency can be calculated as ratio of spectral efficiency and total consumed power. The total consumed power is the sum of transmit power and circuit power P c . The circuit power includes the consumption of analog-to-digital converters, filters, mixers, amplifiers, etc. The circuit's output power P c plays an important part in determining the optimal power for maximizing the EE. Indeed, if P c = 0, the power that optimizes the EE tends to zero, and the problem is addressed immediately. The rest of the study assumes that P c > 0, implying that the optimal power is not zero.
Let h p , h s , and h e represent the channel coefficients of the links from SU-Tx to PU-Rx, SU-Tx to SU-Rx, and SU-Tx to ED-Rx, respectively. The channels may follow any distribution, e.g., Rayleigh, Nakagami, Rician, etc. For simulation and numerical results, we adopted a Rayleigh fading distribution. All channels are block fading and experience independent and identical Rayleigh fading. Let g sp (ν) = | h p | 2 , g ss (ν) = | h s | 2 , g se (ν) = | h e | 2 represent instantaneous channel power gains for the channel from the SU transmitter to the PU receiver, the channel from the SU transmitter to the SU receiver, and the channel from the secondary user transmitter to the eavesdropper, respectively. Here, ν denotes the fading index for all related channels. Given the transmission power at the secondary transmitter is P s (ν), the received signals at the SU-Rx and ED-Rx are given as respectively. Here, x s represents the transmitted symbol from the SU-Tx. w s and w e are independent complex additive white Gaussian noise (AWGN) with zero mean and σ 2 ss and σ 2 se variances. The capacity of the channel between the SU-Tx and SU-Rx, considering the unit bandwidth, is given by where γ ss = g ss (ν) Similarly, the capacity of the channel between the SU-Tx and ED-Rx for the unit bandwidth is where γ se = g se (ν) The secrecy rate or secrecy capacity (SC) of the secondary user is given by where [.] + denotes max[., 0].

Power Constraints
There are two types of power constraints with respect to secondary user communication, namely peak transmit power (PTP) and average transmit power (ATP) constraints. The PTP constraint is due to the non-linearity of power amplifiers, while the ATP constraint's aim is to satisfy the long-term power budget of the SU. The ATP/PTP constraints can be written as where, P s (ν) is the transmit power of the SU in fading state ν. P peak and P avg represent the maximum PTP and the maximum ATP of the SU, respectively. E(.) is the expectation operator. To protect the primary user from interference generated by secondary user transmission, an interference power constraint must be imposed on the secondary user. It is shown in [42] that the average interference power (AIP) constraint can better shield the primary user from secondary user transmission. Hence the AIP constraint is considered here on the secondary user and can be written as where P in f denotes the maximum tolerable AIP. Note that this work uses only the ATP and AIP constraints.

Ergodic Secure EE Maximization under Average Transmit Power and Average Interference Power Constraints
In this section, the ergodic secure energy efficiency maximization problem is studied under the AIP and ATP constraints. The corresponding ergodic secrecy capacity (SC) maximization problem is also simulated and investigated to present a benchmark. The energy-efficient optimal power allocation strategy for the ergodic secure EE maximization and the optimal power allocation strategy for the ergodic SC maximization are proposed.

Problem Formulation and Transformation
According to [43], a source can reliably transmit data to a destination with a non-zero rate when the desired receiver has better channel conditions than the eavesdropper. As presented in [5], the SC of the SU is the difference between the capacity of the secondary link and that of the wire-tap link, denoted by R Sec (P s (ν)) and given as where γ ss = g ss(ν) /σ 2 ss and γ se = g se (ν)/σ 2 se . Here, x s (ν) is an indicator function for whether the SU transmits information or not in fading state ν. For γ ss > γ se , x s (ν) = 1, and x s (ν) = 0 for γ ss ≤ γ se . As discussed in [12], the ergodic SC is the long-term average SC. Thus, the ergodic secure EE maximization can be formulated as problem P1 and can be given as where η EE (P s (ν)) denotes the ergodic EE function of P s (ν). ξ and P C represent the amplifier coefficient and the constant circuit power consumption of the SU-Tx, respectively.
Proof. This can be shown by taking the second-order derivative of R Sec (P s (ν)) with respect to P s (ν), i.e., As the second-order derivative of R Sec (p s (ν)) is the summation of concave plus convex terms, hence the optimization problem is non-convex. Now, the optimization problem P1 is non-convex in nature due to (i) the fractional form of the objective function in (9a) and (ii) C 5 being a mixed binary integer non-linear programming problem [44]. There is no standard technique to solve such an optimization problem. Therefore, to determine the optimal resource allocation policies, the original optimization problem needs to be transformed into an analytically tractable form. First, apply the change of variable to R Sec (P s (ν)) by puttingP s (ν) = log 2 (P s (ν)) as follows: R * Sec (P s (ν)) = 1 log 2 log(1 + γ ss eP s (ν) ) − log(1 + γ se eP s (ν) ) x s (ν) (11) Using R * Sec (P s (ν)), problem P1 can be equivalently written as The new constraints after the change of variable are given below: Furthermore, use the successive convex approximation approach to transform the problem P1a into a tractable one by maximizing a lower-bound of the achievable sum rate in the following: (17) where Γ ss = γ ss eP s (ν) and Γ se = γ se eP s (ν) . Using R * Sec,LB (P s (ν)), problem P1a can be rewritten as The lower bound relationship is always valid if the coefficients are chosen as follows [45]: Similarly, The lower bound becomes tight with equality when the coefficients are selected as specified above.

Optimal Power Allocation
Because of the fractional form, the objective function in P1b is still non-convex. By utilizing the properties of non-linear fractional programming, which is useful to deal with the concave-over-convex fractional function in an iterative manner, the objective function can be transformed in subtractive form. Let S 1 denote the set S 1 = {P s (ν)|P s (ν) ∈ {C 2 , C 3 , C 4 , C 5 }}. According to Dinkelbach's method [46], problem P1b can be equivalent to a parameter optimization problem, denoted by P2, given as where η is a non-negative parameter. It is seen that η can be regarded as the cost factor of the power consumption.

Remark 1.
When η approaches zero, it implies that the cost for power resource utilization is negligible, and the power allocation policy bears resemblance to an ergodic secure capacity maximization problem. However, when the values of η increase, the network utility stresses the importance of the power resource for the design of power allocation in cognitive radio networks. No transmission will be the best strategy to maximize the EE when η → ∞.
LetP s opt (ν) and η opt denote the EE optimal transmit power of the SU in terms of maximizing the ergodic secure EE and the optimal η of P2, respectively. The EE optimal power allocation strategy can be obtained by using Theorem 1, given as follows.
Now, according to Equations (27), the maximum of f (η) is zero and is achieved when the EE optimal power is adopted and the maximum ergodic secure EE is obtained. Now, for a given η, the Lagrange duality method can be applied to solve problem P2. The Lagrangian function of P2 can be given as where λ and µ denote the non-negative dual variables. Then, the Lagrange dual function of P2 can be given as where The problem is decomposed and solved via two iterative steps: (i) the first step is related to a subproblem for finding the solutions of the power control, and (ii) the second step involves a master dual problem for updating the Lagrangian multipliers. Thus, by taking the partial derivative of L P s (ν), λ, µ with respect toP s (ν) and equating the result to zero, the optimalP s (ν) can be obtained. In the master problem, for the obtainedP s (ν) in the sub-problem, the Lagrangian multipliers λ and µ are updated using the sub-gradient method [44]. The proposed iterative algorithm is summarized in Algorithm 1. Solve P2. 7: Update λ and µ. 8: until convergence to the optimal solutionP s (ν) opt ; 9: Update the coefficients α ss , α se , β ss , and β se ; 10: SetP s (ν)[k + 1] ←P s (ν) opt [k] and k ← k + 1.

Limitations of Proposed Scheme and Model Extension for Robust Power Allocation
In this work, nodes are static for simplicity, and the focus is more on the energy efficiency aspects of cognitive radio networks. However, the mobility of the wireless nodes and the distance between nodes also affects the performance of cognitive radio networks. The mobility of nodes and distance are interrelated. When the mobile nodes move, the mutual distance between the primary user and cognitive users changes dynamically [47]. As a result of this, the channel between them is time-varying. Therefore, even if at a particular time, the cognitive radio user detects the presence of the PU accurately, this situation might change after the movement of the PU or cognitive radio user [48]. If spectrum sensing algorithms are aware of these topological changes, then it would protect primary users from interference. Mobility also affects other network characteristics such as network connectivity [49], routing [50], capacity [51], coverage [52], etc. Mobility also plays a critical role in latency.
Mobility is also an intrinsic feature to support distinct kinds of wireless services in cognitive radio networks. The IEEE 802.22 Working Group has recently adopted an amend-ment for the operation of portable devices [53]. Allowing node mobility in cognitive radio networks will introduce numerous challenges, making it necessary to revisit the current system design and protocols, such as mechanisms for spectrum sensing, interference management, and routing. Despite its importance, however, mobility is still largely unexplored in the context of dynamic spectrum access. Therefore, the mobility of nodes affects the performance of cognitive radio networks in a big way.
Here, we assume that channels are flat fading. However, frequency-selective fading would provide an extra facet for optimization (e.g., more power can be transmitted opportunistically at frequencies where the secondary-primary channel has higher attenuation). To report the result of sensing, one or more reporting channels are needed. The reporting channel uses a different band from that used for sensing. In this work, we are assuming that sensing results are transmitted using the PU's spectrum when the absence of the PU is confirmed. Here, the potential interference to the PU is controllable, and hence, we can meet the PU's outage probability requirements. However, because of the misdetection probability of the PU, this method still generates interference to the primary user, and therefore, we need a specific reporting channel design. The reporting channel design can be explored in a future extension of this research.
In this work, we assumed that all the channel state information (CSI) is perfectly known at all transceivers. The CSI for the secondary link can be obtained by the classic channel training, estimation, and feedback mechanisms. However, obtaining the CSI of the link from the secondary transceiver to the primary receiver and eavesdropper link is a challenging task as this CSI knowledge requires the primary user and eavesdropper to cooperate. If there is no cooperation of the users, then there is the possibility of interference in the primary communication link. Therefore, timely and accurate knowledge of the CSI requires considerable resource overhead. In the next part of this section, we extend our proposed framework to the non-perfect CSI scenario.
In practice, perfect CSI is challenging to obtain due to the inherently time-varying nature of wireless channels, delay, noise, and limited bandwidth in feedback channels and other factors. This section considers a more practical scenario where cognitive radio users do not have perfect CSI knowledge [54] and proposes a robust resource allocation policy. The proposed design framework can be easily extended to accommodate this scenario by replacing the channels with the following: whereĜ ss ,Ĝ se , andĜ sp are the estimated channels and i ∼ CN 0, σ 2 e , ζ j ∼ CN 0, σ 2 e , and χ j ∼ CN 0, σ 2 e are the channel estimation errors. The proposed power allocation schemes obtained under imperfect CSI are beneficial in practical settings and give insight into the impact of channel uncertainty on the system performance. At the same time, the EE in the presence of perfect CSI of the transmission and interference links serves as a baseline to compare the performances attained under the assumption of imperfect CSI.

Numerical Results
This section presents simulation results to demonstrate the SU's achievable maximum ergodic secure EE with the proposed EE optimal power allocation strategies under the ATP and AIP constraints. The achievable maximum ergodic secure EE is compared with that achieved with the optimal power allocation strategies for the ergodic SC maximization (SCM). The values of P C and ξ are 0.01 W and 0.2, while σ 2 ss and σ 2 se were set as 0.001 and 1, respectively. The maximum number of iterations for inner and outer loops is 10. The maximum tolerance value is 10 −5 along with 0.01 as the positive step sizes. Figure 2 illustrates the convergence of the proposed iterative power allocation algorithm. The values of the ATP and AIP were set as P avg = 50 mW and P in f = 50 mW, respectively. It can be observed that the obtained ergodic secure EE and SC of the proposed algorithms monotonically increase with the number of iterations, and the number of iterations required for convergence is less than four. The quick convergence, however, comes at the expense of a lower ergodic secondary secrecy sum rate (weaker performance). This is due to the algorithm skipping over certain possible solutions that would satisfy the requirements and yield a greater sum rate. As a result, the designer may always strike a balance between the problem's complexity and the performance of the secondary network.  Figure 3 shows the performance comparison of the proposed energy efficiency maximization (EEM) algorithm with that of the SCM. The AIP constraint was set as P in f = 0.1 W. Several interesting observations are noted from this figure. It can be seen that the average ergodic secure EE of the SU achieved by both algorithms is identical for P avg = 0.03 W.
However, when P avg ≥ 0.04 W, the maximum ergodic secure EE of the proposed EEM algorithm is better than that of the SCM. This indicates that the power allocation strategy for the ergodic SCM is not "optimal" with respect to the ergodic secure EE maximization. On the other hand, the SCM algorithm outperforms the proposed EEM algorithm in terms of the average ergodic SC for P avg > 0.01 W. This is because the SU user utilizes the maximum power to enhance the ergodic SC without being concerned about the ergodic secure EE. Thus, the trade-off between the achievable ergodic secure EE and the ergodic SC of the SU can be understood from Figure 3. Moreover, we can also observe that EEM has an average ergodic EE gain of over 21% over SCM when P avg = 0.07 W.   Figure 4 shows the ergodic EE and SC of the SU versus the ATP for the ergodic secure EEM algorithm. The AIP constraint was set as P in f = {0.01, 0.1} W. It is seen that the average ergodic EE and SC of the SU achieved for the ergodic EEM algorithm improve with increasing AIP values. A higher AIP value indicates that the PU receiver can tolerate higher interference power from the SU. Thus, the SU uses more power to improve ergodic secure EE and ergodic SC. In the case of non-cognitive transmission, the positive value of secrecy can be obtained when the secondary channel is strictly more robust than the eavesdropper channel. However, for cognitive transmission, the interference temperature limits the capacity regardless of transmit power. Figure 5 shows the average ergodic EE and SC performance of the SU for different AIP. The average ergodic EE and SC increase with increasing P in f and become constant after P in f > 0.6 W. When ATP P avg increases from 0.01 W to 0.1 W, the average ergodic EE and SC achieved for the proposed algorithm also increase. This can be explained by the fact that a higher ATP can provide more flexibility to the transmit power of the SU. As given in [42], the AIP constraint is superior in terms of achievable ergodic and outage capacity for secondary users and the PU. The same can be seen here, and the simulation results confirmed that the SU's various capacity limits also increase with increasing AIP constraints. This is due to interference diversity, where a limit on randomized average interference power over the different fading states increases the PU's and SU's capacity. Hence, the AIP constraint results in larger capacities for both the SU and PU. As shown in Figure 4, the EE of the SU also increases with the ATP and AIP, which agree with the analytical results obtained in Section 3. Here, it is assumed that perfect CSI is available for the PU interference channel at each fading state. The discussion of the AIP presented in this paper can be extended for the more general case where only statistical knowledge is available.  Finally, Figure 6 shows how the proposed EEM algorithm compares to the EEM algorithm in a network without an eavesdropper in terms of average ergodic EE and SC performance. Here, the value P avg = 0.1. In both cases, the value of the average EE and average SC for the SU increases with increasing P in f . As seen earlier, the higher AIP value indicates that the PU receiver can tolerate higher interference power from the SU. Thus, the SU user uses more power to improve ergodic secure EE and ergodic SC. The average EE becomes constant after P in f = 0.06 in both cases, and the average capacity becomes constant after P in f = 0.05. As expected, the average EE and average capacity values are quite higher when there is no eavesdropper. This is because the presence of the eavesdropper causes several channel impairments, and hence, the average EE and SE of the network decrease.
Here, we can see that EEM without the eavesdropper has an average secure EE gain of around 16% over secure EEM.

Discussion
In this work, we investigated the issue of eavesdropping in underlay cognitive radio networks where the eavesdropper reduces the secrecy capacity of the secondary link. To gain an insight into the convoluted effects that system parameters such as the transmission power and interference power have on the underlay network's performance, we exclusively focused on characterizing various key aspects that may have potential impacts on secure underlay CRNs. We examined the spectrum sharing cognitive radio (CR) systems where either a peak or an average power constraint and average interference power constraint are assumed and found the power that maximizes the EE despite its non-convexity. An algorithm for energy efficiency maximization was proposed, and it was seen that the running time of the algorithm is fast and the algorithm converges quickly. We also highlight the discrepancy in performances between adopting the EE criterion and adopting the SE criterion. It was seen that the maximum ergodic secure EE of the SU achieved for the ergodic secure EE maximization is not less than that achieved for the ergodic SC maximization, irrespective of the ATP constraint or the PTP constraint. This indicates that the power allocation strategy for the ergodic SC maximization is not "optimal" with respect to the ergodic secure EE maximization, while the proposed EE optimal power allocation strategies can guarantee that the SU achieves the maximum ergodic secure EE. It was seen that the ergodic SC of the SU achieved for the ergodic SC maximization is larger than that obtained for the ergodic secure EE maximization, irrespective of the ATP constraint or the PTP constraint. In other words, the SU cannot be guaranteed to achieve the maximum ergodic secure EE and the maximum ergodic SC simultaneously. If the SU wants to achieve the maximum ergodic secure EE, the achievable ergodic SC of the SU may decrease and vice versa. It was seen that the ergodic secure EE of the SU first increases with the looser ATP constraint and then decreases with the looser ATP constraint when the optimal power allocation strategies for the ergodic SC maximization are used, while the ergodic SC of the SU always increases with the looser ATP constraint. This shows that there exists a trade-off between the ergodic secure EE and ergodic SC of the SU. It is interesting to note that the ergodic secure EE achieved for the ergodic EE maximization is the same as that achieved for the ergodic SC maximization when the ATP constraint is very tight compared with the AIP constraint. The reason is that only the ATP constraint is active when the ATP/PTP constraint is very tight.

Conclusions
In this paper, physical-layer security from an energy efficiency perspective was studied in a green CR network with a spectrum sharing paradigm. The ergodic secure energyefficient maximization problem was formulated under the AIP and ATP constraints. Using fractional programming techniques and the Lagrange duality method, the EE optimal power allocation strategies were designed to maximize the ergodic secure EE of the SU. An iterative power allocation algorithm was proposed to solve the ergodic secure EE maximization problem. The optimal power allocation strategies for maximizing the ergodic SC of the SU were also proposed. With the help of simulations, the achievable maximum ergodic secure EE of the SU with the proposed EE optimal power allocation strategy was demonstrated.
Author Contributions: R.Y. simulated the proposed method and analyzed the results and wrote the paper; K.S. proposed the problem and helped in designing the system model and the problem formulation; A.K. assisted in polishing the paper. All authors have read and agreed to the published version of the manuscript.
Funding: This research received no external funding.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: