 Research
 Open Access
 Published:
Trajectory planning in UAV emergency networks with potential underlaying D2D communication based on Kmeans
EURASIP Journal on Wireless Communications and Networking volume 2021, Article number: 107 (2021)
Abstract
At present, unmanned aerial vehicles (UAVs) have been widely used in communication systems, and the fifthgeneration wireless system (5G) has further promoted the vigorous development of them. The trajectory planning of UAV is an important factor that affects the timeliness and completion of missions, especially in scenarios such as emergency communications and postdisaster rescue. In this paper, we consider an emergency communication network where a UAV aims to achieve complete coverage of potential underlaying devicetodevice (D2D) users. Trajectory planning issues are grouped into clustering and supplementary phases for optimization. Aiming at trajectory length and sum throughput, two trajectory planning algorithms based on Kmeans are proposed, respectively. In addition, in order to balance sum throughput with trajectory length, we present a joint evaluation index. Then relying on this index, a third trajectory optimization algorithm is further proposed. Simulation results show the validity of the proposed algorithms which have advantages over the wellknown benchmark scheme in terms of trajectory length and sum throughput.
Introduction
Motivation
With the continuous update and iteration of communication technology, the era of fifthgeneration wireless systems (5G) has quietly come to us and gradually opened up a new phase of interconnection of all things. In the evolution of 5Goriented wireless communication technology, on the one hand, traditional wireless communication performance indicators need to be continuously improved to further improve the limited and increasingly tight wireless spectrum utilization; on the other hand, richer communication modes, resulting improvement of enduser experience and expansion of cellular communication applications are also evolving directions to be considered.
Devicetodevice (D2D) communication, as one of the key technologies of 5G, has potential to improve system performance, enhance user experience and expand application of cellular communication and has received wide attention [1]. D2D is more flexible than other direct technologies that do not rely on infrastructure. It can not only connect and allocate resources under control of the base station (BS), but also exchange information when there is no network infrastructure. In addition, there is a relay scenario where users without network coverage can access the network by using their device as a springboard. D2D communication is mainly used in public safety scenarios such as natural disasters and equipment failures. This scenario is of great practical significance and has been supported by several national operators, such as the USA, which is preparing to allocate part of the spectrum on the 700 MHz frequency band specifically as D2D emergency communication resources.
In emergency network scenarios, it is very necessary for public and secure communication to respond in the first time. With the advantages of high mobility and flexible deployment, unmanned aerial vehicle (UAV) has become an important part of wireless network and is also a key driving factor of 5G and future wireless Internet of things (IoT). Especially as an air base station, it does not need to rely on infrastructure and road conditions like ground communication equipment, and it is not easily restricted by communication height. Therefore, dispatching UAVs equipped with communication facilities for temporary networking can quickly establish emergency rescue communication networks [2] and effectively recover and improve network performance in terms of coverage, connectivity and spectrum.
Related research
Unlike traditional ground BS, UAV base station can be deployed flexibly and moved along a given trajectory, which is determined by its aeronautical characteristics to cover the ground terminals (GTs) [3]. Therefore, trajectory planning is a basic prerequisite to ensure successful completion of UAV tasks [4] and has become an important research hot spot in the field of UAV. However, previous research work is mainly on UAV navigation applications under various environmental constraints (such as obstacle avoidance) [5]. Xu et al. [6] study a new type of wireless energy transfer (WPT) system for unmanned aerial vehicle (UAV), which optimizes the mobility of UAV by designing trajectory, so as to transfer energy to two energy receivers in limited charging period. Wu et al. [7] optimize multiuser communication scheduling with UAV trajectory and power control to maximize the minimum throughput of all ground users for fair performance between users. Especially in the face of communication tasks with a wide range of users and services, how to achieve full coverage quickly and effectively has become one of the goals of UAV. Yaliniz et al. [8] consider the deployment of a single UAV base station under the probabilistic lineofsight (LoS) channel model to offload as many GTs as possible from the ground BS. Yong et al. [9] design UAV trajectory to ensure that each GT can restore files with a high probability of success, while also greatly reducing task completion time.
Since most single UAV trajectory planning algorithms are NP hard, many references consider the deployment of multiple UAV base stations. Lyu et al. [3] propose a polynomial time algorithm for continuous vehiclemounted mobile base station placement. In addition, clustering algorithm is also one of the common methods to place multiple UAVs [10]. Mozaffari et al. [11] study the deployment of UAVs in a coexistence network of UAVs and D2D users (DUs). Based on the disk coverage problem, the minimum number of stop points (SPs) for UAVs to cover circular areas with different radii is obtained. On the basis of Lyu et al. [3], Ji et al. [12] realize optimization of UAV trajectory in the cache network where UAV and DUs coexist. This provides a new idea and method for studying trajectory planning of a single UAV, that is, first determine the UAV’s space position and then construct UAV’s trajectory.
At present, the main optimization objective of UAV trajectory planning is mission completion time or the number of stop points, without taking into account throughput performance of the GT side. Especially in the emergency network where UAV and DUs coexist, in order to improve the efficiency and quality of UAV mission completion, it is natural to hope that UAVs provide higher communication quality while reducing their own energy consumption as much as possible. The optimization goal can be converted from energy consumption to UAV trajectory length without considering communication energy consumption and speed change.
To sum up, most of the UAV service users studied in the previous literature are ground terminals with a single communication mode or unable to establish an effective communication link with each other. And the main optimization goals are task completion time, number of service users and number of stops. However, in the emergency network of UAV and D2D coexistence, in order to improve the efficiency and quality of UAV mission completion, it is natural to hope that UAV can provide higher communication quality while reducing its own energy consumption as much as possible, which means that the trajectory and communication indicators need to be considered comprehensively. Unlike other literature, the ground terminals considered in this paper have the potential to enable D2D communication mode, which provides the possibility of saving energy for UAVs and improving time efficiency. Therefore, the abovementioned literature is not applicable to the issues studied in this paper.
Contributions
This paper studies the trajectory planning problem of UAV emergency networks for potential underlaying DUs with Homogeneous Poisson Point Process (HPPP) distribution. The process of trajectory planning is divided into two phases (clustering phase and supplementary phase), and three stepbystep optimization algorithms are proposed for three optimization objectives, including trajectory length, sum throughput and joint evaluation index that combines the two. The specific contributions are as follows:

