Power distribution method and system for unmanned aerial vehicle obstacle avoidance based on penalty function

By adopting a power allocation method based on the penalty function in the drone, the hole of the minimum penalty function is selected to avoid obstacles, which solves the problem of obstacle avoidance selection in complex obstacle scenarios, improving safety and reducing energy consumption.

CN120178871APending Publication Date: 2025-06-20CHANGSHU INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510262205.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

When drones face complex obstacle scenarios, it is difficult to effectively select appropriate holes to avoid obstacles, resulting in reduced flight safety and increased energy consumption.

Method used

Using a power allocation method based on the penalty function, by calculating the obstacle avoidance penalty function for each void, the hole with the minimum penalty function is selected for obstacle avoidance operation, thereby adjusting the flight power to improve safety and reduce energy consumption.

Benefits of technology

Improves the obstacle avoidance safety of drones in complex obstacle scenarios and reduces energy consumption, providing an efficient solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120178871A_ABST
    Figure CN120178871A_ABST
Patent Text Reader

Abstract

The invention discloses an unmanned aerial vehicle (UAV) obstacle avoidance power distribution method and system based on a penalty function, and the method comprises the steps: detecting a hole which is formed in the surface of an obstacle and can be passed by a UAV if the UAV monitors that the obstacle exists in front of flight, and obtaining the information of the hole which can be passed by the UAV; the average power value Pm used in the whole flight stage when the UAV approaches the position of the mth hole is calculated, if # imgabs0 # # imgabs1 # is the maximum flight average power threshold value, the hole is reserved, and otherwise, the hole is deleted; the obstacle avoidance penalty function of all the cavities is calculated, the obstacle avoidance penalty function is the ratio of the maximum average flight power needing to be called to the cavity area, and the cavity with the minimum penalty function is selected for obstacle avoidance operation. An obstacle avoidance penalty function is calculated for all the cavities, and the UAV selects the cavity with the minimum penalty function to perform obstacle avoidance operation, so that the obstacle avoidance safety is improved, and the energy consumption is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of UAV power distribution, and relates to a power distribution method for UAV obstacle avoidance based on a penalty function. Background Art

[0002] UAVs have been widely used in many fields such as aerial photography, agriculture, logistics, and rescue. However, UAVs may encounter various complex obstacles during flight, such as trees, buildings, wires, etc., which may cause UAV crashes or mission failures. Therefore, researching obstacle avoidance methods for UAVs in complex obstacle scenarios has important practical significance and application value. UAV obstacle avoidance technology mainly relies on sensors, algorithms, and control systems. Sensors are used to obtain information about the surrounding environment, algorithms analyze and process sensor data to identify obstacles and calculate safe flight paths, and the control system adjusts the flight attitude and speed of the UAV according to the instructions output by the algorithm to achieve the obstacle avoidance function. With the continuous progress of technology, UAV obstacle avoidance methods are also constantly updated, from single-sensor obstacle avoidance to multi-sensor fusion obstacle avoidance, and then to intelligent obstacle avoidance based on artificial intelligence and deep learning. The intelligence and autonomy level of UAV obstacle avoidance technology are getting higher and higher, providing a strong guarantee for the safe flight of UAVs in complex environments. When a UAV encounters obstacle avoidance for a complex obstacle with multiple holes that can be traversed, the UAV often encounters an obstacle avoidance selection problem. How to select a suitable hole to traverse among many holes is a key problem to be solved. Summary of the Invention

[0003] The purpose of the present invention is to provide a power distribution method and system for UAV obstacle avoidance based on a penalty function, calculate the obstacle avoidance penalty function for all holes, and the UAV selects the hole with the smallest penalty function for obstacle avoidance operations, improving the safety of obstacle avoidance and reducing energy consumption.

[0004] The technical solution to achieve the purpose of the present invention is as follows:

[0005] A power distribution method for UAV obstacle avoidance based on a penalty function includes the following steps:

[0006] S01: If the UAV monitors an obstacle in front of its flight, detect the holes on the surface of the obstacle that are available for the UAV to pass through, and obtain the information of the holes available for the UAV to pass through;

[0007] S02: Calculate the average power value \(P_m\) used by the UAV during the entire flight stage when approaching the position of the \(m\)th hole. If \(P_m\leq P_{max}\), where \(P_{max}\) is the maximum average power threshold for flight, retain the hole; otherwise, delete the hole; m If is the maximum average power threshold for flight, retain the hole; otherwise, delete the hole;

[0008] S03: Calculate the obstacle avoidance penalty function \(C\) for all holesm , the obstacle avoidance penalty function is defined as the ratio of the maximum average flight power required to be called and the void area, and the UAV selects the void m with the smallest penalty function * to perform obstacle avoidance operations.

[0009] In the preferred technical solution, step S02 calculates the average power value P used during the entire flight phase when the UAV approaches the position of the m-th void m The method includes:

[0010] For each void that the UAV can pass through, calculate the average flight power that the UAV needs to call during the entire movement phase of flying towards it in the Y-axis direction

[0011] For each void that the UAV can pass through, calculate the average flight power that the UAV needs to call during the entire movement phase of flying towards it in the Z-axis direction

[0012] Calculate the average power value used during the entire flight phase when the UAV approaches the position of the m-th void

[0013] where the position L of the m-th void m (l, y m , z m ), l is the distance from the UAV to the obstacle in the forward direction, G is the mass of the UAV, v 0,x is the forward speed of the UAV forward, and g is the acceleration due to gravity.

[0014] In the preferred technical solution, step S01 further includes taking the coordinate point where the UAV detects an obstacle ahead as the origin (0, 0, 0) of the spatial Cartesian coordinate system, and the forward flight direction of the UAV as the positive half-axis of the X-axis, and obtaining the position information L of the center position of the m-th void in the coordinate system m (l, y m , z m ) and area S m , l is the distance from the UAV to the obstacle in the forward direction.

[0015] In the preferred technical solution, step S03 further includes the UAV flying towards the void. When the UAV flies towards the void in the Y-axis direction, it first accelerates, then moves at a constant speed, and finally decelerates so that the UAV has no speed in the Y-axis direction when passing through the void;

[0016] If the current forward flight speed of the UAV g is the acceleration due to gravity. When the UAV flies towards the void in the Z-axis direction, when z m> 0, first call the average flight power to perform upward acceleration motion. Finally, the UAV undergoes deceleration motion so that the UAV has no velocity in the Z-axis direction when passing through the cavity; if z m < 0, first use the acceleration due to gravity to perform downward acceleration motion. Finally, the UAV calls the average flight power to perform deceleration motion so that the UAV has no velocity in the Z-axis direction when passing through the cavity.

[0017] In the preferred technical solution, the obstacle avoidance operation in step S03 includes:

[0018] If the cavity m * of the Z-axis For the motion of the UAV in the Y-axis direction, first the UAV adopts the average power to make the UAV accelerate in the Y-axis direction towards the m * th cavity, with a duration of Then, the UAV has no power in the Y-axis direction for a duration of Finally, the UAV adopts the average power to make the UAV decelerate in the Y-axis direction towards the m * th cavity, with a duration of

[0019] For the motion of the UAV in the Z-axis direction, first the UAV adopts to make the UAV accelerate in the Z-axis direction towards the m * th cavity, with a duration of Then, the UAV has no power in the Z-axis direction for a duration of

[0020] Among them, the position of the m * th cavity l is the distance from the UAV to the obstacle in the forward direction, G is the mass of the UAV, v 0,x is the forward velocity of the UAV, and g is the acceleration due to gravity.

[0021] In the preferred technical solution, the obstacle avoidance operation in step S03 includes:

[0022] If the Z-axis z of the cavity m * < 0, for the motion of the UAV in the Y-axis direction, first the UAV adopts the average power m* to make the UAV accelerate in the Y-axis direction towards the m th cavity, with a duration of * Then, the UAV has no power in the Y-axis direction for a duration of Finally, the UAV adopts the average power to make the UAV decelerate in the Y-axis direction towards the m th cavity, with a duration of * Then, the UAV has no power in the Y-axis direction for a duration of

[0023] Regarding the movement of the UAV on the Z-axis, first, the UAV has no power in the Z-axis direction, causing the UAV to accelerate in the Z-axis direction towards the m * th cavity for a duration Then, the UAV adopts an average power to cause the UAV to decelerate in the Z-axis direction towards the m * th cavity for a duration

[0024] wherein, the position of the m * th cavity l is the distance from the UAV to the obstacle in the forward direction, G is the mass of the UAV, v 0,x is the forward speed of the UAV forward, and g is the acceleration due to gravity.

[0025] In the preferred technical solution, in step S03, the penalty function C m is:

[0026]

[0027] wherein, S m is the area of the mth cavity in the set Φ of cavities that the UAV can pass through;

