# Joint Resource Allocation and Learning Optimization for UAV-Assisted Federated Learning
## 3 Joint Optimization Algorithm
### Subproblem 3: User Computation and Communication Resources
#### 3.3.2 Subproblem 3-1: \(\mathbf{b}\) Optimization Problem
However, our proposed algorithm will appropriately reduce the UAV altitude to reduce resource competition among users. Therefore, the total system cost and total energy consumption of [23] are higher than our proposed algorithm. Due to the influence of local accuracy and transmission time, the system cost and total energy consumption of algorithm FLA and FTT are also higher than our proposed algorithm. When the model size is 80 kbit, our proposed algorithm has the least number of participating users, so it only needs to compare the learning performance at 80 kbit. As shown in

Figure 5c, because there are more participating users in [23], so the convergence speed is faster than that of our proposed algorithm. However, within the total completion time 120, there is little difference in the final convergence accuracy of the two algorithms. Therefore, our proposed algorithm not only guarantees the training performance but also reduces the total energy consumption of users when the model size changes, and can adjust the number of participants in learning according to the model size. Figure 6 compares the effects of different total bandwidths on the system cost and user total energy consumption of our proposed algorithm. The total bandwidths are set at 1.5 MHz, 1 MHz and 0.5 MHz, respectively. From Figure 6, with the increase in total bandwidth, the total system cost and the total energy consumption of users are decreased. This is because when the total bandwidth increases, users can have more wireless resources, reducing the wireless resources' competition among users, the total energy consumption of users will be decreased, which further leads to more users joining the learning process and so the system cost will also be decreased. Figure 4: Global Model Accuracy Influence on Performance: (**a**) total system cost; (**b**) total energy consumption of users; (**c**) learning performance. Figure 5: Model Size Influence on Performance: (**a**) total system cost; (**b**) total energy consumption of users; (**c**) learning performance. Figure 6: Total bandwidth Influence on Total System Cost and Total Energy Consumption: (**a**) total system cost; (**b**) total energy consumption of users. ## 5 Conclusions

In this paper, we investigate the FL application scenario of UAV communication network. By taking the total energy consumption and the reciprocal of the participating user numbers as the optimization objective, we propose a resource allocation scheme to jointly optimize the UAV position (horizontal placement, altitude), local accuracy and user computation and communication resource (computation frequency, communication power, communication bandwidth, communication time). Because the formulated problem is difficult to solve directly, we cleverly decompose it into three sub-problems: UAV horizontal placement, local accuracy and user computation and communication resources, and use the corresponding algorithm to solve them. Moreover, we also infer the condition for optimal transmission time, and through the iteration between algorithms to obtain the final converged solution. Through simulation verification, our proposed algorithm is compared with the fixed altitude UAV-assisted FL ratio, ensuring the learning performance and reducing the total energy consumption of users. Moreover, because the baseline algorithm FLA does not optimize local accuracy and the baseline algorithm FTT does not optimize transmission time, so the total system cost and total energy consumption of them are also higher than the proposed algorithm. Of course, there are some improvements in this article, the UAV altitude in our paper is obtained through traversal and so perhaps there is a better way to optimize the UAV altitude. Moreover, in the future, this scenario may be extended to the scenario of multi-UAV-assisted FL. Conceptualization: C.L. and Q.Z. ; methodology: C.L. ; software: C.L. ; validation: C.L. and Q.Z. ; formal analysis: C.L. ; investigation: C.L. ; resources: Q.Z. ; data curation: C.L. ; writing: C.L. ; visualization: C.L.