SDU parameter tuning - major failure - can't select drive gear

Topics concerning the Tesla front and rear drive unit drop-in board
deadsled
Posts: 27
Joined: Thu Oct 08, 2020 3:32 pm
Location: Brisbane, Australia

SDU parameter tuning - major failure - can't select drive gear

Post by deadsled »

Hi all,

Getting my head around tuning the parameters for the first time in my VW bus. Today's test drive was going so well until a STOP - OVERCURRENT error occurred, and then after that I couldn't get the inverter to select a gear (D or R) to drive, so I had to get a tow truck home :(

Backstory - 1973 T2 VW with SDU and 14 Tesla modules installed by professional EV conversion workshop here in Australia. The openinverter board was installed, bench tested and setup in the VW by an expert/friend who is much more adept at this than me. His initial parameters were quite mild, so we ended up copying most of @catphish most recent parameters for a bit more pep and low down torque for getting uphills etc that was missing from the initial setup.

It seemed to be going well, so then I tried a hill start on a very steep hill, upon which it cut out with the overcurrent error. A power cycle cleared the error but I couldn't get the inverter to select a drive gear after that. It would start up in N, and I could see full voltage on the spot values over wifi, but when changing to D or R, the inverter would click and turn off.

Prior to that I was having semi-regular DERATE - TMPHSMAX errors which caused some uncomfortable lurches during take-offs, I plotted tmphs and watched it spike ridiculously quickly at takeoff, even a mild takeoff. Will have to look into that. We do believe the cooling system is very well setup.

I also note that I'm missing a few parameters that others are discussing, must be something to do with the version I have (4.97 R Sine) ? eg fweakstrt isn't there. Attaching my parameter set here.

Any tips would be greatly appreciated!
Attachments
params 180922.json
(1.09 KiB) Downloaded 82 times
User avatar
Peter
Posts: 310
Joined: Fri Dec 14, 2018 9:07 pm
Location: North West Lancs, UK
Been thanked: 8 times

Re: SDU parameter tuning - major failure - can't select drive gear

Post by Peter »

Hi deadsled. Your ocurlim and iacmax are too high I would say, set to 1000 for now with the following just to see if you can get rolling to prove if the inverter is ok.
Check on the plot what your potmin is showing, if its over the 400 value you set it wont be happy to start.
Boost 1500
Fweak 300
udcnom 0
Hope it works.
User avatar
catphish
Posts: 954
Joined: Fri Oct 08, 2021 11:02 pm
Location: Dorset, UK
Has thanked: 93 times
Been thanked: 179 times

Re: SDU parameter tuning - major failure - can't select drive gear

Post by catphish »

Firstly, the bad news, it's very likely that your inverter is dead. If it was working before, but now (with the same settings) immediately shuts down when you put it in gear, an IGBT in the inverter is very likely shorted out. You can confirm this by disconnecting the inverter from the battery, removing the motor terminal cover, and testing continuity in both directions between each motor terminal and each battery terminal. You will likely find that one of them is a dead short in both directions.

Secondly, as always, we want to know why this happened.

As you say, your settings are a copy of mine, which I have tested extensively. During our heatwave (35C ambient) I did have to run less aggressive settings to avoid the TMPHSMAX derating though, I'd suggest in that case, settings of boost=3000 fweak=250 might be more appropriate. I will mention this in my thread because it might not be wise to be recommending people push as hard as 3800/230 if it's going to routinely cause overheating.

Assuming you have a relatively modern version of the SDU logic board from Damien, those settings should not have been aggressive enough to see the overcurrent (1200A) tripped, though I wonder if the TMPHS derating could have caused current spikes.

Damien always reiterates that the cause of inverter failures is always contactors opening. For that reason I always use tripmode=1. In your setup, you are using tripmode=2, so it's possible that your precharge circuit wasn't enough to dissipate the voltage spike that happens when the inverter shuts down.
User avatar
Peter
Posts: 310
Joined: Fri Dec 14, 2018 9:07 pm
Location: North West Lancs, UK
Been thanked: 8 times

Re: SDU parameter tuning - major failure - can't select drive gear

Post by Peter »

Tripmode 1 is the best idea as Catphish suggests.
As an added path to clamp spikes I use suitably voltage rated paralleled TVS in series with a high wattage 25R resistor across the inverter HV input cables as close to the inverter as possible.
deadsled
Posts: 27
Joined: Thu Oct 08, 2020 3:32 pm
Location: Brisbane, Australia

Re: SDU parameter tuning - major failure - can't select drive gear

Post by deadsled »

Shattered to hear that! It was a fairly innocuous fault / failure, just a slow hill start, not like I was mashing the throttle in a drag race or anything.

We started with all the default settings, then just adjusted a few to follow Catphish's setup, so that's why Tripmode 2 was set as it was default and we didn't think of changing that.

The TMPHSMAX error only occurred once about 5min before the overcurrent error. It wasn't a particularly hot day at all, early spring here, maybe it was 26 deg C ambient temperature.

It's back at the conversion workshop now and they will check what Catphish suggested. Praying that it doesn't need a whole new motor!! Really can't believe it if that is the case...

Thanks for your responses so far, Tim.
deadsled
Posts: 27
Joined: Thu Oct 08, 2020 3:32 pm
Location: Brisbane, Australia

Re: SDU parameter tuning - major failure - can't select drive gear

Post by deadsled »

Update from the conversion workshop after checking continuity:

it's zero resistance in one direction and around 50ohms in the other direction on one of the phases. All 3 have continuity but that's not exactly a dead short.

Is that repairable? If not does anyone sell just the inverter board or am I up for a whole new SDU?
User avatar
catphish
Posts: 954
Joined: Fri Oct 08, 2021 11:02 pm
Location: Dorset, UK
Has thanked: 93 times
Been thanked: 179 times

Re: SDU parameter tuning - major failure - can't select drive gear

Post by catphish »

deadsled wrote: Mon Sep 19, 2022 3:52 am Update from the conversion workshop after checking continuity:

it's zero resistance in one direction and around 50ohms in the other direction on one of the phases. All 3 have continuity but that's not exactly a dead short.

Is that repairable? If not does anyone sell just the inverter board or am I up for a whole new SDU?
If one phase is different in any way from the others then I'd say that definitely points to a failed IGBT. In theory it's repairable by replacing the bad IGBT, but I'm not sure I've ever seen it done.

With regard to replacing the inverter, the problem you have is that inverters and motors don't really exist separately, so you're (probably) not going to find an inverter for sale without the rest of the drive unit :cry:

I'm actually hoping to get my hands on an SDU with a failed inverter with a view to designing a replacement inverter, but this is a long term goal, so probably not helpful for you.
deadsled
Posts: 27
Joined: Thu Oct 08, 2020 3:32 pm
Location: Brisbane, Australia

Re: SDU parameter tuning - major failure - can't select drive gear

Post by deadsled »

Thanks for confirming my worst fears :( Seems crazy that one little tap on the throttle can destroy an expensive motor, but that's what it is. I knew that the openinverter option came with inherent risks, and I have to live with it.

Are there any photos on the web or here of the IGBTs that are likely to have failed?
catphish wrote: Sun Sep 18, 2022 1:39 pm Assuming you have a relatively modern version of the SDU logic board from Damien, those settings should not have been aggressive enough to see the overcurrent (1200A) tripped, though I wonder if the TMPHS derating could have caused current spikes.

Damien always reiterates that the cause of inverter failures is always contactors opening. For that reason I always use tripmode=1. In your setup, you are using tripmode=2, so it's possible that your precharge circuit wasn't enough to dissipate the voltage spike that happens when the inverter shuts down.
Yes it is relatively modern version, 4.97, bought from the shop in 2020 if I recall correctly.

The TMPHS derating only occurred once in this drive session, about 5min beforehand.

Why would the default settings be tripmode 2 then, if its known to cause failures?
User avatar
catphish
Posts: 954
Joined: Fri Oct 08, 2021 11:02 pm
Location: Dorset, UK
Has thanked: 93 times
Been thanked: 179 times

Re: SDU parameter tuning - major failure - can't select drive gear

Post by catphish »

Speaking again with Damien about this, he is clear that with tripmode=1, overcurrent errors will not often damage the inverter, and he has done this hundreds of times, but with other tripmodes, damage is almost inevitable.
deadsled wrote: Tue Sep 20, 2022 1:54 am Why would the default settings be tripmode 2 then, if its known to cause failures?
I think that is a reasonable question, and quite simply, the parameters for the SDU were published by Johannes before this problem was well understood and his version has never been updated according to more recent recommendations.

*My* defaults can be found here: https://openinverter.org/parameters/view.html?id=27 - this is a less aggressive version of the configuration that I run myself and it is my hope that this will be adopted as *the* default. It would be interesting to see what else differs.

Another point to note is that I use a much less aggressive throtramp=5 than your throtramp=20, which is another possible explanation for the initial overcurrent error.

If you are interested in *why* tripmode damages the inverter, see the following graph:
run21.png
Notice that when the current is stopped suddenly, there is a brief period where the battery current (blue line) goes negative. This is basically the leftover magnetic energy in the motor coils returning to the battery. If this spike of energy can't get back to the battery, it will cause damage to the inverter.

It is understandable why most people think the safest thing to do in case of a fault is to disconnect the batteries as soon as possible, but without a short delay, this definitely has potential to do more harm than good.

It's a shame that this information has not disseminated more effectively. I would invite anyone and everyone to put this informaiton on the wiki here https://openinverter.org/wiki/Tesla_Mod ... %22SDU%22)

With all that said, none of us speak with authority. This is all hacky and experiemental and sometimes mistakes are expensive. I just hope we can stop repeating them.
User avatar
Peter
Posts: 310
Joined: Fri Dec 14, 2018 9:07 pm
Location: North West Lancs, UK
Been thanked: 8 times

Re: SDU parameter tuning - major failure - can't select drive gear

Post by Peter »

For reference what does Tripmode 2 actually do in case of an overcurrent event, does it switch on the precharge and then drop out the main contactor or is the precharge permanently on at all times ?
User avatar
catphish
Posts: 954
Joined: Fri Oct 08, 2021 11:02 pm
Location: Dorset, UK
Has thanked: 93 times
Been thanked: 179 times

Re: SDU parameter tuning - major failure - can't select drive gear

Post by catphish »

Peter wrote: Tue Sep 20, 2022 6:51 pm For reference what does Tripmode 2 actually do in case of an overcurrent event, does it switch on the precharge and then drop out the main contactor or is the precharge permanently on at all times ?
Openinverter opens the precharge contactor after closing the main contactor during normal operation. So tripmode 2 closes the precharge contactor then opens the main contactor. I believe it happens quite fast.
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: SDU parameter tuning - major failure - can't select drive gear

Post by arber333 »

Openinverter was developed for ACIM motors which generally dont destruct its inverter. Without excitation and voltage they turn into block of iron and copper.
PMSM are very different as they have live magnets in the core. You should NEVER open contactors when operating PMSM!
User avatar
catphish
Posts: 954
Joined: Fri Oct 08, 2021 11:02 pm
Location: Dorset, UK
Has thanked: 93 times
Been thanked: 179 times

Re: SDU parameter tuning - major failure - can't select drive gear

Post by catphish »

arber333 wrote: Tue Sep 20, 2022 8:21 pm Openinverter was developed for ACIM motors which generally dont destruct its inverter. Without excitation and voltage they turn into block of iron and copper.
You know this thread is about an ACIM right? :) Sadly "generally" doesn't seem to apply to the SDU setup.

The problem is that there's quite a lot of energy stored in the magnetic fields of both the rotor and the stator. This energy keeps the motor energized for some time after the circuit is open, and also has to go somewhere.
User avatar
Peter
Posts: 310
Joined: Fri Dec 14, 2018 9:07 pm
Location: North West Lancs, UK
Been thanked: 8 times

Re: SDU parameter tuning - major failure - can't select drive gear

Post by Peter »

Suggestion open for comments please...
In either Tripmode case if the precharge relay/contactor was switched on (not via SDU) along with the negative contactor and remained so until a manual power off was done, i.e. the precharge is not controlled by the SDU output. Then the addition of a high voltage and current (1200v, >60A) diode reverse biased across the precharge resistor would allow the 'spike' a direct path to the batteries if for any reason the main dropped out under SDU control or fault.
I guess its just easier to use Tripmode 1 as its a simple setting of parameters but would the above give an added protection factor ?
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: SDU parameter tuning - major failure - can't select drive gear

Post by arber333 »

catphish wrote: Tue Sep 20, 2022 8:29 pm You know this thread is about an ACIM right? :) Sadly "generally" doesn't seem to apply to the SDU setup.

The problem is that there's quite a lot of energy stored in the magnetic fields of both the rotor and the stator. This energy keeps the motor energized for some time after the circuit is open, and also has to go somewhere.
I thought you were writing about model 3 unit.
Well at the beginning of OI i dealt mostly with inverters that used hi capacity elcaps. Not the best of iR i know, but they were able to soak up lots of transients. When i experimented with foil caps i also blew up several IGBTs which led me to develop skyper driver board interface - drivers with desat... at the time science fiction for me. Only when Johannes started to develop code for PMSM did we think of different contactor options.

So i suggest we put some warnings into the wiki just for LDU/SDU, but to be honest i also use mazda with contactor autoreset and allways ON.

Do you think maybe to remove tripmode 2 alltogether?

Maybe Johannes should put a note in web interface at contactor parameter line?
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: SDU parameter tuning - major failure - can't select drive gear

Post by arber333 »

Hm... with Lebowski i am using main relay wired through precharge relay in latching way. When precharge is complete relay will release and pulse start relay which will latch contactor. This means that main contactor will never drop out unless 12V to inverter go off.

What i suggest is a latching wiring for dc contactor. Main board should provide precharge and start impulses, but the start pulse should latch dc contactor via small relay. That should hold DC bus on as long as there is 12V power. To break DC one would remove 12V.

