A UAV system for substation inspection

By using genetic algorithms to optimize linear flight path connections in drone path planning, the problems of large flight distances and large turning power during drone inspections in the existing technology are solved, and the efficiency of substation inspections is improved.

CN118963387BActive Publication Date: 2024-12-20INFORMATION & TELECOMM COMPANY SICHUAN ELECTRIC POWER
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411433878.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2024-12-20
Estimated Expiration
2044-10-15

AI Technical Summary

Technical Problem

The existing drone path planning algorithm results in the fact that the drone has a long flight distance, large turn power, and reduced effective flight time during substation inspection, affecting the patrol efficiency.

Method used

The path planning device is adopted, including the first acquisition module, the second acquisition module and the flight path optimization module. By obtaining the distance between the minimum external polygon of the substation and the straight flight path, if the drone's limit turning diameter is less than or equal to the distance, the traditional one is adopted. Connection method; If it is greater than, use genetic algorithm to optimize the connection relationship of the straight flight path to reduce the turning power when switching paths.

Benefits of technology

When the drone's extreme turning diameter is greater than the distance of the straight-line flight path, the path is optimized through genetic algorithms, which reduces the power consumption of the drone's turning, improves the effective flight time, and thus improves patrol efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118963387B_ABST
    Figure CN118963387B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of drone path planning, and discloses a drone system for substation inspection, including a path planning device and a drone for inspecting the substation, wherein the path planning device includes a first acquisition module, a second acquisition module, and a flight path optimization module; the first acquisition module is used to obtain the minimum circumscribed polygon of the area range of the substation; the second acquisition module is used to obtain the straight flight path covering the minimum circumscribed polygon based on the distance between the set straight flight paths; the flight path optimization module is used to optimize the inspection path based on the limit turning diameter. The present invention can reduce the power consumed by the drone for turning while obtaining the shortest possible training path, thereby increasing the effective flight time of the drone and improving the efficiency of the inspection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of unmanned aerial vehicle (UAV) path planning, and in particular to an unmanned aerial vehicle (UAV) system for substation inspection. Background Art

[0002] Using drones to inspect substations is an efficient inspection method. By generating an inspection route and controlling the drone to continuously take aerial photos while flying along the inspection route, multiple images covering all areas of the substation can be quickly acquired. These images can then be analyzed to accomplish the corresponding inspection tasks.

[0003] In the prior art, after obtaining multiple straight flight paths that enable the drone to cover all areas of the substation, two adjacent straight flight paths are usually connected end to end in sequence to obtain the final flight path; Figure 1 As shown, the area surrounded by bold black lines is the inspection area, the non-bold straight line segment is the straight flight path, the straight flight path intersects with the two sides of the area, and the straight flight paths are parallel to each other; the curve outside the inspection area represents the additional flight route required when switching the straight flight path.

[0004] However, the total flight distance of the flight path obtained in this way may not be the shortest; when the drone switches between two adjacent straight flight paths, it needs to turn to switch; when the drone's maximum turning diameter is greater than the minimum distance between two adjacent straight flight paths, it cannot turn directly after leaving the substation area, but must first adjust its position, fly to the turning position, and then turn; the turning position is the position where a circle with the turning position as the center and the maximum turning diameter as the diameter can be tangent to the next straight flight path at the intersection between the next straight flight path and the inspection area. ; Because each time the straight flight path is switched, the angle less than 180 degrees formed by the straight line segment between the position where the drone leaves the previous straight flight path and the turning position and the straight line perpendicular to the straight flight path is too small, which causes the drone to consume more power for sharp turns, which has a great impact on the effective flight time of the drone, causing the effective flight time to be greatly reduced, thereby increasing the number of times the drone needs to replace batteries, affecting the overall inspection efficiency; the effective flight time refers to the total time the drone is directly above the substation from the time it takes off with full power until it returns to replace batteries. Summary of the invention

[0005] The purpose of the present invention is to disclose a drone system for substation inspection, so as to solve the technical problem of how to improve the path planning algorithm when using drones to inspect substations, so that the planned inspection path can be as short as possible and the effective flight time of the drone can be as long as possible, thereby improving the efficiency of the inspection.

