motor_current = (pwm_effective_voltage - bemf_voltage) / winding_resistance_ohms
motor_current = A
pwm_effective_voltage = B
bemf_voltage = C
winding_resistance_ohms = D
A = (B - C) / D
can be rearranged:
B = (A * D) + C
therefore:
pwm_effective_voltage = (motor_current * winding_resistance_ohms) + bemf_voltage
&
battery_voltage * duty_cycle_%_bldc = pwm_effective_voltage
therefore:
duty_cycle_%_bldc = pwm_effective_voltage / battery_voltage