PID tuning

On this page 7

PID tuning is the process of adjusting the proportional, integral and derivative gains of a drone flight controller so that the aircraft tracks the pilot’s commanded rotation rates quickly, accurately and without oscillation. In flight control for drones, it determines how a multirotor feels in the air: a well-tuned craft holds attitude firmly in wind, stops rotations cleanly and flies smoothly through turbulence, while a poorly tuned one wobbles, drifts or overheats its motors.

Every multirotor runs a closed feedback loop on each rotational axis (roll, pitch and yaw). The controller compares the setpoint from the sticks with the rotation measured by the gyroscope and converts the difference into motor commands. Tuning sets how aggressively that conversion reacts, and it must match the specific frame, motors, propellers and battery of the aircraft.

How the PID controller stabilizes a multirotor

The PID controller stabilizes a multirotor by computing a correction from the error between desired and measured rotation rate several thousand times per second. Each of the three terms responds to a different aspect of that error, and their sum is passed to motor mixing, which distributes the correction across the motors.

The P term reacts to the present error and provides most of the stiffness. The I term accumulates error over time and removes persistent offsets caused by wind, an off-center battery or uneven motors. The D term reacts to the rate of change of the error and acts as a damper that brakes overshoot. Modern firmware such as Betaflight also adds feedforward, which reacts directly to stick movement rather than to error, so the craft starts rotating before any error builds up.

The following table summarizes what each gain does and what happens when it is set badly.

TermReacts toToo lowToo high
Proportional (P)Current errorSoft, drifting, vague responseFast oscillation, buzzing motors
Integral (I)Accumulated errorAttitude drift in wind or with offset weightSlow wobble, bounce-back after flips
Derivative (D)Rate of change of errorOvershoot, propwash wobbleHot motors, amplified noise
FeedforwardStick movement speedDelayed, sluggish start of rotationsOvershoot and jitter on stick inputs
Role of each controller term

Key parameters adjusted during PID tuning

PID tuning involves more than three numbers, because the gains only work as well as the signal quality and loop timing allow. Practitioners adjust the gains together with filtering and timing settings, since noise entering the loop limits how high P and D can safely go.

ParameterTypical rangeWhat it affects
PID loop frequency1-8 kHzHow often corrections are computed
D term lowpass filterAbout 70-150 Hz cutoffNoise reaching the motors versus delay
Gyro lowpass filterAbout 150-300 Hz cutoffNoise in the measured rotation
RPM filter harmonics1-3 harmonicsRemoval of motor noise peaks
Master multiplier0.8-1.5 of defaultsOverall stiffness of the tune
Dynamic idleAbout 25-40 rpsAuthority at zero throttle and during flips
Typical settings that interact with the gains

The central trade-off is responsiveness versus noise. Stronger filtering protects motors from vibration but adds phase delay, which forces lower gains and produces a softer, less locked-in feel. Gyro filtering and the RPM filter therefore come first, and the gains are raised only once the noise floor is clean.

PID tuning controls how the aircraft follows a command, whereas rates and expo define what the command is. Pilots frequently confuse them, changing gains to fix a stick feel problem or changing rates to fix an oscillation.

AdjustmentWhat it changesSymptom it addresses
PID gainsTracking of the requested rotationOscillation, drift, overshoot
RatesMaximum rotation speed per stick inputRolls too slow or too fast
ExpoStick sensitivity around centerTwitchy or numb center stick
FilteringNoise in the control signalHot motors, jello in footage
Flight modeWhich loops are activeSelf-leveling versus manual attitude
What each adjustment changes

In self-leveling modes such as Angle mode, an additional outer loop converts angle error into a rate setpoint, and that outer loop has its own gain. Navigation features such as altitude hold and position hold add further cascaded loops on top of the rate controller, which is why a solid rate tune is the foundation for every higher-level mode.

A practical PID tuning workflow

A reliable PID tuning workflow changes one variable at a time and verifies each change with flight data rather than impressions alone. Blackbox logging records gyro traces, setpoints and motor outputs, so a step-response analysis can show overshoot and delay objectively.

  1. Confirm the hardware is sound: tight props, balanced motors, soft-mounted flight controller.
  2. Enable the RPM filter with bidirectional DShot and set conservative gyro filtering.
  3. Fly the defaults and record a Blackbox log with snap rolls, flips and throttle punches.
  4. Adjust the P and D balance until step response shows minimal overshoot.
  5. Raise the master multiplier in small steps until motors warm, then back off about 10 percent.
  6. Set I term and feedforward last, then test in wind and during propwash maneuvers.

The decision table below links common flight symptoms to the adjustment that usually helps.

SymptomLikely causeTypical adjustment
Wobble when descending through prop washWeak damping or excessive delayRaise D slightly, reduce filter delay
High-frequency buzz, hot motorsNoise amplified by D or PLower D, improve filtering, check props
Bounce-back after flipsI term too high or P/D imbalanceReduce I, rebalance P and D
Slow drift off attitudeI term too lowRaise I gradually
Sluggish stick responseLow feedforward or soft gainsIncrease feedforward or master multiplier
Symptom-based adjustments

Limitations and common PID tuning mistakes

PID tuning cannot compensate for mechanical problems. A cracked frame arm, a bent motor shaft or a damaged propeller injects noise that no gain setting removes, and raising D to fight such vibration usually overheats motors within a single flight. Inspect the hardware before touching the numbers.

  • Copying a tune from another build ignores differences in weight, motor KV and prop pitch.
  • Tuning on a sagging battery produces gains that feel different on a fresh pack.
  • Chasing zero propwash oscillation often ends in excessive D and thermal damage.
  • Skipping motor temperature checks after each change risks burned windings.

Commercial camera drones usually ship with factory tuning that is locked or hidden, because their manufacturers validate stability for a fixed airframe. User-level tuning is therefore most relevant for FPV racing, freestyle and custom-built multirotors, as well as for professional platforms running open firmware such as INAV or ArduPilot.

In everyday language

A drone cannot balance on its own. A small computer on board checks thousands of times per second whether the drone is tilting the way the pilot wants, and it speeds up or slows down each motor to fix any difference. PID tuning is setting how strongly that computer reacts.

Think of steering a car on a windy road. Overreact and the car swerves from side to side; underreact and it drifts toward the shoulder. Good tuning is the calm, confident driver in between, correcting just enough and at the right moment.

Seen in the real world

A freestyle FPV pilot builds a five-inch quadcopter with 1950 KV motors on a six-cell battery. On default settings, the craft shows a visible wobble whenever it falls through its own prop wash after a dive, and the recorded video has a faint jello effect.

The pilot enables the RPM filter, records a Blackbox log of dives and flips, and studies the step response. The log shows a slight overshoot and a noisy D trace. After raising P by about 10 percent, lowering the D lowpass delay and setting the master multiplier to 1.2, the motors stay only lukewarm after a four-minute flight.

The result is a quad that holds its line through dives with almost no wobble, and the footage is clean enough to use without stabilization software.