[PX4 Tuning Series 4] Advanced PID Tuning and Flight Optimization: The Hidden 1% to Unlock Extreme Flight Performance
Hello again to all university students, graduate students, and researchers dedicating yourselves to aerospace engineering and autonomous drones!
In our previous [Series 3], we covered the fundamentals of manual PID tuning, focusing on how quickly and accurately the vehicle reacts to stick inputs while hovering. If you followed the basic tuning procedures, your drone should now demonstrate quite stable flight performance.
However, if you are building a specialized research vehicle or an FPV racing drone where you need to push the performance to its absolute limits, tuning exclusively around the “hover thrust point” is simply not enough. Have you ever experienced your vehicle violently oscillating when you punch the throttle to the maximum, or conversely, losing its balance and tumbling when you drop the throttle to zero?
In Series 4 today, we will explore Advanced PID Tuning techniques to maintain perfect control of your vehicle even in these highly non-linear flight envelopes. We will dive deep into the architectures of the Rate Controller, thrust curve compensation to eliminate high-throttle vibrations, and Airmode, which ensures you never lose attitude control even at zero throttle.
1. Rate Controller Architecture: Standard vs. Parallel
The Rate Controller is the inner-most loop of the drone’s control system, consisting of three independent PID controllers that dictate the body angular rates for roll, pitch, and yaw. Interestingly, PX4 supports two mathematically equivalent forms of the PID rate controller in a single “mixed” implementation: the Standard Form and the Parallel Form.
You can select the specific architecture you wish to use simply by setting the proportional gain for the other form to “1” in the parameters.
① Parallel Form Architecture
The parallel form is the simplest form, commonly used in academic textbooks. In this architecture, the output of the controller is simply the direct sum of the proportional, integral, and derivative actions calculated from the error.
- How to configure: In QGroundControl (QGC), set the overall gain parameter
MC_ROLLRATE_Kto 1. This transforms the system into a parallel controller where the P, I, and D gains operate completely independently.
② Standard Form Architecture
While mathematically equivalent to the parallel form, the standard form offers a massive practical advantage: it completely decouples the proportional gain tuning from the integral and derivative gains.
- The Advantage: If you build a new drone that shares a similar size or inertia to a previously tuned drone, you can simply copy over the I and D gains from the old drone, and then just adjust the overall K gain to achieve proper flight performance on the new platform. It saves an incredible amount of tuning time for research labs managing multiple similar frames!
- How to configure: In QGC, set
MC_ROLLRATE_Pto 1, and then adjust theMC_ROLLRATE_Kvalue to tune the overall responsiveness of the system.

