/**
* If we have exceeded the ability of the controlled device to hit target, the I factor will keep accumulating and approach infinity.
* Here we limit the I-term #353
*/
if (iTerm > maxResult - (pTerm + dTerm + pid->offset))
iTerm = maxResult - (pTerm + dTerm + pid->offset);
if (iTerm < minResult - (pTerm + dTerm + pid->offset))
iTerm = minResult - (pTerm + dTerm + pid->offset);
spoiler: stupid question incoming!
why don't you add a 12V voltage regulator on the injector high-side?
(edit @ - I assume the idea is to eliminate the variable injector lag? Editing since do not want clatter the "Alternator control - PID implementation" topic)
Horsty wrote:spoiler: stupid question incoming!
why don't you add a 12V voltage regulator on the injector high-side?
I prefer the volyage on my injectors to be as high as possible. Higher voltage means shorter dead-time. And that means I have a little more fuel delivery capacity.
I don't see much of a reason to do so. We can characterize the injector behavior at higher voltage easy enough, so there didn't seem to be a reason to control voltage and add more electronic hardware.
Also cranking voltage can drop to 4V. Either you make a complicated buck / boost fast reacting injector regulator, or you compensate for it in software. The software works well, so I do not see a need for a 12V (or higher voltage) injector regulator.