PID Tuning

PID Tuning Guide - Special thanks to Shikra on RCGroups

PID tuning theory and configuration guide for MultiWii

P is the dominant part of PID and gets you in the ballpark for good flight characteristics. 


Basic PID Tuning - on the ground


Set PID to the designers default recommended settings
Hold the MulitiRotor securely and safely in the air
Increase throttle to the hover point where it starts to feel light
Try to lean the MultiRotor down onto each motor axis
You should feel a reaction against your pressure for each axis. 
Change P until it is difficult to move against the reaction. Without stabilisation you will feel it allow you to move over a period of time. That is OK
Now try rocking the MultiRotor. Increase P until it starts to oscillate and then reduce a touch.
Rrepeat for Yaw Axis.

Your settings should now be suitable for flight tuning.


Advanced Tuning - understanding impact of P, I and D

P - proportional 


P provides a proportional amount of corrective force based upon the angle of error from desired position. The larger the deviation, the larger the corrective force. 

A higher P value will create a stronger force to return to desired position.
If the P value is too high, on the return to initial position, it will overshoot and then opposite force is needed to compensate. This creates an oscillating effect until stability is eventually reached or in severe cases, the overshoot becomes amplified and the multirotor becomes completely destabilised.

Increasing value for P:

It will become more solid/stable until P is too high where it starts to oscillate and loose control 
You will notice a very strong resistive force to any attempts to move the MultiRotor 

Decreasing value for P:

It will start to drift in control until P is too low when it becomes very unstable.
Will be less resistive to any attempts to change orientation

Aerobatic flight: Requires a slightly higher P
Gentle smooth flight: requires a slightly lower lower P


Integral 


I provides a variable amount of corrective force based upon the angle of error from desired position. The larger the deviation and / or the longer the deviation exists, the larger the corrective force. It is limited to prevent becoming excessively high.

A higher I will increase the heading hold capability

Increasing value for I:

Increase the ability to hold overall position, reduce drift due to unbalanced frames etc

Decreasing value for I:

Will improve reaction to changes, but increase drift and reduce ability to hold position

Aerobatic flight: 
Gentle smooth flight: 
AP: Requires a slightly lower I to minimise wobbles / jitter


Derivative


This moderates the speed at which the MultiRotor is returned to its original position. 
A lower D will mean the MultiRotor will snap back to its initial position very quickly

Increasing value for D: 

Dampens changes. Slower to react to fast changes 

Decreasing value for D: 

Less dampening to changes. Reacts faster to changes 

Aerobatic flight: Lower D
Gentle smooth flight: Increase D 


Advanced Tuning - practical implementation


For Aerobatic flying:

Increase value for P until oscillations start, then back of slightly
Change value for I until until wobble is unacceptable, then decrease slightly
Decrease value for D until recovery from dramatic control changes results in unacceptable recovery oscillations, then increase D slightly
Repeat above steps

For stable flying (RC):

Increase value for P until oscillations start, then back of quite a bit
Decrease value for I until it feels too loose /unstable then increase slightly
Increase value for D

General guidelines:

For stable flying with less wobble / jitter ( AP / FPV):
Lower P if you have fast wobbles
Lower I if you have slow wobbles
Higher D to smooth changes

For acro flying:
Lower D to make sharper snappier movements



You will have to accept a compromise of optimal settings for stable hover and your typical mode of flying. Obviously factor it towards your most common style.


Other factors affecting PID

Taking known good PID values from an identical configuration will get you close, but bear in mind no two MultiRotors will have the same flying characteristics and the following items will have an impact on actual PID values:

Frame weight /size / material / stiffness
Motors - power / torque /momentum
Position - Motor-->motor distance
ESC / TX - power curves
Prop - diameter / pitch / material
BALANCING
Pilot skills

3 comments:

  1. Thank you for a perfectly simple guide to a not so simple procedure, I want to fully understand PID tuning,
    Happy flying :)
    YT channel
    ARCEYE78

    ReplyDelete
  2. This was a God-send in getting my 250 flying smoothly. I went from a complete beginner with no soldering or electronics skills, practicing with a hubsan in my living room to building a 250 from scratch. I got all the way to that first nerve wracking take off and it wobbled like crazy before flipping 180 degrees forwar. I changed from tri to dual props, changed firmware and firmware builds around 6 times and the whole time it was the PID setting. Specifically the P settings.

    ReplyDelete
  3. Great article.
    For those who are wondering ... AP = Aerial Photography

    ReplyDelete