## 4 Joint Optimization of Altitude and Energy Beamforming for Multiple EHDs
### Optimal Design with Efficient Algorithm
\[\
u_{P}\mathbf{I}-\sum_{u=1}^{U}v_{u}\mathbf{G}_{u}(h)\succeq \mathbf{0},\] \[\text{Tr}\left(\mathbf{G}_{u}(h)\mathbf{X}\right)\geq\frac{Q_{u} ^{\text{Req}}}{t},\ \forall u\in\mathcal{U}, \tag{36}\]0  
The dual problem \(\mathbf{D}.P_{2}^{\mathbf{X}}\) can also be solved using well-known SDP solvers. By denoting \(\{v_{u}^{\star}\}_{u=1}^{U}\) and \(v_{p}^{\star}\) as the optimal dual variables attained from the dual problem \(\mathbf{D}.P_{2}^{\mathbf{X}}\), the optimal solution \(t^{\star}\) of the primal problem \(P_{2}^{\mathbf{X}}\) becomes  
\[\text{Tr}\left(\mathbf{G}_{u}(h)\mathbf{X}\right)\geq\frac{Q_{u} ^{\text{Req}}}{t},\ \forall u\in\mathcal{U}, \tag{36}\]1  
Here, we note that the computational complexity to solve the dual problem \(\mathbf{D}.P_{2}^{\mathbf{X}}\) approximates to  
\[\text{Tr}\left(\mathbf{G}_{u}(h)\mathbf{X}\right)\geq\frac{Q_{u} ^{\text{Req}}}{t},\ \forall u\in\mathcal{U}, \tag{36}\]2To compare (38) and (43) in terms of their computational complexity, we define the ratio between them as  
\[\text{Tr}\left(\mathbf{G}_{u}(h)\mathbf{X}\right)\geq\frac{Q_{u} ^{\text{Req}}}{t},\ \forall u\in\mathcal{U}, \tag{36}\]3 \[\text{Tr}\left(\mathbf{G}_{u}(h)\mathbf{X}\right)\geq\frac{Q_{u} ^{\text{Req}}}{t},\ \forall u\in\mathcal{U}, \tag{36}\]4  
Substituting \(U=N(N-1)\) into (44) with some manipulations, we obtain  
\[\text{Tr}\left(\mathbf{G}_{u}(h)\mathbf{X}\right)\geq\frac{Q_{u} ^{\text{Req}}}{t},\ \forall u\in\mathcal{U}, \tag{36}\]5 \[\text{Tr}\left(\mathbf{G}_{u}(h)\mathbf{X}\right)\geq\frac{Q_{u} ^{\text{Req}}}{t},\ \forall u\in\mathcal{U}, \tag{36}\]6 \[\text{Tr}\left(\mathbf{G}_{u}(h)\mathbf{X}\right)\geq\frac{Q_{u} ^{\text{Req}}}{t},\ \forall u\in\mathcal{U}, \tag{36}\]7 \[\text{Tr}\left(\mathbf{G}_{u}(h)\mathbf{X}\right)\geq\frac{Q_{u} ^{\text{Req}}}{t},\ \forall u\in\mathcal{U}, \tag{36}\]8  
From (44) and (45), it is verified that the computational complexity to solve the dual problem \(\mathbf{D}.\mathbf{P}_{2}^{\mathbf{X}}\) becomes much lower than that of the primal problem \(\mathbf{P}_{2}^{\mathbf{X}}\) when \(U\leq N(N-1)\), where the number of EHDs, i.e., \(U\), is much smaller than \(N(N-1)\) when considering a practical scenario for UAV-enabled WET [15; 16; 17; 18; 19; 20; 21; 22; 23; 24]. Moreover, the gap in performance increases as \(U\) decreases from \(N(N-1)\). For example, when \(U=N\), we obtain \(r_{\mathcal{O}}|_{U=N}<\frac{2}{N^{2}}\) from (44). Hence, the optimal altitude \(h^{\star}\) is determined using the proposed method, in which the dual problem \(\mathbf{D}.\mathbf{P}_{2}^{\mathbf{X}}\) is solved based on applying the 1D exhaustive line search method within the range of \(h\in[H_{\text{min}},H_{\text{max}}]\). On the other hand, when we solve the dual problem \(\mathbf{D}.\mathbf{P}_{2}^{\mathbf{X}}\) with a fixed \(h\), rather than the primal problem \(\mathbf{P}_{2}^{\mathbf{X}}\), we cannot obtain an exact solution for \(\mathbf{X}^{\star}\) and only the optimal condition for \(\mathbf{X}^{\star}\)[3], i.e., \(\text{Tr}\left[\left(v_{\text{P}}^{\star}\mathbf{I}-\sum_{u=1}^{U}v_{u}^{ \star}\mathbf{G}_{u}(h)\right)\mathbf{X}\right]=0\), which is further equivalent to \(\left(v_{\text{P}}^{\star}\mathbf{I}-\sum_{u=1}^{U}v_{u}^{\star}\mathbf{G}_{ u}(h)\right)\mathbf{X}=\mathbf{0}\). Although this optimal condition provides the structure for an optimal covariance matrix \(\mathbf{X}^{\star}\) with its rank profile, obtaining a closed-form solution for \(\mathbf{X}^{\star}\) is generally not available and known to be NP-hard [3; 38]. Therefore, as we determine the optimal value of \(h^{\star}\) from the dual problem \(\mathbf{D}.\mathbf{P}_{2}^{\mathbf{X}}\), the optimal covariance matrix \(\mathbf{X}^{\star}\) is then obtained by solving the primal problem \(\mathbf{P}_{2}^{\mathbf{X}}\) using the given optimal \(h^{\star}\) value. The detailed procedure of the proposed method to obtain the optimal altitude \(\mathbf{h}^{\star}\) and optimal energy beamforming \(\mathbf{X}^{\star}\) is described in Algorithm 3.