PDA

View Full Version : Pid Creation / Calculated pids



Gelf VXR
June 21st, 2008, 10:39 PM
I have searched looking for infor for creating custom pids, calculated from existing pids, but Is there any way to create a new Pid that looks up a calibration table as seen in the tune tool {B5101}?

I would like to create a calculated pid that looks at commanded spark and compares to delivered spark

{B5101}/{SAE.SPARKADV}

Any help much appreciated?

:help2:
:help2:

jfpilla
June 21st, 2008, 11:52 PM
Don't know what B5101 looks like. Anything like B5913?

Gelf VXR
June 22nd, 2008, 02:16 AM
Almost the same, Spark data for SAE.RPM vs GM.APCYL_E40_DMA

jfpilla
June 22nd, 2008, 12:34 PM
Gelf,
Does this help you create a pid?
Joe

jfpilla
June 22nd, 2008, 12:52 PM
I would like to create a calculated pid that looks at commanded spark and compares to delivered spark

I should have read carefully. I missed that. What you want to do won't be too helpfull because of the different tables being used at any time and timing adjustments made by the programming. It will all be recorded on the table I posted.

Gelf VXR
June 22nd, 2008, 12:53 PM
Gelf,
Does this help you create a pid?
Joe

Sorry buy no, below is an example of the LC1/2 BEN's calculated pid, I have not seen any pids that reference tune tool calibrations directly thou?

# ================================================== ============================
# Calculated
# ----------------
#
# Calculated parameters are derived from existing parameters by evaluating
# the supplied expression.
#
# Only numeric expressions are supported.
# Parameter names must be enclosed in curly braces {} and if a particular unit
# of measure is required then that unit's CODE must be appended in the
# parameter name seperated by a dot.
# i.e. to specify the MAF rate in grams per second use: {SAE.MAF.gps}
# to specify the MAF rate in pounds per minute use: {SAE.MAF.lbpm}
# If units of measure are not required then append neither a dot nor any units
#
#Units Low High Fmt Expression
#------------ ------------- ------------- ---- --------------------------------------------------------------
# Innovate LC-1 WBO2
# ========================
*CLC-00-932
V 0.0 5.0 .1 "{EXT.AD1}"
AFR 10.0 20.0 .2 "(({EXT.AD1}+0.03)*3)+7.35"
*CLC-00-933
factor 0.0 2.0 .1 "{CALC.AFR_LC11.AFR}/{GM.AFR_B}"

*CLC-00-934
V 0.0 5.0 .1 "{EXT.AD2}"
AFR 10.0 20.0 .2 "(({EXT.AD2}+0.03)*3)+7.35"
*CLC-00-935
factor 0.0 2.0 .1 "{CALC.AFR_LC12.AFR}/{GM.AFR_B}"

Gelf VXR
June 22nd, 2008, 01:21 PM
I would like to create a calculated pid that looks at commanded spark and compares to delivered spark

I should have read carefully. I missed that. What you want to do won't be too helpfull because of the different tables being used at any time and timing adjustments made by the programming. It will all be recorded on the table I posted.

I have only noted to date for the LS2 these pids that can effect final spark at normal CT and IAT, 85-95C and 15-25C respectively. IAT above 25C and spark reduction occurs, unless I ammend the calibration table.

SPARKADV = delivered spark
KR = retard due to knock
KNKRET = final retard, that reflects KR and burst knock which I have zero'd
SEMRET = Torque reduction spark, I have to investigete this pid further as my delivered spark is no where near commanded spark at low rpm g/cyl?

Gelf VXR
June 22nd, 2008, 01:23 PM
I have searched looking for infor for creating custom pids, calculated from existing pids, but Is there any way to create a new Pid that looks up a calibration table as seen in the tune tool {B5101}?

I would like to create a calculated pid that looks at commanded spark and compares to delivered spark

{B5101}/{SAE.SPARKADV}

Any help much appreciated?

:help2:
:help2:


Forum Admin?

Gelf VXR
June 24th, 2008, 04:11 PM
Forum Admin?

:secret: or :help: :cheers:

joecar
June 25th, 2008, 01:58 AM
Hi Gelf VXR,

What does B5101 look like...

If it's 1-dimensional, you can create a calc pid using the lookup() function, and then a second calc pid to calculate the looked value divided by SPARKADV.

Here is an example (ignore the part about cal_link.txt): showthread.php?t=8142&highlight=lookup (http://forum.efilive.com/showthread.php?t=8142&highlight=lookup)

Cheers
Joe
:cheers:

joecar
June 25th, 2008, 02:04 AM
lookup()

Syntax: lookup(x,a1,a2,b1,b2,…,c1,c2)

Arguments:
x: a numeric expression
a1,a2,b1,b2,…c1,c2 is a list of pairs of values.

Return value: The value of the second value of the pair whose first value is less than or equal to x.

The list of value pairs must be sorted on the first value of each pair.

Gelf VXR
June 25th, 2008, 02:35 AM
Hi Gelf VXR,

What does B5101 look like...

If it's 1-dimensional, you can create a calc pid using the lookup() function, and then a second calc pid to calculate the looked value divided by SPARKADV.

Here is an example (ignore the part about cal_link.txt): showthread.php?t=8142&highlight=lookup (http://forum.efilive.com/showthread.php?t=8142&highlight=lookup)

Cheers
Joe
:cheers:

Unfortunately its a 3d map, Data = Spark, Row = RPM and Column = g/cyl

Gelf VXR
June 25th, 2008, 02:39 AM
lookup()

Syntax: lookup(x,a1,a2,b1,b2,…,c1,c2)

Arguments:
x: a numeric expression
a1,a2,b1,b2,…c1,c2 is a list of pairs of values.

Return value: The value of the second value of the pair whose first value is less than or equal to x.

The list of value pairs must be sorted on the first value of each pair.

My head hurts lol

redhardsupra
June 25th, 2008, 04:19 AM
yea but wouldn't it be nice if there was some DMA or automated lookup procedure that could look up values for ANY table?

joecar
June 25th, 2008, 04:39 AM
x is the "lookup" index pid.

a1,a2 -> when you lookup a1, you get back a2
b1,b2 -> when you lookup b1, you get back b2
c1,c2 -> when you lookup c1, you get back c2
d1,d2
e1,e2
.....,....
x1,x2
.....,....

a1,b1,c1,d1,e1,f1,...x1,... must be in ascending order

lookup() compares x to each of a1,b1,c1,d1,... it stops when it finds the matching/exceeding value;


Example:

lookup({GM.RPM}, 1000,1, 2000,2, 3000,3, 4000,4, 5000,5, 6000,6)

if {GM.RPM} is 3000, then lookup returns 3.
if {GM.RPM} is 4500, then lookup returns 4 (or actually 4.5... I think it interpolates).

jfpilla
June 25th, 2008, 05:27 AM
Are we saying that B5104, b5122 can be logged seperately from B5101? The C5 tables that correspond always log based on what condition exists.

redhardsupra
June 25th, 2008, 05:58 AM
is the interpolation in the lookup function done using the same exact method that the ecu uses?

Gelf VXR
June 25th, 2008, 12:50 PM
x is the "lookup" index pid.

a1,a2 -> when you lookup a1, you get back a2
b1,b2 -> when you lookup b1, you get back b2
c1,c2 -> when you lookup c1, you get back c2
d1,d2
e1,e2
.....,....
x1,x2
.....,....

a1,b1,c1,d1,e1,f1,...x1,... must be in ascending order

lookup() compares x to each of a1,b1,c1,d1,... it stops when it finds the matching/exceeding value;


Example:

lookup({GM.RPM}, 1000,1, 2000,2, 3000,3, 4000,4, 5000,5, 6000,6)

if {GM.RPM} is 3000, then lookup returns 3.
if {GM.RPM} is 4500, then lookup returns 4 (or actually 4.5... I think it interpolates).

Ok, got that, can it not look up a1, a2, a3? Where a1 is the Row, a2 is the column and a3 is the the cross reference value?

joecar
June 26th, 2008, 02:17 AM
lookup() only works with 1-D data.

redhardsupra
June 26th, 2008, 02:19 AM
feature request: lookup2d ;)