Novel Resource Allocation Techniques for Downlink Non-Orthogonal Multiple Access Systems

Non-orthogonal multiple access (NOMA) plays an important role in achieving high capacity for fifth-generation (5G) networks. Efficient resource allocation is vital for NOMA system performance to maximize the sum rate and energy efficiency. In this context, this paper proposes optimal solutions for user pairing and power allocation to maximize the system sum rate and energy efficiency performance. We identify the power allocation problem as a nonconvex constrained problem for energy efficiency maximization. The closed-form solutions are derived using Karush–Kuhn–Tucker (KKT) conditions for maximizing the system sum rate and the Dinkelbach (DKL) algorithm for maximizing system energy efficiency. Moreover, the Hungarian (HNG) algorithm is utilized for pairing two users with different channel condition circumstances. The results show that with 20 users, the sum rate of the proposed NOMA with optimal power allocation using KKT conditions and HNG (NOMA-PKKT-HNG) is 6.7% higher than that of NOMA with difference of convex programming (NOMA-DC). The energy efficiency with optimal power allocation using DKL and HNG (NOMA-PDKL-HNG) is 66% higher than when using NOMA-DC.


•
An optimal user pairing approach based HNG algorithm is proposed that considers pairing of only two users at each subchannel. This algorithm guarantees an optimal performance of both the sum rate and energy efficiency maximization process in a downlink NOMA system. For comparison, the performance of the proposed algorithm is compared with the center-based user pairing (CEB) method proposed in [16].

•
The sum rate maximization problem is formulated by considering SIC for each user in the subchannel in which the constraints are the minimum acceptable data rate and the maximum available transmission power at the BS. To solve this problem and obtain the optimal power for each of the paired users in a subchannel, a power allocation solution is proposed based on Karush-Kuhn-Tucker (KKT) conditions (PKKT). Then, the closed-form optimal power allocation solution for the multiplexed users is obtained. The PKKT solution is applied after pairing users based on HNG to obtain the optimal sum rate in NOMA. Thus, we refer to this technique as NOMA-PKKT-HNG.

•
The energy efficiency maximization problem is formulated with power constraint consideration, and SIC is applied to reduce complexity at the receiver. To solve this problem and obtain the optimal power for the multiplexed users, we propose a power allocation solution using PDKL. The formulated objective function is in fractional form. Therefore, the DKL algorithm is used to transform into linear form (subtractive function) and iteratively solve the problem with considerable error tolerance. The PDKL solution is applied after pairing users based on HNG to obtain the optimal energy efficiency in NOMA. Thus, we refer to this technique as NOMA-PDKL-HNG.
The proposed solutions have been evaluated and compared with NOMA with difference of convex programming (NOMA-DC), NOMA with fractional transmitting power allocation (NOMA-FTPA) and convectional Orthogonal Frequency-Division Multiple Access (OFDMA) in terms of sum rate, energy efficiency and fairness. The rest of this work is organized as follows: Related works are explored in Section 2. In Section 3, the system model and performance metrics of the NOMA system are described. Section 4 describes the proposed resource allocation techniques and shows the mathematical formulation for the sum rate and energy efficiency optimization process. In addition, the HNG process to obtain the optimal user pairing in the system is also presented. Then, the optimal power allocation solutions are provided. In Section 5, the complexity analyses for the proposed algorithms are discussed. The analysis of simulation results is presented and discussed, showing the significant improvement made by the proposed algorithms. Lastly, in Section 6, the work is concluded.

Related Works
In the literature, the weighted sum rate and sum rate are the metrics most utilized to measure the performance of NOMA. The weighted sum rate performance has been adopted by several research studies [17][18][19][20]. The author in [17] proposed an optimal power allocation method to maximize the weighted sum rate with quality of service (QoS) constraints for the downlink NOMA system. The proposed method achieved lower computational complexity without consideration for the power transmission constraint in the optimization process. A greedy search-based user pairing with optimal power allocation method for maximizing the weighted sum rate was also presented in [18]. Although high achievable weighted sum rate performance was obtained, the QoS constraints were not considered in the optimization process formulation. In [19], single-carrier power control (SCPC) algorithm and single-carrier user selection (SCUS) algorithm were adopted for user power and user selection optimization process. The NOMA-FTPA technique that assigns the user's power based on the channel gain condition was used for comparison. The results showed that the proposed algorithms achieved higher weighted rate with higher computational complexity when compared with the NOMA-FTPA technique. The authors in [20] proposed an optimal joint subcarrier and power allocation technique in a multicarrier multiple-input single-output NOMA (MISO-NOMA) network to maximize weighted system throughput with the consideration of QoS requirements. The results showed that multicarrier MISO-NOMA had a higher throughput than MISO-OMA.
The sum rate metric has also been utilized by several studies [21][22][23][24][25][26]. Fixed power allocation (FPA) method was utilized for power optimization in order to improve the user's data rate [21]. The proposed method does not guarantee an optimal performance, and thus it is not appropriate for practical situations. The power allocation problem was analyzed in NOMA with the visible light communication (NOMA-VLC) system [22]. The authors proposed using the equal power allocation (EPA) technique to serve the users. In term of sum rate, the proposed technique outperforms the FPA and gain ratio power allocation (GRPA); however, it is not an optimal solution. An optimal power allocation technique with fairness constraints based on the Okumura Hata model was introduced in [23] to maximize the sum rate performance. The proposed technique provides higher throughput performance with higher computational complexity based on all available powers that satisfy the stipulated fairness constraints. In [24], the power optimization technique with the QoS requirement called improper Gaussian signaling (IGS) was presented, with the aim of maximizing the sum rate of the NOMA system with imperfect SIC. The results showed that IGS achieved a high sum rate; however, the power constraints were not considered in the optimization. The work in [25] proposed the Lagrangian duality function to maximize the average sum rate for full CSI. Besides, the power allocation problem was addressed analytically for partial CSI. The proposed function achieved higher average sum rate performance; however, the authors did not consider any user pairing method to achieve optimal performance. In [26], a price-based power allocation and user-pairing-based Stackelberg game theory methods were proposed to maximize the sum rate lacking the QoS constraint for the optimization process.
As the number of wireless users and the volume of data traffic increase, the energy consumption of wireless systems will consequentially increase. Thus, attention must be paid to energy-efficient design in next-generation wireless communication systems. In this context, the resource allocation problem has been considered in the literature for the aim of achieving high energy efficiency performance in NOMA Appl. Sci. 2020, 10, 5892 4 of 19 system design, as seen in research publications [27,28]. The authors in [27] formulated a resource allocation problem to maximize energy efficiency using supermodular game theory. In comparison with NOMA-FTPA and OFDMA, the proposed method has the best performance. The difference of convex (DC) programming approach was proposed in [28] as a suboptimal solution to allocate the user's power and subchannel, improving the network energy efficiency and sum rate. The proposed technique showed greater improvement than the OFDMA approach and the equal power allocation method. The aforementioned suboptimal solutions have considered the sum rate and weighted sum rate of the NOMA system without investigating the closed-form solutions for the optimal power allocation. Additionally, the energy efficiency and sum rate of the NOMA system that could achieve the optimal performance are not well studied in the recent works. Our previous conference work [15] investigated the user pairing based on HNG and presented the closed-form optimal user power allocation solution based on PKKT conditions to maximize system sum rate without considering energy efficiency performance and fairness among users.

System Model and Performance Metrics
The resource allocation problem in the downlink single-cell NOMA system is the primary concern to be investigated. The CSI is considered to be known to the BS. To ensure that the receiver complexity is reduced, the SIC technique is applied for the multiplexed users. The HNG algorithm, which is an optimal assigning tool for resource allocation problems, is first used to pair two users in a subchannel, followed by equal power allocation consideration for assigning each subchannel. Thereafter, the optimal power allocation technique is applied to achieve the optimal power allocation for each of the paired users in the given subchannel. In this section, description of the utilized system model, step-by-step mathematical formulation and definitions of the performance metrics are discussed.