We first propose a trajectory planning algorithm based on Kmeans algorithm to minimize trajectory length. The selection method of initial clustering centers is improved, and then the improved Kmeans algorithm is used to obtain the set of stop points in the first stage to construct the initial reference trajectory and determine the initial coverage. Then, a equation for SP coordinate is solved in a polar coordinate system to obtain the set of stop points for the second phase. The final trajectory consists of stop points obtained in two phases.

Based on algorithm 1, a sumthroughput optimized trajectory planning algorithm is presented. In clustering phase, sum throughput is optimized by using successive convex approximation (SCA) to update the initial stop points. In supplementary phase, UAV is placed directly above D2D users to maximize throughput. Finally, construct UAV’s trajectory.

In order to better balance the relationship between trajectory length and sum throughput, we present a joint evaluation index and propose algorithm 3 based on this index. Algorithm 3 preserves the method of maximizing sum throughput in the first phase of algorithm 2, and in the second phase, the joint evaluation index is used as a nonlinear optimization objective function to balance trajectory length and sum throughput.

Finally, we summarize and compare the three algorithms. The simulation results verify the validity of the above three algorithms. Algorithm 1 has obvious advantages in trajectory length. Algorithm 2 improves throughput significantly over algorithm 1, but it is at the cost of an increase in trajectory length. By contrast, algorithm 3 is able to better balance the relationship between trajectory length and sum throughput, showing remarkable performance in all aspects.
Paper organization
The rest of this paper is organized as follows. Section 2 introduces the system model and presents the problem formulations for UAV emergency communication network. In Section 3, trajectory length optimization algorithm based on improved Kmeans (TLOAIK) is presented. Section 4 and Section 5 present sumthroughput optimization algorithm based on TLOAIK (STOAIK) and balance optimization algorithm based on STOAIK (BOAIK), respectively. Section 6 summarizes and compares the three algorithms. Section 7 provides the numerical results, and finally we conclude the paper in Section 8. For clarity, we summarize the key notations and their definitions in Table 1.
Notations: In the paper, scalars and vectors are denoted by italic letters and boldface lowercase letters, respectively. For a vector x, \(\left\ \mathbf{x }\right\\) represents its Euclidean norm. \(\mathrm{log}2(\cdot )\) denotes the logarithm with base 2. For a set \({\mathcal{U}}\), \({\mathcal{U}}\) denotes its cardinality. For sets \({\mathcal{U}}_{1}\) and \({\mathcal{U}}_{2}\), \({\mathcal{U}}_{1}\cup {\mathcal{U}}_{2}\) means the union of the two sets.
System model and problem formulation
In this paper, we study a UAVassisted network with potential underlaying D2D communication, where a UAV acts as an aerial BS to provide wireless coverage service to terrestrial DUs as shown in Fig. 1. It is worth noting that potential D2D communication means that all DUs have the flexibility to adjust the communication mode according to UAV’s trajectory, i.e., they can communicate directly with UAV or D2D communication. For example, when DU\(_1\) is in UAV’s coverage, DU\(_1\) communicates directly with UAV. However, when DU\(_1\) is outside UAV’s coverage and DU\(_2\) who matches DU\(_1\) can communicate with UAV, DU\(_1\) chooses to communicate directly with DU\(_2\).
The DUs exist in the form of a Homogeneous Poisson Point Process (HPPP) \(\varphi\) with density \(\lambda\). We denote \(\{\mathbf{w}_\mathbf{d}[n]\}_{n\in {\mathcal{N}}}\) as the twodimensional (2D) coordinates of DUs, where \({\mathcal{N}}=\{1,2,\ldots ,N\}\). We consider that all DUs are stationary in the process of UAV coverage [9].
We aim to plan trajectory of UAV to cover all ground DUs while minimizing trajectory length or maximizing sum throughput. In this paper, we separate trajectory into multiple line segments. Two end points of each segment are UAV’s SPs. In addition, we stipulate that UAV uses broadcast communication, that is, it can cover multiple DUs in each SP. Consequently, the main idea in this paper is to build a UAV trajectory by optimizing locations of SPs.
Assume that UAV takes off from the origin and flies at an altitude of H meters and does not need to return to the origin after performing coverage mission. Denoting by \({\mathcal{M}}=\{1,2,\ldots ,M\}\) the set of SPs, the horizontal coordinates of mth SP are denoted by \({\mathbf{w}}_{u}[m]\), where \(m\in {\mathcal{M}}\). Therefore, the distance between mth SP and nth DU is expressed as
We consider that UAVDU communication channels are dominated by LoS links. Under the LoS model, the distance between UAV and DU is the dominant factor for airtoground (A2G) channel power gain. The average channel power gain from UAV to nth DU at mth SP can be modeled as
where \(\beta _{0}\) is the channel power gain at reference distance which is 1m, and \(\alpha\) is the path loss exponent. The transmitting power of UAV is denoted by \(P_u\). The received signaltonoise ratio (SNR) by nth DU is given by
where \(\sigma ^{2}\) denotes the additive white Gaussian noise (AWGN) power and \(\gamma _{0}^{u} \triangleq \frac{P_{u} \beta _{0}}{\sigma ^{2}}\) is the received SNR at reference distance \(d_0=1m\) [13].
Define the threshold of SNR at DU is \(\gamma _{th}\), the maximum transmitting power of UAV is \(P_u^{\mathrm{max}}\). Then, we have the maximum coverage radius of UAV,
We aim to minimize the number of SPs, while each DU is covered by UAV at least once within its communication radius. This does not rule out the possibility that some DUs will be covered by UAV multiple times. The problem can be formulated as follows
Srinivas et al. [14] point out that the UAV coverage problem P1 can be regarded as a geometric disk coverage problem. The problem of minimizing trajectory length can be transformed into minimizing the total number of disks, but the problem is still an NP problem [3].
In this paper, we start with minimizing trajectory length and then achieve the goal of maximizing sum throughput. Finally, we propose an effective algorithm to balance trajectory length and sum throughput. We adopt the idea of clustering and then gradually optimize locations of SPs. Therefore, we specify that SP set consists of two parts, one is the set of cluster centers obtained in clustering phase, which is denoted as \({{\mathbf{w}}_{u}^{k}[m_{i}]},m_{k}\in \{1,2,\ldots ,M_{i}\}\), and the other is the newly added set obtained in supplementary phase, which is denoted as \({{\mathbf{w}}_{u}^{a}[m_{a}],m_{a}\in \{1,2,\ldots ,M_{a}}\}\), based on DUs’ locations, i.e., \({\mathbf{w}}_{u}^{k} \cup {\mathbf{w}}_{u}^{a}= {\mathbf{w}}_{u}\). The set of Dus covered by \({{\mathbf{w}}_{u}^{k}}\) is denoted as \({{\mathbf{w}}_{d}^{c}[n_{c}]},n_{c}\in \{1,2,\ldots ,N_{c}\}\) , and the set of uncovered DUs is denoted as \({{\mathbf{w}}_{d}^{\mathrm{unc}}[n_{\mathrm{unc}}]},n_{\mathrm{unc}}\in \{1,2,\ldots ,N_{\mathrm{unc}}\}\), i.e., \({\mathbf{w}}_{d}^{c} \cup {\mathbf{w}}_{d}^{\mathrm{unc}}= {\mathbf{w}}_{d}\).
Trajectory length optimization algorithm based on improved Kmeans
In order to make UAV trajectory length as small as possible, we propose trajectory length optimization algorithm based on improved Kmeans (TLOAIK). The main idea is to take locations of cluster centers as initial SPs and then determine initial coverage. The trajectory formed by initial SPs is defined as the reference trajectory. According to initial coverage and reference trajectory, determine whether new SPs need to be added. If necessary, add new SPs based on the stop point selection strategy (SPSS).
Kmeans algorithm
Kmeans is a common clustering method in which Euclidean distance is used to measure the similarity between data. In other words, the smaller the distance between the data, the more similar the data are. At the same time, the denser the data distribution, the greater the likelihood of clustering. In addition, the sum of squared errors (SSE) is adopted as objective function to measure clustering quality [4].
The basic principle of the Kmeans algorithm is described below. The data set \(\{w_{d}[n]\}_{n\in {\mathcal{N}}}\) consisting of DU’s position coordinates is a labeled collection. The goal of the algorithm is to cluster the data set into K clusters, \({\mathcal{C}}=\{C_{1}, C_{2}, \ldots , C_{K}\}\). Assume that \(\left C_{i}\right\) is the number of samples in ith cluster \(C_{i}\), \(w_{u}^{k}[m_{i}]\) is the mean of these samples, i.e.,
Then, the SSE criterion can be expressed as
Because \(J_{e}\) cannot be minimized by analytic method, it can only use iterative method to solve the problem by constantly adjusting the category of samples.
For Kmeans algorithm, the selection of Kvalues and initial cluster centers is critical to clustering results. To avoid local optimization, we use \(d_{\gamma }\) to limit the distances between initial cluster centers to obtain more dispersed initial clustering centers [15],
where the area of research region is denoted by \(A_{c}\). In other words, the distances between initial cluster centers should satisfy \(d_{i j \ge } d_{\gamma }\).
Stop point selection strategy
When initial SPs \({\mathbf{w}}_{u}^{k}\) are unable to achieve full coverage of the target area, i.e., there are DUs that cannot communicate effectively with UAV, the relationships between uncovered DUs and reference trajectory need to be determined. In this section, we will discuss the strategy of adding new stop points. The positional relationships between uncovered DUs and reference trajectory can be divided into three cases, as shown in Fig. 2.
Using D2D communication without adding new SP
As shown in Fig. 2, DU\(_1\) is uncovered and DU\(_2\) is covered. In this case, DU\(_1\) can get the content from DU\(_2\) without adding new SP. The trajectory length does not increase as a result.
Adding new SP, trajectory unchanged
Both DU\(_3\) and DU\(_4\) are uncovered in Fig. 2, and a new SP needs to be added to achieve coverage. It can be seen from Fig. 2 that DU\(_3\) is closer to lineAB than DU\(_4\), and the distance is less than R. In this case, we only need to find SPE, which D\(_{3}\)E\(\perp\)AB. Namely, point E is the newly added SP.
Adding new SP, trajectory changed
Both the distance between the 3rd pair DUs (DU\(_5\) and DU\(_6\)) and the 4th pair DUs (DU\(_7\) and DU\(_8\)) to lineAB is greater than R. In this case, the selection of SP should consider both covering DUs and making the increment of trajectory as small as possible.
Let \(w_{d}^{\mathrm{unc}} (x_{d}^{\mathrm{unc}},y_{d}^{\mathrm{unc}})\) and \(w_{u}^{a} (x_{a},y_{a})\) denote coordinates of the uncovered DU and the newly added SP, respectively. Let \(w_{u}^{k,r} (x_{u}^{k,r} ,y_{u}^{k,r} )\) and \(w_{u}^{k,l} (x_{u}^{k,l},y_{u}^{k,l})\) denote coordinates of left endpoint and left endpoint, respectively. In polar coordinates, there are the following relationships:
where \(\theta \in [0,2\pi ]\). The sum of distances from the newly added SP to left endpoint \(w_{u}^{k,l}\) and right endpoint \(w_{u}^{k,r}\) is given by
which is a nonlinear function about \(\theta\). Then make the derivative of formula (10) with respect to \(\theta\) equal to 0, that is
Assume that \(\theta ^{*}\) is the solution of Eq. (12), \(w_{u}^{a*} (x_{a}(\theta ^{*}),y_{a}(\theta ^{*}))\) is the position of newly added SP. The points C and F in Fig. 2 are the corresponding optimization results.
SPSS is a decisionmaking process based on the relative position relationship between the trajectory and uncovered DUs. After obtaining clustering results, in order to avoid making large changes to trajectory as much as possible, we first determine whether there are DUs who can be covered by UAV through D2D communication. Then, according to the relationship between the distance from uncovered DUs to the trajectory and \(R_{\mathrm{max}}\), new SP is added. The specific decisionmaking process is shown in Fig. 3.
Minimum path selection strategy
After obtaining new SPs, how to construct discrete positions into a continuous trajectory is also an important issue. To keep the trajectory length as small as possible, we propose the minimum path selection strategy (MPSS). The UAV selects the nearest SP in turn from the origin until there is no SP remaining. For example, we obtained five SP positions as shown in Fig. 4 in the clustering phase. The trajectory route of scheme A is 12345. The trajectory route of plan B is 12534. Plan B is the trajectory result obtained by MPSS, and the trajectory length is significantly shorter than that of plan A.
In summary, set \({\mathbf{w}}_{u}^{k}\) is obtained by Kmeans algorithm in clustering phase and set \({\mathbf{w}}_{u}^{a}\) is obtained by SPSS in supplementary phase. Finally, the final trajectory is planned based on MPSS. The pseudocode is summarized in Algorithm 1.
Sumthroughput optimization algorithm based on TLOAIK
In the previous section, the primary optimization objective is trajectory length, so selection strategy for SPs requires that the closer the reference trajectory is, the better. Therefore, TLOAIK ignores throughput performance of the ground DUs. In this section, we optimize TLOAIK in the clustering phase and the supplementary phase to achieve the goal of improving sum throughput.
Optimization of the clustering phase
Algorithm 1 (TLOAIK) determines whether there is D2D communication available after obtaining the initial SP \(w_{u}^{k}\) to cover as many users as possible without changing the initial trajectory. From this we can see that \(w_{u}^{k}\) is not the location set to get the best communication performance. Therefore, in this section, we aim to optimize the sum throughput of all DUs covered by a single SP. Assume that the coordinate of ith SP is \(w_{u}^{k}[i]\) which has covered \(G_{i}\) DUs, the covered DU set is denoted as \(\mathcal{G_{i}}=\{1, 2, \ldots , G_{i\}}\). Thus, the sum throughput of \(\mathcal{G_{i}}\) when UAV hovers in \(w_{u}^{k}[i]\) can be expressed as
Therefore, the optimization problem for maximizing sum throughput when UAV hovers in \(w_{u}^{k}[i]\) is formulated as
Restriction in P2.1 ensures normal communication of UAVDU links, and it is obviously a convex constraint. However, due to the nonconvexity of objective function, P2.1 is not a convex optimization problem. To transform problem P2.1 into a solvable form, we utilize successive convex approximation (SCA) to improve sum throughput of DUs on the basis of TLOAIK according to the following Lemma.
Lemma
For \(w_{u,l+1}^{k}[i](x_{l+1},y_{l+1})\) the following inequalities hold
where l is the number of iterations, \(\alpha _{k,l}\) and \(\beta _{k,l}\) are coefficients given by (16).
Proof
We first define the function \(f(x,y)=log_{2}(1+\frac{c_{1}}{c_{2}+(xa)^2+(yb)^2})\), where \(c_{1}\), \(c_{2}\), a and b are constants. By leveraging the firstorder Taylor approximation, for any given \((x_{0},y_{0})\), we have
where
\(\square\)
Based on the lemma, the concave lower bounds of objective function at given \(w_{u,l+1}^{k}[i](x_{l+1},y_{l+1})\) are obtained. P2.1 can be further written as formula (17). Obviously, P2.2 is a convex optimization problem, which can be efficiently solved by iterations.
Improvements in the supplementary phase
To keep the total length of the trajectory as small as possible, we proposed a SPSS strategy in TLOAIK, but this is achieved at the expense of DUs’ sum throughput. The goal of this section is to improve the system’s sumthroughput performance, so the SPSS policy is no longer applicable. We assume that the altitude of the UAV does not change, while the DUs remain stationary during UAV flight. Obviously, the SP locations that maximize \(w_{d}^{\mathrm{unc}}\) throughput are directly above them, so we get \(w_{u}^{a}\). The implementation of the specific algorithm is summarized in Algorithm 2.
Balance optimization algorithm based on STOAIK
Algorithm 2 is optimized in both the clustering and supplementary phases to improve sum throughput. During the clustering phase, better throughput performance can be obtained because there is little impact on the trajectory before and after optimization. However, the supplementary phase is an increase in throughput in exchange for an increase in the length of the trajectory. Therefore, it is necessary to weigh the relationship between throughput and trajectory length effectively in supplementary phase. In this section, we put forward a joint evaluation index to balance sum throughput and trajectory, and then use this index to optimize STOAIK, to obtain a better performance algorithm in both sum throughput and trajectory.
A joint evaluation index
Our goal is to keep trajectory length as small as possible while maintaining maximum sum throughput. Therefore, we propose the following joint evaluation index
where \(\gamma _{\mathrm{sum}}\) is the sum throughput received by all terrestrial DUs, \(L_{\mathrm{sum}}\) is the length of UAV’s trajectory, \(\upsilon _{b}\) and \(\mu _{b}\) are the sum throughput and trajectory length of the benchmark, respectively.
This paper considers “stripbased waypoints (SBW)” as the benchmark planning trajectory [9]. First, get the minimum rectangle that contains all DUs and then divide the rectangle area into multiple rectangular bars with a width of R. The UAV starts from origin and flies in a snakelike fashion. When DUs are observed, the UAV hovers to provide communication services, as shown in Figs. 6a and 7a.
Joint optimization
Although STOAIK optimizes sum throughput, it does not have a significant negative impact on the overall trajectory in this step. The main factor that affects trajectory length of STOAIK is the locations of newly added SPs. Therefore, algorithm 3 will follow the optimization process of P2.2 in algorithm 2 and mainly perform joint optimization on the locations of the newly added SPs. For DUs that have not been covered by reference trajectory, the joint evaluation index is given as
where
and
\(\gamma _{g}^{a}\) is the throughput received by \({\mathbf{w}}_{d}^{\mathrm{unc}}[g]\) when UAV hovers over \({\mathbf{w}}_{u}^{a}[g]\). \(L_{p,q}^{g}\) is the sum of the distances from \({\mathbf{w}}_{u}^{a}[g]\) to \({\mathbf{w}}_{u}^{k}[p]\) and \({\mathbf{w}}_{u}^{k}[q]\). Therefore, \(\rho _{e}^{a}\)based optimization for \({\mathbf{w}}_{u}^{a}[g]\) can be expressed as follows
P3 is a nonlinear optimization problem, which can be solved by algorithms such as interior point method or some iterative search algorithms [16].
This section optimizes the selection of stop points in the supplementary phase while retaining the \(w_{u}^{k}\) obtained by STOAIK in the clustering phase. And considering the influence of SP position on trajectory and throughput, BOAIK is proposed. The specific process is summarized in Algorithm 3.
Summary and comparison of the three algorithms
In this section, we summarize and compare the three algorithms proposed and further illustrate their relationships. In clustering phase, all three algorithms depend on initial SPs obtained by Kmeans. Algorithm 1 (TLOAIK) does not do any additional processing to avoid increasing trajectory length, while both algorithm 2 (STOAIK) and algorithm 3 (BOAIK) can further optimize initial SPs to improve performance of DUs’ sum throughput. In supplementary phase, TLOAIK adopts SPSS to ensure that trajectory length changes as small as possible while adding SPs. To further improve sum throughput, SPs are supplemented by locations directly above the DUs that are not covered by the initial SPs in STOAIK. To balance the relationship between trajectory length and sum throughput in the supplement phase, we propose a joint evaluation index in BOAIK and use it as the optimization objective in the supplement phase. For ease of understanding, we summarize the three algorithms as shown in Fig. 5.
The complexity of TLOAIK comes from Kmeans in the clustering phase and SPSS in the supplementary phase, so the total complexity is \({\mathcal{O}}\left( 2L_{1}KN+N\right)\), which can be simplified to \({\mathcal{O}}\left( N\right)\). The complexity of STOAIK comes from Kmeans in the clustering stage and solving P2.2, so the total complexity is \({\mathcal{O}}\left( 2L_{1}KN+L_{2}KN^{3}\right)\) , which can be simplified to \({\mathcal{O}}\left( N^{3}\right)\). The first two aspects of the complexity of BOAIK are the same as those of Algorithm 2, and the third aspect comes from solving P3. The total complexity of BOAIK is \({\mathcal{O}}\left( 2L_{1}KN+L_{2}KN^{3}+L_{3}N^{3}\right)\) , which can be simplified to \({\mathcal{O}}\left( N^{3}\right)\). Among them, \(L_{1}\), \(L_{2}\), and \(L_{3}\) are the number of iterations for executing Kmeans and solving P2.2 and P3, respectively. It can be seen that the optimization of sum throughput will bring higher complexity.
Simulation and analysis
We assume that DUs are distributed in a \(2000\times 2000\) square area, and UAV starts from the coordinate origin and does not need to return to the starting point after completing the coverage task and does not consider changes in speed. The main simulation parameters are listed in Table 2.
Figure 6 shows the trajectory planning result when \(\lambda =15\). Figure 6a is the planning result of stripbased waypoints algorithm. UAV moves along the planned path (blue dashed line), and it stops to provide service if DUs are detected. The blue dashed line in Fig. 6b is the reference trajectory of the initial SPs clustered by Kmeans and serves as the basis for adding SPs later. The red dashed line is the final planning result. As can be seen from the figure, the new stops \(W_{A}\) and \(W_{C}\) adopts policy Adding new SP, Trajectory Changed, and \(W_{B}\) is the planning result of policy Adding new SP, Trajectory Unchanged. Figure 6c shows that the initial SP coordinate is optimized from (1779, 1365) to (1702, 1464). It can be clearly found from Fig. 6d that trajectory length is greatly reduced with full coverage guaranteed.
Figure 7 shows the trajectory planning result when \(\lambda=20\). Figure 7a is also the planning result of the stripbased waypoints algorithm, and the number of SP is increased due to the increased user density compared to Fig. 6a. Figure 7b is the planning result of algorithm 1, \(W_{D}\), \(W_{E}\) are the results of policy Adding new SP, Trajectory Changed, and \(W_{F}\) is the result of policy Adding new SP, Trajectory Unchanged. Figure 7c is the planning result of algorithm 2. Obviously, in order to increase throughput, trajectory length of UAV has increased significantly, and SP coordinate is optimized from (1416, 927.7) to (1378, 890.2). Figure 7d is the optimization result of algorithm 3. In order to balance the increase in trajectory length, multiple groups of users use D2D communication mode, which can improve sum throughput and effectively reduce trajectory length.
Figures 6 and 7 visually reflect the planning results of each algorithm. Figure 8 gives a more intuitive data representation of each algorithm in terms of sum throughput and trajectory length using data. Figure 8a shows the planning results for each algorithm under the distribution of \(\lambda =15\). Figure 8b shows the planning results for each algorithm under the distribution of \(\lambda =20\). It is clear that STOAIK increases sum throughput while incurring the cost of increasing trajectory. In contrast, BOAIK is more balanced in both ways.
Figure 9 shows the \(\rho _{e}\) performance of algorithms 1–3 under different \(\lambda\). As can be seen from the figure, BOAIK is significantly higher than STOAIK and TLOAIK when \(\lambda =16\). Since STOAIK and TLOAIK already have preferable planning results when \(\lambda =20\), the improvement of BOAIK is not obvious. However, no matter how density changes, the performance of algorithms is always BOAIK > STOAIK >TLOAIK.
Conclusion
This paper considers an emergency network scenario where a UAV base station coexists with potential underlaying D2D communications. In order to save UAV energy consumption and improve the communication quality of ground DUs, three kinds of UAV trajectory optimization algorithms based on Kmeans are proposed, which include trajectory length, sum throughput and joint evaluation index of the two. Planning process of each algorithm is composed of two phases: the clustering phase and the supplementary phase. The results of this study indicate that proposed design algorithms have advantages in both trajectory length and sum throughput compared with benchmark plan. This paper is only applicable to the situation where locations of the ground terminals are given and stationary. The proposed algorithms can perform offline planning based on the user’s location coordinates. It is not applicable to scenarios where ground terminals change dynamically, so there are certain limitations.
Availability of data and materials
Not applicable.
Abbreviations
 5G:

Fifthgeneration wireless systems
 D2D:

Devicetodevice
 UAV:

Unmanned aerial vehicle
 IoT:

Internet of things
 BS:

Base station
 GT:

Ground terminal
 SP:

Stop point
 DU:

D2D user
 SCA:

Successive convex approximation
 SNR:

Signaltonoise ratio
 AWGN:

Additive white Gaussian noise
 SPSS:

Stop point selection strategy
 SSE:

Sum of squared errors
 MPSS:

Minimum path selection strategy
References
 1.
A. Asadi, Q. Wang, V. Mancuso, A survey on devicetodevice communication in cellular networks. IEEE Communications Surveys Tutorials 16(4), 1801–1819 (2014). https://doi.org/10.1109/COMST.2014.2319555
 2.
I. Bucaille, S. Hethuin, A. Munari, R. Hermenier, T. Rasheed, S. Allsopp, Rapidly deployable network for tactical applications: aerial base station with opportunistic links for unattended and temporary events absolute example, pp. 1116–1120 (2013)
 3.
J. Lyu, Y. Zeng, R. Zhang, T.J. Lim, Placement optimization of UAVmounted mobile base stations. IEEE Commun. Lett. 9(99), 1 (2016)
 4.
X. Yue, W. Zhang, UAV path planning based on kmeans algorithm and simulated annealing algorithm, in 2018 37th Chinese Control Conference (CCC) (IEEE, 2018), pp. 2290–2295
 5.
