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_MINā€¦PWM_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!

Hello,

To revive a bit this topic, I have a question. In near-hovering the relation between the propeller speed V and thrust provided by the blade is

T = kt * VĀ²

with kt the thrust gain.

And the input signal to the motor 0-1 should be proportional to the speed of the blade (I am talking DSHOT protocol). Then the thrust is proportional to the square of the signal.

Shouldnā€™t we expect then a THR_MDL_FAC close to 1?