Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: PID creation Non-Linear

  1. #1
    Senior Member Naf's Avatar
    Join Date
    Aug 2006
    Posts
    183

    Exclamation PID creation Non-Linear

    Ok, i am so lost here...

    I have an AEM wideband twin channel, i followed the non-linear instructins, and its still not working right...I had a very accurate equation, but the AFR wouldnt pass 9A/F although i was actually at 15A/F

    Here is a copy of my PID CALC

    *UNITS

    #Code System Abbr Description
    #-------- ---------- -------- -------------------------------------------------------------
    A/F AEM 1 None AFR "Air Fuel Ratio"
    B/F AEM 2 None AFR "Air Fuel Ratio"

    # ================================================== ============================
    # Add slot definitions here
    # --------------------------------
    # See sae_generic.txt for more information on "SLOT" formats
    #
    #Units Low High Fmt Expression
    #------------ ------------- ------------- ---- --------------------------------------------------------------
    *CLC-00-001
    A/F 8.41 19.44 .1 "(0.0129*{EXT.AD1}*{EXT.AD1})-(0.0362*{EXT.AD1})+9.5366"
    *CLC-00-002
    A/F 8.41 19.44 .1 "(0.0129*{EXT.AD2}*{EXT.AD2})-(0.0362*{EXT.AD2})+9.5366"
    # ================================================== ============================
    *PRN - Parameter Reference Numbers
    # --------------------------------
    # See sae_generic.txt for more information on the *PRN section
    #
    #Code PRN SLOT Units System Description
    #------------------------- ---- ------------ ---------------- ---------------- ------------------------------------------
    CALC.AEM_AFR1 F002 CLC-00-001 "AFR,V" O2-Wide "AEM Wideband"
    CALC.AEM_AFR2 F002 CLC-00-002 "AFR,V" O2-Wide "AEM Wideband 2"

    Please help...I need to get the widebands to work so i may finish off my tuning...

    Thank you all for you time

    Manaf

  2. #2
    Joe (Moderator) joecar's Avatar
    Join Date
    Apr 2003
    Posts
    28,403

    Default

    So your equation is: AFR = 0.0129*V^2 - 0.0362*V + 9.5366

    This gives:
    V=0 --> AFR=9.5366
    V=5 --> AFR=9.6781

    Your equation is incorrect...

  3. #3
    Senior Member Naf's Avatar
    Join Date
    Aug 2006
    Posts
    183

    Unhappy

    This is the equation that Excel gave me...

    i have even a 3 order polynominal and 4 order...

    What other means do i have to get the proper equation

  4. #4
    Joe (Moderator) joecar's Avatar
    Join Date
    Apr 2003
    Posts
    28,403

    Default

    Naf,

    Welcome to the forum...

    What are your sample data points...?
    What are your 3rd/4th order polynomials...?

    Cheers
    Joe

  5. #5
    Senior Member
    Join Date
    Jun 2006
    Posts
    144

    Default

    Quote Originally Posted by Naf
    This is the equation that Excel gave me...

    i have even a 3 order polynominal and 4 order...

    What other means do i have to get the proper equation

    You'd probally be better setting it up as a piecewise

  6. #6
    Lifetime Member
    Join Date
    Jul 2005
    Posts
    702

    Default

    yea, just give us the data and we'll give you an equation, i've done this for the zeitronix's wb nonlinear output over 2yrs ago, it's not hard

  7. #7
    Senior Member Naf's Avatar
    Join Date
    Aug 2006
    Posts
    183

    Talking

    Thanx so much

    The points are as follows

    Volts AFR Gas 0-5V
    0.000 8.41
    0.156 8.52
    0.312 8.64
    0.468 8.81
    0.624 8.98
    0.780 9.09
    0.936 9.26
    1.092 9.44
    1.248 9.61
    1.404 9.78
    1.560 9.95
    1.716 10.12
    1.872 10.29
    2.028 10.47
    2.184 10.69
    2.340 10.92
    2.496 11.15
    2.652 11.38
    2.808 11.67
    2.964 11.95
    3.120 12.24
    3.276 12.58
    3.432 12.92
    3.588 13.27
    3.744 13.67
    3.900 14.13
    4.056 14.64
    4.212 15.21
    4.368 15.84
    4.524 16.53
    4.680 17.27
    4.836 18.19
    4.992 19.44

  8. #8
    EFILive Developer Site Admin Blacky's Avatar
    Join Date
    Mar 2003
    Posts
    9,503

    Default

    Or you can set up a lookup function in a calculated PID.

    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.
    So in your case:
    Code:
    Lookup({EXT.AD1},0.000,8.41,0.156,8.520.312,8.64,0.468,8.81,0.624,8.98,0.780,9.09,0.936,9.26,1.092,9.44,1.248,9.61,1.404,9.78,1.560,9.95,1.716,10.12,1.872,10.29,2.028,10.47,2.184,10.69,2.340,10.92,2.496,11.15,2.652,11.38,2.808,11.67,2.964,11.95,3.120,12.24,3.276,12.58,3.432,12.92,3.588,13.27,3.744,13.67,3.900,14.13,4.056,14.64,4.212,15.21,4.368,15.84,4.524,16.53,4.680,17.27,4.836,18.19,4.992,19.44)
    EFILive will interpolate between data points.

    Regards
    Paul
    Before asking for help, please read this.

  9. #9
    Lifetime Member
    Join Date
    Jul 2005
    Posts
    702

    Default

    y = 0.1153x^3 - 0.4494x^2 + 1.5386x + 8.2255 seems to work with R^2=0.9986 so it's very close for the data given

  10. #10
    Senior Member Naf's Avatar
    Join Date
    Aug 2006
    Posts
    183

    Default

    I got the y= part, but where does the R^2=0.9986 come in?

Page 1 of 3 123 LastLast

Similar Threads

  1. Macro Creation
    By rebel7777 in forum Duramax LLY
    Replies: 7
    Last Post: January 21st, 2010, 05:50 AM
  2. LC1 Expression - Linear or Non-linear?
    By LastCall in forum General
    Replies: 1
    Last Post: March 10th, 2009, 04:52 AM
  3. Pid Creation / Calculated pids
    By Gelf VXR in forum General (Petrol, Gas, Ethanol)
    Replies: 19
    Last Post: June 26th, 2008, 03:19 AM
  4. Linear-fill
    By Chevy366 in forum Custom Operating Systems
    Replies: 13
    Last Post: February 19th, 2008, 11:59 AM
  5. PID Creation Help
    By y2kws6 in forum General
    Replies: 6
    Last Post: December 20th, 2006, 09:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •