anglovirtual
New member
I thought I’d post a simple guide for PID Tuning from what I’ve learnt from trying to tune multirotors. It’s by no means exhaustive, but I’ve tried not to make it too complicated in the hopes that it’s easy for complete beginners to understand and apply quickly in the real world.
Hopefully it can help those who may be struggling with getting to grips with tuning their quads? Or at least give them a starting point.
If this has already been covered elsewhere feel free to take the post down. If not, perhaps it might help someone…
Thanks & happy flying!
Ed
FIRST, AN EASY-TO-UNDERSTAND PID ‘ANALOGY’:
P= 'Power' - how much power is optimum to keep the quad stable. If you want the quad to make corrections at a faster pace: raise the P!
I= 'Intervention' - how much the quad will intervene to remain stable when some outside force (e.g. wind, gravity!) is acting on it.
D= 'Damping' - Keeps P & I in check!
Fine control and fine tuning of end-range of fast movements in all axis.
(Stops the quad acting like it's drunk!)
Tune either P or I-Gain FIRST, (depending on preference & what works for you- I find it easier to start with P), then lastly D* - SO: 'P - I - D' !
*Your Quad should fly pretty well if P & I are tuned correctly BEFORE you even touch the D values.
PRE-PID TUNING TIPS:
Save yourself a massive headache and ALLWAYS tune your quad with the payload, battery type and weight distribution that you prefer for day-to-day flight! If you tune your PIDs without your camera on the quad, or a different battery type, the PID tune will be likely wrong when you strap-on your camera again! The same goes for props. Changing prop type/size after tuning will affect the PID tune.
Tuning should be done in Acro/Rate mode generally.
Set your RC Rates & Expo to your preferred values.
Raise/Lower values by SMALL AMMOUNTS each time - (Ideally by no more than 10, as it can get confusing!)
BEFORE TUNING TIPS: Its always easier/safer to start tune from the default values of your chosen PID controller, rather than a pre-existing tune or with I & D values set at '0' (as this can cause erratic/uncontrollable flight!)
Starting out with your D values set fairly low will give you a clearer idea of how P and I are behaving.
PITCH and ROLL axis should be main focus of tuning. YAW axis rarely needs much adjustment from stock. (It's good practice to leave P & D gains for Yaw at default until you're happy with the Roll & Pitch tune.)
A NOTE ON ‘D’:
Ideally D should be set fairly low on a good tune. D is mostly there to correct any SMALL amounts of error on P, not massive ones! If D has to be set high to get the quad to fly right this will potentially be putting more load through the FC, ESCs & motors, as the quad is having to correct a lot more in flight. This may result in a slower quad, hotter motors, reduced flight times and reduced component life due to more component load than would be optimum if I, and especially P, was tuned right in the first place!
QUICK PID TROUBLESHOOTING GUIDE:
P too HIGH: Quad wobbles/oscillates in flight (sometimes quite rapidly)
P too LOW: Quad rolls, pitches & yaws by itself during flight.
(Sometimes on one axis or all axes at the same time)
I too HIGH: Quad will over-correct for stick inputs/forces acting on it.
(Continues moving on an axis beyond the point where it was supposed to stop.)
I too LOW: Quad is unable to correct for any forces acting on it & keeps going in same direction.
NOTE: Keep I-gains lower than P-gains
(If I-Gains are HIGHER than P-gains the quad may over-correct/over rotate on its control axis.)
D too HIGH: Quad will be slow/lethargic in response to any stick inputs.
D too LOW: Quad wobbles/bounces slightly when stopping a sudden movement or direction change.
‘FLIGHT TESTING THE TUNE’ – A METHOD:
(It’s best to check the behavior of the tune via video playback from your chosen camera at 60fps, as a high frame rate will show the quads movements in more detail. Writing down each new value tested and its effect on flight behavior each time can really help in understanding what works and what doesn't!)
TUNING P:
P is the most important value to tune FIRST on roll & pitch axis, as this has the most impact on stick feel & responsiveness of the quad. It's a good idea to get this as well tuned as possible (but not necessarily perfect!) BEFORE tuning I and D gains.
P-gain on the roll axis can easily be tested & tuned simply by flying forward and tipping the quad left and right rapidly in the roll axis to see how it responds. Snap and full rolls can also be checked.
(Check for responsiveness & how 'locked in' the quad feels, as well as any bounce-back on rapid stick inputs.)
As P becomes more ‘locked-in’ stick feel should improve- (this sharpens up the response of the quad when raised).
P-gain on the pitch axis can also be tuned the same way: So forward flight and applying rapid alternating pitch up & down stick inputs, and flips if necessary.
If quad flies like a boat, sloppily & loose, or wobbling all over the place, first start by raising P-Gains on Roll & Pitch by maximum of 5 each time and re-test - until the quad flies smoothly.
For the Yaw axis same also applies; just yaw the quad left and right rapidly in forward flight and see how it feels.
If P is too high the quad will shake during flight - (sometimes v.fast shakes)
If P is too low the quad will roll,pitch & yaw by itself during flight.
If Yaw P is too high you can get excess vibrations.
(You rarely get oscillations with higher P-gain on yaw as the axis has much less authority on the quad.)
It is possible to fly with no I values set at all, but the quad will be unable to correct against any forces acting on it (e.g. wind or frame balance/COG) and will keep going in the same direction when a force acts upon it.
If I-Gains are HIGHER than P-gains the quad may over-correct/over rotate on its control axis.
(NOTE: Usually I-gains should be a little lower than P-Gains)
FINE TUNING:
Bounce-back on pitch and roll axis can be corrected by raising P-gains a little.
No oscillation/bounce-back? You can slowly raise P until oscillations start to find the max optimal P value.
If it sounds twitchy even with no control input you should probably lower the P gain until the motors sound more normal again in a static hover and/or on puchouts.
TUNING I:
Check how well the quad holds angles during flight, or does it wobble out of them?
If so, start to turn up the I-gains a little at a time for pitch & roll and re-test.
Now fine tune quad stability by testing on PUNCHOUTS:
Yaw on punchouts? = More yaw I gain.
Nose comes up or drops on punch out? = Pitch I gain up.
Sudden drop of throttle causing roll? = Roll I gain up.
No pitch, roll or yaw on punch out or angled forward flight? =
I-gain tune is likely good!
Now do some FAST TURNS:
If the quad gets sloppy on fast turns, e.g. around a post, try raising Yaw I-gain to give it a more locked-in feel on the yaw axis.
(NOTE: Usually I-gains should be a little lower than P-Gains)
TUNING D:
This mostly helps give quad a 'rock solid'/ 'locked-in' feeling to stick inputs/direction changes when tuned correctly in conjunction with P set right.
Fine-tune the end stability & smoothness of aggressive manoeuvres like sharp turns, flips and rolls by slowly raising D-Gains.
If you still have a little bounce-back on aggressive manoeuvres after tuning P you can correct this now by raising D.
Use the exact same process for fine-tuning D-gains as was done to tune P at the start of this process:
Start with roll axis first. Get that feeling right then move on to pitch, and finally yaw.
(If the quad starts to get sluggish & unresponsive lower D until it sharpens up again. This means D was too high.)
WEIGHT DISTRIBUTION FINE TUNING:
Increase P-Gains slightly for PITCH axis if the quad Centre Of Gravity (COG) is nose or tail heavy. (This can also aid stability for fast forward flight e.g. for a race tune, rather than a pure acro tune.)
Good Luck!
Hopefully it can help those who may be struggling with getting to grips with tuning their quads? Or at least give them a starting point.
If this has already been covered elsewhere feel free to take the post down. If not, perhaps it might help someone…
Thanks & happy flying!
Ed
FIRST, AN EASY-TO-UNDERSTAND PID ‘ANALOGY’:
P= 'Power' - how much power is optimum to keep the quad stable. If you want the quad to make corrections at a faster pace: raise the P!
I= 'Intervention' - how much the quad will intervene to remain stable when some outside force (e.g. wind, gravity!) is acting on it.
D= 'Damping' - Keeps P & I in check!
Fine control and fine tuning of end-range of fast movements in all axis.
(Stops the quad acting like it's drunk!)
Tune either P or I-Gain FIRST, (depending on preference & what works for you- I find it easier to start with P), then lastly D* - SO: 'P - I - D' !
*Your Quad should fly pretty well if P & I are tuned correctly BEFORE you even touch the D values.
PRE-PID TUNING TIPS:
Save yourself a massive headache and ALLWAYS tune your quad with the payload, battery type and weight distribution that you prefer for day-to-day flight! If you tune your PIDs without your camera on the quad, or a different battery type, the PID tune will be likely wrong when you strap-on your camera again! The same goes for props. Changing prop type/size after tuning will affect the PID tune.
Tuning should be done in Acro/Rate mode generally.
Set your RC Rates & Expo to your preferred values.
Raise/Lower values by SMALL AMMOUNTS each time - (Ideally by no more than 10, as it can get confusing!)
BEFORE TUNING TIPS: Its always easier/safer to start tune from the default values of your chosen PID controller, rather than a pre-existing tune or with I & D values set at '0' (as this can cause erratic/uncontrollable flight!)
Starting out with your D values set fairly low will give you a clearer idea of how P and I are behaving.
PITCH and ROLL axis should be main focus of tuning. YAW axis rarely needs much adjustment from stock. (It's good practice to leave P & D gains for Yaw at default until you're happy with the Roll & Pitch tune.)
A NOTE ON ‘D’:
Ideally D should be set fairly low on a good tune. D is mostly there to correct any SMALL amounts of error on P, not massive ones! If D has to be set high to get the quad to fly right this will potentially be putting more load through the FC, ESCs & motors, as the quad is having to correct a lot more in flight. This may result in a slower quad, hotter motors, reduced flight times and reduced component life due to more component load than would be optimum if I, and especially P, was tuned right in the first place!
QUICK PID TROUBLESHOOTING GUIDE:
P too HIGH: Quad wobbles/oscillates in flight (sometimes quite rapidly)
P too LOW: Quad rolls, pitches & yaws by itself during flight.
(Sometimes on one axis or all axes at the same time)
I too HIGH: Quad will over-correct for stick inputs/forces acting on it.
(Continues moving on an axis beyond the point where it was supposed to stop.)
I too LOW: Quad is unable to correct for any forces acting on it & keeps going in same direction.
NOTE: Keep I-gains lower than P-gains
(If I-Gains are HIGHER than P-gains the quad may over-correct/over rotate on its control axis.)
D too HIGH: Quad will be slow/lethargic in response to any stick inputs.
D too LOW: Quad wobbles/bounces slightly when stopping a sudden movement or direction change.
‘FLIGHT TESTING THE TUNE’ – A METHOD:
(It’s best to check the behavior of the tune via video playback from your chosen camera at 60fps, as a high frame rate will show the quads movements in more detail. Writing down each new value tested and its effect on flight behavior each time can really help in understanding what works and what doesn't!)
TUNING P:
P is the most important value to tune FIRST on roll & pitch axis, as this has the most impact on stick feel & responsiveness of the quad. It's a good idea to get this as well tuned as possible (but not necessarily perfect!) BEFORE tuning I and D gains.
P-gain on the roll axis can easily be tested & tuned simply by flying forward and tipping the quad left and right rapidly in the roll axis to see how it responds. Snap and full rolls can also be checked.
(Check for responsiveness & how 'locked in' the quad feels, as well as any bounce-back on rapid stick inputs.)
As P becomes more ‘locked-in’ stick feel should improve- (this sharpens up the response of the quad when raised).
P-gain on the pitch axis can also be tuned the same way: So forward flight and applying rapid alternating pitch up & down stick inputs, and flips if necessary.
If quad flies like a boat, sloppily & loose, or wobbling all over the place, first start by raising P-Gains on Roll & Pitch by maximum of 5 each time and re-test - until the quad flies smoothly.
For the Yaw axis same also applies; just yaw the quad left and right rapidly in forward flight and see how it feels.
If P is too high the quad will shake during flight - (sometimes v.fast shakes)
If P is too low the quad will roll,pitch & yaw by itself during flight.
If Yaw P is too high you can get excess vibrations.
(You rarely get oscillations with higher P-gain on yaw as the axis has much less authority on the quad.)
It is possible to fly with no I values set at all, but the quad will be unable to correct against any forces acting on it (e.g. wind or frame balance/COG) and will keep going in the same direction when a force acts upon it.
If I-Gains are HIGHER than P-gains the quad may over-correct/over rotate on its control axis.
(NOTE: Usually I-gains should be a little lower than P-Gains)
FINE TUNING:
Bounce-back on pitch and roll axis can be corrected by raising P-gains a little.
No oscillation/bounce-back? You can slowly raise P until oscillations start to find the max optimal P value.
If it sounds twitchy even with no control input you should probably lower the P gain until the motors sound more normal again in a static hover and/or on puchouts.
TUNING I:
Check how well the quad holds angles during flight, or does it wobble out of them?
If so, start to turn up the I-gains a little at a time for pitch & roll and re-test.
Now fine tune quad stability by testing on PUNCHOUTS:
Yaw on punchouts? = More yaw I gain.
Nose comes up or drops on punch out? = Pitch I gain up.
Sudden drop of throttle causing roll? = Roll I gain up.
No pitch, roll or yaw on punch out or angled forward flight? =
I-gain tune is likely good!
Now do some FAST TURNS:
If the quad gets sloppy on fast turns, e.g. around a post, try raising Yaw I-gain to give it a more locked-in feel on the yaw axis.
(NOTE: Usually I-gains should be a little lower than P-Gains)
TUNING D:
This mostly helps give quad a 'rock solid'/ 'locked-in' feeling to stick inputs/direction changes when tuned correctly in conjunction with P set right.
Fine-tune the end stability & smoothness of aggressive manoeuvres like sharp turns, flips and rolls by slowly raising D-Gains.
If you still have a little bounce-back on aggressive manoeuvres after tuning P you can correct this now by raising D.
Use the exact same process for fine-tuning D-gains as was done to tune P at the start of this process:
Start with roll axis first. Get that feeling right then move on to pitch, and finally yaw.
(If the quad starts to get sluggish & unresponsive lower D until it sharpens up again. This means D was too high.)
WEIGHT DISTRIBUTION FINE TUNING:
Increase P-Gains slightly for PITCH axis if the quad Centre Of Gravity (COG) is nose or tail heavy. (This can also aid stability for fast forward flight e.g. for a race tune, rather than a pure acro tune.)
Good Luck!
Last edited: