Competitive Indoor-Outdoor User Pairing Algorithms and Resource Optimization in DL-NOMA Systems

,


I. INTRODUCTION
T HE demand for delivering wireless data at massive rates and low-latency has dramatically increased in recent years prompting the need for new technologies, such as fifth generation (5G) and WiFi-6 systems, to cater for such requirements.However, overcoming the limited radio frequency resources continues to be a major challenge in wireless systems.To this end, a new radio access technique, namely non-orthogonal multiple-access (NOMA), has been the subject of intensive investigation in a bid to provide better utilization of the radio spectrum [1].To this end, NOMA is currently considered a potential candidate for future wireless generations such as 6G and WiFi-7 [2].In comparison to orthogonal frequency-division multiple-access (OFDMA), NOMA can double the utilization of the radio resource, but at the expense of some inter-user interference and higher complexity.To minimize the impact of such drawbacks, NOMA receivers normally utilize successive interference cancellation (SIC) for multiuser detection and data recovery.
The basic principle of power-domain NOMA is to differentiate between the multiplexed users using unique power levels that are selected based on some optimization criterion.Hence, to enhance the performance of such systems, power allocation and user grouping must be carefully addressed [3]- [5].

A. RELATED WORK
There is a plethora of published studies investigating NOMA systems.For example, the basic NOMA concept is described in [6] and [7].Moreover, in [8] the outage probability, bit error rate and ergodic capacity performance are presented, while in [9] cooperative NOMA systems are considered.Also, in [10], Ding et al. showed that NOMA can achieve better sum data rate performance than OFDMA.They also demonstrated that the allocated power and target data rate parameters can effectively manipulate the outage probability performance of NOMA.Moreover, similar work that demonstrates the superiority of NOMA has been carried out by Saito et al. in [11] and Benjebbovu et al. in [12].Particularly, the authors argue that NOMA can improve the system capacity and throughput over orthogonal multiple access (OMA) systems by applying different power allocation techniques, such as full search power allocation (FSPA), fractional transmit power allocation (FTPA), and the fixed power allocation (FPA).Their results showed that the FSPA technique outperforms the other considered techniques, though at the cost of higher complexity.In contrast, FTPA, which requires prior computations of specific parameters, outperforms the lower complexity FPA.
It has also been shown that user pairing and power allocation are key factors for enhancing the performance of NOMA systems, especially on the sum data rate in the downlink transmission [13].It was demonstrated that conventional user pairing, where the user with the best channel condition is paired with the user with the worst channel condition, and fixed power allocation technique improve the capacity of downlink NOMA system, albeit to a limited degree.On the other hand, advanced algorithms employing optimizationtheoretic techniques have been shown to achieve better performance not surprisingly at the expense of high complexity, which may affect the system's efficiency and decision time for resource allocation [14]- [17].For instance, the authors in [17] proposed a real-time allocation technique based on a deep neural network, which is trained to estimate the interior point method (IPM) for power allocation, and was shown to enhance the capacity and computational efficiency.In another corresponding research [18], a joint dynamic user pairing and power allocation algorithm for a hybrid OMA/NOMA system is introduced.The user pairing is performed on the basis of being served by OMA or NOMA, where the proposed algorithm minimizes the queuing delay and guarantees a minimum time-average data rate.
Furthermore, the authors in [19] proposed a new approach of vertical pairing that contributes to establishing user pairing based on their channel gains.They also examined the sum-rate maximization problem of NOMA over frequencyselective fading channels.Their results show that their proposed approach is superior to other techniques and offers a comparable performance to the optimal solution.Zhu et al. [20] optimises the user pairing and power allocation to enhance the achievable sum-rate.It has been demonstrated that the proposed optimal user pairing significantly enhances the performance of NOMA compared to other methods, such as the random user pairing.A recent study on user pairing in NOMA with practical SIC is presented in [21].The authors propose an adaptive user pairing (A-UP) algorithm for enhancing the sum-rate performance of the paired users.Furthermore, much of the recent research studies focus on identifying and evaluating user pairing and power allocation in single-input single-output (SISO) systems.On the other hand, Chen et al. [22] studied user pairing for massive multiple-input multiple-output (MIMO)-NOMA systems, where the authors propose a user pairing and scheduling algorithm to ensure that paired users achieve superior sum-rate and outage performance compared to conventional user pairing algorithms.Nguyen et al. [23] investigates the user pairing problem for multiple input single output (MISO)-NOMA networks with simultaneous wireless information and power transfer (SWIPT) to maximize the overall energy-efficiency (EE) and spectral-efficiency (SE), subject to user quality-of-service (QoS) requirements.The authors propose a novel hybrid user pairing algorithm to solve the optimization problem.The work in [24] investigates the resource allocation in a NOMA system deploying multiple antenna Unmanned Aerial vehicles (UAV) and tackle the maximization of EE, while delighting various constraints related to user pairing, UAV positions, satisfied QoS, and SIC thresholds.The results indicate that the EE of NOMA can leverage the EE of OMA in most cases.The results also reveal the impact of applying equal requirements' rate on the EE, where the optimal performance is attained.In addition, the authors in [25] address some optimal solutions for user pairing, and power allocation to maximize the network sum-rate and energy-efficiency, where the Hungarian (HNG) algorithm is applied for pairing two NOMA users that are characterised with different channel conditions.The authors attained closed-forms solutions for maximizing the sum-rate and EE by applying the Karush-Kuhn-Tucker (KKT) conditions and the Dinkelbach (DKL) algorithm, respectively.

