# A Fairness Index Based on Rate Variance for Downlink Non-Orthogonal Multiple Access System
## 4 Power Allocation under Fairness Constraints
### Power Allocation Inter Cluster  
The power allocation intra cluster can be expressed as:  
\[\begin{array}{ll}P2&\max\limits_{\{p_{n}\}_{n=1}^{N}}R_{sum}=\sum\limits_{n=1} ^{N}R_{c-n}\\ s.t.&\text{C1}:\sum\limits_{n=1}^{N}p_{n}=P_{t}\\ &\text{C2}:p_{n}\in(0,P_{t})\\ &\text{C3}:F_{c}\geq\varphi_{c}\end{array} \tag{19}\]  
In this paper, continuous convex approximation (SCA) [29] is used to deal with the non-convex problem in \(P2\). According to Equations (11), (12), and (14), the constraint of C3 can be written as the following equivalent inequality:  
\[(\sum\limits_{n=1}^{N}R_{c-n})\ ^{2}/\sum\limits_{n=1}^{N}R_{c-n}\ ^{2}\geq(\varphi_{c}+\frac{1}{N-1})(N-1) \tag{20}\]  
Introducing a set of relaxation variables \(r_{1}\), \(r_{2}\),..., \(r_{n}\), we can get the optimization problem \(P3\) equivalent to \(P2\):  
\[\begin{array}{ll}P3&\max\limits_{\{p_{n}r_{n}\}_{n=1}^{N}}\sum\limits_{n=1} ^{N}r_{n}\\ s.t.&\text{C1}:\sum\limits_{n=1}^{N}p_{n}=P_{t}\\ &\text{C2}:p_{n}\in(0,P_{t})\\ &\text{C3}:R_{c-n}\geq r_{n},n\in[1,N]\\ &\text{C4}:(\sum\limits_{n=1}^{N}r_{n})\ ^{2}/\sum\limits_{n=1}^{N}r_{n}\ ^{2}\geq(\varphi_{c}+\frac{1}{N-1})(N-1)\end{array} \tag{21}\]  
Relaxation variables \(\gamma\) and \(\theta\) are introduced to make \((\sum r_{n})^{2}\geq\gamma\theta^{2}\) and \(\sum r_{n}\ ^{2}\leq\theta^{2}\). The equivalent inequality of C4 can be obtained:  
\[\gamma\geq\bigg{(}\varphi_{c}+\frac{1}{N-1}\bigg{)}(N-1) \tag{22}\]  
Using the first-order approximate Taylor series, the approximate equivalent inequality of \((\sum r_{n})^{2}\geq\gamma\theta^{2}\) is:  
\[\sum r_{n}\geq\sqrt{\gamma^{(i-1)}}\theta^{(i-1)}+0.5\frac{1}{\sqrt{\gamma^{( i-1)}}}\theta^{(i-1)}\Big{(}\gamma-\gamma^{(i-1)}\Big{)}+\sqrt{\gamma^{(i-1)}} \Big{(}\theta-\theta^{(i-1)}\Big{)} \tag{23}\]  
where \(\gamma^{(i-1)}\) and \(\theta^{(i-1)}\) represent the approximate value of \(\gamma\) and \(\theta\) at iteration \(i\), respectively. \(\sum r_{n}\ ^{2}\leq\theta^{2}\) can be approximately expressed as:  
\[\theta\geq\big{\|}\big{[}r_{1}\quad r_{2}\cdots r_{N-1}\quad r_{N}\big{]}^{T} \big{\|}_{2} \tag{24}\]\(P3\) can be further equivalent to:  
\[\begin{array}{l}P4\quad\max\limits_{\gamma,\theta,\{p_{n},r_{n}\}_{n=1}^{N}=1} \tau_{n}\\ s.t.\quad\quad C1:\sum\limits_{n=1}^{N}p_{n}=P_{t}\\ \quad\quad\begin{array}{l}\text{C2:}\;p_{n}\in(0,P_{t})\\ \text{C3:}\;R_{n-2}\geq\tau_{n}n\in[1,N]\\ \text{C4:}\;\left(\sum\limits_{n=1}^{N}r_{n}^{2}\right)^{2}\sum\limits_{n=1}^{ N}r_{n}^{2}\geq\left(\varphi_{\text{c}}+\frac{1}{N-1}\right)(N-1)\\ \text{C5:}\;\gamma\geq\left(\varphi_{\text{c}}+\frac{1}{N-1}\right)(N-1)\\ \text{C6:}\;\zeta\sum\limits_{n}\geq\sqrt{\gamma^{(i-1)}}\theta^{(i-1)}+0.5\frac {1}{\sqrt{\gamma^{(i-1)}}}\theta^{(i-1)}\left(\gamma-\gamma^{(i-1)}\right)+ \sqrt{\gamma^{(i-1)}}\left(\theta-\theta^{(i-1)}\right)\\ \text{C7:}\;\theta\geq\left\|\left[\begin{array}{cccccc}r_{1}&r_{2}&\cdots&r_{ N-1}&r_{N}\end{array}\right]^{T}\right\|_{2}\end{array} \tag{25}\]  
Based on the above analysis, the inter cluster power allocation algorithm is as follows.  
```
Input: \(P_{t}\), \(\varphi_{\text{c}}\), \(\{\alpha_{n}^{s},\alpha_{n}^{w}\}_{n=1}^{N}\), \(H\), \(W\), \(n_{0}\), \(i\) Output: \(\gamma,\theta\), \(\{p_{n},r_{n}\}_{n=1}^{N}\)
1: if \(i=1\), initialize \(\{p_{n}\}_{n}^{N}\), \(p_{n}^{i-1}=P_{t}/N\); else, turn to step 5;
2: according to \(r_{n}^{i-1}=R_{\zeta-n}\), \(n\in[1,N]\), calculate \(\{r_{n}\}_{n=1}^{N}\);
3: initialize \(\theta,\theta^{i-1}=\left\|\left[\begin{array}{cccc}t_{1}^{i-1}&r_{2}^{i-1} \cdots r_{N-1}^{i-1}&r_{N}^{i-1}\end{array}\right]^{T}\right\|_{2}\);
4: initialize \(\gamma\), \(\gamma^{i-1}=\left(\varphi_{\text{c}}+\frac{1}{N-1}\right)(N-1)\);
5: using sequential quadratic programming method to solve problems \(P4\) with nonlinear constraints, get \(\gamma,\theta,\{p_{n},r_{n}\}_{n=1}^{N}\);
6: end.
```  
**Algorithm 2**Inter cluster power allocation algorithm under fairness constraint