UAV route determination method, device and electronic equipment for power inspection
The method uses image data and a particle swarm algorithm to autonomously plan UAV routes for power inspection, improving efficiency and safety by optimizing flight stability and duration.
Patent Information
- Application Number
- CN202410490339.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-23
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-04-23
AI Technical Summary
Existing UAV route planning for power inspection requires manual participation, leading to low efficiency and safety risks in harsh environments.
A method for determining a UAV route using image data to define flight areas, points, and constraints, combined with a particle swarm algorithm to optimize flight stability and duration, enabling autonomous and efficient route planning.
Automatically determines optimal UAV inspection routes, enhancing efficiency and safety by reducing manual intervention and adapting to environmental challenges.
Smart Images

Figure CN118089742B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of UAV power inspection, and more specifically, to a method for determining a UAV route for power inspection, a device for determining a UAV route for power inspection, a computer-readable storage medium, and an electronic device. Background Art
[0002] With the adjustment of energy structure, the demand for electricity in the consumer market is increasing year by year. Therefore, it is very important to realize intelligent monitoring and real-time early warning through advanced intelligent algorithms and communication technologies to ensure the reliability and continuity of power infrastructure and power supply. At present, the inspection tasks of a large number of power facilities still rely on manual operations, which limits the location and efficiency of locating power faults. At the same time, harsh environments such as rain, snow, and mountain roads also seriously threaten the personal safety of inspectors and the quality of inspection.
[0003] With the rapid development of small drone technology, the way many industries operate is gradually changing. Drones are flexible, efficient and low-cost, and are usually composed of drone aircraft, sensors, communication equipment and control systems. Drones have also injected new methods into the way of power inspection. The inspection area, equipment, direction and route are pre-set, and the drone is started for autonomous inspection. During the inspection, it will sail to the preset points in turn, and find the inspection angle based on visual detection to send back data. Among them, the prerequisite for drones to achieve "unmanned" is to achieve autonomous flight according to the rules and constraints set by humans. However, in the existing technology, how to combine advanced algorithms, sensor technology and communication systems to realize the route planning of drone collaborative flight still has problems such as human participation and low energy efficiency.
[0004] Therefore, a method is needed to automatically plan the flight path of a drone. Summary of the invention
[0005] The main purpose of the present application is to provide a method for determining a UAV route for power inspection, a device for determining a UAV route for power inspection, a computer-readable storage medium and an electronic device, so as to at least solve the problem in the prior art that route planning of UAV flight requires manual participation, resulting in low efficiency.
[0006] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for determining a UAV route for power inspection is provided, comprising: acquiring image data of a transmission line, and determining a flight area of the UAV based on the image data, wherein the image data is an image of multiple power equipment in the transmission line; determining a flight starting point, a flight end point, and an obstacle point of the UAV based on the flight area, determining a route constraint model of the UAV based on at least the flight starting point, the flight end point, and the obstacle point, and determining multiple initial routes based on the route constraint model, wherein the route constraint model is used to determine all routes of the UAV that meet the constraint conditions. The constraint conditions are determined by at least the flight starting point, the flight end point and the obstacle point; the flight stability function and the flight duration function of each of the initial routes are determined, and the route constraint model optimization function is determined according to the flight stability function and the flight duration function, wherein the flight stability function is a function that characterizes the stability of the initial route, the flight duration function is a function that characterizes the flight duration of the initial route, and the route constraint model optimization function is a function that optimizes the route constraint model according to the stability and the flight duration; the route constraint model optimization function is solved by using a particle swarm algorithm to determine the optimal route of the UAV.
[0007] Optionally, determining the route constraint model of the UAV at least according to the flight starting point, the flight end point and the obstacle point includes: obtaining the flight speed constraint condition and the flight distance of the UAV, and determining the energy consumption constraint condition according to the flight speed constraint condition and the flight distance; determining the route constraint model of the UAV according to the flight starting point, the flight end point, the obstacle point and the energy consumption constraint condition as follows: Among them, (x i ,y i ,z i ) is the three-dimensional coordinate of the UAV, (x 0 ,y 0 , z 0 ) is the three-dimensional coordinate of the flight starting point, (x max ,y max , z max ) is the three-dimensional coordinate of the flight endpoint, (x p ,y p ) is the coordinate of the center of the obstacle point in the two-dimensional plane, r is the radius of the circular model established with the obstacle point as the center, l is the safety distance, v j is the flight speed of the UAV in the jth route, v min is the minimum speed of the UAV, v max is the maximum speed of the UAV, s jis the length of the route described in the jth segment, and d is the flight distance.
[0008] Optionally, determining a flight stability function and a flight duration function of each of the initial routes, and determining a route constraint model optimization function according to the flight stability function and the flight duration function, comprises: determining the flight stability function as f 1 =∑ j α j , where α j represents the turning angle of the route of the jth segment; the flight duration function is determined as f 2 =Σ j x j , where x j represents the flight time of the route of the jth segment; obtains the first weight coefficient and the second weight coefficient, and determines that the route constraint model optimization function is f=λ 1 Σ j α j +λ 2 Σ j x j , where λ 1 represents the first weight coefficient, which represents the weight of the steering angle, λ 2 represents the second weight coefficient, the second weight coefficient represents the weight of the flight time and the λ 1 and the λ 2 are all real numbers in [0,1].
[0009] Optionally, determining the flight area of the UAV based on the image data includes: performing image edge enhancement processing on the image data to obtain the image data after edge processing; and determining the area where the multiple power equipment are located in the image data after edge processing as the flight area.
[0010] Optionally, after determining the optimal route of the UAV, the method further includes: an interpolation processing step: performing spline interpolation processing on the optimal route to obtain a smoothed optimal route; a verification step: using the route constraint model and the route constraint model optimization function to verify the smoothed optimal route; if the verification passes, controlling the UAV to patrol along the smoothed optimal route; if the verification fails, repeating the interpolation processing step and the verification step until the verification passes.
[0011] Optionally, a particle swarm algorithm is used to solve the optimization function of the route constraint model, including: a first determination step: according to the formula Determine the tracking capability of individual particle extreme values and the tracking capability of population particle extreme values, where c 1represents the tracking capability of the individual particle extreme value, c 2 represents the tracking capability of the population particle extreme value, c a and c b Both represent constants with a value range of (0, 4). represents the current extreme value of the t-th iteration population particle, represents the current extreme value of the individual particle of the t-th iteration, and the optimal route is composed of the individual particle and the population particles; the second determination step: determining the historical extreme value of the individual particle according to the tracking ability of the individual particle extreme value, and determining the current extreme value of the population particle according to the tracking ability of the population particle extreme value.
[0012] Optionally, after determining the current extreme value of the population particle, the method further comprises: an updating step: according to the formula and formula Update the particle's velocity and position, represents the velocity of the kth particle in the t+1th iteration, w represents the inertia weight coefficient, represents the velocity of the kth particle in the tth iteration, r 1 and r 2 Both represent random numbers between (0, 1). represents the value of the kth particle in the tth iteration, gbest represents the value of the population particle, represents the position of the kth particle in the tth iteration, represents the position of the kth particle in the t+1th iteration; when the updated speed and position of the particle meet the iteration exit condition, exit the iteration to obtain the particle group corresponding to the optimal route; when the updated speed and position of the particle do not meet the iteration exit condition, repeat the first determining step, the second determining step and the updating step until the iteration exit condition is met.
[0013] According to another aspect of the present application, a UAV route determination device for power inspection is provided, comprising: a first determination unit, used to acquire image data of a transmission line, and determine a flight area of the UAV based on the image data, wherein the image data is an image of a plurality of power equipment in the transmission line; a second determination unit, used to determine a flight starting point, a flight end point, and an obstacle point of the UAV based on the flight area, and determine a route constraint model of the UAV at least based on the flight starting point, the flight end point, and the obstacle point, and determine a plurality of initial routes based on the route constraint model, wherein the route constraint model is used to determine all routes of the UAV that satisfy constraint conditions, and the constraint conditions At least determined by the flight starting point, the flight end point and the obstacle point; a third determination unit, used to determine the flight stability function and the flight duration function of each of the initial routes, and determine the route constraint model optimization function according to the flight stability function and the flight duration function, wherein the flight stability function is a function that characterizes the stability of the initial route, the flight duration function is a function that characterizes the flight duration of the initial route, and the route constraint model optimization function is a function that optimizes the route constraint model according to the stability and the flight duration; a fourth determination unit, used to use a particle swarm algorithm to solve the route constraint model optimization function, so as to determine the optimal route of the UAV.
[0014] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the methods for determining a drone route for power inspection.
[0015] According to another aspect of the present application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing any one of the methods for determining a drone route for power inspection.
[0016] By applying the technical solution of the present application, image data of the power transmission line is obtained, the flight area of the UAV is determined according to the image data, the flight starting point, flight end point and obstacle point of the UAV are determined according to the flight area, the route constraint model of the UAV is determined at least according to the flight starting point, flight end point and obstacle point, and multiple initial routes are determined according to the route constraint model, the flight stability function and flight duration function of each initial route are determined, and the route constraint model optimization function is determined according to the flight stability function and the flight duration function, and the route constraint model optimization function is solved by using a particle swarm algorithm to solve the route constraint model optimization function, thereby determining the optimal route of the UAV. Compared with the inefficient method of UAV route planning in the prior art that requires manual participation, the present application can automatically determine the optimal inspection route of the UAV. Therefore, it can solve the problem of low efficiency caused by the need for manual participation in the route planning of UAV flight in the prior art, and achieve the effect of efficiently and unmannedly formulating the flight route during the UAV inspection process. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 A hardware structure block diagram of a mobile terminal for executing a method for determining a drone route for power inspection provided by an embodiment of the present application is shown;
[0019] Figure 2 A schematic diagram of a flow chart of a method for determining a UAV route for power inspection provided in an embodiment of the present application is shown;
[0020] Figure 3 A schematic diagram of a detection process of a drone vision system provided by an embodiment of the present application is shown;
[0021] Figure 4 A schematic diagram of a flight area provided by an embodiment of the present application is shown;
[0022] Figure 5 A schematic diagram of a solution process of a particle swarm algorithm provided in an embodiment of the present application is shown;
[0023] Figure 6 A schematic diagram of a process flow of route smoothing provided by an embodiment of the present application is shown;
[0024] Figure 7 A structural block diagram of a UAV route determination device for power inspection provided in an embodiment of the present application is shown.
[0025] The above drawings include the following reference numerals:
[0026] 102, processor; 104, memory; 106, transmission device; 108, input and output devices. DETAILED DESCRIPTION
[0027] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] As introduced in the background technology, the route planning of UAV flight in the prior art requires manual participation, resulting in low efficiency. In order to solve the problem that the route planning of UAV flight requires manual participation, resulting in low efficiency, the embodiments of the present application provide a UAV route determination method for power inspection, a UAV route determination device for power inspection, a computer-readable storage medium and an electronic device.
[0031] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0032] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 1 is a hardware structure block diagram of a mobile terminal of a method for determining a route of a UAV for power inspection according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0033] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for determining the route of a drone for power inspection in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned specific examples of the network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0034] In this embodiment, a method for determining a drone route for power inspection that runs on a mobile terminal, a computer terminal, or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.
[0035] Figure 2 1 is a flow chart of a method for determining a drone route for power inspection according to an embodiment of the present application. Figure 2As shown, the method comprises the following steps:
[0036] Step S201, acquiring image data of a power transmission line, and determining a flight area of the UAV according to the image data, wherein the image data is an image of a plurality of power equipment in the power transmission line;
[0037] Specifically, this embodiment plans the inspection route or path of the drone through an intelligent algorithm. Therefore, firstly, the image data of the transmission line is obtained, and the transmission line is used as the flight path of the drone to collect inspection images of power equipment such as towers and insulators in the transmission line, which can be pictures taken by a camera mounted on the drone. The transmission line is matched with the position of the image data in the transmission line to obtain the area of the entire transmission line that needs to be inspected, that is, the flight area of the drone.
[0038] Step S202, determining the flight starting point, flight end point and obstacle point of the UAV according to the flight area, determining a route constraint model of the UAV at least according to the flight starting point, the flight end point and the obstacle point, and determining a plurality of initial routes according to the route constraint model, wherein the route constraint model is used to determine all routes of the UAV that meet constraint conditions, and the constraint conditions are determined at least by the flight starting point, the flight end point and the obstacle point;
[0039] Specifically, after determining the area that the drone needs to inspect, that is, the flight area, it is necessary to determine the flight starting point, flight end point, and obstacle point of the drone, that is, the direction of the drone's flight. The flight starting point can be determined according to actual conditions, such as the southernmost or northernmost end of the flight area. After determining the flight starting point, according to the flight direction, an electrical equipment farthest from the flight starting point can be selected as the flight end point. In actual flight, it is also necessary to consider not colliding with obstacles while maintaining a certain safety distance. Therefore, the route constraint model can be determined by comprehensively considering the above factors, that is, the constraints. Multiple initial routes can be solved through the route constraint model.
[0040] Step S203, determining a flight stability function and a flight duration function of each of the initial routes, and determining a route constraint model optimization function according to the flight stability function and the flight duration function, wherein the flight stability function is a function that characterizes the stability of the initial routes, the flight duration function is a function that characterizes the flight duration of the initial routes, and the route constraint model optimization function is a function that optimizes the route constraint model according to the stability and the flight duration;
[0041] Specifically, after determining multiple initial routes, one or several most suitable routes need to be selected. Therefore, considering the flight stability and flight duration comprehensively, the functions of the above two factors are established to obtain the flight stability function and flight duration function of each route, and then the route constraint model optimization function is determined according to the two functions, that is, the optimized route constraint model, to obtain the optimized route.
[0042] Step S204: using a particle swarm algorithm to solve the optimization function of the route constraint model, thereby determining the optimal route of the UAV.
[0043] Specifically, in order to accurately determine the optimized route among multiple initial routes, the particle swarm optimization (PSO) algorithm is used to solve the optimization function of the route constraint model, and the operator of the basic PSO algorithm for adjusting the extreme value tracking capability is improved to adapt to the solution of this embodiment, thereby determining the optimal route.
[0044] Through this embodiment, the image data of the transmission line is obtained, the flight area of the UAV is determined according to the image data, the flight starting point, flight end point and obstacle point of the UAV are determined according to the flight area, the route constraint model of the UAV is determined at least according to the flight starting point, flight end point and obstacle point, and multiple initial routes are determined according to the route constraint model, the flight stability function and flight duration function of each initial route are determined, and the route constraint model optimization function is determined according to the flight stability function and the flight duration function, and the route constraint model optimization function is solved by using a particle swarm algorithm to determine the optimal route of the UAV. Compared with the inefficient method of UAV route planning in the prior art that requires manual participation, the present application can automatically determine the optimal inspection route of the UAV. Therefore, it can solve the problem of low efficiency caused by the need for manual participation in the route planning of UAV flight in the prior art, and achieve the effect of efficiently and unmannedly formulating the flight route during the inspection of UAV.
[0045] In the specific implementation process, the above step S202 determines the route constraint model of the above drone at least according to the above flight starting point, the above flight end point and the above obstacle point, which can be achieved by the following steps: obtaining the flight speed constraint condition and the flight distance of the above drone, and determining the energy consumption constraint condition according to the above flight speed constraint condition and the above flight distance; determining the route constraint model of the drone according to the flight starting point, the flight end point, the obstacle point and the energy consumption constraint condition as follows: Among them, (x i ,y i , z i ) is the three-dimensional coordinate of the drone, (x 0 ,y 0 , z 0) is the three-dimensional coordinate of the flight starting point, (x max ,y max , z max ) is the three-dimensional coordinate of the flight endpoint, (x p ,y p ) is the coordinate of the center of the obstacle point in the two-dimensional plane, r is the radius of the circular model established with the obstacle point as the center, l is the safety distance, v j is the flight speed of the UAV in the jth route, v min is the minimum speed of the UAV, v max is the maximum speed of the UAV, s j is the length of the jth segment of the route, and d is the flight distance. The method determines the route constraint model of the UAV through the above steps, so that the route can be restricted within the above constraints, so as to obtain an accurate initial route.
[0046] In the specific implementation process, the above route constraint model is actually composed of various constraint conditions. First, the drone cannot exceed the flight starting point and the flight end point, that is, the current three-dimensional coordinates of the drone cannot exceed the three-dimensional coordinates of the flight starting point and the three-dimensional coordinates of the flight end point. The formula is expressed as The second is obstacle avoidance constraints. In actual flight, when modeling obstacles, we need to consider not only avoiding collisions but also maintaining a certain safety distance. To facilitate modeling, a circle is used to represent the obstacle range on a two-dimensional plane. Then, on the flight plane, the safety distance that needs to be maintained is expressed as: That is to say, it is necessary to add a certain distance from the obstacle center coordinates plus a safety distance. Then, the energy consumption of the drone needs to be considered, that is, the energy consumption constraint: the flight time of the drone is mainly determined by the flight speed and flight distance. When the drone is flying in the air, too fast a speed can easily lead to insufficient drone target detection and low-quality flight photography. The flight distance is composed of the sum of each route segment. Therefore, the formula can be expressed as: min ≤v j ≤v max and Energy consumption is the product of the flight distance and the energy consumption per unit distance. Of course, in practical applications, other constraints can also be considered so that the cruise route can detect the faults of the power transmission line to the greatest extent and avoid missed detection.
[0047] In order to determine the optimal route, in some optional implementations, the above step S203 determines the flight stability function and the flight duration function of each of the above initial routes, and determines the route constraint model optimization function according to the above flight stability function and the above flight duration function, which can be achieved by the following steps: Determine the flight stability function as f 1 =∑j α j , where α j represents the turning angle of the route of the jth segment; the flight duration function is determined as f 2 =∑ j x j , where x j represents the flight time of the route of the jth segment; obtains the first weight coefficient and the second weight coefficient, and determines that the route constraint model optimization function is f=λ 1 ∑ j α j +λ 2 ∑ j x j , where λ 1 represents the first weight coefficient, which represents the weight of the steering angle, λ 2 represents the second weight coefficient, the second weight coefficient represents the weight of the flight time and the λ 1 and the λ 2 All of them are real numbers in [0,1]. This method determines the route constraint model optimization function through the above two optimization functions, so that the optimal route can be solved according to the above route constraint model optimization function.
[0048] Specifically, the route constraint model is optimized through a certain optimization function. According to the maneuverability of the UAV, the flight stability and flight duration of the UAV and the comprehensive efficiency function composed of stability and flight duration are used as optimization functions to optimize the route constraint model. First, considering the stability of the UAV flight, the solution with the least steering angle is selected, which can be expressed by the following formula: 1 =∑ j α j , that is, add up the steering angles of all route segments to get the total steering angle, and then choose the solution with the least steering angle; second, consider the flight time of the drone and choose the solution with the least total route segment length, which can be expressed by the following formula: 2 =∑ j x j That is to say, the total flight time of all route segments is summed up to get the total flight time, and then the plan with the shortest flight time is selected; thirdly, considering the comprehensive efficiency of UAV flight, the total steering angle f is allocated as needed 1 The total length of the route segment f 2 The weight coefficient can be expressed as follows: f = λ 1 ∑ j α j +λ 2 ∑ j x j , when λ 1 =λ and λ2 = 0 is the solution that only considers flight stability; when λ 1 = 0 and λ 2 = 1, it is a scheme that only considers the flight duration; when λ 1 ∈(0,1) and λ 2 ∈(1-λ 1 ) is a solution that takes both flight stability and flight duration into consideration.
[0049] In some optional implementations, the above step S201 determines the flight area of the drone based on the above image data, which can be achieved by the following steps: performing image edge enhancement processing on the above image data to obtain the above image data after edge processing; determining the area where the multiple above power equipment are located in the above image data after edge processing as the above flight area. The method adds an image enhancement processing step in the process of determining the flight area through the above steps, which can enhance the visual effect of the drone and the edge features of the transmission line, thereby making the identification of the transmission line and the power equipment clearer.
[0050] Specifically, the transmission line is used as the basis for the UAV flight, and inspection images of power equipment such as poles and insulators are collected. In order to ensure that the UAV fully flies in the inspection area, the UAV uses the identified transmission lines as the flight basis. In addition, during the inspection process, the outdoor transmission lines are easily interfered by various conditions such as lighting, which may cause the UAV to misdetect or miss detection. Therefore, image enhancement image processing is embedded in the visual system, mainly using edge enhancement technology. On the basis of basic detection model feature extraction, the Canny edge detection operator and attention module are added to selectively enhance the edge features of the transmission line in the UAV visual frame. After identifying the transmission line, each pole tower and insulator and other power equipment are matched to the corresponding position of the transmission line to obtain the flight area.
[0051] In order to make the route smoother, after determining the optimal route of the above-mentioned UAV, the above-mentioned method further includes the following steps: interpolation processing step: performing spline interpolation processing on the above-mentioned optimal route to obtain the above-mentioned smooth optimal route; verification step: using the above-mentioned route constraint model and the above-mentioned route constraint model optimization function to verify the above-mentioned smooth optimal route; if the verification passes, the above-mentioned UAV is controlled to inspect according to the above-mentioned smooth optimal route, and if the verification fails, the above-mentioned interpolation processing step and the above-mentioned verification step are repeated until the verification passes. The method smoothes the optimal route through the above-mentioned steps, which can make the route smoother.
[0052] In the specific implementation process, the optimized planned route is the optimal route: the required route is obtained by solving the particle swarm model, which is composed of a group of particles in sequence; spline interpolation: the optimal route obtained according to the above steps has the defect of discretization, which appears rather abrupt in actual flight, so the above route is processed by introducing three-order spline interpolation; route verification: in order to ensure that the route after spline interpolation processing meets the constraints and optimization function of the above model, the processed particles are verified again, and a group of particles that meet the constraints and the best optimization function are selected as the optimal route.
[0053] In some optional implementations, the above step S204 uses a particle swarm algorithm to solve the optimization function of the above route constraint model, including: a first determination step: according to the formula Determine the tracking capability of individual particle extreme values and the tracking capability of population particle extreme values, where c 1 represents the tracking capability of individual particle extreme values, c 2 represents the tracking capability of the population particle extreme value, c a and c b Both represent constants with a value range of (0, 4). represents the current extreme value of the t-th iteration population particle, represents the current extreme value of the individual particle of the tth iteration, and the optimal route is composed of individual particles and population particles; the second determination step: determine the historical extreme value of the individual particle according to the tracking ability of the extreme value of the individual particle, and determine the current extreme value of the population particle according to the tracking ability of the extreme value of the population particle. This method uses an improved extreme value tracking ability operator to solve the optimization function of the route constraint model, so that a group of particles corresponding to the optimal route can be determined more accurately, thereby more accurately determining the optimal route.
[0054] Specifically, the particle swarm algorithm solves: the operator of adjusting the extreme value tracking ability of the basic PSO algorithm is improved. The specific algorithm process is as follows: (1) Set the population size, maximum number of iterations, acceleration factor, and initialize the population. Each particle randomly generates a position and speed. In the conventional initialization process, the acceleration factor c 1 、c 2 Generally, the default value is 2, but in algorithm c 1 represents the individual extreme value tracking ability, c 2 It represents the ability to track the extreme value of the population. Therefore, the value of the learning factor is dynamically adjusted according to the degree of convergence of the algorithm. The specific mathematical relationship is expressed as: Among them, c a 、c b ∈(0,4) constant; (2) evaluate the fitness value of each particle, each particle determines its own historical extreme value, and the population determines the current extreme value.
[0055] In some optional implementations, after determining the current extreme value of the above-mentioned population particle, the above-mentioned method further includes the following steps: an updating step: according to the formula and formula Update the particle's velocity and position, represents the velocity of the kth particle in the t+1th iteration, w represents the inertia weight coefficient, represents the velocity of the kth particle in the tth iteration, r 1 and r 2 Both represent random numbers between (0, 1). represents the value of the kth particle in the tth iteration, gbest represents the value of the population particle, represents the position of the kth particle in the tth iteration, represents the position of the kth particle in the t+1th iteration; when the updated speed and position of the particle meet the iteration exit condition, the iteration is exited to obtain the particle group corresponding to the optimal route; when the updated speed and position of the particle do not meet the iteration exit condition, the first determination step, the second determination step and the update step are repeated until the iteration exit condition is met. The method performs updates and iterative calculations through the above steps, so as to determine whether the particle swarm algorithm meets the iteration condition and exit if it is met.
[0056] In the specific implementation process, after the above step (2), the following further includes: (3) updating the speed and position of each particle according to the following formula: Wherein, w is the inertia weight coefficient of the algorithm; (4) Determine whether the algorithm meets the termination condition. If so, stop the algorithm iteration. If not, continue to iterate until the iteration exit condition is met.
[0057] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the method for determining the route of a drone for power inspection of the present application will be described in detail below in combination with specific embodiments.
[0058] This embodiment relates to a specific method for determining a drone route for power inspection, including the following steps:
[0059] Step S1: Acquire image data of the power transmission line through the UAV’s visual system. Figure 3 The visual system processing flow chart of the drone is as follows: Figure 3 As shown, the UAV vision system detects the transmission lines and power equipment, obtains the detection targets, and then introduces edge enhancement to obtain clearer image data;
[0060] Step S2: Determine the flight area of the drone based on the above image data, such as Figure 4 As shown, the three-dimensional coordinates of the flight starting point in the flight area are (x 0 ,y 0 , z 0 ), the coordinates of the flight endpoint are (x max ,y max , z max ), power equipment such as towers and insulators are distributed throughout the flight area. The arrows indicate the flight direction. Different flight directions constitute different initial routes. Trees in the transmission lines can be used as obstacles (x p ,y p ), establish the UAV route constraint model, expressed as Among them, (x i ,y i , z i ) is the three-dimensional coordinate of the above-mentioned UAV, (x 0 ,y 0 , z 0 ) is the three-dimensional coordinate of the starting point of the above flight, (x max ,y max , z max ) is the three-dimensional coordinate of the above-mentioned flight endpoint, (x p ,y p ) is the coordinate of the center of the above obstacle point in the two-dimensional plane, r is the radius of the circular model established with the above obstacle point as the center, l is the safety distance, v j is the flight speed of the UAV in the jth route, v min is the minimum speed of the UAV, v max is the maximum speed of the UAV, s j is the length of the route described in paragraph j, and d is the above-mentioned flight distance;
[0061] Step S3: Determine the flight stability function and the flight duration function again, and determine the route constraint model optimization function according to the flight stability function and the flight duration function, that is, the function for optimizing the route constraint model, expressed as f=λ 1 ∑ j α j +λ 2 ∑ j x j , where λ 1 represents the first weight coefficient, which represents the weight of the steering angle, 2 represents the second weight coefficient, which represents the weight of the flight time and the λ 1 and the above λ 2 are all real numbers in [0,1];
[0062] Step S4: Use the particle swarm algorithm to solve the optimization function of the route constraint model. The steps of the particle swarm algorithm are as follows: Figure 5 As shown, it includes: (1) setting the population size, number of iterations, and constraint factors; (2) randomly initializing the population and assigning each particle a speed and position; (3) evaluating the fitness (route constraint model optimization function) value of each particle and determining the individual and population historical extreme values; (4) calculating the particle aggregation factor and updating the new speed and position of the particle; (5) judging whether the maximum number of iterations / termination condition is met, that is, whether the termination condition is met. If Y is met, terminate (output the planned route as needed); if N is not met, continue to execute step (3);
[0063] Step S5: After the optimal route is obtained, smoothing processing is required. The route smoothing processing steps are as follows: Figure 6 As shown, the planned route is output (the optimal route, which is composed of a group of particles and is discrete), and spline interpolation is performed to obtain the optimal route after smoothing. Then, the constraint conditions and Fitness (route constraint model optimization function) values are verified. If the verification passes, the final route is obtained.
[0064] The embodiment of the present application also provides a UAV route determination device for power inspection. It should be noted that the UAV route determination device for power inspection in the embodiment of the present application can be used to execute the UAV route determination method for power inspection provided in the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and those that have been described will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0065] The following is an introduction to the drone route determination device for power inspection provided in an embodiment of the present application.
[0066] Figure 7 Schematic diagram of a drone route determination device for power inspection according to an embodiment of the present application. Figure 7 As shown, the device comprises:
[0067] A first determining unit 10 is used to obtain image data of the power transmission line, and determine the flight area of the UAV according to the image data, wherein the image data is an image of a plurality of power equipment in the power transmission line;
[0068] Specifically, this embodiment plans the inspection route or path of the drone through an intelligent algorithm. Therefore, firstly, the image data of the transmission line is obtained, and the transmission line is used as the flight path of the drone to collect inspection images of power equipment such as towers and insulators in the transmission line, which can be pictures taken by a camera mounted on the drone. The transmission line is matched with the position of the image data in the transmission line to obtain the area of the entire transmission line that needs to be inspected, that is, the flight area of the drone.
[0069] a second determining unit 20, configured to determine a flight starting point, a flight end point, and an obstacle point of the UAV according to the flight area, determine a route constraint model of the UAV at least according to the flight starting point, the flight end point, and the obstacle point, and determine a plurality of initial routes according to the route constraint model, wherein the route constraint model is used to determine all routes of the UAV that meet constraint conditions, and the constraint conditions are determined at least by the flight starting point, the flight end point, and the obstacle point;
[0070] Specifically, after determining the area that the drone needs to inspect, that is, the flight area, it is necessary to determine the flight starting point, flight end point, and obstacle point of the drone, that is, the direction of the drone's flight. The flight starting point can be determined according to actual conditions, such as the southernmost or northernmost end of the flight area. After determining the flight starting point, according to the flight direction, an electrical equipment farthest from the flight starting point can be selected as the flight end point. In actual flight, it is also necessary to consider not colliding with obstacles while maintaining a certain safety distance. Therefore, the route constraint model can be determined by comprehensively considering the above factors, that is, the constraints. Multiple initial routes can be solved through the route constraint model.
[0071] a third determining unit 30, configured to determine a flight stability function and a flight duration function of each of the initial routes, and determine a route constraint model optimization function according to the flight stability function and the flight duration function, wherein the flight stability function is a function characterizing the stability of the initial routes, the flight duration function is a function characterizing the flight duration of the initial routes, and the route constraint model optimization function is a function for optimizing the route constraint model according to the stability and the flight duration;
[0072] Specifically, after determining multiple initial routes, one or several most suitable routes need to be selected. Therefore, considering the flight stability and flight duration comprehensively, the functions of the above two factors are established to obtain the flight stability function and flight duration function of each route, and then the route constraint model optimization function is determined according to the two functions, that is, the optimized route constraint model, to obtain the optimized route.
[0073] The fourth determination unit 40 is used to solve the optimization function of the route constraint model by using a particle swarm algorithm, so as to determine the optimal route of the UAV.
[0074] Specifically, in order to accurately determine the optimized route among multiple initial routes, the particle swarm optimization (PSO) algorithm is used to solve the optimization function of the route constraint model, and the operator of the basic PSO algorithm for adjusting the extreme value tracking capability is improved to adapt to the solution of this embodiment, thereby determining the optimal route.
[0075] Through this embodiment, the image data of the transmission line is obtained, the flight area of the UAV is determined according to the image data, the flight starting point, flight end point and obstacle point of the UAV are determined according to the flight area, the route constraint model of the UAV is determined at least according to the flight starting point, flight end point and obstacle point, and multiple initial routes are determined according to the route constraint model, the flight stability function and flight duration function of each initial route are determined, and the route constraint model optimization function is determined according to the flight stability function and the flight duration function, and the route constraint model optimization function is solved by using a particle swarm algorithm to determine the optimal route of the UAV. Compared with the device in the prior art that the route planning of the UAV requires manual participation and is inefficient, the present application can automatically determine the optimal inspection route of the UAV. Therefore, it can solve the problem of low efficiency caused by the need for manual participation in the route planning of the UAV flight in the prior art, and achieve the effect of efficiently and unmannedly formulating the flight route during the inspection of the UAV.
[0076] In a specific implementation process, the second determination unit includes a first determination module and a second determination module, wherein the first determination module is used to obtain the flight speed constraint and the flight distance of the UAV, and determine the energy consumption constraint according to the flight speed constraint and the flight distance; the second determination module is used to determine the route constraint model of the UAV according to the flight starting point, the flight end point, the obstacle point and the energy consumption constraint. Among them, (x i ,y i , z i ) is the three-dimensional coordinate of the drone, (x 0 ,y 0 , z 0 ) is the three-dimensional coordinate of the flight starting point, (x max ,y max , z max ) is the three-dimensional coordinate of the flight endpoint, (x p ,y p ) is the coordinate of the center of the obstacle point in the two-dimensional plane, r is the radius of the circular model established with the obstacle point as the center, l is the safety distance, v jis the flight speed of the UAV in the jth route, v min is the minimum speed of the UAV, v max is the maximum speed of the UAV, s j is the length of the jth segment of the route, and d is the flight distance. The device determines the route constraint model of the UAV through the above steps, so that the route can be restricted within the above constraints, so as to obtain an accurate initial route.
[0077] In the specific implementation process, the above route constraint model is actually composed of various constraint conditions. First, the drone cannot exceed the flight starting point and the flight end point, that is, the current three-dimensional coordinates of the drone cannot exceed the three-dimensional coordinates of the flight starting point and the three-dimensional coordinates of the flight end point. The formula is expressed as The second is obstacle avoidance constraints. In actual flight, when modeling obstacles, we need to consider not only avoiding collisions but also maintaining a certain safety distance. To facilitate modeling, a circle is used to represent the obstacle range on a two-dimensional plane. Then, on the flight plane, the safety distance that needs to be maintained is expressed as: That is to say, it is necessary to add a certain distance from the obstacle center coordinates plus a safety distance. Then, the energy consumption of the drone needs to be considered, that is, the energy consumption constraint: the flight time of the drone is mainly determined by the flight speed and flight distance. When the drone is flying in the air, too fast a speed can easily lead to insufficient drone target detection and low-quality flight photography. The flight distance is composed of the sum of each route segment. Therefore, the formula can be expressed as: min ≤v j ≤v max and Energy consumption is the product of the flight distance and the energy consumption per unit distance. Of course, in practical applications, other constraints can also be considered so that the cruise route can detect the faults of the power transmission line to the greatest extent and avoid missed detection.
[0078] In order to determine the optimal route, in some optional implementations, the third determination unit includes a third determination module, a fourth determination module and a fifth determination module, wherein the third determination module is used to determine that the flight stability function is f 1 =∑ j α j , where α j represents the turning angle of the route of the jth segment; the fourth determination module is used to determine the flight time function as f 2 =∑ j x j , where x j represents the flight time of the route of the jth segment; the fifth determination module is used to obtain the first weight coefficient and the second weight coefficient, and determine that the route constraint model optimization function is f=λ 1Σ j α j +λ 2 Σ j x j , where λ 1 represents the first weight coefficient, which represents the weight of the steering angle, λ 2 represents the second weight coefficient, the second weight coefficient represents the weight of the flight time and the λ 1 and the λ 2 The device determines the route constraint model optimization function through the above two optimization functions, so that the optimal route can be obtained by solving the route constraint model optimization function.
[0079] Specifically, the route constraint model is optimized through a certain optimization function. According to the maneuverability of the UAV, the flight stability and flight duration of the UAV and the comprehensive efficiency function composed of stability and flight duration are used as optimization functions to optimize the route constraint model. First, considering the stability of the UAV flight, the solution with the least steering angle is selected, which can be expressed by the following formula: 1 =∑ j α j , that is, add up the steering angles of all route segments to get the total steering angle, and then choose the solution with the least steering angle; second, consider the flight time of the drone and choose the solution with the least total route segment length, which can be expressed by the following formula: 2 =∑ j x j That is to say, the total flight time of all route segments is summed up to get the total flight time, and then the plan with the shortest flight time is selected; thirdly, considering the comprehensive efficiency of UAV flight, the total steering angle f is allocated as needed 1 The total length of the route segment f 2 The weight coefficient can be expressed as follows: f = λ 1 Σ j α j +λ 2 Σ j x j , when λ 1 =1 and λ 2 = 0 is the solution that only considers flight stability; when λ 1 = 0 and λ 2 = 1, it is a scheme that only considers the flight duration; when λ 1 ∈(0,1) and λ 2 ∈(1-λ 1 ) is a solution that takes both flight stability and flight duration into consideration.
[0080] In some optional embodiments, the first determination unit includes a processing module and a sixth determination module, the processing module is used to perform image edge enhancement processing on the image data to obtain the image data after edge processing; the sixth determination module is used to determine the area where the plurality of the power equipment are located in the image data after edge processing as the flight area. The device adds an image enhancement processing step in the process of determining the flight area through the above steps, which can enhance the visual effect of the drone and the edge features of the transmission line, thereby making the identification of the transmission line and the power equipment clearer.
[0081] Specifically, the transmission line is used as the basis for the UAV flight, and inspection images of power equipment such as poles and insulators are collected. In order to ensure that the UAV fully flies in the inspection area, the UAV uses the identified transmission lines as the flight basis. In addition, during the inspection process, the outdoor transmission lines are easily interfered by various conditions such as lighting, which may cause the UAV to misdetect or miss detection. Therefore, image enhancement image processing is embedded in the visual system, mainly using edge enhancement technology. On the basis of basic detection model feature extraction, the Canny edge detection operator and attention module are added to selectively enhance the edge features of the transmission line in the UAV visual frame. After identifying the transmission line, each pole tower and insulator and other power equipment are matched to the corresponding position of the transmission line to obtain the flight area.
[0082] In order to make the route smoother, after determining the optimal route of the drone, the device further includes: an interpolation processing unit, a verification unit and a first execution unit, wherein the interpolation processing unit is used to perform an interpolation processing step: performing spline interpolation processing on the optimal route to obtain the smoothed optimal route; the verification unit is used to perform a verification step: using the route constraint model and the route constraint model optimization function to verify the smoothed optimal route; the first execution unit is used to control the drone to inspect according to the smoothed optimal route if the verification passes, and to repeat the interpolation processing step and the verification step until the verification passes if the verification fails. The device performs smoothing processing on the optimal route through the above steps, which can make the route smoother.
[0083] In the specific implementation process, the optimized planned route is the optimal route: the required route is obtained by solving the particle swarm model, which is composed of a group of particles in sequence; spline interpolation: the optimal route obtained according to the above steps has the defect of discretization, which appears rather abrupt in actual flight, so the above route is processed by introducing three-order spline interpolation; route verification: in order to ensure that the route after spline interpolation processing meets the constraints and optimization function of the above model, the processed particles are verified again, and a group of particles that meet the constraints and the best optimization function are selected as the optimal route.
[0084] In some optional implementations, the fourth determination unit includes a seventh determination module and an eighth determination module, wherein the seventh determination module is used to perform the first determination step: according to the formula Determine the tracking capability of individual particle extreme values and the tracking capability of population particle extreme values, where c 1 represents the tracking capability of individual particle extreme values, c 2 represents the tracking capability of the population particle extreme value, c a and c b Both represent constants with a value range of (0, 4). represents the current extreme value of the t-th iteration population particle, represents the current extreme value of the individual particle of the t-th iteration, and the optimal route is composed of individual particles and population particles; the eighth determination module is used to perform the second determination step: determine the historical extreme value of the individual particle according to the tracking ability of the extreme value of the individual particle, and determine the current extreme value of the population particle according to the tracking ability of the extreme value of the population particle. The device uses an improved extreme value tracking ability operator to solve the optimization function of the route constraint model, so that a group of particles corresponding to the optimal route can be determined more accurately, thereby more accurately determining the optimal route.
[0085] Specifically, the particle swarm algorithm solves: the operator of adjusting the extreme value tracking ability of the basic PSO algorithm is improved. The specific algorithm process is as follows: (1) Set the population size, maximum number of iterations, acceleration factor, and initialize the population. Each particle randomly generates a position and speed. In the conventional initialization process, the acceleration factor c 1 、c 2 Generally, the default value is 2, but in algorithm c 1 represents the individual extreme value tracking ability, c 2 It represents the ability to track the extreme value of the population. Therefore, the value of the learning factor is dynamically adjusted according to the degree of convergence of the algorithm. The specific mathematical relationship is expressed as: Among them, c a 、c b ∈(0,4) constant; (2) evaluate the fitness value of each particle, each particle determines its own historical extreme value, and the population determines the current extreme value.
[0086] In some optional embodiments, after determining the current extreme value of the above-mentioned population particle, the above-mentioned device further includes an updating unit and a second execution unit, wherein the updating unit is used to perform the updating step: according to the formula and formula Update the particle's velocity and position, represents the velocity of the kth particle in the t+1th iteration, w represents the inertia weight coefficient, represents the velocity of the kth particle in the tth iteration, r1 and r 2 Both represent random numbers between (0, 1). represents the value of the kth particle in the tth iteration, gbest represents the value of the population particle, represents the position of the kth particle in the tth iteration, Indicates the position of the kth particle in the t+1th iteration; the second execution unit is used to exit the iteration when the above-mentioned speed and the above-mentioned position of the particle after the update meet the iteration exit condition, and obtain the particle group corresponding to the above-mentioned optimal route. When the above-mentioned speed and the above-mentioned position of the particle after the update do not meet the above-mentioned iteration exit condition, the above-mentioned first determination step, the above-mentioned second determination step and the updating step are repeatedly executed until the above-mentioned iteration exit condition is met. The device performs updates and iterative calculations through the above steps, so that it can determine whether the particle swarm algorithm meets the iteration condition, and exit if it meets the condition.
[0087] In the specific implementation process, after the above step (2), the following further includes: (3) updating the speed and position of each particle according to the following formula: Wherein, w is the inertia weight coefficient of the algorithm; (4) Determine whether the algorithm meets the termination condition. If so, stop the algorithm iteration. If not, continue to iterate until the iteration exit condition is met.
[0088] The above-mentioned UAV route determination device for power inspection includes a processor and a memory. The above-mentioned first determination unit, second determination unit, third determination unit and fourth determination unit are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions. The above-mentioned modules are all located in the same processor; or, the above-mentioned modules are located in different processors in any combination.
[0089] The processor contains a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set to automatically determine the flight route of the drone by adjusting the kernel parameters.
[0090] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0091] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned drone route determination method for power inspection.
[0092] Specifically, the method for determining the route of a drone for power inspection includes:
[0093] Step S201, acquiring image data of a power transmission line, and determining a flight area of the UAV according to the image data, wherein the image data is an image of a plurality of power equipment in the power transmission line;
[0094] Step S202, determining the flight starting point, flight end point and obstacle point of the UAV according to the flight area, determining a route constraint model of the UAV at least according to the flight starting point, the flight end point and the obstacle point, and determining a plurality of initial routes according to the route constraint model, wherein the route constraint model is used to determine all routes of the UAV that meet constraint conditions, and the constraint conditions are determined at least by the flight starting point, the flight end point and the obstacle point;
[0095] Step S203, determining a flight stability function and a flight duration function of each of the initial routes, and determining a route constraint model optimization function according to the flight stability function and the flight duration function, wherein the flight stability function is a function that characterizes the stability of the initial routes, the flight duration function is a function that characterizes the flight duration of the initial routes, and the route constraint model optimization function is a function that optimizes the route constraint model according to the stability and the flight duration;
[0096] Step S204: using a particle swarm algorithm to solve the optimization function of the route constraint model, thereby determining the optimal route of the UAV.
[0097] An embodiment of the present invention provides an electronic device, including a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, at least the following steps are implemented:
[0098] Step S201, acquiring image data of a power transmission line, and determining a flight area of the UAV according to the image data, wherein the image data is an image of a plurality of power equipment in the power transmission line;
[0099] Step S202, determining the flight starting point, flight end point and obstacle point of the UAV according to the flight area, determining a route constraint model of the UAV at least according to the flight starting point, the flight end point and the obstacle point, and determining a plurality of initial routes according to the route constraint model, wherein the route constraint model is used to determine all routes of the UAV that meet constraint conditions, and the constraint conditions are determined at least by the flight starting point, the flight end point and the obstacle point;
[0100] Step S203, determining a flight stability function and a flight duration function of each of the initial routes, and determining a route constraint model optimization function according to the flight stability function and the flight duration function, wherein the flight stability function is a function that characterizes the stability of the initial routes, the flight duration function is a function that characterizes the flight duration of the initial routes, and the route constraint model optimization function is a function that optimizes the route constraint model according to the stability and the flight duration;
[0101] Step S204: using a particle swarm algorithm to solve the optimization function of the route constraint model, thereby determining the optimal route of the UAV.
[0102] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0103] The present application also provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the above method in each embodiment of the present application are implemented:
[0104] Step S201, acquiring image data of a power transmission line, and determining a flight area of the UAV according to the image data, wherein the image data is an image of a plurality of power equipment in the power transmission line;
[0105] Step S202, determining the flight starting point, flight end point and obstacle point of the UAV according to the flight area, determining a route constraint model of the UAV at least according to the flight starting point, the flight end point and the obstacle point, and determining a plurality of initial routes according to the route constraint model, wherein the route constraint model is used to determine all routes of the UAV that meet constraint conditions, and the constraint conditions are determined at least by the flight starting point, the flight end point and the obstacle point;
[0106] Step S203, determining a flight stability function and a flight duration function of each of the initial routes, and determining a route constraint model optimization function according to the flight stability function and the flight duration function, wherein the flight stability function is a function that characterizes the stability of the initial routes, the flight duration function is a function that characterizes the flight duration of the initial routes, and the route constraint model optimization function is a function that optimizes the route constraint model according to the stability and the flight duration;
[0107] Step S204: using a particle swarm algorithm to solve the optimization function of the route constraint model, thereby determining the optimal route of the UAV.
[0108] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0109] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0110] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0111] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0112] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0113] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0114] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0115] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0116] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0117] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0118] 1) In the method for determining the route of a UAV for power inspection of the present application, image data of the transmission line is obtained, the flight area of the UAV is determined according to the image data, the flight starting point, flight end point and obstacle point of the UAV are determined according to the flight area, the route constraint model of the UAV is determined at least according to the flight starting point, flight end point and obstacle point, and multiple initial routes are determined according to the route constraint model, the flight stability function and flight duration function of each initial route are determined, and the route constraint model optimization function is determined according to the flight stability function and the flight duration function, and the route constraint model optimization function is solved by using a particle swarm algorithm to solve the route constraint model optimization function, so as to determine the optimal route of the UAV. Compared with the method in the prior art that the route planning of the UAV requires manual participation and is inefficient, the present application can automatically determine the optimal inspection route of the UAV. Therefore, it can solve the problem of low efficiency caused by the need for manual participation in the route planning of the UAV flight in the prior art, and achieve the effect of efficiently and unmannedly formulating the flight route during the UAV inspection process.
[0119] 2) In the drone route determination device for power inspection of the present application, image data of the transmission line is obtained, the flight area of the drone is determined according to the image data, the flight starting point, flight end point and obstacle point of the drone are determined according to the flight area, the route constraint model of the drone is determined at least according to the flight starting point, flight end point and obstacle point, and multiple initial routes are determined according to the route constraint model, the flight stability function and flight duration function of each initial route are determined, and the route constraint model optimization function is determined according to the flight stability function and the flight duration function, and the route constraint model optimization function is solved by using a particle swarm algorithm to solve the route constraint model optimization function, so as to determine the optimal route of the drone. Compared with the device in the prior art that the drone route planning requires manual participation and is inefficient, the present application can automatically determine the optimal inspection route of the drone. Therefore, it can solve the problem of low efficiency caused by the need for manual participation in the route planning of drone flights in the prior art, and achieve the effect of efficiently and unmannedly formulating the flight route during the drone inspection process.
[0120] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for determining a UAV route for power inspection, characterized in that: include: Acquire image data of a power transmission line, and determine a flight area of the UAV according to the image data, wherein the image data is an image of a plurality of power devices in the power transmission line; Determining a flight starting point, a flight end point, and an obstacle point of the UAV according to the flight area, determining a route constraint model of the UAV at least according to the flight starting point, the flight end point, and the obstacle point, and determining a plurality of initial routes according to the route constraint model, wherein the route constraint model is used to determine all routes of the UAV that meet constraint conditions, and the constraint conditions are determined at least by the flight starting point, the flight end point, and the obstacle point; Determine a flight stability function and a flight duration function of each of the initial routes, and determine a route constraint model optimization function according to the flight stability function and the flight duration function, wherein the flight stability function is a function that characterizes the stability of the initial route, the flight duration function is a function that characterizes the flight duration of the initial route, and the route constraint model optimization function is a function that optimizes the route constraint model according to the stability and the flight duration; A particle swarm algorithm is used to solve the optimization function of the route constraint model, so as to determine the optimal route of the UAV; Determining a route constraint model of the UAV at least according to the flight starting point, the flight end point and the obstacle point includes: Obtaining a flight speed constraint and a flight distance of the UAV, and determining an energy consumption constraint according to the flight speed constraint and the flight distance; The route constraint model of the UAV is determined according to the flight starting point, the flight end point, the obstacle point and the energy consumption constraint condition: Among them, (x i ,y i , z i ) is the three-dimensional coordinate of the UAV, (x0, y0, z0) is the three-dimensional coordinate of the flight starting point, (x max ,y max , z max ) is the three-dimensional coordinate of the flight endpoint, (x p ,y p ) is the coordinate of the center of the obstacle point in the two-dimensional plane, r is the radius of the circular model established with the obstacle point as the center, l is the safety distance, v j is the flight speed of the UAV in the jth route, v min is the minimum speed of the UAV, v max is the maximum speed of the UAV, s j is the length of the route described in the jth segment, and d is the flight distance; The particle swarm algorithm is used to solve the optimization function of the route constraint model, including: The first step is to determine: according to the formula Determine the tracking capability of individual particle extreme values and the tracking capability of population particle extreme values, where c1 represents the tracking capability of the individual particle extreme value, c2 represents the tracking capability of the population particle extreme value, and c a and c b Both represent constants with a value range of (0, 4). represents the current extreme value of the t-th iteration population particle, represents the current extreme value of the individual particle of the t-th iteration, and the optimal route is composed of the individual particle and the population particle; The second determination step: determining the historical extreme value of the individual particle according to the tracking capability of the extreme value of the individual particle, and determining the current extreme value of the population particle according to the tracking capability of the extreme value of the population particle.
2. The method for determining a drone route according to claim 1, characterized in that: Determining a flight stability function and a flight duration function of each of the initial routes, and determining a route constraint model optimization function according to the flight stability function and the flight duration function, including: Determine the flight stability function as f1=∑ j α j , where α j represents the turning angle of the route described in segment j; Determine the flight time function as f2=∑ j x j , where x j represents the flight duration of the route described in segment j; Obtain the first weight coefficient and the second weight coefficient, and determine the route constraint model optimization function as f=λ1∑ j α j +λ2∑ j x j , wherein λ1 represents the first weight coefficient, the first weight coefficient represents the weight of the steering angle, λ2 represents the second weight coefficient, the second weight coefficient represents the weight of the flight duration, and both λ1 and λ2 are real numbers in [0,1].
3. The method for determining a drone route according to claim 1, characterized in that: Determining the flight area of the drone according to the image data includes: Performing image edge enhancement processing on the image data to obtain the image data after edge processing; An area where a plurality of the electric power devices are located in the image data after the edge processing is determined as the flight area.
4. The method for determining a drone route according to claim 1, characterized in that: After determining the optimal route of the drone, the method further includes: Interpolation processing step: performing spline interpolation processing on the optimal route to obtain a smooth optimal route; Verification step: verifying the smoothed optimal route using the route constraint model and the route constraint model optimization function; If the verification is successful, the UAV is controlled to perform inspection along the smooth optimal route; if the verification is unsuccessful, the interpolation processing step and the verification step are repeatedly executed until the verification is successful.
5. The method for determining a drone route according to claim 1, characterized in that: After determining the current extreme value of the population particles, the method further includes: According to the formula and formula Update the particle's velocity and position, represents the velocity of the kth particle in the t+1th iteration, w represents the inertia weight coefficient, represents the velocity of the kth particle in the tth iteration, r1 and r2 both represent random numbers between (0, 1), represents the value of the kth particle in the tth iteration, gbest represents the value of the population particle, represents the position of the kth particle in the tth iteration, represents the position of the kth particle in the t+1th iteration; When the updated speed and position of the particle meet the iteration exit condition, the iteration is exited to obtain the particle group corresponding to the optimal route; when the updated speed and position of the particle do not meet the iteration exit condition, the first determination step, the second determination step and the updating step are repeatedly performed until the iteration exit condition is met.
6. A drone route determination device for power inspection, characterized in that: include: A first determining unit is used to obtain image data of a power transmission line, and determine a flight area of the UAV according to the image data, wherein the image data is an image of a plurality of power devices in the power transmission line; a second determining unit, configured to determine a flight starting point, a flight end point, and an obstacle point of the UAV according to the flight area, determine a route constraint model of the UAV at least according to the flight starting point, the flight end point, and the obstacle point, and determine a plurality of initial routes according to the route constraint model, wherein the route constraint model is used to determine all routes of the UAV that meet constraint conditions, and the constraint conditions are determined at least by the flight starting point, the flight end point, and the obstacle point; a third determining unit, configured to determine a flight stability function and a flight duration function of each of the initial routes, and determine a route constraint model optimization function according to the flight stability function and the flight duration function, wherein the flight stability function is a function characterizing the stability of the initial route, the flight duration function is a function characterizing the flight duration of the initial route, and the route constraint model optimization function is a function for optimizing the route constraint model according to the stability and the flight duration; A fourth determination unit, configured to solve the optimization function of the route constraint model by using a particle swarm algorithm, so as to determine the optimal route of the UAV; The second determining unit includes: A first determination module is used to obtain a flight speed constraint and a flight distance of the UAV, and determine an energy consumption constraint according to the flight speed constraint and the flight distance; The second determination module is used to determine the route constraint model of the UAV according to the flight starting point, the flight end point, the obstacle point and the energy consumption constraint condition: Among them, (x i ,y i , z i ) is the three-dimensional coordinate of the UAV, (x0, y0, z0) is the three-dimensional coordinate of the flight starting point, (x max ,y max , z max ) is the three-dimensional coordinate of the flight endpoint, (x p ,y p ) is the coordinate of the center of the obstacle point in the two-dimensional plane, r is the radius of the circular model established with the obstacle point as the center, l is the safety distance, v j is the flight speed of the UAV in the jth route, v min is the minimum speed of the UAV, v max is the maximum speed of the UAV, s j is the length of the route described in the jth segment, and d is the flight distance; The fourth determining unit includes: The seventh determination module is used to perform the first determination step: according to the formula Determine the tracking capability of individual particle extreme values and the tracking capability of population particle extreme values, where c1 represents the tracking capability of the individual particle extreme value, c2 represents the tracking capability of the population particle extreme value, and c a and c b Both represent constants with a value range of (0, 4). represents the current extreme value of the t-th iteration population particle, represents the current extreme value of the individual particle of the t-th iteration, and the optimal route is composed of the individual particle and the population particle; The eighth determination module is used to perform the second determination step: determine the historical extreme value of the individual particle according to the tracking capability of the extreme value of the individual particle, and determine the current extreme value of the population particle according to the tracking capability of the extreme value of the population particle.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for determining a UAV route for power inspection according to any one of claims 1 to 5.
8. An electronic device, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing a UAV route determination method for power inspection as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Power transmission line unmanned aerial vehicle nest inspection route planning method and system
CN116225074A
Unmanned aerial vehicle path planning method and device for forest fire control and fire prevention system
CN116736887A
Unmanned aerial vehicle flight path planning method and system based on improved particle swarm optimization
CN116954239A
Unmanned aerial vehicle three-dimensional path planning method based on improved symbiotic particle swarm optimization
CN117193004A
Unmanned aerial vehicle inspection method based on electric power inspection scene
CN117647993A