B. MOTIVATION AND CONTRIBUTION
Given the aforementioned works, it is evident that no prior work has focused on simultaneously optimizing the sum-rate and fairness in indoor-outdoor user pairing scenarios.To this end, two algorithms are proposed in this work, which utilize the diversity of channel gains of the indoor and outdoor users, to maximize the sum-rate, while providing a high degree of fairness relative to traditional user pairing approaches.We maximize the rate fairness of indoor users using the Karush-Kuhn-Tucker (KKT) approach.The channel path-loss of the indoor and outdoor users are modeled differently due to the nature of the signal path between the transmitter and receiver.In particular, the outdoor users are assumed to experience less severe channel conditions than the indoor users.Various empirical propagation models to overcome this issue will be discussed.
The main contributions of this work can be summarized as follows: • Study a downlink NOMA system model with multiple users operating simultaneously in different environments, that is indoor and outdoor schemes.
• Propose an effective algorithm that utilizes the streamlined simplex method (SSM) to improve the sum-rate performance for indoor-outdoor user pairing.• Propose a low-complexity user pairing algorithm, named the least and most cost method (LMCM), and demonstrate its effectiveness for indoor-outdoor user pairing.
• Compare the proposed algorithms with some conventional algorithms such as Near-Far pairing and random algorithms to show the significance of our proposed solutions.
• Apply the max-min optimization method to obtain the optimal power allocation that can maximize the indoor Path-loss of outdoor user user's data and fairness.
• Validate the performance of the proposed algorithms using extensive simulations, where the sum-rate, and fairness index can be potentially improved in comparison to the conventional user pairing methods.
The rest of this paper is organized as follows.Section II describes the system model, where the path-loss models and performance metrics are discussed.Sections III details the maximization problem as well as the two proposed algorithms.Section V discusses the minimum achievable data rate maximization problem for the indoor users.Finally, the results are discussed in Section VI and the conclusions are presented in Section VII.

