Idle Tuning
One of the most challenging aspects of achieving optimal engine performance is idle tuning. Unlike fueling, which can be quantified with instrumentation like an AFR gauge, idle tuning involves tweaking a range of options to achieve a specific RPM. However, the choices made in the tuning process have a significant impact on the stability and robustness of the engine's idle.
Idle can be compared to a see-saw with three main factors affecting it: fuel, ignition, and air. These elements determine the amount of torque produced by the engine, which in turn affects idle stability. To maintain a steady idle, the torque output must also remain relatively constant. Essentially, idle represents a state of balance, where the motor's load (caused by internal friction, accessories like the alternator, AC, torque converter/trans pump, or supercharger) is counterbalanced by the amount of torque generated by the engine. When load and torque are equal, there is no net acceleration, and the RPM remains constant. In essence, this is the overall concept to grasp.
Prerequisites to a Stable Idle
The foundation for a stable idle is reliant on a motor that already runs well. Before tuning the idle, there are several features which must be tuned relatively well first.
Battery Voltage
Battery voltage tends to be lowest at idle because the alternator is spinning at a slower speed. As a result, voltage can fluctuate frequently, especially when electrical loads such as blower motors and headlights are turned on or off. It is essential to fine-tune the battery and alternator control settings to prevent sudden AFR swings due to voltage changes. This can be challenging to tune, but intentionally creating electrical loads by turning on the headlights, AC or blower fans is a good way of changing the alternator load so it can be tuned to output a near constant voltage under all conditions.
Idle Detection Thresholds
Within the idle settings, the first set of parameters to configure are the idle detection thresholds. These are a set of conditions which must be met for the ECU to establish that the car is idling. The first is the TPS Threshold (%) and is the maximum throttle position for idle to be enabled. After calibrating your TPS through Tools > Calibrate TPS, 1-2% is a good range to set this to. The RPM upper limit is the maximum RPM above the idle target that will still be considered idle. Typically 300-500 RPM is a good range so that the car won't move out of idle if the AC or another load requiring an RPM increase is enabled. RPM deadzone is the range around target in which the closed loop controllers will be disabled to prevent oscillations. 50-100 RPM is a good range here but this is discussed later. The Max vehicle speed dictates the maximum vehicle speed which can be considered idling. Setting this to 20-40 Kph prevents a scenario where the car is slowing down, still in gear, and the car goes into idle which tries to drag the RPM down and can lead to an idle droop when the clutch is pressed in.
Idle AFR
The quality of the fuel and ignition tuning around and inside the idle region can significantly impact idle stability. It is crucial to tune the fueling in and around the idle region to maintain a consistent AFR, as any changes in AFR due to load or RPM can also affect the torque output. It is recommended to enable the Idle VE Table so that the fuelling in the idle region can be more finely tuned. Like tuning the battery voltage, you want to intentionally create more loads on the engine to tune the ide VE values for different loading conditions. You can get this relatively dialled in however, it is likely that this table will need tweaking during the idle tuning process to maintain stable AFRs in idle. It is also important to merge the edges of the idle VE table with your normal VE table so that the fuelling transitions coming off idle are constant.
Idle Air Control Valve Offsets
Load can vary during idle and AC is the most significant factor that can significantly impact the engine load at idle. For engines equipped with an automatic transmission, the load in park/neutral is significantly different from that in drive. It is usually necessary to add IAC duty cycle/air to compensate for the torque required to spin the AC compressor. Again, it is crucial to ensure that AFRs don't swing excessively when moving between different idle operational areas. In the idle settings, start with about 10-15% for the AC adder (%) parameter. As the AC increases the alternator load, the engine torque also needs to increase when the AC is enabled so it is recommended to do this by increasing the engine RPM by 100-200 with the AC target adder (RPM). The cooling fans also have associated adders (Fan #x adder(%)) although these don't usually need to be increased unless you notice a significant drop in RPM when the fans come on.
Open Loop Idle
Tuning the open loop idle is the first step in achieving a stable idle. In some cases, an open loop idle may be good enough for your purposes although it is highly recommended to set up a closed loop idle after perfecting the open loop. To start with, you must decide on what RPM the engine should idle at. To determine this, you must consider various factors such as flywheel and rotating inertia, driven accessories via belt or gear, noise level, personal preference, among others. It may involve an iterative process of selecting a target RPM, attempting to achieve it, and revising expectations. Generally, higher RPM idling is more manageable because the engine produces more torque. Although it is not used in the open loop idle configuration, open the Target RPM table in the idle settings and put in the target RPM you decided on. In the table, it is recommended to taper the idle RPM from about 200 RPM higher than target when the coolant temp is at about 20C to the actual RPM target at 60C approximately. This is to compensate for the extra drag on the engine as it heats up and the tolerances become looser.
Idle Airflow
The first step of tuning the idle RPM is to set up the open loop idle airflow. Suppose you aim to set the engine to idle at 800 RPM (minimum), the airflow must be tuned to make the engine idle 50-150RPM higher than the 800 RPM target. This can be done by adjusting the Open loop base position (%) parameter, the idle adjustment screw, or the throttle end stop. It is recommended to tune these adjustments so the Open loop base position (%) parameter (which is the base duty cycle of the IACV) is at about 30% when the engine is idling 50-150RPM above target. This gives some room for the closed loop controller to adjust the duty cycle. It's essential to ensure that AFRs remain stable as you adjust the airflow. Before enabling idle control, a stable foundation is necessary. In this example, we will say that the engine idles at 950 RPM (150 RPM above target) with 10 degrees of timing, 1.0 lambda and 30% IACV duty cycle.
Idle Ignition Table
The idle ignition table acts much like the open loop base position in the regard that it is another open loop system contributing to the idle of the vehicle. Adjusting the engine ignition timing at idle changes the engine torque output where an increase in timing produces more torque and a reduction reduces the torque. This change in torque can be used to adjust the engine speed and achieve a stable idle by reducing the timing above the idle RPM target and increasing it below the target.
To tune the ignition table, start by setting the maximum and minimum values about 500RPM above and below your target idle speed and interpolate the values between these. At your target idle speed in the table, put in your desired timing angle. 10 degrees is a good starting point but a higher timing angle such as 15 degrees will give the engine a bit more torque at idle which helps the engine to quickly rev up from idle. The idle timing angle will vary from engine to engine so it is always worth researching what others have used on your specific engine.
The next step is to fill in the remaining cells of the idle timing table. At the minimum RPM, a value of 20 degrees is recommended as this is roughly where maximum brake torque (MBT) is. To fill in the gaps between the minimum and target RPM, use the interpolation button. For the maximum engine RPM value, a value in the range of 0-10 degrees less than the target is recommended (do not go below 0 degrees of timing). Once again, interpolate the values between the maximum RPM and target. For the RPM values above idle target, if you have AC, it can actually be beneficial to leave the spark angles as the same as the idle target. This allows the engine to idle up and increase the torque to compensate when the AC is enabled. If the timing reduces above target, the idle air valve (when tuned for closed loop) may need to compensate more for the extra load on the engine.
Run the car with your values and see how well it maintains idle. Give it a few throttle blips to see how the idle settles. Start to adjust the timing values so that the timing pushes and pulls the engine RPM to the target and stabilizes within 50 RPM. You may need to change the shape of the idle timing curve so that only small timing adjustments are made near target and large corrections are made if the RPM significantly deviates. The trick is to essentially make a table of accurate guesses for what the timing will need to be in order to kick the engine RPM back to the target. The better your guesses are, the less work the closed loop timing controller will need to do when you implement it.
Closed Loop Idle
Closed loop idle control uses a combination of closed loop timing adjustments and idle air control valve adjustments to achieve a stable idle. Achieving a stable idle can be difficult as it requires tuning two separate controllers which operate in parallel to control the engine RPM. The best way to achieve a good idle is to use the closed loop idle timing for the larger and quicker corrections with the idle air controller acting to compensate for slower changes.
Before tuning the closed loop idle, you need to have properly tuned the idle VE, idle ignition table and open loop idle control. To tune the closed loop controllers, you also need some understanding of a closed loop controller called a PID controller. This video by RC Model Reviews perfectly explains PID controllers in basic terms.
Closed Loop Timing
It is now time to turn on closed loop idle timing. It's important to note that closed loop idle should not make significant changes all the time for a stable idle. However, closed loop idle timing adjustment is crucial for long-term stability, and it's necessary to keep the engine idling when changes occur such as AC, headlights, fans, etc. Closed loop idle timing relies heavily on the proportional gain with little to no derivative gain to act as a damper. A good place to start is with a proportional gain of 0.1 and a derivative gain of 0.05. For every engine, these values will need to be varied until the idle remains stable within 50 RPM of the target. To ensure the closed loop idle doesn't cause issues such as knocking, it's recommended to set boundaries on timing with an overall minimum and maximum adjustment from the open loop table values. A good starting point is a -5 degree minimum and +5 degree maximum but these can be increased up to 10 degrees if you need more aggressive control.
Closed Loop Idle Air
Closed loop idle air control is a powerful tool, but one that requires extreme caution as it can dramatically impact the engine RPM. Even small changes in airflow can have a significant impact, and this is compounded because the speed which an electronic throttle body or idle valves operate is much slower than spark control. To effectively use closed loop air control, a deadband of about 50-100RPM must be established around the target to allow for minor corrections to work.
In the Closed Loop Idle box in the idle settings, the controller should be set up with a very small proportional gain and a sufficiently larger integral gain. This ensures that the idle air controller reacts slowly and only to relatively large disturbances which the closed loop timing cannot compensate for itself. You may need a very small derivative gain however the controller should react slowly enough that it might not be necessary.
One of the things to be wary of here is that an integral dominated controller can suffer from a phenomenon known as windup where the integral gain becomes very large if the RPM stays high or low for a long period of time. This causes the RPM to massively overshoots the target. To mitigate this, you can clamp the amount which the integral term can increase or decrease the IACV duty cycle by. A safe recommendation is to set the iTerm Min & iTerm Max to -/+10 respectively but anywhere up to -/+20 should be reasonably safe.
To assist in the overall effectiveness of the controller, the minimum and maximum duty cycle variation of the entire idle air controller can be clamped. This effectively limits how fast and with how much force the idle controller is allowed to increase or decrease the RPM. A safe range for the Min and Max is -10 and 20 respectively however these values can be changes around if the controller is responding more or less than you desire. For example, sometimes it is worth putting the maximum to a value such as 50 so that the controller has the authority to bring up the RPM if it gets sufficiently low.
Another setting of interest that should be used sparingly is the PID Extra for low RPM(%). This effectively gives the controller a kick if the RPM gets too low and needs to take dramatic action. This parameter can be used to compensate for the recommended small proportional gain which is usually responsible for kicking the RPM up if it deviates too far from target. Realistically a well tuned idle controller shouldn't need this but the world isn't perfect so this serves as a band-aid for scenarios where the controller is struggling to increase RPM and is at risk of stalling. Normally, set this to 0% but if you absolutely can't fix an idle drooping problem, experiment with values up to 100% gradually increasing the percentage until the idle is kicked up to around target. Be sparing with this as a high percentage can kick the RPM way above target causing an unstable idle.