Power grid inspection unmanned aerial vehicle ground effect flight three-dimensional route automatic generation method

CN122387102APending Publication Date: 2026-07-14GUANGXI HONGQIANG INTELLIGENT EQUIPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610762213.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-29
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

The existing power grid inspection drones lack sufficient automation and intelligence in their flight path planning technology, relying on human experience. Their environmental perception and modeling accuracy are insufficient, failing to achieve precise terrain-following flight and safe obstacle avoidance. Furthermore, the observation tasks are disconnected from the path planning, resulting in collision risks and blind spots in the planned flight paths.

Method used

By generating a 3D semantic scene model, the power grid equipment and terrain model are integrated to construct a 3D inspection task space. Collision detection and iterative adjustments are performed to plan a 3D path that avoids the threat space. Combined with B-spline curve smoothing, a 3D flight path that meets the dynamic performance of the UAV is generated and converted into control commands that can be parsed by the UAV flight control system.

Benefits of technology

It has achieved high-precision, fully automated power grid inspection route generation, ensuring safe obstacle avoidance and high-definition observation for drones, improving the efficiency and safety of inspections, and reducing reliance on professional pilots.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122387102A_ABST
    Figure CN122387102A_ABST
Patent Text Reader

Abstract

The application discloses a power grid inspection unmanned aerial vehicle ground-hugging flight three-dimensional route automatic generation method, relates to the technical field of unmanned aerial vehicle automatic control, and comprises the following steps: generating a group of initial observation points for covering target power grid equipment to-be-inspected components in a three-dimensional inspection task space; performing collision detection on each initial observation point and the three-dimensional threat space; for the observation points falling into the threat space, iteratively adjusting the observation points to outside the three-dimensional threat space while maintaining an unobstructed observation angle for the target components; and outputting a collision-free equipment observation point set. The application realizes fine and quantitative modeling of potential collision threats in the flight environment by constructing a three-dimensional threat space containing terrain undulating areas and non-target equipment components and generating accurate three-dimensional safety envelopes for the equipment components through a computational geometry method, so that the path planning algorithm can perform accurate collision detection, and the safety of the unmanned aerial vehicle in the dense equipment area is significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of unmanned aerial vehicle (UAV) automatic control technology, and in particular to a method for automatically generating three-dimensional flight paths for power grid inspection UAVs that mimic terrain. Background Technology

[0002] With the continuous expansion of my country's power grid and the increasing sophistication of its operational standards, regular and efficient inspections of transmission lines and their ancillary facilities have become a crucial link in ensuring the safe and stable operation of the power grid. In recent years, unmanned aerial vehicle (UAV) technology has been widely used in power grid inspections due to its flexibility, efficiency, and low cost. However, transmission corridors are typically very complex environments, often traversing mountains, valleys, forests, and other undulating terrains, and the lines contain various equipment such as conductors, towers, and insulator strings. This poses a significant challenge to the autonomous flight and precise observation of UAVs. To achieve refined inspections, UAVs not only need to fly close to the terrain or equipment (i.e., terrain-following flight) to obtain high-definition images, but also must ensure absolute safety throughout the flight, avoiding collisions with terrain or non-target equipment. Therefore, how to automatically generate a three-dimensional flight path for inspection UAVs that accurately follows the terrain, safely avoids obstacles, and meets their own flight performance requirements has become a core challenge restricting the development of UAV inspection technology towards full automation and intelligence.

[0003] Currently, existing power grid inspection drone flight path planning technologies mainly rely on manual pre-programming or simple path planning based on 2D maps. Operators typically need to manually set a series of waypoints and flight altitudes based on 2D satellite maps and experience. This method is not only labor-intensive and inefficient, but also heavily reliant on operator experience and struggles to handle subtle obstacles in complex 3D environments. Although some advanced solutions have begun to use 3D models for pre-planning, these methods mostly have significant limitations: First, the generated flight paths are often based on a "pseudo-3D" path with an average altitude, failing to be tightly coupled with a real, high-precision terrain model, and thus unable to achieve true adaptive terrain-following flight; second, the entire equipment model is usually treated as a single obstacle during the planning process, lacking detailed observation perspective planning for specific inspected components, as well as component-level safety obstacle avoidance capabilities with non-target equipment components; third, path search and smoothing algorithms often do not fully consider the dynamic constraints of the drone, potentially leading to excessively curved and abruptly turned flight paths that exceed the drone's actual maneuverability, affecting flight stability and safety.

[0004] The existing technologies have the following prominent problems: First, the level of automation and intelligence is insufficient, relying heavily on human experience, resulting in low planning efficiency and poor consistency; second, the accuracy of environmental perception and modeling is insufficient, failing to integrate high-precision terrain, equipment models, and security threats into a semantic model, leading to planned flight paths that are "out of touch with reality" or pose a collision risk; third, the observation task is disconnected from the flight path, failing to organically integrate the core inspection requirement of "unobstructed observation" with path planning, which may lead to blind spots in shooting; finally, the feasibility of the path is not adequately considered, and the planned theoretical path does not fully take into account the physical motion limits of the UAV, making it difficult to execute the automatically generated flight path in actual flight.

[0005] Therefore, it is essential to develop a method for automatically generating three-dimensional flight paths for power grid inspection drones to solve the above problems. Summary of the Invention

[0006] The purpose of this invention is to provide a method for automatically generating three-dimensional flight paths for power grid inspection drones to mimic terrain, in order to solve the problems mentioned in the background art.

[0007] To achieve the above objectives, the present invention provides the following technical solution: a method for automatically generating three-dimensional flight paths for power grid inspection UAVs following terrain-following flight, specifically including the following steps:

[0008] S1. Obtain the three-dimensional digital surface model of the inspection area and the three-dimensional model of the power grid equipment, and fuse the three-dimensional model of the power grid equipment with the three-dimensional digital surface model according to its real geographic coordinates to form a three-dimensional semantic scene model.

[0009] S2. Based on the target power grid equipment in the three-dimensional semantic scene model, a safety margin is added to generate a three-dimensional inspection task space; at the same time, the three-dimensional semantic scene model is analyzed, and the terrain undulation area and non-target equipment components are modeled as a three-dimensional threat space located inside the three-dimensional inspection task space.

[0010] S3. In the three-dimensional inspection task space, generate a set of initial observation points covering the target power grid equipment components to be inspected; perform collision detection between each initial observation point and the three-dimensional threat space; for observation points that fall into the threat space, iteratively adjust them to outside the three-dimensional threat space, while maintaining an unobstructed observation view of the target components, and output a set of collision-free equipment observation points.

[0011] S4. Using the set of observation points of the collision-free equipment as the necessary path points, plan an initial three-dimensional path that avoids the three-dimensional threat space within the three-dimensional inspection task space; process the initial three-dimensional path to ensure that the vertical distance between any point on the path and the surface of the three-dimensional digital ground model directly below is equal to the preset ground-simulating flight height, and generate a three-dimensional ground-simulating path.

[0012] S5. Smooth the three-dimensional terrain-following path and make the smoothed path meet the dynamic performance constraints of the UAV to generate the final three-dimensional flight path.

[0013] Preferably, the three-dimensional digital surface model is constructed using UAV-borne lidar point cloud data, specifically including: denoising and filtering the point cloud data, separating the surface point cloud, and generating a digital elevation model with a grid spacing of less than 0.2 meters based on the surface point cloud.

[0014] Preferably, the three-dimensional digital surface model further performs a point cloud preprocessing step on the lidar point cloud data: using a filtering algorithm based on statistical outlier removal to remove noise points, and using a point cloud interpolation algorithm based on Gaussian process to supplement the density of sparse areas of the point cloud.

[0015] Preferably, the step of modeling the terrain undulation area and non-target equipment components as a three-dimensional threat space, wherein a three-dimensional safety envelope is generated for the non-target equipment components, the specific generation method is as follows: through computational geometry processing, the triangular facet mesh of the equipment component is translated outward by a fixed safety distance along its normal vector direction, and the translated mesh is stitched together to form a closed envelope that wraps around the original component.

[0016] Preferably, the iterative adjustment to move it outside the three-dimensional threat space while maintaining an unobstructed viewing angle of the target component includes the following sub-steps:

[0017] S31. Calculate the directed displacement vector from the observation point to its nearest threat space boundary;

[0018] S32. Move the observation point along the vector by a preset step size;

[0019] S33. After the movement, use the ray projection method to determine whether there is a situation where the visual path between the observation point and the target component is blocked by the threatened space;

[0020] S34. If there is occlusion, backtrack to the previous position and reduce the step size, repeat the movement and judgment steps until a collision-free and visually visible position is found.

[0021] Preferably, the planning of an initial three-dimensional path that avoids the three-dimensional threat space adopts a path search method based on a three-dimensional grid map, wherein the cost of each grid cell is calculated by weighting the estimated flight distance through the cell and the reciprocal of the Euclidean distance between the cell and the nearest threat space grid cell.

