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

  • Developer

    Hello to All,
    I have done successful tests flights in windy (21 Km/h) and gusty conditions with my new Quadcopter (X frame) with an ArduPilot MEGA v2 on board and the firmware ArduCopter v2.2b2xp3 (+JLN mod).

    I have tested successfully: the STABILIZE, ALT_HOLD, LOITER and AUTO-LAND modes.

    Unfortunatelly, I have shorted the tests due to the rain and the storm rising... The flight is very stable and secure and I really enjoy to fly with this new quad frame piloted by this version of the ArduCopter v2.2b2xp3...

     

    Regards,
    Jean-Louis

  • I have updated my APM1 board  from 2.2b2  to  2.2b4 , the battery monitor become no longer  functional(It always displays 0 v , no matter what I type in battery monitor  set up field )

  • Developer

    News from the airfield: Loiter with ß4 is good, autoland work after 3 or 4 jump, but the ale/ele/yaw control in Stabilize is not good (if you really fly, not just hover, rtl, auto, etc.), there is always the feeling that the quad does not take the command that I give him.
    Loiter and control wih "PID1T" is much better, autolanding work fine at the first attempt but do not try to autotrim the quad, next i explain why... :-)

  • It's my log by code 2.2 b4. but I have some oscillate overshoot go down altitude hold. I will tuning ALT Hold.

    2555-01-23 06-31 1.log

    2555-01-23 06-31 1.kmz

  • Developer

    Led pattern by u4eake and AC 2.2ß4:


    For users
    like me use "led management" by u4eake with AC2.2ß4 you must modify a string in the file "UserCode.pde", replace "battery_voltage" with "battery_voltage1".
    This change is necessary because the battery volt and current management has been standardized with APM2.
    Now you can check only the total battery voltage of your lipo, and as I did turn on automatically RTL/Autolanding when lipo are almost dryif you set the control well you can land automatically with the desired residual voltage (in my fine tuned setup is 3.75V for cell).
    With this system activated, combined with the rx builtin failsafe and failsafe inside the ppm encoder your quad can land automatic if there are problems with tx/rx or low lipo voltage ... enjoy with AC! :-)
  • Developer

    Video about Loiter and Autolanding comparation (AC V2.x and AeroSim):

    Hi Jason! Thank you for improvement about ß4, i'm happy if you archive good results in real flight!
    In this video you can see the difference about Loiter and Autolanding in different release, with AeroSim of course, all recorded in "light breeze" wind with good pid tuning.
    Introducing the changes "PIDT1" by Igor Van Airde in the release "AC 2.2ß2XP2" by Jean-Louis show a perfect Loiter, the best for me, absolutely, the current management of "D term" (Loiter_D and Stab_D) not even remotely resembles.
    About autolanding the version by Jean-Louis Naudin is perfect, already tested several times in the reality of him and Rui.
    Unfortunately I saw that his changes were not fully reported in the current ß4, and the result is in the video and in the reality speak for themselves, i tested yestarday autolanding with ß4 and it doesn't work (only bounce), you can see the strange management of "throttle stick" in your ß4, after the ground touch slow down and then up... why?
    I ask as a developer/tester has to be taken into account the changes that produce good results, i mean "PIDT1" by Igor and "Autolanding XP2" by Jean-Louis, but without customize them, if they are already excellent understand why not "copy and paste" in the code... :-)
    Personal solutions are not always the best, in a concept of "public development" we always keep in mind the good things produced by others (i think).
    Of course, in reality they can give different results, but anyway why not try?
    "In this puzzle you have to take the pieces that fit"... (IMHO) :P

    I am certain that AeroSim can not reflect the real flight, but are willing to do exactly the same tests with my quad at the airfield today, and the first tests will focus on "AC 2.2ß2XP2-PIDT1"... stay tuned!

    Bests

    Marco



  • @Jason

    dont want to be a pain but my Alt Hold varies after entering alt_hold mode without any user input....

    3692340333?profile=originalHow do I reset the compleate board after uploading new version?

    When I upload any version all my parameter are still there. Is this ok, new and a normal?

    Pablo

  • Moderator

    How to tell what version currently loaded on APM?

  • Moderator

    I tried to compile Arducopter 2.2b4 

    I used arduino-0100-relax-windows.zip, arducopter2.2b4 (few hours old) code. 

    I get a series of compilation errors as below. Am I missing something obvious?

    thanks, 

    japi

    ---- ERRORS --- 

    In file included from C:\Work\arducopter\Arduino\libraries\FastSerial/BetterStream.h:16,
    from C:\Work\arducopter\Arduino\libraries\FastSerial/FastSerial.h:56,
    from ArduCopter.cpp:52:
    C:\Work\arducopter\Arduino\libraries\FastSerial/../AP_Common/AP_Common.h:19:20: error: wiring.h: No such file or directory
    In file included from ArduCopter.cpp:57:
    C:\Work\arducopter\Arduino\libraries\I2C/I2C.h:34:22: error: WProgram.h: No such file or directory
    In file included from ArduCopter.cpp:52:
    C:\Work\arducopter\Arduino\libraries\FastSerial/FastSerial.h:119: error: conflicting return type specified for 'virtual void FastSerial::write(uint8_t)'
    C:\Work\arducopter\arduino-0100-relax\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'
    In file included from ArduCopter.cpp:57:
    C:\Work\arducopter\Arduino\libraries\I2C/I2C.h:70: error: 'boolean' has not been declared
    C:\Work\arducopter\Arduino\libraries\I2C/I2C.h:71: error: 'boolean' has not been declared
    C:\Work\arducopter\Arduino\libraries\I2C/I2C.h:101: error: 'boolean' has not been declared

  • What's code 2.2 b4 can real flight test? or can simulation test only?

This reply was deleted.

Activity