Unmanned aerial vehicle flight control method and device for power overhead line and product
By obtaining the three-dimensional coordinates of the drone's take-off position and power line, and calculating and switching path modes, the problem of low safety in UAV flight control under complex power line distribution is solved, achieving higher safety and stability.
Patent Information
- Application Number
- CN202510566412.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-08-05
AI Technical Summary
In the prior art, when combining line-of-sight navigation and sliding mode control, when dealing with complex power line distribution scenarios, there is a problem of low safety in the flight control of drones, especially when multiple power lines are parallel, it is easy to cause path intersections and increase collision risk.
By obtaining the drone's takeoff position and its discrete three-dimensional coordinates of the two corresponding power lines, the first expected path and the second expected path are calculated, and the path tracking mode is dynamically switched according to the takeoff position relationship, ensuring that the drone flies along the first expected path inside the power line and gradually approaches along the second expected path outside until the preset conditions are met, switch back to the first expected path.
It improves the safety of drone flight control, reduces the probability of collision with power lines, and achieves more stable path tracking.
Smart Images

Figure CN120428754A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of power grid operation and maintenance integration technology, and in particular to a method, device and product for controlling the flight of an unmanned aerial vehicle (UAV) for overhead power lines. Background Art
[0002] Traditional power grid inspections rely primarily on manual climbing, visual inspections, or the assistance of low-altitude aircraft. With the expansion of power grids and the increasing complexity of power equipment, drone technology is increasingly being applied to power grid inspections. Drones can be used to inspect power lines at high altitudes, improving efficiency.
[0003] Existing power line inspection control technology combines line-of-sight navigation and sliding mode control to enable drone inspection path tracking, improving the autonomy and stability of drone inspections. Line-of-sight navigation is used for path planning, while sliding mode control is used to adjust the drone's controller to ensure stable tracking along the planned path.
[0004] Because the combination of line-of-sight navigation and sliding mode control in the existing technology may result in the planned path intersecting with the power lines when dealing with complex power line distribution scenarios, the existing technology has a technical problem of low drone flight control safety. Summary of the Invention
[0005] The embodiments of the present application provide a method, device, and product for controlling the flight of a UAV over overhead power lines, so as to achieve the technical effect of improving the safety of UAV flight control.
[0006] In a first aspect, an embodiment of the present application provides a method for controlling the flight of a UAV for overhead power lines, comprising:
[0007] Obtain the take-off position of the UAV and the discrete three-dimensional coordinates of the two power lines corresponding to the take-off position;
[0008] Path calculation is performed based on the discrete three-dimensional coordinates of the two power lines to obtain the first expected path of the UAV;
[0009] When the take-off position is located inside the two power lines, controlling the UAV to perform path tracking along a first desired path;
[0010] When the take-off position is outside the two power lines, a path calculation is performed based on the discrete three-dimensional coordinates of the power line on the side adjacent to the take-off position to obtain a second desired path; the UAV is controlled to perform path tracking along the second desired path, and when the real-time flight coordinates of the UAV meet preset conditions, the UAV is controlled to perform path tracking along the first desired path.
[0011] In one possible implementation, controlling the drone to perform path tracking along the second desired path, and when the real-time flight coordinates of the drone meet a preset condition, controlling the drone to perform path tracking along the first desired path includes:
[0012] Controlling the UAV to perform path tracking along the second desired path and obtaining the real-time flight coordinates of the UAV;
[0013] When the spatial distance between the real-time flight coordinates of the UAV and the first expected path is less than a first preset threshold, the UAV is controlled to perform path tracking along the first expected path.
[0014] In one possible implementation, the method further includes:
[0015] When the spatial distance between the real-time flight coordinates of the drone and the power line on the adjacent side is less than a second preset threshold, the drone is controlled to adjust its altitude until the spatial distance between the drone and the power line on the adjacent side is greater than or equal to the second preset threshold.
[0016] In one possible implementation, controlling the UAV to perform path tracking along a first desired path includes:
[0017] Determining a target path point corresponding to the drone in the first desired path based on the drone's flight coordinates, wherein the drone's flight coordinates refer to the drone's takeoff position or the drone's real-time flight coordinates;
[0018] The three-dimensional coordinates of the target path point of the UAV's flight coordinates are calculated to obtain the desired heading angle and desired altitude of the UAV;
[0019] Generate the drone's underlying execution instructions based on the desired heading angle, desired altitude, flight coordinates, and the drone's current heading angle;
[0020] Control the drone to the target path point based on the drone's underlying execution instructions;
[0021] Among them, the drone's underlying execution instructions include the drone's driving thrust or torque in different directions.
[0022] In one possible implementation, generating a low-level execution instruction for the drone based on the desired heading angle, the desired altitude, the flight coordinates, and the current heading angle of the drone includes:
[0023] Based on the desired heading angle, the desired altitude, the flight coordinates, the three-dimensional coordinates of the target path point, and the current heading angle of the drone, multiple errors of the drone are calculated; wherein the multiple errors include: altitude error, heading error, and plane error;
[0024] For each error, the error change rate corresponding to the error is calculated. Based on the error and its corresponding error change rate, an inverse tangent sliding mode control calculation is performed to obtain the sliding mode surface corresponding to each error. The error change rate refers to the velocity change difference corresponding to each error, and the velocity change difference refers to any one of the heading angular velocity change difference, the altitude velocity change difference, and the plane velocity change difference.
[0025] The control input is calculated based on the sliding surface corresponding to each error to obtain the driving thrust or torque corresponding to each error;
[0026] Based on the driving thrust or torque corresponding to each error, the drone's underlying execution instructions are generated; among them, the inverse tangent sliding mode control calculation refers to processing each error based on the inverse tangent function, and obtaining the sliding mode surface corresponding to each error through sliding mode control calculation.
[0027] In one possible implementation, performing path calculation based on the discrete three-dimensional coordinates of the two power lines to obtain a first desired path of the UAV includes:
[0028] generating two three-dimensional coordinate data sets based on the discrete three-dimensional coordinates of the two power lines;
[0029] An intermediate value calculation is performed on the two three-dimensional coordinate data sets to obtain a first expected path.
[0030] In a second aspect, an embodiment of the present application provides a UAV flight control device for overhead power lines, comprising:
[0031] An acquisition module obtains the take-off position of the UAV and the discrete three-dimensional coordinates of the two power lines corresponding to the take-off position;
[0032] A first processing module is configured to perform path calculation based on the discrete three-dimensional coordinates of the two power lines to obtain a first desired path of the UAV;
[0033] a second processing module, configured to control the UAV to perform path tracking along a first desired path when the take-off position is located inside the two power lines;
[0034] The third processing module is used to calculate the path based on the discrete three-dimensional coordinates of the power line on the side adjacent to the take-off position when the take-off position is outside the two power lines to obtain a second expected path; control the UAV to track the path along the second expected path, and control the UAV to track the path along the first expected path when the real-time flight coordinates of the UAV meet preset conditions.
[0035] In a possible implementation, the third processing module is further configured to:
[0036] Controlling the UAV to perform path tracking along the second desired path and obtaining the real-time flight coordinates of the UAV;
[0037] When the spatial distance between the real-time flight coordinates of the UAV and the first expected path is less than a first preset threshold, the UAV is controlled to perform path tracking along the first expected path.
[0038] In a possible implementation, the third processing module is further configured to:
[0039] When the spatial distance between the real-time flight coordinates of the drone and the power line on the adjacent side is less than a second preset threshold, the drone is controlled to adjust its altitude until the spatial distance between the drone and the power line on the adjacent side is greater than or equal to the second preset threshold.
[0040] In a possible implementation, the second processing module is further configured to:
[0041] Determining a target path point corresponding to the drone in the first desired path based on the drone's flight coordinates, wherein the drone's flight coordinates refer to the drone's takeoff position or the drone's real-time flight coordinates;
[0042] The three-dimensional coordinates of the target path point of the UAV's flight coordinates are calculated to obtain the desired heading angle and desired altitude of the UAV;
[0043] Generate the drone's underlying execution instructions based on the desired heading angle, desired altitude, flight coordinates, and the drone's current heading angle;
[0044] Control the drone to the target path point based on the drone's underlying execution instructions;
[0045] Among them, the drone's underlying execution instructions include the drone's driving thrust or torque in different directions.
[0046] In a possible implementation, the second processing module is further configured to:
[0047] Based on the desired heading angle, the desired altitude, the flight coordinates, the three-dimensional coordinates of the target path point, and the current heading angle of the drone, multiple errors of the drone are calculated; wherein the multiple errors include: altitude error, heading error, and plane error;
[0048] For each error, the error change rate corresponding to the error is calculated. Based on the error and its corresponding error change rate, an inverse tangent sliding mode control calculation is performed to obtain the sliding mode surface corresponding to each error. The error change rate refers to the velocity change difference corresponding to each error, and the velocity change difference refers to any one of the heading angular velocity change difference, the altitude velocity change difference, and the plane velocity change difference.
[0049] The control input is calculated based on the sliding surface corresponding to each error to obtain the driving thrust or torque corresponding to each error;
[0050] Based on the driving thrust or torque corresponding to each error, the drone's underlying execution instructions are generated; among them, the inverse tangent sliding mode control calculation refers to processing each error based on the inverse tangent function, and obtaining the sliding mode surface corresponding to each error through sliding mode control calculation.
[0051] In a possible implementation, the first processing module is further configured to:
[0052] generating two three-dimensional coordinate data sets based on the discrete three-dimensional coordinates of the two power lines;
[0053] An intermediate value calculation is performed on the two three-dimensional coordinate data sets to obtain a first expected path.
[0054] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor;
[0055] Memory stores computer-executable instructions;
[0056] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and various possible implementations of the first aspect.
[0057] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the above-mentioned first aspect and various possible implementation methods of the first aspect.
[0058] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and various possible implementation methods of the first aspect.
[0059] The present invention provides a method, device, and product for controlling a drone's flight over overhead power lines. The method obtains the drone's takeoff position and the discrete three-dimensional coordinates of the two power lines corresponding to the takeoff position, and then calculates the discrete three-dimensional coordinates of the two power lines to obtain a first desired path for the drone. The method then determines the positional relationship between the drone and the two power lines based on the drone's takeoff position. When the drone is inside the two power lines, the drone is controlled to track the first desired path. When the drone is outside the two power lines, an intermediate path, i.e., a second desired path, is calculated based on the power line adjacent to the drone's takeoff position. The drone is controlled to gradually approach the inside of the two power lines along the second desired path until the drone's real-time flight coordinates meet preset conditions, at which point the drone is controlled to track the first desired path. Compared to the prior art, the present invention dynamically switches the drone's path tracking mode based on the positional relationship between the drone's takeoff position and the power lines, achieving path selection and switching, thereby reducing the probability of collision between the drone's path and the power lines and achieving the technical effect of improving the safety of drone flight control. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0061] Figure 1 Schematic diagram of the process of the UAV flight control method for power overhead lines provided in this application Figure 1 ;
[0062] Figure 2 Schematic diagram of the process of the UAV flight control method for power overhead lines provided in this application Figure 2 ;
[0063] Figure 3 Schematic diagram of the process of the UAV flight control method for power overhead lines provided in this application Figure 3 ;
[0064] Figure 4 A schematic diagram of the structure of the UAV flight control system for overhead power lines provided in this application;
[0065] Figure 5 A schematic diagram of mathematical fitting of power lines provided in an embodiment of the present application;
[0066] Figure 6 Schematic diagram of the change of the drone's trajectory provided in the embodiment of this application Figure 1 ;
[0067] Figure 7 Schematic diagram of the change of the drone's trajectory provided in the embodiment of this application Figure 2 ;
[0068] Figure 8 A schematic diagram of the structure of the UAV flight control device for overhead power lines provided in this application;
[0069] Figure 9 This is a schematic diagram of the structure of the electronic device provided in this application.
[0070] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0071] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0072] In the existing technology, when using drones to conduct power inspections on power grids, the drones collect environmental data and power line distribution data; use line-of-sight navigation combined with environmental data and power line distribution data to perform path planning, thereby determining the desired driving path of the drone; and simultaneously use sliding mode control to dynamically adjust the torque of the drone in various directions, so that the drone can stably track the path along the desired planned path.
[0073] However, due to the complex distribution of overhead power lines in the power grid and the existence of multiple power lines running in parallel, when using line-of-sight navigation combined with sliding mode control to handle complex scenarios with multiple lines running in parallel, there will be situations where paths and power lines intersect with each other, causing drones to collide with power lines. This leads to a technical problem of low safety in drone flight control in the existing technology.
[0074] To address the above technical issues, the present application proposes the following technical concept: utilizing the relative positional relationship between a drone's takeoff position and power lines to calculate and switch desired paths. Specifically, the discrete three-dimensional coordinates of the drone's takeoff position and the two power lines corresponding to the takeoff position are obtained, and the discrete three-dimensional coordinates of the two power lines are fitted to calculate a first desired path for the drone; the first desired path serves as the ideal path for the drone's path tracking. The positional relationship between the drone and the two power lines is determined based on the drone's takeoff position. When the drone is inside the two power lines, the drone is controlled to track the first desired path. When the drone is outside the two power lines, an intermediate path, i.e., a second desired path, is calculated based on the power line adjacent to the drone's takeoff position. The drone is controlled to gradually approach the inside of the two power lines along the second desired path. While the drone is tracking the second desired path, real-time flight coordinates are continuously collected. The relationship between the real-time flight coordinates and the first desired path is used to determine whether the real-time flight coordinates meet preset conditions. If the real-time flight coordinates meet the preset conditions, the drone can be controlled to track the first desired path. Compared with the existing technology, this application selects and switches paths based on the take-off position of the drone and the real-time flight coordinates of the drone, thereby reducing the probability of collision between the drone's driving path and power lines, and achieving the technical effect of improving the safety of drone flight control.
[0075] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0076] Figure 1 Schematic diagram of the process of the UAV flight control method for power overhead lines provided in this application Figure 1 ,like Figure 1 As shown, the method includes:
[0077] S101: Obtain the take-off position of the UAV and the discrete three-dimensional coordinates of two power lines corresponding to the take-off position.
[0078] In this step, the method of obtaining the take-off position of the drone can be: linking the drone base station and the ground reference station through Real-Time Kinematic (RTK) to accurately locate the take-off position of the drone.
[0079] Exemplarily, the method for obtaining the take-off position of the drone can be: before the drone takes off, the RTK module on board the drone receives the base station signal sent by the RTK module of the ground base station, and determines the coordinates of the take-off position based on the coordinates of the ground base station and the received base station signal.
[0080] In this step, the discrete three-dimensional coordinates of the two power lines corresponding to the take-off position may be obtained by:
[0081] S1011. Before the drone takes off, the take-off position of the drone is determined, and the geographic information data corresponding to the power grid where the drone is located is called to obtain the positions of multiple towers in the power grid and the directions of the lines between the towers.
[0082] S1012: Align the take-off position of the UAV with the coordinates of the tower in the geographic information data of the power grid, determine the tower associated with the target line of the UAV, and determine the relative position between the UAV and the target line based on the coordinates of the tower.
[0083] S1013. Determine the discrete three-dimensional coordinates of the target line based on the geographic information data of the power grid, or obtain the discrete three-dimensional coordinates of the target line through laser radar detection.
[0084] Optionally, the method of obtaining discrete three-dimensional coordinates also includes: determining the two towers connected to the target line, determining the distance between the towers, the coordinates of the two towers, and the coordinates of the lowest point of the target line based on the geographic information data of the power grid, using the inverse tangent cosine function to mathematically model the target line to obtain a mathematical model that can represent the three-dimensional coordinates of the target line, and sampling the mathematical model through periodic sampling to obtain the discrete three-dimensional coordinates of the target line.
[0085] S102: Perform path calculation based on the discrete three-dimensional coordinates of the two power lines to obtain a first expected path for the UAV.
[0086] Optionally, a possible implementation of obtaining the first expected path through set calculation is:
[0087] S1021. Generate two three-dimensional coordinate data sets based on the discrete three-dimensional coordinates of the two power lines.
[0088] In this step, the discrete three-dimensional coordinates of each power line refer to a plurality of three-dimensional coordinates constituting the power line, and the lengths of the two three-dimensional coordinate data sets generated based on the discrete three-dimensional coordinates are consistent.
[0089] Exemplarily, a possible implementation method of generating two three-dimensional coordinate data sets based on the discrete three-dimensional coordinates of two power lines is as follows:
[0090] a1. Determine two initial coordinate data sets based on the discrete three-dimensional coordinates of the two power lines.
[0091] a2. Perform cubic spline interpolation processing on the two initial coordinate data sets to obtain a continuous parameterized curve corresponding to each power line.
[0092] In this step, cubic spline interpolation is a piecewise polynomial interpolation method used to generate a smooth curve through a set of discrete data points. Its core concept is to divide the entire dataset into multiple intervals and fit a cubic polynomial function within each interval, while ensuring that the function values, first-order derivatives, and second-order derivatives of adjacent polynomials are continuous at the connection points, thereby achieving overall smoothness.
[0093] a3. Based on the sizes of the two initial coordinate data sets, obtain the number of target points.
[0094] In this step, the number of target points refers to the total number of coordinates corresponding to the coordinate dataset with more coordinates in the two initial coordinate datasets.
[0095] a4. Resample and align the coordinates of two continuous parameterized curves based on the target number of points to obtain two three-dimensional coordinate data sets.
[0096] S1022: Perform intermediate value calculation on the two three-dimensional coordinate data sets to obtain a first expected path.
[0097] In this step, the intermediate value may be calculated by averaging. To ensure the smoothness of the first desired path, the path smoothing process may be performed using the heading angle change and the pitch angle change between adjacent points.
[0098] Exemplarily, the path smoothing process may be:
[0099] The three-dimensional coordinate datasets corresponding to the two power lines are: the first dataset: [(0,0,50), (10,0,51), (20,0,50.5), (30,0,49.8), (40,0,50.2)]; the second dataset: [(0,10,50), (10,10,50.8), (20,10,50.3), (30,10,50), (40,10,50.1)]. The safety height offset is 1, and the third dataset of the middle path obtained by averaging is: [(0,5,50.5), (10,5,51.4), (20,5,51.4), (30,5,50.9), (40,5,51.15)].
[0100] The heading angles between adjacent points in the intermediate path are calculated using Formula 1:
[0101] θ i=atan2(y i+1 -y i ,x i+1 -x i )Formula 1
[0102] Wherein, the heading angle θ i Indicates changes in the horizontal direction, where x and y refer to the coordinate values of the horizontal coordinate axis respectively.
[0103] Use Formula 2 to calculate the pitch angle between adjacent points on the intermediate path:
[0104]
[0105] in, Refers to the change in the vertical direction, and x, y, and z refer to the coordinate values corresponding to the three-dimensional coordinate axes respectively.
[0106] Interpolate the calculated heading angle and pitch angle.
[0107] The preset constant speed of the drone is v. The heading angle and pitch angle after difference calculation are used to perform angle integration calculation to obtain the path coordinates after smoothing, as shown in Formula 3:
[0108]
[0109] Where t refers to the tth coordinate, x, y, z are the calculated path coordinates, x0, y0, z0 are the preset initial coordinate values, and θ(t) is the heading angle after interpolation processing. is the pitch angle after interpolation.
[0110] The first expected path is obtained by combining the calculated multiple path coordinates.
[0111] S103: When the take-off position is located inside the two power lines, control the UAV to perform path tracking along the first expected path.
[0112] In this step, the method of controlling the UAV to track the path along the first expected path can be: according to the current flight coordinates of the UAV and the three-dimensional coordinates corresponding to the target path point of the UAV, the movement values of the UAV in various directions in the three-dimensional coordinate system and the heading change of the UAV are calculated; according to the heading change and the movement values in multiple directions, the underlying execution instructions for controlling the driving of the UAV are generated, and based on the underlying execution instructions, the UAV is controlled to track the path along the first expected path.
[0113] It should be noted that the specific implementation process of informing the UAV to follow the first desired path in this step is as follows: Figure 2Further explanation is given in the embodiment shown and no redundant description is given here.
[0114] S104. When the take-off position is outside the two power lines, a path calculation is performed based on the discrete three-dimensional coordinates of the power line on the side adjacent to the take-off position to obtain a second desired path; the UAV is controlled to perform path tracking along the second desired path, and when the real-time flight coordinates of the UAV meet preset conditions, the UAV is controlled to perform path tracking along the first desired path.
[0115] In this step, the path calculation method based on the discrete three-dimensional coordinates of the power line on the side adjacent to the take-off position of the UAV can refer to the path smoothing processing method in step S1022.
[0116] Exemplarily, the second expected path can also be calculated as follows: according to the discrete three-dimensional coordinates of the power lines, a safety distance limit is added in height to limit the flight height of the drone, and the plane coordinate value gradually approaches the discrete three-dimensional coordinate on the plane, thereby continuously approaching the inner side of the two power lines.
[0117] Optionally, when the real-time flight coordinates of the UAV meet a preset condition, a possible implementation method of controlling the UAV to switch from the second desired path to the first desired path is:
[0118] S1041: Control the UAV to perform path tracking along the second desired path, and obtain the real-time flight coordinates of the UAV.
[0119] In this step, the real-time flight coordinates of the drone can be obtained by:
[0120] b1. Obtain the three-dimensional coordinates of the drone based on the RTK module carried by the drone, or obtain the three-dimensional coordinates of the drone based on the lidar device carried by the drone.
[0121] b2. Obtain the coordinate system parameters of the power grid where the UAV is located.
[0122] b3. Convert the three-dimensional coordinates according to the coordinate system parameters of the power grid to obtain the real-time flight coordinates of the UAV.
[0123] Optionally, the process of controlling the UAV to track the second desired path also includes safety monitoring between the UAV and the power line, specifically:
[0124] When the spatial distance between the real-time flight coordinates of the drone and the power line on the adjacent side is less than a second preset threshold, the drone is controlled to adjust its altitude until the spatial distance between the drone and the power line on the adjacent side is greater than or equal to the second preset threshold.
[0125] In this step, the spatial distance between the drone and the power line refers to the shortest distance between the drone and the power line.
[0126] For example, based on the real-time flight coordinates of the UAV and the discrete three-dimensional coordinates of the power line, the shortest distance from the UAV to the power line is calculated. The specific calculation method may be:
[0127] c1. Segment the discrete 3D coordinates of the power line, calculate the vertical distance from the UAV's real-time flight coordinates to each segment, and use the minimum vertical distance as the spatial distance between the UAV and the power line.
[0128] c2. The second preset threshold is set to 0.5 meters. When the spatial distance is less than 0.5 meters, the drone is controlled to rise vertically until the spatial distance is greater than or equal to 0.5 meters.
[0129] S1042: When the spatial distance between the real-time flight coordinates of the UAV and the first expected path is less than a first preset threshold, control the UAV to perform path tracking along the first expected path.
[0130] In this step, the first expected path refers to the high-priority path of the drone when inspecting the power lines in the power grid, and the second expected path refers to the transition path before the drone reaches the high-priority path.
[0131] Exemplarily, the first preset threshold is set to 3 meters. When the spatial distance between the real-time flight coordinates of the UAV and the first expected path is less than 3 meters, the tracking path of the UAV is switched to the first expected path, and the UAV is controlled to perform path tracking along the first expected path.
[0132] The present invention provides a method for controlling a drone flight over overhead power lines. The method obtains the discrete three-dimensional coordinates of the drone's takeoff position and the two power lines corresponding to the takeoff position, and then calculates a first desired path for the drone by fitting the discrete three-dimensional coordinates of the two power lines. The method determines the positional relationship between the drone and the two power lines based on the drone's takeoff position. When the drone is inside the two power lines, the drone is controlled to track the first desired path. When the drone is outside the two power lines, an intermediate path, i.e., a second desired path, is calculated based on the power line adjacent to the drone's takeoff position. The drone is controlled to gradually approach the inside of the two power lines along the second desired path until the drone's real-time flight coordinates meet preset conditions, at which point the drone is controlled to track the first desired path. Compared to the prior art, the present invention dynamically switches the drone's path tracking mode based on the positional relationship between the drone's takeoff position and the power lines, achieving path selection and switching, thereby reducing the probability of collision between the drone's travel path and the power lines, thereby achieving the technical effect of improving the safety of drone flight control.
[0133] Figure 2 Schematic diagram of the process of the UAV flight control method for power overhead lines provided in this application Figure 2 , in the above Figure 1 Based on the embodiment shown, this embodiment further explains how to control the UAV to track the first desired path in steps S103 and S104, as shown in FIG. Figure 2 As shown, the method includes:
[0134] S201: Determine a target path point corresponding to the UAV in a first desired path based on the flight coordinates of the UAV.
[0135] In this step, the flight coordinates of the drone refer to the take-off position of the drone or the real-time flight coordinates of the drone. The target path point refers to the path point in the first desired path and the next desired path point of the drone.
[0136] For example, the target path point can be selected by:
[0137] d1. Based on the flight coordinates of the UAV, determine the path point in the first expected path with the smallest spatial distance from the flight coordinates, and take the Nth point forward from this path point as the target path point, where N is a positive integer greater than 0.
[0138] In this step, the target path point refers to the next tracking point of the drone obtained using a fixed look-ahead approach.
[0139] Alternatively, a sphere is drawn with a preset radius using the flight coordinates of the drone as the new path, and the focus between the sphere and the first desired path is used as the target path point. The radius can be adjusted dynamically.
[0140] S202: Calculate the three-dimensional coordinates of the target path point based on the flight coordinates of the UAV to obtain the desired heading angle and desired altitude of the UAV.
[0141] In this step, the expected heading angle can be calculated using a four-quadrant inverse tangent function.
[0142] For example, the desired heading angle of the drone is calculated based on Formula 4:
[0143]
[0144] in, Refers to the calculated expected heading angle, which ranges from [-π, π], (x d ,y d ) is the plane coordinate of the target path point in the three-dimensional coordinates, and (x, y) is the plane coordinate of the UAV's flight coordinates.
[0145] It should be noted that when calculating the expected heading angle, it is necessary to determine whether the calculated expected heading angle needs to be normalized in combination with the current heading angle of the drone. If the difference between the current heading angle and the intersection is greater than π, the expected heading angle needs to be normalized to ensure that the expected heading angle is in the range of [-π, π].
[0146] The desired altitude needs to be calculated in combination with the altitude of the target waypoint and the altitude limit of the drone path tracking.
[0147] Specifically: when there is no height limit for the drone, the Z-axis coordinate value in the three-dimensional coordinates of the target path point is used as the expected height of the drone; when there is a height limit for the drone, the expected height of the drone is calculated based on the Z-axis coordinate value of the target path point and the height limit.
[0148] S203: Generate a low-level execution instruction for the UAV based on the expected heading angle, the expected altitude, the flight coordinates, and the current heading angle of the UAV.
[0149] In this step, the drone's underlying execution instructions include torque and / or thrust in multiple directions to control the drone's heading angle change, altitude change, and plane change, which are used to control the drone to fly to the target path point in combination with the control system or control motor within the drone.
[0150] It should be noted that the generation of the drone's underlying execution instructions in this step is as follows Figure 3 The embodiments are further described in detail and will not be repeated here.
[0151] S204: Control the drone to travel to the target path point based on the drone bottom layer execution instruction.
[0152] In this step, the underlying execution instructions of the drone include the driving thrust or torque of the drone in different directions.
[0153] For example, the method of controlling the drone to travel to the target path point may be:
[0154] e1. According to the yaw torque in the UAV's underlying execution command, adjust the UAV's tail rudder or differential thrust to achieve the UAV's yaw rotation, so that the UAV is adjusted from the current heading angle to the desired heading angle.
[0155] e2. Adjust the motor speed of the drone according to the plane torque or thrust in the drone's underlying execution instructions to push the drone to move toward the target path point.
[0156] e3. Adjust the vertical thrust of the drone according to the vertical thrust in the drone's underlying execution instructions to push the drone to the desired height.
[0157] In this embodiment, the expected heading angle and expected altitude of the drone are calculated based on the flight coordinates of the drone and the target path point of the drone, and the underlying execution instructions of the drone are determined in combination with the current heading angle of the drone, so that the path tracking control of the drone is realized through the underlying execution instructions, achieving the technical effect of controlling the stable flight of the drone with precision.
[0158] Figure 3 Schematic diagram of the process of the UAV flight control method for power overhead lines provided in this application Figure 3 , in the above Figure 2 Based on the embodiment shown, this embodiment further explains the generation of the drone bottom layer execution instruction in step S203, as shown in FIG. Figure 3 As shown, the method includes:
[0159] S301. Calculate multiple errors of the drone based on the desired heading angle, the desired altitude, the flight coordinates, the three-dimensional coordinates of the target path point, and the current heading angle of the drone.
[0160] In this step, the multiple errors include: altitude error, heading error, and plane error.
[0161] Optionally, a possible implementation method of calculating multiple errors of the drone is:
[0162] S3011. Calculate the difference between the Z-axis coordinate value in the flight coordinates and the desired height to obtain a height error.
[0163] S3012. Perform difference calculation based on the coordinate values corresponding to the plane coordinate system in the flight coordinates and the coordinate values corresponding to the plane coordinate system in the three-dimensional coordinates of the target path point to obtain a plane error.
[0164] S3013: Calculate the difference between the desired heading angle and the current heading angle of the drone to obtain a heading error.
[0165] S302 , calculating the error change rate corresponding to each error, performing inverse tangent sliding mode control calculation based on the error and its corresponding error change rate, and obtaining a sliding mode surface corresponding to each error.
[0166] In this step, the error change rate refers to the speed change difference corresponding to each error, and the speed change difference refers to any one of the heading angular velocity change difference, the altitude velocity change difference, and the plane velocity change difference; the inverse tangent sliding mode control calculation refers to processing each error based on the inverse tangent function and obtaining the sliding mode surface corresponding to each error through the sliding mode control calculation.
[0167] Optionally, a possible implementation method of calculating the sliding mode surface by inverse tangent sliding mode control is:
[0168] S3021. First, determine the control system model for the UAV's movement, as shown in Equation 5:
[0169]
[0170] where \(x = [x_1, x_2]\) T refers to the system state vector, \(f(x)\) is the expression of the system's non - linear relationship, \(d(t, x)\) is the external disturbance, \(t\) refers to the time change, and its magnitude has an upper limit \(\|d(t, x)\| \leq \gamma\), \(\tau_0\) is the control input of the system, \(b\) is the control input coefficient, \(x_1\) refers to the position or state variable of the system, such as: the altitude error, heading error, and planar error of the UAV; \(x_2\) refers to the speed of the system or the derivative of the state variable, such as: the change difference of the UAV's heading angular velocity, the change difference of the altitude speed, and the change difference of the planar speed; refers to the time derivative of \(x_1\), used to represent the rate of change of the speed or state variable; refers to the derivative of \(x_2\), which is the acceleration or the second - order derivative of the state variable.
[0171] S3022. Introduce the arctangent function into the sliding - mode control calculation, and the obtained arctangent sliding - mode surface is as shown in Equation 6:
[0172]
[0173] where \(s_0\) refers to the sliding - mode surface, \(\arctan\) refers to the arctangent function, which is used to replace \(x_1\) in the linear term, smooth the control input and suppress chattering; \(\beta\) is a positive number, adjusting the convergence speed of the sliding - mode surface; \(p\) and \(q\) are positive odd numbers, and satisfy \(1 < p / q < 2\), used to ensure non - singularity and finite - time convergence; introduce an auxiliary term to assist in calculating the convergence time, used to enhance the convergence when the error is large. \(x_1\) and \(x_2\) refer to the explanations in Equation 5.
[0174] S303. Calculate the control input based on the sliding - mode surface corresponding to each error, and obtain the driving thrust or torque corresponding to each error.
[0175] Optionally, the formula for calculating the control input is as shown in Equation 7:
[0176] \(\tau_0=-b\) -1 [f(x)+k_0s_0+(\mu_0+\gamma)\text{sgn}(s_0)
[0177]
[0178] Among them, \(k_0 > 0\) means that the convergence rate gain of the sliding surface is greater than 0; \(\mu_0 > 0\) means that the coefficient of the robust term is greater than 0, to counteract the disturbance \(d(t, x)\); \(\text{sgn}(\cdot)\) is the sign function, \(s_0\) is the sliding surface, \(\arctan\) is the arctangent function, \(\beta\) is a positive number, \(p\) and \(q\) are positive odd numbers, and satisfy \(1 < p / q < 2\). An auxiliary term is introduced to assist in calculating the convergence time, \(b\) is the control input coefficient, and the explanations of \(x_1\) and \(x_2\) refer to Formula 5. The control input is calculated using Formula 7 to obtain the driving thrust or torque corresponding to each error.
[0179] In this step, the derivative of Formula 6 in the above Step 302 is taken to obtain Formula 8:
[0180]
[0181] Among them, the explanations of each parameter in Formula 8 refer to Formulas 5 to 7 above. Because \(p / q > 1\), there are no singularities in the derivative process, so the designed arctangent sliding surface is non-singular. The control input is used as substituted into Formula 8 to obtain Formula 9:
[0182]
[0183] Among them, the explanations of each parameter in Formula 9 refer to Formulas 5 to 8 above.
[0184] Based on Formula 10, the stability of the control system model after substituting the control input is verified. The stability calculation formula refers to Formula 10:
[0185]
[0186] Among them, \(V\) refers to the Lyapunov function for stability verification, and the explanations of the remaining parameters are the same as those of the parameters in Formulas 5 - 10 above.
[0187] Since is greater than 0, and \(k_0\), \(\mu_0\) are greater than 0, it can be obtained that \(\dot{V}\) is less than or equal to 0, that is, the system converges to the sliding surface \(s_0 = 0\) in a finite time, and then converges to the equilibrium point \(x_1 = x_2 = 0\) along the sliding surface.
[0188] S304. Generate the underlying execution instructions for the UAV based on the driving thrust or torque corresponding to each error.
[0189] In this step, for the control torque of the heading angle, horizontal thrust, and altitude thrust corresponding to the error, it is necessary to convert them into the underlying instructions executed by the UAV to facilitate controlling the UAV to perform path tracking along the first desired path.
[0190] In this embodiment, the speed change and error of the drone are combined to calculate the driving thrust or torque required to control the change of the drone, thereby determining the underlying execution instructions, achieving the technical effect of improving the accuracy of instruction generation.
[0191] Figure 4 The schematic diagram of the structure of the UAV flight control system for power overhead lines provided in this application is as follows: Figure 4 As shown, the system includes: a power line mathematical fitting module 401, a dynamic line of sight navigation module 402, an inverse tangent sliding mode control module 403, and a UAV 404; the dynamic line of sight navigation module 402 and the inverse tangent sliding mode control module 403 constitute a path tracking controller;
[0192] The power line mathematical fitting module 401 is used to perform mathematical fitting on the power lines based on their positions in the power grid, and obtain discrete three-dimensional coordinates of the power lines after smoothing.
[0193] For example, Figure 5 This is a schematic diagram of mathematical fitting of power lines provided in an embodiment of the present application; Figure 5 As shown, the ordinate represents the position or height of the power line, the abscissa represents time, and the discrete three-dimensional coordinates of the power line after fitting processing are a smooth curve.
[0194] The dynamic line-of-sight navigation module 402 is used to obtain the discrete three-dimensional coordinates of the two power lines corresponding to the take-off position of the drone, and switch between the first desired path and the second desired path based on the positional relationship between the take-off position of the drone and the two power lines, that is, to generate navigation information for the drone.
[0195] For example, Figure 6 Schematic diagram of the change of the drone's trajectory provided in the embodiment of this application Figure 1 ;like Figure 6 As shown, when the take-off position of the UAV is within the two power lines, the first desired path of the UAV is located between the two power lines. The UAV is controlled to move from the current take-off position to the first desired path and perform path tracking along the first desired path. Figure 7 Schematic diagram of the change of the drone's trajectory provided in the embodiment of this application Figure 2 ;like Figure 7 As shown, when the take-off position of the UAV is outside the two power lines, the second expected path of the UAV is along the power line on the adjacent side, the UAV is controlled to take the second expected path from the current take-off position, and the path tracking is performed along the second expected path. When the spatial distance between the real-time flight coordinates of the UAV and the first expected path is less than a first preset threshold, the UAV is controlled to perform path tracking along the first expected path. Figure 6 and Figure 7In the figure, the left area shows the change of the drone's trajectory in the three-dimensional coordinate system, and the right area shows the change of the drone's driving trajectory in the two-dimensional plane; the red line indicates the drone's trajectory, and the black line indicates the two parallel power lines.
[0196] The inverse tangent sliding mode control module 403 is used to control the UAV to perform path tracking based on the UAV's navigation information and generate motion information for controlling the UAV's travel.
[0197] The drone 404 is used to obtain the speed information, position information and heading angle information of the drone, and transmit the information to the dynamic line-of-sight navigation module 402 and the inverse tangent sliding mode control module 403 .
[0198] Figure 8 The schematic diagram of the structure of the UAV flight control device for power overhead lines provided in this application is as follows: Figure 8 As shown, the UAV flight control device for overhead power lines provided in this embodiment includes:
[0199] An acquisition module 801 acquires the takeoff position of the UAV and the discrete three-dimensional coordinates of two power lines corresponding to the takeoff position;
[0200] A first processing module 802 is configured to perform path calculation based on the discrete three-dimensional coordinates of the two power lines to obtain a first desired path for the UAV;
[0201] The second processing module 803 is configured to control the UAV to perform path tracking along the first desired path when the take-off position is located inside the two power lines;
[0202] The third processing module 804 is used to calculate the path based on the discrete three-dimensional coordinates of the power line on the side adjacent to the take-off position when the take-off position is outside the two power lines to obtain a second expected path; control the UAV to track the path along the second expected path, and control the UAV to track the path along the first expected path when the real-time flight coordinates of the UAV meet preset conditions.
[0203] In a possible implementation, the third processing module 804 is further configured to:
[0204] Controlling the UAV to perform path tracking along the second desired path and obtaining the real-time flight coordinates of the UAV;
[0205] When the spatial distance between the real-time flight coordinates of the UAV and the first expected path is less than a first preset threshold, the UAV is controlled to perform path tracking along the first expected path.
[0206] In a possible implementation, the third processing module 804 is further configured to:
[0207] When the spatial distance between the real-time flight coordinates of the drone and the power line on the adjacent side is less than a second preset threshold, the drone is controlled to adjust its altitude until the spatial distance between the drone and the power line on the adjacent side is greater than or equal to the second preset threshold.
[0208] In a possible implementation, the second processing module 803 is further configured to:
[0209] Determining a target path point corresponding to the drone in the first desired path based on the drone's flight coordinates, wherein the drone's flight coordinates refer to the drone's takeoff position or the drone's real-time flight coordinates;
[0210] The three-dimensional coordinates of the target path point of the UAV's flight coordinates are calculated to obtain the desired heading angle and desired altitude of the UAV;
[0211] Generate the drone's underlying execution instructions based on the desired heading angle, desired altitude, flight coordinates, and the drone's current heading angle;
[0212] Control the drone to the target path point based on the drone's underlying execution instructions;
[0213] Among them, the drone's underlying execution instructions include the drone's driving thrust or torque in different directions.
[0214] In a possible implementation, the second processing module 803 is further configured to:
[0215] Based on the desired heading angle, the desired altitude, the flight coordinates, the three-dimensional coordinates of the target path point, and the current heading angle of the drone, multiple errors of the drone are calculated; wherein the multiple errors include: altitude error, heading error, and plane error;
[0216] For each error, the error change rate corresponding to the error is calculated. Based on the error and its corresponding error change rate, an inverse tangent sliding mode control calculation is performed to obtain the sliding mode surface corresponding to each error. The error change rate refers to the velocity change difference corresponding to each error, and the velocity change difference refers to any one of the heading angular velocity change difference, the altitude velocity change difference, and the plane velocity change difference.
[0217] The control input is calculated based on the sliding surface corresponding to each error to obtain the driving thrust or torque corresponding to each error;
[0218] Based on the driving thrust or torque corresponding to each error, the drone's underlying execution instructions are generated; among them, the inverse tangent sliding mode control calculation refers to processing each error based on the inverse tangent function, and obtaining the sliding mode surface corresponding to each error through sliding mode control calculation.
[0219] In a possible implementation, the first processing module 802 is further configured to:
[0220] generating two three-dimensional coordinate data sets based on the discrete three-dimensional coordinates of the two power lines;
[0221] An intermediate value calculation is performed on the two three-dimensional coordinate data sets to obtain a first expected path.
[0222] The UAV flight control device for overhead power lines provided in this implementation example can execute the method provided in the above-mentioned method implementation example. Its implementation principle and technical effects are similar, and this implementation example will not be described in detail here.
[0223] Figure 9 This is a schematic diagram of the structure of the electronic device provided in this application. Figure 9 As shown, the electronic device provided in this embodiment includes: at least one processor 901 and a memory 902. Optionally, the device also includes a communication component 903. The processor 901, the memory 902, and the communication component 903 are connected via a bus 904.
[0224] In a specific implementation process, at least one processor 901 executes the computer-executable instructions stored in the memory 902, so that at least one processor 901 executes the above-mentioned UAV flight control method for overhead power lines.
[0225] The specific implementation process of the processor 901 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.
[0226] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly executed by a hardware processor or by a combination of hardware and software modules in the processor.
[0227] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one disk memory.
[0228] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be classified into address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.
[0229] The present application also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the above-mentioned drone flight control method for overhead power lines.
[0230] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above-mentioned UAV flight control method for overhead power lines is implemented.
[0231] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0232] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0233] The division of units is merely a logical functional division; actual implementations may employ alternative divisions, such as combining or integrating multiple units or components into another system, or omitting or disabling certain features. Furthermore, any coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units, whether electrical, mechanical, or otherwise, through some interface.
[0234] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0235] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0236] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0237] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0238] Finally, it should be noted that those skilled in the art will readily identify other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art not disclosed herein. The present invention is not limited to the precise structure described above and illustrated in the accompanying drawings, and various modifications and variations may be made without departing from the scope thereof. The scope of the present invention is limited solely by the appended claims.
Claims
1. A method for controlling the flight of a UAV for overhead power lines, characterized in that: The method comprises: Obtaining the take-off position of the UAV and the discrete three-dimensional coordinates of two power lines corresponding to the take-off position; Performing path calculation based on the discrete three-dimensional coordinates of the two power lines to obtain a first desired path of the UAV; When the take-off position is located inside the two power lines, controlling the UAV to perform path tracking along the first desired path; When the take-off position is outside the two power lines, a path calculation is performed based on the discrete three-dimensional coordinates of the power line on the side adjacent to the take-off position to obtain a second expected path; the UAV is controlled to perform path tracking along the second expected path, and when the real-time flight coordinates of the UAV meet preset conditions, the UAV is controlled to perform path tracking along the first expected path.
2. The method according to claim 1, characterized in that The controlling the UAV to track the path along the second desired path, and when the real-time flight coordinates of the UAV meet a preset condition, controlling the UAV to track the path along the first desired path, includes: Controlling the UAV to perform path tracking along the second desired path and obtaining real-time flight coordinates of the UAV; When the spatial distance between the real-time flight coordinates of the UAV and the first expected path is less than a first preset threshold, the UAV is controlled to perform path tracking along the first expected path.
3. The method according to claim 2, characterized in that The method further comprises: When the spatial distance between the real-time flight coordinates of the UAV and the power line on the adjacent side is less than a second preset threshold, the UAV is controlled to adjust its altitude until the spatial distance between the UAV and the power line on the adjacent side is greater than or equal to the second preset threshold.
4. The method according to claim 1, wherein The controlling the UAV to perform path tracking along the first expected path includes: Determining a target path point corresponding to the drone in the first desired path based on the flight coordinates of the drone, wherein the flight coordinates of the drone refer to a take-off position of the drone or the real-time flight coordinates of the drone; Calculating the three-dimensional coordinates of the target path point based on the flight coordinates of the drone to obtain a desired heading angle and a desired altitude of the drone; Generate a low-level execution instruction for the drone based on the desired heading angle, the desired altitude, the flight coordinates, and the current heading angle of the drone; Controlling the drone to travel to the target path point based on the drone bottom layer execution instruction; The bottom-level execution instructions of the UAV include the driving thrust or torque of the UAV in different directions.
5. The method according to claim 4, characterized in that The generating of a drone bottom-level execution instruction based on the desired heading angle, the desired altitude, the flight coordinates, and the current heading angle of the drone includes: Calculating a plurality of errors of the UAV based on the desired heading angle, the desired altitude, the flight coordinates, the three-dimensional coordinates of the target path point, and the current heading angle of the UAV; wherein the plurality of errors includes: an altitude error, a heading error, and a plane error; For each error, calculating the error change rate corresponding to the error, performing an inverse tangent sliding mode control calculation based on the error and its corresponding error change rate, and obtaining a sliding mode surface corresponding to each error; wherein the error change rate refers to the velocity change difference corresponding to each error, and the velocity change difference refers to any one of the heading angular velocity change difference, the altitude velocity change difference, and the plane velocity change difference; The control input is calculated based on the sliding surface corresponding to each error to obtain the driving thrust or torque corresponding to each error; Based on the driving thrust or torque corresponding to each error, the UAV bottom-level execution instructions are generated; wherein, the inverse tangent sliding mode control calculation refers to processing each error based on the inverse tangent function, and obtaining the sliding mode surface corresponding to each error through sliding mode control calculation.
6. The method according to any one of claims 1 to 5, characterized in that The performing path calculation based on the discrete three-dimensional coordinates of the two power lines to obtain a first expected path of the UAV includes: generating two three-dimensional coordinate data sets based on the discrete three-dimensional coordinates of the two power lines; An intermediate value calculation is performed on the two three-dimensional coordinate data sets to obtain the first expected path.
7. A UAV flight control device for overhead power lines, characterized in that: include: An acquisition module is used to acquire the take-off position of the UAV and the discrete three-dimensional coordinates of two power lines corresponding to the take-off position; a first processing module, configured to perform path calculation based on the discrete three-dimensional coordinates of the two power lines to obtain a first expected path of the UAV; a second processing module, configured to control the UAV to perform path tracking along the first desired path when the take-off position is located inside the two power lines; The third processing module is used to perform path calculation based on the discrete three-dimensional coordinates of the power line on the side adjacent to the take-off position to obtain a second expected path when the take-off position is located outside the two power lines; control the UAV to perform path tracking along the second expected path, and control the UAV to perform path tracking along the first expected path when the real-time flight coordinates of the UAV meet preset conditions.
8. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.
10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 6 when the computer program is executed by a processor.