-
Notifications
You must be signed in to change notification settings - Fork 13
How To Use
Note: In order to load the log file please make sure that file doesn't have any extra information at the top and actually starts with column headers
Once you have downloaded the zip or tar.gz file you can unzip it to any folder you would like the program to reside in.
There are 2 "run" scripts (run.bat is for Windows and run.sh is for Linux) in the folder which will start the program.
By default running the run.bat script will bring up the program with Windows OS default look-and-feel and running run.sh script will bring up the program with Nimbus look-and-feel under Linux. You can open "run" script, comment out default starting line (by adding REM in run.bat or # in run.sh) and uncomment any of the lines below to see what other skins are available (naturally Windows look-and-feel will NOT work under Linux).
If the program doesn't startup please make sure that:
- you use look-and-feel that is available (WindowsLookAndFeel under Windows and MotifLookAndFeel under linux are always safe bet).
- java is in your PATH. You can also specify java bin folder in the run script.
Credits:
This tool was originally based on BadNoodle's spreadsheet, however changes were made as per Kodename47 suggestions. The usage guide is based on wrxsti-l's post. Big thanks to all who have been active in MAF scaling discussions and providing methodology - williaty, Rene2.5RS, and others.
A special 'thank you' to Td-d and Kodename47 for providing feedback.
Logic:
Logged MAF voltage and AFR % error are fitted to your current MAF scaling and new scaling is suggested.
The raw AFR is calculated as wideband AFR / ((100 - (LTFT + STFT)) / 100)
. The AFR % error is calculated as (raw AFR - interpolated AFR) / interpolated AFR * 100)
, where interpolated AFR is interpolated from "Primary Open Loop Fueling" table or (raw AFR - ECU Target AFR) / ECU Target AFR * 100)
if you log "Commanded AFR" / "Fueling Final Base" and set the "ECU Target AFR" column in settings.
The 'advantage' is that since a lot of the data points are between cells, it distributes the % error between cells based on how far your data point is from the cell value.
Say your maf was scaled like:
MAFv: 0 1 2 3 4 5
g/s: 0 10 20 30 40 50
and your data point was:
mafv: 1.75
% error: 10
The idea is by distribution the data between cells you get a smoother scaling. then the % error would get distributed like:
MAFv: 0 1 2 3 4 5
g/s: 0 2.5 7.5 0 0 0
Also, please note that collected data and correction applied may be less than the full MAF scaling voltage. In this case error correction is also applied to those table cells after the one corrected. The % error for those correction is calculated as average of 10 highest correction for the last cell.
Usage:
You really need to nail CL portion of your MAF scaling first!
You may not nail the calibration in one shot, so rinse and repeat until you're happy with the scaling. Also, it is VERY important that you collect data at a constant temperature. If you collect data at 30F one day and then 60F next week, it will totally screw up the process.
The below instructions are merely suggestions for ideal data collection. You can use single log file for Open Loop and Close Loop MAF scaling as long as you apply filters properly to filter out bad data such idle, tip-in, OL/CL and CL/OL transitions, etc (tweak the defaults as needed).
Data Tab
Note:
use right mouse button click to see the menu of available actions on tables.
for quick selection of cells in a table click on the first cell, hold shift key and click on the last cell; all the cells in between will be highlighted.
-
Do several 3rd or 4th gear WOT logs from 2000 rpm to redline, log "Throttle Angle %", "AFR Learning (LTFT)", "AFR Correction (STFT)", "MAF Voltage", "AFR" from Wideband O2 (unless your car O2 is WB), and "Engine Speed". If your logging tool allows it, also log "Commanded Afr" or "Fueling Final Base" to use as "ECU Target AFR". Additionally if you intend to use "Primary Open Loop Fueling" table (i.e. you do not have "Commanded Afr" or "FFB" available) you must log "Engine Load (g/rev)" if table has load-based Y-Axis or "Manifold Absolute Pressure (psi absolute)" if table's Y-Axis is MAP-based.
-
If you have map switching option and log a single file with multiple maps then you must log "Commanded Afr" / "Fueling Final Base" as there is no on-the-fly switching of "Primary Open Loop Fueling" table.
-
Open your tune in RomRaider.
-
Expand "Mass Airflow /Engine Load" tables group and copy "MAF Sensor Scaling" table by clicking "Edit"->"Copy Table" into the first cell of "Current MAF Scaling" table on the tool. If you copy MAF scaling from a vertically laid out table then use "Paste Vertical" right click menu option.
-
If you did not log "Commanded Afr" / "Fueling Final Base", click "POL Fueling" button to set open loop fueling data.
-
Open your tune in RomRaider.
-
Expand "Fueling - Primary Open Loop" tables group and copy "Primary Open Loop Fueling" table by clicking "Edit"->"Copy Table" into the first cell of "Primary Open Loop Fueling" table on the tool.
-
Click "Validate" button to make sure all is fine (validation is done on setting the table as default and saving it or on submitting the table so it's not required).
-
Most likely the "Primary Open Loop Fueling" table will stay the same, so for auto-loading next time you can click on "Set Default" and save this table in a new file. If you do have another tune with a different "Primary Open Loop Fueling" table, you can click on "Clear" to clear out table, then paste data from second "Primary Open Loop Fueling" table, click on "Set Default" and save this table in a new file. To switch between different Primary Open Loop Fueling tables saved in files click on "Clear" to clear table, then click on "Load" to load data from file, then click on "Set Default" so that next time it will be loaded automatically.
- If you did log "Commanded Afr" / "Fueling Final Base" then you should set the "ECU Target AFR" column name in settings screen while loading log file. If that column is empty then "Primary Open Loop Fueling" table is used and values are interpolated from table (much slower).
- Now you have two ways to proceed:
-
If you have saved data from previous run and would like to see the graphs or modify some data manually you can load that run using "Load" button.
-
If you just have log file(s) (make sure that log starts with column headers) with WOT pulls, then click on "Load Log" button, select your log file with WOT runs, select asked columns from log file AND set desired filters values. Please pay attention to filters on some columns to filter out noisy data. Once the log file is processed you should see WOT pull tables on the tool populated with data. If you have more log files just repeat this procedure until all 12 tables are loaded.
-
Maf Voltage Minimum - this filter will throw away all data rows from log file where MAFV is below the specified value.
-
WOT Stationary Point - this filter will throw away all data rows from log file where specified column (Throttle Angle, Accel Pedal Angle, or other) value is below the specified value.
-
AFR Error +/- % Value - this filter will throw away all data rows from log file where calculated AFR Error % is greater than or less than specified deviation % value.
-
Min WOT Enrichment - this is an override for values in Primary Open Loop Fueling table that exceed specified value. Some ROMs have "Minimum Primary Open Loop Enrichment (Throttle)" table which specifies minimum enrichment based on throttle position. Since this is a WOT MAF tool you should set this override to the value in that table set for the maximum throttle position. If your ROM does not have this table keep this value above 16
-
OL/CL Transition - Number of Rows to Skip - this option may be used because some rows at the start and end of WOT may be incorrect due to variable WB delay.
-
-
At this point you can save all the input data for future reference or re-scaling by clicking on "Save" button at the top bar.
-
Click on "GO" button at the top bar right corner to generate corrected MAF curve. The "Chart" tab will open once data is processed.
Chart Tab
Note:
use mouse wheel to zoom in/out.
use Ctrl + left mouse button click or keyboard arrow keys to move the chart left/right/up/down (useful when chart is zoomed).
hover mouse over a point to see point values for x/y axes.
use left mouse button click-and-drag a curve point to move that point up/down (enabled for smoothing chart only).
-
You can click on "MafV/RPM" checkbox to view MAF Voltage change over RPM change.
-
You can click on "AFR Error" checkbox to view AFR Error % placement (scaling is on the right hand side).
-
You can click on "Current" checkbox to view current MAF curve pasted into input "Current MAF Scaling" table on the "Data" tab.
-
You can click on "Corrected" checkbox to view corrected MAF curve generated based on the WOT pulls.
-
You can click on "Smoothed" checkbox to view smoothed MAF curve. Keep in mind that initially this curve is the same as corrected curve. It will change if you apply smoothing and/or manual correction(s).
-
Resulting MAF Scaling table is at the bottom of the Chart Tab screen.
-
This is where you have now two ways to proceed:
-
quick - straight values copy
- Simply copy the newly generated "Airflow (g/s)" values from results table into the "MAF Sensor Scaling" table in your tuning tool (eg RomRaider). If your table has a vertical layout, use "Copy Vertical" from right-click menu.
-
slow (optional) - apply smoothing or manual changes. To apply smoothing to the Corrected Maf Scaling curve or to make manual changes (only for people who really know what they are doing!!!) click on "Smoothing" checkbox. The chart view will display Smoothed Maf curve(blue) together with Current MAF curve slope line(red) and the Smoothed MAF curve slope line(green). At the bottom of the screen there is resulting MAF scaling table with controls that allow making changes to the table (and thus the MAF curve). Row 1 of the result table corresponds to "MAF Sensor (volts)" and row 2 of the "Smoothing" tab corresponds to "Airflow (g/s)".
Slope line is a line of MAF Curve slope values. Slope value is a number which is used to indicate the steepness of a curve at a particular point. Slope value for MAF Curve is calculated between each 2 points of the curve as:
`slope = (y2 - y1) / (x2 - x1)`
Since the MAF curve is non-linear you see that the slope of the curve changes as you move along it.
-
All smoothing changes are immediate and can be seen on the smoothing graph.
-
If you have overdone smoothing, simply click on "Reset" button to set the smoothed curve back to corrected curve.
-
You can apply smoothing by selecting the cells in MAF scaling table and the smoothing degree and then clicking "Apply" button. Smoothing degree is simply a moving window size where 3 - uses 1 cell to left and right, 5 - uses 2 cells to left and right, and 7 - uses 3 cells to left and right.
-
Please note that due to how smoothing algorithm works one, two, or three (depending on smoothing degree you chose) the first cells and last cell will not get modified. You can raise/lower those manually if needed by the same value the cell after or cell before was modified.
-
BE CAREFULL not to smooth too much or you will end up making your MAF scaling worse. General suggestion is to apply either degree "3" or "5" once.
-
In addition, you can manually smooth values by either dragging the smoothed curve slope line's point or by applying custom +/- value to the highlighted cells using buttons on the left from the result table. Keep in mind that selection of all cells will raise or lower the whole curve. Thus you can raise certain parts of the curve by selecting appropriate cells.
-
Finally, there is a compare screen. You copy original MAF scaling and the new MAF scaling and see change % difference. You can also manually alter change % difference if you feel it's needed and it will modify you new MAF scaling.
-
Once you have smoothed the data to your liking, copy the data to your "MAF Sensor Scaling" table. If your table has a vertical layout, use "Copy Vertical" from right-click menu.
-
-
Once you have copied your new MAF scaling values from the result table to your ROM, save a new ROM with the changes made.
-
Flash the modified ROM to your ECU and do another set of WOT logs.
-
If you do 6 or so WOT pulls each time, you should be able to get your OL MAF scaling to under 2-3% (use "AFR Error" scattered plot for visualization) within a couple of revisions. It will take many more revisions if you only do 1 or 2 WOT pulls at a time.
More info can be found here
Credits:
This tool was originally based on Mickeyd2005's spreadsheet, however changes were made as per Kodename47 suggestions. The usage guide is based on wrxsti-l's post. Big thanks to all who have been active in MAF scaling discussions and providing methodology - williaty, Rene2.5RS, and others.
A special 'thank you' to Td-d and Kodename47 for providing feedback.
Logic:
Logged average LTFT and STFT correction are fitted to your current MAF scaling and new scaling is suggested.
The Correction Error is calculated as LTFT + STFT per cell based on how far your data point is from the cell. The closest cell is determined by lookup in the original MAF scale table using (load * rpm / 60.0) MAF value.
The Total Correction % is then calculated for each cell as average of mean and mode of Correction Error values.
The correction will only be applied to cells where count of corrections is more than the cell hit count specified in settings.
The corrected g/sec is calculated from the Total Correction % and the current g/sec as current_gsec * ((tot_corr% / 100) + 1)
.
Also, please note that collected data and correction applied may be greater than the full MAF scaling voltage and thus several of the first table cell would be uncorrected. In this case the first calculated Total Correction % value is applied to all cells prior to it except the first cell.
Usage:
You may not nail the calibration in one shot, so rinse and repeat until you're happy with the scaling. Also, it is VERY important that you collect data at a constant temperature. If you collect data at 30F one day and then 60F next week, it will totally screw up the process.
The below instructions are merely suggestions for ideal data collection. You can use single log file for Open Loop and Close Loop MAF scaling as long as you apply filters properly to filter out bad data such idle, tip-in, OL/CL and CL/OL transitions, etc (tweak the defaults as needed).
Data Tab
Note:
use right mouse button click to see the menu of available actions on tables.
for quick selection of cells in a table click on the first cell, hold shift key and click on the last cell; all the cells in between will be highlighted.
-
Go for a drive to ensure car as it normal operating temp (5 minute drive should be fine in warm areas, longer for colder areas).
-
Make sure you're logging "Time", "MAF Voltage", "IAT", "CL/OL Status", "AFR Learning (LTFT)", "AFR Correction (STFT)", "AFR Stock Sensor", "Engine Speed", and "Engine Load (g/rev)".
-
NO SUDDEN THROTTLE CHANGES - it is very important to keep throttle as smooth and consistent as possible. It is best to ONLY enable/start logging once you are at the signed speed for the street you are driving on and there is a good stretch of road for logging (ie. no stop lights etc). If you need to stop, slowdown, speed up quickly - you should disable/stop logging. Then when you are back at correct speed, enable/start logging again. If you continue to log data while you stop, start, speed up, slow down, with constant sudden throttle changes, the data collected can skew the results and your MAF scaling can be dramatically out for any MAFv where these sudden throttle changes occurred.
-
RECORD AT LEAST 30 minutes of highway/freeway driving in your top gear as close to the point where you switch from closed loop to open loop (eg if you use RomRaider for logging you can see when you switch from closed loop to open loop as the "CL/OL Fueling" value will change from "8" to "10"). A highway/freeway with a long, constant incline is best - this will allow you to gather data points for the upper most region of the closed loop section of your MAF Sensor Scaling table (MAFv of around 2.8v).
-
RECORD AT LEAST 30 minutes of general driving. This can include driving to/from shops, movies, work etc.
-
RECORD AT LEAST 15 minutes of slow speed driving - around an empty car park is best.
-
Open your tune in RomRaider.
-
Expand "Mass Airflow /Engine Load" tables group and copy "MAF Sensor Scaling" table by clicking "Edit"->"Copy Table" into the first cell of "Current MAF Scaling" table on the tool. If you copy MAF scaling from a vertically laid out table then use "Paste Vertical" right click menu option.
-
Click "POL Fueling" button to set open loop fueling data. (optional, does not affect scaling calculations). Open loop fueling table X/Y-Axis are used to display "AFR Average" and "AFR Cell Hit Count" tables which serve only informational purpose.
-
Open your tune in RomRaider.
-
Expand "Fueling - Primary Open Loop" tables group and copy "Primary Open Loop Fueling" table by clicking "Edit"->"Copy Table" into the first cell of "Primary Open Loop Fueling" table on the tool.
-
Click "Validate" button to make sure all is fine (validation is done on setting the table as default and saving it or on submitting the table so it's not required).
-
Most likely the "Primary Open Loop Fueling" table will stay the same, so for auto-loading next time you can click on "Set Default" and save this table in a new file. If you do have another tune with a different "Primary Open Loop Fueling" table, you can click on "Clear" to clear out table, then paste data from second "Primary Open Loop Fueling" table, click on "Set Default" and save this table in a new file. To switch between different Primary Open Loop Fueling tables saved in files click on "Clear" to clear table, then click on "Load" to load data from file, then click on "Set Default" so that next time it will be loaded automatically.
- Now you have two ways to proceed:
-
If you have saved data from previous run and would like to see the graphs or modify some data manually you can load that run using "Load" button.
-
If you just log file(s) (make sure that log starts with column headers) then click on "Load Log" button, select your log file, select asked columns from log file AND set desired filters values. Please pay attention to filters on some columns to filter out noisy data. Once the log file is processed you should see closed loop data populated in the table. Repeat this procedure to load more log files - the data will be appended to the table.
-
At this point you can save all the input data for future reference or re-scaling by clicking on "Save" button at the top bar.
-
Click on "GO" button at the top bar right corner to generate AFR data table and corrected MAF curve.
-
Click on the "Chart" tab to see MAF corrected curve.
Chart Tab
Note:
use mouse wheel to zoom in/out.
use Ctrl + left mouse button click or keyboard arrow keys to move the chart left/right/up/down (useful when chart is zoomed).
hover mouse over a point to see point values for x/y axes.
use left mouse button click-and-drag a curve point to move that point up/down (enabled for smoothing chart only).
This screen is the same as the screen for Open Loop
-
You can click on "dV/dt" checkbox to view dV/dt scatter plot over time.
-
You can click on "IAT" checkbox to view IAT scatter plot over time.
-
You can click on "Trims/RPM" checkbox to view trims change over RPM change and the trend line.
-
You can click on "Mean/Mode" checkbox to view trims change over Maf Voltage change and the Mean and Mode curves.
-
You can click on "Total Correction" checkbox to view Total Correction % placement (scaling is on the right hand side).
-
You can click on "Current" checkbox to view current MAF curve pasted into input "Current MAF Scaling" table on the "Data" tab.
-
You can click on "Corrected" checkbox to view corrected MAF curve generated based on the CL data.
-
You can click on "Smoothed" checkbox to view smoothed MAF curve. Keep in mind that initially this curve is the same as corrected curve. It will change if you apply smoothing and/or manual correction(s).
-
Resulting MAF Scaling table is at the bottom of the Chart Tab screen.
-
This is where you have now two ways to proceed:
-
quick - straight values copy
- Simply copy the newly generated "Airflow (g/s)" values from results table into the "MAF Sensor Scaling" table in your tuning tool (eg RomRaider). If your table has a vertical layout, use "Copy Vertical" from right-click menu.
-
slow (optional) - apply smoothing or manual changes. To apply smoothing to the Corrected Maf Scaling curve or to make manual changes (only for people who really know what they are doing!!!) click on "Smoothing" checkbox. The chart view will display Smoothed Maf curve(blue) together with Current MAF curve slope line(red) and the Smoothed MAF curve slope line(green). At the bottom of the screen there is resulting MAF scaling table with controls that allow making changes to the table (and thus the MAF curve). Row 1 of the result table corresponds to "MAF Sensor (volts)" and row 2 of the "Smoothing" tab corresponds to "Airflow (g/s)".
Slope line is a line of MAF Curve slope values. Slope value is a number which is used to indicate the steepness of a curve at a particular point. Slope value for MAF Curve is calculated between each 2 points of the curve as:
`slope = (y2 - y1) / (x2 - x1)`
Since the MAF curve is non-linear you see that the slope of the curve changes as you move along it.
-
All smoothing changes are immediate and can be seen on the smoothing graph.
-
If you have overdone smoothing, simply click on "Reset" button to set the smoothed curve back to corrected curve.
-
You can apply smoothing by selecting the cells in MAF scaling table and the smoothing degree and then clicking "Apply" button. Smoothing degree is simply a moving window size where 3 - uses 1 cell to left and right, 5 - uses 2 cells to left and right, and 7 - uses 3 cells to left and right.
-
Please note that due to how smoothing algorithm works one, two, or three (depending on smoothing degree you chose) the first cells and last cell will not get modified. You can raise/lower those manually if needed by the same value the cell after or cell before was modified.
-
BE CAREFULL not to smooth too much or you will end up making your MAF scaling worse. General suggestion is to apply either degree "3" or "5" once.
-
In addition, you can manually smooth values by either dragging the smoothed curve slope line's point or by applying custom +/- value to the highlighted cells using buttons on the left from the result table. Keep in mind that selection of all cells will raise or lower the whole curve. Thus you can raise certain parts of the curve by selecting appropriate cells.
-
Finally, there is a compare screen. You copy original MAF scaling and the new MAF scaling and see change % difference. You can also manually alter change % difference if you feel it's needed and it will modify you new MAF scaling.
-
Once you have smoothed the data to your liking, copy the data to your "MAF Sensor Scaling" table. If your table has a vertical layout, use "Copy Vertical" from right-click menu.
-
-
Once you have copied your new MAF scaling values from the result table to your ROM, save a new ROM with the changes made.
-
Flash the modified ROM to your ECU and do another set of logs.
More info can be found here
Logic:
The tool is to help merging and fitting Open Loop and Closed Loop generated curves or just certain parts of the curve with at least 10 points.
Please keep in mind that the tool simply applies fitting algos (none of which were specifically customized for MAF curve) for a best fitting of generated curve points (voltage, g/s) thus there is no guarantee that the fitted curve would make the best MAF curve.
This tool can also be used as pure curve fitting/smoothing if the same MAF curve is pasted in OL and CL tables.
The logic is as follow:
The g/s values from Closed Loop curve are taken if voltage value for the point is less than or equal to the value specified in "CL Max V" text box. In the same manner g/s values from Open Loop curve are taken if voltage value for the point is greater than or equal to the value specified in "OL Min V" text box. All the g/s values for points where voltage falls in between the "CL Max V" and "OL Min V" will be calculated as average of CL/OL g/s values.
If "Fitting Algo" is left as "Auto Select"tThe program will run the curve through all defined fitting algorithms and pick the best fit (A measure of "goodness of fit" where 1.0 is best. Approaches R^2 if the number of points is much larger than the number of fit parameters. For power, exp by linear regression and 'Rodbard NIH Image', this is calculated for the fit actually done, not for the residuals of the original data). However you can change the algo selection and see if anything will provide the fit you prefer.
Usage:
-
Set "CL Max V" value, all g/s values from Closed Loop curve will be used until this value.
-
Set "OL Min V" value, all g/s values from Open Loop curve will be used from this value on.
-
Optionally select fitting algorithm, otherwise the program will determine the best one based on algo fit goodness.
-
Paste generated OL curve into the first table - Open Loop MAF Scaling.
-
Paste generated CL curve into the second table - Closed Loop MAF Scaling.
-
Select curve fitting algorithm to apply.
-
The third table - Merged MAF Scaling should be populated and changed automatically.
-
Copy the data to your "MAF Sensor Scaling" table.
-
Once you have copied your new MAF scaling values from the result table to your ROM, save a new ROM with the changes made.
-
Flash the modified ROM to your ECU.
Credits:
This tool development has been driven by Kodename47.
Logic:
The tool is about changing the MAF scale but keeping the curve the same. As with all mapping it's a resolution trade off. The larger the scale, the less accurate that it is. If you're NA, the likelihood that the maximum voltage you are logging at max RPM is little over 4.1/4.2v. Therefore the scale going all the way to 5v is a waste of potentially better resolution. The same applies to several points at the start of the curve. You can only use the same amount of data points so by closing the gaps, you're improving the accuracy due the way the ECU interpolates the cells. So by lowering maximum V value and removing some unused V down low the new scale increases resolution for those cell where difference between points starts increasing and therefore much more accurate.
The logic is as follow:
First the point grater or equal to Min V is found and mid point is calculated between that point and the first point - reference point. This is done in case your MAFv drops into the low range of the MAF scaling, the three points should provide a fair resolution.
Mode of spacing between points is calculated and Max Unchanged value determined as the point after which spacing starts increasing from Mode. The Max Unchanged value though can be reset from suggested by the user.
Once the original MAF scale is pasted the new MAF voltage scale is calculated where first point is unchanged, second point is the mid point between first and third point, third point is point greater or equal to Min V, then original values are copied until Max Unchanged point, and finally rescaled points calculated based on original scaling % increase between sections of two points.
After the new MAF Voltage values are calculated, for each MAF Voltage cell a new GS value is interpolated from the original curve for the new MafV using linear interpolation.
Usage:
-
Put the new maximum desired voltage into the text box.
-
Put the new minimum voltage into the text box.
-
Paste original MAF scale into the top table.
-
Modify Unchanged MaxV if desired or paste different MafV values into new MAF scaling or modify manually to adjust the curve if needed.
-
Copy the data to your "MAF Sensor Scaling" table.
-
Once you have copied your new MAF scaling values from the result table to your ROM, save a new ROM with the changes made.
-
Flash the modified ROM to your ECU.
Credits:
This tool was requested by MFB.
Logic:
The tool rescales existing 2D/3D tables.
All the calculation are done as real numbers and no rounding is done at any step. The screen though does allow the user to display X/Y-Axis (headers) and data values as integers as well as specify desired decimal precision number.
There are two interpolation methods provided by the program: linear and cubic spline for 2D tables; bi-linear and bi-cubic spline for 3D tables. ECU uses linear/bilinear interpolation, however when rescaling it may make sense to use cubic spline/bicubic spline to smooth the surface as cubic spline interpolation may better match slopes and the concavities of each individual interpolating segment.
If you're not sure which interpolation method to use it is always safe to use linear interpolation. If you're willing to play with the surface and values you can open another instance of the program and try out cubic spline interpolation and then compare values and/or surfaces side by side.
In any case, the rescaled table should be retuned based on new logs collected after rescaling.
The logic is as follow:
If new value for X/Y header cell falls in the range of the current table then new value(s) are interpolated using user selected interpolation method.
If new value for X/Y header cell falls outside of the range of the current table and "extrapolate" checkbox is selected then:
-
the new value for 2D table is extrapolated based on values in the two nearest columns for horizontal table or rows for vertical table.
-
the new values for 3D table are calculated as 2D extrapolation for each row if column header value was modified or 2D extrapolation for each column if row header value was modified.
Otherwise, if "extrapolate" checkbox is not selected, values from last/first column/row are used.
Note:
Even 2D tables extrapolation is prone to error and it has a higher risk of producing meaningless data. For 3D tables extrapolation will be erroneous and provided just as a convenience to get a starting point.
Usage:
3D table
2D horizontal (vertical layout is supported as well)
-
Paste your table into the first cell of the "Original Table".
-
Select interpolation method (default is linear).
-
Start modifying header values. You can use undo/redo buttons in case you make a mistake or would like to re-adjust the value.
-
Once you start making your changes the 3D Chart panel will display the new surface for 3D table or new curve for 2D table.
-
You can reset your changes by clicking "Reset Rescaled" button.
-
You can change numeric precision and/or chose to display header values and/or data values as integers at any time.
3D surface
2D Curve
Credits:
This tool addition was requested and driven by Welaish.
Logic:
The tool rescales existing 2D/3D tables.
The tool is to generate throttle plate versus accelerator pedal table where x-axis is accelerator pedal angle (%), y-axis is engine speed (RPM), and values are target throttle plate opening angle (%), which should help in making changes to any of the base tables.
The logic is as follow:
Requested Torque (Accelerator Pedal) table is taken as a base and the resulting table will have the same X and Y Axis.
For every value in Requested Torque (Accelerator Pedal) table a new value is being calculated for resulting table.
The calculated value is 2D bilinear interpolation for RPM from Requested Torque (Accelerator Pedal) and calculated ratio of Requested Torque (Accelerator Pedal) to Requested Torque Base (RPM).
The latter ratio is calculated as:
value = RequestedTorque (Accel Pedal) \ RequestedTorque (RPM)
Where RequestedTorque (RPM) is interpolated from Requested Torque Base (RPM) table based on RPM from Requested Torque (Accelerator Pedal) table.
Usage:
-
Open your tune in RomRaider.
-
Expand "Drive-By-Wire Throttle" tables group.
-
Copy "Requested Torque Base (RPM)" table by clicking "Edit"->"Copy Table" into the first cell of "Requested Torque - RPM" table on the tool (first table on top panel) using "Paste" if your table has vertical layout. If your table has horizontal layout use "Paste Vertical" right-click menu option to convert layout into vertical.
-
Copy "Requested Torque (Accelerator Pedal)" table by clicking "Edit"->"Copy Table" into the first cell of "Requested Torque - Accelerator Pedal" table on the tool (second table on top panel).
-
Copy "Target Throttle Plate Position (Requested Torque)" table by clicking "Edit"->"Copy Table" into the first cell of "Target Throttle Plate Position" table on the tool (third table on top panel).
-
Click on "GO" button at the top bar right corner to generate Throttle Plate vs Accelerator Pedal table.
Note:
Selecting cell in the "Requested Torque (Accelerator Pedal)" table will highlight all cells used for calculation in "Requested Torque Base (RPM)" and "Target Throttle Plate Position (Requested Torque)" tables as well as result cell in "Throttle Plate vs Accelerator Pedal" table.
3D surface
Credits:
This tool addition was requested by Kodename47 and is based on his tweaks to Airboy's Load Comp spreadsheet.
The tool will work for Load Comp table tuning based on Manifold Pressure as well as Per-Cylinder Compensation based on Injector Pulse Width as long as proper params are logged in proper units (see the note in Usage section).
Note:
The information below will cover Load Compensation but for Injector Pulse Width Compensation everything is the same except that instead of "Manifold Pressure" you will need to select "Injector Pulse Width" into that column.
Logic:
The tool is for adjusting Load Compensation table based on an adjustment which is calculated as a average between mean and mode of AFR error % values for a specific cell.
The correction will only be applied to cells where count of corrections is more than the cell hit count specified in settings.
The logic is as follow:
Caclulate AFR error % for each row in a log as:
AFR error % = LTFT + STFT
Get per cell log data samples by finding nearest cell based on RPM and Manifold Pressure. If sample set is less than the cell hit count - discard it.
For each sample set with count more than the specified cell hit count calculate mean value and mode value for AFR error %.
Calculate AFR error% for cell as:
cell_error = (err_mean + err_mode) / 2
Calculate correction for cell as:
cell_corr = 1 + cell_error/100
Calculate new cell value as:
-
Table values as ratio (EcuTek):
`new_val = cell_corr * orig_val`
-
Table values as % from 100 (RomRaider):
`new_val = cell_corr * (100 + orig_val) - 100`
Usage:
You really need to nail MAF scaling first!
Note:
Depending on what tuning program you use have a look at "Engine Load Compensation" table and see what X-Axis is defined in and units (eg "Manifold Absolute Pressure (Bar)" or "Manifold Relative Pressure (psi sea level)") you will need to log exactly what the table X-Axis specifies.
Eg people with OP2 and using RomRaider would have to log MRP (psi relative sea level):
`scalingrpn = x,760,-,0.01933677,*`
-
Log "Time%", "Engine Speed", "Throttle Angle %", "IAT", "AFR Learning (LTFT)", "AFR Correction (STFT)", "MAF Voltage", "AFR Stock Sensor", and "Manifold Pressure" (see the note above).
-
Open your tune in RomRaider.
-
Expand "Mass Airflow /Engine Load" tables group and copy "Engine Load Compensation (MP)" table by clicking "Edit"->"Copy Table" into the first cell of "Current MP table" table on the tool.
-
Click on "Load Log" button, select your log file(s), select asked columns from log file AND set desired filters values. Once the log file is processed you should see data populated in the table with calculated total trims and dV/dt. At this point you may review the charts of the data
-
Click on "GO" button at the top bar right corner to generate new Load Compensation data table.
-
Copy the data to your "Engine Load Compensation (MP)" table.
-
Once you have copied your new Load Compensation table values from the result table to your ROM, save a new ROM with the changes made.
You can look at the Chart tab to see data correlation and suggested corrections
You can also look at suggested corrections in 3D Chart
More info can be found here
Credits:
This tool addition is a port of Kodename47's spreadsheet.
Logic:
The tool is for adjusting MAF IAT Compensation table based on an adjustment which is calculated as a average between mean and mode of AFR correction values for a specific cell.
The correction will only be applied to cells where count of corrections is more than the cell hit count specified in settings.
The logic is as follow:
Caclulate AFR error correction ratio for each row in a log as:
`CL corr = (100 + LTFT + STFT) / 100`
`OL corr = (AFR / ((100 - (LTFT + STFT)) / 100)) / ECU Target AFR`
Get per cell log data samples by finding nearest cell based on IAT and MAF. If sample set is less than the cell hit count - discard it.
Calculate cell correction as:
`cell_corr = (corr_mean + corr_mode) / 2`
Calculate new cell value as:
-
Table values as ratio (EcuTek):
new_val = cell_corr * orig_val
-
Table values as % from 100 (RomRaider):
new_val = cell_corr * (100 + orig_val) - 100
Usage:
You really need to nail MAF scaling first!
Note:
Depending on what tuning program you use have a look at "MAF (IAT) Compensation" table and see in what units X-Axis (IAT) is defined in you will need to log in the same exactly units what the table X-Axis specifies.
-
Log "Time", "Engine Speed", "Throttle Angle %", "IAT" (see the note above), "AFR Learning (LTFT)", "AFR Correction (STFT)", "MAF Voltage", "Wideband AFR", "Mass Airflow", "CL/OL Status", and if your logging tool has it - "Commanded AFR" / "Fueling Final Base" to use as "ECU Target AFR". Additionally if you intend to use "Primary Open Loop Fueling" table (i.e. you do not have "Commanded Afr" or "FFB" available) you must log "Engine Load (g/rev)" if table has load-based Y-Axis or "Manifold Absolute Pressure (psi absolute)" if table's Y-Axis is MAP-based.
-
Open your tune in RomRaider.
-
Expand "Mass Airflow /Engine Load" tables group and copy "MAF Compensation (IAT)" table by clicking "Edit"->"Copy Table" into the first cell of "Current MAF IAT compensation table" table on the tool.
-
If you did not log "Commanded Afr" / "Fueling Final Base", click "POL Fueling" button to set open loop fueling data.
-
Open your tune in RomRaider.
-
Expand "Fueling - Primary Open Loop" tables group and copy "Primary Open Loop Fueling" table by clicking "Edit"->"Copy Table" into the first cell of "Primary Open Loop Fueling" table on the tool.
-
Click "Validate" button to make sure all is fine (validation is done on setting the table as default and saving it or on submitting the table so it's not required).
-
Most likely the "Primary Open Loop Fueling" table will stay the same, so for auto-loading next time you can click on "Set Default" and save this table in a new file. If you do have another tune with a different "Primary Open Loop Fueling" table, you can click on "Clear" to clear out table, then paste data from second "Primary Open Loop Fueling" table, click on "Set Default" and save this table in a new file. To switch between different Primary Open Loop Fueling tables saved in files click on "Clear" to clear table, then click on "Load" to load data from file, then click on "Set Default" so that next time it will be loaded automatically.
-
Click on "Load Log" button, select your log file(s), select asked columns from log file AND set desired filters values. Once the log file is processed you should see data populated in the table with calculated AFR Correction and dV/dt. At this point you may review the charts of the data
-
Click on "GO" button at the top bar right corner to generate new MAF IAT Compensation data table.
-
Copy the data to your "MAF Compensation (IAT)" table.
-
Once you have copied your new MAF IAT Compensation table values from the result table to your ROM, save a new ROM with the changes made.
You can look at the Chart tab to see data correlation and suggested corrections
You can also look at suggested corrections in 3D Chart
More info can be found here
Credits:
This tool is a port of Merp's 32-Bit Speed Density Map Builder spreadsheet which is used to build a VE base map using your current MAF. A special 'thank you' to 04ssti for testing this.
There are essentially two main functions selectable via a drop down list:
-
MAF Builder - used to build Speed Density map based on your existing well working MAF scale by having your tune in MAF/SD mode
-
AFR Tuner - used to fine-tune existing SD table based on AFR. 'Closed Loop' or 'Open Loop' tuning can be selected when loading a log file
Logic:
The tool is for adjusting Speed Density VE table based on an adjustment which is calculated as a average of corrections for a specific table cell.
The correction will only be applied to cells where count of corrections is more than the cell hit count specified in settings.
The logic is as follow:
Get per cell log data samples by finding nearest cell based on RPM and Manifold Pressure. If sample set is less than the cell hit count - discard it.
For each sample set with count more than the specified cell hit count calculate average error % value .
Error % for MAF Builder:
error % = (SD - MAF) / MAF) * 100
Error % for AFR Tuner:
-
For Open Loop
error % = (AFR - FFB) / FFB) * 100
-
For Closed Loop:
error % = LTFT + STFT
For MAF the new VE table value for the cell is set as original cell value - adjustment.
For AFR the new VE table value for the cell is set as original cell value + adjustment.
Usage:
You really need to nail MAF scaling first!
-
Log "Engine Speed", "Throttle Angle %", "Manifold Pressure", "IAT", "Wideband AFR" and/or "Stock AFR" (CL/OL), "Mass Airflow", "Final Fueling Base", "Volumetric Efficiency", and "CL/OL Status".
-
Open your tune in RomRaider/Cobb AP and copy your current VE table into the first cell of "Current VE table" table on the tool.
-
Click on "Load Log" button, select your log file(s), select asked columns from log file AND set desired filters values. If the tool you're planning to use is AFR Tuner, select "Open Loop" or "Closed Loop" from the drop down at the top of the screen. Once the log file is processed you should see data populated in the table.
-
Select SD implementation you have from the drop down menu.
-
Select logged Manifold Pressure and units.
-
Select if you want to build SD correction based on MAF (MAF BUilder) or based on AFR (AFR Tuner).
-
Click on "GO" button at the top bar right corner to generate new VE table data.
-
Copy the data to your SD table.
-
Once you have copied your new VE table values from the result table to your ROM, save a new ROM with the changes made.
More info can be found here
Credits:
This tool development as well as this usage guide has been driven by Kodename47.
Logic:
Logged VVT angles are compared to volumetric efficiency of each WOT pull allowing changes to be made to VVT systems and compared for the best settings. The logged VVT with the best VE will be the ideal VVT setting.
Logged intake air temperature, intake air volume, manifold absolute pressure and RPM are calculated to generate the volumetric efficiency.
VE calculations are as follow:
Temperature is in Fahrenheit, pressure is in Psi:
ve = (maf / ((map * 6894.76) / ((((iat - 32) / 1.8) + 273.15) * 287.05) * 1000)) / (121.9254 * rpm / 3456 * 0.0283 / 60) * 100
Temperature is in Fahrenheit, pressure is in Bar:
ve = (maf / ((map * 100000) / ((((iat - 32) / 1.8) + 273.15) * 287.05) * 1000)) / (121.9254 * rpm / 3456 * 0.0283 / 60) * 100
Temperature is in Fahrenheit, pressure is in kPa:
ve = (maf / ((map * 1000) / ((((iat - 32) / 1.8) + 273.15) * 287.05) * 1000)) / (121.9254 * rpm / 3456 * 0.0283 / 60) * 100
Temperature is in Celcius, pressure is in Psi:
ve = (maf / ((map * 6894.76) / ((iat + 273.15) * 287.05) * 1000)) / (121.9254 * rpm / 3456 * 0.0283 / 60) * 100
Temperature is in Celcius, pressure is in Bar:
ve = (maf / ((map * 100000) / ((iat + 273.15) * 287.05) * 1000)) / (121.9254 * rpm / 3456 * 0.0283 / 60) * 100
Temperature is in Celcius, pressure is in kPa:
ve = (maf / ((map * 1000) / ((iat + 273.15) * 287.05) * 1000)) / (121.9254 * rpm / 3456 * 0.0283 / 60 ) * 100
Usage:
This can be used to view changes in both single and dual VVT engines. VVT2 is optional. If you have dual VVT but are only changing either intake or exhaust then VVT1 can be used for the tested system or both can be input for consistency for future use.
Log Parameters
-
Throttle/Accelerator Angle
-
Engine Speed
-
VVT System #1 (Note: Use a log parameter that replicate the VVT table values, this may be different to actual VVT angle dependent on the system)
-
VVT System #2 (Optional)
-
Intake Air Temperature
-
Manifold Absolute Pressure
-
Mass Airflow
Data Tab
- Copy your VVT table and paste into the RPM #1 column (RPM #2 optional). This will leave the RPM Y-Axis values. Click Save RPM Columns button if these will be used for all future uses of this tool.
- Click Load Log button and select log file. Select column headers from the log and set the parameters. Note that VVT System #2 is only required if values in RPM #2 column of the main screen.
You can load multiple logs into one comparison, so click Load Log button again and repeat until all logs are loaded.
- Click GO button. The best VE at the RPM axis points are calculated and the corresponding VVT values from the logs are shown in the VVT1 and VVT2 columns.
Chart Tab
You can select/deselect viewed pulls using the tick boxes in the left column. Note that this does not affect calculations.VVT1 and VVT2 show the logged angles for the respective VVT system. The angles that correspond to the best VE are shown by the Best VVT line.
The VE chart compares the VE for each pull and also shows the best VE line for reference.
3D Chart Tab
-
X-Axis is RPM
-
Y-Axis is VE
-
Z-Axis is VVT Value
Select individual pull from the drop down menu Click on 'View' button to plot data
Credits:
This tool was done based on screenshot from BrzEdit Log Viewer.
Logic:
The tool is to help in analyzing the log data and visualizing data distribution by applying different statistics methods and filters.
Usage:
-
Select log file(s) to be analyzed. Please note that if more than one files are being opened the Time column would not be added to the drop downs. In addition, all files must have the same columns.
-
Select X-Axis column from available columns in log file (eg Engine Load).
-
Select Y-Axis column from available columns in log file (eg Engine Speed).
-
Select Data column to be analyzed from available columns in log file (eg AFR).
-
Set X-Axis rounding - 'step' (eg 0.1 for Engine Load) or set the fixed scaling values for X-Axis column (please note that setting step takes priority over fixed scale values).
-
Set Y-Axis rounding - 'step' (eg 200 for Engine Speed) or set the fixed scaling values for Y-Axis column (please note that setting step takes priority over fixed scale values).
-
Select statistics method for analyzes (eg Mean).
-
Optionally set the filter(s) columns, comparison method, and value to be compared against. Please note that the row log data value for Data column will be compared against the filter. Also note that for equality the Data column values are rounded to the same number of decimal points as the filter input value.
- Click on 'GO' button.
You can also look at the stats in 3D Chart (not always applicable)
Credits:
The 'Data' tab was initially aped after www.datazap.me which is an excellent web-based application. The reasons for its development were to be able to look at logs without a need for an internet connection and be able to process fairly large files (OP2 files can be pretty large, eg 8Mb for 20 mins).
The 'Log Replay' functionality (map tracing) was added to help in analyzing the log data and visualizing data distribution by interpolating value from 3D table, highlighting cells used for value interpolation, and marking the most significant cell.
The 'WOT Pulls' tab is added based on suggestion from covertrussian to be able to look at mutiple WOT pulls from the same or different files.
Logic:
The tool displays data in a table format, allows single column filtering, and displays data curves based on selected columns.
Usage:
Data Tab
-
Click on 'Load Log File' icon to load desired log file.
-
To apply filter to one column at a time please select column and filter comparison, specify filter value, and click 'Set' button. In order to clear filter - clear filter value and click 'Set' button.
-
Right-click on column header for sorting menu.
-
Click on desired column header to display data curves or you can switch to column headers view and select columns from a list. Please note that curves are displayed based on filtered data set but disregards applied sorting.
-
Multiple column can be selected to display multiple curves.
-
To zoom in the plot use mouse to select area from top-left to right-bottom by clicking and dragging the cursor.
-
To zoom out the plot use mouse to select area from right to left by clicking and dragging the cursor.
-
Use Ctrl + left mouse button click and drag the mouse to move the chart.
-
Use zoom to increase performance, when the plot is zoomed in the program works faster.
-
If plot is zoomed in then adding or removing columns to plot do not automatically rescale the plot. So please zoom out first.
-
Drag the splitter bar to increase/decrease the panels. You can also click on arrows on the left-hand side of the splitter bar to extend desired panel
-
Log Replay:
-
Click on 'Log Replay to bring up the replay window.
-
Select the X-Axis of the 3D table you're planning to use.
-
Select the Y-Axis of the 3D table you're planning to use.
-
If you have you can select the Data column from your log file which your 3D table represents (eg AFR column for Primary Open Loop Fueling table).
-
Click 'New Play Table' button to open a new window and paste the 3D table into the first cell.
-
Repeat the process if you'd like to use more than one table.
-
Log replay starts from the current cell in the table and goes until the end of the file.
-
If you want to replay just a specific area of the log file you can set start and/or end rows using left and right mouse click to set the markers:
-
Left-click sets the first bar for the area.
-
If you don't want to run until the end of the file, right-click to set the second bar to indicate the end of replay area.
-
-
The replay can be pretty slow when big log file is loaded. To speed up the replay you should zoom in the plot to the area you'd like to replay. You can also uncheck all the columns or those that you don't necessarily want to watch on the plot screen.
3D Chart
-
Click on 'X-Axis' to select X data column
-
Click on 'Y-Axis' to select Y data column
-
Click on 'Plots' to select data column(s) to be plotted against X/Y Axes
-
Click on 'View' button to plot data
WOT Pulls
-
Click on 'Load Log' to load WOT pull data from one or more files.
-
Select 'Engine Speed', 'Throttle Angle' columns and 'WOT stationary point' for your log file and click 'OK' button (you will need to do this for each file being loaded in case they have different headers).
-
All pulls will appear on the left hand side of the split panel under their file name(s).
-
Select the WOT pulls you would like to view/compare
-
Select the curves to display
-
Select the view mode:
-
RPM - all data points are plotted in ascending order of corresponding RPM value for the same row.
-
RPM (skip down spikes) - all data points are plotted in ascending order of corresponding RPM value for the same row, however while log data is processed processed all subsequent rows that have RPM value lower than the previous row will be skipped as RPM is expected to increase constantly during WOT.
-
Time (RPM aligned) - all data points are plotted in ascending order of corresponding Time value for the same row, however the start of each curve is aligned by RPM - another words it starts at a time other curve(s) has(ve) reached RPM this curve starts at.
-
-
Click on 'View' button.
-
You can export selected WOT Pulls into separate CSV files (eg to use for Virtual Dyno) - click on 'Export Selected Pulls' button and pick a directory to save files into.