Energy Efficiency Optimization Algorithm of CR-NOMA System Based on SWIPT

-is paper proposes a system EE (energy efficiency) optimization algorithm based on OPS (On-off Power Splitting) strategy for SWIPT (Simultaneous Wireless Information and Power Transfer) two-way relay assisted CR-NOMA (Cognitive Radio NonOrthogonal Multiple Access) network. -e system capacity expression of the secondary users with the OPS strategy is derived. Under the constraints of harvested energy and quality of service (QoS) of the users, the optimization problem with the goal of maximizing energy efficiency is constructed. In this paper, the NP-Hard problem is transformed into three subproblems about relay power, NOMA coefficient, and segmentation coefficient, which are solved by golden section algorithm, monotonicity decision function, and genetic algorithm. -e simulation results show that compared with the PS (Power Splitting) and TS (Time Switching) strategies, the OPS strategy can significantly improve the transmission energy efficiency of the system.


Introduction
Devices in energy-constrained wireless communication systems, such as wireless sensor networks, wireless positioning networks, and the Internet of ings are mostly battery-powered, and the limitations of battery-powered capacity and inconvenient replacement greatly limit the performance of the system [1]. Energy harvesting is an advanced technology that has emerged in recent years. By collecting renewable resources in the surrounding environment to provide nodes with the necessary working energy and extending the survival time of energy-constrained wireless networks, the goal of achieving green communications is achieved [2]. In addition to harvesting energy from renewable energy sources such as solar energy, wind energy, and geothermal energy, there are near-field power transmission using inductive, capacitive, or resonant coupling, and far-field wireless power transmission via RF (radio frequency), wireless powering of devices using near-field Inductive Power Transfer, has become a reality with several commercially available products and standards. However, its range is severely limited (less than one meter). On the other hand, far-field Wireless Power Transfer (WPT) via RF (as in wireless communication) could be used over longer ranges, which is the main focus of this paper [3]. Due to the advantages of low cost and stable power, WPT will be widely used in the Internet of ings and various types of mobile terminals and has attracted widespread attention in the academic and industrial circles.
SWIPT is a product of the combination of wireless energy transmission and wireless information transmission (WIT), which can realize energy harvesting and information transmission at the same time. Nasir et al. [4] proposed two energy harvesting strategies for time switching and power splitting for energy harvesting relay networks and derived the throughput expression of the system. Nasir et al. [5] proposed continuous time acquisition strategy and discrete time acquisition strategy for TS strategy and compared the system outage probability of the two strategies by analyzing the probability of system interruption. Zhou et al. [6] designed a universal receiver that separates the received signals with adjustable power ratios for energy harvesting and information decoding and derives the rate-energy ratio of time switching, static power splitting, and on-off power splitting. Huang and Larsson [7] proposed a power control algorithm for SWIPT-based Orthogonal Frequency Division Multiplex (OFDM) networks to optimize system throughput in this scenario. Zhou et al. [8] studied the design of the SWIPT acquisition strategy in the downlink multiuser OFDM system; TS was used at the receiver for time-division multiplexed information transmission; PS was used at the receiver for OFDM-based information transmission, and the segmentation coefficients of the two strategies are optimized.
NOMA allows multiple users to share the same channel resources in the same cell at the same time, which makes it possible to obtain higher spectral efficiency than traditional orthogonal multiple access (OMA) technology. Zaidi et al. [9] deduced the expressions of user's outage probability and system throughput for the NOMA system based on SWIPT to evaluate the performance of the system. Bariah et al. [10] deduced the bit error rate expression of all users under PS strategy for the cooperative relay NOMA network based on SWIPT. Tang et al. [11] aimed at the joint power allocation problem in the NOMA system based on PS strategy. In order to simplify the problem, the energy harvested by the user was converted into the throughput, and the sum of the converted throughput and the user's transmission rate was defined as the new objective function, so [11] can give the optimization algorithm for user power and segmentation coefficient. Hedayati and Kim [12] aimed at the joint power allocation problem in the SWIPT-NOMA system based on the TS strategy and proposed an energy efficiency optimization algorithm that satisfies the requirements of transmit power limit, harvested energy, and quality of service. Tang [13] aimed at the joint power allocation problem in the SWIPT-NOMA system based on the TS strategy and proposed an energy efficiency optimization algorithm that satisfies the requirements of transmit power limit, harvested energy, and quality of service. Chang [14] investigated resource allocation algorithm design for an OFDM-based NOMA system empowered by wireless power transfer. Jameel [15] employed deep learning-based optimization to solve the problem of power distribution in SWIPT-NOMA network.
Cognitive radio technology can improve the spectrum utilization of the system by sharing the spectrum between different systems. In [16], a closed-form expression of the outage probability was derived for CR-NOMA networks based on SWIPT. Yang et al. [17] aimed at the SWIPT-based NOMA network, respectively, under the two strategies of fixed allocation and optimized allocation of the NOMA coefficient, and the user's outage probability was derived. Wang [18] derived the approximate expression of energy efficiency based on SWIPT-based CR-NOMA system and gave the relay power and time slot allocation scheme with the energy efficiency maximization as the optimization goal. Zhao et al. [19] proposed a two-way relay CR-NOMA system based on PS strategy and gave an optimization algorithm with energy efficiency as the optimization goal under the constraints of harvested energy and quality of service, but it did not consider the two typical strategies of TS and OPS. is paper proposes a system energy efficiency optimization algorithm using the OPS strategy for a two-way relay CR-NOMA system based on SWIPT.
e main innovations of this paper are as follows: (i) e system capacity expressions with the TS strategy and the OPS strategy are derived, respectively. Under the constraints of harvested energy and quality of service, an optimization problem with the goal of maximizing energy efficiency is constructed. (ii) e objective function is a multiobjective optimized NP-Hard problem. In this paper, the original problem is transformed into three subproblems about relay power, NOMA coefficient, and segmentation coefficient, which are solved by the golden section algorithm, the monotonicity determination method of the function, and the genetic algorithm; then, the solutions of three subproblems are jointly optimized by alternating iterative algorithm. (iii) e simulation results show that compared with the PS and TS strategies, the OPS strategy can significantly improve the transmission energy efficiency of the system. Since the OPS strategy can control time division and power division at the same time, thereby ensuring that the system completes the communication process with the lowest energy requirements, OPS strategy is better than PS and TS strategy when the power limit of different users and the distance between the near user and the relay are different.
e following content of this article is arranged as follows. e system model of the SWIPT-based two-way relay assisted CR-NOMA network is presented in Section 2. We describe the optimization problem with the goal of maximizing energy efficiency and give the optimization algorithm in Section 3. e simulation results and analyses are given in Section 4. Finally, we draw our conclusions in Section 5.

System Model
e system model of a two-way relay assisted CR-NOMA system in this paper is shown in Figure 1 [19], which includes a primary transmitter (PT), a primary receiver (PR), a two-way relay (TWR), and four secondary users of RF energy harvesting ability, among them, SU1 and SU3 and SU2 and SU4 are each a pair of sending and receiving users, and SU1 and SU3 are closer to TWR and SU3 and SU4 are farther from TWR. e communication process of the system is divided into two phases. In the first phase, four secondary users send signals to TWR at the same time. TWR receives and decodes the mixed signal in turn, which is subject to interference from the primary transmitter. In the second phase, TWR forwards the superimposed signals ���� b 1 P r x 1 + ���� b 2 P r x 2 and ���� b 3 P r x 3 + ���� b 4 P r x 4 to the two sets of NOMA secondary users SU1 and SU2 and SU3 and SU4 with a transmit power of P r and causes interference to the primary receiver, where x i is the signal that TWR forwards to the secondary user SUi and b i is the power allocation coefficient in NOMA. Because SU2 and SU4 are remote users, in order to ensure the fairness of NOMA, b 1 < b 2 and b 3 < b 4 , which means x 1 and x 3 are weak signals and x 2 and x 4 are strong signals. In the second phase, the secondary user receives and decodes the superimposed signal forwarded by the TWR, which completes the collection of the RF signal energy sent by the TWR at the same time. Channel state information (CSI) is assumed to be perfectly known at all terminals. Note that the CSI at the receivers can be obtained from the channel estimation of the downlink pilots, while CSI at the transmitter can be acquired via uplink channel estimation in the TDD mode [13].

Time Switching.
e system model of TS is shown in Figure 2, where the front (1 − λ)T/2 is the first phase, and the rest is the second phase, and T is the length of a communication process of the system. TS realizes two processes of energy collection and information transmission by dividing time, namely, energy harvesting is completed during the front λT and information transmission is completed during the rear (1 − λ)T/2.
For ease of calculation, it is assumed that the channel gains of the two groups of users are completely symmetrical. We take SU1 and SU2 as examples, the received signals and harvested energy are given by where h Ri is the link channel gain from TWR, η is the efficiency of energy collection, n i is Gaussian white noise (AWGN) at SUi, and the power is σ 2 . In practice, EH circuits usually result in a nonlinear end-to-end wireless power transfer [20,21], and for the convenience of calculation, according to [13,19], this paper assumes power conversion efficiency is independent of the input power level of the EH circuit and employs a linear energy harvesting model. SU1 is a near user and needs to decode the strong signal first and then the weak signal required. e information rates of the two signals are given by (2) SU2 can directly decode the required strong signal, and its rate is expressed as follows: All the energy harvested by the secondary users is used to complete the signal transmission in the first phase. e maximum average transmission power is obtained by e signal rate received by the primary receiver in the second phase is given by where h RP and h PP are the channel gains between TWR and PR and the primary transmitter and primary receiver in the second phase, respectively, and n p is Gaussian white noise at the primary receiver in the second phase, its power is σ 2 P .

On-Off Power
Splitting. e system model of OPS is shown in Figure 3. e division of time slots is the same as that of TS, the first (1 − λ)T/2 is the first phase, and the rest is the second phase; the difference is that OPS combines the characteristics of PS. During the rear (1 − λ)T/2 in the second phase, OPS divides P r into two parts ρP r and (1 − ρ)P r ; ρP r is used for energy harvesting and (1 − ρ)P r is used to complete the information transmission between TWR and SU. Mathematical Problems in Engineering e signals received by the secondary users and the energy harvested are given by e information rates of the strong and weak signals at SU1 are obtained by e strong signal information rate at SU2 is expressed as follows: e maximum transmit power of the secondary user is given by e information rate of the primary receiver is the same as the rate under the TS strategy, which is given by

Problem Formulation
Assume that the channel gains of the two groups of users are completely symmetrical, that is, h R1 � h R3 and h R2 � h R4 , and the system capacity is the sum of the information rates of the four secondary users, which is given by Define the energy consumption of the system as the difference between the energy consumed by the system and the energy collected by the secondary user, which is expressed as follows: where T 2 is the length of the second phase and P l is the circuit power loss. is paper needs to maximize the energy efficiency of the system by optimizing the relay power, the NOMA coefficient, and the division coefficient. e optimization problem can be expressed as follows: Among them, i th is the information rate threshold of the primary receiver, r th is the minimum information rate that satisfies the signal-to-interference-and-noise ratio of the strong signals decoded by SU1 and SU3, P max is the maximum threshold of the relay transmission power, and P tot is the sum of the transmission power of the secondary users, its threshold is P s . is problem is a multivariable optimized NP-Hard problem, which has high complexity and cannot be solved directly. As stated in [22], for any optimization problems with multiple variables, we can analyze and solve the problem over some variables, regarding the rest as constants; then, solve the problem over the remaining variables. erefore, we will separate P r , b 3 , and ρ or λ when developing the optimization algorithm so as to overcome the difficulty. Furthermore, this paper decomposes it into three optimization subproblems about relay power, NOMA coefficient, and partition coefficient, regarding the remaining variables as constants when solving the suboptimization problem of each variable, which are obtained by

Optimization of TWR Transmission Power.
Because the expressions of η EE , R P , R 1⟶2 , and P tot of the TS and OPS strategies are inconsistent, the constraints and objective functions of P r for both strategies will be given separately: Mathematical Problems in Engineering e fractional objective function makes the problem neither linear nor convex and thus difficult to solve straightforwardly. By analyzing the objective function, this paper gets the following proposition.

Proposition 1.
e objective function in equation (14) is strictly quasi-concave function in the TWR transmission power P r .
Proof. Take the objective function of TS strategy as an example, and its objective function can be written as follows: Since the remaining variables are all considered constant at this time, F L (P r ) is a linear function with respect to P r . F U (P r ) is the concave function of P r , to prove that, the second-order partial derivative of F U (P r ) with respect to P r is required. e first-order partial derivative of F U (P r ) can be denoted as follows: Furthermore, the second-order partial derivative of F U (P r ) can be obtained as follows: Since |h R1 | 2 > |h R2 | 2 , the right side of the equation is all negative, z 2 F U (P r )/zP 2 r < 0. us, F U (P r ) is the concave function with respect to P r . erefore, the objective function is strictly quasi-concave function for P r [22]. Furthermore, this paper can prove that the objective function is first monotonically nonincrease and then monotonically nondecrease. e proof can be easily obtained by zη EE (P r )/ zP r | P r ⟶ 0 ≤ 0 and zη EE (P r )/zP r | P r ⟶ ∞ > 0 [23]. e process of proving the OPS strategy is similar to the above process and is omitted here.
According to Proposition 1, an unique global optimal solution exists and the optimal point can be obtained by using the bisection method [22]. Since the Dinkelbach method [24] has been widely applied to solve nonlinear fractional optimization problem, we apply it to tackle our EE maximization problem. Particularly, we convert the fractional objective function into a subtractive form of numerator and denominator on the basis of the following proposition.

Proposition 2.
For F U (P r ) ≥ 0 and F L (P r ) ≥ 0, the maximum achievable EE q * � η * EE satisfies the following equation:

Mathematical Problems in Engineering
where F U (P r ) is the numerator of the objective function, F L (P r ) is the denominator of the objective function, and q * � F U (P * r )/F L (P * r ).
Proof. Please refer to [24] for the proof of Proposition 1. Proposition 2 shows that the original complex fractional objective function can be transformed into an equivalent optimization problem with subtraction. After such a transformation, this paper presents an algorithm to solve the equivalent optimization problem that satisfies the conditions in Proposition 1, which can be concluded in Table 1.
In order to ensure the feasibility of the algorithm in Table 2, it is necessary to prove its convergence. First, this paper proves that q (n) will increase in each iteration. Note that q * satisfies the optimal condition in Proposition 2, i.e., F U (P * r ) − q * F L (P * r ) � φ(q * ) � 0. Suppose that P (n) r is the optimal power allocation, n is the number of iterations, and q (n) ≠ q * and q (n+1) ≠ q * represent the corresponding optimal energy efficiency. It has been proved in [23] that φ(q (n) ) > 0 and φ(q (n+1) ) > 0 hold. In addition, in the algorithm of Table 2, q (n+1) � F U (P (n) r )/F L (P (n) r ). So, this article can obtain the following expression: Since F L (P (n) r ) represents the energy consumed, there is always F L (P (n) r ) > 0, so q (n+1) > q (n) . en, we prove that q (n) converges to the optimal value q * if the number of iterations is large enough. Since there is a limit value q * and q (n) will increase every iteration, when the number of iterations n is large enough, q (n+1) ⟶ q (n) and φ(q (n+1) ) ⟶ 0 hold, and the optimality condition in Proposition 1 can be met.
Considering the remaining two variables as constants, the original problem becomes a problem of finding the Table 1: Golden section algorithm for optimal relay power.
Algorithm: golden section algorithm of optimal relay power 1. Initialize the remaining variables and constant terms η � 80%, b 1 End, t * � t 1 + t 2 /2. 8. e optimal value t * is the optimal relay power P * r that meets the maximum energy efficiency. Algorithm: iterative algorithm based on the Dinkelbach method 1. Initialize n � 0, P (n) r � 1 and q (n) � 0, set the stopping criterion ε; 2. While F U (P (n) r ) − q (n) F L (P (n) r ) > ε 3. For given q (n) , solve (20) to obtain the transmission power P (n) r ; 4. Let n � n + 1 and q (n) � F U (P (n− 1) r )/F L (P (n− 1) r ); 5. e optimal energy efficiency η * EE � q * is q (n) . maximum value in the specified interval. is paper uses the golden section algorithm to find the optimal relay power. However, the golden section method can only be used to solve the extreme points in the single-peak interval. erefore, it is necessary to prove that the objective function is a convex function.
According to Proposition 1, F U (P r ) is the concave function with respect to P r . Since F L (P r ) is a linear function of P r , its second-order partial derivative is 0. erefore, the positive and negative properties of the second derivative of F U (P r ) − qF L (P r ) are consistent with F U (P r ). We can conclude that, for a fixed parameter q, the transformation form of objective function F U (P r ) − qF L (P r ) is strictly concave in P r .
After proving that the objective function is a concave function, this paper can use the golden section algorithm to satisfy the value of P r with the greatest energy efficiency. e specific algorithm steps are shown in Table 1.

