betaFeedback

WorksComputer Science

Selective Sliding Mode Control Enhances Robustness of Aerial Robots Under Disturbances

Abstract

Quadrotor control under disturbances such as wind gusts and payload variations remains challenging. First-order sliding mode control (SMC) and matched/unmatched uncertainty distinction are classical approaches; however, neither tells a practitioner which loops in a cascaded controller should be made robust to sustain disturbances, how to tune those loops, nor what the additional costs are on an embedded processor. Applying robust control uniformly across all axes addresses disturbances indiscriminately, adding tuning effort on axes where no disturbance acts. On inherently underactuated vehicles, disturbances along some axes cannot be opposed directly at all. We propose a principled methodology for deciding where robust control belongs in a cascaded architecture, with all control running onboard the vehicle. We recover the acting disturbance from PID hover flights under disturbance by inverting the equations of motion, use the recovered signal to identify and quantify the excited axes, and deploy robust control where it counts. Experiments on a Crazyflie 2.1 quadrotor under slung-payload and oblique-wind disturbances show tracking improvements concentrated on the axes the rule selects, and gain sweeps confirm that the switching gain reduces error on matched axes but has no effect on an excited unmatched axis, as the analysis predicts.

Introduction

Quadrotors are increasingly deployed for infrastructure inspection, search and rescue, and monitoring, where external disturbances routinely degrade tracking performance and transient stability [1, 2, 3]. Counter-acting these disturbances is complicated by underactuation: four control inputs must govern six degrees of freedom, and quadrotors produce no lateral force directly and must tilt to move sideways. This same structure, however, offers an opportunity. The distinction between disturbances that actuators can directly oppose (matched) and those they cannot (unmatched) [4, 5, 6] offers a natural criterion for where robust control is worth deploying. Yet this structure is rarely exploited, with robust switching laws applied uniformly across all axes rather than only where a disturbance can be opposed [7, 8, 9].

Cascaded PID remains the practical default for its low computational overhead and intuitive tuning [10]. However, its disturbance rejection is limited by the bandwidth-noise tradeoff of fixed-gain linear feedback [11]. Integral action removes constant steady-state error asymptotically, so mid-flight payload addition or a sudden crosswind induces a transient excursion

before the integrator converges. Raising PID gains for faster rejection amplifies measurement noise and shrinks the stability margin, trading one limit for another.

To overcome these linear limits, alternative robust control schemes exist, but each carries requirements on onboard resources, sensing fidelity, or modeling that can be difficult to meet on lightweight quadrotors. Estimate-and-cancel schemes, such as Incremental Nonlinear Dynamic Inversion (INDI) [12], rely on high-rate angular acceleration feedback and precise control-effectiveness models, both of which are degraded onboard, where differentiated gyro signals are noisy and models only approximate. In disturbance and extended-state observers (DOBs/ESOs) [13, 14, 15], high observer gains amplify high-frequency IMU measurement noise and introduce phase lag through the low-pass filtering they typically require, while lower gains track fast transient disturbances more slowly. Adaptive schemes [9, 16] require persistent excitation to guarantee parameter convergence; step disturbances at hover, such as an attached payload, provide little excitation, which can leave adaptation slow or prone to drift. Learning-based methods have shown promise in handling unmodeled dynamics [6, 17, 18], but typically lack deterministic error bounds unless coupled with model predictive architectures [4, 19], whose real-time optimization remains considerably more expensive than a fixed control law.

Bound-based robust schemes are far less demanding to implement onboard: sliding mode control (SMC) requires only the tracking error, its derivative, and a disturbance bound, reducing online evaluation to a few algebraic operations per axis per cycle [20]. Yet standard quadrotor

All authors are with the School of Engineering and Department of Computer Science, Brown University, Providence, RI 02912, USA. Email: {anoop_kiran, thales_silva, nora_ayanian}@brown.edu SMC adds switching terms to every axis, including the lateral ones the vehicle cannot directly actuate, where a switching term does not improve rejection, adds parameters to tune, and can degrade tracking when switching terms in the position and attitude loops act on the same lateral force [7, 8, 9]. Moreover, such work is largely evaluated in continuous-time simulation under ideal state feedback [8], [21], leaving the discretization, chattering, and compute trade-offs of real hardware untested. Existing quadrotor SMC work does not use flight data to decide which axes need a switching term, which parameter to tune on each, or what it costs onboard.

Observer- and inversion-based methods estimate the disturbance online to cancel it on every axis. We instead measure the disturbance once, from PID hover flight logs, and our selective approach places a switching term only where a disturbance is both present and actuator-reachable (Figure 1). In a nutshell, the key intuition is that robustness is useful only when the controller has the authority to act.

Figure 1. Selective SMC deployment workflow. PID hover flights under disturbance are inverted through the equations of motion ①. The recovered per-axis disturbance d^(t)\hat{d}(t) is scored by its excitation δ^\hat{\delta} against a threshold from nominal hovers to identify the excited axes ②. Excited axes receive SMC, tuning the switching gain kk on matched axes and the surface slope λ\lambda on unmatched axes, while the remaining axes retain PID ③.

Contributions: This work turns the matched and unmatched distinction into a practical procedure for deploying robust control. Specifically, the contributions are:

  1. A per-axis deployment rule that identifies from PID hover flights where robust control belongs and which parameter to tune on each axis, built on actuation geometry and the gain response of boundary-layer SMC (Sec. IV).

  1. Hardware validation under a slung payload and an oblique wind, showing that the switching gain reduces error only on matched axes while the surface slope governs unmatched ones, and that tracking improves on exactly the axes the rule selects (§ 3.4-A–V-B).

  1. An evaluation under fully onboard state estimation showing that selective SMC retains its advantage over INDI, at no added computational cost over the built-in PID (§ 3.4-C–V-D).

Preliminaries

Quadrotor Dynamic Model

