An Intelligent Fault Detection Framework for FW-UAV Based on Hybrid Deep Domain Adaptation Networks and the Hampel Filter

,


Introduction
As one of the representatives of complex systems, unmanned aerial vehicles (UAVs) are widely used in various felds because of their low manufacturing cost, high mobility, and high efciency. However, UAVs have more uncontrollable factors than manned aircraft, and there are more challenges and potential threats in the process of mission execution [1]. Researchers are continuously exploring more intelligent fault detection methods to reduce the failure of system components, improve the safety and reliability of UAV systems, and ensure that UAVs accomplish various complex tasks. Currently, the proposed methods mainly include model-based, knowledge-based, and deep learning-based methods.
Te main idea of the model-based approach is to establish an accurate mathematical analytical model, compare the analytical model's theoretical value with the UAV's real state value, and judge the working state of the UAV system. Te authors in reference [2] considered the use of a kinematic model and an adaptive extended Kalman flter (EKF) to detect UAV faults that minimize turbulent disturbances. However, errors associated with the linearization of the EKF may reduce the detection accuracy and may even lead to flter divergence. Te adaptivity of the process noise covariance (R and Q) of the EKF to sensor/actuator faults is considered in [3] so that the estimation characteristics do not deteriorate. Compared to [3], the approach in [4] is more adaptive, with the KF embedded in the neural network used to weight the parameters of the neural network to update them to identify various faults in the UAV sensors and actuators. At present, model-based methods are the most widely researched and applied (especially various nonlinear observers and Kalman flters), which have certain superiority in real-time state analysis and realtime fault diagnosis, but establishing an accurate analytical model for complex UAVs is not easy to achieve, and there are often cases of tedious calculations and errors resulting in misdiagnosis or omission. Te anti-interference capability also needs to be improved.
Te knowledge-based methods consider the full application of the prior knowledge accumulated by the experts in practice to the fault detection of the UAVs, which is a process of simulating human logical thinking and reasoning. Knowledge-based fault trees [5], expert systems [6,7], and fuzzy reasoning [8] methods have all evolved accordingly, but there has been a gradual decline in the related research and coverage. Te UAV fault tree model is simulated by some methods (such as Monte Carlo), and the components with poor reliability and good reliability are found, which reduces the time cost of manual evaluation to a certain extent [9], but there are often various difculties in obtaining the cause of the fault. Te expert system uses the experience accumulated by domain experts to build a knowledge base and designs programs to simulate human experts' reasoning and decision-making process for fault diagnosis. However, it lacks efective self-learning and adaptive ability. Te authors in reference [7] combine an expert system with the artifcial neural network, which enhances its adaptive ability to a certain extent, promotes the development of this kind of method, and brings new challenges. Te authors in reference [10] combine the fuzzy inference system (FIS) with a particle flter (PF)-estimated state residual to detect the abnormality of the UAV airborne navigation sensor, which improves the real-time performance of fault detection. However, the large amount of computation of PF and the low performance of FIS limits its ability to detect anomalies. In conclusion, although the knowledge-based method solves the problem of accurate modeling of the diagnosed system to some extent, it is faced with some problems, such as difcult knowledge reasoning, difcult knowledge acquisition, self-updating of related systems, and poor self-learning ability.
Deep learning, with strong nonlinear feature extraction ability, has yielded excellent results in many felds including fault diagnosis [11] and is increasingly considered for UAV faults. To give full play to the advantages of deep learning, many researchers try to collect available data through various methods, such as artifcially destroying the blades of drones and collecting data in a safe area [12][13][14], obtaining fault data through simulation [15][16][17], and injecting faults into fying drones through software [18,19]. Nevertheless, due to the multiple limitations of the UAVs themselves and the diversity and complexity of their mission environment, it still faces problems such as scarcity of fault samples, sample imbalance, and difculty in obtaining samples from complex environments. Li et al. [20] proposed a Siamese hybrid neural network (SHNN) framework for UAV fault diagnosis in a limited sample space. However, the overall performance is still much worse than in other felds (e.g., bearing fault diagnosis). Yang et al. [21] used a sparse autoencoder to reconstruct the data to achieve the efect of data cleaning while preserving as much as possible the original fault knowledge of the data to improve the efciency of diagnosis. Gao et al. [22] designed a transfer learning framework based on bidirectional long short-term memory (BiLSTM) networks using a multikernel MMD (MK-MMD) domain adaptation method to reduce the variability between two domains, applied to the case of insufcient samples in the target domain. Bondyra et al. [23] proposed a fault detection algorithm based on signal processing and machine learning to use the acceleration data of IMU sensors to accurately identify rotor faults. Te abovementioned methods all use fight log data, and in order to explore other available data, the authors in reference [24,25] considered using audio data to train a UAV fault detection model, but audio data are susceptible to interference and may be challenging to work in more complex situations. Te deep learning-based approaches only need data to build fault detection models, which do not require the establishment of accurate mathematical models or rely on expert knowledge and is more intelligent than the previous two approaches and also cater to the trend of big data development for UAVs [26]. Deep learning provides an advanced solution for UAV fault detection in the future, but the lack of UAV monitoring data limits the advantages of deep learning in UAV fault detection technology, which is a challenge and an opportunity for UAV fault detection technology.
In summary, deep learning-based approaches in UAV fault detection have endless potential in the future but are currently facing problems such as the scarcity of fault samples and difculties in obtaining fault samples from complex working environments. In this paper, we try to fnd new ways to solve the abovementioned problems to promote the continuous eforts and innovation of deep learning in FW-UAV fault detection. We consider that it is relatively convenient to obtain FW-UAV fault data in some specifc environments (such as the test fight environment and the experimental environment), which contain the knowledge required for FW-UAV fault detection. If this knowledge can be used efectively, perhaps the data dilemma can be solved. Terefore, we propose an FW-UAV fault detection method based on hybrid deep domain adaptation BiLSTM networks and the Hampel flter (HDBNH), which combines the ideas and advantages of data-driven and model-based approaches to learn the knowledge of acquired data for detecting FW-UAV faults in an unknown working environment. Compared with the previous works, the main work and contributions of this paper are as follows: (1) A state sample preparation strategy is proposed, which solves the problems of data complexity, redundancy, nonstandard, and frequency inconsistency, while the generated state samples better support the work of HDBNH. (2) A novel BiLSTM network combining adversarial and MMD domain adaptation is proposed, efectively reducing the diference in feature distribution between the source and target domains and betterenabling knowledge transfer. (3) According to the continuous and dynamic characteristics of FW-UAV states [27], the Hampel flter is proposed for detecting and correcting the predicted values of BiLSTM models to improve fault detection accuracy further.
Te article continues as follows: Section 2 presents the related work and briefy discusses them. Section 3 presents the proposed HDBNH framework in detail. In Section 4, the real fault dataset and the state sample preparation strategy are presented. Section 5 conducts experiments and analyses them from diferent perspectives. Te main conclusions are given in Section 6.

