Unmanned aerial vehicle path planning inspection method based on three-dimensional model and electric quantity constraint

Through the use of three -dimensional model planning methods in complex environments, combined with power constraints, the problem of low efficiency, poor path, and insufficient power in traditional methods have been solved. Essence

CN119356397AInactive Publication Date: 2025-01-24DONGFANG ELECTRONICS CO LTD

Patent Information

Application Number
CN202411942723.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-01-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional drone path planning methods are inefficient in complex environments, the path is not smooth enough, and power consumption is not fully considered, resulting in drones returning early due to insufficient power during missions.

Method used

Adopt a three -dimensional model planning method, combined with the power constraints, through the construction of three -dimensional models, set up inspection sites, screening areas, and design improvement algorithms for obstacles. Essence

Benefits of technology

The efficient, safe and reliable dynamic path planning in complex environments has been realized, and the flight stability and inspection efficiency of drones are improved, and the task is successfully completed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356397A_ABST
    Figure CN119356397A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of unmanned aerial vehicle autonomous navigation, and particularly relates to an unmanned aerial vehicle path planning inspection method based on a three-dimensional model and electric quantity constraint, which comprises the following steps: constructing a three-dimensional model, and setting inspection points on the three-dimensional model; defining an inspection area and an overhaul area, judging the area to which the inspection point belongs, and if the inspection point is located in the inspection area, clearly marking the inspection point as the inspection point; if the inspection point is located in the maintenance area, marking the inspection point as a flying forbidding point; designing and executing an improved # imgabs0 # algorithm to plan an obstacle avoidance path, and optimizing the path to obtain a preliminary inspection path; calculating the total power consumption of the single-circle path, and comparing the calculated power consumption with a preset safety threshold; if the power consumption is within a preset safety threshold range, the path is included into a final inspection route; and if the preset safety threshold value is exceeded, executing a circle dividing strategy. The problems that traditional path planning is low in efficiency, the path is not smooth enough, and power consumption is not fully considered are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of autonomous navigation of unmanned aerial vehicles, and in particular relates to a method for unmanned aerial vehicle path planning and inspection based on a three-dimensional model and power constraints. Background Art

[0002] With the continuous advancement of drone technology, its application scope in various inspection tasks is rapidly expanding, especially in the inspection of key infrastructure such as power substations, bridges, ports, etc., showing great potential and value. However, in practical applications, drone inspection still faces a series of technical challenges, especially in path planning in complex environments.

[0003] Traditional path planning methods mostly rely on manual design or simple straight-line connections, which are incapable of coping with complex and changing inspection environments. Not only are they inefficient, but they also pose significant safety risks and are difficult to adapt to dynamically changing inspection task requirements.

[0004] Classic The algorithm can generate obstacle avoidance paths to a certain extent, but when dealing with large-scale inspection tasks, its planning efficiency is often seriously affected, and the generated path is not smooth enough, which will affect the flight stability and inspection efficiency of the drone. More importantly, The algorithm does not fully consider the power consumption of the drone when planning the path, which may cause the drone to return early due to insufficient power during the mission, thus affecting the smooth completion of the inspection mission.

[0005] In order to overcome these technical difficulties, the present invention proposes a UAV path planning and inspection method based on a three-dimensional model and power constraints. Summary of the invention

[0006] The present invention proposes a UAV path planning and inspection method based on a three-dimensional model and power constraints. The system aims to achieve more efficient, safe and reliable dynamic path planning by combining the environmental three-dimensional model and the power consumption of the UAV, so as to meet the needs of UAV inspection tasks in complex environments.

[0007] The technical solution of the present invention to solve the above technical problems is as follows: The present invention provides a UAV path planning inspection method based on a three-dimensional model and power constraints, comprising the following steps: Constructing a three-dimensional model, and setting inspection points on the three-dimensional model to form an inspection point set; Delineate inspection areas and maintenance areas, determine the area to which the inspection points belong, and screen the inspection points; if the inspection point is within the inspection area, clearly mark it as an inspection point; if the inspection point is within the maintenance area, mark it as a no-fly point and remove the no-fly point from the inspection point set; Design and implement improvements based on the selected inspection points The algorithm performs obstacle avoidance path planning and uses simulated annealing algorithm to optimize the path to obtain a preliminary inspection path; Based on the preliminary inspection path, the total power consumption of the single-circle inspection path is calculated, and the calculated power consumption is compared with the preset safety threshold; if the power consumption is within the preset safety threshold, this path is directly used as the final inspection route; if it exceeds the preset safety threshold, it is necessary to execute the circle strategy.

