Optimization of UAV-Aided Millimeter-Wave IoT Systems

: Due to their maneuverability, unmanned aerial vehicles (UAVs) have grown into a promis-ing enabler of the Internet of Things (IoTs). In addition to the beneﬁts of the bandwidth and communication quality of millimeter-wave (mmWave) systems, a UAV-aided mmWave multiple-input and multiple-output (MIMO) communication system is investigated in this paper for the data collection of IoT systems, in which single-antenna IoT devices are divided into several clusters, and the UAV aided mmWave base station (UAV-BS) collects data from each cluster using the time division scheme. The joint optimization of the beam selection, UAV trajectory, user clustering, power allocation and transmission duration is studied in this paper to improve the data collection efﬁciency. The solution of the problem is then given in three steps. Firstly, the incremental K -means clustering and ant colony optimization algorithm are utilized to handle the UAV trajectory planning and user clustering problem. Secondly, an incremental beam selection scheme is employed to ensure that all the devices in each cluster can communicate with the UAV. Thirdly, an iterative algorithm is proposed by alternately optimizing the power allocation and transmission duration of the IoT devices. Finally, the simulation results demonstrate the effectiveness of the proposed solution for the UAV-aided


Introduction
Unmanned aerial vehicles (UAVs) have been investigated in a wide range of applications, such as security monitoring, smart agriculture, aerial photography and cargo delivery [1]. UAV-assisted wireless communication has attracted a great deal of attention due to its mobility, flexibility and low cost and the high probability of establishing line of sight (LoS) air-to-ground communication links [2]. UAVs, which have been involved in mainly three applications of wireless communication-aerial relays, data collection and seamless coverage-can significantly assist the existing terrestrial communications to obtain better performance [3]. In particular, one of the leading challenges in the Internet of Things (IoT) is to achieve efficient data collection from massive IoT devices. The employment of UAVs can effectively enhance the coverage of IoT devices and significantly reduce the overhead [4].
Aiming to improve the efficiency of UAV-assisted data collection, several works have been proposed to optimize the UAV trajectory and the communication systems. By properly adjusting the placement or trajectory design of the UAV, the communication distances between the UAV and ground devices can be greatly decreased, and hence better channel gain can be obtained [5]. In [6], the data collection time allocation, energy transfer and UAV trajectory planning were jointly optimized to minimize the average age of information for the data collection, where the UAV was utilized to transfer energy and collect data from the ground devices. In [7], the UAV was employed as an aerial relay to minimize the average peak age of information by jointly optimizing the UAV trajectory, energy allocation and service time allocation. In [8], a multiantenna UAV was utilized to collect data from hovers at a fixed height to collect data from several clusters of ground IoT devices in a time-division scheme. In the proposed UAV-BS, the lens array is adopted by the UAV-BS to perform the receiver beamforming. As a result, the sparse beamspace MIMO channel is formed, and the parts of the beams containing the most signal power for ground devices are near LoS paths. Meanwhile, the UAV trajectory is optimized to obtain better channels. Consequently, we formulate a joint optimization problem of UAV trajectory planning, user clustering, beam selection, power allocation and transmission duration to maximize the data collection efficiency, subject to the practical energy constraints of IoT devices. As the problem is nonconvex and the variables are coupling with each other, it is challenging to directly address the problem.
To tackle the proposed complex problem, we decompose it into three subproblems. The first is to attain the optimal beams given the optimal UAV trajectory. The last problem is the joint allocation of power and transmission duration to maximize the data collection efficiency. For the first subproblem, an incremental K-means clustering algorithm and the ant colony optimization (ACO) algorithm are utilized to solve the problem. For the second subproblem, an incremental beam selection algorithm is proposed by incrementally maximizing the sum rate of the mmWave UAV system. The beams that make the highest contribution to the sum rate are selected by the UAV-BS. For the third subproblem, an iterative algorithm is proposed, and the power allocation and transmission duration allocation is optimized in an iterative way. The main contributions of this paper are summarized as follows: • With the UAV trajectory obtained by the incremental K-means clustering and ACO algorithm, an incremental beam selection algorithm for the UAV-BS is proposed to maximize the sum rate of the IoT devices. Zero forcing (ZF) beamforming is utilized to eliminate the interference between IoT devices. • Based on the obtained UAV trajectory, user clusters and the selected beams, the allocations of the transmitting power and transmission duration of the UAV-BS are optimized by alternately optimizing the power allocation and transmission duration, aiming to maximize the data collection efficiency of the UAV-aided mmWave communication systems. • The sum-rate performance of the proposed incremental beam selection scheme and the iterative algorithm are investigated. Simulation results demonstrate the effectiveness of the proposed incremental beam selection scheme and the iterative algorithm.
The symbol notation is summarized in Table 1.

