Tesla SDU parameters for 5.11.R

Topics concerning the Tesla front and rear drive unit drop-in board
Post Reply
User avatar
catphish
Posts: 954
Joined: Fri Oct 08, 2021 11:02 pm
Location: Dorset, UK
Has thanked: 93 times
Been thanked: 179 times

Tesla SDU parameters for 5.11.R

Post by catphish »

I've just installed an openinverter board into my SDU and updated the firmware to 5.11.R. I would like to begin with a known good set of configuration parameters, however the parameters found at https://openinverter.org/parameters/view.html?id=15 (linked from the wiki) do not appear to match with the available parameters on my board. I assume this is because of changes introduced between 4.97 and 5.11.

I was particularly puzzled for example by the fact that my inverter does not have an "encmode" parameter.

I am happy to work through and configure my own values, but I wanted to check 2 things:
1) Is this difference (such as the missing encmode) parameter caused by differenced in 5.11.R or do I have a larger problem (such as needing to update my web interface).
2) Would anyone be able to provide an updated set of parameters, or an easy upgrade path for the published ones?

Thanks!
P.S.Mangelsdorf
Posts: 753
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 89 times
Been thanked: 92 times

Re: Tesla SDU parameters for 5.11.R

Post by P.S.Mangelsdorf »

Can you confirm which version of the firmware you updated with, sine or FOC?

To the best of my knowledge the new firmware should only add a parameter or two, not remove any.
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed 2023 Hot Rod Drag Week
P.S.Mangelsdorf
Posts: 753
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 89 times
Been thanked: 92 times

Re: Tesla SDU parameters for 5.11.R

Post by P.S.Mangelsdorf »

Also appears there was a bug fix after 5.11
viewtopic.php?f=7&t=1971
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed 2023 Hot Rod Drag Week
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: Tesla SDU parameters for 5.11.R

Post by catphish »

P.S.Mangelsdorf wrote: Wed Oct 27, 2021 6:22 pm Can you confirm which version of the firmware you updated with, sine or FOC?

To the best of my knowledge the new firmware should only add a parameter or two, not remove any.
I need to double check what version I'm running, because I was certain that I'd installed the latest sine version, but the latest sine version is 5.12, not 5.11. I will double check what I'm running and get back to this thread. I don't believe I'd have accidentally installed the FOC version, but I'll get a complete screenshot of my available settings, double check, and report back.

Thanks!
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Tesla SDU parameters for 5.11.R

Post by Isaac96 »

If you have the sine firmware and encmode is missing, that most likely means that encmode has been hidden. This is done because you'll never need to change encoder type on an SDU. (It's always AB).
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: Tesla SDU parameters for 5.11.R

Post by catphish »

Isaac96 wrote: Wed Oct 27, 2021 8:17 pm If you have the sine firmware and encmode is missing, that most likely means that encmode has been hidden. This is done because you'll never need to change encoder type on an SDU. (It's always AB).
Thanks, is there something in the code I can verify that this is the case? If so, I'll be happy that I don't have a problem, and I'll continue to fill everything in. Some values definitely seem to have been added more recently, for example "fweakstrt" which is present in my inverter but not in Johannes' SDU config example.
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Tesla SDU parameters for 5.11.R

Post by Isaac96 »

Ah. Not sure where to verify that, but my SDU parameter file doesn't have encmode so you ought to be safe.
fweakstrt was created to smooth out low speed driving, it basically creates a nice curve at low RPM and pedal settings.
It's detailed here: viewtopic.php?f=10&t=1016

Johannes' example hasn't been updated in some time. I should have a dialed in tune for the SDU pretty soon which will include the new parameters.
Here is what I have in the meantime:

Code: Select all

