Working With The E78 ECM

Torque Based control

E78 and E39 ECMs use a torque based control structure that is similar to systems used by Ford and Dodge. This is a significant change from older GM controllers in how the ECM:

processes inputs
performs internal calculations
controls the engine outputs such as throttle, spark and fuel

This leads to a more integrated and streamlined control process, however, it also means a change in thinking for many tuners.

The diagram above shows a simple view of how the torque based control works.

the driver pedal position is translated into an axle torque request
the driver axle torque request is then checked against any other axle torque requests
the axle torque request is then translated into an engine torque request
the engine torque request is then checked against any other engine torque requests
the final engine torque request is then used by the torque control system which controls the engine actuators

You can see that it is only at the last step of the process that things such as throttle and spark are controlled. You might also be thinking: "Why do they use axle and engine torque? Why not just use engine torque from the get go?" The answer is: some systems want to control what the "vehicle" does, others want to control what the "engine" is doing.

For example, with your right foot you want to control the acceleration of the vehicle. You really don't care about factors such as:

what gear you are in
if the aircon is switched on
if some other load is on the engine

or even

what kind of engine you have

You want to control the axle (or wheel) torque.

Similarly, the RPM limiter doesn't care how fast the vehicle is going or whether it is going up a hill or sitting there in neutral. It just wants to directly limit the engine torque to control the RPM. It wants to control the engine torque. So, the system must work in both domains and various functions provide their input in axle or engine torque, depending on what they are trying to achieve.

Predicted vs. Immediate Torque

When controlling an engine, the type and "speed" of the actuators is important and the torque based control splits them into two groups:

Predicted Torque (Slow - Airflow based): is basically anything relating to airflow control such as throttle, boost or camshaft. Can increase or decrease torque.
Immediate (Fast): is spark and fuel control. Typically only decreases torque very quickly - a favorite for torque management limiting such as spark retard or fuel cut.

For example, the RPM Limiter wants to prevent the engine RPM exceeding a limit. As the engine RPM approaches the limit it could request an Immediate Engine Torque request to immediately retard the spark and/or cut fuel. This is an aggresive approach but works very well to ensure the RPM Limit is not exceeded. It could also request a Predicted Engine Torque which would limit the throttle (and boost) but not be so capable in it's ability to stop the engine RPM from exceeding the limit. Or, as you've probably guessed, it could do both. Which would give a fast acting limiter that was nice and smooth.

A More Complex View

So let's look at a more complex picture of what's going on:

In this picture, you can still see the Axle and Engine Torque domains, with the conversion in between and the engine actuators. Additionally, you see some of the main subsystems that request various axle or engine torques along the way. Hopefully, you can see that the key to getting the actuators to do what you want (without limits) is to control the torque requests that come from the various limiting subsystems so that the driver pedal request makes it all the way from the left to the right without limitation.

In summary:

The torque based system primarily controls the throttle (engine airflow via the Predicted Torque request)
It can also provide a fast acting Immediate Torque request (mostly used for fast torque limiting via spark and fuel cut)
It includes various limiting functions such as speed limiter, RPM limiter, torque limits etc.
Idle Control and DFCO are completely torque based

Air, Fuel and Spark

So now we have an idea of how the torque based system works, let's look at how it fits with the rest of the main engine controls. The thing to remember here is that the torque system only provides some input to the main control system, it's not the end of the line. For example, a torque request that requires spark intervention will most likely end up being a spark retard. The spark system still has to calculate the main spark with all its offsets and modifiers. Likewise, the fuel system still needs to calculate the commanded AFR, the injector pulse width, what fuel mode it's in and then somewhere in the process it sees that the torque system wants to cut 2 cylinders, so it does that as well. The Electronic Throttle Control (ETC) system has to take the final predicted torque request and translate that into a throttle position that will achieve the desired torque, taking into account any turbo or supercharging capabilities the engine may have.

This is not intended to be an exhaustive guide on how to tune, but the following sections give extra information with regards to tuning various things.

Airflow

One of the most important tasks of the ECM is to regulate the amount of airflow through the engine. The primary actuators are the Throttle (ETC) and controlling the boost generated by the supercharger or turbocharger if fitted. The ECM uses a number of sensors to calculate how much air is entering the engine and also provide controls for the throttle, supercharger and turbocharger. Firstly, lets take a look at the three common configurations in the diagram below:

In this diagram, you can see the various airflow, pressure and temperature sensors and their typical locations.

Pressure Sensors:

MAP: Manifold Absolute Pressure sensor located inside the intake manifold, measures the pressure of the air before it enters the engine
TIAP: Throttle Inlet Absolute Pressure sensor located before the throttle blade, measures the pressure of the air before the throttle
SCIAP: Supercharger Inlet Absolute Pressure sensor located before the supercharger inlet (between the throttle and the supercharger), measures the pressure of the air before the supercharger and after the throttle
TCIAP: Turbocharger Inlet Absolute Pressure sensor located before the turbocharger inlet, measures the pressure of the air right before the turbocharger
BARO: Barometric Pressure sensor, measures the pressure of the outside air

Temperature Sensors:

IAT: Inlet Air Temperature sensor located in the MAF sensor (typically), measures the temperature of the air before it enters the throttle
IAT2: Inlet Air Temperature 2 sensor located inside the intake manifold, measures the temperature of the air before it enters the engine

Airflow Sensors:

MAF: Mass Air Flow sensor typically located before the throttle, measures the mass flow of air entering the throttle
MAF2: Mass Air Flow 2 sensor typically located before the throttle, used for twin turbo charged applications only.

Now you may think this is all so very easy, but there is a slight complication in that the ECM doesn't have all five of the pressure sensor inputs available at once, it only has three. It has a MAP sensor input and two ambient air pressure sensor inputs called AAP1 and AAP2 which are mapped to the required setting using the pressure sensor configuration calibration. Additionally, some of these values are calculated based on losses through various components. eg. for NA applications, the TIAP can be calculated from BARO by modeling the air filter losses.

Pressure Sensor Config:

NA-MAP: NA application with MAP sensor fitted. Baro and TIAP are calculated.
NA-MAP-TIAP: NA application with MAP and TIAP sensor fitted. AAP1 = TIAP. BARO is calculated.
NA-MAP-BARO: NA application with MAP and BARO sensor fitted. AAP1 = BARO. TIAP is calculated.
SC-SCIAP-TIAP: SC application with MAP, SCIAP and TIAP sensor fitted. AAP1 = SCIAP (Note: SCIAP has it's own linear and offset). AAP2 = TIAP. BARO is calculated.
SC-SCIAP-BARO: SC application with MAP, SCIAP and BARO sensor fitted. AAP1 = SCIAP (Note: SCIAP has it's own linear and offset). AAP2 = BARO. TIAP is calculated.
TC-TIAP-TCIAP: TC application with MAP, TIAP and TCIAP sensor fitted. AAP1 = TIAP. AAP2 = TCIAP. BARO is calculated.
TC-TIAP-BARO: TC application with MAP, TIAP and BARO sensor fitted. AAP1 = TIAP. AAP2 = BARO. TCIAP is calculated.

Okay, so now we have an idea of some typical configurations and where the sensors are and how they are mapped, let's look at throttle and boost control.

Throttle (ETC)

As discussed, the throttle is directly controlled by the Predicted Engine torque request. In the normal case, it starts out as the driver pedal axle torque request, converted to engine torque, then passed to the Torque Control system. At this point the requested torque is compared to the current calculated engine torque and a torque error signal is created as the difference between the two. The error signal is used by a proportional and integral (PI) controller to provide the Desired Throttle Torque.

At this point, the ECM calculates a Desired MAP value from the Desired Throttle Torque. This is used for control the throttle and also control the boost (discussed later). Now, the ECM knows the TIAP and it also has a Desired MAP value. Using sonic flow equations it calculates how much to open the throttle to achieve the desired MAP, then the PI controller cleans up afterwards. You should be able to see that, the ECM only cares for the pressure drop across the throttle blade and maintaining sonic flow conditions. The amount of boost the turbocharger is making is automatically accounted for in TIAP. AT this point you should realize that the turbocharger making more boost will not directly translate in to more power, because the throttle will open less to achieve the torque demand. The desired torque is the key! For the throttle to remain 100% open and the turbo wastegate to be fully closed, the driver demand (predicted) torque request must always exceed the calculated engine torque. Let's talk about how we get there.

The journey begins at the Driver Demand tables. These tables command an engine power based on the pedal position and vehicle speed. You MUST use great caution when modifying these tables! You DO NOT want to command a high engine power at small pedal percentages and low vehicle speeds! Typically you are only want to increase the values near 100% pedal (WOT). Now when you stomp on the gas, the ECM knows you want more power and more torque from the engine. The power demand is converted into the Driver Demand Axle Torque.

Looking back to the diagram above, we see that our Driver Demand Axle Torque is input to the Desired Axle Torque calculation where it has the chance to be limited by a number of things, the most likely are the Axle Torque Limits and the Maximum and Brake Torque Limits. These limits can be changed using the parameters below.

At the next stage, there are a number of limits to engine torque the most likely limiter will be related to the turbocharger protection (discussed later). Assuming we have changed these limits the desired torque should be making it's way all the way to the throttle and boost calculations.

PIDs to log in the scanner:

ETC Pedal Average Position: The position of the pedal, 0 - 100%
ETC Desired Position: The desired throttle position, 0 - 100%
ETC Position: The measured throttle position, 0 - 100%
ETC Source: The control source of the throttle. During normal operation it should be "Torque"
Driver Pedal Power: The power request from the driver demand tables
Driver Pedal Axle TqReq: The axle torque request from the driver demand tables
Driver Final Axle TqReq: The final axle torque request from the driver demand calculation
Predicted Axle Torque Cmd: The commanded axle torque request (after limiting)
Predicted Axle Torque Src: The control source of the axle torque request. It should be "Driver"
Predicted Engine Torque Cmd: The commanded engine torque request (after limiting)
Predicted Engine Torque Src: The control source of the engine torque request. It should be "Axle"
Maximum Engine Torque: The maximum possible engine torque, this should be higher than Predicted Engine Torque Cmd otherwise it is limiting
Engine Torque: The current calculated engine torque

Turbocharger Boost

In this section we'll see how the turbocharger boost is controlled. The main control parameter for the turbocharger boost control is the Desired MAP which is calculated in the throttle control. This is the MAP that will achieve the desired torque. The thing to remember is that typically, the MAP is measured in the manifold, the boost is generated at the turbocharger and TIAP is measured at the throttle inlet after the intercooler.

The first step in the process is to work out a desired boost, in this case it's actually a desired TIAP because this is where the measurement takes place. Since the Desired MAP has already been calculated, the only parameter to adjust here is the Desired Throttle Pressure Drop. This value adds to the Desired MAP as a way of adding a boost reserve to provide a more sporty feel. Typically, it is calibrated to zero to give the best fuel economy.

From this point on, there are really only boost limits that prevent the turbocharger making maximum boost.

Boost Max Limit: Boost will not go higher than this. Set your maximum boost limit here.
Pressure Delta Limit: Boost cannot increase by more than this amount per cycle. This also provides a maximum possible boost that the engine could reach. This is converted to an engine torque limit as well.
Knock Airmass: Maximum cylinder airmass limit to prevent knock, this is converted to a torque limit which limits desired torque and hence Desired MAP and boost.
Overspeed Limit Min Airmass: Minimum cylinder airmass limit commanded during turbo overspeed protection. Again, converts to an engine torque limit.

Assuming you have nothing limiting the boost (below where you want it) the turbocharger should be generating full boost up to the level you want it to and the throttle should be opening and maintaining 100% at WOT.

PIDs to log in the scanner:

Desired Boost: The desired boost (TIAP)
Boost Sensor Pressure: The measured boost (TIAP)
MAP (SAE): The measured manifold pressure (MAP), note maximum is 255kpa for this PID
MAP Hi-Res: The measured manifold pressure (MAP)
Boost Solenoid Control: The boost control duty cycle (Wastegate DC %)
Turbo Bypass DC: The blow off valve (BOV) duty cycle
Cylinder Airmass: The calculated cylinder airmass