Symbol Defination
ith row and jth column elements of A A \ B The set consisting of all elements in A excluding those in B The rest of the paper is organized as follows. In Section 2, we present the system model to formulate the optimization problem. In Section 3, the data collection efficiency of the mmWave UAV communication is optimized. Section 4 shows the simulation results and discussion. Finally, Section 5 provides a summary of the main contributions of the study.

Transmission Model
As shown in Figure 1, we consider a mmWave uplink communication system consisting of K IoT devices and a rotary-wing UAV-BS. Each IoT device is equipped with a single antenna. The UAV-BS is equipped with N r antennas to improve the data collection efficiency. All the devices are divided into N orthogonal clusters. The number of devices in the nth cluster is denoted as M n , n = 1, 2, · · · , N. The N clusters are scheduled under a time-division regime. The UAV-BS utilizes L n , n = 1, 2, · · · , N RF chains to achieve data collection from IoT devices in cluster n. In particular, L n ≤ N r . Furthermore, the UAV-BS adopts the fly-hover protocol [27] to collect data from the devices. Specially, for this fly-hover communication protocol, the UAV-BS successively visits the N hovering locations and communicates with the devices when it is hovering at the optimized locations. Since the UAV-BS has limited on-board energy, the energy for hovering is restrained. Thus, the communication duration between the UAV-BS and the devices is restricted by total transmission duration T. The adjustable transmission duration for cluster n is defined as τ n , and τ n should satisfy the following constraints: Since the energy of each device is also restrained, the transmitting power p m,n of the mth device in cluster n should satisfy 0 ≤ p m,n ≤ P m,n max , ∀m, n, p m,n τ n ≤ E m,n max , ∀m, n, where P m,n max denotes the peak transmitting power of the mth device in cluster n, and E m,n max is the total energy of the mth device in cluster n. In particular, due to the limited energy, the total serving time T for UAV is relatively short. We assume that p m,n is constant during the transmission duration τ n . Furthermore, for cluster n, the budget power P n budget and the budget transmission duration τ n budget are adopted to fit the dynamically changing amount of data [8]. If the amount of the data is not very large, the budget power and budget transmission duration should be relatively small. Otherwise, τ n budget and P n budget are set to be large for data transmission. Then, the following constrains can be derived: τ n ≤ τ n budget , ∀n.
Without loss of generality, we consider a 3D Cartesian coordinate, and thereby the horizontal coordinates of the mth device in cluster n are defined as u u u m,n = [x m,n , y m,n ] T . We consider that the UAV is flying at a fixed height H U . The coordinates of the UAV projected on the ground for cluster n can be defined as q q q n = [q x,n , q y,n ] T . Thus, the distance between the mth device in cluster n and the UAV is given by