System Model
The system model examines a downlink cellular wireless NOMA architecture with a BS located at the cell center, as shown in Figure 1. The signal of BS is assigned consistently to M users within the cell radius R with S subchannels. The symbols w = {1, 2, . . . , W} and s = {1, 2, . . . , S} denote the groups of users and subchannels, respectively. UE w,s represents the wth user in the sth subchannel within the NOMA system. B w is the system bandwidth, and B sch = B w /S is the assigned bandwidth for each subchannel. P max and the P s denote the maximum transmit power for BS and the assigned power for each subchannel, respectively. With the assumption that the BS has an ideal knowledge of CSI, M s represents the number of the paired users on sth subchannel and S i represents their superposed signals. The superposition of the user's modulated symbols takes place in each of the S subchannels. Hence, the BS transmission symbols are expressed in Equations (1) and (3).  x s = M q=1 P q,s s q (1) S q represents the modulated symbol of qth user, in which E [|S q | 2 = 1]. The transmit power allocated to the qth user on the sth subchannel is denoted by P q,s . The received signal for UE w,s is given as in [28]. y w,s = h w,s x s + z w,s where h w,s = g w,s (d w ) −β represents the channel gain from the BS to the wth user, g w,s denotes the Rayleigh fading coefficient, d w is the distance between wth user and the BS, β is the path-loss exponent and n w,s ∼CN 0, σ 2 s represents the additive white Gaussian noise (AWGN), with zero mean and variance σ 2 s . The power spectral density is symbolized by N 0 . The power constraints for each subchannel and the BS are limited to M s i=1 P w,s = P s and S s=1 P s = P max , respectively, where P w,s is the power of UE w,s . Let H w,s = h w,s 2 /N 0 be the channel gain-to-noise ratio (CNR) of UE w,s . The arrangement of the users in a subchannel is based on their CNR as shown in Equation (4).
Basically, high transmission power is allocated to users with low channel gain, and low transmission power is assigned to users with high channel gain [29]. For two users pairing with H 1,s ≥ H 2,s , the BS allocates the power as P 1,s < P 2,s . The SIC process is deployed for the signal separation in a multiplexed user's subchannels considering the available user channel information. Hence, the strong user (UE 1,s ) decodes first and removes the weak user (UE 2,s ) signal before decoding its signal. On the contrary, the weak user (UE 2,s ) directly decodes its signal without adopting SIC. With the consideration of SIC at the receiver, the received signal to interference plus noise ratio (SINR) for UE w,s is represented in Equation (5).

Performance Metrics
Different performance metrics are usually deployed to evaluate every wireless communication system's performance. In this paper, three performance metrics are evaluated and analyzed: throughput (achievable data rate), energy efficiency and fairness index.

Throughput
Throughput is the rate of effective transmission of a signal in a wireless communication system, which is measured in bits per second (bps). To obtain the individual UE w,s achievable rate in the NOMA system, the following mathematical representation is applied [27]: The NOMA system sum rate is obtained by adding the corresponding individual throughputs as in Equation (7).

Energy Efficiency
In a wireless communication system, energy efficiency is the ratio of throughput to the total power consumption. It is measured in bits per Joule and expressed as follows [30]: The UE w,s energy efficiency (EE w,s ) in a NOMA system can be determined with Equations (9) and (10). Accordingly, the sum of energy efficiency of the corresponding NOMA is estimated with the use of Equation (11).

Fairness
The fairness evaluation of the proposed power allocation and user pairing methods, their gain index (or simply fairness index), is calculated and compared with the OFDMA scheme. In this aspect, the mathematical formulation of the fairness index is as follows [31]: where 0 ≤ F ≤ 1. The fairness performance of a resource allocation method is higher when its F value is closer to one.

Proposed Resource Allocation Techniques
The NOMA performance depends mostly on power allocation and user pairing, which are joint optimization problems. To solve these problems, we analyze the power allocation and user pairing separately to reduce complexity. After that, the user pairing approach based on the HNG algorithm, power allocation solution using KKT (PKKT) and power allocation solution using DKL (PDKL) are determined. The hybrid NOMA-PKKT-HNG technique refers to applying PKKT solution after pairing users based on HNG to obtain the optimal sum rate in NOMA. On the other hand, NOMA-PDKL-HNG refers to using PDKL solution after pairing users based on HNG to get the optimal energy efficiency in NOMA.

User Pairing Approach Based on HNG Algorithm
We utilize HNG algorithm to maximize the sum rate and energy efficiency of the strong and weak users by finding their maximum available transmission power and minimum acceptable data rate. HNG algorithm is an accurate combinatorial optimization method for finding the corresponding optimal matching between users that need to be assigned in a subchannel. It is well known for its use in solving resource allocation problems. O(N 3 ) is the computational complexity of the algorithm, which is especially high in a large-scale scenario; however, it ensures an optimal global performance [32,33].
Suppose there are two sets of users, with u = {1, 2, . . . , U} and v = {1, 2, . . . , V} denoting strong and weak users representing rows and columns, respectively. Therefore, a cost matrix (cost function) is formulated as m = u × v to attain the best optimal match for both sets of users. The element in the uth row and vth column characterizes the sum rate or energy efficiency of the cost matrix in the NOMA system. The proposed HNG solution is presented in Algorithm 1.

