Unmanned aerial vehicle route planning method and system based on deep reinforcement learning
Through deep reinforcement learning methods, a three-dimensional unstructured map is constructed using Berlin noise and digital elevation map, combined with PPO algorithm and deep neural network, the inefficiency and one-sided strategies of drones independently explored in complex three-dimensional environments is solved, and the problem of inefficiency and one-sided strategy of drones is realized. More efficient exploration and adaptability are suitable for complex and unknown environments.
Patent Information
- Application Number
- CN202410940842.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-07-15
AI Technical Summary
When existing drones explore independently in complex and unknown three-dimensional environments, there are problems such as prior experience dependence, high computational burden, poor generalization, low exploration efficiency and one-sided strategies. Traditional methods are difficult to cope with complex three-dimensional environments and large Scale state space.
Using a deep reinforcement learning method, separate the training process from the decision-making process, use Berlin noise and digital elevation map to build a three-dimensional unstructured map, build a partial observable Markov decision-making process model, and optimize the route planning model through the PPO algorithm. Deep neural networks learn high-level task representation and control strategies to automatically adapt to complex environments.
Improve the response speed and exploration efficiency of drones in complex environments, solve dimensional disaster problems, obtain more robust independent exploration strategies, adaptability and generalization capabilities, reduce computing resource consumption, and achieve more efficient Learn and explore.
Smart Images