We use the standard rigid-body quadrotor model [22], with world frame W (zz up), body frame B, position p=[x,y,z]T\mathbf{p} = [x,y,z]^{\mathsf{T}}, Euler angles η=[ϕ,θ,ψ]T\boldsymbol{\eta} = [\phi,\theta,\psi]^{\mathsf{T}}, and body-to-world rotation R(η)∈SO⁡(3)\mathbf{R}(\boldsymbol{\eta}) \in\operatorname{SO}(3). Newton’s and Euler’s equations read

mp¨=mg+R(η)F+dp,(1)m\ddot{\mathbf{p}} = m\mathbf{g} + \mathbf{R}(\boldsymbol{\eta})\mathbf{F} + \mathbf{d}_{p}, \tag*{(1)}
Iω˙=τ−ω×Iω+dω,(2)\mathbf{I}\dot{\boldsymbol{\omega}} = \boldsymbol{\tau} - \boldsymbol{\omega} \times\mathbf{I}\boldsymbol{\omega} + \mathbf{d}_{\omega}, \tag*{(2)}

with mass mm, g=[0,0,−g]T\mathbf{g} = [0,0,-g]^{\mathsf{T}}, body-frame thrust F=[0,0,Fz]T\mathbf{F} = [0,0,F_z]^{\mathsf{T}}, inertia I=diag⁡(Ixx,Iyy,Izz)\mathbf{I} = \operatorname{diag}(I_{xx},I_{yy},I_{zz}), body rates ω\boldsymbol{\omega}, and control torques τ=[τϕ,τθ,τψ]T\boldsymbol{\tau} = [\tau_{\phi},\tau_{\theta},\tau_{\psi}]^{\mathsf{T}}. Here dp\mathbf{d}_{p} is a force disturbance and dω\mathbf{d}_{\omega} a moment disturbance, both in R3\mathbb{R}^{3} and we treat them separately, so each classification below is a split within R3\mathbb{R}^{3} rather than of the full wrench. We assume that they are bounded, with ∥dp∥≤δp\lVert\mathbf{d}_{p}\rVert\le\delta_{p} and ∥dω∥≤δω\lVert\mathbf{d}_{\omega}\rVert\le\delta_{\omega}, where δp\delta_{p} and δω\delta_{\omega} are positive constants. The bound values are not known a priori, but are estimated from disturbed hovers through the excitation metric of Sec. IV-B.

Disturbance Classification

Whether a controller can reject a disturbance or only attenuate it depends on how much of the disturbance lies in the directions its actuators reach. We define the span range⁡(Bp)⊆R3\operatorname{range}(\mathbf{B}_{p}) \subseteq\mathbb{R}^{3} of the input map Bp(η)\mathbf{B}_{p}(\boldsymbol{\eta}) from control inputs to translational force as the matched subspace, and its orthogonal complement as the unmatched subspace. With the orthogonal projector

Pm=Bp(BpTBp)−1BpT,(3)\mathbf{P}_{m} = \mathbf{B}_{p}(\mathbf{B}_{p}^{\mathsf{T}}\mathbf{B}_{p})^{-1}\mathbf{B}_{p}^{\mathsf{T}}, \tag*{(3)}

any force disturbance decomposes into matched (dm=Pmdp\mathbf{d}_{m} = \mathbf{P}_{m}\mathbf{d}_{p}) and unmatched (du=(I−Pm)dp\mathbf{d}_{u} = (\mathbf{I}-\mathbf{P}_{m})\mathbf{d}_{p}) components. Actuators reject dm\mathbf{d}_{m} directly, whereas du\mathbf{d}_{u} can only be attenuated through changes in attitude. Fully actuated vehicles (range⁡(Bp)=R3\operatorname{range}(\mathbf{B}_{p}) = \mathbb{R}^{3}) lack an unmatched subspace. In contrast, underactuated platforms like quadrotors, whose thrust spans only the body zz-axis (§ 1.1-C), inherently retain an unmatched component.

We use matched in its classical sense, with respect to the physical inputs FzF_z and τ\boldsymbol{\tau}. In a cascade, the outer position loop does not command these inputs directly. It commands a tilt, which the attitude loop then realizes. With respect to that commanded tilt, a lateral force could be considered matched. The distinction still matters because the tilt is realized only through the attitude loop, with finite bandwidth and a tilt limit. This realization, not the outer loop’s gain, bounds how well a lateral disturbance can be opposed (§ 2-C).

Specialization to Quadrotor

A quadrotor produces translational force only along its thrust axis, so Bp=Re3\mathbf{B}_{p} = \mathbf{R}\mathbf{e}_{3} is a single unit vector, and the projector (3) reduces to a component split: the part of dp\mathbf{d}_{p} along the thrust axis is matched, and the part in the perpendicular plane is unmatched. In the body frame, where thrust is always e3\mathbf{e}_{3},

dm=∣dzb∣,du=(dxb)2+(dyb)2,(4)d_{m} = \lvert d_{z}^{b} \rvert,\qquad d_{u} = \sqrt{(d_{x}^{b})^{2} + (d_{y}^{b})^{2}}, \tag*{(4)}

with db=RTdp=[dxb,dyb,dzb]T\mathbf{d}^{b} = \mathbf{R}^{\mathsf{T}}\mathbf{d}_{p} = [d_{x}^{b},d_{y}^{b},d_{z}^{b}]^{\mathsf{T}} the force disturbance of (1) expressed in the body frame. As the body frame rotates with the vehicle, this holds at any attitude and needs no small-angle assumption. At hover, a vertical disturbance such as an attached payload is therefore matched and can be rejected, while a lateral one such as oblique wind is unmatched, since the quadrotor lacks lateral actuation and can only attenuate it by tilting to redirect thrust.

