The input variables we have to work with are:
- Delta TPS in % per time unit
- Delta MAP in kPa per time unit
- Delta RPM in RPM per time unit
Additionally, each could be handled as a percentage change rather than absolute, this could be configurable or drive a whole separate enrichment instance.
Then comes the amount of fuel correction to add given a certain delta in a certain input. Each should have its own configuration totally independent of the others. Each will be calculated separately and added to the final value such that changing one does not affect another (as it would if they were multiplied together).
Whatever enrichment (or enleanment) is determined will need to last longer than the calculation frame of reference. Therefore it will need to be initially calculated and then have some form of decay applied.
We will need to handle the case where a transient occurs and then another transient occurs before the last has faded completely away. Will one nullify the previous or wil they add together, and if so, how frequently can they be calculated fresh while maintaining a valid history. If one nullifies the last, then under what conditions should that occur, IE, if the new delta is smaller than the last, just ignore it as it's just the trailing edge of the same signal for which we already calculated what to do? If so, this threshold either needs a timeout or a decay too.
How fine do we need the control over decay to be? Should it be a tabular curve? Should it be a calculated curve? If so, which shape? Should it be based on time? Or on output event count? Or configurable to either? Or multiple instances and both?
We're going to need something that scales for load, something that scales for RPM and something that scales for the delta itself. Some of these might be taken care of naturally in the calculation's non-linearity, others may need a curve or set of curves.
Next post, possible starting point.
Fred.