EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: Smokey on August 04, 2023, 09:03:07 am

Title: Technical breakdown of EV regen???.........
Post by: Smokey on August 04, 2023, 09:03:07 am
Anyone know of a good in depth technical breakdown of the way Regen functions in an EV, down to the current path in the inverter bridges? All I can find is lame " every motor is a generator" articles.

I am familiar with decel Regen in servo systems, but they just burn that voltage in a resistor typically and I haven't seen any real technical explanations about how you get that energy back into the battery in a car in a controlled way.

I'm imagining boost converters and constant current controllers, but something about that seems off. 
Bonus points if you have a technical description of induction motor Regen since the inverter still has to apply field current in a way pm motors don't....

Title: Re: Technical breakdown of EV regen???.........
Post by: T3sl4co1l on August 04, 2023, 09:27:08 am
Well, the most basic idea is that synchronous PWM works in either current direction.  Or, if you're familiar with the buck converter, and the boost converter, realize that they are identical but for the type of switch used, and the polarity of current (which, due to the polarity being consistent in one or the other, permits the use of passive diodes rather than synchronous FETs).  When done synchronously (or full-wave as an inverter), load current is a free variable in either direction, positive or negative.

There can even be merit in regenerating power from a motor through the inverter, just to burn it in a braking resistor, as this simplifies the architecture -- the braking resistor can simply monitor DC bus and load it down when/if it starts to rise above nominal operating range.  That is, as a boring old shunt regulator, as it were.

For induction machines, you'll have to learn/understand the rotary transformation, and tracking the phase between current and voltage, or rotor and stator.  The fundamental operation of a motor is to produce a rotating magnetic field; how the rotor induced field, or static when PMAC/synchronous type, rotates relative to the stator field being generated, dictates current, phase and torque.

For induction motors, it happens that the current is always lagging, and there is some slip between electrical rotation (driven frequency) and RPM (actual rotor speed).  The difference is slip, determined by rotor resistance and torque.  If an induction motor (all by itself) is presented with capacitive reactance, it can act as a generator instead; effectively, the reactive power acts to bias the machine, inducing rotor field and so able to deliver real power. (This is a positive feedback process, which needs some initial magnetization to kick off; normally enough residual is present in the rotor to get it started, at least if the output is lightly loaded.  Voltage rises until magnetic saturation kicks in.)  Alternately, an inverter can (AC) bias the stator, driving at a frequency for whatever slip is desired (positive or negative, and including zero); the stator's rotating magnetic field is made to lead or lag the rotor's induced field, thus pulling it along or slowing it, transmitting or receiving real power.

For synchronous motors, there are two components to the drive field, corresponding to in-phase and out-of-phase, or real and reactive power, or a 90° angle relative to the rotor's reference frame.  Whatever the case, in the rotating reference frame, the stator is seen to pull it along (phase leads rotor) or slow it down (phase lags rotor), thus delivering torque depending on deflection angle (a synch machine, being synchronous, of course spins at the driven frequency / #poles).  The *magnitude* of field being driven (in phase with the rotor's rotation) determines how "stiff" the deflection angle is (torque per angle displaced), and what reactive power in turn is reflected by the stator.  (Which gives rise to the old trick of rotating power factor correction, using an "over biased" synchronous machine to deliver capacitive reactance to the grid.)

Tim
Title: Re: Technical breakdown of EV regen???.........
Post by: thm_w on August 04, 2023, 11:39:05 pm
Its not exactly what you are asking but I would start with a brushed DC motor explanation of resistive braking and regen, then look at BLDC. Once thats clear it might help.
https://slideplayer.com/slide/12534394/ (https://slideplayer.com/slide/12534394/)
https://assets.nexperia.com/documents/application-note/AN50004.pdf (https://assets.nexperia.com/documents/application-note/AN50004.pdf)

The current is sensed and can be limited in a similar way to when you are driving the motor itself. So you can limit current going into the battery by limiting regen power.
Of course if the battery voltage goes too high, regen will turn off to prevent overvoltage.
I'm sure in a car its far more complicated, but a device like a ebike or scooter should work like this.

https://www.powerelectronicsnews.com/current-sensing-in-brushless-motor-drives/ (https://www.powerelectronicsnews.com/current-sensing-in-brushless-motor-drives/)

Title: Re: Technical breakdown of EV regen???.........
Post by: Smokey on August 05, 2023, 12:46:23 am
Sure.  Yes.  All that stuff.  But that's just how 3phase motors work.  I don't have an issue with any of that.  That's what I meant when I said all the articles are just "all motors are also generators" type general info without any technical details for regen besides "the motor is acting like a generator" hand wavyness.  That's not the concept I'm having a hard time understanding....

