Unmanned aerial vehicle flight control system data anomaly detection method based on CNN-KFU multiple regression model

Through the UAV flight control system data anomaly detection method based on the CNN-KFU multivariate regression model, the problems of insufficient parameter selection and spatiotemporal relationship learning are solved, and efficient anomaly detection of UAV flight control system data is achieved.

CN120316693BActive Publication Date: 2025-10-10GUIZHOU UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510802514.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-10-10
Estimated Expiration
2045-06-16

AI Technical Summary

Technical Problem

Existing data anomaly detection methods for UAV flight control systems suffer from the problems of ineffective parameter selection and insufficient learning of spatiotemporal relationship knowledge, resulting in poor anomaly detection capabilities in complex flight scenarios.

Method used

A CNN-KFU multivariate regression model is adopted. High correlation parameters are selected through correlation analysis. A model including a bidirectional long short-term memory network is constructed. The adaptive knowledge weight matrix is ​​used for feature fusion. The loss function is defined for training. The anomaly threshold is dynamically updated for detection.

Benefits of technology

It improves the effectiveness of parameter selection, fully explores the spatiotemporal relationship of flight control data, and enhances the model's anomaly detection capability and accuracy in complex flight scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120316693B_ABST
    Figure CN120316693B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of unmanned aerial vehicle sensor anomaly detection methods, and specifically discloses an unmanned aerial vehicle flight control system data anomaly detection method based on a CNN-KFU multivariate regression model. In the unmanned aerial vehicle flight data, different degrees of correlation often exist between the data. First, the correlation analysis method is used to select a data set with high correlation with target data. Second, a multivariate regression neural network model for fine-grained space-time correlation analysis, namely a CNN-KFU, is designed based on a 1D CNN and a KFU. The CNN-KFU is used as a data feature extractor to fully learn the correlation of the flight control data in the time dimension and the space dimension, so that the model can better understand the data features. Finally, the deviation of the regression residual of the test data from the threshold is calculated to realize anomaly determination. The patent aims to solve the problems that the existing technology lacks effectiveness in parameter selection and is insufficient in space-time relationship knowledge learning, thereby causing low anomaly detection capability in a complex flight scene.
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 (UAV) sensor anomaly detection methods, and in particular to a UAV flight control system data anomaly detection method based on a CNN-KFU multiple regression model. Background Art

[0002] With the continuous development of drone technology, its advantages such as high flexibility, ease of operation, and efficient mission execution have led to its widespread application in many fields, including military, agriculture, and transportation. However, as a complex coupled system, the flight control system records flight data that comprehensively reflects the drone's flight status and performance. During actual mission execution, drone flight safety may face many potential dangers and challenges due to factors such as air pressure, wind speed, and terrain. Therefore, by analyzing, learning, and inferring flight control system data, and fully exploring the spatiotemporal correlations between data, drone anomaly detection is of great significance and can further promote the development of drone technology.

[0003] With the continuous development of deep learning in the field of anomaly detection, many researchers have also proposed some advanced methods for anomaly detection in the field of drones. Although deep learning-based methods have achieved good performance in the field of drone anomaly detection, there are still some problems. (1) Due to the large number of parameters in the drone flight control system, most current methods lack effectiveness in the selection of drone flight control parameters. Inappropriate parameter selection may not only increase the consumption of computing resources, but also cause the model to be interfered with by irrelevant parameters and fail to effectively learn key features, thereby limiting its performance in practical applications. (2) Due to the structural characteristics of drones, there is a complex coupling relationship between flight control system data. This relationship is manifested in the mutual influence between different data, that is, the spatial dimension relationship; and the change of the data itself in the time dimension, that is, the time dimension relationship. Although previous methods have good knowledge learning capabilities in the time dimension and feature dimension of drone data, according to current methods, almost all methods use a serial stacked network structure to learn features of drone data. The evolution of these methods is mostly reflected in the change of the number of model layers. When faced with parameters with more complex features, it may be difficult to effectively mine these complex spatiotemporal relationships, resulting in insufficient spatiotemporal relationship knowledge learning, which leads to poor anomaly detection capabilities in complex flight scenarios, or even inability to effectively detect anomalies. (3) In practical applications, drone flight data anomalies are usually manifested as a diversity of anomaly categories and degrees of anomaly; however, many current drone anomaly detection studies have limited ability to detect changes in anomaly degrees; ignoring this complexity may lead to certain limitations in the model in practical tasks.

[0004] For example, Chinese patent publication number CN116821858A discloses a "hybrid model-based method for detecting and recovering anomalies in drone flight data." This approach constructs a 1D CNN-LSTM regression model, reconstructs preprocessed data, and feeds the reconstructed data into the 1D CNN-LSTM regression model to obtain predicted values. The training and test sets are then regressed using the 1D CNN-LSTM regression model to obtain predicted values ​​for the training and test sets. Anomaly detection is then performed based on these predicted values. While this approach can detect anomaly data from drone flights, it still suffers from issues such as insufficient exploration of the spatiotemporal correlations in drone flight control system data, a lack of focus on key knowledge, and insufficient ability to identify anomalies in the face of unusual changes. Summary of the Invention

[0005] In view of the shortcomings of the existing technology, the technical problem solved by the present invention is to provide a data anomaly detection method for a UAV flight control system based on the CNN-KFU multivariate regression model, so as to solve the problems of the existing detection methods such as the lack of effectiveness in the selection of detection parameters and insufficient learning of spatiotemporal relationship knowledge, which leads to the problem of poor anomaly detection ability in complex flight scenarios.

[0006] In order to solve the above problems, the technical solution adopted by the present invention is: a method for detecting data anomalies in a UAV flight control system based on a CNN-KFU multiple regression model, comprising the following steps:

[0007] S1: Analyze the correlation between flight control data through correlation analysis method, and select multiple parameters with high correlation with target parameters from many parameters;

[0008] S2: Build a CNN-KFU multivariate regression model. Use a convolutional neural network layer to perform preliminary feature extraction on the drone flight control system data. This extracted feature is used as the input to a bidirectional long-short-term memory (LSTM) network layer. The bidirectional LSTM network layer consists of two parallel, parameter-unshared BiLSTM structures, defined as F-BiLSTM and T-BiLSTM. The outputs of the F-BiLSTM and T-BiLSTM are weighted by an adaptive knowledge weight matrix and then fused.

[0009] S3: Define the loss function based on the CNN-KFU multivariate regression model;

[0010] S4: According to the UAV flight control parameters selected in step S1, a real UAV flight data set of corresponding parameters is obtained; the flight data is preprocessed, and the flight data set is split into a training set and a test set in a certain ratio;

[0011] S5: The training set is used to train the CNN-KFU model, and the model is trained according to the loss function, and a trained CNN-KFU model is obtained;

[0012] S6: Injecting different degrees of common anomalies to the test set, and inputting the test data with different anomaly degrees into the CNN-KFU model to obtain the prediction result of the test data; the model prediction result is operated with the output data true value corresponding to the input data to obtain the to-be-tested residual error of the test set;

[0013] S7: Inputting the training set data into the CNN-KFU model to obtain the residual error on the training set, which is used for initialization of the abnormal threshold for abnormal data judgment; comparing the to-be-tested residual error of the test set with the abnormal threshold to complete the abnormal judgment.

[0014] The technical principle and beneficial effects of the scheme are:

[0015] Firstly, the model of the scheme uses 1D CNN with simple structure and strong local feature extraction capability to preliminarily extract features of the unmanned aerial vehicle flight control data, secondly, a knowledge fusion unit, i.e. KFU unit, is designed, which is composed of a double-layer parallel bidirectional long short-term memory network and an adaptive fine-grained knowledge weight matrix, and realizes comprehensive and detailed knowledge extraction of the flight control data; due to the non-sharing of parameters between BiLSTM, F-BiLSTM and T-BiLSTM maintain a certain independence in the feature learning process. This independence not only can fully exert the strong learning ability of BiLSTM to time series data, but also makes F-BiLSTM and T-BiLSTM retain individuality in knowledge learning, so as to pay attention to more information in the unmanned aerial vehicle data, realize more extensive and comprehensive knowledge mining of the data, and then through the adaptive knowledge weight matrix, the knowledge in the final hidden layer output of F-BiLSTM and T-BiLSTM is allocated with fine-grained weight, which effectively fuses the information of F-BiLSTM and T-BiLSTM, and further mines important knowledge therein.

[0016] Compared with existing solutions, existing models struggle to effectively analyze and extract features from the complex coupling relationships within UAV flight control data. This leads to inadequate model learning and anomaly detection in this data. This is especially true during complex flight missions, where the severity of anomalies varies. This can result in poor detection of subtle anomalies using existing methods. This solution uses correlation analysis to select multiple parameters with high correlations with the target parameter as model inputs. This improves parameter selection efficiency, reduces computational resource consumption, and prevents the model from being affected by irrelevant parameters, effectively learning key features. Furthermore, this proposed model utilizes a 1D CNN combined with a knowledge fusion unit, employing two unshared F-BiLSTM and T-BiLSTM structures to learn in the temporal and spatial dimensions, respectively. This allows for a more detailed and comprehensive capture of subtle relationships within flight control data, effectively extracting information from the data and comprehensively learning knowledge across both the temporal and spatial dimensions, while focusing on key insights. This design effectively enhances the model's ability to learn the temporal and spatial characteristics of data, making it more suitable for knowledge analysis in complex flight situations.

[0017] Furthermore, in step S1, multiple parameters with the highest correlation with the target parameter are selected in descending order by using the maximum information coefficient. The specific steps are as follows:

[0018] S11: Given a size a b's grid , assuming two variables and , Represents the length of two variables, then a set of ordered pairs can be generated ; The formula for calculating mutual information is as follows:

[0019]

[0020] represents the mutual information between two variables, represents the joint probability density of x and y, and represents the boundary probability density;

[0021] S12: Next, find the division method with the maximum mutual information from different grid divisions. The calculation formula is as follows:

[0022]

[0023] in Indicates the use of grid right Divide, Representation data In the grid The largest ; Then based on the characteristic matrix transformation, the characteristic matrix is ​​calculated as follows:

[0024]

[0025] in are the elements of the normalized feature matrix;

