SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
This thread is privately moderated by Shikra, who may elect to delete unwanted replies.
Old Jan 21, 2011, 08:03 AM
SILURIA / UK
Shikra's Avatar
United Kingdom
Joined Jun 2009
2,446 Posts
Discussion
PID tuning theory and configuration guide for MultiWii

PID tuning theory and configuration guide for MultiWii

Now updated for multiwii >1.9

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


D - 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

References
http://en.wikipedia.org/wiki/PID_controller
Shikra is offline Find More Posts by Shikra
RCG Plus Member
Last edited by Shikra; Jun 28, 2013 at 04:47 AM.
Reply With Quote
Sign up now
to remove ads between posts
Old Jan 21, 2011, 09:08 AM
Registered User
Joined Nov 2004
21 Posts
There is a typo, under "D", in the last two sentences you used "I" where it should be "D"

Great job!
Carsten
calli is offline Find More Posts by calli
Reply With Quote
Old Jan 21, 2011, 10:06 AM
SILURIA / UK
Shikra's Avatar
United Kingdom
Joined Jun 2009
2,446 Posts
Thanks Carsten - done!
Shikra is offline Find More Posts by Shikra
RCG Plus Member
Latest blog entry: MultiWii OSD - MWOSD NG
Reply With Quote
Old Jan 21, 2011, 11:24 AM
Registered User
signguy's Avatar
Swansea, Massachusetts
Joined Dec 2004
2,088 Posts
I have been chasing the correct values for some time. This is the best explanation I've seen. I will continue to chase the "no wobble AP flight" till I get it .

it is much easier to setup for aerobatics!

I still have a wobble in forward flight, not all the time, but enough to ruin a good video. I know its in the I and D, I just have to figure it out.

Thanks, this is a great post.
signguy is offline Find More Posts by signguy
Reply With Quote
Old Jan 21, 2011, 01:41 PM
Registered User
Kadath's Avatar
Quebec, Canada
Joined Apr 2008
1,023 Posts
Thanks for this guide Shikra.

These links might be of interrest about this subject:

PID loop tuning:
http://en.wikipedia.org/wiki/PID_con...iew_of_methods

Scaling PID Tuning Parameters for Different Cycle Times
http://support.motioneng.com/Downloa..._pid_param.htm
Kadath is offline Find More Posts by Kadath
Reply With Quote
Old Jan 21, 2011, 07:17 PM
Registered User
motorhead's Avatar
Kansas, USA
Joined Sep 1999
4,004 Posts
Thanks for this. I think it will really help me. Will you have anything soon on the stable mode? Mine is at 25 and it still drifts easily.
I noticed a few possible errors.

Aerobatic flight: Requires a slightly higher P
Gentle smooth flight: requires a slightly lower lower P
Should this be reversed?

Reduce value for I until oscillations until hover drift is unacceptable.

Increase value for I until recovery from deviations is unacceptable, then increase slightly
Mike
motorhead is offline Find More Posts by motorhead
Last edited by motorhead; Jan 21, 2011 at 07:23 PM.
Reply With Quote
Old Jan 22, 2011, 04:12 AM
SILURIA / UK
Shikra's Avatar
United Kingdom
Joined Jun 2009
2,446 Posts
Quote:
Originally Posted by motorhead View Post
Thanks for this. I think it will really help me. Will you have anything soon on the stable mode? Mine is at 25 and it still drifts easily.
I noticed a few possible errors.

Aerobatic flight: Requires a slightly higher P
Gentle smooth flight: requires a slightly lower lower P
Should this be reversed?

Reduce value for I until oscillations until hover drift is unacceptable.

Increase value for I until recovery from deviations is unacceptable, then increase slightly
Mike
Motorhead - you could well be right - but I think possibly the answer depends upon type of flying. I was coming at it from FPV/AP where one of the aims is to eliminate the oscillations as much as possible - it absoloutely kills good video. However for RC flying you do not see it, so e.g. P can be higher.

So I'm thinking now maybe I need to put up three categories - aerobatic / stable RC / stable FPV.,

Thats good. I expect to make many changes - this thread will hopefully generate many comments, feedback and suggestions.

Sometimes peopel can never agree - so that will be interesting when that one comes up!

Motorhead - first album I ever purchased was one of theirs - "bomber"!
Shikra is offline Find More Posts by Shikra
RCG Plus Member
Latest blog entry: MultiWii OSD - MWOSD NG
Reply With Quote
Old Jan 22, 2011, 04:13 AM
SILURIA / UK
Shikra's Avatar
United Kingdom
Joined Jun 2009
2,446 Posts
Quote:
Originally Posted by Kadath View Post
Thanks for this guide Shikra.

These links might be of interrest about this subject:

PID loop tuning:
http://en.wikipedia.org/wiki/PID_con...iew_of_methods

Scaling PID Tuning Parameters for Different Cycle Times
http://support.motioneng.com/Downloa..._pid_param.htm
Thanks you. I will read up and see what is in there. Should have googled first really - someone has probably done this before!
Shikra is offline Find More Posts by Shikra
RCG Plus Member
Latest blog entry: MultiWii OSD - MWOSD NG
Reply With Quote
Old Jan 22, 2011, 04:19 AM
SILURIA / UK
Shikra's Avatar
United Kingdom
Joined Jun 2009
2,446 Posts
Quote:
Originally Posted by signguy View Post
I have been chasing the correct values for some time. This is the best explanation I've seen. I will continue to chase the "no wobble AP flight" till I get it .

