Improved near-end strategy optimization method for hybrid unmanned aerial vehicle controller

Through the improved proximal policy optimization method and attention mechanism, combined with the reinforcement learning model, the problem of unstable hybrid drone controller training is solved, and stable flight and longer distance flight at a specific height and direction are achieved. Simplifies the design process.

CN118567392APending Publication Date: 2024-08-30NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410536255.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-30
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

The existing hybrid UAV controller has unstable effects during training, resulting in unstable flight distance, and the design process is cumbersome, requiring redesign of the structure and parameters.

Method used

An improved proximal policy optimization method is adopted, combined with the reinforcement learning model and attention mechanism, and through the improved reward function and neural network structure, the attention weight of the angular velocity parameter is increased, and the complex action space learning ability of the model is enhanced.

Benefits of technology

It achieves stable flight of the hybrid UAV at a specific height and direction, improves flight distance and stability, and reduces design complexity and training time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567392A
    Figure CN118567392A
Patent Text Reader

Abstract

The invention discloses an improved near-end strategy optimization method of a hybrid unmanned aerial vehicle controller, and the method comprises the steps: inputting the related information of an unmanned aerial vehicle into a current reinforcement learning model near-end strategy optimization algorithm network, and obtaining a hybrid unmanned aerial vehicle execution action and a simulation result of the hybrid unmanned aerial vehicle execution action and environment interaction in a current state; based on the simulation result, utilizing the improved reward function to determine the reward or punishment of the action executed by the hybrid unmanned aerial vehicle; and based on the improved model introducing the attention mechanism and the award or punishment of the action executed by the hybrid unmanned aerial vehicle, the attention weight allocated to the angular velocity parameter is improved, and the hybrid unmanned aerial vehicle executes the action to complete the flight task. According to the method, an attention mechanism is integrated, a two-layer network structure of a PPO algorithm is increased to four layers, a reward function in the algorithm is improved, and the flight height and direction are written into a reward function, so that the hybrid unmanned aerial vehicle smoothly flies forwards according to a certain height direction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an improved proximal strategy optimization method for a hybrid unmanned aerial vehicle controller, and belongs to the technical field of artificial intelligence reinforcement learning algorithms. Background Art

[0002] With the continuous development of drone technology, hybrid drone systems have attracted much attention as an innovative solution that integrates multiple flight technologies. Traditional fixed-wing drones have the advantages of long endurance and long-distance flight, while rotary-wing drones have the advantages of vertical take-off and landing and hovering. But apart from that, they all have their own shortcomings. The flight ability of fixed-wing aircraft in a narrow environment will be greatly limited, and the endurance of multi-rotor drones is generally poor. Therefore, the emergence of hybrid drones fills some gaps in traditional drones. It combines the advantages of fixed-wing drones and rotary-wing drones. On the basis of being able to take off and land vertically and fly long distances, it can also perform flight missions in a small space. Because fixed-wing drones and rotary-wing drones are diverse, the design schemes of hybrid drones based on the two are also diverse.

[0003] The most difficult part of designing a hybrid drone is that the aerodynamics of a hybrid drone will change dramatically during its flight. In the past, researchers mostly designed drones manually, but because hybrid drones of different forms are very different, when creating a new hybrid drone, researchers often need to redesign the structure and various parameters of the drone, which makes the workload of researchers huge and makes the exploration of hybrid drones very slow. MIT has proposed a controller for automatically designing custom hybrid drones, making it easier to design and implement hybrid drones. However, in the training implementation, the effect is not perfect. Although it can quickly reach a certain reward level, its reward is not stable, which leads to the instability of the flight distance. Summary of the invention

[0004] The technical problem to be solved by the present invention is to overcome the defects of the prior art and provide an improved proximal strategy optimization method for a hybrid UAV controller.

[0005] Preferably, the present invention provides an improved proximal strategy optimization method for a hybrid UAV controller, comprising: inputting relevant information of the UAV into the proximal strategy optimization algorithm network of the current reinforcement learning model, obtaining the hybrid UAV execution action output by the proximal strategy optimization algorithm network of the current reinforcement learning model, and the simulation results of the hybrid UAV execution action and the interaction with the environment in the current state; based on the simulation results of the hybrid UAV action and the interaction with the environment in the current state, using an improved reward function to determine the reward or penalty for the hybrid UAV execution action; based on the reward or penalty for the hybrid UAV execution action, introducing the relevant information input of the UAV into the improved model of the attention mechanism, increasing the attention weight assigned to the angular velocity parameters, and the hybrid UAV completing the flight mission.

