LJ's PCM Tutorial, Version 2.1
Updated 6/12/02. Biggest change is the description of how the PCM controls fueling. Beyond that, version 2.1 is just another attempt to polish the tur..., ahhh, tutorial.
I can tell from my email and from participating in the LT1-Edit email list that there is a need for a PCM tutorial. So I wrote one. Disclaimer: I'm not a GM power train engineer. I'm not certain that what I've presented here is absolutely true. But it's consistent with what I've read, and with my own tuning experience. It's certainly worth every penny you paid for it. Note that this tutorial applies to stock PCM tuning. If you have a program that locks the PCM in open loop all the tine, much of what is written below won't apply.
This page dives right into fuel and spark control. The links below have a lot more in them than what the names may suggest. The original version of this tutorial was all on one page, so the "tutorial" stuff was sprinkled throughout all the sections that are now on separate pages. In other words, the Abbreviations page has a lot of tutorial info as well as simply stating what the abbreviations stand for. Please read them all!
Updated 2/11/03. I've added 2 zipped spreadsheets for dyno tuning the PE tables based heavily on the work of Christian Millard. They are intended to be self-explanatory, butcha never know. Links below. Dynotune is Excel 2000 (Office 2000) format, Dynotune95 is Excel 5 (Office 95) format).
Fuel Control
Executive summary: The PCM controls the fuel injectors by using signals from the engine sensors, like MAP, MAF, RPM, ECT, and maybe some others I've forgotten, to pick out the right value from the right lookup table to use in the fuel injector pulsewidth calculation. The PCM injector pulsewidth calculation also uses the INT and BLM correction factors based on O2 sensor feedback when it is in closed loop. O2 sensor correction is not used in open loop.
Note that there are 2 kinds of open loop. Right after a cold or hot start, a scan tool will report that the PCM is using open loop fuel control. This version of open loop is described in the next section. Once the PCM decides that conditions are right, it switches to closed loop fuel control, which is described below the open loop discussion. But even after this switch, if you lean on the throttle hard enough, the PCM will switch to power enrichment (PE) mode, which is another form of open loop. In PE mode the scan tool may report that the PCM is in closed loop, but it should also report that learning is disabled. Learning disabled means that the PCM is ignoring the O2 sensors, which is the same as saying that the PCM is using a version of open loop fuel control.
Open loop
When you fire the beast up, whether the engine is stone cold or fully warmed up, the PCM starts out in open loop. This is because cold (or just warm) O2 sensors don't work very well, and they take a little while to get good and hot. Most LT1 O2 sensors have built-in heaters to speed up the process, which is why they have 4 wires coming out of them. Also, cold engines are happier when they are run richer than the fixed closed loop air/fuel ratio target. Since the O2 sensor signal is not reliable right after the engine is started, the PCM has no way to find out whether the engine is running too rich, too lean, or about right. But it still needs to take a stab at the right injector pulsewidth.
When the engine is running in open loop at light to moderate loads (idling, city driving, highway cruising), the PCM uses the AFR table for the pulsewidth calculation. The AFR table uses the ECT (colder engines need to be richer than warm engines) and MAP (higher loads require a richer mix than light loads) sensor inputs to point to the desired AFR for those temperature and load conditions. As always, the MAF sensor tells the PCM how much air the engine is inhaling. The PCM knows how big the injectors are (the amount of fuel is delivered per millisecond of pulsewidth), so with the MAF sensor output (the amount of air inhaled by the engine) and the AFR from the table (the desired air/fuel ratio), it can estimate its best-guess injector pulsewidth. Remember that the PCM has no idea whether or not this guess-timated pulsewidth is anywhere near right. It could be causing the engine to be very rich, or very lean, or anywhere in between.
Remember that engines like a richer air/fuel mixture when they are cold (richer than the fixed 14.7:1 ratio used in closed loop), and when they are asked to make more than just a cruising level of power. So the AFR table values for high MAP (heavy load) and low ECT (cold engine) are lower (richer) than the values for low MAP and normal operating ECT. This means that "cold engine enrichment" and a bit of "power enrichment" are built right in to the table. This quasi-power enrichment may be used in open loop when you maintain your freeway speed up a steep hill in high gear. But see the last section on this page for what happens when you really lean on the throttle.
When is the engine ready to switch from open loop to closed loop? The current theory is that the PCM decides to switch based on some combination of ECT and engine running time (3 minutes?).
Closed loop
When the engine temperature and time-since-the-engine-started timer agree that the O2 sensors are warmed up and ready, the PCM switches to closed loop (at least this how I think it works). Just as it did for open loop, the PCM calculates the closed loop base pulsewidth using numbers programmed in lookup tables.
While the target open loop air/fuel ratios are contained in the AFR table, the closed loop air/fuel ratio is hard-coded in the PCM to be 14.7:1. The MAF sensor tell the PCM how much air the engine is inhaling, the injector constant and injector-offset vs. voltage values tell the PCM how much fuel the injector will flow for any particular pulsewidth, so the PCM just does the math to calculate the appropriate injector pulsewidth. Well, it may be a bit more complicated than that...
(Note: The following 2 paragraphs presents a controversial topic: the use of VE tables in closed loop. Some folks assert that the VE tables are not used unless the MAF sensor is not functioning. They claim that the VE tables are in the PCM only for speed/density operation, which is a backup mode the PCM can use if the MAF sensor fails. Speed/density is covered below.)
Closed loop operation may refine the injector pulsewidth calculation using the 2-dimensional VE tables, which use MAP and RPM as the 2 inputs. In the 94-95 f-body (OBD-I) PCM there are 3 different VE tables, one for cranking/starting (0-340 rpm), one for low rpm (400-2000 rpm), and the third for high rpm (2000-7000 rpm). If used, these tables would account for the fact that an engine does not necessarily use all the air it inhales for combustion. For example, engines with long duration cams pass some of the inhaled air right out the exhaust valve during overlap.
I think the values in the VE tables are used as multiplication factors that are less than 1 (e.g. 0.93). Or you can think of them as percentages (e.g. 93%). For example, if the pulsewidth based on the current MAF value was 5.0 milliseconds, and the current MAP and RPM values point to a VE table value of 80, the final pulsewidth would be 0.80 * 5 = 4.0 milliseconds. this means that the engine is only using 80% of the measured air for combustion, the rest is blowing straight out the exhaust port.
Even in closed loop, the injector pulsewidth calculation is really just a guess based on the MAF sensor, the injector constant and offset, and (possibly) those VE table numbers. If the pulsewidth is not right, the fuel/air mixture will be too rich or too lean. It's very important to remember that the PCM tries to keep the AFR at the "ideal" ratio of 14.7 while it's in closed loop.
This is where the O2 sensors come in. They generate an electrical signal for the PCM that represents the amount of oxygen in the exhaust stream, which is proportional to the air/fuel ratio. This signal, which is the feedback that "closes the loop", tells the PCM how good a job it's doing on the fuel mixture. The PCM uses this feedback to calculate a correction number, sometimes called the integrator, or INT for short, or (more accurately IMHO) the short term fuel offset. The PCM uses the short term fuel offset to adjust the pulsewidth calculation so that the air/fuel ratio homes in on 14.7:1. Plus, and this is important, it stores the offset so it can be used later.
Important note, and apology: On my Definitions page I make a big deal about the difference between an "offset" and a "correction factor". An offset is usually added to the number that needs adjustment, while for correction factors, the number needing correction is multiplied by a correction factor. This difference is important when tuning the PCM for bigger injectors because the Injector Size value is a correction factor, but the Injector Offset vs. Voltage is an offset. The apology is needed because the INT and BLM discussed below are called offsets, even though the final correction that uses them is multiplied. The (somewhat confusing) reason is that the INTs and BLMs themselves really are offsets, but the PCM uses them to calculate a correction factor for the injector pulsewidth.
Now we need to talk about BLM cells. The PCM is set up with a grid of 16 BLM cells in which it can store 16 different numbers, one per cell. These numbers will be remembered, even when the car is turned off, as long as the PCM is getting power. They will be reset to their default value of 128, however, if the battery is disconnected for a few seconds, or if the PCM fuse is pulled.
The 16 BLM cells represent 16 different regions of rpm and load, as shown in the picture below. Each of the small boxes in the picture is one BLM cell. The 16 numbers stored in the cells are the injector pulsewidth corrections that the PCM has "learned" for each of the regions since the last time it lost power. How it learns them is described below the picture. When you drive the car in closed loop, the PCM is using the correction value from the BLM cell that matches the current combination of RPM and load (MAP). For example, at 1500 rpm and a MAP of 60, the PCM will use the correction value stored in cell 10. I have numbered the cells based on what my scan tool reports. A different scan tool might number the cells from 1 to 16 instead of 0 to 15.
Note that the "boundaries" between the cells shown below, which are the stock values, can be changed using LT1-Edit or TunerCat. For example, if you install a huge cam that won't idle (or make any useful power) below 1000 rpm, the engine would almost never get into cells 0, 4, 8, or 12. Raising the first RPM cell boundary to 1200 would make those cells useful again.
RPM
0 900 1200
2000 redline
0 +-------------------------------+
| |
| | |
| 0 | 1 |
2 | 3 |
| | | | |
30 +-------+-------+-------+-------+
| | | | |
| 4 | 5 |
6 | 7 |
M | | | | |
A 50 +-------+-------+-------+-------+
P | | | | |
| 8 | 9 |
10 | 11 |
| | | | |
80 +-------+-------+-------+-------+
| | | | |
| 12 | 13 | 14
| 15 |
| | | | |
100 +-------------------------------+
So how does the PCM figure out what to put in the BLM cells? Remember that the closed loop discussion so far has been about the short term fuel trims (INTs). You can watch them change very rapidly with a scan tool. Suppose you drive the car such that the engine stays in just one of the cells for awhile. Let's say you are cruising in the freeway in cell 10. Suppose you're watching a scan tool and notice that the INT stays above 128 consistently while the engine is in cell 10 (I'm not saying that it stays at any constant value, like 132, just that it never goes below 128).
When this happens, the PCM will increment (add 1 to the current value) the "long term fuel trim", or "Block learn", or "BLM" for cell 10 and reset the INT for that cell to 128. If the INT still stays above 128 (and you keep the engine in cell 10), the PCM will again increment the BLM for cell 10 and again reset the INT to 128. It keeps doing this until the INT for cell 10 stays close to 128, or the BLM reaches 160 (the maximum allowed by the PCM).
Similarly, if the INT for any cell stays below 128, the BLM for that cell will be decremented (subtract 1 from current value) and the INT reset to 128. This is repeated until either the INT hangs around 128 or the BLM reaches its lower limit of 108 (the minimum value allowed by the PCM). In both of these cases (above and below 128), the PCM is basically adding up the short term corrections for the cell over time (which is the same as integrating), then adjusting the BLM for that cell if needed and resetting the INT to 128. The BLM represents what the PCM has learned (hence the name) about the fuel calibration for that cell over time. All of the BLM cells in the table work this way.
None of the BLM cells are affected by any other BLM Iin other words, it's possible (but not likely) for cell 5 to be 108 at the same time that cell 6 is 160.
Think of the long term, or BLM, as being the general trend of the mixture for the cell, while the INT is used for quick (really quick, as in a small fraction of a second), small corrections. Remember that BLMs above 128 mean the engine calibration is too lean, so the PCM has to add some fuel to the mixture. BLMs below 128 mean the calibration is too rich, so the PCM has to take away fuel.. We know the PCM code is written to keep the short term offsets as close to 128 as possible, but I still don't know what algorithm the PCM uses to decide when to update the BLM for a cell. However, I do know from watching my PCM scan software that the BLMs can change faster than one increment (or decrement) per second (from 119 to 118 to 117 in 2 seconds, for example), so the algorithm can be pretty snappy.
I'm also not sure that there is 16-cell table to store the 16 INTs, but based on analyzing scanned data, I think there is such a table. My DataMaster logs have big jumps in the reported INT value from 2 sequential samples in cases where the 2 samples are in different BLM cells. Here's a possible reason why two tables (1 for BLMs, and 1 for INTs) makes sense: The PCM may not finish adjusting a particular pair of BLM and INT cells before the load and rpm sensors take it to another cell (in other words, it didn't get the BLM to 128). It would make sense for it to store both the INT and BLM values for that cell (not just the BLM) so that it can start out with them the next time the engine enters that cell.
The actual injector pulsewidth is the product of the base pulsewidth times the short term correction factor, and times the long term correction factor. As far I know, the BLM offset is given more "weight" in the pulsewidth calculation than the INT. One way this might be done is like this: Suppose the base pulsewidth is 5 ms. If both BLM and INT are 128, you wouldn't want them to have any effect (remember that 128 is perfect). If we divide them both by 128, we get a final pulsewidth of 5 * (128/128) * (128/128) = 5 * 1 * 1 = 5, which is what we wanted.
But this gives the BLM and INT equal weight. For example, if both were 110, the final pulsewidth would be 5 * (110/128) * (110/128) = 5 * 0.86 * 0.86, which equals 3.7. Notice that both correction factors worked out to 0.86, which is 0.14 away from 1.00. We can cut the INT weight in half by first adding 128 to it, and then dividing the sum by 256. This trick gives us a final pulsewidth of 5 * (110/128) * ((110+128)/256) = 5 * 0.86 * 0.93 = 4.0. The BLM offset is 0.86 as before, but the INT offset is now 0.93, which is only 0.07 away from 1.00. In other words, the INT factor is only half as big (0.07/0.14 = 1/2) as the BLM offset. Also, remembering that the base pulsewidth is 5, the final pulsewidth in the unequal weight case (4.0) didn't change as much as in the equal weight case (3.7). I'm pretty sure this is how the PCM weights the BLM and INT.
Cells 16, 17, and 18
Brace yourself, because things are always a little more complicated than we might like. It turns out that there are three more BLM cells than the 16 discussed above. Cells 16, 17, and 18 are considered to be closed loop cells because they do not use the open loop AFR table. But my understanding is that "learning" is turned off in these cells, which means that the BLMs for these three cells won't be adjusted, even if the O2 sensor feedback indicates that the mixture is not as good as it could be. This means that the term "closed loop" is not an accurate description of what's going on, but we use it to remind ourselves that the PCM is using a fixed value of 14.7 instead of the AFR table. Also, PCM scanners will report that the PCM is in closed loop.
Based on looking at tons of logged PCM data, it appears that cell 16 is used only while the engine is idling (0% TPS and idle RPM), cell 17 is used during engine braking (0% TPS and any RPM [?] above idle), and 18 can be used at any MAP and RPM as long as the TPS is not 0%. So how does the PCM decide to use cell 18 (which "covers" the same conditions as cells 0 through 15? It appears to be related to the charcoal canister purge (CCP). <<<charcoal canister purge>>>
WOT!, or power enrichment
Whether the engine is in closed loop or open loop, the PCM will jump to the PE fueling tables when you really lean into the throttle. So how does the PCM decide exactly when it needs to use the PE tables? By looking at another table, naturally. There is a "WOT" table that tells the PCM how far open the throttle must be (as measured by the TPS signal) for the engine to need the PE tables. The only table input is RPM. For example, at 2000 rpm the table might say that the TPS must be at 66% (in other words, 66% of full throttle) for the PE tables to kick in, but at 4000 rpm only 38% TPS is needed for the PE tables to kick in. Note that the "WOT" table is used for many high-load conditions other than wide open throttle. WOT is just a convenient label to refer to the conditions needed for switching to the PE tables.
So what happens in PE mode? I think it works like this: the PCM bases PE fueling on the same 14.7:1 AFR it uses for closed loop. The PE vs. ECT lookup table supplies an enrichment factor based on coolant temperature, and the PE vs. RPM table supplies an enrichment factor based on RPM. The base pulsewidth is adjusted by the factors chosen from these tables when the PCM decides conditions warrant it. Wait a minute, you say, what about the BLMs and INTs? The O2 sensor signal is not reliable at the richer-than-14.7:1 air/fuel ratios used in PE, so PCM ignores the O2 sensors and disables BLM learning. So what are the BLMs and INTs doing during PE mode? Unfortunately, for the BLMs the answer depends on where they were the instant before the PCM decided that PE mode was necessary.
If the PCM calibration is generally good (BLMs near 128), or generally rich (BLMs are smaller than 128), the PCM will set the BLMs to 128 during during power enrichment (even if it was 108). But if the last BLM before the switch to power enrichment was 132 or bigger to compensate for the calibration being too lean, the PCM will use that BLM during WOT instead of 128, even if it's 160. GM did not want to let the engine go lean when you dip into the power! (see the Split BLMs page)
<<<insert PE equation>>>
Speed-density
Speed-density fueling was used extensively before MAF sensors were reliable and cheap enough to be used in a Chevy. While the MAF sensor directly measures the mass-flow-rate of air the engine is inhaling, speed-density systems must estimate this airflow based on IAT and MAP.