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.
Thanks for the reply,
Yup, starts building up from the point the throttle is advanced.
It does seem to resist in the right directions as best I can tell, I wasn't prepared to give it too much throttle since I sliced through my trousers testing my tri!
I initially had the yaw and Ail reversed but discovered that early on and corrected them.
Red arms front and AMP arrow facing between 'em
Defo in X mode.
The the thing you've mentioned that I'm pondering is the motor connections.
I'll double check them and report, I thought though if I'd got them wrong the motor test would not go round in order clockwise, which it does and the motor directions are correct too.
Will check now.
I'll try and get some video and post the logs.
Thanks for the input.
Another daft qtn,
I went to the terminal screen and hit the Download all logs button,
It took a while and ended up with a small page of output (which I suspect is only a fraction of the info required)
What would I do from there?
Just a guess, but you did set the configuration in the Mission Planner to "X"? If this is wrong a flip is guaranteed.
Defo set to X,
Must have checked this one 5 or 6 times.
X is the default, I've never needed to change it, it's always been set correctly.
Might be getting somewhere,
I just got myself a lappy for field use GCS etc and video recording. I did a fresh install of 7 64 with no AV firewall.
During the setup of my quad I used my desktop and after initial install of the AMP the program tried to update but failed with my AV (Bullguard) reporting a nasty in the exe file.
I contacted Bullguard and eventually just disabled the av completely whilst I did the upgrade.
All good to here,
However, I noticed the calibration of accels button and of course pressed it, nothing appeared to happen but after a while the button seemed to re-focus, so I presumed it was "done"
It's only after installing the AMP on the lappy and trying the accels calibration feature again and being asked to manipulate the quad that I realise that the calibration of accels has not been done on my desktop and presume that's why it behaving very strangely.
I'm gonna look up how to erase the APM (unless someone here is happy to elaborate) re-load the defaults and redo the whole setup on the laptop and try again and let y'all know how I get on.
There were a few other buttons in the AMP which didn't really behave the way I'd expected so I'll try those again too.
Just noticed V2.9 FW is available in the AMP too.
How accurate with the right side/left side/on it's back thing do I need to be?
Just eyeballing near 90 deg ok?
Thanks again all.
Just to let you all know,
I transferred all configuration to the laptop,
Erased the EEprom and reset the APM.
Installed V2.9 FW
Ran through the settings from top to bottom including the accels
Set the Stabilise P to .110 (for medium sized motor) and hey presto, can get it to hover in one place without it having a fit.
I also tried setting Stab P to the default .145 and that seemed ok too, I suppose anything would after the banshee it was previously!
Probably like eveywhere at the minute, there's 4" snow on the ground so if the wind drops tomorrow I might stick some floats on it and give it a test fly for real!
Thank you all for your help and I'll try and let you all know how it all works out!
On to the next bit now, setting up the 3DR telemetry and building the TBS discovery!
By the way, stab_P IS stabilise P. Make sure you are not too low on stab_P!!
just a stab in the dark. I see your using 11" props. I also have the F450 as my crash pilot test rig and I found if I put props on it larger than 10" it does many weird things. I suspect the barometer is getting affected by prop wash pressure zones with larger props. Soon as I fitted 10" props to it the thing flew beautifully. Do you have a cover fror the top? If you do also make sure it has lots of vent holes. (see blog on this issue http://diydrones.com/forum/topics/barometer-issues-and-pid-tuning )
Another thing and not likely the cause , but I see you have your rx mounted directly over one of the ESCs. Id move that so its a bit away from the ECS in case it give some interference.
I also suggest you reload the default settings and then just lower rate P to around 0.140 to 0.150 Rather than start off at the default P level. (from memory default rate P is 0.175 I think?) On my F450 the default was badly oscillating and very twitchy. Soon as I set it to 0.150 it was good for my tuning starting point
do you mean Rate P or Stab P? So default on Rate P is now 0.145 and seems now to be lowered. I was sure ti was 0.175 before and which gave my F450 a lot of grief. Ill load 2.9 and see how it looks.
Quick question. I've been increasing my numbers conservatively. I'm up to the following
I'm seeing 2 defects that I'm trying to tune out.
When I let go of the sticks to to allow it to level itself (in STAB) it returns to level in steps or in other words, one big swing a stop and little swing to complete the return to level. This wasn't an overshoot - it was more of an "hey I'm level - wait no I'm not!" like it stopped short then realized it had a little further to go.
The other defect is a little more worrisome. When I get moving in fast forward flight, I move into a steep turn and it starts to do the toilet boil dance - slow wobbly oscillations on the turn. It comes completely out of track and the only way I can recover is to just let go of the sticks. I don't see this behavior with lower I and I ran out of batteries before I could start increasing other params.
Any ideas/suggestions on what to tweak?
ps - made the .950 vs .095 mistake on Rate_P again...flipsville :D - caught it in time to recover but whoah.