PDA

View Full Version : Formula help for Calculated Pid



vetteboy2k
July 26th, 2009, 04:23 AM
I am looking to create a calculated pid for .5V = .68 Lambda and 4.5V = 1.36 Lambda

I understand how to type all the information into the calc_pids file I just am unclear on the math behind coming up with the equation

The equation for the AFR .5V = 10 and 4.5V = 20 is
{EXT.AD1} * 2.5 + 8.75

Can anyone help me understand how to come up with the same for the Lambda values :cheers:

vetteboy2k
July 26th, 2009, 04:29 AM
Also is there any way to create a calculated pid for Serial Lambda and Analog Lambda? I tried using B3605 however an error occurred when opening the scan tool

mr.prick
July 26th, 2009, 04:38 AM
Depending on who you ask, Lambda = 14.7AFR
(AFR/14.7) = Lambda
or
{EXT.AD1}*2.5+8.75/14.7
If you have serial just select EXT.WO2LAM1, why convert it to analog?

vetteboy2k
July 26th, 2009, 05:07 AM
Thank you, haha I was way over complicating things!

I now have
factor 0.0 2.0 .2 "{CALC.LAM_FJO} / ({GM.AFR} / 14.7)"

As for the BEN for Serial Lambda, I didn't see a pid for BEN lambda serial so just getting ready for it. There is a BEN for Serial AFR just not Serial Lambda

This is what I will have
factor 0.0 2.0 .2 "{EXT.WO2LAM1} / ({GM.AFR} / 14.7)"

Thank you for your clear headed thinking on this one!

joecar
July 26th, 2009, 12:20 PM
For serial AFR, the pid is BEN1.

vetteboy2k
July 26th, 2009, 12:50 PM
Yes, but what is the BEN for serial LAMBDA?

vetteboy2k
July 26th, 2009, 12:54 PM
I ordered a universal serial cable from TAq cables to hook up to my FJO, in the mean time I am trying to get the analog external 1 working properly. The FJO read 14.55 while V2 when scanning reads 14.11 making dialing things in difficult. What is the next step in dialing in the Analog?

mr.prick
July 26th, 2009, 01:52 PM
For BEN from Lambda you will need another PID
to convert commanded AFR to commanded Lambda:
{GM.AFR}/14.7

Why are you basing everything off of Lambda?
You may end up upside down with all the PID conversions and
the PCM uses EQ {B3601} anyways which is the opposite of Lambda.
Use AFR or EQ for tuning.

vetteboy2k
July 26th, 2009, 02:04 PM
B/c of different fuels and levels of Ethanol and when using methanol as well. Lambda never changes... stoich is stoich

