Unmanned aerial vehicle obstacle avoidance method and system based on flight power distribution, and storage medium

By calculating the flight power allocation method of the UAV during the return and ascent phase, and selecting the optimal flight attitude to avoid obstacles and improve communication quality, the problems of obstacle avoidance and communication quality improvement of the UAV during the return phase are solved, and safe and efficient flight control is achieved.

CN120656344APending Publication Date: 2025-09-16CHANGSHU INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510797851.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

The problem is how the UAV can avoid obstacles and quickly improve communication quality with limited flight power during the return and ascent phase.

Method used

Through the method based on flight power distribution, the effective flight time of the UAV in the vertical or lateral direction is calculated, the optimal solution is selected to adjust the flight attitude, the lateral or vertical flight force is used to avoid obstacles, and the flight power distribution is iteratively optimized using the bisection method to ensure rapid obstacle avoidance.

Benefits of technology

It effectively solves the problem of drones avoiding obstacles and quickly improving communication quality under limited flight power, ensuring the safe flight of drones and improving communication channel gain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120656344A_ABST
    Figure CN120656344A_ABST
Patent Text Reader

Abstract

The invention discloses an unmanned aerial vehicle obstacle avoidance method and system based on flight power distribution and a storage medium, and the method comprises the steps: obtaining the parameter information of an unmanned aerial vehicle when there is an obstacle; calculating effective flight time for obstacle avoidance by vertical or lateral flight power which can be provided by the flight power of the unmanned aerial vehicle, and obtaining an optimal solution; and comparing the forward flight time tx of the unmanned aerial vehicle with the minimum time in the effective flight time, and if tx is large, selecting the stress direction with the minimum obstacle avoidance time as the output direction of the flight power of the unmanned aerial vehicle by the unmanned aerial vehicle. The invention relates to an obstacle avoidance method based on rapid improvement of communication quality, which focuses on a return flight rising stage of an unmanned aerial vehicle, so as to solve the problem of obstacle avoidance and rapid improvement of communication quality of the unmanned aerial vehicle on the premise of limited flight power.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of unmanned aerial vehicle (UAV) flight control, and particularly relates to a UAV obstacle avoidance method, system and storage medium based on flight power distribution. Background Art

[0002] Drone obstacle avoidance technology is a key component of the safe flight of modern drone systems. With the widespread use of drones in aerial photography, agriculture, logistics, and rescue operations, obstacles such as trees, buildings, and power lines pose a serious threat to drone safety. Consequently, drone obstacle avoidance technology has emerged as a crucial component of drone technology development. Drone obstacle avoidance technology primarily relies on sensors, algorithms, and control systems. Sensors acquire information about the surrounding environment, while algorithms analyze and process sensor data to identify obstacles and calculate a safe flight path. Control systems adjust the drone's flight attitude and speed based on the algorithm's output, achieving obstacle avoidance. Drone obstacle avoidance technology has made significant progress and is widely used in various fields. In the future, with continued technological innovation and development, drone obstacle avoidance technology will become even more intelligent and autonomous, providing a stronger guarantee for safe drone flight.

[0003] The drone needs to maintain a certain communication quality during the return and ascent phase. Obstacle avoidance technology that can help the drone avoid obstacles and quickly improve communication quality under the premise of limited flight power is an urgent problem that needs to be solved. Summary of the Invention

[0004] The purpose of the present invention is to provide a drone obstacle avoidance method, system and storage medium based on flight power allocation. The present invention focuses on an obstacle avoidance method based on rapidly improving communication quality during the drone's return and ascent phase, so as to solve the problem of drones avoiding obstacles and rapidly improving communication quality under the premise of limited flight power.

[0005] The technical solutions for achieving the purpose of the present invention are:

[0006] A method for avoiding obstacles in a UAV based on flight power allocation comprises the following steps:

[0007] S01: When there are obstacles, obtain the drone parameter information;

[0008] S02: Calculate the effective flight time for obstacle avoidance in the vertical or lateral direction provided by the UAV’s flight power, and obtain the optimal solution;

[0009] S03: The drone flies forward for a time t x Compare with the minimum time among the effective flight times. If t xWhen the force is large, the UAV selects the force direction with the minimum obstacle avoidance time as the output direction of its flight power.

