Jason is travelling this week, so I'll take the helm for the next software release post. 

UPDATE: the motor remapping thing was confusing everyone, so we took that out and returned to the regular motor mapping. That means that APM 2 users with Hexas and Octos should wait for the next version. APM 1 users should be fine with any frame.  

NOTE: Hexa and Octo users: there have been motor mapping changes that may affect you. Please don't upgrade until we can update the documentation to reflect the changes. This should happen by the end of the day today (Feb 1).

ArduCopter 2.3 is now available in the Mission Planner.  This is the next revision of the ArduCopter 2.2B6 code, which is perhaps the most tested code we've ever released (1288 comments in the thread!)  and certainly in my experience the best code, too. 

The default PIDs are optimized for a 3DR/Jdrones quad with 850 motors and 10" props. If you're using more powerful motors/props, start by turning down Rate Roll P (default is 0.14, so start by turning it down to 0.1. In general tune PIDs in 25% steps).

Now that we've got solid code out there, we can turn to collecting suggested gains for standard frames, and a better guide to how to tune PIDs for your unique setups. 

Here are Jason's note on the latest changes (mostly from 2.2B6)

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.

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.

Note the Mission Planner does not yet highlight these D terms on the main tuning page (it will soon), but you can find them and modify them on in the Parameters list.

Autolanding should now work well (see video above) and the Tri servo issue is now resolved. 

The code should now compile with Arduino 1.0 (thank, Randy!), but remember that you need to use the "relaxpatch" version of Arduino in our downloads section

[Update: we've reverted the below. See update at the top of the post]

Important for Octo users:


We've changed some of the motor orders for some more exotic airframes. We'll be updating the docs on the Wiki in a day or two to reflect this. Pat Hickey explains:

As before, the hexa plus APM2 motor setup has changed from the ordering [1, 2, 3, 4, 5, 6] to [ 5, 6, 1, 2, 3, 4 ].

The Octa V layout for APM2 is:
6            4
  2        5
    8    1
      3 7
Motors 1 through 4 spin clockwise, and 5 through 8 spin counterclockwise.
Support for roll/tilt camera control on APM 2 should be coming in the next version. Traditional Heli will also be updating to this latest code as well once we track down a memory issue. 
As always, you can see a complete list of changes in the changelogs.

Views: 54194

Reply to This

Replies to This Discussion

 checked the instruction leaflet of ESC 20A and 30A JDrone with that of Gustav and the signs are identical

Thanks for all the help, it worked and does fly great (in my understanding as a newbie). Was just outside for one battery, then it became too cold. Looking forward for better weather.

ArduCopter V2.3 - Stressing the Loiter with high Stab/Rate PID (AeroSim):


Hi all! I made this video to show you how the software reacts to keep the quad in Loiter, just see the right stick on the "stick monitor" at the bottom of the screen (Mode 2).
The
wobbles you see are normal
, to
do this I have exasperated some parameters so that you can see in the "stick monitor" what are the corrections that are given to keep the quad position, of course you see the bounces are due to very high parameters, amplifying the effect is very able to identify what the software does.
Do not look at the windsock, in playback is always in the same position (AeroSim bug) even if you change the wind.
This video shows how the Stab/Rate parameters affect with Loiter, then we can expect a good result just thinking of finding a fair value "Loiter / Nav P", but also to have well set on the quad all the section Stab/Rate P/I/D... certainly, these greatly influence the accuracy of Loiter.

One thing I
noticed is that corrections of the software are given in a rather not proportional, fairly dry, sounds bad (imho).
In theory to give a correct command should give for example such a "+10" of correction (stop the wrong drift) followed soon after by a "+5" command maintained for a while (drift to center) and the "0", this would help to quickly stop the quad and give it a softer shift, I hope that Jason has implemented in this way.
I start the video with Loiter in "zero wind", at 00:24 i switch to "strong wind" (when you see the quad that gets up), and at 1:02 again "zero wind" (the quad loses altitude).
.. always remains no more than 1.5 meters in radius, good result and no circle, considering the whereas variations of wind snapshots are not easy to manage for the quad (yes, the simulator can be done, in reality I do not think, LOL).
Another important note, as I always say, Loiter on the simulator is more precise with a lot of wind.
Consider also that the gps of the sim is absolutely perfect, as our beloved Mediatek sometime makes some sxxt...

Bests, Marco




Hi Marco, Thanks for the video. What were the values used for NAV_P/I and LOITER_P? Not sure if you had a chance to see the results of my tests today(posted on the previous page) but I had to lower the values quite a bit to get something that looked like a loiter, but still a lot of drifiting...in Stab, the copter flies quite well(no wobbles) but drifts a bit(I think level issue with the frame) but in general stays in one place with a slight drift to one direction. Do you think the drift is the reason I see considerable drift in loiter mode?

 

 

 

Hi,

     i have changed #define AUTO_THROTTLE_HOLD from 1 to 0 compiled and download.

But TRIM_THROTTLE is still changing after each flight.

Cant get Altitude hold to work. Switch to altitude hold and copter start to climb slowly without control.

When I connnect again I find a TRIM_THROTTLE parameter higher than hover point....

Any suggestions?

ArduCopter V2.3 - Stressing the Loiter with high Stab/Rate PID ( in a Freezing gusty field :D)


Brrrr!  No video today as my hands went blue and it started to snow before I got the chance.

However I did manage three batteries :)