Related Work
In this section, we will briefy review and discuss some of the work related to the proposed methodology.

Unsupervised Domain Adaptation.
Transfer learning is one of the cutting-edge directions in machine learning research today [28]. Te core idea is to learn and accumulate knowledge and experience in the source domain and apply it efectively to the target domain, thus compensating for the lack of labeled data. However, achieving this goal requires that the distribution of features in the source and target domains be as similar as possible. For this reason, unsupervised domain adaptation (UDA) techniques have become a hot research topic in recent years, aiming to minimize the diferences in feature distribution between diferent domains, as shown in Figure 1.
MMD is a measure of the distance between two probability distributions. Te main idea is to map two probability distributions into a high-dimensional reproducing kernel Hilbert space (RKHS) and then calculate their distance in this space, as shown in the following equation: where ‖ · ‖ H is the RKHS, ∅(•) is a mapping, and m and n are the number of samples in the source and target domains, respectively. Te MMD approach has been widely studied given its ability to efectively solve the UDA problem, typically representing DDC [29], which uses MMD to align the features between the layers of two networks. Based on the DDC, the DAN proposed by [30] uses MK-MMD to achieve better performance. In the recent research work, the authors in [31][32][33] have used MMD directly to learn generic domaininvariant feature representations. Specifcally, reference [34] employed MK-MMD at several higher layers with varying weights to achieve efective domain feature transfer of different faults, while the authors in reference [35] applied MMD to reduce distribution diferences between training and test battery data, thereby enabling health assessment of lithium-ion batteries under diferent usage conditions, and the authors in reference [36] used MK-MMD to minimize diferences in the marginal probability distributions of metastable features to eliminate each fault diagnosis taskspecifc distribution diferences of high-level features in the discriminator. In addition, many scholars have worked on improving the performance of MMD methods. For example, a cross-domain active learning method based on Hellinger distance and MMD was proposed by the authors in [37]. Also, the discriminative heterogeneous MMD method (DMMD) proposed in [38] aims to minimize the variance of the domain probability distribution while retaining known discriminative information. In [39], an instance-weighted dynamic MMD (IDMMD) was proposed to dynamically estimate the efects of marginal and conditional distributions of bearing fault data and to adapt the target domain to the source domain. Adversarial domain adaptation (ADA) is an important branch of UDA, where the main idea is to approximate the distribution of the source and target domains by training a generative model. ADA methods usually employ an adversarial generative network (GAN) framework [40], where discriminators and generators can learn from each other through adversarial training, where the generators try to generate samples that match the target domain distribution in order to trick the discriminators; the DANN [41] is the most representative approach. In the early years, the authors in [42,43] only focused on feature matching in some scenarios and did not focus on whether the matched features could improve performance. In recent years, many ADA improvements have been proposed by the researchers for specifc tasks. For example, the authors in [44] improved its performance by designing a new framework and a new loss formulation; a novel domain adaptation scheme for adversarial entropy optimization (AEO) is introduced in [45]. Te authors in reference [46] proposes a more suitable training and more generalized ADA method, using residual connectivity to share features and reconstruct adversarial losses.
MMD achieves impressive results, but this approach may not be efective for domain adaptation if there are large diferences between the data in the source and target International Journal of Intelligent Systems 3 domains. Compared to MMD, ADA achieves better results in most cases, but it also has numerous limitations [47] as follows: (1) ADA is a domain-adaptive method based on deep learning, which needs a lot of data to play a better efect. Terefore, in the limited data scenario, the domain-adaptive method based on MMD is more efective.
(2) In general, the optimization goal of a domain discriminator is to maximize the domain classifcation error in order to achieve domain adaptation. However, simply maximizing the domain classifcation error does not guarantee the desired domain adaptation efect, and there is a risk that the feature distributions of the source and target domains may be confused due to overoptimization. In other words, the domain classifcation accuracy refects the distance of the feature distribution between the source and target domains, and the ideal domain classifcation accuracy is about 50%, as shown in Figure 2(a). However, it is possible that overoptimization leads to a domain classifcation accuracy of approximately 0%, as shown in Figure 2(b); the discriminator's recognition result is the exact opposite of the true one. (3) Te optimization processes of the generator and discriminator may interfere with each other, resulting in unstable training or difculty in convergence. For example, Figure 2(c) shows the results of inadequate optimization.
For the efective adaptation of the diferent mission domains of the FW-UAV, we propose a novel hybrid domain adaptation method, the details of which are described in detail in Section 3.2.