mr.prick
July 26th, 2009, 02:57 PM
Stoich is different between fuels. Stoichiometry (http://en.wikipedia.org/wiki/Stoich#Different_stoichiometries_in_competing_reac tions)
Gasoline 14.7 : 1 — 6.8%
Natural gas 17.2 : 1 9.7 : 1 7.9%
Propane (LP) 15.5 : 1 23.9 : 1 6.45%
Ethanol 9 : 1 — 11.1%
Methanol 6.4 : 1 — 15.6%
Hydrogen 34 : 1 2.39 : 1 2.9%
Diesel 14.6 : 1 — 6.8%

Lambda is going to change and the PID is based off 14.7AFR
You can change this for each fuel type.

vetteboy2k
July 26th, 2009, 11:53 PM
What I meant by that is the sensor doesn't care what fuel your using or what % ethanol you have in your fuel, Its always going to read stoich of that particular fuel at 1.0 lambda.

joecar
July 27th, 2009, 04:39 AM
Yes, but what is the BEN for serial LAMBDA?

You could use this (like Mr.Prick suggested): 14.7 / {GM.AFR} * {EXT.WO2LAM1}

Or you could instead log GM.EQIVRATIO and use this: {GM.EQIVRATIO} * {EXT.WO2LAM1}

And I would display WBO2EQ1 = 1 / {EXT.WO2LAM1} on the dash/chart to avoid confusion...

After using EQ units for a while you get used to them, you'll like EQ better than AFR.

mr.prick
July 27th, 2009, 07:21 AM
Personally I use BEN as a reference,
I don't care what the AFR is at the moment as much as I care if it is what it should be.
I don't worry about this anymore. :)

vetteboy2k
August 3rd, 2009, 02:21 PM
Has anyone ever got a FJO wideband to read serial into the V2? I bought a universal cable from taq and hooked up the wires tonight but I get Controller not found.

I swapped Tx and Rx and still the same Controller not found message.

I thought I read somewhere that FJO's serial would not work, yet I see that its supported in the V2 for serial WB02 and Paul said it is supported as well ?

vetteboy2k
August 4th, 2009, 02:51 AM
The FJO serial wide band protocol is supported on FlashScan. Make sure you have the latest firmware. A new firmware version (V2.06.01) will be available soon. It contains some small display fix-ups that may affect the serial data display.

Page 15 of the FJO Installation and User Manual shows a wiring diagram.

Regards
Paul

http://forum.efilive.com/showpost.php?p=80112&postcount=11

vetteboy2k
August 9th, 2009, 08:48 AM
Measuring the analog voltage not connected = 4.41 and connected = 4.11 therefor the offset 4.11/4.41=.931973 How would I enter that into my calc pid. It keeps coming up as an invalid. Below is the error. How should I have this calculated or written in the calc pid to show properly?

FJO Analog AFR {CALC.AFR_FJO}

Expression:
AFR = ({EXT.AD1} / .931973) * 2.5 + 8.75
is NOT valid because:
Syntax error: ".", position 14.

PID value cannot be determined because
the following error would occur:
Expression not valid: Syntax error: ".", position 14.

***Looks like I got it, it needed a 0 in front of the decimal AFR = ({EXT.AD1} / 0.931973) * 2.5 + 8.75

mr.prick
August 9th, 2009, 09:43 AM
You may want to calibrate your AD's or at least check them,
you shouldn't need to add an offset for the V2.

whackem04
October 4th, 2009, 02:20 PM
can somebody make a sticky about how to edit the Calcuated.Pids the right way and how to write formulas.
thanks

joecar
October 5th, 2009, 02:04 AM
can somebody make a sticky about how to edit the Calcuated.Pids the right way and how to write formulas.
thanksCalculated PIDs:
showthread.php?t=132 (http://forum.efilive.com/showthread.php?t=132)
showthread.php?t=130 (http://forum.efilive.com/showthread.php?t=130)
showthread.php?t=10 (http://forum.efilive.com/showthread.php?t=10)

Arash
December 21st, 2012, 09:16 PM
Measuring the analog voltage not connected = 4.41 and connected = 4.11 therefor the offset 4.11/4.41=.931973 How would I enter that into my calc pid. It keeps coming up as an invalid. Below is the error. How should I have this calculated or written in the calc pid to show properly?

FJO Analog AFR {CALC.AFR_FJO}

Expression:
AFR = ({EXT.AD1} / .931973) * 2.5 + 8.75
is NOT valid because:
Syntax error: ".", position 14.

PID value cannot be determined because
the following error would occur:
Expression not valid: Syntax error: ".", position 14.

***Looks like I got it, it needed a 0 in front of the decimal AFR = ({EXT.AD1} / 0.931973) * 2.5 + 8.75


Based on the formula för a liear equation (y = kx + n), in this case, I would use "n" to adjust for any offset.

So the equation in your case would translate into:

y = lambda
k = line slope
x = voltage
n = vertical offset = the point at the y-axis where the line crosses it

So by adjusting the n-number, you could offset the whole line up or down.

If you have an analog voltage number from the manufacturer for e.g. not connected/connected, I would just compare it with your current reading and insert that offset on to the n-value that was current for you base line lambda calibration.

Is that making any sense? :)