[0028] The UAV selects the cavity with the smallest penalty function for obstacle avoidance operation, that is:

[0029] m * = argmin{C1, C2,..., C n}.

[0030] The present invention also discloses a power distribution system for UAV obstacle avoidance based on a penalty function, including a processor, and the processor is built-in with the power distribution method for UAV obstacle avoidance based on the penalty function.

[0031] The present invention also discloses a UAV, including the power distribution system for UAV obstacle avoidance based on the penalty function.

[0032] The present invention also discloses a computer storage medium, on which a computer program is stored, and when the computer program is executed, it implements the above-mentioned power distribution method for UAV obstacle avoidance based on the penalty function.

[0033] Compared with the prior art, the remarkable advantages of the present invention are:

[0034] In a complex obstacle scenario, there are multiple voids on the surface of the obstacle that the UAV can pass through. Calculate the obstacle avoidance penalty function for all voids, and the UAV selects the void with the minimum penalty function for obstacle avoidance operations. The UAV can adjust its flight attitude by calling the flight power to select one of the voids to pass through, improving the safety of obstacle avoidance and reducing energy consumption. In this invention, in-depth theoretical analysis and application exploration are carried out on the technology of calling flight power, aiming to provide a unique and efficient solution. It physically conforms to the scenarios of practical applications and will be able to be effectively applied to engineering practice. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is a scene diagram of the power allocation method for UAV obstacle avoidance based on the penalty function in this embodiment;

[0036] Figure 2 It is a flowchart of the power allocation method for UAV obstacle avoidance based on the penalty function in this embodiment. DETAILED DESCRIPTION OF THE INVENTION

[0037] Embodiment 1:

[0038] A power allocation method for UAV obstacle avoidance based on the penalty function includes the following steps:

[0039] S01: If the UAV monitors that there is an obstacle in front of its flight, detect the voids on the surface of the obstacle that the UAV can pass through, and obtain the void information that the UAV can pass through;

[0040] S02: Calculate the average power value P used by the UAV during the entire flight stage when approaching the position of the m-th void. If is the maximum average power threshold value of flight, retain this void; otherwise, delete this void; m If is the maximum average power threshold value of flight, retain this void; otherwise, delete this void;

[0041] S03: Calculate the obstacle avoidance penalty function C of all voids. The obstacle avoidance penalty function is defined as the ratio of the maximum average flight power required to be called and the void area. The UAV selects the void m with the minimum penalty function for obstacle avoidance operations. m The obstacle avoidance penalty function is defined as the ratio of the maximum average flight power required to be called and the void area. The UAV selects the void m with the minimum penalty function for obstacle avoidance operations. * for obstacle avoidance operations.

[0042] The following is an illustration with a preferred embodiment. As shown in, a power allocation method for UAV complex obstacle avoidance based on the penalty function includes the following steps: Figure 2 A power allocation method for UAV complex obstacle avoidance based on the penalty function includes the following steps:

[0043] Step 1, the UAV monitors whether there is an obstacle in front of its flight. If not, continue to monitor; if so, it is necessary to obtain the mass G of the UAV, the gravitational acceleration g of the current flight area, the current forward flight speed v of the UAV 0,x , the maximum average power threshold value of flight The distance l from the UAV to the obstacle in the forward direction. Thus, the coordinate point where the UAV detects an obstacle ahead is taken as the origin (0, 0, 0) of the spatial Cartesian coordinate system, the forward flight direction of the UAV is taken as the positive half-axis of the X-axis, and M voids available for the UAV to pass through on the surface of the obstacle are detected. The set is represented as Φ, and the position information L of the center of the m-th void in the coordinate system is given m (l, y m , z m ) and the area S m ;

[0044] Step 2, if then go to Step 3;

[0045] Step 3, for each void available for the UAV to pass through, calculate the average flight power that the UAV needs to call during the entire movement stage of flying in the Y-axis direction

[0046] Step 4, for each void available for the UAV to pass through, calculate the average flight power that the UAV needs to call during the entire movement stage of flying in the Z-axis direction

[0047] Step 5, calculate the average power value used during the entire flight stage when the UAV approaches the position of the m-th void as If then delete the void m from the set Φ; otherwise, keep it;

[0048] Step 6, for all voids in Φ, calculate their obstacle avoidance penalty function C m , and the UAV selects the void m with the smallest penalty function * for obstacle avoidance operation. If z m* ≥0, go to Step 7; otherwise go to Step 8;

