Meta-Learning and Attention Mechanism for Fixed-Wing Drone Fault Diagnosis

In recent years, fixed-wing drones have been widely adopted across military, agricultural, communication, firefighting, and surveying applications due to their flexibility, efficiency, and moderate cost. However, the complex flight environment and critical onboard components such as sensors and actuators make them susceptible to failures, which can lead to mission abortion or even crashes. Therefore, robust fault diagnosis for fixed-wing drones is essential. Traditional deep learning-based methods often suffer from poor generalization when labeled data are scarce, and they struggle to extract salient features under varying flight conditions. To address these challenges, we propose a meta-learning and effective channel attention (MLECA) method for fixed-wing drone fault diagnosis. In this paper, we present our approach in detail, including problem formulation, meta-task construction, feature encoder design, and experimental validation on real-flight data.

Our work is motivated by the practical need to diagnose actuator faults in fixed-wing drones using limited data collected under different wind conditions. The MLECA method combines model-agnostic meta-learning (MAML) with an efficient channel attention (ECA) mechanism embedded in a convolutional neural network (CNN). First, we preprocess raw sensor data and construct meta-tasks that simulate few-shot scenarios. Second, we design a feature encoder that integrates CNN and ECA to capture and emphasize critical fault features. This encoder serves as the base model, which is trained using MAML to learn a good initialization that can quickly adapt to new fault distributions with only a few gradient updates. Finally, we evaluate the proposed method on real flight datasets from a small fixed-wing drone, comparing it with several baseline approaches. The results demonstrate that MLECA achieves superior diagnostic accuracy and stronger generalization capability, especially under cross-wind conditions.

The rest of this paper is organized as follows. We first describe the problem of fixed-wing drone fault diagnosis and provide necessary background on MAML and ECA. Then we detail the proposed MLECA framework, including meta-task construction and the CNN-ECA encoder. Experimental setup, datasets, results, and analysis follow. Finally, we conclude with a summary of our contributions.

Problem Description and Background

Fixed-wing drones generate lift through relative motion between wings and air, enabling sustained flight. Their complex systems consist of the main structure, actuators, and sensor subsystems. Actuators play a crucial role in maintaining aerodynamic stability, attitude control, and angular rate regulation. However, harsh operating conditions frequently cause actuator failures. Common actuator fault types include:

  • Zero-position floating: the actuator cannot provide any control effort.
  • Lock-in-place: the actuator is stuck at a certain position and cannot respond to commands.
  • Hardover: the actuator is frozen at its physical limit (minimum or maximum).
  • Loss of effectiveness: the actuator responds with reduced efficiency.

The actuator fault model can be expressed mathematically as:

$$
u_{\text{app}} = D \, u_{\text{com}} + E
$$

where \(u_{\text{com}}\) is the commanded control deflection, \(u_{\text{app}}\) is the applied deflection, \(D\) represents the efficiency loss of the control surface, and \(E\) is the bias error. The different fault types can be injected by setting appropriate values of \(D\) and \(E\), as summarized in Table 1.

Table 1: Parameter settings for actuator fault models
Fault type \(D\) \(E\) Description
Zero-position floating 0 0 No control effect
Lock-in-place 0 constant Stuck at a fixed position
Hardover 0 constant (limit) Stuck at min or max limit
Loss of effectiveness constant (<1) 0 Reduced efficiency

In our study, we focus on two control surfaces (right and left ailerons). The fault model for the two surfaces becomes:

$$
\begin{bmatrix}
u_{\text{app1}} \\[2pt]
u_{\text{app2}}
\end{bmatrix}
=
\begin{bmatrix}
d_1 & 0 \\[2pt]
0 & d_2
\end{bmatrix}
\begin{bmatrix}
u_{\text{com1}} \\[2pt]
u_{\text{com2}}
\end{bmatrix}
+
\begin{bmatrix}
e_1 \\[2pt]
e_2
\end{bmatrix}
$$

where subscript 1 denotes the right-wing control surface and subscript 2 denotes the left-wing control surface.

Meta-Learning and Efficient Channel Attention

Model-Agnostic Meta-Learning (MAML) is a gradient-based meta-learning algorithm that learns an initial parameter set \(\theta\) from a distribution of tasks. The objective is that, for any new task \(T_i\), a few gradient updates on a small support set can lead to good performance on the query set. The inner loop updates:

$$
\theta_i’ = \theta – \alpha \nabla_\theta \mathcal{L}_{T_i}(f_\theta, \mathcal{D}_i^{\text{train}})
$$

where \(\alpha\) is the inner learning rate, \(\mathcal{L}_{T_i}\) is the loss on the support set of task \(T_i\), and \(f_\theta\) is the base model. The outer loop then optimizes the initial parameters using the loss on the query sets across a batch of tasks:

$$
\theta \leftarrow \theta – \beta \sum_i \nabla_\theta \mathcal{L}_{T_i}(f_{\theta_i’}, \mathcal{D}_i^{\text{val}})
$$

with \(\beta\) being the meta-learning rate.

Efficient Channel Attention (ECA) is a lightweight attention mechanism that enhances the representational power of CNNs. Unlike SENet, which uses fully connected layers, ECA applies a one-dimensional convolution on the global average-pooled feature vector to capture local cross-channel interactions. Given an input feature map \(X \in \mathbb{R}^{C \times H \times W}\), the global average pooling yields \(z \in \mathbb{R}^C\):

$$
z_c = \frac{1}{H \times W} \sum_{i=1}^{H} \sum_{j=1}^{W} X_{c,i,j}
$$

A 1D convolution with kernel size \(k\) is then applied:

$$
a = \text{Conv1D}(z, k)
$$

followed by a sigmoid activation to produce channel weights \(s = \sigma(a)\). Finally, the output feature map is obtained by rescaling:

$$
Y_{c,i,j} = s_c \cdot X_{c,i,j}
$$

ECA effectively reduces parameter count while maintaining or improving performance.

Proposed MLECA Method

We now detail the MLECA framework for fixed-wing drone fault diagnosis. The overall process is illustrated conceptually in the following structure (note: we do not include a figure caption; instead we embed a relevant image of a fixed-wing drone flight).

fixed-wing drone image

The MLECA method comprises three main stages: (1) data preprocessing and meta-task construction, (2) feature encoder design based on CNN-ECA, and (3) meta-training and meta-testing for fault diagnosis.

Meta-Task Construction

We treat each fault type as a class. For each class, we randomly sample \(K\) samples to form the support set and \(Q\) samples to form the query set. A meta-task is defined as an \(N\)-way \(K\)-shot classification problem. All meta-tasks are generated from the training data, and separate meta-tasks are created from the test data for evaluation. The support set is used for inner-loop adaptation, and the query set is used to compute the outer-loop loss.

CNN-ECA Feature Encoder

The base model used in MAML is a feature encoder that combines 1D convolutional layers with ECA modules. As shown in Table 2, the encoder consists of four identical blocks, each containing a Conv1D layer, batch normalization, ReLU activation, max-pooling, and an ECA block. The final output is fed into a fully connected layer to produce class predictions.

Table 2: CNN-ECA encoder architecture
Layer Kernel size Stride Channels Input size Output size
Conv1D 3 1 64 160×1 160×64
MaxPool1D 2 2 64 160×64 80×64
ECA 64 80×64 80×64
Conv1D 3 1 64 80×64 80×64
MaxPool1D 2 2 64 80×64 40×64
ECA 64 40×64 40×64
Conv1D 3 1 64 40×64 40×64
MaxPool1D 2 2 64 40×64 20×64
ECA 64 20×64 20×64
Conv1D 3 1 64 20×64 20×64
MaxPool1D 2 2 64 20×64 10×64
ECA 64 10×64 10×64
FC \(N\) 640 \(N\)

Training Procedure

During meta-training, for each iteration we sample a batch of tasks \( \{T_i\} \). For each task, we first perform inner-loop updates on the support set using the cross-entropy loss:

$$
\mathcal{L}_S(\theta) = \frac{1}{|S|} \sum_{(x_i,y_i)\in S} \ell\bigl(f_\theta(x_i), y_i\bigr)
$$

$$
\theta’_i = \theta – \alpha \nabla_\theta \mathcal{L}_S(\theta)
$$

Then, we evaluate the adapted model on the query set to compute the outer-loop loss:

$$
\mathcal{L}_Q(\theta’_i) = \frac{1}{|Q|} \sum_{(x_i,y_i)\in Q} \ell\bigl(f_{\theta’_i}(x_i), y_i\bigr)
$$

The meta-parameters are updated by accumulating gradients across tasks:

$$
\theta \leftarrow \theta – \beta \sum_i \nabla_\theta \mathcal{L}_Q(\theta’_i)
$$

In our experiments, we set \(\beta = 0.003\), \(\alpha = 0.1\), and the number of inner steps to 1. The Adam optimizer is used for the outer loop.

Experimental Setup

Dataset

We use the real flight dataset collected by Murat Bronz’s team from a small fixed-wing drone. The data were recorded on four different days with varying wind speeds. Table 3 summarizes the datasets employed in our experiments.

Table 3: Dataset description
Dataset Date Fault types Wind speed (m/s) Sample count
A 12th Normal, \(d_1=0.3\) <2.0 8980
B 13th Normal, \(d_1=0.3\) 8.0 8980
C 21st Normal, \(d_1=0.3\), \(d_2=0.9\)–0.3 (9 types) 2.5 21980
D 23rd Normal, \(d_1=0.3\), \(d_2=0.9\)–0.3 (9 types) 5.0 22480

Data Preprocessing

From the original 50+ sensor variables, we select 8 variables most relevant to actuator faults: linear accelerations \( (\alpha_x, \alpha_y, \alpha_z) \), angular velocities \( (\omega_x, \omega_y, \omega_z) \), and autopilot commands \( (u_{\text{com1}}, u_{\text{com2}}) \). To incorporate temporal dynamics, we concatenate 20 consecutive time steps of these 8 variables, forming an input feature vector of length 160:

$$
X(t) = [X'(t-19), X'(t-18), \ldots, X'(t)]
$$

where \(X'(t)\) is defined as:

$$
X'(t) = [\alpha_x(t), \alpha_y(t), \alpha_z(t), \omega_x(t), \omega_y(t), \omega_z(t), u_{\text{com1}}(t), u_{\text{com2}}(t)]
$$

Baselines and Evaluation Metrics

We compare MLECA with the following methods:

  • SVM: Support vector machine with RBF kernel.
  • CNN: A 4-layer 1D CNN with same architecture as the MLECA encoder but without attention.
  • SHNN: Siamese hybrid neural network with two shared CNN encoders (same architecture as MLECA encoder).
  • ML-CNN: MAML without the ECA module (i.e., using the pure CNN encoder).

All deep learning models use the same hyperparameters (batch size, learning rates) for fair comparison. Accuracy is reported as the average over 10 runs.

Results and Analysis

Binary Fault Diagnosis

We first evaluate the models on the binary classification task (normal vs. right aileron efficiency 30%). Two cross-condition settings are tested: A→B (trained on low-wind data A, tested on high-wind data B) and B→A (the reverse). Results are shown in Table 4.

Table 4: Binary classification accuracy (%) for different methods
Method A→B B→A
SVM 59.47 87.97
CNN 90.08 77.03
SHNN 91.20 79.10
ML-CNN 90.22 87.50
MLECA (ours) 92.19 90.53

MLECA achieves the highest accuracy in both settings: 92.19% for A→B and 90.53% for B→A. Compared to ML-CNN (without ECA), MLECA improves by 1.97% and 3.03%, respectively, confirming the effectiveness of the channel attention mechanism. Moreover, MLECA outperforms SVM, CNN, and SHNN by large margins, especially in the challenging B→A scenario where the training data are noisy.

Multi-Class Fault Diagnosis

We further test the models on the 9-class fault problem using datasets C and D. Because the number of classes is large, we evaluate under 1-shot and 5-shot settings. The results are summarized in Table 5.

Table 5: Multi-class classification accuracy (%) for different methods
Method C→D D→C
SVM 50.44 67.52
CNN 53.93 58.92
SHNN (1-shot) 53.17 57.50
SHNN (5-shot) 60.20 61.29
ML-CNN (1-shot) 52.99 60.10
ML-CNN (5-shot) 55.40 60.43
MLECA (1-shot) 53.93 59.51
MLECA (5-shot) 60.19 60.08

MLECA with 5-shot achieves 60.19% on C→D and 60.08% on D→C, demonstrating competitive performance. Although SVM yields 67.52% on D→C, it drops to 50.44% on C→D, indicating poor stability. The meta-learning approaches (ML-CNN and MLECA) are more consistent across different directions. The addition of ECA provides a slight but noticeable improvement in the 1-shot case.

Impact of Wind Speed

Flight conditions (especially wind speed) significantly affect sensor signals and fault signatures. Figure 8 in the original paper (not repeated here) shows flight paths and angular velocity measurements for different days. Our experiments reveal that models trained on low-wind data (e.g., dataset A) generalize better to high-wind test data (B) than vice versa, because low-wind data contain less noise. In multi-class tasks, D→C (high-wind training to low-wind testing) yields higher accuracy than C→D, likely because training on more noisy data forces the model to learn robust features. The proposed MLECA framework adapts well to these variations due to meta-learning.

Overall, the results confirm that MLECA offers superior generalization for fixed-wing drone fault diagnosis under scarce data and changing environments.

Conclusion

In this paper, we proposed a meta-learning and efficient channel attention (MLECA) method for fixed-wing drone fault diagnosis. By combining MAML with a CNN-ECA feature encoder, our approach learns a robust initialization that can quickly adapt to new fault distributions with only a few samples. The ECA module enhances feature extraction by focusing on important channels, improving diagnostic accuracy. Experiments on real flight data under various wind conditions demonstrate that MLECA outperforms SVM, CNN, SHNN, and ML-CNN in both binary and multi-class tasks, with better stability and generalization. The proposed method is particularly effective when labeled fault data are scarce and flight environments are complex. Future work will explore more advanced attention mechanisms and extend the framework to other types of UAVs.

Scroll to Top