{'fraction_non_alphanumeric': 0.03664657428976249, 'fraction_numerical': 0.01709853269614082, 'mean_word_length': 4.301336728198599, 'pattern_counts': {'":': 0, '<': 1, '<?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': 11, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Priority-Based Data Collection for UAV-Aided Mobile Sensor Network

In this work, we study data collection in multiple unmanned aerial vehicle (UAV)-aided mobile wireless sensor networks (WSNs). The network topology is changing due to the mobility of the UAVs and the sensor nodes, so the design of efficient data collection protocols is a major concern. We address such high dynamic network and propose two mechanisms: prioritized-based contact-duration frame selection mechanism (PCdFS), and prioritized-based multiple contact-duration frame selection mechanisms (PMCdFS) to build collision-free scheduling and balance the nodes between the multi-UAV respectively. Based on the two mechanisms, we proposed a Balance algorithm to conduct the collision-free communication between the mobile nodes and the multi-UAVs. Two key design ideas for a Balance algorithm are: (a) no need of higher priority for those nodes that have lower transmission rate between them and the UAV and (b) improve the communication opportunity for those nodes that have shorter contact duration with the UAVs. We demonstrate the performance of proposed algorithms through extensive simulations, and real experiments. These experiments using 15 mobile nodes at a path with 10 intersections and 1 island, present that network fairness is efficiently enhanced. We also confirm the applicability of proposed algorithms in a challenging and realistic scenario through numerous experiments on a path at Tongji campus in Shanghai, China.


Introduction
Unmanned Aerial Vehicle-aided wireless sensor networks (UAV-aided WSN) have gained more and more interest due to their many applications in monitoring, surveillance, and exploring in healthcare, agriculture, industry, and military [1][2][3][4][5]. Among UAVs' applications, one of the key functions is the data collection [6][7][8][9][10][11]. These works focus on deterministic topology where the nodes are deployed statically, and the locations of the sensors are known. The data collection issues addressed on dynamic topology, which are usually used in applications such as maritime detection, traffic surveillance, and wilderness rescuing where the targets are moving and no static sensors are deployed in advance, are seldom covered.
The main difference between the static network and mobile network are: the transmission opportunities for nodes that are within the coverage of the UAV are different. In static case, all covered nodes are static, the relative velocity (v r ) between the nodes and the UAV are the same. Thus, the contact durations (CD) between them with the UAV depend on the relative distance (d r ) between them (CD = d r v r , see [12,13] for more details). The relative distances almost have no difference if the UAV • We study the impact of dynamic parameters, including the speed and flying height of UAV, the sensor speed, network size, and different priority areas. We mathematically formulate the data collection issue into the optimization with the objective of maximizing the number of collected packets and the number of sensors that successfully send packets to the UAVs. • Based on the dynamic parameters, we adopt a time-discrete mechanism and propose a prioritized-based multiple contact-duration frame selection algorithm (PMCdFS). PMCdFS algorithm is used for the balancing between the nodes (that are within the range of multi-UAVs at the same time) and multi-UAVs. • We improve the contact duration mechanism in our previous work (see [12,13] for more details) with the Prioritized Frame Selection (PFS) mechanism (see [14,15] for more details) and propose a prioritized-based contact-duration frame selection algorithm (PCdFS). PCdFS algorithm is a one-hop and slotted mechanism which is used to allocate the time-slot for the nodes that covered only by one of the UAVs. • We propose a Balance algorithm to solve the collision between the nodes and UAVs so as to optimize the aforementioned data collection performance. • Through extensive simulations, and real experiments, we examine the effectiveness of the proposed algorithms, and compare it with existing algorithm under different configurations. Figure 1. An illustration of the unmanned aerial vehicle (UAV)-aided data collection for a mobile wireless sensor network. The exemplar trajectory of the U AV 1 is shown as: Waypoint P 1 S → Waypoint P 1 1 → Waypoint P 1 2 → Waypoint P 1 3 → Waypoint P 1 4 → Waypoint P 1 5 → Waypoint P 1 6 → Waypoint P 1 E .
The remainder of this paper is organized as follows: in the next section, we discuss previous related work. Section 3 presents the system model and the problems formulated. Section 4 present the proposed algorithms. Section 5 evaluated the proposed algorithms through extensive simulations and real experiments. Section 6 concludes this paper and gives some future work suggestions.

Related Works
There exists an extensive array of research on data collection in UAV-aided WSN with different objectives ranging from completion time minimization [20], power controlling [21], trajectory distance minimizing [22] to energy consumption minimization [23,24]. We classify these existing data collection algorithms by two criteria: (i) Static or mobile nodes, and (ii) sensors are deployed along a path or deployed within an interesting area. In (i), algorithms are differentiated by whether the sensors mobile or not because the dynamic parameters brought by the movement of nodes in the network structure have a much greater impact on the system performance. In (ii), algorithms are differentiated by whether the nodes deployed along a path or not. The nodes deployed along a given path [12,13,25,26] so the UAV trajectory planning has very little impact on the network performance.
(i) Data collection algorithms addressed on mobile nodes. There are many works on studying how to collect data from WSN. The authors in [4,9,[27][28][29] review these works. According to the [4,9,[27][28][29], most of these algorithms only based on the mobile sink or only focused on mobile sensors. In our previous works [12,13,16], we studied how to use UAV to collect data from mobile nodes based on an assumption that both the nodes and the UAV move along a straight path with constant speeds. The case where both the UAV and the nodes move in a curved path is not considered. Numerous researches have been done on statically deployed networks [6,7,11,14,15,20,24,25,[30][31][32][33][34][35][36][37][38][39][40].
(ii) Most of the aforementioned data collection algorithms can also be classified according to the deployed status of the nodes. Authors in [12,13,16,25,34] studied how to use UAV to collect data from nodes that deployed along a straight path. Especially in [25], the nodes deployed on a straight line, and the UAV flies over this line to collect data from nodes. In such context, the trajectory of the UAV is dependent on the path (or line) and has a light impact on the performance if the path is long enough. For instance, in [25], the authors aim to minimize the flight time through jointly optimizing the transmit power of nodes, the UAV speed and the transmission intervals. For the case that nodes are deployed within the area of interest, one of the main issues is to plan the UAV's trajectory so as to enhance the network performance. Numerous research has been done on the UAV trajectory planning issues [6,7,20,24,[30][31][32][33][34][35][36][37][38][39][40]. These works are different from the optimization method and objective function because of different scenarios. They are mainly classified into two types: single-UAV trajectory planning [6,7,24,[30][31][32][33][34] and multi-UAV trajectory planning [20,[35][36][37][38][39][40].
The first is the single-UAV trajectory planning. Authors in [33] use a UAV for the mobile edge computing system. They minimize the maximum delay of all ground users through jointly optimizing the offloading ratio, the users' scheduling variables, and UAV's trajectory. While, in [24], the authors aim to minimize the maximum energy consumption by optimizing the trajectory of a rotary-wing UAV. The authors utilize a UAV to collect data from IoT devices with each has limited buffer size and target data upload deadline [6]. In this study, the data should be transmitted before it loses its meaning or becomes irrelevant. To maximize the number of served IoT devices, they jointly optimize the radio resource allocation and the UAV's trajectory.
The second is the multi-UAV trajectory planning. Multi-UAVs were used as mobile base stations to provide service for ground users in [38]. They aim to maximize the minimum throughput of ground users by optimizing the trajectory for each UAV. Scholars in [20] employ multi-UAVs to collect data from nodes. Through jointly optimizing the trajectories of UAVs, wake-up association and scheduling for sensors, they minimize the maximum mission completion time of all UAVs. The authors studied a multiple casting network utilizing the UAV to send files to all ground users [37]. They aim to minimize the mission completion time of the UAVs through designing the UAV's trajectory. Meanwhile, the proposed algorithms guarantee that each ground user can successfully recover the file. In urban applications, the authors proposed a risk-aware trajectory planning algorithm [36] for multi-UAVs. Under the same test scenarios, authors in [39] aim to minimize the mission time by planning the trajectory of each UAV. The scholars exploit the nested Markov chains to analyze the probability for successful data transmission [40]. They propose a sense-and-send mechanism [40] for real-time sensing missions, and a multi-UAVs enabled Q-learning algorithm for decentralized UAV trajectory planning.
In other cases. The authors in [11] use a single UAV to collect data from harsh terrains. Due to the large scale of the detection area, the network has a high demand for power. They adopted a rechargeable mechanism to extend the lifetime of the UAV so as to enhance the collection period. The PFS mechanism in [14,15] is based on the nodes' positions for the data collection in single-UAV aided static sensor networks. The nodes are divided into different priority groups according to two steps: (i). increasing group and decreasing group ( Figure 2). The nodes within the decreasing group was given higher priority than the ones within the increasing group. (ii). For each group in (i), the nodes were divided into sub-groups according to which power level does it belong to. The sets of nodes within "power level 1" in the increasing group and in the decreasing group are denoted by S 1 a,I and S 1 a,D , respectively. The priority values for nodes within S 1 a,I and S 1 a,D are denoted by P 1 a,I and P 1 a,D , respectively. The authors give high priority to those nodes that are within high power level (Figure 2), and applied opposite actions to the increasing and decreasing groups: (a) in the increasing group, the nodes within high power level was given high priority value; (b) in the decreasing group, the nodes within lower power level were given high priority. After these actions, almost all nodes at the best channel conditions have been considered. Table 1 presents the key focuses and the key difference of our proposed algorithms from existing algorithms. Although a lot of research has been done on data collection, there is still room to enhance the network performance through balancing the dynamic parameters in the first link in mobile sensor networks. Through UAV trajectory planning to achieve timely data collection from IoT devices where the data has deadlines and needs to be sent before the data loses its meaning or becomes irrelevant.
[7] Static deployed 1 Considering the age of information, characterized by the data uploading time and the time elapsed since the UAV leaves a node, when designing the UAV trajectory.
[11] Static deployed 1 To extend the lifetime of the network through charging for the UAV in the air. [14,15] Static deployed 1 The authors divided the interesting area into different priority groups, and the data communication conducted from higher to lower priorities (PFS mechanism). Based on PFS, the authors proposed MAC protocols for UAV-aided WSN.
[24] Static deployed 1 the authors through optimizing the trajectory of a rotary-wing UAV to collect data with an objective of minimizing the maximum energy consumption of all devices.
[25] Static deployed 1 To minimize the flight time, and jointly optimize the transmit power of nodes, the UAV speed and the transmission intervals.
[31] Static deployed 1 To minimize the energy consumption of the system through optimizing the UAV's trajectory and devices' transmission schedule, while ensuring the reliability of data collection and required 3D positioning performance.
[32] Static deployed 1 To maximize the minimum average data collection rate from all nodes subject to a prescribed reliability constraint for each node by jointly optimizing the UAV communication scheduling and three-dimensional trajectory.
[33] Static deployed 1 To minimize the maximum delay of all ground users through jointly optimizing the offloading ratio, the users' scheduling variables, and UAV's trajectory.
[34] Static deployed 1 To maximize the minimum received energy of ground users by optimizing the trajectory of the UAV. They first presented the globally optimal one-dimensional (1D) trajectory solution to the minimum received energy maximization problem.
[20] Static deployed Multiple Minimize the maximum mission completion time through jointly optimize the wake-up scheduling and association for sensors, the UAV trajectory, while ensuring that each node can successfully upload the targeting amount of data with a given energy budget. Use nested Markov chains to analyze the probability for successful data transmission, and propose a sense-and-send mechanism for real-time sensing missions, and a multi-UAVs based Q-learning algorithm for decentralized UAV trajectory planning.

System Model
This paper considers a UAV-assisted mobile sensor network which has N mobile bicycles with each equipped a sensor, and M UAVs with each equipped a sensor (as illustrated in Figure 1, where M = 2). S = {S 1 , S 2 , · · · , S N } is the set of mobile sensors. N nodes move along a pre-defined path (path length is denoted as L) with each has a speed v i . The UAV U i is dispatched to collect data from mobile sensors at a given height h i and speed v i u along a predefined trajectory ( Figure 1). The trajectory consists of a few line segments that contain the waypoint start and waypoint end (e.g., in Figure 1, waypoint P i S and waypoint P i E in the trajectory of U AV i , i = 1, 2), and k intermediate waypoints (e.g., in Figure 1, waypoint P i 1 , waypoint P i 2 , waypoint P i 3 , waypoint P i 4 , waypoint P i 5 and waypoint P i 6 in the trajectory of U AV i , i = 1, 2). Let P i = {P i S , P i 1 , P i 2 , · · · , P i k , P i E } denote the set of all waypoints of U AV i . The coordinates for each waypoint P i m is denoted by P i m (x i m , y i m , h i ). The UAV's flight time between any two waypoints P i m and P i n is given by, The collection period of the U AV i is the duration from waypoint P i The trajectory length for U AV i is, Generally, in a given path, the coordinates (x-axis and y-axis) of the waypoints for the UAVs are the same except the height (z-axis). For instance, the point ( Intuitively, the straighter the pre-defined path, the smaller the ∆L (∆L = |L − L i |). The larger the number of waypoints, the smaller the ∆L. Major notations used in this work are defined in Table 2. The sensors set that within the range of U AV i in t k ; The sensors set that only within the range of U AV i in t k ; The sensors set that within the range of both U AV i and U AV j in t k ;

U
The UAVs set; The collection period of the U AV i ; The fly height of the U AV i ; L The path length; The length of the trajectory of U AV i ; N ts The number of time slots; T The set of time-slots; α The duration of one time-slot; The "mth", the "start", and the "end" way points of the U AV i respectively; P i The set of waypoints for U AV i ; λ i m,n The UAV's flight time between any two waypoints P i m and P i n of U AV i ; F The set of nodes that send at least one packet in collection period; t B The duration between adjacent two "Beacon"; N ts,a (i, j, k) A matrix where value is "0" and "1". N ts,a (i, j, k) = 1 implies in t k , the U AV i will communicate with S j , and othwise it is "0"; σ ijk Boolean function. σ ijk = 1 implies that the U AV i successfully collect data from S j in t k ; The number of time slots that sensor S i (S i ∈ S) was allocated in time T; N p The total number of collected packets; N node The number of nodes that successfully send at least one packets.
To well present the impact of the dynamic parameters on the system, we using homogeneous UAVs (v i u = v) to reduce the influence brought by UAVs' speeds. Accordingly, the collecting period is denoted by T, and T = T i .

Discrete Time Mechanism
Considering the waypoint selection and beacon sending, we introduce a discrete-time mechanism where the collecting period T is divided into N ts time-slots with each lasting α time units, N ts = T α , where · is the rounding down function. It is assumed that the time-slots are indexed as 1, 2, · · · , N ts , and T = {t 1 , t 2 , · · · , t N ts } ( Figure 3). It is worth note that, in each time slot, a sensor could communicate only with one UAV. For example, in t k , S i communicate with U AV m , and S j communicate with U AV n (i = j and m = n). From Figure 1, the nodes that are covered by the U AV i and deployed nearly complete to communicate with the U AV i . For instance, S m , S n , S k in Figure 1 complete to communicate with the U AV 1 . Meanwhile, there are more than one UAV within the range of one node. For example, S k in Figure 1 with the range of both U AV 1 and U AV 2 . The S k should choose one from them to send packets. Hence, how to balance the communication between nodes and the UAVs so as to maximize the data collection is a challenging task.

Data Collection Protocols Using UAV
In this paper, we present a distributed method for the data collection issues in UAV-aided mobile sensor networks as follows. The collection period T is divided into N ts time slots. At the beginning of every time slot (Figure 4), UAV sends a beacon message to tell the mobile nodes that UAV is coming. The beacon includes the UAV's information, e.g., the aerial height, speed, etc. The new comers send a JOIN message which includes the sensors' information to the UAV to update the network topology. The UAV judges whether the nodes are within its range or not according to these messages. Then, it calculates the contact duration, the relative distance, and the potential time slots for each node that successfully sends the JOIN message. According to the time slot allocation algorithms that we proposed in Section 4, the UAV provides scheduling for the covered sensors, and broadcasts them a scheduling message which contains the assignment of the time-slots. Having received the scheduling message, every sensor transmits its data in its own time slots.

Collecting Packets
Allocating the N ts time slots to individual mobile sensors under the proposed mechanism is equivalent to maximizing the usage of time slots. Let N ts,a (i, j, k) = 1 U AV i communicatewithS j int k , 0 otherwise.
The data collection maximization problem is to maximize the number of collected packets, N p , where D r is the transmission rate, and Our objective is to balance the communication between the two UAVs and N mobile nodes to maximize the overall data collection utility. Therefore, the optimization problem can be formulated as, Constraints (6)- (8) imply that, in a given time-slot, a UAV chooses only one node to collect data, and one node selects only one UAV to send data. Constraint (9) ensures that, in a given time-slot, no more than two communications happen between UAVs and mobile nodes.

The Number of Nodes that Successfully Send Packets to the UAV
During the communication between the UAVs and mobile nodes, the sensors transmission state contains: have no opportunity to send packets, have an opportunity to send but fail to transmit, and successfully send data to the UAVs. The larger number of nodes (N node ) that successfully transmit packets, the higher the system performance. Thus, to enhance the number of nodes that successfully send data to the UAVs is one of the key points in designing data collection algorithms.
Let matrix I M×N×N ts is given by, The elements in matrix I are the node ID. Then, we can obtain the number of nodes that successfully transmit at least one packet, N node Hist(I).
where "Hist" is used to calculated the number of different elements in the I matrix. The N node maximization problem can be regarded as the formulated problem, When i = 1 (single-UAV enabled sensor network), it is a classical NP-hard problem that we have studied in [12,13]. When i = 2 (multi-UAV enabled sensor network), this problem is also an NP-hard combinatorial maximization problem [41]: under the given conditions, its objective is to select items which have unique weight and value to maximize the total value.

Proposed Algorithms
In this section, we study how to balance the communication between multi-UAVs and mobile nodes, and we propose a balance mechanism. For the two cases, multiple nodes within the range of both two UAVs and multiple nodes only with the range of only one UAV, we propose two algorithms: PCdFS (Section 4.2) and PMCdFS (Section 4.3) algorithms.

Balance Algorithm between UAVs and Mobile Nodes
In a given time slot t k (t k ∈ T), there are multiple nodes within the range of the UAV. The nodes that are potentially for U AV 1 and U AV 2 are denoted by S 1 kB and S 2 kB respectively. When S 1 kB ∩ S 2 kB = ∅, there is no node within the range of the U AV 1 and U AV 2 at the same time. In this case, we propose PCdFS mechanism (see Section 4.2 for more details) to balance the communications between S 1 kB and U AV 1 , S 2 kB and U AV 2 respectively. When S 1 kB ∩ S 2 kB = ∅, and S 1,2 kB S 1 kB ∩ S 2 kB . Then, S 1,o kB and S 2,o kB denote the sensors set only within the range of the U AV 1 and U AV 2 respectively. We use the PCdFS mechanism to balance the communications between S 1,o kB and U AV 1 , S 2,o kB and U AV 2 respectively. For the nodes within S 1,2 kB , we proposed the PMCdFS algorithm to balance between | S 1,2 kB | mobile nodes and multi-UAVs. The Balance algorithm is detailed in Algorithm 1. Apply PCdFS mechanism (Algorithm 2) to balance the communication between S 1,o kB and U AV 1 , S 2,o kB and U AV 2 respectively; 13: end if 14: Update T now , k, N p and N node ; 15: end while 16: return N p and N node ;

Priority-Based Contact-Duration Frame Selection Mechanism
In the PCdFS mechanism, the priority areas division includes two steps: (i) divide the nodes into different groups according to their power level. For example, the nodes are divided into two groups and three groups in Figures 3 and 5, respectively. In Figure 3, S i 1 and S i 2 are within the same priority area (level 2), S i 3 , S i 4 and S i 5 are within level 2. If we take more priority levels into account, e.g., 3 levels as in Figure 5, S i 1 and S i 2 belong to level 1, S i 4 is in level 2, S i 3 and S i 5 are in level 3. The more levels, the more detailed group. (ii) For each group, the nodes are given different priority according to their contact duration with the UAV. The ones that have short CD with the UAV are given higher priority values. In PCdFS, different nodes are given different priority values except the case that more than one node have the same CD with the UAV. In PCdFS, it makes the nodes facing a connection lose with the UAV highly concerned. In addition, PCdFS provides the nodes within a higher power level to send data exactly at the moment of their good channel condition so as to reduce the packet's loss. The PCdFS algorithm is detailed in Algorithm 2. Algorithm 2 Prioritized-based contact-duration frame selection mechanism (PCdFS) Algorithm.
Input: Initial deployed information of nodes and UAVs, S 1 kB , S 2 kB , N p , N node . Output: N p , N node Make a judgement for sensor S i and S j : which priority area does them in; 3: Calculate the contact duration between S i and the U AV 1 , S j and the U AV 2 , respectively; 4: end for 5: For U AV 1 (and U AV 2 ), t k allocated to the one (e.g., S i k , and S i k ∈ S 1 k B for U AV 1 , and S j l , S j l ∈ S 2 k B for U AV 2 ) which is within the higher priority area; When more than one node within the same high priority area, t k allocated to the one (e.g., S i k for U AV 1 , and S j l for U AV 2 ) which has the shorter contact duration with the UAV. 6: In t k , S i k and S j l send packets to U AV 1 and U AV 2 respectively; 7: Update N p , N node ; 8: return N p and N node ;

Priority-Based Multiple-Contact-Duration Frame Selection Mechanism
The PMCdFS algorithm is used to balance the communications between the UAVs and nodes when these nodes are within the range of the multi-UAVs at the same time. Intuitively, the longer the CD between the nodes and the UAV, the higher the opportunity to send packets to the UAV. Thus, it increases the transmission opportunity of the node if it was arranged to the UAV which has a longer CD between it and the UAV. The PMCdFS is detailed in Algorithm 3. Through the PMCdFS algorithm, we obtain the sensors set in which all nodes only compete to communicate with a single UAV (U AV 1 or U AV 2 ). Then, we apply the PCdFS algorithm to conduct the communication among them. The proposed algorithms are summarized in Table 3.

Algorithm 3 Prioritized-based multiple contact-duration frame selection mechanisms (PMCdFS) algorithm.
Input: Initial deployed information of nodes and UAVs, S 1,2 kB , S 1 kB , S 2 kB . Output: S 1 kB and S 2 kB 1: for ∀S i ∈ S 1,2 k B do 2: Calculate the contact duration between S i and the U AV 1 (denoted as T i,1 ), the U AV 2 (denoted as T i,2 ), respectively; 3: if T i,1 < T i,2 then 4: end if 8: end for 9: return S 1 kB and S 2 kB ; Table 3. Proposed algorithms.

Algorithms Descriptions
Balance mechanism It is specially used to balance the communications between multiple nodes and multiple UAVs for the system.

PCdFS mechanism
It is used to build the "scheduling" between the nodes (that only with the range of a single UAV) and the UAV.

PMCdFS mechanism
It is specially used to balance the communications between the nodes (these nodes are within the range of multiple UAVs at the same time) and the UAV.
In the following, we will evaluate the proposed algorithms through different configurations, and compare our proposed algorithms with the existing algorithm (PFS).

Implementation and Evaluation
We implement the algorithms in both simulations and real experiments as following.

Simulations
We conduct the simulations in MATLAB/Simulink where the UAV fly (5 min) along a path (the path is 10 m wide). The simulated priority groups are {2, 3, 4, 5} groups. The other simulation parameters are presented in Table 4, the final results are given by the mean of 30 simulation runs. Considering that, the PFS mechanism is proposed and examined based on a single-UAV sensor network. To compare it to the proposed algorithm, we use M = 1 in the simulations in Sections 5.1.1-5.1.4. In Section 5.1.5, we compare our proposed algorithms when using single UAV and multiple UAVs. All the simulations are summarized in Table 5.

{1, 2}
Compare our proposed algorithms when using one UAV and two UAVs. Figure 6 presents the impact of varying the number of priority groups. The more priority groups, the smaller number of collected packets. The number of collected packets is much improved at two priority groups division as compared to five priority groups division. That is because the nodes in lower priority groups may have changed their state when it was their turn to send packets. The introduction of contact duration provides high priority to them so as to overcome a part of this issue, thus more packets were collected in PCdFS algorithm. Figure 6. Impact of priority area change. In these simulations, the proposed algorithm is the combination of proposed Balance and prioritized-based contact-duration frame selection mechanism (PCdFS) algorithms.

Impact of Priority Level Changes
It also can be concluded that at a larger number of priority groups, a smaller number of nodes were within the highest priority group. Then, the smaller number of nodes have opportunities to send packets, which is unfair for the network. The number of nodes that successfully sent at least one packet in the proposed Priority-based Contact-duration Frame Selection mechanism was 16.2 times larger than in the PFS mechanism which is because the dynamic parameters are concerned in the proposed algorithm.
In the following, in both simulations and real experiments, the number of priority groups is fixed at 2. Figure 7 shows that both N p and N node were much improved when the inter-beacon duration at 2 s. Indeed, the longer the beacon intervals, the smaller the number of beacons sent. Thus, the number of network synchronizations is reduced so that nodes were seldom detected during collecting. No node will be detected if no beacon is sent. Figure 7. The impact of inter-beacon duration on network performance. In these simulations, the proposed algorithm is the combination of proposed Balance and PCdFS algorithms. Figure 8 shows the impact of the total number of collected packets for varying the UAV speed and fly height. The network achieves the optimal (N node = 46.5 of 30 simulations) when the fly height is 15 m (Figure 8a). In this simulation, the UAV speed is 10 ms −1 , and the size is 200 with nodes speeds vary from 1 ms −1 to 10 ms −1 . Due to using fixed Dr, the flight height had very slight impact on both N p and N node . The contact duration which was given by the relative distance between the nodes and the UAV was highly affected by the fly height. Hence, the PCdFS algorithm presents a difference from the PFS mechanism when the fly height is 95 m. Compared to N p , the N node was affected much when the fly height is larger than 75 m. There is clearly a difference between the two mechanisms when the gap between different fly heights exceeds 50 m.

Impact of UAV's Parameters Changes
The change of the UAV speed has a huge impact on both the total number of collected packets and the number of nodes that successfully send packets to the UAV Figure 8b. When the gap between the UAV speed and the maxi speed of all nodes is very small, the network performance is optimal. In this studied scenario, the maxi speed for all nodes is 10 ms −1 , thus, the performance is optimal when the UAV speed is 10 ms −1 . When V uav > 10 ms −1 , the higher the V uav , the bigger gap between the UAV speed and the nodes' speeds, the shorter contact duration between them, then, the less opportunities for nodes to communicate with the UAV. Then, the smaller number of packets sent to the UAV, the more it was unfair for the network.   Figure 9 shows the impact of the network size on system performance. In this study, the flight height is 15 m and UAV's speed is 10 ms −1 and the size vary from 5 to 200 with nodes' speeds vary from 1 ms −1 to 10 ms −1 .

Scalability
The larger the network size, the larger number of nodes has the opportunity to communicate with the UAV, thus, the larger number of packets were sent to the UAV. When the size was larger than 30, each time-slot has successful communication, thus, the number of collected packets in the PFS mechanism keeps steady. It keeps increasing in the PCdFS algorithm until it reaches the transmission upper bound of the collection time. The N node increased steadily in the proposed algorithm. The N node when N = 200 in the proposed algorithm is 11.34 times larger than when N = 5 while it is almost the same in the PFS mechanism. Hence, the proposed algorithm shows high scalability in terms of sensors density.  Figure 10 presents the impact of proposed algorithms on the network size. "Alg1/U AV 1 " simulate the combination of proposed Balance and PCdFS algorithms on the U AV 1 which takes-off from the original point of the path, while "Alg1/U AV 2 " simulate the same combination algorithms on the U AV 2 which takes-off from the endpoint (the midline of the path) of the path. U AV 1 fly in the same direction as the nodes while U AV 2 fly in the opposite direction. Intuitively, the average contact duration between the U AV 1 and the nodes is longer than the average value between U AV 2 and the nodes. Thus, the communication conducted in the U AV 1 case works better than in U AV 2 . There is no doubt that the multi-UAVs work better than single UAVs in data collection issues because of more opportunity provided for mobile nodes. Figure 10. The impact of U AV 1 , U AV 2 and multi-UAVs of proposed algorithm on network size. In these simulations, "Alg1" is the combination of proposed Balance and PCdFS algorithms, "Alg2" is the combination of proposed prioritized-based multiple contact-duration frame selection mechanisms (PMCdFS), PCdFS, and Balance algorithms.

Set Up
We study a path in Tongji University (Jiading Campus) as in Figure 11a. It is 5 meters wide and 1200 m long, with several intersections and 1 island (Figure 11a). In these experiments, the UAV equips a Pixhawk autopilot system [42,43] (as shown in Figure 11b) so as to fly along a predefined path at a given height. The UAV controlled through a ground station (Figure 12) where the flight height, speed and the packet transmission are controlled. We implement 15 bicycles move along the path with each equips a Pixhawk to simulate the communications based on proposed algorithms (Figure 11c). These nodes start with a random distance from the original point (point A in Figure 11a). Their locations and speeds are expressed in the NED coordinate system, as presented in Figure 11a.  Pixhawk has built-in MAVLINK protocol [44], the protocol No.24 (GPS_RAW_INT) [44] is used as the "beacon" packet (including the speed and location of the UAV) for the UAV, whose interval can be configured (e.g., in the following experiments, the beacon intervals is set at 2 s). For mobile nodes, the protocol No.24 (GPS_RAW_INT) is used as the "update" packet (including the speed and location of the mobile node). We modified and reused the protocol No.36 (SERVO_OUTPUT_RAW) [44] as the "scheduling" packet (which stores the sensor ID and time-slot ID for the collision-free communication between nodes and the UAV) for the UAV. Each MAVLINK packet contains a system ID field so we can use it to identify the sender. The pixhawk also has a log system so the GPS information, as well as the received packet number and time, is stored in the on-board SD card. Figure 13 presents the movements for U AV 1 (only one UAV is used in real experiments) where the fly height is 15 m, with control speeds of 5 ms −1 (Figure 13a) and 3 ms −1 (Figure 13b) according to Pixhawk. In the studied experiments, the UAV flew at 15 m and 30 m. Figure 14 is an example to present the instantaneous speeds and trajectories for 5 nodes (Node 1 to Node 5) according to the Pixhawk.
To make the UAV fly along this path, we set four waypoints along the path as shown in Figure 12. In the experiments, the UAV start from Point 1 to achieve its given speed (it is 5 ms −1 in Figure 12) to Point 2 , Point 3 and the ending point (Point 4 ). In Pixhawk autopilot system, the UAV will hover on the waypoint and ending point for 2 s. That is why in the Figure 13a, the UAV speed is lower than 5 ms −1 at P 2 and P 3 . In Figure 13b, both the height and instantaneous speed of UAV have a shock between the Point 3 and Point 4 because of the influence of wind. The wind has an impact on the dynamic parameters so as to affect the relative velocity between the mobile node and the UAV, the network performance affected accordingly. However, it cannot be control during experiments.  Figure 15, the number of collected packets in simulation is almost two times larger than in the experiments because of the impacts of hardware and environments are not considered in simulations. The flying height has a significant impact on the number of collected packets in experiments, especially when N node is steady between different heights. The higher the height, the larger number of nodes in both PFS and proposed algorithms. The number of collected packets of the proposed algorithm in size 15, h = 30 m is more than twice than in h = 15 m. The system performance increase as the size increase. The larger the network, the more nodes have opportunities to send packets, the more packets were collected. The number of collected packets in the proposed algorithm (when h is 15 m) is 1.2 times larger than in the PFS algorithm.
From Figure 16, it can be found that the UAV's speed has little impact on data collection in real experiments. This is because the UAV's speed is set at 3 ms −1 and 5 ms −1 because of the battery constrictions and the campus constrictions. The nodes' speeds are between 2 ms −1 and 5 ms −1 also ( Figure 14). Thus, the relative velocity between the UAV and mobile nodes is very small. The number of collected packets presented in Figure 16 keep the same conclusions as in simulations in Section 5.1.3 where the UAV fly at 5 ms −1 and 10 ms −1 .
The flight height almost has no influence on the number of nodes that successfully transmit packets to the UAV, as presented in both Figures 15 and 16, which are the same as in Section 5.1.3. Figure 15. The impact of network size, and flying height over the system performance. In these experiments, the beacon interval is fixed at 2 s according to the simulation results in Figure 7.

Discussions
According to the aforementioned simulations, the beacon interval and the UAV speed have a huge impact on network performance. The shorter the beacon interval, the better the system performance. The UAV speed is constrained by the node speed. The smaller the relative velocity between them, the higher the network performance. It keeps the same conclusions as in the real experiment. In real experiments, the data collection is well conducted when the UAV speed is set at 5 ms −1 which is very close to the average speed of mobile nodes. Compare to the other dynamic parameters, the number of priority levels has a steady impact on data collection in the simulations. From the movements of the nodes in Figure 14, it can be seen that the difference between the trajectories of nodes is very small because the road width is 5 m and the road length is 1200 m.
Compare Figure 13a,b, it also can be found that, the fly time in 3 ms −1 is 1.56 times as in 5 ms −1 while the speed increase by 66.67% (from 3 ms −1 to 5 ms −1 ). In the studied scenario, there are very small differences between the trajectories when UAV fly at 3 ms −1 and 5 ms −1 because the UAV follow the same path which width is very short compared to its length. Thus, the fly time is mainly dependent on the speed of the UAV. In other words, the slower the UAV fly, the higher energy consumption of the battery energy. From Figure 16, we notice that, the data collection has very little difference when UAV fly at 3 ms −1 and 5 ms −1 . Therefore, under given constrictions, the higher the fly speed of the UAV, the more saved battery energy.
The fly height has very little impact on data collection in simulations because of the same transmission rate is adopted. However, the fly height has a huge impact on data collection in experiments because a real and complex antenna system are conducted among the transmissions between the node and the UAV. The higher the flying height, the less interference from external factors (e.g., buildings, etc.). Thus, the better the transmission, the higher the network performance.

Conclusions
In this paper, we developed two mechanisms: PCdFS and PMCdFS. PCdFS mechanism is used to build the scheduling communications when the nodes are only covered by one of the UAVs. PMCdFS is used to balance the communication between the nodes and multi-UAVs when these nodes within the range of multi-UAVs at the same time. Based on the two mechanisms, we proposed the Balance algorithm which highly enhances the network fairness in the applications where both the nodes and the collectors are mobile. Two key mechanisms for designing Balance algorithm are: (i) divide the interesting areas into different priority areas and (ii) provide an independent priority value for each node in the same priority group according to their contact duration with the UAVs. We examined the performance of proposed algorithms through extensive simulations, and real experiments. In the experiments, we used 15 mobile nodes at a path with several intersections and one island at the Tongji campus in Shanghai, China. We also confirm the applicability of the proposed algorithm in a challenging and realistic scenario through numerous experiments. Both simulation results and experiment results present that the proposed PCdFS algorithm enhanced the network performance efficiently. The backhaul dimensioning is an interesting problem that we will address in our future work. It depends on the used backhaul type (either satellite or terrestrial) and on the allocation that is reserved to the network slice dedicated for Machine Type Communication (MTC) traffic.