Engine Mapping / Calibration / Tuning - Part 1

Modern engines are controlled by a sophisticated computer, called the PCM for powertrain control module, or the ECU for engine control unit, which does most - sometimes all - of the following:
  • It tracks the engine speed and position accurately, down to a fraction of a degree, through a crankshaft (CRANK) and camshaft (CAM) sensors.
  • It computes or measures the amount of air entering the engine, either through a manifold absolute pressure (MAP) sensor or a mass air flow (MAF) sensor.
  • It computes the amount of fuel that needs to be mixed with the air to achieve good combustion (fueling).
  • It computes when to start injecting the fuel and for how long (injection phase and timing).
  • It computes when to ignite the mixture (spark advance).
  • It controls the intake and exhaust cycles' timing by varying the camshaft's angular position (variable valve timing, VVT, aka VANOS, VAriable NOckenwellenSteuerung which is VVT in German).
  • It controls the rotation speed of the turbocompressor through a wastegate (WG).
  • It controls the flow of the fuel pump.
  • It controls the cooling fans.
  • It keeps track of the engine coolant temperature (ECT).
  • It keeps track of the engine oil temperature (EOT).
  • It keeps track of the engine oil pressure (EOP).
  • It keeps track of the ambient air temperature (AAT).
  • It keeps track of the intake air temperature (IAT).
  • It keeps track of the fuel temperature (FT).
  • It keeps track of the fuel pressure (low pressure, FP and high pressure when applicable, HPFP).
  • It keeps track of the barometric atmospheric pressure (BAP).
  • It keeps track of the driver demands through the throttle position sensor (TPS) and position over time.
  • It keeps track of the throttle inlet pressure (TIP) on modern turbo engines.
Some of the above duties are relatively simple: temperature sensors, for example, are simply routed to an analog input on the ECU.

How sensors work

There are two general classes of sensors used for measurements of ambient conditions, such as temperatures or pressures: analog sensors, and digital sensors. Let's consider the common analog sensors first.

For analog sensing, the ECU produces a reference voltage, say 5.0V, that is sent to power a sensor.

The sensor then produces a voltage, typically between 0.5V and 4.5V to give an idea, that represents the measured value.

The voltage produced by the sensor (the sensor's analog signal) will be converted to a numeric value by an analog-to-digital converter in the ECU.

The sensor itself may or may not be linear, which means that the produced voltage may or may not increase/decrease in the same proportion as the measured quantity varies.

An imaginary linear temperature sensor would, for example, produce 1.0V of signal variation per 20°C of temperature variation over its entire measurement range, so that if that sensor produces, say, 3.0V at 40°C, per its specifications, it will produce 2.0V at 20°C and 4.0V at 60°C

Some sensors are not linear due to their operating principles and the physics or chemistry involved, so the numeric value digitized by the ECU is then linearized with the help of a linearization function that "corrects" the sensor's response curve to make it linear.

Linearization functions exist for most sensors, and are determined from the sensor's characteristics supplied by the sensor's manufacturer, then verified in practice at some point during the engine's development.

Note that, since each sensor type is unique in terms of the measurement range, linearity, and response, one cannot, in general, substitute a sensor for another of a different type without adjusting the sensor's calibration in the ECU.

Analog sensors usually have two or three wires. The two-wires types are the simplest, common examples are air temperature sensors which are simple resistances whose value varies with the temperature. The reference voltage is applied on one side, and the ECU measures the voltage drop on the other side. The difference depends on the resistivity, which - in those sensors - depends on the temperature. After a bit of scaling and linearization, the ECU knows the temperature, in degrees, at the sensor's location.

The three-wires types typically have ground, power, and signal. Those sensors are more sophisticated and they usually include some electronic that performs some level of signal conditioning or linearization, sometimes calibrated at the factory, to minimize differences between samples of the same sensor type.

One general note about analog sensors, in particular of the resistive types, is that they don't react instantly, sometimes far from it. Common air, water, or oil temperature sensors are actually quite slow to react.

A sensor's reaction time is measured by the time it takes to reflect a change in the condition to the output signal. Say for example that an air temperature sensor is sitting at room temperature (20°C) for a long time and its output voltage reflects that temperature, say, for the sake of example, 2.0V.

The sensor's time constant is the time taken to reflect a change in temperature on its output.

Say we suddenly increase the ambient air temperature around the sensor to a steady 40°C by blowing hot air with a hairdryer. The time constant is the measure of how long it will take for the sensor to report 63% of the change of temperature on its output. That value, expressed in seconds, is the T63 constant of the sensor, and every sensor has one.

The very common BOSCH 0 280 130 039 air temperature sensor has a T63 constant of 38 seconds, while Honeywell water/oil temperature sensors have T63 constants of about 15 seconds.

Note that 63% of the change after one T63 time constant is still quite far from the real value. Another time constant will report 63% of the remaining difference, the third time constant reports 63% of what was missing from the second one etc.

Let's assume that the air temperature quickly increases from 0°C to +10°C while using the BOSCH air temperature sensor mentioned above.

After 38 seconds, one T63 constant for that particular sensor, the temperature reported by the sensor will be +6.3°C. After 76 seconds - two T63 constants - the reported temperature will be +8.63°C and after 114 seconds, nearly two minutes, the reported temperature will be 9.49°C, or about 95% of the actual temperature difference.

One usually counts three T63 constants as the time needed to get a reasonable new value after any variation in the conditions measured by the sensor. Likewise, the Honeywell sensors mentioned above would take 45 seconds to report 95% of any variation of the temperature of the fluid they measure.

The table below lists the percentage of the variation reported after each T63 constant for any analog sensor. You will see that it takes a long time, five time constants, to get within 1% of the real new value after any change.

#T63 Constants % Reported
1 63.00%
2 86.31%
3 94.93%
4 98.13%
5 99.31%
6 99.74%
7 99.91%

Acute readers have noticed that you can never reach 100% of the value if, for each time constant, you take 63% of the error out, and that's true: the sensor converges towards the real value without ever reaching it, but that's more of a theoretical consideration.

Some analog sensors are much faster, for example, the ECU must know the manifold absolute pressure in a timely manner to be able to compute the fueling and spark advance required at that particular engine load point, and the MAP sensors providing that value typically react and supply an accurate value in one to two thousandths of a second (1-2ms).

Digital sensors are different mainly in the way they convey the measured signal back to the ECU. The sensor itself typically is an analog sensing element and coupled with some electronics, sometimes even a tiny programmable micro-controller unit (MCU) that provides signal processing and conditioning functions, analog-to-digital conversion, linearization, temperature compensation, and sometimes even digital signal processing (DSP) as well as fusion from multiple sensors.

The processed value is then sent to the ECU in various ways, one of them being in the form of a variable frequency digital signal (square wave) or a variable duty signal (PWM) - which is then measured by the ECU. Those signals are essentially on/off signals that are easy to reconstruct and measure accurately on the receiving end, and thus more resistant to ambient noise as they are much less altered along the way than analog signals.

Another way to transmit the values is by writing them to a communication bus connected to the ECU. Examples of buses used in automotive environments include LIN and CAN buses, FlexRay and even Ethernet.

The sensor writes the processed value directly and the interested parties listen to the bus and fetch the value, which can generally be used without further processing or linearization, as those tasks have been performed by the sensor's electronics.





Comments