Safe flight control method for autonomous unmanned aerial vehicle of transformer substation

By combining the control obstacle function and the Lyapunov function, the CBF-CLF-QP controller and the Isolation Forest algorithm are solved, and the problems of flight safety and fault diagnosis of drones during substation inspection are realized. Safe flight and real-time fault detection improve the success rate and safety of patrol missions.

CN119247773APending Publication Date: 2025-01-03XUANCHENG POWER SUPPLY OF ANHUI ELECTRIC POWER CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411301244.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

There are two important issues in the inspection of substations, including flight safety and fault diagnosis. The existing technology is difficult to effectively solve when signal difference and sensor error accumulation, and fault detection relies on a large amount of data and labeled data, and has limited processing capabilities.

Method used

The CBF-CLF-QP controller is designed using a combination of control obstacle function (CBF) and control Lyapunov function (CLF) to ensure safe flight of the drone, and use the Isolation Forest algorithm to perform real-time fault detection and early warning, and use the data preprocessing. and abnormal detection improve detection accuracy.

Benefits of technology

It improves the safe flight and flight stability of the drone in complex environments, reduces the data dependence of fault detection, realizes real-time fault identification and early warning, and enhances the success rate and safety of patrol tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119247773A_ABST
    Figure CN119247773A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of unmanned aerial vehicle inspection, and discloses a safe flight control method for an autonomous unmanned aerial vehicle of a transformer substation. The objective of the invention is to solve the real-time flight safety problem and the fault early warning and coping problem when the unmanned aerial vehicle flies and inspects in the complex environment of the transformer substation. Due to the characteristic that a control obstacle function has safety guarantee for the flight safety of the unmanned aerial vehicle and the characteristic that a control Lyapunov function has stability guarantee for the flight of the unmanned aerial vehicle, the characteristics of the control obstacle function and the control Lyapunov function are combined, and a control obstacle function-control Lyapunov function-quadratic programming controller is designed; effective obstacle avoidance and stable trajectory tracking are effectively ensured when the unmanned aerial vehicle performs inspection operation in the complex environment of the transformer substation. And meanwhile, when the unmanned aerial vehicle performs inspection operation, flight data of the unmanned aerial vehicle is monitored in real time by using an Isolation Forest algorithm, an abnormal state is identified, early warning is given out in time, and power grid maintenance personnel can take countermeasures in time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of unmanned aerial vehicle inspection, and in particular to a safe flight control method for an autonomous unmanned aerial vehicle in a substation. Background Art

[0002] Nowadays, with the further development of the information age, people's demand and dependence on power electronics are increasing. As the core node of the power system, the power grid substation is responsible for the conversion, control and distribution of electric energy. It is the core link to ensure the stable operation of the power system and an important prerequisite for ensuring that people can use electricity normally. Traditionally, power grid maintenance personnel often use manual inspections for substations, which is not only time-consuming and laborious, but also poses many safety hazards in certain extreme environments. With the rapid development of drone technology in recent years, due to its high efficiency, flexibility and low cost, power grid engineers have gradually turned drone inspections into one of the main methods of substation inspections. However, when drone inspections are carried out, there are two important issues that need to be solved: flight safety and fault diagnosis, which directly affect the success of the inspection mission.

[0003] Traditionally, the safe flight control technology of UAVs mainly uses GPS navigation, visual navigation, inertial navigation and other methods. These technologies can achieve functions such as positioning, obstacle avoidance and path planning of UAVs. However, these methods have their own shortcomings in actual application. For example, GPS navigation is still limited in some areas with poor signals, resulting in insufficient positioning or even loss of signal, which leads to safety hazards. Similarly, inertial navigation will cause serious deviations in long-term operations due to the accumulation of sensor errors. Therefore, how to improve the safe flight control capability of UAVs is an important issue.

[0004] Existing fault detection technologies mainly include rule-based detection, machine learning algorithms, statistical analysis methods, etc. Each of these methods can detect the abnormal state of the system to a certain extent. However, statistical analysis methods require a large amount of valid data support. In practice, the acquisition of a large amount of data is a huge cost issue, and screening out valid data is a big technical problem. At the same time, machine learning algorithms require a large amount of labeled data for model training, and their processing capabilities are very limited for abnormal data with sparsity and diversity. These problems have restricted the application of current fault detection technology in drone inspections. Summary of the invention