Hampel Filter.
Te Hampel flter is a median absolute deviation-based flter that handles outliers and noise in time series. Te flter identifes and replaces outliers by comparing the distance between each data point and its neighborhood data points one by one, resulting in smooth time-series data [48]. Te Hampel flter is widely used in medical research for data processing and anomaly detection processes [49,50]. In the feld of intelligent manufacturing, the Hampel flter is mainly used in processing machine operation data [51], detecting manufacturing surface defects [52], and other related work; among them, the authors in [53] applied the Hampel flter to the study of intelligent fault diagnosis of wind turbines.
In contrast to general flters, the Hampel flter does not require the assumption that the data obey a Gaussian or some other specifc probability distribution, and the median is an unbiased estimator that resists interference from extreme values and outliers, making the Hampel flter suitable for data fltering and preprocessing tasks in a wide range of anomalous scenarios.

HDBNH Framework
Te initial stages of minor faults in the FW-UAV will not severely impact the FW-UAV, but failure to detect and address these minor faults promptly will lead to catastrophic accidents. Terefore, it is essential to test the functional components of FW-UAVs regularly or irregularly. Te proposed HDBNH framework can serve for test fights, periodic inspections, and other work and can detect minor faults in the early stage of the FW-UAV, thus providing fault information to engineers and avoiding more signifcant losses. In this section, the working principle of HDBNH is described in detail. As shown in Figure 3, the HDBNH framework mainly consists of three parts: feature extractor, domain adaptor, and fault detector.

