Unmanned aerial vehicle flight control system data anomaly detection method based on CNN-KFU multiple regression model
The CNN-KFU model addresses parameter inefficiencies and inadequate time-space learning in drone fly-control systems by selecting relevant parameters and using BiLSTM networks for enhanced feature extraction and knowledge fusion, improving anomaly detection in complex flight scenarios.
Patent Information
- Application Number
- CN202510802514.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-16
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2045-06-16
AI Technical Summary
The existing data abnormality detection methods of unmanned aerial vehicle flight control system have problems such as lack of validity in parameter selection and insufficient learning of spatial and temporal relationship knowledge, resulting in low abnormality detection capabilities in complex flight scenarios.
Using the CNN-KFU multiple regression model, high correlation parameters are selected through correlation analysis, CNN-KFU multiple regression model is constructed, a convolutional neural network is used for feature extraction, and feature fusion is performed through the bidirectional long and short-term memory network layer (BiLSTM), knowledge fusion is performed by combining the adaptive knowledge weight matrix, and loss function is defined for training and abnormal judgment.
It improves the effectiveness of parameter selection, reduces computing resource consumption, can learn more comprehensively the spatio-temporal relationship of flight control data, and improves the accuracy and adaptability of abnormal detection, especially in complex flight scenarios.
Smart Images

