Watt Control Via Duty Cycle Control?

General topics and discussions about the VESC and its development.
devin
Posts: 255
Joined: 08 May 2017, 01:55
Location: San Francisco, California, US

Watt Control Via Duty Cycle Control?

Postby devin » 17 Sep 2017, 21:59

Watt Control Via Duty Cycle Control
------------------------------

Could it be possible to implement wattage control for desired electrical wattage at all physically possible RPMs via duty cycle control?

edited: the following formula is not valid, i've posted the corrected formula in a later post....
---------------------------

A = 500W = Full Throttle Desired Electrical Wattage at all physically possible rpms
B = 500rpm = Present RPM
C = 0.1ohm = Winding Resistance
D = 50V = Battery Voltage
E = 100kv = Motor KV or RPM Per Volt
F = XX.XX% = Duty Cycle <—— What Duty Cycle Supplies 500w @ 500rpm
G = XX.XXV = Volts BEMF Per RPM
H = XX.XXV = Volts BEMF at Present RPM
I = XX.XXV = Volts Above BEMF Required For A - Desired Electrical Wattage
J = XX.XXV = Effective Voltage Required For A - Desired Electrical Wattage

% Throttle is % Motor Amps as defined by A

—————————

1/E=G

1/100kv=0.01V BEMF Per RPM <——100kv is 0.01V BEMF Per RPM

Therefore:

G = 0.01V = Volts BEMF Per RPM

BG=H

(500rpm)(0.01V) = 5V BEMF at Present RPM <——5v BEMF @ 500rpm @ 0.01V per RPM

Therefore:

H = 5V = Volts BEMF at Present RPM

&

Watts=Volts^2/Resistance

Therefore:

V = sqrt(R)*sqrt(W)

Therefore:

XX.XXV = sqrt(C)*sqrt(A)

XX.XXV = sqrt(0.1)*sqrt(500)

7.07107V = sqrt(0.1)*sqrt(500) <——7.07107V Effective Volts above BEMF needed for 500W

Therefore:

I = 7.07107V = Volts Above BEMF Required For A - Desired Electrical Wattage

I+H=J

(7.07107V)+(5V)=12.07107V <—— 12.07107V J - Effective Volts Needed For A - Desired 500W

Therefore:

J = 12.07107V = Effective Voltage Required For A - Desired Electrical Wattage

&

(J/D)*100=F

((12.07107V)/(50V))*100 = 24.14214% Duty Cycle <— 24.14% Duty is 12.07V Effective V w/ 50V Pack

Therefore:

F = 24.14214% = Duty Cycle

Therefore:

A = 500W = Desired Electrical Wattage at all physically possible rpms
B = 500rpm = Present RPM
C = 0.1ohm = Winding Resistance
D = 50V = Battery Voltage
E = 100kv = Motor KV or RPM Per Volt
F = 24.14214% = Duty Cycle <—— 24.14214% Duty Cycle For 500w @ 500rpm
G = 0.01V = Volts BEMF Per RPM
H = 5V = Volts BEMF at Present RPM
I = 7.07107V = Volts Above BEMF Required For A - Desired Electrical Wattage
J = 12.07107V = Effective Voltage Required For A - Desired Electrical Wattage

——————

Simply, in theory 24.14214% duty cycle is required for exactly 500w desired electrical at present RPM 500rpm with 0.1ohm winding resistance, 50V Present Pack V, and 100kv detected motor kv.

*haven't had time to double check this so could be riddled with errors


^this formula is not valid, correct formula below:
Last edited by devin on 18 Sep 2017, 05:23, edited 4 times in total.

devin
Posts: 255
Joined: 08 May 2017, 01:55
Location: San Francisco, California, US

Re: Watt Control Via Duty Cycle Control?

Postby devin » 17 Sep 2017, 23:17

^I think I made a mistake & this is actually the correct formula:

-----------

Watt Control Via Duty Cycle Control?

-----------

Could it be possible to implement wattage control for desired electrical wattage at all physically possible RPMs via duty cycle control?

-----------

Where:

A=Battery Amps
B= Motor Amps
C=Duty Cycle
D= Present Back Emf V
E= Effective PWM Voltage
F= Winding Resistance
G= Pack Voltage
H= Desired Wattage
I= Motor KV
J= Present RPM

A=H/G
&
D=(1/I)*J
&
E=(1/2)(sqrt((4AFG)+D^2)+D)
&
C=(E/G)*100
&
B=A/(C/100)
&
%throttle=%H
or (option)
%throttle=%B

Will post explanation shortly...
Last edited by devin on 18 Sep 2017, 06:46, edited 2 times in total.

devin
Posts: 255
Joined: 08 May 2017, 01:55
Location: San Francisco, California, US

Re: Watt Control Via Duty Cycle Control?

Postby devin » 18 Sep 2017, 04:12

^I think it's correct....

A= 10A = Battery Amps
B= 50A = Motor Amps
C= 20% = Duty Cycle
D= 5V = Present Back Emf V
E= 10V = Effective PWM Voltage
F= 0.1ohm = Winding Resistance
G= 50V = Pack Voltage
H= 500W = Desired Wattage
I= 100kv = Motor KV
J= 500rpm = Present RPM

A=H/G
&
D=(1/I)*J
&
E=(1/2)(sqrt((4AFG)+D^2)+D)
&
C=(E/G)*100
&
B=A/(C/100)
&
%throttle=%H
or (option)
%throttle=%B

-------------------

Simply when the desired electrical wattage is 500W, and the present RPM is 500rpm, the KV is 100kv, Pack Voltage is 50V, and winding resistance is 0.1ohm lead to lead, then the duty cycle should be 20% via duty cycle control, in theory.

A= 10A Battery Amps
B= 70.71065623A Motor Amps
C= 14.14214% Duty Cycle
D= 0V = Present Back Emf V
E= 7.07107V = Effective PWM Voltage
F= 0.1ohm = Winding Resistance
G= 50V = Pack Voltage
H= 500w = Desired Wattage
I= 100kv = Motor KV
J= 0rpm = Present RPM

A=H/G
&
D=(1/I)*J
&
E=(1/2)(sqrt((4AFG)+D^2)+D)
&
C=(E/G)*100
&
B=A/(C/100)
&
%throttle=%H

^verified

A= 21.50537 = Battery Amps
B= 39.24690 = Motor Amps
C= 54.79507% Duty Cycle
D= 22.22222V = Present Back Emf V
E= 25.47971V = Effective PWM Voltage
F= 0.083ohm = Winding Resistance
G= 46.5V = Pack Voltage
H= 1000w = Desired Wattage
I= 90kv = Motor KV
J= 2000rpm = Present RPM

A=H/G
&
D=(1/I)*J
&
E=(1/2)(sqrt((4AFG)+D^2)+D)
&
C=(E/G)*100
&
B=A/(C/100)
&
%throttle=%H

^verified

pf26
Posts: 305
Joined: 28 Mar 2016, 14:37
Location: FR Valence

Re: Watt Control Via Duty Cycle Control?

Postby pf26 » 18 Sep 2017, 13:22

With A= 10A = Battery Amps, B= 50A = Motor Amps, C= 20% = Duty Cycle, D= 5V = Present Back Emf V, E= 10V = Effective PWM Voltage
F= 0.1ohm = Winding Resistance, G= 50V = Pack Voltage, H= 500W = Desired Wattage, I= 100kv = Motor KV, J= 500rpm = Present RPM
It seems like half of your 500W is lost in the winding resistance. That's less than 50% efficiency...
So it is worth mentionning that the desired wattage is at the battery, and not at the motor output.

devin
Posts: 255
Joined: 08 May 2017, 01:55
Location: San Francisco, California, US

Re: Watt Control Via Duty Cycle Control?

Postby devin » 18 Sep 2017, 14:49

pf26 wrote:With A= 10A = Battery Amps, B= 50A = Motor Amps, C= 20% = Duty Cycle, D= 5V = Present Back Emf V, E= 10V = Effective PWM Voltage
F= 0.1ohm = Winding Resistance, G= 50V = Pack Voltage, H= 500W = Desired Wattage, I= 100kv = Motor KV, J= 500rpm = Present RPM
It seems like half of your 500W is lost in the winding resistance. That's less than 50% efficiency...
So it is worth mentionning that the desired wattage is at the battery, and not at the motor output.


@pf26 i havent checked your math on the efficiency, but everything you said sounds correct. electrical to mechanical conversion efficiency is unavoidably very close to 0% anytime a hub motor starts from a standstill, but since the torque on the wheel is proportional to the motor amps, and since the torque is necessary for acceleration, the so called "inefficiency" is necessary for the acceleration necessary to propel a human rider. yes the "desired wattage" is electrical wattage not mechanical, since as mentioned starting from standstill, the mechanical wattage is always 0w regardless of the electrical wattage and present torque demanded by the rider for acceleration. electrical "wattage" control is not the same concept as "efficiency" control as described in the other thread. the goal of wattage control is the rider controls the % of desired max electrical wattage from the battery at all possible rpms [including very close to standstill], allowing constant max desired source power for performance -- even when the battery voltage sags.