Feature Extractor.
Te fight data record detailed information about the FW-UAV fight process and imply much knowledge. Te feature extractor is expected to extract the features of FW-UAV faults from the fight data and use them for subsequent fault detection. Te feature extractor consists of two weight-sharing BiLSTM networks (F 1 and F 2 ) with 3 layers and 64 hidden units in each layer. Te BiLSTM networks can handle both forward and backward time-series data and extract important features of the past and future. Te process is as follows: where W, V, and b are the parameters of the model; σ is the sigmoid function and t is the time point; and i t , f t , and o t are the input, oblivion and output gates, respectively. ⊙ is the element-wise product, and c t is a memory cell.

Domain Adaptor.
In the real world, FW-UAV mission environments are exceedingly complex and are infuenced by multiple factors such as human operation, weather and the task load. Terefore, there exist signifcant nonlinear diferences between data from diferent tasks, making effective domain adaptation exceptionally difcult. To mitigate these challenges and successfully perform fault detection tasks in the target domain, we propose a hybrid deep domain adaptation method that efectively reduces the feature distribution diferences between the source and target domains. As shown in the upper right of Figure 3    International Journal of Intelligent Systems diference in edge distribution between the source and target domain data by using L m backpropagation and updating the F 1 and F 2 parameters, as shown in Figure 4.
where ‖ · ‖ H is the regenerated Hibelt space, and f i s and f j t are the ith source-domain feature and the ith target domain feature, respectively. m and n are the number of samples in the source and target domains, respectively. Next, f s and f t are concatenated as shown in equation (5) and fed into the DC for domain classifcation. In this work, we set up a virtual domain label y D to supervise the classifcation task and calculate the domain classifcation error by equation (6). Te optimization process employs adversarial training to ensure that the feature extractor can extract similar features from both the source and target domains. If the DC cannot accurately recognize features from the source and target domains, domain adaptation is achieved. Terefore, our optimization goal is to maximize the domain classifcation error of the DC. To achieve this goal, the parameters of the F 1 , F 2 , and DC are optimized through diferent processes. Te DC optimized through L d backpropagation, while the F 1 and F 2 are optimized through −L d backpropagation, as shown in Figure 4.
where Concat is the concatenation character.
where n is the batch size, y i is the label 0 or 1 of the domain, and p(y i ) is the predicted value of DC. Te hybrid deep domain adaptation method proposed in this study partially addresses the limitations of traditional MMD and ADA methods. MMD methods always provide domain adaptation based on distance measurement, while ADA can achieve consistency of data distribution through adversarial training. Combining both methods can compensate for their respective shortcomings, better achieve domain adaptation between source and target domains, and improve the performance of domain adaptation tasks, as shown in Figure 5 (these limitations are detailed in Section 2.1, and we will verify them through ablation experiments in Section 5.1.1).

