Accurate timing under rapidly changing RPM? Algorithm Q
Posted: Thu Mar 13, 2014 1:51 pm
Hi,
I haven't determined how exactly MSII determines when to fire spark but from a programming point of view, there are at least two ways to do it.
One is to measure RPM and rate of change of RPM and set an Output Compare timer for the necessary dwell and advance and then let it execute independent of the CPU. This is a predictive "fire and forget" method that, under steady-state conditions, will be perfectly accurate. If things are changing, such as rapid acceleration or deceleration, there will be some error.
Another approach is to set the output compare as before but at the last crank tooth encountered before spark, re-compute advance and adjust the value in the Output Compare timer. This, in theory, would provide more accurate timing, given that it was updated as late as possible.
What method does MSII use? The first is simpler, akin to how injectors are fired. Given that the input used in the first method is only one revolution "old", is timing plenty accurate? Am I over-thinking this?
Thanks!
I haven't determined how exactly MSII determines when to fire spark but from a programming point of view, there are at least two ways to do it.
One is to measure RPM and rate of change of RPM and set an Output Compare timer for the necessary dwell and advance and then let it execute independent of the CPU. This is a predictive "fire and forget" method that, under steady-state conditions, will be perfectly accurate. If things are changing, such as rapid acceleration or deceleration, there will be some error.
Another approach is to set the output compare as before but at the last crank tooth encountered before spark, re-compute advance and adjust the value in the Output Compare timer. This, in theory, would provide more accurate timing, given that it was updated as late as possible.
What method does MSII use? The first is simpler, akin to how injectors are fired. Given that the input used in the first method is only one revolution "old", is timing plenty accurate? Am I over-thinking this?
Thanks!