Tuning the small drive unit with charts

Topics concerning the Tesla front and rear drive unit drop-in board
User avatar
Peter
Posts: 310
Joined: Fri Dec 14, 2018 9:07 pm
Location: North West Lancs, UK
Been thanked: 8 times

Re: Tuning the small drive unit with charts

Post by Peter »

Thanks Charlie. I also note you are setting throtramprpm to the max 20000, I have played with that setting to see what happens, using 4000 at the moment so might be worth graphing to see the effect.
If I understand Johannes on this the ramping therefore (in my case) is only upto 4000 rpm then no ramping after that figure.
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: Tuning the small drive unit with charts

Post by catphish »

Peter wrote: Sun Jul 31, 2022 9:53 pm Thanks Charlie. I also note you are setting throtramprpm to the max 20000, I have played with that setting to see what happens, using 4000 at the moment so might be worth graphing to see the effect.
If I understand Johannes on this the ramping therefore (in my case) is only upto 4000 rpm then no ramping after that figure.
That's correct. My throtramp is set to 10% per 10ms, so it takes 100ms to fully ramp the throttle. So far I've been quite happy with this, but as someone who likes turbo lag, I might even increase it :D
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: Tuning the small drive unit with charts

Post by catphish »

One more test, this time allowing myself 450A. This is probably the final one as I don't want to push my car any harder for now.

Pack voltage: 310V
fslipmax: 3
boost: 2800
fweak: 250
AC current: 440A falling to 390A
DC Current: 0A rising to 440A
Temperature: 26C rising to 57C
0-60: 6.2s

Two important things to note about this configuration:

1) This is based on a very specific battery voltage: 310V, falling to 295V at peak power draw. Running it at other voltages may cause problems. It would probably be worth re-calibrating with udcnom configured.

2) fslipconstmax is set to 3. This means that power falls off above 60mph. Personally that works for me, but anyone who wants to push top speeds would want to configure fslipconstmax higher (between 4 and 6).
run11.png
User avatar
Peter
Posts: 310
Joined: Fri Dec 14, 2018 9:07 pm
Location: North West Lancs, UK
Been thanked: 8 times

Re: Tuning the small drive unit with charts

Post by Peter »

1st rule of Fight Club Openinverter.....
An increase in confidence is directly proportional to a increase in acceleration :-)
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: Tuning the small drive unit with charts

Post by catphish »

After a few days of driving my car with these settings, I have a couple of thoughts. Firstly, I'm happy, it's really nice to drive, capable but smooth.

However there's an interesting contradiction here. The charts clearly show that AC current *decreases* with speed, however it's very clear that torque actually increases with speed. This confuses me a lot. For the exact same slip, and slightly reducing stator current, why does torque increase with speed?

To get consistent torque, it seems I'll need to push the low speed current even higher, but I'd quite like to understand what's going on here!
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: Tuning the small drive unit with charts

Post by catphish »

catphish wrote: Fri Aug 05, 2022 1:33 pm it's very clear that torque actually increases with speed
I looked at the actual speed data and it turns out I was wrong.

I guess humans aren't very good at measuring acceleration!

The acceleration is almost linear, reducing slightly with speed, exactly as it should!
speed.png
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: Tuning the small drive unit with charts

Post by catphish »

Small update, after driving for a while I got irritated with variations in battery voltage (state of charge) causing big changes in performance, so I've now re-tuned with udcnom set. The results are essentially identical to the previous ones but hopefully they are now more consistent.

