Unmanned aerial vehicle fault diagnosis method and system based on mask graph attention network

By using mask diagrams to pay attention to the network and gated cycle units in UAV fault diagnosis, combined with the exponential sliding average method, the problems of low efficiency and insufficient accuracy of electromagnetic effect fault diagnosis in UAV system are solved, and high accuracy is achieved and robust troubleshooting enhances the interpretability of the model.

CN119293427APending Publication Date: 2025-01-10Chinese People's Liberation Army Cyberspace Force Information Engineering University +1
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Due to the multivariable and nonlinear coupling characteristics, the electromagnetic effect fault diagnosis efficiency and insufficient accuracy are caused by the low efficiency and insufficient accuracy of electromagnetic effect. Traditional neural networks are poor interpretability when processing graph structure data, making it difficult to effectively capture spatial and temporal dependencies.

Method used

Adopt drone fault diagnosis method based on mask graph attention network, extract spatial correlation characteristics through graph attention network, combine gating cycle units to extract time characteristics, and design mask mechanism and exponential sliding average method to build a nonlinear model to realize Troubleshooting.

Benefits of technology

It improves the accuracy and robustness of drone fault diagnosis, enhances the interpretability of the model, can effectively describe the spatial dependence between parameters, reduces the risk of misjudgment, and improves the reliability of fault status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119293427A_ABST
    Figure CN119293427A_ABST
Patent Text Reader

Abstract

The invention discloses an unmanned aerial vehicle fault diagnosis method and system based on a mask graph attention network. The method comprises the following steps: carrying out noise filtering on collected unmanned aerial vehicle flight data; performing sliding reconstruction on the filtered unmanned aerial vehicle flight data to obtain an unmanned aerial vehicle system component association relationship; based on an unmanned aerial vehicle system component association relationship, calculating an attention score of each node to a current node through a graph attention network, and reducing parameter dependence by introducing a mask mechanism; updating the next hidden state by iterating the input and the hidden state to extract the time feature of the input data; the output dimension is converted into the required dimension, and the hidden state at the last moment is output; and high-frequency jitter in the residual error sequence is eliminated by adopting an exponential moving average method, so that a stable fault diagnosis result is obtained. According to the invention, unmanned aerial vehicle fault diagnosis with local dependence, exchange invariance and interpretability is realized.
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 fault diagnosis, and in particular to a method and system for unmanned aerial vehicle fault diagnosis based on a masked graph attention network (GraphAttention Network, GAT). Background Art

[0002] UAV systems usually include remote control and telemetry subsystems, navigation and positioning subsystems, attitude control subsystems, power subsystems, power control subsystems, etc. They are complex and large electronic systems. Moreover, since each subsystem involves multiple dynamic characteristics such as multiple variables, nonlinear coupling, and flexible structures, and considering the influence of uncertain factors such as wind disturbance, unstable engine vibration, and complex electromagnetic environment interference, weak links such as sensors, actuators, and controllers of UAV systems are prone to failure.

[0003] RNN, CNN and their variants are effective in extracting features from Euclidean spatial data. CNN consists of convolutional layers, pooling layers, fully connected layers, etc., and achieves efficient processing of large-scale data such as images through local convolutional feature extraction and downsampling. Due to this structure, CNN can handle two-dimensional or three-dimensional gridded data well because these data have spatial continuity and structural similarity; RNN consists of a recurrent layer and an output layer, which can model and classify sequence data. Due to its recurrent structure, RNN can capture the temporal dependency and long-term dependency in sequence data, so it is particularly suitable for processing one-dimensional sequence data.

[0004] However, complex electronic systems represented by drones contain a large number of sensors, controllers, and actuators. The complex connections between these modules need to be expressed in the form of graphs, and the data generated by different modules (nodes in the graph) have strong spatial and temporal dependencies. For non-Euclidean structured data such as graphs, traditional neural networks can only learn potential dependencies through the features of nodes, resulting in poor interpretability of the model, which in turn leads to low efficiency and insufficient accuracy in electromagnetic effect fault diagnosis of drone systems. Summary of the invention

