Skip to main content

PID Tuning

The 305ap uses PX4's standard controllers, so PX4's tuning guides apply unchanged. This page summarizes the order and the tools, with notes specific to the board. For most vehicles, start with Autotune and use manual tuning to refine.

Controller Structure (Multirotor)​

PX4 multirotor control is a cascade, tuned from the inside out:

LoopRuns atMain parameters
Rate (angular velocity)Gyro rate, 400 Hz by default (IMU_GYRO_RATEMAX)MC_ROLLRATE_P/I/D/K, MC_PITCHRATE_*, MC_YAWRATE_*
AttitudeWith the rate loopMC_ROLL_P, MC_PITCH_P, MC_YAW_P
Velocity and positionSlowerMPC_XY_VEL_*, MPC_Z_VEL_*, MPC_XY_P, MPC_Z_P

Tune the rate loop first. It sets how well everything above it can work.

Tuning in QGroundControl​

Vehicle Setup → PID Tuning shows live setpoint and response plots for each axis while you fly, with sliders for the main gains.

  1. Hover in Stabilized or Altitude mode.
  2. Make quick stick inputs on one axis and watch the response plot.
  3. Adjust:
    • P up until the response is fast without overshoot.
    • D up to damp overshoot and oscillation after a step.
    • I to remove slow drift and hold attitude under disturbances.
  4. Repeat for roll, pitch and yaw. Yaw usually needs less D.

Make small changes (10–20%) and fly between each. Save your parameters before starting so you can return to a known state.

Signs to Look For​

SymptomLikely cause
Fast, high-pitched oscillationRate P or D too high, or D-term noise (check filters)
Slow wobble after a stick inputRate P too low, or I too high
Hot motors after a hover with no visible oscillationToo much D or too little filtering; noise reaching the motors
Attitude drifts in windRate I too low
Bounces in altitudeMPC_Z_VEL_P_ACC too high, or MPC_THR_HOVER far off

Using Logs​

A log from each tuning flight shows more than the live plots. In Flight Review, check:

  • Angular rate setpoint vs. estimate on each axis: they should overlap closely.
  • Actuator controls and motor outputs: should not be noisy or saturated.
  • Vibration: accelerometer vibration and gyro noise levels.

See Logs Analysis.

Board Notes​

  • Gyro rate: the rate loop runs at 400 Hz by default. Small, agile multirotors can benefit from a faster loop (IMU_GYRO_RATEMAX = 800 or 1000). Check CPU load with top in the MAVLink Console after changing it, and re-tune: the same gains act differently at a different rate.
  • Two IMUs: PX4 votes between the two IMUs and uses the selected one for control. Both are on the same board with the same filtering, so no per-IMU tuning is needed.
  • Mounting: gains that work on a soft-mounted board can oscillate on a hard-mounted one. Use the rubber isolators.

For the full procedures, see PX4's multicopter PID tuning guide and fixed-wing PID tuning guide.