# Efficient Resource Management for Sum Capacity Maximization in 5G NOMA Systems
## 3 Resource Management With Fixed Power Control
### User Minimum Capacity Requirement Based Sub-Channel Algorithm  
In this subsection, we design a novel algorithm for sub-channel allocation to the users based on user minimum capacity requirement as shown in Algorithm 2. ```
1. Initialize \(K\), \(M\), \(H_{K\times M}\), \(P_{m}=P_{BS}/M\), \(\beta_{j,m}\), \(\mathcal{S}_{\max}\) and \(R_{K\times 1}\). 2. For\(m=1:M\)do
3. For\(i=1:K\)do
4. For\(j=1:K\)do
5.\(B(i,j)=1\), when \(CU_{i}=\max\) and \(CU_{j}=\min\). 6. If\(B(i,j)==1\)do
7. Compute the sum capacity using \(\beta_{j,m}\). 8. For\(P_{m}=5:1:P_{BS}\)do
9. Compute \(C_{i,m}=\log_{2}(1+\frac{\alpha P_{m}|h_{j,m}|^{2}}{n_{0}})\). 10. Compute \(C_{j,m}=\log_{2}(1+\frac{(1-\alpha)P_{m}|h_{j,m}|^{2}}{|h_{j,m}|^{2}P_{j,m}+n_ {0}})\). 11. Compute \(C_{\text{sum}}=C_{i,m}+C_{j,m}\) on \(SC_{m}\). 12. End For\(P_{m}\). 13. End For\(j\). 14. End For\(i\). 15. At each index of \(m\), assign a sub-channel to any two users with high sum capacity. 16. End For\(m\). 17. Plot the sum capacity of the system. ```  
**Algorithm 2** Sub-channel Assignment Based on User Minimum Capacity Requirement  
According to the algorithm, we first initialize \(K\) and \(M\), where \(M=K/2\). Then, we allocate the transmit power for sub-channels as \(P_{m}=P_{BS}/M\). For each value of \(P_{m}\), the power of \(CU_{j}\) and \(CU_{i}\) must satisfy as \(p_{i,m}+p_{j,m}\leq P_{m}\), where \(p_{i,m}=\alpha P_{m}\) and \(p_{j,m}=(1-\alpha)P_{m}\). Since we assume that the BS has perfect information of all its users, we generate a channel matrix \(H\) which is \(M\times K\) and sort its columns in descending order. In addition, we initialize the matrix \(R\) for user minimum capacity which is \(K\times 1\). Now we select two users from \(H\), one with highest capacity requirement (represented as'max') and one with lowest capacity requirement (represented as'min'). Let us assume that \(CU_{i}\in H\) has highest capacity requirement and \(CU_{j}\in H\) has the lowest capacity requirement. Assign a sub-channel \(m\) to \(CU_{i}\) and \(CU_{j}\) which provide high sum capacity. The process will continue until all sub-channels assign to the users. In the end, we calculate the sum capacity of the system. **4. Resource Management with Optimal Power Control**  
This section provides efficient power allocation for any given sub-channel assignment. Specifically, we first transform the power allocation problem into standard convex optimization problem and then exploit dual methods to obtain the efficient solution. As presented in Section 3, we perform the sub-channel assignment for fixed transmit power at BS, which can be obtained through problem (P2) using Algorithms 1 and 2. Then, under a given sub-channel assignment \(\{\beta_{i,m}\}\), the problem for \(CUl_{i}\) and \(CUl_{j}\) on \(SC_{m}\) can be simplified as (P3):  
\[\text{(P3)}\] \[\text{s.t.} \log_{2}\left(1+\frac{p_{i,m}|h_{i,m}|^{2}}{n_{0}}\right)\geq \bar{C}_{i,m}^{\min}, \tag{16}\] \[\log_{2}\left(1+\frac{p_{j,m}|h_{j,m}|^{2}}{|h_{j,m}|^{2}p_{i,m}+ n_{0}}\right)\geq\bar{C}_{j,m}^{\min},\] (17) \[p_{i,m}+p_{j,m}\leq P_{m},\] (18) \[p_{i,m}<p_{j,m},\] (19) \[p_{i,m}\geq 0,\ p_{j,m}\geq 0. \tag{20}\]  
where (15) denotes the objective function for sum capacity maximization on \(SC_{m}\). Constraints in (16) and (17) guarantee the minimum required capacity of \(CUl_{i}\) and \(CUl_{j}\) over \(SC_{m}\), in which \(\bar{C}_{i,\min}\) and \(\bar{C}_{j,\min}\) are the minimum capacity thresholds of \(CUl_{i}\) and \(CUl_{j}\) over \(SC_{m}\), respectively. In addition, constraints in (18) limits the transmit power of \(CUl_{i}\) and \(CUl_{j}\) on \(SC_{m}\) while constraint in (19) makes the SIC technique successful. The last constraint in (20) shows the non-negative power of \(CUl_{i}\) and \(CUl_{j}\) on \(SC_{m}\).