Optimization of Energy Efficiency for Federated Learning over Unmanned Aerial Vehicle Communication Networks

: Federated learning (FL) is considered a promising machine learning technique that has attracted increasing attention in recent years. Instead of centralizing data in one location for training a global model, FL allows the model training to occur on user devices, such as smartphones, IoT devices, or local servers, thereby respecting data privacy and security. However, implementing FL in wireless communication faces a significant challenge due to the inherent unpredictability and constant fluctuations in channel characteristics. A key challenge in implementing FL over wireless communication lies in optimizing energy efficiency. This holds significant importance, especially considering user devices with restricted power resources. On the other hand, unmanned aerial vehicle (UAV) technologies present a cost-effective solution owing to flexibility and mobility compared to terrestrial base stations. Consequently, the deployment of UAV communication in FL is viewed as a potential approach to deal with the energy efficiency challenge. In this paper, we address the problem of minimizing the total energy consumption of all user equipment (UE) during the training phase of FL over a UAV communication network. Our proposed system facilitates UE to operate concurrently at the same time and frequency, thereby improving bandwidth utilization efficiently. In this paper, we address the problem of minimizing the total energy consumption during the training phase of FL over a UAV communication network. To deal with the proposed nonconvex problem, we propose a novel alternating optimization approach by dividing the problem into two suboptimal problems. We then develop iterative algorithms based on the inner approximation method, yielding at least one locally optimal solution. The numerical results demonstrate the superiority of the proposed algorithm in solving the proposed problem compared to other benchmark algorithms, particularly in determining the optimal trajectory of the UAVs. In addition, we conduct extensive experiments to evaluate how different parameter settings affect performance after implementing the proposed optimization approaches for deploying FL within the UAV communication system. These analyses yield valuable insights into the comparative effectiveness of the proposed optimization algorithms concerning overall energy consumption reduction.


Introduction
With the rapid expansion of Internet of Things (IoT) applications and the increased computational and storage capabilities of smart devices such as mobile devices, wearables, and self-driving vehicles, a substantial volume of data is generated daily within modern distributed networks [1].Consequently, data-driven machine learning techniques have garnered substantial attention in recent years.They contribute to the modernization of human life across diverse applications such as smart cities, smart healthcare, and autonomous cars [2,3].The explosive growth in IoT data, estimated at 850 ZB generated by smart devices in 2021 alone, poses a challenge to traditional artificial intelligence (AI)-based learning algorithm deployments [4].Conventional methods predominantly rely on centralized cloud servers for data storage and training, assuming seamless accessibility of all data at a central location.However, these methods struggle with the huge volume of data.The transfer of extensive data to remote servers leads to bottlenecks, excessive costs, and latency issues, rendering them unsuitable for real-time applications [5].Furthermore, the transfer of data from UE to third-party cloud locations raises significant privacy concerns.This is because sensitive data from UE in the training dataset are vulnerable to theft for malicious purposes [3,6].To address these challenges, federated learning (FL) has been introduced, wherein a learning model is trained across remote devices under the supervision of a centralized location known as the server [2,7].
In FL, the server disseminates the global model parameters to remote devices.Each remote device utilizes its local dataset to update the global model and subsequently transmits the updated local model back to the server.After aggregating the local models, the server updates the global model.This iterative process continues until a predefined level of learning accuracy is achieved.Notably, the size of the model updates transmitted over the network is significantly smaller compared to the raw data, resulting in a substantial improvement in communication efficiency.While wired networks offer a stable and reliable connection, wireless communication unlocks unique advantages that make FL more efficient and scalable in the context of IoT.Wireless networks boast superior flexibility and scalability, seamlessly integrating new devices within their coverage area.This is crucial for FL due to the participation of a large and diverse set of devices in the training process [8].Furthermore, wireless networks provide connectivity in remote locations or for mobile devices, enriching the training dataset with a wider range of data and potentially leading to more generalizable models [9].Additionally, wireless communication protocols can be optimized for low power consumption, critical for battery-powered IoT devices, minimizing the burden on device batteries [10].Hence, FL presents a compelling approach for training machine learning models on the data generated by a multitude of IoT devices, particularly when implemented over wireless communication networks.
While FL technology fulfills the requirement of privacy protection in IoT, the communication over wireless networks still faces several significant challenges, including latency, reliability, scalability, and particularly energy efficiency issues at edge UE.Latency in FL encompasses delays in local iterations of edge devices, uplink communication, aggregation, and downlink transmission [11].The unreliability of FL arises from the unpredictable nature of wireless channels, while limited resources can also impact the performance and success rate of FL iterations [12].The scalability of FL refers to its ability to handle increasing amounts of data and user devices participating without significant performance degradation or resource limitations.However, the traditional interference avoidance channel access schemes become impractical due to the large number of devices, resulting in excessive delays [13].Moreover, FL necessitates periodic exchange of large user model parameters, posing significant communication challenges for real-world implementation, particularly for bandwidth-limited UEs [14].For instance, transmitting the VGGNet architecture, with approximately 138 million parameters (4264 Mb) [15], during each FL iteration over a long-term evolution (LTE) network could take around a minute under ideal conditions, given the maximum LTE uplink rate of 75 Mb/s.Eventually, one of the key challenges of implementing FL over wireless networks is the limitation of energy in UE, which is typically mobile and IoT devices with constrained batteries [14].Hence, efficient energy management for UE in local computation and model transmission becomes increasingly crucial for deploying FL over wireless networks.
Next-generation wireless networks, such as 6G, are expected to address these challenges by supporting data-intensive tasks, including high-speed internet and streaming of high-definition videos [16].However, the limited availability of radio spectrum for wireless communication is a significant concern in the development of 6G systems.To address this issue, 6G systems are expected to leverage additional options.For example, non-orthogonal multiple access (NOMA) can be applied either in the power domain [17,18] or code domain [19] to overcome this limitation.Furthermore, in the space domain, techniques such as massive multiple-input multiple-output (MIMO) [20], intelligent reflecting surfaces (IRS) [21], and especially UAVs [22] may be integrated.
UAVs, commonly known as drones, play a crucial role in wireless communication [23].In the envisioned landscape of 6G space-air-ground-sea integrated networks, UAVs have the potential to significantly expand the technical frontiers of mobile wireless communications [24,25].Their importance lies in the facilitation of rapid and efficient deployment of communication equipment, particularly in emergency situations or areas with limited infrastructure.Equipped with diverse communication technologies, UAVs contribute to a spectrum of applications, spanning from internet access to surveillance [26].The adaptability of UAVs, characterized by dynamic coverage, scalability, and autonomous capabilities, renders them highly effective in meeting the evolving demands of wireless communication [27].Furthermore, UAVs serve as temporary communication infrastructure in regions where traditional methods encounter challenges.

