Preferences before autotune with very large 18" props

Hello,
I´d like to update my T960 from 3.3.3 to 3.4 RC5.
In 3.3 Leonhardt recomended to reduce some filters to 10Hz and the aggr. to 0,05.
The result was acceptable, but with very high D values (I thought still to high) and in windy conditions it was not very save to fly.
In the meantime there were some major changes in ESC Firmware (BLHELI14.7 and above) so that I got a much faster response from the motors without desyncs.
Making a new Autotune with 3.3.3 makes not so much sense because 3.4 RC5 seems to be very stable (Testcopter 3DR Y6).
I also saw Marco´s video on 3.4 with the S1000 wich looks very impressive.
So what are the recommendations for large copters?
Pitch/Roll filters?
Autotune aggr.?
Anthing else?
Cheers
Gregor

1 Like

In the meantime I did some Autotune Tests with 3.4 RC7:
I reduced the filters to 10 Hz, but with Atune_Aggr on default I got much to high pid´s.
I go back to aggr of 0,05 and now I think it´s acceptable, but could be better I think.
Is there a guide to setup the filter to other values than 20 or 10 Hz?
It should be prop specific in my thinking.
-13" 20 Hz
-15" 10 Hz
3.4RC7_10Hz_GPS.param (10.2 KB)

Hi Gregmann,
I’ve asked Leonard if he can give you an answer…

Hi Gregmaan,

Looking at your parameters I would suggest that your MOT_THST_EXPO is too high and probably should be more like 0.65 on those props.

It looks like you have already dropped your AGGR to 0.05 and have got better results. Without looking at the Autotune log it is hard for me to say if you have done a good tune or not.

As for setting the filter parameters it is based on a number of issues that come together. The main ones are prop size, motor power and kv, ESC response and breaking, battery voltage and current capability, and finally frame flexibility and noise. The final filter settings is dependent on all these things. But the basic trade off is you are lowering the filter settings to reduce noise and ensure good response of your D term and you increase the filter settings to get response time and bandwidth from your control loops.

The simple rule of thumb I use is the IMU gyro filter should be 2x the D term filter on roll and pitch. The IMU Accel filter should be about 10 Hz generally.

If you show me an autotune log with the changes above then I can take a look at it for you.

5 Likes

As always I will copy paste your posts, Leonard, and save it in safe place!

There are a lot of new things added to control loops, filtering of sensors, expos etc. Would it be possible to write a small wiki or post about what are each of them, when and where to use them and their effect? I am sure the whole community will be super interested.

Thanks for your time!

2 Likes

Hi Leonard -

(1) Just to clarify on your comment about the IMU gyro filter rule of thumb. Looking at the parameters that Gregmaan posted, the gyro filter looks to be set to 20. the d term is .008 on roll and .005 on pitch. so let’s call it .0065 at the mid-point. 2x that value would be 0.013. I assume that’s not what you’d suggest for the gyro filter setting, right? Do you mean to drop the decimal and call it 13, and that’s the gyro filter value?

(2) I too have a large quad, and per your comment on mot_thst_expo, I have actually had that parameter at “0” for a long time (linear output), because at the default setting, I had too many issue with throttle accelerating way too quickly trying to lift off. Hover throttle on mine is 0.27 just like Gregmaan shows in his log. That was several firmware revisions back, so maybe that’s not an issue anymore, but is there a danger in basically disabling mot_thst_expo? So many of the ESCs claim to have linear throttle output now - I’m wondering how important this is. I’m worried about going back to the default settings because of prior issues, but am I in danger by not enabling mot_thst_expo? Performance has overall been very good with that setting at 0.

Thanks!

Hi FreeBirdFlight,

There is a Gyro filter with the name INS_GYRO_FILT and a d term filter with the name something like ATT_PIT_D_FILT. Those are the two variables I was referring to. The filter setting is not dependent on the P, I or D term.

On the Expo thing. The default is 0.65 so I am not sure why yours was 0. The basic rule of thumb I apply in these situations is if it isn’t broken don’t fix it. However, if you are looking for a better tune then that is the first setting I would change but you are looking at a completely new tune.

