Theory: Mass Air Flow


Be prepared to do a lot of reading in the numerous side links on this page.  More information that is beyond the scope of this overview will be available.

“Mass Air Flow” (MAF, for short) is a method of measuring airflow into an engine in order to supply an appropriate amount of fuel and adequate spark timing. First, vocabulary:

  • ECM, ECU, Engine computer : used interchangeably to mean the computer operating the fuel injectors and running the engine
  • MAF : Usually used as a shorthand for Mass Air Flow Sensor / Meter
  • Vane Air Flow Meter (VAFM, “Flapper” type meter) : An early type of air meter rarely used today that relies on air pressing against a metering plate (“flapper”) to provide an airflow signal
  • Karman Vortex air meter : A type of air meter that not used very much anymore that creates and counts vortexes (air disturbances) in order to measure airflow.
  • Hot-Wire MAF : A type of MAF Meter that uses a thin wire heated by an electric current to directly measure air mass.  The most common type of MAF today
  • Hot Film MAF : A type of MAF Meter that uses a metal film heated by an electric current to directly measure air mass.  Another type of MAF that is found today.
  • TPS : Throttle Position Sensor
  • MAP : Manifold Absolute Pressure Sensor – a sensor that measures the pressure of air in the intake manifold
  • Displacement : the volume swept by a piston descending from the top to the bottom of the cylinder bore. More here.
  • AFR : Air Fuel Ratio – the ratio of air to fuel present in a combustible mixture. Usually stated as a ratio, i.e. 14.7:1 for the stoichiometric AFR for gasoline. Stoichiometric AFR varies from fuel to fuel.
  • Lambda : similar to AFR, except usually expressed as a number where 1.0 represents a stoichiometric mixture for all fuels.  Lambda and AFR are the same concept expressed in different units.

Types of MAF Meters and General Operating Principles

Hot Wire MAFs and Hot Film MAFs are the dominant technology in use today.  Earlier style meters (Vane/Flapper, Karman) required an external temperature sensor in order to provide a meaningful airflow reading.  Hot Wire and Hot Film sensors are often found coupled with a dedicated air temperature sensor but they do not strictly require one because the method in which they generate a signal accounts for the temperature of the air they meter.  If you want to learn more about meters, read up here.

ECMs generally have a routine (usually called the “MAF transfer function” or something similar) that converts the raw sensor readings into an airflow value. Sometimes this is a real-world unit (such as g/s or lb/hr) and sometimes it is a purely arbitrary synthetic unit that merely defines the shape of the curve. MAF transfer functions for hotwire MAFs are usually an exponential curve. The shape of the curve is usually determined by the physical characteristics of the sensor. The metering range of the sensor is usually determined by the cross-sectional area of the housing it is in. This means that an easy way to increase the amount of air a given MAF can meter is to put it in a pipe with a larger cross-sectional area. The new MAF transfer function can be approximated (usually fairly closely) by multiplying the old transfer function by the difference in cross sectional area.

Example Question: a meter in a 2″ diameter round housing can meter 1000g/s. The same meter in a 4″ diameter round housing will measure how much air?

Answer: First, find cross-sectional area of 2″ diameter pipe.  Area of circle = pi * r^2.  Diameter = 2 * radius. Radius = 1″, area = 1 * pi.  Second, find cross-sectional area of 4″ diameter pipe.  Area = 4 * pi.  New area / Old area = 4 / 1 = 4.  Multiply original airflow (1000g/s) by ratio of area (4) to get maximum value of 4000g/s.  Note that each individual point in a MAF transfer function can be multiplied in this manner to rescale.

MAF Systems

From here on in this guide, “MAF” and “MAF Systems” will refer exclusively to systems using Hot Wire MAFs and Hot Film MAFs. The reason for this is pretty simple: these type of sensors (at least theoretically) are capable of measuring air mass without the need for significant compensation for air density (i.e. altitude changes, forced induction, changes in air temperature).  In practice, many control strategies use other sensors to try to increase the accuracy of the MAF by additional adjustments but it is not strictly necessary.  MAF sensors do not know what “boost” or “vacuum” are – they deal exclusively with airflow.  If you are trying to make the transition from tuning mostly Speed-Density systems to MAF Systems, be very cautious with timing values as the same trends and rules do not apply to both systems.