This outing was to see if my fiddling with high stab/rate PID has improved or ruined the ability to loiter.

I was hoping to try and tune too but got snowed off. Therefore all my loiter and nav params were at the defaults throughout, I will go straight to tuning next outing – and set the camera up straight away ;)

It was freezing! I left the quad outside for 30mins before I set off to make sure it was ready for the biting cold. Winds were light but gusty, from 5 to 15km/h, measured with a cheapo anometer.

I did the tests the wrong way round really PID tuned first, then defaults later. So I’ll give you my results in reverse order.

 

Normal stock tuning (defaults, other than rate and stab p’s slightly reduced for my frame).

Stab mode – very smooth indeed as expected. It got pushed about a bit when the wind got up but was very predictable during recovery and held its position very well with little deviation once I’d got it nose down into the wind. It also flew about well too, I can’t wait the get the camera attached! BTW - good props are so much more powerful than flexible cheapos, and slice through things much less readily!

Alt_hold - baro only – and I forgot to put the foam back on – oops! Anyway it was still not too bad at all, total vertical variation of less than 2 meters, smooth at all times, no rising, no falling. I am going to let my 7 year old have a go on this the next time it’s warm and calm J, buddybox at the ready of course.

Loiter – remember not tuned at all, just defaults. One loiter just wandered off slowly, I think this was related to the fact that my level wasn’t set perfectly, but had a quick fiddle in the van – relevelled and it was greatly improved. When there was light wind the copter would stay within a 4m box, moving gently about without any real problems. There was no circling, no overshoot, no increase in variation from the centre. Just what I consider to be a very good but un-tuned loiter, I’m certain I can tune this to be great. The reactions to wind were quite slow, but again very predictable, first big gust knocked the quad out of the 4m box, but it very delicately dropped one leg and headed slow back into the box, where it remained till I landed a few minutes later. VERY NICE! And this is untuned.

 

