Results 1 to 6 of 6

Thread: Experiment - Alternate Method Tuning MAF

  1. #1

    Experiment - Alternate Method Tuning MAF

    We can calculate the Mass Airflow in lbs/min using certain variables outside the MAF Sensor. If done right, we should be able to get the PROPER table settings to tune the MAF Table.

    Logging your Fuel Pressure or having your injectors flow tested will enhance accuracy but is not a must to tune this way.

    This tune method requires.....
    Injector Pulsewidth, RPM, Intake Air Temps and Wideband or AFR CMD

    If one doesn't have a wideband this still can be done at idle only with AFR Commanded. So as long as the Commanded AFR and Narrowband O2 agree on stoich. In that case multiply the entire MAF table by the percentage it takes to get the idle rated tables in line.

    Fuel Flow lb/hr = ((( PulseWidth x RPM ) / 1200 ) x 0.01 ) x Injector Rating at 100%DC
    MAF: Air Flow lb/min = ( Wideband AFR x Fuel Flow lb/hr ) / 60
    TVE: Theoretical 100% VE = ( Displacement x RPM ) / 3456
    VE% = ( MAF / TVE ) x 100

    **Note: My Injectors meet stoich at 34.4 lb/hr @ 14.35:1 , yours will be different.

    VE Insert Formula:
    (((( AFR *(((( INJ PW * RPM )/1200)*0.01)* INJ lb/hr ))/60)/((491.67/(459.67+ IAT ))*0.0808))/(( Cubic Inch Displacement * RPM )/3456))*100

    VE Insert for a 3100v6 with 34.4lb (36lbers from L67) injectors:
    (((([SENS.121]*(((([SENS.112]*[SENS.70])/1200)*0.01)*34.4))/60)/((491.67/(459.67+[SENS.11]))*0.0808))/((191.732*[SENS.70)/3456))*100

    VE Insert for a 3400v6 with 34.4lb (36lbers from L67) injectors:
    (((([SENS.121]*(((([SENS.112]*[SENS.70])/1200)*0.01)*34.4))/60)/((491.67/(459.67+[SENS.11]))*0.0808))/((204.88*[SENS.70)/3456))*100

    MAF lb/min Insert 34.4lb (36lbers from L67) Injectors:
    ([SENS.121]*(((([SENS.112]*[SENS.70])/1200)*0.01)*34.4))

    The MAF Insert can be used against a MAF Freq Histogram to get the proper lb/min rating per frequency.

    If this is done through idle using commanded AFR at stoich, divide actual MAF lb/min by rated MAF lb/min to obtain the number used to multiply the entire MAF table with.

    This Insert will provide a number to multiply the MAF Table by: For idle tuning the MAF
    ([SENS.121]*(((([SENS.112]*[SENS.70])/1200)*0.01)*34.4))/[SENS.40]

    Most of this stuff is new and not fully tested. Use these at your own risk as I am not responsible for any errors I may have made.

    Hopefully, there could be some insightful points posted up.
    Last edited by TGP-37; 11-27-2010 at 01:39 PM.

  2. #2
    Senior Tuner
    Join Date
    Dec 2004
    Location
    Laurel, MD
    Posts
    1,020
    yup, that looks correct, you calculate MAF from WB and fuel consumption.

    I like to do it in airmass not airflow, as it eliminates dependencies on the number of cylinders and RPM.

    Here's another trick, if you represent the MAF calibration as a 3-rd order poly function of MAFfreq, you'll end up with

    CYLAIRMASSfuel=CYLAIRMASSmaf
    MAF=A*MAFfreq^3 + B*MAFfreq^2 + C*MAFfreq^1 + D
    MAF=CYLAIRMASSmaf*RPM*NUMCYL/120
    thus:
    CYLAIRMASSmaf=120*MAF/(RPM*NUMCYL)
    IPW*IFR*AFRwb=120*MAF/(RPM*NUMCYL)
    at this moment notice you got everything but MAF, so isolate MAF:
    IPW*IFR*AFRwb*RPM*NUMCYL/120=MAF
    and now describe MAF as a function of MAFfreq
    IPW*IFR*AFRwb*RPM*NUMCYL/120=A*MAFfreq^3 + B*MAFfreq^2 + C*MAFfreq^1 + D
    or you could make your life easier if you write it out in vector form as:
    IPW*IFR*AFRwb*RPM*NUMCYL/120=[A B C D] * (MAFfreq^3 MAFfreq^2 MAFfreq^1 1]
    at this moment you just solve for for the [A B C D] vector, and you got Ordinary Least Squares solution, which is unique and optimal. It is however prone to outliers (which you'll have plenty of until you have a full fuel model), so I use robust fitting of the 3rd order poly instead of the OLS. Works like a charm tho.

    Good thinking

  3. #3
    Quote Originally Posted by redhardsupra View Post
    yup, that looks correct, you calculate MAF from WB and fuel consumption.

    I like to do it in airmass not airflow, as it eliminates dependencies on the number of cylinders and RPM.

    Here's another trick, if you represent the MAF calibration as a 3-rd order poly function of MAFfreq, you'll end up with

    CYLAIRMASSfuel=CYLAIRMASSmaf
    MAF=A*MAFfreq^3 + B*MAFfreq^2 + C*MAFfreq^1 + D
    MAF=CYLAIRMASSmaf*RPM*NUMCYL/120
    thus:
    CYLAIRMASSmaf=120*MAF/(RPM*NUMCYL)
    IPW*IFR*AFRwb=120*MAF/(RPM*NUMCYL)
    at this moment notice you got everything but MAF, so isolate MAF:
    IPW*IFR*AFRwb*RPM*NUMCYL/120=MAF
    and now describe MAF as a function of MAFfreq
    IPW*IFR*AFRwb*RPM*NUMCYL/120=A*MAFfreq^3 + B*MAFfreq^2 + C*MAFfreq^1 + D
    or you could make your life easier if you write it out in vector form as:
    IPW*IFR*AFRwb*RPM*NUMCYL/120=[A B C D] * (MAFfreq^3 MAFfreq^2 MAFfreq^1 1]
    at this moment you just solve for for the [A B C D] vector, and you got Ordinary Least Squares solution, which is unique and optimal. It is however prone to outliers (which you'll have plenty of until you have a full fuel model), so I use robust fitting of the 3rd order poly instead of the OLS. Works like a charm tho.

    Good thinking
    Wow, nice. I had to read it a few times to get it. I'm still a little confused

    So is it like this.............?

    IPW*IFR*AFRwb*RPM*NUMCYL/120=MAF
    2.3ms * 0.59 lb/hr * 14.3 * 900 * 6 / 120 = 873.2295

    MAF = 873.2295

    873.2295 = A*MAFfreq^3 + B*MAFfreq^2 + C*MAFfreq^1 + D

    This is as far as I know how. The MAF Frequency, Ordinary Least Squares is confusing. I have yet to learn these. But this is exactly what I was hoping for when I posted this thread.

    So is it reasonable to use this data to chart the MAF Table? Why GM didn't calculate MAF this way instead of a MAF Sensor?

    Thanks man

  4. #4
    Senior Tuner
    Join Date
    Dec 2004
    Location
    Laurel, MD
    Posts
    1,020
    You gotta fix the units first:
    IPW should be in seconds (0.0023sec)
    IFR should be in grams/second (0.0743 grams per second but that seems wrong for any common injectors)
    AFR is dimensionless so 14.3 is fine
    RPM needs to be converted to 1/sec (15 1/sec or 15Hz)

    Now you can do the math. What you had is a mixture of milliseconds, hours, minutes, and pounds... not very pretty or useful

    The reason for using a lookup table over calculation is based in history: Old ECUs are slow, and memory lookups were much faster than doing linear algebra. Notice that the new ECUs have gone the other way, and now even the VE table is a multi-dimensional hypersurface calculated on the fly by a (much faster than before) ECU.

    Hit me up on IM or something, I could show you a lot more.

  5. #5
    Quote Originally Posted by redhardsupra View Post
    You gotta fix the units first:
    IPW should be in seconds (0.0023sec)
    IFR should be in grams/second (0.0743 grams per second but that seems wrong for any common injectors)
    AFR is dimensionless so 14.3 is fine
    RPM needs to be converted to 1/sec (15 1/sec or 15Hz)

    Now you can do the math. What you had is a mixture of milliseconds, hours, minutes, and pounds... not very pretty or useful

    The reason for using a lookup table over calculation is based in history: Old ECUs are slow, and memory lookups were much faster than doing linear algebra. Notice that the new ECUs have gone the other way, and now even the VE table is a multi-dimensional hypersurface calculated on the fly by a (much faster than before) ECU.

    Hit me up on IM or something, I could show you a lot more.
    That is some great info. I am going to copy these formulas over to my Excel worksheet.



    Would you happen to know if HP Scanner is compatible with Excel to extract Real Time Data via COM Automation? The RTD function in example. It would be nice to design an excel worksheet that can calc values live with the scanner.

    Quote Originally Posted by redhardsupra View Post
    IFR should be in grams/second (0.0743 grams per second but that seems wrong for any common injectors)
    I was just pluging fictional numbers while learning the mechanics of the formula.

    Quote Originally Posted by redhardsupra View Post
    Now you can do the math. What you had is a mixture of milliseconds, hours, minutes, and pounds... not very pretty or useful
    Ahh yes. I understand the error(s) now. I like to say, "An error only becomes a mistake when we refuse to correct it."
    Last edited by TGP-37; 11-28-2010 at 11:36 AM.

  6. #6
    SO I am trying to find practical applications for these equations. One already being MAF tuning.

    See if this is accurate or not, please.

    AFR Commanded: 14.5:1
    MAF Sensor: 0.96562 lb/min @ 2831 Hz
    IAT: 68*F
    RPM: 1391.25
    INJ DUTY: 2.49442%
    INJ RATE: 34.4 lb/hr

    Actual AFR: 14.1:1

    So the PCM is reading less air then what is entering since is running rich by 0.4 AFR.

    The PCM thinks it is pushing 0.06659 lb/min FUEL to obtain 14.5 AFR. But since the Wideband is reading 14.1 the actual fuel flow is 0.06848 lb/min.

    So there needs to be more air to balance things. Since the Fuel Flow is off by (0.06848/0.06659) 1.02838264 then the Airflow must also be off the same amount.

    Multiplying the current airflow of 0.96562 lb/min reported at 2831Hz, cells 2750-2875 Hz, by 1.02838264 for 0.99302 lb/min at 2831 Hz.

    A log sorted with all instances of data at 2750 Hz running the same formula logic above would yield an average amount of airflow at said Hz Cell Block. Avoiding averages from 2750-2874 to obtain a more perfect variable for 2750 Hz.

    It seems to me, within WB error/range, this would provide very accurate Airflow data to calibrate the MAF Sensor. So this method should be superior to other MAF tuning methods as it provides a solid airflow amount. And using such precision in calculation, 0.xxxx0, supports accuracy even more so avoiding the rounded-up effect.




    Does this seem correct?

    Also, is there any formula for calculating spark advance/degree? So far I believe logging RPM, MAF, AFR and having certain values like the speed of combustion at various AFR's and the distance from Spark to Piston Top at TDC.

    What would be needed is a formula to calculate the speed of combustion under the variables of AFR and intake charge density from calculating MAF, IAT and Dynamic Compression.

    Some where there has to be a formula to mathematically determine peak compression from combustion as well.