We compute both this split and the per-axis excitation metric (Sec. IV-B) in the body frame, in which the accelerometer and thrust are natively expressed. This avoids a rotation by the estimated attitude, through which any attitude error would project gravity into the lateral components. Near hover, with small tilt and yaw regulated to its setpoint, each body axis remains closely aligned with the corresponding controlled axis.

Control torques, by contrast, act about all three body axes independently (Bω=IB_\omega= I), so every disturbance moment dωd_\omega is matched by construction (Table I).

AxisPrimary control inputChannel structure
zzThrust (FzF_z)Matched
x,yx,yAttitude (indirect)Unmatched
ϕ,θ,ψ\phi,\theta,\psiTorque (τϕ,τθ,τψ\tau_\phi,\tau_\theta,\tau_\psi)Matched

Table I. Per-axis actuation geometry

Sliding Mode Control and its Guarantees

Boundary-layer Sliding Mode Control

Each axis is regulated independently, so we state the law for the scalar subsystem

ξ¨=f(ξ,ξ˙)+b(ξ,ξ˙)u+d,(5)\ddot{\xi} = f(\xi,\dot{\xi}) + b(\xi,\dot{\xi})u + d, \tag*{(5)}

where ξ\xi is the controlled variable, ff the drift dynamics, uu the control input, and dd a bounded disturbance. The control effectiveness b(ξ,ξ˙)>0b(\xi,\dot{\xi}) > 0 is the gain from input to acceleration. Because the SMC issues setpoints to the built-in inner loop rather than forces or torques, we use a nominal value bnomb_{\mathrm{nom}}, the effective gain of the inner loop it commands (velocity on the position axes, body rate on the attitude axes), identified from its step response. For tracking error e=ξ−ξdese = \xi- \xi_{\mathrm{des}} and surface slope λ>0\lambda> 0, we define the sliding surface and control law

s=e˙+λe,u=ueq+usw,(6)s = \dot{e} + \lambda e,\qquad u = u_{\mathrm{eq}} + u_{\mathrm{sw}}, \tag*{(6)}

so that on the manifold S={s=0}S = \{s = 0\} the error decays exponentially at rate λ\lambda. The equivalent control is implemented as a PD law, ueq=−Kpeqe−Kdeqe˙u_{\mathrm{eq}} = -K_p^{\mathrm{eq}}e - K_d^{\mathrm{eq}}\dot{e}, tuned for nominal hover, and λ\lambda therefore enters only through the switching term. Setting k=0k = 0 leaves exactly this PD law, which we use as the reference for isolating the switching term’s contribution. This reference is distinct from the Crazyflie’s built-in controller, a cascaded PID with its own gains and integral action, which we report as a separate baseline. The switching term is smoothed over a boundary layer of thickness φ>0\varphi> 0 to suppress chattering [20],