Related Work and Motivation
The implementation of FL over wireless networks presents distinct challenges.On one hand, most of the mobile user devices rely on lithium batteries with constrained energy storage.To ensure the convergence of the global model, it is necessary for devices to frequently conduct local model training and update model parameters over wireless links, leading to substantial energy consumption for UE.Hence, optimizing the energy efficiency in FL over wireless networks becomes an urgent and critical concern for practical FL implementation on IoT user devices.This issue has attracted significant attention in recent studies [28][29][30][31][32].
In [28], a multiple IRS-assisted multi-user communication system was considered.An algorithm based on federated deep learning was devised to determine the optimal reflection configurations of all IRSs in parallel, thereby minimizing the total energy consumption during the training process.An edge intelligence-aided IoT network with FL integration was proposed in [29].The authors focused on efficiently integrating joint edge intelligence nodes.This involved investigating energy-efficient bandwidth allocation and optimizing CPU frequency, transmission power, and learning accuracy levels to minimize energy consumption and meet FL time requirements for all IoT devices.In [30], traditional IoT networks were extended to advanced cell-free massive MIMO (CFMM) IoT networks supporting FL.The limited power resources of IoT devices posed a critical factor that affects the FL performance.The authors proposed an energy efficient FL scheme in a CFMM IoT network by formulating an optimization problem to minimize the total energy consumption of IoT devices.
Recognizing the flexibility and mobility advantages of UAVs over terrestrial base stations, the authors in [31] introduced an air-ground integrated FL system using UAVs.The authors addressed a scenario where eavesdroppers could access raw data based on shared parameters.They proposed a distributed proximal policy optimization-based approach to optimize the trajectory, artificial noise transmitting power of the UAVs, CPU frequency, and particularly bandwidth allocation for UE operating in orthogonal frequency division multiple access (OFDMA) mode.This aimed to strike a balance between security and training cost.However, the computational burden of the proposed approach posed a significant challenge for practical implementation.In contrast to [31], ref. [32] enabled UE to operate in time-division multiple access (TDMA) during FL over UAV communication systems.By jointly optimizing UAV location and resource allocation, the authors addressed the minimization of terrestrial UE energy consumption.However, there was an omission of factors, including uplink transmission power at UE and learning accuracy levels, which are crucial in determining the trade-off between communication and computation energy consumption.Moreover, each piece of UE in [32] is allocated specific time slots to transmit its updates to the central server in a wireless FL setup using TDMA.Coordinating these time slots across numerous devices distributed over a wireless network can be complex and prone to latency and synchronization issues.Therefore, these challenges motivated our exploration of a new concept: designing a UAV communication network with FL support, wherein UE operates at the same time and frequency.This approach allows us to utilize the full potential of limited bandwidth efficiently.Additionally, by allowing adjustments to the transmit power level at the UE and the accuracy of the learning process, the proposed system achieves significant energy efficiency compared to other benchmark approaches.

