# Data Collection Method of Energy Adaptive Distributed Wireless Sensor Networks Based on UAV

Authors: Bo Yang; Xiangyu Bai; Changxing Zhang
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

In sensor networks, UAVs are often introduced to assist data collection tasks. UAVs can operate as data ferry nodes, connecting distributed areas that are separated from each other. This paper proposes a data collection method for distributed wireless sensor networks based on UAV and introduces the idea of edge computing in it. In the single-hop transmission scenario, theK-means++ clustering method is used for sensor node clustering and cluster head election in the initial state. In the next rounds of data collection, UAV is used to assist in the election of new cluster heads and data collection tasks, taking into account the relative distance and the relative remaining energy relationship of the sensor nodes in their clusters. In addition, reasonable priorities are set for some nodes that have never been elected in the previous rounds and for the dead nodes. In the multihop transmission scenarios, for nodes that cannot deliver directly, the optimal relay node is selected for routing by comprehensively considering factors such as transmission angle, transmission distance, and remaining energy of the node in each cluster. The method proposed in this paper coordinates the overall energy consumption of sensor nodes in the environmental monitoring area, delays the death time of key sensor nodes, and extends the network lifetime. At the same time, an improved ACO is used to reasonably plan the data collection path of the UAV. Compared with the comparison scheme, the improved ACO can obtain a better shortest path length and has the fastest convergence speed when reaching the shortest path.


---

## Body

## 1. Introduction

In recent years, with the rapid development of wireless networks and the technical advantages of wireless sensor networks, such as self-organization, rapid deployment, high error tolerance, and low cost, sensor networks are often used to monitor and collect ecological environment data, collect information in the process of geological monitoring, and sense some areas that are not suitable for human beings to stay and live for a long time. However, due to the influence of the volume of sensor nodes and the difficulty of replacing batteries of a large number of sensor nodes, how to reduce energy consumption when collecting data is an important problem. After a large number of sensor nodes are deployed, how to effectively collect sensor network data and how to effectively prolong the service life of sensor nodes in the process of sensor network data collection have become hot issues in academic and industrial circles in recent years.For sensor data monitoring and collection tasks in special environments, multiple sensor data collection areas may be separated from each other due to geographical environmental factors such as rivers, mountains, and swamps. Deploying relay nodes in these areas will consume a lot of manpower and material resources and is very inconvenient to implement. The use of UAVs can effectively solve the impact of ground environmental factors on data collection tasks. With the increasing maturity of UAV technology, UAVs have been widely used in vehicle networking, agriculture, military reconnaissance, and other fields, and civil UAVs are also gradually popularized.By introducing UAVs into wireless sensor networks, it can form a delay-tolerant network with traditional sensor networks, and effectively assist sensor networks in data collection tasks by using the “store-carry-forward” method. The UAV serves as a relay to collect data from sensor networks in remote areas and transmit it to the data center for processing, thus avoiding manual data collection and effectively addressing the impact of environmental factors on data collection on the ground.UAVs assist wireless sensor networks where the UAV can move over the network, retrieve and collect data from sensor nodes. Using effective routing protocols can reduce energy consumption, avoid long-distance transmission and redundant transmission, and prolong the service life of sensors.We have previously studied data collection by UAV-assisted wireless sensor networks. In reference [1], we mainly proposed a data collection strategy based on drone technology in wireless sensor networks, using K-means++ method to conduct clustering and cluster head election in the initial state. Then, on the basis of comprehensive consideration of relative distance and relative residual energy of each sensor node, UAV is used to assist cluster head election and data collection. In addition, for some unelected nodes, a reasonable priority is set to make the energy consumption of sensor nodes more balanced. Experiments show that this strategy reduces the energy consumption and improves the performance of sensor networks. On the basis of the previous work, this paper further expands and utilizes UAV-related technology to assist data collection from multiple distributed sensor network areas separated from each other due to geographical environmental factors, so as to make the energy consumption of sensor nodes in the monitoring area more balanced. The main contributions of this paper are as follows.Introducing the idea of edge computing into the data collection process of distributed sensor network can greatly improve the efficiency of data collection. We discuss the case that the sensor node transmits the environmental data to the cluster head node through single-hop or multihop transmission mode. This method is not only flexible but also has low cost, which solves the problem that the data collection task of sensor network cannot be carried out uniformly in the environment monitoring area under complex geographical conditions.Due to the limited battery capacity and high energy consumption of UAV, an efficient and energy-saving routing protocol is needed in both military and commercial applications. In addition, the deployment and trajectory planning of UAVs have a significant impact on the performance of routing protocols. Therefore, an improved ACO is used in this paper to plan the UAV’s path, and the “store-carry-forward” method is adopted to collect sensor data from each cluster head node. In this way, the data is transmitted to the data center with a small path cost and time cost.The remaining chapters of this paper are organized as follows. The second chapter mainly introduces the related work, including the data collection method of the sensor network and the typical UAV path planning method. The third chapter mainly introduces the system model. The fourth chapter mainly introduces the data collection of UAV-based sensor network. The fifth chapter mainly introduces the UAV path planning based on improved ACO. The sixth chapter mainly introduces the simulation experiment and result analysis. The seventh chapter mainly introduces the conclusion and outlook.


## 2. Related Work

### 2.1. Data Collection Method of Sensor Network

For the data collection scheme of traditional sensor network, the data collection performance of the sensor network can be greatly improved by introducing mobile nodes as assistance, which has been paid attention to by most researchers [2–4]. In recent years, due to the reduction of UAV cost and the rapid development of UAV technology, using UAV as an auxiliary node to assist sensor network in data collection has become a research hotspot [5–8]. Traditional mobile nodes are susceptible to ground path restrictions and often cannot fully utilize the performance of sensor networks. However, the UAV has broken through the node’s movement path restriction and has better flexibility in data collection tasks.Chen et al. [9] proposed a universal NOMA-enabled UAV-assisted data collection protocol to maximize the total rate of wireless sensor networks during the data collection process. Xu et al. [10] introduced blockchain into the UAV-assisted IoT scenario and proposed a data collection system that takes into account both safety and energy efficiency, which can effectively improve the safety and efficiency of data collection. In order to ensure the timeliness of the collected data, Zhu et al. [11] optimized the trajectory and wake-up time allocation of the UAV as well as the transmission power of the sensor nodes to minimize the task completion time. Ma et al. [12] modelled the convergence node, UAV deployment, and resource allocation as a mixed-integer nonconvex optimization problem. They used heuristic methods to effectively solve the problem, thereby prolonging the life of the network. Ebrahimi et al. [13] used UAVs in dense wireless sensor networks to use projection-based compressed data collection (CDG) as a novel solution to collect data. Du et al. [14] used UAVs to vehicle tolerance delay network (VDTN) for message storage and forwarding and proposed a VDTN routing protocol based on UAV, which considered both the probability of each encounter and the duration of connection between mobile nodes. This method not only reduced network overhead and end-to-end delay but also improved the reliability of message forwarding.In summary, the existing data collection methods of sensor network rarely consider the problem of distributed wireless sensor networks composed of multiple isolated monitoring areas. In this network environment, how to collect data from the sensor network to reduce the overall energy consumption of the network and how to plan the UAV to optimize the data collection path of the separated monitoring area are problems worthy of study. These are also the focus of this paper.


### 2.2. Typical UAV Path Planning Method

