Page 3 of 5

Re: LDU parameter tuning

Posted: Sun Aug 16, 2020 7:42 am
by Boxster EV
Very useful post and summary, Jon.

Further to our separate discussions, I have two pieces of feedback from my testing over the past few days:

My OC issues which have been a nuisance from the beginning, but since dropping the BOOST parameter to 1375, they seem to have a gone. I can pull away at any speed and on any steep gradient without tripping. There has been just one exception: During some testing yesterday with 50% charge, I changed direction quickly (R to F), went to pull away hit OC.

I still need to drill into IDLEMODE. As you’ve previously reported, having it set to ON, seems to help and makes the car feel like an OEM auto. However when I enable that parameter and set IDLESPEED into a positive number it works as expected. However when I power-cycle, the logic board won’t close the positive contactor.

Re: LDU parameter tuning

Posted: Sun Aug 16, 2020 7:59 am
by Jack Bauer
Thanks for your hard work Jon. I never try to promote the Openinverter Tesla board as being better than other solutions despite them seemingly being quite happy to do the reverse. However, your efforts have proven beyond any doubt that there is no loss of any "Tesla Magic". It really is the EV version of a standalone ecu.

Re: LDU parameter tuning

Posted: Sun Aug 16, 2020 8:13 am
by johu
Boxster EV wrote: Sun Aug 16, 2020 7:42 am There has been just one exception: During some testing yesterday with 50% charge, I changed direction quickly (R to F), went to pull away hit OC.
Yes, quick direction changes were never a development goal since mister lead developer uses the mechanical transmission to change direction ;)
Boxster EV wrote: Sun Aug 16, 2020 7:42 am I still need to drill into IDLEMODE. As you’ve previously reported, having it set to ON, seems to help and makes the car feel like an OEM auto. However when I enable that parameter and set IDLESPEED into a positive number it works as expected. However when I power-cycle, the logic board won’t close the positive contactor.
That is intended and also happens in OEM vehicles. As soon as idle mode is enabled you need to press the brake pedal to start.

Re: LDU parameter tuning

Posted: Sun Aug 16, 2020 12:24 pm
by Boxster EV
johu wrote: Sun Aug 16, 2020 8:13 am
Boxster EV wrote: Sun Aug 16, 2020 7:42 am There has been just one exception: During some testing yesterday with 50% charge, I changed direction quickly (R to F), went to pull away hit OC.
Yes, quick direction changes were never a development goal since mister lead developer uses the mechanical transmission to change direction ;)
Boxster EV wrote: Sun Aug 16, 2020 7:42 am I still need to drill into IDLEMODE. As you’ve previously reported, having it set to ON, seems to help and makes the car feel like an OEM auto. However when I enable that parameter and set IDLESPEED into a positive number it works as expected. However when I power-cycle, the logic board won’t close the positive contactor.
That is intended and also happens in OEM vehicles. As soon as idle mode is enabled you need to press the brake pedal to start.

Thanks for the steer. I’ll give it a whirl.

To continue enhancements in firmware development happy to support through Patreon.:)

Re: LDU parameter tuning

Posted: Sun Aug 16, 2020 1:56 pm
by jon volk
Jack Bauer wrote: Sun Aug 16, 2020 7:59 am Thanks for your hard work Jon. I never try to promote the Openinverter Tesla board as being better than other solutions despite them seemingly being quite happy to do the reverse. However, your efforts have proven beyond any doubt that there is no loss of any "Tesla Magic". It really is the EV version of a standalone ecu.
Thanks Damien. Like a traditional standalone, its more work up front and theres plenty of opportunity to mess things up, but the control-ability over multiple platforms is way more appealing to me.

Re: LDU parameter tuning

Posted: Sat Sep 12, 2020 11:49 pm
by Roadstercycle
Hi, I am trying to change a couple parameters on my LDU but it seems they will not save. It has worked fine in the past and I'm getting a good wifi signal. I change one setting at a time then hit enter, refresh page and it is OK. Then cycle power and then it's back to the original setting. Any one else had this issue. I've tried 2 computers to eliminate that possible issue of the enter button not working. Any ideas?

Re: LDU parameter tuning

Posted: Sat Sep 12, 2020 11:52 pm
by jon volk
Did you click save to flash at the top of the page?

Re: LDU parameter tuning

Posted: Sun Sep 13, 2020 12:24 am
by Roadstercycle
Jon, Thank you, I'm sure that's it. Just forgot, it's been awhile since I played with the parameters but your latest parameter post and explanation got me motivated to see if I can do a little better... Again thank you.

Re: LDU parameter tuning

Posted: Sat Feb 12, 2022 8:39 pm
by P.S.Mangelsdorf
I've begun to dig into optimizing the tune for my car. I started out with Jon's updated parameters and tuning guide, and the first major change was to adjust the udcgain because it was way off and causing issues with regen, phantom spinning etc.

Since this change, I now slam into an over current fault whenever I stand on the throttle. I think I need to adjust the current limit, but I first started examining how far off the current reading was from reality. Based on comparisons to my ISA shunt, output via the CHAdeMO web interface, the LDU is reporting a calculated idc of roughly 16% of what the ISA shunt is seeing. Being that it is this far off, I'd like to get the current reading correct before playing with settings.

I assume the adjustment needs to be in the two current sensor gains, but because those are on the AC side, I don't have a good way to figure out how far off they are.

Has anyone figured out what the current gains need to be for a base LDU?

Re: LDU parameter tuning

Posted: Sat Feb 12, 2022 8:41 pm
by jon volk
I should probably update the parameters now that there’s been some fundamental change to the newest firmware with fweak stuff.

Re: LDU parameter tuning

Posted: Sat Feb 12, 2022 8:43 pm
by P.S.Mangelsdorf
jon volk wrote: Sat Feb 12, 2022 8:41 pm I should probably update the parameters now that there’s been some fundamental change to the newest firmware with fweak stuff.
I'm still running the 4.97 firmware at the moment, but I (and I'm sure others) would appreciate it. Your parameters were a great starting point since I'm running a similar setup.

Re: LDU parameter tuning

Posted: Sat Feb 12, 2022 8:47 pm
by johu
There will be an update to idc calculation in the next release, I think the current calculation is like 30% off. But yours seems 600% off? Default ilXgain is 1 for LDU boards, that would mean 2048A maximum swing. Sounds plausible actually, no?

Re: LDU parameter tuning

Posted: Sat Feb 12, 2022 8:51 pm
by P.S.Mangelsdorf
johu wrote: Sat Feb 12, 2022 8:47 pm There will be an update to idc calculation in the next release, I think the current calculation is like 30% off. But yours seems 600% off? Default ilXgain is 1 for LDU boards, that would mean 2048A maximum swing. Sounds plausible actually, no?
Seeing as my ilgain setting is currently 4.68, that's way different than 1.

Edit to add: fixing this seems to have me at least close to the ballpark in terms of DC current reading.

Re: LDU parameter tuning

Posted: Sat Feb 12, 2022 9:57 pm
by P.S.Mangelsdorf
So I took the car out to make a few pulls, and tried several different settings. I continue to slam an overcurrent fault when launching hard. It feels like it is occurring right as the throttle ramp ends, i.e. when it should be delivering full power.

Oddly (to me at least), it also shows an encoder fault when it trips the overcurrent fault (see below screenshots below, yes this is from this event, I cleared the errors before the test).

The screen shots are from an attempt with idcmax of 740, but I tried as low as 700 with the same results.

Anyone see something glaringly wrong or do I just need to keep pulling back?
Screenshot (52).png
Screenshot (53).png
Screenshot (54).png

Re: LDU parameter tuning

Posted: Sun Feb 13, 2022 12:16 am
by Isaac96
idcmax is a pretty slow limiter, probably won't prevent an OC event. It's more often used for reducing power long-term to protect batteries, and even then only works well with FOC (and thus PM motors).

Raising fweak might do the trick, as it will move power delivery further to the right on a torque curve.

Mr. Volk's modified software with the new parameters made significant driveability improvements to my SDU-powered vehicle (before the third inverter blew), it ought to improve your experience a lot.

Re: LDU parameter tuning

Posted: Sun Feb 13, 2022 9:40 am
by johu
Version 5.14.R has VolkSoft integrated. I take it that I should now ship LDU boards with udcgain 7.43?

Only other sub-optimal setting is encmode=Single which might be more sensitive to noise. ENCODER fault means it sensed an excessive slew rate between two adjacent pulses, factor three between them if I remember correctly. Usually means noise as the motor is not going to reach 3 times the speed within 1/36th of a rotation ;)

Re: LDU parameter tuning

Posted: Sun Feb 13, 2022 4:20 pm
by P.S.Mangelsdorf
johu wrote: Sun Feb 13, 2022 9:40 am Version 5.14.R has VolkSoft integrated.
I'll try updating the firmware next weekend and see where that gets me.

johu wrote: Sun Feb 13, 2022 9:40 am I take it that I should now ship LDU boards with udcgain 7.43?
7.43 got me within a volt or two, but isn't perfect. The interface wasn't letting me do 7.41 or 7.42, which likely would have been closer. I'm not sure if this applies to all LDUs, has anyone else adjusted theirs that can confirm?

johu wrote: Sun Feb 13, 2022 9:40 am Only other sub-optimal setting is encmode=Single which might be more sensitive to noise. ENCODER fault means it sensed an excessive slew rate between two adjacent pulses, factor three between them if I remember correctly. Usually means noise as the motor is not going to reach 3 times the speed within 1/36th of a rotation ;)
What should it be set to?

I had been having actual encoder faults that prevented me from taking off from a stoplight (car would only lurch like there was no encoder signal), but I cleaned up the connection of the shielding and that seems to have solved it.

Re: LDU parameter tuning

Posted: Sun Feb 13, 2022 6:10 pm
by johu
P.S.Mangelsdorf wrote: Sun Feb 13, 2022 4:20 pm What should it be set to?
AB is the standard setting but with more hardware requirements:
a) A/B channels maybe swapped resulting in no movement
b) A and B must both be functional

