Deep Learning Meets State Estimation: Securing Quadrotor Drones Against Sensor Attacks

The proliferation of unmanned aerial vehicles (UAVs), particularly quadrotor drones, has revolutionized numerous sectors from agriculture and logistics to surveillance and emergency response. The operational success and safety of these autonomous systems are fundamentally reliant on the integrity of data provided by their onboard sensors, such as Inertial Measurement Units (IMUs) and Global Navigation Satellite Systems (GNSS). Among these, GNSS signals are particularly vulnerable to malicious interference due to their weak signal strength and publicly known civilian code structure, making spoofing and false data injection (FDI) attacks a critical threat. A successful attack can stealthily redirect a quadrotor drone, leading to mission failure, loss of assets, or even their capture and weaponization. Consequently, the development of robust, accurate, and timely sensor attack detection mechanisms is paramount for the secure deployment of quadrotor drones.

Traditional approaches to attack or fault detection for quadrotor drones can be broadly categorized into model-based and data-driven (learning-based) methods. Model-based techniques, such as those utilizing observers or Kalman filters, estimate the system’s internal state and trigger an alarm when the residual—the difference between sensor measurements and model-based estimates—exceeds a statistically derived threshold. While effective for certain fault profiles, their performance is highly dependent on the accuracy of the underlying physical model and the chosen threshold, which is often sensitive to noise and may fail against sophisticated, stealthy attacks designed to remain within these bounds. On the other hand, purely data-driven methods, like those employing Long Short-Term Memory (LSTM) networks or Support Vector Machines (SVMs), learn the normal behavioral patterns of the quadrotor drone from historical data. They can detect anomalies but often require vast amounts of labeled training data and may lack the interpretability and real-time performance guarantees needed for safety-critical applications.

This article addresses the aforementioned challenges by proposing a novel, hybrid detection framework that synergistically combines the strengths of state estimation and deep learning. The core of our methodology involves a two-stage process: feature extraction and feature mapping. First, an Extended Kalman Filter (EKF) is employed as a robust state estimator for the nonlinear dynamics of the quadrotor drone. The EKF provides a real-time, probabilistic estimate of the drone’s state (e.g., position, velocity, attitude). The sequence of estimation errors, or innovations, generated by the EKF serves as a rich source of features that are sensitive to discrepancies between the predicted model behavior and actual sensor readings. To capture temporal patterns indicative of different attack types, these innovation sequences are processed using sliding temporal windows. Second, a Deep Belief Network (DBN), a powerful deep learning architecture, is trained to establish a complex, nonlinear mapping between these engineered feature vectors and the corresponding sensor status (normal or under attack). The EKF simplifies the feature extraction process from raw sensor streams, while the DBN excels at learning intricate patterns from these features, leading to high detection accuracy. Furthermore, to enhance the resilience of the system during an attack, we integrate the detection output into the estimation loop, creating an adaptive EKF that dynamically degrades the trust in potentially compromised sensor measurements.

Mathematical Modeling of the Quadrotor Drone

Accurate state estimation is the cornerstone of our detection approach. We begin by defining a nonlinear mathematical model for a quadrotor drone. Using the Euler angle convention, let $\boldsymbol{\Theta} = [\phi, \theta, \psi]^T$ represent the roll, pitch, and yaw angles defining the orientation of the body frame $\{B\}$ with respect to the earth-fixed inertial frame $\{E\}$. Let $\mathbf{p}^e = [p_x, p_y, p_z]^T$ be the position of the center of mass in $\{E\}$, and $\boldsymbol{\omega}^b = [\omega_x, \omega_y, \omega_z]^T$ be the angular velocity expressed in $\{B\}$. The equations of motion, neglecting aerodynamic drag and gyroscopic effects, are given by:

$$
\begin{aligned}
\ddot{\mathbf{p}}^e &= g\mathbf{e}_3 – \frac{f}{m} \mathbf{R}_b^e \mathbf{e}_3, \\
\dot{\boldsymbol{\Theta}} &= \mathbf{W}(\boldsymbol{\Theta}) \cdot \boldsymbol{\omega}^b, \\
\mathbf{J} \dot{\boldsymbol{\omega}}^b &= -\boldsymbol{\omega}^b \times (\mathbf{J} \boldsymbol{\omega}^b) + \boldsymbol{\tau}.
\end{aligned}
$$

Here, $g$ is the gravitational acceleration, $m$ is the mass, $f$ is the total thrust force, and $\boldsymbol{\tau} = [\tau_x, \tau_y, \tau_z]^T$ is the control torque vector. $\mathbf{e}_3 = [0,0,1]^T$. The rotation matrix $\mathbf{R}_b^e$ transforming a vector from $\{B\}$ to $\{E\}$ is:

