# Energy-Efficient User Pairing for Downlink NOMA in Massive MIMO Networks
## 5 Power Allocation Solution  
In this work, the fairness between cell-center users and cell-edge users is guaranteed by formulating the objective function as a max-min energy efficiency problem. This optimization problem is expressed mathematically as  
\[ \begin{split}\underset{\mathbf{q}\geq 0}{\max}& min \quad\quad\text{EE}\\ \text{Subject to}& C_{1}:\sum\limits_{u=1}^{U}q_{u} \leq q_{max}\\ & C_{2}:R_{u}\geqslant R_{min}\quad\quad\quad\forall u\in U_{c}\\ & C_{3}:R_{u}\geqslant eR_{min}\quad\quad\forall u\in U_{e}.\end{split}  \tag{17}\]  
where \(R_{min}\) is the minimum data rate for cell-center users. The factor \(e\) is inserted to ensure that cell-edge users are targeting smaller rate \(eR_{min}\), where \(0<e<1\). The formulated problem is a fractional problem and it is transformed into a series of parametric subtractive-form subproblems as follows:  
\[ \begin{split}\underset{\mathbf{q}\geq 0}{\max}& min \quad R-\text{EE}\ \gamma\\ \text{Subject to}& C_{1},C_{2},C_{3}.\end{split}  \tag{18}\]  
The objective function in (18) is a non-convex problem and it needs to be reformulated. \[R-\text{EE}\gamma=X(\mathbf{q})-Z(\mathbf{q}), \tag{19}\]  
where,  
\[ \begin{split} X(\mathbf{q})&=B\,log_{2}\left[\left( \beta_{u_{c}}\sum\limits_{\begin{subarray}{c}i\
eq u_{c}\\ i\
eq u_{c}\end{subarray}}^{U}q_{i}|\mathbf{h}_{u_{c}}^{T}\mathbf{w}_{i}|^{2 }+q_{u_{c}}\beta_{u_{c}}|\mathbf{h}_{u_{c}}^{T}\mathbf{w}_{u_{c}}|^{2}+1 \right)\right.\\ &\left.\left(\beta_{u_{c}}\sum\limits_{\begin{subarray}{c}i\
eq u _{c}\\ i\
eq u_{c}\end{subarray}}^{U}q_{i}|\mathbf{h}_{u_{c}}^{T}\mathbf{w}_{i}|^{2}+q _{u_{c}}\beta_{u_{c}}|\mathbf{h}_{u_{c}}^{T}\mathbf{w}_{u_{c}}|^{2}+1\right) \right]-\text{EE}\gamma,\end{split}  \tag{20}\] \begin{table}
\begin{tabular}{c c c c} \hline \hline  & \(u_{c1}\) & \(u_{c2}\) & \(u_{c3}\) \\ \hline \(u_{c1}\) & 4 & 3 & 2 \\ \hline \(u_{c2}\) & 4 & 5 & 0 \\ \hline \(u_{c3}\) & 0 & 0 & 12 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The cost matrix \(\delta_{cost}\) to be minimized. \[Z(\mathbf{q})=B\log 2\left[\left(\beta_{u_{c}}\sum_{ \begin{subarray}{c}i\
eq u_{c}\\ i\
eq u_{c}\end{subarray} }^{U}q_{i}|\mathbf{h}_{u_{c}}^{T}\mathbf{w}_{i}|^{2 }+1\right)\left(\beta_{u_{c}}\sum_{i\
eq u_{c}}^{U}q_{i}|\mathbf{h}_{u_{c}}^{T }\mathbf{w}_{i}|^{2}+1\right)\right]. \tag{21}\]  
where \(\mathbf{w}_{u}\) is the ZF beamforming vector for user \(u\). The non-convex constraints \(\mathrm{C}_{2}\) and \(\mathrm{C}_{3}\) are reformulated into a convex form after some mathematical manipulations. The new constraints \(\mathrm{C}_{2}^{new}\) and \(\mathrm{C}_{3}^{new}\) are given by  
\[\mathrm{C}_{2}^{new}:q_{u_{c}}\beta_{u_{c}}|\mathbf{h}_{u_{c}}^{T}\mathbf{w} _{u_{c}}|^{2}+\left(1-2^{R^{min}/B}\right)\left(\beta_{u_{c}}\sum_{ \begin{subarray}{c}i\
eq u_{c}\\ i\
eq u_{c}\end{subarray} }^{U}q_{i}|\mathbf{h}_{u_{c}}^{T}\mathbf{w}_{i}|^{2} +1\right)\geqslant 0. \tag{22}\]  
\[\mathrm{C}_{3}^{new}:q_{u_{c}}\beta_{u_{c}}|\mathbf{h}_{u_{c}}^{T}\mathbf{w} _{u_{c}}|^{2}+\left(1-2^{eR^{min}/B}\right)\left(\beta_{u_{c}}\sum_{i\
eq u_{c }}^{U}q_{i}|\mathbf{h}_{u_{c}}^{T}\mathbf{w}_{i}|^{2}+1\right)\geqslant 0. \tag{23}\]  
Reformulate (18) as  
\[\max_{\mathbf{q}\geq 0}min X(\mathbf{q})-Z(\mathbf{q})\] (24) Subject to \[\mathrm{C}_{1},\mathrm{C}_{2}^{new},\mathrm{C}_{3}^{new}.\]  
Both functions \(X(\mathbf{q})\) and \(Z(\mathbf{q})\) are concave. Thus, the objective \(X(\mathbf{q})-Z(\mathbf{q})\) is a difference of two concave functions. Using the first-order Taylor expansion,  
\[Z(\mathbf{q})\approx Z\Big{(}\mathbf{q}^{(k-1)}\Big{)}+\bigtriangledown Z^{T }\Big{(}\mathbf{q}^{(k-1)}\Big{)}\Big{(}\mathbf{q}-\mathbf{q}^{(k-1)}\Big{)}. \tag{25}\]  
where \(\bigtriangledown Z(\mathbf{q})\) is the gradient of \(Z(\mathbf{q})\) at \(\mathbf{q}\) and is formulated in (26). \(\mathbf{q}^{k}\) is obtained as an optimal solution at the k-th iteration. The vector gradient of \(Z\) at \(\mathbf{q}\) is given by  
\[\bigtriangledown Z(\mathbf{q})=\frac{1}{\left(\beta_{u_{c}}\sum_{