Unmanned aerial vehicle fault diagnosis method and system based on domain adaptation, medium and equipment

By employing a domain-adaptive UAV fault diagnosis method, which utilizes domain adversarial neural networks and interpretability analysis, the poor model generalization ability and feature selection challenges of multi-source sensor data from UAVs are addressed, achieving high-precision and interpretable fault identification and diagnosis.

CN121389811BActive Publication Date: 2026-04-07SHANDONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing UAV fault detection methods suffer from poor model generalization ability due to domain distribution differences under multi-source heterogeneous sensor data conditions, making it difficult to effectively extract and filter high-dimensional time-series features, and the model output lacks interpretability.

Method used

A domain-adaptive UAV fault diagnosis method is adopted. By acquiring multi-source sensor data of the UAV, combining domain adaptive learning and interpretability analysis mechanism, a domain adversarial neural network is used for feature extraction and fault classification. Adaptive focus loss and interpretable feature learning are introduced to achieve self-adjustment of feature weights and transparency of diagnostic decisions.

Benefits of technology

Achieving high-precision fault identification under complex environmental changes and multi-task conditions improves the reliability and interpretability of the model, and enhances the cross-domain robustness and generalization ability of UAV fault diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121389811B_ABST
    Figure CN121389811B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of fault diagnosis, and provides a UAV fault diagnosis method and system based on domain adaptation, a medium and equipment, which comprises the following steps: performing sliding window segmentation on a multidimensional time sequence data set, calculating time domain and frequency domain features of each window data, constructing a source domain data set and a target domain data set, and jointly training a domain adversarial neural network; after the training is completed, a Shapley additive explanation method is applied to calculate the global importance of each time domain and frequency domain feature, and the global importance is sorted; a plurality of time domain and frequency domain features with high ranking are used as important features; only the important features in the source domain data set and the target domain data set are reserved; the source domain data set and the target domain data set are updated; the domain adversarial neural network is retrained based on the updated source domain data set and target domain data set; and fault classification is performed through the retrained domain adversarial neural network. High-precision fault recognition can be realized under complex environmental changes and multi-task conditions.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of fault diagnosis, and particularly relates to a UAV fault diagnosis method and system based on domain adaptation, a medium and equipment. BACKGROUND

[0002] The statements in this section merely provide background information related to the present application and do not necessarily constitute prior art.

[0003] With the wide application of UAVs in power inspection, environmental monitoring, emergency rescue and other fields, their operating environment is becoming increasingly complex, and the number and types of sensors are increasing, including accelerometers, gyroscopes, magnetometers, barometers and other multi-source information. UAVs are susceptible to vibration impact, electromagnetic interference, environmental temperature difference and device aging during long-term flight, resulting in attitude drift, sensor misalignment or actuator failure, etc. If such faults are not detected and isolated in time, it will lead to a decrease in flight control accuracy, and even cause a crash accident, which seriously threatens safety.

[0004] Existing UAV fault detection methods can be mainly divided into two categories:

[0005] Model-based methods estimate residual errors by establishing a dynamic model or Kalman filter to achieve fault judgment. Such methods rely on high-precision models, but the modeling accuracy is limited due to the strong nonlinearity, coupling and environmental disturbance of UAVs, making it difficult to generalize to complex flight task scenarios.

[0006] Data-driven methods use time series data collected by sensors combined with machine learning or deep learning algorithms for pattern recognition. However, traditional methods generally assume that the source domain and target domain data distributions are consistent, which leads to a significant decrease in model performance when transferred to new environments. Moreover, the model lacks interpretability and cannot reveal the fault mechanism.

[0007] The existing technology still has the following shortcomings under the condition of UAV multi-source heterogeneous sensor data: domain distribution difference leads to poor model generalization ability; high-dimensional time series features are difficult to effectively extract and filter; and the model output lacks interpretability. SUMMARY

[0008] To solve the technical problems in the background art, the present application provides a UAV fault diagnosis method and system based on domain adaptation, which takes multi-source sensor data of a UAV, including accelerometer and gyroscope data, as input, combines domain adaptation learning and interpretability analysis mechanism, breaks through the dependence of traditional data-driven methods on consistent labels and data distribution, and can achieve high-precision fault identification under complex environmental changes and multi-task conditions.

[0009] To achieve the above purpose, the present application adopts the following technical solutions:

[0010] The first aspect of the present application provides a method for unmanned aerial vehicle fault diagnosis based on domain adaptation, comprising:

[0011] Obtaining triaxial accelerometer data and triaxial gyroscope data of the unmanned aerial vehicle under different flight tasks to form a multi-dimensional time series data set, and performing sliding window segmentation on the multi-dimensional time series data set, calculating time domain and frequency domain features for each window data, constructing a source domain data set and a target domain data set, and based on the source domain data set and the target domain data set, jointly training a domain adversarial neural network;

[0012] For the trained domain adversarial neural network, the Shapley additive interpretation method is applied to calculate the global importance of each time domain and frequency domain feature and sort them according to the global importance, and the top multiple time domain and frequency domain features in the global importance are selected as important features, only the important features in the source domain data set and the target domain data set are retained, the source domain data set and the target domain data set are updated, and based on the updated source domain data set and the target domain data set, the domain adversarial neural network is retrained;

[0013] Obtaining triaxial accelerometer data and triaxial gyroscope data of the unmanned aerial vehicle under the current flight task, calculating important features, and performing fault classification through the retrained domain adversarial neural network.

[0014] Further, using the domain adversarial neural network, the updated target domain data set is classified for fault, and the feature layer contribution vector is calculated through the Shapley additive interpretation method to perform dynamic explainability analysis of a single sample.

[0015] Further, the time domain features include peak value, root mean square value, kurtosis, skewness and sample entropy.

[0016] Further, the frequency domain features include frequency barycenter, frequency moment, frequency spectrum root mean square, frequency spectrum variance, spectral entropy, spectral skewness and spectral kurtosis.

[0017] Further, the loss function used in the training of the domain adversarial neural network is the weighted sum of adaptive focal loss, supervised contrast loss and domain classification layer loss.

[0018] Further, the global importance of each feature is the average value of the absolute values of the Shapley additive interpretation values of all samples.

[0019] Further, the domain adversarial neural network comprises a feature extractor, a label classifier and a domain classifier.

[0020] The second aspect of the present application provides a system for unmanned aerial vehicle fault diagnosis based on domain adaptation, comprising:

[0021] The primary training module is configured to: acquire triaxial accelerometer data and triaxial gyroscope data of the unmanned aerial vehicle under different flight tasks, form a multi-dimensional time sequence data set, and perform sliding window segmentation on the multi-dimensional time sequence data set; calculate time domain and frequency domain features for each window data; construct a source domain data set and a target domain data set; and based on the source domain data set and the target domain data set, jointly train a domain adversarial neural network;

[0022] The secondary training module is configured to: apply a Shapley additive explanation method to the trained domain adversarial neural network, calculate global importance of each time domain and frequency domain feature and sort the global importance, take a plurality of time domain and frequency domain features with high global importance as important features, only retain the important features in the source domain data set and the target domain data set, update the source domain data set and the target domain data set, and based on the updated source domain data set and the target domain data set, retrain the domain adversarial neural network;

[0023] The fault diagnosis module is configured to: acquire triaxial accelerometer data and triaxial gyroscope data of the unmanned aerial vehicle under a current flight task, calculate important features, and perform fault classification through the retrained domain adversarial neural network.

[0024] A third aspect of the present application provides a computer readable storage medium having a computer program stored thereon, the program being executed by a processor to implement the steps of the domain adaptation based unmanned aerial vehicle fault diagnosis method described above.

[0025] A fourth aspect of the present application provides a computer device comprising a computer readable storage medium, a processor and a computer program stored on the computer readable storage medium and executable on the processor, the processor executing the program to implement the steps of the domain adaptation based unmanned aerial vehicle fault diagnosis method described above.

[0026] Compared with the prior art, the present application has the following advantages:

[0027] The present application takes multi-source sensor data of the unmanned aerial vehicle including accelerometer and gyroscope data as input, combines domain adaptive learning and explainability analysis mechanism, breaks through the dependence of traditional data-driven methods on label and data distribution consistency, and can realize high-precision fault recognition under complex environmental changes and multi-task conditions.

[0028] The present application combines adaptive focal loss and explainable feature learning, realizes self-adjustment of feature weights and transparency of diagnosis decision, and enhances the credibility and explainability of the model. BRIEF DESCRIPTION OF DRAWINGS

[0029] The accompanying drawings, which form a part of this specification, are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification. The embodiments of the application, and their

[0030] Figure 1 is a flowchart of a UAV fault diagnosis method based on domain adaptation according to an embodiment of the application;

[0031] Figure 2 is a PCA dimension reduction visualization effect diagram according to an embodiment of the application;

[0032] Figure 3 is a structural schematic diagram of a computer device according to an embodiment of the application. DETAILED DESCRIPTION

[0033] To make the objects, technical solutions and advantages of the embodiments of the application clearer, the technical solutions in the embodiments of the application will be described below in a clear and complete manner with reference to the drawings in the embodiments of the application.

[0034] It should be pointed out that the following detailed description is exemplary and is intended to provide further explanation of the application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as generally understood by those skilled in the art to which the application belongs.

[0035] Embodiment I

[0036] The embodiment provides a UAV fault diagnosis method based on domain adaptation.

[0037] The UAV fault diagnosis method based on domain adaptation provided by the embodiment does not need to rely on an accurate model, can realize adaptive migration of fault features in a cross-domain scene, and realizes feature screening and diagnosis basis quantization through interpretable analysis.

[0038] The UAV fault diagnosis method based on domain adaptation provided by the embodiment, as shown in Figure 1 , comprises the following steps.

[0039] Step S1, collecting three-axis accelerometer data (x, y, z) and three-axis gyroscope data (x, y, z) of a UAV under different flight tasks as a plurality of input signals.

[0040] It should be noted that the embodiment acquires the acceleration and angular velocity time series signals of the UAV, which considers both the flight attitude dynamic characteristics and the motion law under different task states, and is a non-restrictive optimal choice.

[0041] Specifically, step S1 comprises the following steps.

[0042] ​​Acceleration and angular velocity signals are collected by an airborne inertial measurement unit (IMU) to form a multi-dimensional time-series dataset. The sampling frequency is generally in the range of 100–500 Hz to fully capture the dynamic characteristics of the UAV under fault conditions such as attitude changes, propeller imbalance, and sensor drift.

[0043] The time-series data includes source domain data with fault status labels collected in a laboratory environment and target domain data without fault status labels under real operating conditions.

[0044] Step S2: The collected time-series data is segmented by sliding window. Time-domain and frequency-domain features are calculated for each window signal, with a total of 12 statistical quantities. These are then concatenated on 6 channels to obtain a 72-dimensional feature vector, thus constructing the source domain dataset and the target domain dataset.

[0045] Specifically, step S2 includes:

[0046] Step 2.1, for each channel signal Segmentation is performed using a sliding window, the first... Each window is represented as: ;in, Channel signal The first in time series data The amplitude of each sampling point The number is the sequence number of the sliding window. For window length, The step size.

[0047] Step 2.2, for each window Calculate the following five types of time-domain statistical characteristics:

[0048] (1) Peak value: ;

[0049] (2) Root mean square value: ;

[0050] (3) Kurtosis: ;in, The mean, Standard deviation;

[0051] (4) Skewness: ;

[0052] (5) Sample entropy: ;in, For length is The number of matching patterns For tolerance radius, Current window The sample length within.

[0053] The time-domain feature vector is defined as: .

