## 4 Simulation Results  
In this section, Matlab-based simulations are presented, and we evaluate the performance of the proposed joint optimization algorithm through numerical results. In our simulations, we randomly distribute ground users in a \(500\) m \(\times\)\(500\) m square area, and the number of users is \(N=9\). We set the number of UAVs as \(M=3\), and the initial locations of the UAVs are roughly uniformly distributed. Specifically, we decided the connection relationships first, in which each user is served by two UAVs. The initial locations of UAVs are set as the average location of served users. We also set the UAV altitude as \(H=100\) m, the antenna number as \(N_{T}=16\), and the popular content amount as \(K=12\). As for channels, we set the \(K_{R}=2\), \(\bar{h}_{ijn_{t}}=1\), and \(\bar{h}_{ijn_{t}}\) as a complex random number with an average modulus of \(1\) in Equation (5). Moreover, we define the ratio of total capacity of UAVs to the total size of popular content as the UAV capacity coefficient, denoted by \(r_{cc}\), which represents the capacity-to-content ratio. Specifically, we decide the capacity limit of UAVs as \(L_{\max}=\frac{r_{cc}\sum\limits_{i=1}^{M}\frac{K}{L_{i}}z_{ik}L_{k}}{M}\) in constraint (31b). To show the effectiveness of the DC-based optimization algorithm, we present two benchmark algorithms, denoted by Algorithms 2 and 3, respectively. Algorithm 2 optimizes the beamforming and caching strategy with the UAV locations fixed, while Algorithm 3 optimizes the beamforming and UAV locations with cache fixed. These two benchmark algorithms are both variants of the proposed DC-based algorithm, and they are supposed to help evaluate the impact of different optimization variables in this model. Furthermore, we change the parameters in simulations to observe the performance changes in the algorithms. The optimization problem of Algorithm 2 is shown in (32). \[\min_{\mathbf{w},\mathbf{R}} \sum_{k=1}^{K}\sum_{j=1}^{N}\frac{p_{k}q_{ij}z_{\text{ik}}^{*}L_{k} }{R_{ij}}, \tag{32a}\] \[\textbf{s.t.} \sum_{j=1}^{N}||\mathbf{w}_{ij}||^{2}\leq P,\forall i\in\mathcal{M},\] (32b) \[\tilde{R}_{ij}\leq \text{log}_{2}\left(1+\frac{|\left(\mathbf{h}_{ij}^{*}\right)^{H} \mathbf{w}_{ij}^{[\ell]}|^{2}}{\sum\limits_{n\
eq i}\sum\limits_{n\in A_{n},n \
eq j}|\left(\mathbf{h}_{mj}^{*}\right)^{H}\mathbf{w}_{mn}^{[\ell]}|^{2}+ \sigma^{2}}\right)+\xi_{ij}||\mathbf{w}^{[\ell]}||^{2}+\] (32c) \[\frac{2\text{Re}\left[\left(\mathbf{w}^{[\ell]}\right)^{H} \mathbf{H}_{ij}^{*}\mathbf{w}-\left(\mathbf{w}^{[\ell]}\right)^{H}\mathbf{H}_ {ij}^{*}\mathbf{w}^{[\ell]}\right]}{\left(\mathbf{w}^{[\ell]}\right)^{H} \mathbf{H}_{ij}^{*}\mathbf{w}^{[\ell]}+\sigma^{2}}-\frac{2\text{Re}\left[ \left(\mathbf{w}^{[\ell]}\right)^{H}\mathbf{H}_{ij}^{*}\mathbf{w}-\left( \mathbf{w}^{[\ell]}\right)^{H}\mathbf{H}_{ij}^{*}\mathbf{w}^{[\ell]}\right]}{ \left(\mathbf{w}^{[\ell]}\right)^{H}\mathbf{H}_{ij}^{*}\mathbf{w}^{[\ell]}+ \sigma^{2}}-\] \[2\xi_{ij}\text{Re}\left[\left(\mathbf{w}^{[\ell]}\right)^{H} \mathbf{w}-||\mathbf{w}^{[\ell]}||^{2}\right]-\xi_{ij}||\mathbf{w}||^{2}, \forall i\in\mathcal{M},\,\forall j\in\mathcal{N}.\]  
Algorithm 2 optimizes the beamforming and caching strategy iteratively, and the UAV locations are fixed as the average position of the connected users. In the case of Algorithm 2, the system is similar to a traditional cache network, with several small cellular base stations in it. To ensure the rigor of the conclusions, Algorithm 2 adopts the same DC-based method and reconstruction method as Algorithm 1, although the form is simplified because of the reduction in optimization variables. Algorithm 3 is a variant with cache fixed, which jointly optimizes UAV location and beamforming. For reasonableness, we consider the cache occupied by each content being proportional to its size in Algorithm 3, where the proportion of every content cached in each UAV is \(\frac{r_{G}}{M}\). Compared with Algorithm 1, Algorithm 3 eliminates the step of cache iterative optimization, and the other steps are almost the same.