I have to publish a required throttle and attitude to setpoint_raw/attitude. I am unable to figure out, how a mapping between the actual thrust(force or acceleration) required and throttle can be made. Any help?
Please note that the required acceleration is computed using a guidance algorithm.
Thanks in advance!
I found the following link: (Static) Thrust = f(RPM).
I think it should be reasonable to calculate RPM = f(Thrust) given that equation.
(S)He also explains the derivation of the equation. @BossHater: how did you come up with your equation?
throttle = throttle + (a_cmd - a_curr) *k
Is there any scientific background to that or is it a fit using some data?
I don’t want to sound rude, just wondering…
@robin-ecn The only thing you need to figure out is the scaling factor between the normalized thrust and the acceleration. This is hardwawre dependent on what kind of mootrs / voltage you are using.
A good guess can be made with the hover throttle. For example, if your drone hovers at a normalized thrust value of 0.5, that means the normalized thrust value of 0.5 is going to be close to accelration value of 9.8m/s^2.
This way, the normalized thrust values can be mapped to the actual acceleration.
@robin-ecn The actuator commands corresponds to the PWM values commanded on the ESCs. The nonlinearity is not that high and I believe the performance will not be too bad even if you assume that it is linear. Given that the thrust values will not vary too much around the hovering value of the thrust commands.
Even if you manage to model the nonlinearity between the pwm and thrust generation, this will no longer hold when the drone starts to move dynamically as the thrust generated by the rotors will vary on the load and speed.
There are a lot of people testing motors and measuring thrust vs pwm values on benches so this could be a good reference for you