T. Schouwenaars, B.D. Moor, E. Feron, J. How, B. Demoor, E. Frazzoli, M.A. Dahleh, Mixed integer programming for multivehicle path planning, in Control Conference (2015)
 6.
J. Xu, Y. Zeng, R. Zhang, UAVenabled wireless power transfer: trajectory design and energy region characterization, in 2017 IEEE Globecom Workshops (GC Wkshps), vol. 17, pp. 5092–5106 (2017)
 7.
Q. Wu, Y. Zeng, R. Zhang, Joint trajectory and communication design for multiuav enabled wireless networks. IEEE Trans. Wireless Commun. 17(3), 2109–2121 (2018)
 8.
R.I.B. Yaliniz, A. ElKeyi, H. Yanikomeroglu, Efficient 3D placement of an aerial base station in next generation cellular networks (2016)
 9.
Y. Zeng, X. Xu, R. Zhang, Trajectory design for completion time minimization in UAVenabled multicasting. IEEE Trans. Wirel. Commun. 7(4), 2233–2246 (2018).
 10.
B. Galkin, J. Kibilda, L.A. Dasilva, Deployment of UAVmounted access points according to spatial user locations in twotier cellular networks, in Wireless Days, pp. 1–6 (2016)
 11.
M. Mozaffari, W. Saad, M. Bennis, M. Debbah, Unmanned aerial vehicle with underlaid devicetodevice communications: performance and tradeoffs. IEEE Trans. Wirel. ss Commun. 15(6), 3949–3963 (2016)
 12.