Channel Model
The channels between the devices and the UAV-BS are mmWave channels. Taking the limitation of scattering in mmWave frequency into account [17], we assume that the air-to-ground links between the UAV-BS and the devices are dominated by line-of-sight (LoS) channels. Thus, the large-scale path loss between the UAV-BS and the mth device in cluster n can be expressed as [14,28] L LoS m,n = 32.4 + 20 log 10 ( f mm ) + 20 log 10 (d m,n ), where f mm is the carrier frequency in gigahertz, and d m,n is the distance in meters. Consequently, the gain of the LoS path from the mth device in the cluster n to the UAV-BS can be derived as β m,n = 10 −L LoS m,n /10 .
Then, the channel vector between the UAV-BS and the mth device in the nth cluster can be modeled as [29] h h h m,n = β m,n a a a(θ m,n ), where a a a(θ m,n ) ∈ C N r ×1 is the array steering vector of the mth device in cluster n. We adopt a uniform linear array (ULA) in the mmWave UAV-BS, and the array steering vector for the mth device in cluster n is expressed as a a a(θ m,n ) = 1, e j2π d λ θ m,n , e j2π d λ 2θ m,n , where λ is the signal wavelength, and d is the antenna spacing satisfying d = λ/2. In addition, θ m,n is the steering angle defined as θ m,n = cos(φ m,n ), where φ m,n represents the real angle of arrival of the mth device in cluster n. In particular, in this article, θ m,n is defined as the cosine value of the direction value between the mth device in cluster n and the forward direction of the UAV [18]. The forward direction of the UAV is dependent on the next location of the UAV and is defined as q q q f n = [q x,n+1 − q x,n , q y,n+1 − q y,n , 0] T . Thus, θ m,n can be expressed as The received signal at UAV-BS for cluster n is given by y y y n = H H H n s s s n + n n n n = M ∑ m=1 h h h m,n s m,n + n n n n , where H H H n ∈ C N r ×M n is channel matrix for cluster n. s s s n ∈ C M n ×1 is the signal vector for M n devices in cluster n, and s m,n is the transmitted signal of device m in cluster n with E(|s m,n | 2 ) = p m,n . n n n n ∈ C N r ×1 is the additive white Gaussian noise (AWGN), and each entry of n n n n has the distribution CN (0, σ 2 ).

Beamspace Communication
Beamspace MIMO architecture adopts a lens antenna array as the analog beamforming module. By employing the lens antenna array, the signals are transformed into the beam domain or angular domain, and in this way, each beam only contains the signal from a specific direction [20]. Mathematically, the lens antenna array operates a spatial discrete Fourier transform (DFT) matrix U U U to the antenna domain signals. The DFT matrix U U U consists of the steering vectors for N r fixed spatial frequencies/angles with uniform spacing, and thereby the DFT matrix U U U is defined as where ψ i = i N r and i = 0, 1, · · · , N r − 1, are the predefined uniform spacings. Thus, N r candidate beams could be selected by each cluster of devices. In order to avoid multiple selections of the same beams for different users, we assume M n ≤ N r .The beamforming matrix U U U ∈ C N r ×N r makes N r orthogonal spatial beams form the basis of the spatial signal space. U U U is unitary and satisfies U U UU U U H = U U U H U U U = I I I.
Then, the signal after receiving spatial discrete DFT can be expressed as y y y b n =H H H b n s s s n + n n n n,b =U U U T H H H n s s s n + U U U T n n n n , where n b ∈ C N r ×1 is the beamspace noise vector for cluster n. H b n ∈ C N r ×M is the beamspace channel matrix for cluster n and also can be expressed as where h h h b m,n ∈ C N r ×1 is the beamspace channel of the mth device in cluster n. Due to the sparse nature of the beamspace channel [30], each device has only a few dominant entries of the beamspace channel. As a result, a small number of beams can be chosen to reduce the dimension of the UAV mmWave communication system without significant performance loss. Let A A A L n ∈ C L n ×N r denote the beam selection matrix; thus, the received signal can be rewritten as where A A A L n = [e e e i 1,n ; e e e i 2,n ; · · · ; e e e i L,n ], and e e e i l,n ∈ C 1×N r , 1 ≤ l ≤ L n represents the i l th row of the N r -dimensional identity matrix I N r for the cluster n.Ĥ H H n is the reduced beamspace channel matrix.

Digital Beamforming
In order to detect users' uplink signals, ZF beamforming is adopted to eliminate multiuser interference. According to the criterion of ZF, the received digital beamforming matrix for the nth cluster consists of the pseudo inverse ofĤ H H n , which is given by After the ZF beamforming process, the detected signal at the receiver can be written as