usw={−k sgn⁡(s)∣s∣>φ,−k s/φ∣s∣≤φ,(7)u_{\mathrm{sw}} = \begin{cases} -k\,\operatorname{sgn}(s) & |s| > \varphi,\\ -k\,s/\varphi& |s| \le\varphi, \end{cases} \tag*{(7)}

with switching gain k>0k > 0. On the attitude axes, the error derivatives are taken directly from the gyroscope, since near hover the Euler-rate and body-rate maps agree to second order [22], giving e˙ϕ≈ωx\dot{e}_{\phi} \approx\omega_x and e˙θ≈−ωy\dot{e}_{\theta} \approx-\omega_y, the sign reflecting the Crazyflie’s inverted pitch convention.

Guarantees provided by switching term

The analysis carries a single uncertainty, an additive modeling residual bounded by ρ≥∣Δf∣+∣Δb∣∣ueq∣\rho\ge|\Delta f| + |\Delta b||u_{\mathrm{eq}}|, where Δf\Delta f and Δb\Delta b are the drift and effectiveness errors, respectively. We measure ρ\rho directly as the baseline residual floor from flight data (Sec. IV), so effectiveness uncertainty is absorbed into a quantity we observe.

Theorem 1 (Bounded disturbance rejection) [20]: For (5) with disturbance bound ∣d∣≤δ|d| \le\delta, the boundary-layer SMC (7) with k>(ρ+δ)/bnomk > (\rho+ \delta)/b_{\mathrm{nom}} achieves a steady-state tracking error

∣e∣ss≤φ(ρ+δ)λkbnom.(8)|e|_{\mathrm{ss}} \le\frac{\varphi(\rho+\delta)}{\lambda k b_{\mathrm{nom}}}. \tag*{(8)}

The bound follows from the standard boundary-layer argument [20], in which a switching gain large enough to dominate the disturbance drives the sliding variable into the layer in finite time, and the steady-state error inside the layer scales inversely with kk.

From single axis to the cascade

The results above treat one axis in isolation, whereas the deployed controller acts through the cascade, issuing velocity and attitude-rate setpoints rather than forces and torques. Two properties of the cascade let the single-axis results carry over. First, the inner attitude loop is much faster than the outer position loop, so the attitude has effectively settled on the timescale over which position evolves, and each outer axis behaves as the scalar system (5). Second, position is controlled only by commanding a tilt, so the coupling runs one way. The outer loop sets the inner loop’s reference, but the inner loop’s error dynamics do not depend on position. Each loop is therefore ultimately bounded by Theorem 1. The attitude error enters the translational dynamics as an additional bounded disturbance, so Theorem 1 also applies to the outer loop with that disturbance added to its bound. Because (8) is linear in the disturbance bound, the outer-loop error is its own per-axis bound plus a residual from the attitude error. The outer loop thus pays a small penalty for imperfect attitude tracking, and it shrinks as the attitude loop tracks more tightly.

Proposition 1 (Disturbance-dependent performance): Under SMC (7), a matched disturbance is driven to ∣e∣ss→0|e|_{\mathrm{ss}} \to0 as k→∞k \to\infty, whereas an unmatched disturbance leaves a floor independent of kk, reducible only through the surface slope λ\lambda.

The matched case follows from (8). For an unmatched disturbance, the correction must pass through the rate- and tilt-limited attitude path, described above, so added gain has no effect, while λ\lambda, which shapes the correction, still does.

Selective Deployment

In this section, we state our main contribution, the per-axis deployment rule. Geometry fixes which axes a disturbance can be opposed on, and Proposition 1 fixes when opposing it reduces the error and which parameter to tune. Neither can say which axes a particular disturbance excites, since both are fixed before the vehicle flies. We recover that from flight data, and combine all three into the rule (Algorithm 1).

Recovering the disturbance

The onboard accelerometer measures the specific force as=RT(p¨−g)\mathbf{a}_{s}=\mathbf{R}^{\mathsf{T}}(\ddot{\mathbf{p}}-\mathbf{g}) in the body frame, so inverting the translational dynamics (1) gives the lumped disturbance directly in the body frame,

d^b=mas−F,(9)\hat{\mathbf{d}}^{b}=m\mathbf{a}_{s}-\mathbf{F}, \tag*{(9)}

where F\mathbf{F} is reconstructed from the logged motor commands through a per-motor thrust map identified from hover flights with known added masses. Every term on the right is therefore measured or known. Because the applied thrust is taken from the log rather than modeled, the controller’s own response appears in F\mathbf{F}, and d^b\hat{\mathbf{d}}^{b} is the residual between the measured and the nominal-model acceleration. Thrust-map error and sensor noise leave a nonzero residual even without a disturbance, which is the modeling residual ρ\rho of § 2-B; we measure it from nominal hovers in Sec. IV-B. On the attitude axes, the steady control effort holding the vehicle level absorbs a constant disturbance moment, which we read from the differential thrust the mixer sustains to oppose it. Roll and pitch come from opposing-arm command differences and yaw from the reaction-torque difference between clockwise and counter-clockwise rotor pairs,

d^ϕ=(f1+f4)−(f2+f3)FΣ−dˉϕ,\hat{d}_{\phi}=\frac{(f_{1}+f_{4})-(f_{2}+f_{3})}{F_{\Sigma}}-\bar{d}_{\phi},
d^θ=(f1+f2)−(f3+f4)FΣ−dˉθ,\hat{d}_{\theta}=\frac{(f_{1}+f_{2})-(f_{3}+f_{4})}{F_{\Sigma}}-\bar{d}_{\theta},
d^ψ=(f1+f3)−(f2+f4)FΣ−dˉψ,(10)\hat{d}_{\psi}=\frac{(f_{1}+f_{3})-(f_{2}+f_{4})}{F_{\Sigma}}-\bar{d}_{\psi}, \tag*{(10)}

with fif_i the logged motor commands, FΣ=∑ifiF_{\Sigma}=\sum_i f_i their sum, and dˉ(⋅)\bar{d}_{(\cdot)} the mean trim over the nominal hovers. The yaw expression assumes rotor reaction torque proportional to thrust. The resulting sustained command differential reflects the disturbance moment that the controller rejects

Classification uses flights with the disturbance present from takeoff, so the steady window is uniformly disturbed. Flights with the payload attached during hover show the same picture over time. The payload steps onto the thrust axis and stays there, while its lateral component appears only briefly at attachment and then decays, so the lateral axes stay below the excitation threshold.

Applying (4) to the recovered disturbance shows that it separates cleanly by direction, with the payload concentrating near the thrust axis (matched) and the wind in the perpendicular plane (unmatched), confirming the geometric classification from measurement (Figure 2a).

Disturbance classification from flight data: measured direction from thrust axis, translational excitation, and attitude excitation

Figure 2. Disturbance classification from flight data. (a) Angle of the recovered disturbance relative to the thrust axis, clustering near 0∘0^\circ for matched disturbances (payload) and near 90∘90^\circ for unmatched disturbances (wind). (b, c) Per-axis excitation δ^i\hat{\delta}_i (11), as force (mN) for position and as a percentage of the summed motor commands for attitude, compared against the excitation threshold ϵexc\epsilon_{\mathrm{exc}} (dashed), with bars indicating mean ±\pm std. Insets highlight less-affected axes (xx, yy for position, yaw for attitude) below the threshold. Axes remaining below threshold retain PID control.

Excitation metric and threshold

For any flight, we summarize the recovered disturbance on each axis over the steady hover window, after removing the mean offset measured on nominal hovers. On the position axes, we use the 95th percentile of the force magnitude, so that isolated transients do not inflate the estimate. On the attitude axes, a constant moment appears as a sustained mixer differential; we use the magnitude of its mean as a percentage of the summed commands,

δ^i={q95(∣d^ib−dˉib∣),i∈{x,y,z} from (9),∣mean⁡(d^i)∣,i∈{ϕ,θ,ψ} from (10),(11)\hat{\delta}_{i}= \begin{cases} q_{95}\left(\left|\hat{d}^{b}_{i}-\bar{d}^{b}_{i}\right|\right), & i\in\{x,y,z\}\text{ from (9)},\\ \left|\operatorname{mean}(\hat{d}_{i})\right|, & i\in\{\phi,\theta,\psi\}\text{ from (10)}, \end{cases} \tag*{(11)}

with dˉib\bar{d}^{b}_{i} the mean nominal-hover residual. For the gain rule, we convert these to accelerations, dividing the position entries by mm and converting the attitude entries to angular acceleration, δ^iT/Iii\hat{\delta}_{i}\mathcal{T}/\mathcal{I}_{ii}, with T\mathcal{T} the collective thrust from the thrust map and ℓ\ell the effective moment arm.

Inverting the dynamics returns a nonzero residual even without a disturbance because of model mismatch and sensor noise. We therefore evaluate the metric on two sets of flights. Over N1=15N_{1}=15 nominal hovers, its mean gives the floor ρi\rho_i, and its standard deviation gives σρ,i\sigma_{\rho,i}. Over N2=15N_{2}=15 hovers under the applied disturbance, it gives δi\delta_i.

An axis is classified as excited when δ^i\hat{\delta}_i exceeds the floor by more than nn standard deviations,

δ^i>εexc,i,εexc,i=ρi+n σρ,i.(12)\hat{\delta}_i > \varepsilon_{\mathrm{exc},i}, \qquad\varepsilon_{\mathrm{exc},i} = \rho_i + n\,\sigma_{\rho,i}. \tag*{(12)}

with n=3n = 3, the standard three-sigma choice that baseline variation alone rarely exceeds. For the two disturbances tested here, excited residuals clear the threshold by a wide margin in practice, so the classification is invariant across any choice of n∈[1,5]n \in[1,5]. The threshold matters most for weaker disturbances whose residual approaches the noise floor, where it prevents deploying switching terms on axes whose apparent excitation is model mismatch.

Applying the rule to the two test disturbances, each characterized over the N2N_2 disturbed hovers, shows how sharply it discriminates. A slung payload exceeds the threshold in altitude, roll, and pitch but leaves the lateral axes unexcited (Figure 2b and Figure 2c). Oblique wind exceeds the threshold on the lateral axes, roll, pitch, and altitude, because holding position against the lateral load forces the vehicle to tilt, projecting part of the disturbance onto the thrust axis. § 3.4-A tests the classification through gain sweeps on the selected and excluded axes.

Deployment and tuning

The rule combines the two tests. An axis receives a switching term only if it is excited; its actuation class (Table I) then sets whether the switching gain kk (matched) or the surface slope λ\lambda (unmatched) is tuned, per Proposition 1. Every axis below threshold retains PID. Algorithm 1 gives the full procedure.

One constraint follows from the cascade. Since position is controlled only through attitude, a lateral axis and the attitude axes that tilt the vehicle along it form a single path. When a lateral axis is excited, the switching term is placed at the position level, and the attitude axes on that path retain PID, since switching terms at both levels interact through the tilt coupling and degrade tracking.

Our controller augments the Crazyflie’s cascaded controller architecture [10] (Figure 3) with the selected switching terms, replacing the built-in PID on the deployed loops while retaining it elsewhere.

Figure 3. Selective SMC deployed onto the Crazyflie’s cascaded control architecture. Yellow marks loops that can be replaced by SMC, and blue marks loops that always retain PID. Position-level SMC issues velocity setpoints at 100 Hz, and attitude-level SMC issues body-rate setpoints at 500 Hz, both to the built-in inner loops. Algorithm 1 selects which yellow loops are switched to SMC for a given disturbance.

Physical Experimental Results

Our experiments evaluate the selective deployment rule on hardware. Gain sweeps confirm the property it rests on: that the switching gain reduces error only on matched axes, while the surface slope governs the unmatched ones. Subsequent disturbance-rejection flight experiments under purely matched and mixed disturbances show that tracking improves on the axes the rule selects. Finally, a fully onboard comparison demonstrates that this benefit holds under imperfect state estimation. Tracking statistics use ten trials per controller configuration and three per gain value in the sweeps.

Algorithm 1 Selective SMC deployment and per-axis tuning
1: Fly N1N_1 nominal hovers (PID); evaluate the metric (11) per axis
2: ρi←mean⁡N1, σρ,i←std⁡N1\rho_i \leftarrow\operatorname{mean}_{N_1},\ \sigma_{\rho,i} \leftarrow\operatorname{std}_{N_1}; set εexc,i=ρi+3σρ,i\varepsilon_{\mathrm{exc},i} = \rho_i + 3\sigma_{\rho,i}
3: Fly N2N_2 disturbed hovers (PID); compute δ^i\hat{\delta}_i per (11)
4: for each axis ii do
5: if δ^i≤εexc,i\hat{\delta}_i \le\varepsilon_{\mathrm{exc},i} then
6: retain PID {below threshold}
7: else if axis ii matched (Table I) then
8: deploy SMC, set k>(ρi+δ^i)/bnomk > (\rho_i + \hat{\delta}_i)/b_{\mathrm{nom}} {matched, Prop. 1}
9: else
10: deploy SMC, set λ\lambda from convergence rate {unmatched, Prop. 1}
11: end if
12: end for
13: if a lateral axis is deployed, retain PID on its attitude path.

Table 1.

For experiments, we use a Crazyflie 2.1 quadrotor (38.8 g as flown, including markers) in an indoor motion capture arena. Twenty-four Vicon Valkyrie cameras provide 6-DOF pose estimation at 120 Hz with ∼\sim0.5 mm position and ≤0.1∘\le0.1^\circ attitude accuracy. State feedback is relayed via Crazyradio [23] at 100 Hz to the onboard STM32F405 microcontroller (168 MHz), which executes the cascaded position and attitude control of Sec. IV-C. The onboard extended Kalman filter fuses the motion-capture pose with IMU measurements and provides the velocity used by the position loop. The PID controller employs Crazyflie’s default gains, and SMC deployment follows Algorithm 1. We exclude the initial takeoff phase from the performance evaluation.

Gain sweeps

This section tests the deployment rule’s two premises: i) that the matched/unmatched classification predicts how each axis’s error responds to the switching gain; and ii) that the switching term improves tracking only on axes that are both excited and matched. Both are tested by sweeping kk on one axis with all others fixed. Because k=0k = 0 leaves the equivalent PD alone, each sweep isolates the switching term’s contribution.

