Unmanned aerial vehicle inspection control method, device and equipment for power grid environment
By combining the improved dynamic A-star algorithm with the EDF map, the problem of low drone inspection accuracy is solved, high-precision power grid environment inspection is achieved, and the stability and reliability of drone flight are improved.
Patent Information
- Application Number
- CN202510813344.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-09-19
AI Technical Summary
Existing drone inspection technology has the problem of low inspection accuracy in power systems, mainly due to the limited accuracy of data collection, which makes it impossible to achieve refined inspections.
The improved dynamic A-star algorithm combined with EDF map is used for path planning, and the path is optimized using piecewise quintic polynomial fitting to increase the accuracy of dynamic constraints and path planning, thereby improving the stability and reliability of UAV flight.
By combining the improved dynamic A-star algorithm with the EDF map, the accuracy and stability of drone inspections are improved, and high-precision power grid environment inspections are achieved.
Smart Images

Figure CN120669719A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart grid technology, and in particular to a method, device and equipment for controlling drone inspection in a power grid environment. Background Art
[0002] With the advancement of smart grid construction, drone inspection technology has gained widespread application in power system inspections due to its high efficiency, flexibility, and unrestricted terrain. Traditional drone inspection technology relies on manual control and fixed routes, resulting in low inspection efficiency. To address these issues, researchers in related fields are committed to developing high-precision and highly flexible intelligent inspection technologies.
[0003] In the existing technology, the main method of drone inspection is to use visual perception to collect the real-time environment of the drone during flight, so as to achieve autonomous obstacle avoidance based on visual perception; at the same time, use the reward value calculation mechanism and heuristic function search method to predict the importance of the drone's classification action, so as to calculate the optimal flight action and position to achieve autonomous navigation.
[0004] Due to the limited data collection accuracy in the existing technology, there is a technical problem of low drone inspection accuracy in the existing technology. Summary of the Invention
[0005] The embodiments of the present application provide a drone inspection control method, device, and equipment for a power grid environment, so as to achieve the technical effect of improving the accuracy of drone inspections.
[0006] In a first aspect, an embodiment of the present application provides a drone inspection control method for a power grid environment, comprising:
[0007] In response to a power grid inspection task, obtaining an inspection starting point state and an inspection end point state corresponding to the power grid inspection task, and a pre-calculated Euclidean distance field (EDF) map corresponding to a target power grid environment;
[0008] Based on the EDF map, the inspection starting point status, and the inspection end point status, the improved dynamic A-star algorithm is used to search for paths in the EDF map to obtain the power grid inspection planning path for the target UAV to conduct power grid inspection.
[0009] Among them, the improved dynamic A-star algorithm refers to a path search algorithm based on the dynamic constraints of the UAV. The EDF map contains multiple path points, each of which corresponds to a unit space in the target power grid environment that the target UAV can safely pass through.
[0010] According to the discrete path point sequence of the power grid inspection planning path and the preset boundary conditions, the power grid inspection planning path is optimized by piecewise quintic polynomial fitting to generate the power grid inspection optimized trajectory;
[0011] Control the target UAV to fly along the optimized trajectory for power grid inspection.
[0012] In one possible implementation, based on the EDF map, the inspection starting point state, and the inspection end point state, an improved dynamic A-star algorithm is used to perform a path search in the EDF map to obtain a planned power grid inspection path for a target UAV to perform power grid inspection, including:
[0013] Based on the EDF map, the inspection starting point state and the dynamic constraints of the target UAV, an improved dynamic A-star algorithm is constructed for the state space of path search;
[0014] Multiple iterative searches are performed based on the state space to obtain the power grid inspection planning path.
[0015] In one possible implementation, multiple iterative searches are performed based on the state space to obtain a power grid inspection planning path, including:
[0016] In each iterative search, the pathpoint with the lowest flight cost is selected from the preset open list corresponding to the state space as the current pathpoint;
[0017] When the current path point does not meet the preset termination condition, a path point search is performed in the state space based on the path point state of the current path point and the preset control instruction set to obtain a sub-path point set. The sub-path point set includes multiple sub-path points and the path point trajectory corresponding to each sub-path point. Among them, the sub-path point refers to the path point that is reachable by the target UAV and adjacent to the current path point.
[0018] Verify the security of the path point trajectory of each sub-path point in the sub-path point set based on the EDF map, add the sub-path points that pass the verification to the preset open list, and move the current path point from the preset open list to the preset closed list;
[0019] When the current path point meets the preset termination condition, the inspection starting point state is traced back based on the inspection end state to obtain the power grid inspection planning path corresponding to the target UAV;
[0020] The preset termination condition refers to the distance between the current path point and the inspection end point being less than a preset threshold.
[0021] In one possible implementation, based on the discrete path point sequence of the power grid inspection planning path and in combination with preset boundary conditions, the power grid inspection planning path is optimized by piecewise quintic polynomial fitting to generate a power grid inspection optimized trajectory, including:
[0022] Based on the discrete path point sequence of the power grid inspection planning path, the discrete path point sequence is divided into N sub-trajectories, where N is a positive integer greater than 0;
[0023] For each sub-trajectory, the quintic polynomial is combined with the preset boundary conditions to construct the linear constraint equations corresponding to the sub-trajectory.
[0024] The polynomial coefficients corresponding to each sub-trajectory are calculated based on the linear constraint equations;
[0025] Based on the polynomial coefficients corresponding to each sub-trajectory, the discrete path point sequence is smoothed to obtain the optimized trajectory of power grid inspection.
[0026] In one possible implementation, controlling a target UAV to fly along an optimized power grid inspection trajectory includes:
[0027] Control the target drone to fly along the optimized trajectory for power grid inspection and collect the distance between the target drone and obstacles in real time;
[0028] When the distance between the target UAV and the obstacle is lower than the safe distance, the current position of the target UAV is obtained, and the next position of the target UAV is determined based on the power grid inspection optimization trajectory;
[0029] Based on the current position and the next position, an improved dynamic A-star algorithm is used to generate an obstacle avoidance path;
[0030] Based on the obstacle avoidance path and the power grid inspection optimization trajectory, an updated power grid inspection optimization trajectory is obtained;
[0031] Control the target UAV to fly along the updated optimized trajectory for power grid inspection.
[0032] In one possible implementation, before obtaining, in response to the power grid inspection task, the inspection start state, the inspection end state, and the pre-calculated EDF map corresponding to the target power grid environment corresponding to the power grid inspection task, the method further includes:
[0033] Obtaining a three-dimensional occupancy grid map corresponding to the power grid environment;
[0034] Perform a Euclidean distance transform on the free-space grids in the 3D occupancy grid map and calculate the physical distance from each free-space grid to the nearest obstacle. Obstacles include terrain, vegetation, buildings, and electrical equipment in the power grid environment. A free-space grid refers to the unit space in the 3D occupancy grid map that can be used by drones.
[0035] Based on the three-dimensional coordinates corresponding to each free space grid, generate the index of its corresponding physical distance;
[0036] The free space grid is determined as a waypoint, and an EDF map is generated based on the physical distance and index corresponding to each waypoint.
[0037] In a second aspect, an embodiment of the present application provides a drone inspection control device for a power grid environment, comprising:
[0038] An acquisition module, in response to a power grid inspection task, acquires an inspection starting point state and an inspection end point state corresponding to the power grid inspection task, and a pre-calculated Euclidean distance field (EDF) map corresponding to a target power grid environment;
[0039] The first processing module is used to perform a path search in the EDF map using an improved dynamic A-star algorithm based on the EDF map, the inspection starting point state, and the inspection end point state, to obtain a power grid inspection planning path for the target UAV to perform power grid inspection;
[0040] Among them, the improved dynamic A-star algorithm refers to a path search algorithm based on the dynamic constraints of the UAV. The EDF map contains multiple path points, each of which corresponds to a unit space in the target power grid environment that the UAV can safely pass through.
[0041] The second processing module is used to optimize the grid inspection planning path based on the discrete path point sequence of the grid inspection planning path and the preset boundary conditions by using a piecewise quintic polynomial fitting method to generate a grid inspection optimized trajectory;
[0042] The third processing module is used to control the target UAV to fly along the optimized trajectory for power grid inspection.
[0043] In a possible implementation, the first processing module is further configured to:
[0044] Based on the EDF map, the inspection starting point state and the dynamic constraints of the target UAV, an improved dynamic A-star algorithm is constructed for the state space of path search;
[0045] Multiple iterative searches are performed based on the state space to obtain the power grid inspection planning path.
[0046] In a possible implementation, the first processing module is further configured to:
[0047] In each iterative search, the pathpoint with the lowest flight cost is selected from the preset open list corresponding to the state space as the current pathpoint;
[0048] When the current path point does not meet the preset termination condition, a path point search is performed in the state space based on the path point state of the current path point and the preset control instruction set to obtain a sub-path point set. The sub-path point set includes multiple sub-path points and the path point trajectory corresponding to each sub-path point. Among them, the sub-path point refers to the path point that is reachable by the target UAV and adjacent to the current path point.
[0049] Verify the security of the path point trajectory of each sub-path point in the sub-path point set based on the EDF map, add the sub-path points that pass the verification to the preset open list, and move the current path point from the preset open list to the preset closed list;
[0050] When the current path point meets the preset termination condition, the inspection starting point state is traced back based on the inspection end state to obtain the power grid inspection planning path corresponding to the target UAV;
[0051] The preset termination condition refers to the distance between the current path point and the inspection end point being less than a preset threshold.
[0052] In a possible implementation, the second processing module is further configured to:
[0053] Based on the discrete path point sequence of the power grid inspection planning path, the discrete path point sequence is divided into N sub-trajectories, where N is a positive integer greater than 0;
[0054] For each sub-trajectory, the quintic polynomial is combined with the preset boundary conditions to construct the linear constraint equations corresponding to the sub-trajectory.
[0055] The polynomial coefficients corresponding to each sub-trajectory are calculated based on the linear constraint equations;
[0056] Based on the polynomial coefficients corresponding to each sub-trajectory, the discrete path point sequence is smoothed to obtain the optimized trajectory of power grid inspection.
[0057] In a possible implementation, the third processing module is further configured to:
[0058] Control the target drone to fly along the optimized trajectory for power grid inspection and collect the distance between the target drone and obstacles in real time;
[0059] When the distance between the target UAV and the obstacle is lower than the safe distance, the current position of the target UAV is obtained, and the next position of the target UAV is determined based on the power grid inspection optimization trajectory;
[0060] Based on the current position and the next position, an improved dynamic A-star algorithm is used to generate an obstacle avoidance path;
[0061] Based on the obstacle avoidance path and the power grid inspection optimization trajectory, an updated power grid inspection optimization trajectory is obtained;
[0062] Control the target UAV to fly along the updated optimized trajectory for power grid inspection.
[0063] In a possible implementation, the device further includes a fourth processing module, configured to:
[0064] Obtaining a three-dimensional occupancy grid map corresponding to the power grid environment;
[0065] Perform a Euclidean distance transform on the free-space grids in the 3D occupancy grid map and calculate the physical distance from each free-space grid to the nearest obstacle. Obstacles include terrain, vegetation, buildings, and electrical equipment in the power grid environment. A free-space grid refers to the unit space in the 3D occupancy grid map that can be used by drones.
[0066] Based on the three-dimensional coordinates corresponding to each free space grid, generate the index of its corresponding physical distance;
[0067] The free space grid is determined as a waypoint, and an EDF map is generated based on the physical distance and index corresponding to each waypoint.
[0068] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor;
[0069] Memory stores computer-executable instructions;
[0070] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above-mentioned first aspect and possible implementations of the first aspect.
[0071] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the above-mentioned first aspect and possible implementation methods in the first aspect.
[0072] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above-mentioned first aspect and possible implementation methods of the first aspect.
[0073] The embodiment of the present application provides a method, device and equipment for controlling drone inspection in a power grid environment. The method obtains the inspection starting state and inspection end state for the drone to inspect in response to the power grid inspection task, and simultaneously obtains the EDF map of the target power grid environment; based on the EDF map, the inspection starting state and the inspection end state, the improved dynamic A-star algorithm is used to perform a path search to obtain a power grid inspection planning path for the target drone to inspect the power grid; in order to improve the smoothness of the path, the power grid inspection planning path is optimized by using a piecewise quintic polynomial fitting method combined with preset boundary conditions to obtain a power grid inspection optimized trajectory; the target drone is controlled to fly along the power grid inspection optimized trajectory to achieve the purpose of performing the power grid inspection task. Compared with the existing technology, the present application uses an improved dynamic A-star algorithm to add dynamic constraints in the path search to improve the reliability of the drone flight; uses a pre-calculated EDF map for path search to improve the accuracy of path planning; and combines the piecewise quintic polynomial fitting optimization method to further increase the stability of the drone flight, thereby achieving the technical effect of improving the accuracy of the drone inspection. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0075] Figure 1 Schematic diagram of the process of the drone inspection control method for the power grid environment provided in this application Figure 1 ;
[0076] Figure 2 A schematic diagram of a power grid inspection planning path provided in an embodiment of the present application Figure 1 ;
[0077] Figure 3 Schematic diagram of the process of the drone inspection control method for the power grid environment provided in this application Figure 2 ;
[0078] Figure 4 A schematic diagram of a power grid inspection planning path provided in an embodiment of the present application Figure 2 ;
[0079] Figure 5 A schematic diagram of a power grid inspection planning path provided in an embodiment of the present application Figure 3 ;
[0080] Figure 6 A schematic diagram of a time-dependent change pattern of adaptive motion primitive parameters provided in an embodiment of the present application;
[0081] Figure 7Schematic diagram of the process of the drone inspection control method for the power grid environment provided in this application Figure 3 ;
[0082] Figure 8 A schematic diagram of a piecewise quintic polynomial fitting trajectory provided in an embodiment of the present application;
[0083] Figure 9 A schematic diagram of a curve showing the changes in speed and acceleration of a drone over time provided in an embodiment of the present application;
[0084] Figure 10 Schematic diagram of the process of the drone inspection control method for the power grid environment provided in this application Figure 4 ;
[0085] Figure 11 A schematic diagram of the structure of the drone inspection control device for power grid environment provided by this application;
[0086] Figure 12 This is a schematic diagram of the structure of the electronic device provided in this application.
[0087] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0088] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0089] In the existing technology, when using drones to inspect the power grid environment, the environmental information during the drone's flight is mainly collected through visual perception, thereby achieving autonomous obstacle avoidance based on visual perception; at the same time, the importance of the drone's classification actions is predicted using a reward value calculation mechanism and a heuristic function search method, thereby calculating the optimal flight action and position to achieve autonomous navigation.
[0090] However, when the drone inspection method in the existing technology is applied to power inspection, in order to ensure flight safety, the distance between the drone and the power line is relatively far, and detailed inspection cannot be achieved. Therefore, there is a technical problem of low drone inspection accuracy in the existing technology.
[0091] In response to the above technical problems, this application proposes the following technical concept: using path search to perform high-precision path planning. Specifically, by obtaining the inspection starting point and inspection end point states used for drone inspection path planning during power grid inspection, combined with the EDF map of the target power grid environment and the dynamic constraints corresponding to the target drone, an improved dynamic A-star algorithm is used to implement path planning, thereby adding dynamic constraints to the path search; at the same time, by introducing the EDF map, the accuracy of path planning is further improved; using piecewise quintic polynomials combined with preset boundary conditions for smoothing, the stability of the path is further improved; thereby achieving the technical effect of improving the accuracy of drone inspections.
[0092] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0093] Figure 1 Schematic diagram of the process of the drone inspection control method for the power grid environment provided in this application Figure 1 ,like Figure 1 As shown, the method includes:
[0094] S101 : In response to a power grid inspection task, obtaining an inspection start state, an inspection end state, and a pre-calculated EDF map corresponding to a target power grid environment.
[0095] In this step, the inspection starting point status includes: the three-dimensional position coordinates of the inspection starting point, and the three-dimensional speed composed of the speed in each direction on the three-dimensional coordinates; the inspection endpoint status includes: the three-dimensional position coordinates of the inspection endpoint, and the three-dimensional speed composed of the speed in each direction on the three-dimensional coordinates; the pre-calculated EDF map contains multiple path points, each of which corresponds to a unit space in the target power grid environment that the target drone can safely pass through. The EDF map also includes: the three-dimensional coordinates corresponding to each path point, and the physical distance between each path point and the nearest obstacle to the path point. The EDF map can be used to quickly query the three-dimensional coordinates corresponding to each free space in the target power grid environment, as well as the closest physical distance between the unit space and the obstacle.
[0096] It should be noted that the inspection starting state and inspection end state corresponding to the power grid inspection task are preset states obtained based on the power grid inspection task. In the process of actually controlling the flight of the target UAV, the inspection starting state and inspection end state need to be dynamically corrected according to the flight state of the target UAV.
[0097] S102: Based on the EDF map, the inspection starting point state, and the inspection end point state, an improved dynamic A-star algorithm is used to perform a path search in the EDF map to obtain a power grid inspection planning path for the target UAV to perform power grid inspection.
[0098] In this step, the improved dynamic A-star algorithm refers to a path search algorithm based on the dynamic constraints of the UAV. The algorithm uses the path point cost calculation method to select appropriate adjacent path points from the EDF map corresponding to the target power grid environment as the next path point for path planning, thereby obtaining the power grid inspection planning path of the target UAV.
[0099] Optionally, a possible implementation method of generating a power grid inspection planning path is:
[0100] S1021. Based on the EDF map, the inspection starting point state and the dynamic constraints of the target UAV, an improved dynamic A-star algorithm is constructed for the state space of path search.
[0101] In this step, the state space used by the improved dynamic A-star algorithm for path search includes the three-dimensional position and three-dimensional velocity of the path points. The state space is composed of multiple continuous path point state quantities, where the state quantity is expressed as shown in Formula 1:
[0102]
[0103] Among them, X refers to the state of the target drone, which is used to describe the complete state of the target drone at a certain moment, (x, y, z) refers to the three-dimensional coordinates corresponding to the inspection starting point state, (v x ,v y ,v z ) refers to the three-dimensional speed corresponding to the inspection starting state, and T refers to the transpose of the matrix.
[0104] The relationship between the state quantities is expressed by the dynamic equation corresponding to the target UAV, which is used to describe the relationship between the position and velocity of the target UAV. The dynamic equation corresponding to the target UAV is a second-order integrator model, as shown in Formula 2:
[0105]
[0106] Among them, A refers to the state transfer matrix, B refers to the control input matrix, and x refers to the state vector. The state vector is the derivative of the state vector with respect to time, indicating the rate of change of the state over time. u refers to the control input of the target drone, indicating the acceleration of the target drone in the three coordinate axes. The state transition matrix A is a matrix that describes the natural evolution of the system, and the control input matrix B is a matrix that describes how the external control input u affects the state change. The two matrices are shown in Formula 3:
[0107]
[0108] Here, I3 refers to a 3×3 identity matrix, which is used in the state transfer matrix A to represent the effect of velocity on position, and in the control input matrix B to represent the change in velocity directly affected by the control input u.
[0109] By calculating from formulas 1 to 3, the calculation method of the target drone's state quantity is shown in formula 4:
[0110]
[0111] in, represents the state of the target UAV at time t, Refers to the initial state of the target drone, B refers to the control input matrix, and A refers to the state transfer matrix. refers to the duration of the control input u, Refers to the natural response of the initial state when there is no input control, Refers to the control input Dynamic response under time accumulation.
[0112] S1022. Perform multiple iterative searches based on the state space to obtain a power grid inspection planning path.
[0113] In this step, the method of performing multiple iterative searches based on the state space is as follows: according to the inspection starting point state, the initial state quantity of the target UAV is determined, and the expression of the state quantity shown in Formula 4 is used to calculate the power grid inspection path of the target UAV in segments, where each segment represents a motion primitive, and each motion primitive represents a path point on the power grid inspection planning path.
[0114] Among them, the motion primitive refers to starting from the flight state indicated by the parent node state quantity, applying a specific constant control input, and reaching the flight state indicated by the child node state quantity after a period of time.
[0115] For example, Figure 2 A schematic diagram of a power grid inspection planning path provided in an embodiment of the present application Figure 1 ,like Figure 2As shown in the figure, the complete curve in the figure refers to the planned path for power grid inspection, the bulk line segments attached to the complete curve refer to the trajectory corresponding to the extended motion primitives in the path planning, the rectangular filled area around the complete curve refers to the obstacles in the power grid environment, the horizontal axis in the figure refers to the drone coordinate corresponding to the X-axis, and the vertical axis refers to the drone coordinate corresponding to the Y-axis. Figure 2 In the power grid inspection planning path, this embodiment provides a method for implementing path planning based on fixed parameter motion primitives, specifically: limiting the control input of the three coordinate axes x, y, and z to a large range of [-u max ,u max ], by evenly dividing the control input within the control interval, a series of control inputs are obtained, as shown in Formula 5:
[0116]
[0117] Finally, we can get (2r+1) 3 control inputs, each corresponding to a motion primitive, we can get (2r+1) 3 motion primitives. Among them, u max It refers to the maximum absolute value of the control input, which indicates the maximum acceleration or control amount that can be applied to the drone on the x, y, and z axes; r refers to the resolution parameter of the control input, which determines the number of discrete levels of the control amount on each axis.
[0118] It should be noted that the generation of the power grid inspection planning path in this step can be based on fixed parameter motion primitives or adaptive parameter motion primitives. The generation method of the power grid inspection planning path is further explained in the following embodiments and no unnecessary elaboration is given here.
[0119] S103 , optimizing the power grid inspection planning path by piecewise quintic polynomial fitting based on the discrete path point sequence of the power grid inspection planning path in combination with preset boundary conditions, and generating a power grid inspection optimized trajectory.
[0120] In this step, the preset boundary conditions are: the optimized inspection trajectory must pass through every path point on the planned inspection route, and the starting and ending points of the optimized trajectory must meet the speed and acceleration requirements for the inspection task. Piecewise quintic polynomial fitting divides the discrete path point sequence into multiple segments, each segment identified by a quintic polynomial to ensure continuity of high-order derivatives.
[0121] It should be noted that the method of generating the power grid inspection optimization trajectory in this step is further explained in the following embodiments and will not be described in detail here.
[0122] S104. Control the target UAV to fly along the optimized trajectory for power grid inspection.
[0123] Optionally, a possible implementation method for controlling the flight of the target UAV is:
[0124] S1041. Control the target UAV to fly along the optimized trajectory for power grid inspection, and collect the distance between the target UAV and obstacles in real time.
[0125] In this step, real-time distance collection between the target drone and obstacles can be achieved by using sensors on the target drone to monitor the surrounding environment in real time and obtain the distance between the drone and the obstacle. These obstacles can be static or dynamically changing obstacles within the power grid environment. For example, if a bird appears in the target drone's flight path while the target drone is flying along a planned optimized power grid inspection trajectory, the target drone needs to generate an obstacle avoidance path based on the dynamic obstacle information obtained from the monitoring to avoid a collision.
[0126] Exemplarily, the sensor used for real-time monitoring of the surrounding environment may be: a lidar, an ultrasonic sensor, or a camera.
[0127] S1042: When the distance between the target UAV and the obstacle is less than the safe distance, obtain the current position of the target UAV, and determine the next position of the target UAV based on the power grid inspection optimization trajectory.
[0128] In this step, the next position of the target UAV refers to the first path point after the current position of the target UAV in the power grid inspection optimization trajectory.
[0129] For example, the distance between the target drone and the obstacle calculated in real time is 0.4, the safety distance is 0.5, the current position coordinates of the target drone are (50, 20, 10) m, and the coordinates of the next position are (55, 25, 10) m; based on the distance between the target drone and the obstacle, it is determined that the current distance is lower than the safety distance, which triggers the drone to avoid obstacles. Therefore, it is necessary to generate an obstacle avoidance path based on the current position coordinates and the coordinates of the next position of the target drone to bypass the obstacle and return to the original power grid inspection planning trajectory.
[0130] S1043. Generate an obstacle avoidance path based on the current position and the next position using the improved dynamic A-star algorithm.
[0131] In this step, the obstacle avoidance path is generated by obtaining the drone's 3D velocity at its current location, determining its starting state, and then determining its temporary destination state based on the original grid inspection path and the next location. Based on the starting and temporary destination states, the state space is defined and path planning is performed to obtain the obstacle avoidance path for the target drone.
[0132] S1044: performing splicing based on the obstacle avoidance path and the power grid inspection optimization trajectory to obtain an updated power grid inspection optimization trajectory.
[0133] In this step, the optimized grid inspection trajectory is updated by splitting the original optimized grid inspection trajectory into two segments: the original starting point to the current position, and the next position to the original end point. The obstacle avoidance path is inserted into these two segments, and the two electrical connections between the obstacle avoidance path and the original grid inspection trajectory are smoothed using a quintic polynomial to obtain the updated optimized grid inspection trajectory.
[0134] S1045. Control the target UAV to fly along the updated power grid inspection optimized trajectory.
[0135] In this step, the target drone's flight is controlled by decomposing the updated grid inspection trajectory into control instructions corresponding to the timestamps, which may include speed and acceleration control instructions; and then issuing these control instructions to the target drone to control its flight. This step aims to achieve stable flight for the target drone in a dynamic environment.
[0136] For example, when a large flying bird obstacle is detected, the UAV flies along the updated power grid inspection optimization path, bypasses the bird and automatically returns to the original power grid inspection optimization trajectory, thereby continuing the power grid inspection.
[0137] The embodiment of the present application provides a drone inspection control method for a power grid environment. In response to a power grid inspection task, the method obtains the inspection starting state and inspection end state for the drone to perform inspections, and simultaneously obtains an EDF map of the target power grid environment. Based on the EDF map, the inspection starting state and the inspection end state, the method uses an improved dynamic A-star algorithm to perform a path search to obtain a power grid inspection planning path for the target drone to perform power grid inspections. In order to improve the smoothness of the path, the method uses a piecewise quintic polynomial fitting method combined with preset boundary conditions to optimize the power grid inspection planning path to obtain a power grid inspection optimized trajectory. The method controls the target drone to fly along the power grid inspection optimized trajectory to achieve the purpose of performing the power grid inspection task. Compared with the prior art, the present application uses an improved dynamic A-star algorithm to add dynamic constraints to the path search to improve the reliability of the drone flight; uses a pre-calculated EDF map to perform path search to improve the accuracy of path planning; and combines the piecewise quintic polynomial fitting optimization method to further increase the stability of the drone flight, thereby achieving the technical effect of improving the accuracy of drone inspections.
[0138] Figure 3 Schematic diagram of the process of the drone inspection control method for the power grid environment provided in this application Figure 2 , this embodiment is for Figure 1 The generation of the power grid inspection planning path in step S102 of the embodiment shown is further explained. Figure 3 As shown, the method includes:
[0139] S301. In each iterative search, a path point with the lowest flight cost is selected from a preset open list corresponding to the state space as the current path point.
[0140] In this step, the preset open list stores the path points to be processed. The state space refers to the set of all possible locations or states that the target drone may reach during the power grid inspection mission. The flight cost of a path point refers to the sum of the cumulative path cost from the inspection starting point to the path point and the estimated remaining cost from the path point to the inspection end point, that is, the estimated total cost of the complete path. The calculation of the flight cost is related to the motion primitive. A motion primitive is a subpath from the current path point to the next adjacent path point. The flight cost of a subpath refers to the cost of a motion primitive.
[0141] Exemplarily, the present application provides a method for calculating the total path cost based on the motion primitive cost, specifically:
[0142] S3011. When selecting the path point with the lowest flight cost, it is necessary to calculate the flight cost corresponding to each path point, so as to calculate the total path cost generated when planning to the current path point. The calculation method of the total path cost is shown in Formula 6:
[0143]
[0144] Among them, J(T) is the total cost function, which consists of two parts: controlling energy consumption and time consumption. T refers to the total duration of path planning. It refers to a non-negative weight factor used to balance the importance of control energy consumption and time consumption in the total cost; u(t) refers to the control input vector, which usually represents acceleration or other control instructions; ‖u(t)‖² refers to the square norm of the control input, which represents the instantaneous control energy.
[0145] S3012: Calculate the flight cost of each motion primitive based on the total path cost and the duration corresponding to the control input of each motion primitive, and then obtain the actual cumulative path cost, as shown in Formula 7:
[0146]
[0147] in, refers to the flight cost of the j-th motion primitive, It refers to the sum of the flight costs of motion primitives corresponding to all path points passed from the inspection starting point state to the path point state corresponding to the current path point, that is, the cumulative path cost; J is the number of path points or motion primitives passed, Refers to the duration corresponding to the control input of a single primitive; refers to the control input of the jth motion primitive.
[0148] In this step, the parameters that may vary in the calculation of the flight cost of the motion primitive are the control input and the duration of the control input. These two parameters can be used to adjust the distance between the motion primitive and the adjacent obstacles, avoiding the situation where the distance between the motion primitive and the adjacent obstacle area is too close, and reducing the probability of collision failure of the target drone. Therefore, it is necessary to dynamically adjust the control input and duration parameters to achieve the purpose of generating adaptive motion primitives. Optionally, a possible implementation method for generating adaptive motion primitives based on parameter adjustment is:
[0149] A1. The adaptive duration is determined by the distance between the current path point and the nearest obstacle. The longer the distance, the longer the duration.
[0150] The distance between the current waypoint and the nearest obstacle is obtained from the pre-computed EDF map.
[0151] In this step, the specific calculation method of the adaptive duration is shown in Formula 8:
[0152]
[0153] in, is the adaptive control duration, d is the distance between the current path point and the nearest obstacle, Refers to the preset safety threshold, To control the sensitivity of duration to distance; is the minimum and maximum duration; the sigmoid function is used to normalize the mapping and smooth the transition, prevent parameter mutations, and enhance the stability of the algorithm.
[0154] A2. Regarding the adaptive control sampling resolution, when approaching obstacles, more precise control is required to explore confined spaces, so the adaptive control sampling resolution needs to be increased. In open areas, the adaptive control sampling resolution can be reduced to reduce the amount of computation.
[0155] In this step, the specific calculation method of the adaptive control sampling resolution is shown in Formula 9:
[0156]
[0157] in, Refers to the adaptive control sampling resolution, are the minimum and maximum sampling radius parameters; is the safety distance threshold used to control the sampling density, For control Sensitivity varies with distance; and the adaptive control sampling rate calculation result is constrained to Inner union is rounded, and clamp is the range constraint function; refers to the adaptive control sampling resolution with a decimal part, and d refers to the distance between the current path point and the nearest obstacle. The sigmoid function is used to normalize the mapping and smooth the transition, prevent parameter mutations, and enhance the stability of the algorithm.
[0158] S3013. In order to speed up the search process, when performing cost calculation, a heuristic cost function may be used to estimate the residual cost and calculate the optimal residual cost.
[0159] In this step, the remaining cost is calculated as shown in Formula 10:
[0160]
[0161] Among them, μ∈{x,y,z} refers to the three-dimensional space coordinate axis, It refers to the optimal polynomial trajectory from the state corresponding to the current path point to the state of the inspection endpoint; , refers to the trajectory coefficient calculated by the Pontryagin minimum principle; , Refers to the three-dimensional coordinates and three-dimensional speed of the state corresponding to the current path point.
[0162] The calculation method of the trajectory coefficient is shown in Formula 11:
[0163]
[0164] in, and Refers to the three-dimensional coordinates and three-dimensional speed of the inspection endpoint state, T refers to the remaining time of the assumed path, , Refers to the trajectory coefficient calculated by the Pontryagin minimum principle.
[0165] The optimal remaining cost is calculated according to formulas 10 and 11, and the optimal remaining cost is calculated as shown in formula 12:
[0166]
[0167] in, is the calculated optimal cost function about T, They represent the three-dimensional coordinates and three-dimensional speeds corresponding to the state of the current path point and the inspection endpoint state respectively; T refers to the assumed remaining time of the path.
[0168] S3014. Based on the path point state corresponding to the inspection starting point state to the current path point, the sum of the motion primitive flight costs corresponding to all the path points passed, and the optimal remaining cost, the final total cost is calculated as: , where f c Minimum refers to the estimated total cost from the inspection starting state to the inspection end state. The purpose is to give priority to expanding f in the path search. c The smallest node to ensure global optimality; h c Refers to the heuristic cost, that is, assuming the remaining time is T h The optimal residual cost when g c Refers to the cumulative path cost.
[0169] S3015. Calculate the estimated total cost of each path point in the preset open list, and use the path point with the lowest estimated total cost as the current path point.
[0170] S302. When the current path point does not meet the preset termination condition, a path point search is performed on the state space based on the path point state of the current path point and the preset control instruction set to obtain a sub-path point set, which includes multiple sub-path points and a path point trajectory corresponding to each sub-path point.
[0171] In this step, a subpathpoint is a pathpoint that is reachable by the target drone and adjacent to the current pathpoint. The pathpoint trajectory corresponding to a subpathpoint is the subpath indicated by the motion primitive corresponding to the subpathpoint. The preset control instruction set is used to indicate the actions that the target drone can perform at the current pathpoint. The subpathpoint set is the set of adjacent pathpoints that the current pathpoint can reach.
[0172] For example, this embodiment provides a preset control instruction set based on acceleration. Wherein, the control input of the target drone refers to the acceleration of the target drone in the three directions of the three-dimensional coordinate axis, and the preset control instruction set is a control instruction set obtained for different acceleration combinations. Specifically:
[0173] Command number: 1; X-axis acceleration: +2m / s 2 Y-axis acceleration: 0m / s 2 ; Z-axis acceleration: 0m / s 2 ; Command: Accelerate flight along the X axis.
[0174] Command number: 2; X-axis acceleration: -2m / s 2 Y-axis acceleration: 0m / s 2 ; Z-axis acceleration: 0m / s 2 ; Command: decelerate flight along the X axis.
[0175] Command number: 3; X-axis acceleration: 0m / s 2 Y-axis acceleration: +2m / s 2 ; Z-axis acceleration: 0m / s 2 ; Command: Accelerate flight along the Y axis.
[0176] Command number: 4; X-axis acceleration: 0m / s 2 Y-axis acceleration: -2m / s 2 ; Z-axis acceleration: 1m / s 2 ; Command: Slow down and climb along the Y axis.
[0177] S303: Verify the security of the path point trajectory of each sub-path point in the sub-path point set based on the EDF map, add the sub-path points that pass the verification to the preset open list, and move the current path point from the preset open list to the preset closed list.
[0178] In this step, the EDF map stores the Euclidean distance or physical distance from each path point to the nearest obstacle, which can be used for rapid collision detection. The purpose of trajectory safety verification is to determine whether each point on the path trajectory of the sub-path point is greater than the safety threshold. If it is determined to be greater than the safety threshold, the sub-path point can be determined as a safe sub-path point and added to the preset open list to prepare for the next round of iterative path search. When adding a sub-path point to the preset open list, the current path point needs to be recorded as the parent node of the sub-path point to facilitate subsequent path backtracking. At the same time, the current path point needs to be moved to the preset closed list to avoid repeated expansion.
[0179] S304: When the current path point meets the preset termination condition, backtrack to the inspection starting state based on the inspection end state to obtain the power grid inspection planning path corresponding to the target UAV.
[0180] In this step, the preset termination condition refers to that the distance between the current path point and the inspection end point is less than a preset threshold.
[0181] It should be noted that there are two preset termination conditions: the distance between the current path point and the inspection endpoint is less than a preset threshold, and the state of the current path point is consistent with the state of the inspection endpoint.
[0182] In this step, path backtracking refers to step-by-step backtracking from the inspection end point along the pointer record of the parent node to the inspection starting point, and generating a power grid inspection planning path.
[0183] For example, Figure 4 A schematic diagram of a power grid inspection planning path provided in an embodiment of the present application Figure 2 ,like Figure 4 As shown, this embodiment provides a method for generating a power grid inspection planning path based on fixed parameter motion primitives, specifically: when the control input duration corresponding to each motion primitive is consistent and the resolution parameter corresponding to the control input of each motion calculation is unchanged, the motion primitive in the path search is determined to be a fixed parameter motion primitive. Using the fixed parameter motion primitives, combined with the inspection starting point state, the inspection end point state, and the EDF map, a path search is performed to obtain a power grid inspection planning path composed of multiple motion primitives. Figure 4 As shown, the grid inspection planning path is in the grid map of the target grid environment. The picture title is The map uses the plane coordinate axis composed of the x-axis and the y-axis as the reference, and records the power grid inspection planning path from a plane perspective. Among them, the graphic part refers to the obstacles in the target power grid environment, the scattered line segment part refers to the sub-path corresponding to all the motion primitives expanded in the path planning, the continuous main line refers to the power grid inspection optimization trajectory after the power grid inspection planning path is optimized, and the dotted line part connected by the main line refers to the analytical trajectory segment directly generated without path planning when the current path point is detected to be close to the inspection end point. The annotation information in the figure is as follows: It refers to the power grid inspection planning path generated by the improved dynamic A-star algorithm in this application, Analytic Segment refers to the annotation of the analytical trajectory segment, Start refers to the inspection starting point, and Goal refers to the inspection end point.
[0184] For example, Figure 5 A schematic diagram of a power grid inspection planning path provided in an embodiment of the present application Figure 3 ,like Figure 5 As shown, this embodiment provides a method for generating a power grid inspection planning path based on adaptive motion primitives, specifically: the duration of the control input corresponding to each motion primitive changes dynamically with the distance between the current path point and the nearest obstacle; and the resolution parameter corresponding to the control input of each motion calculation also changes dynamically with the distance. Therefore, the motion primitives in the path search are determined to be adaptive motion primitives, and the adaptive motion primitives are used to perform path search in combination with the distance between each path point and the nearest obstacle, the inspection starting point status, the inspection end point status, and the EDF map to obtain a power grid inspection planning path composed of multiple adaptive motion primitives. As shown Figure 5 As shown, the power grid inspection planning path is in the grid map of the target power grid environment. The picture title is Adaptive A*. The map uses the plane coordinate axis composed of the x-axis and the y-axis as the reference to record the power grid inspection planning path from a plane perspective. Among them, the graphic part refers to the obstacles in the target power grid environment, the scattered line segment part refers to the sub-path corresponding to all the motion primitives extended in the path planning, the continuous main line refers to the power grid inspection optimization trajectory after the power grid inspection planning path is optimized, and the dotted line part connected by the main line refers to the analytical trajectory segment directly generated without path planning when it is detected that the current path point is close to the inspection end point. The annotation information in the figure is: It refers to the power grid inspection planning path generated by the improved dynamic A-star algorithm in this application, Analytic Segment refers to the annotation of the analytical trajectory segment, Start refers to the inspection starting point, and Goal refers to the inspection end point.
[0185] Combine Figure 4 and Figure 5Corresponding examples show that the use of adaptive motion primitives for path planning can avoid the expansion of a large number of meaningless motion primitives, thereby further improving the search efficiency and accuracy of path search.
[0186] For example, the parameters of the adaptive motion primitive are analyzed. During the path search process, the values of the adaptive control sampling resolution and the adaptive duration of the motion primitive are recorded at each iteration, and the law of the change of the two parameters over time is obtained as follows: Figure 6 shown. Figure 6 A schematic diagram of the change of adaptive motion primitive parameters over time provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the broken line in the upper half of the picture refers to the change of the adaptive duration over time. The title of the diagram uses duration Indicates that the vertical axis of the diagram refers to the adaptation duration The lower half of the diagram shows how the adaptive control sampling resolution changes over time. The diagram's title uses "Resolution" (r). The diagram's vertical axis refers to the value corresponding to the adaptive control sampling resolution (Adaptive r), and the diagram's horizontal axis refers to the path search time.
[0187] Figure 7 Schematic diagram of the process of the drone inspection control method for the power grid environment provided in this application Figure 3 Based on the above embodiment, the generation of the power grid inspection optimization trajectory in step S103 of this embodiment is further explained in detail. Figure 7 As shown, the method includes
[0188] S701 : Based on a discrete path point sequence of a power grid inspection planning path, the discrete path point sequence is divided into N sub-trajectories.
[0189] In this step, N is a positive integer greater than 0. A discrete pathpoint sequence is a series of coordinate points in continuous space obtained using the improved dynamic A-star algorithm, representing the path the target UAV needs to traverse. A subtrajectory is a sequence of consecutive segments of the entire path, each described by a separate trajectory function.
[0190] In this step, it is assumed that there are N+1 path points W0, W1, ..., W in the power grid inspection planning path. N , these waypoints define N trajectory segments. i and W i+1 The i-th trajectory (i=0,1,…,N-1) is represented as a quintic polynomial in each motion dimension d=x,y,z, as shown in Formula 13:
[0191]
[0192] Where t is the local time in each trajectory segment, t∈[0,T i ]. i is the duration of the i-th segment, which uses the duration of the motion primitive corresponding to each trajectory segment. are the coefficients of the polynomial to be determined. For N trajectories and d dimensions, a complete trajectory has a total of 6×N×d coefficients; refers to the i-th trajectory.
[0193] S702 : For each sub-trajectory corresponding to the fifth-order polynomial, combined with preset boundary conditions, a linear constraint equation group corresponding to the sub-trajectory is constructed.
[0194] In this step, the quintic polynomial is a mathematical function used to describe the sub-trajectory, and the preset boundary conditions are to constrain the states of the sub-trajectory start and end points, as well as the continuity requirements between adjacent sub-trajectories.
[0195] Optionally, in combination with step S701, it can be known that d is the motion dimension. Since the dimensions are decoupled, the 6N polynomial coefficients to be determined for a single dimension are calculated. First, a corresponding linear constraint equation group needs to be constructed. One possible implementation method for constructing the linear constraint equation group is:
[0196] S7021. Construct position constraints, including start position constraints and end position constraints.
[0197] In this step, since the trajectory segment must accurately pass through all given path points W i Position p i,d , then each trajectory has two position constraints, and N trajectories can obtain a total of 2N constraints, as shown in Formula 14 and Formula 15:
[0198]
[0199]
[0200] in, Refers to the starting point (t=0) of the i-th trajectory in dimension d. Refers to the waypoint W i The coordinate value in dimension d. Refers to the end point of the i-th trajectory in dimension d (t=T i ) position, the right side Refers to the waypoint W i+1 The coordinate value in dimension d.
[0201] S7022. Construct boundary condition constraints, including acceleration constraints and velocity constraints at the start and end points.
[0202] In this step, the trajectory is between the starting point (i=0, t=0) and the end point (i=N-1, t=T N-1 ) must meet the speed and acceleration conditions specified by the user. The speed and acceleration constraints of the starting point are shown in Formula 16:
[0203]
[0204] in, It refers to the velocity of the starting point of the entire trajectory (i=0, t=0) in dimension d; Refers to the starting speed value specified for the power grid inspection task, which can be determined based on the inspection starting state of the target UAV; Refers to the acceleration of the starting point of the entire trajectory in dimension d, Refers to the acceleration value specified by the power grid inspection task.
[0205] The velocity and acceleration constraints at the endpoint are shown in Equation 17:
[0206]
[0207] in, Refers to the end point of the entire trajectory (i=N-1, t=T N-1 ) in dimension d, The terminal speed value specified for the power grid inspection task can be determined based on the inspection terminal status of the target UAV; Refers to the duration corresponding to the last trajectory; Refers to the acceleration of the end point of the entire trajectory in dimension d, Refers to the endpoint acceleration value specified by the power grid inspection task.
[0208] S7023. Construct internal connection point continuity constraints to force the continuity of high-order derivatives of adjacent trajectory segments at the connection points to ensure smooth trajectory without mutations.
[0209] In this step, the polynomials of the two adjacent trajectory segments are required to be continuous in terms of velocity, acceleration, jerk, and acceleration at the connection point, as shown in Formula 18:
[0210]
[0211] Where k is the order of the derivative, corresponding to velocity (k=1), acceleration (k=2), jerk (k=3), and acceleration (k=4). Refers to the i-1th segment of the trajectory at the end point T i-1The k-order derivative value at , It refers to the k-order derivative value of the i-th trajectory at the starting point t=0 of the trajectory.
[0212] S7024. Calculate the total constraint equation group based on the position constraints, boundary condition constraints, and internal connection point continuity constraints.
[0213] In this step, the total constraints include 2N (path points) + 4 (boundaries V, A) + 4(N-1) (continuity V, A, J, S) = 6N, which is the same as the number of 6N quintic polynomial coefficients to be solved.
[0214] Substituting the 6N constraints into the expression of the piecewise quintic polynomial and its derivatives, we obtain a linear equation about the 6N position coefficients, as shown in Formula 19, which is the linear constraint equation system:
[0215]
[0216] Among them, A is a 6N×6N constraint matrix, each row corresponds to a constraint condition, and the structure is used to divide the segment length T i It is independent of the location of the waypoint; C d Refers to the 6N×1 coefficient vector, containing 6N unknowns, B d Refers to a 6N×1 vector of known values, including the path point position, convenient speed, and acceleration.
[0217] S703 , calculating the polynomial coefficients corresponding to each sub-trajectory based on the linear constraint equation group.
[0218] In this step, equation 19 is solved to obtain equation 20:
[0219]
[0220] Among them, A -1 Refers to the inverse matrix of the constraint matrix A. It is necessary to ensure that A is reversible. C d Refers to the coefficient vector obtained by solution, which is used to uniquely determine the polynomial form of each segment of the trajectory, B d Refers to a 6N×1 vector of known values, including the path point position, convenient speed, and acceleration.
[0221] For example, Figure 8 A schematic diagram of a piecewise quintic polynomial fitting trajectory provided in an embodiment of the present application is shown in FIG. Figure 8As shown in the figure: the dotted line outside the obstacle area refers to the safety margin of the obstacle, the smooth segmented trajectory refers to the segmented quintic polynomial trajectory, there are multiple segmentation points in the trajectory of the inspection start and inspection end points, each segmentation point represents a trajectory segment, and the curve representing the trajectory in the middle of the obstacle corresponds to the trajectory of the target UAV in the plane top view. The horizontal axis of the figure refers to the coordinate of the trajectory on the X-axis, and the vertical axis refers to the coordinate of the trajectory on the Y-axis.
[0222] Figure 9 A schematic diagram of a curve showing the change of the speed and acceleration of a drone over time provided in an embodiment of the present application is shown in FIG. Figure 9 As shown in the figure, the upper half shows the curve of velocity changing over time. The dashed curve represents the drone's velocity, and the corresponding two solid curves represent the drone's velocities on the X and Y axes. vx represents the drone's velocity on the X axis, and vy represents the drone's velocity on the Y axis. The lower half shows the curve of acceleration changing over time. The dashed curve represents the drone's acceleration, and the two solid curves represent the drone's acceleration on the X and Y axes. ax represents the drone's acceleration on the X axis, and ay represents the drone's acceleration on the Y axis. The continuous and smooth velocity and acceleration curves reflect the smoothness of the drone's motion.
[0223] S704 : Based on the polynomial coefficients corresponding to each sub-trajectory, the discrete path point sequence is smoothed to obtain the optimized trajectory for power grid inspection.
[0224] In this step, the smoothing process is performed by concatenating the polynomial functions of each sub-trajectory in chronological order to form a globally continuous and high-order differentiable trajectory. The resulting trajectory satisfies the continuity and constraints of position, velocity, and acceleration.
[0225] Figure 10 Schematic diagram of the process of the drone inspection control method for the power grid environment provided in this application Figure 4 ,like Figure 10 As shown, this embodiment further explains the construction of the EDF map used in the above embodiment. The method includes:
[0226] S1001. Obtain a three-dimensional occupancy grid map corresponding to a power grid environment.
[0227] In this step, the method for obtaining the three-dimensional occupancy grid map corresponding to the power grid environment is:
[0228] Using lidar, visual sensors, and navigation systems, we collect environmental data corresponding to the power grid environment. We then perform point cloud processing on this environmental data to generate point cloud data of the power grid environment. This point cloud data, combined with a pre-set grid resolution, is then used to generate a three-dimensional occupancy grid map.
[0229] In this step, the 3D occupancy grid map divides the environment into uniform 3D cube cells, with each cell labeled "occupied" or "free space." The power grid environment includes, but is not limited to, transmission towers, high-voltage lines, buildings, and vegetation. Environmental data for the power grid environment can be obtained through LiDAR visual scanning.
[0230] For example, the three-dimensional grid occupancy is denoted as M. The map is a regular grid structure, and its corresponding unreading is H×W×D, and the resolution is res (meters / grid); the physical coordinates of the map are Each grid stores a Boolean value M(i), where M(i)=1 indicates that the grid is occupied by an obstacle, and M(i)=0 indicates that the grid is free space. Each grid is represented by c(i), where i refers to the index of the grid, that is, the position of the grid in the grid map.
[0231] S1002: Perform Euclidean distance transformation on the free space grids in the three-dimensional occupancy grid map to calculate the physical distance from each free space grid to the nearest obstacle.
[0232] In this step, obstacles include: terrain, vegetation, buildings, and power equipment in the power grid environment. The free space grid refers to the unit space in the three-dimensional occupied grid map that can be used for drones to pass through.
[0233] The Euclidean distance transform calculates the three-dimensional straight-line distance from each free-space grid cell to the nearest obstacle. This step aims to generate safe distance values for the free-space grid cells, which are used to avoid obstacles during UAV flight.
[0234] An exemplary Euclidean distance transform involves calculating the Euclidean distance transform of the complement of the occupied grid map, i.e., the free space, before the path planning task begins. This calculates the exact Euclidean distance from each free space grid to the nearest occupied grid, thereby generating a distance map in grid units. The Euclidean distance calculation formula is shown in Equation 21:
[0235]
[0236] in, Represents the distance value from the free grid with index i to its nearest occupied grid, Indicates the occupied grid Boolean value of The index of the occupied grid, that is, the position of the occupied grid in the grid map.
[0237] Based on the calculated Euclidean distance, the physical distance field map is obtained, as shown in Formula 22:
[0238]
[0239] in, Represents the distance value from the free grid with index i to its nearest occupied grid; Indicates the physical distance value from the free grid with index i to its nearest occupied grid; res is the resolution.
[0240] S1003: Generate an index of the corresponding physical distance based on the three-dimensional coordinates corresponding to each free space grid.
[0241] In this step, generating an index based on three-dimensional coordinates means mapping the three-dimensional coordinates of each grid to a unique index value for quick storage and query. The corresponding index can be determined based on the three-dimensional coordinates, and the physical distance corresponding to the coordinate can be quickly queried based on the index, thereby achieving the purpose of associating the physical distance value with the three-dimensional coordinates.
[0242] S1004: Determine the free space grid as a path point, and generate an EDF map based on the physical distance and index corresponding to each path point.
[0243] In this step, a waypoint refers to a location that the target drone can reach. The value of this point in the EDF map is used to determine its safety weight. The EDF map can be a three-dimensional array or sparse storage. A three-dimensional array maps the coordinates of a three-dimensional grid to physical distances, using the grid coordinates as indices to quickly find distance values. Sparse storage stores only the coordinates and physical distances corresponding to the free grid.
[0244] For example, in the path search phase, it is necessary to obtain the physical distance from the continuous physical coordinate points thrown in the control to the surface of the nearest obstacle area. It is necessary to calculate the coordinates of the coordinate points in the grid map and convert the physical coordinates into floating-point indices in the distance field map. The conversion method is shown in Formula 23:
[0245]
[0246] Among them, P refers to the continuous physical coordinates of the drone in three-dimensional space, P origin Refers to the origin coordinates of the grid map corresponding to the EDF map; res refers to the resolution of the grid in the EDF map, that is, the physical side length of each grid; I f Refers to floating point indices.
[0247] Using floating-point indices, multilinear interpolation is performed in the pre-calculated EDF map to obtain the precise physical distance of the trajectory node to the nearest obstacle area. Specifically, let I = ⌊I f ⌋=[i,j,k] T For If The integer part of F=I f -I=[f i ,f j ,f k ] T is the decimal part. d(P) is expressed as f Around 2 d The distance values of the neighboring grids with integer indices are weighted summed. Taking the trilinear interpolation in three-dimensional space as an example, the trilinear interpolation needs to consider the distances around I f The indices of these neighbors can be expressed as I+△i, where △i=[di,dj,dk] T , and di,dj,dk∈{0,1}. The interpolation formula is shown in Formula 24:
[0248]
[0249] Among them, D meters (i+di,j+dj,k+dk) refers to the distance from the grid (i+di,j+dj,k+dk) to the nearest obstacle in the pre-calculated EDF map; d i ,d j ,d k ∈{0,1} refers to the integer offset used to traverse the eight neighbors around the current grid. w(di,dj,dk) is the weight calculated based on the fractional part F, a total of 8, which is determined by the fractional part F. The calculation formula is shown in Formula 25:
[0250]
[0251] For explanation of relevant parameters, please refer to Formula 23 and Formula 24.
[0252] It should be noted that the interpolation result d(P) is the precise physical distance estimate from point P to the nearest obstacle boundary. By leveraging the EDF map to quickly obtain distance information d, we can further improve trajectory safety by setting a safety margin.
[0253] Figure 11 The schematic diagram of the structure of the UAV inspection control device for the power grid environment provided by this application is as follows: Figure 11 As shown, the drone inspection control device for a power grid environment provided in this embodiment includes:
[0254] An acquisition module 1101, in response to a power grid inspection task, acquires an inspection start state, an inspection end state, and a pre-calculated Euclidean distance field (EDF) map corresponding to a target power grid environment.
[0255] The first processing module 1102 is used to perform path search in the EDF map using the improved dynamic A-star algorithm based on the EDF map, the inspection starting point status and the inspection end point status, and obtain a power grid inspection planning path for the target UAV to perform power grid inspection.
[0256] Among them, the improved dynamic A-star algorithm refers to a path search algorithm based on the dynamic constraints of the drone. The EDF map contains multiple path points, and each path point corresponds to a unit space in the target power grid environment that the drone can safely pass through.
[0257] The second processing module 1103 is used to optimize the grid inspection planning path according to the discrete path point sequence of the grid inspection planning path and the preset boundary conditions by using a piecewise quintic polynomial fitting method to generate a grid inspection optimized trajectory.
[0258] The third processing module 1104 is used to control the target UAV to fly along the optimized trajectory for power grid inspection.
[0259] In a possible implementation, the first processing module 1102 is further configured to:
[0260] Based on the EDF map, the inspection starting point state and the dynamic constraints of the target UAV, an improved dynamic A-star algorithm is constructed for the state space of path search.
[0261] Multiple iterative searches are performed based on the state space to obtain the power grid inspection planning path.
[0262] In a possible implementation, the first processing module 1102 is further configured to:
[0263] In each iterative search, the path point with the lowest flight cost is selected from the preset open list corresponding to the state space as the current path point.
[0264] When the current path point does not meet the preset termination condition, a path point search is performed on the state space based on the path point state of the current path point and the preset control instruction set to obtain a sub-path point set, which includes multiple sub-path points and the path point trajectory corresponding to each sub-path point; wherein, the sub-path point refers to a path point that is reachable by the target UAV and adjacent to the current path point.
[0265] Based on the EDF map, the security of the path point trajectory of each sub-path point in the sub-path point set is verified, the sub-path points that pass the verification are added to the preset open list, and the current path point is moved from the preset open list to the preset closed list.
[0266] When the current path point meets the preset termination condition, the inspection starting point state is traced back based on the inspection end point state to obtain the power grid inspection planning path corresponding to the target UAV.
[0267] The preset termination condition refers to the distance between the current path point and the inspection end point being less than a preset threshold.
[0268] In a possible implementation, the second processing module 1103 is further configured to:
[0269] Based on the discrete path point sequence of the power grid inspection planning path, the discrete path point sequence is divided into N sub-trajectories, where N is a positive integer greater than 0.
[0270] For the quintic polynomial corresponding to each sub-trajectory, combined with the preset boundary conditions, a set of linear constraint equations corresponding to the sub-trajectory is constructed.
[0271] The polynomial coefficients corresponding to each sub-trajectory are calculated based on the linear constraint equations.
[0272] Based on the polynomial coefficients corresponding to each sub-trajectory, the discrete path point sequence is smoothed to obtain the optimized trajectory of power grid inspection.
[0273] In a possible implementation, the third processing module 1104 is further configured to:
[0274] The target UAV is controlled to fly along the optimized trajectory for power grid inspection, and the distance between the target UAV and obstacles is collected in real time.
[0275] When the distance between the target UAV and the obstacle is lower than the safe distance, the current position of the target UAV is obtained, and the next position of the target UAV is determined based on the power grid inspection optimization trajectory.
[0276] Based on the current position and the next position, the improved dynamic A-star algorithm is used to generate an obstacle avoidance path.
[0277] The obstacle avoidance path and the power grid inspection optimization trajectory are spliced together to obtain the updated power grid inspection optimization trajectory.
[0278] Control the target UAV to fly along the updated optimized trajectory for power grid inspection.
[0279] In a possible implementation, the apparatus further includes a fourth processing module, configured to:
[0280] Obtaining a three-dimensional occupancy grid map corresponding to the power grid environment;
[0281] A Euclidean distance transform is performed on the free-space grids in the 3D occupancy grid map to calculate the physical distance from each free-space grid to the nearest obstacle. Obstacles include landforms, vegetation, buildings, and electrical equipment in the power grid environment. A free-space grid refers to the unit space in the 3D occupancy grid map that can be used by drones.
[0282] Based on the three-dimensional coordinates corresponding to each free space grid, an index of its corresponding physical distance is generated.
[0283] The free space grid is determined as a waypoint, and an EDF map is generated based on the physical distance and index corresponding to each waypoint.
[0284] The drone inspection control device for a power grid environment provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effects are similar, and are not described in detail in this embodiment.
[0285] Figure 12 This is a schematic diagram of the structure of the electronic device provided in this application. Figure 12 As shown, the electronic device provided by this embodiment includes: at least one processor 1201 and a memory 1202. Optionally, the device further includes a communication component 1203. The processor 1201, the memory 1202 and the communication component 1203 are connected via a bus 1204.
[0286] During the specific implementation process, at least one processor 1201 executes the computer execution instructions stored in the memory 1202, so that at least one processor 1201 executes the above-mentioned drone inspection control method for the power grid environment.
[0287] The specific implementation process of the processor 1201 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.
[0288] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASICs), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.
[0289] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage.
[0290] A bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.
[0291] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the above-mentioned drone inspection control method for a power grid environment.
[0292] The present application also provides a computer-readable storage medium, which stores computer-executable instructions. When a processor executes the computer-executable instructions, the above-mentioned drone inspection control method for a power grid environment is implemented.
[0293] The readable storage medium may be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0294] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium may also be an integral part of the processor. The processor and the readable storage medium may be located in an application-specific integrated circuit (ASIC). The processor and the readable storage medium may also exist as discrete components in a device.
[0295] The division of units is merely a logical functional division; actual implementations may employ alternative divisions, such as combining or integrating multiple units or components into another system, or omitting or disabling certain features. Furthermore, any coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units, whether electrical, mechanical, or otherwise, through some interface.
[0296] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0297] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0298] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the method of the present invention. The aforementioned storage medium includes various media that can store program code, such as USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.
[0299] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0300] Finally, it should be noted that those skilled in the art will readily identify other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art not disclosed herein. The present invention is not limited to the precise structure described above and illustrated in the accompanying drawings, and various modifications and variations may be made without departing from the scope thereof. The scope of the present invention is limited solely by the appended claims.
Claims
1. A drone inspection control method for a power grid environment, characterized in that: The method comprises: In response to a power grid inspection task, obtaining an inspection starting point state and an inspection end point state corresponding to the power grid inspection task, and a pre-calculated Euclidean distance field (EDF) map corresponding to a target power grid environment; Based on the EDF map, the inspection starting point state, and the inspection end point state, a path search is performed in the EDF map using an improved dynamic A-star algorithm to obtain a power grid inspection planning path for the target UAV to perform power grid inspection; The improved dynamic A-star algorithm refers to a path search algorithm based on the dynamic constraints of the UAV. The EDF map contains multiple path points, each of which corresponds to a unit space in the target power grid environment that the target UAV can safely pass through. According to the discrete path point sequence of the power grid inspection planning path, combined with preset boundary conditions, the power grid inspection planning path is optimized by using a piecewise quintic polynomial fitting method to generate a power grid inspection optimized trajectory; The target UAV is controlled to fly along the optimized trajectory for power grid inspection.
2. The method according to claim 1, characterized in that The method of performing a path search in the EDF map using an improved dynamic A-star algorithm based on the EDF map, the inspection starting point state, and the inspection end point state to obtain a power grid inspection planning path for a target UAV to perform power grid inspection includes: Based on the EDF map, the inspection starting point state and the dynamic constraints of the target UAV, constructing the state space of the improved dynamic A-star algorithm for path search; Multiple iterative searches are performed based on the state space to obtain the power grid inspection planning path.
3. The method according to claim 2, characterized in that The performing multiple iterative searches based on the state space to obtain the power grid inspection planning path includes: In each iterative search, a pathpoint with the lowest flight cost is selected from a preset open list corresponding to the state space as the current pathpoint; When the current path point does not meet the preset termination condition, a path point search is performed on the state space based on the path point state of the current path point and a preset control instruction set to obtain a sub-path point set, wherein the sub-path point set includes multiple sub-path points and a path point trajectory corresponding to each sub-path point; wherein the sub-path point refers to a path point that is reachable by the target UAV and adjacent to the current path point; Verifying the security of the path point trajectory of each sub-path point in the sub-path point set based on the EDF map, adding the sub-path points that pass the verification to the preset open list, and moving the current path point from the preset open list to the preset closed list; When the current path point meets the preset termination condition, tracing back to the inspection starting state based on the inspection end state to obtain the power grid inspection planning path corresponding to the target UAV; The preset termination condition refers to that the distance between the current path point and the inspection end point is less than a preset threshold.
4. The method according to claim 3, characterized in that The method of optimizing the power grid inspection planning path by using a piecewise quintic polynomial fitting method based on the discrete path point sequence of the power grid inspection planning path and preset boundary conditions to generate a power grid inspection optimized trajectory includes: Based on the discrete path point sequence of the power grid inspection planning path, the discrete path point sequence is divided into N sub-trajectories, where N is a positive integer greater than 0; For each sub-trajectory corresponding to the fifth-order polynomial, combined with the preset boundary conditions, a linear constraint equation group corresponding to the sub-trajectory is constructed; The polynomial coefficients corresponding to each sub-trajectory are calculated based on the linear constraint equation group; Based on the polynomial coefficients corresponding to each sub-trajectory, the discrete path point sequence is smoothed to obtain the power grid inspection optimization trajectory.
5. The method according to claim 4, characterized in that The controlling the target UAV to fly along the power grid inspection optimized trajectory includes: Controlling the target UAV to fly along the optimized power grid inspection trajectory and collecting the distance between the target UAV and obstacles in real time; When the distance between the target UAV and the obstacle is less than the safe distance, obtaining the current position of the target UAV, and determining the next position of the target UAV based on the power grid inspection optimized trajectory; Based on the current position and the next position, generating an obstacle avoidance path using the improved dynamic A-star algorithm; Based on the obstacle avoidance path and the power grid inspection optimization trajectory, an updated power grid inspection optimization trajectory is obtained; The target UAV is controlled to fly along the updated power grid inspection optimized trajectory.
6. The method according to claim 3, characterized in that Before obtaining, in response to the power grid inspection task, the inspection starting state and inspection ending state corresponding to the power grid inspection task, and the pre-calculated EDF map corresponding to the target power grid environment, the method further includes: Obtaining a three-dimensional occupancy grid map corresponding to the power grid environment; Performing a Euclidean distance transform on the free space grids in the three-dimensional occupancy grid map to calculate the physical distance from each free space grid to the nearest obstacle; wherein the obstacles include landforms, vegetation, buildings, and power equipment in the power grid environment; and the free space grid refers to a unit space in the three-dimensional occupancy grid map that can be used by the drone to pass through; Generate an index of the corresponding physical distance based on the three-dimensional coordinates corresponding to each free space grid; The free space grid is determined as a path point, and an EDF map is generated based on the physical distance and index corresponding to each path point.
7. A drone inspection control device for a power grid environment, comprising: an acquisition module, in response to a power grid inspection task, acquiring an inspection starting state, an inspection ending state corresponding to the power grid inspection task, and a pre-calculated Euclidean distance field (EDF) map corresponding to a target power grid environment; A first processing module is configured to perform a path search in the EDF map using an improved dynamic A-star algorithm based on the EDF map, the inspection starting point state, and the inspection end point state, to obtain a power grid inspection planning path for the target UAV to perform power grid inspection; The improved dynamic A-star algorithm refers to a path search algorithm based on the dynamic constraints of the UAV. The EDF map contains multiple path points, each of which corresponds to a unit space in the target power grid environment that the UAV can safely pass through. A second processing module is configured to optimize the grid inspection planning path by using a piecewise quintic polynomial fitting method according to the discrete path point sequence of the grid inspection planning path and in combination with preset boundary conditions to generate a grid inspection optimized trajectory; The third processing module is used to control the target UAV to fly along the power grid inspection optimized trajectory.
8. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.
10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 6 when the computer program is executed by a processor.