Newb Asks: How do we keep regen disabled?

Post Reply
User avatar
Gregski
Posts: 2196
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 305 times
Been thanked: 398 times
Contact:

Newb Asks: How do we keep regen disabled?

Post by Gregski »

So I get the general concept of "regen braking" if you will. We owned a Nissan Leaf for three years.

My question is how do I prevent damaging anything or things from going BOOM when I first put together my 1969 Chevy truck (drum brakes at all four corners) with the minimal EV components to make it go up and down my street [ahem] a closed off private road. OR possibly drive it around for a while without regen (dumb I know) but also minimal, just to grasp the concept and keep things simple.

We hear these stories or myths of electric vehicles exploding when they are towed or roll back down a hill and stuff, so it has me concerned.

And if regen is disabled how does that work, where does the energy go does it just spill out the orange cable on to the road?

Transmotor: Lexus GS450h
Inverter: Lexus GS450h
Damien Maguire Ver 2 GS50h Controller (gs450h_v3_user firmware)
BMW 530e HV battery pack
BMW E46 throttle

no DC-DC converter for this test drive (yes I know my 12 volt car battery will get drained, but this is a 2 minute test drive)
no battery charger
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Newb Asks: How do we keep regen disabled?

Post by arber333 »

Gregski wrote: Tue Mar 01, 2022 6:22 pm So I get the general concept of "regen braking" if you will. We owned a Nissan Leaf for three years.

My question is how do I prevent damaging anything or things from going BOOM when I first put together my 1969 Chevy truck (drum brakes at all four corners) with the minimal EV components to make it go up and down my street [ahem] a closed off private road. OR possibly drive it around for a while without regen (dumb I know) but also minimal, just to grasp the concept and keep things simple.

We hear these stories or myths of electric vehicles exploding when they are towed or roll back down a hill and stuff, so it has me concerned.

And if regen is disabled how does that work, where does the energy go does it just spill out the orange cable on to the road?
When i disable regen (or take it to a minimum) the code inside inverter will keep the motor freewheeling against its own backemf and there will be no voltage difference dV generated, hence no regen and no torque as well. That is as simple as explanation can go.

However there is a twist... when i get to a speed of field weakening, backemf voltage is increased over that of inverter capability and PMSM motor will create some dV which will cause some regen. Maybe 5A worth will be generated above 120km/h (8000rpm) despite motor freewheeling. If that energy would not have a way to spend itself on battery it could cause overvoltage on the IGBT junction and capacitor.

Thus i recommend with PMSM motor to keep the DC contactor connected at all times when using vehicle. Notaus button should only act to remove PWM in inverter not to break DC link. When i explained that system logic to my TUV inspector he agreed my circuit is adequate and safe. Of course he went for a test drive. :twisted:

ACIM motor does no such thing as it becomes a rotating lump of iron if you remove core excitation...
User avatar
Gregski
Posts: 2196
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 305 times
Been thanked: 398 times
Contact:

Re: Newb Asks: How do we keep regen disabled?

Post by Gregski »

arber333 wrote: Tue Mar 01, 2022 6:39 pm When i disable regen (or take it to a minimum) the code inside inverter will keep the motor freewheeling against its own backemf and there will be no voltage difference dV generated, hence no regen and no torque as well. That is as simple as explanation can go.
so what I am hearing is that the actual magic happens inside the motor, yes the Inverter controls it, but some switch, solenoid, or actuator disengages something rather inside the motor, correct?

