Trajectory Design for Energy Minimization in UAV-enabled Wireless Communications with Latency Constraints

This paper studies energy-efficient unmanned aerial vehicle (UAV)-enabled wireless communications, where the UAV acts as a flying base station (BS) to serve the ground users (GUs) within some predetermined latency constraints, e.g., requested timeout (RT). Our goal is to design the UAV trajectory to minimize the total energy consumption while satisfying the RT requirement and energy budget, which is accomplished via jointly optimizing the trajectory and UAV's velocities along subsequent hops. The corresponding optimization problem is difficult to solve due to its non-convexity and combinatorial nature. To overcome this difficulty, we solve the original problem via two consecutive steps. Firstly, we propose two algorithms, namely heuristic search, and dynamic programming (DP) to obtain a feasible set of trajectories without violating the GU's RT requirements based on the traveling salesman problem with time window (TSPTW). Then, they are compared with exhaustive search and traveling salesman problem (TSP) used as reference methods. While the exhaustive algorithm achieves the best performance at a high computation cost, the heuristic algorithm exhibits poorer performance with low complexity. As a result, the DP is proposed as a practical trade-off between the exhaustive and heuristic algorithms. Specifically, the DP algorithm results in near-optimal performance at a much lower complexity. Secondly, for given feasible trajectories, we propose an energy minimization problem via a joint optimization of the UAV's velocities along subsequent hops. Finally, numerical results are presented to demonstrate the effectiveness of our proposed algorithms. ...