[0026] S13: The End The calculation of is as follows:

[0027]

[0028] in Indicates the maximum value of the grid, through The value is compared with the given correlation threshold to determine and The correlation between the two parameters was calculated; and the MIC values ​​were arranged from high to low, and the first several parameters and the target parameters were selected as the input parameters of the model.

[0029] Due to the complexity of drone data, many flight parameters often exhibit nonlinear correlations. Parameter selection is crucial for fully learning the temporal and spatial correlations between drone data. Appropriate parameter selection not only improves the model's robustness and generalization capabilities, but also reduces computational resource waste. Compared to previous methods, MIC (Maximum Information Coefficient) does not rely on expert experience and can exploit nonlinear correlations between data. Therefore, MIC (Maximum Information Coefficient) offers unique advantages in parameter selection for the unique context of drones, effectively analyzing both linear and nonlinear relationships between drone flight control data. MIC values ​​range from 0 to 1, with larger values ​​indicating stronger correlation between the two variables. Parameters with the target parameter are ranked from highest to lowest, and the top-ranked parameters are selected together with the target parameter as the model input.

[0030] The MIC-based feature selection method is more consistent with the characteristics of drone data and can maximize the screening of valuable data. This not only effectively reduces the resource consumption caused by irrelevant parameters, but also provides a more accurate knowledge base for subsequent feature extraction, making the model more efficient and accurate in mining key features.

[0031] Furthermore, the specific steps of constructing the CNN-KFU multiple regression model in step S2 are as follows:

[0032] S21: Perform preliminary feature extraction on the drone flight control system data through a convolutional neural network. The calculation formula is as follows:

[0033]

[0034] wherein, represents the output of the data through the jth convolution kernel, represents a bias vector, represents an activation function;

[0035] S22: The extracted features are taken as the input of the bidirectional long short-term memory network layer. In the BiLSTM layer, two parallel and parameter-unshared BiLSTM structures are defined as F-BiLSTM and T-BiLSTM. The outputs of F-BiLSTM and T-BiLSTM are respectively weighted by an adaptive knowledge weight matrix; wherein the adaptive knowledge weight matrix is composed of learnable parameters, the initial value is set to 1, and is automatically updated through back propagation; in the BiLSTM layer hidden state and adaptive weight matrix calculation process, the output of the final hidden layer in the BiLSTM layer, F-BiLSTM is weighted by the knowledge weight matrix to obtain , and the output of the final hidden layer in the BiLSTM layer, T-BiLSTM is weighted by the knowledge weight matrix to obtain , represents the number of features of the final hidden layer output of the BiLSTM layer, and the calculation process is as follows:

[0036]

[0037] wherein, represents a fine-grained adaptive knowledge weight matrix, which contains two groups of automatically learnable parameters and , which can automatically update the parameters to the optimal through back propagation; represents and , the elements in the corresponding positions are multiplied, and , the elements in the corresponding positions are multiplied;

[0038] S23: The two BiLSTM layer hidden layers calculated by the adaptive weight matrix are added, and the calculation formula is as follows:

[0039]

[0040] represents the input feature for prediction, represents and , the elements in the corresponding positions are added.

[0041] Furthermore, the loss function formula in step S3 is expressed as follows:

[0042]

[0043] in and Represent the predicted value and true value at time T respectively. The training process of the model is based on back propagation, which continuously updates the parameter values ​​in the model. For the input data R, after the model CNN-KFU extracts features in the time dimension and the space dimension, the predicted value at the next moment is obtained. , through continuous model training and optimization according to the loss function during the training process, and The values ​​between them are getting closer and closer.

[0044] Furthermore, in step S4, the data set is split into a training set and a test set at a ratio of 8:2, and the data is preprocessed using the max-min normalization method. The normalization calculation process is as follows:

[0045]

[0046] in Represents the data of the training set or test set in the flight control data. represents the minimum value in the training set, Represents the maximum value in the training set. Normalization reduces the impact of different parameter dimensions and units across drone flight control system data on model learning. Standardizing each parameter before model training helps accelerate model convergence and improve model robustness.

[0047] Furthermore, the common anomalies in step S6 include deviation anomalies and drift anomalies. The deviation anomalies and drift anomalies are injected into the target parameters of the test set. The calculation formulas of the deviation anomaly and drift anomaly are as follows:

[0048]

[0049] in Indicates abnormal deviation. Indicates the normal raw data of the drone; is a constant that indicates the degree of deviation between abnormal and normal data;

[0050]

[0051] in Indicates abnormal drift. Indicates the normal raw data of the drone; is a function of time, indicating the change of the drift anomaly and the normal data.

[0052] In the model training experiment, the common anomalies of UAV sensor data, i.e. bias anomaly and drift anomaly, are injected into the navigation eastward velocity. Then the trained model is tested to verify the prediction effect of the model.

[0053] Further, the model residual calculation formula in step S6 is as follows:

[0054]

[0055] wherein represents the prediction residual of the prediction result and the actual data at time T after square difference calculation, and is used to measure the score of the data point anomaly at time T, The higher the score is, the greater the deviation between the prediction result and the actual data is, i.e. the higher the abnormality degree is.

