Results 1 to 11 of 11

Thread: Setting up AFR % Error Histogram

  1. #1
    Tuner in Training
    Join Date
    Nov 2015
    Posts
    21

    Setting up AFR % Error Histogram

    So I?ve been tuning my cam/long tube 2012 Ram 5.7 with STFTs/LTFTs up until now. Which has been working great, but now I?ve turbo?d it and have wired in a wideband. Thing is right now I have the standard MPVI cable while I?m waiting for the pro version of MPVI2 to come out. In the past with LSs, I?ve wired the wideband into the AC pressure input and set up the maths to tune that way without issue. Well I?ve taken the same approach with the ram except I wired it into the B1S2 pin.

    I?ve successfully gotten the wideband input working and reading, and can log AFR vs Pressure ratio, but I can?t for the life of me get the AFR % error working. It ends up logging some numbers in the 150-300 range so clearly the math is wrong somewhere. I know this should be relatively simple but i just can?t figure it out. I?ll get to my computer in a bit and check which PIDs I was using. Again I got the wideband working and logging, I just can?t get the math correct to get the AFR error percentage to show correctly.

  2. #2
    Tuner in Training
    Join Date
    Nov 2015
    Posts
    21
    Okay so I've been using PID 6101 for my wideband voltage input signal with math "([6101]/.5)+10" and it's been working great. Then I've been using PID 68 for my equivalence ratio commanded SAE channel. I set up a math for AFR % error using equation "((([6101]/.5)+10]/14.7) - [68]) / [68]" with info that I found in another thread here, but it doesn't give me a useful percentage value by any means. I'm lost at this point. Any help would be appreciated

  3. #3
    Advanced Tuner
    Join Date
    Apr 2014
    Posts
    704
    Quote Originally Posted by radcon15 View Post
    Okay so I've been using PID 6101 for my wideband voltage input signal with math "([6101]/.5)+10" and it's been working great. Then I've been using PID 68 for my equivalence ratio commanded SAE channel. I set up a math for AFR % error using equation "((([6101]/.5)+10]/14.7) - [68]) / [68]" with info that I found in another thread here, but it doesn't give me a useful percentage value by any means. I'm lost at this point. Any help would be appreciated
    What kind of percentage value are you wanting to get? A decimal value that is an equivalent to a percentage? Or a whole number representing the percentage you want? I would assume the decimal value is what you're after so you can use it as a multiplier in your VE map?

    So, in the case of a target AFR of 14.7:1 and an actual of 15.0:1, you would need to add 2% to the corresponding load vs RPM breakpoint in the VE map to increase fueling in that spot of the map. Thus, I would assume you'd like to have the equation give you the result of 1.02 to use as a multiplier. Is this correct?

  4. #4
    Tuner in Training
    Join Date
    Nov 2015
    Posts
    21
    Yes that is correct. I?d like to be able to use it as a multiplier in the same way as you do with STFTs/LTFTs to dial in the VE table

  5. #5
    Advanced Tuner
    Join Date
    Apr 2014
    Posts
    704
    OK, one last question. There have been differences from one Vehicle Manufacturer to another on the definition of EQ Ratio, and I even want to say that some OS's of the same Manufacturer have even disagreed on EQ Ratio.

    Some define it as Lambda (ie. Commanded AFR/Stoich AFR) and others define it as the opposite, or in other words, a percentage added to stoich (ie. Stoich AFR/Commanded AFR).

    Which way does it log on your vehicle?

  6. #6
    Tuner in Training
    Join Date
    Nov 2015
    Posts
    21
    By default it logs it as Lambda. I have attempted to change it to gas AFR in the channel list but this doesn't affect anything in the graphs.

  7. #7
    Advanced Tuner
    Join Date
    Apr 2014
    Posts
    704
    Quote Originally Posted by radcon15 View Post
    By default it logs it as Lambda. I have attempted to change it to gas AFR in the channel list but this doesn't affect anything in the graphs.
    OK, then this should be a matter of simply dividing Actual EQ Ratio (Actual Lambda) by Target EQ Ratio (Target Lambda). The equation would look as follows for your PIDs:

    ((([6101]/.5)+10)/14.7)/[68]

    So, as an example, if your wideband were to be reading 14.0:1 during part throttle where the target EQ Ratio was 1.0, the math would work out as follows:

    14.0:1 would equal a 2.0 volt output from the wideband.

    (((2/.5)+10)/14.7)/1.0 = 0.95238095238095238095238095238095

    So, that will give you a multiplication factor of .95 for the given Load vs RPM breakpoint.

  8. #8
    Tuner in Training
    Join Date
    Nov 2015
    Posts
    21
    I understand more now, but let me re-phrase, I meant to say earlier that I was looking for a whole number representing the percentage I want. Such as when multiplying the entire table by the LTFT or STFT values. The equation you gave works to give me the amount of error, but If I multiply the entire tables values by the logged data, it would multiply by a max of one percent and not at all in others.

    Sorry that I didn't clarify better, I even misunderstood what I was looking for. Any idea on how to get it to read as a whole percentage value? I appreciate all the help. I attached two screenshots of what I'm getting and what I'm looking for.

    Screenshot (1).png Screenshot (2).png

  9. #9
    Advanced Tuner
    Join Date
    Apr 2014
    Posts
    704
    Quote Originally Posted by radcon15 View Post
    I understand more now, but let me re-phrase, I meant to say earlier that I was looking for a whole number representing the percentage I want. Such as when multiplying the entire table by the LTFT or STFT values. The equation you gave works to give me the amount of error, but If I multiply the entire tables values by the logged data, it would multiply by a max of one percent and not at all in others.

    Sorry that I didn't clarify better, I even misunderstood what I was looking for. Any idea on how to get it to read as a whole percentage value? I appreciate all the help. I attached two screenshots of what I'm getting and what I'm looking for.

    Screenshot (1).png Screenshot (2).png
    This should do it:

    ((([6101]/.5)+10)/14.7)/[68]*100-100

  10. #10
    Tuner in Training
    Join Date
    Nov 2015
    Posts
    21
    That worked! Thanks a lot, That's one major hurdle figured out, can't wait to get this thing dialed in well. I appreciate you taking your time to help out.

    Screenshot (3).png

  11. #11
    Advanced Tuner
    Join Date
    Apr 2014
    Posts
    704
    Quote Originally Posted by radcon15 View Post
    That worked! Thanks a lot, That's one major hurdle figured out, can't wait to get this thing dialed in well. I appreciate you taking your time to help out.

    Screenshot (3).png
    You bet! Glad to help.