II. SYSTEM MODEL
Consider a downlink NOMA system applied for multiplexing indoor and outdoor users served by a single base-station (BS), in which all users communicate with the BS through a single antenna.The BS combines the data signals via superposition coding, and transmits them to a set of indoor-outdoor users U = {1, . . ., u, . . ., U } using a set of subcarriers S = {1, . . ., s, . . ., S}, as shown in Fig. 1.The multiplexed signals are allocated different power levels, and the total bandwidth B is uniformly divided over the S subcarriers, yielding the dedicated bandwidth B sc for each subset of users (i.e.B sc = B S ).In addition, each subcarrier s is assumed to be allocated to K s users, where equal-sized user groups are assumed.Thus, the total number of users is U = K s × S. Furthermore, the channel state information (CSI) of the assigned links between the BS and users are considered to be available at BS.
In NOMA, each subcarrier serves multiple users that employ SIC receivers.The BS assigns groups of users to different subcarriers, and allocates them different power levels.The transmitted signal from the BS to the K s users over subcarrier s can be written as where x s,u and P s,u are the transmitted signal and allocated power to the u th user on subcarrier s, respectively.The power constraints of the s th subcarrier and BS are represented respectively as Ks q=1 P s,q ≤ P s and S s=1 P s ≤ P t , where P t is the total transmit power, while P s is the total transmit power over each subcarrier s.Also, let β s,u and η s be the power allocation factors of user u on subcarrier s, and that of subcarrier s, respectively, such that P s,u = β s,u × P s and P s = η s × P t .In this work, it is assumed that η s = 1 S ≜ η, ∀s ∈ S.
The received signal at the user u can be given as [26] where h s,u is the complex channel coefficient between the BS and user u on the subcarrier s, where the effect of pathloss and small-scale fading is given as h s,u = gs,u √ P Ls,u [27].In particular, P L s,u indicates the path-loss of user u on the subcarrier s, and g s,u ∼ CN (0, 1) defines the smallscale Rayleigh fading.In addition, n s,u ∼ CN (0, σ 2 ) is the additive white Gaussian noise (AWGN) with zero-mean and variance σ 2 .In downlink NOMA, the subcarriers are orthogonally shared by different groups of users, where the SIC technique is applied to eliminate the inter-user interference over each same subcarrier.Accordingly, users with better channel conditions are assigned lower power levels and vice versa.Thus, the users with higher transmit powers treat the other users' signals as noise (i.e.without applying SIC).Contrarily, the users with lower transmit powers apply SIC to decode the signals of the users with higher power levels.Particularly, let the K s users transmitting on subcarrier s be ordered accordingly to their channel gains as and correspondingly, their transmit powers are ordered as P s,1 ≥ • • • ≥ P s,u ≥ • • • ≥ P s,Ks .Hence, user u can correctly decode and eliminate the interference signals generated by user i for i < u.Thus, the signal-tointerference-plus-noise ratio (SINR) received from user u on subcarrier s is given as 1

A. PATH-LOSS MODEL
Communication between the BS and outdoor users occurs over air-to-ground channels.These links are affected by large-scale path-loss, where the free-space path-loss model [28] where d sr is the Euclidean distance between the BS and the outdoor nodes, and f is the carrier frequency.However, the propagated signals from BS to the indoor users are undergo outdoor-to-indoor channels, which incorporate both largescale path-loss and the path-loss of the indoor transmission.Therefore, the COST-231 Building Penetration Loss empirical propagation model given in [28] is adopted.The indoor user path-loss can be calculated as [29] where L f s indicates the free-space path-loss as given in (4).Moreover, L t represents the transmission propagation pathloss that includes the parallel penetration loss L pt and the perpendicular loss L pc , as given by where θ is the grazing angle between the BS and the exterior building wall.Furthermore, the loss of the indoor propagation path-loss L in is identified by the mean path-loss determined from the internal side of the exterior wall to the indoor user, as where n is the total number of internal walls, L i defines the loss of the internal wall and χ is the loss factor of the indoor path.

1) Achievable Rate
In a wireless communication system, the effective rate of a successful transmission of signals measured in bits per second (bps) is known as the achievable rate.Therefore, the achievable rate of the NOMA users is obtained as 1 Perfect SIC is assumed in this work.
whereas the network sum-rate can be calculated as 2) Energy-Efficiency Energy-efficiency is defined as the ratio of the network sumrate to the total power consumption, which is given by [30] where P c is the circuit power at the BS.

3) Fairness
In this work, Jain's fairness index (JFI) is adopted as a measure of fairness of resource allocation via power allocation and user pairing.Specifically, the JFI of all network users is determined as [31] where 0 ≤ F ≤ 1.Thus, fairness performance is considered high when F is close to 1.