Typical UAV path planning methods are mainly divided into two categories: classic UAV path planning methods and UAV path planning methods based on intelligent algorithms. The classic UAV path planning methods mainly include A-star algorithm, cell decomposition method, and artificial potential field method. UAV path planning methods based on intelligent algorithms mainly include genetic algorithm, particle swam optimization, and wolf colony algorithm.The A-star algorithm is a direct search algorithm for planning the shortest flight path of UAVs in static state. At the same time, the A-star algorithm is one of the heuristic algorithms [15]. Its basic algorithm idea is to use the heuristic function to evaluate some candidate nodes and select the node with the best condition as the next node on the path. This is a purposeful search method that effectively avoids blind searches. The A-star algorithm can achieve faster calculation speed when the path matrix is small and efficiently obtain the UAV path information that needs path planning. However, when the number of paths increases sharply, its running time also increases accordingly, which is not suitable for path planning problems in dynamic states.The artificial potential field path planning is a method that uses virtual forces in the environment to assist path planning. The basic idea of this algorithm is to abstract the movement process of the UAV in the environment as a movement process of the UAV under the virtual artificial potential field. The target point to be reached by the UAV is a gravitational field for it, and the obstacles in the path are a repulsive field for it. Under the combined action of the gravitational field and the repulsive field, the UAV starts from the starting point, avoids obstacles, and finally reaches the destination node. Generally speaking, the path generated by using the artificial potential field to plan the UAV’s path is smooth and safe, but this method has the problem of generating local optimal solutions, and there are certain human factors in the design of the repulsion field and the gravitational field. When there are obstacles near the target node, the UAV may not be able to reach the target node, which also limits the development of artificial potential field.Particle swarm optimization is a kind of evolutionary algorithm. It simulates a predation behaviour of a flock of birds randomly searching for food, without requiring any leader. In Particle swarm optimization, the potential solution of each UAV optimization problem can be abstracted as a “particle” in the search space, that is, a bird. “Particles” follow the current optimal “particles” to search in the solution space. These “particles” are initially some random solutions, and the optimal solution is found after many iterations of optimization. Particle swarm optimization is widely used in the field of UAV path planning. It has good convergence and path optimization capabilities and is suitable for the optimization of continuous problems. However, the algorithm may get trapped in local optimal solutions and cannot handle optimization problems in discrete cases well.Wolf colony algorithm is an algorithm based on the swarm intelligence of wolves. The algorithm simulates the predation behaviour of wolves and how wolves distribute their prey. The main body of the wolf colony algorithm is composed of three intelligent behaviours: wandering, calling, and besieging. The algorithm’s method of generating the head wolf uses the “winner is king” rule, while the algorithm’s method of updating the wolf colony uses the “stronger survival” mechanism. In solving the problem of UAV path planning, the wolf colony algorithm improves the probability of obtaining the optimal solution of UAV path planning in a limited time to a certain extent and reduces the understanding space. Although it can deal with simple UAV path planning problems and realize UAV path planning in a continuous environment, it cannot realize path planning in a discrete environment, and the iteration convergence speed is slow.Reinforcement learning is a new algorithm based on learning. In recent years, reinforcement learning has been widely used. Chen et al. [16] applied reinforcement learning to the Internet of Vehicles and proposed an online deep reinforcement learning scheme. Each mobile user only made use of local information to make decisions such as channel auction, computational task unloading, and input packet scheduling, so as to optimize task unloading of the air-ground integrated multiaccess edge computing (MEC) system. Reinforcement learning has also been applied in path planning. In order to reduce communication delay between vehicles, Wu et al. [17] proposed a multichannel vehicle edge computing routing scheme based on cooperative learning to solve the communication path selection problem in multichannel vehicle environment. Tong et al. [18] modelled the UAV-assisted data collection problem as a limited range Markov decision process with limited state and action space and developed a deep reinforcement learning algorithm to find the asymptotically optimal strategy. The introduction of reinforcement learning breaks the previous idea of using intelligent algorithm to optimize the path and provides a new method for path planning. Therefore, we can consider future work and design reinforcement learning algorithm for our own application scenarios to optimize the flight path of UAV.


## 2.1. Data Collection Method of Sensor Network

For the data collection scheme of traditional sensor network, the data collection performance of the sensor network can be greatly improved by introducing mobile nodes as assistance, which has been paid attention to by most researchers [2–4]. In recent years, due to the reduction of UAV cost and the rapid development of UAV technology, using UAV as an auxiliary node to assist sensor network in data collection has become a research hotspot [5–8]. Traditional mobile nodes are susceptible to ground path restrictions and often cannot fully utilize the performance of sensor networks. However, the UAV has broken through the node’s movement path restriction and has better flexibility in data collection tasks.Chen et al. [9] proposed a universal NOMA-enabled UAV-assisted data collection protocol to maximize the total rate of wireless sensor networks during the data collection process. Xu et al. [10] introduced blockchain into the UAV-assisted IoT scenario and proposed a data collection system that takes into account both safety and energy efficiency, which can effectively improve the safety and efficiency of data collection. In order to ensure the timeliness of the collected data, Zhu et al. [11] optimized the trajectory and wake-up time allocation of the UAV as well as the transmission power of the sensor nodes to minimize the task completion time. Ma et al. [12] modelled the convergence node, UAV deployment, and resource allocation as a mixed-integer nonconvex optimization problem. They used heuristic methods to effectively solve the problem, thereby prolonging the life of the network. Ebrahimi et al. [13] used UAVs in dense wireless sensor networks to use projection-based compressed data collection (CDG) as a novel solution to collect data. Du et al. [14] used UAVs to vehicle tolerance delay network (VDTN) for message storage and forwarding and proposed a VDTN routing protocol based on UAV, which considered both the probability of each encounter and the duration of connection between mobile nodes. This method not only reduced network overhead and end-to-end delay but also improved the reliability of message forwarding.In summary, the existing data collection methods of sensor network rarely consider the problem of distributed wireless sensor networks composed of multiple isolated monitoring areas. In this network environment, how to collect data from the sensor network to reduce the overall energy consumption of the network and how to plan the UAV to optimize the data collection path of the separated monitoring area are problems worthy of study. These are also the focus of this paper.


## 2.2. Typical UAV Path Planning Method

Typical UAV path planning methods are mainly divided into two categories: classic UAV path planning methods and UAV path planning methods based on intelligent algorithms. The classic UAV path planning methods mainly include A-star algorithm, cell decomposition method, and artificial potential field method. UAV path planning methods based on intelligent algorithms mainly include genetic algorithm, particle swam optimization, and wolf colony algorithm.The A-star algorithm is a direct search algorithm for planning the shortest flight path of UAVs in static state. At the same time, the A-star algorithm is one of the heuristic algorithms [15]. Its basic algorithm idea is to use the heuristic function to evaluate some candidate nodes and select the node with the best condition as the next node on the path. This is a purposeful search method that effectively avoids blind searches. The A-star algorithm can achieve faster calculation speed when the path matrix is small and efficiently obtain the UAV path information that needs path planning. However, when the number of paths increases sharply, its running time also increases accordingly, which is not suitable for path planning problems in dynamic states.The artificial potential field path planning is a method that uses virtual forces in the environment to assist path planning. The basic idea of this algorithm is to abstract the movement process of the UAV in the environment as a movement process of the UAV under the virtual artificial potential field. The target point to be reached by the UAV is a gravitational field for it, and the obstacles in the path are a repulsive field for it. Under the combined action of the gravitational field and the repulsive field, the UAV starts from the starting point, avoids obstacles, and finally reaches the destination node. Generally speaking, the path generated by using the artificial potential field to plan the UAV’s path is smooth and safe, but this method has the problem of generating local optimal solutions, and there are certain human factors in the design of the repulsion field and the gravitational field. When there are obstacles near the target node, the UAV may not be able to reach the target node, which also limits the development of artificial potential field.Particle swarm optimization is a kind of evolutionary algorithm. It simulates a predation behaviour of a flock of birds randomly searching for food, without requiring any leader. In Particle swarm optimization, the potential solution of each UAV optimization problem can be abstracted as a “particle” in the search space, that is, a bird. “Particles” follow the current optimal “particles” to search in the solution space. These “particles” are initially some random solutions, and the optimal solution is found after many iterations of optimization. Particle swarm optimization is widely used in the field of UAV path planning. It has good convergence and path optimization capabilities and is suitable for the optimization of continuous problems. However, the algorithm may get trapped in local optimal solutions and cannot handle optimization problems in discrete cases well.Wolf colony algorithm is an algorithm based on the swarm intelligence of wolves. The algorithm simulates the predation behaviour of wolves and how wolves distribute their prey. The main body of the wolf colony algorithm is composed of three intelligent behaviours: wandering, calling, and besieging. The algorithm’s method of generating the head wolf uses the “winner is king” rule, while the algorithm’s method of updating the wolf colony uses the “stronger survival” mechanism. In solving the problem of UAV path planning, the wolf colony algorithm improves the probability of obtaining the optimal solution of UAV path planning in a limited time to a certain extent and reduces the understanding space. Although it can deal with simple UAV path planning problems and realize UAV path planning in a continuous environment, it cannot realize path planning in a discrete environment, and the iteration convergence speed is slow.Reinforcement learning is a new algorithm based on learning. In recent years, reinforcement learning has been widely used. Chen et al. [16] applied reinforcement learning to the Internet of Vehicles and proposed an online deep reinforcement learning scheme. Each mobile user only made use of local information to make decisions such as channel auction, computational task unloading, and input packet scheduling, so as to optimize task unloading of the air-ground integrated multiaccess edge computing (MEC) system. Reinforcement learning has also been applied in path planning. In order to reduce communication delay between vehicles, Wu et al. [17] proposed a multichannel vehicle edge computing routing scheme based on cooperative learning to solve the communication path selection problem in multichannel vehicle environment. Tong et al. [18] modelled the UAV-assisted data collection problem as a limited range Markov decision process with limited state and action space and developed a deep reinforcement learning algorithm to find the asymptotically optimal strategy. The introduction of reinforcement learning breaks the previous idea of using intelligent algorithm to optimize the path and provides a new method for path planning. Therefore, we can consider future work and design reinforcement learning algorithm for our own application scenarios to optimize the flight path of UAV.


## 3. System Model

Edge computing refers to an open platform that integrates network, computing, storage, and application core capabilities to provide the nearest end service on one side of the object or data source. Edge computing provides faster services and is used to enforce business, security, and privacy. Introducing the idea of edge computing in the data collection process of distributed sensor networks can greatly improve the efficiency of data collection.In a distributed sensor network environmental data monitoring and collection task which has multiple partitioned monitoring areas, multiple sensor nodes in each monitoring area are responsible for environmental data sensing. The sensor node transmits the environmental data to the cluster head node through single-hop transmission or multihop transmission. After that, the cluster head node aggregates and fuses the data of each sensor node. Starting from the data center, the UAV uses a “store-carry-forward” method according to a certain path planning method to collect data from the cluster head nodes in each partitioned area. The UAV returns the collected data to the data center for transmission and processing. The application scenario of sensor network data collection system is shown in Figure1. The entities in the system and their functions are described as follows:
Sensor Node (SN). The sensor node is used to collect the sensing data in the environmental monitoring area, such as temperature, humidity, light intensity, and the acid, alkali, and salt concentration in the soil, etc. The sensor node periodically sends the sensed environmental data to the cluster head node and at the same time transmits its own remaining energy information to the cluster head node.Relay Node (RN). Due to the limited communication distance of the sensor node, when the Euclidean distance between the sensor node and the cluster head node is greater than the communication distance, the relay node is responsible for relaying the transmitted data. The relay node can replace an unreachable link with multiple links of better quality to obtain better network coverage.Cluster Head Node (Cluster Head, CH). The cluster head node converges and fuses the data information collected by the sensors in the cluster. At the same time, the cluster head node is responsible for interacting with the UAV, transmitting the collected sensing data to the UAV, and receiving control information from the UAV.Data Center. The data center gathers the environmental monitoring data collected by UAV from each partitioned monitoring area and performs data processing.Figure 1
System application scenario.By delegating computing and processing tasks to sensor nodes and UAV nodes, many controls will be achieved through local equipment without having to hand over to the data center in the cloud. The processing process is completed at the local edge layer, which greatly improves processing efficiency. This way, because it is closer to the terminal, the demand can be solved at the edge.The whole system model can be divided into two parts: data collection of sensor network based on UAV and UAV path planning based on improved ACO. Between them, the data collection of UAV-based sensor network is divided into two cases: single-hop transmission and multihop transmission, according to the relationship between communication distance and transmission distance.The system model is based on the following premise assumptions. (1) The position coordinates of each sensor node are fixed and the initial energy is known. (2) The UAV stores the mapping relationship information between the identity document (ID) of the sensor node and its location coordinates. (3) The sensor nodes can adjust the signal transmission power adaptively according to the distance of the nodes. (4) The communication channel is a symmetric propagation channel. (5) Issues such as communication security and encryption will not be considered for the time being.


## 4. Data Collection of UAV-Based Sensor Network

### 4.1. Sensor Clustering and Cluster Head Election in the Initial State

Abstract each area in the partitioned environmental monitoring area. Assume that each monitoring area is a rectangle with lengthA and width B. N sensor nodes are randomly distributed, as shown in Figure 2. The communication distance of each sensor node is R. The sensor node transmits the sensed data to the cluster head node of its own cluster. The cluster head node performs data fusion on the collected sensed data, waits for the arrival of the UAV, and interacts with the UAV. Then, the data is transferred to the data center.Figure 2
Abstract of a single monitoring area.For each separated environmental monitoring area, when the coverage of the monitoring area exceeds the communication range of the sensor node, two ways can be used to realize the communication between sensor nodes. (1) Divide a large area so that the range of each divided area will not exceed the communication range of sensor nodes, thereby ensuring single-hop transmission between sensor nodes. (2) Sensor nodes use multihop transmission to transmit data to other nodes through relay nodes.First discuss the first case, that is, clustering a larger network, so that each sensor node can communicate with all other nodes in the cluster. The cluster numberNum of sensor nodes is calculated according to Equations (1) and (2). Num takes an integer value in the interval Num1,Num2.
(1)Num1=Areaπ×R/22,(2)Num2=2×AreaR2,where Num1 is the smallest value of the number of sensor node clusters in the environmental monitoring area, Num2 is the largest value of the number of sensor node clusters in the environmental monitoring area, Area is the area of the environmental monitoring area, and R is the communication distance of the sensor nodes. The environmental monitoring area can be of any shape. In order to simplify the description, a regular shape is selected for illustration. The basic idea of calculating the number of clusters of sensor nodes in a regular shape area or an irregular shape area is the same.Because the main factor affecting the energy consumption of sensor nodes is transmission distance, the distance is evaluated as a similarity. Compared to theK-means algorithm, the K-means++ algorithm significantly reduces the error of classification results. So, we use the K-means++ algorithm to cluster the nodes in the sensor network.In the initial state, by using theK-means++ algorithm, the clustering of randomly distributed sensor nodes in the environmental monitoring area is completed, and the initial cluster head nodes are elected. The initial cluster head node broadcasts its own node information in the cluster and uses time division multiple access (TDMA) [19] to allocate transmission time slots for the data collection of other sensor nodes in the cluster. During each round of data collection, the normal sensor nodes in each cluster use allocated time slots to transmit the sensing environmental data to the cluster head node and declare their remaining energy information. The data packet contains the remaining energy information of the node and the environmental monitoring data collected by the node in this round. The data packet format is shown in Figure 3. After the cluster head node obtains the remaining energy information of all nodes in the cluster, it forms the remaining energy matrix for the current round of transmission.Figure 3
Packet format.


### 4.2. UAV-Assisted Cluster Head Election and Data Collection in a Single-Hop Scenario

In the process of UAV-assisted sensor network data collection, each sensor node is fixed in the environmental monitoring area. Therefore, the relative distance value of each sensor node in the cluster is calculated using(3)Disi=∑∀nj∈Ckdni,njCk×dmax,where Disi represents the intracluster distance relationship of the i-th node in each cluster, ni and nj represent the i-th node and the j-th node, Ck represents the k-th cluster, dni,nj represents the Euclidean distance between the current node and all nodes in the cluster, Ck represents the total number of the nodes in the k-th cluster, and dmax represents the maximum Euclidean distance between the current node and other nodes in the cluster. dni,nj is calculated according to
(4)dni,nj=xa−xb2+ya−yb2+za−zb2,where the coordinate of node ni is xa,ya,za and the coordinate of node nj is xb,yb,zb.In an environmental monitoring region, the position of each sensor node is fixed. Then after clustering in an initial state, the cluster of the node is fixed. Therefore, UAV only needs to calculate the relative distance of each sensor node once, which greatly reduces the calculation burden of the UAV.During each round of data collection, the cluster head node collects and fuses the collection data of each node in the cluster and transmits the remaining energy information of each node in the cluster to the UAV. The UAV calculates the relative residual energy value of each node in each cluster according to(5)Engi=Er,CkniEr,Ckmax,where Er,Ckni represents the remaining energy of the i-th node in the k-th cluster during the r-th round of data transmission, Er,Ckmax represents the maximum remaining energy of the node in the k-th cluster during the r-th round of data transmission, i is an integer value in the interval 1,q, and q is the total number of nodes in the current cluster.Since the goal is to select the node with the smallest relative distance from other nodes in the cluster and the largest relative residual energy as possible as the new cluster head node in the next round, therefore, the UAV is used to calculate the priority of each node to be elected as the cluster head in each cluster according to the Equation (6) and save it in Prii.
(6)Prii=Engi−Disi,where i is an integer value in the interval 1,q and q is the total number of nodes in the current cluster.If there is a node in the cluster that has never been elected as a cluster head in the previous1/p (p is the proportion of cluster heads to all sensor nodes), its priority is added to the original basis by u (u≥1, and u is an integer). That is to say, in the next round, a node that has not been elected as a cluster head for a long time and has a relatively small relative distance from other nodes and a relatively large residual energy has a greater probability of becoming a new cluster head node. The equation is described in
(7)Prii=Engi−Disi+u.When there is a node with a remaining energy value of 0 in the cluster, the priority value of the node is permanently set to−u (u≥1, and u is an integer), as shown in
(8)Prii=−u.Through the above method, the UAV calculates the priority of each node in the sensor network to be elected as the cluster head in the next round and forms a priority matrix. The node corresponding to the item with the largest element value in the priority matrix becomes the cluster head node elected in the next round. The priority matrixTotal_Pri formed by all clusters in the UAV is shown in
(9)Total_Pri=Pri11Pri21Pri31Pri12Pri22Pri32Pri13Pri23Pri33⋯Prik1⋯Prik2⋯Prik3⋮⋮⋮Pri1iPri2iPri3i⋱⋮⋯Priki.Among them, each column in the matrix represents the priority of each node in each cluster to be elected as the cluster head in the next round. There arek columns in total, representing k clusters. For clusters with fewer nodes, add several zeros at the end of the column.UAV will use the identification number of the cluster head node in the next round as the control information to transmit to the current cluster head node. The current cluster head node broadcasts the information of the cluster head node in the next round in the cluster. The new cluster head node uses TDMA to allocate data transmission time slots for each node in the cluster. During the next round of data collection, the normal node will transmit the remaining energy information and data information to the new cluster head by the allocated time slot.In this way, the UAV flies to each cluster head node to perform the task of collecting environmental monitoring data information, and the data information collected from each cluster head node is transmitted to the data center through the “store-carry-forward” DTN data transmission mode. The data center analyses, processes, and predicts the collected environmental monitoring data to complete a round of sensor network data collection tasks.


### 4.3. UAV-Assisted Data Collection in a Multihop Scenario

When the clustering range of each environmental monitoring area is greater than the communication range of the sensor node, that is, for the second case, the nodes outside the communication range need to use multihop transmission, and the communication with the cluster head node is completed by selecting the relay node.First, use the same method as the previous method to perform the clustering of sensor nodes and the election of cluster heads under the initial conditions. After that, the same UAV-assisted cluster head election method is used to elect the cluster head nodes of each environmental monitoring area in the next round. The UAV uses a “store-carry-forward” approach to collect data from each cluster head node and passes it to the data center for processing. Next, the selection method of the relay node and the corresponding routing process are mainly explained. The model of data transmission using relay nodes is shown in Figure4.Figure 4
Data transmission model using relay node.In the illustrated transmission model, during a round of data collection, nodes are mainly divided into three categories: cluster head nodes, relay nodes, and ordinary sensor nodes. Among them, the cluster head node is responsible for collecting the data sensed by noncluster head nodes in the cluster, performing data fusion, and then interacts with the UAV node. The relay node is selected from the set of candidate relay nodes and is responsible for relaying the data of sensor nodes that cannot directly reach the cluster head node. The relay node also completing its own data sensing task. The ordinary sensor node mainly completes the basic environmental data sensing task. In the above figure,θ is the angle in the middle of the connection between the candidate relay node and the ordinary sensor node and the connection between the ordinary sensor node and the cluster head node.In the entire sensor network, the positions of all nodes are fixed. Therefore, it is assumed that after the initial state clustering is completed, each sensor node forms a mapping table of the distance between each node in the cluster and other nodes in the cluster.Since ID and coordinates of each node in each cluster are known and they have a one-to-one correspondence, after the cluster head node broadcasts the next round of cluster head messages, the ordinary sensor node that needs to transmit data first obtains the distance between it and the cluster head node by querying the node distance mapping table. When the distance is less than the communication distance of an ordinary sensor node, the ordinary sensor node transfers the collected data to the cluster head node by direct delivery. When the distance is greater than the communication distance of an ordinary sensor node, the ordinary sensor node selects a relay node according to the method described below.Assume that the position distribution relationship of cluster head node, candidate relay node, and ordinary sensor node is shown in Figure5.Figure 5
Position distribution relationship of three kinds of nodes.According to geometric knowledge, the calculation method of the included angleθ is shown in
(10)θ=cos−1d22+d32−d122×d2×d3,where d1 is the distance between the cluster head node and the candidate relay node, d2 is the distance between the candidate relay node and the ordinary sensor node, and d3 is the distance between the ordinary sensor node and the cluster head node.If the ordinary sensor node cannot directly transmit the data to the cluster head node, the nodes within the one-hop communication range of the ordinary sensor node are classified and stored in different sets. The classification method is based on the above-mentioned included angleθ, and nodes meeting different conditions will be divided into different sets.Since the goal is to transfer data in the direction closer to the cluster head node, for nodes within the communication range of ordinary sensor nodes, nodes within the range ofθ∈π/2,π are stored in the invalid set. The nodes in this set will never be selected. Next, divide the nodes in the range of θ∈0,π/2 into three sets. The Pri1 set stores the nodes in the range of θ∈0,π/6. The Pri2 set stores the nodes in the range of θ∈π/6,π/3. The Pri3 set stores the nodes in the range of θ∈π/3,π/2. The priority relationship of the nodes is Pri1>Pri2>Pri3. Then, calculate the priority of each candidate relay node in the Pri1, Pri2, and Pri3, as shown in
(11)Prisi,j=λ×π/2−θπ/2+1−λ×dij,where Prisi,j represents the priority function for the i-th ordinary sensor node in the cluster to select the j-th candidate relay node in the range of the set s for relaying. The set s is one of Pri1, Pri2, and Pri3. λ is the weight coefficient, and λ∈0,1. θ is the angle in the middle of the connection between the candidate relay node and the ordinary sensor node, and the connection between the ordinary sensor node and the cluster head node. The larger the value of π/2−θ, the closer the position of the candidate relay node is to the direction of the cluster head node within the range of the candidate set. dij is the Euclidean distance between node i and node j. In order to reduce the number of hops from the ordinary sensor node to the cluster head node as much as possible, data should be transmitted to the candidate relay node closest to the cluster head node and farthest within the communication distance of the node. That is, a candidate relay node with a larger priority function value is more likely to become the final relay node.Next, perform energy discrimination on the candidate relay nodej with the largest priority function value Prisi,j. When the remaining energy of node j is greater than the average remaining energy of all nodes in the set Pri1, Pri2, and Pri3, the candidate relay node becomes the final relay node. Otherwise, the node with the second priority function value is judged. By analogy, the energy discrimination method of nodes is shown in
(12)Flagj=EresidualjEavg,where Flagj is the flag bit for whether node j is elected. If its value is greater than 1, node j is elected as the final relay node. Eresidualj is the remaining energy value of the current candidate relay node j, and Eavg is the average remaining energy of all nodes in the set Pri1, Pri2, and Pri3. If there is no node in the set Pri1 that meets the requirements, the nodes in the set Pri2 are judged. If there is no node in the set Pri2 that meets the requirements, the nodes in the set Pri3 are judged until a suitable relay node is selected. If there is no suitable relay node for relaying, the ordinary sensor node is marked as unreachable.If the data transmission range of the optimal relay node still cannot transmit data to the cluster head node, continue to select the next hop relay node for relay transmission according to the above method. If within the specified number of hops, the data still cannot be transmitted to the cluster head node, the ordinary sensor node is marked as unreachable.


### 4.4. Energy Consumption Model of Wireless Sensor Networks