[0056] Further, the anomaly threshold in step S7 adopts a dynamic threshold, and the specific steps are as follows:

[0057] S71: The dynamic threshold is initialized by the residual of the training set, and the calculation formula is as follows:

[0058]

[0059] is the threshold value calculated, is the residual on the training set, which is used to initialize the data anomaly score, is the residual on the test set, is the risk probability coefficient, is the dynamic peak over threshold method; by the residual score is observed, and the threshold value is constantly estimated and updated;

[0060] S72: The anomaly detection formula is as follows:

[0061]

[0062] wherein is 1 indicating abnormality, and is 0 indicating normality, is the calculated anomaly score, is the threshold value.

[0063] The residual on the training set is used to initialize the anomaly threshold, and the residual on the test set is used to dynamically update the anomaly threshold, so that the model can constantly update the threshold value in the process of anomaly judgment, and thus the prediction accuracy of the model is improved.

[0064] Furthermore, during model training in step S5, the learning rate is set to 0.0002, the training batch size is set to 256, the time step is set to 20, and the number of training times is 100.

[0065] Furthermore, the target parameter in step S1 is selected as navigation east speed. Among the many parameters of a drone, navigation east speed is a crucial speed parameter in the drone's flight control system. It represents the drone's eastward movement speed and is typically calculated by a navigation system (such as GPS or an inertial navigation system). It plays a crucial role in analyzing the drone's horizontal motion, enabling precise understanding of the drone's east-west movement during path planning and flight trajectory tracking. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 A flow chart of a method for detecting data anomalies in a UAV flight control system based on a CNN-KFU model provided by an embodiment of the present invention;

[0067] Figure 2 Framework diagram of the method for detecting data anomalies in a UAV flight control system based on the CNN-KFU model provided by the present invention;

[0068] Figure 3 Parameter diagram of the model network structure of the method for detecting data anomaly in the UAV flight control system based on the CNN-KFU model provided by the present invention;

[0069] Figure 4 A schematic diagram comparing common abnormalities of different degrees provided for the implementation of the present invention;

[0070] Figure 5 A schematic diagram of anomaly identification using the CNN-KFU model-based UAV flight control system data anomaly detection method provided for the implementation of the present invention. DETAILED DESCRIPTION

[0071] The following is further described in detail through specific implementation methods:

[0072] Basically as attached Figure 1 As shown in the figure: A method for detecting anomaly in the data of a UAV flight control system based on a CNN-KFU multivariate regression model, comprising the following steps:

[0073] S1: Analyze the correlation between flight control data using the correlation analysis method, and select multiple parameters with high correlation with the target parameters from among the numerous parameters; the specific steps are as follows;

[0074] S11: Given a size a b's grid , assuming two variables and , Represents the length of two variables, then a set of ordered pairs can be generated ; The formula for calculating mutual information is as follows:

[0075]

[0076] represents the mutual information between two variables, represents the joint probability density of x and y, and represents the boundary probability density;

[0077] S12: Next, find the division method with the largest mutual information from different grid divisions. The calculation formula is as follows:

[0078]

[0079] in Indicates the use of grid right Divide, Representation data In the grid The largest ; Then based on the characteristic matrix transformation, the characteristic matrix is ​​calculated as follows:

[0080]

[0081] in are the elements of the normalized feature matrix;

[0082] S13: The End The calculation of is as follows:

[0083]

[0084] in Indicates the maximum value of the grid, through The value is compared with the given correlation threshold to determine and The correlation between the two parameters was calculated; and the MIC values ​​were arranged from high to low, and the first several parameters and the target parameters were selected as the input parameters of the model.

[0085] Among the many parameters of a drone, navigation east velocity is a crucial speed parameter in the drone's flight control system. It represents the drone's eastward movement speed and is typically calculated by a navigation system such as GPS or an inertial navigation system. Navigation east velocity plays a crucial role in analyzing a drone's horizontal motion, enabling precise understanding of its east-west movement during path planning and flight trajectory tracking. Therefore, navigation east velocity was selected as the target parameter in this case.

[0086] Due to the complexity of drone data, there is often a nonlinear correlation between many flight parameters. In order to fully learn the correlation between drone data in the time dimension and spatial dimension, parameter selection is an extremely important step; appropriate parameter selection can not only improve the robustness and generalization ability of the model, but also reduce the waste of computing resources. Compared with previous methods, the maximum information coefficient, or MIC, does not rely on expert experience and can mine the nonlinear correlation between data. Therefore, in the parameter selection of the special system of drones, the maximum information coefficient has a unique advantage and can effectively analyze the linear and nonlinear relationship between drone flight control data; the value of MIC is in the range of 0 to 1, and the larger the value, the stronger the correlation between the two variables; the MIC values ​​are arranged from high to low, and this embodiment selects the top 5 parameters and the target parameters as the input parameters of the model. The parameters selected after calculation are shown in Table 1 below.

[0087] Table 1 Model parameter selection

[0088]

