{'fraction_non_alphanumeric': 0.040585408475316734, 'fraction_numerical': 0.009130624726955002, 'mean_word_length': 4.197774750227066, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Trajectory Design for Distributed Estimation in UAV Enabled Wireless Sensor Network

In this paper, we study an unmanned aerial vehicle(UAV)-enabled wireless sensor network, where a UAV is dispatched to collect the sensed data from distributed sensor nodes (SNs) for estimating an unknown parameter. It is revealed that in order to minimize the mean square error (MSE) for the estimation, the UAV should collect the data from as many SNs as possible, based on which an optimization problem is formulated to design the UAV's trajectory subject to its practical mobility constraints. Although the problem is non-convex and NP-hard, we show that the optimal UAV trajectory consists of connected line segments only. With this simplification, an efficient suboptimal solution is proposed by leveraging the classic traveling salesman problem (TSP) method and applying convex optimization techniques. Simulation results show that the proposed trajectory design achieves significant performance gains in terms of the number of SNs whose data are successfully collected, as compared to other benchmark schemes.


I. INTRODUCTION
The last two decades have witnessed a dramatic advancement in the research and development of wireless sensor network (WSN) for applications in various fields. A WSN typically consists of a large number of sensor nodes (SNs) that are distributed in a wide area of interest. SNs are typically lowcost and low-power devices, which are able to sense, process, store and transmit information. Although the SNs usually have limited sensing, processing and transmission capabilities individually, their collaborative estimation/detection can be highly efficient and reliable [1], [2].
One typical application of WSN is for the estimation of an unknown parameter (such as pressure, temperature, etc.) in a given field based on noisy observations collected from distributed SNs. Specifically, each SN performs local sensing and signal quantization, then sends the quantized data to a Fusion Center (FC), where the received data from all SNs are jointly processed to produce a final estimate of the unknown parameter. Prior research on distributed estimation in WSN (see, e.g., [1], [2]) has mainly considered the static FC at a fixed location. As a result, SNs may require significantly different transmission power to send their data reliably to the FC due to their near-far distances from it, which results in inhomogeneous energy consumption rates of the SNs and thus limited lifetime of the WSN.
To overcome this issue, utilizing unmanned aerial vehicle (UAV) as a mobile data collector for WSN has been proposed C. Zhan  as a promising solution [3]- [5]. With on-board miniaturized transceivers that enable ground-to-air communications, UAVenabled WSN has promising advantages, such as the ease of on-demand and swift deployment, the flexibility with fullycontrollable mobility, and the high probability of having lineof-sight (LoS) communication links with the ground SNs. In contrast to fixed FCs, a UAV-enabled mobile data collector is able to fly sufficiently close to each SN to collect its sensed data more reliably, thus helping significantly reduce the SNs' energy consumptions, yet in a more fair manner. A fundamental problem in UAV-enabled WSN for distributed estimation is the design of the UAV's trajectory (see Fig. 1), which needs to take into account two important considerations. Firstly, for an SN to send its data reliably to the UAV, the UAV needs to fly sufficiently close to the SN (say, within a certain maximum distance assuming an LoS channel between them). Secondly, given a finite flight duration, the UAV's trajectory should be designed to "cover" (with respect to the given maximum distance) as many SNs as possible to optimize the distributed estimation performance (e.g., minimizing the mean square error (MSE) for the estimated parameter). Notice that in our prior work [5], the SNs' wakeup schedule and UAV's trajectory were jointly optimized to minimize the maximum energy consumption of all SNs, while ensuring that the required amount of data is collected reliably from each SN. In contrast to [5] where the UAV needs to collect independent data from all SNs, this paper considers that all SNs' data contains noisy observations of a common unknown parameter. As a result, their approaches for the UAV trajectory design are also fundamentally different.
UAV trajectory design for optimizing communication performance has received growing interests recently (see. e.g., [6]- [10]). In [6], the UAV's trajectory was jointly optimized with transmission power/rate for throughput maximization in a UAV-enabled mobile relaying system, subject to practical mobility constraints of the UAV. The energy-efficient UAV communication via optimizing the UAV's trajectory was studied in [7], which aims to strike an optimal balance between maximizing the communication rate and minimizing the UAV's propulsion power consumption. The deployment and movement of multiple UAVs, used as aerial base stations to collect data from ground Internet of Things (IoT) devices, was investigated in [8]. The work in [9] maximized the minimum throughput of a multi-UAV-enabled wireless network by optimizing the multiuser communication scheduling jointly with the UAVs' trajectory and power control. In [10], the UAV trajectory was designed to minimize the mission completion time for UAV-enabled multicasting. Different from the above work, this paper investigates the UAV trajectory design under a new setup for distributed estimation in WSN. The main contributions of this paper are summarized as follows: • First, we show that for distributed estimation in an UAVenabled WSN, minimizing the MSE is equivalent to maximizing the number of SNs whose sensed data are reliably collected by the UAV; • Second, with a given UAV flight duration, we formulate an optimization problem for designing the UAV's trajectory to maximize the number of covered SNs, subject to the practical constraints on the initial and final locations of the UAV as well as its maximum speed. Although the problem is NP-hard, we show that the optimal UAV trajectory consists of connected line segments only; • Third, with the above simplification, an efficient greedy algorithm is proposed to obtain a high-quality suboptimal trajectory solution by leveraging the classic traveling salesman problem (TSP) method and applying convex optimization techniques; • Last, numerical results show that the proposed trajectory design achieves significant performance gains in terms of the number of SNs with successful data collection as compared to benchmark schemes.

II. SYSTEM MODEL AND PROBLEM FORMULATION
As shown in Fig. 1, we consider a WSN consisting of N SNs arbitrarily located on the ground, denoted by U = {u 1 , u 2 , . . . , u N }. The horizontal coordinate of SN u n is denoted by w n ∈ R 2×1 , n = 1, · · · , N . Each SN can observe, quantize and transmit its observation for an unknown parameter θ to the FC, which estimates the parameter based on the received information.

A. Distributed Estimation
Each SN u i makes a noisy observation on a deterministic parameter θ (e.g., temperature). The real-value observation y i by SN u i is modeled as where n i is the observation noise that is assumed to be spatially uncorrelated for different SNs with zero mean and variance σ 2 i . We further assume that the noise variances for all SNs are identical, i.e., σ 2 i = σ 2 , ∀i. Denote by [−W, W ] the signal range that the sensors can observe, where W is a known constant that is typically determined by the sensor's dynamic range. In other words, The local processing at SN u i consists of the following: (i) an uniform quantizer with 2 Si quantization levels, where S i denotes the number of quantization bits and ∆ i = 2W 2 S i −1 represents the quantization step size; (ii) a modulator, which maps the S i quantization bits into a number of symbols based on certain modulation scheme, such as binary phase shift keying (BPSK); and (iii) transmission of the modulated symbols to the FC. It is shown in [11] that with uniform quantizer, the quantization noise variance for u i can be obtained as For a homogeneous sensor network with equal observation noise power for all SNs, we assume that all SNs generate the same number of quantization bits, i.e., S i = S, ∀i [1]. The FC then performs the linear estimation based on the received data from all SNs to recover θ using the Quasi Best Linear Unbiased Estimators (Quasi-BLUE) [2], and the corresponding MSE can be obtained as where K ≤ N is the number of SNs whose sensed data are reliably collected. The expression in (2) shows that for the considered distributed estimation, the MSE is inversely proportional to the number of SNs K whose data are reliably collected. Therefore, in order to minimize MSE for the distributed estimation, the FC should successfully collect data from as many SNs as possible.

B. UAV Data Collection
For the UAV-enabled WSN, a UAV is employed as a flying data collector/FC for a given time horizon T , which collects the quantized information from SNs and jointly estimates the parameter θ. It is assumed that the UAV flies at a fixed altitude of H in meter (m) and the maximum speed is denoted as V max in meter/second (m/s). The initial and final UAV horizontal locations are pre-determined and denoted as q 0 , q F ∈ R 2×1 , respectively, where q F − q 0 ≤ V max T so that there exists at least one feasible trajectory for the UAV to fly from q 0 to q F in a straight line within T . The UAV's flying trajectory projected on the ground is denoted as We assume that the transmit power for each SN is given (but can be different among SNs in general, depending on each SN's energy availability). Thus, in order to satisfy the minimum required signal-to-noise ratio (SNR) at the UAV for reliable data collection from each SN u n , the UAV location projected on the ground should lie within its communication range, which is denoted by r n . For each SN u n , define the coverage area D n {q ∈ R 2×1 | q − w n ≤ r n }. In general, an SN with smaller transmit power has a smaller r n given the same S for all SNs. As a result, the UAV can collect the data reliably from u n as long as it is within D n , as shown in Fig. 1. In the following, we refer to the event that the UAV enters into D n as UAV visits u n . For example, in Fig. 1, the UAV has visited SNs u 2 , u 6 , u 7 and u 8 . Since the number of quantization bits is typically small for practical applications (e.g., S = 10 bits) [1], the required transmission time for the quantized information can be neglected compared to the UAV flight time. In other words, as long as the UAV visits u n , we assume that the sensed data by u n can be reliably collected by the UAV.

C. Problem Formulation
Define the indicator functionÎ n (t) and indicator variable I n as follows,Î whereÎ n (t) indicates whether UAV is within D n or not at each time instant t, and I n indicates whether UAV visits D n (at least once) during the time horizon T . We assume that all the SNs' locations as well as their communication ranges are known to the UAV. The UAV trajectory design problem to maximize the number of visited SNs for distributed estimation is thus formulated as, In (P1), constraint (5) corresponds to the maximum UAV speed constraint, withq(t) denoting the time-derivative of q(t), and constraints (6) specify the initial/final locations for the UAV.

III. PROPOSED SOLUTION
(P1) is a non-convex optimization problem, since the objective function is a non-concave function, which involves timedependent indicator functions in terms of the UAV trajectory. In the following, we first show the structure of the optimal UAV trajectory solution to (P1).

A. Optimal Trajectory Structure and Problem Reformulation
Theorem 1. Without loss of optimality to problem (P1), the UAV trajectory can be assumed to consist of connected line segments only.
Proof. Theorem 1 is proved by showing that for any given feasible trajectory q(t) of (P1), which contains curved path, we can always construct another feasible trajectory q ′ (t) consisting of only connected line segments, which satisfies the conditions in (5), (6), and achieves the same objective value. Specifically, for any given q(t), the indicator variables I n can be obtained based on (3) and (4), and the objective value of (P1) (i.e., the number of visited SNs) can be obtained as K = N n=1 I n . Without loss of generality, we assume that the K visited SNs are u ω1 , u ω2 , . . . , u ωK , where ω i is the index of the visited SNs in U , 1 ≤ i ≤ K. Let q ωi be the waypoint that the UAV enters into D ωi for the first time, 1 ≤ i ≤ K, then q ωi = q(t ωi ), where t ωi = min{t |Î ωi (t) = 1, 0 ≤ t ≤ T }. We re-arrange q ωi with the increasing order of t ωi and obtain a sequence of ordered waypoins (q π1 , . . . , q πK ), where (π 1 , . . . , π K ) is a permutation of (ω 1 , . . . , ω K ). Let q π0 = q 0 and q πK+1 = q F . Then we have T = K i=0 T πiπi+1 , where T πiπi+1 denotes the flying time between waypoints q πi and q πi+1 along the given trajectory q(t). We can then replace any curved trajectory path between waypoints q πi and q πi+1 , 1 ≤ i ≤ K with a line segment and obtain the alternative trajectory q ′ (t). Thus, with the same flying time T πiπi+1 , the required flying speed q′ (t) can be reduced since line segment between any given pair of waypoints q πi and q πi+1 yields the minimum distance. Therefore, q ′ (t) satisfies the constraints (5) and (6), and yet achieves the same objective value for (P1). This concludes the proof of Theorem 1.
Based on Theorem 1 and its proof, (P1) can be solved by determining the optimal subset of SNs that are visited, denoted as U K ⊆ U with cardinality K, their optimal visiting order π = (π 1 , . . . , π K ), and the optimal waypoints q π k ∈ R 2×1 each for an SN u π k ∈ U K , such that the data from u π k can be received when the UAV is at q π k and the total distance of the resulting path p = (q π0 , . . . , q πK+1 ) is no greater than V max T . Therefore, (P1) can be reformulated as Consider a special case of (P2) with r n = 0, ∀n, (i.e., the UAV can collect data reliably from the SN only when it is directly above the SN), then only U K and the visiting order π need to be determined to maximize the number of visited SNs within duration T . This problem is essentially equivalent to the selective TSP problem (or orienteering problem), which is known to be NP-hard [12]. Therefore, problem (P2) with r n ≥ 0 is also NP-hard and more difficult to solve than TSP in general.