[0006] In order to achieve the above-mentioned purpose, the present invention adopts the following technical scheme: the present invention provides a UAV system for substation inspection, including a path planning device and a UAV for inspecting the substation, the path planning device includes a first acquisition module, a second acquisition module and a flight path optimization module; the first acquisition module is used to obtain the minimum circumscribed polygon of the area range of the substation; the second acquisition module is used to obtain the straight flight path covering the minimum circumscribed polygon based on the distance between the set straight flight paths; the flight path optimization module is used to perform the following calculations: if the UAV's maximum turning diameter is less than or equal to the distance between the straight flight paths, then the two adjacent straight flight paths are connected end to end in sequence to obtain the inspection path; if the UAV's maximum turning diameter is greater than the distance between the straight flight paths, then the flight path optimization module is used to perform the following calculations: The inspection path is obtained in the following manner: the first step is to use the straight-line flight path as the gene of the genetic algorithm, generate an initial population based on the set population size N, and use the initial population as the evolutionary population; the second step is to perform selection operations, crossover operations, and mutation operations on the evolutionary population in sequence to obtain multiple new chromosomes; the third step is to select the first N chromosomes with the largest fitness function values ​​from the chromosomes included in the evolutionary population and the new chromosomes obtained in the second step based on the fitness function value to form a new evolutionary population; the fourth step is to determine whether the stopping condition is met, if so, proceed to the fifth step, if not, proceed to the second step; the fifth step is to use the arrangement order of the genes in the chromosome with the largest fitness function value as the inspection order of the straight-line flight path, and sequentially connect two straight-line flight paths with adjacent inspection orders to obtain the inspection path.

[0007] Preferably, it also includes a drone control device; the drone control device is used to control the drone to fly along the inspection path. During the flight, the drone takes aerial photos of the substation according to the set shooting coordinates to obtain multiple aerial images.

[0008] Preferably, obtaining the minimum circumscribed polygon of the area scope of the substation includes: obtaining a plane map of the area scope including the substation; obtaining a contour image of the substation in the plane map; and calculating the contour image using a convex hull detection algorithm to obtain the minimum circumscribed polygon of the area scope of the substation.

[0009] Preferably, obtaining the contour image of the substation in the plane map includes: obtaining a local image belonging to the substation in the plane map; performing edge detection on the local image to obtain a set E1 of edge pixel points; deleting the edge pixel points in E1 that are inside the substation to obtain a set E2; and using the image composed of the edge pixel points in E2 as the contour image of the substation.

[0010] Preferably, the convex hull detection algorithm includes any one of a Graham scanning algorithm, a Jarvis stepping algorithm and a fast convex hull algorithm.

[0011] Preferably, a straight flight path covering a minimum circumscribed polygon is obtained based on the distance between the set straight flight paths, including: using D to represent the distance between the set straight flight paths; obtaining a reference edge in the minimum circumscribed polygon; based on D, making multiple straight line segments parallel to the reference edge, with the distance between two adjacent straight line segments being equal to D; and treating each straight line segment as a straight flight path.

[0012] Preferably, obtaining the reference edge in the minimum circumscribed polygon includes: S1, storing all the edges of the minimum circumscribed polygon into a set EGU; storing all the endpoints of the minimum circumscribed polygon into a set DU; S2, performing the following calculations on each edge in EGU: for an edge eg in EGU, deleting the two endpoints belonging to eg in DU to obtain a set egDU; drawing a straight line parallel to eg through each endpoint in egDU, and taking the obtained straight line as an element in a set StrL; deleting the straight lines in StrL whose number of intersections with the minimum circumscribed polygon is greater than or equal to 2; obtaining the minimum value of the distance between the straight line in StrL and eg; S3, sorting the multiple minimum values ​​obtained in S2 from small to large, and taking the edge corresponding to the first-ranked minimum value in EGU as the reference edge.

[0013] Preferably, the straight flight path is used as the gene of the genetic algorithm, and an initial population is generated based on a set population size N, including: starting from 1, the straight flight paths are numbered consecutively, and the difference in numbers between two adjacent straight flight paths is 1; the maximum number is equal to the total number M of the straight flight paths; all numbers are saved in a number set NumU; the chromosomes in the initial population are obtained based on the following process: S11, randomly selecting a number from NumU as the first gene of a chromosome containing M genes; S12, obtaining the remaining M-1 genes based on the limit turning diameter to obtain a chromosome; S13, judging whether the obtained chromosome is the same as the chromosome already existing in the initial population, if so, deleting the obtained chromosome, if not, using the obtained chromosome as a chromosome in the initial population; S14, judging whether the number of chromosomes already existing in the initial population is less than N, if so, entering S11, if not, terminating the operation.