[0010] In the preferred technical solution, obtaining the UAV parameter information in step S01 includes the mass m of the UAV, the gravitational acceleration g of the current flight area, and the current forward flight speed v of the UAV 0,x and the lateral flight speed v 0,y and the ascending speed v 0,z and the average flight power threshold The distance x of the UAV from the obstacle in the forward direction, the distances z1 and z2 to the upper and lower edges of the obstacle, and the distances y1 and y2 of the UAV from the obstacle in the lateral positive and lateral negative directions.

[0011] In the preferred technical solution, calculating the effective flight time for obstacle avoidance using the flight power that the UAV can provide in the vertical or lateral direction in step S02 includes:

[0012] When the flight output power is upward, if the lateral or vertical flight power provides an upward flight force F to the UAV z the acceleration a given to the UAV z > g, then the time for the UAV to fly out of the obstacle range

[0013] When the flight output power is upward, if a z = g, then the time for the UAV to fly out of the obstacle range

[0014] When the flight output power is upward, if a z < g and then the time for the UAV to fly out of the obstacle range

[0015] When the flight output power is in the lateral positive direction, then the time for the UAV to fly out of the obstacle range a y is the flight force F provided by the flight power to the UAV in the lateral positive direction y the acceleration given to the UAV;

[0016] When the flight output power is downward, if then the time for the UAV to fly out of the obstacle range

[0017] When the flight output power is in the lateral negative direction, if then the time for the UAV to fly out of the obstacle range

[0018] In the preferred technical solution, the UAV selects the force direction with the minimum obstacle avoidance time as the output direction of its flight power, including:

[0019] like Then the flight power p provides the UAV with upward flight momentum, and the UAV flies away from the upper edge of the obstacle;

[0020] like Then the flight power p provides the UAV with upward flight momentum, and the UAV flies away from the upper edge of the obstacle;

[0021] like Then the flight power p provides the UAV with upward flight momentum, and the UAV flies away from the upper edge of the obstacle;

[0022] like Then the flight power p provides the UAV with the lateral positive flight power, and the UAV flies away from the obstacle in the lateral positive direction;

[0023] like Then the flight power p provides the UAV with downward flight power, and the UAV flies away from the bottom edge of the obstacle;

[0024] like Then the flight power p provides the UAV with a lateral negative flight force, and the UAV flies away from the obstacle in the lateral negative direction.

[0025] In the preferred technical solution, step S03 further includes: UAV flight power allocation based on dichotomy method.

[0026] In the preferred technical solution, the UAV flight power allocation method based on dichotomy includes:

[0027] S31: Let the number of iterations n = 1, then the UAV of the nth iteration is allocated to the backward output power of the flight Average flight power

[0028] S32: According to the updated p x (n) and p(n) are calculated to obtain the optimal and Let n = n + 1 and

[0029] S33: If but

[0030] p(n)=p(n-1)+Δ

[0031] p x (n) = p x (n-1)-Δ

[0032] like but

[0033] p(n)=p(n-1)-Δ

[0034] p x (n) = p x (n-1)+Δ

[0035] Repeat S32 and S33 until When the number of iterations ends or the algorithm ends, the direction of the final vertical or lateral output average power p(n) is the set The direction with the minimum time; if the algorithm still cannot satisfy If the flight power is allocated, the UAV will call all the flight power for backward output.

[0036] The present invention also discloses a UAV obstacle avoidance system based on flight power allocation, comprising a processor, wherein the UAV obstacle avoidance method based on flight power allocation is built into the processor.

[0037] The present invention further discloses a UAV, comprising the UAV obstacle avoidance system based on flight power distribution.

[0038] The present invention further discloses a computer storage medium on which a computer program is stored. When the computer program is executed, the above-mentioned unmanned aerial vehicle obstacle avoidance method based on flight power distribution is implemented.

[0039] Compared with the prior art, the present invention has the following significant advantages:

[0040] This invention focuses on obstacle avoidance for scenarios where a UAV's lateral or vertical flight power is insufficient. Using a game-based mechanism, it allocates the average vertical and forward flight power of the UAV to address the problem of a UAV being unable to avoid obstacles when it only has lateral or vertical flight power. This allocation of average flight power provides a unique and efficient solution that physically matches real-world application scenarios and can be effectively applied in real-world engineering applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 Schematic diagram of a scenario of the UAV obstacle avoidance method based on flight power allocation in this embodiment;