Fault Detector.
Te fault detector module is designed to accurately identify the state of the FW-UAV, which is our ultimate goal. Its structure is shown in Figure 3 bottom right and consists of a label classifer (LC) and a Hampel flter (HF).
Te LC consists of a fully connected layer that allows the initial detection of faults in the FW-UAV. Its fault classifcation error is calculated via equation (7). Te optimization objective of the LC is to minimize the fault classifcation error.
where n is the batch size, k is the number of classes, y j is the actual value, and p(y i ) is the predicted value of LC. We designed a HF to test and correct the predicted values of the deep learning model because the change process of the FW-UAV's state during fight is continuous and dynamic [27], which means that the transition process between diferent states takes a certain time. In other words, diferent states before and after the transformation should be maintained for a certain period and show diferent characteristics. If the minor faults detected by the deep learning model only occur in a moment and then return to its original state, it does not afect the original fight, which may be a misjudgment of the deep learning model, and we need to correct it to an original state through the HF. Te main implementation process is shown in Figure 6. LC preliminarily detects the fault of FW-UAV and continuously outputs the results Y l as shown in equation (8) and calculate the median m i (equation (9)) and the median s i (equation (10)) of the window length of Y l within 2k + 1. If |y i − m i | ≥ 3s i , return the new results Y h with m i instead of y i as shown in equation (11). In this way, HF will verify and correct the detected results of each LC in turn.
Y h � y 1 , y 2 , . . . , m i . . . y n−1 , y n , where y i is the fault detection result at time point i, median is the median calculator, and | · | is the absolute value. It is worth noting that unlike methods such as the modelbased KF, the HF can detect and correct only based on the output values of the deep learning model without the need to build any mathematical model, which is the biggest advantage of the HF.  Te total optimization objective can be written as follows: where λ 1 and λ 2 determine the intensity of the domain training and increase from 0 to 1 with training using formula 2/e − 10 * E/max E+1 − 1, and E is the training Epoch. Te workfow of the HDBNH framework around the abovementioned objectives is shown in Algorithm 1.