On the subject of linear ESC’s the way they would be doing this is applying a similar curve (maybe exactly the same curve) to the throttle response. The problem is that unless they have a similar variable they can’t account for the actual throttle curve. I have not seen a linear thrust curve yet so I would be interested in a link to a backed up claim of linear thrust from an ESC if you have one.

1 Like

@Gregmaan

maybe you want to take a look to my adventure with big Y6
http://discuss.ardupilot.org/t/heavy-y6-adventure-thru-3-4-rc-with-autotune/11488?u=emin_bu

Me too was going thru same procedure,not knowing is it BLHeli settings,Pix settings or something else making problem.
I’ve tried many different settings…so,to summarize what i learned…do things in this order…

  1. CHECK YOUR PARAMETERS…
    some translations of PID from previous software version didnt go well in my case

  2. About ESC
    BLHeli should be set very conservative(check my settings and others advice)…
    check multiple times if settings on all is same
    Also for tuning first try if everything works without OneShot or OneShot125 on…
    Do RC calibration before ESC calibration
    Calibrate ESC…be sure you calibrate them properly…musical tones on BLHeli are different…

  3. About AUTOTUNE
    At first i try FILT at 20Hz…honestly i don’t know if i saw the difference at 10Hz latter on…
    Also even Wiki say AT will adjust that parameter,that does not happen…
    On the other hand,i wonder why FILT DID changed in YAW ATune to some different number??
    Aggressiveness i had at 0.9 and now at 0.8…hm…i also got high PIDs as results,but somehow i like higher and than lower it for some 15% and also play with RCFeel…if nothing is shaking why not use higher PIDs?i am still tuning…
    For me it was good idea to make multiple AT of same axes…
    Do one ax at time unless you have big Lipos…it takes time,especially if it’s windy…you will be very sorry to end AT at 85% without seeing results(i didn’t find the way to extract that data from logs without finished it)…also do fresh set of Lipo for every ax,compensation on…
    Also try to do AT with weight you will carry in flights afterwards…use something else for dummy weight instead of gimbal which will shake to much in process…and also be broken if somethings go wrong.

@FreeBirdFlight
i did exactly same thing believing i will observe better what motors and ESC do and how they accelerate/stop
…have to say that brings all kinds of problems as i learned later on bcs. i forgot to change it to default and i could not get proper tune…motors was spinning wird…
here is what Leonard answered;
MOT_THST_EXPO. This is similar to what you are used to seeing with stick expo but designed to linearise the thrust of the esc/motor/prop to the pwm input. The effect of this is the output to the esc’s increase quickly at low ranges and slowly in the high ranges. So on an over powered copter the hover throttle will look very low. This is something you need to set based on thrust measurements but I have found 0.65 is a good number for most copters including all coax setups and 0.75 is good for very large props on quad hex and octo air frames.

There is a Gyro filter with the name INS_GYRO_FILT and a d term filter with the name something like ATT_PIT_D_FILT. Those are the two variables I was referring to. The filter setting is not dependent on the P, I or D term.

Leonard, I couldn’t find ATT_PIT_D_FILT on my machine. + 1 to have something on the wiki to guide us on the finetunning. For sure it would be great!

I can help, if you could write down a few lines summarizing the process.

Reg. expo, I have gotten the value by taking measurements and doing the math using the method stated on the wiki. Ended up getting .68 for 13" props, latest blheli( almost default settings ) and 700KV-3508 motor powered by 4S. Very close to the default. I’ve bring up a suggestion to implement an autotune routine to obtain the expo setting. That is not easy, but it would help a lot of people that doesn’t have an expensive thrust measurement unit.

sorry ATC_RAT_RLL_FILT and ATC_RAT_PIT_FILT

Hi tabascoz,

Sorry my last two messages were quick ones before heading to bed or rushing out the door.

I agree it would be nice to be able to calculate the expo using autotune and I may be able to do some sort of calibration as part of the Alt Hold tuning.

I will have to have a look at the wiki page when I have some time to see what is missed.

Emin_Bu,

