PID Tuning for beginners

Posted by Yongxi He on 24th Mar 2016

IV Rotor team pilot Yongxi shares his approach to tuning his quad. This tuning method works well on Rate/Acro mode.

I'm not particularly a big fan of having to tune but it is necessary for that truly locked in, point & shoot feeling. The hardest part of tuning is understanding the symptoms of a bad tune so you can easily isolate the behaviour by adjusting the corresponding PID values. When you understand why the quad is behaving a certain way, adjusting the PIDs becomes easy.

Lets go over the symptoms of a poorly tuned quad followed by how to tell which axis is affected. This is the part you need to get to grips with, as essentially you want to tune out these symptoms. I promise this is the lengthy bit, understanding the symptoms and how to isolate them. My tuning process is generally a short one in the field.

Fast vibrations when applying throttle or hovering in place, also called oscillations: Caused by a P value that is too high, dropping P to just below where the oscillations start will give you good responsiveness and control. This sounds like fast motor twitches. A P value that is too low will produce slow wobbles and the quad won't stay where you set it.

Which Axis to adjust P term? Look through your FPV feed, if the camera vibrates up and down, this is the P axis, quick wobbles left to right is roll and quick vibrations left to right is yaw. 

Quad doesn't stay at a set angle when you pitch/roll/yaw after you release RC input and/or slow wobbles on descent. 

When you set your quad at an angle, be it pitch, roll or yaw. It should stay locked at that angle after you release RC input from your radio. Too low I term will mean the quads angle will drift after you set it. Too low I term also propogates as slow wobbles when descending. Its best to start with a low I term and increase it slowly than the other way around as the symptoms of low I term are easier to explain than I that is too high.

Which axis to adjust I term? Pitch forward quickly and release input, if it drifts forward more and wont stay where you left it, raise I on pitch. Do the same with Roll. And finally repeat with Yaw. 

Quad bounces after setting angle on quad. D term is too low, raise D just enough that the bounce after setting an angle disappears. If D is too low in pitch, the quad will kind of dip at the end of pitching forwards or backwards. Its a short , single bounce back on the axis after setting an angle. Like I, its better to start with an I term that is too low as opposed to too high. Too much D term creates a sluggish unresponsive quad.

Which axis to adjust D term? Pitch forward quickly and release input, if it bounces then raise D. do the same test on roll and yaw. Look for any bounce and adjust accordingly.

Now that we have described the symptoms of bad PIDs, we need to tune. I will explain how I personally tune while out in the field. You can tune the long way by tuning all of your P terms for each axis first, then all I term, then all D term looking for the symptoms described above. But the way I do it is quite condensed, and will get your quad performing well quickly.

So to start, these are the PID values I set on all my quads as default PIDs before fine tuning in any betaflight/cleanflight version and then adjust to suit the quad. This default set of PIDs will fly great without any adjustment. But to get a really locked in feel, some PID adjustment will be neccessary

My Defaults:

PID 1 – Rewrite

Roll: P 3.6, I 0.035, D 13

Pitch: P 4.9, I 0.040, D 18

Yaw: P 9.5,  I 0.50,  D 0

From there, I will take the quad out and test fly it.

I normally just fly around casually and try to notice any abnormal things the quad may be doing. Oscillations, wobbles, drift, bounce etc

I then start to do more aggressive turns such as sudden 180’s and notice the prop wash ( the little shake after a sharp turn) If its not too much, I leave it because I personally like to run as low D as I can for the responsiveness of the quad, if its quite big shakes, I would up my D by 2 at a time and test. Running too much D can dampen the quads responsiveness.

If I notice there are high speed vibrations with an increase in throttle (both gradual and sudden), I first try to figure out which axis its on, most of the time it’s on Roll for me so I turn down my P on roll by 0.2 and test again. 

I repeat this until there are no more high speed vibrations and then start to punch up and let the quad descend through its own prop-wash, If there are slow wobbles or you feel the quad is unstable during descent – increase I by 0.005.

Too low ‘I’ would feel like the quad isn’t “locked in” when you set an angle (rate mode only) and may begin to drift. When you flick the quad side to side, front to back or yaw left to right. When you stop giving stick input the quad should stay in that position. If it still moves after stick input, there is not enough I term. 

Sometimes I have noticed that changing one value would alter the next so I repeat the procedure until the quad is “locked”, motors are not boiling hot and the quad doesn’t do weird things.

Leave it there and go out and fly!