[0042] Figure 2 This is a flowchart of the implementation of the drone obstacle avoidance method based on flight power allocation in this embodiment. DETAILED DESCRIPTION

[0043] Example 1:

[0044] A method for avoiding obstacles in a UAV based on flight power allocation comprises the following steps:

[0045] S01: When there are obstacles, obtain the drone parameter information;

[0046] S02: Calculate the effective flight time for obstacle avoidance in the vertical or lateral direction provided by the UAV’s flight power, and obtain the optimal solution;

[0047] S03: The drone flies forward for a time t x Compare with the minimum time among the effective flight times. If t x The UAV selects the force direction with the minimum obstacle avoidance time as the output direction of its flight power.

[0048] like Figure 2 As shown, the specific implementation method is as follows:

[0049] A method for avoiding obstacles during the return-to-home ascent phase of a UAV based on rapidly improving communication quality comprises the following steps:

[0050] Step 1: The drone monitors whether there are obstacles ahead of it. If not, it continues monitoring. If yes, it needs to obtain the drone mass m, the gravity acceleration g in the current flight area, and the current forward flight speed v of the drone. 0,x , lateral flight speed v 0,y , rising speed v 0,z , average flight power threshold The distance x from the drone to the obstacle in the forward direction, the distance z1 and z2 to the upper and lower edges of the obstacle, and the distance y1 and y2 from the drone to the obstacle in the positive and negative lateral directions, proceed to step 2;

[0051] Step 2: Calculate the optimal and And calculate the UAV forward flight time as t x ;

[0052] Step 3, if The algorithm ends, otherwise it goes to step 4;

[0053] Step 4, let n = 1, then

[0054] Step 5: Based on the updated p x (n) and p(n) can be calculated to get the optimal and Let n = n + 1 and like Then p(n)=p(n-1)+Δ and p x (n) = p x (n-1)-Δ; if Then p(n)=p(n-1)-Δ and p x (n) = p x(n-1)+Δ. Repeat step 5 until Either the number of iterations ends or the algorithm ends; if the algorithm ends and still cannot obtain the desired result, The flight power allocation of the UAV is Backward output to delay collision with obstacles.

[0055] Combine Figure 1-2 , further specific analysis and description of the design scheme of the present invention.

[0056] In the network of the present invention, the UAV has an initial upward velocity v in the vertical direction during the return process. 0,z At the same time, the drone also has a forward speed v 0,x and the lateral velocity v 0,y Assume that the UAV detects an obstacle in front of it at a certain point and the distance from the obstacle to the UAV in the forward direction is x, and the distances to the upper and lower edges of the obstacle are z1 and z2 respectively. At the same time, the lateral velocity v 0,y The direction is defined as the positive direction of the lateral direction, so the distances from the drone to the obstacle in the positive and negative directions of the lateral direction are y1 and y2 respectively.

[0057] When a UAV detects an obstacle, it needs to use flight power to change its flight attitude. Its purpose is not only to avoid obstacles and avoid crashing. At the same time, the UAV has a maximum average flight power threshold. To improve the UAV's flight lifecycle. Since the path loss of wireless transmission from the UAV to the control and remote sensing device at the return point depends on both distance-based fading and line-of-sight (LOS) probability-based fading, the presence of obstacles increases the probability of non-line-of-sight (NLoS) transmission, resulting in poor channel gain from the UAV to the control and remote sensing device. Therefore, one of the goals of changing the UAV's flight attitude is to quickly escape obstacles and increase the probability of line-of-sight transmission to improve the quality of wireless communication.

[0058] If a UAV uses flight power to adjust its forward speed (acceleration, deceleration, or even reverse flight), it will only accelerate into obstacles or move backward away from them. The former could cause the aircraft to crash, while the latter would cause a delay in returning home. Therefore, in the present invention, the UAV uses flight power to adjust its lateral or vertical flight speed (acceleration, deceleration, or even reverse flight) to rapidly increase the probability of line-of-sight transmission.

