PID Tuning - another perspective (Ian444):

This is how I tune, it may be wrong, as there are many tuning methods, but this might help or give you some ideas, and note this is just my opinion, its written for acro mode tuning:

You need D to balance P. P is the primary correction force, D is the one that stops it overshooting the mark. To check this, hover the quad in front of you and facing away from you, and flick the roll stick left and right. See if the quad bounces as it settles on the new position. If it does, increase the D at least 10% and try again. If it doesn't, decrease the D until you just start to see a little bit of bounce. A little bit of bounce (or bounceback) is around where you want to be. Too much D can wreck a tune so if there is no bounceback you need to decrease it until you find the edge of bounce. Once P and D are in the correct ratio I simply scale them up and down together to make changes, I usually use 10% for a small change and 20% for a larger change.

Let's assume you now have P and D in the correct proportion, but maybe not the correct overall amount. How do you know if the P/D ratio is too much or too little? If there is not enough P/D the quad feels a bit doughey or unresponsive, or like the rates are too low, and it can also get upset with wind gusts while hovering, because there is not enough P authority to keep the correct attitude, or go to a new commanded attitude. Too much P is a bit harder to detect but often shows up when you try to land, and you touch the ground, and suddenly the motors increase in rpm on touching down (it keeps wanting to bounce off the ground). A little bit of that behaviour is normal, but excessive amounts are due to too much P/D. Also you can tell by feel (does the quad always track straight and go where you expect it to?), but with a new quad that is difficult because you might not know what it is supposed to “feel” like. So in that case try to get it flying with nice enough manners while you get used to it. If you are not sure, use the trial and error method, increase P/D by say 15%, and then decrease P/D by 15%, and see what the results are. That will quickly lead you in the correct direction.

The I term is adjusted by lowering it until you see the quad having difficulty holding a set attitude both in hover or while travelling forwards on a set course, it will start to drift around. Then bump I up just enough so the quad will hold its attitude (say in 10% increments). If you start tuning with too much I, it will foil your tuning attempts. Any value of P, I or D that is too high for the quad will make tuning very difficult. It is always best to start low and work up, and do not increase any of the values any more than is needed.

It is difficult to know where to start with the I term. Usually it ends up being 1/3 to 1/2 of the P term once tuned (on my quads). Also I find it doesn't need to vary much when P and D are changing, it is almost an independent setting from P and D. Start as low as you are comfortable with. Before you fly a newly-built quad, it is almost impossible to know where to start, unless you have built a similar one before, or someone gives you some starting values. In the case where there is nothing to start with, you have to put some numbers in there and just see what happens.

Some more comments by silverxxx regarding where to start with I from this post: https://www.rcgroups.com/forums/showpost.php?p=36368724&postcount=6881

“I sometimes start at zero to see how balanced the quad is. Otherwise if I can't balance the quad or I just don't feel like havig drifts, I just put 1 in there, that stops the drifts.
However, low I seems good in gentle flights, but will be bad as soon as heavy maneuvering starts. Generally the quad tends to want to come back after a rate change with I too low.”

Also, you don't have to tune a quad and that's it (in one go). If you keep notes, you can keep tweaking it when you are in the mood to try some changes. Some quads I almost gave up on turned out to be great flyers in the end, given a bit of time and persistence, but not all at the same time, (or on the same day), sometimes it's weeks later until I get it flying right. Others quads, they are tolerant of many tuning values and fly well right from the start.

Something else to add is that in general, higher kv motors need less PID because in effect they add gain to the PID's compared to the same size motor with lower kv rating. A similar thing can happen by changing prop pitch/diameter or number of cells, again the tuning is affected because for the same change in motor speed command from the FC, a different thrust change occurs compared to before the props or number of cells was changed. Unfortunately the FC does not know anything about the motors/props/batteries fitted, so it has to be tuned for whatever combination of parts are being used. Sometimes hardware changes do not require a retune, but usually they do.