[0005] Aiming at the problem of low efficiency and insufficient accuracy of electromagnetic effect fault diagnosis of UAV system caused by multivariable and nonlinear coupling, a UAV fault diagnosis method (masked-SGAT-GRU) and system based on masked graph attention network are proposed. Its local dependency, exchange invariance and interpretability are helpful to build a nonlinear model of UAV system, and clearly extract the spatial dependency between different components. Combined with the gated recurrent unit (GRU), the temporal feature extraction is realized, and the UAV fault diagnosis with local dependency, exchange invariance and interpretability is realized. The present invention firstly extracts spatial correlation features based on the association relationship of the components of the UAV system, and constructs the spatial association graph of the system state; then designs the mask mechanism suppression strategy to avoid over-reliance on the time series characteristics of the measured parameters to cause misjudgment, and realizes accurate prediction of the UAV state; then constructs the fault threshold and prediction residual smoothing method based on the exponential moving average method (EWMA) to improve the reliability of fault state diagnosis; finally, the UAV fault database is constructed based on the fault injection method to realize the equivalent simulation and fault diagnosis of weak link faults such as sensors, actuators and flight control.

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

[0007] On the one hand, the present invention proposes a UAV fault diagnosis method based on a mask graph attention network, comprising:

[0008] Step 1: Filter the noise of the collected UAV flight data;

[0009] Step 2: Sliding reconstruction of the filtered UAV flight data to obtain the association relationship of the UAV system components;

[0010] Step 3: Based on the association relationship of the drone system components, the attention score of each node to the current node is calculated through the graph attention network, and the parameter self-dependence is reduced by introducing a mask mechanism;

[0011] Step 4: Update the next hidden state by iterating the input and hidden state to extract the temporal features of the input data;

[0012] Step 5: Convert the output dimension to the required dimension and output the hidden state at the last moment;

[0013] Step 6: Use the exponential moving average method to eliminate high-frequency jitter in the residual sequence to obtain stable fault diagnosis results.

[0014] Furthermore, in step 1, the collected UAV flight data is subjected to median filtering to eliminate isolated noise.

[0015] Furthermore, in step 3, the attention score of each node to the current node is calculated in the following manner:

[0016] e i,j =a T LeakyReLU(W·[h i ||h j ])

[0017] where W∈R d×2m is the shared weight linear transformation matrix applied to each node, a∈R d is used to calculate the attention score function e i,j The shared attention mechanism, [h i ||h j ]∈R 2m It is the concatenation of two feature vectors, and the LeakyRELU function is a nonlinear activation function.

[0018] Furthermore, in step 3, reducing the parameter self-dependence by introducing a mask mechanism includes:

[0019]

[0020]

[0021] where β i,j Indicates a mask.

[0022] Furthermore, in step 4, time features are extracted from the data processed in step 3 specifically through a GRU module.

[0023] Furthermore, in step 6, high-frequency jitter in the residual sequence is eliminated by the following formula:

[0024]

[0025] e1=R1

[0026] where e t and e t-1 Represents the calculation results of the exponential moving average of the current and previous moments, R t is the residual input at the current moment, γ is the empirical coefficient, e1 is the calculation result of the exponential sliding at the initial moment, and R1 is the residual input at the initial moment;

[0027] Then the average residual is calculated and compared with the fault threshold to determine whether there is a fault.

[0028] Another aspect of the present invention provides a UAV fault diagnosis system based on a mask graph attention network, comprising:

[0029] A noise filtering unit, used to filter the noise of the collected UAV flight data;

[0030] A sliding reconstruction unit is used to perform sliding reconstruction on the filtered UAV flight data to obtain the association relationship between the UAV system components;

[0031] The spatial feature extraction unit is used to calculate the attention score of each node to the current node through the graph attention network based on the association relationship of the drone system components, and reduce the parameter self-dependence by introducing a mask mechanism;

[0032] A temporal feature extraction unit, used to update the next hidden state by iterating the input and hidden state to extract the temporal features of the input data;