[0022] Preferably, the three-dimensional terrain-following path is smoothed by fitting a cubic uniform B-spline curve, and the smoothed path meets the dynamic performance constraints of the UAV by calculating the radius of curvature at each point on the curve and constraining its minimum value to be greater than the minimum turning radius of the UAV.

[0023] Preferably, after the final three-dimensional flight path is generated, the following steps are also included:

[0024] The final three-dimensional flight path is converted into a sequence of control commands that can be parsed by the UAV flight control system. The three-dimensional coordinates, heading angle, and flight speed information of the flight path are encoded in time sequence and encapsulated into a standard mission file format.

[0025] The technical effects and advantages of this invention are as follows:

[0026] 1. This invention integrates a three-dimensional model of power grid equipment with a high-precision three-dimensional digital surface model based on real geographic coordinates to form a three-dimensional scene model containing geographic terrain and equipment semantic information. This achieves high-precision, integrated digital reconstruction of the inspection environment, providing an accurate and reliable environmental data foundation for subsequent route planning, and fundamentally avoiding the risk of route collisions or observation failures caused by inaccurate models.

[0027] 2. This invention constructs a three-dimensional threat space that includes terrain undulations and non-target equipment components, and generates an accurate three-dimensional safety envelope for the equipment components using computational geometry methods. This enables refined and quantitative modeling of potential collision threats in the flight environment, allowing the path planning algorithm to perform accurate collision detection and significantly improving the safety of UAVs flying in dense equipment areas.

[0028] 3. By employing a strategy combining iterative adjustment and ray projection when generating the observation point set of collision-free equipment, this invention ensures that while the observation points are located outside the threat space, it strictly maintains an unobstructed observation view of the target components. This allows for the coordinated optimization of the two core requirements of safe obstacle avoidance and effective observation at the source of path planning, thus guaranteeing the effectiveness of the inspection task and the quality of data collection.

[0029] 4. This invention performs three-dimensional path search using a set of collision-free observation points as necessary points, and then performs terrain-following altitude processing and B-spline curve-based smoothing optimization on the initial path, while applying curvature radius constraints. This achieves automatic generation from a "safe point set" to a "flyable path", ensuring that the final flight path strictly follows the terrain undulations and meets the actual dynamic performance of the UAV, thus guaranteeing the smoothness, stability and feasibility of the flight.

[0030] 5. This invention automatically converts the final three-dimensional flight path into a sequence of control commands that can be parsed by the UAV flight control system and encapsulates it into a standard mission file, realizing an end-to-end fully automated process from three-dimensional environment modeling to flight mission delivery. This greatly reduces the operational threshold and reliance on professional pilots, and improves the standardization and overall efficiency of power grid inspection operations. Attached Figure Description

[0031] Figure 1 This is a schematic diagram of the method steps of the present invention.

[0032] Figure 2 This is a schematic diagram of the three-dimensional threat space construction process of the present invention.

[0033] Figure 3 This is a detailed flowchart illustrating the iterative adjustment process of the observation points in this invention.

[0034] Figure 4 This is a schematic diagram of the path planning and smoothing process of the present invention. Detailed Implementation

[0035] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0036] This invention provides, for example Figure 1 The method for automatically generating a 3D flight path for a power grid inspection drone, as shown, includes the following steps:

[0037] S1. Obtain the three-dimensional digital surface model of the inspection area and the three-dimensional model of the power grid equipment, and fuse the three-dimensional model of the power grid equipment with the three-dimensional digital surface model according to its real geographic coordinates to form a three-dimensional semantic scene model.

[0038] Furthermore, in the above technical solution, the three-dimensional digital surface model is constructed using UAV-borne lidar point cloud data, specifically including: denoising and filtering the point cloud data, separating the surface point cloud, and generating a digital elevation model with a grid spacing of less than 0.2 meters based on the surface point cloud.

[0039] Furthermore, in the above technical solution, the three-dimensional digital surface model performs a point cloud preprocessing step on the lidar point cloud data: a filtering algorithm based on statistical outlier removal is used to remove noise points, and a point cloud interpolation algorithm based on Gaussian process is used to supplement the density of sparse areas of the point cloud.

[0040] It is important to know that constructing a high-precision 3D digital terrain model is the foundation for subsequent terrain-following flight. The specific process of constructing a 3D digital terrain model using UAV-borne lidar point cloud data includes:

[0041] Point cloud data preprocessing is a crucial step in ensuring the accuracy and reliability of the 3D digital terrain model. It specifically includes two core processes: noise removal and sparse region interpolation. Noise removal employs a filtering algorithm based on statistical outlier removal. Specifically, for each point P in the point cloud data... i Calculate the Euclidean distance from it to its K nearest neighbors (K is usually set to 20 to 50), and obtain the average value μ of these distances. i and standard deviation σ i Subsequently, a global distance threshold D is set. thresh =μ global +n*σ global , where μ global and σ global Let P be the mean and standard deviation of the average distance to all points, respectively, and n be the scaling factor, typically between 1.0 and 2.0. Finally, iterate through all points; if a point P... i average distance μ i Exceeding threshold D thresh If the point is identified as an outlier and removed from the point cloud data, it is considered an outlier and removed. Density replenishment in sparse regions employs a Gaussian process-based point cloud interpolation algorithm to repair sparse regions caused by occlusion or other factors. This process takes the spatial horizontal coordinates (X, Y) of the existing point cloud as input and the elevation value Z as the observed value. A covariance function (or kernel function, such as the squared exponential kernel function) is defined to characterize the correlation between spatial points. The hyperparameters of this covariance function, such as the length scale and signal variance, are optimized by maximizing the marginal likelihood function, resulting in a Gaussian process model that accurately fits the known observed points. For the target point (X, Y) to be interpolated within the sparse region... add Y add Using this model, its posterior predicted distribution is calculated, and its mean is taken as the elevation interpolation Z for that point. add This generates a continuous and complete estimate of the land surface elevation, laying the foundation for subsequent model construction.

[0042] Surface point cloud separation: The preprocessed point cloud contains ground points and non-ground points, such as vegetation and buildings. To separate pure surface point clouds, an improved progressive triangulation filtering algorithm is used. This algorithm first selects a batch of initial ground seed points to construct a sparse initial triangulation. Then, it iteratively traverses all points, determining their distance and angle relationships with the initial triangulation. If the distance between a point and the triangulation is below a set distance threshold (e.g., 0.5 meters) and the angle of the triangle formed by connecting these points is less than a set angle threshold (e.g., 12 degrees), then the point is identified as a ground point and added to the triangulation. This process is iterated until no new ground points are added, ultimately achieving accurate separation of the surface point cloud.

[0043] Digital Elevation Model Generation: Based on the separated surface point cloud, a high-precision digital elevation model with a grid spacing of less than 0.2 meters is generated. Specifically, the entire inspection area is divided into regular grids on a horizontal plane, with the grid spacing (i.e., resolution) set to 0.1 to 0.2 meters. For each grid cell, the elevation values ​​of the surface point cloud within and around it are used to calculate the elevation value of the grid's center point using an inverse distance weighted interpolation algorithm. This algorithm assigns higher weights to points closer to the grid center, thereby generating a smooth and accurate elevation surface. Ultimately, the elevation values ​​of all grid cells together constitute the aforementioned three-dimensional digital surface model, which provides an accurate terrain benchmark for subsequent model fusion, threat space modeling, and terrain-following flight path generation.

[0044] S2. Based on the target power grid equipment in the three-dimensional semantic scene model, a safety margin is added to generate a three-dimensional inspection task space; at the same time, the three-dimensional semantic scene model is analyzed, and the terrain undulation area and non-target equipment components are modeled as a three-dimensional threat space located inside the three-dimensional inspection task space.

[0045] Furthermore, in the above technical solution, refer to Figure 2 The process of modeling the terrain undulation area and non-target equipment components into a three-dimensional threat space, wherein a three-dimensional safety envelope is generated for the non-target equipment components, the specific generation method is as follows: through computational geometry processing, the triangular mesh of the equipment component is translated outward by a fixed safety distance along its normal vector direction, and the translated mesh is stitched together to form a closed envelope that wraps around the original component.

[0046] It should be noted that the computational geometry processing for generating a three-dimensional safety envelope for non-target device components specifically includes the following steps:

[0047] Normal Vector Calculation and Translation: First, traverse every vertex in the triangular mesh of the non-target device component. For each vertex, calculate its normal vector, which can be obtained by the area-weighted average normal vector of all triangular faces sharing this vertex. Then, translate each vertex outward along its normal vector direction by a fixed safety distance, typically between 1.0 and 3.0 meters, depending on the UAV's physical dimensions and flight safety regulations. This step creates an equidistant set of vertices for the core geometry.