The first premise is that the matched and unmatched classification predicts how error responds to gain. On altitude, a matched axis, the error falls as O(1/k)\mathcal{O}(1/k) from the equivalent PD alone at k=0k = 0 and tracks the predicted bound (8) until chattering takes over at high kk (Figure 5a), isolating the reduction to the switching term. Our methodology anticipates this before any tuning, since the classification marks altitude as matched. The payload disturbance, which sits almost entirely on the thrust axis, drives this reduction harder than the wind, which reaches that axis only through the vehicle’s tilt, leaving less matched error for the switching term to compensate (cf. Figure 2a and Figure 2b).

Position-level results: matched gain sweep, unmatched gain sweep, and unmatched slope sweep

Figure 5. Position-level results. (a, b) RMSE vs. switching gain kk for the payload (blue) and wind (red) disturbances, three trials each. Dashed lines mark the O(1/k)\mathcal{O}(1/k) scaling of (8) in (a) and the kk-independent level in (b), drawn at the mean RMSE across the sweep, and the shaded band in (a, b) marks the chattering regime at high kk. (c) Lateral RMSE vs. surface slope λ\lambda under payload and wind at fixed kk, three trials each. Dotted vertical lines mark the deployed kk in (a, b) and the deployed λ\lambda in (c).

The second premise is that the switching term helps only where the disturbance is both present and matched. The lateral axes under payload never cross the excitation threshold (Figure 2b), and, as expected, raising kk leaves their error unchanged. Under wind, the lateral axes are excited, but the disturbance is unmatched, and kk again has no effect (Figure 5b). Raising λ\lambda at fixed kk instead reduces lateral RMSE under wind from 0.51 m at λ=0.5\lambda= 0.5 to 0.16 m at λ=1.7\lambda= 1.7, while under payload, where the lateral axes are not excited, it has little effect (Figure 5c), as Proposition 1 predicts. Our approach thus identifies in advance the parameter worth tuning on each axis, a choice that uniform deployment leaves to trial and error.