The question here is specifically about regen energy that goes back into charging a high voltage battery and the circuitry path that needs to take.  I don't see how a 3phase bridge acting as an inverter to actively control the motor can also do simultaneous duty as a boot/buck regen regulator.

Unless I'm missing something (which is likely), in order to get current to flow back into the battery, you need a voltage higher than the pack voltage to apply to the battery pack.  Then you need current limiting to keep that back flow current under control.  Lets assume the pack is near full charge (but not fully charged, because yes I understand that a fully charged pack has nowhere to put the regen energy). 

So the problems look like:

...You hopefully most likely sized the battery pack voltage to meet your top speed requirements based on the backEMF constant of the motor you are using with some additional headroom in the pack voltage.  So in generator mode, the motor is only generating anywhere near pack voltage by itself when it's spinning at near max velocity.  Hopefully you aren't often braking hard from max velocity very often.  So that means your motor regen voltage is essentially always lower than the pack voltage.  Applying that lower voltage to the pack will not cause current to flow back into the pack.

...During the beginning of a hard active controlled decel, the inverter is indeed commanding an opposite voltage than the motor is generating as backEMF.  This indeed causes the applied voltage and the backEMF to add together and the bus voltage can get pumped up higher than the supply.  This is the "extra" voltage that typically gets shunted with a resistor in servo systems.  But the issue here is that the inverter is still pulling current OUT of the battery pack to push against the forward rotation of the rotor and actively slow down the motor in a controlled way.  If you look at the size of the regen shunt resistor, it's nowhere near the size required to burn all the energy that the motor is generating.  It's job is just to limit the bus voltage to the supply rail so you don't blow up capacitors or exceed the voltage rating of any other parts in the system.  If you watch the bus voltage during a decel regen event, you will see that the bus only gets pumped (and the regen resistor is therefore only switched in) for a short portion of the beginning of a hard decel until the summed regen-voltage plus the applied-voltage drops back below the bus voltage as the motor slows down.  So yes, during that initial active hard decel/regen period there is a condition where the bus voltage can be higher than the pack voltage.  But it doesn't exist for anywhere near the entire decel/regen period, and it may not exist if the decel isn't hard enough (you hopefully don't always lock up your brakes in your car when you stop).  Even if this bus pumping is the source of all the regen energy, there needs to be something like a buck converter there to limit the current into the pack.

tl:dr = Motor regen voltage by itself is most likely going to be lower than pack voltage and even hard decel events where the bus gets pumped up don't create a situation anywhere near the amount of reclaimed energy EVs claim get back into the batteries during regen.

So that leaves me with my initial assumption that there should be some sort of current controlled boost/buck converter in the EV inverters that bumps up the backEMF regen voltage so it can be fed back in to charge the battery pack (in a controlled way) during everyday normal not panic-brake-from-max-velocity regen events.  But this system (or something like it) never seems to be mentioned anywhere when talking about EV inverters and regen so it makes me think I'm crazy.

Ok.  Attack.  Show me what I'm missing.  Preferably with a schematic or block diagram of current flow during regen that actually charges the battery pack from the regen energy.
Title: Re: Technical breakdown of EV regen???.........
Post by: uer166 on August 05, 2023, 01:14:35 am
Sure, here is the one but you're missing based on the "I don't see how a 3phase bridge acting as an inverter to actively control the motor can also do simultaneous duty as a boot/buck regen regulator." statement:

.
.
.
An inverter IS a synchronous buck regulator at all times. There is no practical difference in the topology, and the only control difference is that the setpoint is time-varying.

What is a synchronous buck regulator when running in reverse? A synchronous boost regulator! If your load that you're buck converting to, has a voltage source component, you can just as easily boost the voltage source back into your supply.

To help understand, draw one leg of a 3-phase inverter, with the load being an inductor+voltage source in series. That is exactly what a motor looks like when it's spinning (whether it's driven or is in regen mode, it looks the same).
Title: Re: Technical breakdown of EV regen???.........
Post by: PCB.Wiz on August 05, 2023, 01:19:44 am
The question here is specifically about regen energy that goes back into charging a high voltage battery and the circuitry path that needs to take.  I don't see how a 3phase bridge acting as an inverter to actively control the motor can also do simultaneous duty as a boot/buck regen regulator.

Maybe look at buck-boost regulators, those can step down, and step-up, depending on where you want the energy to flow.

