Unmanned aerial vehicle line autonomous inspection method based on dynamic flight path planning
Through the improved two-way RRT algorithm and hazardous area constraint model, combined with optical ranging, autonomous inspection of drones is achieved, which solves the problems of low inspection accuracy and high risk of drones in complex environments, and improves the efficiency and safety of transmission line inspection.
Patent Information
- Application Number
- CN202510246665.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-07-11
AI Technical Summary
When patrolling transmission lines, drones face complex terrain, sudden changes in threats and line space electric field interference, resulting in low patrol accuracy and high risks, especially in areas where birds are frequently active, affecting the stability of the power supply system.
The improved two-way RRT algorithm is adopted to build a hazardous area constraint model, and the track planning is carried out in static and dynamic threats. Combined with the distance measurement of optical observation equipment, an autonomous drone inspection system is established to realize autonomous inspection throughout the whole process.
It improves the efficiency and accuracy of drone inspections, reduces the risks of inspection operations, and ensures the safety of the inspection process and real-time response capabilities.
Smart Images

Figure CN120293131A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of transmission line inspection, and particularly relates to an autonomous inspection method for an unmanned aerial vehicle (UAV) line based on dynamic trajectory planning. Background Art
[0002] In the past decade, with the leapfrog development of the national economy and industry, the living standards of the people have been significantly improved, and the demand for electricity in the whole society has become larger and larger. The electricity consumption in each region has been increasing year by year. Under such circumstances, higher requirements are put forward for the power quality provided by the power system; transmission lines are widely and densely distributed. When transmission lines pass through areas with lush forests and rich bird resources, a series of activities of birds may cause short-term tripping faults of transmission lines, affecting the stability of the power supply system. More seriously, it may affect the safe operation of transmission lines. Therefore, it is necessary to conduct bird inspection and bird repelling while inspecting the transmission lines. However, the UAV line inspection environment is usually complex in terrain, and the sudden threats suffered are variable. Moreover, when inspecting high-voltage transmission lines, it may be interfered by the spatial electric field of the lines, resulting in UAV failures or even line collision accidents. Therefore, it is of great significance to construct a UAV cruise path with dangerous area constraints while conducting bird inspection and bird repelling, which can improve the UAV inspection accuracy and realize intelligent UAV line inspection; therefore, it is very necessary to provide an autonomous inspection method for an unmanned aerial vehicle (UAV) line based on dynamic trajectory planning that adopts an improved bidirectional RRT algorithm, constructs a dangerous area constraint model, realizes autonomous cruising, and improves efficiency and reduces risks. Summary of the Invention
[0003] The purpose of the present invention is to overcome the deficiencies of the prior art and provide an autonomous inspection method for an unmanned aerial vehicle (UAV) line based on dynamic trajectory planning that adopts an improved bidirectional RRT algorithm, constructs a dangerous area constraint model, realizes autonomous cruising, and improves efficiency and reduces risks.
[0004] The purpose of the present invention is achieved as follows: An autonomous inspection method for an unmanned aerial vehicle (UAV) line based on dynamic trajectory planning, the method comprising the following steps:
[0005] Step 1: First, measure the imaging height of the tower and the distance between adjacent towers through an optical observation device, and calculate the safety distance between the UAV and the transmission line;
[0006] Step 2: Construct a UAV cruise path model with dangerous area constraints, including two types of dangerous area constraints: polygon and disc;
[0007] Step 3: Then, classify various sudden situations that the UAV may encounter during line inspection into static threats and dynamic threats, establish trajectory planning models for the two sudden situations, and adopt an improved bidirectional rapidly-exploring random tree (RRT) algorithm for trajectory replanning;
[0008] Step 4: Finally, establish an unmanned aerial vehicle (UAV) autonomous inspection system according to the above inspection trajectory planning to achieve autonomous inspection throughout the process.
[0009] The calculation of the safety distance between the UAV and the transmission line in Step 1 includes the following steps:
[0010] Step 1.1: Horizontal safety distance standard: The safety distance D between the UAV and the transmission line s can be expressed as D s = max{I1, I2, I3, I4} + x1 + x2 + x3 + x4 + vt + max{a1, a2, a3, a4} (1), where I1 and I2 are the critical distances on both sides of the transmission line where the magnetic field does not affect the operation of the UAV; I3 and I4 are the critical distances on both sides of the transmission line where the electric field does not affect the operation of the UAV; x1 is the error distance between the pre-planned flight path and the actual flight path of the UAV; x2 is the position deviation distance caused by the wind; x3 is the measurement error distance of the rangefinder; x4 is the GPS positioning distance deviation; v is the flight speed of the UAV; t is the maximum wireless communication delay; a1 is the length of the UAV wing; a2 is the distance between the UAV nose and its main axis; a3 is the distance between the UAV tail and its main axis; a4 is the distance between the UAV on-board gimbal and the UAV main axis;
[0011] Step 1.2: Monocular vision ranging method: Assume the height of the tower is H and the camera focal length is f. The height of the tower obtained from the image taken by the UAV is h a 、h b , then the object distances between the UAV and towers A and B are respectively: u a = (H + h a ) f / h a (2), u b = (H + h b ) f / h b (3), and the image distances are respectively: v a = (H + h a ) f / H (4), v b = (H + h b ) f / H (5). The distance x between the UAV and the transmission line is: where θ is the angle between towers A and B at the optical center of the UAV; during UAV inspection, the distances between the UAV and the towers and the line are measured by the monocular vision ranging method, compared with the safety distance corresponding to the voltage level of the inspection line, and through real-time correction of the inspection flight path, the UAV inspection can fly safely.
[0012] In the UAV cruise path model with dangerous area constraints constructed in step 2, when the dangerous area is a polygonal area, the UAV inspection gives geographical coordinates and Cartesian coordinates. The relationship between the geographical coordinates (r, θ) and the Cartesian coordinates (x, y) is: x = r sinθ; y = r cosθ, where θ is the angle between the positive direction of the y-axis and the position vector; let the Cartesian coordinates of two points be (x i , y i ), (x j , y j ), then the straight-line distance between the two points without passing through the dangerous area is:
[0013] In the UAV cruise path model with dangerous area constraints constructed in step 2, when the dangerous area is a disk area, if the distance d from the center O of the circle to the line segment AB connecting the two inspection target points is less than r, then the line segment connecting the two inspection target points intersects the dangerous area; if the distance d ≥ r, then the line segment AB connecting the two inspection target points does not intersect the dangerous area; when the line segment connecting the two points passes through the dangerous area, then the actual distance between the two points: d ij = d1 + d2 + d3, where d1 is the tangent length from point A to the circle; d3 is the tangent length from point B to the circle; d2 is the arc length between the two tangent points.
[0014] The UAV cruise path model with dangerous area constraints constructed in step 2 is solved by using the genetic algorithm. Specifically:
[0015] Step 2.1: Solution space: The solution space S can be expressed as the set of all cyclic permutations of {0, 1,..., n - 1, n} with fixed starting and ending points, that is, S = {(π0,..., π n ) | π0 = 0, π n = n, (π1,..., π n-1 ) is a cyclic permutation of {1, 2,..., n - 1}}, where each cyclic permutation represents a tour path for inspecting n - 1 targets, and π i = j means inspecting target j at the i-th inspection;
[0016] Step 2.2: Encoding strategy: Decimal encoding is adopted, and the random number sequence ω1ω2...ω n-1 is used as the chromosome, where 0 < ω i < 1 (i = 1, 2,..., n - 1), and each random sequence corresponds to an individual in the population;
[0017] Step 2.3: Initial population: First, use the improved 2-opt algorithm to obtain a better initial feasible solution; for the initial cycle: C = π0…π u-1 π u π u+1 …πv-1 π v π v+1 …π n , 1 ≤ u < v ≤ n - 1, 1 ≤ π u <π v ≤ n - 1, swap the order between u and v. The new path at this time is: π0…π u-1 π v π v-1 …π u+1 π u π v+1 …π n , denote If Δf < 0, then modify the old path with the new path until it cannot be modified, and a better feasible solution can be obtained; until M initial feasible solutions are generated, and these M feasible solutions are converted into chromosome encodings;
[0018] Step 2.4: Objective function: The objective function is the path length of traversing all targets, and the fitness function is taken as the objective function:
[0019] Step 2.5: Crossover operation: Single-point crossover is adopted. For the two selected parent individuals f1 = ω1ω2…ω n-1 , f2 = ω1′ω2′…ω n ′ -1 , randomly select the t-th gene as the crossover point. Then, the offspring encodings s1 and s2 obtained after the crossover operation are such that the genes of s1 are composed of the first t genes of f1 and the last (n - 1) - t genes of f2; the genes of s2 are composed of the first t genes of f2 and the last (n - 1) - t genes of f1;
[0020] Step 2.6: Mutation operation: According to the given mutation rate, for the selected mutant individual, randomly select three integers that satisfy 1 < u < v < w < n - 1, and insert the gene segment between u and v behind w;
[0021] Step 2.7: Selection: Select the M chromosomes with the smallest objective function values to evolve to the next generation, so as to ensure that the excellent characteristics of the parent generation are preserved.
[0022] The UAV patrol path planning in step 3 includes: global static path planning and local dynamic path replanning.
[0023] The global static path planning includes the following steps:
[0024] Step a: According to the distributed inspection lines, determine the UAV flight area, inspection order, and UAV inspection start and end points;
[0025] Step b: Based on the determined flight route, obtain the geographical environment information within the corresponding area, and combine with the constraints of dangerous areas to construct the overall flight environment;
[0026] Step c: Combine the constraints of the UAV and dangerous areas and the constraints of various factors in the flight environment to plan the optimal flight trajectory in the global flight environment.
[0027] The local dynamic trajectory replanning includes static sudden threat trajectory planning and dynamic sudden threat trajectory planning.
[0028] The static sudden threat trajectory planning is as follows:
[0029] S1: Determine the trajectory replanning area by analyzing the current position of the UAV and the static threat range;
[0030] S2: Determine the starting point start′ and the ending point goal′ of the replanning area;
[0031] S3: Establish two search trees T s ′ tart and T g ′ oal , with start′ and goal′ as the root nodes of the two trees respectively;
[0032] S4: Expand the two search trees;
[0033] S5: After connecting T s ′ tart and T g ′ oal , backtrack to generate the trajectory;
[0034] S6: Smooth the trajectory;
[0035] S7: After the UAV avoids obstacles according to the replanned trajectory, return to the global static trajectory to continue the inspection task.
[0036] The dynamic sudden threat trajectory planning is as follows:
[0037] Step A: Determine the trajectory replanning area by analyzing the current position of the UAV, the dynamic threat range and the speed;
[0038] Step B: Select the target node as the random node x rand , and expand the search tree along this direction until the expansion fails; if the expansion along the target node direction fails, then determine x rand according to the UAV motion trajectory equation, and obtain the node x rand that can avoid threats by changing the value of Δθ;
[0039] Step C: According to the obtained new node xrand Expanded Random Tree: Generate the next node according to the motion trajectory equations of the UAV in the horizontal and vertical directions, calculate its movement cost F, and select the node with the minimum movement cost as the next flight path point;
[0040] Step D: Connect all the flight path points and perform smoothing processing to obtain the replanned flight path for dynamic sudden threats.
[0041] Advantages of the present invention: The present invention is an autonomous inspection method for UAV power transmission lines based on dynamic flight path planning for both static and dynamic sudden threats, and dangerous area constraints are considered in the inspection planning. In use, first, measure the imaging height of the tower pole and the distance between adjacent tower poles through an optical observation device, and calculate the safe distance between the UAV and the power transmission line; then, classify various sudden situations that the UAV may encounter during line inspection into static threats and dynamic threats, establish flight path planning models for the two sudden situations, and use an improved bidirectional rapidly-exploring random tree (RRT) algorithm for flight path replanning; finally, establish an autonomous inspection system for the UAV according to the above inspection trajectory planning to realize full-process autonomous inspection, which can greatly improve the line inspection efficiency and reduce the risk of inspection operations; the present invention has the advantages of using an improved bidirectional RRT algorithm, constructing a dangerous area constraint model, realizing autonomous cruise, and improving efficiency and reducing risks. Description of the Drawings
[0042] Figure 1 It is the schematic diagram of monocular ranging of the present invention.
[0043] Figure 2 It is the schematic diagram of the disc dangerous area of the present invention.
[0044] Figure 3 It is the schematic diagram of static sudden threat of the present invention.
[0045] Figure 4 It is the flow chart of UAV autonomous inspection of the present invention. Detailed Embodiments
[0046] The following further describes the present invention with reference to the drawings.
[0047] Embodiment 1
[0048] As Figures 1-4 shown, an autonomous inspection method for UAV power lines based on dynamic flight path planning, the method comprising the following steps:
[0049] Step 1: First, measure the imaging height of the tower pole and the distance between adjacent tower poles through an optical observation device, and calculate the safe distance between the UAV and the power transmission line;
[0050] In this embodiment, ① Horizontal safety distance standard: According to the structural characteristics of the transmission line and the UAV equipment, the safety distance D between the UAV and the transmission line s can be expressed as D s = max{I1, I2, I3, I4} + x1 + x2 + x3 + x4 + vt + max{a1, a2, a3, a4} (1), where I1 and I2 are the critical distances on both sides of the transmission line where the magnetic field does not affect the UAV's operation; I3 and I4 are the critical distances on both sides of the transmission line where the electric field does not affect the UAV's operation; x1 is the error distance between the pre-planned flight path and the actual flight path of the UAV; x2 is the position deviation distance caused by the wind; x3 is the measurement error distance of the rangefinder; x4 is the GPS positioning distance deviation; v is the flight speed of the UAV; t is the maximum wireless communication delay; a1 is the length of the UAV's wing; a2 is the distance between the UAV's nose and its main axis; a3 is the distance between the UAV's tail and its main axis; a4 is the distance between the UAV's on-board gimbal and the UAV's main axis.
[0051] ② Monocular vision ranging method: Since the actual height of the pole tower is determined and known, therefore, by using the optical equipment carried by the UAV, the adjacent transmission line pole towers can be photographed, the distance between the pole towers in the photographed image can be measured, and based on the principle of pinhole imaging, the horizontal distance between the UAV and the transmission line can be obtained; the principle of UAV monocular ranging is as Figure 1 shown, where l is the distance between the images of A' and B'; θ0 is the imaging angle of the images of A' and B'; θ is the angle between the pole towers A and B at the optical center of the UAV; α is the angle between the optical center of the UAV and the pole tower B and the line AB; u a 、u b 、v a 、v b are the object distances and image distances of the pole towers A and B respectively; L is the actual distance between the transmission line pole towers A and B; x is the horizontal distance between the UAV and the transmission line.
[0052] Assume that the height of the pole tower is H and the focal length of the camera is f. The heights of the pole towers obtained from the image taken by the UAV are h a 、h b , then the object distances between the UAV and the pole towers A and B are respectively: u a =(H + h a )f / h a (2), u b =(H + h b )f / h b (3), and the image distances are respectively: v a =(H + h a )f / H (4), v b =(H + h b)f / H(5), the distance x between the UAV and the transmission line is: During the UAV inspection, the distances between the UAV and the tower and the line are measured by the monocular vision ranging method, compared with the safety distances corresponding to the voltage levels of the inspection lines, and the inspection track of the UAV is corrected in real time, so that the UAV inspection can fly safely.
[0053] Step 2: Construct a UAV cruise path model with dangerous area constraints, including two types of dangerous area constraints: polygon and disc;
[0054] Step 3: Then, classify various emergencies that the UAV may encounter during line inspection into static threats and dynamic threats, establish trajectory planning models for the two types of emergencies, and use the improved bidirectional rapidly-exploring random tree (RRT) algorithm for trajectory replanning;
[0055] In this embodiment, ① UAV global static trajectory planning: Global static trajectory planning refers to the inspection route planned in advance according to the inspection target towers and lines before the UAV conducts inspection; this trajectory does not predict possible emergencies in the line during planning, so it is planned only considering the geographical environment information mastered in advance and the above-mentioned dangerous area constraints, that is, only the distance of the inspection route needs to be considered without considering real-time performance; the steps of UAV inspection global static trajectory planning are as follows:
[0056] Step a: According to the distributed inspection lines, determine the UAV flight area, inspection order, and the starting and ending points of the UAV inspection;
[0057] Step b: Based on the determined flight route, obtain the geographical environment information in the corresponding area, and combine the dangerous area constraints to construct the overall flight environment;
[0058] Step c: Combine the constraints of the UAV and the dangerous area constraints and various factors of the flight environment to plan the optimal flight trajectory in the global flight environment.
[0059] ② Local dynamic trajectory replanning: Local dynamic trajectory planning refers to the situation where sudden obstacles or threats occur during the UAV inspection operation, such as threats that cannot be predicted in advance, such as birds, falling branches, and unknown obstacles. The UAV cannot avoid flying according to the planned trajectory and needs to re-plan the flight path; since the sudden threats during the inspection operation are unknown, the dynamic trajectory planning has higher real-time performance than the global trajectory planning, ensuring that the UAV can avoid sudden threats while not deviating from the original planned flight route.
[0060] There are a wide variety of sudden threats that drones may encounter, and their occurrence mechanisms are complex. To simplify the analysis, the present invention classifies sudden threats into two types. One is static sudden threats that are not discovered when planning the global flight path, such as tall trees, obstacles not discovered in advance, etc.; the other is dynamic sudden threats, such as birds, other flying drones, etc.
[0061] 1) Static sudden threat flight path planning: For static threats, the characteristic is that the area blocked by obstacles is fixed. Therefore, the replanning area can be delimited according to the current position of the drone and the fault area, and the inspection route can be replanned within the area to avoid fixed obstacles; therefore, the bidirectional RRT algorithm can be used for replanning.
[0062] The static sudden threat flight path replanning is as Figure 3 shown, where the solid circle represents the scope of the sudden static threat; start′ is the current position of the drone; goal′ is the position of the drone after avoiding the threat.
[0063] The steps for the static sudden threat flight path planning of the drone are as follows:
[0064] S1: Determine the flight path replanning area through the analysis of the current position of the drone and the scope of the static threat;
[0065] S2: Determine the starting point start′ and the ending point goal′ of the replanning area;
[0066] S3: Establish 2 search trees T s ′ tart and T g ′ oal , with start′ and goal′ as the root nodes of the 2 trees respectively;
[0067] S4: Expand the 2 search trees: First, expand T s ′ tart , with goal′ as the random node, select the leaf node x s ′ tart in T nearest ′ rand that is the closest to goal′, and expand it until it cannot be expanded; if the expansion fails, select 1 random point x g ′ oal in the replanning area for expansion; The expansion method of T s ′ tart is the same as that of T g ′ oal , but T s ′ tart uses the latest node of T rand ′ g ′oal After the expansion is completed, swap T s ′ tart and T g ′ oal , and perform a new round of expansion until the leaf nodes are connected to each other; connect the expanded nodes in each expansion. If the threat area is avoided, it means that the docking is completed;
[0068] S5: T s ′ tart and T g ′ oal After being connected together, backtrack to generate a flight track;
[0069] S6: Smooth the flight track;
[0070] S7: After the UAV avoids obstacles according to the replanned flight track, return to the global static flight track to continue the inspection task.
[0071] 2) Dynamic sudden threat flight track planning: Since the leaf nodes are randomly generated when the RRT algorithm generates them, with great randomness, it is not suitable for the dynamic sudden threat situation where the threat positions change in real time; therefore, consider the motion trajectory equation in the leaf node generation strategy of the RRT algorithm, plan the path according to the motion trajectories of the UAV and the dynamic threat, and select the optimal path with the avoidance cost to solve this randomness problem; since the dynamic sudden threat flight track planning problem is relatively complex, and different threats vary greatly in motion speed and volume, which is not conducive to rapid planning, the following assumptions are made in the present invention: (1) In the UAV inspection operation, since the UAV has a small volume, it is simplified into a particle for trajectory analysis; (2) The flight speed of the UAV remains constant; (3) The dynamic sudden threats considered in the present invention are also small objects, so they are simplified into particles for analysis; (4) For sudden threats, only consider their uniform linear motion.
[0072] Based on the RRT algorithm, consider the motion trajectory equation and establish the starting point of the replanning area as the root node of the tree; for the generation of leaf nodes, use the target point of the replanning area as x rand , and the expansion method is the same as that of the RRT algorithm. If the expansion is successful, it is the same as the expansion method in the static sudden threat; if the expansion fails, determine the selection of x rand through the motion trajectory equation.
[0073] In the UAV trajectory model, the motion trajectory equation in its horizontal direction can be expressed as: In the formula, θ k is the flight heading of the UAV in the horizontal direction; θ k+1 is the flight heading of the UAV in the horizontal direction at the next target point; (x k , y k), and (x k+1 , y k+1 ) are the horizontal and vertical coordinates of the current waypoint and the next waypoint respectively; s is the length of the track segment.
[0074] In the motion trajectory equation of the UAV in the vertical direction, according to the connection line between the current waypoint and the target point, the change in the vertical coordinate distance can be obtained as: In the formula, z k , z k+1 are the vertical coordinates of the current waypoint and the next target point respectively; x goal , y goal , z goal are the horizontal coordinate, vertical coordinate and vertical coordinate of the target point respectively.
[0075] The motion equation of the dynamic threat can be expressed as: In the formula, (x t,now , y t,now , z t,now ) is the current position of the detected threat; is the flight heading of the threat in the horizontal direction of flight; t is the UAV sampling interval; v t is the action speed of the dynamic threat within the sampling interval t; s t is the flight distance of the dynamic threat within the sampling interval t; (x t,next , y t,next , z t,next ) is the predicted position coordinate of the threat at the next moment.
[0076] According to the dynamic threat influence range and moving direction, the UAV can avoid in the horizontal and vertical directions. In order to select the optimal avoidance path, a cost function F is set to determine the movement cost of each node to select the optimal node, that is: The steps of the UAV dynamic sudden threat track planning in this paper are as follows:
[0077] ① By analyzing the current position of the UAV, the dynamic threat range and speed, determine the track replanning area;
[0078] ② Select the target node as the random node x rand , and expand the search tree along this direction until the expansion fails; if the expansion along the target node direction fails, then determine x rand according to the UAV motion trajectory equation, and by changing the value of Δθ, obtain the node x rand that can avoid the threat;
[0079] ③ Expand the random tree according to the obtained new node x rand : Generate the next node according to the UAV motion trajectory equation in the horizontal and vertical directions, calculate its movement cost F, and select the node with the minimum movement cost as the next track point;
[0080] ④ Connect all the waypoints and perform smoothing to obtain the replanned path for dynamic sudden threats.
[0081] Step 4: Finally, establish an autonomous inspection system for UAVs based on the above inspection trajectory planning to achieve autonomous inspection throughout the process.
[0082] The present invention relates to an autonomous inspection method for UAV power transmission lines based on dynamic trajectory planning for static and dynamic sudden threats, and considers the constraint of dangerous areas in the inspection planning. In use, the present invention is an autonomous inspection method for UAV power transmission lines based on dynamic trajectory planning. By planning the global static trajectory and local dynamic trajectory, and introducing an improved bidirectional fast RRT algorithm for trajectory replanning, the safety during the autonomous inspection of UAVs is improved. At the same time, intelligent operation means such as multi-UAV cooperation, multi-dimensional autonomous inspection of UAVs, and intelligent image recognition are applied to change the traditional manual UAV inspection mode. Using the real-time image transmission and intelligent recognition technology of the control center, the inspection information is processed and intelligently screened in real time to timely detect defects and hidden dangers in the power transmission lines, shorten the manual inspection time, improve the inspection efficiency, and reduce the inspection operation risk. The present invention can improve the inspection accuracy and efficiency of the line and effectively reduce the inspection cost on the premise of ensuring the safety of the power transmission line inspection operation. The present invention has the advantages of adopting an improved bidirectional RRT algorithm, constructing a dangerous area constraint model, realizing autonomous cruise, and improving efficiency and reducing risk.
[0083] Embodiment 2
[0084] As Figures 1-4 shown, an autonomous inspection method for UAV lines based on dynamic trajectory planning, the method comprising the following steps:
[0085] Step 1: First, measure the imaging height of the tower and the distance between adjacent towers through an optical observation device, and calculate the safety distance between the UAV and the power transmission line.
[0086] Step 2: Construct a UAV cruise path model with dangerous area constraints, including two types of dangerous area constraints: polygon and disc.
[0087] In this embodiment, ① the dangerous area is a polygon area: the given geographical coordinates (azimuth and voyage) and Cartesian coordinates for UAV inspection, and the relationship between the geographical coordinates (r, θ) and the Cartesian coordinates (x, y) is: x = r sinθ; y = r cosθ, where θ is the angle between the positive direction of the y-axis and the position vector; it is necessary to find the actual distance between two points. Let the Cartesian coordinates of the two points be (x i , y i ), (x j , y j),then the straight-line distance between two points without passing through the dangerous area is:
[0088] 1) Find the augmented adjacency matrix: There are two positional relationships between the connection line of two arbitrary inspection target points and the dangerous area, intersecting or non-intersecting; if the connection line of two inspection target points intersects with a boundary line of the dangerous area, then the connection line of these two points intersects with the dangerous area, and the distance between these two inspection target points is recorded as ∞, indicating no direct flight path; if the connection line of two inspection target points does not intersect with any side of the dangerous area, then use formula (8) to find the distance between these two target points; for a polygonal dangerous area composed of n vertices, use the matrix: to store the lengths of each side, where: d ii = 0, i = 0, 1,..., n; d ij = ∞ The connection line between target i and j passes through the dangerous area; The connection line between target i and j does not pass through the dangerous area; i, j = 0, 1,..., n, i ≠ j; here A0 is a symmetric matrix;
[0089] 2) Use the Foyd algorithm to find the shortest path values between each vertex: The following iterative formula is used during the calculation: A k (i, j) = min(A k-1 (i, j), A k-1 (i, k) + A k-1 (k, j)) (9), where k is the number of iterations, i, j = 0, 1,..., n, k = 1, 2,..., n + 1. Finally, the elements of A n+1 are the shortest path values between each vertex; then remove the n - 4th to nth rows and the n - 4th to nth columns in the matrix A n+1 , and use the obtained matrix as the adjacency matrix B between the current position and the inspection target points.
[0090] ② The dangerous area is a disk area: If the distance d from the center O to the connection line AB of the two inspection target points is < r (r is the radius of the disk), then the connection line of these two inspection target points intersects with the dangerous area; if the distance d ≥ r, then the connection line AB of the two inspection target points does not intersect with the dangerous area.
[0091] When the connection line between two points passes through the dangerous area, then the actual distance between these two points (see Figure 2 ): d ij = d1 + d2 + d3, where d1 is the tangent length from point A to the circle; d3 is the tangent length from point B to the circle; d2 is the arc length between the two tangent points (select the minor arc); when the connection line between the two inspection target points does not pass through the dangerous area, the distance is directly calculated using formula (8); use the obtained d ij to construct the adjacency matrix For the adjacency matrix Apply the Floyd algorithm to obtain the corresponding matrix B when the dangerous area is a disk area n+1n+1 , B n+1n+1 The elements of are the shortest flight routes between the vertices of each dangerous area
[0092] ③ Genetic algorithm solution: Use the Floyd algorithm in graph theory to obtain the shortest distances between all vertex pairs while avoiding dangerous areas. Use the genetic algorithm to solve the shortest path for the UAV to start from the starting point, visit all target vertices, and then return to the starting point. The solution steps of the genetic algorithm are as follows
[0093] 1) Solution space: The solution space S can be expressed as the set of all cyclic permutations of {0, 1,..., n - 1, n} with fixed starting and ending points, that is, S = {(π0,..., π n ) | π0 = 0, π n = n, (π1,..., π n-1 ) is a cyclic permutation of {1, 2,..., n - 1}}, where each cyclic permutation represents a tour path for inspecting n - 1 targets, and π i = j means inspecting target j at the i-th inspection
[0094] 2) Encoding strategy: Use decimal encoding for easy implementation in Matlab. Use the random number sequence ω1ω2...ω n-1 as the chromosome, where 0 < ω i < 1 (i = 1, 2,..., n - 1), and each random sequence corresponds to an individual in the population
[0095] 3) Initial population: To obtain a better initial population, first use the improved cycle algorithm to obtain a better initial feasible solution. For the initial cycle: C = π0…π u-1 π u π u+1 …π v-1 π v π v+1 …π n , 1 ≤ u < v ≤ n - 1, 1 ≤ π u < π v ≤ n - 1, swap the order between u and v. The new path at this time is: π0…π u-1 π v π v-1 …π u+1 π u π v+1 …π n , denoted as If Δf < 0, then modify the old path with a new path until no further modification is possible, and a relatively good feasible solution is obtained; until M initial feasible solutions are generated, and these M feasible solutions are converted into chromosome encodings;
[0096] 4) Objective function: The objective function is the path length for traversing all targets, and the fitness function is taken as the objective function, with the requirements:
[0097] 5) Crossover operation: Single-point crossover is adopted. For the two selected parent individuals f1 = ω1ω2…ω n-1 , f2 = ω1′ω2′…ω n ′ -1 , randomly select the t-th gene as the crossover point. Then, the offspring encodings s1 and s2 obtained after the crossover operation are such that the genes of s1 are composed of the first t genes of f1 and the last (n - 1) - t genes of f2; the genes of s2 are composed of the first t genes of f2 and the last (n - 1) - t genes of f1;
[0098] 6) Mutation operation: Mutation is an important means to achieve population diversity and also a guarantee for global optimization. According to the given mutation rate, for the selected mutant individuals, randomly select three integers that satisfy 1 < u < v < w < n - 1, and insert the gene segment between u and v (including u and v) behind w;
[0099] 7) Selection: A deterministic selection strategy is adopted, that is, select the M chromosomes with the smallest objective function values to evolve to the next generation, which can ensure that the excellent characteristics of the parent generation are preserved.
[0100] The genetic algorithm parameters for specifically solving the shortest path are set as follows: the population size M = 50, the maximum number of generations G = 1000, the crossover rate p c = 1. A crossover probability of 1 can ensure the full evolution of the population; the mutation rate p m = 0.1. Generally speaking, the possibility of mutation occurring is relatively small.
[0101] Step 3: Then, classify various emergencies that the UAV may encounter during line inspection into static threats and dynamic threats, establish a trajectory planning model for the two types of emergencies, and use the improved bidirectional rapidly-exploring random tree (RRT) algorithm for trajectory replanning;
[0102] Step 4: Finally, establish a UAV autonomous inspection system based on the above inspection trajectory planning to achieve full-process autonomous inspection.
[0103] The present invention relates to an autonomous inspection method for an unmanned aerial vehicle (UAV) on a transmission line based on dynamic trajectory planning for static and dynamic sudden threats, and dangerous area constraints are considered in the inspection planning. In use, first, the imaging height of the tower and the distance between adjacent towers are measured by an optical observation device, and the safety distance between the UAV and the transmission line is calculated. The present invention considers two types of dangerous area constraints, namely polygons and disks. First, the Floyd algorithm is used to find the shortest path values for avoiding dangerous areas between vertices, then an improved loop algorithm is used to obtain a better initial population, and then a genetic algorithm can be used to obtain a more satisfactory solution. Then, various sudden situations that the UAV may encounter during line inspection are divided into static threats and dynamic threats, a trajectory planning model for the two sudden situations is established, and an improved bidirectional rapidly exploring random tree (RRT) algorithm is used for trajectory replanning. Finally, an autonomous inspection system for the UAV is established according to the above inspection trajectory planning to achieve full-process autonomous inspection, which can greatly improve the line inspection efficiency and reduce the risk of inspection operations. The present invention has the advantages of adopting an improved bidirectional RRT algorithm, constructing a dangerous area constraint model, realizing autonomous cruise, and improving efficiency and reducing risks.
[0104] As Figure 4 shown, an autonomous inspection system for a UAV on a line based on dynamic trajectory planning can ensure the safety of the UAV during inspection operations by dynamically planning the UAV line inspection trajectory. To ensure the effectiveness of the inspection results and report them to the upper-level system normally, full-process autonomous inspection is realized, and the inspection system also needs to establish a corresponding automated process framework. The UAV autonomous inspection process is as Figure 4 shown, and the specific process is as follows: 1) The control system receives the upper-level inspection line. 2) Check the inspection line information to confirm whether the flight path is too close or too far; whether it includes no-fly zones; estimate the total distance, time, and required power of the flight path; whether it overlaps with the flight paths executed by other UAVs, etc. 3) Form a flight path command and upload it to the UAV flight control. 4) Check the station status, external meteorological status, wind direction and wind speed status, etc. 5) Check the UAV status, check various sensors, power systems, positioning status, and the remaining power of the UAV, etc. 6) The UAV takes off and starts executing the inspection flight path after reaching the set height. 7) Arrive at the waypoint, pause the flight, adjust the pan-tilt angle and lens parameters and take pictures, and then continue flying. 8) Prepare to return after all flight paths are executed. 9) Receive the signal that the station is completed and land above the station. 10) After landing, download the taken pictures from the pan-tilt camera and check the waypoint comparison table of the inspection file. 11) Upload the operation results. 12) The entire process ends.
Claims
1. An autonomous inspection method for UAV routes based on dynamic route planning, characterized in that: The method includes the following steps: Step 1: First, measure the imaging height of the pole tower and the spacing between adjacent pole towers through an optical observation device, and calculate the safety distance between the UAV and the transmission line; Step 2: Construct a UAV cruise path model with dangerous area constraints, including two types of dangerous area constraints: polygon and disk; Step 3: Then, classify various emergencies that the UAV may encounter during line inspection into static threats and dynamic threats, establish a trajectory planning model for the two emergencies, and use an improved bidirectional rapidly-exploring random tree (RRT) algorithm for trajectory replanning; Step 4: Finally, establish a UAV autonomous inspection system according to the above inspection trajectory planning to achieve autonomous inspection throughout the process.
2. The method for autonomous inspection of an unmanned aerial vehicle line based on dynamic flight path planning according to claim 1, characterized in that: The calculation of the safety distance between the UAV and the transmission line in Step 1 includes the following steps: Step 1.1: Horizontal safety distance standard: The safety distance D between the UAV and the transmission line s can be expressed as D s = max{I1, I2, I3, I4} + x1 + x2 + x3 + x4 + vt + max{a1, a2, a3, a4} (1), where I1 and I2 are the critical distances on both sides of the transmission line where the magnetic field does not affect the operation of the UAV; I3 and I4 are the critical distances on both sides of the transmission line where the electric field does not affect the operation of the UAV; x1 is the error distance between the pre-planned flight path and the actual flight path of the UAV; x2 is the position deviation distance caused by the wind; x3 is the measurement error distance of the rangefinder; x4 is the GPS positioning distance deviation; v is the flight speed of the UAV; t is the maximum wireless communication delay; a1 is the wing length of the UAV; a2 is the distance between the nose of the UAV and its main axis; a3 is the distance between the tail of the UAV and its main axis; a4 is the distance between the on-board gimbal of the UAV and its main axis; Step 1.2: Monocular vision ranging method: Assume the height of the tower is H and the camera focal length is f. The height of the tower obtained from the image taken by the UAV is h a 、h b , then the object distances between the UAV and towers A and B are respectively: u a =(H + h a )f / h a (2), u b =(H + h b )f / h b (3), and the image distances are respectively: v a =(H + h a )f / H(4), v b =(H + h b )f / H(5). The distance x between the UAV and the transmission line is: In the formula, θ is the angle between towers A and B at the optical center of the UAV; during UAV inspection, the distances between the UAV and the towers and the line are measured by the monocular vision ranging method, compared with the safety distance corresponding to the voltage level of the inspection line, and through real-time correction of the inspection flight path, the UAV inspection can fly safely.
3. The method for autonomous inspection of the UAV line based on dynamic path planning according to claim 1, wherein: In the UAV cruise path model with dangerous area constraints constructed in step 2, when the dangerous area is a polygonal area, the UAV inspection is given geographical coordinates and Cartesian coordinates. The relationship between the geographical coordinates (r, θ) and the Cartesian coordinates (x, y) is: x = rsinθ; y = rcosθ, where θ is the angle between the positive direction of the y-axis and the position vector. Let the Cartesian coordinates of two points be (x i , y i ), (x j , y j ), then the straight-line distance between the two points without passing through the dangerous area is:
4. The method for autonomous inspection of the UAV line based on dynamic flight path planning according to claim 3, characterized in that: In the UAV cruise path model with dangerous area constraints constructed in step 2, when the dangerous area is a disk area, if the distance d from the center O of the circle to the line AB connecting the two inspection target points is less than r, then the line connecting the two inspection target points intersects the dangerous area; if the distance d ≥ r, then the line AB connecting the two inspection target points does not intersect the dangerous area; when the line connecting the two points passes through the dangerous area, the actual distance between the two points is: d ij = d1 + d2 + d3, where d1 is the tangent length from point A to the circle; d3 is the tangent length from point B to the circle; d2 is the arc length between the two tangent points.
5. The method for autonomous inspection of an unmanned aerial vehicle line based on dynamic flight path planning according to claim 3, wherein: The UAV cruise path model with dangerous area constraints constructed in Step 2 is solved by a genetic algorithm. Specifically: Step 2.1: Solution Space: The solution space S can be represented as the set of all cyclic permutations with fixed starting and ending points of {0, 1,..., n - 1, n}, i.e., S = {(π0,..., π n ) | π0 = 0, π n = n, (π1,..., π n-1 ) is a cyclic permutation of {1, 2,..., n - 1}}, where each cyclic permutation represents a tour path for inspecting n - 1 targets, and π i = j means inspecting target j at the i-th inspection; Step 2.2: Coding strategy: Adopt decimal coding, and use the random number sequence ω1ω2...ω n-1 as the chromosome, where 0 < ω i < 1 (i = 1, 2,..., n - 1), and each random sequence corresponds to an individual in the population; Step 2.3: Initial population: First, use the improved loop algorithm to obtain a relatively good initial feasible solution; For the initial cycle: C = π0…π u-1 π u π u+1 …π v-1 π v π v+1 …π n , 1 ≤ u < v ≤ n - 1, 1 ≤ π u <π v ≤ n - 1, swap the order between u and v, and the new path at this time is: π0…π u-1 π v π v-1 …π u+1 π u π v+1 …π n , denote If Δf < 0, then modify the old path with the new path until it cannot be modified, and a relatively good feasible solution can be obtained; until M initial feasible solutions are generated, and these M feasible solutions are converted into chromosome encodings; Step 2.4: Objective function: The objective function is the path length of traversing all targets, and the fitness function is taken as the objective function: Step 2.5: Crossover operation: Single-point crossover is adopted. For the two selected parental individuals f1 = ω1ω2…ω n-1 , f2 = ω′1ω′2…ω′ n-1 , randomly select the t-th gene as the crossover point. Then, the offspring codes s1 and s2 obtained after the crossover operation are as follows: the genes of s1 are composed of the first t genes of f1 and the last (n - 1) - t genes of f2; the genes of s2 are composed of the first t genes of f2 and the last (n - 1) - t genes of f1; Step 2.6: Mutation operation: According to the given mutation rate, for the selected mutated individual, randomly select three integers that satisfy 1 < u < v < w < n - 1, and insert the gene segment between u and v behind w; Step 2.7: Selection: Select the M chromosomes with the smallest objective function value to evolve to the next generation, which can ensure that the excellent characteristics of the parent generation are preserved.
6. The method for autonomous inspection of an unmanned aerial vehicle line based on dynamic flight path planning according to claim 1, characterized in that: The UAV line inspection trajectory planning in Step 3 includes two parts: global static trajectory planning and local dynamic trajectory replanning.
7. The method for autonomous inspection of an unmanned aerial vehicle line based on dynamic flight path planning according to claim 6, wherein: The global static trajectory planning includes the following steps: Step a: According to the distributed inspection line, determine the UAV flight area, inspection order, and the starting and ending points of the UAV inspection; Step b: Based on the determined flight route, obtain the geographical environment information in the corresponding area, and combine it with the dangerous area constraints to construct the overall flight environment; Step c: Combine the constraints of the UAV and the dangerous area constraints and various factors of the flight environment to plan the optimal flight trajectory in the global flight environment.
8. The method for autonomous inspection of an unmanned aerial vehicle line based on dynamic flight path planning according to claim 6, wherein: The local dynamic trajectory replanning includes static sudden threat trajectory planning and dynamic sudden threat trajectory planning.
9. The method for autonomous inspection of an unmanned aerial vehicle line based on dynamic flight path planning according to claim 8, characterized in that: The static sudden threat trajectory planning is as follows: S1: Through the analysis of the current position of the UAV and the static threat range, determine the trajectory replanning area; S2: Determine the starting point start′ and the ending point goal′ of the replanning area; S3: Establish two search trees T' start and T' goal , and use start' and goal' as the root nodes of the two trees respectively; S4: Expand 2 search trees; S5: T' start and T' goal After being connected together, generate a track by backtracking; S6: Smooth the trajectory; S7: After the UAV avoids obstacles according to the replanned trajectory, return to the global static trajectory to continue the inspection task.
10. The method for autonomous inspection of an unmanned aerial vehicle line based on dynamic flight path planning according to claim 8, characterized in that: The dynamic sudden threat trajectory planning is as follows: Step A: Through the analysis of the current position of the UAV, the dynamic threat range, and the speed, determine the trajectory replanning area; Step B: Select the target node as the random node x rand , and expand the search tree along this direction until the expansion fails; if the expansion along the target node direction fails, then determine x according to the UAV motion trajectory equation rand , by changing the value of Δθ, obtain the node x that can avoid threats rand ; Step C: According to the obtained new node x rand Expand the random tree: Generate the next node according to the motion trajectory equations of the UAV in the horizontal and vertical directions, calculate its movement cost F, and select the node with the minimum movement cost as the next waypoint; Step D: Connect all the trajectory points and perform smoothing processing to obtain the replanned trajectory for dynamic sudden threats.