Figure CN118896610A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of deep reinforcement learning, and in particular to a method and system for unmanned aerial vehicle route planning based on deep reinforcement learning. Background Art
[0002] When drones perform tasks such as natural resource exploration, disaster monitoring and assessment, border security inspections and monitoring, etc., they usually aim at space exploration, not ordinary trajectory planning from a clear starting point to an end point. When drones perform such autonomous exploration tasks, they generally first establish an environmental map through pure exploration, and then use the generated map for navigation and path planning. Current exploration methods usually use artificial maps with prior experience or heuristic methods, such as frontier-based exploration, which requires clear environmental models and rules. For complex and unknown environments, the performance is reduced and it is not suitable for large-scale state spaces and generalization is difficult. Other methods that use autonomous learning often only focus on learning strategies for specific tasks, use inefficient random exploration of samples, or make unrealistic assumptions about the availability of global maps. More efficient methods are urgently needed to improve exploration results.
[0003] Traditional boundary-driven autonomous exploration algorithms do not interact adaptively with the current task environment, and therefore lack the ability to explore previously nonexistent experiences or strategies. During the strategy execution process, some solution links rely more on direct searches that are proportional to the spatial dimension and the spatial discrete number. The computational complexity is high and dimensional disasters are prone to occur. For example, when calculating the gain of the boundary point corresponding to the next step, all discrete boundary points need to be traversed. The amount of calculation for three-dimensional problems is often unacceptable, which consumes a lot of computing resources, resulting in a decrease in the overall performance of the drone. In addition, in order to simplify the model, some studies limit the exploration scene to a two-dimensional slice grid environment, binarize the plane where the drone is located, set the flyable area to 0, and the non-flyable area to 1. Although this process reduces the amount of calculation, it causes the loss of elevation information and weakens the influence of three-dimensional space on the learning strategy. The resulting autonomous exploration strategy is not robust and is not enough to cope with complex three-dimensional environments.
[0004] Current exploration methods usually use artificial maps or heuristic methods with prior experience, such as frontier-based exploration, which not only requires clear environmental models and rules, but also does not interact adaptively with the current mission environment, so it lacks the ability to explore previously non-existent experience or strategies. In the process of strategy execution, some solution links rely more on direct search that is proportional to the spatial dimension and the number of spatial discrete numbers. The computational complexity is high and dimensional disasters are prone to occur. For example, when calculating the gain corresponding to the boundary point in the next step, all discrete boundary points need to be traversed. The amount of calculation for three-dimensional problems is often unacceptable, which will consume a lot of computing resources of the drone's onboard computer, resulting in a decrease in the overall performance of the drone. For complex and unknown environments, the performance of the algorithm is reduced and it is not suitable for large-scale state spaces, and generalization is difficult.
[0005] Other methods that use autonomous learning often focus only on learning strategies for specific tasks, use inefficient random exploration of samples, or make unrealistic assumptions about the availability of global maps. Some studies also limit the exploration scene to a two-dimensional slice grid environment to simplify the model, binarize the plane where the drone is located, set the flyable area to 0, and the non-flyable area to 1. Although this process reduces the amount of calculation, it causes the loss of elevation information and weakens the influence of three-dimensional space on the learning strategy. The resulting autonomous exploration strategy is not robust and is not sufficient to cope with complex three-dimensional environments. Summary of the invention
[0006] The purpose of the present invention is to propose a method and system for UAV route planning based on deep reinforcement learning. In view of the shortcomings of the prior art in complex three-dimensional unstructured environments, such as the need for prior experience, poor interactivity, large computational burden, poor generalization, low exploration efficiency, and one-sided strategies, the present invention adopts a method based on deep reinforcement learning to separate the time-consuming training process from the real-time decision-making process, and deploys the model on the UAV after training it with excellent performance. This not only ensures the response speed of the UAV, but also provides a better way to solve the dimensionality disaster. Deep reinforcement learning allows UAVs to learn high-level task representations and control strategies directly from sensor data through end-to-end learning. It can automatically learn high-level feature representations without manually designing features or controllers, which helps the intelligent agent better adapt to complex and changing environments. Through experience replay and parameter sharing of deep neural networks, deep reinforcement learning methods can make better use of limited data during training and improve learning efficiency.
[0007] In order to achieve the above object, a first aspect of the present invention provides a UAV route planning method based on deep reinforcement learning, the method comprising:
[0008] S1. Constructing 3D unstructured maps using gradient-based Perlin noise and digital elevation maps;
[0009] S2. Construct a partially observable Markov decision process model for autonomous exploration of fixed-wing UAVs with constraints to constrain the flight path of fixed-wing UAVs.
[0010] S3. Construct a deep learning-based route planning model according to the partially observable Markov decision process model, and use the PPO algorithm to optimize the route planning model.
[0011] Furthermore, the gradient-based Perlin noise first generates a lattice rectangular grid covering the entire image, and randomly initializes a gradient vector at each lattice point, as follows:
[0012] Assume that a point to be calculated in the lattice is P, and the four lattice points to which the calculation point P belongs are denoted as p0, p1, p2, and p3 respectively, then its gradient vector is<grad0,grad1,grad2,grad3> ;
[0013] Calculate the offset of point P from the four lattice points<delta0,delta1,delta2,delta3> , and then the dot product of the gradient vector and the distance vector at each lattice point is accumulated to obtain the random noise value of point P. The Perlin calculation formula is as follows:
[0014]
[0015] Where f(·) represents a high-order curve function, which is used to improve the smoothness of Perlin noise and is calculated as follows:
[0016] f(u)=6u 5 -15u 4 +10u 3
[0017] Among them, u represents the independent variable of the higher-order curve function;
[0018] Use a single frequency to generate noise, then calculate by superimposing multiple noises of different frequencies, and use persistence to represent the amplitude of each frequency component. The calculation formula is as follows:
[0019] frequency=2 k
[0020] amplitude=persistence k
[0021]
[0022] Among them, frequency represents frequency, amplitude represents amplitude, Perlin represents k represents the Perlin noise operation performed with different values of frequency and amplitude at each point, that is, the kth superimposed noise function, N represents the number of multiples, persistence represents persistence, Noise(N) represents Perlin noise at N multiples of frequency, and p represents the point to be calculated.
[0023] Furthermore, the digital elevation map is constructed as follows:
[0024] Normalize the random map and map it to [0, 1], as follows:
[0025]
[0026] Among them, Y represents the normalized value, X represents the original input value, and X max Indicates the maximum value in the map data set, X min Represents the minimum value in the map data set;
[0027] The elevation data at each point is recorded using an 8-bit binary integer variable and evenly quantized into 256 levels of elevation values.
[0028] Furthermore, the three-dimensional unstructured map is subjected to three-dimensional simulation interaction, specifically including:
[0029] Intercept the three-dimensional environment at the same level as the starting point of the drone takeoff to create a Boolean slice map;
[0030] Set the initial generation radius R init , in the Boolean slice map, the candidate point is taken as the center and the length of the interception is 2R init The square matrix is denoted as A init , and the matrix A of the same dimension unit Perform point multiplication, where A unit The value of the inner element satisfies the following formula:
[0031]
[0032] Among them, a and b represent the horizontal and vertical coordinates of the point respectively, and x a,b ,y a,b Respectively represent the horizontal distance and vertical distance between the point and the center candidate point;
[0033] According to A init ·A unitThe maximum value of the result is used to determine whether the candidate point is a feasible initial point; if the maximum value is not greater than 0, it means that the area near the candidate point is relatively empty and suitable as a starting flight point, and it is added to the candidate point queue for subsequent random sampling; otherwise, it means that there are relatively close obstacles near the point and it is not suitable as a starting flight point.
[0034] Furthermore, the partially observable Markov decision process model for autonomous exploration of the UAV includes a flight dynamics constraint model and a UAV action space model.
[0035] Furthermore, the flight dynamics constraint model is expressed as follows:
[0036] Assume that the drone is traveling at a fixed speed V UAV Flying, the minimum turning radius R min , which is expressed as follows:
[0037]
[0038] Where g represents the acceleration due to gravity, n y Indicates the maximum allowable normal overload factor of the drone;
[0039] Calculate the maximum heading half angle ψ, expressed as follows:
[0040]
[0041] Among them, λ represents the motion step length of the UAV, and dt represents the time interval of path planning;
[0042] Get the next position and direction of the UAV's autonomous exploration plan, as follows:
[0043]
[0044] Among them, (x u ,y u )、(x' u ,y' u ) represent the current and next moment positions of the drone, respectively. They represent the direction of the drone at the current moment and the direction at the next moment respectively.
[0045] Furthermore, the UAV action space model establishes a discrete action space and a continuous action space according to the relative heading angle of the UAV; wherein the discrete action space separates and discretizes the maximum heading angle range of the UAV to obtain a finite countable action set; the continuous action space maps the maximum heading angle range of the UAV to [-1, 1] through a tanh activation function, so that the action space is continuous, and finally an infinite real number action set is obtained.
[0046] Further, the route planning model building step includes constructing local observations and a deep neural network from local observations to value functions and policy functions;
[0047] The local observation uses a ray casting method to simulate the fan-shaped field of view obtained by the drone, and the input state during network training is the original local map restored by the drone observing the local map;
[0048] The deep neural network adopts the Actor-Critic framework based on strategy and value, where Actor represents the strategy function π θ (a|s); Critic represents the value function V π (s);
[0049] The complex mapping relationship from local observation to value function and policy function can be fitted through a deep neural network. A cascaded three-layer convolutional neural network is used to extract feature information, and two fully connected layers are used to output actions and values.
[0050] Construct a reward function, and the reward value R is expressed as follows:
[0051]
[0052] Among them, r e Indicates reward.
[0053] Furthermore, the route planning model uses the PPO algorithm for gradient optimization, where the objective function of PPO-Clip is Designed for:
[0054]
[0055] Among them, θ represents the weight parameter of the route planning model, τ represents the exploration of π according to the current strategy θ The trajectory obtained, represents the previous strategy, Indicates state s t Take action a t The advantage function, ρ t represents importance sampling; clip(ρ t (θ),1-ε,1+ε) represents the clipping function, which means that ρ t (θ) is truncated in [1-ε,1+ε], that is, when the function represents the relative change of the new strategy to the old strategy exceeds 1+ε, it outputs 1+ε, and when it is less than 1-ε, it outputs 1-ε; E represents the mathematical expectation, According to the current exploration strategy π θ The mathematical expectation value of the trajectory τ obtained; wherein the weight parameter importance sampling ρ based on the route planning modelt (θ) is calculated as follows:
[0056]
[0057] in, represents the old advantage function, π θ (a t |s t ) represents the updated advantage function; when the advantage function value is greater than 0 and is the maximum, it represents the state s t -Action a t The best adaptability to the environment; when ρ t When (θ) exceeds 1+ε and is maximum, the value of the updated advantage function is minimum.
[0058] In a second aspect of the present invention, a drone route planning system based on deep reinforcement learning is provided, the system comprising:
[0059] A map construction module for constructing 3D unstructured maps using gradient-based Perlin noise and digital elevation maps;
[0060] The constraint model building module is used to build a partially observable Markov decision process model for autonomous exploration of fixed-wing UAVs with constraints to constrain the flight path of fixed-wing UAVs.
[0061] The route planning optimization module is used to build a deep learning-based route planning model according to the partially observable Markov decision process model, and optimize the route planning model using the PPO algorithm.
[0062] The beneficial technical effects of the present invention are at least as follows:
[0063] (1) The present invention uses Perlin noise to autonomously construct a three-dimensional unstructured simulation environment and restore the elevation information missing from the Boolean map as an environment for subsequent experiments and tests. Reinforcement learning focuses on the interaction with the environment, so whether the environment is designed reasonably will affect the efficiency of the agent's strategy learning to a certain extent. In the construction of a three-dimensional uncertain environment, the lack of an accurate environmental model for interaction may cause the resulting drone autonomous exploration strategy to lack practicality, and accurately modeling applicable terrain and obstacles is a complex problem. Therefore, the present invention uses Perlin noise with natural fractal properties to generate a continuous three-dimensional unknown environment and stores it as a digital elevation map as a map for drone exploration of unknown environments. It can not only better simulate the long natural mountain landscape, but also achieve a variety of different terrains by changing the random seed.
[0064] (2) In order to make the learned autonomous exploration strategy more robust, the present invention uses a fixed-wing UAV with more complex flight dynamics constraints as a reference object for flight dynamics constraint modeling, and completes action space modeling on this basis to constrain the behavior of the UAV during exploration and prevent the UAV from making physically unfeasible actions, thus establishing a foundation for the subsequent reinforcement learning framework. The establishment of the UAV flight dynamics constraint model will directly affect the state action space of the intelligent agent. This process not only requires the use of a fixed-wing UAV with more complex flight dynamics constraints as a reference object, but also requires the mapping of the flight dynamics constraint model to the reinforcement learning action space.
[0065] (3) The present invention uses the powerful feature representation ability of deep neural networks to fit the action value function, strategy, model and other components of reinforcement learning, constructs a deep neural network approximate mapping from local observations to value functions and strategy functions, and establishes a partially observable Markov decision process model in combination with the application scenario characteristics of autonomous exploration. It adopts the PPO algorithm suitable for fine control tasks and high-dimensional action spaces, and constructs a reasonable reward function to complete the reinforcement learning framework. It provides a better way to solve the curse of dimensionality, improves the robustness and generalization ability of the model when dealing with large-scale state spaces, makes reinforcement learning technology practical, and solves complex problems in real scenarios.
[0066] (4) The present invention adopts a method based on deep reinforcement learning to separate the time-consuming training process from the real-time decision-making process. After training a model with excellent performance, it is deployed on the drone. This not only ensures the response speed of the drone, but also provides a better way to solve the curse of dimensionality. Deep reinforcement learning allows drones to learn high-level task representations and control strategies directly from sensor data through end-to-end learning. It can automatically learn high-level feature representations without manually designing features or controllers, which helps intelligent agents better adapt to complex and changing environments. Through experience replay and parameter sharing of deep neural networks, deep reinforcement learning methods can better utilize limited data during training and improve learning efficiency. The present invention uses the method of deep reinforcement learning to solve the problem of autonomous exploration of UAVs in a three-dimensional uncertain environment, and explores how to use deep reinforcement learning to cope with the challenges of unstructured terrain. It can further improve the performance of the autonomous exploration system of UAVs, not only providing an important application scenario for the field of deep reinforcement learning, but also providing useful guidance for the application of UAVs in similar terrain areas. It is expected to fill the knowledge gap in the field of autonomous exploration, provide new theories and methods for autonomous exploration of UAVs, and promote the development of the field of deep reinforcement learning. At the same time, it can also provide valuable contributions to future research and practice, thereby improving work efficiency, reducing personnel costs, and reducing potential risks in multiple fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] The present invention is further described using the accompanying drawings, but the embodiments in the accompanying drawings do not constitute any limitation to the present invention. A person skilled in the art can obtain other drawings based on the following drawings without creative work.
[0068] Figure 1 This is a flow chart of the UAV route planning method based on deep reinforcement learning of the present invention.
[0069] Figure 2 The figure is a schematic diagram of a Perlin noise generation process according to an embodiment of the present invention.
[0070] Figure 3 A schematic diagram of a random map and a digital elevation map thereof according to an embodiment of the present invention.
[0071] Figure 4 The figure is a schematic diagram of the process of generating a slice map according to an embodiment of the present invention.
[0072] Figure 5 Schematic diagram of feasible initial points and infeasible initial points in an embodiment of the present invention.
[0073] Figure 6 Schematic diagram of discrete and continuous action space modeling according to an embodiment of the present invention.
[0074] Figure 7 Schematic diagram of an original local map and a local map observed by a drone according to an embodiment of the present invention.
[0075] Figure 8 Schematic diagram of the neural network structure of an embodiment of the present invention.
[0076] Fig. 9 Schematic diagram of the PPO algorithm flow in an embodiment of the present invention.
[0077] Fig.10 Schematic diagram of autonomous environment exploration of a drone according to an embodiment of the present invention.
[0078] Fig.11 This is a framework diagram of the drone route planning system based on deep reinforcement learning in the present invention. DETAILED DESCRIPTION
[0079] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0080] like Figure 1 As shown, the UAV route planning method based on deep reinforcement learning provided by an embodiment of the present invention includes:
[0081] S1. Constructing 3D unstructured maps using gradient-based Perlin noise and digital elevation maps.
[0082] Specifically, Perlin noise is a continuous random texture generation algorithm proposed by Ken Perlin and is commonly used to simulate irregular patterns in nature, such as clouds and terrain. Traditional value-based noise divides the entire spatial area into several lattices, sets random values at the vertices of each lattice, i.e., the lattice points, and the areas outside the lattice points are calculated using interpolation functions. Affected by the limitations of the generation method, value-based noise will show artificial regularity in some aspects and is not close to nature enough, while gradient-based noise generates gradient vectors instead of values at the lattice points. Because gradient information is taken into account, gradient noise is usually smoother than value noise, and has more advantages in simulating natural terrain and generating detailed patterns and textures. It is also the method used by the present invention to generate random terrain. The main generation process of gradient-based Perlin noise is as follows: Figure 2 shown.
[0083] Furthermore, the gradient-based Perlin noise first generates a lattice rectangular grid covering the entire image, and randomly initializes a gradient vector at each lattice point, as follows:
[0084] Assume that a point to be calculated in the lattice is P, and the four lattice points to which the calculation point P belongs are denoted as p0, p1, p2, and p3 respectively, then its gradient vector is<grad0,grad1,grad2,grad3> ; Then, according to formula (1), the dot product of the gradient vector and the distance vector at each lattice point is calculated to obtain the random noise value of point P. Calculate the offset of point P from the four lattice points<delta0,delta1,delta2,delta3> , and then the dot product of the gradient vector and the distance vector at each lattice point is accumulated to obtain the random noise value of point P. The Perlin calculation formula is as follows:
[0085]
[0086] Wherein, f(·) represents a high-order curve function, which is used to improve the smoothness of Perlin noise. f(u) is a high-order curve function to ensure that the interpolation function is continuously differentiable at the second order, which is used to improve the smoothness of Perlin noise. Specifically, it is expanded into formula (2), which is calculated as follows:
[0087] f(u)=6u 5 -15u 4 +10u 3 (2)
[0088] Among them, u represents the independent variable of the higher-order curve function;
[0089] If only a single frequency is used to generate noise, although it is smooth overall, it lacks local details. This can be solved by superimposing noises of multiple different frequencies. Such superimposed noise is also called fractal noise. In Perlin noise, persistence is used to represent the amplitude of each frequency component. The definitions of its frequency and amplitude are shown in Formulas (3) and (4), where i represents the i-th superimposed noise function. The frequency of each noise function is twice that of the previous one. Each superimposed layer of noise is an octave. The expression of the final obtained noise is shown in Formula (5). N is the number of octaves. Perlin represents the Perlin noise operation on the frequency and amplitude with different values at each point, that is, the process of Formulas (1) and (2). The calculation formula is as follows:
[0090] frequency = 2 k (3)
[0091] amplitude = persistence k (4)
[0092]
[0093] Among them, frequency represents the frequency, amplitude represents the amplitude, Perlin represents the Perlin noise operation on the frequency and amplitude with different values at each point, that is, the k-th superimposed noise function. N represents the number of octaves, persistence represents the persistence, Noise(N) represents the Perlin noise at the N-th octave, and p represents the point to be calculated.
[0094] Specifically, a digital elevation model is a digital map that stores surface elevation information in the form of raster data. This elevation information can be used for many geographical and environmental science applications such as drawing topographic maps, performing geographic information system analysis, terrain modeling, and hydrological modeling. The map generated using Perlin noise is also stored in the form of raster data, but its values are in the interval [-x, x] (0 < x < 1). To facilitate better extraction of data information in subsequent research, before converting the random map into a digital elevation model, it is necessary to normalize the random map according to Formula (6) and map it to [0, 1]. In the formula, Y is the value obtained after normalization, X is the original input value, X max is the maximum value in the map data set, and X min is the minimum value in the map data set.
[0095]
[0096] At the same time, in order to reduce the storage burden of the drone, an 8-bit binary integer variable is used to record the elevation data at each point, and a total of 256 levels of elevation values can be evenly quantified. Due to the limitations of the drone's own power supply and communication range, the flight altitude is limited. The vertical resolution of the present invention is 1 meter, and the elevation map of 0-255 meters above sea level can be recorded. Finally, the normalized random map and its corresponding digital elevation map are obtained as follows Figure 3 shown.
[0097] Furthermore, after establishing the three-dimensional simulation interactive environment, it is necessary to randomly set the initial flight point of the drone at an appropriate position to avoid the occurrence of random initial flight points that violate physical conditions. In the present invention, the flight altitude of the drone starting point is set to 128 meters, and the three-dimensional environment at the same horizontal plane as the starting point is intercepted to produce a Boolean slice map. The specific process is as follows: Figure 4 shown.
[0098] Map the slice map to the normalized map, set the height threshold to 0.508, perform threshold segmentation calculation, set the data above the threshold to 1, and set the data not greater than the threshold to 0. The points that are 0 in the Boolean slice map after threshold segmentation are potential initial flight points, but some of the points that are 0 are too close to obstacles. Even if the drone is initialized at these points, there is a high probability that the drone will crash in the early stages of exploration. Therefore, it is necessary to perform obstacle detection around the candidate initial flight point before initialization to ensure that the drone starts exploration in a relatively stable and safe environment. The specific detection method is to set the initial generation radius R init , in the slice map, with the candidate point as the center, the interception side length is 2R init The square matrix is denoted as A init , and the matrix A of the same dimension unit Perform point multiplication, where A unit The value of the inner element satisfies formula (7), a and b are the horizontal and vertical coordinates of the point respectively, x a,b ,y a,b They are the horizontal and vertical distances from the point to the center candidate point, respectively, expressed as follows:
[0099]
[0100] Among them, a and b represent the horizontal and vertical coordinates of the point respectively, and x a,b ,y a,b They respectively represent the horizontal and vertical distances from the point to the center candidate point.
[0101] According to A init ·A unitThe maximum value of the result is used to determine whether the candidate point is a feasible initial point. If the maximum value is not greater than 0, it means that the area near the candidate point is relatively empty and suitable as a starting flight point, and it is added to the candidate point queue for subsequent random sampling; otherwise, it means that there are relatively close obstacles near the point and it is not suitable as a starting flight point. The schematic diagram of feasible initial points and infeasible initial points is shown in Figure 5 As shown, the initial direction of the drone is randomly generated, the inner circle of the ring is the field of view that the drone may observe, and the outer circle is the initial generated radius detection range.
[0102] S2. Construct a partially observable Markov decision process model for constrained autonomous exploration of fixed-wing UAVs to constrain the flight path of fixed-wing UAVs.
[0103] Specifically, the partially observable Markov decision process model for autonomous exploration of the UAV includes a flight dynamics constraint model and a UAV action space model.
[0104] Among them, the outdoor unstructured environment exploration has a large flight range and large altitude changes, and the flight dynamics model and flight dynamics constraints of fixed-wing UAVs are more complex than those of multi-rotor UAVs. Therefore, in order to maintain generality, fixed-wing UAVs are proposed as the reference object for flight dynamics constraint modeling.
[0105] Preferably, based on the fixed-wing UAV flight dynamics model, the flight dynamics constraints represented by the minimum turning radius, maximum heading half angle and other parameters of the UAV in the Boolean slice map are derived. UAV Flying, the minimum turning radius R min As shown in formula (8):
[0106]
[0107] Where g is the acceleration due to gravity, which is 9.82 m / s 2 , n y The maximum allowable normal overload factor of the UAV is 20. In the present invention, V UAV is 20m / s, and the minimum turning radius R of the drone model can be obtained by calculation min is about 2.04m. Substituting it into formula (9) can obtain the maximum heading half angle ψ, where the UAV motion step length λ is shown in formula (10). dt is the time interval of path planning, which is 0.1s, so λ is calculated to be 2m, and then it is deduced that the maximum heading half angle of the UAV in the present invention is about 29.3°, and the maximum heading angle range of the UAV is [-29.3°, 29.3°].
[0108]
[0109] λ=V UAV ×dt (10)
[0110] The update of the next position and direction of the UAV's autonomous exploration planning is shown in formula (11):
[0111]
[0112] Where (x u ,y u )、(x' u ,y' u ) are the current and next moment positions of the drone, respectively. They are the direction of the drone at the current moment and the direction at the next moment respectively.
[0113] Furthermore, action is the means by which the agent interacts with the environment, and is a core part of reinforcement learning. It is crucial to the performance and strategy learning of the system, and directly affects the behavior of the agent in the environment and the acquisition of reward results. The action space can be divided into discrete action space, continuous action space, and mixed action space according to its nature. Different action space modeling will also affect the construction of the subsequent reinforcement learning framework.
[0114] The system in the present invention uses the same action type internally and does not involve mixed actions. After determining the maximum heading angle range of the drone, the set of its action space is also determined, and the values of all actions are within the heading angle range. The design of the action space takes into account the relative heading angle of the drone, and establishes a discrete action space and a continuous action space for it, such as Figure 6 As shown in the figure, the discrete action is to equally discretize the maximum heading angle range of the drone, and finally obtain a finite countable action set, which can reduce the dimension of the action space; the continuous action is to map the maximum heading angle range of the drone to [-1, 1] through the tanh activation function, so that the action space is continuous, and finally obtain an infinite real number action set, which is more complex but more adaptable to the environment.
[0115] S3. Construct a deep learning-based route planning model according to the partially observable Markov decision process model, and use the PPO algorithm to perform gradient optimization on the route planning model.
[0116] Specifically, reinforcement learning requires the intelligent agent to continuously take actions and interact with the environment to gain experience, improve the strategy through learning based on these experiences, and then take actions based on the strategy, repeating the cycle to finally converge to the best strategy. Therefore, the research work of reinforcement learning mainly consists of two parts: the reinforcement learning method framework and the corresponding training method. This part is based on the POMDP mathematical model (partially observable Markov decision process model) that considers various constraints, proposes the approximate expression of the value function and the strategy function, and the intrinsic motivation driven reward function, and constructs a learning framework that adapts to the characteristics of the problem.
[0117] Among them, in the reinforcement learning of partially observable problems, mapping observation information to value function and policy function is the basis for value estimation and policy improvement of the entire reinforcement learning. At the same time, the use of deep network approximate mapping is also an important means to solve the curse of dimensionality. This part mainly consists of two aspects: on the one hand, constructing local observations; on the other hand, building a deep neural network from local observations to value functions and policy functions.
[0118] For ease of expression, the partially observable Markov decision process model can be expressed as a tuple S, A, T, R, Ω, O, γ>, where each element represents a different part of the partially observable Markov decision process model: S is a finite set of states s, which represents all situations that the environment can present; A is a set of action spaces; T is the state transition probability function; R is the immediate reward function; Ω is a set of observation spaces; O is the observation probability function; γ is the discount factor for future rewards.
[0119] Constructing local observations: The sum of the unknown areas where the drone is to perform exploration tasks is the global map. Under this condition, the drone cannot fully observe all the status information. During the exploration process, the drone can obtain the digital elevation information of the environment within the perception range as a local map through various cameras and radars, but the original objective status information will be distorted after passing through the drone sensor. The present invention uses the ray projection method to simulate the fan-shaped field of view obtained by the drone. The state input during network training is the original local map restored by the drone observing the local map. The schematic diagrams of the two are shown as follows: Figure 7 shown.
[0120] Constructing a deep neural network from local observation to value function and policy function: In order to enable the agent to learn the optimal strategy, the present invention intends to adopt an Actor-Critic framework based on strategy and value. Actor-Critic is also translated as actor-critic, which is a reinforcement learning method that combines policy gradient and temporal difference learning, where the actor refers to the policy function π θ (a|s), that is, learning a strategy to get the highest possible reward, determines how the agent takes actions based on the current state; the critic refers to the value function Vπ (s), estimates the value of the current strategy, that is, comments on the actor's performance based on the estimated value in the current state. With the help of the value function, the actor-critic algorithm can perform single-step parameter updates without waiting until the end of the round to update.
[0121] The complex mapping relationship from local observation to value function and strategy function can be fitted by deep neural network, but if only a single local observation map is input, it is difficult for the neural network to fully grasp the movement trend of the drone. Therefore, it is necessary to input 4 frames of continuous 40×40 local observation map images as the current state s. Next, a cascaded three-layer convolutional neural network is used to extract feature information, and then two fully connected layers are used to output actions and values. In order to avoid the drone's heading angle changing too much and affecting the drone's safe flight, the present invention divides the action space A in the discrete state into 21 equal parts, namely a0, a1,..., a 20}, each action of the drone originates from this state space. The structure of the deep neural network is as follows Figure 8 As shown in the figure, the dimensions of the last fully connected layer policy network and value network are not consistent, because the final output of the policy network is one of the 21 actions, while the output of the value network is a single estimated value.
[0122] Further, the route planning model building step includes constructing local observations and a deep neural network from local observations to value functions and policy functions;
[0123] The local observation uses a ray casting method to simulate the fan-shaped field of view obtained by the drone, and the input state during network training is the original local map restored by the drone observing the local map;
[0124] The deep neural network adopts the Actor-Critic framework based on strategy and value, where Actor represents the strategy function π θ (a|s); Critic represents the value function V π (s);
[0125] The complex mapping relationship from local observation to value function and policy function can be fitted through a deep neural network. A cascaded three-layer convolutional neural network is used to extract feature information, and two fully connected layers are used to output actions and values.
[0126] In reinforcement learning, the reward function plays a pivotal role and is the main guide for the learning and decision-making of the agent. The reward function defines the goal of the problem. By giving the agent an immediate reward after taking a certain action at each time step, it guides the agent to find a strategy that can maximize the cumulative reward. In this invention, in order to ensure that the drone can explore as many unknown areas as possible, the first thing is to let the drone learn the autonomous obstacle avoidance strategy to prevent crashes, and construct a reward function. The reward value R is expressed as follows:
[0127]
[0128] Among them, r e Represents the reward. When the drone collides with an obstacle, the reward value is a large negative value of -1000, and the exploration of this round will end directly. This state is called done in reinforcement learning. When the drone is in a normal exploration state, its reward is r e The area of the unknown area newly explored in a single step multiplied by a fixed coefficient. Considering the physical limitations of the drone's endurance, in addition to ending the exploration when it hits an obstacle, it is also set that the exploration will end when the drone's exploration steps per round reach the maximum number of steps.
[0129] Furthermore, the route planning model is optimized using the PPO algorithm.
[0130] Among them, the PPO algorithm is an on-policy algorithm based on the policy gradient optimization method proposed by OpenAI. It can effectively improve the stability of policy optimization and sample utilization efficiency. Due to its relatively simple implementation and good performance, it has become one of the preferred algorithms for many reinforcement learning tasks. The PPO algorithm has two main variants: Proximal Policy Optimization Penalty (PPO-Penalty) and Proximal Policy Optimization Clipping (PPO-Clip). PPO-Clip is better than PPO-Penalty and is the default variant when PPO is mentioned. The present invention intends to use this algorithm to build a reinforcement learning framework. Its overall process is as follows Fig. 9 As shown in the figure, it can be divided into three parts: reinforcement learning environment interaction, Critic network update and Actor network update.
[0131] The environmental interaction part is a classic framework of reinforcement learning. The agent takes actions in the environment according to its own strategy based on the current state. The environment gives the agent immediate rewards and updates the agent to the next state, forming a partially observed Markov decision process. In the present invention, this part is handed over to the Actor with the latest strategy to collect the trajectory of the drone before it is done, and it does not exceed the specified maximum step size. Before entering the network update part, the multiple states collected in each episode need to be packaged into states for the network to perform multiple rounds of training and updates. The update of the Critic network needs to calculate the advantage function based on the target value and the predicted value, and use the minimum mean square error as the loss function to back-propagate and update the network weight parameters. The Actor network requires the new and old networks to output their respective probability distributions for the current state, and then update the network according to the objective function of PPO-Clip.
[0132] Among them, the objective function of PPO-Clip Designed for:
[0133]
[0134] Among them, θ represents the weight parameter of the route planning model, τ represents the exploration of π according to the current strategy θ The trajectory obtained, represents the previous strategy, Indicates state s t Take action a t The advantage function, ρ t represents importance sampling; clip(ρ t (θ),1-ε,1+ε) represents the clipping function, which means that ρ t (θ) is truncated in [1-ε,1+ε], that is, when the function represents the relative change of the new strategy to the old strategy exceeds 1+ε, it outputs 1+ε, and when it is less than 1-ε, it outputs 1-ε; E represents the mathematical expectation, According to the current exploration strategy π θ The mathematical expectation value of the trajectory τ obtained; wherein the weight parameter importance sampling ρ based on the route planning model t (θ) is calculated as follows:
[0135]
[0136] in, represents the old advantage function, π θ (a t |s t ) represents the updated advantage function; when the advantage function value is greater than 0 and is the maximum, it represents the state s t -Action at The best adaptability to the environment; when ρ t When (θ) exceeds 1+ε and is maximum, the value of the updated advantage function is minimum.
[0137] Specifically, the clipping function clip(ρ t (θ),1-ε,1+ε) t (θ) is truncated in [1-ε, 1+ε], that is, when the function represents the relative change of the new strategy to the old strategy exceeds 1+ε, it outputs 1+ε, and when it is less than 1-ε, it outputs 1-ε, so as to ensure the similarity between the new and old strategies. When the advantage function value is greater than 0, it means that the state-action pair is more adaptable in the environment and helps to obtain greater rewards, that is, π θ (a t |s t ) is better, and a larger objective function value can be obtained. t When (θ) exceeds 1+ε, it does not improve the training effect of the model, nor is it conducive to learning the optimal strategy. The same is true in reverse. Finally, the smaller of the truncated objective function and the untruncated objective function is taken as the final objective function. It is this conservative update method that greatly improves the stability and convergence of model training.
[0138] Preferably, the present invention preliminarily constructs an experimental environment, covering three-dimensional unstructured environment generation, drone exploration environment, learning strategy update and other parts, such as Fig.10 shown.
[0139] in, Fig.10 This is an example of a preliminary experimental environment, covering three-dimensional unstructured environment generation, drone exploration environment, learning strategy update, etc. Fig.10 (a) A 3D environment with a top-down perspective generated by Perlin noise is selected as the exploration area. Since the global map is unknown to the drone, a mask is applied to it. The exploration map is updated every time the drone explores a new area. Training After the drone is initialized at the starting point, it randomly selects a heading angle and starts to explore at a constant speed until it is done or the maximum number of steps is reached, stopping the current round of exploration. Fig.10 (b) is the final exploration map. The lines with changing colors in the figure are the exploration trajectories obtained by the drone over time. The positions of the starting point and the end point are also marked with dots. Fig.10 (c) shows the change of the reward curve. As the number of training episodes increases, the total reward value that the drone can obtain in the environment also increases.
[0140] like Fig.11As shown, an embodiment of the present invention further provides a UAV route planning system based on deep reinforcement learning, the system comprising:
[0141] A map construction module 101 is used to construct a three-dimensional unstructured map using gradient-based Perlin noise and a digital elevation map;
[0142] The constraint model building module 102 is used to build a partially observable Markov decision process model for autonomous exploration of UAVs with constraints based on fixed-wing UAVs to constrain the flight path of the fixed-wing UAVs;
[0143] The route planning optimization module 103 is used to construct a deep learning-based route planning model according to the partially observable Markov decision process model, and use the PPO algorithm to perform gradient optimization on the route planning model.
[0144] In summary, the technical solution of the present invention adopts a method based on deep reinforcement learning, which can automatically learn high-level features from the original input data, does not require prior knowledge or accurate environmental models, and does not require artificially designed features. The PPO algorithm suitable for fine control tasks and high-dimensional action spaces is selected to adapt to high-dimensional and complex environments, including continuous actions and state spaces, and is suitable for dealing with nonlinear and unstructured problems. The final model can transfer the experience learned from one task to related tasks, has generalization capabilities, and continuously learns and improves in interaction with the environment to adapt to changing environmental conditions. The trained model is directly deployed on the drone to ensure the real-time decision-making and improve the task efficiency. With respect to the method of binarizing the map area, the present invention retains the elevation information of the three-dimensional map. More comprehensive information can help the network train an intelligent model with a more sound autonomous exploration strategy, thereby improving the adaptability of the drone in different situations.
[0145] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0146] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a division of logical functions. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0147] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0148] Although embodiments of the present invention have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
Claims
1. A UAV route planning method based on deep reinforcement learning, characterized in that: The method comprises: S1. Constructing 3D unstructured maps using gradient-based Perlin noise and digital elevation maps; S2. Construct a partially observable Markov decision process model for autonomous exploration of fixed-wing UAVs with constraints to constrain the flight path of fixed-wing UAVs. S3. Construct a deep learning-based route planning model according to the partially observable Markov decision process model, and use the PPO algorithm to optimize the route planning model.
2. The UAV route planning method based on deep reinforcement learning according to claim 1, characterized in that: The gradient-based Perlin noise first generates a lattice rectangular grid covering the entire image, and randomly initializes a gradient vector at each lattice point, as follows: Assume that a point to be calculated in the lattice is P, and the four lattice points to which the calculation point P belongs are denoted as p0, p1, p2, and p3 respectively, then its gradient vector is<grad0,grad1,grad2,grad3> ; Calculate the offset of point P from the four lattice points<delta0,delta1,delta2,delta3> , and then the dot product of the gradient vector and the distance vector at each lattice point is accumulated to obtain the random noise value of point P. The Perlin calculation formula is as follows: Where f(·) represents a high-order curve function, which is used to improve the smoothness of Perlin noise and is calculated as follows: f(u)=6u 5 -15u 4 +10u 3 Among them, u represents the independent variable of the higher-order curve function; Use a single frequency to generate noise, then calculate by superimposing multiple noises of different frequencies, and use persistence to represent the amplitude of each frequency component. The calculation formula is as follows: frequency=2 k amplitude=persistence k Among them, frequency represents frequency, amplitude represents amplitude, Perlin represents k represents the Perlin noise operation performed with different values of frequency and amplitude at each point, that is, the kth superimposed noise function, N represents the number of multiples, persistence represents persistence, Noise(N) represents Perlin noise at N multiples of frequency, and p represents the point to be calculated.
3. The UAV route planning method based on deep reinforcement learning according to claim 2 is characterized in that: The digital elevation map is constructed as follows: Normalize the random map and map it to [0, 1], as follows: Among them, Y represents the normalized value, X represents the original input value, and X max Indicates the maximum value in the map data set, X min Represents the minimum value in the map data set; The elevation data at each point is recorded using an 8-bit binary integer variable and evenly quantized into 256 levels of elevation values.
4. The method for UAV route planning based on deep reinforcement learning according to claim 3 is characterized in that: The three-dimensional unstructured map is used for three-dimensional simulation interaction, including: Intercept the three-dimensional environment at the same level as the starting point of the drone takeoff to create a Boolean slice map; Set the initial generation radius R init , in the Boolean slice map, the candidate point is taken as the center and the length of the interception is 2R init The square matrix is denoted as A init , and the matrix A of the same dimension unit Perform point multiplication, where A unit The value of the inner element satisfies the following formula: Among them, a and b represent the horizontal and vertical coordinates of the point respectively, and x a,b ,y a,b Respectively represent the horizontal distance and vertical distance between the point and the center candidate point; According to A init ·A unit The maximum value of the result is used to determine whether the candidate point is a feasible initial point; if the maximum value is not greater than 0, it means that the area near the candidate point is relatively empty and suitable as a starting flight point, and it is added to the candidate point queue for subsequent random sampling; otherwise, it means that there are relatively close obstacles near the point and it is not suitable as a starting flight point.
5. The UAV route planning method based on deep reinforcement learning according to claim 1, characterized in that: The partially observable Markov decision process model for autonomous exploration of the UAV includes a flight dynamics constraint model and a UAV action space model.
6. The method for UAV route planning based on deep reinforcement learning according to claim 5, characterized in that: The flight dynamics constraint model is expressed as follows: Assume that the drone is traveling at a fixed speed V UAV Flying, the minimum turning radius R min , which is expressed as follows: Where g represents the acceleration due to gravity, n y Indicates the maximum allowable normal overload factor of the drone; Calculate the maximum heading half angle ψ, expressed as follows: λ=V UAV ×dt Among them, λ represents the motion step length of the UAV, and dt represents the time interval of path planning; Get the next position and direction of the UAV's autonomous exploration plan, as follows: Among them, (x u ,y u )、(x' u ,y' u ) represent the current and next moment positions of the drone, respectively. They represent the direction of the drone at the current moment and the direction at the next moment respectively.
7. The UAV route planning method based on deep reinforcement learning according to claim 5 is characterized in that: The UAV action space model establishes a discrete action space and a continuous action space according to the relative heading angle of the UAV; wherein the discrete action space separates and discretizes the maximum heading angle range of the UAV to obtain a finite countable action set; the continuous action space maps the maximum heading angle range of the UAV to [-1, 1] through a tanh activation function, so that the action space is continuous, and finally an infinite real number action set is obtained.
8. The method for UAV route planning based on deep reinforcement learning according to claim 1, characterized in that: The route planning model building step includes constructing local observations and a deep neural network from local observations to value functions and policy functions; The local observation uses a ray casting method to simulate the fan-shaped field of view obtained by the drone, and the input state during network training is the original local map restored by the drone observing the local map; The deep neural network adopts the Actor-Critic framework based on strategy and value, where Actor represents the strategy function π θ (a|s); Critic represents the value function V π (s); The complex mapping relationship from local observation to value function and policy function can be fitted through a deep neural network. A cascaded three-layer convolutional neural network is used to extract feature information, and two fully connected layers are used to output actions and values. Construct a reward function, and the reward value R is expressed as follows: Among them, r e Indicates reward.
9. The UAV route planning method based on deep reinforcement learning according to claim 8, characterized in that: The route planning model uses the PPO algorithm for gradient optimization, where the objective function of PPO-Clip is Designed for: Among them, θ represents the weight parameter of the route planning model, τ represents the exploration of π according to the current strategy θ The trajectory obtained, represents the previous strategy, Indicates state s t Take action a t The advantage function, ρ t represents importance sampling; clip(ρ t (θ),1-ε,1+ε) represents the clipping function, which means that ρ t (θ) is truncated in [1-ε,1+ε], that is, when the function represents the relative change of the new strategy to the old strategy exceeds 1+ε, it outputs 1+ε, and when it is less than 1-ε, it outputs 1-ε; E represents the mathematical expectation, According to the current exploration strategy π θ The mathematical expectation value of the trajectory τ obtained; wherein the weight parameter importance sampling ρ based on the route planning model t (θ) is calculated as follows: in, represents the old advantage function, π θ (a t |s t ) represents the updated advantage function; when the advantage function value is greater than 0 and is the maximum, it represents the state s t -Action a t The best adaptability to the environment; when ρ t When (θ) exceeds 1+ε and is maximum, the value of the updated advantage function is minimum.
10. The UAV route planning system based on deep reinforcement learning is characterized by: The system comprises: A map construction module for constructing 3D unstructured maps using gradient-based Perlin noise and digital elevation maps; The constraint model building module is used to build a partially observable Markov decision process model for autonomous exploration of fixed-wing UAVs with constraints to constrain the flight path of fixed-wing UAVs. The route planning optimization module is used to build a deep learning-based route planning model according to the partially observable Markov decision process model, and optimize the route planning model using the PPO algorithm.
Citation Information
Patent Citations
Data processing method and device
CN114201569A
Non-cooperative unmanned aerial vehicle track distribution prediction method based on flight state division
CN114740889A
Dynamic obstacle avoidance prediction management method for fixed-wing unmanned aerial vehicle
CN115033027A
Evolution-based multi-objective reinforcement learning vehicle route planning method
CN115907254A
Unmanned aerial vehicle visual obstacle avoidance and autonomous navigation method based on improved PPO
CN117705113A
Cited By
Steel production operation plan generation method and device based on reinforcement learning
CN119477003A
Progressive map prediction method for unknown environment exploration of unmanned aerial vehicle
CN119901276A
Area coverage method for agent multi-scale frontier perception reinforcement learning in unknown environment
CN120802929A
Road line selection design scheme decision-making method based on multi-source fusion
CN121119781A
Unmanned aerial vehicle adaptive motion planning method and device for different environments
CN122083954A