[0049] Step 7, for the movement of the UAV in the Y-axis, first the UAV adopts the average power to make the UAV accelerate in the Y-axis direction towards the m * -th void for a duration of Then, the UAV has no power in the Y-axis direction for a duration of Finally, the UAV adopts the average power to make the UAV decelerate in the Y-axis direction towards the m * -th void for a duration of Meanwhile, for the movement of the UAV in the Z-axis, first the UAV adopts to make the UAV accelerate in the Z-axis direction towards the m * -th void for a duration of Then, the UAV has no power in the Z-axis direction for a duration of

[0050] Step 8, for the movement of the UAV on the Y-axis, first the UAV adopts the average power to make the UAV accelerate in the Y-axis direction towards the m * th hole, with a duration of Then, the UAV has no power in the Y-axis direction for a duration of Finally, the UAV adopts to make the UAV decelerate in the Y-axis direction towards the m * th hole, with a duration of Meanwhile, for the movement of the UAV on the Z-axis, first the UAV has no power in the Z-axis direction to make the UAV accelerate in the Z-axis direction towards the m * th hole, with a duration of Then, the UAV adopts to make the UAV decelerate in the Z-axis direction towards the m * th hole, with a duration of

[0051] The method of the present invention is applicable to the obstacle avoidance method of a UAV when facing an obstacle, and there are multiple holes at different positions on the surface of the obstacle for the UAV to pass through.

[0052] When the UAV flies towards the hole in the Y-axis direction, it needs to accelerate first; then move at a constant speed; to ensure that the UAV can safely pass through the hole, finally the UAV needs to experience deceleration so that the UAV has no speed in the Y-axis direction when passing through the hole.

[0053] During the acceleration stage, the average flight power value required by the UAV is and the duration is

[0054] During the constant-speed stage, the UAV does not need to call the flight power, and the duration is

[0055] During the deceleration stage, the average flight power value required by the UAV is and the duration is

[0056] When the UAV flies towards the hole in the Z-axis direction, if z m >0, it needs to first call the average flight power to accelerate upward; to ensure that the UAV can safely pass through the hole, finally the UAV needs to experience deceleration so that the UAV has no speed in the Z-axis direction when passing through the hole; if z m<0, it is necessary to first perform downward acceleration using the acceleration due to gravity; to ensure that the UAV can safely pass through the hole, finally the UAV needs to call the average flight power to decelerate so that the UAV has no velocity in the Z-axis direction when passing through the hole. And the prerequisite for the above flight mode is

[0057] If z m >0, first the UAV adopts to make the UAV accelerate in the Z-axis direction towards the m-th hole, with a duration of Then, the UAV has no power in the Z-axis direction for a duration of

[0058] If z m <0, first the UAV has no power in the Z-axis direction to make the UAV accelerate in the Z-axis direction towards the m-th hole, with a duration of Then, the UAV adopts to make the UAV decelerate in the Z-axis direction towards the m-th hole, with a duration of

[0059] In step 3, the average flight power called during the acceleration and deceleration phases is the minimum value.

[0060] In step 5, according to the average power value used during the flight phase when the UAV approaches the position of the m-th hole and the average flight power that the UAV can call are compared to update the set Φ;

[0061] In step 6, the obstacle avoidance penalty function is defined as the ratio of the maximum average flight power required to be called and the hole area.

[0062] Combined with Figure 1 and Figure 2 as shown, a further specific analysis and description of the design of the solution of the present invention are made.

[0063] In the network described in the design of the solution of the present invention, the UAV is in the horizontal flight phase, and the forward speed v of the UAV 0,x . Assume that the UAV detects a positive complex obstacle in front at a certain point and the distance from the UAV to the obstacle in the forward direction is l. Without loss of generality, take the coordinate point where the UAV detects the obstacle in front as the origin (0, 0, 0) of the spatial Cartesian coordinate system, and the forward flight direction of the UAV as the positive semi-axis of the X-axis. In the present invention, a network scenario with a complex obstacle is considered, that is, there are M holes in the obstacle through which the UAV can pass, and the set is represented as Φ, where the central position coordinates of the m-th hole are represented as L m (l, y m , z m), and it is assumed that the drone needs to reach the center of the cavity to effectively pass through the cavity and avoid hitting obstacles.

[0064] The drone can obtain the surrounding environment information through sensors. Commonly used sensors include:

[0065] 1. Camera: For visual perception to identify the shape and position of obstacles.

