A method and system for optimizing the trajectory of a drone

By optimizing UAV trajectory planning using the improved multi-agent deep reinforcement learning algorithm MAND3QN, the problems of UAV energy supply and multi-UAV collaboration in IoT systems are solved, achieving efficient data transmission and information updates, and improving the system's timeliness and accuracy.

CN116880559BActive Publication Date: 2026-11-24INNER MONGOLIA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310951222.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-31
Publication Date
2026-11-24
Estimated Expiration
2043-07-31

AI Technical Summary

Technical Problem

Traditional IoT systems suffer from problems such as limited energy supply, difficulty in multi-drone collaboration, and difficulty in optimizing information age, resulting in insufficient timeliness and accuracy of data transmission. This makes it difficult to meet real-time application needs, especially in sparsely populated areas or areas with large communication radii.

Method used

An improved multi-agent deep reinforcement learning algorithm, MAND3QN, is adopted, which combines an IoT system model, a channel model, and an energy consumption model. Through reinforcement learning, the trajectory planning of UAVs is optimized, enabling multi-UAV collaboration and energy management, and optimizing information age.

Benefits of technology

It improves the timeliness and accuracy of data transmission in UAV systems, reduces energy consumption, enhances the stability and efficiency of multi-UAV collaboration, reduces information age, and meets the real-time data update requirements of IoT systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116880559B_ABST
    Figure CN116880559B_ABST
Patent Text Reader

Abstract

This invention provides a method and system for optimizing drone trajectory planning, comprising: S1: pre-setting an IoT system model, a channel model, and an energy consumption model; S2: acquiring the pre-deployed trajectory of the drone; S3: pre-setting an information age model, and obtaining the optimal trajectory of all deployed drones through the pre-deployed trajectory and the information age model, wherein the optimal trajectory of the drone satisfies the minimization of the weighted average information age of all IoT devices in the network; S4: establishing a decision model for the optimal trajectory of the drone; S5: performing reinforcement learning; S6: outputting the optimal flight strategy of the drone. This invention studies the data collected by multiple drones in an IoT system, considers the flight strategy of multiple drones under airborne energy constraints, and designs a drone trajectory planning algorithm for AoI based on partially observable information and an improved DQN multi-agent deep reinforcement learning algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This invention relates to the fields of Internet of Things and drone technology, and in particular to a method and system for optimizing drone trajectory planning. [Background Technology]

[0002] The Internet of Things (IoT), or "Internet of Everything," is a global ecosystem comprising millions of interconnected physical devices, digital machines, and objects linked via the internet. It continues to evolve from simply connecting objects to connecting intelligence. Mobile networks will intelligently connect a vast number of smart devices, enabling these intelligent nodes to sense their surroundings and exchange observations through communication. This leads to the emergence of various real-time sensing applications, such as smart agriculture, smart cars, outdoor disaster monitoring, and indoor health monitoring. These applications place higher demands on service quality, especially data freshness. Therefore, it is necessary to deploy IoT devices to continuously monitor the underlying environment, update data status, and promptly transmit it to data centers for analysis and decision-making. Outdated monitoring information will affect the accuracy and reliability of data center decisions, significantly reduce data relevance, and even cause major disasters. Thus, the service quality and functionality of the system largely depend on the freshness of the monitoring data in these applications.

[0003] Traditional IoT relies heavily on relay nodes and base stations, but deploying these in remote areas like forests, vast oceans, and complex mountain ranges is difficult, fundamentally impacting timely data delivery and reducing Quality of Service (QoS). To address this, drones are being considered as communication relays. Because drones can fly to each sensor and establish a dominant ground communication channel with the sensor nodes via line-of-sight (LoS) links, they enable reliable data acquisition over short distances. This helps reduce the device's transmit power and extend network lifetime, significantly reducing the energy required for data transmission and substantially improving QoS in IoT systems.

[0004] However, traditional performance metrics such as system throughput and transmission latency are no longer sufficient for real-time status update applications in the Internet of Things (IoT). This is mainly because traditional evaluation metrics focus on information transmission latency and cannot effectively characterize information age. To ensure the timeliness of data collection and processing, a new metric, Age of Information (AoI), has been proposed. AoI is used to statistically analyze the time elapsed since the most recently received data packet was generated by the source node. From the receiver's perspective, AoI comprehensively reflects the impact of both the data source and sender on network performance, and can be used to improve the timeliness of received data while maintaining the expected QoS of the communication network. Therefore, AoI is considered an important indicator that can effectively characterize the freshness of information in the IoT.

[0005] Currently, much research focuses on using drones to directly activate IoT devices and collect the generated data, which is then transmitted to data centers for processing. However, in some practical applications, the generation of IoT device data exhibits a degree of randomness, making it difficult for drones to effectively collect data for data center analysis, posing a significant challenge. To ensure the timeliness and accuracy of IoT data, dynamic control of drone trajectories is needed to optimize the Area of ​​Interest (AoI) problem. Furthermore, since drones typically rely on batteries for power, and battery capacity is limited, the problem of ensuring drones can continuously perform data collection tasks under limited energy supply must be addressed. Additionally, in areas with widely distributed IoT devices and large communication radii, a single drone is insufficient to meet data collection needs, requiring the deployment of multiple drones. In this case, the problem of multi-drone flight trajectory planning must be solved to achieve collaboration among them. Several challenges exist in multi-drone trajectory planning, such as collision and cooperation issues, which require further research and solutions.