Contribution and Outline
This study addresses the challenging task of optimizing energy efficiency during the FL training process within a proposed UAV communication network.The complexity of this challenge necessitates a joint optimization approach for computation and communication energy consumption across all UE in the system.Therefore, efficient resource allocation, with a particular emphasis on determining the UAV trajectory, becomes important in optimizing energy consumption.The resulting problem, minimizing total energy consumption, inherently poses a nonconvex programming challenge, presenting inherent difficulties in direct resolution.To overcome this challenge and achieve at least a locally optimal solution, we introduce novel approaches founded on successive convex approximation techniques, employing the inner approximation (IA) method.The noteworthy contributions of this study can be summarized as follows: • First, we present the computing model for the FL training process within the proposed UAV communication system, wherein all UE operates at the same time and frequency.

•
To devise an energy-efficient FL scheme tailored to the proposed system, we formulate an optimization problem aimed at minimizing the total energy consumption of all UE during the FL training process.This problem encompasses the challenges of computation and communication energy consumption, corresponding to the local model training and uplink data transmission in FL.By solving this optimization problem, we achieve efficient resource allocation for the proposed system, especially in obtaining the optimal UAV trajectory.

•
The proposed optimization problem is intractable due to its nonconvex nature.Therefore, we propose a novel alternating optimization algorithm by decomposing the original problem into three suboptimal, more tractable, nonconvex problems.Subsequently, an IA scheme is proposed to transform these problems into successive convex sub-programs.By alternately optimizing the resulting convex sub-programs, we attain at least a local optimization point for resource allocation.

•
Simulation results are presented to demonstrate the efficiency of our proposed algorithm in solving the given problem and determining the optimal UAV position.These numerical outcomes show that the proposed algorithm significantly reduces the total energy consumption of all UE during the FL training process compared to benchmark approaches.

•
Numerical outcomes show that the proposed algorithm significantly reduces the total energy consumption of all UE during the FL training process compared to benchmark approaches.In addition, the proposed alternating optimization approach demonstrates potential in dealing with the scalability challenge posed inherent in FL over UAV communication systems.• Finally, we conduct a detailed complexity analysis of the proposed algorithm, establishing its feasibility and acceptable complexity cost.
The remainder of this paper is organized as follows.Section 2 describes the FL training process within the proposed UAV communication system, followed by the formulation of the energy consumption minimization problem during the training phase.Section 3 introduces the proposed alternating algorithm and provides the detailed computational complexity analysis.Section 4 presents and discusses the numerical results, while Section 5 draws the conclusions.

System Model and Problem Formulation
As illustrated in Figure 1, we consider a UAV communication system composed of a single-antenna UAV serving K pieces of single-antenna UE.It is assumed that the UAV hovers within a confined area of dimensions L × L and that all UE is uniformly distributed within this region and falls under the coverage of the UAV.For simplicity, we denote the set of UE as K ≜ {1, 2, . . ., K} with UE k , k ∈ K representing the k-th user.

Signal and Channel Models
Considering the data transmission process from all UE to the UAV, the uplink transmit signal at UE k is expressed as where s k , with E ∥s k ∥ 2 = 1, represents the desired data symbol, and p max corresponds to the maximum transmit power budget at UE k .The power control coefficient of UE k is denoted as w k , with values in the range from 0 to 1.In the uplink, all K pieces of UE simultaneously transmit their data to the UAV.As a result, the received signal at the UAV through K pieces of UE is expressed as where H k denotes the channel between the UAV and UE k , and n denotes the additive noise at the CPU, which is a complex Gaussian random variable with zero mean and variance σ 2 , i.e., n ∼ CN (0, σ 2 ).Consequently, the uplink rate of UE k (bps) is given as where B represents the uplink bandwidth in this system.Due to the flexible movement and vertical height of the UAV, we assume that the channel between the UAV and all UEs is unobstructed by any obstacles blocking the signal, such as buildings or trees.Consequently, we assume that the channel between the UAV and all UEs is dominated by line-of-sight (LoS) links.Given the single antenna equipped at the UAV, the channel H k between the UAV and UE k is modeled as [33], where C 0 denotes the path loss at the reference distance D 0 = 1 m.Additionally, d k and α correspond to the distance and the path loss exponent between the UAV and UE k , with α set to 2 in this paper.We assume the coordinates of the UAV as u = (x u , y u , z u ), where the altitude of the UAV is constrained within the range h min ≤ z u ≤ h max .Furthermore, the coordinates of UE k are denoted as a k = (x k , y k , z k ), where z k = 0, ∀k ∈ K since the UE is located on the ground.Based on the coordinates of the UAV and UE, the distance d k is calculated as