[0005] In order to solve the above technical problems, the present invention provides a substation autonomous UAV safe flight control method, which uses a method combining a control barrier function (CBF) and a control Lyapunov function (CLF) to ensure the safe flight of the UAV during complex substation inspection operations; at the same time, the isolation forest anomaly detection algorithm is used to effectively identify abnormal flight states during UAV flight operations, thereby realizing fault diagnosis and early warning.

[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0007] A substation autonomous unmanned aerial vehicle safe flight control method comprises the following steps:

[0008] S1, collecting flight data of the drone through a sensor installed on the drone, and preprocessing the flight data to obtain preprocessed flight data;

[0009] S2, constructing a control obstacle function and a control Lyapunov function, and constructing a CBF-CLF-QP controller based on the control obstacle function and the control Lyapunov function, inputting the preprocessed flight data into the CBF-CLF-QP controller, and issuing a control instruction; executing step S4;

[0010] S3, during the drone inspection operation, an isolation tree is constructed for the flight data collected in real time, an anomaly score is calculated, and whether the flight data is abnormal is determined according to the set threshold, and an abnormal instruction is issued; and step S4 is executed;

[0011] S4. After receiving the control command, the UAV system makes corresponding motion adjustments according to the control command; or issues a fault warning when the UAV system receives an abnormal command.

[0012] Furthermore, the flight data includes point cloud data collected by a lidar, image data collected by a visual camera, acceleration and angular velocity data collected by an inertial sensor unit, and position data collected by an inertial navigation sensor.

[0013] Furthermore, the flight data is preprocessed including data cleaning and normalization;

[0014] Data cleaning is used to remove noise from flight data or correct missing values ​​and outliers in flight data;

[0015] The flight data is scaled to the interval [0,1] using the Min-Max normalization method:

[0016]

[0017] z i represents the flight data before normalization, zi ′ Represents the normalized flight data.

[0018] Furthermore, in step S2, the process of constructing the control barrier function specifically includes:

[0019] First, the control affine form of the nonlinear quadrotor UAV control system is described as follows:

[0020]

[0021] Among them, f, g represent the drift vector field and control vector field of the UAV control system respectively, u is the control input of the UAV control system, and x is the state variable of the UAV control system;

[0022] The safety set of the UAV control system is defined as the super-level set

[0023]

[0024] in, represents the interior of the super level set, represents an n-dimensional real vector, h(x) is the expectation constraint of a continuously differentiable superlevel set, also known as a barrier function;

[0025] Assume h(x) is a locally Lipschitz continuous differentiable function. At the same time, assume that there exists a κ-type function σ(h(x)) and a control law function K cbf ;

[0026] K cbf (x)={u∈U:L f h(x)+L g h(x)u+σ(h(x))≥0};

[0027] U represents the control input set; L f and L g are the Lie derivatives of h(x), respectively. and

[0028] Then, the control law function K cbf (x) is the control obstacle function of the UAV control system.

[0029] Furthermore, in step S2, the process of constructing a control Lyapunov function specifically includes:

[0030] Assume V(x) is a locally Lipschitz continuous differentiable function. Also, assume that there exists a class k function And the control law function K clf :

[0031]

[0032] Then V(x) is the control Lyapunov function of the UAV control system, which is also a positive definite function that satisfies: for all x≠x d ,V(x d )=0 and V(x)>0, x d is the target state.

[0033] Further, in step S2, the construction of a CBF-CLF-QP controller based on a control barrier function and a control Lyapunov function specifically includes:

[0034] By combining the control barrier function and the control Lyapunov function by setting different priorities, a CBF-CLF-QP controller is generated, which includes:

[0035] The control problem that takes into account both the safety and stability of the UAV is constructed as a quadratic programming problem. The objective function of the quadratic programming problem is for:

[0036]

[0037] in, The optimal control input generated by the CBF-CLF-QP controller, the superscript T indicates the transpose;

[0038] The constraints include:

[0039] Control barrier function constraint: L f h(x)+L g h(x)u≥-σ(h(x));