[0059] 1. If the lateral or vertical flight power provides the UAV with upward flight power F z , so F z The acceleration given to the UAV can be expressed as:

[0060]

[0061] Where m is the mass of the UAV, a z direction upwards.

[0062] 1) If a z >g (g is the acceleration of gravity in the area)

[0063] The UAV has an acceleration a z -g and initial velocity v 0,z If the direction is consistent, then the upward flight distance satisfies the following formula:

[0064]

[0065] When z = z1, the time it takes for the UAV to fly upwards away from the upper edge of the obstacle satisfies the following formula:

[0066]

[0067] The above formula is a quadratic equation, which can be solved as follows:

[0068]

[0069] And since t>0, we have:

[0070]

[0071] 2) If a z =g

[0072] Since the acceleration of UAV is 0, the UAV follows the initial velocity v 0,z Fly upward at a constant speed, and the flight distance satisfies the following formula:

[0073] z=v 0,z t

[0074] When z = z1, the time it takes for the UAV to fly upwards and away from the upper edge of the obstacle can be obtained as:

[0075]

[0076] 3) If a z <g

[0077] The UAV has an acceleration a z -g and initial velocity v 0,z The direction is opposite, so its flight displacement satisfies the following formula:

[0078]

[0079] a) If z=z1>0, and the root-finding formula yields:

[0080]

[0081] When Δ < 0, that is, when the equation has no roots, indicating that the UAV cannot reach the upper edge of the obstacle upward under this condition.

[0082] When Δ ≥ 0, that is, when the equation has roots, indicating that the UAV can reach the upper edge of the obstacle upward under this condition, and the flight time used is:

[0083]

[0084] and

[0085]

[0086] where t 1,3 is the time for the UAV to fall back to the upper edge after passing through the upper edge of the obstacle; t 1,4 is the time used by the UAV after first passing through the upper edge of the obstacle.

[0087] b) If z = -z2 < 0, and from the quadratic formula, we can get

[0088]

[0089] the solutions are:

[0090]

[0091] Also, since t > 0, then:

[0092]

[0093] where the required t 1,5 is the time for the UAV to reach a distance of z2 below.

[0094] Based on the above results, when a z < g, the UAV can only first decelerate and move upward. If it can reach the upper edge of the obstacle after t 1,4 , then it will fly downward after its speed drops to 0. Then, after t 1,3 it will pass through the upper edge of the obstacle again, and finally pass through the lower edge of the obstacle after t 1,5 . However, t 1,3 and t 1,5 do not meet the UAV obstacle avoidance requirements. This is because t [[ID=6�]] 1,3 is the movement time for the UAV to pass through the upper edge of the obstacle for the second time, while t 1,5 is the flight power that provides the upward flight force F zThe smaller the time it takes for the UAV to pass through the lower edge of the obstacle, this situation is obviously contrary to the principle of efficient use of the UAV's flight power, because F z If it is downward, it can provide faster obstacle avoidance speed.

[0095] 2. If the flight power provides the UAV with lateral and positive flight force F y , so F y The acceleration given to the UAV can be expressed as:

[0096]

[0097] Among them, a y The direction is lateral positive.

[0098] The UAV is subject to lateral acceleration a y and initial velocity v 0,y If the direction is consistent, then the lateral and positive flight distance satisfies the following formula:

[0099]

[0100] When y = y1, the time it takes for the UAV to fly sideways and forward away from the obstacle satisfies the following formula:

[0101]

[0102] The above formula is a quadratic equation, which can be solved as follows:

[0103]

[0104] And since t>0, we have:

[0105]

[0106] 3. If the flight power provides the UAV with downward flight force F z , so F z The acceleration given to the UAV can be expressed as:

[0107]

[0108] Among them, a z direction downward.

[0109] The UAV has an acceleration a z +g and initial velocity v 0,z The direction is opposite, so it can be seen that its upward flight displacement satisfies the following formula:

[0110]

[0111] 1) When z = z1, the time it takes for the UAV to fly upwards away from the upper edge of the obstacle satisfies the following formula:

[0112]

[0113] in,

[0114] When Δ≥0, that is, when When , the equation has a root, indicating that the UAV can reach the upper edge of the obstacle under this condition, and the flight time is:

[0115]

[0116] and

[0117]