Problem Formulation
Based on (19), the uplink sum rate of the UAV mmWave communication system can be expressed as where γ m,n is the signal-to-interference-plus-noise ratio (SINR) of the mth device in cluster n, which is given by [31] γ m,n = p m,n On the basis of (20) and (21), it is obvious that the SINR of the mth device in cluster n is dependent on the reduced beamspace channelĤ H H n and the transmitting power p m,n of the mth device in cluster n. With the aim of achieving the maximal data collection efficiency, an immediate and basic problem is finding the best UAV trajectory. The clustering method is also quite important for the maximization of the data collection efficiency of the UAV mmWave communication system. Moreover, according to (17), we can know that the reduced beamspace channel is involved with beam selection. Thus, each device needs to select appropriate beams to maximize the data collection efficiency.
To maximize the data collection efficiency, we also need to take account of the UAV-BS transmission duration constraint, the peak transmitting power and the energy limitation of each device, as well as the budget power and budget transmission duration constraints of each cluster. Thus, the problem can be formulated as M ∑ m=1 p m,n ≤ P n budget , ∀n.
Based on the above, in order to maximize the data collection efficiency, the UAV would collect a large amount of data from the devices with a high sum rate, whereas a small amount would be collected from others.The above problem is nonconvex [32] and challenging, not only due to the complicated objective function with an expectation operator but also due to the fact that the variables to be optimized are coupled with each other.

Solution of the Problem
It is difficult to directly solve the problem in (22) because of the coupling variables and the nonconvex objective function and constraint (22e). Motivated by the "divide and conquer" concept, the original problem is tackled in three steps. First, since the UAV trajectory is entangled with the clustering strategy, by introducing the K means clustering algorithm and ACO algorithm, the UAV trajectory and the user clustering can be determined. Secondly, giving the trajectory of the UAV and the user clustering, a beam selection scheme is proposed to determine the selected beam set. After finding the optimal trajectory of the UAV, user clustering and the selected beam set, the coupled transmitting power and transmission duration can be solved in an iterative way.

Solution of the UAV Trajectory and User Clustering
Our proposed solution is to use a K-means clustering algorithm to partition the K devices into N subsets that represent N coverage areas of the UAV-BS. If the UAV-BS is assigned to service a subset, it will position itself in the subset centroid and serve up to N r devices inside of that subset. This is because the maximal N r beams can be utilized to serve devices. In order to avoid multiuser interference, each beam can be selected by a single device, namely L n = M n . Then, the UAV successively visits N hovering locations, and the trajectory planning of the UAV can be solved by the ACO algorithm.
In this paper, we assume the wireless links between the UAV and the devices are dominated by LoS. According to [9], it has been demonstrated that the UAV altitude H U and the coverage radius R cov determine the LoS probability. Meanwhile, the LoS probability is also dependent on the environment condition. In particular, in suburban areas, given a fixed UAV altitude H U , when the maximal coverage radius of the UAV R cov max ≈ H U / tan(0.52), the wireless channels in the coverage area are dominated by the LoS.
We assume that the locations of K devices before clustering are defined as u u u k = [x k , y k ] T , 1 ≤ k ≤ K. In the K-means clustering algorithm, the partition criterion is based on a sum-of-squared-error criterion [11], which can be expressed as where u k,n ∈ 0, 1 is a binary variable, denoting whether the kth device belongs to the nth cluster. u k,n = 1 means that the kth device belongs to the nth cluster, and we define u u u m,n = u u u k , 1 ≤ m ≤ M n . When u k,n = 0, the kth device will not be assigned to the cluster n. q q q n is the center location of the nth cluster, denoting the UAV location in cluster n. In particular, the center location of a certain cluster is calculated by all devices in that cluster, which is given by where n = 1, 2, · · · , N. Hence, we utilize the K-means clustering algorithm to partition the devices and determine the UAV locations. Since the K-means clustering algorithm assumes that the number of clusters is known, we determine the cluster number in an incremental way. We first start with a minimum cluster number K = 1. Then, we increase the number of N until both constraints of the maximum UAV coverage area and the maximal number of devices that the UAV can serve at the same time are satisfied. The proposed solution of the UAV trajectory and user clustering with an incremental K-means clustering algorithm is summarized in Algorithm 1.

