New Tuning Instructions Wiki Page

I have autotuned my 5" quadcopter running arducopter 4.0.4 keeping roll,pitch,and yaw FLTTs to 37.5 while autotuning, after autotuning in all roll,pitch and yaw axes these are some params:
ATC_ANG_PIT_P,18
ATC_ANG_RLL_P,18
ATC_ANG_YAW_P,6.686522
ATC_RAT_PIT_D,0.008305321
ATC_RAT_RLL_D,0.007172775
AUTOTUNE_MIN_D,0.001

After looking at autotuning guide, these values suggest that autotune has been successfully completed, what you think about the tuning on this quadcopter where FLTTs have not been set to 0 ?

Log and complete parameter list is attached below, this is the log of flight after finishing autotuning:
5" quad log

5" quad parameters

You will certainly get a better tune by setting FLTT to 0 while running autotune - whether you will be able to tell or not depends on the aircraft and how you fly

okay, gonna repeat autotune on same quadcopter again with just changing FLTTs from 37.5 to 0 and rest keeping everything same as it is right now, will post the log and parameters by today, although i think it will be really difficult to compare the differences as quadcopter is already flying quite stable and well, do i need to change FLTTs back to 37.5 after completing autotuning or i can keep them to 0 ?

It’s up to you. FLTT will take out some of the notchiness from the pilot input and EKF - so you could set it quite low and still have really good control (e.g. 20). I tend to set it to 30 on my racing quads and can’t notice any loss of control.
The way I usually tell whether there is a tuning problem or not is to turn hard in acro - with a sloppy tune the nose tends to lift in an uncontrolled way coming out of the turn. Unfortunately this is also the effect that noise generates …

@andyp1per so i did what you suggested, i changed roll,pitch & yaw ATC_RAT_*_FLTTs from 37.5 to 0, and autotuned the quadcopter again, autotune seems to work well and faced no issues during autotuning roll, pitch and yaw together.

Flying 5" props quadcopter running arducopter- 4.0.4 on omnibusf4pro

That’s my earlier PIDs when i autotuned with FLTTs set to 37.5

And that’s my current PIDs after autotuning with FLTTs set to 0

Everything seems to be working well till… i attempt to fly the drone in althold after completing autotuning process, so i take off in stabilize mode, everything was going well, quadcopter was flying smoothly, then when i switched to althold mode, weird behavior started occuring, in althold mode, my quadcopter started behaving like it is in autotune mode, it keeps making sharp roll/pitch movements but not very frequently as like in actual autotune mode, so i landed the drone after observing that abnormal behaviour, this is the log of first flight where above scenario happened -
log of first flight after autotune

Now after this flight, i attempted second flight, in second flight, till i was in stabilize mode, quadcopter looked fine, but as i switched to althold again, that same abnormal behaviour as mentioned above started repeating, but this time things went worse than before, in first flight quadcopter was only making sharp movements in roll/pitch but in this second flight, its heading(yaw) started making complete 360 degrees rotation about its own z-axis, and suddenly i lost control of the drone, and it crashed on the ground
log of second flight after autotune

this is the complete parameter list, just want to let you know that my althold mode was set on rc5 and autotune mode was set on rc6 for first flight, for second flight i just changed rc6 from autotune mode to land mode.
2020-10-05 18-43-11.log.param (18.5 KB)

One more thing is i had kept FLTTs to 0 during whole autotune process, but as autotune gets completed then i changed FLTTs from 0 to 37.5. So in both the flights after autotune, FLTTs params was set to 37.5.

I really don’t know what goes wrong here and why this weird behaviour occured and only in althold ?

I’ll have a look at the logs a bit later, but this seems unrelated to autotune or FLTT. Your tune looks much tighter - and there is no reason why this would cause the behaviour you describe. Maybe some kind of hardware failure. The only other thing is maybe you were getting de-syncs - it’s possible if you were pushing the motors/escs harder that a desync is more likely, but that is a problem just waiting to happen so you should look into it anyway. What motors/escs do you have?

@andyp1per
Motors : T motor F20
ESC : Generic 4 in 1 ESC 20 Amps

You need to be careful with those high kv motors. What are your BLHeli settings?

I am not familiar with BLheli settings, can answer it tomorrow only, but i doubt about one more thing, my ppm receiver was causing some issues, it was triggering fs_throttle failsafe mid-flight earlier in the day today but not able to find why that was happening, certainly when looking at desired attitude data in above logs i can guess some problems with receiver inputs, not sure about it though cause drone was generally misbehaving in althold mode

