You are here

Limit battery voltage during regen

15 posts / 0 new
Last post
f.damien12
Offline
Last seen: 3 months 1 week ago
VESC Free
Joined: 2021-09-17 17:19
Posts: 5
Limit battery voltage during regen

Hello,

My motor is used to make sometime big regen.

My battery owns a BMS and as a result, I absolutely need to take care to not make the BMS trips, otherwise I will burn the VESC (because braking with battery disconnected generates overvoltage).

How to prevent regenerating if battery voltage is too high ? Example : the BMS will trip at 42,5V. To get a safety margin, I want the VESC not doing regen if voltage is greater than 41,5V.But I want to be able to discharge.

1) How to implement this behaviour ?

If I set the overvoltage to 41,5V in VESC tool and I connect a fully charged battery (42,0V), a fault code will be generated on startup, then I can discharge the battery BUT ALSO do regen...

2) Is there a way to limit battery voltage by reducing regen current ?

3) Is this feature planned for future versions ?

 

Thanks

 

frank
Offline
Last seen: 4 days 8 hours ago
VESC BronzeVESC FreeVESC GoldVESC OriginalVESC PlatinumVESC Silver
Joined: 2016-12-27 20:19
Posts: 847

This is a big problem that many face and the only good solution is BMS that actually doesn't trip out or can communicate to the VESC viA CAN.

You could also use a charge only  BMS

f.damien12
Offline
Last seen: 3 months 1 week ago
VESC Free
Joined: 2021-09-17 17:19
Posts: 5

Do you think it is possible to custom the firmware by implementing CC/CV regen in software ?

skyline1970
Offline
Last seen: 5 months 2 weeks ago
VESC Free
Joined: 2017-09-07 22:28
Posts: 232

just sw will not be adequate to solve the problem

Elwin
Offline
Last seen: 2 months 2 weeks ago
VESC Free
Joined: 2021-09-30 16:41
Posts: 76

I never understand the worry of overcharging the battery from regen. If you start a trip with a full battery, the only way I see it could overcharge is if you add energy to the system, e.g. you go downhill. What am I missing that makes this a problem?

vadicus
Offline
Last seen: 1 week 1 day ago
VESC Free
Joined: 2018-08-17 07:26
Posts: 431

Most EVs simply reduce or disable regen if the battery SOC is close to 100%. Same thing when the batteries are cold. Should be a line or two of code in VESC to do the same. 

 

 

NextGen FOC High voltage 144v/34s, 30kw (https://vesc-project.com/node/1477)

ZenRides
Offline
Last seen: 4 months 2 weeks ago
VESC Free
Joined: 2021-09-29 02:07
Posts: 3

What about a switch that directs negative current to a resistor bank when the battery is over a given voltage?

 

I started off down a hill the other day, and saw on my logs that the VESC was reading 45.5V off my 10s pack!

I did some switchbacks up a hill to burn the extra power off, now if I have to start in that direction I try to pull my board off the charger at 41V.

But I'd love a better solution.

j.konrad
Offline
Last seen: 1 year 6 months ago
Joined: 2022-01-06 15:43
Posts: 40

The way I see it, regeneration introduces a lot of complications (potentially making its behavior inconsistent):

1. Back EMF is proportional to rotation speed.  Thus, regeneration current varies with motor speed and battery voltage.  regen_current = (BEMF - battery_voltage) / system_impedance

2. It's possible to use the motor's inductance and the controller's switching devices to create a DC-DC Boost Converter.  This makes it possible to increase the charging voltage above BEMF.

2a. It's possible for the motor's BEMF to exceed its supply voltage even without a Boost Converter if the motor is "overspun" (i.e. exceeds its base speed, e.g., descending a steep hill).

3. For the cells I've investigated, the charge rate is much less than the discharge rate (maybe by a factor of 10).

4. Similarly, the BMS will impose limitations on the charge rate versus the discharged rate as well (but this may only be a factor of 5).

5. Dumping energy into a resistor is possible, but for any vehicular application a mechanical brake would be my strong preference.

EDIT: Upon further reflection, I suppose Back EMF is not the right term. When the motor is being used as a generator, it's just EMF.  But I'll let it stand as I think the concept may be more familiar that way.

a.dahhak
Offline
Last seen: 8 months 1 week ago
Joined: 2020-02-27 12:04
Posts: 17

I implemented a Cutoff Start and a Cuttoff End parameters for the max voltage (for the min input voltage it is already implemented) and that's working good.

Abdelilah

vadicus
Offline
Last seen: 1 week 1 day ago
VESC Free
Joined: 2018-08-17 07:26
Posts: 431

Can you share the code? I am surprised max voltage cutoff End is not yet officially implemented. Gradual taper off between some 90-100% SOC would make most sense.

 

 

NextGen FOC High voltage 144v/34s, 30kw (https://vesc-project.com/node/1477)

drummerboy5408
Offline
Last seen: 2 months 2 weeks ago
VESC Free
Joined: 2019-05-26 22:42
Posts: 24

If you are in any Current control mode, the Battery resistance is what determines what the DC voltage is raised to...in order to achieve a certain Amp target for Regenerative Braking.

Therefore, by limiting the "Battery Regen Amp Max", that will limit the Braking that the VESC will do, and thus limit the Bus Voltage that the VESC would raise to achieve the Battery Regen Amp Limit.

The only other ways to achieve a higher amount of braking WITHOUT raising the voltage, is by modification. That would be either adding another Power Sink (Somebody mentioned a Resistor bank above), or by temporarily allowing a higher voltage than what the Nominal Battery voltage would be (Somebody also mentioned this - adding a CAN BMS).

canoeman
Offline
Last seen: 1 month 2 weeks ago
VESC Free
Joined: 2020-03-23 15:48
Posts: 34

At full charge the vesc should be capable of dissipating some amount of braking current in the vesc and motor itself without any regeneration to the battery. From everything I've read it will not do this ever, even when the battery is fully charged and regen is dangerous/impossible.

A typical motor/esc combo runs at 85% efficiency peak, maybe 80% in more average operation. That means 20% of electrical energy is already dissipated to heat in the motor & esc during normal use. Imagine an esc that can operate at 200A continuous. During operation at 200A it is dissipating the energy associated with 40A of current as heat in the motor and esc. This means that it should also be able to safely brake with 40A of current without sending a single amp back to that battery. To do this the esc would just have to short the phase leads together at a modulated duty cycle so as to not allow current to exceed 40A. This should be eminently possible. If the vesc could give me 40A of braking current without regen it would be truly amazing.

To put it another way: whatever the motor/esc combo can deliver as maximum continuous stall torque (all electrical energy dissipated to heat) it should also be able to deliver as non-regenerative braking torque (mechanical energy converted to electrical energy and dissipated as heat).

Or am I getting something completely wrong? Brighter minds please weigh in.

drummerboy5408
Offline
Last seen: 2 months 2 weeks ago
VESC Free
Joined: 2019-05-26 22:42
Posts: 24

The VESC is not capable of anything other than Regenerative braking. Doing anything else would melt or fry the VESC, or the Motor.

This is what Benjamin Vedder has said about the topic:

From VESC Node 398 -
 

There is no way to brake in a controlled way without pushing the current back into the battery. At very low speeds when the short circuit current is less than the requested braking current nothing is pushed back, but when going faster than that it always is.

If all phases are shorted at high speed and not released, the current would rise to hundreds of amps until something breaks in a fraction of a second. Modulated shorting of all phases at high speed (switching between shorting them and not) is also regenerative as every time they are released the inductive current spikes will be "rectified" into the battery through the body diodes in the MOSFETs, and this method makes a terrible noise (I think this is what castle controllers do). If the was a way to partly turn on the MOSFETs and waste the energy in them they would melt in a fraction of a second. All of this means that I would be quite impressed if some motor controller supports non-regenerative braking at any speed as opposed to regenerative braking.

Regarding the current limits, all of them are meaningful and important. The first thing to understand is that the battery current is a fraction of the motor current, depending on the modulation (duty cycle), roughly duty cycle * motor current. The duty cycle is more or less proportional to the motor speed, meaning that at low speed a high motor current only gives a low battery current, and at high speed the motor current and battery current are almost the same. This means that if the battery current is set rather low because of e.g. how much current the cells can handle, the motor braking current can still be high at low to mid speed and gradually decrease as the speed increases. The same thing is true for acceleration; setting a higher motor current than battery current means that high acceleration is possible at low to mid speeds, and then the acceleration gradually decreases as the speed increases. Therefore four different current limits give the maximum flexibility. It should be noted that the current limits behave such that no current limit is exceeded at any point, meaning that if you set the battery currents to what the battery can handle the motor currents can be set freely, and the software will do the best it can to provide them based on what is possible at any moment.

PavelPP
Offline
Last seen: 2 months 2 weeks ago
Joined: 2023-05-20 09:30
Posts: 1

Hello, I'm trying to figure out how to ensure that the battery does not overcharge with regenerative braking when the battery is fully charged.
I have read a lot of articles here but somehow I don't understand it.
So my question is, is there a way to make sure that regenerative braking does not occur when the battery is fully charged, but that it starts, for example, from 90% soc? Your Cutoff Start and Cuttoff End settings solve this problem??

drummerboy5408
Offline
Last seen: 2 months 2 weeks ago
VESC Free
Joined: 2019-05-26 22:42
Posts: 24

VESC BMS or another similar BMS is really the only way to handle this. 

Other than that, when I ride my longboard I make sure not to start regenerative braking too much without burning more mAH first