$$
\mathbf{R}_b^e = \begin{bmatrix}
c_\theta c_\psi & c_\psi s_\theta s_\phi – s_\psi c_\phi & c_\psi s_\theta c_\phi + s_\psi s_\phi \\
c_\theta s_\psi & s_\psi s_\theta s_\phi + c_\psi c_\phi & s_\psi s_\theta c_\phi – c_\psi s_\phi \\
-s_\theta & s_\phi c_\theta & c_\phi c_\theta
\end{bmatrix}.
$$

The matrix $\mathbf{W}(\boldsymbol{\Theta})$ relating angular velocities to Euler angle rates is:

$$
\mathbf{W}(\boldsymbol{\Theta}) = \begin{bmatrix}
1 & s_\phi t_\theta & c_\phi t_\theta \\
0 & c_\phi & -s_\phi \\
0 & s_\phi / c_\theta & c_\phi / c_\theta
\end{bmatrix}.
$$

And $\mathbf{J} = \text{diag}(I_{xx}, I_{yy}, I_{zz})$ is the inertia matrix. For state estimation, this continuous-time model is discretized using the Euler method with a sampling time $T_s$, leading to a discrete-time nonlinear state-space model:

$$
\begin{aligned}
\mathbf{x}_{k+1} &= \mathbf{f}(\mathbf{x}_k, \mathbf{u}_k) + \mathbf{w}_k, \\
\mathbf{y}_k &= \mathbf{H} \mathbf{x}_k + \mathbf{v}_k.
\end{aligned}
$$

The state vector $\mathbf{x}_k = [\mathbf{p}^e_k; \dot{\mathbf{p}}^e_k; \boldsymbol{\Theta}_k; \boldsymbol{\omega}^b_k]$ includes position, velocity, attitude, and angular rates. The control input is $\mathbf{u}_k = [f_k, \tau_{x,k}, \tau_{y,k}, \tau_{z,k}]^T$. The measurement $\mathbf{y}_k$ typically includes position, velocity (from GNSS/IMU fusion), and angular rates (from IMU). $\mathbf{w}_k \sim \mathcal{N}(0, \mathbf{Q})$ and $\mathbf{v}_k \sim \mathcal{N}(0, \mathbf{R})$ are independent process and measurement noise, respectively. The key parameters for a typical quadrotor drone used in our study are summarized below.

Table 1: Physical Parameters of the Quadrotor Drone Model
Parameter Symbol Value Unit
Mass $m$ 1.2 kg
Arm Length $l$ 0.154 m
Moment of Inertia (X) $I_{xx}$ 0.00864 kg·m²
Moment of Inertia (Y) $I_{yy}$ 0.00864 kg·m²
Moment of Inertia (Z) $I_{zz}$ 0.0620 kg·m²
Gravity $g$ 9.81 m/s²
Sampling Time $T_s$ 0.01 s

Sensor Attack Model and Threat Analysis

We focus on False Data Injection (FDI) attacks targeting the GNSS sensor suite of the quadrotor drone. The adversary aims to inject malicious signals into the sensor measurements, gradually or abruptly misleading the drone’s controller without triggering conventional fault alarms. The compromised measurement equation is modeled as:

$$
\mathbf{y}_k = \begin{cases}
\mathbf{H}\mathbf{x}_k + \mathbf{v}_k, & \text{for } k < \Gamma, \\
\mathbf{H}\mathbf{x}_k + \mathbf{v}_k + \mathbf{G}\mathbf{a}_k, & \text{for } k \ge \Gamma.
\end{cases}
$$

Here, $\Gamma$ is the attack onset time, $\mathbf{a}_k \in \mathbb{R}^{9}$ is the attack vector, and $\mathbf{G} = \text{diag}(\lambda_1, …, \lambda_9)$ is the attack incidence matrix with $\lambda_i \in \{0,1\}$. For a GNSS spoofing attack targeting position and velocity, we set $\lambda_{1-6}=1$ and $\lambda_{7-9}=0$. We consider two representative attack profiles to evaluate the detector’s robustness:

  1. Random Bounded Attack: $a^i_k \sim \mathcal{U}(m, n)$. This mimics an attacker jamming or injecting noisy data.
  2. Stealthy Ramp Attack: $a^i_k = \beta \cdot (k – \Gamma)$. This represents a sophisticated attacker slowly diverging the estimated state to avoid sudden residual changes, which is particularly challenging for threshold-based detectors.

The impact of such attacks is severe. If the controller acts on the spoofed position $\mathbf{p}^e_{spoofed} = \mathbf{p}^e_{true} + \mathbf{a}_k$, it will command the quadrotor drone to move to counteract the perceived error, ultimately causing the true position to drift away from the desired trajectory, potentially leading to a complete loss of control.

