# A Novel Approach to Enhance the Energy Efficiency of a NOMA Network
## 5 The Sub-Optimal Solution
### User Sub-Channel Fair Matching Algorithm
\begin{array}{ccc}171&\textbf{[215]}&516\\ \textbf{[328]}&232&1133\\ 403&837&\textbf{[1886]}\end{array} \right] \tag{26}\]  
As seen in (25) and (26), we can obtain the first user allocated to each sub-channel from \(\hat{G1}\) and the second user allocated to each sub-channel from \(\hat{G2}\), as indicated in Table 1. After this, the user assignment is complete. Table 1 shows the matching results. This result indicates that users \(u_{2}\) and \(u_{5}\) are superimposed on the first sub-channel \(v_{1}\), while \(u_{1}\) and \(u_{4}\) are superimposed on \(v_{2}\) and \(u_{3}\) and \(u_{6}\) are superimposed on \(v_{3}\). From the allocation result, we can see that the gains of the two users superimposed on the same sub-channel are quite different, so the system will have better throughput. Based on the premise of perfect matching [39], user fairness can be guaranteed. The specific process of Algorithm 1 is as follows: \begin{tabular}{c c c} \hline \hline
**Matching Results** & \(v_{1}\) & \(v_{2}\) & \(v_{3}\) \\ \hline \(u_{1}\) & 10 & [39] & 22 \\ \hline \(u_{2}\) & **[61]** & 54 & 38 \\ \hline \(u_{3}\) & 79 & 55 & [60] \\ \hline \(u_{4}\) & 171 & [215] & 516 \\ \hline \(u_{5}\) & **[328]** & 232 & 1133 \\ \hline \(u_{6}\) & 403 & 837 & [1886] \\ \hline \hline \end{tabular}   
Table 1: The matching result of the user allocation. Table 1 shows the matching results. This result indicates that users \(u_{2}\) and \(u_{5}\) are superimposed on the first sub-channel \(v_{1}\), while \(u_{1}\) and \(u_{4}\) are superimposed on \(v_{2}\) and \(u_{3}\) and \(u_{6}\) are superimposed on \(v_{3}\). From the allocation result, we can see that the gains of the two users superimposed on the same sub-channel are quite different, so the system will have better throughput. Based on the premise of perfect matching [39], user fairness can be guaranteed. The specific process of Algorithm 1 is as follows: \begin{tabular}{c c c} \hline \hline
1. & Calculate the channel gain matrix of users \(u\in\{u_{1},u_{2},\ldots,u_{U}\}\) and sub-channels \(v\in\{v_{1},v_{2},\ldots,v_{V}\}\) \\ \(2.\) & Sort the gain matrix in column-wise ascending order starting from first row to get a new gain matrix \(G\) of size \(UV\). \\ \(3.\) & Generate a gain compensation matrix as shown in (20), where \(\beta\) is the the attenuation coefficient. We set \(\beta=0.4\) in this paper. \\ \(4.\) & Let the sorted gain matrix \(G\) be multiplied, element wise, by the compensation matrix \(\hat{G}\) as in (23) to get compensated, the new compensated gain matrix is \(\hat{G}\). \\ \(5.\) & Split \(\hat{G}\) into two matrices \(\hat{G1},\hat{G2}\), each of size \(\frac{U}{2}V\) \\ \(6.\) & Using the Hungarian algorithm for \(\hat{G1}\), the first matching user on each sub-channel is obtained. Using the Hungarian algorithm for \(\hat{G2}\), the second user matched on each sub-channel is obtained. \\ \(7.\) & End. \\ \hline \hline \end{tabular}   
If the number of super-positions is increased to three, then the user channel gain matrix is divided into three groups, and the other steps are the same as Algorithm 1. Complexity Analysis  
If there are \(V\) sub-channels and \(U=2V\) users, the time complexity of the ESA with the best performance in user allocation is \(O(\frac{(2V)}{2V})\), and the time complexity of the USFMA considered in this paper is \(O(2V^{3})\). Furthermore, the complexity of the CSS-PA is \(O(Vlog(V))\), while the complexity of the USMA is \(O(UIV^{2})\). Accordingly, we can notice that when the number of users is large, the complexity of the user allocation algorithm proposed in this paper is much lower than that of the ESA. The CSS-PA shows the lowest complexity; however, the USFMA still shows comparable complexity with other schemes. In summary, the algorithm is suitable for superimposing multiple users on the same sub-channel, and the complexity will not increase sharply.