MOT_THST_EXPO and autotune

Hi,

Regarding the MOT_THST_EXPO I know that a too low value will give instability at high throttle and vice versa. But If I’m looking at autotune, would a too high value for example give too high or too low PID values?

Maybe it won’t give that clear of a symptom but if anyone has know what might could happen It would be really interesting to know!

I dont think a slightly different MOT_THST_EXPO will need significant PID changes, if at all.

If you have stable enough flight you can test MOT_THST_EXPO by using Stabilize mode and doing some ascents and descents, with varying levels of aggressiveness - Check in logs for instability.
If you’ve already done Autotune, it might be OK to leave PIDs how they are, depends how much change might be required and what you see in logs.
Changing MOT_THST_EXPO (and MOT_SPIN_MIN) can affect hover thrust - so there can be a few parameters to check after any changes and some hover thrust learning, such as PSC_ACCZ_I and PSC_ACCZ_P.

It will all come down to what you can see in logs with achieved versus desired attitude control, and deciding if you should run Autotune again.

I’ve got a lot of words there, but not sure if it’s much help :slight_smile:

1 Like

Thanks!

I tried autotune but got really low PID values. So low that a testflight is not worth the risk. I use the T-motor Aplha ESC… so that’s why I’m starting to look at the thrust expo. You helped Mark Townsend a while back and he uses the exact same motor configuration as I do in a quad setup with a thrust expo of 0.2. I got quite low noise. Vibrations are not perfect but I’ve done as much as I can. Now, it’s most my frame design and choice of components that dictate my vibrations. They are still within manageable magnitude and very low at hover. The raw accelorometer data from the IMU tab also looks reasonable.

I thaught changing the thrust expo might help since Mark got good results. Or, my folding arm mounts flex a little bit and I’m stuck with manual tuning.

I’m going to go out for a testflight soon today to try out the new thrust expo and see if it makes any difference. Since I plan on getting into the business of designing and building multirotor for others I might as well start to tune them manually, I think that would bring me a better understanding of things.

Mark has MOT_THST_EXPO,0.4 with those T-Motor/Alpha integrated sets, and even for the ones with separate motor and Alpha.

You could also try MOT_THST_EXPO,0.6 or even the “calculated” expo - these Alphas seem to vary depending on which motor you purchased with them, or without a motor.

Have you got the pre-Autotune log to look at?

I have a log with 0.4 expo.

I have one with 0.2 as well, but it’s on the drone and I don’t have access to it now.

I may try to go from 0.2 to 0.65. That’s such a great difference that I should see a change for better or worse.

That log with MOT_THST_EXPO,0.4 looks good, but there’s probably not enough data there to make a definitive statement about the value.
You would have to try descents and ascents in Stabilise mode to push the boundaries a bit more than Loiter does.

Unrelated but I would adjust:

INS_HNTCH_BW,12
INS_HNTCH_REF0.20
INS_HNTCH_HMNCS,3

There is no need to specify more harmonics than the first and second since the others are suitably attenuated anyway.

Thanks!

I’ll change those!

I noticed that during my autotune, the altitude would jump each time it made an aggressive yaw movement. The PIDs were also very low after.

I have the autotune log. I didn’t dare to fly with the new pids so I unfortunately don’t have any post tune log. I don’t know if there’s any indication in the log to why it decides to go so low. I thaught it could be the thrust expo. It should be quite high on 22 inch, like 0.76.

Maybe I could try to use 0.76 and see if that makes the autotune results better

I finally got the time to download my thrust expo test log.

I tested with 0.4 first, than 0.2. The log is quite long since I had to bring the batt voltage down a bit for storage so It’s only the first part that’s important.

The 0.2 difference in expo might be too small to see in the log since I’m not in stabilize pushing the limits.

Yeah it’s a bit hard to tell much from that in relation to thrust expo. There needs to be a few more ascents and descents - but I would say from what is there MOT_THST_EXPO,0.4 would be good to use, if not correct.
Attitude control and everything else was quite good.

