## 4 Joint Optimization of Altitude and Energy Beamforming for Multiple EHDs
### Sub-Optimal Design with Weighted-Sum Energy Beamforming in a Closed-Form Solution  
In this subsection, motivated by the insights from Lemma 1, we further devise a solution for weighted-sum energy beamforming, which is obtained in closed form, thereby avoiding the computational complexity introduced by the SDP solver in Algorithm 4.  
Since an optimal energy beam for a single EHD to minimize its required charging time is given in (46) from Lemma 1, we consider energy beamforming that consists of the weighted-sum of the optimal beam for each EHD, which has the structure \(\mathbf{X}^{\text{WS}}=\sum_{u=1}^{U}w_{u}\mathbf{\tilde{a}}_{u}\mathbf{\tilde{a}}_{u}^{H}\), where \(w_{u}\geq 0\) (\(u\in U\)) denotes the energy weight for the \(u\)-th EHD. In this case, it is desirable to guarantee a certain fairness between all EHDs to reduce the overall charging time. Hence, we assign a higher energy weight to the EHDs for which longer charging times are anticipated such that all charging times are the same, i.e., \(\tau_{1}=\cdots=\tau_{U}\). For a fixed \(h\in[H_{\text{min}},H_{\text{max}}]\), ignoring the energy amount harvested from other beams, the expected required charging time of the \(u\)-th EHD obtained from \(\mathbf{X}^{\text{WS}}\)becomes \(\tau_{u}=\dfrac{Q_{u}^{\text{Req}}}{w_{u}\operatorname{Tr}\left(\mathbf{G}_{u}(h) \mathbf{\tilde{a}}_{u}\mathbf{\tilde{a}}_{u}^{H}\right)}=\dfrac{Q_{u}^{\text{ Req}}}{w_{u}\beta_{0}f_{u}(h)}\). Accordingly, by omitting the common constant term \(\beta_{0}\), we set the energy weight for the \(u\)-th EHD as  
\[w_{u}=\dfrac{Q_{u}^{\text{Req}}}{f_{u}(h)},\ \forall u\in\mathcal{U}. \tag{52}\]  
As a result, for a given UAV altitude \(h\), our proposed expression for weighted-sum energy beamforming that satisfies a transmit sum power constraint, i.e., \(\operatorname{Tr}(\mathbf{X}_{\text{Prop}}^{\text{WS}})=P\), is  
\[\mathbf{X}_{\text{Prop}}^{\text{WS},\star}=\dfrac{P\sum_{u=1}^{U}w_{u}\mathbf{ \tilde{a}}_{u}\mathbf{\tilde{a}}_{u}^{H}}{\operatorname{Tr}\left(\sum_{u=1}^{ U}w_{u}\mathbf{\tilde{a}}_{u}\mathbf{\tilde{a}}_{u}^{H}\right)} \tag{53}\]  
where \(\mathbf{X}_{\text{Prop}}^{\text{WS}}\succeq\mathbf{0}\) is always ensured considering that \(w_{u}>0\). In addition, we determine the optimal UAV altitude for weighted-sum energy beamforming using the golden-section (GS) line search method together with search space reduction, similarly as for Algorithm 4 in Section 4.2. The detailed procedure is described in Algorithm 5.  
```
1: Lines 1-8 in Algorithm 4
2:Obtain: \(t_{s,a}=\max\left(\left[\tau_{u}(h_{s,a},\mathbf{X}_{\text{Prop}}^{\text{WS}}) \right]_{u=1}^{U}\right)\) and \(t_{s,b}=\max\left(\left[\tau_{u}(h_{s,b},\mathbf{X}_{\text{Prop}}^{\text{WS}}) \right]_{u=1}^{U}\right)\), respectively, from (52) and (53)
3:while\(|h_{b}-h_{a}|<\epsilon_{\text{GS}}\)do
4:if\(t_{s,a}<t_{s,b}\), then
5: Same as Lines 12-13 in Algorithm 4
6:\(t_{s,a}\leftarrow\max\left(\left[\tau_{u}(h_{s,a},\mathbf{X}_{\text{Prop}}^{ \text{WS}})\right]_{u=1}^{U}\right)\) from (52) and (53)
7:else
8: Same as Lines 16-17 in Algorithm 4
9:\(t_{s,b}\leftarrow\max\left(\left[\tau_{u}(h_{s,b},\mathbf{X}_{\text{Prop}}^{ \text{WS}})\right]_{u=1}^{U}\right)\) from (52) and (53)
10:endif
11:\(Iter\gets Iter+1\)
12:endwhile
13:Total number of iterations: \(Iter_{tot}\gets Iter\)
14:Obtain \(h_{\text{Prop}}^{\text{WS},\star}=(h_{a}+h_{b})/2\), and then \(\mathbf{X}_{\text{Prop}}^{\text{WS},\star}\) from (52) and (53)
15:Output: The proposed altitude \(h_{\text{Prop}}^{\text{WS},\star}\) and weighted-sum energy beamforming \(\mathbf{X}_{\text{Prop}}^{\text{WS},\star}\)
```  
**Algorithm 5** Algorithm for finding a suboptimal solution