[0008] Furthermore, before determining the area to which the inspection point belongs and screening the inspection point, the following steps are also included: Set the drone related parameters, including the coordinates of the drone starting point, return power, safe flight distance, hovering time at the inspection point, power consumption per unit time, power consumption ratio of the drone during level flight, climbing, descending, hovering, and flight speed; A three-dimensional model obstacle pixel matrix, inspection point matrix, and inspection point distance matrix containing the location information of all environmental obstacles are constructed, and a flight power consumption matrix is ​​constructed considering the relevant parameters of the drone.

[0009] Furthermore, the construction of a three-dimensional model obstacle pixel matrix containing all environmental obstacle position information includes: reading environmental obstacle point cloud data and preprocessing the coordinate values ​​of the environmental obstacle point cloud data; removing duplicate coordinate points after preprocessing to obtain a unique coordinate point set and save it; loading the saved file, obtaining environmental obstacle point cloud data, filtering out points with heights less than a preset threshold, and calculating the maximum height of obstacles in the filtered point cloud; using the filtered point cloud data and a preset size coefficient, establishing a three-dimensional model obstacle pixel matrix obstacle_matrix, wherein each element in the obstacle pixel matrix obstacle_matrix identifies whether the position is an obstacle.

[0010] Furthermore, constructing the inspection point matrix includes: reading inspection point set data, the inspection point set data includes coordinate information of each inspection point, and each row of data represents a inspection point; traversing each row in the inspection point set data, extracting a coordinate string from each row, and converting the coordinate string into a floating point list; further converting the floating point list into a Numpy array to obtain a Numpy array containing the coordinates of all inspection points; converting the Numpy array into an inspection point matrix coordinates, in which each element corresponds to a point in three-dimensional space, and if the element is a inspection point, it is marked, otherwise it is free space.

[0011] Furthermore, the construction of the inspection point distance matrix includes: adding the coordinates of the drone starting point before the inspection point matrix coordinates to form a complete inspection coordinate set; defining a Manhattan distance calculation function, traversing all coordinate point pairs through a double-layer loop, calculating and filling the Manhattan distance between each pair of points into the initialized zero matrix, thereby generating a distance matrix distance_matrix.

[0012] Furthermore, the flight power consumption matrix is ​​constructed according to the relevant parameters of the drone, including: defining power consumption units for horizontal flight, ascent, descent and stop; designing a flight consumption calculation function according to the defined power consumption units, wherein the flight consumption calculation function is used to calculate the total power consumption of flying from one point to another, and convert the total consumption into consumption per minute; initializing a zero matrix of the same size as the distance matrix, traversing all coordinate point pairs through a double-layer loop, calculating and filling the flight consumption between each pair of points into the zero matrix, thereby generating a flight consumption matrix flight_consumption_matrix.

[0013] Furthermore, the determining of the area to which the inspection point belongs and screening of the inspection points includes: if a certain inspection point is determined to be located in the maintenance area, marking it as a no-fly point; and updating the value of the corresponding position in the three-dimensional model obstacle pixel matrix according to the position information of the no-fly point to indicate that the position is a no-fly zone.

[0014] Furthermore, the improvement In the algorithm, a dynamic weighted strategy is used to adjust the weight of the heuristic function, including: dynamically adjusting the weight factor according to the size of the heuristic function value, increasing the weight factor when the heuristic function value is greater than the preset threshold; reducing the weight factor when the heuristic function value is less than the preset threshold; and calculating the total cost by combining the actual cost and the weighted heuristic function value.

[0015] Furthermore, the improvement In the algorithm, the extended search direction includes six surface directions of up, down, left, right, front, and back, and the diagonal directions between the six surface directions.

[0016] Furthermore, the execution of the circle strategy includes: re-dividing the path that exceeds the power consumption threshold into multiple sub-paths, re-planning and calculating the power consumption, ensuring that the power consumption of each sub-path is within a safe range, and considering the three-dimensional obstacle pixel matrix at the same time, calculating the actual obstacle avoidance path between the starting point and the end point of each sub-path; integrating all sub-paths into the final inspection route.

[0017] Furthermore, the constructing of the three-dimensional model includes: constructing the three-dimensional model using oblique photography technology, setting and visualizing inspection points based on the three-dimensional model, and converting the three-dimensional model into a pcd point cloud model for path planning.

[0018] Compared with the prior art, the present invention has the following technical effects: (1) The present invention realizes autonomous inspection and obstacle avoidance in complex environments through the construction and processing of three-dimensional models, inspection point setting, multi-algorithm fusion path planning, and circle planning. It also fully considers power constraints and solves the problems of low efficiency, insufficient path smoothness, and insufficient consideration of power consumption in traditional path planning. This technology is widely applicable to UAV application fields such as substation power inspection and port inspection.

[0019] (2) In the present invention, multi-algorithm fusion optimization: improve The algorithm is combined with the simulated annealing algorithm to improve The algorithm uses a dynamic weighting strategy to adjust the weight of the heuristic function, flexibly changing the influence of the heuristic function according to the actual situation, and expanding the search direction to include six directions of up, down, left, right, front, and back, as well as the diagonal directions between them, expanding the search direction to 26, improving the path search efficiency and path smoothness; the simulated annealing algorithm searches for the optimal solution in a global range, effectively solving the traveling salesman problem and overcoming the traditional The shortcomings of the algorithm in large-scale inspection tasks.

[0020] (3) In the present invention, power constraints and circle planning fully consider the power consumption of the UAV. The power consumption of a single circle path is calculated during the path planning process, and circle planning is performed according to the power situation to ensure that the UAV can complete the inspection task safely and efficiently under limited power.

[0021] (4) In the present invention, three-dimensional model application and visualization display are carried out by using oblique photography technology to construct a three-dimensional model. Inspection point setting, path planning and visualization display are carried out based on the three-dimensional model. Operators can intuitively operate and monitor in a three-dimensional environment, providing more real and comprehensive information for drone inspections, which is superior to traditional two-dimensional planning and display methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0023] Figure 1 It is a schematic diagram of the process of the present invention; Figure 2 For classics The algorithm plans the path between two inspection points to bypass environmental obstacles (obstacles are not shown); Figure 3 The path between two inspection points that bypasses environmental obstacles is planned after adding weights to the heuristic function of the present invention (the obstacles are not shown); Figure 4 The present invention increases the search freedom and plans a path between two inspection points that bypasses environmental obstacles (obstacles are not shown). DETAILED DESCRIPTION

[0024] In order to further explain the technical means and effects taken by the present invention to achieve the predetermined invention purpose, the specific implementation methods, structures, features and effects of the technical solutions proposed by the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments. The specific features, structures or characteristics in one or more embodiments may be combined in any suitable form. Unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as those commonly understood by technicians in the technical field of the present invention.

[0025] In one embodiment of the present invention, referring to Figure 1-Figure 4 , provides a UAV path planning inspection method based on a three-dimensional model and power constraints, including: constructing a three-dimensional model, and setting inspection points on the three-dimensional model to form an inspection point set; demarcating inspection areas and maintenance areas, determining the area to which the inspection points belong, and screening the inspection points; if the inspection point is located in the inspection area, it is clearly marked as an inspection point; if the inspection point is located in the maintenance area, it is marked as a no-fly point and the no-fly point is removed from the inspection point set; designing and executing improvement measures based on the screened inspection points The algorithm performs obstacle avoidance path planning and uses the simulated annealing algorithm to optimize the path to obtain a preliminary inspection path. Based on the preliminary inspection path, the total power consumption of a single-circle inspection path is calculated, and the calculated power consumption is compared with the preset safety threshold. If the power consumption is within the preset safety threshold, this path is directly used as the final inspection route. If it exceeds the preset safety threshold, a circle strategy needs to be executed.

[0026] The following is a detailed explanation of each of the above steps: Step 100: construct a three-dimensional model, and set inspection points on the three-dimensional model to form an inspection point set.

[0027] In drone inspection missions, the construction of three-dimensional models and the reasonable setting of inspection points are important prerequisites for ensuring efficient and accurate completion of the mission.

[0028] In some embodiments, this step may include the following steps: Step 101: Image data acquisition.

[0029] Oblique photogrammetry is a spatial measurement technology that uses oblique angles to photograph the ground. Compared with traditional vertical photography, oblique photography can obtain more three-dimensional and comprehensive surface information.

[0030] Using oblique photography technology, multiple sensors are mounted on the flying platform to simultaneously collect images from five different angles, including one vertical, four oblique, etc. These photos from different angles allow observers to see the facade of the target area from multiple perspectives, not just the top.

[0031] Step 102: Generate a three-dimensional model.

