Working with the E78 ECM
The E78 and E39 ECM use a new torque based control structure that is similar to systems used by Ford and Dodge. This is a significant change in the way the ECM processes inputs, performs internal calculations and also 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.
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 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, 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.
At this point I will introduce another important concept relating to the torque based control: Predicted and 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 (or Slow) and Immediate (or Fast). Predicted (slow) is basically anything relating to airflow control such as Throttle, Boost or Camshaft. Immediate (fast) is spark and fuel control.
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.
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.
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 inteded 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.
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 componenets. eg. for NA applications, the TIAP can be calculated from BARO by modelling the air filter losses.
Pressure Sensor Config:
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 proprtional 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 calulated 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:
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 becuase 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.
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: