## 3 Joint Optimization of Altitude and Energy Beamforming for a Single EHD
### Efficient Near-Optimal Altitude Design with Low Complexity  
In this subsection, we further explore the problem \(\mathbf{P}_{3^{\prime}}^{h}\) to obtain a near-optimal solution with low complexity. The first-order derivative of \(f_{U}(h)\) is obtained via  
\[\frac{\partial f_{U}(h)}{\partial h}=\frac{\left(r_{U}^{2}+h^{2} \right)^{-\frac{a_{2}}{2(\Psi_{U}(h)+1)}-\frac{b_{2}}{2}-1}}{\Omega_{U}(h)+1}g _{U}(h) \tag{31}\]  
where \(g_{U}(h)\) is given by  
\[g_{U}(h)\triangleq (\|\mathbf{a}_{U}\|^{2}-1)\ln(10)d_{3}b_{3}\frac{r_{U}\exp\left( b_{3}\arctan\left(\frac{h}{r_{U}}\right)\right)\Omega_{U}(h)}{\Omega_{U}(h)+1}\] \[-\frac{a_{2}}{2}\frac{180}{\pi}b_{1}\frac{r_{U}\ln(r_{U}^{2}+h^{2 })(\|\mathbf{a}_{U}\|^{2}\Omega_{U}(h)+1)\Psi_{U}(h)}{\left(\Psi_{U}(h)+1 \right)^{2}}\] \[-\Big{(}\frac{a_{2}}{\Psi_{U}(h)+1}+b_{2}\Big{)}\big{(}\|\mathbf{ a}_{U}\|^{2}\Omega_{U}(h)+1\big{)}h. \tag{32}\]  
As shown in (31), \(\frac{\partial f_{U}(h)}{\partial h}\) is also a very complex non-linear function with respect to \(h\in[H_{\min},H_{\max}]\) to be optimally solved with a closed-form solution. Nevertheless, we can obtain the necessary conditions for optimal solution of the problem \(\mathbf{P}_{3^{\prime}}^{h}\) as follows. The critical point of the problem \(\mathbf{P}_{3^{\prime}}^{h}\) must satisfy \(\frac{\partial f_{U}(h)}{\partial h}=0\). Additionally, \(\frac{\partial f_{U}(h)}{\partial h}=0\) is equivalent to \(g_{U}(h)=0\), because it is readily verified that the first term in (31) always satisfies \(\frac{\left(r_{U}^{2}+h^{2}\right)^{-\frac{a_{2}}{2(\Psi_{U}(h)+1)}-\frac{b_{ 2}}{2}-1}}{\Omega_{U}(h)+1}>0,\ \forall h\in[H_{\min},H_{\max}]\). Moreover, the feasible set of the problem \(\mathbf{P}_{3^{\prime}}^{h}\) is given as a closed range of \(H_{\min}\leq h\leq H_{\max}\). As a result, the optimal solution to the problem \(\mathbf{P}_{3^{\prime}}^{h}\) must satisfy either  
\[(i)\ g_{U}(h^{\star})=0,\quad\text{or} \tag{33}\] \[(ii)\ h^{\star}=H_{\min},\quad\text{or}\] (34) \[(iii)\ h^{\star}=H_{\max}. \tag{35}\]From (_i_)-(_iii_) in (33)-(35), we adopt the golden-section (GS)-based line search method to determine the near-optimal solution of \(h^{*}\), which is known to have less computational complexity than the 1D exhaustive line search method. The detailed procedure of the proposed method to obtain a near-optimal solution for the problem \(\mathbf{P}_{3}^{h}\) with low complexity is described in Algorithm 2 in the next page. Our proposed method is verified in the numerical results, i.e., Section 5.  
```
1:Input: Parameters of the channel statistics \((a_{1},b_{1},a_{2},b_{2},a_{3},c_{3})\), the minimum and maximum altitude of \(H_{\text{min}}\) and \(H_{\text{max}}\), the error tolerance \(\epsilon_{\text{GS}}\), \(\delta=\frac{(\sqrt{5}-1)}{2}\), an EHD's horizontal distance and LoS component, i.e., \(r_{U}\) and \(\mathbf{a}_{U}\)
2:Set:\(h_{a}=H_{\text{min}}\) and \(h_{b}=H_{\text{max}}\), \(h_{s,a}=h_{a}+(1-\delta)(h_{b}-h_{a})\) and \(h_{s,b}=h_{b}-(1-\delta)(h_{b}-h_{a})\), the iteration number \(Iter=1\)
3:Obtain \(g_{s,a}=g_{U}(h_{s,a})\) and \(g_{s,b}=g_{U}(h_{s,b})\) from (32), respectively
4:while\(|h_{b}-h_{a}|<\epsilon_{\text{GS}}\)do
5:if\(g_{s,a}>g_{s,b}\)then
6:\(h_{b}\gets h_{s,b},\ \ h_{s,b}\gets h_{s,a},\ \ \ \text{and}\ \ \ \ g_{s,b}\gets g_{s,a}\)
7:\(h_{s,a}\gets h_{a}+(1-\delta)(h_{b}-h_{a})\)
8:\(g_{s,a}\gets g_{U}(h_{s,a})\) from (32)
9:else
10:\(h_{a}\gets h_{s,a},\ \ h_{s,a}\gets h_{s,b},\ \ \text{and}\ \ \ g_{s,a}\gets g_{s,b}\)
11:\(h_{s,a}\gets h_{b}-(1-\delta)(h_{b}-h_{a})\)
12:\(g_{s,b}\gets g_{U}(h_{s,b})\) from (32)
13:endif
14:\(Iter\gets Iter+1\)
15:endwhile
16:Total number of iterations:\(Iter_{tot}\gets Iter\)
17:Obtain \(h_{\text{Prop}}^{*}=(h_{a}+h_{b})/2\)
18:Output: The proposed near-optimal altitude of \(h_{\text{Prop}}^{*}\)
```  
**Algorithm 2** Proposed method to obtain a near-optimal solution for the problem \(\mathbf{P}_{3}^{h}\)