J. Ji, K. Zhu, D. Niyato, R. Wang, Probabilistic cache placement in UAVassisted networks with d2d connections: performance analysis and trajectory optimization. IEEE Trans. Commun. 9(99), 1 (2020)
 13.
Y. Zeng, R. Zhang, T.J. Lim, Throughput maximization for UAVenabled mobile relaying systems. IEEE Trans. Commun. 64, 4983–4996 (2016).
 14.
A. Srinivas, G. Zussman, E.H. Modiano, Construction and maintenance of wireless mobile backbone networks. IEEE/ACM Trans. Networking 17(1), 239–252 (2009)
 15.
Y. Zhou, R. Xie, T. Zhang, J. HolguinVeras, Joint distribution center location problem for restaurant industry based on improved kmeans algorithm with penalty. IEEE Access 9(99), 1 (2020)
 16.
H. Long, W. Xiang, Y. Zhang, Y. Liu and W. Wang, Secrecy capacity enhancement with distributed precoding in multirelay wiretap systems. IEEE Trans. Inf. Forensics Secur. 8(1), 229–238 (2013)
Acknowledgements
None.
Funding
None.
Author information
Affiliations
Contributions
All authors contributed to the idea development, study design, theory, result analysis and article writing. All authors read and approved the final manuscript.
Corresponding author
Ethics declarations
Ethics approval and consent to participate
Not applicable.
Consent for publication
Not applicable.
Competing interests
The authors declare that they have no competing interests..
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Zhang, S., Shi, S., Feng, T. et al. Trajectory planning in UAV emergency networks with potential underlaying D2D communication based on Kmeans. J Wireless Com Network 2021, 107 (2021). https://doi.org/10.1186/s13638021019873
Received:
Accepted:
Published:
Keywords
 Unmanned aerial vehicle (UAV)
 Devicetodevice (D2D)
 Trajectory planning
 Sumthroughput optimization