Tuning PID’s

If you have modded your UpAir you can do simple things like calibration and change some flying modes.

But the mod also gives you the opportunity to adjust the PID’s

The PID’s control how the drone behaves on user input and influences from outside like wind.
Every drone is different, but it looks like UpAir uses more or less the same PID settings in all the drones.
This is not a problem, it makes the drone very flyable, but tuning the PID’s will make it even better.

You might have read about the autotune function that is in Mission Planner.
Normally this sets the PID’s automatically, and all should be fine.
With an UpAir this doesn’t seem to work that well, it makes it very unstable.
But, we can do it ourselves! and that might just be a bit better as well.

What is PID?

Proportional Gain coefficient – the quadcopter will fly fairly stable without dialling in the other parameters too hard but this one is essential. This coefficient determines which is more important, human control or the values measured by the gyroscopes. The higher the value of the P, the more the quad reacts to the gyro and the more force gyro correction. If it is too low, the quadcopter will appear sluggish and will be harder to keep steady. However, if it is too high the multi rotor starts to oscillate with a high frequency.
Integral Gain coefficient – this coefficient can increase the precision of the angular position. For example when the quadcopter is disturbed and its angle changes 20 degrees, in theory it remembers how much the angle has changed and will return to its previous position. In practice it isn’t always this accurate, nevertheless it is vital for flying. Without this term, the opposition does not last as long. I gain is especially useful with irregular wind, and ground effect (turbulence from motors). Sometimes referred to as Vortex ring oscillation this is when you descend into your own prop wash. Often this is visible as tell tail oscillations in descents and can be easily fixed by upping the I. However, when the I value gets too high your quadcopter might begin to have slow reaction and a decrease effect of the Proportional gain as consequence, it will also start to oscillate like having high P gain, but with a lower frequency.
Derivative Gain coefficient – this coefficient allows the quadcopter to reach more quickly the desired attitude. Some people call it the accelerator parameter because it amplifies the user’s input. It also decreases control action fast when the error is decreasing fast. In practice it will increase the reaction speed and in some cases an increase the effect of the P gain. A good way telling if a D gain is too low the quad will kick back after a flip so keep increasing it until it no longer does this.

Changing PID’s can do a lot with your drone, and make is stable as a rock!
This requires a lot of time to get it right, but when it’s done correctly you will have a very steady drone!

In Mission Planner, the Stabilize P values are the ones that need extra care, as it already says, they determine the stabilisation of the drone!
Set it too low, and the drone feels sloppy and sluggish, set it to high and it will oscillate and over correct.
Setting these values correctly will give you a stable flying drone, even with a bit of wind. Corrections due to wind will be very accurate!


You always start with adjusting these 3 values!
5100,5200,5700 are stock values, and work fine , but you could tune them a bit to be even better.

The Rate PID values are the ones you need to adjust when you want to translate user input into drone movements

P- Proportional:
The Proportional gain responds to the present error. This tells the quadcopter at what angle it should be at, trying to get the final result as close as possible to the pilot’s input. If you were to try flying with no P Gain, the quadcopter would be very sloppy and floaty, as it would not try to correct the pilot’s input to get the desired input.

I- Integral:
The Integral gain is used to collect past data errors and use them to correct the craft. It assists the P gain and helps to keep the quad corrected from outside forces like wind. However, a tuned I gain will not correct outside forces like auto-stabilize will. Rather, it will hold the quad steady in its last position, so that you don’t have to continuously correct it. When flying forwards at a pretty high speed, you can see if your I gain is tuned by letting go of the stick and seeing how well it maintains its angle specified by the pilot.

D- Derivative:
You can think of D as a cushion, helping to smooth the movement from one position to another. If you notice your quadcopter flies with very “jerky” inputs, your D gain likely needs to be tuned. D can help to limit vibrations and make the entire quad fly smooth, but because it blends the P and I gains (especially P), you may actually need to tune your P and I gains to adjust them for the D gain. We’ll talk about tuning next.

How to tune you PID’s correctly,

P GAIN: Proportional gain is the first thing you should tune. Slowly, gradually, increase your P gain until the quad just barely starts to oscillate. Then back it down a few ticks until you’re happy with it. If your P gain is too high, the quad will oscillate and feel very shaky and unstable. If your P gain is too low, it’ll feel like you’re trying to fly through syrup. Once your P gain is tuned, we can move onto the I gain.

I GAIN: Integral gain, when tuned properly, should make every control input be as rock-solid as possible, with no slop, optimally. Your I gain should be tuned so that outside elements like wind don’t push the quadcopter from its intended position unless the pilot specifies to do so. Tuned I gains will keep the quad steady, while an I gain that is too high will over correct and an I gain that is too low won’t hold the control input very well and your controls will feel like jello. If your quad shakes when descending, turn down your I gain just a little.

D GAIN: The need for Derivative gain is especially noticeable when making aggressive maneuvers, especially tight turns. Your quadcopter might wobble or oscillate uncontrollably as it tries to correct itself. When this happens, you know your D gain is too low. Keep turning the D gain up, until the quad is smoothed out enough so that, in an aggressive maneuver, the quad still remains relatively stable. But if you turn your D gain too high, it will smooth the maneuver too much and the quadcopter will feel unresponsive.

One comment

  1. Hi,
    I want to set a little bit expo to my controller sticks.
    Is this the right chapter to read and understand?
    Can you push me to the right setting or option?


Leave a Reply