View Full Version : Transient Fuelling Pid
5.7ute
March 17th, 2009, 05:14 PM
So far my efforts on getting a Calculated transient fuel pid working are showing some promise, However the B3701 injector pulse width voltage adjustment table is giving some grief. The main one being that the lookup() function is only any good for a single axis table. Is there a function available in the scan tool that will allow us to look up a dual axis table or will I have to do it the hard way with multiple lookup() functions, For instance
{PID}-lookup(GM.VOLTS}, 12,lookup({GM.MANVAC}, 0,xxx, 5,xxy.....), 12.5,lookup({GM.MANVAC}, 0,xyy, 5,xyz,.....))
Cheers Mick
Blacky
March 17th, 2009, 08:12 PM
I've not thought this through 100% but the following approach should work.
Say you have X and Y which are indexes into a 2D array. X ranges from 0 to 5 and Y ranges from 0 to 10.
Create a calculated PID W that has the expression W=Y*6+X which gives you a linear index into a 2D space as follows:
W=Y*6+X
X | 0 | 1 | 2 | 3 | 4 | 5 |
Y |----|----|----|----|----|----|
0 | 0 | 1 | 2 | 3 | 4 | 5 |
1 | 6 | 7 | 8 | 9 | 10 | 11 |
...
9 | 54 | 55 | 56 | 57 | 58 | 59 |
10 | 60 | 61 | 62 | 63 | 64 | 65 |
Then create a lookup as follows:
lookup({CALC.W},0,A,1,B,...,64,C,65,D)
Regards
Paul
Blacky
March 17th, 2009, 08:14 PM
Warning, I'm pretty sure there is a 1024 char limit on line length in calc_pids.txt. Not sure if you can fit the lookup function table into that limit.
But I will double check that limit and post back here.
Regards
Paul
Blacky
March 17th, 2009, 08:18 PM
Just checked, the limit is actually 64K, so I think you'll have plenty of room for long look-up functions function. However, the text editor you use (i.e. notepad) may not support lines that long.
Regards
Paul
Blacky
March 17th, 2009, 08:21 PM
One last thing, the lookup function performs a linear search for the correct lookup index. So long lookup tables may hurt performance.
Regards
Paul
swingtan
March 17th, 2009, 09:05 PM
Ahh so it's 64K....
I did a test a while ago and got a line length of just short of 6K which was enough for playing around with. The biggest performance hits were seen when ScanTool was started and then each time a replot is performed.
Simon.
Blacky
March 17th, 2009, 09:11 PM
Calculated PIDs needed a re-write for performance and better usability.
That is happening as part of the updated V8 software.
I will probably add 1D and 2D table look-ups based on actual tables of data - instead of the lookup() function.
The existing lookup() function was really only designed with around 10-20 data points in mind, for non-linear wide band AFR-Voltage conversions.
Regards
Paul
5.7ute
March 18th, 2009, 11:02 AM
Calculated PIDs needed a re-write for performance and better usability.
That is happening as part of the updated V8 software.
I will probably add 1D and 2D table look-ups based on actual tables of data - instead of the lookup() function.
The existing lookup() function was really only designed with around 10-20 data points in mind, for non-linear wide band AFR-Voltage conversions.
Regards
Paul
That is great news, it will be much easier when sharing calc pids or swapping between tune files.
I will try that method in your first post & see how it goes. At this point I only need a few voltage rows so that will keep the pid short.( IMO If you are running out of the 12-14.5 volt range you have other issues to address first)
Thanks again. Mick
5.7ute
March 18th, 2009, 01:13 PM
I've not thought this through 100% but the following approach should work.
Say you have X and Y which are indexes into a 2D array. X ranges from 0 to 5 and Y ranges from 0 to 10.
Create a calculated PID W that has the expression W=Y*6+X which gives you a linear index into a 2D space as follows:
W=Y*6+X
X | 0 | 1 | 2 | 3 | 4 | 5 |
Y |----|----|----|----|----|----|
0 | 0 | 1 | 2 | 3 | 4 | 5 |
1 | 6 | 7 | 8 | 9 | 10 | 11 |
...
9 | 54 | 55 | 56 | 57 | 58 | 59 |
10 | 60 | 61 | 62 | 63 | 64 | 65 |
Then create a lookup as follows:
lookup({CALC.W},0,A,1,B,...,64,C,65,D)
Regards
Paul
The theory in this method works. There seems to be a problem with the non linear values though that returns some errors.( And like you thought I run out of room) For the moment I will use an average of the kpa values with Volts as the reference with a simple lookup table. This should keep the errors to a minimum.
Highlander
April 8th, 2012, 10:15 AM
updates???
swingtan
April 8th, 2012, 10:28 AM
Some E38 OS's have a "stomp fuel" PID available that pulls the info directly from the ECM. Unfortunately, it only works with laptop logging ( I think ) and it's not available for my OS, so I can't test it anyway. Transient can make a huge difference to the way the car drives and in reality, I don't think a calc-pid is going to do the job. You really want to know what the ECM is actually using, as we don't have the full calculation that GM is using. For example, transient fuel is going to change with differences in MAP, TPS, RPM and possibly even charge temp. This is true for both throttle open and throttle close and there is also residual fuel in the manifold even when the engine is in a stable condition.
Highlander
April 8th, 2012, 10:35 AM
I agree... that is why I wanted to know if there was an update to this. Trying to perfect tunes and everything.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.