The Proposed EKF-DBN Attack Detection Framework

Our proposed solution is a hybrid architecture where an Extended Kalman Filter serves as an intelligent feature preprocessor, and a Deep Belief Network acts as a high-performance classifier.

Feature Extraction via Extended Kalman Filter

The EKF provides the optimal state estimate $\hat{\mathbf{x}}_{k|k-1}$ and the corresponding innovation sequence $\boldsymbol{\nu}_k = \mathbf{y}_k – \mathbf{H}\hat{\mathbf{x}}_{k|k-1}$. Under normal conditions, $\boldsymbol{\nu}_k$ is a zero-mean white noise sequence with covariance $\mathbf{S}_k = \mathbf{H}\mathbf{P}_{k|k-1}\mathbf{H}^T + \mathbf{R}$. An attack disrupts this property. We propose two feature vectors derived from the innovation sequence, tailored to detect different attack types.

For detecting abrupt or random attacks (Type 1), the magnitude of the innovation is a strong indicator. We use the squared Euclidean norm over a sliding window of size $M$:

$$
\eta_k = \boldsymbol{\nu}_k^T \boldsymbol{\nu}_k, \quad \mathbf{o}^{(\eta)}_k = [\eta_{k-M+1}, \eta_{k-M+2}, …, \eta_{k}]^T.
$$

For detecting stealthy ramp attacks (Type 2), the direction and persistent drift of the innovation are more informative than its instantaneous magnitude. We compute the cumulative sum of innovations for the position channels over a window of size $N$:

$$
\bar{\boldsymbol{\nu}}_k = \sum_{i=k-N+1}^{k} \boldsymbol{\nu}_i, \quad \mathbf{o}^{(r)}_k = [\bar{\nu}^{px}_{k-N+1}, …, \bar{\nu}^{px}_k, \bar{\nu}^{py}_{k-N+1}, …, \bar{\nu}^{py}_k, \bar{\nu}^{pz}_{k-N+1}, …, \bar{\nu}^{pz}_k]^T.
$$

The window sizes $M$ and $N$ are hyperparameters that balance detection sensitivity, delay, and computational load.

Nonlinear Feature Mapping via Deep Belief Network

The feature vectors $\mathbf{o}^{(\eta)}_k$ or $\mathbf{o}^{(r)}_k$ are fed into a Deep Belief Network for classification. A DBN is a generative graphical model constructed by stacking multiple Restricted Boltzmann Machines (RBMs). Its deep architecture allows it to learn hierarchical representations of the input features, making it highly effective for complex pattern recognition tasks like distinguishing between normal and attacked sensor patterns for a quadrotor drone.

The training of the DBN-based detector is performed offline and involves two phases:

  1. Unsupervised Pre-training: Each RBM layer is trained greedily using Contrastive Divergence to learn a good initial representation of the input feature distribution.
  2. Supervised Fine-tuning: After stacking the RBMs, a final classification layer (e.g., logistic regression) is added on top. The entire network is then fine-tuned using backpropagation with labeled data (normal vs. attacked) to minimize the classification error.

This process yields a detector that outputs a probability $p_k \in [0,1]$, which can be thresholded to obtain a binary decision $d_k = \mathbb{I}(p_k > 0.5)$. The structure of the DBN is a design choice. Our analysis determined that a 4-layer architecture provided an optimal balance between accuracy and complexity for this quadrotor drone application.

Table 2: Example Configurations of the DBN Attack Detector
Detector Target Attack Input Dim RBM Layer Sizes Output Dim
DBN-Type1 Random M=27 108-54-54-27 1
DBN-Type2 Ramp 3N=81 324-162-162-81 1

Adaptive EKF for Enhanced Robustness

When an attack is detected ($d_k=1$), blindly trusting the EKF update with compromised measurements degrades state estimate quality. We propose an adaptive mechanism that modifies the EKF’s measurement noise covariance matrix $\mathbf{R}$ in real-time, effectively reducing the gain (trust) on the suspicious sensor channels. The adaptive scaling factor is computed based on the innovation sequence over a recent window:

$$
\begin{aligned}
\mathbf{S}_k &= \left( \sum_{j=1}^{N_w} \mathbf{V}_j \boldsymbol{\nu}_{k-j}\boldsymbol{\nu}_{k-j}^T – \mathbf{H}\mathbf{P}_{k|k-1}\mathbf{H}^T \right) \mathbf{R}^{-1}, \\
\hat{s}^i_k &= \max(1, \mathbf{S}_{k}^{ii}), \quad i=1,…,9, \\
\tilde{\mathbf{R}}_k &= \text{diag}(\hat{s}^1_k, …, \hat{s}^9_k) \mathbf{R}.
\end{aligned}
$$

