Low speed and startup torque (BBSHD ebike)

General topics and discussions about the VESC and its development.
amund7
Posts: 10
Joined: 10 Jul 2017, 08:05
Location: Oslo, Norway
Contact:

Low speed and startup torque (BBSHD ebike)

Postby amund7 » 10 Jul 2017, 08:19

Hi,

I put a VESC 4.12 on my Bafang BBSHD (crank drive), as the original controller died.

It runs pretty good in BLDC mode, with 'stock' settings for the BBSHD, that is 30 battery amps. I am running hall sensored.

Except on steep first-gear climbs, where I couldn't possibly pedal alone. Then duty cycle starts going down, until there is almost no help from the motor. It starts strong but goes down.

It is NOT temperature, I am logging everything, and the temp sometimes reaches 80 degrees (temp limit start), but I have plenty of examples of the same on 60-70 degrees as well.

I found the 'mimimum RPM' setting, and after seeing the source code (for current control) I understand that only BELOW 'min rpm' will it start reducing the duty cycle and therefore the amperage and torque. So I set the min RPM to 1, but still the same thing happens.


What else, except min RPM, amp limits and temperatures could pull the duty cycle down from 95%?

I am working on a USB wired raspberry PI that will give some good detailed graphs, I will post them soon, but what I can already see from jerky logs off VESC Monitor/bluetooth is that the duty cycle goes way down, less than 50%, battery and motor amps are far from the limits, and the temperatures as well. So I can't figure out what's reducing the duty cycle ?

Sorry for the long post.

TL;DR: Vesc reduces duty cycle on slow hills, why? It's not temperature, lower RPM limit or amps.

rew
Posts: 943
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.

Re: Low speed and startup torque (BBSHD ebike)

Postby rew » 10 Jul 2017, 08:53

amund7 wrote:What else, except min RPM, amp limits and temperatures could pull the duty cycle down from 95%?
.
What else? Ehh., Going slow, slowing down pulls the duty cycle down from 95%. In fact that's the only thing that influences the duty cycle....

If you're logging everything, look at the motor current. That should quickly hit the maximum you've configured and then stay there. The slower you go, as long as you're setting or limiting the motor current, the less POWER you're getting, but you should still get the same amount of torque.

amund7
Posts: 10
Joined: 10 Jul 2017, 08:05
Location: Oslo, Norway
Contact:

Re: Low speed and startup torque (BBSHD ebike)

Postby amund7 » 10 Jul 2017, 09:12

rew wrote:
amund7 wrote:What else, except min RPM, amp limits and temperatures could pull the duty cycle down from 95%?
.
What else? Ehh., Going slow, slowing down pulls the duty cycle down from 95%. In fact that's the only thing that influences the duty cycle....

If you're logging everything, look at the motor current. That should quickly hit the maximum you've configured and then stay there. The slower you go, as long as you're setting or limiting the motor current, the less POWER you're getting, but you should still get the same amount of torque.


That's exactly the point I am trying to make, the motor and battery currents also go way down from the limits, and torque starts to disappear, until what feels like zero. Or, that is my observations so far with very choppy logs from bluetooth.

My unsderstanding was that at slower speeds the duty cycle will reduce in order to stay within the amp limits, please correct me if I'm wrong?

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

Re: Low speed and startup torque (BBSHD ebike)

Postby devin » 10 Jul 2017, 13:05

amund7 wrote:Hi,

I put a VESC 4.12 on my Bafang BBSHD (crank drive), as the original controller died.

It runs pretty good in BLDC mode, with 'stock' settings for the BBSHD, that is 30 battery amps. I am running hall sensored.

Except on steep first-gear climbs, where I couldn't possibly pedal alone. Then duty cycle starts going down, until there is almost no help from the motor. It starts strong but goes down.

It is NOT temperature, I am logging everything, and the temp sometimes reaches 80 degrees (temp limit start), but I have plenty of examples of the same on 60-70 degrees as well.

I found the 'mimimum RPM' setting, and after seeing the source code (for current control) I understand that only BELOW 'min rpm' will it start reducing the duty cycle and therefore the amperage and torque. So I set the min RPM to 1, but still the same thing happens.


What else, except min RPM, amp limits and temperatures could pull the duty cycle down from 95%?

I am working on a USB wired raspberry PI that will give some good detailed graphs, I will post them soon, but what I can already see from jerky logs off VESC Monitor/bluetooth is that the duty cycle goes way down, less than 50%, battery and motor amps are far from the limits, and the temperatures as well. So I can't figure out what's reducing the duty cycle ?

Sorry for the long post.

TL;DR: Vesc reduces duty cycle on slow hills, why? It's not temperature, lower RPM limit or amps.


What is your winding resistance, battery voltage, and desired max amps from battery at all speeds including close to stall?

There is a non-intuitive formula for converting battery amps to motor amps and if the motor amp limit is too low for when there is little back emf at low rpms, then the "effective battery amp limit" will be low as well -- resulting in lowered duty cycle and lowered performance.

Image

Let's imagine you do an FOC detection of your motor and find the winding resistance is 0.0415ohm...

This means the true winding resistance of your motor is 0.0830ohm, because the VESC is measuring resistance to the virtual ground point of your motor which is half the lead-to-lead resistance.

Let's assume your battery is 36V, and you want to draw 13.88 battery amps at all possible speeds including close to stall for 500W electrical power at all possible speeds.

500W = 13.88 battery amps * 36V = (77.61 motor amps)^2 * 0.0830ohm = 6.44 pwm effective volts * 77.61 motor amps

&

13.88 battery amps = 77.61 motor amps * (17.88% duty cycle / 100)

^What these equations mean is if your lead-to-lead winding resistance is 0.0830ohm, then to have 500w electrical available from the battery at all physically possible speeds including very close to stall, you must have a battery amp limit of 13.88 amps, a motor amp limit of 77.61 amps, an absolute limit ~90 amps to account for any "amp swings" over 77.61 amps.

Simply close to stall, the VESC will draw 77.61 amps from the battery 17.88% of the time, which averages to 13.88 amps & 500w... and 77.61 amps will be sent to the motor the entire time you are close to stall, but the motor amps will have an effective voltage of only 6.44v effective pwm voltage (due to inductive recirculation during duty cycle OFF)-- also 500W.

At higher rpms than close to stall, back emf voltage generated by the rotor will require higher and higher duty cycle and less and less motor amps to sustain 500W electrical from battery because at higher and higher duty cycle, the lower and lower motor amps will have higher and higher effective voltage while they counteract the back emf voltage (but sustaining same average 13.88 number of battery amps) to achieve the same 500W electrical from the battery across the full possible speed range.

Once reaching 100% duty cycle (which can't be reached on a VESC because it tops out at 95%), battery amps and motor amps would be the same in quantity and in effective voltage.

Close to no load rpm, 500 w from the battery isn't possible because the BackEMF voltage produced by the spinning magnets will completely counteract the battery voltage, leading to 0w from the battery even at 100% duty cycle.

rew
Posts: 943
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.

Re: Low speed and startup torque (BBSHD ebike)

Postby rew » 10 Jul 2017, 17:17

amund7 wrote:er speeds the duty cycle will reduce in order to stay within the amp limits, please correct me if I'm wrong?

Yes.

For easier calculations assume your motor has 0.1 Ohm resistance, and you have a 40V battery. Now if you apply the whole 40V across the motor, you'll get 400A. Not good! Now if your motor has a 100 kV, it will run 100 RPM for each volt applied. So if the motor runs 1000 RPM, it will need at least 10V to work. Now if you apply 11V to the motor, the difference 11V - 10V = 1V will cause current to flow. In this case 1V / 0.1 Ohm = 10A. So in this case you'll see a dutycycle of 11V/40V = 27.5%.

So if your motor can handle up to 20A, the dutycycle closely follows the speed of the motor. With the numbers given that would be +/- 2V or +/- 5%. On the other hand, my example of 100 mOhm ressitance in the motor is quite a lot. It is often less.

amund7
Posts: 10
Joined: 10 Jul 2017, 08:05
Location: Oslo, Norway
Contact:

Re: Low speed and startup torque (BBSHD ebike)

Postby amund7 » 14 Jul 2017, 06:35

Thank you all for very educating posts!

I have the raspberry pi logger/monitor up and running, which writes 50hz CSV files. And I learned was very embarrassing - in all my back and forth with settings I had set the min RPM to 150 ??? and max motor amps to 40. I don't know when or why I did those, but those combined are probably causing my issues, will test again with new settings today.

Motor amps, how can I guesstimate the sane max for my motor? I am thinking that as long as I am still missing the low-end torque the original controller had, I am well below the original motor amps?

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

Re: Low speed and startup torque (BBSHD ebike)

Postby devin » 14 Jul 2017, 13:34

amund7 wrote:Thank you all for very educating posts!

I have the raspberry pi logger/monitor up and running, which writes 50hz CSV files. And I learned was very embarrassing - in all my back and forth with settings I had set the min RPM to 150 ??? and max motor amps to 40. I don't know when or why I did those, but those combined are probably causing my issues, will test again with new settings today.

Motor amps, how can I guesstimate the sane max for my motor? I am thinking that as long as I am still missing the low-end torque the original controller had, I am well below the original motor amps?


In my opinion, if you stay aware of how hot your motor & vesc get, the "sane" max motor amps is 120a because that is the maximum certain versions of the vesc will allow (even though numerically you can input up to 200) -- then the total watts are limited by whatever you input as the battery amp limit.

Let's imagine if you put 120a max motor amps, and 14 battery amps max for around 500w limit if your battery is 36v... the high motor amps will only be put through the motor close to stall (not necessarily 120a will be produced at 14 battery amp limit full throttle close to stall, but it is possible depending on your motor's winding resistance) -- at higher rpms, back emf voltage produced by the spinning magnets results in a much lower number of motor amps for the same 14 battery amps -- which in turn limits heat production and improves electrical to mechanical conversion efficiency close to typical "cruising speed."

The risk in this approach is if you load the motor down so
much that you are riding full throttle continually very close to stall, a lot of heat could be produced continually both in the vesc and the motor and motor wires. Also whatever "motor amp" value is being drawn will be taken from the battery for some percentage if time... if the battery isn't up to the task of 120a 10% of the time -- averaging to 12 battery amps for example, it could he harmful to the battery as well.

If we assume your true winding resistance is 0.0830ohms and your battery is 36v -- with your 40a motor amp limit setting, this would equate to only 132.8 watts close to stall -- which would be only 3.68 battery amps @ 36v full throttle close to stall. If your winding resistance is lower, than the "available wattage" in this condition would be lower as well.

If we use the same 0.0830ohm winding and 36v battery assumption, the 120a motor amps close to stall would equate to 1195.2 watts or 33.2 battery amps.

(120a motor * 120a motor) * 0.0830ohm = 1195.2w = 33.2a battery * 36v battery


Return to “General”

Who is online

Users browsing this forum: No registered users and 6 guests