[0006] Therefore, it is necessary to study a method and system for optimizing UAV trajectory planning to address the shortcomings of existing technologies and to solve or mitigate one or more of the aforementioned problems. [Summary of the Invention]

[0007] In view of this, the present invention provides a method and system for optimizing UAV trajectory planning. By studying the data collected by multiple UAVs in the Internet of Things system, and considering the flight strategy of multiple UAVs under airborne energy constraints, a UAV trajectory planning algorithm for AoI is designed based on partially observable information and using an improved DQN multi-agent deep reinforcement learning algorithm.

[0008] On one hand, the present invention provides a method for optimizing the trajectory planning of unmanned aerial vehicles (UAVs). This trajectory optimization method is based on UAV-assisted Internet of Things (IoT) and includes the following steps:

[0009] S1: Preset IoT system model, channel model, and energy consumption model;

[0010] S2: Obtain the pre-deployment trajectory of the drone through the IoT system model, channel model, and energy consumption model;

[0011] S3: Preset information age model, which is used to measure information age, which is the time elapsed since the last update packet received by the drone was generated. The optimal trajectory of all deployed drones is obtained through the pre-deployment trajectory of the drone and the information age model. The optimal trajectory of the drone satisfies the minimization of the weighted average information age of all IoT devices in the network.

[0012] S4: Develop a decision model for the optimal trajectory of the drone;

[0013] S5: Reinforcement learning is performed on the decision model in S4 using an improved algorithm;

[0014] S6: Output the optimal flight strategy for the drone through the decision model after reinforcement learning.

[0015] In addition to the aspects described above and any possible implementations, an implementation is further provided in which the Internet of Things system model includes a base station, two rotary-wing drones and N low-power Internet of Things devices, where N is a positive integer not less than 2.

[0016] In addition to the aspects and any possible implementations described above, a further implementation is provided, wherein S1 specifically involves: dividing the target area into M square grids of equal size, randomly deploying an Internet of Things (IoT) device in each grid, having a base station located at the center of the target area, and having each rotary-wing UAV act as a relay node, forwarding information from the IoT device to the base station by flying over different locations in the target area, where M is a positive integer not less than N.

[0017] In addition to the aspects and any possible implementations described above, a further implementation is provided in which the channel model is established by setting up a Loss link between the IoT device and the drone and between the drone and the base station and obtaining the channel gain, and then establishing the channel model through the channel gain.

[0018] In addition to the aspects and any possible implementations described above, a further implementation is provided in which the energy consumption of the UAV during movement or hovering in the energy consumption model includes the blade profile power, the derived power, and the energy consumed when the UAV communicates with the base station during hovering.

[0019] In addition to the aspects and any possible implementations described above, a further implementation is provided in which the information age model is specifically: by applying a sampling and replacement strategy, each IoT device's update package waits to be collected by a drone or replaced by a new update package, the update package periodically arrives at each IoT device's buffer, and each IoT device's update package can wait in the queue for a random period of time until it is replaced or successfully transmitted.

[0020] In addition to the aspects described above and any possible implementation, a further implementation is provided in which the decision model in S4 is a multi-agent partially observable Markov decision process model, represented by a tuple (S,A,R), where S represents the state space, A represents the action space, and R represents the reward.

[0021] In addition to the aspects described above and any possible implementations, a further implementation is provided in which the improved algorithm in S5 is the MAND3QN algorithm, in which each agent has a current neural network and a target neural network, the two neural networks have the same structure but different weights.

[0022] As described above and in any possible implementation, a drone trajectory planning and optimization system is further provided in a drone-assisted Internet of Things (IoT) system, the trajectory planning and optimization system comprising:

[0023] The model building module is used to preset IoT system models, channel models, and energy consumption models;

[0024] The trajectory deployment module is used to obtain the pre-deployment trajectory of the drone through the IoT system model, channel model, and energy consumption model;

[0025] The optimal trajectory acquisition module is used to preset an information age model, which measures the information age, which is the time elapsed since the last update packet received by the UAV was generated. The module obtains the optimal trajectory of all deployed UAVs through the pre-deployment trajectory of the UAV and the information age model. The optimal trajectory of the UAV satisfies the minimization of the weighted average information age of all IoT devices in the network.

[0026] The decision model building module is used to build a decision model for the optimal trajectory of the drone;

[0027] The reinforcement learning module is used to perform reinforcement learning on the decision model by improving the algorithm.

[0028] The optimal flight strategy output module is used to output the best flight strategy for the UAV through the decision model after reinforcement learning.

[0029] Compared with the prior art, the present invention can achieve the following technical effects:

[0030] (1) First, this invention introduces information age and deep reinforcement learning algorithms and related algorithm principles. The research background of this invention is based on UAV-assisted data update system. Therefore, this invention takes multi-UAV with faster update speed as model, analyzes and derives the theoretical framework of combining UAV communication with Internet of Things system. Considering the huge amount of computation brought about by multi-UAV system, and the problem that Q-learning algorithm has small dimension and is difficult to converge, this invention introduces DNN network to alleviate this pressure, and uses DQN-based method to improve the algorithm and speed up the convergence speed of the algorithm.

[0031] (2) In addition, this invention proposes a method based on Multi-Agent Double Deep Q Network (MADDQN) to address the problem of overestimation of Q value in DQN. This method greatly improves the impact of overestimation on the DQN algorithm, almost eliminates the influence of bias, and significantly improves the overall performance of the algorithm.