[0014] Preferably, the remaining M-1 genes are obtained based on the limit turning diameter, including: S21, storing the numbers corresponding to the genes already included in the chromosome into the set chro; S22, deleting the numbers in chro from NumU; S23, using k to represent the number of genes already existing in chro; S24, obtaining the k+1th gene in the chromosome, and the obtaining process is as follows: S241, obtaining the turning position corresponding to the shortest turning route between the straight flight path corresponding to the kth gene in the chromosome and each straight flight path corresponding to all the numbers in NumU; S242, respectively calculating the distance between each turning position and the straight flight path; The distance between the straight lines is a straight line passing through all points in the straight flight path corresponding to the kth gene in the chromosome; S243, obtaining the turning position corresponding to the minimum distance among all distances; S244, taking the number of the straight flight path corresponding to the turning position in S243 as the k+1th gene in the chromosome; S25, determining whether the number of genes in chro is equal to M, if so, ending the calculation, if not, entering S21.

[0015] Preferably, the fitness function value of the chromosome is calculated as follows: S31, respectively obtaining the shortest turning route between two straight flight paths corresponding to two genes located adjacently in the chromosome; S32, calculating the fitness function value: ; represents the fitness function value of the chromosome, represents the length of the shortest turning route between the two straight flight paths corresponding to the i-th gene and the i+1-th gene in the chromosome, Indicates the turning position corresponding to the shortest turning route between the two straight flight paths corresponding to the i-th gene and the i+1-th gene and the straight line The distance between is a straight line passing through all the points in the straight flight path corresponding to the i-th gene, and Respectively represent the first weight and the second weight, respectively obtain the length of the shortest turning route between the two straight flight paths corresponding to the two adjacent genes in the chromosome, and obtain the length of M-1 shortest turning routes. Indicates the maximum length of M-1 shortest turning routes.

[0016] Beneficial effect: Compared with the prior art, the present invention first compares the size relationship between the distance between the straight flight paths and the limit turning diameter of the drone during the process of inspecting the substation using the drone. When the limit turning diameter of the drone is less than or equal to the distance between the straight flight paths, the traditional path generation method is used to directly connect the two adjacent straight flight paths end to end in sequence to obtain the inspection path; when the limit turning diameter of the drone is greater than the distance between the straight flight paths, a genetic algorithm is used to obtain the connection relationship between the straight flight paths, which reduces the probability of the event that the angle is too small, less than 180 degrees, of the two angles formed by the straight line segment between the position where the drone leaves the previous straight flight path and the turning position and the straight line perpendicular to the straight flight path when switching the straight flight path. This can reduce the power consumed by the drone for turning while obtaining the shortest possible training path, thereby increasing the effective flight time of the drone and improving the efficiency of inspection. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 A schematic diagram of the flight path obtained by the prior art.

[0019] Figure 2 This is a first schematic diagram of a drone system for substation inspection according to the present invention.

[0020] Figure 3 This is a second schematic diagram of a drone system for substation inspection according to the present invention. DETAILED DESCRIPTION

[0021] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments; the components of the embodiments of the present invention generally described and shown in the drawings herein can be arranged and designed in various different configurations; therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention; based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts belong to the scope of protection of the present invention.

[0022] like Figure 2 In one embodiment shown in the figure, the present invention provides a UAV system for substation inspection, comprising a path planning device and a UAV for inspecting the substation, the path planning device comprising a first acquisition module, a second acquisition module and a flight path optimization module; the first acquisition module is used to obtain the minimum circumscribed polygon of the area range of the substation; the second acquisition module is used to obtain the straight flight path covering the minimum circumscribed polygon based on the distance between the set straight flight paths; the flight path optimization module is used to perform the following calculations: if the limit turning diameter of the UAV is less than or equal to the distance between the straight flight paths, then the two adjacent straight flight paths are connected end to end in sequence to obtain the inspection path; if the limit turning diameter of the UAV is greater than the distance between the straight flight paths, then the following method is used to obtain the inspection path. Take the inspection path: the first step is to use the straight flight path as the gene of the genetic algorithm, generate the initial population based on the set population size N, and use the initial population as the evolutionary population; the second step is to perform selection operations, crossover operations and mutation operations on the evolutionary population in turn to obtain multiple new chromosomes; the third step is to select the first N chromosomes with the largest fitness function value from the chromosomes contained in the evolutionary population and the new chromosomes obtained in the second step based on the fitness function value to form a new evolutionary population; the fourth step is to determine whether the stopping condition is met. If so, proceed to the fifth step, if not, proceed to the second step; the fifth step is to use the arrangement order of the genes in the chromosome with the largest fitness function value as the inspection order of the straight flight path, and connect the two straight flight paths with adjacent inspection orders in turn to obtain the inspection path.