PID tuned values (I left everything as high as I can get it without oscillation – the same as last night’s indoor video (rate_D 0.012, rate_P 0.28 (\O/) with rate_I 1.00 and stab_P at 7.5.

Stab_mode – Straight away I realised that my indoor testing of parameters to the limits of sensible was going to give some interesting results in the wind. The great news is that I think, in many ways it’s an improvement. My rate_P was too high, that was obvious, but at 0.28 I’m not surprised. Did that stop me – hell no!

So trying to ignore the ability to viciously change direction with a tiny bit of stick input I plowed on. As I’d suspected and hoped the turned params reacted much faster to pretty much everything. When the wind blew it, rather than drifting away it would tip into the wind and fight back more than stock tuning, it looked a bit more like it was trying to loiter! It was a bit wobbly – too much rate_P, but flew VERY positively. I guess the 0.023 rate_P for me that i tried in the garden would be spot on. As it stands you’d need a good roll/tilt mount for the camera to do good AP as the movements were ‘direct’ to say the least. I’m sure slightly milder tuning would improve this.

Alt_hold – same as above, very good despite winds and an exposed baro, with foam and sonar and fiddling I can see this will be great.

Loiter - again very similar description to above – just supplement following words:

“wandered” turns into “refused outright to wander – fought hard at all costs to track back to position after a gust”,

“gentle” turns into “hardcore, determined and locked in” –still a bit wobbly with my ‘silly’ settings

“quite slow” turns into “Holy S*&T!” – but hey that’s what you get with EXTREME settings!

In wind the box-size was smaller, about 2m this time.  And the quad had a permanent lean into the wind with gently pulsing throttle holding it were it was, it got a couple of surprises with bigger gusts, but would only stray just outside of the box,  tipping up and angrily fighting its way back, quickly!

I think somewhere between these params lies, what will be for my purposes, perfection!

So next time I go out I’m going to down tune the PIDT1 a touch and really try to tune loiter, with both default PID’s and the super-charged ones. I just need one of those Tx handwarmer things. I only managed to do 3 batteries today by warming my hands on the two spent ones in my pockets!

Today I will be building a ‘hat’ for my ardu and some snow skids. I have the pipe lagging already and have worked out that just one length with let the copter float on water too :)

One peculiarity I have noticed whilst swapping params from defaults to PID tuned and back again is the change in what the APM perceives as level. If I in-flight tune the level using tuned PID’s its bang on, then if I swap to defaults the copter want to always lean slightly back and to the right. If i swap params back to PID tuned, it returns to perfectly level. This happens in reverse too, if i auto level in defaults there is a lean forward and left when I swap to PID tuned params. Not really that big an issue but it’s weird and did affect my testing somewhat as I wasn’t able to get a perfect level in the field for the default params. The difference seems to be about 5 trim clicks on both directions on my Futaba T7C tx.

Happy tinkering :)


Hi Dave, so basically with the extreme setting you left all the defaults for the Nav and Loiter parameter, is that correct? I wonder if aI proportionally increase Stab_P and Rate_P(to increase response and reduce vibrations) if my loiter settings would work better for my tiny frame. I love the way my copter responds with my extremely low settings(Stab_P 3.5, Rate_P .06, Stab_D .5) but I'm starting to believe that loiter is not just about the nav and loiter parameters. Any advice will be highly apprecaited because I pretty much hit a brick wall with loiter after today's test(restuls posted on page 27). 

 

Another question on the "level" leaning behavior, I think I'm seeing the exact same thing, so basically you're saying after loading the tuned parameters you had to do the 45sec inflight leveling to get rid of the leaning?

Yes, but only cause i didn't have time to play. I'm getting on it and will put something properly organised up in a few days, rather than spamming this thread ;)

Low settings are great, its so fluid now, but tighter ones also have their use. Its just great to be working with a platform that now does both very well.

Loiter is DEFINITELY affected enormously by your general set up, if your quad is twitchy, it will no doubt twitch in loiter too, no matter what your Loiter and nav settings.

Yes if i auto level in stock settings its a bit out in PID tuned, and vice versa.

I'd elaborate but this is top speed typing, i've got company ;)

Thanks Dave, great explanation and your answers gave me some ideas for tomorrow's tests. Enjoy your company :)

Hey Dave,

you're doing a hell of a  job in your testing and reporting!! well done! 

You could even write a complete "How To" based on your experiences :-)

happy landings,

Dani

Thanks, I'm really enjoying setting this beast up - as you can probably tell. It helps me understand things better if i right them down, I'd started a personal log then thought i might aswell post some of it for you lot to look at :)

Then I thought 'personal log'? Why not blog? Although I've never done one before! I have decided, now that we are going to be settled on 2.3 for a while I should try and summarise my ramblings. A hot-to is in the making. I'll let you know when it's done.

Dave, great work on the tuning! Two things:

1) If you'd like to start a tutorial on the Wiki, please PM me and I can give you write access.

2) I've started a new thread in the discussion forum for people to submit config files for review and inclusion in the wiki. It's here

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service