Since the energy consumption of nodes in a wireless sensor networks is mainly composed of transmission energy consumption and receiving energy consumption, in the process of data transmission and data reception of sensor nodes, for short-distance transmission, the free space model is adopted, and for long-distance transmission, the multipath fading model is adopted [20]. The wireless transmission model is shown in Figure 6.Figure 6
Wireless transmission model.For the symmetric propagation channel, the energy consumption when the sensor node transmitsk bits data in the data packet to d meters away is shown in [21]
(13)d0=EfsEmp,(14)ETxk,d=ETxelek+ETxfs/mlpk,d,(15)ETxk,d=Eele×k+Efs×k×d2,d≤d0,Eele×k+Emp×k×d4,d>d0.The energy consumption of sensor nodes receivingk bits data is calculated according to
(16)ERxk=Eele×k,where ETxk,d is the data sending energy consumption, ERxk is the data reception energy consumption, Eele is the energy consumption per bit of the transmitter or receiver, Efs is the free space model parameter, and Emp is the multipath fading model parameter.The data fusion energy consumption of sensor nodes fork bits data is shown in
(17)EFk=k×Eda,where EFk is the energy consumption of data fusion and Eda is the energy consumption parameter of data fusion.


## 4.1. Sensor Clustering and Cluster Head Election in the Initial State

Abstract each area in the partitioned environmental monitoring area. Assume that each monitoring area is a rectangle with lengthA and width B. N sensor nodes are randomly distributed, as shown in Figure 2. The communication distance of each sensor node is R. The sensor node transmits the sensed data to the cluster head node of its own cluster. The cluster head node performs data fusion on the collected sensed data, waits for the arrival of the UAV, and interacts with the UAV. Then, the data is transferred to the data center.Figure 2
Abstract of a single monitoring area.For each separated environmental monitoring area, when the coverage of the monitoring area exceeds the communication range of the sensor node, two ways can be used to realize the communication between sensor nodes. (1) Divide a large area so that the range of each divided area will not exceed the communication range of sensor nodes, thereby ensuring single-hop transmission between sensor nodes. (2) Sensor nodes use multihop transmission to transmit data to other nodes through relay nodes.First discuss the first case, that is, clustering a larger network, so that each sensor node can communicate with all other nodes in the cluster. The cluster numberNum of sensor nodes is calculated according to Equations (1) and (2). Num takes an integer value in the interval Num1,Num2.
(1)Num1=Areaπ×R/22,(2)Num2=2×AreaR2,where Num1 is the smallest value of the number of sensor node clusters in the environmental monitoring area, Num2 is the largest value of the number of sensor node clusters in the environmental monitoring area, Area is the area of the environmental monitoring area, and R is the communication distance of the sensor nodes. The environmental monitoring area can be of any shape. In order to simplify the description, a regular shape is selected for illustration. The basic idea of calculating the number of clusters of sensor nodes in a regular shape area or an irregular shape area is the same.Because the main factor affecting the energy consumption of sensor nodes is transmission distance, the distance is evaluated as a similarity. Compared to theK-means algorithm, the K-means++ algorithm significantly reduces the error of classification results. So, we use the K-means++ algorithm to cluster the nodes in the sensor network.In the initial state, by using theK-means++ algorithm, the clustering of randomly distributed sensor nodes in the environmental monitoring area is completed, and the initial cluster head nodes are elected. The initial cluster head node broadcasts its own node information in the cluster and uses time division multiple access (TDMA) [19] to allocate transmission time slots for the data collection of other sensor nodes in the cluster. During each round of data collection, the normal sensor nodes in each cluster use allocated time slots to transmit the sensing environmental data to the cluster head node and declare their remaining energy information. The data packet contains the remaining energy information of the node and the environmental monitoring data collected by the node in this round. The data packet format is shown in Figure 3. After the cluster head node obtains the remaining energy information of all nodes in the cluster, it forms the remaining energy matrix for the current round of transmission.Figure 3
Packet format.


## 4.2. UAV-Assisted Cluster Head Election and Data Collection in a Single-Hop Scenario

In the process of UAV-assisted sensor network data collection, each sensor node is fixed in the environmental monitoring area. Therefore, the relative distance value of each sensor node in the cluster is calculated using(3)Disi=∑∀nj∈Ckdni,njCk×dmax,where Disi represents the intracluster distance relationship of the i-th node in each cluster, ni and nj represent the i-th node and the j-th node, Ck represents the k-th cluster, dni,nj represents the Euclidean distance between the current node and all nodes in the cluster, Ck represents the total number of the nodes in the k-th cluster, and dmax represents the maximum Euclidean distance between the current node and other nodes in the cluster. dni,nj is calculated according to
(4)dni,nj=xa−xb2+ya−yb2+za−zb2,where the coordinate of node ni is xa,ya,za and the coordinate of node nj is xb,yb,zb.In an environmental monitoring region, the position of each sensor node is fixed. Then after clustering in an initial state, the cluster of the node is fixed. Therefore, UAV only needs to calculate the relative distance of each sensor node once, which greatly reduces the calculation burden of the UAV.During each round of data collection, the cluster head node collects and fuses the collection data of each node in the cluster and transmits the remaining energy information of each node in the cluster to the UAV. The UAV calculates the relative residual energy value of each node in each cluster according to(5)Engi=Er,CkniEr,Ckmax,where Er,Ckni represents the remaining energy of the i-th node in the k-th cluster during the r-th round of data transmission, Er,Ckmax represents the maximum remaining energy of the node in the k-th cluster during the r-th round of data transmission, i is an integer value in the interval 1,q, and q is the total number of nodes in the current cluster.Since the goal is to select the node with the smallest relative distance from other nodes in the cluster and the largest relative residual energy as possible as the new cluster head node in the next round, therefore, the UAV is used to calculate the priority of each node to be elected as the cluster head in each cluster according to the Equation (6) and save it in Prii.
(6)Prii=Engi−Disi,where i is an integer value in the interval 1,q and q is the total number of nodes in the current cluster.If there is a node in the cluster that has never been elected as a cluster head in the previous1/p (p is the proportion of cluster heads to all sensor nodes), its priority is added to the original basis by u (u≥1, and u is an integer). That is to say, in the next round, a node that has not been elected as a cluster head for a long time and has a relatively small relative distance from other nodes and a relatively large residual energy has a greater probability of becoming a new cluster head node. The equation is described in
(7)Prii=Engi−Disi+u.When there is a node with a remaining energy value of 0 in the cluster, the priority value of the node is permanently set to−u (u≥1, and u is an integer), as shown in
(8)Prii=−u.Through the above method, the UAV calculates the priority of each node in the sensor network to be elected as the cluster head in the next round and forms a priority matrix. The node corresponding to the item with the largest element value in the priority matrix becomes the cluster head node elected in the next round. The priority matrixTotal_Pri formed by all clusters in the UAV is shown in
(9)Total_Pri=Pri11Pri21Pri31Pri12Pri22Pri32Pri13Pri23Pri33⋯Prik1⋯Prik2⋯Prik3⋮⋮⋮Pri1iPri2iPri3i⋱⋮⋯Priki.Among them, each column in the matrix represents the priority of each node in each cluster to be elected as the cluster head in the next round. There arek columns in total, representing k clusters. For clusters with fewer nodes, add several zeros at the end of the column.UAV will use the identification number of the cluster head node in the next round as the control information to transmit to the current cluster head node. The current cluster head node broadcasts the information of the cluster head node in the next round in the cluster. The new cluster head node uses TDMA to allocate data transmission time slots for each node in the cluster. During the next round of data collection, the normal node will transmit the remaining energy information and data information to the new cluster head by the allocated time slot.In this way, the UAV flies to each cluster head node to perform the task of collecting environmental monitoring data information, and the data information collected from each cluster head node is transmitted to the data center through the “store-carry-forward” DTN data transmission mode. The data center analyses, processes, and predicts the collected environmental monitoring data to complete a round of sensor network data collection tasks.


## 4.3. UAV-Assisted Data Collection in a Multihop Scenario