Motion Capture Tracking Performance

The payload excites only matched axes, while oblique wind excites both matched and unmatched axes, so the two experiments test whether the rule deploys robustness differently in each case.

  1. Slung Payload Experiments: A 11.5 g slung payload, approximately one-third of the vehicle’s mass, is attached to the Crazyflie during hover, ∼20\sim20 s after it reaches the commanded height. The payload is suspended by a paperclip and ziptie (Figure 4a), free to swing in xx and yy directions, loading the vehicle along thrust (added mass) and in roll and pitch (pendulum-induced moments). We evaluated the controller configurations in Table II across 10 trials each.

Figure 4. Setup for the physical experiments in § 3.4.

Controller config.xx-yy Pos.zz Pos.Attitude (ϕ,θ,ψ)(\phi,\theta,\psi)
PID-z/PID-attPIDPIDPID
SMC-z/PID-attPIDSMCPID
SMC-z/SMC-attPIDSMCSMC (ϕ,θ)(\phi,\theta), PID (ψ)(\psi)

Table 2. Controller assignments for payload experiments

SMC on the matched axes gives the lowest altitude error (Figure 6). Against the built-in PID, altitude RMSE drops 82% (0.105 →\to 0.019 m), roll 70% (2.66° →\to 0.81°), and pitch 82% (2.35° →\to 0.42°). The altitude sweep (§ 3.4-A) shows that the switching term accounts for the entire altitude reduction, consistent with the O(1/k)\mathcal{O}(1/k) matched rejection of (8). Our rule left the lateral axes and yaw on PID, and the gains appear exactly on the axes it selected.

Figure 6. Per-axis RMSE for slung payload experiments (Sec. V-B.1), ten trials per controller configuration. Dots show individual trials, black lines medians, and bars the 25th–75th percentiles.

  1. Oblique Lateral Wind Experiments: A fan generates a 5 m/s oblique wind (Figure 4b), loading both kinds of axes at once: an unmatched lateral force that pushes the vehicle off station, and matched aerodynamic moments on roll and pitch. By Proposition 1, lateral rejection is limited by the tilt path and tuned through λ\lambda. Table III lists the configurations and Table IV the results.

Controller config.xx-yy Pos.zz Pos.Attitude (ϕ,θ,ψ)(\phi,\theta,\psi)
PID-xyz/PID-attPIDPIDPID
SMC-xyz/PID-attSMCSMCPID
PID-xyz/SMC-attSMCPIDPID
SMC-xyz/SMC-attSMCSMCSMC (ϕ,θ)(\phi,\theta), PID (ψ)(\psi)
PID-xyz/SMC-attPIDPIDSMC (ϕ,θ)(\phi,\theta), PID (ψ)(\psi)

Table 3. Controller assignments for oblique wind experiments

The configuration selected by our rule, SMC-xyz/PID-att, improves every excited position axis over the built-in PID, reducing xx and yy RMSE by 39% and giving the lowest altitude error of all configurations (Table IV). Removing the switching term on zz (SMC-xy/PID-att) reduces lateral error further, to 66% and 60% below PID, at the cost of altitude: while the vehicle is tilted against the wind, thrust switching perturbs the lateral force, which the lateral loop must then reject. PID-xyz/SMC-att tracks the commanded tilt more accurately and gives the best roll and pitch, but the lateral error is set by the outer loop generating that command, which stays at PID. Uniform SMC performs worst among the SMC variants laterally, because switching at both position and attitude levels works against itself through the tilt coupling. Robustness must therefore be concentrated where the disturbance acts, not spread across every axis. Yaw is unexcited and left at PID, and shows little variation across configurations.