it is much easier to setup for aerobatics!

I still have a wobble in forward flight, not all the time, but enough to ruin a good video. I know its in the I and D, I just have to figure it out.

Thanks, this is a great post.
Thanks man,
even writing this out helped me settle PID better in my mind. Explaining it clearly is the challenge. A few liberties taken to get it like that too.

And I think it will encourage people to experiment a bit.


BTW, thanks (I think!) for getting me into this multirotor business - it was all down to you..... ! Like many others I expect.l
Shikra is offline Find More Posts by Shikra
RCG Plus Member
Latest blog entry: MultiWii OSD - MWOSD NG
Reply With Quote
Old Jan 22, 2011, 07:22 AM
Registered User
BKK, Thailand
Joined Nov 2010
38 Posts
Thank again Shikra, I'm still looking for the best way for tuning PID, this will help me a lot! See below for my first video on my quad+ that I got some technic for Quad set up from your blog.

Quadroter WMP & mini bear (4 min 31 sec)
Hidden Dragon is offline Find More Posts by Hidden Dragon
Reply With Quote
Old Jan 25, 2011, 05:43 PM
LoS sUAS AP/V is not a crime.
W,,,,,,,,,,,,,,,,,,,,'s Avatar
Grass Valley, CA
Joined Feb 2008
378 Posts
Thank you Shikra my quad is flying better then ever now.
W,,,,,,,,,,,,,,,,,,,, is offline Find More Posts by W,,,,,,,,,,,,,,,,,,,,
Reply With Quote
Old Jan 26, 2011, 04:41 AM
SILURIA / UK
Shikra's Avatar
United Kingdom
Joined Jun 2009
2,446 Posts
Quote:
Originally Posted by Wayne Young View Post
Thank you Shikra my quad is flying better then ever now.
fantastic. Makes me so happy that the info is usefull.
Shikra is offline Find More Posts by Shikra
RCG Plus Member
Latest blog entry: MultiWii OSD - MWOSD NG
Reply With Quote
Old Jan 26, 2011, 11:25 AM
Registered User
Joined Dec 2010
12 Posts
Hey,

thank you for this guide! I have played around a little bit with this parameters and my quad (acro only) is hovering without oscillations now... but if gets a little bit windy it nicks and rolls up and down randomly... do you have an idea what I should change to eliminate these instabilities? My current settings are 2.6, 0.03, -13 on both roll and pitch and 8, 0, 0 on yaw axis.

marddi
marddi is offline Find More Posts by marddi
Reply With Quote
Old Jan 26, 2011, 07:52 PM
"Let's put a camera on that.."
spagoziak's Avatar
Twin Cities, MN
Joined Feb 2010
1,063 Posts
Unclear opposites!

Hey Shikra, this is fantastic! I noticed something in your D tuning descriptions. For both higher and lower, you advise that the figures will be farther from zero.

From above, under advanced tuning & the D paragraph:

For Aerobatic flying:
Quote:
(remember, that means a LOWER number as it is a negative value - i.e. further from zero)
And for Stable RC/AP/FPV flying:
Quote:
(remember, that means a HIGHER number as it is a negative value - i.e. further from zero)
Which one is wrong?

Thanks!
spag
spagoziak is offline Find More Posts by spagoziak
Reply With Quote
Old Jan 27, 2011, 10:42 AM
SILURIA / UK
Shikra's Avatar
United Kingdom
Joined Jun 2009
2,446 Posts
another error. I really should check more carefully!

The first one should read read:
remember, that means a LOWER number as it is a negative value - i.e. closer from zero

I am really considering completely re-writing - and making it for multiwii. I am advised that the descriptions are not how it works for MultiWii - but not verified. Need to ask Alex.

Higher D is good for more smooth stable like AP. I think that is your style too?


Quote:
Originally Posted by spagoziak View Post
Hey Shikra, this is fantastic! I noticed something in your D tuning descriptions. For both higher and lower, you advise that the figures will be farther from zero.

From above, under advanced tuning & the D paragraph:

For Aerobatic flying:


And for Stable RC/AP/FPV flying:


Which one is wrong?

Thanks!
spag
Shikra is offline Find More Posts by Shikra
RCG Plus Member
Latest blog entry: MultiWii OSD - MWOSD NG
Reply With Quote
Reply

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion automatic PID loop tuning...? davidbuzz Multirotor Talk 19 Jan 25, 2011 06:14 AM
Question PID tuning question OBH Multirotor Talk 1 Apr 07, 2010 02:48 PM
Discussion Looking for a Esky Lama v3 "adjusting/tuning" guide Aelvion Coaxial Helicopters 55 Aug 01, 2009 12:46 PM
Data Battery Balance Tap Configuration Guide by Battery Brand RC Accessory Batteries and Chargers 5 Aug 01, 2009 07:16 AM
Discussion detailed guide for tuning a belted tail? ORPPC Micro Helis 35 Aug 17, 2007 11:10 PM