When the clustering range of each environmental monitoring area is greater than the communication range of the sensor node, that is, for the second case, the nodes outside the communication range need to use multihop transmission, and the communication with the cluster head node is completed by selecting the relay node.First, use the same method as the previous method to perform the clustering of sensor nodes and the election of cluster heads under the initial conditions. After that, the same UAV-assisted cluster head election method is used to elect the cluster head nodes of each environmental monitoring area in the next round. The UAV uses a “store-carry-forward” approach to collect data from each cluster head node and passes it to the data center for processing. Next, the selection method of the relay node and the corresponding routing process are mainly explained. The model of data transmission using relay nodes is shown in Figure4.Figure 4
Data transmission model using relay node.In the illustrated transmission model, during a round of data collection, nodes are mainly divided into three categories: cluster head nodes, relay nodes, and ordinary sensor nodes. Among them, the cluster head node is responsible for collecting the data sensed by noncluster head nodes in the cluster, performing data fusion, and then interacts with the UAV node. The relay node is selected from the set of candidate relay nodes and is responsible for relaying the data of sensor nodes that cannot directly reach the cluster head node. The relay node also completing its own data sensing task. The ordinary sensor node mainly completes the basic environmental data sensing task. In the above figure,θ is the angle in the middle of the connection between the candidate relay node and the ordinary sensor node and the connection between the ordinary sensor node and the cluster head node.In the entire sensor network, the positions of all nodes are fixed. Therefore, it is assumed that after the initial state clustering is completed, each sensor node forms a mapping table of the distance between each node in the cluster and other nodes in the cluster.Since ID and coordinates of each node in each cluster are known and they have a one-to-one correspondence, after the cluster head node broadcasts the next round of cluster head messages, the ordinary sensor node that needs to transmit data first obtains the distance between it and the cluster head node by querying the node distance mapping table. When the distance is less than the communication distance of an ordinary sensor node, the ordinary sensor node transfers the collected data to the cluster head node by direct delivery. When the distance is greater than the communication distance of an ordinary sensor node, the ordinary sensor node selects a relay node according to the method described below.Assume that the position distribution relationship of cluster head node, candidate relay node, and ordinary sensor node is shown in Figure5.Figure 5
Position distribution relationship of three kinds of nodes.According to geometric knowledge, the calculation method of the included angleθ is shown in
(10)θ=cos−1d22+d32−d122×d2×d3,where d1 is the distance between the cluster head node and the candidate relay node, d2 is the distance between the candidate relay node and the ordinary sensor node, and d3 is the distance between the ordinary sensor node and the cluster head node.If the ordinary sensor node cannot directly transmit the data to the cluster head node, the nodes within the one-hop communication range of the ordinary sensor node are classified and stored in different sets. The classification method is based on the above-mentioned included angleθ, and nodes meeting different conditions will be divided into different sets.Since the goal is to transfer data in the direction closer to the cluster head node, for nodes within the communication range of ordinary sensor nodes, nodes within the range ofθ∈π/2,π are stored in the invalid set. The nodes in this set will never be selected. Next, divide the nodes in the range of θ∈0,π/2 into three sets. The Pri1 set stores the nodes in the range of θ∈0,π/6. The Pri2 set stores the nodes in the range of θ∈π/6,π/3. The Pri3 set stores the nodes in the range of θ∈π/3,π/2. The priority relationship of the nodes is Pri1>Pri2>Pri3. Then, calculate the priority of each candidate relay node in the Pri1, Pri2, and Pri3, as shown in
(11)Prisi,j=λ×π/2−θπ/2+1−λ×dij,where Prisi,j represents the priority function for the i-th ordinary sensor node in the cluster to select the j-th candidate relay node in the range of the set s for relaying. The set s is one of Pri1, Pri2, and Pri3. λ is the weight coefficient, and λ∈0,1. θ is the angle in the middle of the connection between the candidate relay node and the ordinary sensor node, and the connection between the ordinary sensor node and the cluster head node. The larger the value of π/2−θ, the closer the position of the candidate relay node is to the direction of the cluster head node within the range of the candidate set. dij is the Euclidean distance between node i and node j. In order to reduce the number of hops from the ordinary sensor node to the cluster head node as much as possible, data should be transmitted to the candidate relay node closest to the cluster head node and farthest within the communication distance of the node. That is, a candidate relay node with a larger priority function value is more likely to become the final relay node.Next, perform energy discrimination on the candidate relay nodej with the largest priority function value Prisi,j. When the remaining energy of node j is greater than the average remaining energy of all nodes in the set Pri1, Pri2, and Pri3, the candidate relay node becomes the final relay node. Otherwise, the node with the second priority function value is judged. By analogy, the energy discrimination method of nodes is shown in
(12)Flagj=EresidualjEavg,where Flagj is the flag bit for whether node j is elected. If its value is greater than 1, node j is elected as the final relay node. Eresidualj is the remaining energy value of the current candidate relay node j, and Eavg is the average remaining energy of all nodes in the set Pri1, Pri2, and Pri3. If there is no node in the set Pri1 that meets the requirements, the nodes in the set Pri2 are judged. If there is no node in the set Pri2 that meets the requirements, the nodes in the set Pri3 are judged until a suitable relay node is selected. If there is no suitable relay node for relaying, the ordinary sensor node is marked as unreachable.If the data transmission range of the optimal relay node still cannot transmit data to the cluster head node, continue to select the next hop relay node for relay transmission according to the above method. If within the specified number of hops, the data still cannot be transmitted to the cluster head node, the ordinary sensor node is marked as unreachable.


## 4.4. Energy Consumption Model of Wireless Sensor Networks

Since the energy consumption of nodes in a wireless sensor networks is mainly composed of transmission energy consumption and receiving energy consumption, in the process of data transmission and data reception of sensor nodes, for short-distance transmission, the free space model is adopted, and for long-distance transmission, the multipath fading model is adopted [20]. The wireless transmission model is shown in Figure 6.Figure 6
Wireless transmission model.For the symmetric propagation channel, the energy consumption when the sensor node transmitsk bits data in the data packet to d meters away is shown in [21]
(13)d0=EfsEmp,(14)ETxk,d=ETxelek+ETxfs/mlpk,d,(15)ETxk,d=Eele×k+Efs×k×d2,d≤d0,Eele×k+Emp×k×d4,d>d0.The energy consumption of sensor nodes receivingk bits data is calculated according to
(16)ERxk=Eele×k,where ETxk,d is the data sending energy consumption, ERxk is the data reception energy consumption, Eele is the energy consumption per bit of the transmitter or receiver, Efs is the free space model parameter, and Emp is the multipath fading model parameter.The data fusion energy consumption of sensor nodes fork bits data is shown in
(17)EFk=k×Eda,where EFk is the energy consumption of data fusion and Eda is the energy consumption parameter of data fusion.


## 5. UAV Path Planning Based on Improved ACO

When there are multiple separated environmental monitoring areas, these different monitoring areas have different area and different number of sensor nodes, as shown in Figure1 in Chapter 3. How to make the UAV start from the data center, use the new cluster head node information obtained in the previous round, use appropriate algorithms, follow the preplanned path to collect data from the cluster head nodes in each monitoring area, and transfer the collected environmental data to the data center is an important issue.This problem can be simplified to a traveling salesman problem (TSP) with a fixed starting point and ending point [22]. The TSP problem is one of the most well-known problems in the field of mathematics. It can be described as follows: suppose a UAV starts from the data center and needs to fly to N sensor cluster head nodes for data collection. It must plan the flight path. The restriction is that each cluster head node can only be passed once and finally needs to return to the data center to submit sensing data. The goal of selecting the flight path is to require the resulting flight path to be the minimum of all paths. The TSP problem is an NP-hard problem with the computational complexity of NPC. Next, the research focus of this chapter will be put forward: UAV path planning method based on improved ant colony optimization.For solving the task of UAV starting from a fixed data center, collecting sensing data from the cluster head nodes that in the separated environmental monitoring area in turn, and returning the collected data to the data center, this section uses an improved ACO to obtain a better approximate optimal solution. Introducing the simulated annealing algorithm with dynamic simulated annealing probability coefficient and tempering algorithm to further optimize the UAV’s data collection path.The algorithm process of the improved ACO is as follows.Step 1. Initialize ant pheromone and heuristic value.
Initialize the pheromone value of each edge in the UAV data collection path and the taboo table of each ant. The pheromone value on each edge is initialized to a smaller valuer0. The taboo table of each ant is used to record the sensor cluster head nodes that the ant has walked so far. Initialize the taboo table of each ant as the sensor cluster head node where the ant is currently located, and set the length of the taboo table to a. In the initial state, the pheromone value released by the ant on each edge is 0.Step 2. Introduce the simulated annealing to iterate to construct the flight path of UAV.
At the temperatureT of the simulated annealing algorithm, perform an ant search. Ant k determines the sensor cluster head node to be reached in the next step according to the probability pijkt, until it finally forms a legal UAV data collection path. Among them, the cluster head nodes that have passed are recorded in the taboo table. These nodes recorded in the taboo table cannot be included in the cluster head nodes that the ant will reach in the future. The calculation method of probability pijkt is shown in
(18)pijkt=τijtαηijtβ∑s∈akτistαηistβ0,other,,j∈ak,where pijkt is the selection probability of ant k moving from cluster head node i to cluster head node j in the t-th iteration and α is the pheromone factor. The larger the value of α, the greater the influence factor of the pheromone in the selection probability of the cluster head node. β is the heuristic value factor. The larger the value of β, the greater the influence factor of the heuristic value in the selection probability of the cluster head node. ak represents the cluster head node set that is not restricted by the taboo table. τijt represents the pheromone on the edge i,j of the ant in the t-th iteration, and ηijt represents the heuristic value for the ant to move from the cluster head node i to the cluster head node j in the t-th iteration. This value is usually the reciprocal of the distance dij between cluster head node i and cluster head node j. S are the cluster head nodes that are not restricted by the taboo table. With the constraint of Equation (18), the ant will not pass through the cluster head node again, thus ensuring that the UAV will not repeatedly pass the same cluster head node during the data collection process.Step 3. Obtain the shortest flight path of the UAV in thet-th iteration.
After thet-th iteration, each ant has completed a tour through each cluster head node. Calculate the length of the path travelled by each ant, and save the shortest path travelled, thereby obtaining the objective function value. Compare the newly obtained shortest path value with the original shortest path value (the shortest path value generated by the first iteration process is not compared, and the result of the next iteration is waited for). If the newly obtained shortest path value is better than the shortest path value at the last temperature, then directly update the UAV flight path and shortest path value. Then, follow Step 4 to update the pheromone on each edge. If the newly obtained UAV flight shortest path value is not better than the shortest path value at the last temperature, update the dynamic simulated annealing probability coefficient according to
(19)ωcurrent=ωmax−ωmax−ωmin×tcurrenttmax,where ωcurrent is the dynamic simulated annealing probability coefficient of the current iteration number, ωmax is the maximum dynamic simulated annealing probability coefficient, ωmin is the minimum dynamic simulated annealing probability coefficient, tcurrent is the current iteration number, and tmax is the maximum iteration number.
Then, the Metropolis acceptance criterion [23] is used to calculate the probability Pcurrent of introducing the dynamic simulated annealing probability coefficient at the current temperature Tcurrent to decide whether to accept the new path. The probability Pcurrent at temperature Tcurrent is calculated according to
(20)Pcurrent=ωcurrentedE/kTcurrent,where dE is the difference between the shortest path objective function value of this iteration and the shortest path objective function value of the previous iteration, k is the coefficient, and Tcurrent is the current temperature value.
Randomly generate a random numbera0 in the 0,1 interval. If a0≤Pcurrent, accept this solution, update the UAV flight path, and update the shortest path value. Otherwise, discard the solution generated in this iteration. From the Equation (20), it can be concluded that as the iteration progresses, the temperature T is continuously reduced due to the effect of the cooling coefficient, and the value of ωcurrent continues to decrease with the increase of the number of iterations. Therefore, the value of the probability Pcurrent is continuously reduced. That is, the probability of accepting a poor solution is constantly decreasing, similar to the annealing crystallization process of crystals in nature.Step 4. Update the pheromone value.
The update of the pheromone on each edge of the path includes the volatilization of the pheromone due to the passage of time and the newly produced pheromone released by the ants when they passed by. Pheromone is updated according to the rules shown in(21)τijt+1=1−ρτijt+∑k=1m∆τijkt,t+1,where τijt+1 is the pheromone on the edge i,j at the t+1-th iteration and τijt is the pheromone on the edge i,j at the t-th iteration. ρ is the pheromone volatilization factor, and ρ∈0,1. 1‐ρ is the pheromone maintenance factor. k is the k-th ant. m is the total number of ants. ∆τijkt,t+1 is the pheromone released by the k-th ant on the edge i,j when it passes during the t-th iteration. ∆τijkt,t+1 is calculated according to the method shown in
(22)∆τijkt,t+1=Qlkμ,where Q is the pheromone enhancement factor, lk is the length of the path constructed by the k-th ant, and μ is the coefficient. The smaller the path length lk, the Equation (22) shows that the higher the pheromone content on each edge of the path, and the greater the probability of being selected by other ants.
After all ants complete the pheromone update operation, save and record the shortest path of current UAV data collection. Then, initialize the taboo table and pheromone increment.Step 5. Judgement of tempering conditions.
After the pheromone released by the ants on each edge is updated, it is checked whether the tempering conditions are met, so as to decide whether to perform the tempering operation. Whenever the temperatureT during the simulated annealing operation is less than or equal to the minimum value of the tempering temperature Tmin_tempering, and the current tempering times Hcurrent has not reached the set maximum upper limit of the tempering times Hmax, use Equation (23) for tempering operation.
(23)Tcurrent=Tmax_tempering,where Tcurrent is the current temperature value and Tmax_tempering is the highest temperature value of the tempering temperature. According to the above operation, at most Hmax tempering operations are performed, the objective function value is more optimized.
Finally, use the cooling coefficient to update the temperature value, and the update method is shown in(24)Tt+1=Tt×qcooling,where Tt+1 is the temperature after the update, Tt is the temperature before the update, and qcooling is the cooling coefficient.
Repeat the execution from Step2 and loop in turn until the termination condition of the improved ACO is met. The final optimal path and shortest path value are output. The execution process of the improved ACO is shown in Figure 7 and Algorithm 1.Figure 7
Execution flow chart of improved ACO.The improved ACO is implemented in the UAV node to realize edge computing. Before the next round of data collection tasks arrive, the UAV plans the data collection path through the new cluster head node ID and coordinate value calculated by itself in the previous round. The UAV collects sensor network data according to the data collection path planned in advance. Among them, when the UAV performs the first data collection task, it uses the cluster head node ID and coordinate values obtained by the initial clustering to plan the path, and can ignore the influence of other factors.Algorithm 1:The improved ACO.
1. Initialize pheromone and heuristic value;2. Initialize the taboo table of ants;3. Introduce Simulated Annealing iteration;4. Execute ant search algorithm;5. Set the starting node of the ant search algorithm;6. Calculate the cluster head node to be reached next;7.If Path update is not complete then8.     Return to step 5 and continue to execute;9.Else10.If Ant search is not complete then11.    Return to step 4 and continue to execute;12.Else13.    Calculate the shortest path objective function value;14.If Better than the value at the previous temperature then15.      Update path and shortest path value;16.      Update pheromone;17.If the tempering conditions are met then18.        Execute tempering algorithm;19.        Update temperature;20.If the Simulated Annealing iteration is completed then21.          Obtain the optimal path and shortest path value;22.Else23.          Return to step 3 and continue to execute;24.End if25.Else26.        Go to step 19;27.End if28.Else29.      Update dynamic SA probability coefficient;30.If the new path acceptance probability condition is satisfied then31.        Go to step 15;32.Else33.        Go to step 16;34.End if35.End if36.End if


## 6. Simulation Experiment and Result Analysis

This chapter uses MATLAB R2019a to perform simulation experiments to analyse the performance of the solutions proposed and discussed above.Dead nodes refer to the nodes whose remaining energy is not enough to continue to complete the data collection task of the sensor network. Figures8–11 show the first rounds of 10% of the nodes die, 30% of the nodes die, half of the nodes die, and all of the nodes die in the sensor network under LEACH [24], Fuzzy [25], KM-CF [26], and DCSD-single scheme proposed in this paper which is suitable for single-hop scenarios. In a sensor network, the number of rounds in which 10% of the nodes die, 30% of the nodes die, half of the nodes die, and all of the nodes die for the first time is an important performance evaluation index for the life cycle of the sensor network. As can be seen from the figure, compared with the other three schemes, the scheme proposed in this paper delays the first occurrence of the death of 10% nodes, the death of 30% nodes, the death of half nodes, and the death of all nodes and has better performance.Figure 8
Number of rounds where 10% of the nodes die.Figure 9
Number of rounds where 30% of the nodes die.Figure 10
Number of rounds where half of the nodes die.Figure 11
Number of rounds where all of the nodes die.As mentioned earlier, for scenarios with a large network range, the UAV-assisted sensor data collection method proposed in this paper for single-hop scenarios can be used to divide an appropriate number of clusters. This method makes the distance between the sensor node and the cluster head node less than or equal to the communication distance of the node to complete the single-hop transmission between the sensor node and the cluster head node, which is the DCSD-single scheme. Or use the UAV-assisted sensor network data collection method proposed in this paper for multihop scenarios. Select a suitable relay node as a transmission relay, and solve the unreachable problem caused by the distance between the sensor node and the cluster head node being larger than the node communication distance. It is the DCSD-multi scheme.The experimental scene is expanded. The DCSD-single scheme in the single-hop scenario and the DCSD-multi scheme in the multihop scenario are compared and tested in a400m∗400m monitoring area with 200 sensor nodes randomly distributed. Among them, in order to make multihop transmission occur, appropriately expand the range of each cluster in the DCSD-multi scheme in the multihop transmission scenario, that is, reduce the number of cluster head nodes in the network.Because the flying height of the UAV will affect the distance between nodes, it will affect the energy consumption of information transmission. Therefore, the following comparative experiment considered the influence of the UAV’s flight height on the experimental results.Figures12 and 13 show that when the number of cluster head nodes in the DCSD-single scheme is 16 and the number of cluster head nodes in the DCSD-multi scheme are 12 and 8, the comparison graph of 10% of the nodes die, 30% of the nodes die, half of the nodes die, and all of the nodes die for the first time and the comparison graph of the network life cycle with the UAV flight altitude change.Figure 12
Comparison of the number of rounds where different number of nodes die.Figure 13
The influence of UAV height on the network life cycle.Figure13 shows the impact of UAV flight height on the performance of various schemes. As the flying height of the UAV increases, the cluster head node needs more transmission power to transmit data to the UAV node, which leads to an increase in the energy consumption of the cluster head node and reduces the life cycle of the network. Therefore, when the UAV is actually used to assist the sensor network for data collection, under the premise of ensuring safety, reducing the flying height of the UAV to a certain extent can delay the death time of the sensor nodes in the environmental monitoring area.This chapter uses MATLAB R2019a to plan the UAV data collection path. Assume that there are five environmental monitoring areas separated from each other due to geographical environmental factors, which form a distributed wireless sensor networks through the flight transmission of UAV. According to the method of “store-carry-forward,” starting from the data center, the UAV collects data from the cluster head nodes in each separated environmental monitoring area through the designated algorithm, and then according to the planned optimal path, the UAV finally transmits the data to the data center. In most ecological environmental monitoring scenarios, sensor nodes are deployed on the ground, so the height of each sensor node is ignored, and the network scenario is simplified to a two-dimensional coordinate plane. This scene has a data center and five separated sensor network environmental monitoring areas.The algorithm evaluation indicators in this chapter mainly include the total path length of UAV data collection, the minimum number of iterations required for each algorithm to reach the shortest path, and the convergence speed of each algorithm. Suppose the data center coordinates are (500, 1000), the range of sensor network 1 is300m∗300m, and the number of nodes is 100. The range of sensor network 2 and sensor network 3 is 250m∗250m, respectively, and the number of nodes is 70, respectively. The range of sensor network 4 and sensor network 5 is 150m∗150m, respectively, and the number of nodes is 50, respectively. According to the cluster head election method described in Chapter 4, the coordinates of the sensor cluster head nodes in each monitoring area can be obtained during a certain round of data collection. The simulation experiment parameter settings of the improved ACO are shown in Table 1.Table 1
Simulation experiment parameter settings of improved ACO.
ParametersParameter choiceNumber of ants100Pheromone factor4Heuristic factor3Pheromone volatile factor0.1Pheromone enhancer factor1Cooling factor0.95Initial temperature2000 KEnd temperature0 KUpper limit of tempering temperature1000 KLower limit of tempering temperature500 KMaximum number of tempering2Number of iterations300This chapter conducts simulation experiments on four intelligent algorithms. The node numbered 1 shown by the five-pointed star logo represents the data center. The cluster head nodes elected in each partitioned environmental monitoring area are represented by number 2-31, respectively. The coordinate of the data center and the coordinate information of the cluster head nodes elected in each partitioned sensor network are shown in Table2.Table 2
Coordinate information of data center and cluster heads.
The category of the nodeNode numberNode abscissaNode ordinateNode numberNode abscissaNode ordinateData center1500.00001000.0000Sensor network 12221.5789555.4625342.1414728.7543441.1697638.87505266.0404768.20906108.4884748.4868735.6075565.21558135.1900646.92389249.1216642.931510119.5054552.390711199.0793738.1214Sensor network 2121011.9638770.943513818.4280657.036514842.5954778.244615894.6581608.074616901.0757706.754917981.4248656.340818912.5777831.7891Sensor network 319611.1036430.729620436.8288384.166421504.2333379.232222557.5915354.831723472.0340473.503724454.2806296.991125576.2068289.9250Sensor network 426101.437927.32142735.897871.920828113.7558118.9788Sensor network 5291242.7748151.2065301327.0224163.8992311271.589974.8152Figures14–17 show the results of using four algorithms for UAV data collection path planning, respectively. Figures 14–17 show the optimal flight path for UAV path planning using four algorithms, respectively. Among them, 1 is the data center, which is the starting point and end point of the UAV data collection process. Nodes 2-31 are cluster head nodes distributed in each partition monitoring area.Figure 14
Optimal flight path of ACO.Figure 15
Optimal flight path of SA.Figure 16
Optimal flight path of GA.Figure 17
Optimal flight path of improved ACO.The comparison of the number of iterations and the shortest path length of the ant colony optimization, simulated annealing, genetic algorithm, and improved ACO to achieve convergence is shown in Table3.Table 3
Performance comparison of four algorithms.
Algorithm nameNumber of iterations to convergenceShortest path length (m)ACOAbout 1804697.07SAAbout 2906389.05GAAbout 2704802.35Improved ACOAbout 1704410.41The comparison of the iterative curves of the four algorithms to reach the shortest path of UAV data collection is shown in Figure18. It can be seen from the figure that in the experimental scenario proposed in this chapter, the quality of the solution is poor in the initial search execution stage of the simulated annealing and the convergence speed of the algorithm is slow when it reaches the shortest path. The genetic algorithm also has the problem of low solution quality in the initial search execution stage, and the convergence speed is slow when it reaches the shortest path. However, compared with simulated annealing, genetic algorithm greatly reduces the shortest path length. In comparison, the ant colony optimization and the improved ACO can obtain higher-quality solutions in a limited number of iterations; that is, they can converge to the shortest flight path of the UAV faster. Using the improved ACO to plan the UAV data collection path can get a better shortest path length and can get the convergent shortest path result at the fastest speed.Figure 18
Comparison of iteration curves of four algorithms.


## 7. Conclusion and Outlook

This paper studies the data collection method of sensor network based on UAV and introduces the idea of edge computing into it. Distributed wireless sensor networks separated from each other are assisted by UAV technology for clustering and cluster head elections, which reduces the overall energy consumption of the distributed sensor network. Then, the improved ant colony optimization is used to plan the UAV data collection path. Through the “store-carry-forward” method, the UAV takes the shortest path to carry the sensed data and transmits it to the data center.In future work, we will consider the use of UAVs to charge and collect data in the sensor network, consider the impact of different sensor node distribution patterns on the performance of the sensor network, and consider multi-UAVs to coordinate the data collection of the sensor network to further improve the efficiency of data collection to serve a wider monitoring area and complete the corresponding environmental monitoring tasks.In addition, it is considered that the intelligent algorithm (improved ACO) can be changed into a reinforcement learning algorithm, and a reinforcement learning algorithm that conforms to its own scene can be set, so that the UAV can plan the optimal path by itself, thus improving the data collection efficiency of the sensor network.



---

*Source: 3469221-2022-06-28.xml*