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

  • Yesterday I downloaded 2.2B6 and installed it to the copter.

    Using Mission Planner version 1.1.31 I generated a tlog file attatched.

    It flew very well. The Auto mode works terrific using the ch 7 waypoint.

    During selection of the waypoints you will see it go from alt hold to loiter then ch 7 was flipped.

    This occurs at three points. Auto is engaged and it duplicates and lands perfectly and auto disarms.

    There was a little overshoot on the second waypoint making it look like a arc.

    With a little more tuning it should be able to repeat better.

    I will try 2.3 on another date.

    Thanks for the team effort :-)

     

     

     

    2012-02-02 01-53-23.tlog

  • Developer

    ArduCopter 2.3 Final release in the planner:

    Hoping that everyone can benefit improvements in this release we announce that version 2.3 Final is available on the planner, and was opened by Chris a dedicated thread.
    Let's stop posting here, thanks!

    Bests, Marco

  • Developer

    Fixed now (I think and hope), ready to fly (without baro, but is irrilevant), I want to try it out, look out the window... snow, and will be for a week... well, good timing! :P

    3692346629?profile=original

  • Developer

    Tuning params for B6 (with PIDT1 implementation):

    Excellent guide by Igor to set the best parameters of the stabilization/rate with B6 (soon to be inserted into the Wiki, when the B6 will be made official)... happy tuning!

    -----------------------------------------------------------------------------------------------------------------------------
    You can disable the D and T1 by setting all RATE_XXX_D to zero. That
    means you have the same as bevore.

    So try to set STAB RATE_XXX_P to a value a little lower than you normally
    fly. For example "3.0" if you fly with "4.5". This makes the copter rotate slower to new
    attitude setpoints.

    Set the RATE_XXX_I to zero. Set the STAB_D to zero.

    Use your previous values for RATE_XXX_P and RATE_XXX_I and RATE_XXX_IMAX.
    RATE_I_MAX should not be zero, use 20 or somewhat.
    RATE_XXX_I should be around 10...40 percent of RATE_XXX_P.
    With this settings it should not oscillate!

    Start using a RATE_XXX_D of 0.004 (or even smaaler).

    Try hovering carefully. Try some attitude changes carefully. If you dont
    see any oscillations increase RATE_XXX_D carefully.
    ( I fly with a RATE_XXX_D of 0.012 )

    Repeat increasing until you see some oscillations. Now you know the
    value where it gets unstable. Decrease to a safe value.
    After tuning the RATE parameters you can increase STAB_XXX_P to get faster reactions. I use a STAB_XXX_P of 9.

    I would never try to fly a copter that I had not in my hand, feeling the
    stability. I agree you cant hold any copter in your hand and turn it
    around to test all controll parameters one after another, but you can
    still lift a heavy 5 kg hexa with one hand over your head (or give it to
    someone to hold it up with both hands) and try a little bit if it feels
    stable or if it overshots or oscillates bevore flying it.

    Another method is to build a mounting where you can put the copter that
    it can rotate around one axis. Now you can tune without crashing.

    In all cases, the copter should do three things right:

    1) Change to new attitude setpoints fast and without overshot or
    oscillation.

    2) Change back to original attitude after disturbance ("hit" the copter
    gently)

    3) Compensate for a little extra weight on one arm.

    Regards, Igo
    -----------------------------------------------------------------------------------------------------------------------------

    Bests, Marco

  • 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

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

  • 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

  • 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

Jose Araujo liked Jose Araujo's profile
Aug 29
spencer harvey liked spencer harvey's profile
Jul 9
More…