Tuning with formulas - Miata Turbo Forum - Boost cars, acquire cats.

Welcome to Miataturbo.net   Members
 


ECUs and Tuning Discuss Engine Management, Tuning, & Programming

Reply
 
 
 
LinkBack Thread Tools Search this Thread
Old 03-08-2012, 11:16 PM   #1
Senior Member
Thread Starter
 
Join Date: Nov 2010
Location: Pittsburgh PA
Posts: 1,196
Total Cats: 12
Default Tuning with formulas

I've been looking into MegaSquirting my 99, but one thing keeps jumping out at me. When tuning, it seems as though the end user needs to spend a bit of time creating maps. For fuel, spark, etc. From what I understand, the ECU references these maps based on external air conditions, and then decides how to implement fuel and spark.

So, for an air density of 29mm/Hg (approx. air pressure at sea level at 0* C), the ECU would determine the density of the air with a sensor, and then reference the maps to decide spark and fuel requirements, correct?

When investigating tuning, I can't help but question why this method is used. When calculating the trajectory of a cannonball over a given distance, one could simply plug in a set of values into a formula, and calculate the answer backwards, since the desired outcome is already known. Couldn't the same approach be used for engine tuning?

I'm not sure if the stock mass air flow sensor would be up to the task, but couldn't one use an improved unit to deliver detailed air density information to the MegaSquirt? Then the ECU could calculate the correct fuel and spark ratios to create a desired AFR; assuming fuel octane, pressure, and spark characteristics remain constant. I'm not saying I would know how to write code for this, or even figure out how to derive the formula. I'm just a grease monkey who can't wrap his tiny mind around this whole "electricity" thing.

I doubt it would be as perfect as cell by cell tune by a professional. But couldn't be a basic tuning option? Or would this require too much computing power for the constant air fluctuations?
2ndGearRubber is offline   Reply With Quote
Old 03-09-2012, 12:04 AM   #2
Newb
iTrader: (1)
 
Join Date: Sep 2011
Location: Cedar Rapids - IA
Posts: 32
Total Cats: 0
Default

Quote:
Originally Posted by 2ndGearRubber View Post
From what I understand, the ECU references these maps based on external air conditions, and then decides how to implement fuel and spark.
Yep

Quote:
Originally Posted by 2ndGearRubber View Post
So, for an air density of 29mm/Hg (approx. air pressure at sea level at 0* C), the ECU would determine the density of the air with a sensor, and then reference the maps to decide spark and fuel requirements, correct?
You've confused pressure and density, as well as inches and millimeters.


Quote:
Originally Posted by 2ndGearRubber View Post
When investigating tuning, I can't help but question why this method is used. When calculating the trajectory of a cannonball over a given distance, one could simply plug in a set of values into a formula, and calculate the answer backwards, since the desired outcome is already known.


Couldn't the same approach be used for engine tuning?
You could tune as you describe if everyone lived at sea level, the temperature never varied, pump gas was identical, and all mechanical/electronic parts were made to and could maintain exact tolerances. Unfortunately, some intercoolers are more efficient than others, injectors vary, etc etc etc..

How about this, calculate where that cannon ball will land if I don't give you the mass or speed of the ball, the wind speed or direction, and all you have is gravity as a constant. . . Good luck
cr_sti is offline   Reply With Quote
Old 03-09-2012, 12:54 AM   #3
Senior Member
Thread Starter
 
Join Date: Nov 2010
Location: Pittsburgh PA
Posts: 1,196
Total Cats: 12
Default

Assuming one could gather information via sensors about barometric pressure, temp, octane, injector pulse, etc. could it work? Maybe take a conservative approach to octane (tune for 89, run 91) and such, kind of like reflash tuning?

At this point though, the cost of sensors alone would begin to approach dyno time.
2ndGearRubber is offline   Reply With Quote
Old 03-09-2012, 01:06 AM   #4
Senior Member
 
Join Date: Aug 2010
Location: Arl. Texas
Posts: 937
Total Cats: 23
Default

You've stumbled onto a MEGAsquirt at this point. In which case you will tune it just as everyone else.
Miater is offline   Reply With Quote
Old 03-09-2012, 04:58 AM   #5
Elite Member
iTrader: (2)
 
Join Date: Jan 2007
Location: Los Angeles, CA
Posts: 8,782
Total Cats: 119
Default

Yup sure you could tune by formula.

But.

There are lots of variables that you will miss factoring in.

But

You can give yourself good starting points.

Or you could save the math and just copy someones elses settongs
Faeflora is offline   Reply With Quote
Old 03-09-2012, 11:54 AM   #6
Senior Member
iTrader: (2)
 
Join Date: Mar 2006
Location: MA
Posts: 885
Total Cats: 2
Default

The newer GM ecus like in the camaro are all equation based and table-less, if i am not mistaken.
devin mac is offline   Reply With Quote
Old 03-09-2012, 12:20 PM   #7
Boost Czar
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,833
Total Cats: 1,786
Default

autotune tunes by formula for you...
Braineack is offline   Reply With Quote
Old 03-09-2012, 07:52 PM   #8
Senior Member
Thread Starter
 
Join Date: Nov 2010
Location: Pittsburgh PA
Posts: 1,196
Total Cats: 12
Default

Sounds good to me.
2ndGearRubber is offline   Reply With Quote
Old 03-10-2012, 01:29 AM   #9
Boost Pope
iTrader: (8)
 
Joe Perez's Avatar
 
Join Date: Sep 2005
Location: Chicago (Over two miles from Wrigley Field. Fuck the Cubs. Fuck them in their smarmy goat-hole.)
Posts: 26,317
Total Cats: 1,914
Default

The idea of formula-based, rather than table-based computation of things like fuel delivery is not new. And as Devin Mac inferred, OEMs are indeed beginning to employ it.

It's also not necessary to assume that things such as air temperature, barometric pressure, and so on are constants, contrary to what cr_sti implies. In fact, these are the precise variables which, in nearly all existing ECUs, are already corrected for using a formula-based mechanism, albeit an extremely simple one. Taking air temperature, for instance, we might construct a formula which says "For every degree above 60F, decrease the computed fuel by 0.x%, and for every degree below 60F, increase the computed fuel by 0.x%." It's quite primitive, but it meets the definition.

The problem in using formulae, rather than lookup tables, to compute the base load numbers (base fuel, base ignition advance) is complexity.

In a table-oriented system, we can simply create a rough table of values, based on simple algebra or even just an educated guess, and then run that table on the engine to see how it performs. Assuming that the table requires correction, we can just adjust the numbers in the table until the engine is operating as desired. In the case of the fuel table in particular, this fine-tuning can be done for us automatically by the ECU in real-time, using a method similar to LTFT on an OEM ECU. The computer simply takes feedback from the EGO sensor, compares it to a table of desired AFRs, and says "Ok, I am running lean in this cell. Let me start increasing the value of this cell in 1% increments until the reading from the EGO sensor is identical to what I see here in this table of desired AFRs."

In other words, it's very easy for a normal person to do.

In a formula-oriented system, however, it is necessary to model the expected dynamic behavior of the engine to a very high degree of precision before you ever turn the key. Lots of finite element analysis using integral and differential calculus. This type of modelling is within the reach of automakers who employ large staffs of degreed and experienced scientists and engineers, with complex software and powerful supercomputers at their disposal. And even at that it is a highly iterative process, involving testing and adjustment to the software models which go far beyond simply increasing or decreasing the value of a number in a cell in a lookup table.

This is well outside the capability of your average car enthusiast with a laptop.


Which of course brings us to the question of cost vs. reward. I'm sure that there must be some benefit to this method of engine operation, or else OEMs would not be spending money to research it. On the other hand, table-based systems have been proven to work quite well over the past 30 years, both in the aftermarket and in the much more stringent domain of the OEM. I suspect that, within the aftermarket community, you will see little motivation to adopt any formula-based method of primary load computation until a compelling argument is made to justify such a massively complex undertaking.



This actually makes me realize something which had never really occurred to me before, at least not in these terms. The very earliest mass-marketed EFI systems, such as the Bosch D and L-jetronic systems of the 1960s and 70s, were by definition formula-based systems. They had to be, since they relied upon analog computation. The formulae, so to speak, existed in the form of resistors and capacitors hard-wired into comparators and oscillators, which might seem primitive to us now, but at the time still represented a viable (though shrinking) segment of mainstream computing in the commercial sense.
Joe Perez is offline   Reply With Quote
Old 03-12-2012, 08:23 PM   #10
I'm Miserable!
 
Join Date: Jun 2009
Location: albany, ga
Posts: 1,869
Total Cats: 3
Default

2ndgear its the nature of speed density.
You can use Mass air flow with megasquirt if you want and it is way easier and faster to tune in a working engine then a speed density setup.

Both ms2extra and b&g ms2 firmwares support MAF based fueling.

Many, probably all OEM ecus still have failure modes to various types of setups, most new GM vehicles will have maf and map, can fall back to running speed density if it deems the maf is broken or if you disconnect the maf.
Techsalvager is offline   Reply With Quote
Old 03-13-2012, 06:19 PM   #11
Junior Member
 
Join Date: May 2010
Posts: 75
Total Cats: -4
Default

Electromotive has been doing this since the TEC-II days, they call it linear thermodynamics. MAP, Time on for Gama (TOG), Injector Offset Time (IOT), and there you have formula based fuel calculations.
M2Ken is offline   Reply With Quote
Old 03-13-2012, 06:55 PM   #12
Elite Member
iTrader: (2)
 
Join Date: Jan 2007
Location: Los Angeles, CA
Posts: 8,782
Total Cats: 119
Default

So if everything is in closed loop all the time, what about the closed loop performance inpact?

Is it nullified by fast processors and hysterisis?
Faeflora is offline   Reply With Quote
 
 
Reply

Related Topics
Thread Thread Starter Forum Replies Last Post
Expected intake temps on the track? tazswing Race Prep 20 10-03-2015 12:04 PM
Back to Stock Part Out!! Turbo Parts, MS2 Enhanced 01-05, Suspension, and MOAR! StratoBlue1109 Miata parts for sale/trade 16 10-02-2015 10:39 AM
Time to start learning and play with tuning The Gleas MEGAsquirt 3 10-01-2015 10:30 AM
"Chimney Ethanol" E100 MiataGarage Engine Performance 5 09-30-2015 12:04 AM
In need of base map for stock 1997 brandonbkd MEGAsquirt 0 09-29-2015 12:52 AM


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -4. The time now is 12:55 AM.