7.4 Startup / Idle 7 ADDITIONAL ITEMS: BEYOND BASIC FUEL AND IGNITION CONTROL
2. RPM settles - After throttle lift, eventually the clutch is pushed in and RPM drops to wherever it will settle
given the learned value + the dashpot adder. Hopefully, the idle has settled to an RPM that is less than the
commanded target + the Idle Activation RPM adder. If so, then the code will wait for the amount of time
specified by the PID delay, and then enter PID control. If RPM settles above the commanded target + Idle
Activation RPM adder, the code then starts checking the PID lockout detection conditions. Assuming those
conditions are met, the code will still enter the PID loop after the amount of time specified by the PID delay.
3. PID control activates, RPM starts dropping to target - After the PID delay expires, the PID code will be
activated. RPM will slowly drop to the target over the number of seconds specified by the PID ramp to target
time.
4. Normal idle speed reached - RPM reaches the commanded target. PID continues regulating RPM until the
throttle is pressed.
Once the code is reliably entering PID on every throttle lift, it is time to actually tune the PID code to reach and
hold the RPM target. The settings that are associated with or affect the operation of the PID algorithm are listed
below:
• Idle Open Duty/steps and Idle Valve closed duty/steps - These should be set to the minimum and maximum
values that should be used during PID loop and driving operation. In addition, having these set further apart
results in the PID loop being more sensitive (making changes to the output given much smaller changes in
input).
• Min duty/steps for PID - This is the lowest duty/number of steps that the PID loop is allowed to command.
Set this low enough to result in an RPM slightly lower than the lowest target RPM.
• RPM with valve open/closed - These should be set to the RPM with the valve closed and the RPM with the
valve opened respectively. If using these settings makes the code unresponsive to changes in idle speed,
the upper RPM value can be set lower.
• PID Control Interval - This controls how often the PID code runs. Setting this too high can result in sluggish
response to sudden changes in load, such as the Air Conditioning being turned on. Setting it too low can
result in the loop being overly sensitive to RPM changes. Typically 100ms works well.
• PID controller gains - These control the actual response of the code to changes in RPM, as well as how well
the code will reach the target. Tips for tuning these are listed below.
In Basic mode, simply adjust the slider, starting with a low value and increasing it until the engine can react fast
enough to any load placed on it to avoid stalling or an unacceptable RPM dip.
The following basic steps should be used for tuning the PID controller gains in advanced mode:
1. Zero all the gains - Set all the gains to 0%. This is so that the effects of tuning the I-term in the next step are
not confused with the effects of any other setting.
2. Tune the Integral (I) gain - The Integral gain is the only term that controls whether the code actually reaches
its target. Higher values for Integral gain will result in the code being able to get closer to the commanded
target; however, a value that is too high will result in oscillation. The easiest way to determine a good value
for the I term is to keep increasing it until oscillation occurs, then slightly lower it. If this value is increased
to 200% without reaching a point where oscillation occurs, then the RPM with valve opened setting can be
decreased as far as necessary, and the open duty/steps setting and closed duty/steps setting can be made
further apart to make the PID loop more sensitive.
3. Tune the Proportional (P) gain - After tuning the I gain so that the RPM reaches the commanded target
without oscillation, the P gain can be tuned. The best way to tune this is to set it as high as possible without
getting any oscillation. After setting this, try turning on the air conditioning or other accessories that normally
lower RPM or increase load. When these accessories are turned on, the RPM should dip a bit, then recover
(the valve position should increase significantly). Using longer PID ramp to target times can also make it so
that when the PID algorithm engages, a higher P gain can be set without causing oscillation.
4. Tune the Derivative (D) gain - For most users, use of the D gain should not be necessary. It substantially
dampens the response of the loop.
AMP EFI MS3Pro manual version 1.202, firmware 1.5.0, 4/21/2017 Page 187