To interlock for charging you should just remove both direction signals.
This should work safely in most cases. Should i draw a sketch for wiki?
User avatar
catphish
Posts: 954
Joined: Fri Oct 08, 2021 11:02 pm
Location: Dorset, UK
Has thanked: 93 times
Been thanked: 179 times

Re: SDU parameter tuning - major failure - can't select drive gear

Post by catphish »

Lets keep this answer loud and simple so that others can find it.

Do not open contactors when faults occur on Tesla drive units
Roger
Posts: 10
Joined: Sat Dec 15, 2018 5:05 am
Location: Toronto, Canada
Has thanked: 2 times

Re: SDU parameter tuning - major failure - can't select drive gear

Post by Roger »

catphish wrote: Wed Sep 21, 2022 12:10 pm Lets keep this answer loud and simple so that others can find it.

Do not open contactors when faults occur on Tesla drive units
This is a true statement, I found out first hand
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: SDU parameter tuning - major failure - can't select drive gear

Post by EV_Builder »

And don't update firmware with HV enabled if external controlled. :x :x
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
Riwi
Posts: 43
Joined: Wed Jun 12, 2019 5:50 pm
Has thanked: 1 time
Been thanked: 8 times

Re: SDU parameter tuning - major failure - can't select drive gear

Post by Riwi »