devin
Posts: 255
Joined: 08 May 2017, 01:55
Location: San Francisco, California, US

Re: Watt Control Via Duty Cycle Control?

Postby devin » 18 Sep 2017, 18:35

Here is a single formula to obtain desired duty cycle from desired electrical wattage, winding resistance, pack voltage, motor kv and present rpm:

A= XX.XXXA = Battery Amps
B= XX.XXXA = Motor Amps
C= 54.795% Duty Cycle
D= XX.XXXV = Present Back Emf V
E= XX.XXXV = Effective PWM Voltage
F= 0.083ohm = Winding Resistance
G= 46.5V = Pack Voltage
H= 1000w = Desired Wattage
I= 90kv = Motor KV
J= 2000rpm = Present RPM

C=50*(sqrt((4*(F)*(H)*I^2+J^2)/I^2)/G+J/(G*(I)))

&

C=50*(sqrt((4*(0.083)*(1000)*90^2+2000^2)/90^2)/46.5+2000/(46.5*(90)))


therefore:

C = 54.795% = Duty Cycle

Image

---------

Simply when winding resistance is 0.083ohm, pack voltage is 46.5V, motor kv is 90kv, present rpm is 2000rpm, and desired wattage is 1000w, in theory the duty cycle should be set to 54.79%.

A= 21.50537 = Battery Amps
B= 39.24690 = Motor Amps
C= 54.79507% Duty Cycle
D= 22.22222V = Present Back Emf V
E= 25.47971V = Effective PWM Voltage
F= 0.083ohm = Winding Resistance
G= 46.5V = Pack Voltage
H= 1000w = Desired Wattage
I= 90kv = Motor KV
J= 2000rpm = Present RPM

A=H/G
&
D=(1/I)*J
&
E=(1/2)(sqrt((4AFG)+D^2)+D)
&
C=(E/G)*100

&
B=A/(C/100)
&
%throttle=%H


^verified
Last edited by devin on 18 Sep 2017, 19:56, edited 2 times in total.

devin
Posts: 255
Joined: 08 May 2017, 01:55
Location: San Francisco, California, US

Re: Watt Control Via Duty Cycle Control?

Postby devin » 18 Sep 2017, 19:36

Here is a single formula to obtain desired motor amps from desired electrical wattage, winding resistance, motor kv and present rpm:

A= XX.XXXA = Battery Amps
B= 39.246A = Motor Amps
C= XX.XXX% Duty Cycle
D= XX.XXXV = Present Back Emf V
E= XX.XXXV = Effective PWM Voltage
F= 0.083ohm = Winding Resistance
G= XX.XXXV = Pack Voltage
H= 1000w = Desired Wattage
I= 90kv = Motor KV
J= 2000rpm = Present RPM

B=(2*H*I)/(I*sqrt((4*F*H*I^2+J^2)/I^2)+J)

&

B=(2*1000*90)/(90*sqrt((4*0.083*1000*90^2+2000^2)/90^2)+2000)


39.246=(2*1000*90)/(90*sqrt((4*0.083*1000*90^2+2000^2)/90^2)+2000)

therefore:

B= 39.246A = Motor Amps

Image

---------

Simply when winding resistance is 0.083ohm, motor kv is 90kv, present rpm is 2000rpm, and desired wattage is 1000w, in theory the motor amps should be 39.246A motor amps.

A= 21.50537 = Battery Amps
B= 39.24690 = Motor Amps
C= 54.79507% Duty Cycle
D= 22.22222V = Present Back Emf V
E= 25.47971V = Effective PWM Voltage
F= 0.083ohm = Winding Resistance
G= 46.5V = Pack Voltage
H= 1000w = Desired Wattage
I= 90kv = Motor KV
J= 2000rpm = Present RPM

A=H/G
&
D=(1/I)*J
&
E=(1/2)(sqrt((4AFG)+D^2)+D)
&
C=(E/G)*100
&
B=A/(C/100)

&
%throttle=%H


^verified
Last edited by devin on 18 Sep 2017, 21:30, edited 1 time in total.

devin
Posts: 255
Joined: 08 May 2017, 01:55
Location: San Francisco, California, US

Re: Watt Control Via Duty Cycle Control?

Postby devin » 18 Sep 2017, 20:21

Here is a single formula to obtain desired motor amps from desired electrical wattage, winding resistance, present back emf V:

A= XX.XXXA = Battery Amps
B= 39.246A = Motor Amps
C= XX.XXX% Duty Cycle
D= 22.22222V = Present Back Emf V
E= XX.XXXV = Effective PWM Voltage
F= 0.083ohm = Winding Resistance
G= XX.XXXV = Pack Voltage
H= 1000w = Desired Wattage
I= XX.XXXkv = Motor KV
J= XX.XXXrpm = Present RPM

B=(2*H)/(sqrt(D^2+4*F*H)+D)

&

B=(2*1000)/(sqrt(22.22222^2+4*0.083*1000)+22.22222)


39.246=(2*1000)/(sqrt(22.22222^2+4*0.083*1000)+22.22222)

therefore:

B= 39.246A = Motor Amps

Image

---------

Simply when winding resistance is 0.083ohm, back emf V is 22.22222V, and desired wattage is 1000w, in theory the motor amps should be 39.246A motor amps.

A= 21.50537 = Battery Amps
B= 39.24690 = Motor Amps
C= 54.79507% Duty Cycle
D= 22.22222V = Present Back Emf V
E= 25.47971V = Effective PWM Voltage
F= 0.083ohm = Winding Resistance
G= 46.5V = Pack Voltage
H= 1000w = Desired Wattage
I= 90kv = Motor KV
J= 2000rpm = Present RPM

A=H/G
&
D=(1/I)*J
&
E=(1/2)(sqrt((4AFG)+D^2)+D)
&
C=(E/G)*100
&
B=A/(C/100)

&
%throttle=%H


^verified

devin
Posts: 255
Joined: 08 May 2017, 01:55
Location: San Francisco, California, US

Re: Watt Control Via Duty Cycle Control?

Postby devin » 18 Sep 2017, 20:39

Here is a single formula to obtain desired duty cycle from desired electrical wattage, winding resistance, present back emf V, and present pack voltage:

A= XX.XXXA = Battery Amps
B= XX.XXXA = Motor Amps
C= 54.795% Duty Cycle
D= 22.22222V = Present Back Emf V
E= XX.XXXV = Effective PWM Voltage
F= 0.083ohm = Winding Resistance
G= 46.5V = Pack Voltage
H= 1000w = Desired Wattage
I= XX.XXXkv = Motor KV
J= XX.XXXrpm = Present RPM

C=(50(sqrt(D^2+4*F*H)+D))/G

&

C=(50(sqrt(22.22222^2+4*0.083*1000)+22.22222))/46.5


54.795=(50(sqrt(22.22222^2+4*0.083*1000)+22.22222))/46.5

therefore:

C = 54.795% = Duty Cycle

Image

---------

Simply when winding resistance is 0.083ohm, back emf V is 22.22222V, desired wattage is 1000w, & pack voltage is 46.5V, in theory the duty cycle should be 54.795% duty cycle.

A= 21.50537 = Battery Amps
B= 39.24690 = Motor Amps
C= 54.79507% Duty Cycle
D= 22.22222V = Present Back Emf V
E= 25.47971V = Effective PWM Voltage
F= 0.083ohm = Winding Resistance
G= 46.5V = Pack Voltage
H= 1000w = Desired Wattage
I= 90kv = Motor KV
J= 2000rpm = Present RPM

A=H/G
&
D=(1/I)*J
&
E=(1/2)(sqrt((4AFG)+D^2)+D)
&
C=(E/G)*100
&
B=A/(C/100)

&
%throttle=%H


^verified

pf26
Posts: 305
Joined: 28 Mar 2016, 14:37
Location: FR Valence

Re: Watt Control Via Duty Cycle Control?

Postby pf26 » 19 Sep 2017, 12:25

Watt control from the battery is already implemented, since you can configure a limitting max battery current, and the battery voltage should be very stable.
If you give enough throttle, the duty cycle and motor current will be determined by the max battery current, ie watt-control.
It might be interesting to have the throttle control the battery max current parameter instead of duty cycle or motor current. It should be quite easy to create a custom app doing this.


Return to “General”

Who is online

Users browsing this forum: No registered users and 2 guests