[0006] Preferably, the hybrid UAV action execution is determined by a probability distribution of the hybrid UAV action executions.

[0007] Firstly, the improved reward function is:

[0008] R(s,a)=dw v cv(s)-w a ca(a)-w ω cω(s)-w ψ cψ(s)-w h ch(s),

[0009] Where d represents a constant live reward; cv represents speed error, ca represents efficiency error, cω represents flight stability, cψ represents flight direction, ch represents flight altitude, and w represents flight speed. v Represents the weight value of cv, w a represents the weight value of ca, w ω represents the weight value of cω, w ψ represents the weight value of cψ, w h Represents the weight value of ch.

[0010] Prioritized, the relevant information for drones is:

[0011] s=(φ,θ,ω,β,γ,Du,Dv,Dw,Dψ)T,

[0012] Wherein, φ represents the roll angle, θ represents the pitch angle, ω represents the angular velocity in the X direction, β represents the angular velocity in the Y direction, γ represents the angular velocity in the Z direction, Du represents the yaw error of the velocity in the x-axis direction, Dv represents the yaw error of the velocity in the y-axis direction, Dw represents the yaw error in the z-axis direction, and Dψ represents the error of the yaw angle.

[0013] Preferably, the attention weight of the angular velocity parameter is calculated as:

[0014]

[0015] In the formula, e i represents the relevant score, and ai represents the probability of selecting the i-th option in the multinomial distribution.

[0016] 6. The improved proximal strategy optimization method for a hybrid UAV controller according to claim 5 is characterized in that:

[0017] Correlation score i The calculation formula is as follows:

[0018] e i =q T h i +b i ,

[0019] Where bi represents the bias term and vector q represents the query vector.

[0020] Preferably, the improved model introducing the attention mechanism includes an input layer, a first neural network hidden layer, a second neural network hidden layer, a third neural network hidden layer, a fourth neural network hidden layer and an output layer connected in sequence, and the first neural network hidden layer, the second neural network hidden layer, the third neural network hidden layer, and the fourth neural network hidden layer include 64 speed units for generating control signals for the rotors of the hybrid drone.

[0021] Preferably, the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods described in the first aspect when executing the program.

[0022] Preferably, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the methods described in the first aspect.

[0023] The beneficial effects achieved by the present invention are:

[0024] The present invention proposes an improved proximal policy optimization (PPO) algorithm, which integrates the attention mechanism and increases the two-layer network structure of the PPO algorithm to four layers. The reward function in the algorithm is improved and the flight height and direction are written into the reward function so that the hybrid UAV can fly forward smoothly at a certain height and direction.

[0025] Increasing the depth and width of the neural network may make the model more capable of learning complex strategies, especially in the face of high-dimensional state space or complex action space. Deeper networks can learn more abstract and complex feature representations, while wider networks can provide more nonlinear transformation capabilities.

[0026] For the flight of hybrid drones, speed change is the most important of all parameters. The speed variable will have a certain degree of influence on other variables. The change of speed will directly lead to an increase in action cost, change in flight direction, and affect the stability of flight. For the input parameters in the controller of the present invention, the speed is mainly controlled by the angular velocity. Therefore, the present invention introduces an attention mechanism to emphasize the importance of the angular velocity component by increasing the attention weight assigned to the angular velocity parameter. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0028] Figure 1 is a principle block diagram of some embodiments of the present application; DETAILED DESCRIPTION

[0029] To facilitate the technical solution of the application, some concepts involved in the application are first explained below.

[0030] Because hybrid drones were previously designed manually, and because hybrid drones of different forms are very different, when creating a new hybrid drone, researchers often need to redesign the structure and various parameters of the drone, which makes the workload of researchers huge and the exploration of hybrid drones very slow. Although the controller proposed by MIT can automatically design customized hybrid drones, making the design and implementation of hybrid drones easier, its effect is not perfect. Through reinforcement learning training, it was found that its rewards are not stable, which will also lead to flight instability, thereby affecting the flight distance of the hybrid drone. Therefore, the present invention improves the algorithm involved in the controller to solve the problem of instability of hybrid drones during training.

[0031] See also Figure 1, the present application discloses an improved proximal policy optimization algorithm designed for a hybrid UAV controller, comprising the following steps: S1, based on the relevant information of the UAV, obtain the hybrid UAV execution action action output by the current reinforcement learning model proximal policy optimization (PPO) algorithm network, and obtain the simulation result of the hybrid UAV execution action and the interaction with the environment in the current state; S2, analyze the simulation results; the simulation results can be viewed through a visualization method, and after interacting with the environment, the hybrid UAV execution action will be judged by a reward function, and those that meet the reward requirements will be rewarded, otherwise they will be punished. The main idea of ​​using the reinforcement learning method is to enable the intelligent agent to obtain a larger reward. The current reward setting can only enable the hybrid UAV to maintain its ability to fly, but cannot complete more complex tasks. At the same time, it was found that the reward obtained from the training was unstable and could not stabilize near the extreme value after a certain number of training times; S3. The reward function will be improved by adding factors such as direction and altitude to the reward items, so that the hybrid drone can fly in a certain direction and altitude; S4. By setting the reward function, the model is retrained using the relevant information of the drone. By analyzing the obtained visualization results, the hybrid drone can move at a certain height and direction to a certain extent, but the effect is not good; S5. The attention mechanism is introduced into the input data of the neural network in the above-mentioned reinforcement learning proximal strategy optimization algorithm model, and the importance of the angular velocity component is emphasized by increasing the attention weight assigned to the angular velocity parameter, so that the model has better stability. S6. Based on the above changes, in order to improve the model's learning ability for complex action space situations, the number of neural network layers is increased. The current modified model is trained again to complete the flight mission. The present invention proposes an improved proximal policy optimization (PPO) algorithm, which integrates the attention mechanism and increases the two-layer network structure of the PPO algorithm to four layers. The reward function in the algorithm is improved and the flight height and direction are written into the reward function so that the hybrid UAV can fly forward smoothly at a certain height and direction.

[0032] Increasing the depth and width of the neural network may make the model more capable of learning complex strategies, especially in the face of high-dimensional state space or complex action space. Deeper networks can learn more abstract and complex feature representations, while wider networks can provide more nonlinear transformation capabilities.

[0033] For the flight of hybrid drones, speed change is the most important of all parameters. The speed variable will have a certain degree of influence on other variables. The change of speed will directly lead to an increase in action cost, change in flight direction, and affect the stability of flight. For the input parameters in the controller of the present invention, the speed is mainly controlled by the angular velocity. Therefore, the present invention introduces an attention mechanism to emphasize the importance of the angular velocity component by increasing the attention weight assigned to the angular velocity parameter.

[0034] In step 1, the selection of the action is determined by the probability distribution of the action execution. The improved reward function enables the hybrid drone to have the ability to perform specific tasks.

[0035] In step 3, the reward function is as follows:

[0036] R(s,a)=d-wvcv(s)-waca(a)-wωcω(s)-wψcψ(s)-whch(s),

[0037] Where d is the constant active reward; cv is the speed error, ca is the efficiency error, cω is the flight stability, cψ is the flight direction, ch is the flight altitude, and w is the flight direction. v is the weight value of cv, w a is the weight value of ca, w ω is the weight value of cω, w ψ is the weight value of cψ, w h is the weight value of ch. By setting the above reward function, the hybrid drone can have the ability to maintain flight in a specific direction and altitude.

[0038] In step 4, the model is trained, and the effect of modifying the reward function can be viewed through visualization methods to see whether the hybrid drone has the corresponding flight capability.

[0039] In step 5, an attention mechanism is introduced to the input data of the neural network to emphasize the importance of the angular velocity component by increasing the attention weight assigned to the angular velocity parameter; the input data of the neural network before and after the improvement are as follows:

[0040] s=(φ,θ,ω,β,γ,Du,Dv,Dw,Dψ)T

[0041] Where φ represents the roll angle, θ represents the pitch angle, ω represents the angular velocity in the X direction, β represents the angular velocity in the Y direction, and γ represents the angular velocity in the Z direction. The four parameters D represent the velocity and yaw error.

[0042] The attention mechanism is introduced into the input data of the neural network, and the nine input parameters are designated as h1, h2, h3, ..., h9.

[0043] The attention weight calculation formula is as follows:

[0044]

[0045] In the formula, e i represents the relevant score, and ai represents the probability of selecting the i-th option in the multinomial distribution.

[0046] For the correlation score e i The calculation formula is as follows:

[0047] e i =q T h i +b i

[0048] Where bi is a bias term used to adjust the model's initial attention to various parameters, and vector q is used as a query vector. By simply designing the values ​​in the q vector, we can assign greater weights to the three parameters related to angular velocity, ensuring that they are highly focused during the attention weight calculation process.