[0023] In the process of using drones to inspect substations, the relationship between the distance between straight flight paths and the maximum turning diameter of the drone is first compared. When the maximum turning diameter of the drone is less than or equal to the distance between the straight flight paths, the traditional path generation method is used to directly connect the two adjacent straight flight paths end to end in sequence to obtain the inspection path; when the maximum turning diameter of the drone is greater than the distance between the straight flight paths, a genetic algorithm is used to obtain the connection relationship between the straight flight paths, so that the straight flight paths with adjacent positions are not directly connected end to end, which reduces the probability of the event that the angle is too small, less than 180 degrees, when switching the straight flight path. This can reduce the power consumed by the drone for turning while obtaining the shortest possible training path, thereby increasing the effective flight time of the drone and improving the efficiency of inspection.

[0024] Specifically, the maximum turning diameter of a drone refers to the minimum turning diameter of the drone at the set inspection flight speed; the faster the inspection flight speed of the drone, the larger the minimum turning diameter.

[0025] Specifically, connecting two adjacent straight flight paths end to end in sequence means: obtaining the shortest turning route between the two adjacent straight flight paths; the starting point of the shortest turning route is the intersection between the straight flight path left by the UAV and the minimum circumscribed polygon; the end point of the shortest turning route is the intersection between another straight flight path that the UAV has not flown and is closest to the straight flight path left by the UAV and the minimum circumscribed polygon; using the shortest turning route to connect the two adjacent straight flight paths.

[0026] Specifically, in the third step, in the calculation process based on the fitness function value from the chromosomes contained in the evolved population and the new chromosomes obtained in the second step, except for the first iterative calculation, the evolved population refers to the initial population. In the remaining iterative calculation processes, the evolved population refers to the new evolved population obtained in the third step of the previous iterative calculation.

[0027] Preferably, sequentially connecting two linear flight paths adjacent in inspection order comprises: respectively obtaining the shortest turning routes between the two linear flight paths adjacent in inspection order; and connecting the two linear flight paths adjacent in inspection order using the shortest turning route.

[0028] Preferably, the distance between the set straight flight paths is greater than one quarter of the limit turning diameter of the drone.

[0029] Preferably, the shortest turning route refers to a route formed by the UAV, after leaving the previous straight flight path, going to the turning position and turning at the turning position using the maximum turning diameter to enter the next straight flight path; the next straight flight path is a straight flight path that is adjacent to the inspection order of the previous straight flight path and has not been inspected by the UAV; the turning position refers to a position at which a circle with the turning position as the center and the maximum turning diameter as the diameter can be tangent to the next straight flight path at the intersection between the next straight flight path and the minimum circumscribed polygon.

[0030] Preferably, the set population module N is greater than or equal to 10 times the total number of straight flight paths and less than or equal to 90 times the total number of straight flight paths.

[0031] Preferably, the population module N is set to be 20 times the total number of straight flight paths.

[0032] Preferably, if Figure 3 As shown, it also includes a UAV control device; the UAV control device is used to control the UAV to fly along the inspection path. During the flight, the UAV takes aerial photos of the substation according to the set shooting coordinates to obtain multiple aerial images.

[0033] Specifically, the set shooting coordinates may be coordinates set at equal distances on a straight flight path, and there are overlapping portions in the obtained overhead images between two adjacent coordinates.

[0034] The area of ​​the overlapping portion may occupy one twentieth of the area of ​​the overhead image.

[0035] Preferably, in the overhead image taken by the drone, the distance between the edges perpendicular to the flight direction of the drone in real space is greater than or equal to the distance between straight flight paths.

[0036] Preferably, it also includes an image analysis device; the image analysis device is used to analyze the overhead image to obtain the inspection result.

[0037] For example, the area in the substation where changes have occurred can be obtained based on the overhead images obtained from two previous inspections.

[0038] Preferably, obtaining the minimum circumscribed polygon of the area scope of the substation includes: obtaining a plane map of the area scope including the substation; obtaining a contour image of the substation in the plane map; and calculating the contour image using a convex hull detection algorithm to obtain the minimum circumscribed polygon of the area scope of the substation.

[0039] By obtaining the minimum circumscribed polygon, the inspection range of the drone can be regularized and the complex substation outline can be simplified into a convex polygon. This can reduce the number of edges used to represent the range of the substation while maintaining the basic outline of the substation, thereby improving the efficiency of the process of obtaining a straight flight path covering the area range of the substation (i.e., the minimum circumscribed polygon).

[0040] Preferably, obtaining the contour image of the substation in the plane map includes: obtaining a local image belonging to the substation in the plane map; performing edge detection on the local image to obtain a set E1 of edge pixel points; deleting the edge pixel points in E1 that are inside the substation to obtain a set E2; and using the image composed of the edge pixel points in E2 as the contour image of the substation.

[0041] Specifically, by retaining only the outermost edge pixel points of the substation, an accurate outline of the substation can be obtained.

[0042] Preferably, the convex hull detection algorithm includes any one of a Graham scanning algorithm, a Jarvis stepping algorithm and a fast convex hull algorithm.

[0043] Principle of Graham scanning algorithm: Graham scanning algorithm calculates the convex hull of a point set on a two-dimensional plane through the following steps: Select a reference point: First, select the point with the smallest y coordinate in the point set as the reference point, and sort the other points according to the polar angle with the reference point.

[0044] Polar angle sorting: Sort the other points in ascending order according to the polar angle with the reference point. If the polar angles are the same, the point closer to the reference point is placed in front.

[0045] Construct the convex hull: Take points from the sorted point set one by one. If the vector formed by the current point and the first two points does not form a left turn relationship (that is, it is not on the convex hull), remove the previous point until a left turn relationship is formed.

[0046] Output convex hull: The final point set is the points on the convex hull, which can be arranged in counterclockwise or clockwise order.

[0047] The Graham scan algorithm is a simple and efficient convex hull calculation algorithm with a time complexity of O(nlogn), where n is the size of the point set. Compared with other convex hull algorithms, the Graham scan algorithm has better performance in practical applications.

[0048] Preferably, a straight flight path covering a minimum circumscribed polygon is obtained based on the distance between the set straight flight paths, including: using D to represent the distance between the set straight flight paths; obtaining a reference edge in the minimum circumscribed polygon; based on D, making multiple straight line segments parallel to the reference edge, with the distance between two adjacent straight line segments being equal to D; and treating each straight line segment as a straight flight path.

[0049] By obtaining the reference edge, it is helpful to obtain a straight line flight path with a shorter total distance that can cover all the minimum circumscribed polygons.

[0050] A straight flight path that can cover the minimum circumscribed polygon means that when the drone takes pictures along all the straight flight paths obtained, after all the aerial images taken are stitched together, the area where the substation is located can be completely included in the stitched images.

[0051] Preferably, each straight line segment is respectively regarded as a straight flight path, including: each straight line segment corresponds to a flight path on the map, and multiple straight flight paths can be obtained based on all the straight line segments.

[0052] Preferably, obtaining the reference edge in the minimum circumscribed polygon includes: S1, storing all the edges of the minimum circumscribed polygon into a set EGU; storing all the endpoints of the minimum circumscribed polygon into a set DU; S2, performing the following calculations on each edge in EGU: for an edge eg in EGU, deleting the two endpoints belonging to eg in DU to obtain a set egDU; drawing a straight line parallel to eg through each endpoint in egDU, and taking the obtained straight line as an element in a set StrL; deleting the straight lines in StrL whose number of intersections with the minimum circumscribed polygon is greater than or equal to 2; obtaining the minimum value of the distance between the straight line in StrL and eg; S3, sorting the multiple minimum values ​​obtained in S2 from small to large, and taking the edge corresponding to the first-ranked minimum value in EGU as the reference edge.

[0053] Preferably, based on D, a plurality of straight line segments parallel to the reference edge are made, including: S10, initializing the value of the integer h to 1; S20, obtaining a distance between the straight line segments and the reference edge equal to and there are at least two intersection points between the UAV and the minimum circumscribed polygon and the straight line segment parallel to the reference edge; S30, determine whether S20 obtains a straight line segment, if so, add 1 to the value of h, store the obtained straight line segment in the set LU, and enter S20, if not, enter S40; S40, determine whether the image obtained by the drone when shooting along all the straight line segments in LU completely covers the minimum circumscribed polygon, if so, end the calculation, if not, set the distance between the UAV and the reference edge equal to A straight line segment otrL whose length is equal to the maximum distance between any two endpoints of the minimum circumscribed polygon and is parallel to the reference side is stored in LU.

[0054] The above-mentioned process of acquiring straight line segments can ensure the realization of the process of acquiring a straight line flight path covering the minimum circumscribed polygon while obtaining the minimum number of straight line segments.

[0055] Preferably, the line between the center of otrL and the center of the straight line segment with the latest acquisition time in LU is perpendicular to otrL.