I. INTRODUCTION
With the proliferation of mobile devices and data-hungry applications, the next generation wireless networks are expected to support not only the unprecedented traffic increase and stringent latency but also ubiquitous coverage requirements.Although heterogeneous networks (HetNets) [1] and cloud radio access networks (C-RANs) [2], [3] have shown their capability in supporting massive network traffics, their deployments are usually focused on dense areas.In less-dense areas, e.g., urban, and places where the network traffic highly fluctuates, the employment of C-RANs is economically inefficient.In such cases, the current terrestrial network architecture might suffer network congestion or be unable to support the ubiquitous coverage.
Recently, unmanned aerial vehicles (UAVs) have attracted much attention as a promising solution for improving the performance of terrestrial wireless communication networks thanks to their mobility, agility, and flexible deployment [4].By employing a flying base station, UAVs can be deployed along with ground base stations (GBSs) to provide pervasive coverage and timely applications to ground users (GUs).Consequently, the deployment of UAVs in wireless communications has found applications in various domains, such as disaster rescue mission [5], surveillance [6], and smart farming [7].Besides many advantages, UAV-enabled communications are not without limitation.The inherent limitations of UAVs has imposed technical restrictions on size, weight, and power capability (SWAP), which consequently affect the UAV's endurance and performance [8].One of the major challenges in UAV deployment is to efficiently design the trajectory in order to maximize the UAV's service lifetime.
Certain efforts have recently been devoted to efficient UAV trajectory design [8]- [14].Yang et al. in [9] analyze the trade-off between up-link transmission energy at GUs and the propulsion energy consumption of UAV.By considering two practical UAV trajectories, namely, circular flight and straight flight, the authors investigate the different Pareto efficiency between the optimal GU transmit power and UAV trajectory design.Phu et al. [10] use UAV as a friendly jammer to reduce the eavesdropper's decoding capability.More specifically, they maximize the average secrecy rate of the cognitive radio network (CRN) by jointly optimizing the transmission power and UAV trajectory.Reference [8] designs the trajectory of UAV to minimize the mission completion time in UAV-enabled multi-casting systems based on the traveling salesman problem (TSP).References [11], [12] study more complicated scenarios with multiple UAVs.The authors of [11] investigate the dual-UAV enabled secure communication system via jointly optimizing the UAV trajectories and user scheduling.In that work, the first UAV acts as a flying base station to communicate with GUs while the second one jams the eavesdroppers to protect the confidential messages.The authors in [12] consider UAVenabled secure communications networks, in which multiple source UAVs transmit data to the GUs while other UAVs are sending interference signals to multiple eavesdroppers in order to prevent critical data can be overheard.The purpose is to optimize the UAV trajectory, transmit power and user scheduling to maximize the achievable secrecy rate per energy consumption unit.References [13]- [15] study more complicated UAV enabled communications systems with 3-D trajectory.
Due to the limited endurance and on-board energy of UAVs, the problem of UAV energy minimization has attracted much attention [16]- [20].The work [16] explores the use of UAV as a relay node to provide backhaul connectivity to truckmounted BSs that communicate with people in disaster areas.In order to increase the service lifetime of UAV, they apply the genetic algorithm to design the trajectory with the least energy consumption to visit all BSs and return to the UAV station.Reference [17] minimizes the completion time and energy consumption problems for a fixed-wing UAV-enabled multicasting system via jointly optimizing the flying speed, UAV altitude, and antenna beamwidth.In [18], the authors consider the joint problem of the sensor nodes' wake-up schedule and the trajectory to minimize the maximum energy consumption while guaranteeing the reliability of the data collected from the sensors.Nevertheless, these works did not consider UAV's propulsion energy consumption, which is important for UAV's lifetime.In [19], the authors derive a closed-form propulsion power consumption model for rotarywing UAVs.Then, by using this model, they aim at minimizing the total energy consumption via joint optimization of trajectory and time scheduling between GUs.Particularly, a new path discretization method is proposed to solve this NP-hard problem.Based on the energy model in [19], [20] investigates UAV enabled Internet-of-Things (IoT) systems, where the UAV is dispatched from the depot to collect the data of IoT devices.The purpose is to minimize the maximum energy consumption of all devices while complying with the energy budget requirement.
Note that these works consider the UAV communications without the GUs' transmission constraints, e.g., latency requirement or user quality of experience.In this paper, we consider UAV-enabled communications systems in practical scenarios in which the GUs' transmissions are subject to some latency or request timeout (RT) constraints.The considered system is motivated from realistic applications, e.g., content delivery networks [21] or the age of information, in which when a GU requests content data, it needs to be served within a certain RT.Our goal is to design an energy-efficient UAV trajectory while guaranteeing the predefined RT constraints of all GUs.The considered system is clearly different from [8], [19] which does not consider GUs' RT constraint.Our contributions are as follows: • Firstly, we find a feasible set of trajectories while satisfying the RT constraints for all GUs.In order to deal with the nature NP-hardness of the formulated problem, we propose two algorithms, namely, DP, and heuristic algorithms based on the TSPTW method and they are compared with exhaustive search and TSP-based method [8], [19].While the exhaustive search algorithm provides the global optimality, its exponential computation complexity might limit its applicability in practical applications.In such cases, the heuristic algorithm with a lower complexity is often considered to be a suitable replacement.However, this solution significantly decreases the performance compared to that of exhaustive.Thus, DP is proposed as a new algorithm to balance between exhaustive and heuristic algorithms.Especially, its performance converges to that of exhaustive at a much lower complexity.
• Secondly, we minimize the total UAV's energy consumption for each given trajectory in a feasible set via a joint optimization of the UAV velocities in all hops.Since the formulated problem is proved to be convex, it can be solve by using standard methods.Then, the path with lowest energy consumption which also satisfies the energy budget constraint is selected as a designed trajectory for UAV.Notably, in this work all the computation for path design is performed in an offline manner, i.e., prior to the UAV flight.• Finally, the effectiveness of the proposed algorithms is demonstrated via numerical results, which show significant improvements in both energy consumption and outage probability compared with our benchmarks [8], [19].The rest of this paper is organized as follows.Section II introduces the system model.The energy-efficient UAV communication with trajectory design and velocity optimization is analyzed in Section III.Section IV shows the simulation results and discussion.Finally, concluding remarks are given in Section V.
Notations:Scalars and vectors are denoted by lower-case letters and boldface lower-case letters, respectively.For a set K, |K| denotes its cardinality.For a vector v, v denotes its Euclidean (ℓ 2 ) norm.C K k denotes a set of all k-combinations of K elements in set K. R + represents for the nonnegative real numbers, i.e., R + = {x ∈ R|x ≥ 0}.R ++ represents for the positive real numbers, i.e., R ++ = {x ∈ R|x > 0}.The notion x y means each element of vector x is smaller than y.

