Skip to main content

Module 9 — Tuning & flight-test analysis

Tuning is not folklore — it is signal processing plus controlled experiments. The blackbox turns "it feels weird" into a spectrogram you can act on.

🟢 Foundations. Blackbox = the FC logging gyro, setpoint, PID terms, motor outputs and RC at hundreds of Hz to flash/SD. Golden rules of flight testing: change one variable per flight, log everything, hover + a standard stick sequence for comparability, and land before frustration edits your memory of what you changed.

🟡 Practitioner. Noise management is a filter pipeline, and every filter costs delay:

  • Lowpass (PT1/biquad): discrete PT1 is one line — yk=yk1+α(xkyk1),α=ΔtΔt+12πfcy_k = y_{k-1} + \alpha\,(x_k - y_{k-1}),\qquad \alpha = \frac{\Delta t}{\Delta t + \frac{1}{2\pi f_c}}
  • Static notch: kills one fixed frequency (frame resonance).
  • Dynamic / RPM notch: uses bidirectional-DShot eRPM to park narrow notches exactly on each motor's rotation frequency and harmonics — the single biggest tuning advance of the last decade, because narrow notches remove noise with minimal phase delay.

Reading a gyro spectrogram (frequency vs time vs intensity): horizontal bars at fixed Hz = frame resonance → stiffen/soft-mount; ridges climbing with throttle = motor/prop harmonics → RPM notch; broadband floor rising = bearings/prop damage.

🔴 Advanced. PID tuning as measurement: use step-response tools (Blackbox Explorer, PIDtoolbox) to see rise time, overshoot and settling of the actual rate loop, then move gains with intent — P for stiffness, D to shave overshoot until noise/motor temperature says stop, I for wind-hold, feedforward for stick-connectedness without P-induced ring. Understand TPA (gain reduction at high throttle where the loop gain rises) and propwash: turbulence re-entering the props during descents — mitigated by filtering delay reduction, D balance and (physically) prop/frame choice, not by wishing.

⚫ Master. System identification: inject a chirp (frequency sweep) via a script, record input→gyro response, fit a transfer function, compute real gain/phase margins, and design the filter stack to a target phase budget instead of iterating. You can quantify how one extra 100 Hz PT1 trades noise floor vs margin — with numbers.

Mastery checklist

  • Given a spectrogram, name each noise source and the correct fix, in order of likelihood.
  • Produce a before/after step-response comparison proving a tune improved.
  • State your build's approximate loop delay budget in milliseconds and where it's spent.

🖼️ Image ideas: your own Blackbox Explorer / PIDtoolbox screenshots and spectrograms — self-made and thus license-free.

📚 Free resources: Betaflight tuning docs; PIDtoolbox (free, with tutorial videos); Blackbox Explorer; ArduPilot autotune & notch docs.