[0033] The output unit is used to convert the output dimension into the required dimension and output the hidden state at the last moment;

[0034] The residual calculation unit is used to eliminate high-frequency jitter in the residual sequence by using an exponential sliding average method, so as to obtain a stable fault diagnosis result.

[0035] Compared with the prior art, the present invention has the following beneficial effects:

[0036] (1) Based on the basic architecture of graph attention network, the present invention learns the spatial dependency between the parameters of the associated components of the UAV, and reduces the self-attention of the parameters through the designed mask mechanism suppression strategy, thus avoiding excessive reliance on the temporal relationship of the components to be tested during prediction and increasing the robustness of the prediction.

[0037] (2) A fault diagnosis method based on the exponential moving average method was designed to solve the problem of unstable fault diagnosis results caused by noise jitter in the prediction residual sequence, thereby improving the robustness of fault diagnosis.

[0038] (3) In view of the weak interpretability problem caused by the end-to-end modeling of traditional neural network models, the present invention has good interpretability. The attention score obtained by model training describes the spatial dependency relationship between different parameters, and realizes the fault identification of UAV system to a certain extent.

[0039] (4) The effect of the present invention was verified through experiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 One of the flow charts of a method for UAV fault diagnosis based on a mask graph attention network provided by an embodiment of the present invention;

[0041] Figure 2 A second flow chart of a method for diagnosing drone faults based on a mask graph attention network provided by an embodiment of the present invention;

[0042] Figure 3 A schematic diagram of a data reconstruction method provided by an embodiment of the present invention;

[0043] Figure 4 A schematic diagram of an attention calculation method used in a masked-SGAT module provided in an embodiment of the present invention;

[0044] Figure 5 A schematic diagram of a unit structure in a GRU module provided in an embodiment of the present invention;

[0045] Figure 6 A flowchart of hyperparameter optimization in model training provided by an embodiment of the present invention;

[0046] Figure 7 The model training result provided by the embodiment of the present invention;

[0047] Figure 8 An attention score for the roll angular rate provided by an embodiment of the present invention;

[0048] Fig. 9 The roll angle rate fault injection result provided by the embodiment of the present invention;

[0049] Fig.10 ROC curves of different models provided by embodiments of the present invention;

[0050] Fig.11 The GRU model prediction results provided by the embodiment of the present invention;

[0051] Fig.12 The prediction result of the masked-SGAT-GRU model provided in the embodiment of the present invention;

[0052] Fig.13 A schematic diagram of the architecture of a drone fault diagnosis system based on a mask graph attention network is provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments:

[0054] like Figure 1 , Figure 2 As shown in the figure, a UAV fault diagnosis method based on masked graph attention network eliminates isolated noise and reduces the amount of calculation by preprocessing and reconstructing flight data, extracts spatial features of data through masked-SGAT module, and then extracts temporal features in GRU module. Finally, residual is calculated by exponential sliding average method to diagnose fault. The detailed steps include:

[0055] S101: Eliminate isolated noise from the collected flight data (including more than 30 parameter variables such as temperature, altitude, air pressure, and roll angle parameters) through median filtering. Assuming that the collected flight data contains N variables, the multivariate time series at time t can be expressed as x[t]∈R N , where x i [t]∈R represents the value of the i-th variable at time t. For each sequence x i The median filter algorithm is used for processing. The basic principle of median filtering is to replace each point in the sequence with the median value near the current time step, thereby eliminating isolated noise values. The specific calculation method is as follows, where medfilt is the median filter function.

[0056]

[0057] After data denoising, it needs to be standardized. Commonly used zero-mean standardization methods are as follows:

[0058]

[0059] where μ i is x i The mean value, σ i is x i The standard deviation of .

[0060] S102: Use a window with a window length of k to perform sliding reconstruction on the filtered flight data, see Figure 3 For multivariate time series forecasting tasks, it is usually expressed as predicting the value x[T+1] at time T+1 based on the values ​​{x[1], x[2]..., x[T]} at the previous T time points. The predicted value is y[T], and the true value is