III. PROBLEM FORMULATION
In order to describe the pairing of users, and assignment of subcarriers, a cost matrix Z of the user-subcarrier assignment of size (U × S) is created to observe the best optimal user pairing [25].Particularly, Z is expressed as where ℏ s,u ≜ |h s,u | 2 refers to the channel gain of each user on each subcarrier.The binary decision variables can be defined as Therefore, the main objective here is to maximise the network sum-rate R sum .Therefore, the optimisation problem can be written as Constraint (14b) is applied to ensure that the total transmit power over all users and subcarriers should not exceed P t .In addition, constraint (14c) ensures that each subcarrier s is assigned to K s users.However, the constraint (14d) guarantees that each user is assigned to a subcarrier, and constraint (14e) defines the binary decision variables.In addition, constraints (14f) and (14g) are applied for the seek of the SIC decoding order.(14h) guarantees that each user can obtain its data from a single subcarrier, and it shows the indicator value of the subcarrier assignment.

A. PROPOSED USER PAIRING ALGORITHMS
In this subsection, two proposed methods for user pairing, namely the Streamlined Simplex Method (SSM), and the Least and Most Cost Method (LMCM) are described.

1) SSM Algorithm
The SSM algorithm is typically used to solve linear programming problems, such as transportation type problems, where the assignment problem is considered a special case [32].This method includes two main phases.In the first phase, an initial basic feasible solution (IBFS) is obtained by common methods, such as the least cost method (LCM), the north-west corner method (NWCM), or Vogel's Approximation Method (VAM).In the second phase, one of the following techniques can be applied; the modified distribution (MODI) method, which is also called the u − v method, or the Stepping Stone method (SSTM) [32].
In this work, the LCM and MODI methods are applied in the two phases of SSM algorithm to solve the user pairing issue for the formulated problem.In general, this algorithm works by assigning an individual indoor or outdoor user to a particular subcarrier with the aim of either minimising or maximising the total cost assignment, which can be the channel gains in this work.Furthermore, each user is assumed to be assigned only to a single subcarrier, and each subcarrier should only involve two users to form a pair of NOMA users.In this approach, the demand term can be defined as the total number of paired users in a single subcarrier while the supply term is indicated for the user itself, i.e., supply always becomes unity for each user.Therefore, the optimisation problem in ( 14) can be rewritten as x s,u = 1, s = 1, 2, .., S or ∀u ∈ U, x s,u = {0, 1}, ∀u ∈ U, ∀s ∈ S. (15d) The SSM algorithm can be summarized into the following steps: 1) Formulate the problem and organize the data in the matrix form.

2) Achieve an initial basic feasible solution (IBFS):
The initial solution can be found by applying Algorithm2, and it must satisfy the following conditions: a) The obtained IBFS must be feasible, i.e. it must satisfy all the supply and demand constraints.b) The number of positive allocations must be equal to m+n-1, where m is the number of rows and n is the number of columns.Any solution that meets the above conditions is called degenerate basic feasible solution, otherwise, non-degenerate solution.
3) Evaluate the initial solution for optimality by applying the Modified Distribution (MODI), also known as (u-v) method.This method is discussed to test the optimality of the solution attained in Step 2. If the current solution is optimal, then stop.Otherwise, calculate a new improved solution.4) Updating the current solution: Repeat Step 3 until an optimal solution is accomplished.
In addition, the SSM is proposed to solve the above problem according to Algorithm 1 and the flowchart depicted in Fig. 2.

B. ILLUSTRATING EXAMPLE
The following example is presented to illustrate the procedures involved.Particularly, Table 2 shows an example of the cost matrix that has been obtained from simulating the average channel gains of three indoor users and three outdoor users over three different subcarriers (i.e. S = 3 and U = 6).It can be seen from Table 2 that our problem is classified as a balanced problem due to the equivalent amount of the total summation between the supply and the demand2 .Now, the IBFS for the optimisation problem in (15a) is determined by executing the LCM, which is outlined in Algorithm 2. According to the flowchart presented in Fig. 2, we start by solving the above problem by considering the first row at the first attempt.However, due to the unbalanced problem caused by the unequal total amount between supply and demand, we add a dummy row filled with the (0) cost for each unit and the (4) supply allocations.After that, the problem in (15a) should be converted to a minimisation scheme by finding the maximum units, which is (1.7), and subtracting it from all the remaining units in Now, we assign the selected unit to 1, which fulfils the entire demand of O 1,5 and remains one unit with the first subcarrier.Then, the entire column is crossed because there is no demand left for O 1,5 .Similarly, we attempt to repeat the same procedures for the remaining units until all supplies are consumed and all demands are satisfied.For example, the smallest transportation cost now is (0.2), and the allocation supply is one unit.
Hence, once all remaining units are treated similarly, then the following results can be obtained.
As can be seen from Table 5 the current IBFS is degenerate, since the condition of (m + n − 1) is not satisfied, where m and n indicate the total number of columns and rows, respectively.As a consequence, we should find the minimum transportation cost to be assigned as a dummy value (∆) and repeat the optimality test until that condition is satisfied.As a result, the following IBFS after satisfying the previous condition can be represented in the following table.  (10 (1) 1.61 (∆) 2 dummy 1.7 (1) 1.7 (1) 1.7 (1) 1.7 1.7 1.7 (1)  4 The next step is to find the value of u i and v j for all elements occupied in table 6 by assigning an initial value of zero to one of them, where c ij = u i + v j .Therefore, by assuming u 2 = 0, we obtain the result in Table 7. Now, we find the opportunity cost for the unoccupied units by applying the relationship of d ij = c ij − (u i + v j ).Moreover, the optimal solution can be found at this stage if d ij ≥ 0, otherwise there is an alternative solution.In that case, we select the smallest opportunity cost among unoccupied units to draw a closed loop.After that, we mark each stop point with plus or minus (+/-) signs, alternately, starting with a plus sign (+) at the beginning of the loop.Thus, the following results are obtained as in Table 8. dummy 1.7 (1) 1.7 (1) 1.7 (1)   1.7 1.7 1.7 (1)   4 0 Now, since all the opportunity cost values are greater than zero, i.e., (d ij ≥ 0), then the optimal solution is found and the final allocations in our problem for the first subcarrier are given below.  (11.7 (1) 1.61 (∆) 2 dummy 0 (1) 0 (1) 0 (1) 0 0 0 (1)  4 The dummy row and the values can be discarded since the maximum profit will not be affected.Therefore, U 4 and U 5 are assigned as the optimal pairing of users for S 1 .Consequently, these selected users are reserved in the next step, and we can start with the same procedures for all the remaining subcarriers.Ultimately, the final optimal user pairing for the above problem, after applying the SSM algorithm, can be given as In this approach, we assume that each I s,u is paired with an O s,u .Since indoor users mostly suffer from path-loss and non-line of sight (NLOS) impacts, their channel gains may become insignificant.However, in the ideal scenario, outdoor users are supposed to exhibit fewer of the aforementioned limitations effects, so their channel gains are considered to be better than the channel gains of indoor users.Therefore, we can apply a conventional NOMA system user pairing approach, in which the weak user is paired with the strong user, i.e., a subset of indoor users is paired with a subset of outdoor users in each particular subcarrier.The algorithm proposed for this method is mentioned in the algorithm 3. To illustrate, we give an example of applying this algorithm as K s = 2 and S = 3, where the total number of users can be calculated as U = K s × S = 6 users.Therefore, the same cost matrix (cost function) given in table 2 is reused, where indoor and outdoor users are highlighted with light red and light blue colours, respectively.Therefore, this algorithm is valid when the condition of the algorithm 3 is satisfied.Table 11 is divided between I s,u , with light red colour, and O s,u , with light blue colour.Each cell value indicates the average channel gain between BS and a designated user u on a particular subcarrier s .
According to algorithm 3, the least cost value of the first three columns among all gains in indoor user channels will be selected as an initial starting point, as in table 12. Similarly, the most cost-value of the remaining three columns is also The previous procedures are repeated until all possible pairs are selected.Hence, in table 14, the last applicable choices of the max and min cost values are lifted with no more rows and columns.Therefore, we stop the iteration and assign them to allocated cells for user pairing purposes.
Finally, the optimal selections of the cost matrix for both indoor and outdoor users are indicated by ones, which means that these users can be paired on the same subcarrier s, and the algorithm ends here.

C. COMPUTATIONAL COMPLEXITY
• Complexity Analysis of SSM Algorithm This subsection discusses the computational complexity of the proposed SSM and LMCM solutions.First, the computational complexity analysis for each procedure of Algorithm 1 can be given as below: --The first step of the Algorithm 1 is to extracting an initial basic feasible solution (IBFS), which can be provided by Algorithm 2. The worst-case time is the slowest of the two possibilities: max(time(first ifcondition),time(second if-condition)) which can be given as in total complexity of O(n).Hence, the total process is repeated for all units in the outer loop, which consumes another time complexity of O(n).Ultimately, the total time complexity for the two loops of Algorithm 2 is O(n 2 ).--The second step of the Algorithm 1 is applied to testing the solution for the optimility, which can be found by searching the whole cost matrix and the time complexity is O(n).--In the third step of the Algorithm 1, the attained IBFS is aimed to be improved to overcome the degeneracy.This step consumes time of O(n) since the calculation of u-v and the opportunity cost are applied for all occupied and unoccupied cells.That means different loops and the total complexity is O(n)+O(n).--In the last steps of the Algorithm 1, outer loops for the second and third steps are applied to obtain the optimal solution where the total complexity in this step is considered as O(n 2 ).--According to the aforementioned discussions, the total time complexity of Algorithm 1 can be straightforwardly expressed as O(n 4 ), where different inner and outer loops are applied for the given cost matrix to find the most optimal solution.
• Complexity Analysis of LCMC Algorithm In contrast with SSM, LCMC algorithm has less time complexity.To illustrate, the total time complexity of Algorithm 3 is O(n 2 ).It has two different independent inner and outer loops that consume time complexity of O(n 2 )+O(n 2 ).

IV. BENCHMARK ALGORITHMS A. RANDOM USER PAIRING ALGORITHM
In this method, users are paired on a random base.This sort of user pairing is considered as a straightforward technique where the computational complexity is less but unfair user pairing might be presented due to the randomness.The aim of applying such technique is to show the significance of other important user pairing methods.In this particular algorithm, the cell center users are combined in pairs with the cell edge users, where the channel gains among them can be maintained.However, the mid users are also need to be paired even though the channel gain difference may become less.Therefore, we apply this conventional scheme on the given example in this work as a benchmark, where the ordering of users with respect to their distances from the base station, i.e., far to near basis, can be given as follow: I s,1 ,O s,4 ,I s,2 ,O s,5 ,I s,3 ,I s,1 .Therefore, each subcarrier has a unique pair of channel gains for near and far users that cannot be reused for the other subcarriers as explained in Table 16.Thus, the cell with the same color are combined in a pair.

V. MAXIMIZING INDOOR USER'S ACHIEVABLE DATA RATE
In this section, we aim to optimise the minimum achievable data rate of indoor users, as they practise low channel gains due to their environmental nature.Therefore, we apply power allocation to improve the minimum data rate of the indoor user.The optimisation problem can be formulated as follows.
P s,1 ≥ 0, P s,2 ≥ 0, ∀s where the constraints of (16b) and (16c) are used to verify that both users are less than or equal to the total power and are considered positive values.It can be observed that the objective function in ( 16) is considered to be a non-convex problem; thus, the optimisation problem can be treated as a quasi-concave problem, since all of its super-level set is convex and linear.Furthermore, all related constraints are considered convex because of their linearity.In order to solve the above optimisation problem, we need to find its corresponding series of convex feasibility as in [33].Therefore, the optimisation problem in (16) The problem in (17a) is feasible when the optimal solutions of Rs,1 > α and Rs,2 > α, where α > 0, [34].
It should be noted that the objective function in (18a) and all its constraints are convex due to its linearity.Thus, the Lagrangian function of (18a) after solving the constraint in (18d) is given as where Γ s,u ∆ = hs,u σ 2 , ϵ ∆ = 2 α/Bsc − 1, and (λ 1 , λ 2 , λ 3 ) are the Lagrange multipliers.The optimal solution for the convex problem in (17) can be obtained by the following Karush-Kuhn-Tucker (KKT) method.
∂l ∂λ 1 = P s,1 + P s,2 − P t = 0 (22) By rearranging ( 23) and ( 24), the following expressions of the optimal power allocation solutions are obtained, Therefore, the above optimal solutions depend on α and ϵ, therefore, we need to recalculate them with respect to ϵ considering (22).Therefore, the optimal solution for (25) can be found by considering (22) as follows, To obtain a closed form for the optimal solution in (25),  we solve (26) for ϵ and substitute the result into (25).Thus, ( 26) is rewritten as Finally, we substitute ( 27) into (25) to achieve the following expressions.

VI. RESULTS AND DISCUSSION
In this section, we evaluate the performance of the proposed resource allocation algorithms through a series of extensive simulations.The system parameters applied in the simulations are given in Table 17.For this work, a fixed power allocation technique is applied as β s,1 = 0.85 and β s,2 = 0.15, unless otherwise noted.Fig. 3 shows the sum data rate achievable for multiple indoor and outdoor users paired differently using the SSM, LMCM, and different benchmark algorithms such as random pairing and Near-Far method.The result indicates that the LMCM algorithm outperforms the other methods, particularly with a significant improvement compared to the benchmark algorithms.To illustrate, the LMCM algorithm consistently gains a steady improvement of the sum data rate over the other applied methods.This also indicates that the SSM algorithm can provide more enhancements of the sum data rate of all paired users than Near-Far and random methods though it has the highest complexity.Generally speaking, this figure shows some competitive results produced by the aforementioned methods, given that different user pairing techniques can significantly impact the overall system performance.
Fig. 4 represents one of the main vital performance measurements known as the fairness index.Mostly, it determines whether a user is allocated a fair share of resources relative to the other users.Therefore, this figure explains the average fairness of all subcarriers presented over the entire range of transmit power.As can be seen from that figure, all  algorithms considered fluctuate in their fairness performance among all subcarriers.As a result, SSM provides better fairness among other algorithms where random pairing appears to be the worst among the others, particularly when the transmitted signal is over (−20) dbm.A notable difference between LMCM and random algorithms can be achieved at low transmit power, that is, (P t < −30) dBm.In addition to that, random pairing can achieve a very close result to the SSM algorithm but with overlap at approximately (−30) dBm.In general, the fairness index is degraded when the transmit power increases, while both the SSM and the LMCM algorithms can beat the random pairing method.Furthermore, all algorithms employed behave mostly similarly in their fluent curves from low to high transmitting power.Table XVIII depicts the values of the fairness index for each individual subcarrier on some distinct values of the transmitting power.One can notice the difference in the fairness rate among all algorithms considered at various levels of transmission power.For example, random pairing provides the highest value of the fairness rate on the first subcarrier at (−40) dBm, whereas it becomes the lowest among the others on the third subcarrier for the same transmitting powers.On the contrary, the SSM algorithm has gained the highest value of fairness index on the third subcarrier over all applied transmitting powers.Finally, as the transmitting power increases, the fairness rate among all algorithms decreases.Fig. 5 shows the significant impact of different user pairing algorithms on the average energy efficiency performance metric.Due to the fact that energy efficiency is inversely proportional to the transmitting power, the results show a fast and distinct decrease in energy efficiency at high transmitting power.On the contrary, the results gradually increase at low transmit power, where the LMCM algorithm outperforms the SSM and random pairing algorithms.A peak value of about (7) Mbits/joule can be achieved by the LMCM algorithm at (20) dbm of transmitting power.Furthermore, the energy efficiency of the SSM algorithm is approximately (0.7) Mbits / joule higher than that of the random method, while the SSM algorithm attains (0.2) less than the LMCM algorithm.This indicates that the LMCM is superior to all the other user pairing algorithms considered in this work.
Fig. 6 shows the significant role of the power allocation factor β s,u in a particular amount of transmit power, that is, P t ∈ {−20} dBm.It can be seen that LMCM and SSM algorithms behave in a similar approach and achieve the most assigned data rate among the other methods in the case of β s,1 > 0.5.In particular, the promising amount of sum data rate gained by LMCM and SSM techniques are considered more than the conventional algorithms with about (1) bps at (β s,1 < 0.5) and gradually shrieked to match each other at high β s,1 .Similarly, the random algorithm matches Near-Far method and gradually increase but with less amount than LMCM and SSM algorithms.Moreover, Fig. 7 shows the sum data rate of indoor and outdoor users on all subcarriers versus a range of transmitting power.It involves both conventional and optimised LMCM algorithms.From that figure, it can be seen that a significant improvement in the sum data rate for indoor users is achieved when the optimised method is applied.However, by applying the Max-Min optimisation technique of LMCM, the sum data rate of the outdoor users is decreased by the same amount gained by the indoor users.The main objective of the optimisation is to maximise the minimum sum data rate of indoor users, and the result shows high potential for indoor users.Therefore, fairness in terms of the sum data rate between indoor and outdoor users can be achieved when considering such an optimisation technique.

VII. CONCLUSION
In this work, we studied the pairing of indoor and outdoor users in NOMA downlink systems and proposed two different algorithms that use the streamlined simplex method and the least-and most-cost method.The proposed algorithms were shown to be able to improve the sum data rate performance to various degrees when a group of users from different environments are paired on the same subcarrier.Moreover, to obtain more insight, the performance of these algorithms is compared to a random pairing benchmark.To maximise the minimum achievable data rate, which is associated with indoor users in this work, we used the Max-Min optimisation method.The results demonstrated that the proposed LMCM and SSM algorithms offer superior performance to the random algorithm, where the LMCM algorithm outperforms the SSM algorithm in most cases.The results also show a significantly improved level of fairness rate

FIGURE 1 .
FIGURE 1. System model under consideration with indoor and outdoor user-pairing.

FIGURE 3 .
FIGURE 3. Sum data rate versus transmit power in dBm.

FIGURE 4 .
FIGURE 4. Average fairness index rate of indoor-outdoor users versus transmit power in dBm over different types of algorithms.

FIGURE 7 .
FIGURE 7. Sum data rate of paired indoor and outdoor users versus transmit power in dBm.

TABLE 1 .
List of symbols and definitions

TABLE 2 .
An example of the channel gain cost matrix.

Table 2
to start with the lowest transport cost.This yields the following update.Find max(ℏ s,u ) and allocate it;Subtract max(ℏ s,u ) from its supply (s i ) and demand (d j ); while max(ℏ s,u ) is unique do if (s i = 0) and (d j ̸ = 0) then Eliminate (cross off) the row of that unit; else if (s i ̸ = 0) and (d j = 0) then i = 0) and (d j = 0) then Eliminate the row and column of that unit; end if end if end if repeat ∀ remaining (uncrossed) units until All demands and supplies are consumed, i.e., (s i = 0, ∀i) and (d j = 0, ∀j); end while

TABLE 3 .
First phase of the SSM algorithm: Problem Balancing.

TABLE 6 .
Second phase of the SSM algorithm: Degeneracy.

TABLE 7 .
Second phase of the SSM algorithm: (u − v) method.

TABLE 9 .
Second phase of the SSM algorithm: optimal solution of the first subcarrier.

TABLE 10 .
Second phase of the SSM algorithm: optimal solutions of all subcarriers Algorithm 3: Least and Most Cost Method (LMCM) input : channel gain matrix with size of (U × S) output: Paired users of I s,i and O s,i i : Total number of indoor users; j : Total number of outdoor users;U I ← {ℏ 1,1 , ..., ℏ s,i }, ∀s, i; U O ← {ℏ1,i+1 , ..., ℏ s,j }, ∀s, j; while (i=j) do foreach element in U I do for s ← 1 to S do Find min(U I ); Strike its row and column values;

TABLE 11 .
First phase of LMCM: arranging Is,u and Os,u.

TABLE 12 .
second phase of LMCM: finding the least and the most cost value.

TABLE 13 .
second phase of LMCM: finding the least and the most cost value (cont.).

TABLE 14 .
second phase of LMCM: finding the least and the most cost value (cont.).

TABLE 15 .
last phase of LMCM: optimal solutions.

TABLE XVIII .
Fairness Index Rate in Different Algorithms