Obstacle avoidance method and device for inspection unmanned aerial vehicle
By marking the local optimality as virtual obstacles in the UAV obstacle avoidance system and adjusting the flight attitude, the problem of drones falling into local optimality in complex environments is solved, and obstacle avoidance efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202411767320.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-21
AI Technical Summary
Existing UAV obstacle avoidance algorithms may fall into local optimal problems in complex environments, resulting in a decrease in obstacle avoidance efficiency and accuracy.
By obtaining the current position and target point position of the drone, determine whether it is trapped in a local optimal point and mark it as the location of the virtual obstacle. Adjust the drone's flight attitude based on gravity, traction and total repulsion, and refrain whether it has reached the target point until it has been successfully reached.
It improves the obstacle avoidance efficiency and accuracy of drones in complex environments, avoids the occurrence of local optimal problems, and enables drones to complete patrol tasks faster and more accurately.
Smart Images

Figure CN119668290A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of unmanned aerial vehicle obstacle avoidance, and in particular to a method and device for unmanned aerial vehicle obstacle avoidance for inspection. Background Art
[0002] As the scale of power grids expands, traditional inspection methods can no longer meet the needs of modern power grids. UAV inspection technology can achieve real-time monitoring of the status of power grid equipment and fault diagnosis, improving the accuracy and timeliness of inspections. When inspecting distribution networks, drones need to deal with complex grid structures, changing environmental conditions and complex obstacles such as wires, towers and trees, which poses a huge challenge to drone obstacle avoidance. To ensure the safe flight of drones, obstacle avoidance technology becomes the key.
[0003] In related technologies, the Artificial Potential Field (APF) method is a commonly used obstacle avoidance algorithm that plans a safe flight path for drones by simulating the potential field principle in physics. However, in practical applications, the APF method may cause local optimal problems in complex environments, which will cause drones to be trapped in a potential field composed of multiple obstacles and unable to find an optimal path to the target point. In addition, when the complexity of the environment increases, the obstacle avoidance efficiency and accuracy of the APF method will decrease, resulting in the drone being unable to avoid obstacles accurately and efficiently. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a method and device for obstacle avoidance of an inspection drone to solve the technical problems of low obstacle avoidance efficiency and accuracy and the possibility of falling into local optimality in related technologies.
[0005] In a first aspect, an embodiment of the present application provides a method for avoiding obstacles of an inspection drone, comprising:
[0006] Obtain the target point position of the drone and the position of obstacles in the inspection site;
[0007] Based on the current position of the drone, determine whether the drone has reached the target point, and if the drone has not reached the target point, determine whether the drone is trapped in a local optimal point. If the drone is trapped in a local optimal point, mark the current position of the drone as the position of a virtual obstacle.
[0008] Determine the gravitational force on the drone according to the current position of the drone and the position of the target point, determine the traction force on the drone based on the gravitational force, and determine the total repulsion on the drone according to the current position of the drone, the position of the obstacle, the position of the virtual obstacle and the repulsion gain coefficient; the repulsion gain coefficient is determined according to the current position of the drone and the position of the target point;
[0009] The flight attitude of the drone is adjusted according to the gravity, the traction force and the total repulsion, and the step of determining whether the drone has reached the target point based on the current position of the drone is re-executed after a preset time period until the drone reaches the target point.
[0010] In a possible implementation, determining the gravitational force on the drone according to the current position of the drone and the position of the target point includes:
[0011] According to the current position of the UAV and the position of the target point, a first direction vector from the current position of the UAV to the position of the target point is determined;
[0012] Based on the first direction vector and the gravity gain coefficient, the magnitude and direction of the gravity acting on the UAV are determined.
[0013] In a possible implementation, determining the traction force exerted on the drone based on the gravity includes:
[0014] Determining the magnitude of the traction force applied to the UAV according to the magnitude of the gravitational force and the traction force gain coefficient;
[0015] Based on the vertical direction of the direction of the gravitational force, the direction of the traction force on the drone is determined.
[0016] In a possible implementation, there are multiple obstacles;
[0017] The method of determining the total repulsion force on the drone according to the current position of the drone, the position of the obstacle, the position of the virtual obstacle and the repulsion gain coefficient includes:
[0018] Determining a repulsion gain coefficient based on the first direction vector and a preset coefficient;
[0019] Taking virtual obstacles as obstacles, for each obstacle, the repulsion force exerted on the drone by the obstacle is determined according to the current position of the drone, the position of the obstacle and the repulsion gain coefficient;
[0020] The repulsive forces of all obstacles acting on the drone are vector-added to obtain the total repulsive force acting on the drone.
[0021] In a possible implementation, for each obstacle, the repulsion force of the obstacle exerted on the drone is determined according to the current position of the drone, the position of the obstacle, and the repulsion gain coefficient, including:
[0022] For each obstacle, based on the current position of the drone, determine whether the drone is within the repulsive potential field of the obstacle;
[0023] If the drone is within the repulsive potential field of the obstacle, determine a second direction vector of the drone from the current position to the position of the obstacle according to the current position of the drone and the position of the obstacle, and determine the magnitude and direction of the repulsive force of the obstacle on the drone based on the second direction vector and the repulsive gain coefficient;
[0024] If the drone is not within the repulsive potential field of the obstacle, it is determined that the repulsive force of the obstacle on the drone is 0.
[0025] In a possible implementation, judging whether the drone has reached the target point based on the current position of the drone includes:
[0026] Based on the current position of the drone, determine whether the drone is within the preset range of the target point position;
[0027] If the UAV is within the preset range of the target point location, it is determined that the UAV has reached the target point location;
[0028] If the drone is not within the preset range of the target point location, it is determined that the drone has not reached the target point location.
[0029] In a possible implementation, the determining whether the drone is trapped in a local optimal point includes:
[0030] Acquire multiple real-time positions of the drone at previous moments; the multiple real-time positions at previous moments are the real-time positions of the drone at a preset number of moments before the current moment;
[0031] If the distances between the current position of the drone and the positions of multiple previous real-time positions at adjacent moments are all less than the preset distance threshold, it is determined that the drone is trapped in a local optimal point; otherwise, it is determined that the drone is not trapped in a local optimal point.
[0032] In a possible implementation, adjusting the flight attitude of the drone according to the gravity, the traction force, and the total repulsion force includes:
[0033] According to the gravitational force, the traction force and the total repulsive force, the resultant force acting on the UAV at the current position is obtained;
[0034] Based on the resultant force, determining a desired deflection angle of the UAV, and determining a roll angle, a pitch angle, and a yaw angle of the UAV based on the desired deflection angle;
[0035] The flight attitude of the UAV is adjusted according to the roll angle, pitch angle and yaw angle.
[0036] In a possible implementation, the method further includes:
[0037] If the UAV is not trapped in the local optimal point, the gravitational force on the UAV is determined according to the current position of the UAV and the position of the target point, and the total repulsive force on the UAV is determined according to the current position of the UAV, the position of the obstacle and the repulsive gain coefficient;
[0038] The flight attitude of the drone is adjusted according to the gravitational force and the total repulsive force, and the step of determining whether the drone has reached the target point based on the current position of the drone is re-executed after a preset time period until the drone reaches the target point.
[0039] In a second aspect, an embodiment of the present application provides an obstacle avoidance device for an inspection drone, comprising:
[0040] The acquisition module is used to obtain the target point position of the drone and the position of obstacles in the inspection site.
[0041] The judgment module is used to judge whether the drone has reached the target point based on the current position of the drone, and to judge whether the drone is trapped in a local optimal point when the drone has not reached the target point. When the drone is trapped in a local optimal point, the current position of the drone is used as the position of the virtual obstacle.
[0042] The determination module is used to determine the gravitational force exerted on the drone according to the current position of the drone and the position of the target point, and determine the traction force exerted on the drone based on the gravitational force, and determine the total repulsion exerted on the drone according to the current position of the drone, the position of the obstacle, the position of the virtual obstacle and the repulsion gain coefficient; the repulsion gain coefficient is determined according to the current position of the drone and the position of the target point.
[0043] The adjustment module is used to adjust the flight attitude of the drone according to the gravity, the traction force and the total repulsion, and re-execute the step of judging whether the drone has reached the target point based on the current position of the drone after a preset time period until the drone reaches the target point.
[0044] It can be understood that the beneficial effects of the second aspect mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0045] The inspection drone obstacle avoidance method and device provided in the embodiment of the present application, when the drone fails to reach the target point and falls into the local optimal point, the current position of the drone is used as the position of the virtual obstacle, and the flight attitude of the drone is adjusted according to the calculated gravity, traction and total repulsion of the drone, and then re-judged whether the drone has reached the target point until the drone reaches the target point. When calculating the repulsion, the present application adjusts the repulsion gain coefficient from a fixed value to a dynamic value that changes dynamically with the distance between the current position of the drone and the target point, so that the repulsion and gravity of the drone are balanced in order of magnitude, improving the drone's obstacle avoidance efficiency and accuracy; when the drone falls into the local optimal point, the current position of the drone is used as the position of the virtual obstacle, and a traction force is applied to the drone based on gravity, so that the drone can quickly get rid of the local optimal point, further improving the drone's obstacle avoidance efficiency and accuracy.
[0046] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0048] Figure 1 It is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0049] Figure 2 It is a flowchart of an obstacle avoidance method for inspection drones provided in one embodiment of the present application;
[0050] Figure 3 It is a flowchart of an obstacle avoidance method for inspection drones provided in one embodiment of the present application;
[0051] Figure 4 This is a schematic diagram of the motion trajectory of a drone from an initial position to a target point position provided by an embodiment of the present application;
[0052] Figure 5 It is a structural schematic diagram of an inspection drone obstacle avoidance device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0053] The present application is described more clearly below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the effects of the present application, but are not intended to limit the present application in any form. It should be noted that, for those of ordinary skill in the art, several variations and improvements may be made without departing from the concept of the present application. These all fall within the scope of protection of the present application.
[0054] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0055] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0056] In the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0057] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0058] In addition, the “plurality” mentioned in the embodiments of the present application should be interpreted as two or more.
[0059] In order to improve the efficiency and accuracy of obstacle avoidance of drones in complex environments, the inventors found that the repulsion gain coefficient in the artificial potential field method can be improved by adjusting it from a fixed value to a dynamic value that changes dynamically with the distance between the current position of the drone and the target point, so that the repulsion and gravity of the drone are balanced in order of magnitude, improving the efficiency and accuracy of obstacle avoidance of the drone. In addition, when the drone falls into a local optimal point, the local optimal point is used as a "virtual obstacle" and a traction force is applied to the drone based on gravity, so that the drone can quickly get rid of the local optimal point, further improving the efficiency and accuracy of obstacle avoidance of the drone.
[0060] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below in conjunction with the accompanying drawings.
[0061] First reference Figure 1 , Figure 1 The application scenario of the present application is schematically shown, in which a drone, multiple obstacles and a controller are included. The controller can be an onboard controller of the drone, an offboard controller of the drone, or a combination of an onboard controller and an offboard controller, and is a hardware device with data storage, processing and analysis functions.
[0062] The controller obtains the target point position and the position of the obstacle of the UAV in the inspection site. When the UAV fails to reach the target point and falls into the local optimal point, the current position of the UAV is used as the position of the virtual obstacle. After that, the gravity acting on the UAV is determined according to the current position and the target point position of the UAV, and the traction acting on the UAV is determined based on the gravity, and the total repulsion acting on the UAV is determined according to the current position of the UAV, the position of the obstacle, the position of the virtual obstacle and the repulsion gain coefficient, wherein the repulsion gain coefficient is determined according to the current position and the target point position of the UAV, and the flight attitude of the UAV is adjusted according to the gravity, traction and total repulsion, and the step of judging whether the UAV has reached the target point position based on the current position of the UAV is re-executed after a preset time period until the UAV reaches the target point position.
[0063] This application scenario can also include various sensors such as laser radar, camera, infrared sensor and ultrasonic sensor that communicate with the controller. Various sensors send the acquired sensor data to the controller. The controller processes the acquired sensor data based on multi-sensor fusion technology to generate an environmental point cloud model. The environmental point cloud model includes three-dimensional structural information in the inspection site environment, such as three-dimensional coordinate information of obstacles. The core of multi-sensor fusion technology is the Kalman filter algorithm. Through the iterative application of the Kalman filter algorithm, the controller can integrate data from different sensors to generate a unified and accurate environmental point cloud model.
[0064] Among them, the laser radar is used to scan the environment of the inspection site, generate a detailed initial point cloud model, and send the initial point cloud model to the controller. The initial point cloud model includes the three-dimensional coordinate information of obstacles in the inspection site, which serves as the basis for the drone's obstacle avoidance and navigation.
[0065] The camera is used to capture images of the inspection site and send the images to the electronic device. The controller recognizes and classifies objects in the environment based on the images, extracts key features such as edges and corners, and converts the above features into spatial coordinate data, which is aligned with the initial point cloud model.
[0066] Infrared sensors and ultrasonic sensors are used to obtain the location data of obstacles in the inspection site and send the location data to the controller. The controller converts the location data into spatial coordinate data and aligns the spatial coordinate data with the initial point cloud model based on multi-sensor fusion technology. Here, infrared sensors and ultrasonic sensors are mainly used to supplement the deficiencies of lidar and cameras under specific conditions, such as mainly used for the detection of low-light or transparent obstacles.
[0067] It should be noted that after the controller obtains the sensor data (such as images, position data, etc.) of the above-mentioned various sensors, it first performs preprocessing to eliminate noise and outliers in the sensor data, such as reducing or eliminating noise by using smoothing algorithms (moving average, Gaussian filtering, etc.), and filtering outliers by setting thresholds. After that, the controller converts the preprocessed sensor data into a unified format and confirms that all sensor data have the same timestamp so as to correctly correspond to the sensor data of different sensors at the same time. After that, sensor data registration, fusion and other processing are performed to align the sensor data of different sensors into the same reference frame, for example, converting them into a unified coordinate system such as a global coordinate system.
[0068] Among them, the controller determines the intrinsic and extrinsic parameters of each sensor during data registration in order to accurately transform the sensor data into the global coordinate system, and uses an iterative closest point algorithm to align the initial point cloud model from the lidar with the spatial coordinate data of other sensors.
[0069] When fusing data, the controller combines the initial point cloud model with the spatial coordinate data of other sensors and removes duplicate point data in the fusion process to generate a more comprehensive environmental point cloud model. The environmental point cloud model includes the three-dimensional structure information in the inspection site environment, such as the three-dimensional coordinate information of obstacles.
[0070] Combine the following Figure 1 ,refer to Figure 2 To describe the inspection drone obstacle avoidance method provided according to an exemplary embodiment of the present application.
[0071] Figure 2 FIG. 1 is a flow chart of an obstacle avoidance method for an inspection drone provided in an embodiment of the present application. Figure 2 As shown, the method in the embodiment of the present application may include:
[0072] Step 201: Obtain the target point position of the drone and the position of obstacles in the inspection site.
[0073] In this embodiment, the starting position of the drone in the global coordinate system and the position of the target point in the drone inspection task can be obtained first, and then the initial position of the drone is used as the origin, and a coordinate system is established based on the obtained environmental point cloud model and the position of the target point, so as to obtain the initial position of the drone in the inspection site, the position of the target point and the position of the obstacle. The safe distance between the drone and the obstacle is initialized, which is defined as the repulsive potential field range, and the range of entering the target point is initialized, which is defined as the preset range. Among them, there are multiple obstacles.
[0074] Step 202: Based on the current position of the drone, determine whether the drone has reached the target point. If the drone has not reached the target point, determine whether the drone is trapped in a local optimal point. If the drone is trapped in a local optimal point, use the current position of the drone as the position of the virtual obstacle.
[0075] In this embodiment, the current position of the drone is the real-time position of the drone. The drone reaching the target point position means that the drone is within a preset range of the target point position, and the preset range can be set according to the inspection task requirements and the environmental conditions of the inspection site.
[0076] In some embodiments, when judging whether the drone has reached the target point position based on the current position of the drone, it can be judged whether the drone is within a preset range of the target point position based on the current position of the drone. If the drone is within the preset range of the target point position, it is determined that the drone has reached the target point position. If the drone is not within the preset range of the target point position, it is determined that the drone has not reached the target point position.
[0077] Optionally, when the present embodiment determines that the UAV has reached the target point, the UAV is controlled to stop flying so that the UAV stably hovers within a preset range of the target point and enters a waiting state to await further instructions. The above instructions may be commands for the UAV to conduct a detailed inspection of the target point such as power transmission equipment, take photos or videos at a specific angle, and collect and transmit specified data.
[0078] For example, when the drone does not reach the target point, the drone's flight attitude needs to be adjusted so that the drone can reach the target point safely and accurately. In this process, the artificial potential field method can be used to avoid obstacles for the drone, but in order to prevent the local optimal problem that may be caused by the artificial potential field method, this embodiment can detect whether the drone is trapped in a local optimal point, that is, detect whether the drone is trapped in a potential field composed of multiple obstacles.
[0079] In some embodiments, when determining whether a drone is trapped in a local optimal point, multiple real-time positions of the drone can be obtained, wherein the multiple real-time positions are the real-time positions of the drone at a preset number of times before the current moment. If the distances between the current position of the drone and the positions at adjacent moments in the multiple real-time positions are all less than a preset distance threshold, then it is determined that the drone is trapped in a local optimal point; otherwise, it is determined that the drone is not trapped in a local optimal point.
[0080] Optionally, if the distances between the positions of the drone at adjacent moments are not all less than a preset distance threshold, that is, the drone does not change very little in several consecutive positions, it indicates that the drone has not fallen into a local optimal point.
[0081] If the distances between the positions of the drone at adjacent moments are all less than the preset distance threshold, that is, the drone has little change in several consecutive positions, it indicates that the drone may have fallen into a local optimal point. At this time, the current position of the drone is set to the position of the virtual obstacle, that is, the current position of the drone is also regarded as an obstacle. In this way, the drone can be effectively prevented from approaching or returning to the position again in the future, thereby preventing the drone from falling into the local optimal point again. At the same time, in order to enable the drone to leave the local optimal point as soon as possible, a traction force can be added to the drone to change the flight direction of the drone. The specific calculation method of the traction force can refer to the following embodiment.
[0082] In this embodiment, refer to Figure 3 In order to prevent the drone from being trapped in a potential field composed of multiple obstacles, when the drone is detected to be trapped in a local optimal point, the current position of the drone can be used as the position of a virtual obstacle, thereby effectively preventing the drone from being trapped in the local optimal point again. At the same time, a traction force can be added to the drone to change the flight direction of the drone so that the drone can quickly escape from the local optimal point.
[0083] Step 203: determine the gravitational force on the drone based on the current position of the drone and the target point position, determine the traction force on the drone based on the gravitational force, and determine the total repulsion on the drone based on the current position of the drone, the position of the obstacle, the position of the virtual obstacle and the repulsion gain coefficient; wherein the repulsion gain coefficient is determined based on the current position of the drone and the target point position.
[0084] In this embodiment, the gravity, traction and total repulsion of the drone can be determined based on the improved artificial potential field method, so that the flight attitude of the drone can be adjusted according to the gravity, traction and total repulsion of the drone.
[0085] In some embodiments, when determining the gravitational force acting on the drone, a first direction vector from the current position of the drone to the target point position can be determined based on the current position of the drone and the target point position, and the magnitude and direction of the gravitational force acting on the drone can be determined based on the first direction vector and the gravitational gain coefficient.
[0086] In this embodiment, the target point is regarded as the center of a gravitational potential field that attracts the drone to fly toward it, and the gravitational potential energy function is defined as:
[0087]
[0088] Where Uatt(p) represents the gravitational potential energy value of the UAV at its current position, p and patt represent the current position and target point position of the UAV respectively, and katt represents the gravitational gain coefficient, which can be set according to the actual working environment of the UAV and is generally set to a constant. Represents the first direction vector from the current position of the drone to the target point. The direction of the first direction vector points from the current position of the drone to the target point, and its magnitude is That is, the distance between the current position of the drone and the target point. According to the gravitational potential energy function between the current position of the drone and the target point, the magnitude and direction of the gravitational force on the drone can be obtained. The expression of gravitational force is:
[0089]
[0090] In the formula, Represents the gravitational force on the drone. The magnitude of this gravitational force is equal to the negative gradient of the gravitational potential energy value, and its direction is from the current position of the drone to the target point.
[0091] In some embodiments, when determining the traction force on the drone based on gravity, the magnitude of the traction force on the drone can be determined based on the magnitude of the gravity and the traction gain coefficient, and the direction of the traction force on the drone can be determined based on the vertical direction of the gravity.
[0092] From the above, we can know that when the drone falls into a local optimal point, in order to make the drone quickly escape from the local optimal point, a traction force can be added to the drone to change the flight direction of the drone. The expression of traction force is:
[0093]
[0094] In the formula, It indicates the traction force on the drone, and ktra indicates the traction gain coefficient. From the expression of traction force, it can be seen that the magnitude of traction force is equal to the product of the magnitude of gravity and the traction gain coefficient, and the direction of traction force is perpendicular to the direction of gravity. It should be noted that the applied traction force will continue to exist until the drone leaves the repulsive potential field range of the local optimal point (the location of the virtual obstacle), or the drone is no longer trapped in the local optimal point, then the traction force will disappear.
[0095] In some embodiments, when determining the repulsion force exerted on the drone, a repulsion gain coefficient can be determined based on the first direction vector and a preset coefficient. A virtual obstacle is taken as an obstacle. For each obstacle, the repulsion force exerted on the drone by the obstacle is determined based on the current position of the drone, the position of the obstacle and the repulsion gain coefficient. After that, the repulsion forces exerted on the drone by all obstacles are vector-added to obtain the total repulsion force exerted on the drone.
[0096] In this embodiment, since there are multiple obstacles in the inspection site, in order to avoid collision between the drone and each obstacle, the repulsion force exerted on the drone by the obstacle is calculated for each obstacle. In addition, it can be seen from the above embodiments that when the drone falls into a local optimal point, in order to avoid the drone falling into the local optimal point again, the current position of the drone can be used as the position of the virtual obstacle, and the virtual obstacle can also be regarded as an obstacle.
[0097] Exemplarily, when determining the repulsive force exerted on the drone by each obstacle, this embodiment can determine, for each obstacle, whether the drone is within the repulsive potential field of the obstacle based on the current position of the drone. If the drone is within the repulsive potential field of the obstacle, then determine the second direction vector of the drone from the current position to the position of the obstacle based on the current position of the drone and the position of the obstacle, and determine the magnitude and direction of the repulsive force exerted on the drone by the obstacle based on the second direction vector and the repulsive gain coefficient. If the drone is not within the repulsive potential field of the obstacle, then determine that the repulsive force exerted on the drone by the obstacle is 0.
[0098] Optionally, in order to avoid collision between the drone and obstacles, for each obstacle, the distance between the current position of the drone and the position of the obstacle can be determined, so as to determine whether the drone has entered the repulsive potential field of the obstacle based on the distance. If the drone enters the repulsive potential field of the obstacle, it indicates that there is a risk of collision between the drone and the obstacle, and it is necessary to avoid collision between the drone and the obstacle. Therefore, it is necessary to calculate the magnitude and direction of the repulsive force of the obstacle on the drone based on the current position of the drone and the position of the obstacle. If the drone does not enter the repulsive potential field of the obstacle, it can be considered that the obstacle will not affect the operation of the drone and will not generate repulsive force on the drone, that is, the repulsive force of the obstacle on the drone is 0 at this time.
[0099] The expression of the repulsive force of each obstacle on the drone is:
[0100]
[0101] In the formula, represents the repulsion force of the ith obstacle on the drone, preqi represents the position of the ith obstacle, kreq represents the repulsion gain coefficient, Represents the second direction vector from the current position of the drone to the position of the i-th obstacle. The direction of the second direction vector points from the current position of the drone to the position of the i-th obstacle. It represents the distance between the current position of the UAV and the position of the i-th obstacle, and ρ0 represents the radius of the repulsive potential field, that is, the radius of the range of action of the obstacle repulsive field. Indicates that the drone is within the repulsive potential field of the ith obstacle. It means that the drone is not within the repulsive potential field of the i-th obstacle. At this time, the repulsive force of the i-th obstacle on the drone is 0.
[0102] In practical applications, when the drone is far away from the target point, the repulsion and gravitation experienced by the drone are greatly different in magnitude. In order to balance the repulsion and gravitation experienced by the drone in magnitude and improve the efficiency and accuracy of the drone's obstacle avoidance, this embodiment improves the repulsion gain coefficient by adjusting it from a fixed value to a dynamic value that changes dynamically with the distance between the current position of the drone and the target point. The expression of the repulsion gain coefficient is:
[0103]
[0104] In the formula, k represents the preset coefficient, which can be set according to the operating environment of the drone. In this way, the repulsive force on the drone can adapt to the change of gravity, reduce the difference in magnitude between the repulsive force and the gravity on the drone, and improve the efficiency and accuracy of the drone's obstacle avoidance.
[0105] After that, the repulsive forces of all obstacles on the drone are vector-added to obtain the total repulsive force on the drone. The expression of the total repulsive force is:
[0106]
[0107] In the formula, Represents the total repulsion, n is determined according to the number of obstacles, and n includes the number of virtual obstacles.
[0108] In this embodiment, in order to enable the UAV to quickly escape from the local optimal point, a traction force calculated based on gravity is added to the UAV. At the same time, in order to achieve a balance in magnitude between the repulsion and gravity acting on the UAV and improve the obstacle avoidance efficiency and accuracy of the UAV, the repulsion gain coefficient is adjusted from a fixed value to a dynamic value that changes dynamically with the distance between the current position of the UAV and the target point position.
[0109] Step 204: adjust the flight attitude of the drone according to the gravity, traction and total repulsion, and re-execute the step of determining whether the drone has reached the target point based on the current position of the drone after a preset time period until the drone reaches the target point.
[0110] In some embodiments, when adjusting the flight attitude of the drone, the resultant force acting on the drone at the current position can be obtained based on gravity, traction and total repulsion. Then, based on the resultant force, the expected deflection angle of the drone is determined, and the roll angle, pitch angle and yaw angle of the drone are determined based on the expected deflection angle. According to the roll angle, pitch angle and yaw angle, the flight attitude of the drone is adjusted.
[0111] For example, the gravity, traction and total repulsion of the drone are vector-added to obtain the resultant force of the drone at the current position.
[0112]
[0113] The resultant force on the drone indicates the obstacle avoidance direction and necessary force of the drone at the current position. Based on the resultant force, the expected deflection angle of the drone can be determined, and the expected deflection angle defines the necessary angle for the drone to turn. The expected angle is compared with the current deflection angle of the drone to obtain the deviation between the current posture of the drone and the ideal obstacle avoidance posture, and then the error information is obtained based on the deviation. The error information is a composite information, including the position error of the drone, as well as the velocity error and acceleration error. Afterwards, this embodiment uses the Model Predictive Control (MPC) strategy to process the error information and obtain the roll angle, pitch angle and yaw angle of the drone.
[0114] Afterwards, this embodiment adjusts the flight attitude of the drone according to the above-mentioned roll angle, pitch angle and yaw angle. For example, the rotation speed and thrust distribution of the drone motor can be quickly and accurately adjusted to achieve flexible steering and precise avoidance of the drone in the three-dimensional space of the inspection site.
[0115] Optionally, this embodiment re-executes the step of determining whether the drone has reached the target point based on the current position of the drone after a preset time period until the drone reaches the target point. Figure 4 The motion trajectory of the UAV from the initial position to the target point is shown in Figure 1. Figure 4 As shown, point A is the initial position of the drone, and point B is the target point position. It can be seen that the drone avoids all obstacles from point A to point B. The preset time period can be set according to the inspection task requirements of the drone and the environmental conditions of the inspection site.
[0116] Among them, the MPC strategy is a model-based optimization control strategy, which has been widely used in complex control problems due to its foresight and robustness. When using the MPC strategy to analyze error information, the error information is first analyzed in time series, and the trend of error change over time is examined by sliding window technology. Then, the autocorrelation function and partial autocorrelation function are used to identify the periodicity and autocorrelation in the error information. These characteristics may indicate the lag effect of the control action or the feedback loop within the strategy. Finally, the above analysis results are used to construct a prediction model, which can predict the possible development of future errors based on current and past error information.
[0117] When using the MPC strategy to predict the future behavior of a drone, first describe the motion of the drone under different control inputs based on the dynamic model of the drone. Then, recursive predictions are performed within a limited time window, namely the prediction horizon or control horizon. Within the prediction horizon, the state changes of the drone are gradually simulated using the Euler method or the Runge-Kutta method. At each time step, the expected state is calculated based on the dynamic model and compared with the expected trajectory to evaluate the effect of the assumed control action. This process is repeated until the entire prediction horizon is covered. In this way, a sequence of predicted states can be generated, which reflects the future behavior of the drone under the assumed control actions. These predictions are then used to construct an optimization problem to find the best sequence of control actions that minimizes the error within the prediction horizon and satisfies the constraints.
[0118] When using the MPC strategy to obtain the optimal control action sequence, an objective function is first constructed. The objective function is usually a composite expression containing an error term and a control cost term, which aims to minimize the error while avoiding excessive control actions. The optimization algorithm considers all possible control action combinations for each moment in the prediction range and uses mathematical optimization techniques to find the best option. In this process, the optimization algorithm considers the impact of control actions on future drone behavior and optimizes long-term performance by dynamically adjusting the control sequence. In addition, in order to meet the physical and operational constraints in practical applications, such as the maximum speed and acceleration limits of the drone, the optimization algorithm introduces a constraint processing mechanism to ensure that all output control actions are within the feasible range. Finally, the optimal control action sequence is obtained, which indicates the roll angle, pitch angle, and yaw angle of the drone.
[0119] Optional, see Figure 3 If the UAV does not fall into the local optimal point, the gravitational force on the UAV is determined according to the current position of the UAV and the target point position, and the total repulsion on the UAV is determined according to the current position of the UAV, the position of the obstacle and the repulsion gain coefficient. After that, the flight attitude of the UAV is adjusted according to the gravitational force and the total repulsion, and the step of judging whether the UAV has reached the target point position based on the current position of the UAV is re-executed after a preset time period until the UAV reaches the target point position.
[0120] In this embodiment, if the drone is not trapped in the local optimal point, there is no need to apply traction to the drone. At this time, the gravity and total repulsion of the drone are directly determined based on the current position of the drone and the target point position, as well as the position of the obstacle and the repulsion gain coefficient. Afterwards, the resultant force of the drone at the current position is obtained based on the gravity and total repulsion of the drone, and the expected deflection angle of the drone is determined based on the resultant force, and the roll angle, pitch angle and yaw angle of the drone are determined based on the expected deflection angle. Finally, the flight attitude of the drone is adjusted based on the roll angle, pitch angle and yaw angle. And after a preset time period, the step of judging whether the drone has reached the target point position based on the current position of the drone is re-executed until the drone reaches the target point position.
[0121] In this embodiment, the specific process and principle of determining the gravitational force and total repulsive force exerted on the drone, and adjusting the flight posture of the drone can be referred to the relevant description in the aforementioned embodiment, which will not be repeated here.
[0122] The inspection drone obstacle avoidance method provided by the embodiment of the present application uses the current position of the drone as the position of the virtual obstacle when the drone fails to reach the target point and falls into the local optimal point. At the same time, the flight attitude of the drone is adjusted according to the calculated gravity, traction and total repulsion of the drone, and then re-judged whether the drone has reached the target point until the drone reaches the target point. When calculating the repulsion, the present application adjusts the repulsion gain coefficient from a fixed value to a dynamic value that changes dynamically with the distance between the current position of the drone and the target point, so that the repulsion and gravity of the drone are balanced in order of magnitude, thereby improving the drone's obstacle avoidance efficiency and accuracy; when the drone falls into the local optimal point, the current position of the drone is used as the position of the virtual obstacle, and a traction force is applied to the drone based on gravity, so that the drone can quickly get rid of the local optimal point, further improving the drone's obstacle avoidance efficiency and accuracy.
[0123] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0124] Figure 5 Schematic diagram of the structure of the inspection drone obstacle avoidance device provided in one embodiment of the present application. Figure 5 As shown, the inspection drone obstacle avoidance device provided in this embodiment may include: an acquisition module 501, a judgment module 502, a determination module 503 and an adjustment module 504.
[0125] The acquisition module 501 is used to acquire the target point position of the drone and the position of obstacles in the inspection site.
[0126] The judgment module 502 is used to judge whether the drone has reached the target point based on the current position of the drone, and to judge whether the drone is trapped in a local optimal point when the drone has not reached the target point. When the drone is trapped in a local optimal point, the current position of the drone is used as the position of the virtual obstacle.
[0127] The determination module 503 is used to determine the gravitational force exerted on the drone according to the current position of the drone and the target point position, and determine the traction force exerted on the drone based on the gravitational force, and determine the total repulsion exerted on the drone according to the current position of the drone, the position of the obstacle, the position of the virtual obstacle and the repulsion gain coefficient; the repulsion gain coefficient is determined according to the current position of the drone and the target point position.
[0128] The adjustment module 504 is used to adjust the flight attitude of the drone according to the gravity, the traction force and the total repulsion, and re-execute the step of determining whether the drone has reached the target point based on the current position of the drone after a preset time period until the drone reaches the target point.
[0129] Optionally, the determination module 503 is further configured to:
[0130] According to the current position of the UAV and the position of the target point, a first direction vector from the current position of the UAV to the position of the target point is determined;
[0131] Based on the first direction vector and the gravity gain coefficient, the magnitude and direction of the gravity acting on the UAV are determined.
[0132] Optionally, the determination module 503 is further configured to:
[0133] Determining the magnitude of the traction force applied to the UAV according to the magnitude of the gravitational force and the traction force gain coefficient;
[0134] Based on the vertical direction of the direction of the gravitational force, the direction of the traction force on the drone is determined.
[0135] Optionally, there are multiple obstacles; the determination module 503 is further used for:
[0136] Determining a repulsion gain coefficient based on the first direction vector and a preset coefficient;
[0137] Taking virtual obstacles as obstacles, for each obstacle, the repulsion force exerted on the drone by the obstacle is determined according to the current position of the drone, the position of the obstacle and the repulsion gain coefficient;
[0138] The repulsive forces of all obstacles acting on the drone are vector-added to obtain the total repulsive force acting on the drone.
[0139] Optionally, the determination module 503 is further configured to:
[0140] For each obstacle, based on the current position of the drone, determine whether the drone is within the repulsive potential field of the obstacle;
[0141] If the drone is within the repulsive potential field of the obstacle, determine a second direction vector of the drone from the current position to the position of the obstacle according to the current position of the drone and the position of the obstacle, and determine the magnitude and direction of the repulsive force of the obstacle on the drone based on the second direction vector and the repulsive gain coefficient;
[0142] If the drone is not within the repulsive potential field of the obstacle, it is determined that the repulsive force of the obstacle on the drone is 0.
[0143] Optionally, the determination module 502 is further configured to:
[0144] Based on the current position of the drone, determine whether the drone is within the preset range of the target point position;
[0145] If the UAV is within the preset range of the target point location, it is determined that the UAV has reached the target point location;
[0146] If the drone is not within the preset range of the target point location, it is determined that the drone has not reached the target point location.
[0147] Optionally, the determination module 502 is further configured to:
[0148] Acquire multiple real-time positions of the drone at previous moments; the multiple real-time positions at previous moments are the real-time positions of the drone at a preset number of moments before the current moment;
[0149] If the distances between the current position of the drone and the positions of multiple previous real-time positions at adjacent moments are all less than the preset distance threshold, it is determined that the drone is trapped in a local optimal point; otherwise, it is determined that the drone is not trapped in a local optimal point.
[0150] Optionally, the adjustment module 504 is further configured to:
[0151] According to the gravitational force, the traction force and the total repulsive force, the resultant force acting on the UAV at the current position is obtained;
[0152] Based on the resultant force, determining a desired deflection angle of the UAV, and determining a roll angle, a pitch angle, and a yaw angle of the UAV based on the desired deflection angle;
[0153] The flight attitude of the UAV is adjusted according to the roll angle, pitch angle and yaw angle.
[0154] Optionally, the determination module 503 is further configured to:
[0155] When the UAV is not trapped in the local optimal point, the gravitational force on the UAV is determined according to the current position of the UAV and the position of the target point, and the total repulsive force on the UAV is determined according to the current position of the UAV, the position of the obstacle and the repulsive gain coefficient;
[0156] Accordingly, the adjustment module 504 is further used for:
[0157] The flight attitude of the drone is adjusted according to the gravitational force and the total repulsive force, and the step of determining whether the drone has reached the target point based on the current position of the drone is re-executed after a preset time period until the drone reaches the target point.
[0158] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0159] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0160] Those of ordinary skill in the art will appreciate that the templates, units, and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0161] If the module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal and software distribution medium.
[0162] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for avoiding obstacles for inspection drones, characterized in that: include: Obtain the target point position of the drone and the position of obstacles in the inspection site; Based on the current position of the drone, determine whether the drone has reached the target point, and if the drone has not reached the target point, determine whether the drone is trapped in a local optimal point. If the drone is trapped in a local optimal point, use the current position of the drone as the position of the virtual obstacle. Determine the gravitational force on the drone according to the current position of the drone and the position of the target point, determine the traction force on the drone based on the gravitational force, and determine the total repulsion on the drone according to the current position of the drone, the position of the obstacle, the position of the virtual obstacle and the repulsion gain coefficient; The repulsion gain coefficient is determined according to the current position of the UAV and the position of the target point; The flight attitude of the drone is adjusted according to the gravity, the traction force and the total repulsion, and the step of determining whether the drone has reached the target point based on the current position of the drone is re-executed after a preset time period until the drone reaches the target point.
2. The inspection drone obstacle avoidance method according to claim 1, characterized in that: Determining the gravitational force on the drone according to the current position of the drone and the position of the target point includes: According to the current position of the UAV and the position of the target point, a first direction vector from the current position of the UAV to the position of the target point is determined; Based on the first direction vector and the gravity gain coefficient, the magnitude and direction of the gravity acting on the UAV are determined.
3. The inspection drone obstacle avoidance method according to claim 2, characterized in that: The determining the traction force exerted on the drone based on the gravity comprises: Determining the magnitude of the traction force applied to the UAV according to the magnitude of the gravitational force and the traction force gain coefficient; Based on the vertical direction of the direction of the gravitational force, the direction of the traction force on the drone is determined.
4. The inspection drone obstacle avoidance method according to claim 2, characterized in that: There are multiple obstacles; The method of determining the total repulsion force on the drone according to the current position of the drone, the position of the obstacle, the position of the virtual obstacle and the repulsion gain coefficient includes: Determining a repulsion gain coefficient based on the first direction vector and a preset coefficient; Taking virtual obstacles as obstacles, for each obstacle, the repulsion force exerted on the drone by the obstacle is determined according to the current position of the drone, the position of the obstacle and the repulsion gain coefficient; The repulsive forces of all obstacles acting on the drone are vector-added to obtain the total repulsive force acting on the drone.
5. The inspection drone obstacle avoidance method according to claim 4, characterized in that: For each obstacle, the repulsion force exerted on the drone is determined based on the current position of the drone, the position of the obstacle, and the repulsion gain coefficient, including: For each obstacle, based on the current position of the drone, determine whether the drone is within the repulsive potential field of the obstacle; If the drone is within the repulsive potential field of the obstacle, determine a second direction vector of the drone from the current position to the position of the obstacle according to the current position of the drone and the position of the obstacle, and determine the magnitude and direction of the repulsive force of the obstacle on the drone based on the second direction vector and the repulsive gain coefficient; If the drone is not within the repulsive potential field of the obstacle, it is determined that the repulsive force of the obstacle on the drone is 0.
6. The inspection drone obstacle avoidance method according to any one of claims 1 to 5, characterized in that: The step of determining whether the drone has reached the target point based on the current position of the drone includes: Based on the current position of the drone, determine whether the drone is within the preset range of the target point position; If the UAV is within the preset range of the target point location, it is determined that the UAV has reached the target point location; If the drone is not within the preset range of the target point location, it is determined that the drone has not reached the target point location.
7. The inspection drone obstacle avoidance method according to any one of claims 1 to 5, characterized in that: The step of judging whether the drone is trapped in a local optimal point comprises: Acquire multiple real-time positions of the drone at previous moments; the multiple real-time positions at previous moments are the real-time positions of the drone at a preset number of moments before the current moment; If the distances between the current position of the drone and the positions of the drone at adjacent moments in the real-time positions of multiple previous moments are all less than the preset distance threshold, it is determined that the drone is trapped in the local optimal point; otherwise, it is determined that the drone is not trapped in the local optimal point.
8. The inspection drone obstacle avoidance method according to any one of claims 1 to 5, characterized in that: The step of adjusting the flight attitude of the drone according to the gravity, the traction force and the total repulsion force comprises: According to the gravitational force, the traction force and the total repulsive force, the resultant force acting on the UAV at the current position is obtained; Based on the resultant force, determining a desired deflection angle of the UAV, and determining a roll angle, a pitch angle, and a yaw angle of the UAV based on the desired deflection angle; The flight attitude of the UAV is adjusted according to the roll angle, pitch angle and yaw angle.
9. The inspection drone obstacle avoidance method according to any one of claims 1 to 5, characterized in that: The method further comprises: If the UAV is not trapped in the local optimal point, the gravitational force on the UAV is determined according to the current position of the UAV and the position of the target point, and the total repulsive force on the UAV is determined according to the current position of the UAV, the position of the obstacle and the repulsive gain coefficient; The flight attitude of the drone is adjusted according to the gravitational force and the total repulsive force, and the step of determining whether the drone has reached the target point based on the current position of the drone is re-executed after a preset time period until the drone reaches the target point.
10. An obstacle avoidance device for an inspection drone, characterized in that: include: The acquisition module is used to obtain the target point position of the drone and the position of obstacles in the inspection site; A judgment module is used to judge whether the drone has reached the target point based on the current position of the drone, and if the drone has not reached the target point, to judge whether the drone has fallen into a local optimal point. If the drone has fallen into a local optimal point, the current position of the drone is used as the position of the virtual obstacle; A determination module, used to determine the gravitational force exerted on the drone according to the current position of the drone and the position of the target point, and determine the traction force exerted on the drone based on the gravitational force, and determine the total repulsion exerted on the drone according to the current position of the drone, the position of the obstacle, the position of the virtual obstacle and the repulsion gain coefficient; The repulsion gain coefficient is determined according to the current position of the UAV and the position of the target point; The adjustment module is used to adjust the flight attitude of the drone according to the gravity, the traction force and the total repulsion, and re-execute the step of judging whether the drone has reached the target point based on the current position of the drone after a preset time period until the drone reaches the target point.
Citation Information
Patent Citations
Unmanned aerial vehicle three-dimensional formation method based on improved artificial potential field method
CN110377055A
Mobile robot path planning method based on A* algorithm and artificial potential field algorithm
CN111736611A
Unmanned aerial vehicle track obstacle avoidance reconstruction method based on improved artificial potential field
CN111966125A
Unmanned aerial vehicle cluster three-dimensional formation method
CN112684807A
Unmanned aerial vehicle path planning method based on obstacle position prediction improved artificial potential field method in unknown environment
CN113342047A
Cited By
Substation unmanned aerial vehicle autonomous inspection method and system
CN120428756A
Multi-unmanned aerial vehicle high-speed dynamic flight formation control method, system and equipment
CN120631024A