II. SYSTEM MODEL
We consider an UAV-enabled communication system in which a UAV helps to transmit data to a set of K ground users (GUs), denoted by K {1, ..., K}.Due to limited access, the users can only receive data from the UAV [8], [19].The location of GU k is denoted as q k ∈ R 2×1 , k ∈ K. Let (u 1 , u 2 , . . ., u K ) be a permutation of (1, 2, . . ., K), and let u [u 1 u 2 • • • u K ] T specify a trajectory of the UAV to serve all users following the path 0 → u 1 → u 2 → ... → u K → 0, where 0 denotes the UAV station (or depot).The UAV is assumed to employ the hovering-communication method [8] to serve the GUs.In this model, in order to serve GU k, the UAV has to move to GU k's location and keeps hovering during the transmission period 1 .Fig. 1 depicts a two-dimensional Cartesian coordinate system, whereas the UAV is located at the ground station and the GUs are located in the considered area.It is assumed that GU k is required to be served within η k units of time after the start of the UAV's mission.We refer to η k as the requested timeout of GU k, for k ∈ K.

A. Transmission Model
The UAV's trajectory is split into K + 1 line segments (or hops) which are represented by all connections between K +2 way-points on any given route (see Fig. 2 for details).We assume that the UAV flies at a constant altitude of H (meters).Therefore, the distance traveled from GU j to GU k is given by where the index 0 represents the UAV station.We assume that the UAV velocity is constant during each hop but can change from hop to hop.For i = 1, 2, . . .K + 1, let v i denote the UAV velocity at the i-th hop, while for k = 1, 2, . . ., K, τ k stands for the transmission time needed for UAV to send the requested data stream to GU k reliably.Then, for a given trajectory signified by u, the time for the UAV to reach the GU u k is calculated as where t ui d i v i and d i = l ui−1→ui represent the travel time and the distance in the i-th hop, respectively, for i = 1, 2, . . ., K + 1.The transmission time to serve GU k is computed as where Q k denotes the length of the requested content in bits and R k denotes the transmission rate from the UAV to GU k.Under the hovering-communicate method, the UAV-GU link is dominated by LoS link [22].Consequently, the communication rate is computed as follows: where B is the channel bandwidth, P com is the transmit power of the UAV, α is the path loss exponent, σ2 is the noise power, and H α is the path loss.In order to satisfy the quality of service (QoS) constraint, it must hold R k ≥ r k , ∀k, where r k is the QoS constraint of GU k.

B. Energy consumption model
The energy consumption of the UAV consists of two types: propulsion energy consumption and communication energy consumption.The former measures the energy consumed to fly or hover over the UAV.The latter is used to transmit data to the GUs.Note that the energy consumption during UAV's acceleration/deceleration is ignored [19], [20] since the acceleration/deceleration speed or acceleration/deceleration duration is small 2 .The power consumption of a rotary-wing UAV flying at velocity v is given as [19, Eq. ( 12)] where , and α 3 = 0.5a 0 ρsA.Blade profile power, parasite power, and induced power are needed to overcome the profile drag of the blades, the fuselage drag, the induced drag of the blades, respectively.Other parameters are explained as in Table I.For i = 1, 2 . . ., K+1, the total energy consumption that the UAV spends on hop i is given as where , and E com,i = P com × τ ui are the energy consumption due to flying, hovering, and communications, respectively, where P fly (v i ) is provided in (4) and v hov is the minimum velocity of the UAV when hovering around the GU, e.g., v hov = 5 m/s [23].