[0048] Stitching and Generation of the Closed Envelope after Translation: Each triangular facet of the original mesh generates a new, corresponding translated facet after its vertex is translated. However, simply translating facets is insufficient to form a closed volume, resulting in gaps at the edges and sharp corners of the original mesh. Therefore, new triangular facets need to be constructed between the two translated new vertices corresponding to each edge of the original mesh, and between them and the two vertices of the original edge; this process is called "side stitching." Specifically, for each original edge, its two translated new vertices are connected to one of the original vertices to form two triangles, filling the side gaps created by the translation. By traversing all edges and performing this operation, a translated mesh is eventually connected to the original mesh at the edges, forming a completely closed 3D volume that encloses the original component—the 3D safety envelope—which defines the absolute no-entry zone for UAV flight.

[0049] The specific implementation method for modeling the terrain undulation area as a three-dimensional threat space is as follows:

[0050] This process, based on the aforementioned three-dimensional digital terrain model (DEM), first extends each grid point of the entire DEM vertically upwards to construct a three-dimensional volumetric space with a fixed height threshold, called a terrain threat volume. Specifically, for each horizontal location (X, Y) in the DEM, its corresponding elevation value is Z. ground From this point upwards, a vertical cylinder is generated, with its bottom surface at Z. ground The top surface is Z. ground +H threat H threat The preset terrain threat height threshold is determined based on a combination of environmental factors, such as the maximum safe altitude for drones to follow the terrain and tree height, and is typically set between 5 and 15 meters. By traversing all grid points of the DEM and voxelizing or geometrically merging these vertical cylinders in three-dimensional space, a continuous, closed three-dimensional volume is generated. This volume represents all airspace too close to the ground that may pose a flight risk. Any flight path point located within this volume is considered to have collided with the terrain threat space.

[0051] Thus, the three-dimensional threat space consists of two parts: a three-dimensional safety envelope generated from non-target device components and a terrain threat body generated from undulating terrain areas. In subsequent collision detection, both threat spaces must be assessed simultaneously.

[0052] S3. In the three-dimensional inspection task space, generate a set of initial observation points covering the target power grid equipment components to be inspected; perform collision detection between each initial observation point and the three-dimensional threat space; for observation points that fall into the threat space, iteratively adjust them to outside the three-dimensional threat space, while maintaining an unobstructed observation view of the target components, and output a set of collision-free equipment observation points.

[0053] Furthermore, in the above technical solution, refer to Figure 3 The iterative adjustment of the target component to a location outside the three-dimensional threat space, while maintaining an unobstructed viewing angle, includes the following sub-steps:

[0054] S31. Calculate the directed displacement vector from the observation point to its nearest threat space boundary;

[0055] S32. Move the observation point along the vector by a preset step size;

[0056] S33. After the movement, use the ray projection method to determine whether there is a situation where the visual path between the observation point and the target component is blocked by the threatened space;

[0057] S34. If there is occlusion, backtrack to the previous position and reduce the step size, repeat the movement and judgment steps until a collision-free and visually visible position is found.

[0058] It is important to understand that the iterative adjustment process is an optimization process that balances the safety of the observation point with the effectiveness of the observation perspective. The specific technical details are as follows:

[0059] In S31, the calculation of the directed displacement vector from the observation point to its nearest threat space boundary is specifically implemented as follows: First, the coordinates of the nearest point to all threat space surfaces are quickly calculated using a spatial query algorithm based on a bounding box hierarchy. Then, using this nearest point as the endpoint and the current observation point as the starting point, a vector pointing from the observation point to the nearest threat boundary point is calculated. This vector is defined as the directed displacement vector, and its direction is the fastest path direction for the observation point to escape the threat space.

[0060] In S32, the initial value of the preset step size is typically set to 10% to 20% of the fixed safety distance, specifically between 0.2 meters and 0.5 meters. When moving along the directed displacement vector, the distance moved is this step size, thus tentatively adjusting the observation point away from the threat.

[0061] In S33, the determination of the visual path using the ray casting method is specifically implemented as follows: A ray is constructed starting from the adjusted observation point and ending at the point to be inspected on the target component, such as the center point of an insulator string or the suspension point of a conductor. Subsequently, in the three-dimensional semantic scene model, it is detected whether this ray intersects with the triangular mesh of the threat space, such as the safety envelope of non-target equipment or terrain threat objects. If one or more intersections exist, and the intersection closest to the ray's starting point is located between the observation point and the target component, the visual path is determined to be occluded; otherwise, it is determined to be unobstructed and the viewpoint is visible.