{
  "boost": 2200,
  "fweak": 210,
  "fweakstrt": 400,
  "fconst": 400,
  "udcnom": 0,
  "fslipmin": 1.37,
  "fslipmax": 3,
  "fslipconstmax": 5,
  "sincosofs": 2048,
  "fmax": 600,
  "dirchrpm": 1000,
  "dirmode": 1,
  "ocurlim": -1200,
  "potmin": 460,
  "potmax": 1900,
  "pot2min": 850,
  "pot2max": 3850,
  "potmode": 1,
  "throtramp": 50,
  "throtramprpm": 20000,
  "ampmin": 10,
  "slipstart": 30,
  "brknompedal": 0,
  "regenramp": 10,
  "brknom": 20,
  "brkmax": -1,
  "brkcruise": -1,
  "brkrampstr": 30,
  "brkout": -100,
  "bmslimhigh": 50,
  "bmslimlow": -10,
  "udcmin": 300,
  "udcmax": 460,
  "idcmax": 600,
  "idcmin": -500,
  "idckp": 2,
  "idcflt": 9,
  "tmphsmax": 100,
  "tmpmmax": 300,
  "throtmax": 100,
  "throtmin": -100,
  "iacmax": 5000,
  "chargemode": 0,
  "chargecur": 0,
  "chargekp": 80,
  "chargeki": 10,
  "chargeflt": 8,
  "chargepwmin": 0,
  "chargepwmax": 90,
  "idlespeed": -100,
  "idlethrotlim": 50,
  "idlemode": 3,
  "speedkp": 1,
  "speedflt": 5,
  "cruisemode": 0,
  "udcsw": 300,
  "udcswbuck": 540,
  "tripmode": 3,
  "bootprec": 0,
  "pwmfunc": 0,
  "pwmgain": 100,
  "pwmofs": 0,
  "canspeed": 1,
  "canperiod": 0,
  "nodeid": 1,
  "fslipspnt": 0,
  "ampnom": 0
}
This is not final by any means though.
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: Tesla SDU parameters for 5.11.R

Post by johu »

Great! I'll use it as default in newly shipped boards then and also update the parameter set here: https://openinverter.org/parameters/view.html?id=15
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
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: Tesla SDU parameters for 5.11.R

Post by catphish »

Isaac96 wrote: Wed Oct 27, 2021 9:18 pm Johannes' example hasn't been updated in some time. I should have a dialed in tune for the SDU pretty soon which will include the new parameters.
Here is what I have in the meantime:
Thank you very much! I will try this out and look forward to your fully tested parameter set.
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: Tesla SDU parameters for 5.11.R

Post by catphish »

Thanks again for your assistance on this. I have now got my SDU running happily on the bench. My version is in fact 5.12, not 5.11!

By using "udcnom" I was able to run it (seemingly) perfectly at only 36V. The main issue I experienced was that I originally set "ocurlim" to 100A which I assumed would be plenty, but kept shutting down with an overcurrent fault. Upon further examination, it seems that even at 36V, the inverter has no issue with pushing 150A+ through the motor at startup. Yay!

Would you be able to explain which parameters soft and hard limit current? I initially assumed that iacmax and idcmax are soft limits, and that ocurlim is a hard limit (on ac current) that will simply trip when triggered? However in testing it seemed that ocurlim might also be having having a soft limiting effect, so I was a little confused.

I notice that in the examples I've seen, these limits are all set extremely high and I assume are never the limiting factor, so perhaps I don't need to worry too much about this, but I'm keen to impose sensible limits.

Thanks again! Video of my initial test setup below.

Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Tesla SDU parameters for 5.11.R

Post by Isaac96 »

Looking good!!

At startup, the voltage is low anyways. Even with a 400v battery the inverter isn't pushing more than 30 volts or so to the motor, so you will see pretty similar motor currents.


Your understanding of the limits is exactly correct.
idcmax and iacmax are both soft limits, they kick in when idc or iac hits about 80% of the value you have set.
They are not very smooth though; you get a pretty nasty 'hammering' effect that sounds like broken gears when they kick in.
Generally idcmax is used to protect a battery pack - Johannes uses it in conjunction with his Leaf BMS to keep his cells happier as temperature changes reduce the max power output. The FOC software has a better algorithm for idcmax which makes this work better.
I will be removing the limit (just setting both to 5000) after I do a little more testing.

Yup, ocurlim is the AC hard limit. It's actually triggered by the voltage of the current sensor flipping a comparator on the control board.

I've seen 700+ AC amps (RMS) in my unit, that equals about 1000 amps peak. So the limits are not much higher than levels you could see.
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: Tesla SDU parameters for 5.11.R

Post by catphish »

Isaac96 wrote: Wed Oct 27, 2021 9:18 pm I should have a dialed in tune for the SDU pretty soon which will include the new parameters.
I'm finally ready to get my SDU spinning in my car. Do you have an updated / final / tuned SDU parameter set? If so, please could you share it, otherwise what you already posted above looks pretty good, in line with what I've seen others using. I notice that you don't use udcnom, but is this parameter set designed for 360V nominal? If so, I will set udcnom to 360 have things automatically scaled for my 80S pack.
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Tesla SDU parameters for 5.11.R

Post by Isaac96 »

catphish wrote: Thu Jun 30, 2022 3:22 pm
I'm finally ready to get my SDU spinning in my car. Do you have an updated / final / tuned SDU parameter set? If so, please could you share it, otherwise what you already posted above looks pretty good, in line with what I've seen others using. I notice that you don't use udcnom, but is this parameter set designed for 360V nominal? If so, I will set udcnom to 360 have things automatically scaled for my 80S pack.
So... I thought I had a good parameter set, using the new Volk parameters and udcnom. Then I blew another inverter while cruising (probably 10% throttle, 60mph.) That made 3 dead inverters with various parameters.
Of course I no longer trust that set.
Smoothness was there but reliability was not. I hate to admit it but I gave up and got an EV Controls VCU, then sold the car.
I'll see if I can dig up that last parameter set, it did have good characteristics -- but you may need to turn it down a bit.

-Isaac
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: Tesla SDU parameters for 5.11.R

Post by catphish »

Isaac96 wrote: Fri Jul 01, 2022 4:12 pm Then I blew another inverter while cruising (probably 10% throttle, 60mph.) That made 3 dead inverters with various parameters.
Sorry to hear that. Do you have any idea what went wrong?

I've now built a new parameter set from scratch, which I successfully tested with no load. It would be nice to know if it's going to blow up though!

I was working from 2 examples, yours and one from ZeroEV. Based on your bad luck, I think I will move my parameters more towards theirs :)

Thanks anyway!
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Tesla SDU parameters for 5.11.R

Post by Isaac96 »

catphish wrote: Fri Jul 01, 2022 5:46 pm
Sorry to hear that. Do you have any idea what went wrong?

I've now built a new parameter set from scratch, which I successfully tested with no load. It would be nice to know if it's going to blow up though!

I was working from 2 examples, yours and one from ZeroEV. Based on your bad luck, I think I will move my parameters more towards theirs :)

Thanks anyway!
Not really sure. I'd had some OC events previously which were probably desaturation, and apparently repeated desat can cause damage. Though that doesn't really explain the inverter failing at low load later.
In any event it failed dead short (the last two failures were just one shorted phase).
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: Tesla SDU parameters for 5.11.R

Post by johu »

Very sorry to hear that.
Did you program your contactor to open on trip events?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
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: Tesla SDU parameters for 5.11.R

Post by catphish »

johu wrote: Fri Jul 01, 2022 6:36 pm Did you program your contactor to open on trip events?
I must admit I'm still pretty confused by the right thing to do here. On the one hand, it seems problematic that a transient error might close the contactors while current is still flowing in the motor coils, creating the possibility of overloading the DC bus. However, it also seems problematic to leave the contactors closed if there could be a more serious fault. My current config is to close the precharge contactor, but I feel like this might be even more dangerous in the case of a short circuited leg, while potentially not actually solving the problem. Is there a correct answer to this?

Regardless, I will go away and study again both the default SDU config provides by Johannes, and the known good SDU config provided by ZeroEV: https://github.com/Zero-ev-conversion-l ... arams.json

Neither of these covers the fweakstrt parameter which I feel is actually quite important as it seems to be the main source of the V/Hz curve at low throttle, so I will start with this disabled and experiment with increasing it later.

It's particularly interesting that ZeroEV are using the 2200 / 220 values for boost / fweak and are *not* scaling them even though they're only running the drive unit at only 300V. I would imagine this configuration is therefore quite conservative. I will start by doing this the same.
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Tesla SDU parameters for 5.11.R

Post by Isaac96 »

johu wrote: Fri Jul 01, 2022 6:36 pm Very sorry to hear that.
Did you program your contactor to open on trip events?
I think I had it keep them closed, as after a trip all I had to do was let off throttle for it to restart (that was the behaviour with that new option IIRC).

When the whole inverter went dead short it popped my fuse pretty quickly, the precharge resistor died after I tried shorting the fuse. Could have been much more violent.

fweakstrt did a great job of smoothing out the lower end.
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: Tesla SDU parameters for 5.11.R

Post by johu »

Isaac96 wrote: Sat Jul 02, 2022 7:40 am I think I had it keep them closed, as after a trip all I had to do was let off throttle for it to restart (that was the behaviour with that new option IIRC).
Ouch, was hoping this configuration would prevent future inverter failures, especially at low load.
I wouldn't consider keeping contactors closed a safety hazard, here are cases I can think of:
a) Regular over current trip - IGBTs stop conducting, so there is no DC current to be interrupted anyway
b) Trip because of shot IGBT - The pack fuse will keep things from melting
c) over voltage trip (udclim) - in case the motor speed is > 50 this will never open the contactor because that would worsen the problem
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
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: Tesla SDU parameters for 5.11.R

Post by catphish »

After hearing from Damien and Seb, it seems abundantly clear to me that opening contactors in a fault condition is more likely to do harm than good, so I think that question is answered. I will use tripmode=1 and accept that if there's a fault that can't be resolved by shutting down the PWM, the fuses will have to blow.

With regard to configuration, I have built a new config for the SDU. There are however 2 candidate configs for V/Hz control:

The first candidate is Johannes's:

Code: Select all

  "boost": 2200,
  "fweak": 220,
  "fweakstrt": 220,
  "fconst": 800,
  "udcnom": 360,
  "fslipmin": 2.0,
  "fslipmax": 6.0,
  "fslipconstmax": 6.0,
The alternative is ZeroEV's

Code: Select all

  "boost": 2200,
  "fweak": 220,
  "fweakstrt": 220,
  "fconst": 400,
  "udcnom": 0,
  "fslipmin": 1.5,
  "fslipmax": 4.0,
  "fslipconstmax": 6.5,
There are quite a few differences here:
1) The ZeroEV configuration doesn't specify udcnom, and since it runs at 84S (and mine at 80S) rather than 96S this means the motor will be running at only 85% of the voltage, a substantial difference in V/Hz.
2) The ZeroEV config makes use of fslipmax (4.0 @ 220Hz) and fslipconstmax (6.5 @ 400Hz), whereas Johannes's config uses fslipmax=6.0 at all times.
3) The ZeroEV config uses a lower fslipmin, this was probably found though the normal tuning process so no surprises there.

As a compromise, I believe I will use the following as a starting point:

Code: Select all

  "boost": 2200,
  "fweak": 220,
  "fweakstrt": 300,
  "fconst": 600,
  "udcnom": 0,
  "fslipmin": 1.5,
  "fslipmax": 6.0,
  "fslipconstmax": 6.0,
This uses udcnom=0 so it will be conservative like the ZeroEV config when powered at 300V.
It adds a bit of fweakstrt for a smoother start, and it uses fslipmax==fslipconstmax so there shouldn't be any surprises at high RPM.

I realise this probably isn't interesting to anyone other than me at the moment, but I will post my final configuration once I've fully tested it :)
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: Tesla SDU parameters for 5.11.R

Post by johu »

Cool, consider posting it to the parameter data base. Later versions of the web interface have a button for that
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
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: Tesla SDU parameters for 5.11.R

Post by catphish »

Initial testing with these parameters (at 300V DC bus) causes very smooth driving but a substantial drop in torque at full throttle.

Code: Select all

  "boost": 2200,
  "fweak": 220,
  "fweakstrt": 300,
  "fconst": 600,
  "udcnom": 0,
  "fslipmin": 1.5,
  "fslipmax": 6.0,
  "fslipconstmax": 6.0,
  
My suspicion is that fslipmax=6 is much to high for the conservative voltage I'm running. If this is confirmed, I will increase voltage or reduce fslipmax.
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: Tesla SDU parameters for 5.11.R

Post by johu »

Yes rotor inductance can actually cause rotor current to drop with increasing frequency
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
rstefan
Posts: 1
Joined: Tue Feb 27, 2024 3:31 pm

Re: Tesla SDU parameters for 5.11.R

Post by rstefan »

Hello!
I have a SDU V2 and I want to connect to see parameters. How do I connect if my board does not have wifi? Where do I connect the wires and why is it needed?
Thank you!
Post Reply