Algorithm 1
The proposed solution of the UAV trajectory and user clustering with an incremental K-means clustering algorithm.
Require: u u u k ,for 1 ≤ k ≤ K, R cov max ,N r Ensure: N, q q q n , u u u m,n ,for 1 ≤ m ≤ M n and 1 ≤ n ≤ N 1: Initialization: initial clustering number N = 1. 2: Repeat 3: Randomly select N ini points in the target area as the center points q q q n , 1 ≤ n ≤ N ini .

4:
Repeat 5: Calculate the Euclidean distance between each device and any center of cluster. 6: if u u u k − q q q n < u u u k − q q q j 1 ≤ k ≤ K, 1 ≤ n ≤ N ini , j = n 7: u u u m,n = u u u k , the kth device is allocated in the cluster n 8: end if 9: Recalculate the center of the clusters based on (24) 10: Until none of the q q q m is updated. 11: Calculate the maximal distance r max between the devices and the its cluster center, and count the amount of devices in each cluster M n . 12: if r max ≤ R cov max and M n ≤ N r 13: break 15: else 16:

end if
In order to collect data from each cluster, these N clusters are scheduled under multiple access time division. UAV trajectory planning is performed to utilize the minimum energy required for visiting N clusters. Since a UAV's flying energy consumption is dependent on the flying distance, the UAV trajectory planning can be transformed into finding the shortest route to visit N clusters in turn. Therefore, the UAV trajectory problem is a classic traveling salesperson problem, which can be solved by the ACO algorithm [33].

Incremental Beam Selection Scheme
Owing to the sparse structure of the beamspace channel, the beamspace channel for the mth device in the cluster n has dominant beams, and the number of RF chains can be reduced [34]. Given the UAV position of the nth cluster q n q n q n and the transmitting power of the mth device in cluster n, the beamspace channel H H H b n and the sum rate are known. The proposed beam selection scheme selects the beams whose contribution is the best in terms of the sum rate. With the aim of minimizing the number of RF chains L n of cluster n, we assume that each device is served by only one beam, and thereby L n = M n . The number of candidate beams is N r , and the indices of the beams which are selected by the devices in the nth cluster are stored in beam set L n .
Based o (18)-(21), we can select the required beams for the devices in the nth cluster one by one based on the incremental beam selection algorithm, which identifies the beams with the maximal gains in terms of sum rate. This incremental beam selection algorithm is summarized in Algorithm 2.

Ensure: A A A
for ii = 1 : j 10: end 12: 13: end 14: i j = arg max ∀i R (i)

15:
L n = L n ∪ i j

16:
L R n ← L R n \ i j 17: end 18: A A A L n = [e e e i 1,n ; e e e i 2,n ; · · · ; e e e i L,n ], i l ∈ L n

Iterative Solution
Given the UAV positions q q q n and the beam selection scheme, the main problem of tackling the optimization problem (22) is the coupling relationship between the transmission duration τ n and the transmitting power p m,n . To solve this problem effectively, we recast it into two subproblems. One is power allocation for a given transmission duration, and the other is allocating the transmission duration given the transmitting power p m,n . The two subproblems are solved alternately. Finally, the proposed iterative optimization algorithm is summarized. ). (26) It is easy to observe that d 2 R m,n dp 2 m,n < 0. (27) Consequently, R m,n is concave with respect to p m,n . The constraint is also convex with respect to p m,n . Therefore, the problem (25) is a convex optimization problem which can be solved by CVX effectively.

Transmission Duration Allocation
With the power allocation p t−1 m,n obtained by solving (25), the transmission duration optimization can be formulated as It is easy to see that the objective function and constraints are both convex. Thus, the problem (28) is a convex optimization problem. In order to efficiently solve the optimization problem (28), the communication duration T should be considered in three cases. The first one is T ≤ τ 1 ; the second one is τ 1 < T ≤ ∑N n=1 τN, 2 ≤N < N; the third one is T ≥ ∑ N n=1 . If T is not large enough to complete the communication mission of all clusters, the cluster with the highest sum rate will be served as a priority. As a result, the clusters are reordered according to For the first case, T ≤ τ 1 , which also can be written as Thereby, the optimal solution of optimization problem (28) is given by For the second case, τ 1 < T < ∑N n=1 τN, 2 ≤N < N can be rewritten as The optimal solution of (28) can be written as For the third case, T ≥ ∑ N n=1 can be rewritten as The optimized solution of optimization problem (28) is shown as Based on the above discussion, an iterative algorithm is proposed to alternately solve the optimization problems (25) and (28), as summarized in Algorithm 3. For {p t m,n }, solve problem (28) with the consideration of three cases to obtain the optimal solution denoted as {τ t n }.

