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

  • Hey PPL.

    i testet last night some with my apm, the hint with the simulator authorities was the right thing. i see my stickinputs now in Aerosim, but ive another problem: the stick inputs from my rc radio are getting very delayed to the sim. is this normal?

    and how can i fix that? with delay i mean: i move the sticks, and 10 sec later, the virtual copter moves.

  • Phonomena: Erratic yaw


    My 3DR quad has been grounded for some weeks, for no better reasons than me waiting for APM2 and a stable v 2.2 FW release , and some other trivia. So last time flying (weeks ago) the quad behaved decently, no yaw issues.

    Yesterday I loaded the 2.2v2 FW from MP 1.1.21 and went through reset, log deletes, setup procedures. I did not calibrate ESCs again, should not be neccesary, or...?

    When the quad takes off in stable mode it immediately starts yawing to the right. I did not use a timer, but I guess like 10 secs to complete a 360 turn. If I compensate left with yaw stick the copter start twitching left in the yaw with some seconds periodicity.

    Stable works ok in roll and tilt. Same yaw behaviour in acro mode.

    This phenomena occurred using the APM1.4 board. I was going to rip it out anyway to be replaced by the APM 2 boards that is waiting in a box to enter service. Hopefully this issue is gone after upgrading to APM2, but I wanted to report the issue anyway, in case somebody experiences a similar problem.

    I attach a log.

    Pack volt and current are not calibrated, fyi. I have noticed my GPS harness is not reliable, it may have taken some spanking in a long ago almost forgotten flag pole mid air collision. GPS was working ok during this flight, so that should not be part of the problem.

    Reading the log file, it appears that there is a periodic yaw input from the receiver. I feel pretty confident this is not the case.

    2012-01-17 02-31 5.log

    yawDiagram.emf

  • Hello again,

    Here's my PID settings for quad (1.6kg - 2218 930kv motors, 3s 5000mah lipo, 12x3.8 sf apc props) and a short film of my flight test today. RTL still doesn't work and I don't know why. It's properlly selected as you can see from the kmz file, and I arm the motors with gps lock, but still it refuses to come home. I have 4m/s nav. Also is the log and kmz files in hope someone has a clue.

    3692337042?profile=original

    2012-01-17 12-13 4.kmz

    2012-01-17 12-13 4.log

  • Developer

    I'm doing some more experiments to Loiter in the next few days. I have it running much nicer in my sim using a combination of the old algorithm and the d term from the new version. The nice thing is the hold is very smooth with little bouncing and the rate controller tames it a little more.

    We'll see!

    Jason

  • Observations from flying 2.2b2 in wind, stock 3DR, APM 1 board.

    From flying over 2 days in light to medium winds, I have to conclude that the good loiters in low/no wind conditions have been flattering to deceive. What I found was that if I kept my low PID settings, the copter just got blown backwards, almost as if it was just in Alt Hold, whereas if you increased P to the point where it stayed somewhere near the origin, then the familiar circling motion started again (and Compass Dec and Loiter I seemed to not affect the circling by the time P was high enough). I naturally put the copter upwind into wind and heading into wind to get it static before selecting Loiter mode. Even if I hold in forward pitch, when I relax it the copter does not maintain that pitch and is blown backwards. As P increases, you can see it attempting to pitch forward to regain the origin, but then it relaxes and you get a kind of pendulum effect, but with P too low, the net result is backwards movement and with P high enough to regain the area of the origin, then a circling movement is introduced to the pendulum motion. Could the pendulum effect be related to the reported problems with pitch easing off in Stabilise?

    I am sorry but I have no evidence to back up the above observations as I forgot to download logs before erasing the EEPROM and uploading 2.0.49 which has been mentioned as a "good loiter" release.

    It certainly worked better for me. The start of each loiter segment was somewhat alarming with the copter again being blown backwards, and initially accompanied by a severe loss of altitude, but a rapid PID tuning session got over the worst of it, and even if the copter was blown backwards a long way, it eventually plodded its way back to the origin and held position quite well, even if not totally smoothly (much more motor pulsing generally).

    I know from the 2.1.1 Alpha discussion, a wind factor was envisaged, and is certainly needed. One suggestion I have is that if the copter is relatively static when Loiter is selected, then its attitude should be maintained as the starting point whereas at the moment the default appears to be go flat, get blown backwards and then have to compensate for being out of position.

    Bill

  • Developer

    Here a video of REAL AUTO LANDING tests flights of my QRO quadcopter with the firmware ArduCopter v2.2 b2xp. I have added some personnal updates for improving the AUTO LANDING feature by using a machine learning algorithm and also trying to avoid the bouncing on the final touchdown by detecting and removing the ground effect.

    The real flight is nearly close to the flights done in HIL simulations with AeroSIM-RC and X-Plane v9.70.

    You will find the firmware ArduCopter v2.2 b2xp with my latest updates that I have tested in this video: HERE.

    Regards, Jean-Louis

  • Are there some new´s about the "loitercircleproblem", did several flights and i have to tune if the wind speed change. But i have still the problem with loiter mode that the copter banks to left, drift a couple of meters and banks back and overshoot.

    Stable ok

    Altitude hold via Sonar ok

    Altitude hold via Baro not ok, have some jumps up and down, followed with going high and than down sometimes with touchdown.

    regards

    Sven

  • I can't load log from on the board by APM Planner.

  • I have this problem when I have the mission planner and see that the altimeter is with this attitude. who can help me thankswilsonjms@gmail.com3690909260?profile=original

  • I tried a last time and got crazy things.

    3692336958?profile=original

This reply was deleted.

Activity

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