PID Basics — P, I, D, and Feedforward
A PID controller is the core of what makes a flight controller work. Understanding what each term does — and what breaking it looks like — is prerequisite to any meaningful tuning.
The Control Loop
flowchart LR
P([Pilot stick<br/>setpoint]) --> E{Error<br/>calculation}
G([Gyro<br/>actual rate]) --> E
E --> PT[P term]
E --> IT[I term]
E --> DT[D term]
FF([Stick input<br/>direct]) --> FFT[Feedforward]
PT --> S[Σ Sum]
IT --> S
DT --> S
FFT --> S
S --> M([Motor<br/>command])
M --> Q([Quad])
Q --> GThe controller sees the error (setpoint − actual), then reacts with four contributions summed into a motor command.
What Each Term Does
P — Proportional
Reacts to the current error. Bigger error → bigger correction.
- Too low: Quad feels soft and unresponsive, doesn't track stick well, wanders on fast direction changes.
- Too high: Oscillations on sharp moves and at throttle transitions. High-pitched buzz in the motors. Propwash gets worse.
I — Integral
Accumulates error over time. Corrects persistent bias (wind, motor imbalance, uneven prop).
- Too low: Quad drifts slowly in one direction without stick input; can't hold altitude or heading in wind.
- Too high: Bounce-back after a hard stop; slow, mushy-feeling oscillation that takes several seconds to damp out (I-term windup).
D — Derivative
Reacts to how fast the error is changing (the rate of change). Damps the P-term response, preventing overshoot.
- Too low: Propwash, bounce on stick release, oscillation after flips.
- Too high: High-frequency oscillations (motors get hot), the quad buzzes/vibrates at certain throttle positions, D-term noise amplified by filtering.
Feedforward (FF)
Not part of the classic PID loop — it reads stick movement directly and pushes the motors before error accumulates. Reduces the inherent lag in a feedback controller.
- Too low: Tracking delay; quad feels slightly behind the sticks; "mushy" on quick direction changes.
- Too high: Overshooting stick inputs; snappy but twitchy. Amplifies RC link jitter.
Visual: Step Response Concept
This shows what happens when you give a sudden full-deflection roll command. The different curves represent PID tuning quality:
Tuning Order
Always tune in this order — earlier terms affect the behavior of later ones:
flowchart TD
A[1. Set safe starting PIDs<br/>from a preset] --> B[2. Tune P<br/>Raise until oscillation, back off 20%]
B --> C[3. Tune D<br/>Raise until propwash disappears or motors get hot]
C --> D[4. Tune I<br/>Low by default; raise if drifting in wind]
D --> E[5. Tune FF<br/>Raise until tracking feels instant without overshoot]
E --> F[6. Verify with blackbox<br/>Check step response and motor traces]Never start tuning with I or FF. P and D have to be stable first or the I windup and FF overshoot will confuse every measurement.
Betaflight Default PID Ranges (5" freestyle, BF 4.4)
| Term | Default | Typical range | Direction to tune |
|---|---|---|---|
| Roll P | 47 | 35–65 | Up → snappier, Down → softer |
| Roll D | 35 | 25–55 | Up → damps propwash, Down → less motor heat |
| Roll I | 85 | 60–110 | Usually leave alone unless wind drift |
| Roll FF | 120 | 80–160 | Up → instant tracking, Down → less overshoot |
| Pitch ≈ Roll | — | ±10% of roll | Pitch usually 5–10% higher P/D than roll |
| Yaw P | 45 | 30–60 | Lower than roll; yaw is slower axis |
TPA (Throttle PID Attenuation)
At high throttle, RPM is high, the motors react faster, and the same PID gains become effectively "more aggressive." TPA automatically reduces P (and optionally D) above a throttle threshold.
1set tpa_rate = 65 # reduce P/D by 65% at full throttle
2set tpa_breakpoint = 1500 # start reducing at 50% throttle (1500 µs)
3set tpa_mode = PD # apply to P and D
4save
Without TPA: the quad may oscillate at high throttle but feel soft at hover. With TPA properly set: consistent feel across the throttle range.
Related Snippets
- BBL-Based PID Tuning Protocol
A structured, blackbox-driven PID tuning protocol based on step response … - Betaflight Rate Modes — Formulas, Comparison, and Conversion
Betaflight supports four rate mode formulas. They all do the same job — map … - Betaflight Rates Explained
Rates control how fast the drone rotates in response to stick input. Higher … - Betaflight Tuning Math — What Each Term Actually Does
What happens inside Betaflight when you move a slider. The formulas here are … - Blackbox Logging Setup and Field Guide
Blackbox records every sensor reading, RC input, PID output, and motor command … - Cinematic Tune from Betaflight Presets
Betaflight ships with a Presets library that includes ready-made cinematic … - PID Tuning — The Wobble-Test Protocol (Free Tools Edition)
A systematic PID tuning protocol based on the Joshua Bardwell / Brian White … - Rate Presets — 733 / 633 / 533 in Betaflight & Actual
533, 633, 733 are community shorthand for three popular freestyle rate profiles, … - Rate Profile Selection & Persistent Stats
Switching rate profiles mid-session via a transmitter switch and saving your … - Rates Deep Dive — Expo Curve, Zones, and Throttle
Rates are not just a "how fast does it spin" setting. They shape where … - Tuning Flight Protocol — Building a Useful Blackbox Log
Getting good PID analysis results requires a specific flight sequence. Freestyle …