[0066] 2. LiDAR (Light Detection and Ranging): Generate a high-precision 3D map of the environment through laser ranging.

[0067] 3. Ultrasonic sensor: For detecting obstacles at close range.

[0068] 4. Infrared sensor: Suitable for detecting obstacles in low-light environments.

[0069] 5. Millimeter-wave radar: Suitable for detecting obstacles under complex weather conditions.

[0070] Through the sensor data, the drone can detect and locate obstacles. The specific steps include:

[0071] 1. Data acquisition: Obtain sensor data (such as images, point clouds, distance information, etc.).

[0072] 2. Obstacle recognition: Use computer vision or machine learning algorithms to identify obstacles (such as trees, buildings, other drones, etc.).

[0073] 3. Obstacle positioning: Determine the position, size, and shape of the obstacle.

[0074] Analyze the geometric shape of the obstacle to find the cavity that the UAV can pass through and its size.

[0075] For example, for the cavity between two obstacles, determine whether the size of the drone is smaller than the size of the cavity.

[0076] On the premise of keeping the forward speed unchanged, the drone adjusts its position by calling its own flight power to smoothly pass through one of the M cavities available for the UAV to pass through. To avoid collisions, it is assumed that when the drone reaches the obstacle, it only has a forward speed along the X-axis, and there is no speed along the Z-axis and Y-axis. Therefore, the motion states of the UAV along the Y-axis and Z-axis will be described and analyzed separately below.

[0077] 1. Motion of the drone along the Y-axis

[0078] Since the drone has no speed along the Y-axis when detecting the obstacle, if the UAV wants to reach the position L of the m-th cavity m (l, y m , z m)It needs to undergo accelerated motion, uniform motion, and decelerated motion. Therefore, there is:

[0079] s 加 +s 匀 +s 减 =|y m |(1)

[0080] Among them, s 加 、s 匀 and s 减 respectively represent the displacement of the UAV during the accelerated motion, the displacement of the uniform motion, and the displacement of the decelerated motion on the Y-axis.

[0081] At the same time, for the time of motion, there is:

[0082]

[0083] Among them, t 加 、t 匀 and t 减 respectively represent the time of the UAV during the accelerated motion, the time of the uniform motion, and the time of the decelerated motion on the Y-axis.

[0084] For the accelerated motion stage, there is:

[0085] v=a 加 t 加 (3)

[0086]

[0087] Among them, v is the final velocity of the accelerated motion and also the velocity of the uniform motion; a 加 is the acceleration of the accelerated motion.

[0088] For the uniform motion stage, there is:

[0089] s 匀 =vt 匀 (5)

[0090] For the decelerated motion stage, there is:

[0091] 0=v - a 减 t 减 (6)

[0092]

[0093] Among them, a 减 is the acceleration of the decelerated motion.

[0094] Assume that the acceleration values of the UAV during the acceleration and deceleration stages are equal, that is:

[0095] a 减 =a加 = a(8)

[0096] wherein, a can replace a 减 and a 加 .

[0097] By combining equations (3) and (6), we can obtain:

[0098] t 减 = t 加 = t(9)

[0099] wherein, t can replace t 减 and t 加 .

[0100] By combining equations (4) and (7), we can obtain:

[0101] s 减 = s 加 = s(10)

[0102] wherein, s can replace s 减 and s 加 .

[0103] Based on equations (8) to (10) and (5), equations (1) to (4) can be rewritten as follows:

[0104] 2s + vt 匀 = |y m |(11)

[0105]

[0106] v = at(13)

[0107]

[0108] By combining equations (11) to (14), we can obtain:

[0109]

[0110] When the UAV is accelerating or decelerating in the Y-axis direction, the average flight power P needs to be called Y , and there is:

[0111]

[0112] wherein, G is the mass of the UAV.

[0113] Substituting equations (13) and (15) into (16), we can obtain:

[0114]

[0115] In (17), since PY is a function of v, so:

[0116]

[0117] we can obtain P Y The fixed points of are:

[0118] v = 0 or

[0119] Since v > 0, so:

[0120]

[0121] Also, since P Y The second derivative of with respect to v is:

[0122]

[0123] We can obtain:

[0124]

[0125] Therefore, it can be known that when the UAV needs to call the average flight power P during the acceleration or deceleration stage in the Y-axis movement Y has a minimum value, which is:

[0126]