[0054] Step 2.3, first, for each window , a fast Fourier transform (FFT) is performed to obtain a power spectrum: ; where, denotes the actual frequency value corresponding to the th frequency point in the FFT output; denotes the Fourier transform; denotes the amplitude set within the window ; then, the following seven types of frequency domain features are calculated:

[0055] (1) frequency barycenter: ;

[0056] (2) frequency moment: ;

[0057] (3) frequency spectrum root mean square: ;

[0058] (4) frequency spectrum variance: ; where, denotes the average energy of the power spectrum over all frequency points, which is used as a benchmark value to measure the concentration degree of the power spectrum distribution;

[0059] (5) spectral entropy: , ;

[0060] (6) spectral skewness: ;

[0061] (7) spectral kurtosis: .

[0062] The frequency domain feature vector is: .

[0063] Step 2.4, the extracted by the six sensor channels are spliced respectively with , to obtain the th window feature: = ; where, and denote the time domain features and frequency domain features extracted by the accelerometer axis in the window, respectively; and denote the time domain features and frequency domain features of the accelerometer axis, respectively; and denote the time domain features and frequency domain features of the accelerometer axis, respectively; respectively represent the gyroscope time domain features and frequency domain features of the axis; respectively represent the gyroscope time domain features and frequency domain features of the axis; respectively represent the gyroscope time domain features and frequency domain features of the axis; finally, a 72-dimensional feature vector is obtained .

[0064] Step 2.5, standardize all window features: ; wherein, and are the feature mean and standard deviation, respectively; the output is a standardized feature matrix: ; wherein, and are the source domain and target domain data sets, respectively, and are the source domain and target domain data after feature screening, is the state label corresponding to the source domain sample; state label 0 represents normal, and 1 represents fault; and the source domain sample is assigned a domain label , and the target domain sample is assigned a domain label .

[0065] It is worth noting that in the embodiment, when the multi-sensor time sequence signal of the unmanned aerial vehicle is segmented by sliding window and features are extracted, the flight dynamic features and the differences between multi-task working conditions are considered, the attitude evolution and fault transient information are retained, and the time-frequency resolution and distinguishability of the features are improved. It is a non-restrictive and relatively optimal choice.

[0066] Step S3, a domain adversarial neural network (DANN) containing a feature extractor, a label classifier and a domain classifier is constructed, and the source domain (laboratory data) and the target domain (real working condition data) are input for joint training to realize domain adaptation of feature distribution.

[0067] Specifically, step S3 includes:

[0068] Step 3.1, constructing a domain adversarial neural network, the domain adversarial neural network is composed of a feature extractor, a label classifier and a domain classifier, as follows:

[0069] The feature extractor adopts a one-dimensional convolutional neural network structure, which sequentially includes a convolutional layer, a batch normalization layer, a ReLU (linear rectifier function) activation layer and a pooling layer, and finally maps to an m-dimensional feature space through adaptive average pooling and a fully connected layer, realizing the transformation of input features to latent space features : ​​;in, Represents the feature extraction function. This represents the latent features after mapping. To ensure stable network performance, hyperparameters such as the number of convolutional layers, kernel size, learning rate, and batch size can be optimized and automatically adjusted using, but not limited to, particle swarm optimization, Bayesian optimization, or genetic algorithms.

[0070] Tag classifier It consists of two fully connected layers and is used to predict the fault category, outputting the probability: Where softmax is the normalized exponential function;

[0071] Domain classifier Used to distinguish the source domain of samples, its input comes from the output of the feature extractor. Then proceed to the following processing:

[0072] First, upon entering The gradient is processed by a gradient reversal layer (GRL). The GRL maintains the identity mapping during forward propagation, while in reverse propagation the gradient direction and multiplies it by the gradient reversal coefficient. : ;in, The identity matrix has dimensions and eigenvectors. Consistency is used to maintain the independence of gradients across dimensions, ensuring that gradient inversion only changes the gradient direction and magnitude without altering its structure. To balance the learning intensity of the feature extractor in classification and domain alignment tasks, a nonlinear dynamic adjustment strategy is employed to adjust the gradient inversion coefficients. Adjustments are made round by round, which is defined as follows: ;in, This is the current training round number. The total number of training rounds is denoted by ; the nonlinear dynamic adjustment strategy maintains a small adversarial intensity in the early stage of training to promote stable convergence of the classifier; in the middle and late stages, the adversarial gradient is gradually increased to enhance the alignment ability of cross-domain features, ensuring the domain invariance and task relevance of the final features, thereby prompting the feature extractor to learn domain-invariant feature representations during optimization.

[0073] Then, the features output by GRL Input a domain classifier, output the predicted probabilities of the two domain labels: ;in, This represents the predicted probability vector of the domain label to which the sample belongs; This represents the softmax function (normalization exponential function), which maps the real-valued vector output by the domain classifier to a probability distribution such that the sum of the probabilities is 1. The domain classifier function consists of several fully connected layers; This represents the output of the feature extractor after processing by the gradient inversion layer (GRL).

[0074] Step 3.2, the design of the DANN total loss function is as follows:

[0075] Combining label classification and domain adversarial aspects, the overall optimization objective of the domain adversarial neural network is defined as: ;in, This is the domain adversarial weight coefficient, used to balance the relationship between classification accuracy and domain invariance.

[0076] (1) Design of composite loss function for label classification layer:

[0077] To enhance the discriminative power and feature differentiation of domain adversarial neural networks for samples of different categories (states and faults), a composite loss function is proposed based on the traditional cross-entropy loss: ;in, Adaptive focus loss; To monitor and compare losses; and These are the weighting coefficients for each item.

[0078] in, The adaptive focus loss, used to balance class imbalance, is defined as follows: ;in, To predict probabilities, This is the sample balance coefficient. For focus adjustment parameters, This is the network output for the t-th fault category.

[0079] in, To contrast the loss, which enhances intra-class compactness and inter-class separation, it is defined as: ;in, This indicates the number of samples participating in the comparison calculation. This batch of samples comes from the output of the feature extractor and is used to construct positive and negative sample pairs to perform intra-class and inter-class similarity constraints. Indicates the first The true fault category label of each sample is used to determine the sample pair. Whether they belong to the same fault category, and thus select the corresponding comparison item; This is the output vector of the last layer of the feature extraction layer; This is a safe interval for separating classes.

[0080] (2) The domain classification layer loss function is defined as:

[0081] ;

[0082] in, The number of source domain samples is the number of samples from the laboratory environment (source domain) input into the domain classifier. The number of samples in the target domain is the number of samples from the real working environment (target domain) input to the domain classifier. The domain label to which the i-th sample belongs; Output the probability of the classification layer for the i-th sample domain.

[0083] Step 3.3, the training process, is as follows:

[0084] During training, the Adam (adaptive moment estimation) optimization algorithm is used to jointly optimize the parameters of the domain adversarial neural network. The initial learning rate is set to 0.001, and adaptive learning rate decay mechanisms such as StepLR (learning rate scheduler) are combined to improve convergence stability.

[0085] In each iteration, mini-batch samples from both the source and target domains are input simultaneously, and the total loss is calculated. And perform backpropagation and parameter updates.

[0086] To prevent gradient explosion, gradient clipping constraints are imposed on the parameters of the domain adversarial neural network.

[0087] As training iteratively progresses, the feature extractor, under the dual constraints of the label classifier and the domain classifier, gradually learns feature representations that are both discriminative and domain robust, thus achieving the adaptive optimization goal of cross-domain fault diagnosis.

[0088] Step S4: Apply the SHAP interpretability analysis method to the trained DANN model to calculate the global importance (also known as contribution) of each feature and sort them according to global importance. Select important features and reconstruct the feature dataset (including the source domain dataset and the target domain dataset).

[0089] Specifically, step S4, feature importance analysis and screening based on SHAP, includes:

[0090] Step 4.1: The Shapley Additive Explanations (SHAP) method is used to calculate and analyze the feature contributions of the trained DANN model.

[0091] The SHAP value measures the marginal contribution of a single feature to the model output, and is defined as follows:

[0092] ;

[0093] in, Features Shapley value; Indicates the first One feature; To exclude the first Other feature subsets besides the single feature; Features The state of substitution or absence; This represents the expectation of the background data distribution. This represents the prediction function of the DANN model, whose output is the predicted value corresponding to the output of the DANN target classification layer.

[0094] Step 4.2, for all samples Calculate the Shapley value for each feature and take the average of the absolute values ​​as its global importance index:

[0095] ;

[0096] in, Characteristic features Global importance in the overall prediction task; The total number of samples used to calculate the Shapley value; For the sample The The Shapley value of a feature represents the marginal contribution of that feature to the sample.

[0097] Step 4.3, sort all features by Sort the values ​​from largest to smallest to obtain the global importance sequence of the features. Based on the global importance distribution of features, a cumulative contribution threshold is set. And sort them by global importance from largest to smallest, and select the feature set that meets the following conditions: This yields the updated source domain dataset and target domain dataset; where, This indicates the number of items sorted in descending order of global importance. The global importance of each feature, set This indicates that the cumulative global importance has reached a threshold. The previously selected feature subset, h, represents the number of important features selected.

[0098] As one implementation method, an adaptive cumulative contribution threshold is designed, which combines the distribution characteristics of feature importance (such as dispersion and local inflection points) to avoid the subjectivity of traditional fixed thresholds. The adaptive cumulative contribution threshold is defined as follows: Where d is the total number of features, It is the balance coefficient. It is a sensitivity parameter that controls the stringency of the mutation determination. all The standard deviation of the value is used to measure the degree of dispersion of importance. If no value satisfies this condition... If j is the largest, then the mutation point term takes the largest value. .

[0099] like Figure 2 As shown, the PCA (principal component analysis) dimensionality reduction of the output vector of the last layer of the feature extraction layer is visualized after training the DANN in the source and target domains.

[0100] Step S5: After retraining the DANN model based on the filtered feature dataset (new dataset), the target domain samples are classified for faults, and the dynamic interpretability analysis of a single sample is achieved by calculating the local SHAP value.

[0101] Specifically, step S5, DANN retraining based on selected features and local SHAP dynamic interpretability analysis, includes:

[0102] Step 5.1: Reconstruct the source and target domain datasets using the feature subsets obtained from feature importance filtering in step S4, and use them as input for new training samples; Reconstruct the Domain Adversarial Neural Network (DANN) structure according to step S3, keeping the feature extractor, label classifier, and domain classifier system unchanged, and only adjusting the input layer dimension to match the number of filtered features for retraining.

[0103] Step 5.2, to achieve dynamic interpretability analysis at the single-sample level, test samples in the target domain are... Input the retrained DANN and compute its feature layer contribution vector based on the SHAP method:

[0104] ;

[0105] Among them, feature layer contribution Indicates the first Each feature contributes to a shift in the prediction result toward the "fault" direction; feature layer contribution Indicates the first Each feature helps to shift the prediction result away from the "fault" direction.

[0106] This embodiment provides a domain-adaptive UAV fault diagnosis method. It takes multi-source sensor data from the UAV, including accelerometer and gyroscope data, as input and combines domain adaptive learning and interpretability analysis mechanisms to construct a cross-domain fault diagnosis model for different flight scenarios.

[0107] This embodiment provides a domain-adaptive UAV fault diagnosis method that breaks through the dependence of traditional data-driven methods on the consistency of labels and data distribution, and can achieve high-precision fault identification under complex environmental changes and multi-task conditions.

[0108] This embodiment provides a domain-adaptive UAV fault diagnosis method, which introduces a domain adversarial adaptive mechanism to achieve dynamic alignment of feature distributions under different flight environments, significantly improving the cross-domain robustness and generalization ability of UAV fault diagnosis.