Optimization of NOMA Coefficient.
In SP2, b 1 is included only in the R tot term, so the original question SP2 can be simplified as follows: We simplify R tot according to b 1 + b 2 � 1 and take R OPS tot as an example, which is given by Since the last term in equation (25) is a constant term independent of b 1 , the partial derivative of R OPS tot for b 1 is expressed as follows: Since and zR OPS tot /zb 1 > 0, so R OPS tot is a monotonically increasing function of b 1 , and the objective function takes the maximum value when b 1 is maximum. Similarly, the monotonicity of R TS tot in TS strategy also exists. According to R 1⟶2 ≥ r th in SP2, the constraint on b 1 can be obtained as follows: erefore, the optimal values of b 1 in the TS and OPS strategies are given by

Optimization of Partition Coefficient.
For the TS strategy, SP3 is a univariate optimization problem about λ, and for the OPS strategy, SP3 is a two-variable joint optimization problem about ρ and λ. Referring to the process of solving the optimal transmission power in this paper, this paper also 8 Mathematical Problems in Engineering applies the Dinkelbach algorithm to the suboptimization problem SP3, and equation (16) can be converted into the following expression: where λ). e specific steps for applying Dinkelbach algorithm in this section are similar to Table 2, u (n) � F U (ρ (n− 1) , λ (n− 1) )/F L (ρ (n− 1) , λ (n− 1) ), and are not given here. e proof process of convergence is also given above and the proof process here is similar to it, so it will not be repeated.
Genetic algorithm can solve multivariate optimization problems such as equation (29). is paper uses genetic algorithms to solve these two types of problems. e steps of using genetic algorithm to solve the optimization problem of partition coefficients are as follows. First, M random numbers are generated within the constraint interval satisfied by the partition coefficients of the TS and OPS strategies given in equation (29), and they are converted into a series of "chromosomes" by binary coding.
ese randomly generated chromosomes are composed of individuals' initial population. Second, let the objective function in SP3 be the fitness function for evaluating the chromosomes, select the highest fitness individual as the best individual, and select M/2 pairs of maternal chromosomes according to the ratio of the fitness of each chromosome to the total fitness of all chromosomes in the population.
ird, we randomly select a codeword on the M/2 pair of maternal chromosomes, perform crossover and mutation operations based on the crossover probability p c and mutation probability p m to generate M new individuals to form a new population, and update the optimal individual according to the individual fitness in the new population. Crossover is the exchange of codewords corresponding to two chromosomes, and mutation is negation of the codeword. Repeat the above process until the number of iterations reaches the preset algebra G, and the optimal individual at this time is the optimal solution of SP3. e specific implementation process is shown in Table 3.