[0127] By combining equations (19) and (15), it can be known that the UAV needs to call the minimum average flight power P during the acceleration or deceleration stage in the Y-axis movement Y,min The time of the acceleration and deceleration stages is:

[0128]

[0129] By combining equations (23) and (12), it can be known that the time of the UAV during the uniform motion stage in the Y-axis is:

[0130]

[0131] Therefore, the average power value of the UAV during the entire process of movement in the Y-axis is

[0132] 2. Movement of the UAV in the Z-axis

[0133] Since the UAV has no speed in the Z-axis when detecting an obstacle, so if the UAV wants to reach the position L of the m-th cavity m (l, y m , z m ) it needs to experience acceleration and deceleration.

[0134] 1) If z m ≥ 0, it means that the m-th cavity is higher than the current position of the UAV. The UAV needs to first accelerate upward and then decelerate until the speed is 0 under its own gravitational acceleration g. There is no uniform motion stage in this scenario because uniform motion still requires flight power. Based on the above analysis, we have:

[0135] z 加 + z 减 = z m (25)

[0136] where z 加 and z 减 represent the displacement of the UAV's accelerated motion and decelerated motion on the Z-axis respectively.

[0137] Meanwhile, for the motion time, we have:

[0138]

[0139] where t 加 and t 减 represent the time of the UAV's accelerated motion and decelerated motion on the Z-axis respectively.

[0140] For the accelerated motion stage, we have:

[0141] v = (a 加 - g)t 加 (27)

[0142]

[0143] where v is the final speed of the accelerated motion; a 加 is the acceleration of the accelerated motion.

[0144] For the decelerated motion stage, we have:

[0145] 0 = v - gt 减 (29)

[0146]

[0147] By combining equations (25) - (30), we can obtain:

[0148]

[0149] The UAV needs to call the average flight power P Z for the upward accelerated motion stage on the Z-axis, which is

[0150]

[0151] Substitute and v* Substituting into Equation (35), we can obtain

[0152]

[0153] Therefore, the average power value of the UAV during the entire process of moving along the Z-axis is

[0154] From Equation (36), it can be known that Otherwise, the UAV cannot reduce the speed on the Z-axis to 0 by only the gravitational acceleration when reaching the cavity m.

[0155] 1) If z m < 0, it means that the m-th cavity is lower than the current position of the UAV. The UAV needs to first accelerate downward and then decelerate to a speed of 0 through the flight power. In this scenario, there is no uniform motion stage because uniform motion requires additional flight power, resulting in a waste of resources. Based on the above analysis, we have:

[0156] z 加 +z 减 =|z m |(37)

[0157] Among them, z 加 and z 减 respectively represent the displacement of the UAV's downward acceleration and deceleration motions on the Z-axis.

[0158] At the same time, for the time of motion, we have:

[0159]

[0160] Among them, t 加 and t 减 respectively represent the acceleration and deceleration times of the UAV on the Z-axis.

[0161] For the acceleration motion stage, we have:

[0162] v=gt 加 (39)

[0163]

[0164] For the deceleration motion stage, we have:

[0165] 0=v-(a 减 -g)t 减 (41)

[0166]

[0167] Among them, a 减The acceleration for the UAV to decelerate to a speed of 0 through flight power on the Z-axis.

[0168] By combining equations (37) to (42), we can obtain:

[0169]

[0170] During the deceleration phase of the UAV moving upward on the Z-axis, the average flight power P needs to be called. Z It is:

[0171]

[0172] Substitute and v * into equation (47), we can obtain:

[0173]

[0174] Therefore, the average power value during the entire process of the UAV moving on the Z-axis is

[0175] From equation (48), we know that Otherwise, due to the too short movement time of the UAV, it cannot achieve acceleration only through gravitational acceleration on the Z-axis first, and then use to reduce the speed on the Z-axis to 0 when reaching the cavity m.

[0176] Since the UAV needs to call the minimum average flight power P Y,min during the acceleration and deceleration phases on the Y-axis, the time period is the first and the last At the same time, when z m > 0, the UAV needs to call the average flight power for the time period of the first When z m < 0, the UAV needs to call the average flight power for the time period of the last Therefore, the average power value used during the entire flight phase of the UAV approaching the position L m (l, y m , z m ) of the m-th cavity is:

[0177]

[0178] Therefore, if the threshold value of the average flight power available for the UAV then it indicates that the UAV can fly safely to the position L of the m-th cavity m (l, y m , z m); Otherwise, the average flight power of the UAV is insufficient, so it cannot fly to the position L of the m-th cavity m (l,y m ,z m ).