[0118] Among them, t 3,1 The time it takes for the UAV to fall back to the upper edge after passing through the upper edge of the obstacle; t 3,2 The time it takes for the UAV to pass through the upper edge of the obstacle for the first time.

[0119] When Δ<0, that is, when When , the equation has no roots, indicating that the UAV cannot reach the upper edge of the obstacle under this condition. The UAV can only pass through the lower edge of the obstacle downward.

[0120] 2) If z = -z2 < 0, the time it takes for the UAV to fly downward away from the lower edge of the obstacle can be obtained to satisfy the following formula:

[0121]

[0122] The solution is:

[0123]

[0124] And since t>0, we have:

[0125]

[0126] Among them, the required t 3,3 The time it takes for the UAV to reach the bottom edge of the obstacle.

[0127] Based on the above results, we can know that t 3,1 The UAV obstacle avoidance requirements are not met because t 3,1 The time it takes for the UAV to pass through the upper edge of the obstacle and then fall back to the upper edge. 3,2 It also does not meet the UAV's requirement for rapid obstacle avoidance, because F z If you move upwards at this time, you can provide faster obstacle avoidance speed.

[0128] 4. If the flight power provides the UAV with a negative lateral flight force F y , so F y The acceleration given to the UAV can be expressed as:

[0129]

[0130] Among them, a y The direction is negative sideways.

[0131] The UAV has an acceleration a y and initial velocity v 0,y The direction is opposite, so it can be seen that the lateral positive flight displacement satisfies the following formula:

[0132]

[0133] 1) When y = y1, the time it takes for the UAV to fly sideways and forward away from the obstacle satisfies the following formula:

[0134]

[0135] in,

[0136] When Δ≥0, that is, when When , the equation has roots, indicating that the UAV can reach the edge of the obstacle in the sideways and forward directions under this condition, and the flight time used is:

[0137]

[0138] and

[0139]

[0140] Among them, t 4,1 The time it takes for the UAV to fall back into the obstacle range after passing the lateral positive edge; t 4,2 The time it takes for the UAV to first cross the lateral positive edge of the obstacle.

[0141] When Δ<0, that is, when When , the equation has no roots, indicating that the UAV cannot reach the edge of the obstacle in the positive lateral direction under this condition. The UAV can only pass through the edge of the obstacle in the negative lateral direction.

[0142] 2) If y = -y2 < 0, the time it takes for the UAV to fly downward away from the lower edge of the obstacle can be obtained to satisfy the following formula:

[0143]

[0144] The solution is:

[0145]

[0146] And since t>0, we have:

[0147]

[0148] Among them, the required t 4,3 The time it takes for the UAV to reach the lateral negative edge of the obstacle.

[0149] Based on the above results, we can know that t 4,1 The UAV obstacle avoidance requirements are not met because t 4,1 The time it takes for the UAV to fall back into the obstacle range after passing the lateral positive edge. 4,2 It also does not meet the UAV's requirement for rapid obstacle avoidance, because F y If it moves sideways at this time, it can provide a faster obstacle avoidance speed.

[0150] In summary, the effective flight time of the UAV for obstacle avoidance based on the vertical or lateral flight power provided by its flight power is t 1,1 , t 1,2 , t 1,4 , t2, t 3,3 and t 4,3 .

[0151] Since the average flight power of the UAV p = mav, where a is the acceleration and v is the average speed of the UAV, in order to quickly improve the communication quality, that is, to pass through the obstacle in a shorter time, the average flight power used by the UAV during the entire obstacle avoidance period should be equal to the threshold value of the UAV average flight power, that is, Based on the above analysis, t 1,1 , t 1,2 , t 1,4 , t2, t 3,3 and t 4,3 The optimal solution can be obtained through the following steps.

[0152] 1. Targeting t 1,1 , the average flight power used by the UAV in the vertical upward flight direction is:

[0153]

[0154] Among them, m, z1, g, v 0,z and are known parameters.

[0155] The optimal acceleration can be obtained by solving the above equations

[0156] like Then t 1,1The optimal solution is:

[0157]

[0158] Otherwise, t 1,1 There is no solution.

[0159] 2. Targeting t 1,2 ,have:

[0160] ma z v 0,z =p

[0161] Therefore, we have:

[0162]

[0163] like Then t 1,2 The optimal solution is:

[0164]

[0165] Otherwise, t 1,2 There is no solution.

[0166] 3. Targeting t 1,4 ,have:

[0167]

[0168] The optimal acceleration can be obtained by solving the above equations

[0169] like Then t 1,4 The optimal solution is:

[0170]

[0171] Otherwise, t 1,4 There is no solution.

[0172] 4. For t2, there are:

[0173]

[0174] The optimal acceleration can be obtained by solving the above equations

[0175] Then the optimal solution of t2 is:

[0176]

[0177] 5. Targeting t 3,3 ,have:

[0178]

[0179] The optimal acceleration can be obtained by solving the above equations

[0180] like Then t 3,3 The optimal solution is:

[0181]

[0182] Otherwise, t 3,3 There is no solution.

[0183] 6. Targeting t 4,3 ,have:

[0184]

[0185] The optimal acceleration can be obtained by solving the above equations

[0186] like Then t 4,3 The optimal solution is:

[0187]

[0188] Otherwise, t 4,3 There is no solution.

[0189] Finally, the forward flight time of the UAV is calculated as:

[0190]

[0191] like The UAV selects the force direction with the minimum obstacle avoidance time as the output direction of its flight power, so as to obtain the minimum obstacle avoidance time and thus achieve the purpose of quickly improving the channel gain.

[0192] like This means that even if the UAV outputs its full flight power in the lateral or vertical direction, it will not be able to fly out of the range of the obstacle before the UAV collides with the obstacle in its forward flight. x , then:

[0193]

[0194] Among them, a x is the reverse acceleration of the UAV.

[0195] And because:

[0196]

[0197] So, when When you get:

[0198]

[0199] because is the time to return to x, so the time when the UAV flies forward and hits the obstacle is:

[0200]

[0201] have:

[0202]

[0203] Therefore, if p x If it is known, we can find And when When , we can finally get

[0204] Ruodang hour, There is no solution, which means that the UAV cannot hit the obstacle, i.e.

[0205] Based on the above analysis, the present invention is aimed at In this paper, a UAV flight power allocation method based on dichotomy is proposed:

[0206] 1. Let n = 1, then

[0207] 2. According to the updated p x (n) and p(n) can be calculated to get the optimal and Let n = n + 1 and

[0208] 3. If but

[0209] p(n)=p(n-1)+Δ

[0210] p x (n) = p x (n-1)-Δ

[0211] like but

[0212] p(n)=p(n-1)-Δ

[0213] p x (n) = p x (n-1)+Δ

[0214] Repeat steps 2 and 3 until Either the number of iterations ends or the algorithm ends, and the direction of the final vertical or lateral output average power p(n) is the set The direction with the minimum time; if the algorithm still cannot satisfy If the flight power is allocated to the target, the UAV will use all the flight power to output backward to delay the collision with the obstacle.

[0215] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be considered as equivalent replacement methods and are included in the scope of protection of the present invention.

Claims

1. A method for avoiding obstacles in a UAV based on flight power allocation, characterized in that: The following steps are involved: S01: When there are obstacles, obtain the drone parameter information; S02: Calculate the effective flight time for obstacle avoidance in the vertical or lateral direction provided by the UAV’s flight power, and obtain the optimal solution; S03: The drone flies forward for a time t x Compare with the minimum time among the effective flight times. If t x The UAV selects the force direction with the shortest obstacle avoidance time as the output direction of its flight power.

2. The UAV obstacle avoidance method based on flight power allocation according to claim 1, characterized in that: The drone parameter information obtained in step S01 includes the drone mass m, the gravity acceleration g of the current flight area, the drone's current forward flight speed v 0,x , lateral flight speed v 0,y , rising speed v 0,z , average flight power threshold The distance x from the drone to the obstacle in the forward direction, the distance z1 and z2 to the upper and lower edges of the obstacle, and the distance y1 and y2 from the drone to the obstacle in the positive and negative lateral directions.