Fueling with a MAF system is about as simple as it can get.  It goes something like this:

  1. The raw sensor output is converted to an airlow value
  2. The next step after determining airflow is to figure out how much fuel is needed to achieve a “target” AFR (more on AFR targets later) which is usually achieved by multiplying by AFR expressed cleverly (see footnote)
  3. Finally, the desired fuel value is achieved by multiplying/dividing by a value (injector constant, injector slope, async BPW, …) to account for injector size.  Also any battery compensation is added.  (See Theory: An Injector Model for more information)
  4. Done!  At this point, we have an injector pulsewidth!  PulseOut = (MAF_Transfer(RawMAFSensor) * TargetLambda * injector size) + injector latency

There is no “standard” way of doing timing with a MAF system, but all variants basically calculate a value that represents how much air is entering the cylinder each time the motor turns over.  It goes something like this:

  1. Start with the same airflow value from step one of fueling. (MAF signal -> MAF Transfer)  This tells us the amount of airflow per unit time.
  2. Measure how fast the motor is spinning (RPM) and from this calculate how many revolutions happened during the same time frame as our MAF sample.
  3. Multiply/divide airflow by engine revolutions to get airflow / rev.  Most engine management stops here (GM, Subaru, Mitsufeces, …) and spark tables are indexed in grams/rev.  This is a measure of engine load (with a lowercase “l” to denote that we are talking about something different than “Load”, explained next)
  4. Ford (and others?) instead use a “Load” (with an uppercase “L” to denote that we are talking about something different than “load”) value that is calculated by multiply/dividing airflow/rev by engine displacement to get a measure of how full the cylinders are relative to their maximum capacity naturally aspirated at sea level with certain air conditions.  If you’re at all familiar with Speed-Density, this should sound somewhat familiar because it is a concept VERY similar to Volumetric Efficiency.
  5. Timing tables are usually in the form RPM x calculated load.  MAF timing tables will display a very different characteristic shape than RPM x MAP tables common in Speed-density systems.

Now that we have some concept of cylinder filling (“Load” or “load”), we should return to a piece of how fueling happens in a MAF system: target lambda/AFR.  Usually the same measure used to determine appropriate ignition timing is used to determine an appropriate target AFR/lambda.  In these cases, there is a table that dictates target lambda/AFR indexed by RPM and load.  Sometimes, RPM and TPS is used to determing target AFR instead of calculated load.

Strengths of Mass Air Flow

  1. Extremely accurate fueling and spark delivery across a diverse range of engine conditions (at least while in steady-states): the holy grail for engine management. A properly set-up MAF system can adapt to changes in weather and altitude with ease.
  2. Minor changes to engine equipment (i.e. headers, minor camshaft changes, intakes that do not significantly alter the placement of the MAF) do not require recalibration of the ECM.

Weaknesses of Mass Air Flow

MAF systems are known for having these issues:

  1. MAF systems are extremely intolerant of vacuum leaks.  Any leaks between MAF sensor and engine generally cause all manner of odd problems, running lean in most cases due to un-metered air making it into the engine.
  2. MAF sensors can be extremely sensitive to how they are “clocked” – merely rotating the sensor at a given spot in the intake tract can be sufficient to significantly change its output.
  3. MAF sensors require laminar flow to read 100% accurately.  True laminar fluids do not exist so this introduces some degree of inaccuracy to MAF sensor readings.  Placing MAF sensors near bends, size transitions or obstructions where flow is less laminar greatly magnifies this issue.
  4. A MAF sensor can be a flow restriction in cases where the MAF housing is the smallest portion of the intake system.
  5. Hot-wire MAF elements are very fragile.  Debris can destroy delicate wires easily.  Dirt and oil deposits can build up on the sensor element, adversely affecting readings.
  6. MAF systems have a relatively poor response to transient conditions, such as sudden throttle changes.  This is explained by the time it takes air to move from the MAF sensor where it is measured to the cylinder where it can be involved in combustion.
  7. MAF sensors are not “one-way” sensors – reversion from a camshaft with large amounts of overlap can cause air to be metered on its way in to the engine and then again on its way out resulting in an artificially high MAF reading.  This can almost always be fixed by placing the MAF sensor sufficiently far from the throttle body, however doing so comes at the expense of making transient response even worse.

It may seem like there are a lot of weaknesses of MAF systems, but it is truly hard to emphasize just how amazing and important the strengths are.  It is no secret that the majority of OEMs today are implementing MAF systems as the primary control strategy.  There is a good reason for this, namely that engines can be controlled much more precisely (with the goal of meeting stricter and stricter emissions standards) with a MAF system than any other type of control strategy.

Note: I say “Multiply/divide” multiple times because multiplication and division are very similar operations but division is generally much slower on microcontrollers and other “small” processors often found in ECUs.  For this reason, most division is implemented as multiplication by carefully changing the scale of one of the operands.