[0179] Based on the above analysis, calculate the maximum average power value required for the UAV to fly to each cavity. Without loss of generality, arrange them in ascending order of the maximum average power value, i.e., P1 < P2 < … < P M .

[0180] If then it indicates that the UAV cannot safely reach the last M - n cavities due to the average flight power limit. Therefore, the set Φ of cavities that the UAV can safely pass through in the obstacle is updated to:

[0181] Φ = {1, 2, …, n} (50)

[0182] For the cavities in the above Φ set, the UAV can call the average flight power it needs on the Y-axis and Z-axis so that it can safely fly to the position where the cavity is located. However, since the sizes of each cavity are inconsistent, larger cavities have a higher probability of the UAV passing through safely, and vice versa. On the premise of meeting a certain aspect ratio (the value of which is related to the size of the UAV), the larger the area of the cavity, the more willing the UAV is to pass through it safely.

[0183] Therefore, the present invention uses the average flight power required by the UAV and the cavity area to define the penalty function, which is:

[0184]

[0185] Among them, S m is the area of the m-th cavity in Φ.

[0186] Thus, the UAV selects the cavity with the smallest penalty function for obstacle avoidance operation, that is:

[0187] m * = argmin{C1, C2, …, C n}(52)

[0188] After the UAV selects the cavity m * for obstacle avoidance. For the movement of the UAV on the Y-axis, first, the UAV uses the average power to make the UAV accelerate in the Y-axis direction towards the m * -th cavity for a duration of Then, the UAV has no power in the Y-axis direction for a duration of Finally, the UAV uses the average power to make the UAV move towards the m *A cavity decelerates in the Y-axis direction for a duration

[0189] Meanwhile, for the movement of the UAV in the Z-axis direction, if z m* >0, first the UAV uses the average power to make the UAV accelerate in the Z-axis direction towards the m * -th cavity for a duration Then, the UAV has no power in the Z-axis direction for a duration If first the UAV has no power in the Z-axis direction to make the UAV accelerate in the Z-axis direction towards the m * -th cavity for a duration Then, the UAV uses the average power to make the UAV decelerate in the Z-axis direction towards the m * -th cavity for a duration

[0190] It should be noted that since the UAV is flying in the air, the instantaneous power of the UAV will change at different speeds. The flight time t of the UAV can be discretely divided into time intervals of Δt. Since Δt is small enough, it can be assumed that the instantaneous power of the UAV is constant within each time interval. The instantaneous flight power of the UAV in the n-th time interval can be obtained through the classical kinematic power calculation formula P(n) = ma(v + anΔt), which is not given in this invention.

[0191] In another embodiment, a power allocation system for UAV obstacle avoidance based on a penalty function includes a processor, and the above-mentioned power allocation method for UAV obstacle avoidance based on a penalty function is built in the processor. This will not be elaborated here.

[0192] In another embodiment, a UAV includes the above-mentioned power allocation system for UAV obstacle avoidance based on a penalty function. This will not be elaborated here.

[0193] In another embodiment, a computer storage medium stores a computer program, and when the computer program is executed, it implements the above-mentioned power allocation method for UAV obstacle avoidance based on a penalty function.

[0194] The above embodiments are the preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications made without departing from the spirit and principle of the present invention shall be equivalent replacement methods and are all included in the protection scope of the present invention.

Claims

1. A power allocation method for unmanned aerial vehicle obstacle avoidance based on penalty function, characterized in that: The following steps are involved: S01: If there is an obstacle ahead of the drone during monitoring flight, detect holes on the obstacle surface that can be passed through by the drone, and obtain information about the holes that can be passed through by the drone; S02: Calculate the average power value P used during the entire flight phase when the drone approaches the position of the mth hole m ,like is the flight maximum average power threshold, the hole is retained, otherwise, the hole is deleted; S03: Calculate the obstacle avoidance penalty function C for all holes m The obstacle avoidance penalty function is defined as the ratio of the maximum average flight power required to be called and the hole area. The drone selects the hole m with the minimum penalty function. * Perform obstacle avoidance operations.

2. The power allocation method for unmanned aerial vehicle obstacle avoidance based on penalty function according to claim 1 is characterized in that: Step S02 calculates the average power value P used during the entire flight phase when the drone approaches the position of the mth hole. m The methods include: For each hole that the drone can pass through, calculate the average flight power that the drone needs to use during the entire motion phase along the Y axis. For each hole that the drone can pass through, calculate the average flight power that the drone needs to use during the entire motion phase of its Z-axis flight. Calculate the average power used during the entire flight phase of the drone approaching the position of the mth hole Among them, the position of the mth hole is L m (l,y m ,z m ), l is the distance from the drone to the obstacle in the forward direction, G is the mass of the drone, v 0,x is the forward velocity of the drone, and g is the acceleration due to gravity.

3. The power allocation method for unmanned aerial vehicle obstacle avoidance based on penalty function according to claim 1 is characterized in that: Step S01 also includes taking the coordinate point where the drone detects an obstacle in front as the origin (0,0,0) of the spatial Cartesian coordinate system, and the forward flight direction of the drone as the positive half axis of the X axis, and obtaining the position information L of the center position of the mth hole in the coordinate system. m (l,y m ,z m ) and area S m , l is the distance from the drone to the obstacle in the forward direction.

4. The power allocation method for unmanned aerial vehicle obstacle avoidance based on penalty function according to claim 3 is characterized in that: Step S03 also includes the UAV flying towards the hole. The UAV first accelerates during the flight towards the hole in the Y-axis direction, then moves at a constant speed, and finally decelerates so that the UAV has no speed in the Y-axis direction when passing through the hole. If the current forward flight speed of the drone g is the acceleration of gravity. The drone is flying towards the hole in the Z-axis direction. m >0, first use the average flight power to accelerate upward, and finally the drone undergoes deceleration so that the drone has no speed in the Z-axis direction when passing through the hole; if z m <0, firstly, the gravity acceleration is used to accelerate downward, and finally the UAV uses the average flight power to decelerate the movement so that the UAV has no speed in the Z-axis direction when passing through the hole.

5. The power allocation method for unmanned aerial vehicle obstacle avoidance based on penalty function according to claim 1, characterized in that: The obstacle avoidance operation in step S03 includes: If the hole m * Z-axis For the movement of the drone on the Y axis, the drone first uses the average power Make the drone head towards the mth * The hole accelerates on the Y axis, and the duration Then, the drone loses power in the Y-axis direction for a duration of Finally, the drone uses average power Make the drone head towards the mth * The hole decelerates on the Y axis for a duration of For the movement of the drone on the Z axis, the drone first uses Make the drone head towards the mth * The hole accelerates on the Z axis, and the duration Then, the drone has no power in the Z-axis direction for a duration of Among them, the mth * A hollow location l is the distance from the drone to the obstacle in the forward direction, G is the mass of the drone, and v 0,x is the forward velocity of the drone, and g is the acceleration due to gravity.

6. The power allocation method for unmanned aerial vehicle obstacle avoidance based on penalty function according to claim 1, characterized in that: The obstacle avoidance operation in step S03 includes: If the hole m * Z-axis For the movement of the drone on the Y axis, the drone first uses the average power Make the drone head towards the mth * The hole accelerates on the Y axis, and the duration Then, the drone loses power in the Y-axis direction for a duration of Finally, the drone uses average power Make the drone head towards the mth * The hole moves at a decelerated speed on the Y axis for a duration of For the motion of the drone on the Z axis, first, the drone has no power in the Z axis direction so that the drone moves towards the mth * The hole accelerates on the Z axis, and the duration The drone then uses the average power Make the drone head towards the mth * The hole decelerates on the Z axis for a duration of Among them, the mth * A hollow location l is the distance from the drone to the obstacle in the forward direction, G is the mass of the drone, and v 0,x is the forward velocity of the drone, and g is the acceleration due to gravity.

7. The power allocation method for unmanned aerial vehicle obstacle avoidance based on penalty function according to claim 1 is characterized in that: In step S03, the penalty function C m for: Among them, S m is the area of ​​the mth hole in the hole set Φ that can be passed through by the drone; The drone selects the hole with the minimum penalty function for obstacle avoidance, namely: m * =argmin{C1,C2,…,C n }。 8. A power allocation system for drone obstacle avoidance based on penalty function, characterized in that: The invention comprises a processor, wherein the power allocation method for unmanned aerial vehicle obstacle avoidance based on penalty function according to any one of claims 1 to 7 is built in the processor.

9. A drone, characterized in that: A power distribution system for drone obstacle avoidance based on penalty function 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 power allocation method for unmanned aerial vehicle obstacle avoidance based on penalty function described in any one of claims 1 to 7 is implemented.