3. The UAV obstacle avoidance method based on flight power allocation according to claim 2, characterized in that: Step S02 calculates the effective flight time for obstacle avoidance using vertical or lateral flight power provided by the UAV flight power, including: When the flight output power provides the upward flight power of the UAV, and the lateral or vertical flight power provides the upward flight power of the UAV, F z Give the drone an acceleration a z >g, the time it takes for the drone to fly away from the obstacle range When the flight output power provides the UAV with upward flight power, if a z =g, then the time it takes for the drone to fly away from the obstacle range When the flight output power provides upward flight power to the drone, if a z < g and then the time for the drone to fly out of the obstacle range When the flight output power provides the UAV with lateral and positive flight power, the time it takes for the UAV to fly away from the obstacle range is a y The flight power provides the UAV with lateral and positive flight power F y The acceleration given to the drone; When the flight output power provides downward flight power to the drone, if The time it takes for the drone to leave the obstacle range is When the flight output power provides the UAV with lateral negative flight power, if The time it takes for the drone to leave the obstacle range is 4. The UAV obstacle avoidance method based on flight power allocation according to claim 3, characterized in that: The calculation method of the optimal solution in step S02 includes: Targeting t 1,1 , the average flight power used by a UAV flying vertically upward is: Among them, the average flight power The optimal acceleration is obtained by solving the above equations like Then t 1,1 The optimal solution is: Otherwise, t 1,1 There is no solution; Targeting t 1,2 ,have: me z in 0,z =p Therefore, we have: like Then t 1,2 The optimal solution is: Otherwise, t 1,2 There is no solution; Targeting t 1,4 ,have: The optimal acceleration is obtained by solving the above equations like and Then t 1,4 The optimal solution is: Otherwise, t 1,4 There is no solution; For t2, we have: The optimal acceleration is obtained by solving the above equations Then the optimal solution of t2 is: Targeting t 3,3 ,have: The optimal acceleration is obtained by solving the above equations like Then t 3,3 The optimal solution is: Otherwise, t 3,3 There is no solution; Targeting t 4,3 ,have: The optimal acceleration is obtained by solving the above equations like Then t 4,3 The optimal solution is: Otherwise, t 4,3 There is no solution.

5. The UAV obstacle avoidance method based on flight power allocation according to claim 4, characterized in that: The UAV selects the force direction with the shortest obstacle avoidance time as the output direction of its flight power, including: like Then the flight power p provides the UAV with upward flight power, and the UAV flies away from the upper edge of the obstacle; like Then the flight power p provides the UAV with upward flight power, and the UAV flies away from the upper edge of the obstacle; like Then the flight power p provides the UAV with upward flight power, and the UAV flies away from the upper edge of the obstacle; like Then the flight power p provides the UAV with the lateral and positive flight power, and the UAV flies away from the obstacle in the lateral and positive direction; like Then the flight power p provides the UAV with downward flight power, and the UAV flies away from the bottom edge of the obstacle; like Then the flight power p provides the UAV with lateral negative flight power, and the UAV flies away from the obstacle in the lateral negative direction.

6. The method for avoiding obstacles of a UAV based on flight power allocation according to claim 4, characterized in that: Step S03 also includes, if UAV flight power allocation based on dichotomy method.

7. The method for avoiding obstacles in a UAV based on flight power allocation according to claim 6, characterized in that: The UAV flight power allocation method based on dichotomy includes: S31: Let the number of iterations n = 1, then the UAV of the nth iteration is assigned to the backward output power of the flight Average flight power S32: According to the updated p x (n) and p(n) are calculated to obtain the optimal and Let n = n + 1 and S33: If but p(n)=p(n-1)+Δ p x (n)=p x (n-1)-D like but p(n)=p(n-1)-Δ p x (n)=p x (n-1)+D Repeat S32 and S33 until When the number of iterations ends or the algorithm ends, the direction of the final vertical or lateral output average power p(n) is the set The direction with the minimum time; if the algorithm still cannot satisfy If the flight power is allocated, the UAV will call all the flight power for backward output.

8. A UAV obstacle avoidance system based on flight power distribution, characterized in that: The invention comprises a processor having a built-in UAV obstacle avoidance method based on flight power allocation according to any one of claims 1 to 7.

9. A drone, characterized in that: Including the UAV obstacle avoidance system based on flight power distribution as described in claim 8.

10. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the drone obstacle avoidance method based on flight power allocation according to any one of claims 1 to 7 is implemented.