If you look at the form of this equation, it’s simply ohms law, where I is the motor current, V is the voltage to the motor, and R is the resistance in Ohms—
I=V/R
but we have 2 different corrections to the voltage… the duty cycle reduces the battery voltage by the duty cycle %, so when the motor isn’t turning, we get:
I=(V*duty%)/R
next when the motor starts turning, there’s a further correction to the voltage due to the back emf generated by the moving magnets which subtracts from the applied voltage giving:
I=((V*duty%)-BEMF_V)/R
where BEMF_V = motor_rpm/kv
To calculate the electrical wattage, it isn’t the battery voltage times the motor current, but the reduced voltage to the motor factoring the duty cycle (but not the bemf) times the motor current, so the electrical wattage is the battery voltage times duty cycle times motor current (in bldc):
(Bat_V * duty%) * motor_current = electrical_wattage