Algorithm 1. User pairing based on Hungarian algorithm
Step 1: Formulation of cost matrix. a) Formulate the cost matrix m. b) Find the largest possible value from the entire cost matrix and subtract it from each cost matrix element.
Step 2: Reduction of row and column. a) Find the lowest value from each row and subtract it from every value of the same row. b) Find the lowest value from each column and subtract it from every value of the same column.
Step 3: Optimization procedure. a) Checking of row.
i If exactly one zero in any row is found, mark the zero with a circle and draw a vertical line across it, but if not, skip that row.
ii If all zeros are traversed with lines, then proceed to Step 4. But if not, do column checking. b) Checking of column.
i If exactly one zero in any column is found, mark the zero with a circle and draw a horizontal line across it, but if not, skip that column.
ii Make confirmation whether all the zeros are traversed with lines.
Step 4: If the number of circles is equal to the number of cost matrix rows, then proceed to Step 5, but if not, proceed to Step 3.
Step 5: The marked circles are the objective function solutions for all marked users pairs.
In the first step, the cost matrix m is formulated. Each user data rate or energy efficiency is first calculated, accompanied with the estimation of the total data rate (Mbps) or total energy efficiency (Mbits/Joule) that is assigned to the two users within the cost function (W s,w represents the total data rate, and E s,w represents the total energy efficiency for strong and weak user pairings). The main aim is to maximize the user's sum rate and energy efficiency. Therefore, the largest possible value is first determined and then deducted through the whole cost matrix (W s,w or E s,w ). Tables 1 and 2 illustrate the W s,w and E s,w for 10 Users (UEs) available in the BS. The size of rows and columns is decreased by determining the minimum value in each of them in the second step. The determined value is deducted from corresponding row or column. The determination of the zero-element value in each row and column commences as the next optimization procedure in step 3. If any row has only one zero, a circle is drawn around the zero with a vertical line through it. A circle is drawn around the zero with a horizontal line through it if only one zero element appeared in a column. However, a row/column containing multiple zeros is skipped to proceed to the next row or column. For verification, the numbers of circles and rows are compared in the cost matrix in step 4. An equal number in the matching procedure is an indication of the optimal solution, while the contrary result takes the process back to step 3. The resulting marked circles are the optimal solutions for all marked users' pairs with maximized sum rate or energy efficiency. Figure 2 shows an example of the user pairing process based on the proposed HNG solution to maximize the system rate with six users available at the BS. The aforementioned steps are conducted to find the optimal user pairing, which is (UE 1 , UE 6 ), (UE 2 , UE 9 ) and (UE 3 , UE 8 ). 10