[0032] Based on the collected image data, Context Capture is used to build 3D models in FBX / OBJ and 3DTiles formats corresponding to the real world. Among them, FBX (Filmbox) is a 3D model file format developed by Autodesk. OBJ file is a standard 3D model file format developed by Alias|Wavefront for the 3D modeling and animation software "Advanced Visualizer". 3DTiles is a 3D tile format proposed by Cesium, which aims to improve the loading and rendering efficiency of large-scale 3D models through tiling. Context Capture is a real-life modeling software launched by Bentley. It was originally named Smart3DCapture and later renamed Context Capture. This software can process image data into high-density point clouds to generate realistic 3D models.

[0033] Step 103: Generate an environmental obstacle point cloud model.

[0034] As the FBX / OBJ format model files are large and complex, in order to improve the efficiency of path planning, the generated FBX / OBJ format 3D models are imported and further processed using Cloud Compare software. Cloud Compare is a professional point cloud processing software that supports the import of point cloud data in multiple formats.

[0035] In Cloud Compare software, the sparsity of point cloud data is controlled by setting the point cloud sampling density to obtain the point cloud model of environmental obstacles. During path planning, the obstacle point cloud model is processed based on voxelization to simplify the calculation complexity.

[0036] In a specific embodiment, the point cloud sampling density is set to 0.1, which means that a portion of the points in the original point cloud will be retained, while other points will be eliminated, thereby reducing the total amount of point cloud data and improving the processing speed, while retaining sufficient information for subsequent path planning. After point cloud sparse sampling, it is saved in .pcd format.

[0037] Step 104: Perform visual display based on the Cesium component on the front end, set inspection points on the three-dimensional model, obtain the longitude and latitude data of the inspection points, and thus obtain the inspection point set.

[0038] 3D models in 3DTiles format contain longitude and latitude information. Cesium is an open source JavaScript library for creating 3D globes and maps, and supports loading 3D models in various formats.

[0039] The Cesium component is used for visualization at the front end, and inspection points are set on the three-dimensional model to obtain the latitude, longitude and altitude data of the inspection points, thereby obtaining the inspection point set. Inspection points can be key equipment in power substations, key parts of bridges, container yards at ports, etc. By setting inspection points, operators can ensure that the drone can accurately reach the target location for inspection during flight. The inspection point set will be used in the subsequent path planning algorithm to ensure that the drone can fly along the optimal path and reach each inspection point.

[0040] Step 200: According to the actual situation of the drone and the mission, set the drone related parameters, and use the environmental obstacle point cloud data and the inspection point set data to construct a three-dimensional obstacle pixel matrix, inspection point matrix, inspection point distance matrix and flight power consumption matrix.

[0041] In some embodiments, this step may include the following steps: Step 201: According to the actual situation of the drone and the mission, set the drone related parameters, including the drone starting point, return power, safe flight distance, hovering time at the inspection point, power consumption per unit time, power consumption ratio in different flight states, and flight speed.

[0042] The return power can be set to 20% of the total power to ensure that the drone has enough power to return after completing the mission; the safe flight distance is set to 1 meter as the minimum safe distance between the drone and obstacles; the hovering time at the inspection point is 30 seconds at each inspection point to perform specific inspection tasks; power consumption per unit time: the power consumed per unit time is determined according to the drone model and flight status (such as level flight, climb, descent, hover); the power consumption ratio of different flight status is assumed to be the baseline power consumption ratio, 0.5 for level flight, 0.8 for climb, 0.3 for descent, and 0.6 for hovering; the flight speed is set to 3 meters per second as the speed of the drone in level flight.

[0043] Step 202: Read the environmental obstacle point cloud data and construct a three-dimensional obstacle pixel matrix containing all obstacle position information.

[0044] Read the pcd file of the environmental obstacle point cloud three-dimensional model to obtain the environmental obstacle point cloud data, and round the coordinate values ​​in the environmental obstacle point cloud data to a precision of 0.005 to unify the coordinate precision; remove the repeated coordinate points after rounding to obtain a unique set of coordinate points; The obtained unique set of coordinate points is saved as an npy file to form a three-dimensional model obstacle matrix; Load the 3D model obstacle matrix npy file, filter the loaded environmental obstacle point cloud data, remove points whose height is less than the preset threshold to simplify the processing process, calculate and determine the maximum height of the obstacles in the filtered point cloud; use the filtered environmental obstacle point cloud data and the preset size coefficient to establish the obstacle pixel matrix obstacle_matrix, in which each element identifies whether the position is an obstacle.