[0109] This embodiment provides a domain-adaptive UAV fault diagnosis method that integrates adaptive focus loss and interpretable feature learning to achieve self-adjustment of feature weights and transparency of diagnostic decisions, thereby enhancing the credibility and interpretability of the model.

[0110] This embodiment provides a domain-adaptive UAV fault diagnosis method that effectively compresses redundant information through a multi-dimensional feature screening and reconstruction mechanism, thereby improving the model's real-time performance and engineering deployability while ensuring diagnostic accuracy.

[0111] Example 2

[0112] This embodiment provides a domain-adaptive UAV fault diagnosis system, including:

[0113] The initial training module is configured to: acquire three-axis accelerometer data and three-axis gyroscope data of the UAV under different flight missions, form a multi-dimensional time series dataset, perform sliding window segmentation on the multi-dimensional time series dataset, calculate time domain and frequency domain features for each window of data, construct source domain dataset and target domain dataset, and jointly train the domain adversarial neural network based on the source domain dataset and target domain dataset;

[0114] The secondary training module is configured to: apply Shapley additive interpretation to the trained domain adversarial neural network, calculate the global importance of each time-domain and frequency-domain feature and sort them according to global importance, select the top time-domain and frequency-domain features as important features, retain only the important features in the source domain dataset and the target domain dataset, update the source domain dataset and the target domain dataset, and retrain the domain adversarial neural network based on the updated source domain dataset and the target domain dataset;

[0115] The fault diagnosis module is configured to acquire three-axis accelerometer data and three-axis gyroscope data of the UAV under the current flight mission, calculate important features, and perform fault classification through a retrained domain adversarial neural network.

[0116] It should be noted that each module in this embodiment corresponds one-to-one with each step in Embodiment 1, and their specific implementation processes are the same, so they will not be repeated here.

[0117] Example 3

[0118] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the domain-adaptive unmanned aerial vehicle (UAV) fault diagnosis method described in Embodiment 1 above.

[0119] Example 4

[0120] This embodiment provides a computer device, such as... Figure 3 As shown, the system includes a computer-readable storage medium 1003, a processor 1001, a communication interface 1002, and a computer program stored on the computer-readable storage medium 1003 and executable on the processor 1001. The processor 1001, communication interface 1002, and computer-readable storage medium 1003 can be connected via a bus or other means. The communication interface 1002 is used to receive and send data. When the processor 1001 executes the program, it implements the steps in the domain-adaptive UAV fault diagnosis method described in Embodiment 1 above.

