## 3 Problem Formulation and the PSO-Based Power Allocation Scheme for SEE Maximization
Let \(\mathbf{x}_{n}\), \(\mathbf{v}_{n}\), and \(\mathbf{p}_{best}^{n}\) define the position, velocity, and local best position of particle \(n\), respectively. In addition, the global best position of all particles is defined by \(\mathbf{g}_{best}\). We use a penalty function to deal with the constraints, where we define fitness function \(f\left(\mathbf{x}_{n}\right)=f\left(p_{1},p_{2},p_{3},p_{r}\right)\) based on the objective function of problem (11), as follows:  
\[R_{x_{1},Tu_{1}}\geq\phi_{1}, \tag{11b}\]2  
where \(\rho\) is the penalty value, \(g_{i}\) is the \(i\)-th constraint of problem (11), and \(\delta\left(g_{i}\right)=0\) if \(g_{i}\) is satisfied and \(\delta\left(g_{i}\right)=1\) otherwise. Note that if all the constraints are satisfied (feasible point), \(f\left(\mathbf{x}_{n}\right)\) is the objective function (11a) without penalty. Under the presence of more users, the proposed system model can be utilized by applying a user grouping scheme. For instance, a user grouping for a downlink NOMA system is proposed in [16]. In the paper, the authors considered a grouping scheme where two users are selected for each group (strong user and weak user), and the different groups use orthogonal resources by avoiding interference between groups. In [17], the authors proposed a NOMA-TDMA scheme by considering an uplink industrial IoT scenario composed of several sensors and one sink. The first step is to sort the channel gains and divide the total time into several time slots. Then, an optimization problem is formulated to allocate the power with NOMA and define the duration of the time slots, where the system allows a maximum of two users in each group, and the different groups are assigned different time slots. Based on the previous studies on many users, therefore we can group the users according to their channel gains, where each time slot is assigned to each group. In this case, there is no interference between users in different groups, and an extension of the proposed scheme can be applied to allocate the power to maximize the SEE with NOMA in each group. However, it is noteworthy that the proposed scheme considers that there is no direct link to the secondary user 2 because of path obstruction so that a cooperative relay is needed to consider. In the case of a user grouping scheme, there exist some groups where the distant secondary user has poor channel conditions. In that case, our proposed scheme based on a cooperative relay can be utilized efficiently. In the case of multiple relays, the development of a relay selection algorithm is needed, where a simple solution is an exhaustive search among the possible relays. That is to say, we can perform the power allocation while considering each relay and choose the relay that achieves the highest SEE. However, an efficient solution with multiple relays needs a joint optimization of the power variables and relay selection, which may be topics for future research. On the other hand, the case of multiple eavesdroppers can be addressed by considering just the eavesdropper with the highest SINR to compute the secrecy rate with small modifications in (2) and (5), following the approach proposed in [18]. Energy Efficiency Maximization in the Baseline CR-OMA Scheme with Cooperative Relaying and an EH User  
In this section, we describe the baseline scheme for the energy efficiency maximization problem in OMA with cooperative relaying and an EH user. In OMA, the messages are sent to each user in different time slots. Accordingly, the transmission of each message from the transmitter to its respective secondary user in the OMA scheme involves three phases, which are detailed as follows. In Phase 1, the transmitter sends message \(x_{1}\) to U1.