FL Model
In this subsection, we integrate the FL model into the network.Initially, we designate the model derived from the UE computation of their sample data as the local model, and the model obtained through the UAV is referred to as the global model.Following convention, we employ a vector q to represent the relevant parameters of the global model, and the loss function is defined as f(q, x k,i , y k,i ), where the pair (x k,i , y k,i ) represents a sample data point of UE k from the local dataset D k .Notably, the loss function originates from a single sample of data from UE k .Therefore, the overall loss function F k (q) over a local dataset D k with a size of D k at UE k can be expressed as To consolidate a global FL model for all UEs that do not exchange datasets, FL leverages sample data to train the underlying model.The objective of the FL learning model is to determine the optimal parameters q that minimize the global loss function as min F(q To solve the optimization problem in (6), the iterative FL procedure is conducted through three steps such as local computation, communication, and global computation.At the j-th global iteration, the FL process is executed as follows: Step 1, Local computation: Every UE retrieves the initial global model from the UAV before locally computing the sample dataset.At the j-th global iteration, UAV broadcasts both the global model q (j) and the global gradient ∇F(q (j) ).Meanwhile, UE k calculates its local gradient ∇F k (q (j) ) using its local dataset with the received q (j) and then send it to the UAV.On the local side, UE k addresses the following minimization problem: min where µ functions as a tunable parameter, and d k measures the dissimilarity between the local model at UE k and the global model.The computational challenge resides in minimizing the local loss function c k q (j) , d k .Nevertheless, it is viable to obtain a precise approximate solution.As outlined in [29], the optimal feasible solution must adhere to the following criterion: where d represents the optimal solution to the problem (7).According to the condition (8), the disparity between the parameters of the optimal solution and the j-th local model must not exceed the local accuracy η, relative to the difference between the parameters of the optimal solution and the original local model.
Step 2, Communication: After completing the local computation process, all UEs employ the wireless environment to transmit their updated local model including the obtained optimal solution d (i) k and the local gradient ∇F k (q (j) ) to the UAV.
Step 3, Global computation: Subsequently, the UAV aggregates these individual models to generate a new global model q (j+1) with new global gradient ∇F(q (j+1) ) aiming to broadcast to UEs, which is calculated as follows: ∇F(q According to [29], the FL process is iterative until the given global accuracy ϵ 0 is satisfied, i.e., which ensures that the relative difference between the parameters of the optimal solution and those of the j-th global model, divided by the difference between the parameters of the optimal solution and the parameters of the original global model, cannot exceed the global accuracy ϵ 0 .
In this study, the global accuracy ϵ 0 remains a fixed constant value.Moreover, the relationship between the number of global iteration rounds and accuracy must comply with the following constraints, as outlined in existing studies [34]: where l, γ, and ξ take constant values.By using the normalization method [29], the number of global iteration rounds N(η) is normalized to 1  1−η in this paper.

Energy Consumption Model
This subsection delves into the energy consumption model, focusing on the computation and uplink communication time in each global iteration.Given the larger downlink bandwidth and significantly higher power of the UAV compared to the UE transmit power, we can neglect the downlink time in contrast to the uplink time.Examining the FL training process in the UAV communication system allows us to express the total latency in each global iteration as where T cmp represents the time needed for all UE to compute the local model in an iteration, while T com denotes the time required for all UE to upload model parameters in an iteration.The term v log(1/η) signifies the number of rounds for local computation, with v being a positive constant dependent on the local data size.Our objective is to minimize overall UE energy consumption, which comprises two categories: computation consumption and communication consumption.

Computation Energy Consumption
We define the number of CPU cycles needed to solve one sample of data for UE k as N c,k .This value can be measured offline as it is a priori or predetermined [29].Since all samples have different sizes, the number of CPU cycles required for UE k to execute a round of local computation is N c,k D k .Consequently, the time for a computation round for UE k can be expressed as The CPU frequency utilized at UE k , denoted as f k , can be optimized based on specific optimization goals.Consequently, the computation energy consumption at UE k for a computation round is obtained as [35] where ζ k represents the effective capacitance coefficient of the computation chipset at UE k .

Communication Energy Consumption
We assume that the data size of the model parameters to be uploaded in each round is denoted as γ.Therefore, the transmission delay time between UE k and the UAV is computed as As a result, the total communication energy consumption required for FL in a round at UE k is expressed as Hence, the overall energy consumption at all UE throughout the FL training process in a round is calculated as

Problem Formulation
The sum energy consumption minimization problem of all UE in the proposed UAV communication system can be formulated as follows: where constraint (19b) ensures that the transmit power at the UAV cannot exceed the maximum power budget ρ max .Constraints (19c)

Proposed Alternating Optimization Algorithm
As seen in the previous section, the proposed problem (19) presents significant complexity due to nonconvex constraints (19a), (19e), (19f), and (19g).To deal with this challenge, we propose decomposing the optimization problem into several constrained suboptimization problems over individual parameter subsets.These parameters are alternately optimized in two consecutive steps to achieve the optimal solution for the given global problem.In addition, to solve these sub-optimization problems, we propose leveraging the IA method to obtain successive convex programming, which can be readily solved using convex solvers [36].Consequently, we can achieve at least a locally optimal solution for the proposed problem (19).Before proceeding with the optimization steps, we will transform the proposed problem (19) into a more tractable form by introducing a new auxiliary positive variable set λ ≜ {λ k }, ∀k ∈ K. Thus, the proposed optimization problem is rewritten as follows: ∀k ∈ K, Obviously, constraints (21a), (21b), (21d), (19e), (19g), and (19h) are simply convex.However, (19f) and (21c) remain nonconvex.Therefore, we will convexify them into a more tractable form.
Convexifying constraint (19f): From ( 16), we express the constraint (19f) in a tractable form as A new positive variable Tcom is introduced to satisfy the following relationship: As a result, the constraint ( 22) is rewritten as ⇒B ln We introduce a new set of positive variables e ≜ {e k }, ∀k ∈ K satisfying the following second-order cone (SOC) constraint: An auxiliary lower bound on the right-hand side of (27 Next, we introduce a new set of positive variables b ≜ {b k }, ∀k ∈ K to obtain the a lower bound of the quadratic function d 2 k (u) at iteration (i + 1) as To convexify (30), a new variable set o ≜ {o k }, ∀k ∈ K is given to satisfy the following rotated cone constraint: From ( 28) and ( 31), we obtain a lower bound on the left-hand side of ( 25) and rewrite this constraint as At iteration (i + 1), a lower bound on the left-hand side of (24) around feasible points (ρ (i) , b (i) ) is given by [37] where It is observed that 1,k (w) is the square of the summation of the M square-root functions, which can be expanded into the summation of linear functions and concave square-root products.Similarly, 2,k (w) is also a convex function.Hence, the constraint ( 24) is eventually convexified as Convexifying constraint (21c): From ( 15) and ( 17), the constraint (21c) can be expressed as To address the nonconvexity of constraint (35), we initially focus on the first terms of the left-hand side of this constraint.A new set of positive variables is introduced as ϱ ≜ {ϱ k }, ∀k ∈ K, which satisfies the following conditions: To convexify (37), we introduce a new variable set ξ ≜ {ξ k }, ∀k ∈ K to satisfy the following rotated cone constraint: From (33), the constraint (37) is convexified as Hence, the constraint (21c) can be converted into a convex form as Consequently, the problem formulation for optimizing the problem ( 21) is transformed into a convex and tractable form as min w,u,λ,f,ϱ,ξ,e,b,o,ρ, (19c), (19d), (19e), (19g), (19h), ( 23), ( 26), ( 28), ( 29), ( 31), ( 34), ( 39), ( 40), (41).
The optimal solution obtained for the problem (42) is a converged stationary point satisfying the Karush-Kuhn-Tucker (KKT) conditions [38] with a finite number of iterations using a solver [36].The optimization steps for this solution are summarized in Algorithm 1.With given power control coefficients w and fixed location of UAV u, the value of R k is calculated owing to (3), which leads to the value of T com becoming constant.Therefore, the constraint (19f) is in a convex form.Thus, the optimization problem ( 20) is rewritten as Obviously, constraints (43a), (19f), (19g), (19h) and (19i) are simply convex.However, (19e) and (43b) are still nonconvex.Thus, we will convexify them into a more tractable form.
Convexifying constraint (19e): From ( 13), the constraint (19e) is rewritten as We can see that 1  1−η is a simple convex form within the range of η ∈ [0, 1].Therefore, a positive new variable η is introduced to satisfy the following constraint: Before handling constraint (45), an approximation of the square-root product is introduced as follows.Considering a concave function χ(x, y) = √ xy, x > 0, y > 0, an auxiliary upper bound of χ(x, y) around a feasible point (x (i) , y (i) ) given by the IA method is expressed as [39] χ(x, y) ≤ √ Because of η within the range of [0, 1], a positive new variable ε is introduced to satisfy the following constraint: Next, we leverage the first-order Taylor approximation to obtain the upper bound of the function ln(1 + ε) for a given feasible point ε (i) at the iteration (i + 1) as Hence, we obtain the upper bound of the function log(1/η) at the iteration (i + 1) as From constraints (48), (49), and (55), we achieve the convex form of the constraint (45) at the iteration (i + 1) as Convexifying constraint (43b): It can be seen that E com k is constant due to the determined power control coefficient w.Based on (15) and constraints ( 46) and (55), the upper bound of the left-hand side term of the constraint (43b) is obtained as Obviously, the second term of the right-hand side of constraint (57) is nonconvex.Hence, we introduce the variable set Λ = {Λ k }, ∀k ∈ K satisfying the following constraint: Based on constraints ( 48) and ( 58), we easily achieve the upper bound for the second term of the right-hand side in (57) as Eventually, the constraint (43b) is convexified under the convex form at the iteration (i + 1) as As a result, the problem formulation for optimizing the problem (43) with given power control w and location of UAV u is rewritten into a convex and tractable form as min η, η,λ,Λ,f, ), ( 56), ( 58), (60).
Similarly, we solve problem (61) using the optimization solver [36] under KKT conditions [38] with a finite number of iterations, as summarized in Algorithm 2.  (η, η, λ, Λ, f Eventually, to solve the original problem (20), an iterative algorithm is proposed by alternately running three suboptimal algorithms, which correspond to the three previously presented optimizing steps.The optimization procedure of this algorithm is illustrated in Algorithm 3.

Computational Complexity Analysis
As shown in Algorithm 3, the computational complexity in solving the problem (20) can be analyzed through two main steps: • Step 1: Running Algorithm 1 to solve the successive convex program (42) using a convex solver [36]: -According to [36], the complexity for solving a convex problem at each iteration is determined by the number of quadratic/linear constraints, x 1 , and that of variables, y 1 , in problem (42).As a result, the complexity is determined as The algorithm converges when the difference between the objective values of two consecutive iterations does not exceed a predefined small value, ϵ = 10 −3 .Therefore, the number of iterations is estimated in the numerical implementation.
Assuming that Algorithm 1 requires κ 1 iterations to reach convergence, then the total complexity of this step is Step 2: Running Algorithm 2 to solve the successive convex program (61) using a convex solver [36]: -Similarly, the overall complexity needed to run the iteration and solve the convex program (61) is calculated as O κ 2 x 2.5 2 (y 2 2 + x 2 ) .Here, κ 2 , x 2 , and y 2 represent the number of iterations, constraints, and variables in (61), respectively.
The proposed iterative Algorithm 3 alternately runs two optimization steps.Therefore, the computational complexity of Algorithm 3 at each iteration is calculated as the linear sum of two suboptimal algorithms in two steps, which is obtained as O ∑ 2 j=1 κ j x 2.5 j (y 2 j + x j ) .Assuming Algorithm 3 takes κ 3 iterations to reach the convergence, the total complexity of this algorithm is achieved as O κ 3 ∑ 2 j=1 κ j x 2.5 j (y 2 j + x j ) .Finally, we provide a detailed complexity analysis of the steps in the proposed alternating algorithm in Table 1.

Metrics Algorithm Step 1 Algorithm Step 2
No. Constraints No. Variables

Simulation Setup
In this paper, we assume that the UAV and K pieces of UE are located within a square area with dimensions of L × L. The concept of supporting FL in the UAV communication system enables multiple models for various applications to be learned at the same time by adjusting the dataset size as the input parameter of the proposed algorithm and sending the parameters of these models between the UAV and all UE.For simulations, we utilize a publicly available MNIST dataset with the size D = 100 MB.Each piece of UE uses its local dataset from the overall MNIST dataset for training to achieve high accuracy in its local model and then uploads these parameters to the CPU for calculating the global model.For simplicity, we assume that all UE has the same size of the local dataset, i.e., D k = D/K, ∀k ∈ K.The constant v to control the local calculation turns is set to 4, and the maximum time limit τ is set to 1000 s.Furthermore, the minimum CPU frequency f min , maximum CPU frequency f max , and the CPU cycles N c,k needed for each user are set to 0.1 GHz, 0.5 GHz, and 1000 cycles/bits, respectively.Based on [29], the effective capacitance coefficient of each user is set as ζ = 10 −28 .The remaining parameters used for simulations are tabulated in Table 2.The simulations were conducted on a desktop computer equipped with an Intel Core i9-13900KF CPU running at 3.40 GHz and with 32 GB of memory.The simulation environment used was Matlab R2023b.The following four benchmark algorithms are introduced to facilitate a comprehensive performance comparison: (1) Optimizing the resource allocation with given local accuracy η and fixed location of UAV u (Algorithm I (w/o η and u)): In this algorithm, the position of UAV u is randomly fixed satisfying the constraints (19c) and (19d), while the local accuracy η is randomly fixed according to (19i).The remaining resource parameters are optimized by running Algorithm 1.
(2) Optimizing the resource allocation with a fixed position of UAV u (Algorithm II (w/o u)): In this algorithm, the position of UAV u is randomly fixed satisfying the constraint (19c) and (19d).Afterwards, the remaining resource parameters are optimized by executing Algorithm 1.
(3) Optimizing the resource allocation with a given local accuracy η (Algorithm III (w/o η)): In this algorithm, the location of UAV u and the resource parameters are optimized by executing the optimization procedure in Algorithm 1, while the local accuracy η is randomly fixed in accordance with the constraint (19i).
(4) Proposed alternating optimization algorithm for the efficiency resource allocation (Algorithm IV): In this algorithm, all of the optimal resource parameters and the position of UAV u are achieved by utilizing the optimization procedure in Algorithm 3 to solve the original problem (20).
We notice that the big-O complexity of optimization steps 1 and 2 exhibits the same order of polynomial expression.In addition, Algorithm IV comprises two steps: steps 1 and 2. Therefore, the total complexity of Algorithm IV is computed from both steps 1 and 2. The complexity of the remaining benchmarks is calculated based solely on step 1.As indicated in Table 1, it consistently holds that x 1 > x 2 and y 1 > y 2 .Moreover, the values of κ 1 , κ 2 , and κ 3 are negligible compared to the polynomial expression.As a result, the total complexity of Algorithm IV can be approximated as O(x 2.5 1 (y 2 1 + x 1 )).On the other hand, the complexity of the remaining benchmark algorithms can also be approximated as O(x 2.5 1 (y 2 1 + x 1 )).This implies that the complexity of Algorithm IV is comparable to other benchmarks in terms of big-O.

Simulation Results
First, Figure 2 presents the simulation results depicting the trajectory of the UAV following the execution of the proposed alternating optimization algorithm (Algorithm IV).The visualization reveals the UAV's initial placement, followed by convergence to the optimal placement over successive iterations.The optimization process is illustrated in both 3D and 2D, offering comprehensive insight into the changes in UAV placement.The UAV is observed to gradually decrease its altitude and hover towards the central location of all UE.This behavior is reasonable as it brings the UAV into closer proximity of the UE, mitigating pathloss effects and consequently improving the overall communication quality between the UAV and the UE.Next, we conduct a performance comparison between the proposed alternating algorithms.Figure 3 shows the total energy consumption for the four optimization strategies as functions of the number of iterations.It can be seen that after a few iterations, all optimization algorithms rapidly reach a saturation value.Specifically, after just 10 iterations, the proposed optimal approach reaches 95% of the optimal performance.This indicates that the acceptable complexity of the proposed Algorithm IV is comparable to the remaining optimization approaches.Furthermore, it is clear that Algorithm IV achieves the best results in terms of energy consumption among all approaches, while Algorithm I performs the worst.Notably, Algorithm IV stands out as the most efficient, achieving an impressive 50% reduction in energy usage compared to Algorithm I.This result arises from the fact that Algorithm IV considers all necessary parameters for optimization, while the remaining algorithms ignore several of these parameters.Therefore, this result highlights the important role of optimizing all parameters that significantly affect overall performance.Notably, the group of Algorithms III and IV, which optimize the UAV trajectory, significantly outperforms the group of Algorithms I and II with random UAV placement.Hence, these findings underscore the pivotal role of optimizing UAV trajectory in addressing the energy efficiency challenges in FL over wireless communication.Similar behavior is observed in Figure 4, which displays the cumulative distribution function (CDF) of the total energy consumption estimated using 300 channel instances.The simulation results reveal that Algorithm IV outperforms the other approaches in terms of energy efficiency, resulting in a remarkable 50% reduction in energy consumption compared to Algorithm I, which yields the worst results.Next, a series of experiments are conducted to evaluate the impact of parameter settings on performance after applying the proposed optimization approaches to deploying FL in the UAV communication system.This analysis enables us to gain fascinating insights into comparing the proposed optimization algorithms in terms of overall energy consumption.Figure 5 shows the results achieved by different optimization strategies versus the uplink bandwidth B. It is observed that as the value of B increases, all strategies exhibit improved system performance.That is because the greater the uplink bandwidth, the higher the uplink rate of all UE, leading to reduced communication energy consumption between the UE and the UAV when transmitting the trained local models.Furthermore, Algorithm IV consistently displays the best performance, followed by the other proposed alternating algorithms, while Algorithm I continues to show the worst performance among all optimization algorithms.Notably, the gap between Algorithms I and II and the gap between Algorithms III and IV progressively diminish as the bandwidth B increases.These results suggest that uplink bandwidth expansion mitigates the effect of optimizing the parameter η.This is because the larger the value of bandwidth B, the greater its contribution to the communication phase between the UAV and UE compared to the computation phase depending on η.This trend is evident as the gap between Algorithms I and II and the gap between Algorithms III and IV decrease from 323.39 to 73.93 J and from 170.51 to 49.28 J, respectively, as the value of B increases from 0.3 to 1.2 MHz.Similar results regarding the performance comparison among different optimization algorithms are observed in Figure 6.This figure depicts the total energy consumption versus the maximum uplink power budget p max at each user in the system.Algorithm IV consistently demonstrates the best results among the proposed optimization algorithms.However, the trend of the result lines exhibits some differences compared to those in Figure 5.In Figure 6, the energy consumption of the proposed optimization approaches decreases as the value of p max increases.Moreover, the results reveal that the improved performance of the proposed algorithms becomes insignificant when the value of p max reaches a specific value of 21 dBm.By optimizing the transmit power allocation at the UE, the proposed approaches address the trade-off between decreasing the communication time and increasing the transmitted uplink power at the UE.Consequently, the proposed system with FL support only needs to ensure a sufficient level of transmit power for all UE to upload their trained local models while guaranteeing acceptable quality of service without exceeding the deadline τ.As a result, all UE can reduce energy usage and extend the time that the devices operate, which is a critical issue for mobile devices with limited battery life.Figure 7 shows simulation results obtained using the proposed different optimization strategies versus the data size γ of uploaded model parameters.The observed results regarding the performance comparison among the proposed optimization strategies mirror those in Figures 5 and 6.Algorithm IV, by discovering the optimal point of all necessary parameters for the original problem in (20), consistently demonstrates the best performance.However, the trend of the result lines in Figure 7 contrasts with the finding of Figure 5.All algorithms exhibit a declining system performance as γ increases, attributed to the longer transmission times resulting from the larger data size of the model parameters.Consequently, communication energy consumption increases, which leads to an overall increase in energy consumption.It is notable that Algorithms III and IV exhibit significantly smaller performance declines compared to Algorithms I and II.In contrast, Algorithm I exhibits the worst performance, with rapid degradation of system performance as γ increases.Obviously, optimizing the UAV placement enhances the proposed system's adaptability to the varying data sizes of the model parameters.As a result, the proposed UAV communication system has the potential to broaden its applications by adjusting the data size of the model parameters to accommodate diverse purposes.Similar observations are found in Figure 8 when inspecting the change in the number of pieces of UE K in the system.Undoubtedly, a higher value of K reflects a larger total system energy consumption for the training process in FL.However, the performance decline of Algorithm IV is not considerable compared to the remaining benchmark algorithms.The evidence of these findings is illustrated by the widening performance gap between Algorithm IV and the other benchmark algorithms as the value of K increases.Particularly, the gap between Algorithms III and IV increases from 21.51 to 88.84 J, and the gap between Algorithms I and IV significantly increases from 129.48 to 571.46 J. Thus, effective resource allocation significantly contributes to improving the system's performance, particularly in expanding the number of pieces of UE served for FL.As a result, Algorithm IV demonstrates its superiority by exhibiting minimal performance degradation with varying data sizes and UE numbers.This emphasizes the scalability potential of FL within UAV communication systems owing to the implementation of the proposed alternating optimization approach.

Conclusions
In this paper, we investigated a UAV communication system integrated with FL, addressing the optimization of energy efficiency for all UE during the training process.To tackle this complex problem, we proposed a novel alternating optimization algorithm.By solving two suboptimal convex problems, we derived an optimal solution for efficient resource allocation, particularly concerning the UAV trajectory.Extensive simulations demonstrated the effectiveness of our proposed algorithm, which outperformed the provided benchmark algorithms.Notably, optimizing UAV positions resulted in a remarkable enhancement of energy efficiency for all UE, with improvements of up to 50%, attributed to the improved wireless communication links between the UAV and UE compared to algorithms with random UAV placements.Furthermore, our analysis revealed minimal performance degradation across varying data sizes and numbers of pieces of UE, underscoring the scalability potential of the proposed alternating optimization approach for FL over UAV communication systems.Recognizing the susceptibility of wireless communication links to failures or disruptions due to factors like interference, obstacles, or environmental conditions, our future work will incorporate considerations for communication failure to enhance the practical relevance and applicability of our findings.Moreover, our future work will extend to incorporate the optimization of energy consumption associated with UAV movement.
x H and x * represent the Hermitian transpose and conjugate operators of the vector x, respectively.| • |, E[•], and Var[•] denote the norm, expectation, and variance, respectively.

Figure 1 .
Figure 1.FL over a UAV communication system.

3. 1 .
Step 1: Optimizing Power Control Coefficient w, the Trajectory of the UAV u, and Other Resource Allocations with a Given Local Accuracy η With a given local accuracy η, the optimization problem (20) is rephrased as min

Figure 2 .
Figure 2. Optimal trajectory of the UAV after running the proposed algorithm.

Figure 3 .Figure 4 .
Figure 3.Total energy consumption of different iterative algorithms versus the number of iterations (K = 10).

Figure 6 .
Figure 6.Total energy consumption of different iterative algorithms versus maximum transmit power budget p max (K = 10).

Figure 7 .
Figure 7.Total energy consumption of different iterative algorithms versus data size γ of model parameters (K = 10).

Figure 8 .
Figure 8.Total energy consumption of different iterative algorithms versus the number of pieces of UE K.
each UE cannot exceed the time required for all UE to calculate the local model.Constraint (19h) guarantees that the calculation frequency at each piece of UE is within a certain range.Finally, constraint (19i) imposes a necessary condition for the local accuracy η.
and (19d)restrict the movement of the UAV within a specific area.Constraint (19e) guarantees the completion of global training within the given deadline τ.Constraint (19f) ensures that every UE finishes communication with the UAV at the same time.Constraint (19g) assures that the time for a computation round at

Table 2 .
Simulation parameters for UAV communication systems with FL support.