How to obtain thrust from PWM

Firmware/software/electronics/mechanics
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: How to obtain thrust from PWM

Post by tobias »

I think you already figured it out. The motor.m1 is the thrust before compensated by battery voltage and pwm.m1_pwm is after (we should really rename these log variables...). And yes, pm.vbat is used as the battery voltage.
lin24016
Beginner
Posts: 5
Joined: Mon Oct 18, 2021 9:05 am

Re: How to obtain thrust from PWM

Post by lin24016 »

Yeah, thank you.
It is appreciated if you could clarify which PWM data should be used in the formula: F = 11.09−39.08 p−9.53v+20.57 p^2 + 38.43 pv.

Since the pwm.m1_pwm is already compensated, it feels more reasonable to use the raw PWM in the formula.
However, in the post from Thu Apr 01, 2021, the compensated pwm is used and whoenig did not point out the problem, which makes me confused about it.

Thank you.
Post Reply