[0056] Preferably, the straight flight path is used as the gene of the genetic algorithm, and an initial population is generated based on a set population size N, including: starting from 1, the straight flight paths are numbered consecutively, and the difference in numbers between two adjacent straight flight paths is 1; the maximum number is equal to the total number M of the straight flight paths; all numbers are saved in a number set NumU; the chromosomes in the initial population are obtained based on the following process: S11, randomly selecting a number from NumU as the first gene of a chromosome containing M genes; S12, obtaining the remaining M-1 genes based on the limit turning diameter to obtain a chromosome; S13, judging whether the obtained chromosome is the same as the chromosome already existing in the initial population, if so, deleting the obtained chromosome, if not, using the obtained chromosome as a chromosome in the initial population; S14, judging whether the number of chromosomes already existing in the initial population is less than N, if so, entering S11, if not, terminating the operation.

[0057] Different from the random generation of populations, the present invention takes into account the limiting turning diameter, a factor closely related to the shortest turning route, during the generation of the initial population, thereby obtaining an initial population with better quality. The enriched initial values ​​can reduce the probability of the algorithm falling into a local loop.

[0058] Preferably, the remaining M-1 genes are obtained based on the limit turning diameter, including: S21, storing the numbers corresponding to the genes already included in the chromosome into the set chro; S22, deleting the numbers in chro from NumU; S23, using k to represent the number of genes already existing in chro; S24, obtaining the k+1th gene in the chromosome, and the obtaining process is as follows: S241, obtaining the turning position corresponding to the shortest turning route between the straight flight path corresponding to the kth gene in the chromosome and each straight flight path corresponding to all the numbers in NumU; S242, respectively calculating the distance between each turning position and the straight flight path; The distance between the straight lines is a straight line passing through all points in the straight flight path corresponding to the kth gene in the chromosome; S243, obtaining the turning position corresponding to the minimum distance among all distances; S244, taking the number of the straight flight path corresponding to the turning position in S243 as the k+1th gene in the chromosome; S25, determining whether the number of genes in chro is equal to M, if so, ending the calculation, if not, entering S21.

[0059] In the process of obtaining, the present invention is based on the straight line The next gene is screened based on the distance relationship between the straight flight path corresponding to the kth gene and the turning position corresponding to the shortest turning route between each straight flight path corresponding to all the numbers in NumU, thereby effectively reducing the probability of the event that the angle is too small, less than 180 degrees, among the two angles formed by the straight line segment between the position where the drone leaves the straight flight path corresponding to the kth gene and the turning position and the straight line perpendicular to the straight flight path, thereby effectively reducing the amplitude of the change in the direction of the drone and reducing the power consumed by the drone for turning.

[0060] Preferably, the fitness function value of the chromosome is calculated as follows: S31, respectively obtaining the shortest turning route between two straight flight paths corresponding to two genes located adjacently in the chromosome; S32, calculating the fitness function value: ; represents the fitness function value of the chromosome, represents the length of the shortest turning route between the two straight flight paths corresponding to the i-th gene and the i+1-th gene in the chromosome, Indicates the turning position corresponding to the shortest turning route between the two straight flight paths corresponding to the i-th gene and the i+1-th gene and the straight line The distance between is a straight line passing through all the points in the straight flight path corresponding to the i-th gene, and Respectively represent the first weight and the second weight, respectively obtain the length of the shortest turning route between the two straight flight paths corresponding to the two adjacent genes in the chromosome, and obtain the length of M-1 shortest turning routes. It represents the maximum value of the length of M-1 shortest turning routes; the two adjacent genes here refer to two genes with a sequence number difference of 1, such as the first gene and the second gene in the chromosome.

[0061] The fitness function value of the present invention not only takes into account the length of the shortest turning route, but also takes into account the turning position and the straight line. The shorter the distance between the two directions, the shorter the length of the shortest turning route. The smaller the distance between them, the larger the value of the fitness function; while obtaining the shortest possible shortest turning route, the angle less than 180 degrees formed by the straight line segment between the position where the UAV leaves the previous straight flight path and the turning position and the straight line perpendicular to the straight flight path can be as large as possible, so that the UAV can have the longest effective flight time possible.

[0062] Preferably, the first weight and the second weight are and .

[0063] Preferably, selection operation, crossover operation and mutation operation are performed on the evolutionary population in sequence to obtain multiple new chromosomes, including: the process of selection operation is as follows: the first adpnum chromosomes with the largest fitness function value are selected from the evolutionary population and stored in the set chse, adpnum is an adaptive control parameter; the process of crossover operation is as follows: crossover operation is performed on the chromosomes in chse in pairs to obtain multiple new chromosomes, and the new chromosomes obtained in the crossover operation process are stored in the set ovrlp; the process of mutation operation is as follows: mutation operation is performed on each chromosome in ovrlp to obtain new chromosomes, and the new chromosomes obtained in the mutation operation process are stored in the set varit; the chromosomes contained in the set varit are the new chromosomes finally obtained.