III. ENERGY-EFFICIENT UAV COMMUNICATION WITH TRAJECTORY AND VELOCITY OPTIMIZATION
Our goal is to jointly design the trajectory and velocities to minimize the total energy consumption while satisfying the RT constraints and energy budget for all GUs.Intuitively, we aim to find the visiting order u [u 1 , . . ., u K ] and the UAV velocities which result in the smallest energy consumption.Then, the problem is formulated as In P 1 , constraint C1 guarantees the RT requirement for the GUs which states that the maximum latency to serve GU u k cannot exceed the predefined RT η u k , C2 requires that the flying speed of the UAV must be less than the maximum velocity V max , and C3 means that the total energy consumption of UAV on the considered path should not exceed the total energy budget E tot .Otherwise, this is an infeasible path.
Problem (6) requires optimizing the trajectory u and traveling velocities {v i } K+1 i=1 of the UAV on all hops.Note that (6) includes a complicated energy consumption as in C3, as well as an objective function which depends on the designed trajectory u.However, as the objective function is the same of the LHS in C3, we can, without loss of generality, solve P 1 without C3 and find the minimum total energy consumption.If this energy is less than E tot , then P 1 is feasible and its solution is the same as the solution to P 1 without C3, otherwise P 1 is not feasible and we say outage has occurred.
Note that even without C3, problem P 1 is an NP-hard problem.To solve this problem, we first find the feasible set of trajectories (denoted as U ⋆ ) which satisfy constraints C1 while the hop velocities satisfy C2.Next, we will minimize the energy consumption on each given trajectory via joint optimization of velocities over all hops.Finally, the lowest energy consumption path which satisfies the energy budget constraint C3 is chosen as the trajectory design for UAV.

A. Obtain a feasible set of trajectories
In this section, we introduce three solutions, namely, exhaustive search, heuristic search, and DP algorithms to obtain a feasible set of trajectories that satisfy constraints C1 and C2.The exhaustive search gives the best solution with very high complexity.The heuristic tries to reduce the complexity but the performance also decreases.Thus, the DP is proposed as a solution to balance between exhaustive search and DP algorithms.
Lemma 1: The feasible set of all trajectories which satisfy constraints C1 and C2, i.e., U ⋆ , will be obtained by choosing The proof of Lemma 1 relies on the monotonically decreasing behavior of the LHS of constraint C1 with respect to v i , for any given i.For any k ∈ K, if a trajectory satisfies C1 with v i = V max , then this trajectory satisfies C1 with v i < V max , as the LHS of C1 is monotonically decreasing in v i , for i = 1, 2, . . ., K. Also, for any k ∈ K, if a trajectory does not satisfy C1 with v i = V max , then this trajectory does not satisfy C1 with v i < V max , as By considering v i = V max as in Lemma 1, the following subsections present three proposed algorithms to find a feasible set of trajectories.

1) Algorithm 1: Exhaustive search algorithm
In this subsection, we introduce an exhaustive search algorithm used as the reference in the section Simulation Results.The principle of the exhaustive search algorithm is to visit all the paths (trajectories) and find Hamiltonian cycle paths [24] satisfying the RT constraint.For each trajectory in the feasible set, we minimize the energy consumption via jointly optimizing the velocities as in Section III-B.Thus, in order to reduce the computational complexity for solving (6), we only take Ψ feasible paths into consideration.
This problem is in a form of TSPTW problem, which can be solved by finding the minimum cost tour (Hamiltonian cycle path) starting and ending at location 0 and visiting all GUs only once [25].The details is summarized in Algorithm 1. Basically, Algorithm 1 consists of two steps.First, we check the RT constraint from UAV station to each GU k, as in line 3. Based on the triangle inequality constraint, if there exists any GU k which does not satisfy the RT constraint, it has no feasible path.Otherwise, we will try all K! paths which visits all the GUs once, lines 4 to 19.It then calculates and compares the visit time to every GU with the corresponding RT requirements (constraint C1 in ( 6)), as in lines 5 to 9. Thus, the complexity of Algorithm 1 is O(K!) [26].Finally, the set of Ψ feasible trajectories which satisfies all the RT constraints and imposes the Ψ shortest traveling time will be selected.
2) Algorithm 2: Heuristic algorithm Although providing near-optimal performance, the high computation complexity of Algorithm 1 may limit its potential in realistic scenarios.In this subsection, we propose a heuristic search algorithm, which compromises the performance against complexity.The key idea behind the heuristic algorithm is to restrict the search space at each step, in which it only foresees one hop ahead when checking the RT condition.The searching in the heuristic algorithm consists of K steps, in which it maintains two sets: a set of visited GUs and another set of GUs which have not been visited, i.e., I + and I − , respectively.First, we check the RT constraint for the first step (or hop) as in Algorithm 1, line 3.If the RT constraint from UAV station to each GU k is satisfied, then, we select the closet Algorithm 1 Exhaustive search algorithm for solving P 2 for m = 1 : |I| do ⊲ For each path u (m) ∈ I 5: 6: for k = 1 : K + 1 do ⊲ For each hop in path u (m) .
if L (m) η then 10: for k = 1 : Ψ do ⊲ For Ψ ≤ f feasible shortest paths 16: GU having minimum RT value as the first visited GU into the designed trajectory, i.e., U 1 as in lines 4 to 6.Then, we continue checking a step-by-step, from lines 8 to 25.At the k-th step (k = 2, . . ., K) on each path, it checks K − k + 1 GUs and looks for the closet GU with minimum RT value as well as satisfying the latency constraint to be added to the trajectory, lines 18 to 23.This GU is then added into the visited set and excluded from the not-visited set, as in line 22.In the other hand, if there has no GUs satisfying the RT constraint at the k-th step, it is not possible to find out the feasible path, lines 23 to 25.As shown in the Algorithm 2, the fundamental operations employed in the computation are additions and comparisons.The total number of operations needed to run Algorithm 2 from steps 1 to K is

