ECUs and Tuning Discuss Engine Management, Tuning, & Programming

Tuning with formulas

Thread Tools
 
Search this Thread
 
Old 03-08-2012, 10:16 PM
  #1  
Senior Member
Thread Starter
 
2ndGearRubber's Avatar
 
Join Date: Nov 2010
Location: Pittsburgh PA
Posts: 1,163
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  
Old 03-08-2012, 11:04 PM
  #2  
Newb
iTrader: (1)
 
cr_sti's Avatar
 
Join Date: Sep 2011
Location: Cedar Rapids - IA
Posts: 32
Total Cats: 0
Default

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

Originally Posted by 2ndGearRubber
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.


Originally Posted by 2ndGearRubber
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  
Old 03-08-2012, 11:54 PM
  #3  
Senior Member
Thread Starter
 
2ndGearRubber's Avatar
 
Join Date: Nov 2010
Location: Pittsburgh PA
Posts: 1,163
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  
Old 03-09-2012, 12:06 AM
  #4  
Senior Member
 
Miater's Avatar
 
Join Date: Aug 2010
Location: Arl. Texas
Posts: 936
Total Cats: 27
Default

You've stumbled onto a MEGAsquirt at this point. In which case you will tune it just as everyone else.
Miater is offline  
Old 03-09-2012, 03:58 AM
  #5  
Elite Member
iTrader: (2)
 
Faeflora's Avatar
 
Join Date: Jan 2007
Location: Los Angeles, CA
Posts: 8,682
Total Cats: 130
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  
Old 03-09-2012, 10:54 AM
  #6  
Senior Member
iTrader: (2)
 
devin mac's Avatar
 
Join Date: Mar 2006
Location: MA
Posts: 881
Total Cats: 4
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  
Old 03-09-2012, 11:20 AM
  #7  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

autotune tunes by formula for you...
Braineack is offline  
Old 03-09-2012, 06:52 PM
  #8  
Senior Member
Thread Starter
 
2ndGearRubber's Avatar
 
Join Date: Nov 2010
Location: Pittsburgh PA
Posts: 1,163
Total Cats: 12
Default

Sounds good to me.
2ndGearRubber is offline  
Old 03-10-2012, 12:29 AM
  #9  
Boost Pope
iTrader: (8)
 
Joe Perez's Avatar
 
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,026
Total Cats: 6,592
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 60°F, decrease the computed fuel by 0.x%, and for every degree below 60°F, 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  
Old 03-12-2012, 07:23 PM
  #10  
I'm Miserable!
 
Techsalvager's Avatar
 
Join Date: Jun 2009
Location: albany, ga
Posts: 1,866
Total Cats: 0
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  
Old 03-13-2012, 05:19 PM
  #11  
Junior Member
 
M2Ken's Avatar
 
Join Date: May 2010
Posts: 88
Total Cats: 0
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  
Old 03-13-2012, 05:55 PM
  #12  
Elite Member
iTrader: (2)
 
Faeflora's Avatar
 
Join Date: Jan 2007
Location: Los Angeles, CA
Posts: 8,682
Total Cats: 130
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  
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
StratoBlue1109
Miata parts for sale/trade
21
09-30-2018 01:09 PM
tazswing
Race Prep
20
10-03-2015 11:04 AM
The Gleas
MEGAsquirt
3
10-01-2015 09:30 AM
MiataGarage
Engine Performance
5
09-29-2015 11:04 PM
brandonbkd
MEGAsquirt
0
09-28-2015 11:52 PM



Quick Reply: Tuning with formulas



All times are GMT -4. The time now is 02:19 AM.