[0064] Preferably, the calculation formula of adpnum is: ; Indicates the number of times the set child acquisition process is run. Indicates the cumulative number of times the child acquisition process has been run.

[0065] In the selection operation process of the present invention, the number of chromosomes selected to participate in the crossover operation is not fixed, but is obtained by an adaptive calculation method, which can be adaptively reduced as the number of operations of the offspring acquisition process increases, which is beneficial to increase the probability of chromosome crossover in the early calculation process, thereby obtaining more abundant offspring, improving the quality of the chromosome with the maximum fitness function value finally obtained, so that the chromosome with the maximum fitness function value finally obtained can be closer to the theoretically optimal chromosome. In the calculation process near the end, the probability of chromosome crossover is reduced, so that when approaching the theoretically optimal chromosome, it is advanced with a smaller change range, further narrowing the gap between the chromosome with the maximum fitness function value finally obtained and the theoretically optimal chromosome.

[0066] The theoretically optimal chromosome refers to the chromosome that can minimize the fitness function value among all possible chromosomes.

[0067] Preferably, the crossover operation may adopt a single-point crossover algorithm, a multi-point crossover algorithm, a uniform crossover algorithm, or a partial matching crossover algorithm.

[0068] Preferably, the mutation algorithm may adopt single-point mutation, exchange mutation, insertion mutation and the like.

[0069] If there are duplicate genes in the chromosome obtained by the crossover operation or mutation operation, the genes that are not included in the chromosome are selected from the set NumU to replace the genes that are duplicated with the genes at the mutated position or the crossover position at the position that does not belong to the mutated position or the crossover position, so that after the replacement, there are no duplicate genes in the chromosome and all genes belong to the set NumU.

[0070] Preferably, the offspring acquisition process refers to the calculation process of the second step, and each time the second step is left, the number of executions of the offspring acquisition process is increased by 1.

[0071] Preferably, the number of runs of the offspring acquisition process is set to 10,000.

[0072] Preferably, the stopping condition includes that the cumulative number of runs of the offspring acquisition process is greater than the set number of runs of the offspring acquisition process or the maximum value of the fitness function value in the obtained new evolutionary population has tended to be stable.

[0073] Specifically, whether the maximum value of the fitness function value tends to be stable is judged in the following way: the maximum values ​​of the fitness function values ​​corresponding to the chromosomes in the most recently obtained m new evolutionary populations are stored in the set Am; the standard deviation of the elements in the set Am is calculated, and if the standard deviation is less than the set standard deviation threshold, it means that the maximum value of the fitness function value has tended to be stable.

[0074] The standard deviation threshold may be one thirtieth of the median of the fitness function values ​​in Am.