I noticed you said “Aggressiveness i had at 0.9 and now at 0.8.” if you are talking about AUTOTUNE_AGGR it has a maximum value of only 0.2 but the lower you can make it and do a successful autotune the better.

You also said you didn’t now how to get the autotune parameters out of the logs. Autotune has very detailed logging and all the data for autotune is saved as it is done. This has made it much easier for me to help users remotely. ATUN (auto tune overview) and ATDE (auto tune details) in the logs show the setting for each individual test. You can see the tune progressing as it goes through each step.

http://ardupilot.org/copter/docs/common-downloading-and-analyzing-data-logs-in-mission-planner.html#manually-review-a-log

1 Like

Emin_Bu - on your comment about dummy weights instead of the live gimbal - I’ve seen this comment elsewhere too - I get that the gimbal repositioning creates some noise for the autotune, but at the end of the day, that’s what will be happening when actually in flight, so wouldn’t you want to capture the feedback forces from the gimbal in the autotune process even if that potentially means lower d term? otherwise when the real-world test happens, there might be too much vibration because now those forces are present, and the vehicle is jittery trying to compensate. just a thought. Leonard - do you have a view on that?

@Leonardthall
You are right…my AUTOTUNE_AGGR is 0.07 and it was at 0.09…in my Mission planner max is 0.1…
About AT data…i know i can somehow extract them if i finished process,but is it possible with process just half done?
Also why AT do not adjust FILT for Roll and Pitch like it do for Yaw?

@FreeBirdFlight
Autotune will push your copter to the edge,and than at the end it will lower that for some 15%…if something is not right there is great chance it will fall…did not happened to me for a long time but still…in your first autotune you do not want to use gimbal with camera(camera can be from 50 to 5000$!)…in your second or third attempt you can try,but difference is if you have empty gimbal,motors won’t balance or with camera when gimbal will be stiff…basicly i agree with you,but not until you are perfectly sure everything else is ok and copter flies well…

Hi Leonardt,
sorry for my late response. The copter is standing at another location …
Attached you will find 2 tunes:

  1. from default pids with my described problems
  2. from the pids of the last tune with Thst_expo reduced to 0,7 and aggr upped to 0,06

Maybe you can give me a hint how to get a better tune?

Many thanks for looking into it!

Hi Emin,
This is because the filter setting on yaw behaves in the same way as the D term on roll and pitch. So Autotune uses the same algorithms to tune the filter on yaw as the D term.

I haven’t worked out how to autotune the filter settings.

2 Likes

Hi Gregmaan,
How did it fly after.
Your earlier logs showed signs of a wobble at 55 Hz but this one it is much smaller.
The tune seems a bit high on rate P and low on Stab P so I am very interested to hear how it is flying.
Do you have ESC breaking tuned on?

@Leonardthall
Can you please check my latest AT and flight afterward…
http://discuss.ardupilot.org/t/heavy-y6-adventure-thru-3-4-rc-with-autotune/11488/68?u=emin_bu

Hi Leonardt, again sorry for the late reply…
The 2. AT flies well but a bit sluggish. The 3. I got much to high PIDs. So I would like to make a few more ATs. I don´t understand why I get so much difference with the same parameters from AT. At the moment it´s much to windy in Germany. Hopefully I will do some more ATs this week.
ESCs: With AC3.3 I had many problems with slow response from motors (5010 motors, 18"), With BLheli 14.7 and above, the startup power parameter regulates the overall response power not only for startup. So I upped this massive (0,5 to 1,25) and found a way to use active braking without desyncs. Maybe I will reduce startup power to 1,0 …
@Emin_Bu
Many thanks for your detailed tips!

1 Like

@Leonardthall
Yesterday I had a chance to do a fresh AT. With AC 3.42 the Copter makes now much more “long” moves in the AT process. With the same preferences before AT, the results seem to be fine for me now. Maybe because of a fix in AC3.42?
Maybe I will try a AT with less torque settings in BLHeli later. But braking gives me a much better stability.
Attached there are 2 new logs. The one with much to high results, and the last one which looks pretty good for me


Many thanks for looking into this!
Cheers
Gregor