## 2 Problem Statement
### Problem Formulation  
In the scenario where the UAV offers caching and charging services to users, the service time \(T\) of the UAV is partitioned into two stages. The first stage provides cache-based communication services to users, while the second stage offers charging services. Due to variations in cache placement strategies, UAV locations, and channel conditions, each user experiences uneven throughput over time, leading to disparities in file transfer times and an increase in the proportion of communication service time within the total time duration. Therefore, by jointly optimizing UAV cache strategies, UAV location, transmission power, and user pairing to minimize user communication transmission time and provide longer charging service time for users, we can maximize the overall benefit of the UAV. This study optimized the performance from the perspective of UAVs, aiming to maximize their economic benefits while minimizing energy consumption. The economic benefits comprise two components: revenue and expenditure. Revenue includes communication service income paid by users to the UAV and charging service income generated from user payments. Expenditure refers to the file leasing costs paid by the UAV to content providers. Consequently, the UAV's utility function integrates its economic benefits from both revenue and expenditure perspectives with the cost associated with energy consumption. The UAV utility function consists of four components: the revenue generated by the UAV for delivering cached files to users, the revenue obtained from service charges, the rental fee paid by the UAV to content providers for cached files, and the UAV energy consumption while providing services to users. The utility function can be expressed as follows:  
\[U_{uav}=\sum\limits_{m=1}^{M}\sum\limits_{n=1}^{N_{m}}\sum\limits_{f\in \mathcal{F}}c_{x,f}q_{m,n,f}v_{cache}+\sum\limits_{m=1}^{M}\sum\limits_{n=1}^{ N_{m}}T(1-\mu)v_{char}-\sum\limits_{\kappa=1}^{2}U_{Cp_{x}}-E_{\text{uav}}v_{ uav} \tag{13}\]  
where \(q_{m,n,f}\) denotes the file request variable of user \(UE_{n,m}\). \(q_{m,n,f}=1\) represents that user \(UE_{n,m}\) has requested the file \(f\), while \(v_{cache}\) signifies the cost incurred by a user to obtain a single file from the UAV. \((1-\mu)T\) indicates the duration of charging service received by the user, and \(v_{char}\) represents the unit time charging cost paid by the user to the UAV. Additionally, \(E_{\text{uav}}\) denotes the UAV energy consumption and \(v_{uav}\) stands for the cost of UAV unit energy consumption. The aim of this study was to maximize the utility of UAVs by optimizing cache strategies, UAV location, transmission power, and user pairing. Thus, the optimization problem is formulated as:  
\[ \begin{split}&\text{P1}:\max\limits_{c_{x,f},\,p_{n,m},d_{uav}, \mathcal{R}}U_{uav}\\ & s.t.\,\,\text{C1}:c_{x,f}\in\{0,1\},\kappa=\{1,2\},f\in \mathcal{F}\\ &\text{C2}:\sum\limits_{\kappa=1}^{2}\sum\limits_{f\in\mathcal{F }}c_{x,f}Q\leq S\\ &\text{C3}:\sum\limits_{m=1}^{N_{m}}\sum\limits_{n=1}^{N_{m}}p_{ n,m}=P_{\text{max}}\end{split}  \tag{14}\]  
where variable \(d_{uav}\) denotes the location coordinates of the UAV, \(g=\{g_{1},g_{2},\dots,g_{M}\}\) denotes the pairing of NOMA user pairs, and \(p_{n,m}\) denotes the power assigned by the UAV to user \(n\) on channel \(m\). Constraint C1 denotes that the cache decision variables \(c_{x,f}\) to be optimized are 0-1 variables, constraint C2 denotes that the sum of the cached file sizes does not exceed the maximum cache capacity \(S\), and constraint C3 denotes that the sum of the power assigned to users on all channels is the maximum UAV transmission power \(P_{\text{max}}\). The above optimization problems involve the optimization of UAV cache placement strategy, UAV location deployment, NOMA user pairing, and user power allocation. Sincethe optimization problem P1 is a mixed-integer programming problem, it cannot be solved directly.