2
[28, Eq. (0.121.1)].Thus, the complexity of the heuristic algorithm is O(K 2 ), which is significantly smaller than the complexity O(K!) of Algorithm 1.Details of the heuristic algorithm are described in Algorithm 2.
3) Algorithm 3: Dynamic programming Although having a lower complexity, Algorithm 2 obtains a much degraded performance compared with Algorithm 1.This motivates us to propose Algorithm 3, which is based on Algorithm 2 Heuristic algorithm for solving P 2 ⊲ Check feasibility in the first hop 4: ⊲ For the first step 7: for k = 2 : K do ⊲ For k-th step 9: while I − = ∅ do 10: for u l ∈ I − do 13: else 24: Break ⊲ Break the while loop end if end while end for end if 26: Output: U ⋆ = U.
DP and takes into account the future outcome when selecting a path.It will be shown later that the DP-based algorithm approaches the optimal solution with a considerably reduced complexity.
Denote G = (K, A), where K is the set of GUs and A = {a jk } is the set of the summation of travel time from GU j → k and the data transmission time to GU k, e.g., a jk = l j→k /V max + τ k , j = k.In this work, since we do not consider a jk with j = k, thus, a jk will henceforth be referred to as a jk with j = k.Moreover, a jk is feasible if it satisfies the RT constraint, i.e., a jk ≤ η k .As in the first step of Algorithms 1 and 2, we check the feasibility by considering the RT constraint from UAV station to GU k, as in lines 3 of Algorithm 3. Concretely, if there exists a 0k does not satisfy the RT constraint, it does not exist a feasible path.Associate with each GU k ∈ K a time window [0, η k ] and a data transmission time τ k .
A state (S, k) is defined as: S is an unordered set of visited Algorithm 3 DP-based algorithm for solving P 2 for (S, j) ⊂ Ξ m−1 do 8: for k ∈ K\S do 9: l j→k = q j − q k 10:  For each state (S, k) ∈ Ξ K+1 , the visiting order u ⋆ is obtained by checking for backward from Ξ K+1 to Ξ 1 based on B k m . 21: GUs, k is the last visited GU in S. Define C(S, k) as the least cost (e.g., traveling time) of path starting at UAV station, passing through each GU of S ⊂ K exactly once, ending at GU k.Without loss of generality, we initialize the cost function C as C({0}, 0) equals to zero, whereas the first and second elements represent for the UAV station.The C(S, k) is calculated by solving the following equation [25] C(S, k) = min where C({j, k}, k) = a jk = l j→k /V max + τ k , S ⊂ K, j and k ∈ S.
We denote B k m with k ∈ K, m = 1, 2, . . ., K + 1 as the set containing the last visited GU before visiting GU k in step m, as in lines 4, 14, and 16.Specifically, when an UAV starts from ground station, there is no visited GU before this, i.e., B 0 1 = Ø as in line 2. Let Ξ m denote the set of all feasible states (S, k), where |S| = m.In order to obtain Ξ m from Ξ m−1 , we do following steps.For each state (S, j) ∈ Ξ m−1 , we consider a new state ((S, j) ∪ k, k), lines 4 to 17.This state can be added to Ξ m iff it satisfies the RT constraint and is not yet stored, as in lines 12 to 14.In the case that this state is already stored in Ξ m , we only keep the state having minimum cost of C((S, j) ∪ k, k), as in lines 15 to 17.Let assume that there exist two states with the corresponding cost functions C 1 (S, k) and C 2 (S, k), respectively.If C 1 (S, k) < C 2 (S, k), then, the second state will be eliminated.The goal of DP algorithm is to take all the feasible paths satisfying constraints C1 and C2.Since we only store the state with lowest value of C(S, k), k = 1, . . ., K for each state (S, k).Thus, at the end of Algorithm 3, when |S| = K + 1, we can achieve maximally K states (S, k) ∈ Ξ K+1 , as in lines 18 to 23.For each state (S, k), the visiting order u ⋆ is obtained by checking for backward from Ξ K+1 to Ξ 1 based on B k m , as in line 20.Finally, feasible Hamiltonian cycle paths U ⋆ with |U ⋆ | ≤ K is acquired at the output of DP algorithm, line 21.To make it easy to understand, the DP-based algorithm is illustrated in Table II and III.More specifically, we consider K = {1, 2, 3}, η = {2, 2, 4} seconds, 0 denotes the UAV station, Table II is the travel time between GUs.Due to the RT constraint and the condition of storing one state with minimum cost C(S, k), we cannot keep all states into consideration.For example, when S = 3, we only achieve one final state, i.e., ({0, 1, 2, 3}, 3).For the last state {0, 1, 2, 3} ∈ Ξ 4 , we can check for backward from Ξ 4 to Ξ 1 to find the feasible path u ⋆ .More specifically, from state Ξ 4 , we can find out that 1 ∈ B 3  4 is the last visited GU before visit 3. Next, by considering the state (S, 1) ∈ Ξ 3 , 2 ∈ B 1   3   is the last visited GU before visit 1.Similarly, we check for backward until reaching UAV station 0. Finally, the visiting order u ⋆ is obtained, i.e., u The complexity of the DP-based algorithm is O(K 2 × 2 K ) in the worst case [27].Moreover, details of this method are described in Algorithm 3.

