Chapter 14 · Software
Make it fly like it’s on rails
Tuning means adjusting filters and PIDs so the drone responds fast, with no oscillations and no hot motors. You don’t need it to start: once you fly confidently, here’s the method.
Before touching your drone, play with the PID lab: move P, D, feedforward and the filters and you’ll see straight away what each value does. To watch one of your flights in 3D, load it into the flight replay.
The PID in two lines
P · Proportional
Corrects the current error: how hard it pushes the drone towards where you ask it to go. With too much P, it oscillates fast.
I · Integral
Corrects errors that persist over time, such as wind or an off-centre centre of gravity.
D · Derivative
Brakes the movement before it overshoots, like a shock absorber. With too much D, you get hot motors and noise.
Feedforward
Reacts directly to stick movement, without waiting for an error. It gives an immediate response.
The step response
When you do a flip, the setpoint jumps suddenly from one value to another: that’s a step. How the gyro gets there sums up the whole tune. The PID works like a car’s shock absorber: too little damping and it bounces; too much and it’s slow. The goal is critical damping: getting there as fast as possible without overshooting.
| Raising… | Speed | Overshoot | Steady-state error | If there’s too much |
|---|---|---|---|---|
| P | Faster | More | Less | Fast oscillation |
| I | A bit slower | More | Much less | Slow bounce-back |
| D | A bit slower | Less | Same | Hot motors, noise |
| Feedforward | Much faster | A bit more | Same | The gyro gets ahead of the stick |
A real log, analysed
These two graphs come from a real Blackbox log of a 5" test quad, recorded at about 3.2 kHz. They’re a good example of how to read a log with numbers rather than by eye.
How to read it: find an isolated stick snap, measure the delay where setpoint and gyro cross the halfway point, and the overshoot by comparing the gyro peak with the setpoint. In the spectrum, the filtered gyro shouldn’t show any clear peak.
The order that works
Change one thing at a time, fly a pack, feel the motors and compare.
Foundations
Up-to-date firmware, RPM filter on and the ESC properly configured. Fresh props and nothing vibrating.
Filters
Reduce filtering bit by bit: less filtering means less delay, but more noise in the motors. Stop when they start to get warm.
P/D balance
With feedforward and I turned off, adjust the ratio between P and D until the drone stops cleanly after every move.
Master gain
Raise the master multiplier until oscillation or heat appears, then lower it a little.
Bring I back
Check that the drone doesn’t drift and doesn’t shake on descents.
I-term relax and anti-gravity
They stop bounce-back after flips and the nose dropping when you punch the throttle.
Feedforward
Raise it until the stick response feels as direct as you like.
Dynamic damping
If the motors get hot in aggressive flying, it reduces D only when needed.
Rates and the rest
Finally, rates to taste and settings such as dynamic idle or throttle boost.
The noise bands
In the Blackbox spectrum analyser, each frequency band has a different source and a different way of dealing with it.
| Frequency | What it is | How to deal with it |
|---|---|---|
| Below 20 Hz | The drone’s actual movement | Not filtered |
| 20–100 Hz | Propwash and oscillations | PID, never filters |
| 100–250 Hz | Frame resonance | Mechanical fixes and dynamic notch |
| Above 250 Hz | Motors and props | RPM filter and low-pass |
Propwash
It’s the shaking that appears when you descend or turn through the air churned up by your own props. It rarely has a single cause: start with the mechanics (screws, soft mounts, a stiff frame, healthy motors), turn on the RPM filter, filter only as much as needed, raise D a little while watching motor temperature, and enable dynamic idle. When flying, tilt the drone slightly forward on descents to get out of the dirty air.
Diagnosing bounce-back
The speed of the bounce-back at the end of a flip tells you which term to adjust.
| What you see | Cause | What to do |
|---|---|---|
| Fast bounce that overshoots the setpoint | P/D balance too high | More D or less P |
| Stops short and then gets there | P/D balance too low | Less D or more P |
| Slow bounce at the end of the move | I has built up | I-term relax |
| Gyro above or below in long rolls | Not enough I | More I |
| Propwash that won’t improve and motors at 100 % | Mechanical limit (saturation) | Better-suited props, motors |
To keep the balance when you raise the overall strength, multiply: if P = 60 and D = 35 (balance 1.71) and you raise D to 40, P goes to about 68. The P/D balance calculator does it for you.
Symptoms and fixes
| Symptom | What to try |
|---|---|
| Propwash: shaking on descents or in tight turns | Filter less, raise D, try an ESC PWM frequency of 24 kHz. |
| Oscillation at high throttle | Enable or increase TPA, which reduces D above a certain throttle. |
| Hot motors | Lower D or enable dynamic damping. Check props and vibrations. |
| Bounce-back after a flip | Adjust the I-term relax cutoff. |
| The nose drops when you punch the throttle | Raise anti-gravity. |
| Slowly drifts | Check the centre of gravity and raise I a little. |
Blackbox: seeing what you can’t feel
Blackbox records gyro, stick and motor data during the flight. With that data you can see exactly where there’s noise or where the drone isn’t following what you ask.
Enable it
In the Blackbox tab, with a logging rate of about 1–2 kHz.
Fly a pack
Do a mix of moves: fast rolls, throttle changes and flips.
Analyse
Open the log in Blackbox Explorer to see the graphs and the noise spectrum, or in PIDtoolbox to analyse the response to each move.
Interpret
In the spectrum, look for noise peaks the filter doesn’t reach. In the response, the ideal is a fast rise that stops at the requested value, without overshooting or oscillating.
Before you touch anything, make sure the problem isn’t mechanical: a loose screw, a damaged prop or a worn bearing can look like a bad tune.
Do it guided from start to finish. Guided tuning prepares Blackbox over USB, guides you by voice through the test flights, reads the logs and suggests the changes one at a time.
Analyse your log right here. The FPV Assistant decodes Blackbox logs in your browser and gives you the step response, the noise before and after the filters, the throttle × frequency map and, with chirp logs, the frequency response. It also produces a downloadable report.