Quick maths/logic proof check needed for engine air intake

Quick maths/logic proof check needed for engine air intake

Author
Discussion

Mr Whippy

Original Poster:

31,049 posts

256 months

Friday 22nd February 2008
quotequote all
Via OBDII I can read off SAE values for things.

One value is MassAirFlow (MAF) in grams per second.

Internally my ECU uses milligrams/stroke for a limiter map.

So I want to convert g/s > mg/stroke


//test inputs
var vGramPerSecond = 100
var vRpm = 2000

//few engine details
var vStroke = 4
var vCylinderCount = 4


var vIntakeStrokePerRot = (vStroke/2) * vCylinderCount
var vRotPerSecond = vRpm / 60
var vIntakeStrokePerSecond = vRotPerSecond * vIntakeStrokePerRot
var vGramPerIntakeStroke = vGramPerSecond / vIntakeStrokePerSecond
var vmGramPerIntakeStroke = vGramPerIntakeStroke * 1000

vmGramPerIntakeStroke = what I want biggrin


Will test it tomorrow on the way to work, but just curious if anyone can spot any glaring errors... probably in and around the intake strokes conversion.


Thanks for any feedback.

Dave

annodomini2

6,944 posts

266 months

Friday 22nd February 2008
quotequote all
Mr Whippy said:
Via OBDII I can read off SAE values for things.

One value is MassAirFlow (MAF) in grams per second.

Internally my ECU uses milligrams/stroke for a limiter map.

So I want to convert g/s > mg/stroke


//test inputs
var vGramPerSecond = 100
var vRpm = 2000

//few engine details
var vStroke = 4
var vCylinderCount = 4


var vIntakeStrokePerRot = (vStroke/2) * vCylinderCount
var vRotPerSecond = vRpm / 60
var vIntakeStrokePerSecond = vRotPerSecond * vIntakeStrokePerRot
var vGramPerIntakeStroke = vGramPerSecond / vIntakeStrokePerSecond
var vmGramPerIntakeStroke = vGramPerIntakeStroke * 1000

vmGramPerIntakeStroke = what I want biggrin


Will test it tomorrow on the way to work, but just curious if anyone can spot any glaring errors... probably in and around the intake strokes conversion.


Thanks for any feedback.

Dave
Should work fine.

Mr Whippy

Original Poster:

31,049 posts

256 months

Friday 22nd February 2008
quotequote all
Hehe, well the values looked a bit low...

Problem is the MAF internal values are things like mg/R or mg/stroke, so it's working out what they mean by stroke or R...

I've altered the piston count to 1, so it's measuring actual full crank revolutions and the numbers are making more sense now to what I expect.


I'll have to proof it somehow though, by limiting the output of the engine at a specific rpm and MAF on the associated map, and check to see where the output drops (view rate of change of speed) vs the MAF output I have generated, and see if they intersect biggrin


All very fun though, just making my brain hurt, the hardest part is knowing what data you want and how to collect it the best way smile

Dave