Power Allocation Solution Using KKT Conditions (PKKT)
To obtain the optimal power allocation solution, the optimization problem is formulated to maximize the system sum rate in Equation (13). The considered constraints are power and minimum data rate, as shown in (14) and (15

Power Allocation Solution Using KKT Conditions (PKKT)
To obtain the optimal power allocation solution, the optimization problem is formulated to maximize the system sum rate in Equation (13). The considered constraints are power and minimum data rate, as shown in (14) and (15 where C1 ensures the maximum transmit power constraint and C2 guarantees the minimum data rate constraint. The index R w indicates the minimum achieved data rate as the quality of service (QoS) requirement for the corresponding user. The objective function in Equation (13) is a convex problem [28]. To find the solution of this problem, the KKT conditions are proposed to obtain the optimal power for the multiplexed user in a closed-form solution [34]. The corresponding Lagrange function of the problem expressed in Equation (13) is determined as illustrated in Equation (16).
where ζ w and λ are the Lagrange multipliers, and R w is the target data rate. Let that, Then, substitute Equation (17) into Equation (16) to obtain Equations (18) and (19).
The KKT conditions can be achieved in Equations (20)- (24): Lemma 1. If ζ * w and λ * are larger than zero, the optimal solution is achieved. Thus, M w=1 P * w,s = P max , ∀w ∈ M R w = B sch log 2 1 + P * w,s ψ w , ∀w ∈ M The closed-form optimal power allocation can be obtained from Equation (22) as represented in Equation (27).
From Equation (21), setting w = 1, we obtain Equation (28). See Appendix A for a detailed proof.
As stated in Lemma 1, the optimal power allocation for sum rate maximization of the multiplexed users under the target data rate and minimum power constraints can be obtained by assigning high power to weak channel gain users first, and then assigning the remaining power to strong channel gain users. This consideration will make sure that the achievable data rate of the weak users is at least equal to the minimum target data rate. Furthermore, the strong channel gain users seem to contribute more sum rate in a given subchannel.

Power Allocation Solution Using DKL Algorithm
To optimize the power allocation in terms of energy efficiency, the energy efficiency maximization problem for the downlink NOMA system is firstly formulated, then the optimization solution based on the DKL algorithm is presented [35]. Equation (29) represents the energy efficiency maximization under the BS power constraint. It is noted that the considered optimization problem is nonconvex due to its fractional nature, and it is challenging to obtain the global optimal solution [28,36]. Therefore, the DKL algorithm, which is an efficient iterative algorithm, can be used to deal with fractional programming problems and tackle them as a sequence of subproblems, as shown in [35,37]. The system energy efficiency can be expressed as a maximization problem in Equation (29) subject to the constraint in Equation (30): where C1 ensures the maximum transmit power constraint available at the BS. To achieve the optimal solution, the DKL algorithm is proposed to solve this problem [35]. The objective function of Equation (29) is a fractional programming problem; it needs to be transformed to an equivalent problem, and then the equivalent form must be iteratively solved with a tolerance of convergence error ε. Hence, Equation (29) can be represented as shown in Equation (31): (Z(q w ) = T(P w,s ) − q w B(P w,s )) (31) subject to the constraint in Equation (32) (34) and q w is a real number, which can be written as in Equation (35): The optimal results obtained from the DKL algorithm can be proved by using the following fractional programming theory. See Appendix B for a detailed proof. Proposition 1. Let S ∈ R n , T(P w,s ), B(P w,s ) : S → R with T(P w,s ) > 0 and B(P w,s ) > 0. The problem can be solved by max P w,s>0 T(P w,s )/B(P w,s ) with equivalent formulation as finding the unique zero of the Z(q * w ) = max P w,s>0 (T(P w,s ) − q * w B(P w,s )) if and only if q * w = T P * w,s /B P * ,s which implies that q * w = T P * w,s /B P * ,s = max P w,s>0 T(P w,s )/B(P w,s ) P w,s ∈ S .
The results obtained from Proposition 1 indicate that solving the energy efficiency maximization problem from Equation (29) is equal to finding the Z(q * w ) = 0 values that satisfy q * w . The step-by-step detail of the proposed DKL solution is shown in Algorithm 2.

Algorithm 2. Dinkelbach method for energy efficiency maximization
Step 1: Initialize q w = 0, iteration number w = 0 and ε = 0.01 Step 2: while Z(q w ) = T(P w,s ) − q w B(P w,s ) > ε do P * w,s ← argmax P w,s>0 Step 3: If Z(q w ) ≤ ε break end if end while Step 4: Output P * w,s , q w

Results and Discussion
For evaluation, the simulation results are obtained using MATLAB software (8.5.0, MathWorks, Natick, Massachusetts, USA). The single-cell downlink NOMA system with the BS's transmission power (P max ) of 41 dBm and the circuit power consumption (P c ) of 1 W is considered. The BS is located at the center of a circle with radius R = 500 m, and there is a random distribution of M users in the cell coverage. To reduce computational complexity, NOMA assigns only two users to each subchannel, and OMA assigns a single user to each subchannel. The CSI is known at the BS. The minimum distance between BS and users is 50 m, and the minimum distance between users is 40 m. The bandwidth of the NOMA system (B w ) is 5 MHz and the path-loss exponent β = 2. The noise power σ 2 s = B w N 0 /S, and the power spectral density N 0 = -174dBm/Hz. The obtained results are compared with OFDMA, FTPA [11] and the DC algorithm [28].

Complexity Analysis
The computational complexities of the Hungarian and Dinkelbach algorithms are described in this section. In the Hungarian algorithm, the time complexity is O(N 3 ), where N refers to the number of users available in the NOMA system that need to be paired to achieve their maximum sum rate or energy efficiency. However, this algorithm shows a higher complexity in large-scale scenarios with a great number of users. In the Dinkelbach algorithm, the computational complexity is mainly based on both the convergence rate of the sequence of the subproblem and the individual complexity of each individual subproblem. It is noted that the Dinkelbach algorithm shows superlinear convergence. Based on this optimization problem expression of Equation (31), it is assumed that the convergence is achieved with M 1 and M 2 iterations for outer and inner loops, respectively, with the computational complexity of variables (Q 1 ) and constraints (Q 2 ) due to polynomial characteristics. Therefore, the inner loop complexity corresponds to O(M 1 M 2 (Q 1 +Q 2 )). The updates of q w require O(K) operations. Hence, the total computational complexity for the proposed Dinkelbach algorithm corresponds to O(M 1 (M 2 (Q 1 +Q 2 ) + O(K))).
For comparison purposes, the complexity of the exhaustive search algorithm is also illustrated, in which O(2S!/2 S ) is needed to achieve all possible user pairing processes. S refers to subchannels available in the network. It is concluded that the proposed algorithms have lower complexity than the exhaustive search algorithm. The complexity comparison between the proposed and exhaustive search algorithms is summarized in Table 3. Table 3. The complexity comparison between the proposed and existing algorithms.

Performance Evaluation
This section assesses and validates the efficiency of the proposed techniques. Their performance is compared with the user pairing CEB method [16] and the power allocation FTPA method [11]. In the CEB method, the users in the network are paired according to their channel conditions. For instance, considering that the BS serves 10 active UEs, their channel conditions arrangement is shown in Equation (36).
H 1 ≥ H 2 ≥ · · · · · · ≥ H 5 | Group1: Strong channel gain users ≥ H 6 ≥ · · · · · · ≥ H 10 Group2: Weak channel gain users (36) The pairing process starts by pairing the user that has strongest channel gain with the user that has weakest channel gain user; then, the user that has second strongest channel gain is paired with the user that has second weakest channel gain. The process is complete upon successfully pairing all users, (i.e., (UE 1 , UE 6 ), (UE 2 , UE 7 ), (UE 3 , UE 8 ), (UE 4 , UE 9 ) and (UE 5 , UE 10 )). In FTPA, the allocated power is obtained based on the condition of the user's channel. Hence, the transmission power of the wth user on the sth subchannel (UE w,s ) is expressed as in Equation (37).
where H w,s denotes the channel gain normalized by the noise of user UE w,s , P s represents the subchannel's power and α is the decay factor with a value between 0 and 1. Increasing α indicates that high power is assigned to user with weak channel gain. The user with poorer channel gain is allocated with a greater α, which means a high power increase. This approach exhibits a low computational complexity, with degraded performance as a result of a user's allocation power instability in proportion to the path loss [28]. The default simulation parameter values are given in Table 4.  Figure 3 demonstrates the effect of the BS's transmission power on system sum rate with 10 users considered in the BS and with transmission power variation from 1 to 12 W. The sum rates of NOMA-PKKT-HNG and NOMA-DC are considerably higher than those of NOMA-FTPA and conventional OFDMA due to the power optimization. The results show that the system sum rate increases upon increasing the BS's transmission power for all applied methods. The NOMA-PKKT-HNG technique achieves a higher sum rate than NOMA-DC [28], NOMA-FTPA [11] and conventional OFDMA. Figure 4 shows the system sum rate performance with different UE numbers (10-60 users per BS that has 1 W transmission power). The results confirm that the system sum rate increases as the number of users increases. For comparison, the NOMA-PKKT-HNG is compared with NOMA-PKKT-CEB, a centralization-based approach [16]. The proposed technique outperformed other techniques (NOMA-PKKT-CEB, NOMA-FTPA and OFDMA) under the same applied method for power allocation in both proposed NOMA-PKKT-HNG and NOMA-PKKT-CEB techniques with similar sum rate for all users available at the BS. Once 20 users exist at the BS, the NOMA-PKKT-HNG has the highest performance when compared to other techniques.  Figure 3 demonstrates the effect of the BS's transmission power on system sum rate with 10 users considered in the BS and with transmission power variation from 1 to 12 W. The sum rates of NOMA-PKKT-HNG and NOMA-DC are considerably higher than those of NOMA-FTPA and conventional OFDMA due to the power optimization. The results show that the system sum rate increases upon increasing the BS's transmission power for all applied methods. The NOMA-PKKT-HNG technique achieves a higher sum rate than NOMA-DC [28], NOMA-FTPA [11] and conventional OFDMA. Figure 4 shows the system sum rate performance with different UE numbers (10-60 users per BS that has 1 W transmission power). The results confirm that the system sum rate increases as the number of users increases. For comparison, the NOMA-PKKT-HNG is compared with NOMA-PKKT-CEB, a centralization-based approach [16]. The proposed technique outperformed other techniques (NOMA-PKKT-CEB, NOMA-FTPA and OFDMA) under the same applied method for power allocation in both proposed NOMA-PKKT-HNG and NOMA-PKKT-CEB techniques with similar sum rate for all users available at the BS. Once 20 users exist at the BS, the NOMA-PKKT-HNG has the highest performance when compared to other techniques. Figure 5 expresses the relationship between the system energy efficiency and the number of users available in a cellular system. The BS transmitting power is fixed at 1 W, and the system energy efficiency increases with the increasing number of users across all methods. The proposed NOMA-PDKL-HNG method is more energy-efficient than NOMA-DC, NOMA-FTPA and OFDMA. With 20 users at the BS, the system energy efficiency of the NOMA-PDKL-HNG technique is greater than those of NOMA-DC [28], NOMA-FTPA [11] and OFDMA by 0.66, 1.44 and 5.85 times, respectively. The system energy efficiency performance versus the BS transmit power to circuit power (PBS/Pc) ratio is shown in Figure 6. The BS transmit power is set at 12 W and the circuit power is set at 1 W with only 10 users available at the BS [28]. The results show that the energy efficiency decreases gradually as the power ratio increases because the energy efficiency is inversely proportional to power. NOMA-PDKL-HNG achieves higher energy efficiency when the power ratio is low and decreases faster upon power ratio increment   Figure 5 expresses the relationship between the system energy efficiency and the number of users available in a cellular system. The BS transmitting power is fixed at 1 W, and the system energy efficiency increases with the increasing number of users across all methods. The proposed NOMA-PDKL-HNG method is more energy-efficient than NOMA-DC, NOMA-FTPA and OFDMA. With 20 users at the BS, the system energy efficiency of the NOMA-PDKL-HNG technique is greater than those of NOMA-DC [28], NOMA-FTPA [11] and OFDMA by 0.66, 1.44 and 5.85 times, respectively. The system energy efficiency performance versus the BS transmit power to circuit power (PBS/Pc) ratio is shown in Figure 6. The BS transmit power is set at 12 W and the circuit power is set at 1 W with only 10 users available at the BS [28]. The results show that the energy efficiency decreases gradually as the power ratio increases because the energy efficiency is inversely proportional to power. NOMA-PDKL-HNG achieves higher energy efficiency when the power ratio is low and decreases faster upon power ratio increment 17 of 22  Figure 7 shows the effect of the varying the number of users on fairness performance. The BS transmit power is set to 41 dBm with only 10 users available at the BS [28]. In a two-user case, the NOMA-PKKT-HNG has the highest fairness compared to all other schemes. The fairness trend decreases as the number of multiplexed users in the subchannel increases. With four users, the fairness of NOMA-PKKT-HNG shows better performance than NOMA-DC [28] and NOMA-FTPA [11] by 1.94%, and 8.51%, respectively. However, the fairness performance of OFDMA remains constant regardless of the variation of the number of users in the system because the power is always assigned equally between the users. Figure 8 illustrates the fairness index with BS power variation from 1 to 5 W. The BS power with 10 users is considered. In contrast to other approaches, the fairness of the NOMA-PDKL-HNG technique increases as power transmission increases. This is due to the increment of the allocated power per user, which increases their data rate and fairness. In NOMA-DC, it can be shown that fairness is unstable: the fairness is the same from 2 to 4 W and increases at 5 W. The fairness of NOMA-FTPA is slightly higher than that of conventional OFDMA, with almost the same fairness even upon the increment of transmit power. Figure 9 depicts the system energy efficiency with a different number of iterations. The system has a 1 W BS power and a maximum number of 10 UEs. It is shown that NOMA-PDKL-HNG achieves high energy efficiency at all iterations compared to other methods. This is because the pairing process is achieved with optimal pairing process, and power is assigned to the users with less complex mathematical formulation. The optimal performance for all methods is obtained immediately after the first iteration.    Figure 7 shows the effect of the varying the number of users on fairness performance. The BS transmit power is set to 41 dBm with only 10 users available at the BS [28]. In a two-user case, the NOMA-PKKT-HNG has the highest fairness compared to all other schemes. The fairness trend decreases as the number of multiplexed users in the subchannel increases. With four users, the fairness of NOMA-PKKT-HNG shows better performance than NOMA-DC [28] and NOMA-FTPA [11] by 1.94%, and 8.51%, respectively. However, the fairness performance of OFDMA remains constant regardless of the variation of the number of users in the system because the power is always assigned equally between the users. Figure 8 illustrates the fairness index with BS power variation from 1 to 5 W. The BS power with 10 users is considered. In contrast to other approaches, the fairness of the NOMA-PDKL-HNG technique increases as power transmission increases. This is due to the increment of the allocated power per user, which increases their data rate and fairness. In NOMA-DC, it can be shown that fairness is unstable: the fairness is the same from 2 to 4 W and increases at 5 W. The fairness of NOMA-FTPA is slightly higher than that of conventional OFDMA, with almost the same fairness even upon the increment of transmit power. Figure 9 depicts the system energy efficiency with a different number of iterations. The system has a 1 W BS power and a maximum number of 10 UEs. It is shown that NOMA-PDKL-HNG achieves high energy efficiency at all iterations compared to other methods. This is because the pairing process is achieved with optimal pairing process, and power is assigned to the users with less complex mathematical formulation. The optimal performance for all methods is obtained immediately after the first iteration.    Figure 7 shows the effect of the varying the number of users on fairness performance. The BS transmit power is set to 41 dBm with only 10 users available at the BS [28]. In a two-user case, the NOMA-PKKT-HNG has the highest fairness compared to all other schemes. The fairness trend decreases as the number of multiplexed users in the subchannel increases. With four users, the fairness of NOMA-PKKT-HNG shows better performance than NOMA-DC [28] and NOMA-FTPA [11] by 1.94%, and 8.51%, respectively. However, the fairness performance of OFDMA remains constant regardless of the variation of the number of users in the system because the power is always assigned equally between the users. Figure 6. System energy efficiency vs. power ratio with 10 UEs.    Figure 8 illustrates the fairness index with BS power variation from 1 to 5 W. The BS power with 10 users is considered. In contrast to other approaches, the fairness of the NOMA-PDKL-HNG technique increases as power transmission increases. This is due to the increment of the allocated power per user, which increases their data rate and fairness. In NOMA-DC, it can be shown that fairness is unstable: the fairness is the same from 2 to 4 W and increases at 5 W. The fairness of NOMA-FTPA is slightly higher than that of conventional OFDMA, with almost the same fairness even upon the increment of transmit power. Figure 9 depicts the system energy efficiency with a different number of iterations. The system has a 1 W BS power and a maximum number of 10 UEs. It is shown that NOMA-PDKL-HNG achieves high energy efficiency at all iterations compared to other methods. This is because the pairing process is achieved with optimal pairing process, and power is assigned to the users with less complex mathematical formulation. The optimal performance for all methods is obtained immediately after the first iteration.     From Equation (20), substitute w = 1, 2, 3, to all variables to produce Equations (A3) and (A5) Figure 9. System energy efficiency vs. iterations.

Conclusions
In this paper, the user pairing and power allocation problems for the NOMA downlink systems have been studied, with the consideration of BS power transmission and minimum user rate constraints. First, the sum rate maximization problem was formulated, then the optimal power allocation in closed-form solutions for the multiplexed users was derived using KKT conditions. Second, the energy efficiency maximization problem was formulated in a fractional programming form, in which the global optimal power allocation solution was not guaranteed. Accordingly, the optimal power allocation solution was obtained using the DKL algorithm. Moreover, to get the optimal user pairing, the HNG algorithm paired two users in the subchannel to maximize their sum rate and energy efficiency performance. The results of the simulation have shown that the proposed NOMA-PKKT-HNG achieves high sum rate and provides more fairness. In comparison, NOMA-PDKL-HNG achieves higher energy efficiency performance and better fairness among users when compared to the other techniques. It can be concluded that NOMA-PKKT-HNG and NOMA-PDKL-HNG techniques are promising solutions for 5G NOMA systems.