Note: In both forms, the derivative (D) term is deliberately placed on the feedback path rather than the error path to avoid a sudden spike in output known as “derivative kick” when the setpoint changes rapidly.
2. Thrust Curve Compensation: Eliminating Full-Throttle Vibrations
The basic tuning we performed in Series 3 optimizes the vehicle’s performance purely around the hover throttle. But what happens when you rapidly accelerate to 70~100% throttle? You might suddenly notice the drone shaking or oscillating violently.
These high-thrust oscillations occur due to the non-linearity between the motor control signals (e.g., PWM) and the actual aerodynamic thrust produced by the propellers. While the motor command increases linearly, the resulting thrust increases quadratically. To compensate for this non-linearity, PX4 provides the THR_MDL_FAC parameter.
2-1. How THR_MDL_FAC Works
This parameter dictates the mathematical model used to map motor signals to expected thrust:
- Value 0.0: Represents a perfectly linear mapping.
- Value 1.0: Represents a perfectly quadratic mapping. If you are using RPM-based ESCs like DShot or UAVCAN, the thrust curve is already quadratic, so this should be set to 1.0.
- Value 0.3 ~ 0.5: These are the typical recommended values when using standard PWM-based ESCs.
2-2. Empirical Tuning Guide
If your lab does not have access to an expensive static thrust stand to measure the exact motor curves, you can tune this modeling factor empirically through flight testing.
- Search for the
THR_MDL_FACparameter in QGC and start with a default value of 0.3. - Perform a test flight, aggressively increasing and decreasing the throttle.
- If you notice oscillations at high throttle values: The value is too low. Increase it by 0.1 (e.g., to 0.4) and test again.
- If you notice oscillations at lower throttle values: The value is too high. Decrease it.
- Find and save the sweet spot where the drone accelerates smoothly across the entire throttle range.
# Example Parameter Configuration
THR_MDL_FAC = 0.45 # The optimal empirical value found to eliminate both high and low throttle oscillations
Warning: Because this parameter fundamentally alters the control loop’s output mapping, be aware that the rate controller might need to be re-tuned if you make significant changes to THR_MDL_FAC.
3. Airmode and Mixer Saturation: Maintaining Control in Freefall
During advanced research flights or acrobatic maneuvers, there are times when you need full roll or pitch control even when the drone is in freefall with the throttle completely dropped to zero.
The flight controller calculates the required torque commands for all three axes (roll, pitch, yaw) and a scalar thrust value, and then converts these into individual motor thrust commands through a step called “mixing”. For example, to roll right, it adds the roll command to the left motors and subtracts it from the right motors.
The critical problem occurs when the pilot lowers the throttle to zero, but still commands a sharp rotation. Because the overall thrust is zero, subtracting the roll command from the right motors mathematically results in a negative (-) motor command. Since standard drone motors cannot instantly reverse direction, this physically impossible scenario is known as “Mixer Saturation”. PX4 resolves this mathematically impossible situation in two ways.
3-1. Airmode Disabled (Default Behavior)
To ensure no motor command falls below zero, PX4 resolves the saturation by reducing the commanded torque for roll or pitch. In the extreme case where the commanded thrust is zero, all attitude corrections are reduced to zero, meaning no attitude correction is possible anymore. The drone becomes essentially uncontrollable and can easily tumble out of the sky if hit by wind.
3-2. Airmode Enabled (Maximum Flight Performance)
When you enable Airmode (MC_AIRMODE), instead of sacrificing your rotational commands, PX4 artificially increases (boosts) the overall commanded thrust just enough so that none of the motor commands are negative. By boosting the base thrust, the drone can perfectly track attitude and rate setpoints even at low or zero throttle. This generally improves the overall flight performance dramatically, especially for racers or aggressive research drones.

3-3. CRUCIAL Warning When Using Airmode (★ Extremely Important ★)
While Airmode is fantastic, you must ALWAYS disable MC_AIRMODE when tuning a vehicle. Why? Because Airmode fundamentally gives the flight controller permission to increase the total thrust on its own. If your P tuning gains are set too high, the drone will strongly oscillate. The flight controller will attempt to fight these oscillations with massive motor commands, causing mixer saturation. Airmode will then continuously boost the thrust to resolve this saturation. As a result, even if you reduce your radio throttle to zero, the vehicle may continue to rapidly ascend into the sky in a terrifying “fly-away” event.
Therefore, MC_AIRMODE is the absolute last parameter you should enable, and you should only do so once you have verified that your vehicle flies flawlessly and without any oscillations across the entire throttle range.
Conclusion
Congratulations! Today, we moved beyond the basic hover tuning of [Series 3] and learned three advanced techniques to extract 100% of your vehicle’s aerodynamic potential.
- We selected between the Standard and Parallel rate controller architectures to best suit our research workflow.
- We tuned the
THR_MDL_FACparameter to compensate for the quadratic nature of aerodynamic thrust, completely eliminating high-throttle vibrations. - Finally, after confirming our tune was perfect, we enabled
MC_AIRMODEto achieve flawless attitude tracking even at zero throttle, safely avoiding the dangers of fly-aways.
Your drone is now capable of executing aggressive climbs, rapid descents, and razor-sharp maneuvers without ever losing its “locked-in” feel.
However, we understand that not every researcher has the time to perform dozens of manual test flights and meticulously analyze response graphs. In our next post, [Series 5: Auto-Tuning], we will introduce PX4’s revolutionary Auto-tuning feature, which automates the tuning of rate and attitude controllers in just about 40 seconds of flight. We will also cover exactly how to diagnose and resolve issues if the drone oscillates during the pre-tuning phase.
We wish you the best of luck with your lab’s next flight test. See you in the next series!
YouTube:

Author: maponarooo, CEO of QUAD Drone Lab
Date: March 6, 2026