[0032] (3) However, during training, the DDQN algorithm can only output the Q value of each action, but cannot output the state value and action advantage value at the same time. This may waste some shared representations in the neural network. In order to make the algorithm of this invention show its full advantages in the simulation environment, this invention uses a duel structure to decompose the value function of the state into the value function of the state and the advantage function of the state-action pair, thereby improving the learning efficiency of the algorithm. Through simulation experiments under various conditions, the feasibility and reliability of the algorithm of this invention can be demonstrated.

[0033] (4) In addition, to address the problem that the algorithm is prone to getting trapped in local optima, a noise network was added to introduce a certain degree of randomness into the network. A new, efficient trajectory planning method based on a multi-agent noise dueling double deep Q network (MAND3QN) was proposed. Through theoretical derivation and simulation analysis, it was found that the loss function of the new method proposed in this invention can converge more stably and has a lower AoI.

[0034] Of course, any product implementing this invention does not necessarily need to achieve all of the technical effects described above at the same time. [Attached Image Description]

[0035] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0036] Figure 1 This is a model diagram of an Internet of Things system provided in one embodiment of the present invention;

[0037] Figure 2 This is a UAV time slot diagram provided in one embodiment of the present invention;

[0038] Figure 3 This is a diagram of the NoisyNet-D3QN neural network structure provided in one embodiment of the present invention;

[0039] Figure 4 This is a comparison chart of the loss functions of MAND3QN under different learning rates provided in an embodiment of the present invention;

[0040] Figure 5 This is a comparison chart of reward functions under different learning rates for MAND3QN provided in one embodiment of the present invention;

[0041] Figure 6 This is a comparison chart of the average AoI under different learning rates after training with MAND3QN, provided in one embodiment of the present invention;

[0042] Figure 7 This is a comparison chart of reward functions under different algorithms provided in one embodiment of the present invention (N=8);

[0043] Figure 8 This is a comparison chart of average AoI under different algorithms provided in one embodiment of the present invention.

Detailed Implementation Methods

[0044] To better understand the technical solution of the present invention, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0045] It should be understood that the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0046] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0047] This invention provides a method for optimizing the trajectory planning of unmanned aerial vehicles (UAVs). The method is based on UAV-assisted Internet of Things (IoT) and includes the following steps:

[0048] S1: Preset IoT system model, channel model, and energy consumption model;

[0049] S2: Obtain the pre-deployment trajectory of the drone through the IoT system model, channel model, and energy consumption model;

[0050] S3: Preset information age model, which is used to measure information age, which is the time elapsed since the last update packet received by the drone was generated. The optimal trajectory of all deployed drones is obtained through the pre-deployment trajectory of the drone and the information age model. The optimal trajectory of the drone satisfies the minimization of the weighted average information age of all IoT devices in the network.

[0051] S4: Develop a decision model for the optimal trajectory of the drone;

[0052] S5: Reinforcement learning is performed on the decision model in S4 using an improved algorithm;

[0053] S6: Output the optimal flight strategy for the drone through the decision model after reinforcement learning.

[0054] Furthermore, the IoT system model includes one base station, two rotary-wing drones, and N low-power IoT devices, where N is a positive integer not less than 2.

[0055] Furthermore, S1 specifically involves: dividing the target area into M square grids of equal size, randomly deploying an IoT device in each grid, with the base station located at the center of the target area, and each rotary-wing UAV serving as a relay node, forwarding information from the IoT device to the base station by flying over different locations in the target area, where M is a positive integer not less than N.

[0056] Furthermore, the channel model is established by setting up Loss links between IoT devices and drones, and between drones and base stations, and obtaining channel gains, and then using the channel gains to build the channel model.

[0057] Furthermore, the energy consumption of the UAV during movement or hovering in the energy consumption model includes the blade profile power, output power, and energy consumed when the UAV communicates with the base station during hovering.

[0058] Furthermore, the information age model is specifically as follows: by applying a sampling and replacement strategy, each IoT device's update package waits to be collected by a drone or replaced by a new update package. The update package periodically arrives at each IoT device's buffer, and each IoT device's update package can wait in the queue for a random period of time until it is replaced or successfully transmitted.

[0059] Furthermore, the decision model in S4 is a multi-agent partially observable Markov decision process model, represented by a tuple (S,A,R), where S represents the state space, A represents the action space, and R represents the reward.

[0060] Furthermore, the improved algorithm in S5 is the MAND3QN algorithm. In the MAND3QN algorithm, each agent has a current neural network and a target neural network. The two neural networks have the same structure but different weights.

[0061] The present invention also provides a drone trajectory planning and optimization system in a drone-assisted Internet of Things system, the trajectory planning and optimization system comprising:

[0062] The model building module is used to preset IoT system models, channel models, and energy consumption models;

[0063] The trajectory deployment module is used to obtain the pre-deployment trajectory of the drone through the IoT system model, channel model, and energy consumption model;

[0064] The optimal trajectory acquisition module is used to preset an information age model, which measures the information age, which is the time elapsed since the last update packet received by the UAV was generated. The module obtains the optimal trajectory of all deployed UAVs through the pre-deployment trajectory of the UAV and the information age model. The optimal trajectory of the UAV satisfies the minimization of the weighted average information age of all IoT devices in the network.