On top of decisions about up-converting for regen charging, the system also needs to make a decision when the Battery system current/thermal envelope is reached and then it needs to bring real brakes into play too.
Title: Re: Technical breakdown of EV regen???.........
Post by: Kim Christensen on August 05, 2023, 03:11:06 am
Here's a very simplified explanation. (https://ww1.microchip.com/downloads/en/devicedoc/regenerative%20braking%20of%20bldc%20motors.pdf) Boost diagrams start on page 10.
Page 13 shows how a bridge is used as a boost converter with the top 3 FETs being used as diodes.
Title: Re: Technical breakdown of EV regen???.........
Post by: Smokey on August 05, 2023, 07:56:39 am
Thanks for the replies.  Ok.  Interesting stuff.  That microchip slideshow is pretty good, and hits a lot of my questions about basic operation like the need to boost the regen voltage above battery pack voltage to get current to flow into the pack.  It would be nice to actually be able to run the simulations they have in the slides.

Let me see if I can put this together in one place.  I'm just saying stuff you guys already said but adding the pictures here...

The schematic of a synchronous boost converter.....
(https://www.researchgate.net/publication/331955412/figure/fig1/AS:11431281179225420@1691165465700/Conventional-synchronous-boost-converter.png)

...looks an awful lot like one phase of a motor, backwards....
(https://www.researchgate.net/profile/Samuel-Wang-11/publication/271197818/figure/fig1/AS:295151080624130@1447380909185/BLDC-motor-and-three-phase-inverter.png)

As shown in the microchip slide with the top fet acting as a diode, (page 11)
(https://www.eevblog.com/forum/projects/technical-breakdown-of-ev-regen/?action=dlattach;attach=1844764;image)

Ok, So I'll buy that is the basic mechanism by which regen voltage gets boosted to the point where it will flow current back into the battery using the same inverter circuitry to do both the bucking and the boosting. 

There are still some questions about the details that are unclear though.
1) Because of the AC nature of the phase voltages (swinging positive and negative), and the inaccessibility of the neutral point of the Wye connected motor (you can only get at phase-phase voltage, not phase-neutral center point references), it's unclear what each half-bridge of this three-phase boost converter sees as the source voltage that it's trying to boost.  Does it only boost when the equivalent phase-phase voltage of it's motor phase and the adjacent phase are positive?  Does that mean at least one phase of the bridge (the negative one/ones) is/are off when it's regen boosting?
2) The boost converter is going to get really inefficient as the phase voltage drops to zero through the electrical cycle.  If they cut off the boosting action at some point, then the other phase(s) will need to take up the slack to keep the same level of regen current and braking action.  That would seem to not evenly distribute the stress in the inverter.
Title: Re: Technical breakdown of EV regen???.........
Post by: Someone on August 05, 2023, 08:14:16 am
A [arbitrary type] motor couples current to motive force, and in reverse generates current from force (torque). All a bridge is doing is swapping the direction of the current flow, to control the current in the motor winding averaged over a mechanically realistic timeframe. Winding inductance is in many ways a convenience that allows integration of the bulky/heavy/expensive magnetics that would otherwise be required for a practical commutation frequency.
Title: Re: Technical breakdown of EV regen???.........
Post by: uer166 on August 05, 2023, 08:23:09 am
2) The boost converter is going to get really inefficient as the phase voltage drops to zero through the electrical cycle.  If they cut off the boosting action at some point, then the other phase(s) will need to take up the slack to keep the same level of regen current and braking action.  That would seem to not evenly distribute the stress in the inverter.

Yeah this is pretty much exactly what happens at the power stage level. There are points when one phase outputs nothing and the other two output all the power, such is the life of an AC inverter. The ripple isn't too bad however since it's 3-phase. A 1-phase regen would be much worse!
Title: Re: Technical breakdown of EV regen???.........
Post by: T3sl4co1l on August 05, 2023, 09:21:34 am
...You hopefully most likely sized the battery pack voltage to meet your top speed requirements based on the backEMF constant of the motor you are using with some additional headroom in the pack voltage.  So in generator mode, the motor is only generating anywhere near pack voltage by itself when it's spinning at near max velocity.  Hopefully you aren't often braking hard from max velocity very often.  So that means your motor regen voltage is essentially always lower than the pack voltage.  Applying that lower voltage to the pack will not cause current to flow back into the pack.

Right, aside from speeding down a steep mountain road at literally terminal velocity, the only way you draw power from the motor is with a boost converter.  (Basically the inverter will be functioning as a multiphase boost PFC, with a heck of a lot more features than a regular mains PFC.)


Quote
...During the beginning of a hard active controlled decel, the inverter is indeed commanding an opposite voltage than the motor is generating as backEMF.  This indeed causes the applied voltage and the backEMF to add together and the bus voltage can get pumped up higher than the supply.

Which would surely result in current flowing into a well behaved supply (one that works as well forwards as backwards, like a battery that can be dis/charged equally well), no?  So the inverter, while actively switching, is capable of returning more power than it consumes (by itself)?


Quote
This is the "extra" voltage that typically gets shunted with a resistor in servo systems.  But the issue here is that the inverter is still pulling current OUT of the battery pack to push against the forward rotation of the rotor and actively slow down the motor in a controlled way.

There seems to be some misconceptions here.  Are you approaching this say from the point of view of an analog amplifier?  In that case, power can't be returned to the supply, and power dissipation in fact increases when consuming power.

In a class D amplifier, power is conserved, and if the motor isn't drawing power, it's delivering power.  And if the converter has high efficiency, then it isn't dissipating either, and power either flows into or out of the supply.

Is that too high-level of a description?  You must acknowledge that it's true; it's a thermodynamic necessity.  (Thus leaving the question: how, mechanically, on the low level, does that necessity occur?)  Would it help to study synchronous converters?  Would a DC demonstration suffice?  Is there a complication that you're missing between the DC and AC case?  (Basically to say: you don't understand, or aren't comfortable enough with, the transform from rotating to static reference frame? Or you'd prefer not using a transform at all, instead working with the line phases directly?)


Quote
If you look at the size of the regen shunt resistor, it's nowhere near the size required to burn all the energy that the motor is generating.  It's job is just to limit the bus voltage to the supply rail so you don't blow up capacitors or exceed the voltage rating of any other parts in the system.  If you watch the bus voltage during a decel regen event, you will see that the bus only gets pumped (and the regen resistor is therefore only switched in) for a short portion of the beginning of a hard decel until the summed regen-voltage plus the applied-voltage drops back below the bus voltage as the motor slows down.  So yes, during that initial active hard decel/regen period there is a condition where the bus voltage can be higher than the pack voltage.  But it doesn't exist for anywhere near the entire decel/regen period, and it may not exist if the decel isn't hard enough (you hopefully don't always lock up your brakes in your car when you stop).  Even if this bus pumping is the source of all the regen energy, there needs to be something like a buck converter there to limit the current into the pack.

...Or, if you're coming at this from a particular servo example, mind that they might be driving it so hard that it's not generating at all.  Which is basically to say, they are regenerating, but at such low efficiency that it might be burned entirely in losses (mainly winding resistance); or even be delivering extra power from the source (plugging mode operation(!)).

The resistor can be small of course because it only needs to absorb inertia, not continuous power.  A small one wouldn't be a great idea for a large rotating system, or something with a lot of moving mass in any case, but most servo applications aren't that, so it's fine.

If you attached such a servo to another motor, say set for constant RPM, and changed the servo's RPM or torque setpoints to draw power from/to the motor, you will observe continuous power, and much more heating in the resistor.


Quote
So that leaves me with my initial assumption that there should be some sort of current controlled boost/buck converter in the EV inverters that bumps up the backEMF regen voltage so it can be fed back in to charge the battery pack (in a controlled way) during everyday normal not panic-brake-from-max-velocity regen events.  But this system (or something like it) never seems to be mentioned anywhere when talking about EV inverters and regen so it makes me think I'm crazy.

Yeah, it's easily glossed over; these systems are simply made with reciprocity / symmetry, so you just set the motor torque for negative instead of positive and tada so too goes the supply current. :)

Tim
Title: Re: Technical breakdown of EV regen???.........
Post by: T3sl4co1l on August 05, 2023, 09:58:14 am
There are still some questions about the details that are unclear though.
1) Because of the AC nature of the phase voltages (swinging positive and negative), and the inaccessibility of the neutral point of the Wye connected motor (you can only get at phase-phase voltage, not phase-neutral center point references), it's unclear what each half-bridge of this three-phase boost converter sees as the source voltage that it's trying to boost.  Does it only boost when the equivalent phase-phase voltage of it's motor phase and the adjacent phase are positive?  Does that mean at least one phase of the bridge (the negative one/ones) is/are off when it's regen boosting?
2) The boost converter is going to get really inefficient as the phase voltage drops to zero through the electrical cycle.  If they cut off the boosting action at some point, then the other phase(s) will need to take up the slack to keep the same level of regen current and braking action.  That would seem to not evenly distribute the stress in the inverter.

Right, there are some constraints: three converters define three voltages (after averaging out the PWM carrier), so the common mode (V1+V2+V3) is a free variable, and we probably don't want the converters hard saturating.  Easily resolved by keeping them centered, and running a sine wave (give or take any harmonic modifications, should it be so desired) on each with respect to the mean.  Which also solves DC offset (or, mostly, and a current servo loop can keep the branches balanced).

Current varies with voltage, and in particular, current is near zero when voltage is near zero (granted, when PF ~ 1).  And, being that a full bridge is used, "zero volts" isn't actually zero at the converter, but conveniently half way between supplies, so it has plenty of muscle to force current at such voltages if needed.  (And when PF < 1, reactive or harmonic currents are easily managed, no they don't constitute real power, any current flow here is "wasted", but that's simply true of any AC system, class D or not!)

Remember, in a three-phase system, continuous power is available, at no ripple; the phases go in sequence, whenever one is "zero" voltage (read: middle of the inverter range), the other two are high and low (+/-120°), and when one is peak (TDC/BDC in automotive parlance) the other two are drawing equal current* at half voltage (i.e. +/-60° from BDC/TDC respectively).

*Again, give or take phase shift.

Tim
Title: Re: Technical breakdown of EV regen???.........
Post by: DarkMode on August 06, 2023, 01:01:11 am
Hey, I think and I'm Assuming here: What does Assuming mean? Making an Ass out of Me and You, mostly me  :palm:

The confusion is how Electrical Energy flows in circuits - how does it go one way, then another.
That's because you might only have some knowledge of 'Classic' electronics

There is no secrete sauce here - the only secrete is that all circuits are transmission lines https://www.bing.com/images/search?view=detailV2&ccid=fHZY5RK6&id=15DFF8DC941437FA8E5C6B69B77EF07AAD051144&thid=OIP.fHZY5RK6p8brmP7H5sWopwHaEo&mediaurl=https%3a%2f%2fjooinn.com%2fimages%2fpower-lines-19.jpg&exph=1600&expw=2560&q=power+lines+low+res&simid=607995528016430101&FORM=IRPRST&ck=648B4CF8287B1CCAED2B172B11339206&selectedIndex=1&ajaxhist=0&ajaxserp=0 (https://www.bing.com/images/search?view=detailV2&ccid=fHZY5RK6&id=15DFF8DC941437FA8E5C6B69B77EF07AAD051144&thid=OIP.fHZY5RK6p8brmP7H5sWopwHaEo&mediaurl=https%3a%2f%2fjooinn.com%2fimages%2fpower-lines-19.jpg&exph=1600&expw=2560&q=power+lines+low+res&simid=607995528016430101&FORM=IRPRST&ck=648B4CF8287B1CCAED2B172B11339206&selectedIndex=1&ajaxhist=0&ajaxserp=0)

Especially in AC circuits, DC could be thought of as AC at 0 Hertz.
The energy that passes though the wires are measured in Watts, which is Amps x Volts (which are measurements of the energy). The energy is in the form of Electro and Magnetic waves.

While many will disagree with my comments and I'm no EE and I have a fundamental disagreement with the water model, that's where most hobbyists are, stuck in the water model.

We use wires (conductors and Semi-conductors) to 'direct' electrical energy in the path we want it to follow

As you are familiar with BackEMF, this energy is always ready to be dumped back into the circuit power powering the Motor, this is bad, as you know because the Electrical energy that is flowing backwards can and will damage the circuits that are powering the motor, so they make a short circuit with semi-conductors to dissipate that energy as IR (heat), However if we can channel that Electrical Energy back into the Battery, then we can have something fancy called a Regen system.
 
The Electrical Energy doesn't care which way it goes, it only follows the conductor, We have to care or 'Engineer' the circuits so it does no Damage.


Others here have shown you circuit diagrams of such systems and referring to Buck and Boost converts (Which are AC devices)
AC devices allow Electrical Energy, the Watts of power to flow in any direction, the inputs and outputs are 'Tammed' back to DC for the Semiconductors to work correctly.

What I'm saying is this:
The Energy in the Circuit can travel in any direction, we try and direct it to the path we want.
AC circuits can have the Energy in a circuit travel in any direction (the Sinewave, right?)

The BackEMF in any motor, can be used to recharge batteries, we can reuse some of the Components already connected to the Motor (as they are AC components, referencing Buck/Boost converters), then the Semiconductors will filter that Energy to flow back into the battery (Diodes, Voltage regulators, Battery management devices).

I hope this helps.

Here's a link to a video from Veritasium (Derek) about how Electrical Energy works - This video is the follow up to the his first video.
If there is 1 video that you are willing to watch, this is the one. https://www.youtube.com/watch?v=oI_X2cMHNe0&ab_channel=Veritasium (https://www.youtube.com/watch?v=oI_X2cMHNe0&ab_channel=Veritasium)
This isn't spooky science, it's what's called a Transmission line and every circuit is a transmission line. Transmission lines are not taught correctly to Hobbyists, but they are taught to Electrical Engineers, that's where there is a disconnect of information (in my opinion).

I had exactly the same question as you did not so long ago.
Title: Re: Technical breakdown of EV regen???.........
Post by: DarkMode on August 06, 2023, 01:35:49 am
The Science Asylum had their video out about 4 years ago.
It was the inspiration to Veritasium first video.
https://www.youtube.com/watch?v=C7tQJ42nGno&ab_channel=TheScienceAsylum (https://www.youtube.com/watch?v=C7tQJ42nGno&ab_channel=TheScienceAsylum)
Title: Re: Technical breakdown of EV regen???.........
Post by: IanB on August 06, 2023, 01:48:33 am
Is it relevant that EVs contain an onboard battery charger, that provides the necessary control and regulation to charge the battery safely? When you plug in an external power lead, it is this onboard charger that handles the charging.

Therefore, it would seem to be a small step to take the regen power produced under braking and feed it to this onboard charger. Is this perhaps what actually happens?
Title: Re: Technical breakdown of EV regen???.........
Post by: T3sl4co1l on August 06, 2023, 02:23:25 am
Is it relevant that EVs contain an onboard battery charger, that provides the necessary control and regulation to charge the battery safely? When you plug in an external power lead, it is this onboard charger that handles the charging.

Therefore, it would seem to be a small step to take the regen power produced under braking and feed it to this onboard charger. Is this perhaps what actually happens?

The charger has very different responsibilities and behavior; it's made for low power (even 10s kW is less than the 100s the power plant deals with), and may start and stop gradually depending on state of charge and available mains power.

The same constraints can be integrated into the powertrain, so as to avoid overcharging or overvolting the battery, without adding weird new nonlinear paths for current flow and that need to be tracked by still more control logic.

Not to say they haven't done it before, I'm sure someone's done something convoluted like that.  Automotive engineers sure as hell love their complexity.  But at least as far as I know, that's not been done for this specifically.

I can certainly speak for myself and say: I insist upon simplifying the system as much as is reasonably feasible given system design constraints.  Sometimes that does mean using a common rail, and disconnecting the battery from it, using power converters; but other times it means using the battery as the common rail, and a synchronous converter is a natural fit.

Tim
Title: Re: Technical breakdown of EV regen???.........
Post by: DarkMode on August 06, 2023, 02:28:58 am
Is it relevant that EVs contain an onboard battery charger, that provides the necessary control and regulation to charge the battery safely? When you plug in an external power lead, it is this onboard charger that handles the charging.

Therefore, it would seem to be a small step to take the regen power produced under braking and feed it to this onboard charger. Is this perhaps what actually happens?

Yes, that would be it.
The Electromagnetic energy from the BackEMF and then as it transitions into a 'Generator' is funnelled back into the Battery management system.
It's about taking that excess energy that would be wasted and transferring it into a form that the Battery system can use.

I think the oversimplification of Motor can be a Generator too is where some of the confusion lies, as stated by the OP.

I guess we need to separate the differences between engineering and practicality vs 'do with what we have'. An EV motor is designed to output at much energy into turning the wheels - that's the design, The reverse of that is the Generator, which is designed to Output the most energy from turning the input shaft. These are different engineering challenges and will result in different configurations of wire/magnets/position etc.

When we use the Regen braking (The system of converting the excess energy flowing) in a direction that is not productive and is destructive (with BackEMF) for instance. Then the AC energy is converted into a DC form that a Battery management system can use.

Like with any device, there will be protections in place, there will be monitoring circuitry to stop too much Energy from reaching the BMS or from destroying any of the AC components, like Buck and Boost converters etc.

Title: Re: Technical breakdown of EV regen???.........
Post by: Smokey on August 06, 2023, 03:04:01 am
I'm fairly confident that the regen current does NOT go through the BMS/Charger, at least not in all configurations.  I can think of a few configurations where the BMS/Charger is it's own box with no direct access to the motor windings, but the system still has high current regen charging. 

...
In a class D amplifier, power is conserved, and if the motor isn't drawing power, it's delivering power.  And if the converter has high efficiency, then it isn't dissipating either, and power either flows into or out of the supply.
...

I have run many servo systems from 1quadrant power supplies (+source only,  no sinking ability) and you are still able to decelerate a motor in this configuration.   
Title: Re: Technical breakdown of EV regen???.........
Post by: T3sl4co1l on August 06, 2023, 03:07:58 am
I have run many servo systems from 1quadrant power supplies (+source only,  no sinking ability) and you are still able to decelerate a motor in this configuration.

Well yeah, I would imagine so. You said they had onboard resistors?

Depending on motor type, it could also be using the motor as its own brake, for example DC-biasing an induction machine.

Tim
Title: Re: Technical breakdown of EV regen???.........
Post by: Smokey on August 06, 2023, 03:25:24 am
I have run many servo systems from 1quadrant power supplies (+source only,  no sinking ability) and you are still able to decelerate a motor in this configuration.

Well yeah, I would imagine so. You said they had onboard resistors?

Depending on motor type, it could also be using the motor as its own brake, for example DC-biasing an induction machine.

Tim

Hah.  Good point.  But even without regen resistors.  Most systems actually didn't have them unless they are really high inertia and/or require really high decel rate that gets into that bus pumping region.  I worked almost exclusively with exterior permeant magnet motors, so my intuition of induction is way worse.  With permeant magnet motors there is always a magnetic field to push against, to either accelerate or decelerate the rotor.  You are not limited to shunting current to slow down a motor.  If you have supply voltage headroom you can always apply a stator current that will push against the rotor magnetic field to actively decelerate. 
Title: Re: Technical breakdown of EV regen???.........
Post by: minifloat on August 06, 2023, 05:10:47 am
If you have supply voltage headroom you can always apply a stator current that will push against the rotor magnetic field to actively decelerate.

If your supply headroom approaches zero, there is still possibility to fieldweaken the PMSM. Most EVs do that, most EVs have a top speed at more than three times of what Vbat and motor KV allow.

If you have motor current magnitude headroom, you can always apply a stator current that will push against the remaining rotor magnetic field to actively accelerate in either direction.

So, the limitation is stator current and/or the point of partially permanently demagnetizing the rotor magnets (again by current), rather than battery voltage.

br, mf
Title: Re: Technical breakdown of EV regen???.........
Post by: rstofer on August 07, 2023, 04:31:14 pm
Lets assume the pack is near full charge (but not fully charged, because yes I understand that a fully charged pack has nowhere to put the regen energy). 

Which lead to a recharging recall on the Chevy Bolt.  Owners were advised to enable 'Hill Mode' so that there was room to put the regen charge when driving away from a house on a hill.  In case they couldn't navigate the menu, the dealer would change the setting for them.  Hence the recall...  All it did was limit the charge to 80% which, of course, limited the range to 80%

Then there is the more famous admonition to aways park the car outside, never in the garage.
Title: Re: Technical breakdown of EV regen???.........
Post by: Smokey on August 07, 2023, 08:08:37 pm
Lets assume the pack is near full charge (but not fully charged, because yes I understand that a fully charged pack has nowhere to put the regen energy). 

Which lead to a recharging recall on the Chevy Bolt.  Owners were advised to enable 'Hill Mode' so that there was room to put the regen charge when driving away from a house on a hill.  In case they couldn't navigate the menu, the dealer would change the setting for them.  Hence the recall...  All it did was limit the charge to 80% which, of course, limited the range to 80%

Then there is the more famous admonition to aways park the car outside, never in the garage.

One of my friends said you can feel the difference in his Tesla when the battery is fully charged and so the car uses all mechanical braking and no regen, especially since it's set up for one-pedal-driving normally. 

You can also short the motor leads together and shunt the generated current that way.  It works surprisingly well as a motor brake.  Not sure why that wasn't an option in EVs to retain some of the "regen braking" force effect without actually exporting that energy back into the battery pack.  It would contribute to heating in the stator, but I cant' imagine it's more heat than the system is designed to dissipate. Dunno..

Back to the question at hand though....
If the inverter is acting directly as a boost converter during regen, something needs to be controlling the sum total constant current flowing back into the battery.    I think the three phases are going to be acting as independent voltage/current loops with AC varying voltage sources.  That sounds rough on it's own without considering it needs to be switching back and forth between this boost mode and the normal 3phase inverter buck mode.
Title: Re: Technical breakdown of EV regen???.........
Post by: langwadt on August 07, 2023, 08:35:55 pm
Lets assume the pack is near full charge (but not fully charged, because yes I understand that a fully charged pack has nowhere to put the regen energy). 

Which lead to a recharging recall on the Chevy Bolt.  Owners were advised to enable 'Hill Mode' so that there was room to put the regen charge when driving away from a house on a hill.  In case they couldn't navigate the menu, the dealer would change the setting for them.  Hence the recall...  All it did was limit the charge to 80% which, of course, limited the range to 80%

Then there is the more famous admonition to aways park the car outside, never in the garage.

One of my friends said you can feel the difference in his Tesla when the battery is fully charged and so the car uses all mechanical braking and no regen, especially since it's set up for one-pedal-driving normally. 

You can also short the motor leads together and shunt the generated current that way.  It works surprisingly well as a motor brake.  Not sure why that wasn't an option in EVs to retain some of the "regen braking" force effect without actually exporting that energy back into the battery pack.  It would contribute to heating in the stator, but I cant' imagine it's more heat than the system is designed to dissipate. Dunno..

Back to the question at hand though....
If the inverter is acting directly as a boost converter during regen, something needs to be controlling the sum total constant current flowing back into the battery.    I think the three phases are going to be acting as independent voltage/current loops with AC varying voltage sources.  That sounds rough on it's own without considering it needs to be switching back and forth between this boost mode and the normal 3phase inverter buck mode.

afaiu tell the math just works out, you don't have to switch between modes.  If you command a positive torque it powers the motor, if you command a negative torque it charges the battery. In both cases you need a current limit protect the motor/battery/inverter so that's already part of the control loop


Title: Re: Technical breakdown of EV regen???.........
Post by: IanB on August 07, 2023, 10:25:25 pm
Back to the question at hand though....
If the inverter is acting directly as a boost converter during regen, something needs to be controlling the sum total constant current flowing back into the battery.    I think the three phases are going to be acting as independent voltage/current loops with AC varying voltage sources.  That sounds rough on it's own without considering it needs to be switching back and forth between this boost mode and the normal 3phase inverter buck mode.

Basically, if the battery is big enough, I think it can be considered as a giant power sink, similar to an electrical grid. If you push power into it, it will just absorb it like adding water to the sea. This is only going to fail if the battery is fully charged and cannot sink any more current.
Title: Re: Technical breakdown of EV regen???.........
Post by: Smokey on August 08, 2023, 12:24:03 am
Buy how does that explain the ability for the inverter to apply negative torque with a 1quadrant power supply and no regen resistor?
Title: Re: Technical breakdown of EV regen???.........
Post by: Someone on August 08, 2023, 12:43:11 am
Buy how does that explain the ability for the inverter to apply negative torque with a 1quadrant power supply and no regen resistor?
As already stated above by yourself:
You can also short the motor leads together and shunt the generated current that way.  It works surprisingly well as a motor brake.
Title: Re: Technical breakdown of EV regen???.........
Post by: uer166 on August 11, 2023, 05:34:27 pm
Not sure why that wasn't an option in EVs to retain some of the "regen braking" force effect without actually exporting that energy back into the battery pack.  It would contribute to heating in the stator, but I cant' imagine it's more heat than the system is designed to dissipate.

Full regen on a Model S is well over 100kW or power going back to battery with a tiny fraction lost to stator. Good luck dissipating that in the motor itself! Mechanical braking power can exceed 1MW on a Tesla, 0.5*M*V^2 is quite a bit of energy dissipated in a short amount of time.
Title: Re: Technical breakdown of EV regen???.........
Post by: T3sl4co1l on August 11, 2023, 07:23:51 pm
I mean, you can say the same for the piddly brake rotors too... the motors are likely heavier, granted they don't have as high a temperature rating (nor will the heat be evenly distributed, it'll be mostly the wire I think?), but it takes a lot of energy to heat up a slug of metal.  What's a typical commuter size rotor, upwards of 10kg?  At 0.45 kJ/(kg*K) that's only a 222K rise for 1MJ.  Enough to burn the oil off but not even get 'em glowing.  And that's just one rotor, not two* or four!

*Front rotors take most of the load, usually.

Not to say, dissipating it in the motor would be at all a good way to do it... least of all when you've got a fuckoff massive battery and entire drive just sitting there hungry to process joules. ;D

Tim