B. Proposed Algorithm for (P2)
One straightforward approach for solving (P2) is via exhaustively searching all possible subsets U K ⊆ U and the visiting order π of each U K , and then determining whether the minimum distance of path p that visits U K with order π is no greater than V max T . However, searching all possible subsets of U has an exponential complexity of O(2 N ), which is infeasible for large values of N . Therefore, we propose an efficient suboptimal solution to (P2) by a greedy iterative algorithm.
The key idea of our proposed solution is to maintain a working set C containing SNs that the UAV needs to visit, and add only one additional SN in C at each iteration. Initially, C is set as empty, and we make a greedy choice to select u k from the complement set U \ C, which leads to the minimum traveling distance to visit C {u k }. The above process iterates until C = U or when the required visiting time is greater than T . Let w 0 = q 0 and w N +1 = q F . The proposed greedy algorithm for (P2) is summarized in Algorithm 1. In Algorithm 1, d max is the flying distance of the UAV that flies over each SN following the increasing index of all the SNs in U , which is an upper bound of the minimum flying distance to visit all SNs in U .
Algorithm 1 Proposed algorithm for (P2) for each u k ∈ U \ C do; 6: U K ← C {u k }; 7: Given U K , solve (P3) and denote the optimized objective value and trajectory as d 0 and Q 0 ; 8: if d 0 ≤ V max T and d 0 < d min then 9: Note that in step 7 of Algorithm 1, the UAV trajectory is designed with a given SN set U K to minimize the UAV traveling distance. The problem is formulated as In Algorithm 1, after executing the inner iteration from step 5 to step 11, if adding any additional SN in the complementary set U \C leads to a traveling distance greater than V max T , then step 9 will not be executed and d min remains equal to d max as initialized in step 4, and the outer iteration in step 3 terminates. Otherwise, step 9 will be executed and one additional SN will be added into C with d min < d max , and the outer iteration continues. Therefore, the size of C increases over the iterations until either C = U or adding any additional SN will lead to a traveling distance greater than V max T ; thus, Algorithm 1 is guaranteed to converge. Furthermore, Algorithm 1 requires at maximum O(N 2 ) iterations, which is significantly less than O(2 N ) required by exhaustive search. Thus, the remaining task for Algorithm 1 is to solve problem (P3). Note that solving (P3) includes determining π and the waypoints {q π k , 1 ≤ k ≤ K}. (P3) is essentially equivalent to the TSP with neighborhoods (TSPN), which is known to be NP-hard [13]. To solve (P3), we propose an efficient method for waypoints design based on TSP method and convex optimization. Specifically, the visiting order π for the SNs in U K is first determined by simply applying the TSP algorithm over the SNs in U K while ignoring the coverage (disk) region of each SN. Since the initial and final points of the UAV are fixed, π can be obtained by using a variation of the TSP method (No-Return-Given-Origin-And-End TSP) [10]. Various algorithms have been proposed to find high-quality solutions to TSP efficiently, e.g., with time complexity O(K 2 ) [14]. With the visiting order π determined, the optimal waypoints q π k can be obtained by solving the following problem, Algorithm 2 Trajectory design algorithm for (P3) 1: Input:U K ; 2: Obtain visiting order π by using the No-Return-Given-Origin-And-End TSP method [10]; 3: Solve (P4) to obtain q π k and d K ; 4: Construct trajectory Q based on π and q π k with line segments; 5: Q 0 ← Q; d 0 ← d K ; 6: Output:Q 0 , d 0 ; Note that the objective function of (P4) is a convex function with respect to q π k , and the coverage area D π k is a convex set. Thus, (P4) is a convex optimization problem, which can be solved by standard convex optimization techniques or existing software such as CVX [15], with polynomial complexity. Let q π k − q π k−1 . The trajectory design algorithm for (P3) with given U K is summarized in Algorithm 2.

IV. NUMERICAL RESULTS
We consider a WSN with N = 40 SNs, which are randomly located within an area of size 4.0 km × 4.0 km. The following results are based on one random realization of the SN locations as shown in Fig. 2. The UAV's initial and final locations are respectively set as q 0 = [−2km, −2km] T and q F = [2km, 2km] T , and V max is set as 50m/s. We assume that the communication range r n of different SNs is identical, i.e., r n = r, ∀n. If not stated otherwise, we set r = 200 m. For performance comparison, we also consider two benchmark schemes, namely strip-based and zig-zag line trajectories for the UAV, as described in the following.
For the strip-based trajectory, the area of interest is partitioned into rectangular strips that are perpendicular to the line connecting q 0 and q F . Furthermore, each strip has width 2 min n r n = 2r so that all SNs within the strip will be visited as the UAV travels along the strip, as shown in Fig. 2. If the rectangular strips exceed the boundary of the area of interest, then the UAV just travels along the intersection between the borderlines of the area and these rectangular strips, which can be uniquely determined. With such strip-based trajectory, the number of visited SNs increases with the height of the strips. Therefore, a bisection search method can be used to determine the maximum height of the strips so that the total UAV flying distance is no greater than V max T . On the other hand, the zig-zag line trajectory is similar to the strip-based trajectory, but with the difference in that rectangular strips are replaced with zig-zag lines. The two benchmarks lead to rather intuitive UAV trajectories for different values of T . For example, when T is small, say T = T min qF −q0 Vmax , the two benchmarks yield the same path that directly connects q 0 and q F . When T increases, the heights of the strips and zig-zag lines increase since the width of the strip and parallel zig-zag lines are fixed as 2r. Therefore, when T is sufficiently large, both benchmark schemes result in UAV trajectories covering the entire area of interest, so that all SNs will be visited by the UAV.
The optimized trajectories with different schemes with T = 400 s are shown in Fig. 2. It is observed that with our proposed solution, the UAV can visit more SNs than the two benchmark schemes. In Fig. 3(a), we compare the number of visited SNs by our optimized trajectory with the two benchmark trajectories for different T . As expected, our proposed design significantly outperforms both benchmarks. It is observed that the performance gain is more substantial with small T > T min . As T becomes sufficiently large, all the three trajectories can visit all SNs, but our proposed scheme requires much less time to visit all SNs. It is also observed that the strip-based trajectory gives better performance than the zig-zag line trajectory. This is because the zig-zag line trajectory in general has smaller coverage areas than the stripbased trajectory with the same traveling distance or T (see Fig. 2). Furthermore, we study the effect of the SNs' communication range r on the system performance. Fig. 3(b) plots the number of visited SNs versus r when T = 200 s. It is observed that for all the three schemes, the number of visited SNs increases with r, as expected; and the proposed trajectory outperforms the two benchmarks significantly, especially for small r.

V. CONCLUSION
This paper studies the trajectory design for distributed estimation in a UAV-enabled WSN to minimize the MSE for the estimation, which is shown equivalent to maximize the number of SNs with successful data collection by the UAV. Although the formulated problem is NP-hard, we reveal that the optimal UAV trajectory consists of connected line segments only. We then propose a greedy algorithm with low complexity based on TSP method and convex optimization to obtain a suboptimal trajectory solution. Numerical results demonstrate that the proposed design significantly improves the number of visited SNs and hence the estimation performance, as compared to the benchmark schemes.