[0045] Step 203: Read the inspection point set data, calculate the inspection point matrix coordinates, the inspection point distance matrix distance_matrix and the flight power consumption matrix flight_consumption_matrix.

[0046] Inspection point matrix coordinates: read the inspection point set data file in txt format, which contains the coordinate information of the inspection points. Each line represents a inspection point, and each inspection point includes a point identifier and coordinate information; traverse each line in the inspection point set data file, extract the coordinate string of each line, and convert it into a floating-point coordinate list; convert the floating-point coordinate list into a Numpy array to obtain an array containing the coordinates of all inspection points; convert the array into the inspection point matrix coordinates, where each element of the matrix corresponds to a point in three-dimensional space. If the element is a inspection point, it is marked, otherwise it is free space.

[0047] Distance matrix distance_matrix: First, add the coordinates of the drone starting point before the inspection point matrix coordinates to form a complete inspection coordinate set; then, define the Manhattan distance calculation function, traverse all coordinate point pairs through a double loop, calculate and fill the Manhattan distance between each pair of points into the initialized zero matrix, thereby generating the distance matrix distance_matrix; finally, save the generated distance matrix as a Numpy format npy file for subsequent use.

[0048] Flight power consumption matrix flight_consumption_matrix: First, define the power consumption units for horizontal flight, ascent, descent, and stop; then, based on the defined power consumption units, design a flight consumption calculation function, which can calculate the power consumption of flying from one point to another, including horizontal flight consumption and vertical flight consumption (distinguishing between ascent and descent), and convert the total consumption into per minute consumption; then, initialize a zero matrix of the same size as the distance matrix, traverse all coordinate point pairs through a double-layer loop, calculate and fill the flight consumption between each pair of points into the matrix, thereby generating the flight consumption matrix flight_consumption_matrix; finally, save the generated flight consumption matrix as a Numpy format npy file to provide important data support for flight path planning or energy consumption analysis.

[0049] Step 300: Delineate the inspection area and maintenance area, determine the area to which the inspection point belongs, and screen the inspection points; if the inspection point is located in the inspection area, clearly mark it as an inspection point; if the inspection point is located in the maintenance area, mark it as a no-fly point and remove the no-fly point from the inspection point set.

[0050] On the visual interface, the operator draws a polygonal bounding box to define the inspection area and the maintenance area. Each polygonal bounding box consists of a series of vertex coordinates that define the shape and position of the polygon. The vertex coordinates of each polygonal bounding box are passed to the shapely.geometry.Polygon class to create a corresponding Polygon object, which represents the geometric shape of the inspection area and the maintenance area.

[0051] Read the location information of the inspection point and determine the area to which the inspection point belongs. For each inspection point, use the contains() method of the Polygon object to determine whether it is located in a maintenance area. The contains() method returns a Boolean value indicating whether the inspection point is inside the polygon represented by the Polygon object.

[0052] If a patrol point is determined to be within the maintenance area, it will be marked as a no-fly point, which means that drones should avoid flying over these points when performing missions.

[0053] According to the location information of the no-fly point, the value of the corresponding position in the three-dimensional obstacle matrix is ​​updated to indicate that the position is a no-fly zone. This can be achieved by setting the value of the position of the no-fly point to a specific value (such as 1 for an obstacle and 0 for an empty space).

[0054] After completing the marking of the no-fly points, all inspection points within the inspection area are accurately screened out based on the clear division between the inspection area and the maintenance area.

[0055] On the visual interface, inspection areas, maintenance areas and no-fly points are displayed in different colors or icons, which helps operators to intuitively understand the flight range and no-fly zones of the drone.

[0056] Step 400: Design and implement improvements based on the selected inspection points The algorithm performs obstacle avoidance path planning and uses simulated annealing algorithm to optimize the path to obtain a preliminary inspection path.

[0057] Heuristic function is used to estimate the cost from the current node to the target node. In the algorithm, the heuristic function usually only considers the distance between nodes, such as Euclidean distance or Manhattan distance.

[0058] (1) Improvement of heuristic function: using dynamic weighting strategy to adjust The heuristic function weight in the algorithm accelerates the path search efficiency of large-scale inspection tasks, allowing the algorithm to give priority to nodes closer to the target and reduce the search range.

[0059] In order to more flexibly control the path selection, the heuristic function value is calculated according to the distance between nodes and the target point position, and a weight factor is introduced. The weight factor is calculated based on the difference between the heuristic function value and the preset threshold (such as ) to dynamically adjust the comparison results. When the heuristic function value is greater than the preset threshold, the weight factor can be increased to make the algorithm more inclined to select nodes closer to the target point; when the heuristic function value is less than the preset threshold, the weight factor can be reduced to search the path more finely.