Real Datasets.
Real fight data (https://github.com/ mrtbrnz/fault_detection/tree/master/data) used in this work are provided by [18]. Te fight experiment system and FW-UAV specifcation are shown in Figure 7. Te ground control station (GCS) can set up autonomous fight missions and manually inject faults during fight. In case of severe faults, the FW-UAV can be controlled manually with an RCtransmitter. Te X-Bee radio modem is used for telemetry International Journal of Intelligent Systems and datalink communication, and the GCS receives the fight data from the FW-UAV via the X-Bee.
Te experimental system mainly simulates the situation where faults occur in the aerodynamic control surfaces, and the fault model is defned as follows [18]: where u app is the control defection of the fnal application, u com is the desired control defection of the ground control, d is the efciency loss of control surfaces, the value of d can be set to simulate the degree of control surface failure, and e is the defection error.
According to equation (13), the two aerodynamic control surfaces of the FW-UAV injected into the fault through the GCS can then be rewritten as follows: where 1 represents the right-wing control surface and 2 represents the left-wing control surface. Finally, faults were injected into the FW-UAV being fown through the GCS, and fight data were recorded for diferent dates in July 2020. In this work, experiments were conducted mainly using the fight data of the 12 th , 13 th , 21 st , and 23 rd , where two states were simulated in the data of 12 th (1) Datasets processing: D S x s , y s ⟶ D train x s , y s , D val x s , y s and D t x t ⟶ D test x t ; set the virtual domain label y D � [0, 1] (2) Training: (3) Input: D train x s , y s , D val x s , y s , D test x t , y D (4) For i in train epochs (5) f Optimizer Adam (DC. parameters) Backpropagation total L t � L l − λ 1 L d + λ 2 L m (11) Optimizer Adam (F 1 . parameters, F 2 . parameters, LC. parameter) (12) Save the best model on D val (13) End for (14) Testing:

State Sample Preparation Strategy.
In order to obtain samples suitable for the HDBNH framework and fully utilize the performance of HDBNH, we performed a series of processing on the data. First of all, fight data record more than 50 variables. To save computing resources and ensure computing speed, we need to select a small number of related variables to support our work. We refer to the choices in [13,16,18] and select v, ψ, θ, ϕ, a x , a y , a z , ω x , ω y , ω z , u 1 , and u 2 , 12 variables, as shown in Figure 8. v is the airspeed, ψ is the yaw angle, θ is the pitch angle, ϕ is the roll angle, a xyz is the linear acceleration in three directions, ω xyz is the angular rate in three directions, and u 1 and u 2 are the control commands of the autopilot. Tese 12 variables are assembled to form the state vector X: Second, the data of each variable are collected by different sensors, which means that the sampling frequency is also inconsistent, where the sampling frequency of a xyz and ω xyz is 50 Hz and the sampling rate of the rest is 20 Hz, resulting in the data points and time points not aligned. To solve this problem, we use a linear interpolation method to make the data frequency of all variables become 20 Hz and then align the time points by moving the time axis, as shown in Figure 9. In addition, each variable has diferent units and value sizes, and all variables were standardized to eliminate the possibility of dominance by one variable.
Finally, based on the t time point, the data of the previous 20 time points (1 s) are chosen as a state sample X t (equation (16)) at moment t. Similarly, slide one time points (0.05 s) to obtain the state sample X t+1 , as shown in Figure 10. Visualizing X t as shown in Figure 11 provides a more intuitive understanding of the sample states at moment t.
Trough the abovementioned series of data processing, we get four state sample sets as shown in Table 1. In fact, such a state sample preparation strategy gives a better performance of the HF, which is further described in Section 5.1.2.

Experiments and Results
In this section, we will experiment with diferent perspectives to verify the performance of the HDBNH framework. Te GCS computer confguration of the experiment is as follows: an Ubuntu 18.04 operating system, an Intel (R) Xeon (R) Silver 4210R CPU @ 2.40 GHz, a GeForce RTX 2080 Ti GPU with CUDA 11.6, and Torch 1.4.0. Te training epoch was 25, the batch size was 64, and the network parameters were updated using an Adam optimizer with an initial learning rate of 0.01.

Ablation Study.
In this section, we mainly analyze the performance of domain adaptors and the HF through ablation experiments.

Ablation Study of the Domain Adaptor.
To verify the efect of hybrid deep domain adaptation of the HDBNH framework, the relevant modules of the domain adaptor were decomposed and ablation experiments were performed according to the control variable principle (as shown in Table 2). Each experiment was repeated fve times and averaged. Te experimental results are shown in the Table 3, where the mutual transfer between A and B is binary classifcation tasks, and the mutual transfer between C and D is 9 classifcation tasks.
From Table 3, it can be seen that HDBNH has obvious advantages, which shows that our proposed hybrid deep domain adaptation method can learn domain-invariant features well to improve fault detection accuracy. FDLH and FMLH are generally better than FLH, but the improvement is limited and even negative optimization occurs on individual tasks, such as FMLH is lower than FLH in A ⟶ B and FDLH is lower than FLH in C ⟶ D. Te main reason for this result is the large diferences in the distribution of features in diferent domains of the FW-UAV and the inherent limitations of the MMD domain adaptation and ADA optimization process (as described in Section 2.1), which do not allow for efective domain adaptation. In contrast, HDBNH's hybrid depth domain adaptation approach allows for efective domain adaptation between the source and target domains in the more complex FW-UAV domain adaptation task.
As an example of experiment C ⟶ D, the sourcedomain features and target domain features extracted by F 1 and F 2 are visualized by T-SNE to better observe the efect of domain adaptation. As shown in Figure 12, HDBNH shows the best domain adaptation, where the feature distribution spaces of the same faults are matched in the source and target domains; at the same time, the diferences in the feature distributions of diferent faults are more obvious. Tis indicates that HDBNH is better able to identify multiple types of faults. Te matching of the feature distributions of the source and target domains of FLH, FDLH, and FMLH are relatively less efective. We also found more severe classlevel alignment confusion for FLH, FDLH, and FMLH, such as matching the feature distributions of fault 4 in the source domain and fault 5 in the target domain, which is an inefective or negatively acting domain adaptation phenomenon. Tis validates the associated domain adaptation problem as described in Section 2.1.

Performance
Analysis of the HF. Te fight data are highly time series and refect the FW-UAV's everchanging state. If a fault detected by LC occurs for International Journal of Intelligent Systems a short period and then subsequently returns to its original state, this is likely to be an error judgment of LC. Terefore, the HF module is added for judging and correcting the results of LC. Tis is one of the main innovations in this work. In this study, the window length (2k + 1) for H is set to 21, corresponding to a time length of 1 second. But in fact, the window length can be set according to diferent situations. Experiments without and with the HF participation (denoted by FDML and HDBNH, respectively) were conducted separately to test the validity of the HF. Each experiment was repeated fve times, and the results are shown in Figure 13.  As can be seen from Figure 13, the HF substantially improves the accuracy of fault detection, especially in the transfer task of C ⟶ D, which is 10.51% higher than FDML without the HF. Figure 14 shows the real fault labels, output of LC, and output of the HF over time and the embedded fgure shows the partial details. As shown in Figure 14, the HF efectively corrects the false predictions of LC, such as the misprediction around 231.4 s. However, there are also many mispredictions that are not corrected, such as between 230.5 s and 231 s. Tis is due to the multiple false predictions of LC in a short period of time, which prevent the HF from working. Te prerequisite for the HF to function better is that LC has a good performance; so, we choose a BiLSTM network to extract past and future features from the timeseries fight data, while adding DC and MMD for domain adaptation to improve the performance of LC.
k is the most crucial parameter of the HF. Terefore, we did the experiment of gradually increasing k from 0 to 30 to observe the efect of k on the results, and the experimental results are shown in Figure 15. It can be seen from Figure 15 that when k increases from 0 to 10, the accuracy of all fault detection tasks also increases signifcantly, but as k continues to increase, the improvement of accuracy is not obvious and tends to be stable. Because the HF detects outliers by referring to values in the window, the number of values in the window is too small to provide an accurate reference. In the state sample preparation strategy (Section 4.2), the sampling frequency of all variables is frst changed to 20 Hz by interpolation, and a state sample is taken by sliding each time point so that 21 state samples of the FW-UAV are obtained in 1 second (except for the very frst second); in     Table 4. Four experiments with transfer tasks were set up for each method, and again, each experiment was repeated fve times, and the experimental results are shown in Figure 16. It is worth noting that we try to set the details of each experiment to the optimal case to ensure fairness of comparison, including data format, hyperparameters, and training process based on the characteristics of each method. From Figure 16, we can see that HDBNH has the best performance in all transfer tasks with an average accuracy of 91.57%, which is much higher than other methods and the    Figure 13: Comparison of experimental results with and without the HF participation. International Journal of Intelligent Systems with the original paper; SHNN is a few-shot learning method based on hybrid CNN and LSTM Siamese network, which will be more advantageous in the case of limited samples.

Te Infuence of Wind Speed.
Te FW-UAVs are afected by many factors (such as wind, payload, and icing) during the execution of the mission. It is impossible to obtain data from all mission environments for training fault detection models. HDBNH is a transfer learning idea that is expected to learn from certain mission environment data and be used to detect the states of FW-UAVs in other mission environments. However, in transfer learning, the knowledge learned by the model in the source domain is crucial. In this section, we will explore the efect of model learning knowledge under diferent wind speeds. Figure 17 shows  Figure 18. In fact, the ground control station sets an "8" shaped autonomous fight path, but it can be seen from the fgure that the greater the wind speed, the greater the deviation of the track. It may be because as wind speed increases and working conditions become more complex, state features become more obvious; as a result, the model is easier to extract and apply fault features in more complex working conditions. At the same time, we also found that the difference between the results of B ⟶ A and A ⟶ B is greater than that of C ⟶ D and D ⟶ C because the wind speed diference between A and B is greater.
Although the abovementioned results show that the wind speed is greater, the model learning efect is better, but we think there will be an optimal wind speed, which needs to get more data and verify in the future.

Other Analysis.
Experiments show that HDBNH has excellent robustness and generalization, can learn knowledge from one working condition well, and efectively detect the state of FW-UAV in other unknown working conditions. However, HDBNH has some limitations in real-time online detection, which is more suitable for ofine detection, such as detecting FW-UAVs that have completed tasks, ofine analysis of test fights, and regular or irregular ofine detection. Because HDBNH has the process of domain adaptation training, it needs the participation of target domain samples; this means that if real-time fault detection is performed, it is necessary to obtain fight data from the FW-UAV in real-time for onsite training. However, the energy reserve of the FW-UAV is limited. Figure 19 shows

Methods
Domain adaptation methods Details SVM [18] None Traditional machine learning method: support vector machine CNN None Ordinary convolution neural network SHNN [20] None Few-shot learning method based on hybrid CNN and LSTM Siamese network DDC [29] MMD An adaptive MMD criterion metric is added to the previous layer of the classifer MMDA [54] MMD Multilayer MMD domain adaptation DANN [41] Adversarial Domain adaptation based on adversarial CNN_FT [55] Fine tuning Fine-tune the full connection layer with the labeled target sample BiLSTM_FT [56] Fine tuning Fine-tuning method for residual life prediction FDML (ours) Hybrid adversarial and MMD HDBNH framework removes the HF HDBNH (ours) Hybrid adversarial and MMD Based on hybrid domain-adaptive BiLSTM networks and the HF the training elapsed time of HDBNH, which takes about 400 s to achieve optimal training. Such a situation may be improved when the GCS computer confguration is upgraded. In addition, the detection process of the HF module will also generate additional delays. In this work, the additional delay caused by the HF is 0.5 s, which is half the length of the time window. Meanwhile, it can be seen from Figure 19        gradually converge near 0, and L d increases gently with training. It further proves the efectiveness of the designed HDBNH framework.

Conclusion
Deep learning provides advanced solution ideas for future UAV fault detection, but the current lack of UAV monitoring data limits the advantages of deep learning for UAV fault detection, which are a challenge and an opportunity. In this paper, we mainly consider the data availability of FW-UAVs under a variety of actual fight conditions and propose an FW-UAV fault detection framework based on hybrid deep domain adaptation BiLSTM networks and the HF (HDBNH), the main purpose of which is to learn the knowledge of acquired data for detecting FW-UAV faults in other unknown operating conditions. Also, a state sample preparation strategy is proposed for the HDBNH framework, which solves the problems of data complexity, redundancy, nonstandard, and frequency inconsistency, while the generated state samples better support the work of HDBNH.
Extensive experiments have been done in real fight data to verify the efectiveness of the hybrid deep domain adaptation method, the efectiveness of the HF module, and high ft between the state sample preparation strategy and the HDBNH framework. Compared with some current mainstream methods, HDBNH has better performance. It can learn detection knowledge from acquired fight data and efectively use the learned knowledge to detect faults in other unknown conditions. Te efect of wind speed is also explored in this work, and it is believed that the higher the wind speed, the more complex the working conditions are and the more pronounced the state features will be. Terefore, it is also easier for the model to extract the state features from the fight data at larger wind speeds. Finally, the limitations of HDBNH are discussed, and it is pointed out that HDBNH is more suitable for ofine detection.
HDBNH provides a new solution for FW-UAV fault detection. However, there is still a lot of work to be done, such as improving the capability of real-time detection and collecting more fight data for more experiments.

Data Availability
Te data that support the fndings of this study are available from the frst author (Y. Z.) or the corresponding author (S. L.) upon reasonable request.

Conflicts of Interest
Te authors declare that they have no conficts of interest.