Peter wrote: Sun Sep 18, 2022 7:52 pm Tripmode 1 is the best idea as Catphish suggests.
As an added path to clamp spikes I use suitably voltage rated paralleled TVS in series with a high wattage 25R resistor across the inverter HV input cables as close to the inverter as possible.
Hi Peter,

Regarding the TVS approach. could you give some more information on how you dimensioned the diodes and resistors?

Thanks

Rikard
User avatar
Peter
Posts: 310
Joined: Fri Dec 14, 2018 9:07 pm
Location: North West Lancs, UK
Been thanked: 8 times

Re: SDU parameter tuning - major failure - can't select drive gear

Post by Peter »

Hi Rikard. Stick with Tripmode 1, is still the best idea without doubt.
User avatar
catphish
Posts: 954
Joined: Fri Oct 08, 2021 11:02 pm
Location: Dorset, UK
Has thanked: 93 times
Been thanked: 179 times

Re: SDU parameter tuning - major failure - can't select drive gear

Post by catphish »

Riwi wrote: Tue Feb 21, 2023 8:29 am Regarding the TVS approach. could you give some more information on how you dimensioned the diodes and resistors?
Don't overthink it. Just make sure the contactors never open unless the vehicle is idle.

tripode=1 should be all you need.

There are some extreme edge cases like blowing a low voltage fuse during regen, but I've never heard of anyone destroying a drive unit that way.
Riwi
Posts: 43
Joined: Wed Jun 12, 2019 5:50 pm
Has thanked: 1 time
Been thanked: 8 times

Re: SDU parameter tuning - major failure - can't select drive gear

Post by Riwi »

Peter wrote: Tue Feb 21, 2023 6:40 pm Hi Rikard. Stick with Tripmode 1, is still the best idea without doubt.
I will, I just wanted an extra safety feature. I like the tvs approach. I’ll be running approx 250V on the dc side. There are 300V unidir tvs that can handle up to 30kW for a very short period and combining them with a high effect resistor sounds like a good idea.
User avatar
Peter
Posts: 310
Joined: Fri Dec 14, 2018 9:07 pm
Location: North West Lancs, UK
Been thanked: 8 times

Re: SDU parameter tuning - major failure - can't select drive gear

Post by Peter »

Hi Rikard. If you are thinking of adding TVS I would use bidirectional as spikes could happen with drive and regen possibly so current flow is in either direction.
Jump in anyone if you have thoughts please.
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: SDU parameter tuning - major failure - can't select drive gear

Post by johu »

unidirectional is fine. Spikes in reverse direction, if even possible, would be absorbed by the diodes contained in the phases. Remember, stick your multimeter on there the wrong way round it will measure like 0.5V forward voltage.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Post Reply