# Joint Resource Allocation and Learning Optimization for UAV-Assisted Federated Learning
## 1 Introduction
(1) For the UAV-assisted federated learning wireless network scenario, by considering the impact of the UAV's altitude on coverage area, we defined the system's cost function which is composed of the total energy consumption and the reciprocal of the participating user number, and formulated a cost function minimization-optimization problem within a given total FL completion time budget. By jointly optimizing the UAV's position (horizontal placement, altitude), computation frequency, communication power, communication bandwidth, communication time and local accuracy this can realize the balanced optimization between the user's total energy consumption and FL performance;  
(2) Because the formulated problem is not convex, we decomposed it into three optimization subproblems: UAV horizontal placement, local accuracy and user computation and communication resources. For subproblem 1 (UAV horizontal placement), firstly we introduced a relaxation variable, and then used the first order Taylor expansion to transform it into a convex problem. Finally, we used successive convex approximation (SCA) to obtain the optimal UAV placement;  
(3) For subproblem 2 (local accuracy), since it is a fractional form, first of all we converted the fractional form into the integral form, and then used the Dinkelbach method to obtain the optimal local accuracy; For subproblem 3 (computation and communication resources), this paper further decomposed it into two sub-problems, namely, transmission power, computation frequency, transmission time optimization subproblem 3-1 and transmission bandwidth optimization subproblem 3-2. For subproblem 3-1, it was deduced that the optimal solution of transmission time can be acquired by using the bisection method, furthermore, the optimal solution of transmission power and computation frequency is obtained. For subproblem 3-2, since this problem is convex, the optimal solution can be obtained by using the KKT condition. The rest of this paper is organized as follows: Section 2 shows the system model and problem formulation. Section 3 presents the joint optimization algorithm. Section 4 analyzes the simulation results and performance analysis. Conclusions are drawn in Section 5. For convenience, the key notations used in this paper are summarized in Table 1. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Symbol** & **Definitions** & **Symbol** & **Definitions** \\ \hline \(n\), \(m\) & index of the user, UAV & \(\kappa\) & effective switched capacitance \\ \hline \(N\) & total number of users & \(g_{n}\) & channel gain of user \(n\) \\ \hline \(\mathcal{N}\) & set of users & \(f_{n}\) & CPU frequency of user \(n\) \\ \hline \(\mathcal{N}_{m}\) & set of within the UAV \(m\) & \multirow{2}{*}{\(C_{n}\)} & number of CPU cycles for user \(n\) \\  & service range & & to computing one sample data \\ \hline \(N_{m}\) & user number within the UAV & \multirow{2}{*}{\(b_{n}\)} & transmission bandwidth of \\  & \(m\) service range & & user \(n\) \\ \hline \(\mathcal{D}_{n}\) & training dataset of user \(n\) & \multirow{2}{*}{\(p_{n}\)} & transmission power of \\  & & & user \(n\) \\ \hline \(D_{n}\) & training dataset size of & \multirow{2}{*}{\(\eta\)} & local accuracy \\  & user \(n\) & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Key Notations.