[0121] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A domain-adaptive unmanned aerial vehicle (UAV) fault diagnosis method, characterized in that, include: Acquire three-axis accelerometer data and three-axis gyroscope data of UAV under different flight missions to form a multi-dimensional time series dataset. Perform sliding window segmentation on the multi-dimensional time series dataset, calculate time domain and frequency domain features for each window of data, construct source domain dataset and target domain dataset, and jointly train domain adversarial neural network based on source domain dataset and target domain dataset. For the trained domain adversarial neural network, the Shapley additive interpretation method is applied to calculate the global importance of each time-domain and frequency-domain feature and rank them according to global importance. The top-ranked time-domain and frequency-domain features are considered important features. Only important features from the source and target domain datasets are retained. The source and target domain datasets are then updated. Based on the updated source and target domain datasets, the domain adversarial neural network is retrained. Specifically, the Shapley additive interpretation method is used to calculate and analyze the feature contributions of the trained domain adversarial neural network model. The Shapley additive interpretation value measures the marginal contribution of a single feature to the model output and is defined as follows: ; in, Features The Shapley explanatory value; Indicates the first One feature; To exclude the first Other feature subsets besides the single feature; Features The state of substitution or absence; This represents the expectation of the background data distribution. This represents the prediction function of the domain adversarial neural network model, and its output is the predicted value corresponding to the output of the target classification layer of the domain adversarial neural network. For all samples Calculate the Shapley additive explanatory value for each feature and take the average of the absolute values ​​as its global importance index: ; in, Characteristic features Its global importance in the overall prediction task; The total number of samples used to calculate the additive explanatory value of Shapley; For the sample The The Shapley additive explanatory value of each feature represents the marginal contribution of that feature to the sample; All features Sort the values ​​from largest to smallest to obtain the global importance sequence of the features. Based on the global importance distribution of features, an adaptive cumulative contribution threshold is set. And sort them by global importance from largest to smallest, and select the feature set that meets the following conditions: This yields the updated source domain dataset and target domain dataset; where, This indicates the [number]th [item] after being sorted in descending order of global importance. The global importance of each feature, set This indicates that the cumulative global importance has reached a threshold. The previously selected feature subset, where h is the number of important features selected; The adaptive cumulative contribution threshold is defined as: Where d is the total number of features, It is the balance coefficient. It is a sensitivity parameter that controls the stringency of the mutation determination. all The standard deviation of the value is used to measure the degree of dispersion of importance. If no value satisfies this condition... If j is the largest, then the mutation point term takes the largest value. ; Acquire three-axis accelerometer and three-axis gyroscope data of the UAV under the current flight mission, calculate important features, and perform fault classification through a retrained domain adversarial neural network; Using a domain adversarial neural network, fault classification is performed on the updated target domain dataset, and the feature layer contribution vector is calculated using the Shapley additive interpretation method to perform dynamic interpretability analysis of a single sample. The loss function used when training a domain adversarial neural network is a weighted sum of adaptive focus loss, supervised contrast loss, and domain classification layer loss.

2. The UAV fault diagnosis method based on domain adaptation as described in claim 1, characterized in that, Temporal features include peak value, root mean square value, kurtosis, skewness, and sample entropy.

3. The UAV fault diagnosis method based on domain adaptation as described in claim 1, characterized in that, Frequency domain features include frequency centroid, frequency moment, root mean square of the spectrum, spectral variance, spectral entropy, spectral skewness, and spectral kurtosis.

4. The UAV fault diagnosis method based on domain adaptation as described in claim 1, characterized in that, The domain adversarial neural network includes a feature extractor, a label classifier, and a domain classifier.

5. A domain-adaptive UAV fault diagnosis system, employing the domain-adaptive UAV fault diagnosis method as described in any one of claims 1-4, characterized in that, include: The initial training module is configured to: acquire three-axis accelerometer data and three-axis gyroscope data of the UAV under different flight missions, form a multi-dimensional time series dataset, perform sliding window segmentation on the multi-dimensional time series dataset, calculate time domain and frequency domain features for each window of data, construct source domain dataset and target domain dataset, and jointly train the domain adversarial neural network based on the source domain dataset and target domain dataset; The secondary training module is configured to: apply Shapley additive interpretation to the trained domain adversarial neural network, calculate the global importance of each time-domain and frequency-domain feature and sort them according to global importance, select the top time-domain and frequency-domain features as important features, retain only the important features in the source domain dataset and the target domain dataset, update the source domain dataset and the target domain dataset, and retrain the domain adversarial neural network based on the updated source domain dataset and the target domain dataset; The fault diagnosis module is configured to acquire three-axis accelerometer data and three-axis gyroscope data of the UAV under the current flight mission, calculate important features, and perform fault classification through a retrained domain adversarial neural network.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the domain-adaptive UAV fault diagnosis method as described in any one of claims 1-4.

7. A computer device comprising a computer-readable storage medium, a processor, and a computer program stored on the computer-readable storage medium and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the domain-adaptive unmanned aerial vehicle (UAV) fault diagnosis method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Unmanned aerial vehicle sensor fault diagnosis method based on weighted migration domain adaptive learning

    CN119290057A

  • Optical cable intrusion detection method and device based on distributed optical fiber vibration sensing

    CN120183095A