OnlineCourse/InjectorOpening (2005-04-29 23:35:19)

This page explains the injector opening related calculation implementation details for developers

Read GenBoard/Manual/Config/InjectorOpening first, this is impossible to understand otherwise.

Even though the injector current rampup can be modelled relatively easily (knowing voltage and injector resistance and inductance), measuring the mechanical parameters that contribute greatly to overall effects are most often out of the question for a tuner.


Research

Searching the web one will find that there is some interesting (but not too useful) info burried in mailing list archives (among 99% of useless or outdated text with similar keywords):

There are no opensource implementations that get it right. There are not even many published formulas that could be used off the shelf. However some manufacturers are known to get this right (eg. Autronic).

Never mind, it's not that complex: a car manufacturer would probably only fire about a dozen patents on something like this, which can be solved in effectively 20 lines of code. But these kind of (algorithmic) patents are not valid in Europe, and are easily invalidated in US too, since they are trivial to implement for any expert in the field, not involving real innovative thought.


Implementation details

Integrate the GenBoard/Manual/Config/InjectorOpening curve to get full injected amount vs. pulsewidth. Do a reverse-lookup (known variable is required fuel amount) to get command pulsewidth. That's all.

notes:

Implementation choices:


injocfuel unit - cheating

Internally, injocfuel the maximum extension of the pulsewidth due to the rampup. For example if the rampup is 500 usec, and the average flow during the rampup is 0.4* of full flowrate (which is a good approximation, it is somewhere between 0.33 .. 0.5 ) injocfuel value = 500usec*0.6 = 300usec is desired (during the 500 usec rampup average 500usec * 0.4 is actually flown, so the pulsewidth must be extended with the remaining 500usec * 0.6). To avoid this long explanation, we say to the users that injocfuel is the time of the rampup, but with [24 usec] units.


Old thoughts for curve scaling - actually solved in a tricky and neat way

  • injopencurve_vbatt = we scale down the injopencurve proportionally in both directions according to VBatt (higher VBatt scales it down more). This is consistent with the diagram and the above note "the average injected fuel flowrate during the rampup does not depend on the VBatt"
  • injopencurve_vbatt_reqf = we multiply the injopencurve_vbatt with req_fuel. This is required since the curve must smoothly continue in a straight line with slope = req_fuel.
  • naturally, if the fuel is more than the width of injopencurve_vbatt_reqf (== width of injopencurve_vbatt) we are only interested in the top-right corner (include the height as time, and subtract the width from fuel, and calculate with req_fuel)

Possible Measurements

Notes:

The absolute nice way is to:

and measure the fuel flowrate (amount of flown fuel in known time) in function of pulsewidth.

Suggested measurements: vary pulsewidth

Fire extinguishers at hand. No smoking, etc...

Document measurements in a table in wiki, and we'll help make config from it that approximate it well.


Go back to OnlineCourse