B. Minimization of the UAV's Energy Consumption with given trajectory
The previous section designs the trajectories based on the UAV maximum speed.While this method is preferred to minimize the traveling time, it might not be energy-efficient since it over-estimates the RT constraints.In this section, we minimize total energy consumption of the UAV via the joint optimization of UAV velocities over each given trajectory in the feasible set U ⋆ , e.g., the output of Algorithms 1, 2, and 3.The energy minimization problem is formulated as Because E com,i and E hov,i do not depend on v i , they can be removed from the objective function of (8) without loss of generality.Since function 1 x is convex in 8) is affine constraint.The most challenging is the term E fly,i (v i ).
Lemma 2: The energy consumption E fly,i (v i ) is convex.
Proof: From ( 4) and ( 5) we have where all parameters are defined in Table I.The second derivative of E fly,i (v i ), after some manipulations, can be expressed as where Denote X = α 2 v 2 i ≥ 0, then we can express , it yields In addition, since 1 + α 2 2 v 4 i ≥ 1, we obtain the term in bracket in (11) is always greater than or equal to 1. Thus, β > 0, ∀v i .Since P 0 , d i , α 3 are also positive, from (10) we conclude that the second derivative of E fly,i (v i ) is always positive, which proves the convexity of E fly,i (v i ).
By using Lemma 2, we observe that problem P 2 is convex since the objective and all constraints are convex.Thus, it can be solved by using the standard methods [29].

IV. SIMULATION RESULTS
This section provides numerical results to validate the proposed designs.The parameters are set as follows: H = 50 meters, B = 5 MHz, path loss exponent α = 2, σ 2 = −90 dBm, P com = 0.1 mW, τ k = 0.131 seconds for all k, UAV's coverage area is 50 m x 50 m, UAV ground station is located at (1.5m, 48m).On a more general level, we perform 1000 independent trials of Monte-Carlo simulations.In details, for each iteration, we deploy a random GUs topology distributed in the considered area and the RT constraints are uniformly ranging between η min and η max .The proposed solutions are compared with a solution in [8], [19], which is based on the TSP.Specifically, since the heuristic and DP algorithms can find maximally 1 and Θ ≤ K feasible paths, respectively.In order to guarantee that the exhaustive method is always an upper bound, this algorithm takes Ψ (Ψ ≥ Θ) shortest feasible paths while the heuristic and DP algorithms take all feasible paths into consideration.Unless stated, other parameters in the simulations are given in Table IV.
In Fig. 2, we illustrate the difference trajectory designs, i.e., TSP, exhaustive search, heuristic, and DP, with η min = 2 seconds, η max = 5 seconds, K = 7, E tot = 100 KJoules.The arrows in Fig. 2 denote the moving direction of UAV.One can clearly observe from the figure that each scheme gives us a different trajectory design.While the TSP always follows the shortest path and does not take latency into account, the others select the path with minimum energy consumption via optimizing the traveling velocities.Moreover, the different path designs result in different energy consumption values.
Next, we evaluate the proposed trajectory designs via the outage probability metric (OP), which is defined as the probability that no feasible path (a path that satisfies all the GUs' RT requirements and E tot ) is found.More specifically, the infeasibility is presented as in lines 3 and 14 of Algorithm 1, lines 3 and 18 of Algorithm 2, lines 3 and 18 of Algorithm 3.Moreover, the in-feasibility also occurs if all the paths, which is obtained from Algorithm 1 (or Algorithms 2, 3), do not satisfy the energy budget constraint, i.e., C3 in (6).Fig. 3   presents the OP of the proposed algorithms and the reference as a function of V max with the RT requirements η k ranging between 2 and 6 seconds, the energy budget E tot = 500 KJoules.It is shown that the proposed algorithms significantly improve the OP compared with the reference for all values of V max .Specifically, at V max = 80 m/s and K = 6, the exhaustive search and dynamic programing algorithms always find the trajectory that satisfies all the GUs' RT constraints and the heuristic-based algorithm achieves less than 3.5% OP.Whereas the reference scheme imposes 21% OP.The OP of all schemes can be reduced by increasing V max , which is because a higher V max results in a lower traveling time between the GUs.Consequently, it is highly probable for the UAV to satisfy the GUs' RT.In Fig. 4, the OP is presented as a function of minimum RT value η min (seconds), while η max = 6 seconds, V max = 30 m/s, and E tot = 500 KJoules.Similar to Fig. 3, the DP achieves almost the same outage performance as the exhaustive search while it significantly outperforms the heuristic and reference algorithms.Specifically, at η min = 4 seconds and K = 6, the OP values of both exhaustive search and dynamic programing algorithms equal to 4.5% and the heuristic-based algorithm achieves less than 24% OP.Whereas the reference Fig. 4: Average OP (%) versus minimum requested timeout.
scheme imposes 45% OP.It is found that at a lower value of η min , the outage performance is degraded.This is expected since allocating more speed is needed to satisfy the GUs' RT, but the V max is limited.Furthermore, in Figs. 3 and 4, the average outage probability decreases when we decrease the number of GUs from 6 to 4. Fig. 5 illustrates the average OP versus energy budget (Joules), where the RT requirements η k ranging between 3 and 9 seconds, K = 6, V max = 60m/s.It is the same with Figs. 2 and 3, the outage probability value of DP converges to that of the exhaustive search which further outperforms the heuristic and reference methods.Particularly, the exhaustive, DP, and heuristic methods is significantly decreasing while the reference decreases slowly with the increasing of energy bud- get.This emphasizes the disadvantage of TSP-based method of the reference compared to TSPTW-based methods in our paper.Furthermore, when the value of energy budget is large enough, the OP of all algorithms converges to the saturation value.It is because the OP is not only dependent on the energy budget but also the RT constraint, i.e., constraints C1 and C3 in (6).More specifically, the reference consumes extremely high energy in the latency constraint scenario.It is noticeable that the gap of OP between the reference and proposed algorithms in Fig. 5 is huge compared to that of Figs. 3 and 4. Since the energy consumption of reference is much larger than others and this will be presented in Fig. 7. Fig. 6 represents the OP as a function of network size (i.e.,  X (meters)) with K = 7, V max = 60 m/s, η min = 3 seconds, η max = 8 seconds, and E tot = 500 KJoules.Whereas the UAV's coverage area is assumed to be a square and it can be calculated as A = X * X (m 2 ), e.g., Fig. 1.It is observed that with the increasing of X, the average OP is significantly increasing for four schemes.This is expected since more traveling velocity V max is needed to compensate the latency requirement which is in contradiction with the V max limitation.Next, we examine the energy consumption of the proposed optimization in Section III-B and compare with the TSPbased reference scheme in [8], [19].For a fair comparison, we assume that V max is sufficiently large so that all schemes have at least one feasible trajectory.Once a feasible set of trajectories is obtained based on the proposed Algorithms 1, 2 and 3, we apply the optimization P 2 to minimize the total UAV's energy consumption.Fig. 7 plots the energy consumption (Joules) of all schemes as a function of the number of GUs, i.e., K, with η min = 2 seconds, η max = 9 seconds, Ψ = K.A similar observation is that our proposed designs significantly reduce the UAV's consumed energy compared with the reference.This is due to the fact that the reference (TSP-based) always selects the shortest path regardless of the GUs' RT requirements.Consequently, in order to satisfy all GUs' RT constraint, the UAV (in this case) has to fly with a higher velocity than in our proposed designs.On the other hand, our proposed algorithms optimize the traveling speed in order to minimize the energy consumption.Obviously, serving more GUs requires more energy consumption, as shown in these figures.Fig. 8 describes the details of the maximum and minimum energy consumption for each algorithm.Fig. 9 evaluates the average energy consumption versus network size with η min = 3 seconds, η max = 9 seconds, Ψ = K = 6.In Fig. 7, we assume that the velocity V max is sufficient large to make sure that the TSP scheme exists one feasible path which is infeasible in practical.Thus, in Fig. 9, we compare the average energy consumption of the exhaustive search, heuristic, and DP algorithms with V max = 60 m/s.We can observe that, for a larger network size, the energy consumption is increasing.Due to the fact that, the energy consumption depends not only on velocity but also on traveling distance (from eq. ( 5)).Specifically, the energy consumption value of DP is very close to that of the exhaustive algorithm.Moreover, the heuristic consumes more energy compared to that of exhaustive search and DP schemes and the gap between them increases proportionally with the network size.
Last, to illustrate the complexity of all algorithms, Fig. 10 shows the average running time (seconds) as a function of the number of GUs.Clearly, the exhaustive search (Algorithm 1) imposes the largest running time, which increases exponentially with the number of GUs, as it tries all possible paths.The heuristic search (Algorithm 2) and dynamic programing (Algorithm 3) consume much less time compared with Algorithm 1. From practical aspects, Algorithm 3 is preferred as it has a relatively small complexity while achieving good performance.Algorithm 2 consumes less time than Algorithm 3, but it has lower performance, i.e., the OP and energy consumption.Although having the shortest running time, the TSP-based reference has a poor performance, which is far worse than the proposed Algorithms, as shown in Figs. 3 to 7.

V. CONCLUSION
We have investigated the energy-efficient trajectory design for UAV-assisted communications networks which take into consideration latency requirements from the GUs.More specifically, we minimize the total energy consumption via jointly optimizing the UAV trajectory and velocity while satisfying the RT constraints and energy budget.The problem was non-convex, which was solved via two consecutive steps.Firstly, we proposed two algorithms for UAV trajectory design while satisfying the GUs' latency constraints based on the TSPTW.Secondly, for given feasible trajectories, we minimized the total energy consumption via a joint design of the UAV's velocities in all hops.Then, the best path was selected as the designed trajectory of UAV.It was shown via numerical results that our proposed designs outperform the TSP scheme in terms of both energy consumption and outage probability.
The outcome of this work motivates future works in UAV communications networks.One problem is to jointly select the paths and optimize the velocity, which requires advanced optimization techniques but might further improve the UAV's performance.Another promising problem is to consider dynamic network topology.In this case, an adaptive solution that optimizes the UAV trajectory on the fly is required.

14 :
if T k + t <= η u l then

TABLE II :
Illustration for Travel Time between GUs in DP Algorithm

TABLE IV :
System Setup for Numerical Simulations