udcnom: 300 (300V nominal battery voltage, 80 series cells)
boost: 2900 (this is adjusted to give a mostly flat current curve from 0rpm)
fweak: 250 (this vaue has the most impact and ends up setting the peak DC current)
fslipmax: 3 (not proven but this low value seems more efficient)
idcmax: 600 (I'm tuning for 450A peak, but I set this a little higher so that I can tune up to that level without bouncing off the limiter)

0-60: 6.75s
AC current: 420A to 386A
DC current: 0A to 430A
Inverter temperature: 23C to 50C
udcnom.png
I plan to squeeze a little more out of it and finish bringing the peak currents up to my ideal of 450A but this isn't far off.

I also spent some time playing with idckp to see if I could make use of the DC current limiter rather than avoiding it. Unfortunately I was not able to achieve smooth results with this, so I will instead persist with avoiding the limits.
Attachments
run19.json
(1.22 KiB) Downloaded 73 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: Tuning the small drive unit with charts

Post by catphish »

I'm sure this thread is getting boring now, but I have more more configuration. Building on the previous configuration, I have increased boost to 3200. This increases the startup current to 450A and increases acceleration but doesn't have much impact on peak DC current. Both now peak at 450A (my self imposed limit).

udcnom: 300
boost: 3200
fweak: 250
fslipmax: 3
idcmax: 600

0-60: 6.1s
AC current: 450A to 390A
DC current: 0A to 450A
Inverter temperature: 28C to 64C
run21.png
Not too much more testing to do on this now, but I might repeat with identical current and fslipmax=3.5 to see if this has a positive or negative impact.
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: Tuning the small drive unit with charts

Post by johu »

I don't think anyone has tuned that systematically in public yet. Happy to replace my default parameter set with yours.
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: Tuning the small drive unit with charts

Post by catphish »

johu wrote: Mon Aug 08, 2022 9:31 am I don't think anyone has tuned that systematically in public yet. Happy to replace my default parameter set with yours.
Thanks. I'm very happy with this config now, and because it's still fairly conservative, I think it makes a sensible starting point. Feel free to make this parameter file the new default, though it would be nice if somebody else would test it first.

I've made a couple of small changes today:

Enabled regen and set a value for off throttle regen that is noticeable but not strong. Configured regenrampstr to ensure there is no regen spike to low RPM. i don't really like regen but I thought it would be useful for others to have this configured.

Set increased fslipconstmax from 3.0 to 4.0. Torque still falls off noticeably above 60mph. I don't have the means to safely and legally test above this speed, so I've increased fslipconstmax to 4.0 as a token gesture, but if anyone is interested in pushing the top speed, they will need to tune fconst and fslipconstmax further.
Attachments
run22-full.json
(15.38 KiB) Downloaded 77 times
js1tr3
Posts: 42
Joined: Thu Jun 13, 2019 11:28 am
Location: A2 usa
Contact:

Re: Tuning the small drive unit with charts

Post by js1tr3 »

I'll try to give it a shot this weekend. I finally got the coolant system bled and the wheel alignment close enough to take the Porsche out on the road (at least all 4 wheels aren't pointed in different directions). I need to hookup the PWM control for the coolant pump first though, because I instantly hit the temperature limit when it cuts out.
1988 Porsche 911 targa with warp11 motor. Soon to be Tesla 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: Tuning the small drive unit with charts

Post by catphish »

js1tr3 wrote: Mon Aug 08, 2022 8:05 pm I'll try to give it a shot this weekend. I finally got the coolant system bled and the wheel alignment close enough to take the Porsche out on the road (at least all 4 wheels aren't pointed in different directions). I need to hookup the PWM control for the coolant pump first though, because I instantly hit the temperature limit when it cuts out.
Thanks!

My coolant pump is just always on when either the inverter or charger are active. I guess it would be nicer if my car was totally silent, but it does a very good job of keeping it cooled.

Let me know how you get on with the config :)
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: Tuning the small drive unit with charts

Post by catphish »

One potentially sticky problem. My config is designed for the unreleased version of openinverter that renamed the regen paramaters. These probably need to be manually renames before it can be applied on an older (including the latest released) version.

Perhaps it's time for a new release? The previous one was 9 months ago and a few things have been added since.
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: Tuning the small drive unit with charts

Post by catphish »

I wanted to test fslipmax=3.5 for curiosity to see if I did the right thing by bringing it down as low as 3.0. The short answer is that 3.5 is inferior and I don't recommend this configuration, but posting it here for completeness.

fslipmax=3.5
boost=2500
fweak=280
0-60: 7.4s
AC current: 410A to 400A (very consistent)
DC Current: 0 to 400A (it still peaks at 450A but not until after speed exceed 60mh)
Inverter temperature: 29C to 82C (!!!)

So consistent with previous tests, a higher value of slip causes quite a lot more heating of the inverter for similar current draw, and a sight reduction in performance.

It's worth mentioning at this point that a value of slip even lower then 3.0 *might* allow for even greater performance. Conventional wisdom is that inducton motors are more efficient at lower slip. Lower slip mean that more voltage, and hence more power can be delivered while keeping current (and hence heating) lower. However I don't really recommend this. When I tried to run fslip=2.5 I tripped my overcurrent limit. My suspicion is when when ramping the voltages that high, slip control is not sufficiently accurate to keep current stable.
User avatar
Peter
Posts: 310
Joined: Fri Dec 14, 2018 9:07 pm
Location: North West Lancs, UK
Been thanked: 8 times

