# Efficiency Control Mode

Anyone want to take a stab at implementing it?

https://www.vesc-project.com/node/628

2 Likes

Explain like i am 5, how does this work??

5 Likes

@ducktaperules In an electric vehicle, only one value of motor current will achieve a particular constant speed for a given load or set of road conditions (affected by grade, wind, rider weight, etc).

By contrast during the acceleration of electric vehicles, one can choose how much motor current to use, with more current generally resulting in more torque, faster acceleration, more heat produced (via copper loss and other mechanisms) in the motor, and lower efficiency.

Due to the relationship between torque and copper losses as a function of motor current, it is possible to achieve a â€śtargeted electrical to mechanical conversion efficiencyâ€ť during acceleration by modulating the motor current to achieve a targeted efficiency.

Generally speaking, lower acceleration results in greater efficiency (both miles per kWh and % electrical to mechanical).

It turns out that due to a quirk of physics in BLDC mode, the % electrical to mechanical efficiency is the same as the ratio of back emf voltage to applied effective voltageâ€¦ in other words if the motor at its present speed produces 9v bemf, and you apply 10v pwm voltage, your motorâ€™s electrical to mechanical conversion efficiency at that moment is 90%. The control mode takes advantage of this relationship by equating full throttle with a certain conversion efficiency chosen by the user (within certain limitsâ€” ie motor current, watts, throttling etc.)

Once you are at constant speed the control mode gives the same efficiency as standard current control.

^Blue line bottom middle chart shows the electrical to mechanical conversion efficiency (comparison between efficiency control BLDC vs current control BLDC with the same current limits during full throttle acceleration), yellow line bottom left chart shows vehicle thrust in pounds at full throttle, blue line bottom left chart shows estimated wind drag force in pounds on flat ground. Blue and yellow lines top middle chart show the reduced motor heating with efficiency control. Purple line bottom right chart shows the battery current. Blue line top left chart shows the motor current. Purple line top middle chart shows the electrical watts. Black line top middle chart shows the mechanical watts. Blue line top right chart shows the motor torque in newton meters.

5 Likes

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%

2 Likes

very interestingâ€¦

when you are calculating the torque I would assume you need to take in account stator/rotor radius and length. I donâ€™t see this in the calculation. Can you explain this?

when you are calculating the torque, all you neeed is the KV and the motor currentâ€¦

First to get the KT (torque in newton meters per motor amp), the formula is:

60 / (2 * pi * KV) = KT

next to get the torque, mutiply the KT by the motor current:

reference:

2 Likes

Ok now I understand the relationship

Stator/ rotor size -> conductor size -> resistance -> motor current -> torque

the kv and resistance tells you basically everything you need to know about the performance of the motor and factors the geometry of the stator windings and magnets.

from the kv and resistance you can calculateâ€¦

the KM which is the torque per square root of the copper losses in wattsâ€¦ this number stays the same when you rewind the motor with constant copper volume for a different kv. higher KV for the same KM is more efficient til a certain point (assuming the proper gear reduction is chosen at all times) when iron losses from stator eddy currents become more significant than copper losses at extremely high rotor speeds and kvâ€™s.

if two motors have the same kv, the one with lower resistance is better (it generates less heat for the same torque).

if two motors have the same resistance, the one with lower kv is better (because the one with lower kv and same resistance can be re-wound to have the same kv and lower resistance with the same copper volume).

1 Like

Thanks for the how to calculations, thatâ€™s very instructive.

Edit : so basically a 85kv motor should be able to push 11nm for 100A minus the losses right?

60 / (2 * pi * 85kv) = 0.1123nm/a

100a * 0.1123nm/a = 11.23 newton meter torque

^ this assumes the iron-based stator is physically large enough that it does not reach the point of â€śmagnetic saturationâ€ť with a lesser amount of current. When using additional motor current above the point of magnetic saturation, the increase in torque becomes less than linear with added current.

reference:

2 Likes

From the end userâ€™s perspective, ideally there would be 3 dials on the remote control-

• min watts - this is how much electrical power you have full throttle at standstill, except unlike a battery â€śamp limitâ€ť the power available (in watts) stays constant during voltage sag (more bat amps drawn during voltage sag to keep the same min watts) â€“ lowering this number makes the vehicle more efficient, increasing the number gives more acceleration

• max watts - almost the same as a battery amp limit, governing max power at full speed, except unlike a battery â€śamp limitâ€ť the power available (in watts) stays constant during voltage sag (more bat amps drawn during voltage sag to keep the same max watts) â€“ lowering this number makes the vehicle more efficient, increasing the number gives more acceleration

• efficiency % - defines the slope of transition from min watts to max watts based on motor rpm - above a certain speed (determined by the min watts setting) full throttle corresponds to the chosen percentage of conversion efficiency â€“ raising this number makes the vehicle more efficient, lowering the number gives more acceleration

The idea would be to turn up the efficiency and turn down the watt settings on flat ground if increased range is desired, but when needed for hills or for better acceleration, the settings can be adjusted as desired.

^ In this case (both full throttle):

88% desired efficiency setting, 250w min watt setting, 2600w max watt setting, 52a motor current limit, 52a battery amp limit

vs

52a motor current limit only

In the efficiency control example pictured above, 250w electrical is used (min watts setting) until the motor rpm is reached that more that 250w electrical can be used at constant 88% conversion efficiency, at which point it can be seen that the electrical power ramps upwards with increasing motor rpm at constant efficiency.

1 Like

"I may be a little bit late to the game but this is of great interest to me.

I represent an undergraduate team (duke-ev.org) who builds ultra-efficient vehicles and weâ€™ve been considering picking apart the vesc firmware to borrow some useful algorithms. I had made some edits to the firmware for a different project and Iâ€™ve gotten familiar enough with the firmware that I could probably get this implemented without too much difficulty. Benjamin has made it such a breeze to edit and flash firmware; I am very grateful.

Aside from the wildly unrealistic operating conditions our vehicle competes in, I do completely understand the appeal of this technique partly because I think about efficiency pretty much every waking moment. I think the big selling point is what you said earlier about how someone riding at partial throttle could theoretically match the acceleration proposed by your algorithm, but a human guessing what acceleration curve will make the optimal efficiency is never going to be as good as an algorithms forming a closed loop control to hit exactly the optimal efficiency. When we run our vehicle for record attempts, for example, we have 2-3 buttons which just apply the exact acceleration curves for optimal efficiency rather than using a thumb throttle.

I donâ€™t want to make it sound like our ridiculous use case is the only reason you would use devinâ€™s control, though. Itâ€™s definitely extremely valuable to just make the board run efficiently on its own without the user needing to tweak their thumb at just the right amount. Maybe you could make the argument that youâ€™re splitting hairs on efficiency, but I could also make the argument that if you sell 1000 boards and each one runs 10 miles a day and saves 1% efficiency, over the course of a year that amounts to a lot of CO2 and \$!

Iâ€™ll do some more research and further consider implementing this into the firmware. In the mean time, devin I may DM you for more theoretical details and I hope more people can see the value that this offers.

Gerry Chen"