The Kalman gain is then recalculated using $\tilde{\mathbf{R}}_k$: $\mathbf{K}_k = \mathbf{P}_{k|k-1}\mathbf{H}^T (\mathbf{H}\mathbf{P}_{k|k-1}\mathbf{H}^T + \tilde{\mathbf{R}}_k)^{-1}$. This adaptive EKF ensures that the state estimation of the quadrotor drone remains reliable even during prolonged attack periods.

Performance Evaluation and Analysis

We conducted extensive simulations in MATLAB to validate the proposed EKF-DBN framework for the quadrotor drone. The performance metrics are False Alarm Rate (FAR) and Missed Detection Rate (MDR), with a defined maximum allowable detection delay $t_{max}$.

Influence of Sliding Window Size

The size of the sliding window ($M$, $N$) is crucial. A larger window incorporates more temporal information, potentially increasing accuracy but also increasing detection delay and computational cost. We evaluated detectors with different window sizes.

Table 3: Detection Performance vs. Window Size (Ramp Attack)
Detector (N) Accuracy (%) FAR (%) MDR (%) Avg. Comp. Time (ms)
DBN-Type2 (18) 68.96 0.00 31.04 0.0282
DBN-Type2 (21) 92.78 5.04 2.18 0.0297
DBN-Type2 (24) 90.38 7.86 1.76 0.0322
DBN-Type2 (27) 94.52 4.02 1.46 0.0342

The results indicate an optimal point (N=27 for the ramp attack detector) where accuracy is high, and the MDR is minimized at an acceptable computational cost. The increase in computation time with window size is predictable and manageable for real-time operation on modern flight controllers.

Comparative Analysis with Baseline Methods

We compared our EKF-DBN detector against three classical methods: a simple $l_2$-norm detector on the innovation, an Innovation Sequence $\chi^2$-detector (ISD), and a standard Deep Neural Network (DNN) classifier using the same features.

Table 4: Comparative Performance Analysis for Stealthy Ramp Attack
Detection Method Accuracy (%) FAR (%) MDR (%)
$l_2$-norm Detector < 5.0 > 95.0 ~0
Innovation Sequence $\chi^2$ (ISD) < 5.0 > 95.0 ~0
DNN Classifier 86.74 8.92 4.34
Proposed EKF-DBN 94.52 4.02 1.46

The results clearly demonstrate the superiority of the proposed approach. The traditional model-based detectors ($l_2$-norm, ISD) fail catastrophically against the stealthy ramp attack, as the attack is designed to stay within their statistical thresholds. While the DNN performs reasonably well, the EKF-DBN framework achieves significantly higher accuracy and a lower missed detection rate, which is critical for the safety of the quadrotor drone. The pre-training phase of the DBN likely contributes to learning more robust feature representations compared to the randomly initialized DNN.

Benefits of Adaptive State Estimation

The advantage of integrating attack detection with the adaptive EKF is demonstrated by comparing the state estimation error during an attack period. The normalized estimation error squared (NEES) for the position states is significantly lower when using the adaptive EKF compared to the standard EKF after attack onset. The adaptive filter successfully mitigates the corrupting influence of the attacked GNSS measurements, allowing the quadrotor drone’s internal model (propagated by IMU data) to maintain a more accurate state estimate until the attack ceases or is fully isolated.

Conclusion and Future Directions

This article presented a novel, hybrid sensor attack detection framework for quadrotor drones that combines the model-based reasoning of an Extended Kalman Filter with the powerful pattern recognition capabilities of a Deep Belief Network. The EKF efficiently extracts temporally informative features from the innovation sequence, while the DBN learns the complex mapping from these features to the sensor’s health status. The proposed method demonstrated superior performance compared to conventional model-based and basic learning-based detectors, particularly against sophisticated stealthy attacks. Furthermore, the incorporation of an adaptive EKF mechanism enhances the overall system resilience by maintaining reliable state estimation during attack periods.

Future work will focus on several important extensions. First, the implementation and testing of this algorithm on a real quadrotor drone hardware platform is essential to validate its performance under real-world noise, disturbances, and computational constraints. Second, the current detector is trained for specific attack profiles; exploring online or continual learning techniques to adapt to novel, unseen attack strategies would significantly improve its robustness. Third, extending the framework to jointly detect and isolate attacks on multiple sensors (e.g., distinguishing between GNSS and IMU attacks) is a critical step towards comprehensive quadrotor drone security. Finally, integrating the detection and isolation output with a secure controller that can enact mitigation strategies (e.g., switching to vision-based navigation or executing a safety landing) will complete the loop for building truly resilient autonomous aerial systems.

Scroll to Top