## 2 NOMA System Model
### Problem Formulation  
The resource allocation problem involves user pairing, channel power allocation, and power ratio allocation to maximise throughput for a NOMA system in 5G networks. The first objective is to maximise the throughput with respect to power allocation and user pairing. The throughput function is described as follows:  
\[f(\delta,P)=B_{sc}\sum_{n=1}^{N_{sc}}\log_{2}(1+\delta_{n}P_{n}G_{1,n})+B_{sc }\sum_{n=1}^{N_{sc}}\log_{2}\bigg{(}1+\frac{(1-\delta_{n})P_{n}G_{2,n}}{1+ \delta_{n}P_{n}G_{2,n}}\bigg{)}. \tag{8}\]where \(\delta=[\delta_{1},\delta_{2},...\,\delta_{N_{sc}}]^{T}\) and \(P=[P_{1},P_{2},...\,P_{N_{sc}}]^{T}\) are the power ratio and channel power, respectively. Furthermore, the power ratio for the multiplexed users is denoted as \(\delta_{n}\) on a subchannel \(n\), and \(P_{n}\) is the subchannel \(n\) power. The system is designed to achieve trade-offs between throughput maximisation and system fairness to obtain the optimal solution. The problem design is formulated on the basis of the SMOO approach to convert it into a single objective (SO) function [23]. The primary objective function is formulated by adding each objective and pre-multiplying each with a supplied weight scale [23]. The weight scale is set in proportion to the relative importance of the objective. The problem is formulated as follows:  
Maximise \[f(\delta,P)\] (9) Subject to \[C_{1}\ :\ 1^{T}P\leq P_{max},\] (10) \[C_{2}:P\geq 0,\] (11) \[C_{3}:F\geq F_{des},\] (12) \[C_{4}:R_{i}\geq R_{min},\] (13) \[C_{5}:\ 0\leq\delta\leq 1,\] (14)  
where \(C_{1}\) is the total transmit power constraint and \(C_{2}\) is the channel power constraint. The fairness constraint is denoted as \(C_{3}\) ; the minimum data rate constraint is represented as \(C_{4}\). The power ratio allocation varies between 0 and 1, as denoted in \(C_{5}\). Moreover, \(C_{5}\) prevents the power ratio from reaching 1, previous work showing that the highest value of the power ratio is sufficient to provide the maximum objective function [6]. These constraints are applied to the objective function to protect the function from violating the constraint. The fairness value is added as a constant that balances objective function maximisation. For the implementation, the problem is converted into a minimisation problem, and, thus, the throughput function is negated. The design of SMOO problems uses the weighted sum method (WSM) [23]. Hence, the throughput objective function is normalised and scaled by the number of users, such that the calculation can be generalised for any number of users. The normalised objective function is written as follows:  
\[q=-\frac{f(\delta,P)}{U}, \tag{15}\]  
where \(q\) is the normalised value of the fitness function. The cost function must include the other constraints because PSO only allows upper and lower bound constraints. Any violation in the sum of power, fairness and minimum user data rate constraints is added to the cost function. More violations result in a higher cost function; thus, if no violation occurs, then \(q^{*}=0\). The penalty functions are presented as follows:  
\[q_{p}=max\,\left(0,1^{T}P-P_{max}\right), \tag{16}\]  
\[q_{F}=max\,\left(0,F_{des}-F\right), \tag{17}\]  
\[f(\delta,P)\]0  
The constraint can make the optimisation problem considerably more difficult where it is an essential step in making the optimisation more flexible and less complex. Consequently, the constrained problems are converted into unconstrained problems by means of an artificial penalty for violating the constraint as a new penalty function. The minimisation problem is presented below, where \(p^{*}\) denotes the corresponding penalties for violations. Furthermore, the objective function is developed as follows:  
\[f(\delta,P)\]1\[f(\delta,P)\]2  
\[f(\delta,P)\]3  
where \(F_{des}\) is the fairness weight constant that can be predefined in the system. The minimum user data rate is denoted as \(R_{min}\), where \(p_{R}\), \(p_{F}\), and \(p_{p}\) are the penalty for user's data rate, fairness, and power violation, respectively.