Alternate Iteration Algorithm for Joint Optimization.
After solving the three suboptimization problems, this paper uses an alternating iterative algorithm to jointly optimize the optimal values of the three suboptimization problems. e specific steps are shown in Table 4.
It is also provable that the energy efficiency η EE increases in each iteration shown in Table 4 and the convergence of the complete algorithm exists. In each iteration, since the Dinkelbach algorithm is used to solve the transmission power problem and the partition coefficient problem, its convergence has been proved above, and the optimal energy efficiency obtained after solving the optimal transmission power is taken as the initial energy efficiency for solving the optimal partition coefficient, and the objective function is a monotonically increasing function of b 1 , which ensures that the value of η EE will increase after each iteration.
In addition, Proposition 2 has proved that the objective function in the conversion form equation (21) of SP1 is a concave function about P r . e local optimum of the unimodal function is the global optimal value; the objective function of SP2 is the monotone increasing function of b 1 ; the global optimal solution is at the endpoint; the solution method of SP3 is genetic algorithm, it is a global optimization algorithm [25], so the joint optimal energy efficiency optimization algorithm in this paper can guarantee the global optimality of the obtained solution.
is paper also provides the complexity analysis of the joint energy efficiency optimization algorithm. e solution process of SP1 and SP3 both use the Dinkelbach method to convert the objective function into a subtraction form; the computational complexity for the Dinkelbach method-based algorithm with stopping criteria ε is O(logε − 1 ) [24]. Moreover, we have proved that the objective function of the subtraction form in SP1 is a concave function; the computational complexity of solving the concave function is O(logε − 1 ) [26], where ε is the error tolerance for algorithm termination. e optimization process of the NOMA coefficient in SP2 only requires the partial derivative of b 1 for the objective function, whose computational complexity is O (1). e solution process of SP3 employs genetic algorithm; the computational complexity of the genetic algorithm is O(G × M × N), which is related to its maximum evolutionary algebra G, the number of individuals in the population M, and the number of variables N [25]. e joint energy efficiency optimization algorithm in this paper nests the Dinkelbach algorithm twice in each iteration, including the golden section method and the genetic algorithm, so the overall computational complexity is O(logκ − 1 logε − 1 (logδ − 1 + G × M × N)), κ, ε, and δ are the error tolerance of the joint energy efficiency optimization algorithm, Dinkelbach algorithm, and golden section method, respectively.