[0040] Controlling Lyapunov function constraints:

[0041] Where δ is a slack variable, H is an arbitrary positive definite matrix, p represents the position of the drone, and p>0, so as to ensure that the quadratic programming problem is solvable;

[0042] The optimal control input generated by the CBF-CLF-QP controller As control instructions, it is sent to the UAV system.

[0043] Furthermore, step S3 specifically includes:

[0044] First, build an isolation tree based on the preprocessed flight data: The flight data is represented as a time series matrix Y:

[0045]

[0046] Among them, y ij represents an element in X, i is the time synchronization number, and j is the feature dimension; a row of the time series matrix Y represents the flight data within a time step, and each column represents a feature;

[0047] At each node of the isolation tree, a feature is randomly selected, and a split value δ is randomly selected within the interval between the maximum and minimum values ​​of the selected feature; the flight data samples are divided into two subsets according to the split value p; the split process is repeated for each subset until the number of flight data samples contained in each leaf node of the isolation tree is less than a preset threshold or the depth of the tree reaches the maximum value;

[0048] Secondly, calculate the anomaly score: calculate the path length d(y) of the flight data sample y in the decision tree; the shorter the path length, the higher the possibility that the flight data sample y is abnormal; the average path length of multiple isolated trees is used as the anomaly score s(y,n) of the flight data sample:

[0049]

[0050] Where n is the number of samples, represents the average path length of the isolated tree, and c(n) is a penalty term used to normalize the path length:

[0051]

[0052] Where H(·) is the harmonic number;

[0053] Finally, the threshold is set and the abnormality judgment of the flight data sample is performed: the threshold θ is set, and it is judged whether the abnormality score s(y) of the flight data sample is greater than θ. If so, the flight data sample is marked as abnormal, if not, the flight data sample is normal.

[0054] Compared with the prior art, the beneficial technical effects of the present invention are:

[0055] (1) CBF-CLF-QP controller design: This paper designs an innovative CBF-CLF-QP controller for safe flight inspection of substations by UAVs, combining the control barrier function (CBF) and the control Lyapunov function (CLF), and optimizing the control input through the quadratic programming (QP) method. This design not only ensures the safety of UAVs in complex environments, but also improves flight stability.

[0056] (2) Application of Isolation Forest Algorithm: The Isolation Forest algorithm is applied to real-time fault detection and early warning of UAVs, breaking through the traditional method’s reliance on large amounts of labeled data. Through this unsupervised learning method, the system can effectively identify abnormal conditions during flight and provide timely early warnings and response measures.

[0057] (3) Comprehensive data preprocessing and anomaly detection: The present invention has carried out detailed design in the data preprocessing stage, including data cleaning, feature extraction and normalization, to ensure the quality of sensor data. Combined with Isolation Forest for real-time monitoring, the accuracy and efficiency of fault detection are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 is a flow chart of the safe flight control method of the unmanned aerial vehicle of the present invention;

[0059] Figure 2 It is the design block diagram of CBF-CLF-QP controller;

[0060] Figure 3 It is a fault detection and early warning flow chart based on isolation forest. DETAILED DESCRIPTION

[0061] A preferred embodiment of the present invention is described in detail below with reference to the accompanying drawings.

[0062] The present invention provides a substation autonomous UAV safe flight control method. By adopting a UAV safe flight control method combining a control obstacle function and a control Lyapunov function, the safe flight of the UAV in a complex environment is ensured. In addition, an isolation forest anomaly detection algorithm is introduced to effectively identify abnormal flight states and realize fault warning and diagnosis.

[0063] The technical solution of the present invention mainly consists of the following two aspects:

[0064] (1) Safe flight control of UAV based on the combination of control obstacle function and control Lyapunov function.

[0065] In UAV flight systems, stability and safety are two key characteristics. Control Lyapunov Function (CLF) and Control Barrier Function (CBF) are two methods used to control these characteristics. CLF is mainly used as stability constraints (SoftConstraints), that is, state constraints that the system is expected to achieve, but may be violated in some cases. In contrast, CBF is a hard constraint (Hard Constraints), that is, a restriction that the system must strictly abide by in any case to ensure the safety of the system.