[0061] However, the commonly used assumption is that the current state of the electronic system is only related to the values ​​of the previous k moments, and the earlier system operation state will not have a significant impact on the current system state. This assumption is easy to understand and avoids unnecessary numerical calculations. Under this assumption, x[T+1] is only related to {x[T-k+1], x[T-k+2]..., x[T]}. Therefore, the data can be reconstructed as X T-k ={x[T-k+1],x[T-k+2]...,x[T]}, In actual situations, the value of the sliding window k needs to be optimized based on the training results.

[0062] S103: Calculate the flight data attention score through the masked-SGAT module, such as Figure 4 As shown, the input of the module is the feature vector set {hi ∈R k ,i∈V ε}, the output is {h′ i ∈R k ,i∈V ε}, k is the length of the node sequence. For each node i∈V g , the update of its feature vector depends on the information of each neighbor node.

[0063]

[0064] σ(x)=1 / (1+exp(-x))

[0065] Where N i Represents the number of neighbor nodes of node i. Since the drone state variable set is considered to be a complete directed graph, there are N neighbor nodes for any node i. i =N,α i,j is the attention score, and σ is the sigmoid activation function.

[0066] The masked-SGAT module uses a scoring function e(h i ,h j ), abbreviated as e i,j , to calculate the importance of node j to the current node i. The calculation formula is as follows:

[0067]

[0068] LeakyReLU(x)=max(0,x)+α·min(0,x)

[0069]

[0070] where W∈R d×2m is the shared weight linear transformation matrix applied to each node, a∈R d is used to calculate the attention score function e i,j The shared attention mechanism, α i,j represents the attention score of the i-th parameter for the j-th parameter, [h i ||h j ]∈R 2m It is the concatenation of two feature vectors, and 2m represents the dimension. The LeakyRELU function is a nonlinear activation function, and the negative slope α when x < 0 is usually set to 0.01.

[0071] When calculating the attention score, a mask mechanism is introduced to reduce the dependence on the diagnostic parameters themselves. The formula is as follows:

[0072]

[0073]

[0074] where β i,j Indicates a mask.

[0075] This achieves the purpose of focusing on extracting the spatial dependency relationship between the current variable and other variables, thereby alleviating the impact of potential erroneous information contained in the variables to be diagnosed in the fault diagnosis task.

[0076] S104: Input the time series processed by the masked-SGAT module into the GRU module, and obtain the states of the two gates in the GRU module through the hidden state of the previous moment and the current input. Figure 5 As shown, GRU contains two gating units for updating the hidden state: reset gate r[t]∈R m and update gate z[t]∈R m First, through the hidden state h[t-1] of the previous moment and the current input X′ m [t] obtains the states of the two gates. The hidden state of the previous moment is reset to H′[t-1] according to the reset gate, and the alternative hidden state of the current moment is further calculated Finally, the hidden state at the current moment is updated according to the update gate. The forward propagation formula of the unit is as follows:

[0077] r[t]=σ(W r ·[H[t-1]∥X′ m [t]])

[0078] z[t]=σ(W z ·[h[t-1]∥X′ m [t]])

[0079] h′[t-1]=h[t-1]⊙n[t]

[0080]

[0081] Where W r ∈R m×(m+N) and W z ∈R m×(m+N) is the weight matrix of the update gate and reset gate, σ is the sigmoid activation function, ⊙ is the element-wise product, W h ∈R m×(m+N) is the weight matrix of the candidate hidden state, and tanh is the hyperbolic tangent activation function. Inputting the time series processed by the masked-SGAT module into the GRU module can realize the time feature extraction of time series data.

[0082] S105: Convert the output dimension to the required dimension in the output layer. The output layer outputs the hidden state of the GRU module at the last moment.

[0083] S106: Use the Exponential Weighted Moving Average (EWMA) method to eliminate high-frequency jitter in the residual sequence (a sequence consisting of the difference between the true value and the trained predicted value) to obtain a stable fault diagnosis result.

[0084]

[0085] e1=R1

[0086] γ=2 / (N+1)

[0087] The calculated smoothed residual is compared with the (exponential sliding average) fault threshold to determine whether there is a fault. Once the calculated smoothed residual exceeds the fault threshold, it is a fault. The output formula is:

[0088] y[t]=σ(W o ·h[t])

[0089] where e t and e t-1 Represents the calculation results of the exponential moving average of the current and previous moments, R t is the residual input at the current moment, γ is the empirical coefficient, e1 is the calculation result of the exponential sliding at the initial moment, R1 is the residual input at the initial moment, W o is the weight matrix of the output layer.

[0090] The technical solution of the embodiment of the present invention is based on the association relationship between the components of the drone system, applies the graph attention network to extract spatial association features, constructs a system state spatial association graph, and further designs a mask mechanism suppression strategy to avoid over-reliance on the time series characteristics of the measured parameters and cause misjudgment, thereby achieving accurate prediction of the drone state; further constructs a fault threshold and prediction residual smoothing method based on the EWMA strategy to improve the reliability of fault state diagnosis.

[0091] In the example application of the above method, the UAV performs 4 flight missions in fixed-point and automatic modes, each flight mission lasts 15-30 minutes. Based on the data collected during the flight missions, the three flight data in each flight mode are processed as training data, totaling 44,456 time steps. Further preprocessing and reconstruction are performed to obtain the input data structure required by the model. This section of test data contains 6,102 time steps, and the fault is injected at 1 / 2 of the total length.

[0092] Parameter optimization and prediction model analysis:

[0093] (1) Parameter Optimization

[0094] The mean square error (MSE) is used as the loss function for all model training, and Adam is used as the optimizer for model training. In order to find the network hyperparameters close to the optimal value, the grid search method is commonly used. In order to improve the generalization performance of the model, the k-fold cross-validation method can be used to tune the model. The advantage of k-fold cross-validation is that each sample point is only included in the training set or validation set once in each iteration. The reconstructed data set is evenly divided into ten equal parts, one of which is taken out separately as a test set, and the remaining nine are used as training sets and validation sets. For a set of selected hyperparameters, the model is trained nine times. One of the parts is selected as the validation set for each training, and the remaining eight are used for training. During training, a set of optimal hyperparameters and their corresponding optimal models and optimal performance are maintained. If the model performance under the current hyperparameters is better than the currently recorded optimal value, the optimal hyperparameters and optimal performance records are updated, and the training model with the lowest loss among the nine models is selected as the optimal model. The specific optimization process is as follows: Figure 6 As shown in Figure 2, the model training results are as follows: Figure 7 shown.

[0095] (2) Prediction model analysis

[0096] The roll rate is selected as the variable to be diagnosed and the trained masked-SGAT-GRU model is compared with the SGAT-GRU model with the conventional attention mechanism. The attention score of the roll rate is as follows: Figure 8 As shown in Figure 2. Since the attention score is related to the input data, the attention score given here is the average result calculated for the training data.

[0097] In order to verify the effectiveness of the proposed masked-SGAT-GRU model, the performance of masked-SGAT-GRU, SGAT-GRU, GRU and TPA-LSTM in multivariate time series data prediction tasks are compared when four faults, namely, locking, drift, deviation and scaling, occur. The fault model is firstly established as follows to explore the diagnostic effect of the present invention on each fault instance.

[0098] Fault diagnosis modeling: i (t) = a·x i (t)+b·t+c.

[0099] 1) Fault type 1: Deviation fault

[0100] The bias fault formula is y test (t) = x test (t)+std(x train(t)), where the injected deviation fault is 15.2° / s, which is equal to the standard deviation of the training data. The fault value and the true value are shown in Fig. 9 As shown in (a).

[0101] 2) Fault type 2: drift fault

[0102] The drift fault formula is y test (t) = x test (t)+0.01·t, because the sampling frequency of the rolling rate is 10 Hz, the actual injected drift fault is 0.001° / s 2 The fault value and the true value are as follows Fig. 9 As shown in (b).

[0103] 3) Fault type 3: Lock fault

[0104] The lock fault is expressed as y test (t) = std(x train (t)). The locking fault is set to one standard deviation of the training data and is constant at 15.2° / s. The fault value and the true value are shown in Fig. 9 As shown in (c).

[0105] 4) Failure type 4: Scaling failure

[0106] The formula for scaling failure is y test (t) = 2·x test (t), that is, the fault value is set to twice the true value. The fault value and the true value are as follows Fig. 9 As shown in (d).

[0107] In order to verify the superiority of the proposed Masked-SGAT-GRU model, the GRU, TPA-LSTM, SGAT-GRU and masked-SGAT-GRU models are compared, and the results are shown in Table 1. The ROC curve of the model is shown in Fig.10 shown.

[0108] Table 1 Fault diagnosis results

[0109]

[0110] Although the SGAT-GRU and masked-SGAT-GRU models performed slightly worse in the prediction task, they performed well in the fault diagnosis task. Masked-SGAT-GRU achieved the best results in both accuracy and fault detection delay. Taking drift fault as an example, Fig.11 and Fig.12 The actual prediction results of GRU and masked-SGAT-GRU are given.

[0111] It is obvious from the prediction results that since drift faults gradually increase over time, when the fault is just injected, there is only a slight difference between the fault data and the true value, and it is difficult to detect drift faults. The GRU model directly fits the fault data throughout the diagnosis process, while the masked-SGAT-GRU model can detect the fault after a short time of fault injection. Because GRU relies entirely on the historical data of roll angular rate for prediction, while masked-SGAT-GRU makes full use of the spatial dependency of roll angular rate and other parameters. Since the initial injected fault is small, the calculated residual does not exceed the threshold and cannot be judged as a fault. This is also the reason why the ROC curve is far away from the ideal classifier (0,1), even for the masked-SGAT-GRU model.

[0112] The diagnosis of bias faults and lockup faults is easier because the deviation between the fault data and the true value is larger than that of drift faults when the fault occurs, and the masked-SGAT-GRU model uses less information about the variables to be diagnosed. Therefore, the fault diagnosis accuracy and AUC are better than other models.

[0113] However, for scaling faults, the diagnostic effects of the four models are not ideal. The main difference between scaling faults and the other three faults is that scaling faults do not introduce mean deviation when they occur. Since most of the values ​​of the original roll angular rate are concentrated in a small range, even if a scaling fault occurs, such as the 2x scaling fault in the fault diagnosis case, the final residual is often a very small value and will not exceed the threshold to cause a fault alarm. This is also a problem with the fault diagnosis solution based on residuals.

[0114] In summary, the present invention innovatively proposes a masked-SGAT-GRU prediction model based on the basic architecture of the graph attention network. The model learns the spatial dependencies between the parameters of the associated components of the drone, and reduces the self-attention of the parameters through the designed mask mechanism suppression strategy, thereby avoiding excessive reliance on the temporal relationship of the components to be tested during model prediction and increasing the robustness of the model prediction.

[0115] A fault diagnosis method based on EWMA was designed to solve the problem of unstable fault diagnosis results caused by noise jitter in the prediction residual sequence of the masked-SGAT-GRU model, thereby improving the robustness of fault diagnosis.

[0116] In view of the weak interpretability problem caused by the end-to-end modeling of traditional neural network models, the masked-SGAT-GRU model proposed in the present invention has good interpretability. The attention score obtained by model training describes the spatial dependency relationship between different parameters, which realizes the recognition of drone systems to a certain extent.

[0117] Since faults are usually sudden and unpredictable in actual flight missions, four types of fault data are generated through a preset fault injection method. Based on the open source flight control Pixhawk, the model training and test data are obtained by considering two main flight modes, which almost covers all possible nonlinear behaviors of the quadcopter UAV system, ensuring the versatility and robustness of the model.

[0118] Based on the above embodiments, Fig.13 As shown, the present invention also proposes a UAV fault diagnosis system based on a mask graph attention network, comprising:

[0119] A noise filtering unit, used to filter the noise of the collected UAV flight data;

[0120] A sliding reconstruction unit is used to perform sliding reconstruction on the filtered UAV flight data to obtain the association relationship between the UAV system components;

[0121] The spatial feature extraction unit is used to calculate the attention score of each node to the current node through the graph attention network based on the association relationship of the drone system components, and reduce the parameter self-dependence by introducing a mask mechanism;

[0122] A temporal feature extraction unit, used to update the next hidden state by iterating the input and hidden state to extract the temporal features of the input data;

[0123] The output unit is used to convert the output dimension into the required dimension and output the hidden state at the last moment;

[0124] The residual calculation unit is used to eliminate high-frequency jitter in the residual sequence by using an exponential sliding average method, so as to obtain a stable fault diagnosis result.

[0125] The above is only a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A UAV fault diagnosis method based on mask graph attention network, characterized in that: include: Step 1: Filter the noise of the collected UAV flight data; Step 2: Sliding reconstruction of the filtered UAV flight data to obtain the association relationship of the UAV system components; Step 3: Based on the association relationship of the drone system components, the attention score of each node to the current node is calculated through the graph attention network, and the parameter self-dependence is reduced by introducing a mask mechanism; Step 4: Update the next hidden state by iterating the input and hidden state to extract the temporal features of the input data; Step 5: Convert the output dimension to the required dimension and output the hidden state at the last moment; Step 6: Use the exponential moving average method to eliminate high-frequency jitter in the residual sequence to obtain stable fault diagnosis results.

2. The method for UAV fault diagnosis based on mask graph attention network according to claim 1 is characterized in that: In step 1, isolated noise is eliminated by median filtering the collected UAV flight data.

3. The method for UAV fault diagnosis based on mask graph attention network according to claim 1 is characterized in that: In step 3, the attention score of each node to the current node is calculated in the following manner: where W∈R d×2m is the shared weight linear transformation matrix applied to each node, a∈R d is used to calculate the attention score function e i,j The shared attention mechanism, [h i ||h j ]∈R 2m It is the concatenation of two feature vectors, and the LeakyRELU function is a nonlinear activation function.

4. The method for UAV fault diagnosis based on mask graph attention network according to claim 3 is characterized in that: In step 3, reducing the self-dependence of parameters by introducing a mask mechanism includes: where β i,j Indicates a mask.

5. The method for UAV fault diagnosis based on mask graph attention network according to claim 1 is characterized in that: In the step 4, the time feature extraction is performed on the data processed in step 3 specifically through the GRU module.

6. The method for UAV fault diagnosis based on mask graph attention network according to claim 1 is characterized in that: In step 6, the high-frequency jitter in the residual sequence is eliminated by the following formula: e1=R1 where e t and e t-1 Represents the calculation results of the exponential moving average of the current and previous moments, R t is the residual input at the current moment, γ is the empirical coefficient, e1 is the calculation result of the exponential sliding at the initial moment, and R1 is the residual input at the initial moment; Then the average residual is calculated and compared with the fault threshold to determine whether there is a fault.

7. A UAV fault diagnosis system based on mask graph attention network, characterized in that: include: A noise filtering unit, used to filter the noise of the collected UAV flight data; A sliding reconstruction unit is used to perform sliding reconstruction on the filtered UAV flight data to obtain the association relationship between the UAV system components; The spatial feature extraction unit is used to calculate the attention score of each node to the current node through the graph attention network based on the association relationship of the drone system components, and reduce the parameter self-dependence by introducing a mask mechanism; A temporal feature extraction unit, used to update the next hidden state by iterating the input and hidden state to extract the temporal features of the input data; The output unit is used to convert the output dimension into the required dimension and output the hidden state at the last moment; The residual calculation unit is used to eliminate high-frequency jitter in the residual sequence by using an exponential sliding average method, so as to obtain a stable fault diagnosis result.