Maximising Controller Performance

adrian_sm

1 MW
Joined
Feb 22, 2009
Messages
2,429
Location
Melbourne, Australia
Here are some thoughts I have had on maximising the performance of our ebike controllers, by not just focusing on limitting the battery side input power, but more on the motor outputs. Specifically output torque, and power. This can help protect the system components, while maximising performance, and staying as legal as you wish too. Here is what I was thinking ...

If your controller does not limit current to the motor you would see the motor power, and torque graph look something like this. This is what RC style ESCs typically do.
Unrestricted.PNG

But most ebike controllers limit the input power via PWMing the phase current up until the motor BEMF limits the power even at full throttle.
This results look something like this.
Input Power Limit.PNG

But this has two undesirable effects:
1) the output power prior to the peak is always below the peak.
- So if you are aiming to maximise the output power to a legal limit, you are loosing out.
2) the torque (and phase current) may be higher or lower than desired at low speeds, depending on the current limit.
- Too high and this is hard on mosfets, phase wires, connectors, and drive train components
- Too low and you are loosing out on low end torque, because of your power limit at higher speeds.

Now we can measure the motor speed, and battery current easily enough. And if we assume the throttle % directly relates to the PWM, then we can estimate the phase current, and therefore torque. Source discussion: http://www.endless-sphere.com/forums/viewtopic.php?f=4&t=37964&p=553707&hilit=torque+limit+analyst#p553707
justin_le said:
Torque limit also works best from the perspective of protecting controller mosfets and motor phase wires and connectors. IF the throttle output of the CA is mapped properly and the controller takes the throttle signal as a direct control of the PWM duty cycle, then the CA should be able to estimate the motor current from
Motor Current ~= Battery Current / (Act Throttle Output / Full Throttle Output)
And hence could set up a limit accordingly.

This additional information would allows us to implement theoretical output power limiting, giving us more low end power and torque.
Output Power Limit.PNG

Or implement a torque limit that limits the low end torque, but allows more power in the mid range.
Torque Limit.PNG

Or even both, resulting in increased mid range power (compared to a normal input power limiting ebike controller), while still keeping the low end torque in check to protect phase wires, mosfets, connectors or drive train components for non-direct drives like my friction drive.
Power and Torque Limit.PNG

I am currently implementing this scheme and will hopefully document any progress here. The output torque and power will be user-adjustable, making it simple to switch between any of these schemes.

- Adrian
 
Interesting stuff Adrian. So are you working to implement this via an override of the throttle signal? I've found that, at least with my higher Kv hubmotors, achieving the desired result is possible through experimenting with battery and phase current limits. Block Time is probably useful too for moderate and lower power rigs. I had to do quite a bit of testing with different current limit relationships with my extreme power rig, and what I settle on is something like your last graph. Too much torque on take-off with a too high relationship of phase to battery current limit, made the bike impossible too ride, but too low a ratio restricted maximum speed (something I don't really understand). Block Time is useless and dangerous above about 15kw, so luckily I have a program version that can limit it to 0.1 second. FWIW I settled on right around a ratio of 1.3:1 for the motor to battery current limit settings.

John

PS- We still need a torque controlling throttle, which I wish all you e-gurus would get together and resolve once and for all.
 
Yes implemented via throttle override, focusing on RC style ESCs to start with, as that is what I am using and have the most need to implement power limits.

eBike Controllers
But now that you bring up the typical ebike settings (phase current, battery current and block timing) it is interesting to look at how these effect the torque curve.
Battery Current limit is the Input Power Limit graph.
file.php

Lowering the phase current limit should flatten out the torque and PWM curve on the left side of the curve.
Block timing as I understand it allows the phase current limits to be ignored for a short duration of time during initial start up. Which lower power setups will probably appreciate, and high power setups would find dangerous to their drive train or themselves.

Torque Throttle
How would you like the torque throttle to work?
Like the Torque Limit graph, with the % throttle resulting in a percentage of that capped max torque for any particular speed?
file.php


This should be fairly easy to implement.
Settings would be.
T1 = % max torque at zero rpm, effectively the max throttle at zero rpm
S1 = speed at which torque limit is reduced to zero, this is the inflection point on the Torque Limit curve above.

Inputs:
- S = speed sensor
- Th_IN = throttle in

Outputs:
- Th_OUT = throttle out

Calculation:
if (S > S1) then (Th_OUT = Th_IN) else (Th_OUT = Th_IN *(T1+(1-T1)*S/S1))

Now the fly in the ointment is how quickly the speed reading is updated. It would default to S=0 during startup, and then each time the sensor is detected would cause a step change in the allowable max throttle. So we may want to smooth things a bit, but that is easy enough.

We could instead use a hall sensor as the speed sensor for sensored motors, this will give us greater update frequency than a wheel sensor.

Whatcha think?
 
Hey,

In my spare time, I have been working on designing my own hub motor but I am getting stuck in how the controller impacts power output when it is applying PWM to the motor. For example, I can figure out the part of the power curve (shown in green on your charts) when the motor is spinning fast enough that the back emf is essentially limiting the current draw from the motor. But prior to this point I'm at a loss as to how PWM generates the green curve. Can you provide any spreadsheets or equations for how you generate the curves in your graphs? I know the Kv, Kt, and R of my motor - what else would I need to know to generate graphs like you have here? Thanks for any help you can give me
 
Interesting project... subscribed...!
 
take my money!
 
Back
Top