here is an excerpt from my VCU Arduino code (and even if I knew C++ I don't think I could make sense of this cryptic writing) plus the entire //regen data// is gone from subsequent code versions???

/////////regen data///////////////
int16_t pedalmap_drive[11][6] = { //torque 0-3500 (full scale for MG2)
{350, 700, 1050, 1575, 2450, 3500},
{175, 525, 1050, 1575, 2450, 3500},
{0, 350, 875, 1575, 2450, 3500},
{-350, 105, 765, 1487, 2406, 3500},
{-525, 0, 656, 1400, 2362, 3500},
{-525, -35, 546, 1312, 2318, 3500},
{-392, -70, 437, 1225, 2275, 3500},
{-312, -105, 328, 1137, 2231, 3500},
{-259, -140, 218, 1050, 2187, 3500},
{-221, -175, 109, 962, 2143, 3500},
{-193, -140, 0, 875, 2100, 3500}};


then later on under void setup() I see this:


htm_data[63]=(-5000)&0xFF; // regen ability of battery
htm_data[64]=((-5000)>>8);




anything else pertaining to regen is commented out


//int RegenRange=0; //value within pedal travel where regen starts
//int MaxRegenTorque=0; //max regen torque at min throttle position


//double xRegenRPM[5] = {0,100,1000,6000,10000}; //interpolation table, speeds, for regen, rpm, mg2_speed
//double yRegenTRQ[5] = {0, 0, 100, 100, 60}; //interpolation table, torques, for regen, %
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
User avatar
Gregski
Posts: 2196
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 305 times
Been thanked: 398 times
Contact:

Re: Newb Asks: How do we keep regen disabled?

Post by Gregski »

so I decided to go back and take a fine comb through the Lexus GS450H VCU Support Thread and came across Artur's inquiry Re: Lexus GS450H VCU Support Thread which I will repost to save you from clicking
arturk wrote: Wed Jun 24, 2020 5:04 am Did anyone have success with regen?
I have tried adjusting values of htm_data 63, 64 in the code:

Code: Select all

htm_data[63] = (-5000) & 0xFF; // regen ability of battery
htm_data[64] = ((-5000) >> 8);
but no trace of regen.
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
User avatar
Gregski
Posts: 2196
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 305 times
Been thanked: 398 times
Contact:

Re: Newb Asks: How do we keep regen disabled?

Post by Gregski »

to which celeron55 replied
celeron55 wrote: Sun Sep 27, 2020 10:02 pm
sfk wrote: Sun Sep 27, 2020 7:51 pm If there is any specific data you are interested in please instruct me.
I recall some discussion about problems with regen. Maybe make sure to record some of that.
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
User avatar
Gregski
Posts: 2196
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 305 times
Been thanked: 398 times
Contact:

Re: Newb Asks: How do we keep regen disabled?

Post by Gregski »

then Matt goes on to say
mdrobnak wrote: Sun Apr 04, 2021 8:42 pm
nasekin wrote: Sun Apr 04, 2021 8:38 pm I want to put MG2 on a mechanical box, only the motor, how to use the MG1 input to charge the battery, on the version 2 board, half of the parts can not be soldered? how do I set up recuperation?
This thread is for the VCU, which operates the controller as it is in the original vehicle. No charging via MG1. Recuperation / regenerative braking is something that is still being worked on.


On another note, has anyone tested the max power capabilities with a ~360V battery in using this VCU but going through the standard input which goes through the boost / buck circuitry? (This is related to https://openinverter.org/forum/viewtopi ... =14&t=1547)

-Matt
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
User avatar
Gregski
Posts: 2196
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 305 times
Been thanked: 398 times
Contact:

Re: Newb Asks: How do we keep regen disabled?

Post by Gregski »

things go South from there:
Bassmobile wrote: Sun May 09, 2021 8:59 pm
86elcamino wrote: > I plan on towing a ski boat
That sounds very ambitious. But I think that this platform is not suited for novice / first timers. There are a LOT of loose ends, and you should not count on this being the reliable way to pull the old boat down to the lake for some weekend fun.

Mr. Maguire no longer owns the gs450H powered car, the SuperYacht BMW E65 7 Series, Bexus, or whatever it's called now. He sold it off to another forum member. The new owner might be able to answer your questions about towing capability? Here is the thread: https://openinverter.org/forum/viewtopi ... 284#p26284

Regenerative breaking has not been sorted out on this platform. There are zero mentions of regenerative braking in the gs450h VCU Wiki, and so it should be assumed that nobody is doing regen with the platform at this time.
Dynamic HIGH / LOW gear shifting isn't currently supported / possible. There are methods to change gears via the simplified serial interface, with the dummy’s version of the firmware. The wiki claims
GS450H VCU Wiki wrote:both current (amps) and power (kw) gauges are inoperative as of this release.
So that might be a reason not to use this firmware and wait for a later release, unless you have some other means of system consumption measurements. Don't blow yourself up!

Read the wiki! https://openinverter.org/wiki/Lexus_GS4 ... U_Firmware

As for future releases of the firmware, it seems as though further development may be up to the adventurous hackers in this community to accomplish. It's not Mr. Maguire's focus at present. Also, due to certain parts shortages, it was stated that production of GS450H VCU units has ceased. Suspect that the new agnostic controller, aka Zombieverter will pick up the slack where this left off.
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
User avatar
Gregski
Posts: 2196
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 305 times
Been thanked: 398 times
Contact:

Re: Newb Asks: How do we keep regen disabled?

Post by Gregski »

and then we went a full circle, and the gentlemen who brought it up in the first place offered a solution, my man!
Dilbert wrote: Mon May 10, 2021 5:16 pm
Bassmobile wrote: Mon May 10, 2021 5:04 pm
Dilbert wrote: Mon May 10, 2021 4:47 pm Yes i believe one of the users tested what i posted for the regen.
I must have missed that! Please point me in the right direction and I will test it out and post my work to a branch in the repository for all to review and work off of. We have the GS450H installed in two chassis, and a third on the way.
Perfect! It was over on the zombie inverter thread.

https://openinverter.org/forum/viewtopi ... gen#p25176

Arturk tested it out. It will need some tuning for different vehicles, but i think we should have some very gentle default params.
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
User avatar
Gregski
Posts: 2196
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 305 times
Been thanked: 398 times
Contact:

Re: Newb Asks: How do we keep regen disabled?

Post by Gregski »

putting all the pieces together
arturk wrote: Mon May 31, 2021 1:43 am
xp677 wrote: Fri May 28, 2021 7:31 pm As far as I'm aware, regen is just a case of sending negative torque values. This can be mapped against vehicle speed, so that the car only regens above certain speeds.
I can confirm it since I implemented it in my build and reported here:
https://openinverter.org/forum/viewtopi ... 176#p25176

As far as code I posted key function, which is based loosely on Dilbert's code for ZombieVerter.
I use VCUv2 running highly customized version of Damien's v7 code.
Implementation was tested extensively in real road conditions and I am extremely happy with results.
There is more tweaking to be done to take full advantage of regen and achieve perfectly smooth operation. Also I need to add sensor to allow me to monitor amount of braking force requested as my car does not have brake pressure sensor.
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
User avatar
Gregski
Posts: 2196
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 305 times
Been thanked: 398 times
Contact:

Re: Newb Asks: How do we keep regen disabled?

Post by Gregski »

wasn't sure where to post this, so might as well clutter this thread, it's sort of related

Jaunt - Electric Vehicles

Regen braking has nothing to do with brakes || Electric Land Rover Conversion

"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
Post Reply