[0062] In S34, the process of backtracking and reducing the step size is a typical linear search strategy. When the new observation point after movement causes the viewpoint to be obstructed, the algorithm backtracks the observation point position to the state before the movement and reduces the current step size by a preset decay factor, such as 0.5 times, and then re-executes the movement and judgment steps. This iterative loop will continue until a position that simultaneously satisfies the following two conditions is found: first, the point is outside all threat spaces; second, there is an unobstructed visual path from the point to the target component. To prevent infinite loops, a minimum step size threshold, such as 0.05 meters, or a maximum number of iterations, such as 50, is usually set as a termination condition. When the step size is less than this threshold or the maximum number of iterations is reached, the iteration will terminate even if the ideal position is not found, and a warning may be triggered or an alternative observation point generation strategy may be enabled.

[0063] S4. Using the set of observation points of the collision-free equipment as the necessary path points, plan an initial three-dimensional path that avoids the three-dimensional threat space within the three-dimensional inspection task space; process the initial three-dimensional path to ensure that the vertical distance between any point on the path and the surface of the three-dimensional digital ground model directly below is equal to the preset ground-simulating flight height, and generate a three-dimensional ground-simulating path.

[0064] Furthermore, in the above technical solution, refer to Figure 4 The planning of an initial three-dimensional path that avoids the three-dimensional threat space adopts a path search method based on a three-dimensional grid map, wherein the cost of each grid cell is calculated by weighting the estimated flight distance through the cell and the reciprocal of the Euclidean distance between the cell and the nearest threat space grid cell.

[0065] It should be noted that the specific implementation process of the path search method based on the 3D raster map is as follows:

[0066] First, the three-dimensional inspection task space is processed into three-dimensional voxels, dividing it into a series of uniformly sized cubic grid cells. The grid resolution is set between 0.1 meters and 0.5 meters according to the inspection accuracy requirements. Each grid cell is marked as one of three states based on its spatial location: free space, threat space, or obstacle space. The threat space is the set of grid cells occupied by the three-dimensional safety envelope and terrain threat objects defined in the previous steps.

[0067] Based on the constructed 3D grid map, the A* search algorithm is used for initial 3D path planning. This algorithm determines the optimal path by evaluating the cost of each grid cell. The cost of each grid cell is specifically calculated by weighting the following two parts: the first part is the estimated flight distance required to pass through the cell, usually calculated using Euclidean distance; the second part is the reciprocal of the Euclidean distance between the cell and the nearest threat grid cell, which reflects security preferences, with grid cells closer to the threat having a higher passage cost.

[0068] These two parts are combined into the total cost function using a linear weighted formula: F(n) = α*D(n) + β*(1 / D safe (n)), where D(n) represents the cumulative movement cost from the starting point to the current node n, D safe (n) represents the Euclidean distance from node n to the nearest threat space grid. α and β are weight coefficients. Typically, α is set between 0.6 and 0.8, and β is set between 0.2 and 0.4, satisfying α+β=1. Such weight allocation can achieve a balance between path length and safety margin.

[0069] During the path search process, the algorithm prioritizes expanding the grid cells with the lowest total cost. This ensures path continuity while automatically avoiding all grid cells marked as threat spaces and tends to select channels that are far from threat spaces. The final output initial 3D path is a polyline path composed of a series of ordered 3D coordinate points. This path geometrically avoids all known 3D threat spaces and connects all collision-free device observation points in the optimal order.

[0070] S5. Smooth the three-dimensional terrain-following path and make the smoothed path meet the dynamic performance constraints of the UAV to generate the final three-dimensional flight path.

[0071] Furthermore, in the above technical solution, refer to Figure 4 The three-dimensional terrain-following path is smoothed by fitting a cubic uniform B-spline curve. The smoothed path meets the dynamic performance constraints of the UAV by calculating the radius of curvature at each point on the curve and constraining its minimum value to be greater than the minimum turning radius of the UAV.

[0072] It should be noted that the specific implementation process of smoothing the three-dimensional terrain-following path using cubic uniform B-spline curves to ensure it meets the UAV dynamic performance constraints is as follows:

[0073] B-spline curve fitting process: The 3D terrain-following path is discretized into an ordered sequence of 3D coordinate points, which serve as the control points for the B-spline curve. The curve order is set to 3 (i.e., cubic B-spline), and the interpolation points on the curve are calculated using the De Boor algorithm. Specifically, given the control point sequence {P0, P1, ..., P...} n} and node vector U=[u0, u 1, ..., u n+4 (i.e., the total number of nodes is n+5), where the nodes are uniformly distributed, then the point C(u) on the curve can be represented as: , where N i,3 (u) is a cubic B-spline basis function, calculated using the Cox-de-Boor recursive formula. By adjusting the position and weight of the control points, the fitted curve maintains the original path topology while eliminating sharp turns in the path, achieving C... 2 A continuous, smooth path.

[0074] Curvature constraint handling: To meet the minimum turning radius requirement of the UAV, it is necessary to ensure that the radius of curvature at each point on the smoothed path is greater than this minimum value. For the parametric curve C(u)=(x(u), y(u), z(u)), its curvature κ(u) is calculated using the formula: κ(u)=|C'(u)×C''(u)| / |C'(u)| 3 Where C'(u) and C''(u) are the first and second derivatives of the curve, respectively. The radius of curvature R(u) = 1 / κ(u). By iterating through the discrete sampling points on the curve, the radius of curvature R(u) at each point is calculated. If it is found that R(u) at a certain point is less than the minimum turning radius R of the UAV... min Then, by locally adjusting the position of the control point, the radius of curvature of that point is increased until R(u) ≥ R min The constraints can be addressed through an iterative optimization algorithm, which ensures that the curvature radius of all points meets the maneuverability requirements of the UAV while maintaining the overall shape of the path.

[0075] Ultimately, the three-dimensional flight path generated after B-spline curve smoothing and curvature constraint processing not only has geometric continuity but also strictly conforms to the dynamic flight constraints of the UAV, providing a reliable guarantee for the UAV to safely and stably perform power grid inspection tasks.

[0076] Furthermore, in the above technical solution, the final three-dimensional flight path, after being generated, also includes the following steps:

[0077] The final three-dimensional flight path is converted into a sequence of control commands that can be parsed by the UAV flight control system. The three-dimensional coordinates, heading angle, and flight speed information of the flight path are encoded in time sequence and encapsulated into a standard mission file format.

[0078] It should be noted that the specific implementation process of converting the final three-dimensional flight path into a sequence of control commands that the UAV flight control system can parse is as follows:

[0079] Path point serialization and resampling: First, the smoothed final 3D flight path is discretized and resampled at fixed intervals to generate a high-density 3D path point sequence. The fixed interval is set according to the flight accuracy and data volume requirements, typically ranging from 0.5 meters to 2.0 meters. For each path point, in addition to the 3D coordinates (X, Y, Z), its motion parameters also need to be calculated and correlated.

[0080] Heading angle calculation: For the i-th point P in the path point sequence i Its heading angle ψ i Through this point and its subsequent point P i+1 The angle between the projection of the line connecting the two points onto the horizontal plane and the due north direction is determined. Specifically, the vector (P) is calculated. i+1 -P i The projection vector (ΔX, ΔY) onto the XY plane is given by the heading angle ψ. i =atan2(ΔY, ΔX), where atan2 is the arctangent function in the four quadrants. The calculation result is converted to the range of 0° to 360° to ensure the uniqueness of the direction.

[0081] Flight speed planning: for each path segment (P i To P i+1 Distribute flight speed v i Speed ​​planning follows these principles: a preset cruising speed can be used in straight sections and areas far from threat zones; in curves with large curvature or in safety-sensitive areas near equipment, the flight speed is dynamically reduced according to the radius of curvature to ensure that centrifugal force remains within the controllable range of the UAV and allows sufficient reaction time. Speed ​​changes are smoothly transitioned through acceleration constraints.

[0082] Control command encoding: The above path point sequence and its associated heading angle and flight speed information are encoded according to the communication protocol preset by the UAV flight control system, such as MAVLink. The encoding process encapsulates the latitude and longitude (obtained from local coordinates through coordinate system transformation), altitude, heading angle, expected airspeed and dwell time at each path point into a specific command data frame.

[0083] Task file encapsulation: The encoded control command sequence, along with task metadata such as task ID, global home point, and emergency return point, is organized and encapsulated according to a standard task file format, including JSON, XML, or vendor-specific binary formats. This generates a task file that can be loaded by ground station software or directly uploaded to the UAV flight control system to complete the deployment of automated flight missions.

[0084] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for automatically generating three-dimensional flight paths for power grid inspection UAVs using terrain-following flight, characterized in that, Specifically, the following steps are included: S1. Obtain the three-dimensional digital surface model of the inspection area and the three-dimensional model of the power grid equipment, and fuse the three-dimensional model of the power grid equipment with the three-dimensional digital surface model according to its real geographic coordinates to form a three-dimensional semantic scene model. S2. Based on the target power grid equipment in the three-dimensional semantic scene model, a safety margin is added to generate a three-dimensional inspection task space; at the same time, the three-dimensional semantic scene model is analyzed, and the terrain undulation area and non-target equipment components are modeled as a three-dimensional threat space located inside the three-dimensional inspection task space. S3. In the three-dimensional inspection task space, generate a set of initial observation points covering the target power grid equipment components to be inspected; perform collision detection between each initial observation point and the three-dimensional threat space; for observation points that fall into the threat space, iteratively adjust them to outside the three-dimensional threat space, while maintaining an unobstructed observation view of the target components, and output a set of collision-free equipment observation points. S4. Using the set of observation points of the collision-free equipment as the necessary path points, plan an initial three-dimensional path that avoids the three-dimensional threat space within the three-dimensional inspection task space; process the initial three-dimensional path to ensure that the vertical distance between any point on the path and the surface of the three-dimensional digital ground model directly below is equal to the preset ground-simulating flight height, and generate a three-dimensional ground-simulating path. S5. Smooth the three-dimensional terrain-following path and make the smoothed path meet the dynamic performance constraints of the UAV to generate the final three-dimensional flight path.

2. The method for automatically generating three-dimensional flight paths for power grid inspection UAVs according to claim 1, characterized in that, The three-dimensional digital land surface model is constructed using UAV-borne lidar point cloud data. Specifically, it includes: denoising and filtering the point cloud data, separating the land surface point cloud, and generating a digital elevation model with a grid spacing of less than 0.2 meters based on the land surface point cloud.

3. The method for automatically generating three-dimensional flight paths for power grid inspection UAVs according to claim 2, characterized in that, The three-dimensional digital surface model also performs a point cloud preprocessing step on the lidar point cloud data: a filtering algorithm based on statistical outlier removal is used to remove noise points, and a point cloud interpolation algorithm based on Gaussian process is used to supplement the density of sparse areas of the point cloud.

4. The method for automatically generating three-dimensional flight paths for power grid inspection UAVs according to claim 1, characterized in that, The process involves modeling the undulating terrain area and non-target equipment components into a three-dimensional threat space. Specifically, a three-dimensional safety envelope is generated for the non-target equipment components. The specific generation method is as follows: through computational geometry processing, the triangular mesh of the equipment component is translated outward by a fixed safety distance along its normal vector direction, and the translated mesh is stitched together to form a closed envelope that encloses the original component.

5. The method for automatically generating three-dimensional flight paths for power grid inspection UAVs according to claim 1, characterized in that, The iterative adjustment of the target component to a location outside the three-dimensional threat space, while maintaining an unobstructed viewing angle, includes the following sub-steps: S31. Calculate the directed displacement vector from the observation point to its nearest threat space boundary; S32. Move the observation point along the vector by a preset step size; S33. After the movement, use the ray projection method to determine whether there is a situation where the visual path between the observation point and the target component is blocked by the threatened space; S34. If there is occlusion, backtrack to the previous position and reduce the step size, repeat the movement and judgment steps until a collision-free and visually visible position is found.

6. The method for automatically generating three-dimensional flight paths for power grid inspection UAVs according to claim 1, characterized in that, The plan proposes an initial three-dimensional path that avoids the three-dimensional threat space. It employs a path search method based on a three-dimensional grid map, where the cost of each grid cell is calculated by weighting the estimated flight distance through that cell and the reciprocal of the Euclidean distance between that cell and the nearest threat space grid cell.

7. The method for automatically generating three-dimensional flight paths for power grid inspection UAVs according to claim 1, characterized in that, The three-dimensional terrain-following path is smoothed by fitting a cubic uniform B-spline curve. The smoothed path meets the dynamic performance constraints of the UAV by calculating the radius of curvature at each point on the curve and constraining its minimum value to be greater than the minimum turning radius of the UAV.

8. The method for automatically generating three-dimensional flight paths for power grid inspection UAVs according to claim 1, characterized in that, After the final three-dimensional flight path is generated, the following steps are also included: The final three-dimensional flight path is converted into a sequence of control commands that can be parsed by the UAV flight control system. The three-dimensional coordinates, heading angle, and flight speed information of the flight path are encoded in time sequence and encapsulated into a standard mission file format.