Figure CN120316693A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of abnormal detection methods for unmanned aerial vehicle sensors, and particularly to an abnormal detection method for flight control system data of an unmanned aerial vehicle based on a CNN-KFU multiple regression model. Background Technique
[0002] With the continuous development of unmanned aerial vehicle technology, due to its advantages such as high flexibility, simple operation, and efficient task execution, it is widely used in many fields such as military, agriculture, and transportation. However, as a complex coupled system, the flight control system of an unmanned aerial vehicle records flight data that comprehensively reflects the flight state and performance of the unmanned aerial vehicle; during the actual task execution process, affected by factors such as air pressure, wind speed, and terrain, the flight safety of the unmanned aerial vehicle may face many potential dangers and challenges. Therefore, by analyzing, learning, and inferring the data of the flight control system, fully excavating the spatio-temporal correlation existing between the data, it is of great significance for realizing the abnormal detection of unmanned aerial vehicles and can further promote the development of unmanned aerial vehicle technology.
[0003] With the continuous development of deep learning in the field of abnormal detection, at present, many researchers have also proposed some advanced methods for abnormal detection in the field of unmanned aerial vehicles. Although the methods based on deep learning have achieved good performance in the field of unmanned aerial vehicle abnormal detection, there are still some problems. (1) Due to the large number of parameters in the flight control system of an unmanned aerial vehicle, most current methods lack effectiveness in the selection of unmanned aerial vehicle flight control parameters. Inappropriate parameter selection may not only increase the consumption of computing resources but also cause the model to be interfered by irrelevant parameters and unable to effectively learn key features, thus limiting its performance in practical applications. (2) Due to the structural characteristics of an unmanned aerial vehicle, there are complex coupling relationships between the data of the flight control system. 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 the previous methods have good knowledge learning ability in the time dimension and feature dimension of unmanned aerial vehicle data, according to the current methods, almost all methods use the serial stacked network structure to perform feature learning on the data of unmanned aerial vehicles, and the evolution of these methods mostly presents changes in the number of model layers. When facing more complex parameters of features, it may be difficult to effectively mine these complex spatio-temporal relationships, resulting in insufficient knowledge learning of spatio-temporal relationships and thus leading to the problem of low abnormal detection ability in complex flight scenarios, and even unable to effectively detect abnormal situations. (3) In practical applications, the anomalies in unmanned aerial vehicle flight data usually show the diversity of anomaly categories and anomaly degrees; however, at present, many studies on unmanned aerial vehicle anomaly detection have limited ability to detect changes in anomaly degrees; if this complexity is ignored, it may lead to certain limitations of the model in actual tasks.
[0004] For example, Chinese Patent Publication No. CN116821858A discloses a "method for detecting and recovering abnormal UAV flight data based on a hybrid model". In this solution, a 1D CNN-LSTM regression model is constructed; the preprocessed data is reconstructed, and the reconstructed data is input into the 1D CNN-LSTM regression model to obtain predicted values. The training set and the test set are subjected to regression calculations through the 1D CNN-LSTM regression model to obtain the predicted values of the training set and the test set, and abnormal detection is performed based on the predicted values of the training set and the test set. Although the above solution can detect abnormal UAV flight data, there are still problems such as insufficient mining of the spatio-temporal correlation of UAV flight control system data, lack of attention to important knowledge, and insufficient abnormal recognition ability in the case of abnormal changes. Summary of the Invention
[0005] Aiming at the deficiencies of the prior art, the technical problem solved by the present invention is to provide a method for detecting abnormal UAV flight control system data based on a CNN-KFU multiple regression model, which solves the problems of lack of effectiveness in selecting detection parameters and insufficient learning of spatio-temporal relationship knowledge in the existing detection methods, resulting in low abnormal detection ability in complex flight scenarios.
[0006] To solve the above problems, the technical solution adopted by the present invention is: A method for detecting abnormal UAV flight control system data based on a CNN-KFU multiple regression model, comprising the following steps: S1: Analyze the correlation between flight control data through a correlation analysis method, and select multiple parameters with high correlation with the target parameter from among many parameters; S2: Construct a CNN-KFU multiple regression model. Perform preliminary feature extraction on the UAV flight control system data through a convolutional neural network layer, 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; and the outputs of F-BiLSTM and T-BiLSTM are respectively weighted by an adaptive knowledge weight matrix and then fused; S3: Define a loss function according to the CNN-KFU multiple regression model; S4: According to the UAV flight control parameters selected in step S1, obtain the real UAV flight data set corresponding to the parameters; preprocess the flight data, and split the flight data set into a training set and a test set at a certain 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 different degrees into the test set, input the test data with different anomaly degrees into the CNN-KFU model, and obtain the prediction results of the test data; perform an operation on the model prediction results and the true values of the output data corresponding to the input data to obtain the residuals to be measured of the test set. S7: Input the training set data into the CNN-KFU model to obtain the residuals on the training set for initializing the anomaly thresholds for anomaly data judgment; compare the residuals to be measured of the test set with the anomaly thresholds to complete the anomaly judgment.
[0007] The technical principle and beneficial effects of this solution are as follows: First, the model of this solution initially extracts features from UAV flight control data by using 1D CNN, which has a simple structure and powerful local feature extraction ability. Secondly, a knowledge fusion unit, namely the KFU unit, is designed. This unit consists of a double-layer parallel bidirectional long short-term memory network with non-shared parameters and an adaptive fine-grained knowledge weight matrix to achieve comprehensive and detailed knowledge extraction from flight control data. The non-sharing of parameters between BiLSTMs enables the F-BiLSTM and T-BiLSTM to maintain a certain degree of independence during the feature learning process. This independence not only gives full play to the powerful learning ability of BiLSTM for time series data but also allows the F-BiLSTM and T-BiLSTM to retain their individuality in knowledge learning, thus being able to pay attention to more information in UAV data and achieve a more extensive and comprehensive knowledge mining of the data. Then, through the adaptive knowledge weight matrix, a fine-grained weight assignment is performed on the knowledge in the final hidden layer outputs of the F-BiLSTM and T-BiLSTM. While effectively fusing the information of the two, it further excavates the important knowledge among them.
[0008] Compared with the existing solutions, due to the complex coupling relationships in the UAV flight control data, it is difficult for existing models to effectively analyze and extract features from the data, resulting in insufficient model learning and the inability to perform good anomaly detection for UAV flight control data. Especially during complex flight tasks, the degree of anomaly of the UAV is not fixed, which may lead to poor detection effects of existing methods for subtle anomalies. In this solution, through correlation analysis, multiple parameters with extremely high correlations with the target parameters are jointly selected as the input of the model, improving the effectiveness of parameter selection, reducing the consumption of computing resources, and at the same time enabling the model to be free from the interference of irrelevant parameters and effectively learn key features. Secondly, the model in this solution combines 1D CNN with a knowledge fusion unit and uses two non-shared F-BiLSTM and T-BiLSTM structures to perform learning in the time dimension and space dimension respectively; it can capture the subtle relationships between flight control data more carefully and comprehensively, effectively extract the information in the data, comprehensively learn the knowledge in the time dimension and space dimension between flight control data, and focus on important knowledge. This design structure can effectively improve the model's learning ability for the spatio-temporal characteristics of data and make it more suitable for knowledge analysis in complex flight situations.
[0009] Further, in step S1, the multiple parameters with the highest to lowest correlations with the target parameter are selected through the maximum information coefficient, and the specific steps are as follows; S11: Given a grid of size a b , assuming two variables and , representing the lengths of the two variables, a set of ordered pairs can be generated; the mutual information formula is calculated as follows:
[0010] represents the mutual information between the two variables, represents the joint probability density of x and y, and represent the marginal probability densities; S12: Secondly, find the partitioning method with the maximum mutual information from different grid partitions, and the calculation formula is as follows:
[0011] where represents partitioning using the grid for represents the data on the grid with the largest ; Then, based on the feature matrix transformation, the feature matrix is calculated as follows:
[0012] where is an element of the normalized feature matrix; S13: Finally is calculated as follows:
[0013] where represents the maximum value of the grid. By comparing the value with a given correlation threshold, the correlation between and is judged; and the MIC values are arranged from high to low, and several parameters before the arrangement and the target parameter are jointly used as the input parameters of the model.
[0014] Due to the complexity of UAV data, there is often a non - linear correlation between many flight parameters. To fully learn the correlation in the time dimension and space dimension between UAV data, parameter selection is a crucial 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, MIC does not rely on expert experience and can mine the non - linear correlation between data. Therefore, in the parameter selection of this special UAV system, the maximum information coefficient, namely MIC, has unique advantages and can effectively analyze the linear and non - linear relationships between UAV 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 correlation values with the target parameter are arranged from high to low, and several parameters before the arrangement and the target parameter are jointly used as the input parameters of the model.
[0015] The feature selection method based on MIC is more in line with the characteristics of UAV 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 basis for subsequent feature extraction, making the model more efficient and accurate in mining key features.
[0016] Furthermore, the specific steps for constructing the CNN - KFU multiple regression model in step S2 are as follows; S21: Perform preliminary feature extraction on the UAV flight control system data through a layer of convolutional neural network, and the calculation formula is as follows:
[0017] where represents the output of the data passing through the j - th convolutional kernel, represents the bias vector, represents the activation function; S22: Use the extracted features as the input to 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; and the outputs of F-BiLSTM and T-BiLSTM are weighted by an adaptive knowledge weight matrix respectively; where the adaptive knowledge weight matrix consists of learnable parameters, with the initial value set to 1 and updated automatically through backpropagation; in the process of calculating the hidden state of the BiLSTM layer and the adaptive weight matrix, the output of the final hidden layer of F-BiLSTM in the BiLSTM layer is weighted by the knowledge weight matrix to obtain , and the output of the final hidden layer of T-BiLSTM is weighted by the knowledge weight matrix to obtain , represents the number of features output by the final hidden layer of the BiLSTM layer. The calculation process is as follows:
[0018] Among them, represents the fine-grained adaptive knowledge weight matrix, which contains two sets of automatically learnable parameters and , and can automatically update the parameters to the optimal through backpropagation; represents multiplied by the corresponding elements in , and and multiplied by the corresponding elements in S23: Add the hidden layers of the two BiLSTM layers calculated by the adaptive weight matrix . The calculation formula is as follows:
[0019] represents the input features for prediction, represents added to the corresponding elements in .
[0020] Furthermore, the loss function formula in step S3 is expressed as follows;
[0021] Among them and They respectively represent the predicted value and the true value at time T. The training process of the model is based on backpropagation, constantly updating the parameter values in the model. For the input data R, after the feature extraction operations of the model CNN-KFU in the time dimension and the spatial dimension, the predicted value of the next moment is obtained , through continuous model training and optimization according to the loss function during the training process, making and get closer and closer to each other.
[0022] Furthermore, in the step S4, the data set is split into a training set and a test set in a ratio of 8:2, and the max-min normalization method is used to preprocess the data. The calculation process of normalization is as follows:
[0023] where represents the data in the training set or the test set in the flight control data, represents the minimum value in the training set, represents the maximum value in the training set. Through normalization, the influence of different parameter dimensions and units in the data of the UAV flight control system on model learning is reduced, and each parameter is standardized before model training, which is beneficial to accelerating the convergence speed of the model and improving the robustness of the model.
[0024] Furthermore, the common anomalies in the step S6 include bias anomalies and drift anomalies. The bias anomalies and drift anomalies are injected into the target parameters of the test set. The calculation formulas of the bias anomalies and drift anomalies are as follows:
[0025] where represents the bias anomaly, represents the normal original data of the UAV; is a constant, representing the deviation degree between the anomaly and the normal data;
[0026] where represents the drift anomaly, represents the normal original data of the UAV; is a function that changes with time, representing the change situation between the drift anomaly and the normal data.
[0027] In the experiment of model training, the common anomalies in the UAV sensor data, namely bias anomalies and drift anomalies, are adopted, and the bias anomalies and drift anomalies are injected into the navigation eastward speed. Then the trained model is tested to verify the prediction effect of the model.
[0028] Further, the model residual calculation formula in step S6 is as follows:
[0029] where represents the prediction residual obtained by calculating the squared difference between the prediction result and the actual data at time T, which is used to measure the scoring situation of data point anomalies at time T. The higher the score, the greater the deviation between the prediction result and the actual data, that is, the higher the degree of anomaly.
[0030] Further, the anomaly threshold in step S7 adopts a dynamic threshold, and the specific steps are as follows; S71: The dynamic threshold is initialized through the residuals of the training set, and the calculation formula is as follows:
[0031] is the calculated threshold, 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 observing the residual scores, continuously estimating and updating the threshold; S72: The anomaly detection formula is as follows:
[0032] where being 1 indicates anomaly, and being 0 indicates normal, is the calculated anomaly score, is the threshold.
[0033] The anomaly threshold is initialized through the residuals on the training set, and then the anomaly threshold is dynamically updated according to the residuals obtained on the test set, so that the model can continuously update the threshold during the anomaly judgment process, thereby improving the prediction accuracy of the model.
[0034] Further, when training the model 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 times.
[0035] Further, the target parameter in step S1 is selected as the navigation eastward speed. Among the numerous parameters of the UAV, the navigation eastward speed is an important speed parameter in the UAV flight control system, indicating the moving speed of the UAV in the eastward direction. This speed is usually calculated by a navigation system (such as GPS or inertial navigation system). It plays an important role in analyzing the horizontal movement of the UAV and can accurately understand the east-west movement of the UAV in path planning and flight trajectory tracking tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 FIG. is a flowchart 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; Figure 2 FIG. is a framework diagram of a method for detecting data anomalies in a UAV flight control system based on a CNN-KFU model provided by an implementation of the present invention; Figure 3 FIG. is a diagram of model network structure parameters of a method for detecting data anomalies in a UAV flight control system based on a CNN-KFU model provided by an implementation of the present invention; Figure 4 FIG. is a schematic diagram of comparing common anomalies of different degrees provided by an implementation of the present invention; Figure 5 FIG. is a schematic diagram of the anomaly recognition situation of a method for detecting data anomalies in a UAV flight control system based on a CNN-KFU model provided by an implementation of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0037] The following is a more detailed description through specific embodiments: Basically as shown in the appended Figure 1 FIG.: A method for detecting data anomalies in a UAV flight control system based on a CNN-KFU multiple regression model includes the following steps: S1: Analyze the correlation between flight control data through a correlation analysis method, and select multiple parameters with high correlation with the target parameter from numerous parameters; the specific steps are as follows; S11: Given a grid of size a b, assuming two variables and and , representing the lengths of the two variables, a set of ordered pairs can be generated; the formula for calculating mutual information is as follows:
[0038] represents the mutual information between the two variables, represents the joint probability density of x and y, and represents the boundary probability density; S12: Secondly, find the partitioning method with the maximum mutual information from different grid partitions. The calculation formula is as follows:
[0039] where represents the use of the grid to perform partitioning, represents the data on the grid with the maximum ; then based on the feature matrix transformation, the feature matrix is calculated as follows:
[0040] where is an element of the normalized feature matrix; S13: Finally is calculated as follows:
[0041] where represents the maximum value of the grid. By comparing the value with a given correlation threshold, judge the and correlation; and arrange the MIC values from high to low, and select several parameters before the arrangement and the target parameter as the input parameters of the model together.
[0042] Among the many parameters of the unmanned aerial vehicle, the navigation eastward speed is an important speed parameter in the flight control system of the unmanned aerial vehicle, which represents the moving speed of the unmanned aerial vehicle in the eastward direction. This speed is usually calculated by the navigation system, such as GPS or inertial navigation system. The navigation eastward speed plays an important role in analyzing the horizontal movement of the unmanned aerial vehicle, and can accurately understand the east-west movement of the unmanned aerial vehicle in the path planning and flight trajectory tracking tasks. Therefore, the navigation eastward speed is selected as the target parameter in this case.
[0043] Due to the complexity of UAV data, there is often a non-linear correlation among many flight parameters. To fully learn the correlation in the time dimension and space dimension among UAV data, parameter selection is a crucial 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, i.e., MIC, does not rely on expert experience and can mine the non-linear correlation among data. Therefore, in the parameter selection of this special UAV system, the maximum information coefficient has unique advantages and can effectively analyze the linear and non-linear relationships among UAV flight control data; the value of MIC ranges from 0 to 1, and the larger the value, the stronger the correlation between the two variables; arranging the MIC values from high to low, in this embodiment, the top 5 parameters and the target parameter are jointly used as the input parameters of the model. The selected parameters after calculation are shown in Table 1 below.
[0044] Table 1 Model Parameter Selection
[0045] S2: Construct a CNN-KFU multiple regression model. Through a layer of convolutional neural network, preliminary feature extraction is performed on the data of the UAV flight control system, and the extracted features are used 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; and the outputs of F-BiLSTM and T-BiLSTM are respectively weighted by an adaptive knowledge weight matrix and then fused; among them, the network structure parameters of each layer in the model CNN-KFU are as shown in the appendix Figure 3 shown, and the specific steps are as follows; S21: Through a layer of convolutional neural network, preliminary feature extraction is performed on the data of the UAV flight control system, and the calculation formula is as follows:
[0046] Among them, represents the output of the data passing through the j-th convolutional kernel, represents the bias vector, represents the activation function; S22: Use the extracted features as the input of the bidirectional long short-term memory network layer, and weight the outputs of F-BiLSTM and T-BiLSTM respectively by the adaptive knowledge weight matrix; among them, the adaptive knowledge weight matrix is composed of learnable parameters, and the initial value is set to 1 and is automatically updated through backpropagation; in the process of calculating the hidden state of the BiLSTM layer and the adaptive weight matrix, in the BiLSTM layer, the output of the final hidden layer of F-BiLSTM After weighted to obtain , the output of the final hidden layer of T-BiLSTM After passing through the knowledge weight matrix After weighted to obtain , represents the number of features output by the final hidden layer of the BiLSTM layer. The calculation process is as follows:
[0047] Among them, represents the fine-grained adaptive knowledge weight matrix, which contains two sets of automatically learnable parameters and , and can automatically update the parameters to the optimal through backpropagation. represents multiplied by the corresponding element in , and multiplied by the corresponding element in S23: Add the hidden layers of the two BiLSTM layers calculated by the adaptive weight matrix . The calculation formula is as follows:
[0048] represents the input features for prediction, represents added to the corresponding element in .
[0049] S24: Finally, map the output multiple features to an output result through a linear layer.
[0050] S3: Define the loss function according to the CNN-KFU multiple regression model; the formula is as follows;
[0051] Among them and represent the predicted value and the true value at time T respectively. The training process of the model is based on backpropagation, continuously updating the parameter values in the model. For the input data R, after the feature extraction operations of the model CNN-KFU in the time dimension and the space dimension, the predicted value of the next moment is obtained. By continuously training the model and optimizing according to the loss function during the training process, the value between and is continuously approximated.
[0052] S4: According to the UAV flight control parameters selected in step S1, obtain the real UAV flight data set corresponding to the parameters; preprocess the flight data, and split the data set into a training set and a test set at a ratio of 8:2; and use the max-min normalization method to preprocess the data. The calculation process of normalization is as follows:
[0053] where represents the data in the training set or test set of the flight control data, represents the minimum value in the training set, represents the maximum value in the training set. By normalization, reduce the influence of different parameter dimensions and units in the UAV flight control system data on model learning. Standardize each parameter before model training, which is beneficial to accelerating the convergence speed of the model and improving the robustness of the model.
[0054] In this example, the real UAV flight data set from Minnesota flight 98 is used. The time interval of each sample in the data is 20 ms, and the total length of the sample is 21015. In the experiment, the data after the UAV takes off and before landing is intercepted, and the interception interval is [3201:19800], with a total length of 16600 as the experimental data. Take 80% as the training set and 20% as the test set; specifically, [1:13280] is used as the training set with a total length of 13280; [13281:16600] is used as the test set with a total length of 3320; the abnormal injection interval is [15281;16600] with a total length of 1320 and an abnormal rate of 0.0795. And to reduce the influence of different parameter dimensions and units in the UAV flight control system data on model learning, each parameter is standardized before model training, which is beneficial to accelerating the convergence speed of the model and improving the robustness of the model. In the specific operation, use the maximum and minimum values in the flight control parameters to perform data normalization operations on the training set and the test set. It should be noted that the normalization parameters and both come from the training set.
[0055] 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 Intel Corei7-10700k@3.80GHz eight-core, RAM 128GB (Samsung DDR4 3200MHz 32GB * 4), GPU is NVIDIA GeForce RTX2080 Super (8GB), windows 11 (64-bit) and pytorch1.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.
[0056] S6: Inject common anomalies of different degrees into the test set to verify the model's ability to identify anomalies. Input test data with different degrees of anomalies into the CNN-KFU model to obtain the prediction results of the test data; calculate the model prediction results and the true value of the output data corresponding to the input data to obtain the residual to be tested of the test set. The specific steps are as follows; S61: Inject the deviation anomaly and drift anomaly into the target parameters of the test set. The calculation formulas of the deviation anomaly and drift anomaly are as follows:
[0057] in Indicates abnormal deviation. Indicates the normal raw data of the drone; is a constant, indicating the degree of deviation between abnormal and normal data;
[0058] in Indicates abnormal drift. Indicates the normal raw data of the drone; It is a function that changes over time and represents the change of drift anomaly and normal data.
[0059] S62: The model residual calculation formula is as follows:
[0060] 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.
[0061] During the flight of the drone, it is in a normal state for most of the time, and abnormal flight only occurs in very few cases. Since the drone itself is costly, if we artificially create abnormal flight in a real scenario to obtain abnormal flight data, it may bring uncontrollable risks, resulting in serious consequences such as crashes, injuries to personnel, and property losses. Such potential losses not only affect economic costs but also pose a threat to safety. Therefore, in the experiment, we adopt common anomalies in the drone sensor data and do not introduce artificially created abnormal flight data additionally. By injecting common bias anomalies and drift anomalies into the navigation eastward velocity, we then verify the anomaly recognition and prediction of the model.
[0062] S7: Input the training set data into the CNN-KFU model to obtain the residuals on the training set, which are used for initializing the anomaly thresholds for anomaly data judgment; compare the residuals to be measured in the test set with the anomaly thresholds to complete the anomaly judgment. The anomaly thresholds adopt dynamic thresholds, and the specific steps are as follows; S71: The dynamic threshold is initialized through the residuals of the training set, and the calculation formula is as follows:
[0063] is the calculated threshold, 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; through observe the residual scores, and continuously estimate and update the thresholds; S72: The anomaly detection formula is as follows:
[0064] where being 1 indicates anomaly, and being 0 indicates normal, is the calculated anomaly score, is the threshold.
[0065] Initialize the anomaly thresholds through the residuals on the training set, and then dynamically update the anomaly thresholds according to the residuals obtained from the test set, so that the model can continuously update the thresholds during the anomaly judgment process, thereby improving the accuracy of the model prediction.
[0066] In the drone anomaly detection task, the focus is on the model's ability to detect and identify abnormal data. To test the model's ability, we use the standard evaluation metrics in the anomaly detection task, namely the F1 score, accuracy (ACC), true positive rate (TPR), and false positive rate (FPR) to evaluate the model.
[0067]
[0068]
[0069]
[0070]
[0071] Among them, TP and FP represent the truly detected anomalies and the falsely detected anomalies respectively, and TN and FN represent the correctly classified normal samples and the misclassified normal samples respectively. The F1 score is a comprehensive reflection of the precision (Pre) and recall (Rec), and is an indicator for comprehensively considering the anomaly detection ability of the algorithm. The higher the F1 score, the better the performance of the model; ACC is to evaluate the ability of the model to correctly detect the overall samples; TPR represents the ratio of the correctly judged anomaly samples to all actual anomaly samples, that is, the proportion of the anomalies correctly identified by the model in the total anomalies; FPR represents the proportion of the falsely detected anomaly samples in all actual normal samples, that is, the ratio of misjudging normal samples as anomalies. Meanwhile, to verify the effectiveness of the model CNN-KFU, six currently advanced anomaly detection models were selected, including: LSTM, LSTM-RF, STC-LSTM-AE, CA-1DCL-EF, MTAD-GAT, CNN-BiGRU, for comparative experiments. To fully verify the anomaly recognition ability of each model, in this case, different degrees of bias anomalies and drift anomalies were designed in the eastward velocity of the navigation, such as Figure 4 shown.
[0072] The discrimination situations of CNN-KFU and the other six baseline models in anomalies of various degrees are as follows. In experiment (a), the bias anomaly is set to 3.5 and the drift anomaly range is [3.5, 4.5]. The experimental results are shown in Table 2; in experiment (b), the bias anomaly is set to 5 and the drift anomaly range is [5, 6]. The experimental results are shown in Table 3; in experiment (c), the bias anomaly is set to 7 and the drift anomaly range is [6, 8]. The experimental results are shown in Table 4.
[0073] Table 2
[0074] Table 3
[0075] Table 4
[0076] Through the analysis of three groups of experiments, anomalies of different degrees will affect the anomaly recognition ability of the model. Generally, the greater the degree of anomaly, the stronger the recognition ability of the model. The overall performance of LSTM is relatively poor among all models, and there is also a relatively high false detection rate. The main reason is that the LSTM model focuses on learning features in the time dimension and may ignore the attention to other useful information. While LSTM-RF adds residual filtering compared to LSTM, which reduces the impact of noise on the anomaly detection ability to a certain extent, and significantly improves the detection ability for various anomalies. At the same time, it also proves that there is noise in the data collected by the real unmanned aerial vehicle flight control system, which has a certain impact on the detection of anomalies. Both CA-1DCL-EF and CNN-BiGRU combine the local feature learning ability of CNN. Specifically, CA-1DCL-EF combines CNN, LSTM, and residual filtering; while CNN-BiGRU combines CNN and BiGRU. The detection situations of the two types of anomalies under different degrees are relatively close. It can be seen from the result table of experiment (c) that the F1 scores of CA-1DCL-EF and CNN-BiGRU for partial anomalies and drift anomalies both reach more than 90%, indicating that the method of combining the local feature extraction ability of CNN with the time feature extraction ability (LSTM, BiGRU) can better capture the effective features between flight data and improve the anomaly detection ability of the model. In contrast, the detection effects of STC-LSTM-AE and MTAD-GAT on anomalies are relatively close, and they also have outstanding performances. The main reason may be that STC-LSTM-AE combines LSTM and AE, and through the encoding and decoding method, it can pay attention to the important features between flight data and reduce the interference of noise on anomaly detection; while MTAD-GAT simultaneously utilizes the advantages based on reconstruction and prediction, and uses the dual-graph attention mechanism to focus on the time dimension and space dimension of time series data respectively, effectively mining the spatio-temporal information between data.
[0077] Compared with the above baseline models, the CNN-KFU multiple regression model of this embodiment always performs optimally and stably in partial anomalies and drift anomalies under different anomaly degrees, and the F1 score is always greater than 90%. In experiment (a), in the case of the mildest anomaly degree, the F1 scores of partial anomalies and drift anomalies are 94.14% and 94.44% respectively, which are significantly higher than other baseline models. In experiment (b), in the case of relatively severe anomalies, the performance is still stable and significantly better than other baseline models. In experiment (c), in the case of severe anomaly degree, the F1 scores of partial anomalies and drift anomalies are 97.04% and 96.96% respectively. Compared with the best baseline, the F1 scores are increased by 1.97% and 2.5% respectively.
[0078] The reason why the model of this application is always stable and performs excellently is mainly because CNN-KFU is significantly different from previous models. By combining a single-layer CNN with a knowledge fusion unit (FKU), it realizes the fine-grained spatio-temporal feature mining of flight data. This method can effectively capture the key features in flight data, thus showing significant superiority in dealing with different types and degrees of anomalies. The results show that the model of this application can perform the anomaly detection task more stably when facing scenarios with variable degrees of anomalies, demonstrating strong robustness and adaptability.
[0079] A multiple regression neural network model for fine-grained spatio-temporal correlation analysis is proposed based on a one-dimensional convolutional neural network and knowledge fusion in this embodiment. By using the method of anomaly injection in the real flight UAV dataset, compared with existing advanced methods, this model can perform stably and excellently in various degrees of deviation anomalies and drift anomalies, 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 through a one-dimensional CNN and a knowledge fusion unit, and ensure the accuracy and timeliness of anomaly detection.
[0080] The above are only the embodiments of the present invention, and common knowledge such as the specific structures and characteristics in the solutions are not described in detail here. It should be pointed out that for those skilled in the art, without departing from the structure of the present invention, several deformations and improvements can be made, which should also be regarded as the protection scope of the present invention, and these will not affect the implementation effect of the present invention and the practicability of the patent. The protection scope required by this application shall be subject to the content of its claims, and the specific implementation manners in the specification and the like can be used to interpret the content of the claims.
Claims
1. A method for detecting abnormal data of an unmanned aerial vehicle flight control system based on a CNN-KFU multiple regression model, characterized in that: The method includes the following steps: S1: Analyze the correlation between flight control data through the correlation analysis method, and select multiple parameters with high correlation with the target parameter from numerous parameters; S2: Construct a CNN-KFU multiple regression model. Perform preliminary feature extraction on the data of the UAV flight control system 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; and the outputs of F-BiLSTM and T-BiLSTM are respectively weighted by an adaptive knowledge weight matrix and then fused; S3: Define a loss function according to the CNN-KFU multiple regression model; S4: According to the UAV flight control parameters selected in step S1, obtain the real UAV flight data set corresponding to the parameters; preprocess the flight data, and split the flight data set into a training set and a test set at a certain 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 different degrees of common anomalies into the test set, and input the test data with different anomaly degrees into the CNN-KFU model to obtain the prediction results of the test data; calculate the residual to be measured of the test set by operating the model prediction results and the true values of the data; S7: Input the training set data into the CNN-KFU model to obtain the residuals on the training set, which are used for initializing the anomaly threshold for abnormal data judgment; compare the residual to be measured of the test set with the anomaly threshold to complete the anomaly judgment.
2. The method for detecting abnormal data of the UAV flight control system based on the CNN-KFU multiple regression model according to claim 1, wherein: In step S1, the maximum information coefficient is used to select multiple parameters with the highest correlation values with the target parameter arranged from high to low. The specific steps are as follows; S11: Given a grid of size a b , assuming two variables and , representing the lengths of the two variables, 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 marginal probability density; S12: Secondly, find the partition method with the maximum mutual information from different grid partitions. The calculation formula is as follows: Among them Indicates the use of a grid For To perform partitioning Indicates data On the grid The largest ; Then, based on the feature matrix transformation, the feature matrix is calculated as follows: wherein is an element of the normalized feature matrix; S13: Finally is calculated as follows: Among them represents the maximum value of the grid, and by comparing the value with a given correlation threshold, it is judged and for correlation.
3. The method for detecting abnormal data of the UAV flight control system based on the CNN-KFU multiple regression model according to claim 1, wherein: The specific steps for constructing the CNN-KFU multiple regression model in step S2 are as follows; S21: Perform preliminary feature extraction on the data of the UAV flight control system through a layer of convolutional neural network. The calculation formula is as follows: Among them, represents the output of the data passing through the j-th convolutional kernel, represents the bias vector, represents the activation function; S22: Use the extracted features 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; and the outputs of F-BiLSTM and T-BiLSTM are weighted by the adaptive knowledge weight matrix respectively; where the adaptive knowledge weight matrix is composed of learnable parameters, with the initial value set to 1 and updated automatically through backpropagation; in the process of calculating the hidden state of the BiLSTM layer and the adaptive weight matrix, the output of the final hidden layer of F-BiLSTM in the BiLSTM layer is weighted by the knowledge weight matrix to obtain , and the output of the final hidden layer of T-BiLSTM is weighted by the knowledge weight matrix to obtain , represents the number of features of the output of the final hidden layer of the BiLSTM layer. The calculation process is as follows: Among them, represents the fine-grained adaptive knowledge weight matrix, which contains two sets of automatically learnable parameters and , and can automatically update the parameters to the optimal through backpropagation; represents multiplying the corresponding elements in by the corresponding elements in and ; S23: Add the hidden layers of the two BiLSTM layers calculated with the adaptive weight matrix as follows. The calculation formula is as follows: Represents the input features for prediction, Represents And Adds the elements at the corresponding positions in 4. The method for detecting abnormal data of the UAV flight control system based on the CNN-KFU multiple regression model according to claim 1, characterized in that: The formula of the loss function in step S3 is expressed as follows; Among them and respectively represent the predicted value and the true value at time T.
5. The method for detecting abnormal data of the UAV flight control system based on the CNN-KFU multiple regression model according to claim 1, wherein: In step S4, the data set is split into a training set and a test set at a ratio of 8:2, and the max-min normalization method is used to preprocess the data. The calculation process of normalization is as follows: Among them represents the data in the training set or test set of the flight control data, represents the minimum value in the training set, represents the maximum value in the training set.
6. The method for detecting abnormal data of the UAV flight control system based on the CNN-KFU multiple regression model according to claim 1, characterized in that: The common anomalies in step S6 include bias anomaly and drift anomaly. Inject the bias anomaly and drift anomaly into the target parameters of the test set. The calculation formulas of the bias anomaly and drift anomaly are as follows: Among them indicates a partial difference anomaly represents the original data of the normal UAV; is a constant representing the deviation degree between the anomaly and the normal data; Among them indicates a drift anomaly represents the original data of the normal drone; is a function that changes over time, indicating the change of the drift anomaly and the normal data.
7. The method for detecting abnormal data of the UAV flight control system based on the CNN-KFU multiple regression model according to claim 6, characterized in that: The formula for calculating the model residual in step S6 is as follows: Among them represents the prediction residual obtained by calculating the squared difference between the predicted result and the actual data at time T, which is used to measure the scoring situation of data point anomalies 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 anomaly 8. The method for detecting abnormal data of the UAV flight control system based on the CNN-KFU multiple regression model according to claim 1, characterized in that: The anomaly threshold in step S7 adopts a dynamic threshold. The specific steps are as follows; S71: The dynamic threshold is initialized through the residuals of the training set. 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, is the dynamic peak over-threshold method; By observing the residual scores, continuously estimating and updating the threshold; S72: The anomaly detection formula is as follows: where 1 indicates an anomaly and 0 indicates normal is the calculated anomaly score is the threshold value 9. The method for detecting abnormal data of the UAV flight control system based on the CNN-KFU multiple regression model according to claim 1, wherein: When training the model 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 times.
10. The method for detecting abnormal data of the UAV flight control system based on the CNN-KFU multiple regression model according to claim 1, wherein: The target parameter in the 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
High-precision anomaly detection and data recovery method for flight data of unmanned aerial vehicle
CN119475198A
Data-driven unmanned aerial vehicle flight control system real-time defect prediction system and method
CN119902559A
Shaft generatior system of ship
KR1020240032439A
Cited By
Unmanned aerial vehicle anomaly detection method and device based on multiple data nonlinear combinations
CN121211248A