I just pushed Arducopter 2.2 to the Mission planner. This version went through extensive testing by a brave group of flyers and with both HIL and SIL testing.
See this link for more:
If you run into any problems please let me know here. If you find a reproducible bug, please add it to the issues list.
If you run into Loiter issues, try adjusting LOITER_P. It's 2.0 right now which may or may not be to aggressive for your copter. Nav is no longer used in Loiter control, which should make tuning easier.
If you run into a circling issue, try lowering LOITER_I to 0 and see if it goes away. If not, check your compass declination. A negative error will produce CCW rotations, a positive error CW.
If you have issues with alt hold, try lowering your THROTTLE_P, it may be too high for higher thrust copters.
If you have wobbles and can't seem to get rid of them, there is a new term called STAB_D, which is a derivative term used to tune out the wobbles. You can increase it until they stop, but just like driving a cadillac, you loose some performance and handling. In the CLI "tune 16" in setup will let you control this in flight, and "tune" in test menu will let you see the value printed out interactively before flight. See the wiki for more detail.
Many testers gave me a thumbs up on the code, so if you have an issues please post the flash log from the copter. The tLog isn't that much help to me for debugging as it doesn't capture the needed values at high enough rates.
(Remember, if you'd rather pull the code from the repository and load it with Arduino, you must use the "relaxpatch" version of Arduino in our downloads section.)
I believe I found the simple mode error. It was a bug that was working OK until Tridge fixed it so it was declared properly. Then the bug became active. I made the Simple mode function internal variables static and this should fix it hopefully.
I updated alt hold to not use dampener for now until we get more testing. Some folks saw a latency induced oscillation which was pumped up by the D term.
I added the automatic throttle cruise or hold value as a compile time option for testers. This basically looks at your throttle and climb rate while in stabilize or acro and determines your optimal hover value. This means you can enter any autopilot mode and not have to worry about your throttle position. It should make alt hold more reliable if it works. This is off by default until we get good field tests back.
Update pushed to GIT.
Just some refinements. I added JLN's throttle curve mod for landing. Hopefully that's correctly implemented.
Made the landing delay from RTL user settable
removed the ADC gyro filter, I was doing a lot of testing and determined it wasn't worth it.
Enabled the auto-throttle control by default. Please test in the sim
Altitude no longer resets when flying in Loiter mode
Pitch and roll dampening is smoother now. try values up to .08 for very dampened flight.
Mavlink can now trigger auto-land
I'll push a hex when I hear some good news from HIL testers.
OK, 2.2b6 is on GIT. The Mission planner is going to be out of sync until the release code. until then you can use the APM_Config.h or the parameters list in the Mission planner.
STAB_D : This is the gyro accretion dampener. This can remove small wobbles during sharp changes in angle commands. Making this too high can have a negative effect in performance and add a memory effect that can cause temporary loss in control. The in flight tuning is ranged so you are just below that effect.
If you haven't noticed before the control loops are in two stages. The first is a PI stage that converts some sort of position or angle error into a desired rate. These generally do not need to be tuned. They are more of a user preference on how fast you want the copter to perform a motion.
The second stage is the actual PID loop that needs to be tuned for the copter. This converts the desired rate into a motor command of some sort. I added a D term based on Igor's recommendation to the PI's for each rate controller. These should show up soon in the mission planner for the release. I cannot give you a concrete answer for how to tune the D terms, because they each depend on their function such as alt hold or loiter, etc.
Still, the absolute most important term is always the Rate_P term for each loop. Start tuning here.
The default PIDs are in the what flies great for a stock jDrones/3DR Quad with the purple motors in X mode.
I'm in Lincolnshire, maybe we should have a UK ardupilot multirotor meet ;)
Check this out Bill: http://www.diy.com/nav/fix/plumbing/washers-tap-replacements/ring_p...
2.2.b6 pid tune guide: based on Igor´s guides
Igor has done two PID tunning guide: one in this blog post (PIDT1) and the other presented in this discussion by Marco.
I personally prefer the first one (applied to 2.2.b6) since it takes more advantage of the new PID stability code (mainly the D-terms) and for me gives a more solid flight (really close to the very good "ArduCopter_2.2ß2XP2_PIDT1" )
Below is a step-by-step guide base on that. Keep the copter with a hand while tunning. This worked great for me
Hope this help you all
Bill, tuning the loiter is is very complicated because the GPS errors are added to an incorrect tuning of the parameters and the result is always bad, circles or excessive drift.
There are no based rules on which, unfortunately you have only to try and find a good compromise, depending on your configuration because everything can affect the stability of the loiter, propellers, engines, the weight of the quad, too many factors come into play.
I read that you want precision and less reactions, try to lower Stab_P and Rate_P, and put Rate_I to 0,02, not to zero.
You will notice that the real problem with the loiter is when there's no wind, because excessive corrections from all sides will cause excessive drift... yes, is stranger but it is.
With some wind the quad tends to return to the original point and not exceed almost never.
Unfortunately the quad should have some parameters that automatically vary depending on wind conditions, impossible for now.
Ehm, step 10, "0.15" is not the 50% of "0.5", LOL! :-)
Joking aside, I use the same method but maybe perhaps the finest:
1 - oscillation
0,5 - no oscillation
0,9 - oscillation
0,8 - no oscillation
0,7 - no oscillation <- correct value
I could not have said it better myself. Thanks a million that's just the guide we need.
This setup - almost exactly - has given me an amazingly stable and responsive quad, we are talking stab mode here of course, I'm still to get to the field to see how this setup affects nav and loiter, i get the impression its going to be all good.
I would only add that if you like this setup but want to adjust it to behave like something out of skylab then use the above params but take your stab_p as high as you can go - I'm at 9 currently. It seems these loops and take a bit of a beating :)
Anyway, here's very similar to the above - but with stab_p at 9
Initial wobbles expected - to be fixed. Then hand test - very locked in, really fighting against me with no oscillation. Then quick flight test where i jab the controls as roughly as i dare in such a small space. The quad shoots back to perfectly level everytime, no oscillations
Still minor tuning to be done but below are my params for this test
Stab_d = 0
Love it! :-)
Awesome, stable and responsive... would say that we are! But this is "2.2b PIDT1"...?
When it stops snowing here, damn?! :-/
Oh, this was anything but levelled, my floor is all over the place. Once i auto level it i think stab is going to feel like loiter indoors :)
This is not an "exact" science, but something like a mix or "artisan" and personal taste. In step 9 the 50% of 0.5 (0.25) works fine in my hand, but I pefer to be a bit more conservative since if feels allready "rock-solid" in the hand. We´ll see later after some flights.
I´m just flown that pid´s indoor and really feels like old famous "2.2.b2...PIDTI" code very sensitive and precise: wonderfull!. Tomorrow I´ll test outdoor and If all the rest of modes goes as expected, we could see the light at the end of the tunnel.
Ok, i waiting for video! :-) Good luck bro!
Timing is good indeed,snow wil prevent disaster crash.... ;-)
Marco, thanks for that. I was flying b6 in no/very low winds which could explain why I was finding it so difficult to make rhyme or reason for some of the behaviours I was seeing, and why I was finding it difficult to replicate performance when backtracking steps. I will use yours and Igor's guides and the advice above when I get to fly again. Cheers, Bill