Single uses either A or B

Re: LDU parameter tuning

Posted: Sat Feb 19, 2022 7:58 pm
by P.S.Mangelsdorf
Ok I've got lots to report back, and I'm definitely still confused.

I fixed my encoder setup, I did have to switch the wires. If I remember correctly, I was having issues on first start up, switched to single, and never went back and solved the AB swap.

I tried v5.14. It definitely cleaned up my low speed performance, and eliminated the overcurrent when starting at low throttle, but it completely eliminated regen, I'm talking zero whatsoever. I played around for a bit but reverted back to 4.97, because I like one pedal driving when possible. Is it possible to get regen with 5.14?

I ended up needing to back fslipmax all the way down to 2.71 to get rid of full throttle overcurrent. Here's where I'm very confused. This is well below what Damien and Jon are using, and makes the car feel way down on power. My two points of confusion/questions regarding this are as follows:

1) I did not have full throttle overcurrents before I fixed my udcgain. I got full face-melting torque, and only had the low speed over currents. What makes me even more confused, is my voltage gain is now very close to Damiens. Is there something in the firmware that would connect the current supplied with the voltage reading?

2)Is there potentially something damaged in the inverter where it will give me close to full power but not all the way? That seems far fetched to me, but I figured I'd ask.

I did go back and check, I have a Q version base LDU.

My current parameters, using 4.97, are attached. This works, but the car is way down on power from where I started. EDIT: Fweak is lower than other sets because I was attempting to regain performance. Lowering was not tripping an overcurrent.

Re: LDU parameter tuning

Posted: Sat Feb 19, 2022 10:31 pm
by P.S.Mangelsdorf
Additional update: I went back to Jon's excellent tuning guide, where he mentioned that using idcmax, he could get a bit higher fslipmax.

I went back out to my top secret testing location (a new housing development where only the roads are complete) and started by droping the IDCmax all the way to 600, then starting working the fslipmax up from 2.71. At 3.2, I would get an overcurrent, but not at 3.1. So I saved at 3.1, and began increasing the IDCmax. I was able to bring IDCMax all the way to 700, before my body decided that had been enough hard launches in a row, and I had no desire to see my lunch again.

The one caveat is that the pack was 60-70% charged during this test session. I will head out tomorrow with a full pack to confirm this set of parameters, and see if there is any more in it.

As a note, I dearly miss the low speed performance of v5.14 with VolkSoft. If anyone has ideas on how I can use that version and get good regen, please let me know.

Re: LDU parameter tuning

Posted: Sun Feb 20, 2022 12:01 am
by jon volk
Are you using pot2 for anything? If not, set both min and max to 4095

You can also use much more aggressive regen settings since zero throttle fweak is higher.

Re: LDU parameter tuning

Posted: Sun Feb 20, 2022 1:10 pm
by P.S.Mangelsdorf
jon volk wrote: Sun Feb 20, 2022 12:01 am Are you using pot2 for anything? If not, set both min and max to 4095

You can also use much more aggressive regen settings since zero throttle fweak is higher.
No, not using pot2, I'll make that adjustment.

I had on brake regen set to 90% and had absolutely no regen even with the brake full on for several seconds.

Re: LDU parameter tuning

Posted: Sun Feb 20, 2022 1:50 pm
by jon volk
It’s probably pot2 then.

Re: LDU parameter tuning

Posted: Sun Feb 20, 2022 6:11 pm
by Golf_mkIII_E
I can confirm Jon Volks statement about the regen.

I just did the update from 5.12 to 5.14, and it is so incredibly smooth. The regen bug which fully locked the wheels before coming to a halt is fixed. The low speed stability has also been greatly improved. I haven’t tried any WOT yet, because of wet and slippery roads.

Re: LDU parameter tuning

Posted: Sun Feb 20, 2022 8:46 pm
by P.S.Mangelsdorf
Welp, I've got good news, bad news, and worse news.

The good news, Jon was correct, setting pot 2 min and max to 4095 brought back the regen.

The bad news - all of my data regarding full throttle overcurrents is likely garbage.

The worse news - I broke an axle, and I think it has been partially broken for a while.

Some background: to adapt between the Tesla axles and GTO axles, I cut each on an angle, welded them together, and then sleeved them and welded on a sleeve. At this point, the axle has broken the sleeve. Based on the noise made during this break, I have a theory about what was occurring, and why I was having over current trips.

I believe the axle was broken but was being held together by the sleeve. This would hold together until full or near full power was achieved, where it would suddenly slip, causing the motor to suddenly change speeds, and thus triggering an overcurrent fault. I was hearing a bang during these faults, but chalked it up to sudden slack in the drivetrain. I now think it may have been the reverse: sudden slack in the drivetrain causing an overcurrent.

I'll know more once I get the axle out of the car. the only further good news is I already had a plan for upgrading the axles (ZeroEV adapter platres and then custom axles), I guess that I will have to do that now rather than this fall.