[0089] S2: Construct a CNN-KFU multivariate regression model, perform preliminary feature extraction on the UAV flight control system data through a layer of convolutional neural network, and use the extracted features as the input of the bidirectional long short-term memory network layer. The bidirectional long short-term memory network layer includes two parallel BiLSTM structures with non-shared parameters, defined as F-BiLSTM and T-BiLSTM; the outputs of F-BiLSTM and T-BiLSTM are weighted by the adaptive knowledge weight matrix and then fused; the network structure parameters of each layer in the CNN-KFU model are shown in the attached figure. Figure 3 As shown, the specific steps are as follows;

[0090] S21: Perform preliminary feature extraction on the drone flight control system data through a convolutional neural network. The calculation formula is as follows:

[0091]

[0092] in, Represents the output of the data after the j-th convolution kernel. represents the bias vector, represents the activation function;

[0093] S22: The extracted features are used as the input of the bidirectional long short-term memory network layer, and the outputs of F-BiLSTM and T-BiLSTM are weighted by the adaptive knowledge weight matrix respectively; Composed of learnable parameters, initial value is set to 1, and is automatically updated through back propagation; in the process of calculating the adaptive weight matrix and the hidden state of the BiLSTM layer, the output of the final hidden layer of the F-BiLSTM in the BiLSTM layer is After weighting by the knowledge weight matrix , The output of the final hidden layer of the T-BiLSTM After weighting by the knowledge weight matrix , , The feature number of the output of the final hidden layer of the BiLSTM layer is represented, and the calculation process is as follows:

[0094]

[0095] Among them, The fine-grained adaptive knowledge weight matrix contains two groups of automatically learnable parameters And , which can automatically update the parameters to the optimal through back propagation. The element in is multiplied by the element in the corresponding position, The element in is multiplied by the element in the corresponding position;

[0096] S23: Add the two BiLSTM layer hidden layers calculated by the adaptive weight matrix , and the calculation formula is as follows:

[0097]

[0098] The input feature used for prediction is represented, The element in is added to the element in the corresponding position.

[0099] S24: Finally, map multiple features of the output to an output result through a linear layer.

[0100] S3: Define the loss function according to the CNN-KFU multiple regression model; the formula is as follows:

[0101]

[0102] Among them And ​​Represent the predicted value and true value at time T respectively. The training process of the model is based on back propagation, which continuously updates the parameter values ​​in the model. For the input data R, after the model CNN-KFU extracts features in the time dimension and the space dimension, the predicted value at the next moment is obtained. , through continuous model training and optimization according to the loss function during the training process, and The values ​​between them are getting closer and closer.

[0103] S4: Based on the UAV flight control parameters selected in step S1, obtain a real UAV flight data set with the corresponding parameters; preprocess the flight data and split the data set into a training set and a test set in a ratio of 8:2; and use the max-min normalization method to preprocess the data. The normalization calculation process is as follows:

[0104]

[0105] in Represents the data of the training set or test set in the flight control data. represents the minimum value in the training set, Represents the maximum value in the training set. Normalization reduces the impact of different parameter dimensions and units across drone flight control system data on model learning. Standardizing each parameter before model training helps accelerate model convergence and improve model robustness.

[0106] This example uses a real drone flight dataset from Minnesota Flight 98. The interval between each sample in the data is 20ms, and the total sample length is 21,015. The experimental data is captured after takeoff and before landing, with the interval [3201:19800] and a total length of 16,600. 80% of the data is used as the training set, and 20% as the test set. Specifically, the interval [1:13280] is used as the training set, with a total length of 13,280; the interval [13281:16600] is used as the test set, with a total length of 3,320. The interval for anomaly injection is [15281;16600], with a total length of 1320, and the anomaly rate is 0.0795. To reduce the impact of different parameter dimensions and units across the drone flight control system data on model learning, each parameter is normalized before model training. This helps accelerate model convergence and improve model robustness. In the specific operation, the maximum and minimum values ​​of the flight control parameters are used to normalize the training set and the test set. It is worth noting that the normalization parameters of the training set and the test set are and All come from the training set.

[0107] S5: Use the training set to train the CNN-KFU model, and train the model according to the loss function to obtain a trained CNN-KFU model. In the training experiment of this embodiment, the experimental device includes an Intel Core i7-10700k @ 3.80GHz octa-core, 128GB RAM (Samsung DDR4 3200MHz 32GB * 4), an NVIDIA GeForce RTX2080 Super GPU (8GB), Windows 11 (64-bit), and PyTorch 1.8 + cull. During model training, the training batch size is set to 256, the time step is set to 20, and the number of training times is 100. Adaptive weight matrix The value in , Initialize all settings to 1.

[0108] S6: Inject common anomalies of varying degrees into the test set to verify the model's ability to identify anomalies. Input test data with varying degrees of anomaly into the CNN-KFU model to obtain predictions for the test data. Compare the model's predictions with the true values ​​of the output data corresponding to the input data to obtain the residuals to be tested on the test set. The specific steps are as follows:

[0109] S61: Inject the deviation anomaly and drift anomaly into the target parameters of the test set. The calculation formulas for the deviation anomaly and drift anomaly are as follows:

[0110]

[0111] in Indicates abnormal deviation. Indicates the normal raw data of the drone; is a constant that indicates the degree of deviation between abnormal and normal data;

[0112]

[0113] in Indicates abnormal drift. Indicates the normal raw data of the drone; It is a function that changes with time and represents the change of drift anomaly and normal data.

[0114] S62: The formula for calculating the model residual is as follows:

[0115]

[0116] in It represents the prediction residual obtained by calculating the square difference between the prediction result at time T and the actual data, which is used to measure the abnormal score of the data point at time T. The higher the score, the greater the deviation of the predicted results from the actual data, that is, the higher the degree of abnormality.

[0117] During the flight, the UAV is in a normal state most of the time, and abnormal flight occurs only in a few cases. Since the UAV itself is expensive, if abnormal flight data is to be obtained, artificially creating abnormal flight in a real-world scenario may pose an uncontrollable risk, leading to serious consequences such as crashes, injuries, and property damage. Such potential losses not only affect economic costs but also threaten safety. Therefore, in the experiment, common anomalies of UAV sensor data are used without introducing artificially created abnormal flight data. By injecting common deviation anomalies and drift anomalies into the navigation eastward velocity, the model's abnormality identification and prediction are verified.

[0118] S7: input the training set data into the CNN-KFU model to obtain the residual error on the training set, which is used to initialize the abnormal threshold for abnormal data judgment; compare the test set residual error to be tested with the abnormal threshold to complete the abnormality judgment. The abnormal threshold is a dynamic threshold, and the specific steps are as follows:

[0119] S71: the dynamic threshold is initialized by the residual error of the training set, and the calculation formula is as follows:

[0120]

[0121] The threshold value calculated is The residual error on the training set is used to initialize the data anomaly score, The residual error on the test set is The risk probability coefficient is The dynamic peak over threshold method is used; the threshold value is estimated and updated by The residual error score is observed, and the threshold value is constantly estimated and updated;

[0122] S72: the abnormality detection formula is as follows:

[0123]

[0124] Wherein 1 indicates abnormality, and 0 indicates normality, The abnormal score is calculated, The threshold value is

[0125] The abnormal threshold is initialized by the residual error on the training set, and the residual error on the test set is used to dynamically update the abnormal threshold, so that the model can constantly update the threshold during the abnormality judgment process, thereby improving the accuracy of the model prediction.

[0126] In drone anomaly detection tasks, the focus is on the model's ability to detect and identify anomalous data. To test the model's capabilities, we use standard evaluation metrics for anomaly detection tasks, namely F1 score, accuracy (ACC), true positive rate (TPR), and false positive rate (FPR).

[0127]

[0128]

[0129]

[0130]

[0131] Among them, TP and FP represent the truly detected anomalies and the falsely detected anomalies, respectively, while TN and FN represent the correctly classified normal samples and the falsely classified normal samples, respectively. The F1 score is a comprehensive reflection of the precision rate (Pre) and the recall rate (Rec), and is used to comprehensively consider the algorithm's anomaly detection ability indicators. The higher the F1 score, the better the model performance; ACC is used to evaluate the model's ability to correctly detect the overall sample; TPR represents the ratio of correctly identified abnormal samples to all actual abnormal samples, that is, the proportion of anomalies correctly identified by the model to the total anomalies; FPR represents the ratio of falsely detected abnormal samples to all actual normal samples, that is, the ratio of normal samples mistakenly judged as abnormal.

[0132] At the same time, in order to verify the effectiveness of the CNN-KFU model, we selected the current advanced anomaly detection models, including LSTM, LSTM-RF, STC-LSTM-AE, CA-1DCL-EF, MTAD-GAT, and CNN-BiGRU, a total of 6 benchmark methods, for comparative experiments. In order to fully verify the anomaly recognition ability of each model, in this case, different degrees of deviation anomalies and drift anomalies were designed in the navigation eastward speed, such as Figure 4 shown.

[0133] The differences between CNN-KFU and the other six baseline models in various degrees of abnormality are shown below. In experiment (a), the deviation abnormality is set to 3.5 and the drift abnormality range is [3.5, 4.5]. The experimental results are shown in Table 2; in experiment (b), the deviation abnormality is set to 5 and the drift abnormality range is [5, 6]. The experimental results are shown in Table 3; in experiment (c), the deviation abnormality is set to 7 and the drift abnormality range is [6, 8]. The experimental results are shown in Table 4.

[0134] Table 2

[0135]

[0136] Table 3

[0137]

[0138] Table 4

[0139]

[0140] Analysis of the three sets of experiments revealed that varying degrees of anomalies affect the model's anomaly recognition capabilities; generally, the greater the anomaly, the stronger the model's recognition ability. LSTM performed poorly overall among all models, with a high false positive rate. This is primarily due to the LSTM model's focus on learning temporal features, potentially neglecting other useful information. LSTM-RF, on the other hand, adds residual filtering to LSTM, which somewhat reduces the impact of noise on anomaly detection, significantly improving its ability to detect various anomalies. This also confirms that noise in data collected by real drone flight control systems can affect anomaly detection. Both CA-1DCL-EF and CNN-BiGRU combine CNN's ability to learn local features. Specifically, CA-1DCL-EF combines CNN, LSTM, and residual filtering, while CNN-BiGRU combines CNN with BiGRU. The two methods achieve similar detection performance for the two types of anomalies to varying degrees. The results in experiment (c) show that the F1 scores for deviation and drift anomalies for CA-1DCL-EF and CNN-BiGRU both exceed 90%, indicating that combining CNN's local feature extraction capabilities with its temporal feature extraction capabilities (LSTM, BiGRU) is more capable of capturing effective features between flight data and improving the model's anomaly detection capabilities. In comparison, STC-LSTM-AE and MTAD-GAT have similar anomaly detection results, with both showing outstanding performance. This is likely due to the fact that STC-LSTM-AE combines LSTM and AE, using encoding and decoding to focus on important features between flight data while minimizing noise interference in anomaly detection. MTAD-GAT, on the other hand, leverages the advantages of both reconstruction-based and prediction-based approaches, and uses a dual-graph attention mechanism to focus on both the temporal and spatial dimensions of time series data, effectively mining the spatiotemporal information between the data.

