Quick summary:
We currently have two idle modes- manual and automatic. Manual is "pick a value and leave it". Automatic employs an adjustable PID strategy.
For most modern-ish street-driven cars, automatic will be needed. The implementation has improved considerably over the last few months. But there are still some quirks that need help.
Mission statement: Idle, even on a small engine with multiple different variable load factors, should be OEM quality or better.
And we're much better now than we were a few months back, but we're not quite there yet.
My biggest problem currently is the I-wind-down that happens every time we enter idle from a higher rpm. This happens, because we're entering idle-PID when the engine state is nowhere near stable. So the rpm is much higher than it ought to be and the PID is trying to fight this initial condition, which it really can't.
My proposal is that we only enter PID, when the dRPM/dt value is fairly small, but negative. .
This will require another parameter, maybe two for min/max dRPM/dt. Until this condition is satisfied, the IAC should be at offset. Offset should be chosen, so rpm is slightly above idle target under all operating conditions. In a perfect world, this would also entail a table for offset/CLT, since we have the same thing for target RPM/CLT.
With this we achieve that we only enter PID control when engine operation has stabilized to some degree. It would *appear* that my stock ECU follows a similar strategy. RPMs drop after letting go of throttle, or pushing clutch. They briefly stabilize at a level above target-rpm. Then RPMs slowly drift towards target.
In addition, it would be nice to only enter PID idle when the engine is separated from the drivetrain (at least for a manual transmission car). For this we usually have a clutch/neutral switch.
So conditions for entering idle PID:
- TPS below threshold value
- Engine separated from drivetrain
- dRPM/dt smaller than threshold value. Actually it should be greater, since RPM is dropping, so we have a negative dRPM/dt ( 0 (or max threshold) > dRPM/dt > min threshold)
Suggested Idle Improvements
Suggested Idle Improvements
- Attachments
-
- 2020-07-06_21.01.02.zip
- Log showing reaction to throttle blips
- (45.49 KiB) Downloaded 287 times
Re: Suggested Idle Improvements
Don't you think that the I related step down is due to the rpm limit of idle control bugged?
If you start idle control with all parameters in initial state at a rpm just above the idle limit, it should behave much better.
If you start idle control with all parameters in initial state at a rpm just above the idle limit, it should behave much better.
- AndreyB
- Site Admin
- Posts: 14381
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: Suggested Idle Improvements
@andreika reminds about "alternator_antiwindupFreq/alternator_derivativeFilterLoss"
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
- AndreyB
- Site Admin
- Posts: 14381
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: Suggested Idle Improvements
https://github.com/rusefi/rusefi/blob/master/firmware/util/math/pid.cpp
Just added same for idle PID
Just added same for idle PID
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Re: Suggested Idle Improvements
Re-stating the I-wind-down issue:
Pre conditions:
- Automatic idle mode is selected. P, I and D are tuned so that idle can handle all possible external loads with reasonable recovery time, but without oscillation
What happens
Car is in neutral, I am holding the throttle pedal, rpm is 2000rpm. Auto-idle is disengaged
-> Let go of the throttle pedal
-> TPS reads "0" and the ECU enters Automatic Idle Mode and tries to control idle
-> Since current_rpm >> target_rpm P-term goes into far negative territory, which is OK. But I-term also goes into negative saturation, because the error is very large
-> rpm drops precipitously since the IAC is at minimum value and throttle is closed
-> rpm drops far below target rpm and sometimes stalls because I-term is still far negative because when near target, it recovers slowly
The log attached to the first post shows what happens. Look at rpm, idle_air_valve, I-term and TPS. Minimum for I-term is -6, offset is 45 I believe and absolute mnimum is 38. Without the minimums for I-term or absolute value, the engine will stall every time.
Failed approaches:
- Tune P-I-D differently. I probably spent 10 hours total idling my car playing with response time, P, I, D, I can't say for certain that the problem is impossible to solve with JUST the right combination of these factors, but I am unable to do it and will not try again. Enough time wasted
- Tune minimums for total value, offset value and minimum for I-term. While this approach helps, there is no combination of these values that allows the engine to reach target rpm under all possible conditions, but will not allow severe idle droop or stall under a different set of conditions
- I am quite certain, I also tried a few dozen other things as suggested by others either in the forum or on slack, alas without success
In my opinion, the best way to deal with this is to only enter auto-idle when rpms have already stabilized to some degree. Trying to control idle while rpms are falling precipitously after releasing the throttle, is always going to fail.
Pre conditions:
- Automatic idle mode is selected. P, I and D are tuned so that idle can handle all possible external loads with reasonable recovery time, but without oscillation
What happens
Car is in neutral, I am holding the throttle pedal, rpm is 2000rpm. Auto-idle is disengaged
-> Let go of the throttle pedal
-> TPS reads "0" and the ECU enters Automatic Idle Mode and tries to control idle
-> Since current_rpm >> target_rpm P-term goes into far negative territory, which is OK. But I-term also goes into negative saturation, because the error is very large
-> rpm drops precipitously since the IAC is at minimum value and throttle is closed
-> rpm drops far below target rpm and sometimes stalls because I-term is still far negative because when near target, it recovers slowly
The log attached to the first post shows what happens. Look at rpm, idle_air_valve, I-term and TPS. Minimum for I-term is -6, offset is 45 I believe and absolute mnimum is 38. Without the minimums for I-term or absolute value, the engine will stall every time.
Failed approaches:
- Tune P-I-D differently. I probably spent 10 hours total idling my car playing with response time, P, I, D, I can't say for certain that the problem is impossible to solve with JUST the right combination of these factors, but I am unable to do it and will not try again. Enough time wasted
- Tune minimums for total value, offset value and minimum for I-term. While this approach helps, there is no combination of these values that allows the engine to reach target rpm under all possible conditions, but will not allow severe idle droop or stall under a different set of conditions
- I am quite certain, I also tried a few dozen other things as suggested by others either in the forum or on slack, alas without success
In my opinion, the best way to deal with this is to only enter auto-idle when rpms have already stabilized to some degree. Trying to control idle while rpms are falling precipitously after releasing the throttle, is always going to fail.
-
- running engine in first post
- Posts: 1495
- Joined: Mon Jan 30, 2017 2:05 am
- Location: Seattle-ish
Re: Suggested Idle Improvements
Why does automatic idle not gate on RPM being near the target? IMO that would completely solve this problem. Only enable automatic when we're already closeish.
-
- contributor
- Posts: 87
- Joined: Tue Apr 26, 2016 1:15 am
Re: Suggested Idle Improvements
Same situation that i have today, spend time making it work but all conditions mentioned in this post are my same results.
Re: Suggested Idle Improvements
Yes if you can stop the PID from running or set an integral value hold or reset the values.
What is often the simplest for this is a minimum position for throttle or IAC. You let the engine warm up, and set the throttle or IAC minimum position to about 25-50 rpm below tartget.....it will probably never stall again (my model also includes a stall saver position that triggers about 10% below target). So release the throttle, idle control tries to over-drive but hits min/clamp position then a second or 2 later recovers its senses and takes over. AC and automatic trans can goof up the min position, but multiple min positions fixes that, you need those inputs anyway so might as well take full advantage, new min position will bump the throttle or IAC the moment you drop it into drive or the AC kicks on so again it never stalls or ever even appears to struggle.....without these input this will be the next problem that needs to be solved, unless like me your car doesn't have such frills as an automatic trans or AC.
...and then comes the day you realize it doesn't idle right when the weather changes and you need IAC and CLT corrections too....and baro while you're at it