Re: Tuning the small drive unit with charts

Post by Peter »

Hi Charlie. It has been mentioned on the forum that mapping Fweak to RPM could be a way of having the best of all worlds, what do you think ?
User avatar
Peter
Posts: 310
Joined: Fri Dec 14, 2018 9:07 pm
Location: North West Lancs, UK
Been thanked: 8 times

Re: Tuning the small drive unit with charts

Post by Peter »

Been doing some testing with Fweak and Boost to see what can be achieved by raising Fweak (from 210Hz to 270Hz, thats a jump from 45 MPH to 60 MPH) and counteracting off the line performance by raising Boost from 4000 to 6000. Result being I can maintain performance off the line and torque is good. Need to check currents for previous and new settings to compare if this is a good idea or not. Also dropped Slipmin from 2 to 1.78, Slipmax set at 3.5 and Slipconstmax 3.5.
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: Tuning the small drive unit with charts

Post by catphish »

Peter wrote: Wed Aug 10, 2022 7:57 pm Been doing some testing with Fweak and Boost to see what can be achieved by raising Fweak (from 210Hz to 270Hz, thats a jump from 45 MPH to 60 MPH) and counteracting off the line performance by raising Boost from 4000 to 6000. Result being I can maintain performance off the line and torque is good. Need to check currents for previous and new settings to compare if this is a good idea or not. Also dropped Slipmin from 2 to 1.78, Slipmax set at 3.5 and Slipconstmax 3.5.
This is definitely the correct approach. For fslipmax=3.5, fweak should be 270-280, which will give you a peak current draw of 450A (as per my last test).

Once that's done, you can basically set boost as high as you like as long as you don't hit ocurlim. I'd guess 6,000 is probably the approximate limit there.

You should raise fslipconstmax to 4.0+ if you want torque above 60mph.
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: Tuning the small drive unit with charts

Post by catphish »

Peter wrote: Wed Aug 10, 2022 6:58 pm Hi Charlie. It has been mentioned on the forum that mapping Fweak to RPM could be a way of having the best of all worlds, what do you think ?
The idea of varying fweak with RPM doesn't make sense to me. Allow me to explain why.

The way this works is that boost specifies the voltage at 0RPM, and fweak specifies the speed at which the voltage is full battery voltage. When combined, this creates a graph that looks like this:
frequency.png
In this example boost is 25V and fweak is 250Hz. That means voltage starts at 25V and reaches 300V (or whatever your battery voltage is) at 250Hz.

What this means is that if you want to change the voltage at high RPM, you adjust fweak, and if you want to adjust the voltage at low RPM, you adjust boost, and there is always a straight line between the two.

If you were wanting a higher voltage (equivalent to lower fweak) at lower RPM, then all you have to do is increase boost :)

It might be useful to have a third point on this voltage curve, but probably not necessary unless you're really rune tuning. I hope this all makes sense!
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: Tuning the small drive unit with charts

Post by johu »

catphish wrote: Tue Aug 09, 2022 1:17 pm When I tried to run fslip=2.5 I tripped my overcurrent limit. My suspicion is when when ramping the voltages that high, slip control is not sufficiently accurate to keep current stable.
Really puzzled by this bit. So if you set fslipmax=3 it runs ok, if you lower to 2.5 Hz you trip ocurlim?
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: Tuning the small drive unit with charts

Post by catphish »

johu wrote: Wed Aug 10, 2022 9:24 pm
catphish wrote: Tue Aug 09, 2022 1:17 pm When I tried to run fslip=2.5 I tripped my overcurrent limit. My suspicion is when when ramping the voltages that high, slip control is not sufficiently accurate to keep current stable.
Really puzzled by this bit. So if you set fslipmax=3 it runs ok, if you lower to 2.5 Hz you trip ocurlim?
No, perhaps I should have explained this better. I decreased fslipmax to 2.5, and simultaneously increased boost and reduced fweak to keep current at my target of 400-450A. On my first run with these settings, before I'd even started logging, the inverter shut down. I don't know why and I was put off experimenting with this low slip (and very high V/Hz) again.

On its own, reducing slip is perfectly safe (this is what happens at 40% throttle anyway).
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: Tuning the small drive unit with charts

Post by johu »