Overall looking at the PIDs difference between when FLTTs was set 37.5 and 0 before autotuning, which tune seems to be better in my 5" quadcopter case? Or does i need to look at other factors first before thinking about tuning ?

I think you should work on the PPM angle. These RC inputs don’t look normal to me - you shouldn’t be able to get such big spikes:

Everything else looks ok. There are some motor spikes, but it doesn’t look like desync - more likely caused by these RCIN spikes.

1 Like

For the initial parameters, is there a correction factor for 3-bladed props? For example that a 10" 3-blade should use the spreadsheet settings of a 11" regular prop?

Andy, could you point me to the issue on github which discuss the Filter/Autotune problem in 4.0.x ? I found the commit, but would like to understand the why.

3 blade props will have higher frequencies of vibration, maybe… And a different thrust expo…
It’s hard for me to say which way some params should be modified, if at all.
I would use 10 inch values and examine flight logs, test some motor thrust expo values and let us know what you find.

EDIT to add:
“MOT_THST_EXPO is the linearization of thrust vs PWM. If this is set too high we see an increase in gain at the lower end of the thrust range and a decrease in gain at the upper end. Therefore when set too high you can see instability at low throttle and if set too low you can see instability at high throttle”

Not much of a discussion, just something that @Leonardthall and I found while tuning my 3" quad

2 Likes

Hello everyone,
I performed autotune with FLTT set to zero. The roll tune went fairly well but I encountered a strange problem when I started tuning the pitch axis. The copter was twitching in a very sluggish way - it was like the copter was twitching in slow motion. I aborted the autotune as it seems to be overshooting by a lot in a sluggish manner. I hope to get some analysis from the experts in this discussion and try to figure out the cause of this. Please take a look at my logs and param settings. Thank you.
Before this, I performed autotune twice which went smoothly - the copter was flying decently but I feel that the tune can be improved further.
For this time, I added a dynamic notch filter so, I’m wondering if I accidently filter out important attitude information. However, this should affect the roll tune as well.
Could it be that my ATC_ANG_PIT_P value is too low? or something related to the pitch PID values.
I tried changing ATC_RAT_PIT_FLTT back to 10 and performed autotune but had similar result which was expected.

Copter specs - Quad, min TOW 10.2kg, T motor MN701s, Flame ESC, 24" prop, Cube Orange 4.0.4
Planning to carry a 6kg payload.

log: https://drive.google.com/file/d/1t7tNGUGxXSjgqiPo4QqiJu5dILgmozvm/view?usp=sharing
param: PARAM 6.param (18.3 KB)

Before autotune PID values:

After roll autotune:

Regarding the log, after the autotune session I performed test flight in loiter mode with empty payload and with the 6kg payload. Based on observation, after mounting the payload, the copter oscillate on the pitch axis probably due to poor pitch PID value.

If the aircraft is reasonably symetrical, I would set all those pitch values to the same as roll is now.

Thanks for the reply @xfacta.
The aircraft is longer on the pitch axis. The first time I performed autotune - with the following settings,

ATC_RAT_PIT_FLTD,10
ATC_RAT_PIT_FLTE,0
ATC_RAT_PIT_FLTT,10
ATC_RAT_RLL_FLTD,10
ATC_RAT_RLL_FLTE,0
ATC_RAT_RLL_FLTT,10
INS_ACCEL_FILTER,15
INS_GYRO_FILTER,20
MOT_THST_EXPO,0.77
MOT_PWM_MAX,0
MOT_PWM_MIN,0

and got the following PID values,

Then, I changed the following params

MOT_THST_EXPO,0.2
MOT_PWM_MAX,1940
MOT_PWM_MIN,1100

and performed autotune again and gotten the following PID values

You want to set the FLTT filters to 0 before Autotune. And perhaps set the MOT_THST_EXPO back to default or the Tuning Parameter Guide value.

Thanks for the reply @dkemxr,
I attempted autotune with FLTT filters set to 0 and encountered the following problem

Although I also introduced dynamic notch filter into thatautotune attempt as well.

Based on Motor Thrust Scaling — Copter documentation, typically, Flame esc should have MOT_THST_EXPO values between 0 to 0.2. Should I still set MOT_THST_EXPO back to default or the Tuning Parameter Guide value?

This seems opposite to what would happen with FLTT at 0.

Regarding thrust liniarization of T-Motor ESC’s I’m not sure where this comes from. I inquired with T-Motor about this just a week ago asking about this feature with ANY T-Motor ESC’s and the reply from the Sales & Tech Department was:
ESC does not have this setting.
It is usually set by flight control.

Perhaps go back to basics and make another AltHold hover flight and capture pre-filter data to review the FFT for the notch filter settings.