[0060] Specifically, the weight factor is dynamically adjusted according to the value of the heuristic function. The initial setting weight = 2.5 is used. When the weight is reduced, set weight = 1. Combine the actual cost new_node.g and the weighted heuristic function value Calculate the total cost new_node.f and implement the dynamic weighted strategy through formula (1): (1); By dynamically adjusting the weights, the algorithm can use different heuristic function weights at different search stages, thereby ensuring the search efficiency while maintaining the optimality of the path as much as possible. Figure 2 , Figure 3 shown.

[0061] Increase search freedom: The algorithm's search direction is expanded from four directions of up, down, left and right in two-dimensional space to 26 directions in three-dimensional space, improving the smoothness and flexibility of the path.

[0062] In three-dimensional space, the search freedom can be significantly increased to explore more possible paths, thereby improving the smoothness and flexibility of the path. For each dimension (x, y, z), offsets of +1 and -1 can be considered, as well as their combinations, to generate 26 neighboring nodes, including six basic directions (up, down, left, right, front, back) and various diagonal directions between them.

[0063] Each direction corresponds to an offset vector in three-dimensional space: up (0,0,+1), down (0,0,−1), left (−1,0,0), right (+1,0,0), front (0,+1,0), back (0,−1,0); 12 two-dimensional diagonal directions: upper left (−1, 0, +1), upper right (+1, 0, +1), upper front (0, +1, +1), upper back (0, −1, +1), lower left (−1, 0, −1), lower right (+1, 0, −1), lower front (0, +1, −1), lower back (0, −1, −1), left front (−1, +1, 0), left back (−1, −1, 0), right front (+1, +1, 0), right back (+1, −1, 0); 6 three-dimensional diagonal directions: upper left front (−1, +1, +1), upper left back (−1, −1, +1), upper right front (+1, +1, +1), upper right back (+1, −1, +1), lower left front (−1, +1, −1), lower left back (−1, −1, −1), lower right front (+1, +1, −1), lower right back (+1, −1, −1).

[0064] Specifically, it is achieved by modifying the neighbors variable, changing the original formula (2) to formula (3): (2); neighbors= np.arry([[0,0,-1],[0,0,1],[0,-1,0],[0,1,0],[-1,0,0],[1,0,0],[- 1,0,-1],[1,0,-1],[0,-1,-1],[0,1,-1],[-1,-1,-1],[-1,1,-1],[1,-1 ,-1],[1,1,-1],[-1,-1,0],[-1,1,0],[1,-1,0],[1,1,0],[-1,0,1],[1, 0,1],[0,-1,1],[0,1,1],[-1,-1,1],[-1,1,1],[1,-1,1],][1,1,1])(3); In the above formula, neighbors represents the search direction matrix; np.array represents the NumPy array.

[0065] like Figure 4 As shown, a smoother and more efficient flight path is generated.

[0066] (3) Simulated annealing algorithm: The simulated annealing algorithm is used to search for the optimal solution globally. It is suitable for complex path planning problems.

[0067] Use the solve_tsp_simulated_annealing function in the python_tsp.heuristics library to obtain the shortest path between inspection points, that is, the preliminary path.

[0068] Step 500: Based on the preliminary inspection path, calculate the total power consumption of the single-circle inspection path, and compare the calculated power consumption with the preset safety threshold; if the power consumption is within the preset safety threshold, this path is directly used as the final inspection route; if it exceeds the preset safety threshold, it is necessary to execute the circle strategy.

[0069] In drone inspection missions, path planning needs to take into account the shortest distance and power consumption. The goal is to ensure that after the drone completes a round of inspection, its power consumption does not exceed the preset safety threshold, so that the drone can return smoothly and recharge.

[0070] In some embodiments, this step may include the following steps: Step 510: Based on the preliminary path obtained by the simulated annealing algorithm, combined with information such as power consumption per unit time, power consumption ratio in flight state, and path length, the power consumption of a single-circle path is calculated.

[0071] Step 520: Determine whether the power consumption meets the requirements, and compare the calculated power consumption with the preset safety threshold; if the power consumption is within the preset threshold range, this path is directly included in the final inspection route; if it exceeds the threshold, it is necessary to execute the circle strategy.

