A UAV-based method for optimizing WSN energy consumption in urban environments
By introducing UAV-assisted data acquisition into a wireless sensor network and optimizing the UAV path using the KPP-LEACH clustering algorithm and QA reinforcement learning algorithm, the problem of excessive energy consumption caused by the large distance between the cluster head node and the sink node is solved, thus optimizing the energy consumption and extending the life cycle of the wireless sensor network.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING UNIV OF POSTS & TELECOMM
- Filing Date
- 2024-06-17
- Publication Date
- 2026-05-05
AI Technical Summary
In traditional wireless sensor networks, the cluster head node and sink node are too far apart to establish a high-quality link, resulting in excessive energy consumption and an inability to effectively reduce energy consumption.
A UAV-based WSN energy consumption optimization data acquisition method is adopted. The KPP-LEACH clustering algorithm is used to manage wireless sensor nodes in clusters. The QA reinforcement learning algorithm is combined to optimize the order of UAV access to cluster head nodes, hovering points and flight paths, thereby reducing the total energy consumption of UAV flight and data transmission to cluster head nodes.
It effectively reduces the energy consumption of wireless sensor networks, extends the network lifespan, improves data transmission efficiency and system stability, and optimizes data collection tasks for UAVs in urban environments.
Smart Images

Figure CN118590846B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of WSN data acquisition technology, specifically relating to a method for optimizing WSN energy consumption data acquisition based on unmanned aerial vehicles in urban environments. Background Technology
[0002] With the continuous development of IoT technology, Wireless Sensor Networks (WSNs), as an important component of IoT, have received widespread attention and research. WSNs are self-organizing networks composed of numerous small and cost-effective sensor nodes, capable of collecting, processing, and transmitting various environmental data in real time. Therefore, WSNs have been widely applied in many fields such as smart cities, smart transportation, and smart agriculture. However, since sensor nodes generally carry limited energy resources, and manual battery replacement is difficult to implement, effectively reducing energy consumption has become an important research topic for wireless sensor networks.
[0003] In recent years, to effectively reduce the energy consumption of wireless sensor networks, the UAV (Unmanned Aerial Vehicle)-assisted wireless sensor network (UAV) solution has attracted widespread attention. UAVs provide a flexible aerial platform for wireless sensor networks, enabling them to assist in data acquisition, 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. UAV-assisted data acquisition in wireless sensor networks achieves the integration of UAVs and wireless sensor networks, fully utilizing the advantages of UAVs to provide efficient and real-time data acquisition services. As aerial mobile nodes, UAVs can be rapidly 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 wider coverage, real-time data acquisition, 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 theoretical and practical significance. Summary of the Invention
[0004] To address the problem of excessive energy consumption in traditional wireless sensor networks (WSNs) where the cluster head node and sink node are too far apart to establish a high-quality link, necessitating multi-hop transmission, this invention proposes a UAV-based WSN energy-optimized data acquisition method for urban environments, specifically including the following steps:
[0005] A wireless sensor network data acquisition system based on UAVs is constructed in an urban environment. In this system, all wireless sensor nodes are divided into multiple clusters, each cluster selects a cluster head, all data within the cluster are sent to the cluster head, and the cluster head uploads the data within the cluster to the UAV.
[0006] Based on the impact of buildings on communication distance within the coverage area of the wireless sensor network data acquisition system, the KPP-LEACH clustering algorithm is used to perform cluster management and cluster head election for wireless sensor nodes within the coverage area.
[0007] After selecting the cluster head, the optimization objective is to minimize the UAV flight path and the total energy consumption of data transmission to the cluster head node. The order in which the UAV visits the cluster head node, the hovering point of the UAV collecting data, and the UAV flight path are then solved.
[0008] Furthermore, the process of cluster management and cluster head election for wireless sensor nodes within the coverage area based on the KPP-LEACH clustering algorithm includes the following steps:
[0009] 101. Initialize the number of node clusters K, which is in the range of 1≤K≤M, where M is the number of wireless sensor nodes in the wireless sensor network data acquisition system;
[0010] 102. Based on the number of node clusters K, the UAV uses the KPP-LEACH algorithm to cluster the nodes;
[0011] 103. Calculate the cluster head score of all nodes in each cluster, select the node with the highest cluster head score to serve as the cluster head, and broadcast it to other member nodes in the cluster;
[0012] 104. Determine whether the distance between the wireless sensor node 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. Based on the number of node clusters K, randomly initialize K wireless sensor nodes as initial centroids;
[0015] 202. Calculate the distance between all wireless sensor nodes and each centroid in the wireless sensor network data acquisition system, and divide the wireless sensor nodes into the nearest clusters;
[0016] 203. After completing the cluster division, update the centroid within the cluster and take the wireless sensor node in the cluster with the smallest sum of distances to other wireless sensor nodes 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 at coordinates (x1, y1) and the wireless sensor node at coordinates (x2, y2); m d represents the communication distance between two nodes with obstacles. w This refers to the unobstructed communication distance between two nodes.
[0021] Furthermore, the cluster head score of a node is represented as:
[0022] T(k,r)=E sn +D k,r
[0023] Where T(k,r) represents the cluster head score of the r-th wireless sensor node within the k-th cluster; E sn D represents the remaining battery power of the current wireless sensor node. k,r This represents the normalized average communication distance between the r-th wireless sensor node in the k-th cluster and other wireless sensor nodes in the k-th cluster.
[0024] Furthermore, optimization objectives are constructed by minimizing the UAV flight path and minimizing the total energy consumption of data transmission at the cluster head node. The optimization objective is expressed as:
[0025]
[0026] Constraint: 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] Where λ is the weighting parameter, E WSN E represents the total energy consumed by a wireless sensor node to complete one round of data acquisition; UAV δ represents the total energy consumed by the UAV to complete one 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 ending position of the UAV; t Indicates the time slot length; V max E represents the maximum flight speed of the drone. k,mThe remaining energy of the sensing node; The maximum energy of the sensing node; (x) k (i), y k (i) represents the position coordinates of the cluster head k of the i-th transmission time slot, i∈{1,2,,N}, where N is the number of transmission time slots; (X min Y min (X) represents the minimum flight coordinates of the UAV; max Y max R represents the maximum flight coordinates of the UAV; k (t) represents the hovering energy consumption when the UAV in time slot t transmits data with the kth cluster head; l is the size of the transmitted message; V k (k) indicates whether the data was collected by a drone, where 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 UAV and the path to that hovering point are solved under the optimization objective, specifically including:
[0033] Determine if the current set of selectable cluster heads is empty. If it is empty, end the selection process. If it is not empty, generate a random number and determine the relationship between the random number and the greedy factor.
[0034] If the random group is greater than the greedy factor, then the optimal cluster head node is selected from the set of available cluster heads based on the current state of the UAV according to the Q-Learning algorithm.
[0035] Otherwise, based on the Q-Learning algorithm, a cluster head node is randomly selected from the set of available cluster heads according to the current state of the UAV;
[0036] Based on the A* algorithm, the drone is planned to fly from its current position to the hovering point corresponding to the selected cluster head node;
[0037] The drone's current state, the actions performed based on the current state, the rewards obtained from performing the actions, and the drone's state after performing the actions are stored as a set of experiences 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 coordinates of the current UAV and the target cluster head. The state of the UAV is composed of the position coordinates of the UAV at time t and the position coordinates of the target cluster head.
[0039] Furthermore, the action space corresponding to the action selected by the Q-Learning algorithm is represented 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 moving east, south, west, north, southeast, southwest, northwest, northeast, and keeping the current position still.
[0040] Furthermore, the rewards for performing the action include:
[0041] R = r step +r ch +r num +r done
[0042] r num =n num ×c1
[0043]
[0044] Where R is the reward function; r step The energy consumption of a drone during flight to perform its actions; r ch The energy consumption for transmission after the drone performs its actions and reaches the target location; r num A reward is given for the number of cluster heads collected by the drone, n num Indicates the number of cluster heads visited; r done c1 represents the penalty for a drone crash; c2 is the reward coefficient for completing a single cluster head data transmission, c3 is the penalty coefficient for a drone crashing due to a collision with a building, and c3 is the penalty coefficient for a drone crashing due to running out of power. c1, c2, and c3 are all constants.
[0045] This invention uses drones to replace the sink nodes in traditional wireless sensor networks and employs the KPP-LEACH algorithm for cluster management of the wireless sensor network. This solves the problem of excessive energy consumption in wireless sensor networks caused by the inability to establish high-quality links between cluster head nodes and sink nodes due to large distances, necessitating multi-hop transmission. It reduces the energy consumption of data transmission within wireless sensor networks and extends the network's lifespan. Furthermore, it uses a QA reinforcement learning algorithm to jointly optimize the drone's access order to cluster head nodes, the drone's hovering point during data acquisition, and the drone's flight path under the influence of urban buildings, reducing the overall energy consumption of drone flight and cluster head data transmission. In summary, this invention optimizes the energy consumption of both parts of the overall system, ultimately reducing the total energy consumption of a drone-based wireless sensor network data acquisition system in urban environments. Attached Figure Description
[0046] Figure 1This is a system model diagram in the present invention;
[0047] Figure 2 This is a structural diagram of the UAV data acquisition task in this invention;
[0048] Figure 3 This is a flowchart of the energy consumption optimization scheme in this invention;
[0049] Figure 4 This is a diagram showing the clustering results of the KPP-LEACH algorithm in this invention;
[0050] Figure 5 This is a comparison chart of the remaining energy of WSN under different clustering algorithms in this invention;
[0051] Figure 6 This is a comparison chart of the number of remaining surviving nodes in WSN under different clustering algorithms in this invention;
[0052] Figure 7 This is the training reward graph for the QA reinforcement learning algorithm in this invention;
[0053] Figure 8 These are flight path diagrams for UAV data acquisition under different schemes in this invention;
[0054] Figure 9 This is a diagram showing the total energy consumption of UAV flight and cluster head data transmission under different schemes in this invention;
[0055] Figure 10 This is a comparison chart of the flight distance for UAV data acquisition under different numbers of sensor nodes in this invention;
[0056] Figure 11 This is a diagram showing the total energy consumption of the UAV and wireless sensor network system under different numbers of sensor nodes in this invention. Detailed Implementation
[0057] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0058] This invention proposes a method for optimizing WSN energy consumption in urban environments based on unmanned aerial vehicles (UAVs), specifically including the following steps:
[0059] A wireless sensor network data acquisition system based on UAVs is constructed in an urban environment. In this system, all wireless sensor nodes are divided into multiple clusters, each cluster selects a cluster head, all data within the cluster are sent to the cluster head, and the cluster head uploads the data within the cluster to the UAV.
[0060] Based on the impact of buildings on communication distance within the coverage area of the wireless sensor network data acquisition system, the KPP-LEACH clustering algorithm is used to perform cluster management and cluster head election for wireless sensor nodes within the coverage area.
[0061] After selecting the cluster head, the optimization objective is to minimize the UAV flight path and the total energy consumption of data transmission to the cluster head node. The order in which the UAV visits the cluster head node, the hovering point of the UAV collecting data, and the UAV flight path are then solved.
[0062] The present invention constructs a wireless sensor network data acquisition system based on unmanned aerial vehicles (UAVs) in an urban environment, such as... Figure 1 The system includes drones, wireless sensor nodes, and buildings. The system has M wireless sensor nodes and k clusters (k = {1, 2, ..., K}). The coordinates of the k-th cluster head are represented as (x...). k ,y k Within a cluster, there is only one cluster head, and the remaining nodes are member nodes. Member nodes transmit their collected data to the cluster head, which is responsible for data fusion to reduce redundant data, and then waits for the drone to collect the data. Furthermore, to improve the quality of the drone communication link and reduce interference between communications, the drone communicates with only one cluster head at a time. The drone data acquisition task structure is as follows: Figure 2 As shown, this structure facilitates better management and data transmission efficiency in UAV-assisted wireless sensor networks. Through clustering, the system can effectively reduce network communication load and minimize redundant data during data fusion, thereby improving data transmission efficiency. The UAV's auxiliary role is reflected in its ability to flexibly access each cluster head, enabling efficient data collection and transmission.
[0063] Assuming the drone's flight altitude is H and the total data acquisition task completion time is T, discretizing the time into N equal time slots, the total time can be expressed as T = Nδ. t , where δ t Let represent the time slot length, and let its value be small enough that the distance between the UAV and the sensor remains approximately constant within each time slot. The position of the UAV in the i-th time slot can be represented 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 (i-1)th time slot UAV, respectively; V x V yThese represent the magnitudes of the drone's velocity components in the x-axis and y-axis directions, respectively.
[0066] This embodiment uses an A2G channel model, which considers both line-of-sight (LoS) and non-line-of-sight (NLoS) links between the UAV and ground sensor nodes. Therefore, the path loss between 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 These represent the average additional losses of Los and NLoS links, respectively; f c is the center frequency of the charge carriers, and c is the speed of light; Let k be the elevation angle from the cluster head in time slot t to the UAV. Let k be the distance between the cluster head k in time slot t and the UAV, and be expressed as follows:
[0069]
[0070] Therefore, the channel gain between the UAV in time slot t and the cluster head k is:
[0071]
[0072] Where 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 transmit power of the cluster head, and σ is the signal-to-noise ratio between the cluster head k and the UAV. 2 This represents the noise power at the drone receiver.
[0073] The total energy consumption of the system in this invention is mainly divided into two parts: energy consumption for data transmission from wireless sensor nodes and energy consumption for the UAV. The energy consumption of the wireless sensor nodes is further subdivided into two categories: energy consumption for data transmission and energy consumption for data reception. Assuming that all sensor nodes have the same computing and transmission capabilities, i.e., all nodes can act as cluster heads, the energy consumption of sensor node communication is calculated using a first-order radio model. The expressions for transmission and reception energy consumption are as follows:
[0074]
[0075] E Rec =l(E elec +E d )
[0076] Among them, E Tra Indicates the energy consumption for data transmission at the sensor node; l is the size of the transmitted message (unit: bit); E elecIt is the energy consumption per unit bit of data transmission; ε fs ε represents the energy parameters of the RF amplifier in the free-space model. mp d represents the RF amplifier energy parameter for the multipath fading model; d is the data transmission distance; and d0 is the distance threshold.
[0077] Therefore, in a completed data acquisition task, the total energy consumption of the WSN is expressed as:
[0078] E WSN =K(E) Tra +E Rec )+(MK)E Tra
[0079] The energy consumption of a drone mainly consists of two parts: flight energy consumption and communication energy consumption. Flight energy consumption is related to the energy required for the drone to fly in the air and depends on factors such as flight distance, speed, and weight. Communication energy consumption involves data exchange between the drone and wireless sensor nodes or other communication devices. Since the communication energy consumption of a drone is much smaller than its flight energy consumption, it can be ignored. The drone's flight energy consumption is expressed as:
[0080]
[0081] Among them, E fli U represents the flight energy consumption of the UAV; E(v[i]) represents the flight energy consumption at flight speed v[i]; P0 is the type drag power of the UAV when hovering, P1 is the induced power when hovering; v[i] is the flight speed of the UAV in time slot i; U tip v0 is the tip angular velocity of the UAV (m / s); v0 is the average rotor induced velocity of the UAV when hovering (m / s); d0 is the fuselage drag ratio of the UAV; s is the ratio of the total blade area to the swept area of the UAV; A is the swept area of the UAV blades (m²). 2 ); ρ is the air density (unit: kg / m³) 3 When the UAV is collecting data, it hovers, and the relative position between the UAV and the cluster head node k remains unchanged. The data transmission rate is... Assuming it's a constant, the drone's hovering energy consumption expression is:
[0082] E hov =E fli (0)×t hov
[0083]
[0084] Among them, E fli (0) represents the energy consumption t when the drone is hovering (i.e., when the flight speed is 0). hovLet be the drone's hovering time. Therefore, the total energy consumption for one round of data collection by the drone is:
[0085] E UAV =E fli +E hov
[0086] The data acquisition method for energy-efficient wireless sensor networks based on UAVs consists of two stages: WSN clustering based on the KPP-LEACH clustering algorithm and UAV data acquisition path planning based on QA reinforcement learning. The overall process is as follows: Figure 3 As shown, it specifically includes:
[0087] Phase 1: WSN clustering based on the KPP-LEACH clustering algorithm.
[0088] Based on the actual communication distance between nodes under interference from urban buildings, wireless sensor nodes deployed in different areas are clustered. The core objective of this stage is to reduce the energy consumption of data transmission between sensor nodes within a cluster. By selecting a suitable node within the cluster to serve as the cluster head, data aggregation and transmission can be performed more efficiently. Specifically, this includes:
[0089] 101. Initialize the number of node clusters K, which is in the range of 1≤K≤M, where M is the number of wireless sensor nodes in the wireless sensor network data acquisition system;
[0090] 102. Based on the number of node clusters K, the UAV uses the KPP-LEACH algorithm to cluster the nodes;
[0091] 103. Calculate the cluster head score for all nodes within each cluster, select the node with the highest cluster head score as the cluster head, and broadcast this score to all other member nodes in the cluster; the cluster head score calculated by the UAV for all nodes within each cluster is expressed as follows:
[0092] T(k,r)=E sn +D k,r
[0093] Where T(k,r) represents the cluster head score of the r-th wireless sensor node within the k-th cluster; E sn D represents the remaining battery power of the current wireless sensor node. k,r This represents the normalized average communication distance between the r-th wireless sensor node in the k-th cluster and other wireless sensor nodes in the k-th cluster.
[0094] 104. Determine whether the distance between the wireless sensor node 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 UAV uses the KPP-LEACH algorithm to cluster nodes, specifically including the following steps:
[0096] 201. Based on the number of node clusters K, randomly initialize K wireless sensor nodes as initial centroids;
[0097] 202. Calculate the distance between all wireless sensor nodes and each centroid in the wireless sensor network data acquisition system, and divide the wireless sensor nodes into the nearest clusters;
[0098] 203. After completing the cluster division, update the centroid within the cluster and take the wireless sensor node in the cluster with the smallest sum of distances to other wireless sensor nodes 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 frequency and communication-related coefficient, and d m Communication distance is affected by 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 d with unobstructed objects 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] Where d is the actual communication distance between the wireless sensor node at coordinates (x1, y1) and the wireless sensor node at coordinates (x2, y2).
[0111] The algorithm flow for WSN clustering based on the KPP-LEACH clustering algorithm in the first stage of this embodiment is shown in Table 1.
[0112] Table 1
[0113]
[0114]
[0115] Phase 2: UAV data acquisition path planning based on QA reinforcement learning.
[0116] This phase primarily considers the order in which UAVs access the cluster head, the selection of hovering points during data acquisition, and the impact of buildings on the UAV's flight path. 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 energy consumption of a drone's flight and the energy consumption of its sensors are not on the same order of magnitude, a weighting parameter λ needs to be given to make it comparable to the drone's flight energy consumption when calculating the energy consumption of cluster head data transmission. The formulas for the drone's flight energy consumption and the total energy consumption of cluster head data transmission are as follows:
[0118] E all =λE WSN +E UAV
[0119] Therefore, the objective optimization problem in 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 UAV within a time slot; constraint C2 ensures that the UAV 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; C4 and C5 ensure that the UAV's flight range does not exceed the maximum area of the map; C6 ensures that the UAV completely collects all data from the cluster head nodes; C7 is the cluster head node access order to ensure that all cluster head nodes are collected; and C8 ensures that the distance between the hovering point and the cluster head when the UAV collects cluster head data 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 data 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 of the UAV in the urban environment. Due to the presence of obstacles such as buildings in the urban environment, traditional path planning algorithms may have difficulty finding the optimal path. The A* algorithm uses heuristic search to find the shortest flight path by minimizing the cost function.
[0127] The UAV data acquisition path planning problem is transformed 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 definitions are as follows:
[0128] (1) State Space: The state of the UAV is defined as its position coordinates at time t and the position coordinates of the target cluster head. The maximum flyable range of the UAV [X] min ,X max ]×[Y min ,Y max Divide into I×I grids, where The coordinates of the state are represented by the center of the grid, that is:
[0129] S t ={u t ,d u}
[0130] Among them, u t Let d be the position of the drone at time t. u The location of the target cluster head.
[0131] (2) Action Space: This paper divides the UAV's actions into two steps. In the first step, the Q-Learning algorithm plans the cluster head data acquisition point position 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 The second step involves the A* algorithm planning the shortest path for the UAV to fly from its current position to the cluster head data collection point planned in the first step. The UAV's action space in the second step includes nine actions: east, south, west, north, southeast, southwest, northwest, northeast, and keeping the current position stationary.
[0132] (3) Reward Function: In order to plan the optimal path for the UAV-assisted wireless sensor network system and minimize the sum of the UAV flight energy consumption and cluster head data transmission energy consumption, this paper defines a specific reward function to guide the path planning process, which is defined as follows:
[0133] R = r step +r ch +r num +r done
[0134] r num =n num ×c1
[0135]
[0136] Where R is the reward function; r step The energy consumption of a drone during flight to perform its actions; r ch The energy consumption for transmission after the drone performs its actions and reaches the target location; r num A reward is given for the number of cluster heads collected by the drone, n num Indicates the number of cluster heads visited; r done c1 represents the penalty for a drone crash; c2 is the reward coefficient for completing a single cluster head data transmission, c3 is the penalty coefficient for a drone crashing due to a collision with a building, and c3 is the penalty coefficient for a drone crashing due to running out of power. c1, c2, and c3 are all constants.
[0137] The second-stage UAV data acquisition path planning process based on QA reinforcement learning, as presented in this embodiment, is shown in Table 2.
[0138] Table 2
[0139]
[0140]
[0141] Where, n epiIndicates the current iteration number; random is a random number; maxQ(s,:) represents the maximum Q-value among all actions in state s during deep reinforcement learning, and Q(s,:) represents the Q-value of the action in state s. n ,a n ) represents state s n Take action a n Q-value, α is the learning rate, γ is the discount factor, and max a Q(s n+1 a) indicates finding the state s. n The next state s n+1 Choose the action 'a' that maximizes the Q value from all possible actions.
[0142] To verify the effectiveness of the proposed KPP-LEACH clustering algorithm, this paper compares it with the traditional LEACH and IMP_LEACH algorithms. In the simulation, we first assume that the UAV can collect data from each cluster head node at a fixed flight altitude and neglect the UAV's flight energy consumption. The KPP-LEACH algorithm uses a method where the UAV flies above the cluster head node to collect data, while the LEACH and IMP_LEACH algorithms use the traditional method of the cluster head sending information to the base station. The simulation considers the UAV collecting data from M=50 sensors within an area. It is assumed that all sensor parameters are identical, and the data upload size is also exactly the same each time.
[0143] Figure 4 This diagram illustrates the clustering and cluster head selection of the KPP-LEACH algorithm in a wireless sensor network. The black areas in the diagram represent buildings in a city. Nodes in different clusters are distinguished by different colors. Ordinary member nodes within a cluster are represented by dots, while the cluster head is represented by a pentagram. The KPP-LEACH algorithm divides 50 sensor nodes into 10 clusters, ensuring that nodes within each cluster have an average communication coverage area.
[0144] Figure 5 The graph shows how the remaining energy of a WSN changes with the number of data acquisition rounds under different algorithms. According to the data, the LEACH algorithm exhausts all energy at round 1124, while the IMP_LEACH algorithm exhausts all energy at round 1362. However, the KPP-LEACH algorithm proposed in this paper does not exhaust all energy until round 1495. Compared to the traditional LEACH algorithm, the KPP-LEACH algorithm extends the WSN's lifetime by 33%, and compared to the IMP_LEACH algorithm, it increases the WSN's lifetime by 9%.
[0145] Figure 6This paper illustrates how the number of remaining surviving nodes in a WSN changes with the number of task rounds under different algorithms. The number of task rounds in which a node first dies is typically considered an indicator of WSN system stability. As shown in the figure, the LEACH and IMP_LEACH algorithms have 476 and 803 task rounds in which a node first dies, respectively, while the proposed KPP-LEACH algorithm has 1213. Compared to the LEACH and IMP_LEACH algorithms, the KPP-LEACH algorithm extends the stability of the WSN system by approximately 51%.
[0146] To verify the effectiveness of the proposed QA reinforcement learning algorithm, we represent the QA reinforcement learning algorithm as Scheme A and compare it with three other schemes.
[0147] Scheme B: When selecting the next data acquisition cluster head, the UAV will fly to the cluster head node that is closest to the UAV at this time according to the greedy algorithm, and a random strategy will be used when selecting the data acquisition hovering point.
[0148] Scheme C: When selecting the next data collection cluster head, the UAV will collect data in sequence according to the cluster head collection order calculated by the Traveling Salesman Problem (TSP) algorithm, and will use a random strategy when selecting the data collection hover point of the cluster head, just like in Scheme B.
[0149] Scheme D: Similar to Scheme C, it uses the TSP algorithm to plan the order when selecting cluster heads, but it flies over the cluster head node to collect data when selecting the data collection point for the cluster head.
[0150] Figure 7 The paper presents the average reward per 100 training iterations of the proposed QA algorithm after 32,000 training iterations with a certain cluster head set. It can be seen that after 25,000 training iterations, the average reward per 100 training iterations converges to about 5,000, which proves that the proposed QA algorithm can effectively complete the planning of hovering points and flight paths during UAV data collection.
[0151] Figure 8 and Figure 9 The data acquisition flight trajectories of the UAV under different schemes in a single data acquisition task are shown, along with a comparison of the total energy consumption of UAV flight and cluster head transmission. It can be seen that the UAV's flight energy consumption in Scheme A is lower than in other schemes, while the cluster head energy consumption is higher than in Scheme D. This is because the QA algorithm comprehensively considers both UAV flight energy consumption and cluster head data transmission energy consumption, choosing to increase cluster head transmission energy consumption slightly while significantly reducing UAV flight energy consumption, ultimately achieving the goal of reducing the total energy consumption of both UAV flight and cluster head data transmission.
[0152] Figure 10 The paper presents a comparison of the UAV flight distances for a single data acquisition mission using different schemes with varying numbers of sensors. Figure 11 A comparison of the total energy consumption of the UAV and the wireless sensor network system is presented. In this simulation, we comprehensively consider the total energy consumption of intra-cluster data transmission and the total energy consumption of data transmission from the cluster head to the UAV during flight. As shown in the figure, with the increase in the number of sensor nodes, Scheme A reduces the UAV flight distance and effectively reduces the total energy consumption of the UAV and the wireless sensor network system compared to other schemes. This demonstrates 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 invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for optimizing WSN energy consumption in urban environments based on unmanned aerial vehicles (UAVs), characterized in that, Specifically, the following steps are included: A wireless sensor network data acquisition system based on UAVs is constructed in an urban environment. In this system, all wireless sensor nodes are divided into multiple clusters, each cluster selects a cluster head, transmits all data within the cluster to the cluster head, and then uploads the data within the cluster to the UAV through the cluster head. Based on the impact of buildings on communication distance within the coverage area of a wireless sensor network data acquisition system, the KPP-LEACH clustering algorithm is used to perform cluster management and cluster head election for wireless sensor nodes within the coverage area, including:
101. Initialize the number of node clusters Its scope is: M represents the number of wireless sensor nodes in the wireless sensor network data acquisition system.
102. Based on the number of node clusters The drone uses the KPP-LEACH algorithm to cluster the nodes; 103. Calculate the cluster head score of all nodes in each cluster, select the node with the highest cluster head score to serve as the cluster head, and broadcast it to other member nodes in the cluster; 104. Determine whether the distance between the wireless sensor nodes within the cluster and the cluster head node meets the communication requirements. If not, then... Return to step 102; otherwise, output the current clustering result. Clustering nodes using the KPP-LEACH algorithm includes the following steps:
201. Based on the number of node clusters K wireless sensor nodes are randomly initialized as initial centroids; 202. Calculate the distance between all wireless sensor nodes and each centroid in the wireless sensor network data acquisition system, and divide the wireless sensor nodes into the nearest clusters; 203. After completing the cluster division, update the centroid within the cluster and take the wireless sensor node in the cluster with the smallest sum of distances to other wireless sensor nodes 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. After selecting the cluster head, the optimization objective is to minimize the UAV flight path and the total energy consumption of data transmission to the cluster head node. The optimization objective is then determined by solving for the order in which the UAV visits the cluster head node, the hovering point where the UAV collects data, and the UAV flight path. The optimization objective is expressed as: Constraints: in, For weight parameters, This represents the total energy consumed by the cluster head node to complete one round of data acquisition; This indicates the total energy consumed by the drone to complete one round of data collection; This indicates the position of the drone in the i-th time slot; Indicates the starting position of the drone. Indicates the destination location of the drone; Indicates the time slot length; This is the maximum flight speed of the drone; The remaining energy of the sensing node; This represents the maximum energy of the sensing node. This represents the position coordinates of cluster head k in the i-th transmission slot. N is the number of transmission time slots; These are the minimum flight coordinates of the drone; The maximum flight coordinates of the drone; The data transmission rate between the UAV in time slot t and the kth cluster head is represented by l; l is the size of the transmitted message. Indicates whether the data was collected by a drone, where K is the number of cluster heads; This represents the position coordinates of the k-th cluster head; This represents the maximum data collection range for the drone.
2. The method for WSN energy consumption optimization data acquisition based on UAV in an urban environment according to claim 1, characterized in that, The calculation of the actual communication distance of wireless sensor nodes includes: Where d represents the coordinates. The wireless sensor nodes and coordinates are The actual communication distance between wireless sensor nodes; The communication distance between two nodes with obstacles; This refers to the unobstructed communication distance between two nodes.
3. The method for WSN energy consumption optimization data acquisition based on UAV in an urban environment according to claim 1, characterized in that, The cluster head score of a node is represented as: in, This represents the cluster head score of the r-th wireless sensor node within the k-th cluster; This represents the remaining battery power of the current wireless sensor node. This represents the normalized average communication distance between the r-th wireless sensor node in the k-th cluster and other wireless sensor nodes in the k-th cluster.
4. The method for WSN energy consumption optimization data acquisition based on UAV in an urban environment according to claim 1, characterized in that, The QA reinforcement learning algorithm is used to solve for the optimal hovering point of the UAV and the path to that hovering point under the optimization objective, specifically including: Determine if the current set of selectable cluster heads is empty. If it is empty, end the selection process. If it is not empty, generate a random number and determine the relationship between the random number and the greedy factor. If the random number is greater than the greedy factor, then the optimal cluster head node is selected from the set of available cluster heads based on the current state of the UAV according to the Q-Learning algorithm. Otherwise, based on the Q-Learning algorithm, a cluster head node is randomly selected from the set of available cluster heads according to the current state of the UAV; Based on the A* algorithm, the drone is planned to fly from its current position to the hovering point corresponding to the selected cluster head node; The drone's current state, the actions performed based on the current state, the rewards obtained from performing the actions, and the drone's state after performing the actions are stored as a set of experiences in the experience pool.
5. A method for WSN energy consumption optimization data acquisition based on UAVs in an urban environment according to claim 4, characterized in that, The maximum flight range of drones is divided into The grid is divided into 3 grids, with the center of each grid serving as the position coordinates of the current UAV and the target cluster head. The state of the UAV is determined by the position coordinates of the UAV at time t and the position coordinates of the target cluster head. .
6. The method for WSN energy consumption optimization data acquisition based on UAV in an urban environment according to claim 4, characterized in that, The action space corresponding to the action selected by the Q-Learning algorithm is represented as follows: The action space corresponding to the action selected based on the A* algorithm includes moving east, south, west, north, southeast, southwest, northwest, northeast, and keeping the current position unchanged.
7. The method for WSN energy consumption optimization data acquisition based on UAV in an urban environment according to claim 4, characterized in that, The rewards for performing actions include: in, For the reward function; The energy consumption of the drone for performing its actions; The energy consumption for transmission after the drone performs its actions and reaches the target location; A reward will be given for the number of cluster heads collected by the drone. Indicates the number of cluster heads visited; This indicates a penalty for drone crashes; The reward coefficient for completing the data transmission of a single cluster head, This is the penalty coefficient for a drone crashing into a building. This is the penalty coefficient for a drone crashing due to running out of power. , and All are constants.
Citation Information
Patent Citations
Rechargeable unmanned aerial vehicle path planning method and system
CN113433967A