## 4 Joint Optimization of Altitude and Energy Beamforming for Multiple EHDs
### Optimal Design with Efficient Algorithm  
As mentioned in Section 2, it is generally very difficult to determine the joint optimal solution by directly solving the original problem \(\mathbf{P}_{2}\). However, the problem \(\mathbf{P}_{2}\) with a given \(h\in[H_{\text{min}},H_{\text{max}}]\) is a convex optimization problem, so an optimal covariance matrix of \(\mathbf{X}\) can be obtained by solving the following problem:  
\[\mathbf{P}_{2}^{\mathbf{X}}: \min_{\mathbf{X}_{t}}t\] s.t. \[\text{Tr}\left(\mathbf{G}_{u}(h)\mathbf{X}\right)\geq\frac{Q_{u} ^{\text{Req}}}{t},\ \forall u\in\mathcal{U}, \tag{36}\] \[\text{Tr}(\mathbf{X})\leq P,\] (37) \[\mathbf{X}\succeq\mathbf{0}.\]  
The problem \(\mathbf{P}_{2}^{\mathbf{X}}\) is a semidefinite programming (SDP) problem and can therefore be solved using well-known SDP solvers such as CVX [3; 36; 37]. Therefore, in order to obtain the optimal energy beamforming of \(\mathbf{X}^{*}\) as well as the optimal UAV altitude \(h^{*}\) of the problem \(P_{2}\), we can adopt a 1D exhaustive line search method for \(h\in[H_{\min},H_{\max}]\) and iteratively solve the problem \(P_{2}^{\mathbf{X}}\) using a fixed \(h\). On the other hand, the SDP problem is commonly solved based on the interior-point method, so the computational complexity mainly depends on the number and size of variables as well as the number of constraints [36; 37]. By defining the prescribed accuracy of an SDP solver as \(\epsilon_{\text{SDP}}>0\), the computational complexity to solve \(P_{2}^{\mathbf{X}}\) becomes [37]  
\[\mathcal{O}\Big{(}\ln(1/\epsilon_{\text{SDP}})\sqrt{N+U+1}N^{2}\big{(}N^{4}+N^ {2}U+U\big{)}\Big{)}. \tag{38}\]  
In obtaining \(\mathbf{X}^{\star}\) for a given \(h\), the computational complexity increases exponentially, following an order of approximately \(6\frac{1}{2}\) as the number of antennas \(N\) increases, which results in a burden on the UAV. To overcome this challenge, we devised a low-complexity method to obtain \(\mathbf{X}^{\star}\) by solving the dual problem instead of the primal problem \(P_{2}^{\mathbf{X}}\), as follows. \(P_{2}^{\mathbf{X}}\) is a convex optimization problem that satisfies [PERSON]'s condition [3; 36]. Hence, we consider the Lagrangian function of \(P_{2}^{\mathbf{X}}\). By denoting \(v_{u}\geq 0\) (\(\forall u\in\mathcal{U}\)) and \(v_{P}\geq 0\) as the dual variables associated with the constraints of (36) and (37), respectively, the Lagrangian function is then obtained as [3]  
\[L\big{(}\{v_{u}\}_{u=1}^{U},v_{P}\big{)} =\inf_{\mathbf{X}\succeq\mathbf{0}t}\bigg{[}t+\sum_{u=1}^{U}v_{u} \Big{(}\frac{Q_{u}^{\text{Req}}}{t}-\text{Tr}\,\big{(}\mathbf{G}_{u}(h) \mathbf{X}\big{)}\Big{)}+v_{P}\big{(}\text{Tr}(\mathbf{X})-P\big{)}\bigg{]}\] \[=\inf_{\mathbf{X}\succeq\mathbf{0}}\,\text{Tr}\,\Big{[}\Big{(}v_ {P}\mathbf{I}-\sum_{u=1}^{U}v_{u}\mathbf{G}_{u}(h)\Big{)}\mathbf{X}\Big{]}+ \inf_{t}\!\Big{(}t+\frac{\sum_{u=1}^{U}v_{u}Q_{u}^{\text{Req}}}{t}\Big{)}-v_{P}P \tag{39}\] \[=2\sqrt{\sum_{u=1}^{U}v_{u}Q_{u}^{\text{Req}}}-v_{P}P \tag{40}\]  
where (40) follows from the fact that \(\text{Tr}\,\Big{[}\Big{(}v_{P}\mathbf{I}-\sum_{u=1}^{U}v_{u}\mathbf{G}_{u}(h) \Big{)}\mathbf{X}\Big{]}=0\) as well as \(v_{P}\mathbf{I}-\sum_{u=1}^{U}v_{u}\mathbf{G}_{u}(h)\succeq\mathbf{0}\) must be satisfied in (39) to ensure that \(\mathbf{X}\succeq\mathbf{0}\) is bounded below, and \(\partial L\big{(}\{v_{u}\}_{u=1}^{U},v_{P}\big{)}/\partial t=0\) gives \(t=\sqrt{\sum_{u=1}^{U}v_{u}Q_{u}^{\text{Req}}}\) in (39). We omit the details, since the derivations are well described in [3]. Consequently, the dual problem associated with \(P_{2}^{\mathbf{X}}\) is formulated as  
\[\mathbf{D}.P_{2}^{\mathbf{X}}: \underset{\{v_{u}\}_{u=1}^{U},\,v_{P}}{\text{maximize}}\,2\sqrt{ \sum_{u=1}^{U}v_{u}Q_{u}^{\text{Req}}}-v_{P}P\] s.t.