Numerical Results
is paper simulates the proposed energy efficiency optimization algorithm with the OPS strategy so that to analyze and compare the system performance of the energy efficiency optimization algorithm of the PS and TS strategy; the calculation of the optimal energy efficiency of the PS strategy comes from the algorithm in [19]. e simulated system model is shown in Figure 1. e parameters are set as follows: η � 80%, P l � 20dBm, P t � 30dBm, i th � 0.1bit/s/Hz, r th � 0.2bit/s/Hz, and T � 1 [19]. e channel gain between the two-way relay and the secondary user is a random variable obeying the complex Gaussian distribution, namely, h Ri ∼ CN(0, 1/d α i ) with the average path loss α � 2 [19,27]. d i is the distance from the secondary user to the two-way relay TWR, and d 1 � d 3 � 2 m and d 2 � d 4 � 10 m [19]. Figure 4 shows the energy efficiency of the three energy harvesting strategies at different user power thresholds P s . It can be seen from the figure that the energy efficiency of the three harvesting strategies decreases as P s increases. is is because the increase of P s indicates that the system needs to allocate more resources to complete energy harvesting, so resources allocated for information transmission are correspondingly reduced, resulting in a reduction in energy efficiency. e energy efficiency of the OPS strategy is better than the other two strategies. According to the system model analysis of the OPS strategy, OPS can simultaneously control the two partition coefficients of time and power and regulate the ratio of collected energy and information transmission, which is more flexible than the other two strategies so that it can get the highest energy efficiency. Figure 5 shows the energy efficiency of the three energy harvesting strategies when the distance between the near Table 3: Genetic algorithm of optimal partition coefficient.
Algorithm: genetic algorithm with optimal partition coefficient 1. Initialize the remaining variables and constant terms η � 80%, b 1 � 0.5, P r � 1, T � 1. 2. Set the number of individuals in the genetic algorithm population M, maximum evolution algebra G, cross probability P c , mutation probability P m , initial algebra g � 1.
3. Randomly generate M individuals who meet the constraints, calculate the fitness of the initial population according to the objective function and select the individual with the highest fitness as the best individual. 4. While g < G+1: 5. Select M/2 to cross the mother chromosomes according to the probability of crossing to generate M new individuals, 6. Make these M new individuals mutate according to the set mutation probability, 7. Let the M chromosomes be a new population and update the most adaptive individual in the population, 8. Let g � g + 1.
9. e best individual found is the segmentation coefficients ρ * and λ * that satisfy the maximum energy efficiency Table 4: Joint optimal energy efficiency optimization algorithm.
Algorithm: Joint optimal energy efficiency optimization algorithm 1. Initialize the remaining variables and constant terms η � 80%, b (1) EE , substitute the remaining variables b (i− 1) 1 , λ (i− 1) and ρ (i− 1) to solve the optimization problem (25) to obtain P (i) r and q * (i) according to Tables 2 and 1. 6. Let u (0) � q * (i) , substitute the remaining variables b (i− 1) 1 and P (i) r to solve the optimization problem (28) to obtain λ (i) , ρ (i) and u * i according to Tables 3 and 2 with the iteration conditions replaced with u (n) � F U (ρ (n− 1) , λ (n− 1) )/F L (ρ (n− 1) , λ (n− 1) ). 7. Substitute λ (i) , ρ (i) and P (i) r into equation (28) to obtain b (i) , ρ (i) and P (i) r ; 9. End and get the best P r , b 1 , λ, ρ and η EE . user and the relay is different. e distance between the remote user and the relay is the same, that is, d 2 � d 4 � 10 m. It can be seen from the figure that the energy efficiency of the three collection strategies decreases with the increase of d 1 and d 3 . is is because as the distance between the near user and the relay increases, the information rate of the secondary user decreases and the demand for energy collection increases, resulting in energy efficiency decreasing. e energy efficiency of the OPS strategy is better than the other two strategies which is because, with the increase of the distance between the near user and the relay, the OPS strategy can simultaneously control the time division and power partition to regulate the ratio of collected energy and information transmission. With the increase of d 1 , the energy efficiency difference of the three strategies is gradually narrowing, which indicates that the energy efficiency impact of the three strategies is gradually decreasing. Figure 6 shows the energy consumption of the three strategies at different user power thresholds P s . It can be seen from the figure that the energy consumption E tot of the three strategies rises with the increase of the user power limit P s , which is because as the power limit of secondary users increases, the resource requirements for harvesting energy increase, and the relay power and the partition coefficient increase correspondingly, leading to an increase in energy consumption. e OPS strategy consumes less energy than the PS and TS strategies because the OPS strategy can control both time division and power division to ensure that the system completes the communication process with the lowest energy requirements. Figure 7 shows the system capacity of the OPS strategy with different P s at η � 0.8 and η � 0.6. It can be seen from the figure that the system capacity of the OPS strategy decreases with the increase of P s . As P s increases, the system needs to allocate more resources to harvest energy, and the resources allocated for information transmission are correspondingly reduced, at the same time, the decrease in the information rate of the secondary users results in a decrease in system capacity. e system capacity at η � 0.8 is higher than the system capacity at η � 0.6 because higher energy collection efficiency means lower energy requirements, OPS strategy can regulate more resources for information transmission, and the corresponding system capacity would be higher. Figure 8 shows the system capacity of the OPS strategy when relay power P r � 0.2W and P r � 0.1W at different b 1 . It can be seen from the figure that the system capacity of the OPS strategy increases with the increase of b 1 , which is because the near user has a higher channel gain than the far user, increasing  the NOMA power allocation coefficient that TWR forwards to the near user will significantly increase the information rate of the near user, resulting in a corresponding increase in system capacity. e system capacity at P r � 0.2W is higher than the system capacity at P r � 0.1W because increasing the relay power increases the signal-to-interference-and-noise ratio of the secondary user's received signal, and the increase in the information rate causes the system capacity to increase.

Conclusion
is paper proposes a system energy efficiency optimization algorithm using the OPS strategy for a two-way relay CR-NOMA system based on SWIPT.
e system capacity expressions with the TS strategy and the OPS strategy are derived, respectively. Under the constraints of harvested energy and quality of service, an optimization problem with the goal of maximizing energy efficiency is constructed. e objective function is a multiobjective optimized NP-Hard problem. In this paper, the original problem is transformed into three subproblems about relay power, NOMA coefficient, and segmentation coefficient, which are solved by the golden section algorithm, the monotonicity determination method of the function, and the genetic algorithm; then, the solutions of three subproblems are jointly optimized by alternating iterative algorithm. e simulation results show that compared with the PS and TS strategies, the OPS strategy can significantly improve the transmission energy efficiency of the system. Since the OPS strategy can control time division and power division at the same time, thereby ensuring that the system completes the communication process with the lowest energy requirements, OPS strategy is better than PS and TS strategy when the power limit of different users and the distance between the near user and the relay are different.

Data Availability
e data (figures) used to support the findings of this study are included within the article. Further details can be provided upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.