[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 594: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 650: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 1110: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 1110: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 1110: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5277: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5277: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5277: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
vedder.se forums • "Peak Efficiency" Control Mode? - Page 10
Page 10 of 12

Re: "Peak Efficiency" Control Mode?

Posted: 14 Oct 2017, 09:38
by devin
Throttle Response Update:

In theory this update to the code improves the dynamic throttle response produced by the algorithm at times when full throttle would result in the motor amp limit setting or duty cycle limit setting being reached.

Where:

M= 100 = Throttle % Setting
K= 90 = Desired Efficiency % Setting
L= 500 = Desired Min Watts Available Setting
P= 4500 = Desired Max Watts Available Setting

G= 48.2 = Battery Voltage
D= 16.94 = Back EMF Voltage
F= 0.025 = Winding Resistance Ohms
Y= 120 = Max Motor Amps
Z= 95 = Max Duty Cycle %

N= XX.XXXw = Desired Full Throttle Wattage
C= XX.XXX% = Duty Cycle

N=L
&
if D>((sqrt(F)*K*sqrt(L))/(10*sqrt(100-K))) then N=(-1)*((100*(D^2)*(K-100))/(F*(K^2)))
&
if N>P then N=P
&
if Y<((sqrt((D^2)+(4*F*N))-D)/(2*F)) then N=Y*(D+(F*Y))
&
if Z<((50*(sqrt((D^2)+(4*F*N))+D))/G) then N=(G*Z*(G*Z-(100*D)))/(10000*F)
&
C=10*((sqrt((25*(D^2))+(F*M*N))/G)+((5*D)/G))
&
repeat


Therefore:

M= 100% = Throttle % Setting
K= 90% = Desired Efficiency % Setting
L= 500w = Desired Min Watts Available Setting
P= 4500w = Desired Max Watts Available Setting

G= 48.2v = Battery Voltage
D= 16.94v = Back EMF Voltage
F= 0.025ohm = Winding Resistance Ohms
Y= 120a = Max Motor Amps
Z= 95% = Max Duty Cycle %

N= 1417.10w = Desired Full Throttle Wattage
C= 39.049% = Duty Cycle

——————————

Explanation:

N=L

^this line sets the desired full throttle wattage at the minimum desired wattage value

&

if D>((sqrt(F)*K*sqrt(L))/(10*sqrt(100-K))) then N=(-1)*((100*(D^2)*(K-100))/(F*(K^2)))

^this line calculates whether there is enough back emf voltage present to allow the desired minimum full throttle wattage at or above the desired efficiency, and if there is, it adjusts the desired full throttle wattage to the value which achieves the desired electrical to mechanical conversion efficiency at the present rpm

&

if N>P then N=P

^this line adjusts the desired full throttle wattage to the maximum desired wattage setting if the wattage at desired efficiency exceeds the desired max wattage setting

&

if Y<((sqrt((D^2)+(4*F*N))-D)/(2*F)) then N=Y*(D+(F*Y))

^this line calculates whether the desired full throttle wattage exceeds the max motor amp setting, and if it does, it adjusts the desired full throttle wattage to a value which does not exceed the max motor amp setting

&

if Z<((50*(sqrt((D^2)+(4*F*N))+D))/G) then N=(G*Z*(G*Z-(100*D)))/(10000*F)

^this line calculates whether the desired full throttle wattage exceeds the max duty cycle setting, and if it does, it adjusts the desired full throttle wattage to a value which does not exceed the max duty cycle setting

&

C=10*((sqrt((25*(D^2))+(F*M*N))/G)+((5*D)/G))

^this line calculates the duty cycle control value based on the final desired full throttle wattage value, throttle position, back emf voltage value, winding resistance, and pack voltage

&

repeat

—————————

Conclusion

In theory this code improves the dynamic throttle response when full throttle will result in reaching the motor amp limit or the duty cycle limit. With the last version, 100% throttle position was defined to supply the wattage necessary to achieve the desired efficiency setting, but if %100 throttle (desired efficiency wattage) resulted in reaching the motor amp limit or duty cycle limit, then all throttle positions that would result in exceeding duty cycle limit or motor amp limit would result in the same amount of power to the motor (to stay under the limits) leading to reduction in dynamic throttle response at the higher end of the throttle range when the duty cycle/motor amp limits could potentially be exceeded. This update in theory fixes and ensures a fully dynamic throttle response by always mapping “100% throttle” to the desired efficiency unless it results in exceeding motor amp/duty cycle limit, in which case 100% throttle would then correspond to the wattage required to stay under both limits, and % throttle would correspond to a % of this under-the-limits-wattage.

Re: "Peak Efficiency" Control Mode?

Posted: 14 Oct 2017, 10:42
by devin
% Motor Amps throttle variation:

In theory this code is just another throttle option which instead defines % throttle as % motor amps at desired efficiency (while staying under the various limits) instead of % watts at desired efficiency in the other code.

M= 100 = Throttle % Setting
K= 90 = Desired Efficiency % Setting
L= 500 = Desired Min Watts Available Setting
P= 4500 = Desired Max Watts Available Setting

G= 48.2 = Battery Voltage
D= 16.94 = Back EMF Voltage
F= 0.025 = Winding Resistance Ohms
Y= 120 = Max Motor Amps
Z= 95 = Max Duty Cycle %

N= XX.XXXw = Desired Full Throttle Wattage
H= XX.XXXw = Desired Wattage
C= XX.XXX% = Duty Cycle

Where:

N=L
&
if D>((sqrt(F)*K*sqrt(L))/(10*sqrt(100-K))) then N=(-1)*((100*(D^2)*(K-100))/(F*(K^2)))
&
if N>P then N=P
&
if Y<((sqrt((D^2)+(4*F*N))-D)/(2*F)) then N=Y*(D+(F*Y))
&
if Z<((50*(sqrt((D^2)+(4*F*N))+D))/G) then N=(G*Z*(G*Z-(100*D)))/(10000*F)
&
H=(M*((-1)*D*(M-100)*sqrt((D^2)+4*F*N)+((D^2)*(M-100))+(2*F*M*N)))/(20000*F)
&
C=((50*(sqrt((D^2)+(4*F*H))+D))/G)
&
repeat

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

Explanation:

N=L

^this line sets the desired full throttle wattage at the minimum desired wattage value

&

if D>((sqrt(F)*K*sqrt(L))/(10*sqrt(100-K))) then N=(-1)*((100*(D^2)*(K-100))/(F*(K^2)))

^this line calculates whether there is enough back emf voltage present to allow the desired minimum full throttle wattage at or above the desired efficiency, and if there is, it adjusts the desired full throttle wattage to the value which achieves the desired electrical to mechanical conversion efficiency at the present rpm

&

if N>P then N=P

^this line adjusts the desired full throttle wattage to the maximum desired wattage setting if the wattage at desired efficiency exceeds the desired max wattage setting

&

if Y<((sqrt((D^2)+(4*F*N))-D)/(2*F)) then N=Y*(D+(F*Y))

^this line calculates whether the desired full throttle wattage exceeds the max motor amp setting, and if it does, it adjusts the desired full throttle wattage to a value which does not exceed the max motor amp setting

&

if Z<((50*(sqrt((D^2)+(4*F*N))+D))/G) then N=(G*Z*(G*Z-(100*D)))/(10000*F)

^this line calculates whether the desired full throttle wattage exceeds the max duty cycle setting, and if it does, it adjusts the desired full throttle wattage to a value which does not exceed the max duty cycle setting

&

H=(M*((-1)*D*(M-100)*sqrt((D^2)+4*F*N)+((D^2)*(M-100))+(2*F*M*N)))/(20000*F)

^this line calculates the desired full throttle motor amps, reduces the motor amps by a percentage based on throttle position, and then calculates the resulting desired wattage

&

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

^this line calculates the duty cycle control variable from the desired wattage, back emf voltage, winding resistance, and pack voltage.

&

repeat

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

Conclusion

With this control option, percent throttle is percent of max desired motor amps at desired efficiency (while staying within the other defined limits), and since motor amps are linearly proportional with torque, the throttle position becomes linearly proportional with max torque at desired efficiency. The previously written about watt-throttle control option would by contrast be linearly proportional with the max desired battery amps (assuming constant voltage pack), but more accurately wattage since it increases the "battery amp limit" when the pack voltage dips.

Re: "Peak Efficiency" Control Mode?

Posted: 14 Oct 2017, 11:59
by rew

Re: "Peak Efficiency" Control Mode?

Posted: 14 Oct 2017, 13:05
by devin

Re: "Peak Efficiency" Control Mode?

Posted: 18 Oct 2017, 16:31
by devin

Re: "Peak Efficiency" Control Mode?

Posted: 19 Oct 2017, 13:58
by devin

Re: "Peak Efficiency" Control Mode?

Posted: 20 Oct 2017, 16:31
by devin

Re: "Peak Efficiency" Control Mode?

Posted: 20 Oct 2017, 17:28
by pf26
Did you try to record the measurements of a know scenario (like 50% throttle for 20 secondes, then 0%), with a real VESC board ? (for instance using VSC monitor with bluetooth on android). I think it would be nice to validate the model, especially regarding the motor/transmission/aero losses.

Re: "Peak Efficiency" Control Mode?

Posted: 21 Oct 2017, 15:56
by devin

Re: "Peak Efficiency" Control Mode?

Posted: 29 Oct 2017, 13:46
by devin