[0141] Compared with the above baseline model, the CNN-KFU multiple regression model based on the embodiment is always optimal and stable in deviation anomaly and drift anomaly under different anomaly degrees, and the F1 score is always greater than 90%. In experiment (a), the F1 scores of deviation anomaly and drift anomaly are 94.14% and 94.44% respectively under the lightest anomaly degree, which are significantly higher than those of other baseline models; in experiment (b), the performance is still stable under more serious anomaly, and is obviously better than that of other baseline models; in experiment (c), the F1 scores of deviation anomaly and drift anomaly are 97.04% and 96.96% respectively under the most serious anomaly, which are increased by 1.97% and 2.5% respectively compared with the best baseline.

[0142] The reason why the model of the application is always stable and performs well is mainly because the CNN-KFU is obviously different from the previous model, and the combination of single-layer CNN and knowledge fusion unit (FKU) realizes the fine-grained spatiotemporal feature mining of flight data. This method can effectively capture the key features in flight data, so as to perform significantly superior in dealing with different types and degrees of anomaly. The results show that the model of the application can more stably perform the anomaly detection task when facing the scene with varying anomaly degrees, and exhibits strong robustness and adaptability.

[0143] The embodiment provides a multiple regression neural network model based on one-dimensional convolutional neural network and knowledge fusion, which analyzes fine-grained spatiotemporal correlation. Compared with existing advanced methods, the model can perform stably and excellently in deviation anomaly and drift anomaly under various degrees by using the anomaly injection method in the real flight unmanned aerial vehicle data set, and can effectively detect abnormal data. The experimental results show that the designed CNN-KFU model can fully mine the relationship between the time dimension and the spatial feature dimension of flight data by one-dimensional CNN and knowledge fusion unit, and ensure the accuracy and timeliness of anomaly detection.

[0144] The above is only an embodiment of the application, and the well-known specific structures and characteristics in the scheme are not described in detail. It should be pointed out that for those skilled in the art, without departing from the structure of the application, a number of modifications and improvements can be made, which should be regarded as the protection scope of the application, and these will not affect the effect and practicality of the application. The protection scope claimed in the application should be subject to the content of its claims, and the specific implementation mode and the like recorded in the specification can be used to explain the content of the claims.

Claims

1. A method for detecting anomaly in UAV flight control system data based on CNN-KFU multivariate regression model, characterized by: The method comprises the following steps: S1: Analyze the correlation between flight control data using a correlation analysis method, and select multiple parameters with a high correlation with the target parameter from among the numerous parameters. The numerous parameters are navigation east speed, GPS altitude, GPS latitude, GPS north speed, GPS east speed, and GPS descent speed collected by the UAV flight control system. The selected target parameter is navigation east speed. S2: Build a CNN-KFU multivariate regression model. Use a convolutional neural network layer to perform preliminary feature extraction on the drone flight control system data. This extracted feature is used as the input to a bidirectional long-short-term memory (LSTM) network layer. The bidirectional LSTM network layer consists of two parallel, parameter-unshared BiLSTM structures, defined as F-BiLSTM and T-BiLSTM. The outputs of the F-BiLSTM and T-BiLSTM are weighted by an adaptive knowledge weight matrix and then fused. The specific steps of constructing the CNN-KFU multiple regression model in step S2 are as follows: S21: Perform preliminary feature extraction on the drone flight control system data through a convolutional neural network. The calculation formula is as follows: in, Represents the output of the data after the j-th convolution kernel. represents the bias vector, represents the activation function; S22: The extracted features are used as the input of the bidirectional long short-term memory network layer. In the BiLSTM layer, two parallel BiLSTM structures with non-shared parameters are defined as F-BiLSTM and T-BiLSTM. The outputs of F-BiLSTM and T-BiLSTM are weighted by the adaptive knowledge weight matrix respectively. It consists of learnable parameters, with the initial value set to 1, which is automatically updated through back propagation. In the process of calculating the hidden state and adaptive weight matrix of the BiLSTM layer, the output of the final hidden layer of the F-BiLSTM in the BiLSTM layer is converted to Through the knowledge weight matrix After weighting, we get , the output of the final hidden layer of T-BiLSTM Through the knowledge weight matrix After weighting, we get , Represents the number of features output by the final hidden layer of the BiLSTM layer. The calculation process is as follows: in, Represents the knowledge weight matrix for fine-grained adaptation, which contains two sets of parameters that can be automatically learned and , can automatically update the parameters to the optimal level through back propagation; express and Multiply the elements at corresponding positions in , and Multiply the elements at corresponding positions in ; S23: will pass through the adaptive weight matrix The two BiLSTM hidden layers are added together, and the calculation formula is as follows: represents the input features used for prediction, express and Add the elements at corresponding positions in ; S3: Define the loss function based on the CNN-KFU multivariate regression model; S4: Based on the UAV flight control parameters selected in step S1, a real UAV flight data set with corresponding parameters is obtained; the flight data is preprocessed and the flight data set is split into a training set and a test set with an 8:2 ratio; S5: Use the training set to train the CNN-KFU model, and train the model according to the loss function to obtain a trained CNN-KFU model; S6: Inject common anomalies of varying degrees into the test set and feed the test data with varying degrees of anomalies into the CNN-KFU model to obtain predictions for the test data. Calculate the model predictions and the true values ​​of the data to obtain the residuals to be tested for the test set. S7: Input the training set data into the CNN-KFU model to obtain the residual on the training set, which is used to initialize the anomaly threshold for abnormal data judgment; compare the residual to be tested in the test set with the anomaly threshold to complete the anomaly judgment.