5:
Update: t = t + 1. 6: Until The increase of the ∑ N n=1 τ n R n is less than a threshold ε > 0, or the maximal number of iterations is reached.
It is clear that the achievable data collection efficiency increases with the increased number of iterations, which can be shown as Thus, Algorithm 3 exhibits convergence.

Performance Analysis
In this section, we evaluate the performance of the proposed algorithm. We consider that a UAV visits N clusters in turn and collects data in a mmWave system. The terrestrial devices are randomly distributed in the square area of [0, 500] T × [0, 500] T (m 2 ), and the UAV flies right above the coverage area. The UAV flying trajectory starts from q q q I = [0, 0] T and ends at the same point. The CPU of our computer was Intel i9, and the RAM was 16 GB. The main default parameters of this simulated UAV mmWave communication system are listed in Table 2. 28 GHz Peak transmitting power P m,n max , ∀m, n 300 mW Budget power P n budget , ∀n 500 mW Figure 2 depicts the optimized UAV trajectory and the square UAV trajectory, both with the aid of the proposed incremental beam selection scheme and the iterative algorithm. The number of devices is K = 20. All the devices are divided into N = 4 clusters. Each cluster has an unequal number of devices. The total communication duration T is set as T = 200 s, and the budget transmission duration T n budget , ∀n is T n budget = 100 s. The total energy constraint of each device E m,n max , ∀m, n is equal to 4 J. The UAV flies at a fixed height of H U = 100 m. Figure 2a shows the optimized UAV trajectory and the corresponding clustered devices, while Figure 2b shows the square UAV trajectory and the devices in each cluster. Specifically, the data collection efficiency of the optimized UAV trajectory is about 1764 bits/Hz higher than that achieved by the square UAV trajectory.   Figure 3 depicts the data collection efficiency as the function of the total energy constraint of each device for the proposed optimized UAV trajectory, in comparison with the performance attained by the square UAV trajectory. The both trajectories are aided by the incremental beam selection and iterative algorithm. The system has K = 20, N = 4, T = 200 s, T n budget = 100 s, and H U = 100 m. As expected, the optimized UAV trajectory outperforms the square UAV trajectory. In particular, for the system with E m,n max = 8 J, ∀m, n, the data collection efficiency attained by the proposed optimized approach is about 2868 bits/Hz higher than that of the square UAV trajectory.  In Figure 4, we investigate the cluster results versus the number of devices of the proposed scheme. Figure 2a shows the cluster number and the maximum distance r max between the UAV and the device versus the number of devices of the proposed scheme. Figure 2b shows the maximum number of employed beams versus the number of devices of the proposed scheme. The number of devices in each cluster is unequal. When the UAV flies at a fixed height H U = 100 m, and the maximum coverage radius of the UAV is R cov max = 174 m. When the height of UAV is 80 m, the maximum coverage radius of the UAV is R cov max = 140 m. The maximum number of devices in each cluster is 16. Each device is served by a single beam. It can observed from Figure 4 that the number of clusters increases with the increasing number of devices, due to the limited coverage area R cov max and the constraint of the maximum number of devices in each cluster. From Figure 4, the tight constraint of R cov max has an influence on the number of clusters. When K = 80, the cluster number of H = 100 m is 6, and r max ≈ 132 m. Meanwhile, the maximum number of employed beams is 16. However, for K = 80 and H = 80 m, the cluster number is 7, and r max ≈ 140 m. Meanwhile, the maximum number of employed beams is 16.  In Figure 5, we compare the data collection efficiency as a function of the total energy constraint of each for device for the proposed scheme and the square trajectory with average time and power. The system setup is K = 20, N = 4, T = 300 s, T n budget = 200 s, ∀n, and H U = 100 m. For the square trajectory with average time and power, τ n = T/N, ∀n, and p m,n = min{P max , E m,n max /τ n , P budget /M n }, ∀n [29]. The MCMS scheme is utilized for the square trajectory with average time and power scheme. From Figure 5, the proposed scheme shows better performance than the square trajectory scheme with average time and power.  Figure 6 compares the data collection efficiency as a function of the total energy constraint of each device for the proposed incremental beam selection scheme and the maximum channel magnitude scheme (MCMS) [34], both adopting the proposed UAV trajectory and user clustering scheme and the iterative algorithm. Since the proposed scheme selects one beam for each device, the MCMS with one beam per device is selected as a reference. There are K = 20 devices randomly distributed in the specific area. All the devices are separated into N = 4 clusters, and the number of devices in each cluster is different. The total communication duration T is 400 s, and the budget transmission duration T n budget , ∀n is set as T n budget = 200 s. The UAV flies at a fixed height of H U = 100 m. As shown in Figure 6, the data collection efficiency of the incremental beam selection scheme significantly outperforms that of the MCMS. This is because the MCMS select the strongest beam for each device, and thereby some devices may share the same beam, which causes interference from the same beams for different devices.
In Figure 7, we compare the data collection efficiency as a function of the total energy constraint of each device for the proposed iterative algorithm and traditional scheme, both with the aid of the proposed UAV trajectory and user clustering scheme and the incremental beam selection scheme. The system setup is K = 20, N = 4, T = 300 s, T n budget = 200 s, ∀n and H U = 100 m. In the traditional scheme, τ n = T/N, ∀n, and p m,n = min{P max , E m,n max /τ n , P budget /M n }, ∀n, which is widely used in the literature [8]. From Figure 7, the proposed iterative scheme shows better performance than the traditional scheme. For E m,n max = 8 J, ∀m, n, the data collection efficiency of our proposed iterative scheme is about 1000 bits/Hz higher than that of the traditional scheme. Figure 8 investigates the data collection efficiency versus the total serving time for the proposed scheme with a different total energy constraint for each device. The system setup is K = 20, N = 4, T n budget = 200 s and H U = 100 m. The total energy constraint for each device E m,n max is 8 J or 14 J, ∀n. It can be observed from Figure 8 that, given the total energy constraint for each device, the data collection efficiency increases with the increased serving time T. When T = 300 s, the data collection efficiency of E m,n max = 14 J is about 1780 bits/Hz higher than that of E m,n max = 8 J.