MetricPID-xyz/PID-attSMC-xy/PID-attSMC-xyz/PID-attPID-xyz/SMC-attSMC-xyz/SMC-att
Wind-critical axes (lateral position & attitude)
xx RMSE (m)0.444 ± 0.0150.150 ± 0.0090.272 ± 0.0180.312 ± 0.0300.410 ± 0.028
yy RMSE (m)0.413 ± 0.0120.167 ± 0.0080.252 ± 0.0080.333 ± 0.0180.382 ± 0.024
Roll RMSE (deg)6.06 ± 0.185.72 ± 0.135.90 ± 0.153.47 ± 0.204.98 ± 0.17
Pitch RMSE (deg)4.67 ± 0.335.79 ± 0.084.98 ± 0.392.38 ± 0.254.39 ± 0.15
Less-affected axes (altitude and yaw)
zz RMSE (m)0.0125 ± 0.00120.0129 ± 0.00030.0089 ± 0.00130.0133 ± 0.00040.0125 ± 0.0012
Yaw RMSE (deg)3.47 ± 0.472.87 ± 0.253.38 ± 0.443.40 ± 0.413.34 ± 0.21

Table 4. Tracking performance comparison (mean ± std.) for oblique wind disturbance experiments. Best-performing cases in bold.

Fully Onboard (Optical Flow State Estimation) Tracking Performance

The preceding experiments used motion capture for position feedback. To test the method under onboard state estimation, we repeat the wind experiment (Figure 4b) with position estimated fully onboard, fusing optical flow [24] in the onboard EKF. Ground truth is streamed separately from Vicon Tracker 4.0 [25] over UDP. We compare the selective SMC variants against PID and, for this experiment, the Crazyflie’s built-in INDI controller [12] with its default parameters and its own position loop.

Moving from motion capture to optical flow raises the RMSE across all controller configurations, since onboard estimation is noisier than motion capture (cf. Figure 7 and Figure 8). Their relative performance, however, is unchanged. Placing SMC on the lateral axes again tracks them best (Figure 8).

Figure 7. Per-axis RMSE for the oblique wind experiments with motion-capture feedback (Sec. V-B.2). Dots show individual trials, black lines medians, and bars the 25th–75th percentiles.

Figure 8. Per-axis RMSE for the oblique wind experiments with fully onboard optical-flow estimation (§ 3.4-C), including INDI. Dots show individual trials, black lines medians, and bars the 25th–75th percentiles.

On the attitude axes, PID-xyz/SMC-att gives the lowest RMSE, while the remaining configurations, including PID and INDI, perform comparably. Position is where the controllers separate most. INDI relies on gyroscope differentiation and division by the control effectiveness, both of which amplify the noise added once estimation moves onboard, so its position RMSE grows sharply while that of selective controllers stays substantially smaller. Our approach retains its benefit under the onboard sensing available on a deployed vehicle. This is consistent with the switching term treating the added estimation noise as part of the residual ρ\rho (Theorem 1), the same way it treats the disturbance.

Computational Cost

Table 5 reports compute cost obtained by executing the compiled firmware controllers instruction by instruction in an emulator during simulated hover, with cycles estimated from Cortex-M4 instruction timings (168 MHz core). The cascade runs its position loops on every fifth update, whereas INDI runs its full computation on every In practice, this replaces trial-and-error tuning with a short procedure. Hover flights show which axes are excited, and the actuation geometry of each axis tells the practitioner whether to adjust the switching gain or the surface slope. If a lateral axis is deployed, the attitude loops underneath it stay on PID, because switching at both levels works against itself. None of this requires a disturbance model or new estimator. Where controllers differ is in how they perform under realistic sensing. With onboard estimation, the bound-based switching term proved more robust than an inversion that depends on differentiated gyro signals.

ControllerFullAtt.-onlyAverageCPU load
PID5989210428810.88%
Selective SMC (payload)5289166623910.73%
Selective SMC (wind)5207210427250.83%
Uniform SMC4769166622870.70%
INDI [12]2675267126720.82%

Table 5. Cycles per control update (168 MHz core). Full ticks run the position and attitude loops together at 100 Hz, and attitude-only ticks fill the remaining 500 Hz updates. The average weights one full tick per four attitude-only ticks, and CPU load is the processor share at the 1 kHz stabilizer rate. Selective rows use the configurations chosen by Algorithm 1 for each disturbance.

The approach has limits that point to future work. Our analysis and experiments focus on near-hover regulation, and identifying the excited axes requires flights under a representative instance of the disturbance. Running the excitation test online would remove the need for these dedicated flights, letting a vehicle enable or disable switching terms per axis as disturbances change mid-mission. Since the rule decides where robustness belongs rather than which law provides it, observer-based schemes such as DOBs and ESOs could be placed within the same framework, as could learned models absorbing residual dynamics on top of the SMC baseline. More broadly, the procedure applies to other underactuated systems with cascaded control, where actuation geometry determines which disturbances can be opposed directly.

update, so we report both tick types and their average. Each switching term replaces a PID loop rather than adding to it, and the SMC update is lighter than the PID update, so every SMC configuration requires fewer cycles than PID on average. The savings grow with the number of loops replaced and how often they run. Replacing the 500 Hz attitude loops lowers every update, whereas replacing the 100 Hz position loops lowers only the full ticks. Selective SMC uses less of the processor than both PID and INDI under payload and a comparable share under wind, and all controllers use under 1%. Our approach therefore adds robust rejection on the selected axes at no additional computational cost.

Discussion and Conclusion

We have shown that the benefit of robust control on an underactuated vehicle is confined to the axes that a disturbance excites and that the actuators can oppose. We formalize the classical matched and unmatched distinction as a per-axis deployment rule that identifies those axes from a small set of PID hover flights and determines which parameter to tune on each. Hardware experiments validated each of the rule’s predictions. The switching gain reduced error on matched axes and had no effect on unmatched ones, where the surface slope alone set the floor. Under a slung payload and an oblique wind, tracking improved on exactly the axes the rule selected. When state estimation moved fully onboard, selective SMC held its advantage as INDI degraded, at no added computational cost over PID.