Alright, that makes sense. At some point increasing voltage drives the iron into saturation turning the coil into something like a short circuit
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: Tuning the small drive unit with charts

Post by catphish »

I tried to do some more tuning today and realised something unpleasant. When I was testing with a coolant temperature of 28C, the rise to 64C seemed very reasonable. But testing again today, the weather is my enemy. The coolant temperature is 40C, and even with the conservative configuration, my inverter temperature is reaching 75C under acceleration. This isn't a problem with my current configuration at all, but any attempt I made today to increase performance either by increasing slip or by increasing voltage, resulted in very quickly hitting the 85C limit.

I'm still happy with my current configuration, but I'm disappointed when I see other people spinning their wheels! I'm left with no idea of whether there's an ingredient in the secret recipe I'm missing.

Peter is kindly providing me with examples of his configuration, which are *dramatically* more aggressive then mine, but so far it's a mystery to me how he's achieving this without smashing into both the current and temperature derating limits.
User avatar
Peter
Posts: 310
Joined: Fri Dec 14, 2018 9:07 pm
Location: North West Lancs, UK
Been thanked: 8 times

Re: Tuning the small drive unit with charts

Post by Peter »

Hi Charlie. Try a different version of the software, it would be a quick and easy test and may show up a difference.
I am wondering why your temp is rising so much, even on an a fast run around with lots of stop starts and fast acceleration the highest I see for Inverter is 55 - 60 C, this drops very quickly once I back off and drive like a pensioner :-)
You could purchase some stick on temperature indicators to see if things are ok too. https://uk.rs-online.com/web/p/temperat ... ls/7799779
Another reason I am thinking about the temperature issue you have is because my cooling system (not trying to rub salt in your wounds, ok) only uses a 13 row oil cooler, approx 30cm x 15cm with a couple of 90mm dia electric fans. Coolant for inverter and Tesla heat exchanger are in parallel. I dont heat or cool my batteries so they do not affect temps.
If its worth a thought ..... On my first EV attempt using an Enova motor and Damiens first issue of control board (I was the guinea pig I think :-)) I noted that varying pwm frequency made inverter temp rise very quickly and to a much higher value.
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: Tuning the small drive unit with charts

Post by catphish »

Peter wrote: Sat Aug 13, 2022 6:43 pm Hi Charlie. Try a different version of the software, it would be a quick and easy test and may show up a difference.
I am wondering why your temp is rising so much, even on an a fast run around with lots of stop starts and fast acceleration the highest I see for Inverter is 55 - 60 C, this drops very quickly once I back off and drive like a pensioner :-)
You could purchase some stick on temperature indicators to see if things are ok too. https://uk.rs-online.com/web/p/temperat ... ls/7799779
Another reason I am thinking about the temperature issue you have is because my cooling system (not trying to rub salt in your wounds, ok) only uses a 13 row oil cooler, approx 30cm x 15cm with a couple of 90mm dia electric fans. Coolant for inverter and Tesla heat exchanger are in parallel. I dont heat or cool my batteries so they do not affect temps.
If its worth a thought ..... On my first EV attempt using an Enova motor and Damiens first issue of control board (I was the guinea pig I think :-)) I noted that varying pwm frequency made inverter temp rise very quickly and to a much higher value.
The problem isn't the long term temperature, it's the huge spikes that occur *during* acceleration. The temperature can rise by 40C or 50C in less than 5 seconds under full acceleration, and then it falls just as quickly when you let off the throttle. While perhaps this could be helped by better coolant flow, this level of temperature rise is much too fast to be related to the radiator setup.

I'm resisting trying a different version of the software unless I know it will help, because flashing my inverter isn't too easy. I'd need to fully disconnect the high voltage, which is a bit of a pain.

What PWM frequency are you using? I'd love to know if it's not 17kHz! Reducing to 8kHz should substantially reduce heating, but I'm scared to change this setting.
User avatar
Peter
Posts: 310
Joined: Fri Dec 14, 2018 9:07 pm
Location: North West Lancs, UK
Been thanked: 8 times

Re: Tuning the small drive unit with charts

Post by Peter »

Hi Charlie. Sorry, I dont know the frequency on the version I have, factory default from Johannes I guess :-)
Only relevant data I can see is..
pwmfunc 0
pwmgain 100
pwmofs 0

I dont suppose your rapid temp rise could be due to coolant surging and starving the pump when accelerating ? Does the temp then fall back with a steady throttle ?
Post Reply