[0066] CLF is used to ensure the stability of the system, but it is usually unable to ensure the safety of the system alone. Therefore, the present invention proposes to use CLF in combination with CBF to form a comprehensive control scheme. CBF adjusts the system state at the control level at the minimum cost, effectively ensuring the safety of the nonlinear control system, while CLF plays a key role in ensuring the stability of the system. In order to achieve safe flight of UAVs in complex environments, the present invention designs a CBF-CLF-QP controller.

[0067] The CBF-CLF-QP controller generates a local Lipschitz continuous feedback controller by integrating the feedback information of CBF and CLF. On the basis of ensuring the safety of the system, stable target trajectory tracking is prioritized. The hard constraints provided by CBF ensure that the system state does not exceed the safety boundary. When the expected trajectory enters the potential danger zone, the controller is taken over by CBF, giving priority to ensuring system safety. When the safety constraint does not conflict with the target constraint, the target constraint provided by CLF dominates the controller to ensure the stability of the system without violating the safety constraint.

[0068] The CBF-CLF-QP controller solves the quadratic programming (QP) problem to find the optimal control input to ensure that the system optimizes control performance while meeting safety and stability constraints. The QP method takes into account the performance indicators of the system and provides the optimal control strategy, making the controller have good real-time performance, flexibility and adaptability, and is suitable for a variety of different UAV systems and control tasks.

[0069] (2) Fault detection and early warning based on isolation forest.

[0070] Isolation Forest is an unsupervised learning algorithm based on decision trees, which is suitable for detecting abnormal samples in data. Compared with traditional anomaly detection methods, Isolation Forest can isolate flight data samples by building decision trees without relying on a large amount of labeled data, thereby effectively identifying abnormal data.

[0071] In the application of the present invention, Isolation Forest is used to monitor the flight data of the drone in real time, such as speed, position, sensor output, etc. By analyzing these flight data, Isolation Forest can quickly identify abnormal conditions, such as sudden control failure, sensor failure, etc. When an abnormality is detected, the system will immediately issue a warning signal and take corresponding countermeasures, such as adjusting the flight path or making an emergency landing. This method not only improves the accuracy of drone fault detection, but also can timely detect potential problems before the fault occurs, providing effective prevention and response strategies.

[0072] Example

[0073] This embodiment includes the following three parts: the first part is the preprocessing of the flight data input by the sensor; the second part is the safe flight control of the UAV based on the combination of the control obstacle function and the control Lyapunov function; the third part is the fault detection and early warning based on the Isolation Forest. Figure 1 Specifically, this embodiment includes the following steps:

[0074] S1. Preprocessing of flight data input by sensors;

[0075] S2, constructing a CBF-CLF-QP controller based on the control obstacle function and the control Lyapunov function, and sending control instructions;

[0076] S3, perform fault warning and detection based on isolation forest, calculate anomaly scores, and issue abnormal instructions;

[0077] S4. The UAV control system receives the control command and makes corresponding motion adjustments; or issues a fault warning when receiving an abnormal command.

[0078] Step S1, preprocessing the flight data input by the sensor, specifically includes:

[0079] During the flight of a drone, real-time collection of flight data is the basis for safe flight and fault detection. Data is collected from various sensors installed on the drone, such as point cloud data from lidar, image data from visual cameras, acceleration and angular velocity data from inertial sensor units, and the position of inertial navigation sensors. The collected data can be represented as a time series matrix:

[0080]

[0081] Where m is the number of time synchronizations and n is the feature dimension. A row represents the data in one time step, and each column represents a feature.

[0082] Due to the influence of sensor accuracy and external environment, the collected flight data may contain noise, missing values ​​and outliers. The goal of data cleaning is to remove or correct these data anomalies to improve data quality and the accuracy of subsequent processing. The data cleaning part includes compensation for motion distortion of LiDAR point cloud, geometric correction of image data, etc.

[0083] Features with significant significance for fault detection are extracted from the obtained denoised flight data, such as line points and surface points in the lidar point cloud, high-pixel corner points in the image data, etc. Next, the flight data collected by different sensors are normalized so that the feature values ​​with different dimensions fall within the same numerical range, thereby avoiding certain features from having too much influence on the results during model training. The present invention selects the Min-Max normalization method to scale the data to the interval [0,1]. The specific formula is as follows:

[0084]

[0085] z i represents the flight data before normalization, z i ′ Represents the normalized flight data.

[0086] Step S2, see Figure 2 , based on the control obstacle function and the control Lyapunov function, a CBF-CLF-QP controller is constructed and control instructions are sent, including:

[0087] A. Design of control barrier function:

[0088] The control obstacle function is used to define the safety conditions that must be met during the flight of the drone to avoid collisions with obstacles in the environment. Specifically, the control obstacle function constructs an obstacle function by setting the minimum safe distance between the drone and the obstacle. The value of the obstacle function gradually decreases as the drone approaches the obstacle and reaches zero when it approaches the safe distance, thus triggering the control mechanism to avoid the obstacle.

[0089] First, the control affine form of the nonlinear quadrotor UAV control system is described as follows:

[0090]

[0091] Among them, f, g are locally Lipschitz continuous, which are respectively represented as the drift vector field and control vector field of the system, while u is the control input of the UAV system and x is the state variable of the UAV system.

[0092] The safety set of the above nonlinear control system is defined as the super level set Its expression formula is as follows:

[0093]

[0094] Here, h(x) is the desired constraint of the continuously differentiable superlevel set, also known as the barrier function.

[0095] Assume that h(x) is a locally Lipschitz continuously differentiable function. Also, assume that there exists a k-type function σ(h(x)) and a control law K cbf :

[0096] K cbf (x)={u∈U:L f h(x)+L g h(x)u+σ(h(x))≥0};

[0097] L f and L g are the Lie derivatives of h(x), respectively. and Then, this function is the CBF of the nonlinear control system.

[0098] B. Design of control Lyapunov function:

[0099] Assume that V(x) is a locally Lipschitz continuous differentiable function and that there exists a κ-type function and control law K clf :

[0100]

[0101] Then, V(x) is a local controlled Lyapunov function and a positive definite function, satisfying V(x d )=0 and V(x)>0 for all x≠x d (x d is the target state).

[0102] C. Quadratic programming problem based on the combination of controlling the obstacle function and controlling the Lyapunov function:

[0103] When the drone is flying for inspection, it is necessary to consider not only the safety of the system but also the stability of the system. Therefore, by setting different priorities, CBF and CLF are combined to generate a CBF-CLF-QP controller to form a comprehensive control strategy. The specific steps are as follows:

[0104] The objective function is:

[0105]

[0106] The constraints include:

[0107] CBF constraint: L f h(x)+L g h(x)u≥-σ(h(x));

[0108] CLF constraints:

[0109] Among them, δ is the slack variable, H is an arbitrary positive definite matrix, and p>0, which ensures that the quadratic programming problem is solvable.

[0110] Generate optimal control input in CBF-CLF-QP controller After that, it will be sent to the UAV system as a control command. After receiving the control command, the UAV system will make corresponding motion adjustments according to the command to avoid obstacles and maintain flight stability, and finally achieve the predetermined flight mission.

[0111] like Figure 3 As shown, step S3, based on the isolation forest, performs fault warning and detection, calculates the anomaly score, and issues an abnormal instruction, specifically including:

[0112] A. Construction of Isolation Forest Model

[0113] The first step is to build an isolation tree. At each node, the algorithm randomly selects a feature and randomly selects a split value δ in the range of the maximum and minimum values ​​of the feature. Then, the algorithm divides the samples into left and right subsets according to this split value p. This process is repeated until the number of flight data samples contained in each leaf node is less than the preset threshold or the depth of the tree reaches the maximum value.

[0114] Next, calculate the anomaly score. For a flight data sample y, calculate its path length d(y) in the decision tree. The shorter the path length, the more abnormal the flight data sample y is considered. The average path length of multiple trees is used as the anomaly score of the flight data sample. The calculation formula for the anomaly score is:

[0115]

[0116] Where n is the number of samples, c(n) is a penalty term used to normalize the path length, which is also the average path length of the tree. The formula is usually defined as follows:

[0117]

[0118] where H(i) is the harmonic number. For a given sample size n, the expectation of the average path length c(n) is a constant, and this formula provides a standardized benchmark for normalizing path lengths.

[0119] Finally, the threshold is set. A threshold θ is set. When the abnormal score s(x) of the flight data sample is greater than θ, the point is marked as abnormal, otherwise it is normal. The threshold can be tuned through historical data to balance the false alarm rate and the false negative rate.

[0120] Step S4: The drone control system receives the control command and makes corresponding motion adjustments; or issues a fault warning when receiving an abnormal command, specifically including:

[0121] When drones are inspecting substations, real-time monitoring of abnormal flight data that may occur during flight is the core of fault warning. The abnormality score calculated using the Isolation Forest algorithm reflects the degree of abnormality of the current drone inspection status. When the abnormality score exceeds the preset threshold value θ, the system will determine that an abnormal state has occurred. At this time, the system will generate an abnormal instruction and send it to the drone control system, and the system will immediately trigger the early warning mechanism automatically. Common early warning mechanisms include sounding an alarm, flashing an alarm warning sign on the control screen, etc. At the same time, these abnormal flight data will be recorded in the system log for later data analysis and diagnosis by power grid maintenance personnel.

[0122] At the same time, the system will also respond differently according to the degree of abnormality of the drone's abnormal state. For minor abnormalities generated by the system, such as a slight deviation in the reading of a sensor, the system only needs to automatically adjust the corresponding flight control parameters to make corrections. When some serious abnormalities occur, such as a motor failure and inability to operate, the system will automatically trigger the emergency landing interrupt program, find the nearest safe place to land, and at the same time send the shutdown accident to the command center, waiting for engineers to arrive on site to deal with these emergency problems.

[0123] In summary, the present invention is different from the prior art in at least the following aspects:

[0124] Integrated control strategy: Existing UAV safe flight control technology usually relies on a single control method, such as GPS navigation, visual navigation or inertial navigation, while the present invention combines the control barrier function (CBF) and the control Lyapunov function (CLF) to form a CBF-CLF-QP controller. This controller can simultaneously ensure the flight safety and stability of the UAV and optimize the control performance through the quadratic programming method.

[0125] Real-time fault detection and early warning: Traditional fault detection technologies mostly rely on a large amount of labeled data and rule definitions, and cannot effectively identify abnormal conditions in real time. This paper introduces the Isolation Forest algorithm, an unsupervised learning method that can perform anomaly detection by building a decision tree without the need for a large amount of labeled data, monitor the flight data of drones in real time, and issue early warnings in a timely manner.

[0126] Adapt to complex environments: The application effect of existing technologies in complex environments is limited, especially when the signal is weak or the sensor error is seriously accumulated. The solution proposed in this invention is aimed at inspection tasks in complex environments such as substations. By combining CBF and CLF to ensure the safe flight of drones, and using Isolation Forest for abnormal state identification, the safety and reliability of drones in these environments are greatly improved.

[0127] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention, and any reference numerals in the claims should not be regarded as limiting the claims involved.

[0128] In addition, it should be understood that although this specification is described in terms of implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.

Claims

1. A substation autonomous drone safe flight control method, characterized in that: The following steps are involved: S1, collecting flight data of the drone through a sensor installed on the drone, and preprocessing the flight data to obtain preprocessed flight data; S2, constructing a control obstacle function and a control Lyapunov function, and constructing a CBF-CLF-QP controller based on the control obstacle function and the control Lyapunov function, inputting the preprocessed flight data into the CBF-CLF-QP controller, and issuing a control instruction; executing step S4; S3, during the drone inspection operation, an isolation tree is constructed for the flight data collected in real time, an anomaly score is calculated, and whether the flight data is abnormal is determined according to the set threshold, and an abnormal instruction is issued; and step S4 is executed; S4. After receiving the control command, the UAV system makes corresponding motion adjustments according to the control command; or issues a fault warning when the UAV system receives an abnormal command.

2. The substation autonomous UAV safe flight control method according to claim 1 is characterized in that: The flight data includes point cloud data collected by a laser radar, image data collected by a visual camera, acceleration and angular velocity data collected by an inertial sensor unit, and position data collected by an inertial navigation sensor.

