To prove the algorithm works suppose we have a motor which is:
190kv
At the present moment the motor is turning:
1000rpm
We can calculate the voltage the motor is generating (back emf voltage) from:
1000rpm / 190kv = 5.26v bemf
Suppose I am accelerating and want instantaneous 85% electrical to mechanical conversion efficiency, what voltage should I apply to the motor?
5.26v bemf / 85% = 6.18v pwm effective voltage
What is the motor current (assume motor is 0.05ohm)?
(6.18v - 5.26v) / 0.05 = 18.4a motor current
What is the electrical wattage?
6.18v * 18.4a = 113.71w
What is the torque?
60 / (2 * pi * 190 kv) = 0.0502nm/a
0.0502nm/a * 18.4a = 0.9236 newton meters
What is the mechanical power?
1000rpm * ((2 * pi)/60)= 104.71 radians per second
104.71 rad/sec * 0.9236 newton meters = 96.71 watts mechanical
What is the conversion efficiency?
96.71w mechanical / 113.71w electrical = 85%