[0072] The safety threshold can be the sum of the return power and the safety power margin, such as 30% of the total power; if the power consumption is less than or equal to the sum of the preset return power and the safety power margin, the path is determined to be a feasible inspection path, and this path is directly included in the final inspection route; if the power consumption is greater than the sum of the preset return power and the safety power margin, the path is re-divided into multiple sub-paths, and the power consumption is re-planned and calculated to ensure that the power consumption of each sub-path is within a safe range. At the same time, considering the three-dimensional obstacle matrix, the actual obstacle avoidance path is calculated between the starting point and the end point of each sub-path to ensure that the drone can avoid all obstacles during flight; all sub-paths are integrated into the final inspection route to ensure that the drone can complete the inspection task safely and efficiently according to the route.

[0073] Step 600: Data preservation and real-time path update.

[0074] The pickle library is used to save the path planning results and obstacle avoidance paths of each mission as files, which is convenient for subsequent debugging and backtracking. In addition, it supports real-time updating of the inspection path of the drone, so that it can dynamically adjust the path during flight to deal with new obstacles or changes in power consumption.

[0075] Step 700: Route packaging.

[0076] Use pymavlink and Dronekit libraries to write scripts to convert the planned path information into a route format executable by the drone, such as writing a .kml or .kmz file, which can be directly imported into the drone flight control system to perform autonomous inspection tasks.

[0077] Step 800: Three-dimensional visualization display.

[0078] The route file is imported into the UAV flight platform for verification, and a three-dimensional visualization display is performed on the front end of the UAV route planning system, including 3DTiles three-dimensional model, inspection point set, planned route and real-time location information of the UAV, so that users can fully monitor the inspection process.

[0079] The present invention provides an autonomous path planning inspection system for unmanned aerial vehicles based on a three-dimensional model and power constraints. Through the construction and processing of the three-dimensional model and the setting of inspection points, the path planning of multi-algorithm fusion, the circle planning and the three-dimensional visualization display, the autonomous inspection and obstacle avoidance functions in complex environments are realized, and the power constraints are fully considered, solving the problems of low efficiency of traditional path planning, insufficient smoothness of the path and insufficient consideration of power consumption. The technology is widely applicable to unmanned aerial vehicle application fields such as substation power inspection and port inspection.

[0080] The above embodiments 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 be included in the protection scope of the present invention.

Claims

1. A UAV path planning inspection method based on a three-dimensional model and power constraints, characterized in that: The following steps are involved: Constructing a three-dimensional model, and setting inspection points on the three-dimensional model to form an inspection point set; Delineate inspection areas and maintenance areas, determine the areas to which inspection points belong, and screen inspection points; If the inspection point is located within the inspection area, it is clearly marked as an inspection point; If the inspection point is located within the inspection area, it is marked as a no-fly point and removed from the inspection point set; Design and implement improvements based on the selected inspection points The algorithm performs obstacle avoidance path planning and uses simulated annealing algorithm to optimize the path to obtain a preliminary inspection path; Based on the preliminary inspection path, calculating the total power consumption of a single-circuit inspection path, and comparing the calculated power consumption with a preset safety threshold; If the power consumption is within the preset safety threshold, this path will be directly used as the final inspection route; If the preset safety threshold is exceeded, the circle division strategy needs to be implemented.

2. The method for UAV path planning and inspection based on three-dimensional model and power constraint according to claim 1 is characterized in that: Before determining the area to which the inspection point belongs and screening the inspection points, the following steps are also included: Set the drone related parameters, including the coordinates of the drone starting point, return power, safe flight distance, hovering time at the inspection point, power consumption per unit time, power consumption ratio of the drone during level flight, climbing, descending, hovering, and flight speed; A three-dimensional model obstacle pixel matrix, inspection point matrix and inspection point distance matrix containing the location information of all environmental obstacles are constructed, and a flight power consumption matrix is ​​constructed based on the relevant parameters of the drone.

3. The method for UAV path planning and inspection based on three-dimensional model and power constraint according to claim 2 is characterized in that: The method of constructing a three-dimensional model obstacle pixel matrix including all environmental obstacle position information includes: reading environmental obstacle point cloud data, and preprocessing the coordinate values ​​of the environmental obstacle point cloud data; removing duplicate coordinate points after preprocessing to obtain a unique coordinate point set and save it; loading the saved file, obtaining environmental obstacle point cloud data, filtering out points with heights less than a preset threshold, and calculating the maximum height of obstacles in the filtered point cloud; and using the filtered point cloud data and a preset size coefficient to establish a three-dimensional model obstacle pixel matrix obstacle_matrix, wherein each element in the obstacle pixel matrix obstacle_matrix identifies whether the position is an obstacle.