[0049] In step 6, in order to improve the model's learning ability for complex action space situations, two additional neural network hidden layers are added on the basis of the original two-layer neural network structure. The neural network has an input layer and an output layer, with four hidden layers in the middle. Each hidden layer contains 64 speed units, and the final output is a control signal generated by the n rotors of the hybrid drone. Finally, the improved model is trained, and the rewards obtained by the improved model are compared with the rewards obtained by the original model to verify the effectiveness of the present invention.

[0050] In terms of stability, the improved model tends to be stable in the later stages of training, fluctuating around a fixed value. However, the original model is very unstable during training and continues to decline, which will lead to a significant increase in training time and fail to achieve the ideal performance level.

[0051] At the extreme value, although the original model can reach a larger value relatively quickly, it is difficult to explore the maximum reward value due to its instability, so the flight distance of the hybrid drone is also difficult to reach the maximum value. The improved model of the present invention can explore the maximum value while maintaining stability, so that the flight distance can reach the set maximum distance.

[0052] In an embodiment of the present application, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above methods when executing the program.

[0053] In an embodiment of the present application, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0054] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0055] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention invented herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not invented by the present invention. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.

[0056] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above are only specific implementation methods of the present application and are not used to limit the protection scope of the present application. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present application should be included in the protection scope of the present application.

Claims

1. An improved proximal strategy optimization method for a hybrid UAV controller, characterized in that: include: Input relevant information of the UAV into the current reinforcement learning model proximal policy optimization algorithm network, obtain the hybrid UAV execution action output by the current reinforcement learning model proximal policy optimization algorithm network, and the simulation result of the hybrid UAV execution action and the interaction with the environment in the current state; Based on the simulation results of the interaction between the hybrid UAV action and the environment in the current state, the reward or penalty of the hybrid UAV's action is determined using the improved reward function; Based on the reward or punishment of the hybrid UAV's actions, the relevant information input of the UAV is introduced into the improved model of the attention mechanism, which increases the attention weight assigned to the angular velocity parameters and enables the hybrid UAV to complete the flight mission.

2. The improved proximal strategy optimization method for a hybrid UAV controller according to claim 1 is characterized in that: The actions performed by the hybrid UAV are determined by the probability distribution of the actions performed by the hybrid UAV.

3. The improved proximal strategy optimization method for a hybrid UAV controller according to claim 1 is characterized in that: The improved reward function is: R(s,a)=d-w v cv(s)-w a ca(a)-w ω cω(s)-w ψ cψ(s)-w h ch(s), Where d represents a constant live reward; cv represents speed error, ca represents efficiency error, cω represents flight stability, cψ represents flight direction, ch represents flight altitude, and w represents flight speed. v Represents the weight value of cv, w a represents the weight value of ca, w ω represents the weight value of cω, w ψ represents the weight value of cψ, w h Represents the weight value of ch.

4. The improved proximal strategy optimization method for a hybrid UAV controller according to claim 1 is characterized in that The relevant information about the drone is: s=(φ,θ,ω,β,γ,Du,Dv,Dw,Dψ)T, Wherein, φ represents the roll angle, θ represents the pitch angle, ω represents the angular velocity in the X direction, β represents the angular velocity in the Y direction, γ represents the angular velocity in the Z direction, Du represents the yaw error of the velocity in the x-axis direction, Dv represents the yaw error of the velocity in the y-axis direction, Dw represents the yaw error in the z-axis direction, and Dψ represents the error of the yaw angle.

5. The improved proximal strategy optimization method for a hybrid UAV controller according to claim 1 is characterized in that: The calculation formula of the attention weight of the angular velocity parameter is: In the formula, e i represents the relevant score, and ai represents the probability of selecting the i-th option in the multinomial distribution.

6. The improved proximal strategy optimization method for a hybrid UAV controller according to claim 5, characterized in that: Correlation score i The calculation formula is as follows: e i =q T h i +b i , Where b i represents the bias term, and vector q represents the query vector.

7. The improved proximal strategy optimization method for a hybrid UAV controller according to claim 1, characterized in that: The improved model introducing the attention mechanism includes an input layer, a first neural network hidden layer, a second neural network hidden layer, a third neural network hidden layer, a fourth neural network hidden layer and an output layer connected in sequence. The first neural network hidden layer, the second neural network hidden layer, the third neural network hidden layer and the fourth neural network hidden layer include 64 speed units for generating control signals for the rotors of the hybrid UAV.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 7 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Unmanned aerial vehicle visual obstacle avoidance and autonomous navigation method based on improved PPO

    CN121477964A

  • Improved unmanned aerial vehicle vision obstacle avoidance and autonomous navigation method

    CN121477964B