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

  • This is from 2.1.1r8, but I'm hoping to get some guru eyes on it.

    Can anybody tell me why around line 16,000, I believe that's when I switched to Loiter, and it gained a bunch of altitude.  I thought it was just my incomplete Alt_Hold tuning.  But when I looked at the logs, it seems like Next_WP_Alt was winding up.  I don't think I set the throttle high to command this.  What's that about?

    Actually, looking at it more, the Next_WP_Alt seemed to be following the baro altitude, not leading it?  Is there some function in the Loiter which resets the target altitude if it climb too much?

    2012-01-15 04-44 7.log

  • Hi All,

    can you please tell me why FRAME_CONFIG and FRAME_ORIENTATION defines are commended out in the 2.2b2 version?

    I'm going to try it on a tri-copter and was wondering if there's anything else in the code (in addition to these two) that should be uncommented before trying?

    Thanks!

  • Developer

    2.2b2 flight:

    I flew my large octo today in Wisconsin. It was around 20 degrees Fahrenheit with 15mph winds. I had lowered my rate p values before this flight to see if I could calm the octo down a bit, but I found that I lacked adequate control of the copter. The octo seemed to be very "squirrely" in the winds which is something that I had not experienced before in stabilized mode. Also, I am seeing the same issue as the previous release where if I apply pitch, the copter evens out over time (not that long maybe 3-5 seconds) and then I have to slowly reset the stick to center to be able to apply pitch again.

    I must have been drawing a lot more current this time around because I blew my sparkfun voltage/current monitor mid flight and the copter dropped out of the sky like a rock. Luckily I was only about 7 ft off the ground over snow and my landing gear is designed to absorb impact. After the crash I tried to fly again, but this time the copter was almost totally unresponsive to my very drastic stick inputs. I think that could have been either my low rate values or the crash did something to the IMU. Perhaps the cold weather was throwing things off... I'm not really sure.

    I reset everything on the board for another flight ASAP. Logs attached.

    2012-01-15 03-55 11.log

    2012-01-15 03-55 12.log

    2012-01-15 03-57 13.log

  • Flew with v2.2b2.  Simple mode seems to work better now due to the fix.  Didn't get much chance to test anything else due to my flying location.

    However, I have found that since v2.2b and v2.2b2, my APM is no longer recording logs.  Even after I try to enable them in CLI, it will not record anything.  Has anyone else experienced this?  I did not have this problem with previous versions.

  • LOITER in 2.2.b: improvement studies

    I wanted to try a powerfull loiter code since I think we still have place for improvement in actual one.

    Here you can find all the information and a promissing solution, including the code and explanations

    Please Marco, JLN, Jason (and anyone that want to brake a bit their brain) perform the usual tests and comments.

    Best

    Angel

  • Its not possible to get Aerosim working.....seems my APM is dead....any tries...and dont work. i CANT get the rc signals in aerosim. i see the radios in the MP, on the configuration, can fly in reallife with it. seems to work. but after starting simulation i see wierd signals....

    and so on, my aerosim cant get the right things.

    whats up with this thingy????

  • Observations on flying 2.2b2, stock 3DR, APM 1 board.

    I had a lot of flights this morning trying to get a smooth loiter. At times it feels like juggling eggs, and I am no juggler. As I want to end up doing airborne video, I am more interested in smoothness and stability rather than absolute precision. Typically I will be 30-50m up and am not worried about small spaces so I am unlikely to hit anything if the quad wanders a bit. I therefore do not mind if the quad is blown back 10m or so when Loiter is selected so long as it settles down into a relatively smooth flight. In low wind conditions (at ground level at least) I got pretty close to what I was looking for. I am sure there is tons of room for improvement, and I dread to think how it will behave when the winds get up again, but I offer my PIDs up as usual to those who might be struggling with similar kit. The curious thing to me is that my Loiter PIDs are an order of magnitude less than the "standard" firmware upload values. Is that going to bite me at some point? Can anybody explain the disparity?

    3DR APM 1 board FW 2.2b2 BJ PIDs 20120115.jpg

    https://storage.ning.com/topology/rest/1.0/file/get/3692336004?profile=original
  • Having issues uploading the v2.2b.  I get this error when trying to upload. I followed instructions per the wiki and am using the relaxpatch:

    3692335900?profile=originalApologize if this has been covered before, but i haven't seen any mention of this error. Thanks

  • Developer

    News for AeroSim and  APMPlanner V1.1.21, there's new plugin called "quad", Michael can you explain the difference/features of this new plugin?
    Cool thanks!

  • CRASH!

    Stock 3DR, APM 1 board, F/W 2.2b2.

    Was having a pretty good loiter at about 50m altitude, light winds on ground, quad definitely working harder higher up, when it suddenly started descending and heading off at high speed. Flicked to Stabilise to try and regain control, but it kept on going, When it disappeared out of sight behind a large hedge, but quite low, I reduced throttle. 2 props and motors wrecked, managed to replace those and graunch the frame back into shape and flew ok later. Have replayed the log in Mission Planner, but I really don't know what to look for so do not understand what went wrong. Would be most grateful if somebody could review the attached log. Thanks, Bill

    2012-01-15 06-21 40.log

    2012-01-15 06-21 40.kmz

    2012-01-15 06-21 40.log.gpx

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…