Thrust Curve Compensation through THR_MDL_FAC

As suggested in the MC Tuning Guide, I try to compensate thrust nonlinearities through the THR_MDL_FAC parameter, which is described as follows:

THR_MDL_FAC (FLOAT)
Thrust to PWM model parameter
Comment: Parameter used to model the relationship between static thrust and motor input PWM. Model is: thrust = (1-factor)*PWM + factor * PWM^2

Obviously the model seems to work with normalized values, otherwise some factors would be missing (e.g. maximum static thrust). Do I assume correctly, that PWM in the model description above is normalized to [0…1] instead of [PWM_MINPWM_MAX]?

I have measured the relation between PWM signal and thrust using an RCBenchmark Series 1580 thrust stand, and with a model as shown below I was able to get decent results:

PWM_MIN, PWM_MAX = 1000, 1800

def thrust_model_func(pwm, α, k):
    pwm_rel = (pwm - PWM_MIN) / (PWM_MAX - PWM_MIN)
    return α * (k * pwm_rel**2 + (1-k) * pwm_rel)

Using this model, I got a Thrust to PWM model parameter of 0.75, which seems quite high compared to the values mentioned in the parameter tuning guide.

Do the calculations and assumptions above make sense, or am I missing something important?

1 Like

That looks reasonable to me. 0.75 is a little higher than I’ve seen before, but not by much. If you find you have oscillations while spooling the props up before takeoff you can always drop it a little.

Correct, that’s the case with the output curve function, the battery remaining calculations, the stick expo, they’re all [0,1] or [-1,1].

Your calculations and plot look fine, would give a good example in the documentation. A value of 0.75 can well be since in principle the turning speed of the propeller gives you quadratic thrust so if your ESC controls rpm and you neglect other less significant effects it should be nearly quadratic (value of 1). A lot of ESCs out there don’t control rpm but rather voltage duty cycle and/or do some internal half way linearization. That’s why it’s best if you do the measurements like you did and set the correct parameter :+1:

I would really like to support thrust parameters and output with physical units in the future but it’s not there yet and not strictly necessary for good performance.

Thank you for your confirmation. The issue was already resolved in Slack, and the parameter documentation has been updated as well.

Where in the documentation would you put an example like this?

Where your first link to the docs is: https://docs.px4.io/master/en/config_mc/pid_tuning_guide_multicopter.html#thrust_curve
It would be appreciated if you could add the example, the file can directly be edited here:
https://github.com/PX4/px4_user_guide/blob/master/en/config_mc/pid_tuning_guide_multicopter.md

btw I don’t see the point in the other TPA option since it’s a more hacky way to solve the same problem.

How about this?

Perfect, thanks a lot for the contribution @Finwood!