[0075] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention; therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A drone system for substation inspection, characterized in that: It includes a path planning device and a drone for inspecting a substation, wherein the path planning device includes a first acquisition module, a second acquisition module and a flight path optimization module; The first acquisition module is used to obtain the minimum circumscribed polygon of the area range of the substation; The second acquisition module is used to acquire a straight flight path covering a minimum circumscribed polygon based on the distance between the set straight flight paths; The flight path optimization module is used to perform the following calculations: If the UAV's maximum turning diameter is less than or equal to the distance between the straight flight paths, the two adjacent straight flight paths are connected end to end in sequence to obtain the inspection path; If the UAV's maximum turning diameter is greater than the distance between straight flight paths, the inspection path is obtained in the following way: In the first step, the straight flight path is used as the gene of the genetic algorithm, and the initial population is generated based on the set population size N, and the initial population is used as the evolutionary population; The second step is to perform selection, crossover and mutation operations on the evolving population in turn to obtain multiple new chromosomes; The third step is to select the first N chromosomes with the largest fitness function values ​​from the chromosomes contained in the evolutionary population and the new chromosomes obtained in the second step based on the fitness function value to form a new evolutionary population; Step 4: Determine whether the stop condition is met. If yes, go to step 5; if no, go to step 2. The fifth step is to use the arrangement order of the genes in the chromosome with the largest fitness function value as the inspection order of the straight flight path, and connect two straight flight paths with adjacent inspection orders in sequence to obtain the inspection path; Get the straight flight path that covers the minimum circumscribed polygon based on the distance between the set straight flight paths, including: Let D represent the distance between the set straight flight paths; Get the base edge in the minimum circumscribed polygon; Based on D, draw multiple straight line segments parallel to the reference side, and the distance between two adjacent straight line segments is equal to D; Each straight line segment is regarded as a straight line flight path; Get the base edges in the minimum circumscribed polygon, including: S1, store all the edges of the minimum circumscribed polygon into the set EGU; store all the endpoints of the minimum circumscribed polygon into the set DU; S2, perform the following calculations on each edge in the EGU: For edge eg in EGU, delete the two endpoints belonging to eg in DU to obtain the set egDU; Draw a straight line parallel to eg through each endpoint of egDU, and use the obtained straight line as an element of the set StrL; Delete the lines in StrL whose number of intersections with the minimum circumscribed polygon is greater than or equal to 2; Get the minimum distance between the straight line in StrL and eg; S3, sort the multiple minimum values ​​obtained in S2 from small to large, and use the edge corresponding to the first-ranked minimum value in the EGU as the reference edge; Using the straight flight path as the gene of the genetic algorithm, the initial population is generated based on the set population size N, including: Starting from 1, the straight flight paths are numbered consecutively, and the difference between the numbers of two adjacent straight flight paths is 1; the maximum number is equal to the total number M of the straight flight paths; Save all numbers to the number set NumU; The chromosomes in the initial population are obtained based on the following process: S11, randomly select a number from NumU as the first gene of the chromosome containing M genes; S12, obtain the remaining M-1 genes based on the limit turning diameter to obtain a chromosome; S13, determining whether the obtained chromosome is the same as the chromosome already existing in the initial population, if so, deleting the obtained chromosome, if not, using the obtained chromosome as a chromosome in the initial population; S14, determine whether the number of chromosomes already existing in the initial population is less than N, if so, enter S11, if not, end the operation; Based on the limiting turning diameter, the remaining M-1 genes are obtained, including: S21, store the numbers corresponding to the genes already contained in the chromosome into the set chro; S22, delete the number in chro from NumU; S23, k represents the number of genes already present in chro; S24, obtain the k+1th gene in the chromosome, the acquisition process is as follows: S241, obtaining a turning position corresponding to the shortest turning route between the straight flight path corresponding to the kth gene in the chromosome and each straight flight path corresponding to all the numbers in NumU; S242, calculate each turning position and straight line respectively The distance between the straight lines is a straight line passing through all the points in the straight flight path corresponding to the kth gene in the chromosome; S243, obtaining a turning position corresponding to the smallest distance among all the distances; S244, taking the number of the straight flight path corresponding to the turning position in S243 as the k+1th gene in the chromosome; S25, determine whether the number of genes in chro is equal to M, if so, end the calculation, if not, enter S21; The calculation process of the chromosome fitness function value is: S31, respectively obtaining the shortest turning route between two straight flight paths corresponding to two genes located adjacently in the chromosome; S32, calculate the fitness function value: ; represents the fitness function value of the chromosome, represents the length of the shortest turning route between the two straight flight paths corresponding to the i-th gene and the i+1-th gene in the chromosome, Indicates the turning position corresponding to the shortest turning route between the two straight flight paths corresponding to the i-th gene and the i+1-th gene and the straight line The distance between is the straight line passing through all the points in the straight flight path corresponding to the i-th gene, and Respectively represent the first weight and the second weight, respectively obtain the length of the shortest turning route between the two straight flight paths corresponding to the two adjacent genes in the chromosome, and obtain the length of M-1 shortest turning routes. Indicates the maximum length of M-1 shortest turning routes.

2. The UAV system for substation inspection according to claim 1 is characterized in that: Also included is a drone control device; The drone control device is used to control the drone to fly along the inspection route. During the flight, the drone takes aerial photos of the substation according to the set shooting coordinates to obtain multiple aerial images.

3. The UAV system for substation inspection according to claim 1 is characterized in that: Get the minimum circumscribed polygon of the substation area, including: Obtain a plan map of the area including the substation; Get the outline image of the substation in the plan map; The convex hull detection algorithm is used to calculate the contour image and obtain the minimum circumscribed polygon of the substation area.

4. The UAV system for substation inspection according to claim 3 is characterized in that: Get an outline image of the substation in a plan map, including: Obtain a local image belonging to the substation in the plan map; Perform edge detection on the local image to obtain a set of edge pixel points E1; Delete the edge pixels inside the substation in E1 to obtain set E2; The image composed of edge pixels in E2 is used as the contour image of the substation.

5. The UAV system for substation inspection according to claim 3 is characterized in that: The convex hull detection algorithm includes any one of the Graham scanning algorithm, the Jarvis stepping algorithm and the fast convex hull algorithm.