# Optimal Energy Efficiency Fairness of Nodes in Wireless Powered Communication Networks
## 4 Utility Optimization
### Sub-Optimal Algorithm Design  
According to the above Theorem, we can obtain the solution by combining the solutions of the two sub-problems. A two-step sub-optimal algorithm is proposed: (1) Initialize the receive threshold of all nodes is zero, which means all nodes receive information. Adjusting the bias of BSs in each tier to obtain the optimal energy efficiency proportional fairness; (2) Fix the optimal bias of BSs in each tier, adjusting the receive threshold of nodes to obtain the optimal energy efficiency proportional fairness. Then repeat to run step 1 and 2 until the result converge reaches the optimal solution. Due to Theorem 2, the first step is solvable. Meanwhile, the second step is solvable according to Theorem 1. The detailed description of this two-step algorithm is presented in Algorithm 1.  
```
1: Initialize the maximum number of iterations \(L_{\max}\), the maximum tolerance is \(0\leq\varepsilon\leq 1\)
2: Set the associated probability \(A_{k}=A_{k}^{(0)}=0 dB,\theta_{k}=\theta_{k}^{(0)}=0,\forall k=\{1,2,..,K\}\), and iteration index \(n=0\)
3:repeat {Loop}
4: Solve the convex problem in (19) for a given set of \(A_{k}^{(n)}\) and obtain the optimal receive threshold \(\{A_{k}^{(n)},\theta_{k}^{(n+1)}\}\)
5: Solve the convex problem in (19) for a given set of \(\theta_{k}^{(n)}\) and obtain the optimal association probability \(\{A_{k}^{(n+1)},\theta_{k}^{(n)}\}\)
6:if\(\left|A_{k}^{n+1}-A_{k}^{n}\right|<\varepsilon\) and \(\left|\theta_{k}^{n+1}-\theta_{k}^{n}\right|<\varepsilon\)then
7: Convergence = true
8:return\(\{A_{k}^{*},\theta_{k}^{*}\}=\left\{A_{k}^{(n+1)},\theta_{k}^{(n+1)}\right\}\) and \(U^{*}\left(A_{k},\theta_{k}\right)=U\left(A_{k}^{*},\theta_{k}^{*}\right)\)
9:else
10:\(n=n+1\)
11: Convergence = false
12:endif
13:until Convergence = true or \(n=L_{\max}\)
```  
**Algorithm 1**********Suboptimal Iterative Resource Allocation Algorithm  
The problem (20) can also be solved to obtain the optimal receive threshold and user association probability by performing optimal brute-force two-dimensional search. However, the computational complexity of the proposed optimal two-dimensional search scheme is upper bound by \(O\left(\frac{\theta_{max}}{M}\cdot\frac{K^{2}}{N}\right)\), where \(\theta_{max}\) is the maximal value of the receive threshold, \(M\) is the step size of the one-dimensional search on the receive threshold, \(K\) is the number of tiers in the network, and \(N\) is the step size of the one-dimensional search on user association probability. It can be seen that the complexity of the algorithm is relatively higher due to the two-dimensional search performed by the loop, and the complexity increases nonlinearly as the search step decreases.  
It is clear from Algorithm 1 that in the first step of the proposed sub-optimal algorithm, there are K iterations. In each iteration, the number of comparisons required to find the best association probability of that tier is \(\log_{2}N\) by adopting the binary search. In the second step, for the fixed association probability, the optimal receive threshold can be obtained by solving the Formula (24). Therefore, the maximum number of comparisons required by our proposed sub-optimal algorithm is \(O\left(K\log_{2}N+K-1\right)\). Compared with the optimal brute-force search, it can be clearly seen that by relaxing the objective function and decoupling the problem into two sub-problems, the computational complexity is significantly reduced. In addition, the suboptimal algorithm obtains the suboptimal solution of the corresponding optimization problem, and the performance gap between the suboptimal and optimal will be shown in the simulation results.