Developer

Arducopter 2.2 beta

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:

http://www.diydrones.com/forum/topics/arducopter-2-1-1-alpha

If you run into any problems please let me know here. If you find a reproducible bug, please add it to the issues list.

tuning tips:

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.)

 

Update 2.2b2

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.

Update 2.2b3

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.

Update 2.2b4

Flew today and saw the WP speed governor wasn't quite working right. It was going down to 0 rather than the minimum.
Made internal switch to CM for distance calcs. This should not make any change to gains or MP.
Modified a few default gains for jDrones frame based on AP test flights of this code in some heavy wind on my roof.
Fixed an issue with the landing code not kicking in right away.
Decreased the slowdown near WPs
Added a limit to the amount the pitch compensation can effect the throttle if the throttle input is really high or maximum

 

Update 2.2b6

This is a rollup of all the code that's been flying around for the last week as well as a few bug fixes. I'll be posting it saturday night after reviewing all of my logs.
A dampening term called STAB_D has been refined. A D term for all of the Rate based control loops has been added based on Igor's work. Landing for Baro and Sonar has been refined based on JLN's work. A slightly new approach to Loiter and Navigation is being used to try and linearize the pitch and roll for rate control. It tends to use lower gains, yet has a more assertive response in the air.
I have one small loiter control issue to sort out tonight based on my logs, then I'll post to GIT.
Here is the auto-landing code in action. 

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.

Thanks,

Jason

 

 

 

 

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • regarding tuning, with 2.2b4 tuning worked fine, my poti middle would be around 4 and tune very well from 0 - 7 or whatever it is. now I've loaded 2.2b6 and tuning is different, stil tuning 1, as before, but i get super wobbles with poti in middle, even though cli sais it's 3.6 ish, which flies perfect with tuning disabled ? It seems to be overly sensitive now with the tune 1 enabled ?

    Any ideas ??? Please..

  • Developer

    ArduCopter V2.2b6 - Daily update:

    - Minor changes for PID for jDrones motors due latest changes on control laws
    - Tuning fixes
    - TUNE 20 for tuning "NAV I"
    - Tweaks to Loiter and little change in the default PID

    (Rui, this archive is ok, thanks)

    ArduCopter_V2.2b6_0131.zip

  • WARNING! Be very careful when testing 2.2b6 with an APM2 board.

    Not quite sure what just happened. I spent yesterday flying 2.2b6 on my 3DR with my APM1 board, with mixed results. Some very good loiters, but hard to replicate when tuning individual parameters. I wanted to see if the APM2 board would perform better so swapped it over last night (did change the config for the APM2 board). At the start of the flight, had a go at tuning Rate P, seemed good at a relatively high value. Wanted to tune Loiter P on Ch 6, so set that up, got it into loiter, started pudding bowling. Did not get the chance to tune at all as it was going away from me quite fast. Clicked on Alt Hold with Simple (Super Simple set up), but that did not seem to work, going away from me at a rate of knots. Clicked RTL, kept on going further away, by now so small that could not get any orientation to fly it manually. Had to push it to quite a high altitude so that I did not lose sight of it completely over some trees. Started running over the fields to try to get closer. Sometimes could tell if it was going left or right, so kept it flying in an arc as I ran towards it. Tried RTL again a couple of times, but it kept on descending. Had to climb a fence so put it into RTL for a final time, by the time I had got over the fence it was about to pile in and it was still too far away for me to see clearly what it was doing, so did not manage to prevent a crash. Fortunately it was a muddy field and it was not going too fast, so it looks like the damage is just one prop.

    I don't know if it was something in my slightly randomized configuration, but it makes me nervous that Simple and RTL, the Get Out Of Jail functions, did not work in this case. I attach my log, trace and parameters for anybody who can look at this, but until either my errors or a bug is correctly diagnosed, my advice to anybody flying 2.2b6 on an APM2 is to keep it close enough at all times to be able to fly it safely manually. I know we all should anyway, but it got away from me very quickly, so extra care please folks. Regards, Bill

    2012-01-31 09-37 65.log

    2012-01-31 09-37 65.kmz

    3DR APM2 FW 2.2b6 BJ PIDs 20120131.param

  • Developer

    ArduCopter V2.2b6 - Daily update:

    - Minor changes for PID for jDrones motors due latest changes on control laws
    - Tuning fixes
    - TUNE 20 for tuning "NAV I"
    - Tweaks to Loiter and little change in the default PID

    (downloadable file in a bit)

  • 2.2b6 -Marco's Latest Daily Mod applied :)

    "- Loiter work like the defined function "AUTO_RESET_LOITER" (as if this feature was enabled by default)
    Lowering the throttle_P values by default
    - Limiting alt hold rate error to 1 m/s"


    Results from the field - Standard Ardu, Standard Params (stab_P and rate_P reduced slightly for my frame NO RATE_D applied! Stab_D_1.2 (default)

    Battery One. Stab mode. Carried out in flight levelling. Landed. Took off again... after 30 seconds i had to check my tx to make sure it wasn't in loiter mode! After about a minute i had to put in a small correction, but other than that it stayed where it was. A small puff of wind would make it drift one way slightly but the quad would respond and head back. Then i decided to fly the thing. Very consistent stable flight, good locked-in FFF (maybe needs a touch more yaw_P), excellent return to level and hover on releasing the sticks - it even makes me look like a half decent pilot - which i can assure you i'm not :)

    So, Stab mode - Top notch in these almost windless conditions, more basic tuning of rate and stab_p and testing in the wind and i think I'll be happy. Although yes Marco, the locked-in ness associated with the RATE_D term of PIDT1 is still lacking. Still great though.

    Battery Two. Alt_hold - barometer only - I disabled sonar to keep things simple for now

    As above - after 30 seconds I had to check i wasn't in loiter! Alt_hold very very good on baro only. I set it at 2m, it just stayed there. A bit of wind would cause it to lift slight (about 1m) then it would settle back as it was. So it was flying time. Nearly a full battery at about 5m alt. I pushed it hard. On full pitch or roll (yes full) it would drop to maybe 3m from the 5m alt_hold position, fly through the sky 3m off the ground as far as I dared to go. Releasing the sticks would level the quad which would then gently bob back up to 5m and almost 'loiter' there - Does this mean i can at last let my flightless friends have a go, you betcha :)

    For those of you with alt_hold sinking/rising problems, are you aware that you should be hovering before you start? If not the quad will rise or fall dependant on throttle stick position. There is a bit of code that can be enabled to set your 'known' hover (throttle) position, but for now If i see it falling slighty in alt_hold/ loiter i just up the throttle a notch - voila!

    Battery 3 - Loiter - First attempt. Good position hold in very light winds. Mine was a bit twitchy though - so brought it down and reduced Loiter_P and I a bit - seems better now, i had it in a 2m*2m box for a whole battery, it was still just a bit twitchy - a bit more tuning required but generally looks really good. Bailed on loiter tuning as I was getting cold and was desperate to try my first ever long range RTL \O/.

    Battery 4 - Loiter - RTL Given this is my first proper attempt, please forgive my excitement! I took off with a crushed coke can under one leg. Flew 100m away, went into loiter at about 20m alt. Held my breath and flicked the switch.30 seconds later it was above my head (slight overshoot but corrected within 5m)

    20 seconds after that it landed slightly awkwardly, but only because one of the legs was on the now over turned coke can I'd take off from!! Amazing (for me at least :)). The return home was not perfect, it was a bit 'twitchy' rather than smooth, but the accuracy, descent and disarm were great. I had a bit play with Loiter_p and I and also NAV_p which began to smooth out the twitches but was getting really cold now.

    Batteries 5 & 6 - RTL over and over again :) I flew it high and far away, it came back and landed. I flew it low (2m off the deck) and far away, it came back and landed. I tried yawing it round and round to confuse it whilst in loiter - it just came back and landed. Still requires more tuning on my part (nav_p and loiter P and I i think) but it is doing exactly what its supposed to.

    Only gripe was that on one occasion the landing site seems to reset itself to where I'd put the quad into loiter approx 50m away and 2m off the ground. I'm wondering if the baro had given a reading of 0 at that point and the APM thought this was a new launch - but I'm guessing. I'll have a look later - but i now have hours of logs to check!

    So all in all - very nice indeed. I just need to see if i can tune out the loiter and RTL twitchyness.

    I have just one thing to ask at the moment.

    Despite levelling copter in flight at home when i got to the field is was not level again - Does anyone else find this? Does it always re-level itself each time the battery is changed or it is armed? Anyway, inflight levelling once again sorted me out. It would just be nice if it remember what level is unless i tell it otherwise.

    Anyway all good news here :)

  • In the evening , I test RTL and Auto Landing in B6. when it's landing is hard. Because Round of Motors are premature lower down.

    And I'll tune about ALT Hold is not finish. Because , it have sometime oscillate up and down about 3-4 meters (not lock altitude). About Loiter mode , Roll and Pitch are little swing (not Oscillate) and i will change to stabilize is normal control is non little swing.

    2555-01-30 09-03 2.log

    2555-01-30 09-05 3.log

  • here is a q

    Quad Test Indoors from Motion Pixel on Vimeo.

    uick video with our new SteadiDrone quads we are doing, powered and designed by Jetpax. This is still 2.2b4 but wil test 6 this afternoon hopefully if i get time.

  • Moderator

    Have just flown b6 with the default params, my quad is a X525 frame, KDA20-22L motors, 3 blade 9x5 props, 2 x Turnigy 25A HEXFET ESC's (2 were DOA, hence...), + 2 x Super Simple 25A ESC's. So not a standard setup by any means.

    It flew fine, wobbles on take-off are gone as predicted. It has a softer feel, and the self-stabilization doesn't feel as sharp. Loiter causes a fairly rapid climb repeatedly and as I haven't got a large treeless space in my garden I didn't let it continue.

    Alt hold was started at 2m, first time the quad fell to 0 (ground) very quickly, 2nd time started again at 2m which then slowly drifted to 0 then climbed to 5m before I brought it down again manually.

    I've then upped Rate P to 0.160 and Stabilize P to 4.8 and it feels better (to me), not 100% yet, more like 95% right.

    Not sure what caused it but I got a longer flight too.

    Kudo's to all involved!

  • Now , I have problem about tune ALT_HOLD because sometime have wind. My arducopter have oscillate up and down about 3 meters. I don't fine parameter's ALT_HOLD for stable level. help me please.

  • Developer

    ArduCopter V2.2b6 daily fix:

    - Loiter work like the defined function "AUTO_RESET_LOITER" (as if this feature was enabled by default)
    - Lowering the throttle_P values by default
    - Limiting alt hold rate error to 1 m/s
    - Cosmetic

    Bests

    Marco

    ArduCopter_V2.2b6.zip

This reply was deleted.

Activity