[0065] The decision model building module is used to build a decision model for the optimal trajectory of the drone;

[0066] The reinforcement learning module is used to perform reinforcement learning on the decision model by improving the algorithm.

[0067] The optimal flight strategy output module is used to output the best flight strategy for the UAV through the decision model after reinforcement learning.

[0068] The principle of this invention is as follows:

[0069] 1. Network Model

[0070] This invention considers a multi-drone-assisted Internet of Things (IoT) system, consisting of a base station, two rotary-wing drones, and N low-power IoT devices. The position of a drone in time slot t is entirely determined by its position in the 2D plane p. u (t)=(x u (t),y u The projection of (t) onto the height h u Given. For ease of demonstration, the target area is divided into J equal-sized square grids, such as... Figure 1 As shown. The position of each device d∈D is determined by p. d =(x d ,y d Given, where D = {D1, D2, ..., D} N Let} represent a set of N IoT devices. The grid size is appropriately set so that one IoT device is randomly deployed within each grid to monitor different physical processes. The base station is assumed to be located at the center of the area. Each drone acts as a relay node, flying over different locations within the service area to collect information from all devices, primarily aiming to reduce the weighted average Area of ​​Interest (AoI). Each drone then forwards the information from the IoT devices to the base station at the center of the map.

[0071] This invention assumes that each drone operates at an appropriate altitude h u Fly from one grid center to another, the center of each grid is determined by (x) g ,y g The set ∈ G is given, where G is the set containing the locations of each grid center. The distance between two adjacent grid centers is r. g In this invention, τ is set as the time required for the UAV to move from one grid center to another, which is defined as r g The ratio between the speed of the device and the speed of the drone. This invention also assumes that the IoT device d(t)∈D follows a scheduling policy w(t)∈W={0,1,...,N}, such that device d is scheduled to transmit in time slot t.

[0072] like Figure 2 As shown, without loss of generality, it is assumed that the system of this invention is a discrete-time system, where time is divided into time slots of unit length, such that each time slot t≥1 corresponds to a duration [t-1,t]. Therefore, a time slot can be divided into two sub-time slots: one sub-time slot is used for UAV data collection, and the other sub-time slot is used for UAV flight. The lengths of the two sub-time slots are respectively determined by T. t and T f This means that they satisfy T. t +T f =t.

[0073] To avoid drone collisions, two drones are not allowed to fly into the same grid in each time slot, i.e., p u1 (t)≠p u2 (t). To effectively utilize the LoS link between drones and IoT devices, each drone is allocated the full bandwidth and serves at most one IoT device per time slot. When the drone has sufficient power, o is set... N (t)∈{0,1} is a binary variable representing whether the UAV performs data collection in time slot t. When o N When (t) = 1, the drone hovers and collects data from relevant IoT devices, then immediately forwards it to the base station. N (t) = 0 means that the buffer of the IoT device was not empty in the time slot t, but instead the drone was moving at a speed of V. u (t) Fly directly to the next grid. Otherwise, if the drone reaches the minimum battery level, it must fly directly to the base station to recharge.

[0074] 2. Channel Model

[0075] This invention assumes the existence of Loss-of-Sight (LoS) links between IoT devices and drones, and between drones and base stations. Therefore, the channel gain between the drone and the base station in time slot t is...

[0076]

[0077] Where β0 is the channel gain at a reference distance of 1m, h bs This indicates the antenna height at BS.

[0078] The channel gain between the drone and the IoT device in time slot t is

[0079]

[0080] Where s u,d (t) represents the distance between the drone and the IoT device in time slot t, and its formula is:

[0081]

[0082] 3. Energy Consumption Model

[0083] The power consumption of a drone while it is moving or hovering consists of three modeled components.

[0084]

[0085] Where P0 and P1 represent the blade profile power and derived power when the UAV is hovering, respectively. V u U represents the speed of the drone. tipLet μ0 represent the tip velocity of the rotor blades, μ0 represent the average rotor-induced velocity during hovering, d0 represent the airframe drag, and ρ represent the air density. Simultaneously, s0 represents the rotor stiffness, and B represents the rotor disk area. Furthermore, the UAV consumes energy when communicating with the base station; if this invention assumes the UAV's battery capacity E... max,u And divide it into a finite number of energy quanta e u Therefore, the energy contained in each energy quantum is composed of This invention expresses the battery level of the UAV in time slot t as e. u (t). By letting M and σ 2 The energy consumption required for the drone to update an update package from IoT device d, where the update package size and the drone's noise power are respectively, is given by the following formula.

[0086]

[0087]

[0088] The energy consumed when a drone hovers is expressed as:

[0089]

[0090] Because the energy consumed by flight or hovering is much greater than the energy required for relaying update packets, the number of energy quanta must be set large enough when discretizing the battery level to avoid overestimating the energy consumed by communicating with the base station. The drone's battery variation is given by the following formula.

[0091]

[0092] 4. Information Age

[0093] This invention uses AoI as an indicator to measure the age of information, which is defined as the time elapsed since the last update packet received by the UAV was generated.

[0094] For random sampling, the intervals between samples are random and can follow an exponential distribution. By applying a sampling and replacement strategy, each IoT device's update packet awaits collection by a drone or replacement by a new update packet. Update packets arrive periodically at each IoT device's buffer.

[0095] Each IoT device's update package can wait in a queue for a random amount of time until it is replaced or successfully transmitted. This invention uses L... N (t) is used to track the lifetime of the latest update package (if it exists), as follows:

[0096]

[0097] It can be viewed as the lifetime of the update packet up to time slot t. Using an arbitrary generation strategy, whenever an IoT device d is selected to transmit an update packet in a certain time slot, it generates the update packet at the beginning of that time slot; otherwise, it increments by one packet after a time slot, i.e., L. N (t-1)+1. For each IoT device, its update package L should be collected and recorded. N The lifetime of (t) is determined so that drones deployed at base stations can understand the sampling characteristics of IoT devices and make decisions about drone data collection.

[0098] Therefore, this invention defines AoI as

[0099]

[0100] If an IoT device d updates a packet in time slot t, then the device's AoI is set to the lifetime L of that packet. N (t), otherwise it is incremented by 1. Here, A d,max This represents the maximum allowed AoI, which is relatively large.

[0101] 5. Problem Formulation

[0102] The goal of this invention is to minimize the weighted average AoI of all IoT devices in the network by jointly finding the optimal trajectories of all deployed drones. This invention can formulate the optimization problem as follows:

[0103]

[0104]

[0105] p u1 (t)≠p u2 (t)(11b)

[0106] p u (t)=(x u (t),y u (t))∈G(11c)

[0107] o N (t)∈{0,1}(11d)

[0108] Where (11) represents the weighted average AoI of all IoT devices at the base station, (11a) ensures that the drone can reach the base station before its energy is depleted, (11b) prevents drones from colliding with each other, (11c) limits the flight range of the drones, and (11d) indicates whether the drone performs data collection in time slot t. It is worth noting that (11a) depends on t, which means that the time slots for drone flight and hovering are different. Considering that they all take off at the same time, they can arrive at the base station in different time slots. The optimization problem (11) is a nonlinear integer optimization problem, and its complexity increases with the number of deployed devices. Although there are some classic optimization algorithms (such as dynamic programming and branch and bound) that can be used to solve this problem, they have high algorithmic complexity, especially in large-scale scenarios. At the same time, it is also a challenge to rerun traditional optimization algorithms once the environment changes. In order to solve this problem in an effective and feasible way, the above optimization problem (11) is expressed as a Markov decision process (MDP) and a deep reinforcement learning model is introduced.

[0109] 6. Markov Decision Process

[0110] Since the detection range of UAVs is limited, their observation of the environment within time slot t is incomplete. Therefore, this invention models the proposed multi-UAV problem as a multi-agent partially observable Markov decision process (MA-POMDP). The MA-POMDP is represented by a tuple (S, A, R), representing the state space, action space, and reward, respectively. In this invention, S and A are considered discrete. In each time slot t, each UAV observes the current environmental state s(t), takes action a(t) according to a given policy, and receives a reward. Where γ(t) is the reward discount factor. The MA-POMDP in this invention is described as follows:

[0111] State space:

[0112] The state space of the system at time slot t is defined as follows: for each observed state, s(t) = (p u1 (t),p u2 (t),A(t),o(t),L(t),e u (t)), where:

[0113] p u1 (t),p u2 (t) represents the positions of UAVs u1 and u2 at time slot t.

[0114] A(t) = (A1(t), A2(t), ..., A N (t) represents the AoI of all IoT devices at time slot t, where A N(t)∈[1,2,...,A N,max ].

[0115] o(t) = (o1(t), o2(t), ..., o N (t) represents the state at time slot t where the UAV has detected the target device and collected data.

[0116] L(t) = (L1(t), L2(t), ..., L N (t) is the lifetime of the IoT device after the update packet is generated at time slot t, where L N (t)∈[1,2,...,A N,max -1].

[0117] e u (t) represents the battery state of each drone at time slot t.

[0118] Action space:

[0119] This invention assumes that the maximum permissible speed of the UAV restricts its movement within each time slot to one neighboring cell of its current cell. Therefore, in each time slot t, the UAV either decides to remain in its position for the duration of the next time slot or move to one of its neighboring cells. The action space of time slot t is determined by the UAV v u The movement and scheduling strategy of (t) is determined, i.e., a(t) = (v u (t), w(t)). Where v u (t)∈V={N,S,E,W,I} has 5 actions to execute, where N, S, W, and E represent the north, south, west, and east directions, respectively, and I indicates that the UAV will remain at its position in the next time slot. Therefore, the dynamic change of the UAV's position will be

[0120]

[0121] award:

[0122] The objective of this invention is to minimize the weighted average AoI of the entire system, defining the instantaneous reward r of the UAV at time t. u (t) is

[0123]

[0124] To find the optimal flight strategy and to take into account the impact of the environment and the UAV on the entire system as much as possible, this invention proposes an algorithm based on MAND3QN, which uses the aforementioned Markov decision process.

[0125] 1.1 MAND3QN Algorithm

[0126] Dueling-DDQN is an extension of the Double-DQN algorithm, aiming to improve the learning efficiency and stability of DQN by decoupling the value function and the advantage function. Its basic idea is to estimate the value function of a state and the advantage of each action separately, and then combine them to obtain the Q-value function. The intuition behind this approach is that, in certain states, the choice of the optimal action is based more on the advantage of one action over another than on the actual value of the state. By decoupling the value and advantage functions, the model can better capture this information and improve the learning process.

[0127] The Dueling-DQN algorithm uses a neural network with two independent output layers to represent the value and advantage functions. The value layer estimates the value of a state, while the advantage layer estimates the deviation of each action from the mean. This allows the drone to learn which actions are more or less valuable in a given state, without having to learn the value of every action in every possible state. Then, by summing the value and advantage functions, the Q-value function can be obtained.

[0128]

[0129] Where V(s) is the value of state s, A(s,a) is the advantage of taking action a in state s, ∑A(s,a') is the sum of the advantages of all actions in state s, and |A| is the total number of actions.

[0130] The update rules for network parameters in Dueling-DDQN are as follows:

[0131] θ target =θ+α(r+γQ) target (s',argmin(Q(s',a';θ);θ target ))-Q(s,a;θ)) (15)

[0132] Where r is the reward, γ is the discount factor, and Q... target The target Q value, θ and θ target These are the current and target network parameters, respectively. However, this invention does not use Q. target (s',a';θ target Instead of calculating the target Q value, we use the Dueling Q value:

[0133] Y = r + γQ dueling (s',argmin(Q(s',a';θ);θ target (16)

[0134] Among them, argmin(Q(s',a'; θ); θ targetThe action that minimizes the Q-value in the next state is estimated by the current network.

[0135] NoisyNet-D3QN is an improvement on the Dueling Double DQN algorithm. It introduces noise into the network weights to encourage exploration and improve learning stability. The key idea of ​​this method is to add a special noise layer to each layer of the neural network to avoid deterministic behavior, increase exploration, and at the same time reduce overfitting of Q-values, thereby improving learning stability.

[0136] The NoisyNet-D3QN algorithm uses two networks: a main network and a target network, which are updated at different time intervals. Furthermore, the network weights of the main network are randomized by generating random noise vectors at each time step to randomize the neuron outputs, thereby enhancing the model's exploratory performance. The random noise has a mean of 0 and a variance of σ. 2 The decomposed Gaussian noise is learned during training.

[0137] NoisyNet is a neural network whose weights and biases are affected by noise. This invention assumes that the original parameters of the network can be represented by random variables θ, and now this invention represents them as follows:

[0138]

[0139] The set is a learnable parameter, while ε is random noise with zero mean of the same dimension, and ⊙ represents the dot product.

[0140] The weights of a noisy network are defined as follows:

[0141] w i =w i +σε i (18)

[0142] b i =b i +σδ i (19)

[0143] Where w i and b i ε represents the weights and biases of the i-th layer. i and δ i It is a random variable sampled from a Gaussian distribution.

[0144] Noisy networks are used to estimate the action-value function Q(s,a), using the same method as in D3QN. However, noisy networks encourage exploration by making the action-value estimation more randomized.

[0145] The target network is updated in the same way as in Dueling Double DQN, that is, the parameters of the main network are copied every few iterations. Q-learning is also updated in the same way, using a noisy network to estimate the target Q value.

[0146] The loss function used to update the main network is given below.

[0147]

[0148] Where r is the reward received in the current time period, γ is the discount factor, and Q... target It is the target action value function estimated using the target network.

[0149] like Figure 3 As shown, in the neural network structure of MAND3QN, each agent has a current neural network and a target neural network. The two neural networks have identical structures but different weights. This structure can better handle cooperation and competition among multiple drones. MAND3QN employs a centralized training and decentralized execution framework. Specifically, during the training phase, all agents simultaneously collect experience and store it in a shared experience replay buffer for centralized training of a shared policy (centralized training). However, during the execution phase, each agent independently uses the shared policy to select its actions based on its observed state (decentralized execution).

[0150] In summary, the improved algorithm of this invention is described in detail below:

[0151] Table 1. Multi-agent Noise Duel Dual Deep Q Network (MAND3QN) Algorithm

[0152] Table 2 MAND3QN Algorithm

[0153]

[0154]

[0155] This invention evaluates the performance of the proposed MAND3QN algorithm through simulation experiments. The proposed MAND3QN algorithm is compared with random strategies, greedy strategies, DDQN-based trajectory planning algorithms, IQL-based trajectory planning algorithms, and MADDQN-based trajectory planning algorithms. The greedy strategy is a deterministic strategy that always chooses the strategy with the smallest Q-value. Another benchmark algorithm is a random selection strategy, where the UAV arbitrarily chooses actions for decision-making.

[0156] This invention first sets up a 400m x 400m space as the drone simulation environment, dividing it into grids with 50m intervals. Twelve IoT devices are pre-defined and located at [50,50], [300,0], [0,200], [150,100], [100,350], [250,400], [350,200], [400,350], [400,100], [0,400], [300,300], and [150,250]. The positions of the IoT devices are randomly generated within the grid. A base station is set at the center of the simulation environment at [200,200], where the drone can take off, unload data, and charge. The base station height is set to 40 meters, and the drone flight altitude is set to 80 meters. The maximum AoI value is set to 100, i.e., AoI = 100. d,max =100. The specific parameter settings for system simulation are shown in Table 2.

[0157] Table 2 System simulation parameter settings:

[0158] Table 3 System simulation parameter Settings:

[0159]

[0160]

[0161] The initial parameters of the simulation algorithm are set as shown in the table below:

[0162] Table 3 Algorithm simulation parameter settings:

[0163] Table 4 Algorithm simulation parameter Settings:

[0164]

[0165]

[0166] The loss function used in MAND3QN is the mean squared error (MSE) between the predicted Q-value and the target Q-value. The behavior of the loss function changes as the learning rate of the algorithm changes. Generally, a higher learning rate can lead to faster convergence, but it may also cause the algorithm to overshoot its optimum and become unstable. A lower learning rate may result in slower convergence, but it may be more stable and less prone to overshoot.

[0167] Since the reward function is set to the average information age, the change in the average information age during the algorithm's training process can be observed based on the reward function. To facilitate observation of the change in the average information age, this invention extracts a mean value at intervals of 100 points and plots a relatively smooth curve. The final convergence value of this curve is the average information age value that the algorithm can achieve during training. To comprehensively observe the training process, this invention retains the original reward function curve, represented by a shaded state.

[0168] Finally, after training is completed, 100 test rounds are conducted to more intuitively observe the average information age achieved with different learning rates.

[0169] To analyze the comparison of the MAND3QN loss function as the learning rate changes, such as... Figure 4 This invention plots five loss functions that vary with the number of training epochs.

[0170] Depend on Figure 4 It can be seen that all five loss functions exhibit varying degrees of fluctuation around 3000 training epochs. The fluctuations of learning rates 1.0e-4 and 5.0e-5 tend to be consistent, as do those of 1.0e-3 and 5.0e-4. All four loss functions stabilize and converge around 4000 epochs. The worst performing loss function is 5.0e-5, due to its small learning rate, resulting in poor convergence speed and stability. Learning rate 1.0e-4 performs slightly better than 5.0e-5 because of its slightly higher learning rate. Although the fluctuations of learning rates 1.0e-3 and 5.0e-4 tend to be consistent, learning rate 5.0e-4 still exhibits instability, showing varying degrees of fluctuation between 1000 and 1500 training epochs. In contrast, learning rate 1.0e-3's loss value continuously approaches zero as the number of training epochs increases, demonstrating higher stability and faster convergence speed.

[0171] Next, we will further compare and analyze the reward functions with learning rates of 1.0e-4 and 5.0e-5.

[0172] Depend on Figure 5 The results show that as the number of training rounds increases, the reward values ​​for learning rates of 1.0e-4 and 5.0e-5 gradually decrease and tend to converge. However, in the early stages of training, the learning rate of 1.0e-4 converges relatively faster; in the later stages, the learning rate of 1.0e-4 exhibits fewer sloping lines and smaller fluctuations, and achieves a lower convergence value. This demonstrates that, under this algorithm, the learning rate of 1.0e-4 performs better for the reward function.

[0173] We then used the trained network to compare the average AoI under these three learning rates.

[0174] Depend on Figure 6 As can be seen from the 100 test rounds, the curve fluctuation after training with a learning rate of 1.0e-4 is relatively small, indicating that the network is more stable after training and can achieve a lower average information age. This also proves that this learning rate can complete training relatively stably and quickly, resulting in better training performance, and is the optimal learning rate for the MAND3QN algorithm.

[0175] This invention compares the proposed MAND3QN algorithm with five other algorithms in terms of performance, and simulates the reward function when N=8 IoT devices as shown below.

[0176] Depend on Figure 7 As the number of training iterations increases, the average rewards of the other five algorithms, except for the Greedy strategy, gradually decrease and tend to converge. Among them, the MAND3QN algorithm can achieve faster convergence. This is because the overestimation problem in DQN affects the convergence speed and performance of learning. The structure of the dual Q network effectively avoids the overestimation problem caused by the trajectory planning method based on DQN. The Dueling network structure also helps the agent learn the value function in the high-dimensional state space. The noisy network increases the randomness in the exploration process, avoids getting trapped in local optima, and obtains a lower convergence value, thus achieving better performance of the algorithm.

[0177] Depend on Figure 8 As can be seen, the average AoI of the MAND3QN algorithm is significantly lower than that of other algorithms. This is because the use of a dual neural network structure avoids the problem of overestimation of the target Q-value, and the introduction of a dueling structure allows for better modeling of the value of different behaviors. Furthermore, the use of a noisy network increases exploratory power, helping the UAV to better explore the environment and avoid getting trapped in local optima. Additionally, the use of techniques such as experience replay and target networks further improves the algorithm's stability and convergence. Therefore, the MAND3QN algorithm demonstrates superior performance and advantages as the number of devices changes.

[0178] This invention addresses the trajectory planning problem for multiple unmanned aerial vehicles (UAVs). Considering a multi-UAV assisted Internet of Things (IoT) system, where UAVs act as relays, the original problem needs to be transformed into a partially observable Markov decision process involving multiple agents under energy constraints by rationally designing the state space, action space, and reward function.

[0179] To address the challenges posed by the increased state and action spaces resulting from the movement of multiple drones and the deployment of base stations and numerous IoT devices, rendering traditional DQN algorithms unusable, and to avoid the overestimation of Q-values ​​inherent in DQN, this invention proposes a drone trajectory planning algorithm based on MAND3QN. In DQN, training instability persists due to the high correlation between states in the training data. Therefore, this invention employs a Dueling structure to divide the value function into two parts: one estimating the state value, and the other estimating the advantage function for each action in that state. By decoupling these two parts, the D3QN algorithm can learn more accurate Q-values, leading to more stable convergence. Furthermore, while D3QN uses a greedy strategy for exploration, this can be inefficient or suboptimal. Therefore, during forward propagation, NoisyNet is added to the network weights to introduce noise and encourage exploration. This algorithm utilizes NoisyNet based on decomposed Gaussian noise to improve stability and robustness. Simulation results demonstrate that the MAND3QN-based drone trajectory planning algorithm accelerates convergence and significantly reduces the average information age.

[0180] The above provides a detailed description of a UAV trajectory planning and optimization method and system provided in the embodiments of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas; furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

[0181] Certain terms are used in the specification and claims to refer to specific components. Those skilled in the art will understand that hardware manufacturers may use different names to refer to the same component. This specification and claims do not distinguish components based on differences in name, but rather on differences in function. The terms "comprising" and "including" used throughout the specification and claims are open-ended and should be interpreted as "comprising / including but not limited to". "Approximately" means that within an acceptable margin of error, those skilled in the art can solve the technical problem and substantially achieve the technical effect within a certain margin of error. The following descriptions in the specification are preferred embodiments for carrying out this application; however, these descriptions are for the purpose of illustrating the general principles of this application and are not intended to limit the scope of this application. The scope of protection of this application shall be determined by the appended claims.

[0182] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a product or system comprising a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a product or system. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the product or system that includes said element.

[0183] It should be understood that the term "and / or" used in this invention is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Furthermore, the character " / " in this invention generally indicates that the preceding and following related objects have an "or" relationship.

[0184] The foregoing description illustrates and describes several preferred embodiments of this application. However, as mentioned above, it should be understood that this application is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the inventive concept described herein through the foregoing teachings or related technical or knowledge. Any modifications and variations made by those skilled in the art that do not depart from the spirit and scope of this application should be within the protection scope of the appended claims.

Claims

1. A method for optimizing the trajectory planning of a drone, wherein the trajectory optimization method is based on a drone-assisted Internet of Things (IoT), characterized in that, The trajectory planning optimization method includes the following steps: S1: Preset IoT system model, channel model, and energy consumption model; S2: Obtain the pre-deployment trajectory of the drone through the IoT system model, channel model, and energy consumption model; S3: Preset information age model, which is used to measure information age, which is the time elapsed since the last update packet received by the drone was generated. The optimal trajectory of all deployed drones is obtained through the pre-deployment trajectory of the drone and the information age model. The optimal trajectory of the drone satisfies the minimization of the weighted average information age of all IoT devices in the network. S4: Develop a decision model for the optimal trajectory of the drone; S5: Reinforcement learning is performed on the decision model in S4 using the MAND3QN algorithm; S6: Output the optimal flight strategy for the drone through the decision model after reinforcement learning.

2. The trajectory planning optimization method according to claim 1, characterized in that, The IoT system model includes one base station, two rotary-wing drones, and N low-power IoT devices, where N is a positive integer not less than 2.

3. The trajectory planning optimization method according to claim 2, characterized in that, S1 specifically involves dividing the target area into M square grids of equal size, randomly deploying an IoT device in each grid, with the base station located at the center of the target area, and each rotary-wing UAV serving as a relay node. By flying over different locations within the target area, information is forwarded from the IoT device to the base station, where M is a positive integer not less than N.

4. The trajectory planning optimization method according to claim 1, characterized in that, The channel model is established by setting up Loss links between IoT devices and drones, and between drones and base stations, and obtaining channel gains, and then using the channel gains to build the channel model.

5. The trajectory planning optimization method according to claim 1, characterized in that, The energy consumption of the UAV during movement or hovering in the energy consumption model includes the blade profile power, output power, and energy consumed when the UAV communicates with the base station.

6. The trajectory planning optimization method according to claim 1, characterized in that, The information age model is as follows: by applying a sampling and replacement strategy, each IoT device's update package waits to be collected by a drone or replaced by a new update package. The update package arrives at each IoT device's buffer periodically, and each IoT device's update package waits in the queue for a random period of time until it is replaced or successfully transmitted.

7. The trajectory planning optimization method according to claim 1, characterized in that, The decision model in S4 is a multi-agent partially observable Markov decision process model, represented by a tuple (S, A, R), where S represents the state space, A represents the action space, and R represents the reward.

8. The trajectory planning optimization method according to claim 1, characterized in that, The improved algorithm in S5 is the MAND3QN algorithm. In the MAND3QN algorithm, each agent has a current neural network and a target neural network. The two neural networks have the same structure but different weights.

9. A drone trajectory planning and optimization system in a drone-assisted Internet of Things system, based on the trajectory planning and optimization method according to any one of claims 1-8, characterized in that, The trajectory planning and optimization system includes: The model building module is used to preset IoT system models, channel models, and energy consumption models; The trajectory deployment module is used to obtain the pre-deployment trajectory of the drone through the IoT system model, channel model, and energy consumption model. The optimal trajectory acquisition module is used to preset an information age model, which measures the information age, which is the time elapsed since the last update packet received by the UAV was generated. The module obtains the optimal trajectory of all deployed UAVs through the pre-deployment trajectory of the UAV and the information age model. The optimal trajectory of the UAV satisfies the minimization of the weighted average information age of all IoT devices in the network. The decision model building module is used to build a decision model for the optimal trajectory of the drone; The reinforcement learning module is used to perform reinforcement learning on the decision model by improving the algorithm. The optimal flight strategy output module is used to output the optimal flight strategy for the UAV through the decision model after reinforcement learning.