4. The method for UAV path planning and inspection based on three-dimensional model and power constraint according to claim 2 is characterized in that: The construction of the inspection point matrix and the inspection point distance matrix includes: Inspection point matrix: read inspection point set data, the inspection point set data includes the coordinate information of each inspection point, and each row of data represents a inspection point; traverse each row in the inspection point set data, extract the coordinate string from each row, and convert the coordinate string into a floating point list; further convert the floating point list into a Numpy array, and obtain a Numpy array containing the coordinates of all inspection points; convert the Numpy array into an inspection point matrix coordinates, in which each element corresponds to a point in three-dimensional space, and if the element is an inspection point, it is marked, otherwise it is free space; Inspection point distance matrix: Add the coordinates of the drone starting point before the inspection point matrix coordinates to form a complete inspection coordinate set; define the Manhattan distance calculation function, traverse all coordinate point pairs through a double-layer loop, calculate and fill the Manhattan distance between each pair of points into the initialized zero matrix, thereby generating the distance matrix distance_matrix.

5. The method for UAV path planning and inspection based on three-dimensional model and power constraint according to claim 2 is characterized in that: The method of constructing a flight power consumption matrix based on the relevant parameters of the drone includes: defining power consumption units for horizontal flight, ascent, descent and stop; designing a flight consumption calculation function based on the defined power consumption units, wherein the flight consumption calculation function is used to calculate the total power consumption of flying from one point to another, and convert the total consumption into consumption per minute; initializing a zero matrix of the same size as the distance matrix, traversing all coordinate point pairs through a double-layer loop, calculating and filling the flight consumption between each pair of points into the zero matrix, thereby generating a flight consumption matrix flight_consumption_matrix.

6. The method for UAV path planning and inspection based on three-dimensional model and power constraint according to claim 2 is characterized in that: The method of determining the area to which the inspection point belongs and screening the inspection points includes: if a certain inspection point is determined to be located in the maintenance area, marking it as a no-fly point; and updating the value of the corresponding position in the three-dimensional model obstacle pixel matrix according to the position information of the no-fly point to indicate that the position is a no-fly zone.

7. The method for UAV path planning and inspection based on three-dimensional model and power constraint according to claim 1 is characterized in that: The improvements In the algorithm, a dynamic weighted strategy is used to adjust the weight of the heuristic function, including: dynamically adjusting the weight factor according to the size of the heuristic function value, increasing the weight factor when the heuristic function value is greater than the preset threshold; reducing the weight factor when the heuristic function value is less than the preset threshold; and calculating the total cost by combining the actual cost and the weighted heuristic function value.

8. The method for UAV path planning and inspection based on three-dimensional model and power constraint according to claim 7 is characterized in that: The improvements In the algorithm, the extended search direction includes six surface directions of up, down, left, right, front, and back, and the diagonal directions between the six surface directions.

9. The method for UAV path planning and inspection based on three-dimensional model and power constraint according to claim 2 is characterized in that: The execution of the circle division strategy includes: re-dividing the path that exceeds the power consumption threshold into multiple sub-paths, re-planning and calculating the power consumption, ensuring that the power consumption of each sub-path is within a safe range, and considering the three-dimensional obstacle pixel matrix at the same time, calculating the actual obstacle avoidance path between the starting point and the end point of each sub-path; integrating all sub-paths into a final inspection route.

10. The method for UAV path planning and inspection based on three-dimensional model and power constraint according to claim 1 is characterized in that: The three-dimensional model construction includes: using oblique photography technology to construct a three-dimensional model, setting and visualizing inspection points based on the three-dimensional model, and converting the three-dimensional model into a PCD point cloud model for path planning.

Citation Information

Patent Citations

  • Unmanned aerial vehicle inspection cable path planning method based on hybrid discrete grey wolf algorithm

    CN112683276A

  • Transformer substation unmanned aerial vehicle inspection path planning method and system and storage medium

    CN113741538A

  • Inspection path planning method and device, equipment and storage medium

    CN115145311A

  • Transformer substation ground pile device for intelligently controlling inspection route of unmanned aerial vehicle

    CN117707199A

  • Unmanned aerial vehicle intelligent navigation and camera system special for convertor station

    CN118089743A

Cited By

  • Intelligent heuristic algorithm generation method for unmanned aerial vehicle inspection path planning

    CN121349125A