To try and extract a bit more usefulness from the log I checked over the harmonic notch filter again and
I think you should adjust to these and also MOT_THST_EXPO,0.4
INS_HNTCH_FREQ,48
INS_HNTCH_BW,20
INS_HNTCH_REF,0.25
INS_HNTCH_HMNCS,11
INS_LOG_BAT_MASK,1
PSC_ACCZ_I,0.6
PSC_ACCZ_P,0.3

For this result

The sections of log with MOT_THST_EXPO,0.2 gave a slightly different filter result, requiring INS_HNTCH_FREQ,44 with other settings as per suggestions above.
So at least that’s proof that MOT_THST_EXPO is having some effect, even if we cant see it in attitude control in this log.

Thanks!

I’ll change the filter settings for my next test.

I’ve decided to try to do some more digging and get in touch with t motor regarding this. I’ve talked so a guy on facebook who said he uses aplha ESCs with a custom firmware for higher voltages. He also claims they have a lower expo. He had 0.2 but he also said other propp and motor combos could be different.

It there anything in the log to suggest why my autotune produced so bad (low values) results?

No not really. Usually noise (vibrations) would cause a bad Autotune result, but your vibrations and filtering were acceptable - maybe the suggested filter adjustments will help.
You have limited need to run another Autotune though, attitude control (and even yaw) look quite good and maybe just some small adjustments would help.

The only other thing I noticed was GPA.Delta (update rate) for both GPS units is varying a lot. I dont think this will affect Autotune though.
You could try these to see if it improves:

GPS_GNSS_MODE,65
GPS_GNSS_MODE2,65

or a firmware update of the GPS units.

1 Like

I have some things to do.

Apparently, when I use folding propps, having them more tight around the pivot point can introduce vibrations. I read that someone had seen a great reduction in vibrations after he tightened the bolt less. He did it so that the blade would fall/pivot down if held horizontally.

I’ve never thaught of it but all other folding propps, like the once DJI uses, rotate very loosely around it’s pivot point.

I’ll have to do some more tests after changing one thing at a time. I need to update to 4.4.0 as well which will require another test flight for safety so there’s some flying to do.

I’ll test the filter settings as well. And I thaught of testing the 0.65 expo value against the 0.2 to see if there’s any difference.

Even if my tune is ok/close the drone still feels loose in the air and I definitely want much more fine tuning. It might even be so that the tune is too bad for me to see such small differences I’m looking for

1 Like

Hi Shawn,

I’ve updated to 4.4.0 and made some tests for the thrust expo. I tested 0.4 against the calculated 0.76.

The first log here is just the initial test for the 4.4.0 firmware. I guess this log could be useful for looking at the filter changes you suggested.

Test of copter 4.4.0 2023-09-06 18-04-30.bin - Google Drive

I changed all the filter parameters but left the logging to log fast on all IMUs. I’m still collecting and analyzing data on all IMUs for vibration frequencies and amplitude.

So, for the test I just made one log with a landing in the middle. The first takeoff is with a thrust expo of 0.76 and the second takeoff is with 0.4. I could actually feel a difference this time. I did some hovering, some larger inputs and some smaller rapid once. I also flew up and down while doing some smaller inputs to look for oscillations. The 0.76 value seemed to make the aircraft more unstable in general. Especially on smaller inputs which would cause an oscillation. The oscillation is still there on 0.4 since the aircraft is not yet fully tune but more apparent on the 0.76 flight. One interesting discovery was that before takeoff, then I had just armed, the craft would oscillate on the yaw axis while on the ground. This would not happen on the 0.4 expo. Since a too high value would give instability on low throttle this would make sense right? Since there is some stabilization going on the ground is the lowest throttle I’ll get.

Second flight: 2023-09-06 18-11-15.bin - Google Drive

I’ve decided to continue tuning for now and use the 0.4 expo value.

I’ve moved to a new post since I’ve chosen to give manual tuning a go and the expo and autotune is not relevant to that post as of now.

You can check it out if you got the time. Since I’ve played around with the propps the filters might be in need of fine tuning, which I’m terrible at myself.

Thanks!