2. The method for detecting anomaly in UAV flight control system data based on the CNN-KFU multiple regression model according to claim 1 is characterized in that: In step S1, multiple parameters with the highest correlation values ​​with the target parameter are selected in descending order by using the maximum information coefficient. The specific steps are as follows: S11: Given a size a b's grid , assuming two variables and , Represents the length of two variables, then a set of ordered pairs can be generated ; The formula for calculating mutual information is as follows: represents the mutual information between two variables, represents the joint probability density of x and y, and represents the boundary probability density; S12: Next, find the division method with the maximum mutual information from different grid divisions. The calculation formula is as follows: in Indicates the use of grid right Divide, Representation data In the grid The largest ; Then based on the characteristic matrix transformation, the characteristic matrix is ​​calculated as follows: in are the elements of the normalized feature matrix; S13: The End The calculation of is as follows: in Indicates the maximum value of the grid, through The value is compared with the given correlation threshold to determine and correlation.

3. The method for detecting anomaly in UAV flight control system data based on the CNN-KFU multiple regression model according to claim 1 is characterized in that: The loss function formula in step S3 is expressed as follows: in and Represent the predicted value and true value at time T respectively.

4. The method for detecting anomaly in UAV flight control system data based on the CNN-KFU multiple regression model according to claim 1 is characterized in that: In step S4, the data set is split into a training set and a test set at a ratio of 8:2, and the data is preprocessed using the max-min normalization method. The normalization calculation process is as follows: in Represents the data of the training set or test set in the flight control data. represents the minimum value in the training set, Represents the maximum value in the training set.

5. The method for detecting anomaly in UAV flight control system data based on CNN-KFU multiple regression model according to claim 1 is characterized in that: The common anomalies in step S6 include deviation anomalies and drift anomalies. The deviation anomalies and drift anomalies are injected into the target parameters of the test set. The calculation formulas of the deviation anomalies and drift anomalies are as follows: in Indicates abnormal deviation. Indicates the normal raw data of the drone; is a constant that indicates the degree of deviation between abnormal and normal data; in Indicates abnormal drift. Indicates the normal raw data of the drone; It is a function that changes with time and represents the change of drift anomaly and normal data.

6. The method for detecting anomaly in UAV flight control system data based on CNN-KFU multiple regression model according to claim 1, characterized in that: The model residual calculation formula in step S6 is as follows: in It represents the prediction residual obtained by calculating the square difference between the prediction result at time T and the actual data, which is used to measure the abnormal score of the data point at time T. The higher the score, the greater the deviation between the predicted result and the actual data, that is, the higher the degree of abnormality.

7. The method for detecting anomaly in UAV flight control system data based on CNN-KFU multiple regression model according to claim 1, characterized in that: The abnormal threshold in step S7 adopts a dynamic threshold, and the specific steps are as follows: S71: The dynamic threshold is initialized by the residual of the training set, and the calculation formula is as follows: is the calculated threshold value, is the residual on the training set, used to initialize the data anomaly score, is the residual on the test set, is the risk probability coefficient, It is the dynamic peak threshold method; pass Observe the residual score and continuously estimate and update the threshold; S72: The anomaly detection formula is as follows: in 1 indicates abnormality, 0 indicates normality. is the calculated anomaly score, is the threshold.

8. The method for detecting anomaly in UAV flight control system data based on CNN-KFU multiple regression model according to claim 1, characterized in that: During model training in step S5, the learning rate is set to 0.0002, the training batch size is set to 256, the time step is set to 20, and the number of training times is 100.

9. The method for detecting anomaly in UAV flight control system data based on CNN-KFU multiple regression model according to claim 1, characterized in that: The target parameter in step S1 is selected as the navigation eastward speed.

Citation Information

Patent Citations

  • Flight data anomaly detection and recovery method based on spatio-temporal correlation multiple regression

    CN116720149A

  • Unmanned aerial vehicle flight data anomaly detection and recovery method based on hybrid model

    CN116821858A