The arducopter tuning guide.
This guide was written at the time of the release of Arducopter 2.8.1 FW. It is a compilation of everything I have gathered from the experts in the field of flight controller tuning. It will help give you an understanding of how to tune any rotor based flight controller, but its specific to Arducopter and this firmware release.
I will update this as necessary, or if you can convince me any of it is incorrect just post below and I’ll update this text.
There is a summary/quick reference at the bottom, so once you’ve read this rather rambling explanation you won’t have to again, other than to check details :D
Tuning your flight controller is essential for a perfect flight. Even a fully stock frame will fly better if you tune. The default params will be close, but your battery or motors might be performing differently, your air maybe ‘thinner’ compared to the developer that last published the default params, so you should tune.
What we are trying to achieve is control. We start to accomplish this by modifying the amount of P, I and D in our control loops. All three react to our stick inputs and the errors created by measurements from our sensors, and all three will help us fly better. If we do not have enough of any of the params the copter will not feel like it’s under control, it will wander about, not resist wind and be hard to fly. Too much of any of the params and the copter will seem to have a mind of its own. It will over-react. At best you will see it oscillate, very fast, not so fast or somewhere in between, depending on which parameter has been overclocked. At worst it will simple flip over on take-off or be very unpredictable in flight.
We need to find a balance. You can tune each param up individually, but one will have an effect on another. Therefore we must tune one, then another, then go back and see if we can retune the first one again, this is the balance.
And this is where we adjust those parameters – Mission planner config page:
Before you start:
So let’s start tuning
Everything you read below will be demonstrated in the tuning video further down, so you know what to look for, and at the bottom is a summary for quick reference. I think, however, it’s important to include as much information here as possible as anyone starting into this hobby will often find this process to be a bit of a black art.
I’ve found the quickest way to tune the arducopter is to start with rate_D, (but you simply can’t do this unless you can hold your beast in hand or in a jig as the copter won’t fly without any rate_P or I) so a more universal way to start, and actually a more informative way is to start with rate_P.
Since this is about learning for everyone, let’s do it that way. I’ll give a brief low-down on the ‘rate_D’ tune (or Dave C tune, as it’s become known) ‘ later. (BTW, that’s very flattering but I’m only relaying info from the real experts, but hey, if I’m gonna be famous, why not for doing something I love :)) Anyway....
STEP ONE - Tuning rate_P
STEP TWO – Tuning rate_D
NOTE: once you have found your rate_D you can try something interesting - you will have to hold onto your bird for this obviously. Set rate_P to zero, then crank up your rate_D as you just have. You will discover that these fast oscillations occur at pretty much the same level of rate_D, no matter what you have set rate_P to. This is why I think it’s more than possible to start tuning rate_D then move on to P. But that’s a shortcut, and this is not what this guide is all about.
STEP THREE – Tuning rate_P even more
Congratulations, your copter should be flying better than it ever has done before.
STEP FIVE - HEAD OUTSIDE!!!
For now set Stab_P at 3.0 - 3.5, closer to 3.0 if you have a high power machine, just to get you flying in stab mode. Then spend your time tuning rate_I and stab_P.
If you find your set up immediately too harsh, back off on rate_P and rate_D by 10% each, and try a lower i-term, if it's still too harsh do that again!
All that’s left is to watch the video below so you can see what I’m describing and head outside for fine tuning. Oh, and await part two of the guide and amendments from any discussions raised, then we will have a proper tuning guide that will be integrated into the wiki advanced tuning guide :D
Results for tuning in this video were
Oh and as promised, below is Part One of the Summary Guide. I aim this to be on one sheet of A4 and tell you everything you need know ‘in the field’.
Summary of what you are looking for
Too much rate P will oscillate quickly, and cause to copter to sound angry under stick input, bouncing rather than smoothly following your inputs. It will also shake more at full throttle and under hard turning.
Not enough you will not feel like you have full control. It will feel sloppy and be very easy to over correct with your inputs. It will feel delayed.
Perfect is where it feels locked in, stiff in the air, but not shaky. (although if I’m sport flying I turn it up a bit for maximum ‘wang’ and just tolerate the slight oscillations)
Too much rate_I will oscillate if you get high enough (a much slower oscillation than a rate_P shake). But quite a long while before it oscillates it will have other detrimental effects on flight performance, like a sluggish feeling or a tendancy to flip over on take-off. This is why I suggest tuning this in flight rather than in your hand/jig.
Not enough will cause the copter to get pushed by a constant wind, then it will fight back using just P. It will not hold a very firm angle during forward flight and will need more correction. This will not be as smooth as it could be in either case.
The perfect amount will cause the copter to lean gracefully into a constant wind, but also allow you to set a lean angle and stay there as you fly about. As you dial rate_i in pay close attention to the feel of the copter, you are not looking to create oscillations here at all, you should notice a strange ‘feel’ long before this point.
Too much rate_D will oscillate very fast, you will see a twitch forming then a fast buzzing oscillation
Not enough rate_D will simply mean you can’t dial enough rate_P and so you will suffer the effects of having rate_P too low.
A perfect rate_D will help fight the wind and follow your sticks as its fast to react, but will also allow you to reach a maximum rate_P level for you frame, thus giving better control.
Great info Vince. I like the look of those motors, but have always plumbed for the more mainstream, jsut one less variable to consider...
I can fly happily without rate d, but even a little helps improve accuracy, try 0.0001 and work up. It's worth it :)
I've just gone for more powerful motors and had to tune right down, the results are in the 2.8.1 thread.
Thats awesome stability. Wonder if mine will ever get like that with the big slow props. Perhaps 2.9.....
One unexpected advantage of those motors – our first video today sounds like it was filmed from a Lancaster. Right up to the moment the camera gimbal grabbed too much current and did a brown thing. Had to dig the bits out of the quaggy chicken pen.
Add screw up number...
4. Output pins A10,11 (with JP1 off) are not powered from the output rail but from the very delicate power module. Feck.
Oh and just realised you were offering to write a guide, not requesting it.
Nice one! Be my guest,
I'll paste all my no-no's into it :)
I've been testing soft mounts, and they are generally awful, until you stick about 60g of lead to the bottom of the APM. I'm seeing almost flat raw data from the gyros and acc's. This is a vast improvement.
I'm getting my best results at the moment with the apm suspended using kids swimming earplugs and 60g of lead stuck to the bottom of it. Once I've made it pretty I'll show you what i mean.
As the copter is fairly beat up I think I will try making a H frame with the 2 arms attached with soft mount somethings, as the left/right lift will balance out. The battery is a great source of inertia (like your lead) so will figure out a way to mount it very firmly on the frame, close to the APM. Might work?
Even though I give myself agro, I cant do ‘off the shelf’.
Yay, got chance to go out for a proper fly.
Here are some of the highlights, testing the new code.
Great work mate. Good to see you had the chance to go have some fun even though it looks rather cold out there. Love your work, keep it up
I'm sure you get a million questions like this and for this one I apologise in advance if I've neglected something.
I'm "having a spot of bother" trying too get my arducopter'd FW450 to fly.
Using the default setting I had the flip on take off thing happen,
I did the motor tests and all checked out fine,
Tried hand holding and all "seemed" ok but it still went mental on take off.
I'm using 11x5.5 props so tried reducing the Rate P.
I put the quad in a rig to test and basically what ever I do with rate and stabilisation PID's when I throttle up with no pitch/roll inputs the quad builds into a slow run away oscillation, Higher P gains make it happen more quickly/violently, Low P gains means it happens more slowly but it matters not what I try, it always happens.
It oscillates maybe 4 or 5 times until it flips over.
It happens in stabilise or acro mode.
I've looked at the sensor outputs and they are all what "I'd" expect, channel inputs stationary until I move sticks/switches, quad sensors stationary until I move the quad.
Using your guide I tried in rate mode only with I and D set at zero and upped P from there, as explained above, lower P values meant it happened more slowly but it still ends the same way, flipped quad.
Im using the latest AMP with FW 2.8.1 and have checked x/+ and APM orientation too.
Anyone have an idea where I should look next?
Thank you all in advance.
Dode has it flown before ok? Do you have a photos of your setup? Also did you take it out of Acro and try it?
No it's not flown OK before, it's a new build and my first Arducopter.I've tried it in both acro and stabilise, Most of the work I've done has been in acro but the problem first surfaced in stabilse mode and I did a bit of P reduction in that mode too.
If you need any more pics or vids, just let me know.
Though it's my first ardu I do have a couple of working KK based tricopters that I managed to tune ok.
It almost feels like it's reaction time is too slow and it overcompensates on each correction until it oscillates so bad it flips.
Motors are HK Turnigy 2217 20t 860kv
ESC's are Turnigy Plush 40a V3.1
Props are APC 11x5.5
Thanks in advance.
Hi, I'm presuming this whole osciallate/flip thing happens almost immediately.
Are you sure you have everything hooked up ok? If you hold it in your hand with a bit of throttle and dip the nose down, do the front two motors speed up? And vice versa, and left to right?
If you push left on the airelon does the quad lean left etc?
You have props and APM all set up for Red arms being front.
Is front right esc attached to M1, back left to M2, front left M3, back right M4?
Have you ensured you have set it to x mode in MP not + mode?
A video would be useful and the logs of the flight (from terminal window/log download)