3. The substation autonomous UAV safe flight control method according to claim 1 is characterized in that: Preprocessing of flight data includes data cleaning and normalization; Data cleaning is used to remove noise from flight data or correct missing values ​​and outliers in flight data; The flight data is scaled to the interval [0,1] using the Min-Max normalization method: z i represents the flight data before normalization, z i ′ Represents the normalized flight data.

4. The substation autonomous UAV safe flight control method according to claim 1 is characterized in that: In step S2, the process of constructing the control barrier function specifically includes: First, the control affine form of the nonlinear quadrotor UAV control system is described as follows: Among them, f, g represent the drift vector field and control vector field of the UAV control system respectively, u is the control input of the UAV control system, and x is the state variable of the UAV control system; The safety set of the UAV control system is defined as the super-level set in, represents the interior of the super level set, represents an n-dimensional real vector, h(x) is the expectation constraint of a continuously differentiable superlevel set, also known as a barrier function; Assume h(x) is a locally Lipschitz continuous differentiable function. At the same time, assume that there exists a κ-type function σ(h(x)) and a control law function K cbf ; K cbf (x)={u∈U:L f h(x)+L g h(x)u+σ(h(x))≥0}; U represents the control input set; L f and L g are the Lie derivatives of h(x), respectively. and Then, the control law function K cbf (x) is the control obstacle function of the UAV control system.

5. The substation autonomous UAV safe flight control method according to claim 4 is characterized in that: In step S2, the process of constructing a control Lyapunov function specifically includes: Assume V(x) is a locally Lipschitz continuous differentiable function. Also, assume that there exists a κ-type function And the control law function K clf : Then V(x) is the control Lyapunov function of the UAV control system, which is also a positive definite function that satisfies: for all x≠x d ,V(x d )=0 and V(x)>0, x d is the target state.

6. The substation autonomous UAV safe flight control method according to claim 5 is characterized in that: In step S2, the construction of a CBF-CLF-QP controller based on a control barrier function and a control Lyapunov function specifically includes: By combining the control barrier function and the control Lyapunov function by setting different priorities, a CBF-CLF-QP controller is generated, which includes: The control problem that takes into account both the safety and stability of the UAV is constructed as a quadratic programming problem. The objective function of the quadratic programming problem is for: in, The optimal control input generated by the CBF-CLF-QP controller, the superscript T indicates the transpose; The constraints include: Control barrier function constraint: L f h(x)+L g h(x)u≥-σ(h(x)); Controlling Lyapunov function constraints: Where δ is a slack variable, H is an arbitrary positive definite matrix, p represents the position of the drone, and p>0, so as to ensure that the quadratic programming problem is solvable; The optimal control input generated by the CBF-CLF-QP controller As control instructions, it is sent to the UAV system.

7. The substation autonomous UAV safe flight control method according to claim 1 is characterized in that: Step S3 specifically includes: First, build an isolation tree based on the preprocessed flight data: The flight data is represented as a time series matrix Y: Among them, y ij represents an element in X, i is the time synchronization number, and j is the feature dimension; a row of the time series matrix Y represents the flight data within a time step, and each column represents a feature; At each node of the isolation tree, a feature is randomly selected, and a split value δ is randomly selected within the interval between the maximum and minimum values ​​of the selected feature; the flight data samples are divided into two subsets according to the split value p; the split process is repeated for each subset until the number of flight data samples contained in each leaf node of the isolation tree is less than a preset threshold or the depth of the tree reaches the maximum value; Secondly, calculate the anomaly score: calculate the path length d(y) of the flight data sample y in the decision tree; the shorter the path length, the higher the possibility that the flight data sample y is abnormal; the average path length of multiple isolated trees is used as the anomaly score s(y,n) of the flight data sample: Where n is the number of samples, represents the average path length of the isolated tree, and c(n) is a penalty term used to normalize the path length: Where H(·) is the harmonic number; Finally, the threshold is set and the abnormality judgment of the flight data sample is performed: the threshold θ is set, and it is judged whether the abnormality score s(y) of the flight data sample is greater than θ. If so, the flight data sample is marked as abnormal, if not, the flight data sample is normal.