Conclusions
In this paper, a UAV-aided mmWave communication system for the IoT is considered, and the maximization problem of the data collection efficiency is investigated, where the UAV trajectory planning, user clustering, beam selection, power allocation and transmission duration allocation are jointly optimized. To tackle this complex and nonconvex problem, we have decomposed it into three subproblems. Firstly, the incremental K-means clustering algorithm and ACO algorithm are proposed to solve the joint subproblem of UAV trajectory planning and user clustering, in which the cluster number, clustering method and hovering location of UAV are optimized according to the incremental K-means cluster algorithm. The UAV trajectory planning is transformed into a traveling distance minimization problem, which is solved by the ACO algorithm. Then, an incremental beam selection scheme is proposed to implement beam selection with one beam per device. With the aid of optimal UAV trajectory planning and the incremental beam selection scheme, an iterative algorithm is proposed to maximize the data collection efficiency by alternately solving the power allocation and transmission duration allocation problems. The data collection efficiency is finally evaluated for the proposed algorithm, and the results demonstrate that the proposed solutions can achieve excellent performance.
Our future work may focus on the unitary planar array (UPA). The UAV-BS utilizing UPA could place more antennas in small area. The UPA includes the elevation angle and azimuth angle, and thereby the beamforming of UAV-BS can be carefully designed to achieve better performance.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author.

Conflicts of Interest:
The authors declare no conflict of interest.