Okay, sorry but I'm trying to find my around. Thanks for your reply's!
Re: LDU parameter tuning
Posted: Thu Jul 04, 2019 12:17 pm
by Permag
So if the brake pedal input is not used, can regen actually be tuned to 0? The porsche is really light in the rear, and with those huge tires are slippery when they are cold! Id like to get this thing down to 0 regen, then add slowly to simulate engine braking and no more.
Re: LDU parameter tuning
Posted: Thu Jul 04, 2019 12:33 pm
by PoloLbricolo
Permag wrote: ↑Thu Jul 04, 2019 12:17 pm
So if the brake pedal input is not used, can regen actually be tuned to 0?
Ok...it seems I have this thought that Jon Volk was having issues even set to 0, that at high throttle/rpm there was still some regen kicking in. I just wanted to verify. I may have misunderstood.
Re: LDU parameter tuning
Posted: Fri Jul 05, 2019 7:00 am
by PoloLbricolo
I don't know If it the same as in the small drive unit but try puting the "speedkp" parameter to 0. This was preventing me to have any regen at any speed on small drive unit.
Re: LDU parameter tuning
Posted: Mon Dec 02, 2019 6:11 pm
by Roadstercycle
Hi guys again, Still trying to figure out what Jack Bauer (Damien) meant about "they can be can deduced from the motors nameplate" I've looked at that nameplate 10 times and I still can't see how to deduce it. Can anybody help me out on this. I'm using the default settings and it works but I'd really like to fine tune this in.
Re: LDU parameter tuning
Posted: Mon Dec 02, 2019 9:42 pm
by jon volk
If you're referring to flslipmin, just leave it at .9 or 1. There isn't really anything to be gained by messing with this low speed parameter from my experience. Boost, flslipmax (find a happy value for your battery pack on both of these), along with throtramp will make the most noticeable changes.
Once you find values that reliably maximize power without tripping an overcurrent fault with a fully charged battery, you can start monitoring voltage sag and use udcnom and flipconst to tune it for consistent performance.
I made this spreadsheet to help understand what affect udcnom has.
Re: LDU parameter tuning
Posted: Mon Dec 02, 2019 10:48 pm
by Roadstercycle
jon volk wrote: ↑Mon Dec 02, 2019 9:42 pm
If you're referring to flslipmin, just leave it at .9 or 1. There isn't really anything to be gained by messing with this low speed parameter from my experience. Boost, flslipmax (find a happy value for your battery pack on both of these), along with throtramp will make the most noticeable changes.
Once you find values that reliably maximize power without tripping an overcurrent fault with a fully charged battery, you can start monitoring voltage sag and use udcnom and flipconst to tune it for consistent performance.
I made this spreadsheet to help understand what affect udcnom has.
Jon, Thank you for helping me out. I ran across your BMW build last night on Youtube, nice build.
Re: LDU parameter tuning
Posted: Tue Dec 10, 2019 11:01 pm
by dougyip
We will be taking our Tesla Cobra EV to the dyno shortly. Current plans are to do a number of pulls with different Fslipmax values, then with one with Fslipmax fixed and vary Fweak. As a road race car we are typically only interested in RPM between 5000 and max (16000 RPM). One of our major problems now is motor overheating, so our goal will be to run with the minimum slip. Any other comments or suggestions?
Some questions:
1) All the Tesla drive units we have tested (Sport and regular) seem to reach peak power at about 10,500 RPM. Yet all the parameter files I have see (Damien, Jon etc) seem to have Fweak set for around 7500 RPM. Is this because this gives the best drivability? What have people observed with higher fweak values?
2) Will the motor run smoothly at a pre-set iacmax/idcmax limit? We now run at reduced power settings (using the stock Tesla controller) to manage motor temperatures. For qualifying we run higher power levels. Can we just have one tune, then reduce max current for races? This would reduce our i2r heat issues. Currently, at constant power, the controller increases current as battery voltage drops - which compounds the overheating issue as a race progresses.
Re: LDU parameter tuning
Posted: Wed Dec 11, 2019 2:56 pm
by P.S.Mangelsdorf
dougyip wrote: ↑Tue Dec 10, 2019 11:01 pm
We will be taking our Tesla Cobra EV to the dyno shortly. ... As a road race car we are typically only interested in RPM between 5000 and max (16000 RPM).
Will you be doing any pulls from 0 RPM? I would love to see and/or understand the real world torque and power curves from a standstill.
Re: LDU parameter tuning
Posted: Wed Dec 11, 2019 10:08 pm
by dougyip
We will probably record data from 1000 RPM. With the stock Tesla controller, torque is dead flat (controlled) up to the point of maximum power.
The outube video of Damien's dyno shows the torque curve using the open source controller.
Re: LDU parameter tuning
Posted: Thu Dec 12, 2019 1:13 pm
by jon volk
If you utilize the fconst feature, as I understand it, fweak doesnt necessarily become the point of max power. For example in my settings slip keeps increasing all the way up to 450hz. There's likely a ton of efficiency losses with this setup, but mph kept increasing when doing 1/4 mile pulls as slip as increased, so power was increasing.
Re: LDU parameter tuning
Posted: Thu Dec 12, 2019 5:42 pm
by dougyip
Thanks Jon. I was under the mistaken impression that fconst only had an effect when < fweak. I now understand why your fslipmax is less than other setups I have seen. If I understand correctly, slip in your setup can go all the way up to your fslipconstmax setting of 9? To clearly identify the effect of fweak and fconst, I will initially set fslipconstmax = fslipmax.
Re: LDU parameter tuning
Posted: Thu Dec 12, 2019 6:01 pm
by jon volk
Yes, it goes up to 9, but at much higher RPM. Prior to using udcnom or fconst, I usually ran a 4.5 fslipmax. You do need to be cautious with slip in lower RPM, however, the controller should trip an overcurrent fault before causing any damage. Ive hit this countless times in setting the car up. Definitely go slow and try to understand how the settings change performance.
If you are on the dyno, I would be curious to see what my parameters look like if you were willing to give them a shot.
Re: LDU parameter tuning
Posted: Thu Dec 12, 2019 7:06 pm
by dougyip
If I have time, I will load your parameters. I would also like to re-install the stock Tesla controller and do a baseline comparison.
From your comments about overcurrent faults, I assume then that it is not possible to use the current limts to run at constant current? Unfortunately, I don't have the luxury of testing things like that on the road, or even a parking lot, as the car is not street legal.
Re: LDU parameter tuning
Posted: Thu Dec 12, 2019 7:29 pm
by jon volk
You should be able to ride some of the derating parameters, however, I have not played with them enough to understand how well they work.
Re: LDU parameter tuning
Posted: Sun Dec 15, 2019 1:00 am
by dougyip
Good results at the dyno. Bottom Line: Max of 317 ft-lbs/353 HP - with low end torque limited by the dyno and conservative tune due to overcurrent errors.
- Max torque/power directly related to Fslipmax
- Fweak greatly affects peak power, not just point of max power. Looks like you would always want to be less than 300.
- Torque drops sharply after Fweak point. Fconst is very useful in boosting torque and power after fweak (thanks Jon Volk)
- With sufficient power at higher RPM stock LDU max RPM can be raised over stock Tesla. We managed to get to 17,250 RPM (fmax=575) but not 18,000 RPM
Effects of Varying FSlipMax (no use of Fconst):
Fslipmin=0, Fweak=275, Boost=1200, Fslipconstmax=Fslipmax, Fmax=550, Fconst=550, udcnom=0
Other pulls using Fconst
30- Jon Volk: Fweak=258, Fconst=450,fslipmin=0.87,fslipmax=3.06,fslipconst=450, fslipconstmax=9. Boost reduced from 1850 to 1500 to keep within dyno current limits.
31- Fweak=275, Fconst=450,fslipmin=1,fslipmax=3.25,fslipconst=450, fslipconstmax=6, Boost=1500
32 - Same as 32 but Boost = 1200
33 - Same as 32 but Fweak = 258
34 - Same as 31 but fslipconstmax=9
Re: LDU parameter tuning
Posted: Sun Dec 15, 2019 1:22 am
by dougyip
Even with ocurlim, iacmax, and idcmax set to be out of play we were still getting overcurrent errors.
With fweak at 350, boost = 1200, couldn't raise fslipmax above 4.5
with fweak at 300, boost = 1200, couldn't raise fslipmax above 4.0
with fweak at 275, boost=1200, couldn't raise fslipmax above 3.75
Any ideas why? I see that Damien is using fslipmax =5 and the EVShop Porsche = 6
Re: LDU parameter tuning
Posted: Sun Dec 15, 2019 11:07 am
by johu
I'm a bit surprised that torque drops off with speed below your fweak. Are you running version 4.55.R or higher?
Lowering fweak OR raising slip means increasing motor current. Thats why you have to compensate on with the other.
I'm not 100% if desat errors are reported reliably on Tesla hardware. So if you say comparator is taken out of the game you might be seing desat errors declared as over current
Re: LDU parameter tuning
Posted: Sun Dec 15, 2019 5:55 pm
by dougyip
Firmware version 4.57.R.
I am attaching a datalog file for run 23 (Fslipmax=4.0,Fweak=275). Pack volt/amps are measured at the battery by our Orion2 BMS, UDC/PotNom/Freq/IDC are logged via CAN from the open source controller. Pack Volts/UDC agree fairly well. There is a huge discrepancy between PackAmps and IDC. Either there is a reading error or huge inefficiencies.
Dyno Run 23
Fweak=275 Fslipmin=1.0 Fslipmax=4.0 Boost=1200
Really great data! Thanks for doing this and sharing.
Was udcnom in use when running my parameters?
Re: LDU parameter tuning
Posted: Sun Dec 15, 2019 7:57 pm
by dougyip
Udcnom was not in use for any of the runs. Your power and torque should be better as two Volt packs have less sag and more Power capacity.
Re: LDU parameter tuning
Posted: Sat Aug 15, 2020 3:17 pm
by jon volk
Alrighty folks.
If you happen to follow my nonsense on Instagram, you'll know Ive been spending a bunch of time tuning the parameters on my LDU for more performance of the past few months. I have been using a Dragy 10hz gps box to record times for comparing changes. Throughout the process, I tried to make all timed runs at similar SOC and battery temps. Tuning for power was done in the same process that I would use for an ICE combination. Increases in 1/8 and 1/4 mph equate to power gains. If a change did not net any improvement, it was reset to the previous value. Similarly, 60' time and 0-60 were used as measures for not just power, but how effectivly/aggresively it was delivered.
For context, the attached JSON file are the parameters I run in my 3,150lb with driver E30 with a standard base Tesla large drive unit and two Chevy Volt battery packs in parrallel. The car so far has been 3.0 seconds 0-60mph (2.81 if comparing with 1' rollout the magazines use) and 11.02@120mph 1/4 mile. This is on a 26x8.5" bias ply drag slick. There is a bit more power to be had, but I'm out of traction at this point.
Some basic notes/observations on the parameters and tuning them for your own combo.
Boost: This is one I struggled with a bit and now ultimately map over CAN based on pot value. More on that later. The LDU does NOT like higher boost values under any sort of high load, low to mid throttle input. Running a boost value at say 1700 or higher would result in overcurrent shut downs when attempting to start up a steep hill or a quick throttle transition shortly after inverter startup. I had also chased a low-ish parking lot speed oscillating surge that was downright annoying at times. Both of these issues have since gone away for good when setting boost to a lowly 1400.
Fweak:The LDU makes a bunch of torque. More than most reasonable cars can use. Fweak is really the key to regulating where in the rpm range the power is delivered. For me 238hz will stick my slicks and net the above posted acceleration times almost every hit. Bringing this to 233hz will just burn the slicks. 258hz worked well for me on street radials.
Fcost/Fslipconstmax:I've found these values net the highest 1/4 mile mph. There is not much point in changing these as you will not likely find any gains and reduction will only hurt higher speed freeway/highway/motorway performance.
Fslipmax: I run a parameter value of 3.18 to 3.3. Dont be fooled if you compare this to the parameter files on Damiens Github. With UDCnom factored in, this value is really 4.0-4.5 under voltage sag. Higher value=more power. Going too high will slam an overcurrent trip. Value needs to be a bit lower if battery temps are over 95-100F on a full SOC for me. I'm presently working on mapping this.
IDCmax: This is the DC current limit and a good parameter to use as a power ceiling and preventing overcurrent trips. I can get away with a slightly higher fslip value if this is used effectively. I do not have a standalone current sensor, but based on the hp calculated by mph and weight, I believe the DC current values shown in the software are roughly 50-60% of actual. Particularly what Tom has said they've seen their skyline pull for amps. All I know is the trap speed and weight of the car calculate to more power than the software says is being used. As such, an IDCmax of 760 seems to work well for me.
Throtramp:This is really a subjective setting but can be used to fine tune launching the car at WOT. If you go WOT while holding the brake and then release the brake pedal. Throtramp will control how fast throttle is applied. Think of it as another tool to control the onset of low end torque. I run anywhere from 65-75 and adjust based on tire temp. For regular driving, Id start off around 5 and move up from there if you want.
Idle:My parameters have a brake-off idle that will roughly simulate an ICE motor and cruise around a parking lot around 10-15mph without throttle input. Ive found this to be the most natural and comfortable setup. Be warned, boost, ampmin, slipstart, and idle throttle limit all play into how the car behaves in idle. If you start chaning these, it may take some playing with to get a satisfactory performance.
Regen: I use a 0-5v pressure transducer to control regen. The harder I press the brake, the more the motor regens. I do not have it set up to do any "one foot" driving off throttle regen. When driving the car hard, this feels most natural to me. It also feels more efficent being able to just coast throttle off. I have no emperical data on that. I just "feels" better. I believe Porsche didnt do any, or very little at most, throttle off regen on the Taycan for whatever thats worth. If you want throttle off regen, you are on your own with those settings.
Overcurrent faults: I've beat the shit out of my inverter and hit overcurrent shut down more times that I care to count in exploring how far I can take this thing. So much so that I had written a function meant to auto retart the car if it hit a fault. Doing so brought to light that these overcurrent events are more than likely desat faults from a gate driver on one or more inverter phases. I discovered this when the openinverter board would transition back into a run mode, but no PWM generation in the inverter woudl take place without a power cycle. This pointed to the issue being a Tesla hardware sourced fault rather than openinverter software triggered. From my original LDU with a bad IGBT that never turned an rpm in anger, I know that a desat fault will show as "overcurrent" in the software.
UDCnom: Ive posted this spreadsheet before, but here it is again so if you decide you want to deviate from my 390 value, you can see how it will affect other parameters. You can also input throtramp value and itll tell you how long in seconds from 0 to 100% throttle to compare scenarios.
CAN mapped boost: Running a measly 1400 for boost means there is some degree of decreased perfromance up higher. Its still more than enough power to kill yourself if you're not used to decently quick cars, but not gonna cut it for me. To deal with this, I map boost to pot value over CAN. The following code is on a Teensy3.6 with flexcan and works very well. My pot min and max are 830 and 4095, respectively. I map boost from 1400 to 1840 between pot values 3700 and 4095. This allows me to get full axle abusing startup torque when holidng WOT and brake on, yet smooth reliable take off on inclines or otherwise with lower throttle input. I had to mess with the range and scaling a bit to get the transition I wanted, but the below works well for me.
Im only including the mapping function as there is enough elsewhere on the site in regards to mapping CAN values.