How do I reduce throttle "pulsing" in auto modes?

I’m still working on this but I just haven’t had much time. Today I snuck in a quick flight and calibrated the following:

Parameter Value Notes
FBW_ARSPD_MIN 13 (29 MPH)
FBW_ARSPD_MAX 29 (65 MPH)
TRIM_ARSPD 19.2 (43 MPH)

TECS_CLIMB_MAX 8 (1575 Feet/Minute)
TECS_SINK_MIN 4 (787 Feet/Minute)
TECS_SINK_MAX 6 (1181 Feet/Minute)

I’m currently running with THR_SLEWRATE at 20 since that seems to fix most of my problems but the next time I get a chance to fly I’ll try again with it turned up to 100.

An unfortunate side-effect of the way the TECS system works is that changing your desired cruise speed forces you to re-do this calibration. For example, the CLIMB and SINK values are significantly different for me with TRIM_ARSPD set to 38MPH instead of 43.

Tonight I got a short flight in using tuned parameters (slew_rate still 20), throttle nudge off and in other modes than “Cruise” everything was working great.

In cruise, it’s still very obvious that the sampling noise on the throttle input has a huge impact on the TECS system. It shows up on dsp_dem, nav_pitch and throttle out.

This log is a very short section of a straight/level flight leg. First in auto, then switched to cruise. The transmitter throttle was fixed at 1500uS in firmware.

It is expected to get different values at different airspeeds, but it is the sum of climb and sink that matters. So, your 8 and 4 (12) represents almost double the power of the default of 5 and 2 (7). If you were to fly faster and get (for example) 6 and 6, then the gain would be exactly the same.

Unfortunately, it probably wouldn’t come out exactly the same. That’s just a result of power out being a function of airspeed, throttle setting, and battery voltage. We could linearize it a little bit by using feedback control on electrical watts (it would also compensate for battery voltage), but some part of the issue is the prop’s efficiency curve over a range of advance ratios.

Paul is talking about using a machine learning algorithm to learn the efficiency based on multiple variables. That way, for a given airspeed, it would look up the throttle that it needs to get a given amount of power. I think it would help somewhat to have a tachometer - that would allow us to measure advance ratio directly if we know the pitch of the prop, then we could put it through a generic efficiency curve.

I have my problem fixed. Short version. I loaded SimonK firmware onto my HK F-100A ESC.

Longer version:
I was able to catch the motor pulsing in the air and on the ground with a fixed throttle input. I did a ton of tests trying different ESC timings etc but was not able to eliminate the problem.

I was only ever able to catch it doing this after 15+ minutes of operation. I’m guessing that it could have been heat related or possibly just a bug in the stock firmware.

After loading SimonK firmware, adding a heatsink to the ESC, putting two large (2200uF) electrolytic capacitors around the current sensor and improving the aifflow inside my fuselage, the pulsing problem is completely gone. It also fixed the inconsistent readings I was getting from my current sensor. I am now able to calibrate it such that OSD computed MAH values match the readings from my charger.

My motor only uses around 12 amps cruising and maxes at 58 so overheating of a 100A ESC seems strange, but that ESC just has 3 large heat slugs so they could warm up over time. I now have an external finned heat-sink directly contacting the top slug with some thermal paste between them.

Thanks for the help. I haven’t tried with throttle_nudge on, but I will soon. I still think it might be good to filter that input.