WSN energy consumption optimization data acquisition method based on unmanned aerial vehicle in urban environment
By constructing a wireless sensor network data collection system in an urban environment, and using the KPP-LEACH clustering algorithm and QA reinforcement learning algorithm to optimize the UAV flight path and cluster head node data transmission, the problem of cluster head nodes in traditional wireless sensor networks is solved. The problem of excessive energy consumption caused by being too far away from the sink node enables optimization of energy consumption and extension of the life cycle of the network.
Patent Information
- Application Number
- CN202410774909.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-06-17
AI Technical Summary
In traditional wireless sensor networks, the cluster head nodes and sink nodes are too far apart, resulting in the inability to establish high-quality links, and multi-hop transmission must be used, resulting in excessive energy consumption of the wireless sensor network.
In the urban environment, the UAV-based WSN energy consumption optimization data collection method is adopted. By constructing a wireless sensor network data collection system, wireless sensor nodes are divided into clusters, and the KPP-LEACH clustering algorithm is used to elect cluster heads. Combined with The QA reinforcement learning algorithm optimizes the UAV flight path and cluster head node data transmission sequence to reduce UAV flight and data transmission energy consumption.
It effectively reduces the energy consumption of wireless sensor networks, extends the life cycle of the network, and improves data collection efficiency and energy utilization efficiency.
Smart Images

Figure CN118590846A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of WSN data collection, and in particular relates to a WSN energy consumption optimization data collection method based on unmanned aerial vehicles in an urban environment. Background Art
[0002] With the continuous development of Internet of Things technology, Wireless Sensor Network (WSN) as an important part of the Internet of Things has received extensive attention and research. WSN is a self-organizing network composed of many small and cost-effective sensor nodes, which has the ability to collect, process and transmit various environmental data in real time. Therefore, wireless sensor networks have been widely used in many fields such as smart cities, smart transportation, and smart agriculture. However, since sensor nodes generally carry limited energy resources and it is difficult to replace batteries manually, effectively reducing energy consumption has become an important topic in the research of wireless sensor networks.
[0003] In recent years, in order to effectively reduce the energy consumption of wireless sensor networks, the solution of unmanned aerial vehicles (UAVs) assisted wireless sensor networks has attracted widespread attention. UAVs provide a flexible aerial platform for wireless sensor networks, which can assist in data collection, node communication and network management. Due to their high mobility and deployment flexibility, UAVs have become an ideal tool for optimizing the energy consumption of wireless sensor networks. The data collection of UAV-assisted wireless sensor networks realizes the integration of UAVs and wireless sensor networks, fully utilizes the advantages of UAVs, and provides efficient and real-time data collection services. As aerial mobile nodes, UAVs can be quickly deployed and adjusted through flight, overcoming the limitations of sensor node deployment and communication distance. Through collaborative operation with wireless sensor networks, UAVs can provide a wider coverage, real-time data collection and efficient communication capabilities, thereby significantly improving the performance and energy efficiency of wireless sensor networks. This research on UAV-assisted wireless sensor networks is of great significance both in theory and practice. Summary of the invention
[0004] Aiming at the problem that the cluster head node and the sink node in the traditional wireless sensor network are too far apart to establish a high-quality link and can only use multi-hop transmission, resulting in excessive energy consumption of the wireless sensor network, the present invention proposes a WSN energy consumption optimization data collection method based on drones in an urban environment, which specifically includes the following steps:
[0005] Construct a wireless sensor network data acquisition system based on drones in urban environments. In this system, all wireless sensor nodes are divided into multiple clusters. Each cluster selects a cluster head, and all data in the cluster is sent to the cluster head. The cluster head then uploads the data in the cluster to the drone.
[0006] According to the influence of buildings on the communication distance in the coverage area of the wireless sensor network data acquisition system, the wireless sensor nodes in the coverage area are clustered and managed based on the KPP-LEACH clustering algorithm, and cluster head election is performed;
[0007] After selecting the cluster head, the optimization objectives are constructed by minimizing the UAV flight path and minimizing the total energy consumption of data transmission at the cluster head node, and the order in which the UAV visits the cluster head nodes, the hovering points for UAV data collection, and the UAV flight path are solved.
[0008] Furthermore, the process of clustering the wireless sensor nodes in the coverage area and electing cluster heads based on the KPP-LEACH clustering algorithm includes the following steps:
[0009] 101. Initialize the number of node clusters K, whose range is: 1≤K≤M, where M is the number of wireless sensor nodes in the wireless sensor network data acquisition system;
[0010] 102. According to the number of node clusters K, the drone uses the KPP-LEACH algorithm to cluster the nodes;
[0011] 103. Calculate the cluster head scores of all nodes in each cluster, select the node with the highest cluster head score as the cluster head, and broadcast it to other member nodes in the cluster;
[0012] 104. Determine whether the distance between the wireless sensor nodes in the cluster and the cluster head node meets the communication requirements. If not, set K=K+1 and return to step 102; otherwise, output the current clustering result.
[0013] Furthermore, clustering nodes using the KPP-LEACH algorithm includes the following steps:
[0014] 201. According to the number of node clusters K, randomly initialize K wireless sensor nodes as initial centroids;
[0015] 202. Calculate the distances between all wireless sensor nodes and each centroid in the wireless sensor network data acquisition system, and divide the wireless sensor nodes into clusters with the closest distances;
[0016] 203. After completing the cluster division, the centroid in the cluster is updated, and the wireless sensor node with the smallest sum of distances to other wireless sensor nodes in the cluster is used as the new centroid;
[0017] 204. Determine whether the centroid is the same wireless sensor node before and after the update. If so, output the current clustering result; otherwise, return to step 202.
[0018] Furthermore, the calculation of the actual communication distance of the wireless sensor node includes:
[0019]
[0020] Where d is the actual communication distance between the wireless sensor node with coordinates (x1, y1) and the wireless sensor node with coordinates (x2, y2); d m is the communication distance with obstacles between two nodes; d w is the obstacle-free communication distance between two nodes.
[0021] Furthermore, the cluster head score of a node is expressed as:
[0022] T(k,r)=E sn +D k,r
[0023] Where T(k,r) represents the cluster head score of the rth wireless sensor node in the kth cluster; E sn The remaining power of the current wireless sensor node; D k,r It represents the normalized average communication distance between the rth wireless sensor node in the kth cluster and other wireless sensor nodes in the kth cluster.
[0024] Furthermore, the optimization objective is constructed by minimizing the flight path of the UAV and minimizing the total energy consumption of data transmission of the cluster head node. The optimization objective is expressed as:
[0025]
[0026] Constraints: 0≤||q(i)-q(i-1)||≤δ t V max
[0027] q(0)=q(T)
[0028]
[0029]
[0030] 0≤||q(i)-(x k ,y k )||≤r max
[0031] Among them, λ is the weight parameter, E WSN It represents the total energy consumption of the wireless sensor node to complete a round of data collection; E UAV represents the total energy consumption of the UAV to complete a round of data collection; q(i) represents the position of the UAV in the i-th time slot; q(0) represents the starting position of the UAV, and q(T) represents the end position of the UAV; δ t Indicates the time slot length; V max E is the maximum flight speed of the drone; k,mis the remaining energy of the sensor node; is the maximum energy of the sensor node; (x k (i), y k (i)) represents the position coordinates of cluster head k in the i-th transmission time slot, i∈{1,2,,N}, N is the number of transmission time slots; (X min , Y min ) is the minimum flight coordinate of the UAV; (X max , Y max ) is the maximum flight coordinate of the UAV; R k (t) represents the hovering energy consumption when the UAV transmits data to the kth cluster head in time slot t; l is the size of the transmitted message; V k (k) indicates whether it is collected by a drone, and K is the number of cluster heads; (x k ,y k ) represents the position coordinates of the kth cluster head; rmax is the maximum acquisition range of the UAV.
[0032] Furthermore, based on the QA reinforcement learning algorithm, the optimal hovering point of the drone and the path to the hovering point under the optimization goal are solved, specifically including:
[0033] Determine whether the current selectable cluster head set is empty. If it is empty, end the selection. If it is not empty, generate a random number and determine the relationship between the random number and the greed factor.
[0034] If the random group is larger than the greedy factor, an optimal cluster head node is selected from the optional cluster head set based on the Q-Learning algorithm according to the current state of the UAV;
[0035] Otherwise, a cluster head node is randomly selected from the optional cluster head set based on the Q-Learning algorithm according to the current state of the UAV;
[0036] Based on the A* algorithm, the UAV is planned to fly from the current position to the hovering point corresponding to the selected cluster head node;
[0037] The current state of the drone, the action performed according to the current state, the reward obtained by performing the action, and the state of the drone after performing the action are taken as a set of experience and stored in the experience pool.
[0038] Furthermore, the maximum flight range of the UAV is divided into I×I grids, and the center of each grid is used as the position coordinate of the grid where the current UAV and the target cluster head are located. The state of the UAV is composed of the position coordinates of the UAV and the target cluster head at the current time t, where
[0039] Furthermore, the action space corresponding to the action selected by the Q-Learning algorithm is expressed as A = ([x k-r max ,x k +r max ],[y k -r max ,y k +r max ]); The action space corresponding to the action selected based on the A* algorithm includes east, south, west, north, southeast, southwest, northwest, northeast and keeping the current position.
[0040] Furthermore, the rewards for executing actions include:
[0041] R=r step +r ch +r num +r done
[0042] r num =n num ×c1
[0043]
[0044] Among them, R is the reward function; r step The flight energy consumption of the drone to perform actions; ch is the transmission energy consumption after the UAV performs the action and reaches the target location; r num Reward for the number of cluster heads collected by the drone, n num Indicates the number of cluster heads visited; r done represents the penalty for the drone crash; c1 is the reward coefficient for completing the data transmission of a single cluster head, c2 is the penalty coefficient for the drone crashing due to hitting a building, and c3 is the penalty coefficient for the drone crashing due to exhaustion of power. c1, c2 and c3 are all constants.
[0045] The present invention uses a drone to replace the sink node in the traditional wireless sensor network and uses the KPP-LEACH algorithm to perform cluster management on the wireless sensor network, which solves the problem that the energy consumption of the wireless sensor network is too large because the cluster head node and the sink node are too far apart to establish a high-quality link and can only use multi-hop transmission, thereby reducing the energy consumption of data transmission within the wireless sensor network cluster and extending the life cycle of the wireless sensor network; in addition, the QA reinforcement learning algorithm is used to jointly optimize the order of drone access to cluster head nodes, the hovering point during drone data collection, and the flight path of the drone under the influence of urban buildings, thereby reducing the total energy consumption of drone flight and cluster head data transmission. In summary, the present invention optimizes the energy consumption of the two parts of the total system respectively and finally reduces the total energy consumption of the wireless sensor network data collection system based on drones in urban environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1It is a system model diagram in the present invention;
[0047] Figure 2 This is a structural diagram of the UAV data collection task in the present invention;
[0048] Figure 3 It is the overall flow chart of the energy consumption optimization scheme in the present invention;
[0049] Figure 4 This is a diagram of the clustering results of the KPP-LEACH algorithm in the present invention;
[0050] Figure 5 This is a comparison diagram of WSN residual energy under different clustering algorithms in the present invention;
[0051] Figure 6 A comparison chart of the number of remaining surviving nodes in WSN under different clustering algorithms in the present invention;
[0052] Figure 7 It is the reward graph for training the QA reinforcement learning algorithm in the present invention;
[0053] Figure 8 The flight path diagram for drone data collection under different schemes of the present invention;
[0054] Fig. 9 It is the total energy consumption diagram of UAV flight and cluster head data transmission under different schemes of the present invention;
[0055] Fig.10 This is a comparison chart of the flight distance of drone data collection under different numbers of sensor nodes in the present invention;
[0056] Fig.11 This is the total energy consumption diagram of the UAV and wireless sensor network system under different numbers of sensor nodes in the present invention. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] The present invention proposes a WSN energy consumption optimization data collection method based on a drone in an urban environment, which specifically includes the following steps:
[0059] Construct a wireless sensor network data acquisition system based on drones in urban environments. In this system, all wireless sensor nodes are divided into multiple clusters. Each cluster selects a cluster head, and all data in the cluster is sent to the cluster head. The cluster head then uploads the data in the cluster to the drone.
[0060] According to the influence of buildings on the communication distance in the coverage area of the wireless sensor network data acquisition system, the wireless sensor nodes in the coverage area are clustered and managed based on the KPP-LEACH clustering algorithm, and cluster head election is performed;
[0061] After selecting the cluster head, the optimization objectives are constructed by minimizing the UAV flight path and minimizing the total energy consumption of data transmission at the cluster head node, and the order in which the UAV visits the cluster head nodes, the hovering points for UAV data collection, and the UAV flight path are solved.
[0062] The wireless sensor network data acquisition system based on drones in urban environments constructed by the present invention is as follows: Figure 1 The system includes drones, wireless sensor nodes and buildings. In this system, the number of wireless sensor nodes is M, the number of clusters is k = {1, 2, ..., K}, and the coordinates of the kth cluster head are expressed as (x k ,y k ). In a cluster, there is only one cluster head, and the rest of the nodes are member nodes. The member nodes will transmit the data they collect to the cluster head, and the cluster head is responsible for data fusion to reduce redundant data, and then wait for the drone to collect data. In addition, in order to improve the quality of the drone communication link and reduce interference between communications, the drone only communicates with one cluster head at a time. The structure of the drone data collection task is as follows: Figure 2 As shown in the figure, this structure helps to achieve better management and data transmission efficiency in UAV-assisted wireless sensor networks. Through clustering, the system can effectively reduce the network communication load and reduce redundant data in the process of data fusion, thereby improving data transmission efficiency. The auxiliary role of the UAV is reflected in its ability to flexibly access each cluster head to achieve efficient data collection and transmission.
[0063] Assuming that the flight altitude of the drone is H, the total data collection task completion time is T, and the time is discretized into N equal time slots, the total time can be expressed as T = Nδ t , where δ t represents the time slot length, and its value is small enough so that the distance between the UAV and the sensor remains approximately unchanged in each time slot. The position of the UAV in the i-th time slot can be expressed as:
[0064] q[i]=(x[i-1]+V x δ t ,y[i-1]+V y δ t ,H),1≤i≤N
[0065] Where x[i-1] and y[i-1] represent the x-axis and y-axis coordinates of the UAV in the i-1th time slot, respectively; V x 、V yThey are the velocity components of the drone in the x-axis and y-axis directions respectively.
[0066] The A2G channel model is used in the system of this embodiment. In this model, the presence of line of sight (LoS) links and non-line of sight (NLoS) links between the UAV and the ground sensor nodes is considered. Therefore, the path loss between the cluster head k and the UAV in time slot t is:
[0067]
[0068] Where a and b are constants determined by the communication environment; η LoS , η NLoS They represent the average additional losses of Los and NLoS links respectively; f c is the center frequency of the carrier, c is the speed of light; is the elevation angle from cluster head k to the UAV in time slot t, is the distance between cluster head k and the UAV in time slot t, respectively expressed as:
[0069]
[0070] Therefore, the channel gain between the UAV and cluster head k in time slot t is:
[0071]
[0072] Among them, B0 is the transmission bandwidth of cluster head k, is the signal-to-noise ratio between cluster head k and the UAV at time t, P is the transmission power of the cluster head, σ 2 is the noise power at the receiving end of the UAV.
[0073] The total energy consumption of the system of the present invention is mainly divided into two parts: wireless sensor node data transmission energy consumption and drone energy consumption. The energy consumption of wireless sensor nodes is further divided into two categories: sensor node data transmission energy consumption and data reception energy consumption. Assuming that all sensor nodes have the same computing and transmission capabilities, that is, all nodes can serve as cluster heads, the communication of sensor nodes uses the first-order radio model to calculate the energy consumption, and the expressions for transmission energy consumption and reception energy consumption are:
[0074]
[0075] E Rec = l(E elec +E d )
[0076] Among them, E Tra represents the energy consumption of data transmission of sensor nodes; l is the size of the transmitted message (unit: bit); is the energy consumption per bit of data transmission; fs is the RF amplifier energy parameter of the free space model; ε mp is the RF amplifier energy parameter of the multipath fading model; d is the data transmission distance; d0 is the distance threshold.
[0077] Therefore, in a completed data collection task, the total energy consumption of WSN is expressed as:
[0078] E WSN =K(E Tra +E Rec )+(MK)E Tra
[0079] The energy consumption of drones mainly consists of two parts: flight energy consumption and communication energy consumption. Flight energy consumption is related to the energy required for drones to fly in the air, which depends on factors such as flight distance, speed, and weight. Communication energy consumption involves data exchange between drones and wireless sensor nodes or other communication devices. Since the communication energy consumption of drones is too small compared to the flight energy consumption of drones, it can be ignored. The flight energy consumption of drones is expressed as:
[0080]
[0081] Among them, E fli is the flight energy consumption of the UAV; E(v[i]) represents the flight energy consumption when the flight speed is v[i]; P0 is the drag power of the UAV when it is hovering, and P1 is the induced power when it is hovering; v[i] is the flight speed of the UAV when it is in time slot i; U tip is the tip angular velocity of the UAV (unit: m / s); v0 is the average rotor induced speed of the UAV when hovering (unit: m / s); d0 is the drag ratio of the UAV fuselage; s is the ratio of the total blade area of the UAV to the swept area of the blade; A is the swept area of the UAV blade (unit: m 2 ); ρ is the air density (unit: kg / m 3 ); The UAV is in a hovering state when collecting data, and the relative position between the UAV and the cluster head node k remains unchanged. The data transmission rate is a constant value, and the energy consumption expression of the drone hovering is:
[0082] E hov =E fli (0)×t hov
[0083]
[0084] Among them, E fli (0) represents the energy consumption of the drone when it is hovering (i.e., when the flight speed is 0) hovis the hovering time of the drone. Therefore, the total energy consumption of a round of data collection by the drone is:
[0085] E UAV =E fli +E hov
[0086] The energy consumption optimization data collection method for wireless sensor networks based on drones is divided into two stages: WSN clustering based on KPP-LEACH clustering algorithm and drone data collection path planning based on QA reinforcement learning. The overall process is as follows: Figure 3 As shown, specifically including:
[0087] Phase 1: WSN clustering based on KPP-LEACH clustering algorithm.
[0088] Based on the actual communication distance between nodes under the interference of urban buildings, the wireless sensor nodes deployed in different areas are clustered. The core goal of this stage is to reduce the energy consumption of data transmission between sensor nodes in the cluster. By selecting appropriate nodes in the cluster as cluster heads, data aggregation and transmission can be performed more efficiently. Specifically, it includes:
[0089] 101. Initialize the number of node clusters K, whose range is: 1≤K≤M, where M is the number of wireless sensor nodes in the wireless sensor network data acquisition system;
[0090] 102. According to the number of node clusters K, the drone uses the KPP-LEACH algorithm to cluster the nodes;
[0091] 103. Calculate the cluster head scores of all nodes in each cluster, select the node with the highest cluster head score as the cluster head, and broadcast it to other member nodes in the cluster; the cluster head scores of all nodes in each cluster calculated by the drone are expressed as:
[0092] T(k,r)=E sn +D k,r
[0093] Where T(k,r) represents the cluster head score of the rth wireless sensor node in the kth cluster; E sn The remaining power of the current wireless sensor node; D k,r represents the normalized average communication distance between the rth wireless sensor node in the kth cluster and other wireless sensor nodes in the kth cluster;
[0094] 104. Determine whether the distance between the wireless sensor nodes in the cluster and the cluster head node meets the communication requirements. If not, set K=K+1 and return to step 102; otherwise, output the current clustering result.
[0095] The drone uses the KPP-LEACH algorithm to cluster nodes, which includes the following steps:
[0096] 201. According to the number of node clusters K, randomly initialize K wireless sensor nodes as initial centroids;
[0097] 202. Calculate the distances between all wireless sensor nodes and each centroid in the wireless sensor network data acquisition system, and divide the wireless sensor nodes into clusters with the closest distances;
[0098] 203. After completing the cluster division, the centroid in the cluster is updated, and the wireless sensor node with the smallest sum of distances to other wireless sensor nodes in the cluster is used as the new centroid;
[0099] 204. Determine whether the centroid is the same wireless sensor node before and after the update. If so, output the current clustering result; otherwise, return to step 202.
[0100] The actual communication distance between computing nodes specifically includes:
[0101] Step 1: Calculate the path loss based on the impact of urban buildings on the wireless sensor network channel, expressed as:
[0102] L=S×d m C
[0103] Where S is the simplified empirical coefficient, C is the coefficient related to frequency and communication, d m It is the communication distance with obstacles.
[0104] Step 2: Substitute the path loss calculated in step 1 into the free space path loss calculation formula to obtain the communication distance d with obstacles m Communication distance with no obstacles d w The conversion formula between them is expressed as:
[0105] L=32.44+20logd w +20logf
[0106] d w ≈wd m
[0107] Where f is the carrier frequency and w is the calculated distance factor.
[0108] Step 3: Calculate the actual communication distance, expressed as:
[0109]
[0110] Wherein, d is the actual communication distance between the wireless sensor node at coordinate (x1, y1) and the wireless sensor node at coordinate (x2, y2).
[0111] The algorithm flow of the WSN clustering based on the KPP-LEACH clustering algorithm in the first stage given in this embodiment is shown in Table 1.
[0112] Table 1
[0113]
[0114]
[0115] Phase 2: UAV data collection path planning based on QA reinforcement learning.
[0116] In this phase, the order in which the UAVs visit the cluster heads, the choice of hovering points during data collection, and the impact of buildings on the flight paths of the UAVs are mainly considered. By jointly optimizing these factors, the aim is to reduce the total energy consumption generated by UAV flight and cluster head data transmission.
[0117] Since the flight energy consumption of the UAV is not of the same order of magnitude as the transmission energy consumption of the sensor, a weight parameter λ needs to be given when calculating the energy consumption of cluster head data transmission to make it at the same order of magnitude as the flight energy consumption of the UAV. The formula for the total energy consumption of UAV flight energy consumption and cluster head data transmission is as follows:
[0118] E all =λE WSN +E UAV
[0119] Therefore, the objective optimization problem of the second stage can be expressed as:
[0120]
[0121] stC1:0≤||q(i)-q(i-1)||≤δ t V max
[0122] C2:q(0)=q(T)
[0123]
[0124] C8:0≤||q(i)-(x k ,y k )||≤r max
[0125] Among them, constraint C1 ensures the maximum flight distance of the drone within a time slot, constraint C2 ensures that the drone can return to the starting point at the end of the mission, constraint C3 ensures that the remaining energy consumption of the cluster head node does not exceed its maximum energy consumption, and C4 and C5 ensure that the flight range of the drone does not exceed the maximum range of the map. C6 ensures that the drone completely collects all data of the cluster head node, C7 is the cluster head node access order to ensure that all cluster head nodes will be collected, and C8 ensures that when the drone collects cluster head data, the distance between the hovering point and the cluster head does not exceed the maximum data collection range.
[0126] The QA reinforcement learning algorithm is used to solve the above optimization problem. In the QA algorithm, the Q-Learning algorithm is mainly used to plan the order of cluster head collection for the UAV and determine the optimal hovering point for the UAV to collect data at each cluster head. This process continuously updates the Q table through interaction with the environment to find the optimal operation strategy. The A* algorithm is mainly responsible for planning the flight path for the UAV in an urban environment. Due to the presence of obstacles such as buildings in urban environments, traditional path planning algorithms may find it difficult to find the optimal path. The A algorithm uses heuristic search to find the shortest flight path by minimizing the cost function.
[0127] The UAV data collection path planning problem is converted into a model-free reinforcement learning problem. The basic tuple of model-free reinforcement learning consists of (S, A, R), where S represents the state, A represents the action space, and R is the reward function. The specific definition is as follows:
[0128] (1) State space: The state of the UAV is defined as the position coordinates at time t and the position coordinates of the target cluster head. The maximum flight range of the UAV [X min ,X max ]×[Y min ,Y max ] is divided into I×I grids, where The coordinates of the state are expressed by the grid center, that is:
[0129] S t = {u t ,d u}
[0130] Among them, u t is the position of the UAV at time t, d u is the location of the target cluster head.
[0131] (2) Action space: This paper divides the action of the UAV into two steps. In the first step, the Q-Learning algorithm plans the location of the cluster head data collection point for the UAV. The action space of the UAV in the first step is: A = ([x k -r max ,x k +rmax ],[y k -r max ,y k +r max ]), in the second step, the A* algorithm plans the shortest path for the drone to fly from the current position to the cluster head data collection point planned in the first step. The action space of the drone in the second step includes 9 actions: east, south, west, north, southeast, southwest, northwest, northeast and keep the current position.
[0132] (3) Reward function: In order to plan the optimal path for the UAV-assisted wireless sensor network system so as to minimize the sum of the UAV flight energy consumption and the cluster head data transmission energy consumption, this paper defines a specific reward function to guide the path planning process. The specific definition is as follows:
[0133] R=r step +r ch +r num +r done
[0134] r num =n num ×c1
[0135]
[0136] Among them, R is the reward function; r step The flight energy consumption of the drone to perform actions; ch is the transmission energy consumption after the UAV performs the action and reaches the target location; r num Reward for the number of cluster heads collected by the drone, n num Indicates the number of cluster heads visited; r done represents the penalty for the drone crash; c1 is the reward coefficient for completing the data transmission of a single cluster head, c2 is the penalty coefficient for the drone crashing due to hitting a building, and c3 is the penalty coefficient for the drone crashing due to exhaustion of power. c1, c2 and c3 are all constants.
[0137] The second stage UAV data collection path planning process based on QA reinforcement learning given in this embodiment is shown in Table 2.
[0138] Table 2
[0139]
[0140]
[0141] Among them, n epiIndicates the current number of iterations; random is a random number; maxQ(s,:) indicates the maximum Q value of all actions in state s in deep reinforcement learning, Q(s,:) indicates the Q value of the action in state s, Q(s n ,a n ) is state s n Take action a n Q value, α is the learning rate, γ is the discount factor, max a Q(s n+1 ,a) means to find the state s n The next state s n+1 Select the action a with the largest Q value from all possible actions.
[0142] In order to verify the effectiveness of the proposed KPP-LEACH clustering algorithm, this paper compares it with the traditional LEACH algorithm and IMP_LEACH algorithm. In the simulation, we first assume that the drone can fully collect data from each cluster head node at a fixed flight altitude and do not consider the flight energy consumption of the drone here. The KPP-LEACH algorithm uses the method of the drone flying above the cluster head node to collect data, while the LEACH algorithm and IMP_LEACH algorithm use the traditional method of the cluster head sending information to the base station. The simulation considers the drone collecting data from M=50 sensors in an area. It is assumed that all sensors have exactly the same parameters and the size of the data uploaded each time is exactly the same.
[0143] Figure 4 The figure shows the clustering and cluster head selection of the KPP-LEACH algorithm in a wireless sensor network. The black area in the figure represents the buildings in the city. The nodes of different clusters are distinguished by different colors. The ordinary member nodes in the cluster are represented by dots, and the cluster head is represented by a five-pointed star. The KPP-LEACH algorithm divides 50 sensor nodes into 10 clusters to ensure that the nodes in the cluster are within the communication coverage range.
[0144] Figure 5 The figure shows how the residual energy of WSN changes with the increase of the number of rounds of data collection tasks under different algorithms. According to the data in the figure, all nodes of the LEACH algorithm completely exhausted their energy in 1124 rounds, while all nodes of the IMP_LEACH algorithm died in 1362 rounds. However, the KPP-LEACH algorithm proposed in this paper did not exhaust all the energy of the nodes until 1495 rounds. Compared with the traditional LEACH algorithm, the KPP-LEACH algorithm extends the life cycle of WSN by 33%, and compared with the IMP_LEACH algorithm, the KPP-LEACH algorithm increases the life cycle of WSN by 9%.
[0145] Figure 6The figure shows how the number of remaining surviving nodes in WSN changes with the increase of task rounds under different algorithms. The task round number in which the node dies for the first time is usually regarded as an indicator for evaluating the stability of the WSN system. As can be seen from the figure, the task round numbers in which the node dies for the first time for the LEACH algorithm and the IMP_LEACH algorithm are 476 and 803 respectively, while the task round number in which the node dies for the first time for the KPP-LEACH algorithm proposed in this paper is 1213. Compared with the LEACH algorithm and the IMP_LEACH algorithm, the KPP-LEACH algorithm extends the stability of the WSN system by about 51%.
[0146] In order to verify the effectiveness of the proposed QA reinforcement learning algorithm, the QA reinforcement learning algorithm is represented as Scheme A and compared with the other three schemes.
[0147] Scheme B: When selecting the next collection cluster head, the UAV will fly to the cluster head node closest to the UAV at this time according to the greedy algorithm, and adopt a random strategy when selecting the data collection hovering point.
[0148] Scheme C: When selecting the next cluster head for collection, the UAV will collect data in sequence according to the cluster head collection order calculated by the Traveling Salesman Problem (TSP) algorithm, and when selecting the data collection hovering point of the cluster head, it adopts a random strategy like Scheme B.
[0149] Scheme D: Like Scheme C, the order planned by the TSP algorithm is used when selecting the cluster heads for data collection, but when selecting the data collection points of the cluster heads, the method of flying above the cluster head nodes is adopted for data collection.
[0150] Figure 7 The average reward of every 100 trainings of the QA algorithm proposed in this paper under a certain cluster head set after 32,000 trainings is given. It can be seen that after 25,000 trainings, the average reward of every 100 trainings converges to about 5,000, which proves that the QA algorithm proposed in this paper can effectively complete the planning of the hovering point and flight path during UAV data collection.
[0151] Figure 8 and Fig. 9 The data collection flight trajectories of the drone under different schemes in a certain round of data collection tasks, as well as the comparison of the total energy consumption of drone flight and cluster head transmission are shown respectively. It can be seen that the flight energy consumption of the drone in Scheme A is less than that of other schemes, while the cluster head energy consumption is higher than that of Scheme D. This is because the QA algorithm comprehensively considers the flight energy consumption of the drone and the energy consumption of cluster head data transmission, and chooses to increase a small amount of cluster head transmission energy consumption and greatly reduce the flight energy consumption of the drone, ultimately achieving the goal of reducing the total energy consumption of drone flight and cluster head data transmission.
[0152] Fig.10 A comparison of the UAV flight distance in a round of data collection tasks under different schemes with different numbers of sensors is given. Fig.11 The comparison of the total energy consumption of the UAV and the wireless sensor network system is given. In this part of the simulation, we comprehensively considered the total energy consumption of data transmission within the cluster and the total energy consumption of the cluster head sending data to the UAV flight. As can be seen from the figure, as the number of sensor nodes increases, Scheme A reduces the flight distance of the UAV and effectively reduces the total energy consumption of the UAV and the wireless sensor network system compared to other schemes. It proves that the proposed scheme can still effectively reduce the total energy consumption of the entire system when the number of sensors is large.
[0153] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A WSN energy consumption optimization data collection method based on drones in urban environments, characterized in that: The specific steps include: Construct a wireless sensor network data acquisition system based on drones in urban environments. In this system, all wireless sensor nodes are divided into multiple clusters. Each cluster selects a cluster head, and all data in the cluster is sent to the cluster head. The cluster head then uploads the data in the cluster to the drone. According to the influence of buildings on the communication distance in the coverage area of the wireless sensor network data acquisition system, the wireless sensor nodes in the coverage area are clustered and managed based on the KPP-LEACH clustering algorithm, and cluster head election is performed; After selecting the cluster head, the optimization objectives are constructed by minimizing the UAV flight path and minimizing the total energy consumption of data transmission at the cluster head node, and the order in which the UAV visits the cluster head nodes, the hovering points for UAV data collection, and the UAV flight path are solved.
2. According to claim 1, a WSN energy consumption optimization data collection method based on drones in an urban environment is characterized in that: The process of clustering management and cluster head election for wireless sensor nodes in the coverage area based on the KPP-LEACH clustering algorithm includes the following steps:
101. Initialize the number of node clusters K, whose range is: 1≤K≤M, where M is the number of wireless sensor nodes in the wireless sensor network data acquisition system; 102. According to the number of node clusters K, the drone uses the KPP-LEACH algorithm to cluster the nodes; 103. Calculate the cluster head scores of all nodes in each cluster, select the node with the highest cluster head score as the cluster head, and broadcast it to other member nodes in the cluster; 104. Determine whether the distance between the wireless sensor nodes in the cluster and the cluster head node meets the communication requirements. If not, set K=K+1 and return to step 102; otherwise, output the current clustering result.
3. According to the WSN energy consumption optimization data collection method based on drone in urban environment as described in claim 2, it is characterized in that: Clustering nodes using the KPP-LEACH algorithm includes the following steps:
201. According to the number of node clusters K, randomly initialize K wireless sensor nodes as initial centroids; 202. Calculate the distances between all wireless sensor nodes and each centroid in the wireless sensor network data acquisition system, and divide the wireless sensor nodes into clusters with the closest distances; 203. After completing the cluster division, the centroid in the cluster is updated, and the wireless sensor node with the smallest sum of distances to other wireless sensor nodes in the cluster is used as the new centroid; 204. Determine whether the centroid is the same wireless sensor node before and after the update. If so, output the current clustering result; otherwise, return to step 202.
4. According to claim 3, a method for collecting energy consumption optimization data of WSN based on drone in urban environment is characterized in that: The calculation of the actual communication distance of the wireless sensor node includes: Where d is the actual communication distance between the wireless sensor node with coordinates (x1, y1) and the wireless sensor node with coordinates (x2, y2); d m is the communication distance with obstacles between two nodes; d w is the obstacle-free communication distance between two nodes.
5. According to claim 2, a WSN energy consumption optimization data collection method based on drones in an urban environment is characterized in that: The cluster head score of a node is expressed as: T(k,r)=E sn +D k,r Where T(k,r) represents the cluster head score of the rth wireless sensor node in the kth cluster; E sn The remaining power of the current wireless sensor node; D k,r It represents the normalized average communication distance between the rth wireless sensor node in the kth cluster and other wireless sensor nodes in the kth cluster.
6. The method for collecting energy consumption optimization data of WSN based on drone in urban environment according to claim 1 is characterized in that: The optimization objective is to minimize the flight path of the UAV and the total energy consumption of data transmission of the cluster head node. The optimization objective is expressed as: Constraints: 0≤||q(i)-(x k ,y k )||≤r max Among them, λ is the weight parameter, E WSN It represents the total energy consumption of the wireless sensor node to complete a round of data collection; E UAV represents the total energy consumption of the UAV to complete a round of data collection; q(i) represents the position of the UAV in the i-th time slot; q(0) represents the starting position of the UAV, and q(T) represents the end position of the UAV; δ t Indicates the time slot length; V max E is the maximum flight speed of the drone; k,m is the remaining energy of the sensor node; is the maximum energy of the sensor node; (x k (i), y k (i)) represents the position coordinates of cluster head k in the i-th transmission time slot, i∈{1,2,…,N}, N is the number of transmission time slots; (X min , Y min ) is the minimum flight coordinate of the UAV; (X max , Y max ) is the maximum flight coordinate of the UAV; R k (t) represents the hovering energy consumption when the UAV transmits data to the kth cluster head in time slot t; l is the size of the transmitted message; V k (k) indicates whether it is collected by a drone, and K is the number of cluster heads; (x k ,y k ) represents the position coordinates of the kth cluster head; rmax is the maximum acquisition range of the UAV.
7. A method for collecting energy consumption optimization data of WSN based on drone in urban environment according to claim 1 or 6, characterized in that: Based on the QA reinforcement learning algorithm, the optimal hovering point of the drone and the path to the hovering point under the optimization goal are solved, including: Determine whether the current selectable cluster head set is empty. If it is empty, end the selection. If it is not empty, generate a random number and determine the relationship between the random number and the greed factor. If the random group is larger than the greedy factor, an optimal cluster head node is selected from the optional cluster head set based on the Q-Learning algorithm according to the current state of the UAV; Otherwise, a cluster head node is randomly selected from the optional cluster head set based on the Q-Learning algorithm according to the current state of the UAV; Based on the A* algorithm, the UAV is planned to fly from the current position to the hovering point corresponding to the selected cluster head node; The current state of the drone, the action performed according to the current state, the reward obtained by performing the action, and the state of the drone after performing the action are taken as a set of experience and stored in the experience pool.
8. The method for collecting energy consumption optimization data of WSN based on drone in urban environment according to claim 7 is characterized in that: The maximum flight range of the UAV is divided into I×I grids, and the center of each grid is used as the position coordinate of the grid where the current UAV and the target cluster head are located. The state of the UAV is composed of the position coordinates of the UAV at the current time t and the position coordinates of the target cluster head.
9. The method for collecting energy consumption optimization data of WSN based on drone in urban environment according to claim 7 is characterized in that: The action space corresponding to the action selected by the Q-Learning algorithm is expressed as A = ([x k -r max ,x k +r max ],[y k -r max ,y k +r max ]); The action space corresponding to the action selected based on the A* algorithm includes east, south, west, north, southeast, southwest, northwest, northeast and keeping the current position.
10. The method for collecting energy consumption optimization data of WSN based on drone in urban environment according to claim 7 is characterized in that: The rewards for performing actions include: R=r step +r ch +r num +r done r num =n num ×c1 Among them, R is the reward function; r step The flight energy consumption of the drone to perform actions; ch is the transmission energy consumption after the UAV performs the action and reaches the target location; r num Reward for the number of cluster heads collected by the drone, n num Indicates the number of cluster heads visited; r done represents the penalty for the drone crash; c1 is the reward coefficient for completing the data transmission of a single cluster head, c2 is the penalty coefficient for the drone crashing due to hitting a building, and c3 is the penalty coefficient for the drone crashing due to exhaustion of power. c1, c2 and c3 are all constants.
Citation Information
Patent Citations
Method for charging wireless sensor network based on UAV
CN109451556A
Rechargeable unmanned aerial vehicle path planning method and system
CN113433967A
Unmanned aerial vehicle assisted post-disaster clustering type mine Internet of Things data acquisition method
CN114727359A
Method and device for heuristically learning routing protocol in wireless sensor network
CN114786236A
Distributed reliable transmission guarantee method for unmanned cluster networking
CN117042083A
Cited By
VDE signal satellite access control method
CN120150801A
Urban fire monitoring-oriented unmanned aerial vehicle-WSN space-time collaborative optimization method
CN121578725A
Unmanned aerial vehicle-wsn spatiotemporal coordination optimization method for urban fire monitoring
CN121578725B