References

  1. [1]N. Simon, A. Z. Ren, A. Piqué, D. Snyder, D. Barretto, M. Hultmark, and A. Majumdar, “FlowDrone: Wind Estimation and Gust Rejection on UAVs Using Fast-Response Hot-Wire Flow Sensors,” in IEEE International Conference on Robotics and Automation (ICRA), 2023, pp. 5393–5399.
  2. [2]T. Lee, K. Sreenath, and V. Kumar, “Geometric control of cooperating multiple quadrotor UAVs with a suspended payload,” in 52nd IEEE Conference on Decision and Control, 2013.DOI
  3. [3]A. Kiran, N. Ayanian, and K. Breuer, “Influence of Static and Dynamic Downwash Interactions on Multi-Quadrotor Systems,” in Proceedings of Robotics: Science and Systems, Los Angeles, CA, USA, June 2025.DOI
  4. [4]R. Sinha, J. Harrison, S. M. Richards, and M. Pavone, “Adaptive robust model predictive control with matched and unmatched uncertainty,” in American Control Conference (ACC), 2022.arxiv.org/abs/2104.08261
  5. [5]Z. Wu, S. Cheng, K. A. Ackerman, A. Gahlawat, A. Lakshmanan, P. Zhao, and N. Hovakimyan, “L1Adaptive Augmentation for Geometric Tracking Control of Quadrotors,” in International Conference on Robotics and Automation (ICRA), 2022.DOI
  6. [6]K. Y. Chee, T. C. Silva, M. A. Hsieh, and G. J. Pappas, “Enhancing sample efficiency and uncertainty compensation in learning-based model predictive control for aerial robots,” in IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2023.
  7. [7]A. Yazdanshenas and R. Faieghi, “Robust and Agile Quadrotor Flight via Adaptive Unwinding-Free Quaternion Sliding-Mode Control,” IEEE Transactions on Robotics, vol. 41, 2025.
  8. [8]S. Gomiero and K. D. von Ellnrieder, “Modeling and Sliding Mode Control of a Heavy-Lift Quadrotor With a Cable-Suspended Payload Under Wind Disturbances,” IEEE Transactions on Automation Science and Engineering, vol. 23, 2026.DOI
  9. [9]M. Menebo Madebo, “Neuro-Fuzzy-Based Adaptive Sliding Mode Control of Quadrotor UAV in the Presence of Matched and Unmatched Uncertainties,” IEEE Access, vol. 12, 2024.
  10. [10]“Controllers in the Crazyflie | Bitcraze — bitcraze.io,” https://www.bitcraze.io/documentation/repository/crazyflie-firmware/master/functional-areas/sensor-to-control/controllers/, [Accessed 21-09-2025].
  11. [11]K. J. Åström and R. M. Murray, Feedback Systems: An Introduction for Scientists and Engineers. Princeton University Press, 2008.DOI
  12. [12]E. J. J. Smeur, Q. Chu, and G. C. H. E. de Croon, “Adaptive Incremental Nonlinear Dynamic Inversion for Attitude Control of Micro Air Vehicles,” Journal of Guidance, Control, and Dynamics, vol. 39, no. 3, 2016.DOI
  13. [13]N. Ahmed and M. Chen, “Sliding mode control for quadrotor with disturbance observer,” Advances in Mechanical Engineering, vol. 10, no. 7, 2018.DOI
  14. [14]N. Wang and A. K. Sanyal, “Geometric extended state observer on TSO(3) in the presence of bias in angular velocity measurements,” in American Control Conference (ACC), 2025.DOI
  15. [15]A. Castillo, R. Sanz, P. Garcia, W. Qiu, H. Wang, and C. Xu, “Disturbance observer-based quadrotor attitude tracking control for aggressive maneuvers,” Control Engineering Practice, vol. 82, 2019.DOI
  16. [16]D. Ma, Y. Xia, G. Shen, Z. Jia, and T. Li, “Flatness-based adaptive sliding mode tracking control for a quadrotor with disturbances,” Journal of the Franklin Institute, vol. 355, no. 14, 2018.DOI
  17. [17]G. Shi, X. Shi, M. O’Connell, R. Yu, K. Azizzadenesheli, A. Anandkumar, Y. Yue, and S.-J. Chung, “Neural lander: Stable drone landing control using learned dynamics,” in International Conference on Robotics and Automation (ICRA), 2019.DOI
  18. [18]S. Bansal, A. K. Akametalu, F. J. Jiang, F. Laine, and C. J. Tomlin, “Learning quadrotor dynamics using neural network for flight control,” in IEEE 55th Conference on Decision and Control (CDC), 2016.
  19. [19]L. Pan, M. Catellani, T. C. Silva, L. Sabattini, and N. Ayanian, “Online Learning-Enhanced High Order Adaptive Safety Control,” IEEE Robotics and Automation Letters, vol. 11, no. 7, 2026.arxiv.org/abs/2511.19651
  20. [20]J. Slotine and W. Li, Applied Nonlinear Control. Prentice-Hall, 1991.
  21. [21]S. Salazar, I. González-Hernández, R. Lopez, and R. Lozano, “Simulation and robust trajectory-tracking for a Quadrotor UAV,” in International Conference on Unmanned Aircraft Systems (ICUAS), 2014.DOI
  22. [22]R. Mahony, V. Kumar, and P. Corke, “Multirotor Aerial Vehicles: Modeling, Estimation, and Control of Quadrotor,” IEEE Robotics & Automation Magazine, vol. 19, no. 3, 2012.DOI
  23. [23]W. Hönig and N. Ayanian, Flying Multiple UAVs Using ROS. Cham: Springer International Publishing, 2017.DOI
  24. [24]B. AB, “Crazyflie: A small, versatile quadcopter for research and education,” https://www.bitcraze.io/, [Accessed: 2025-04-24].
  25. [25]Vicon Motion Systems, “Vicon Tracker 4.0 User Guide,” https://help.vicon.com/space/Tracker40, [Accessed 05-10-2026].

Paper details

vlnc:W_26ed94vg
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 13

downloads · 3

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents