Good description.
So does the frequency of knock timing adjustments have an affect on the long term maps? Similar to long term fuel trims? Does the pcm have a long term adaptive strategy with regard to ignition timing?
Generally, ignition timing retards rapidly (in a fraction of a second) when detonation is detected and advances slowly (over a second or more) when detonation is no longer detected. I am not aware of an ignition timing equivalent of short and long term fuel trims, although such may very well exist. Keep in mind that even if such exists, "short" and "long" to the computer may be very different than our perception of those terms. For example, a short term trim value can change several times per second. A long term trim value can changes over several
seconds (NOT minutes or hours) depending on what the short term value is doing.
Remember, the computer is capable of polling sensor readings anywhere from dozens to thousands of times per second, depending on the priority of that particular sensor. For example, a coolant temperature sensor may only be polled a few times a second because 1) the coolant can't physically heat up or cool down any quicker than that and 2) there is a limit to processing power and bus width. There's no sense in flooding a data bus with thousands of coolant temperature readings each second when one every few seconds is more than sufficient.
Anyway, back on track. An engine adjusts to things like fuel quality and air density in what is essentially "real time". There's no such thing as replacing a tank of 89 octane fuel with 93 octane fuel and the engine taking several
miles of driving to adjust. It will adjust the moment the higher octane fuel moves from the tank to the injectors. In a returnless fuel system like almost all vehicles have now, it may take a few minutes for the new fuel to move through the lines. In vehicles with a return-type fuel delivery system where the fuel is constantly moving from the tank to the fuel rail with the excess fuel returned to the tank, the adjustment will take places in only a few seconds.
Learned values for some parameters such as transmission performance and idle speed compensation are learned quickly and refined over time. Example: The computer commands the engine to idle at 650 RPM. It will trim the throttle as necessary to maintain this desired idle speed. If the A/C compressor kicks on, the RPM will suddenly nosedive and the computer will have to compensate. If it overcompensates, the engine will slightly overrev the desired speed. To minimize this, the computer learns over time what effects a particular load will have on engine speed under various conditions. The compensation becomes proactive instead of reactive. When your A/C compressor kicks on, the computer slightly revs the engine a small fraction of a second
before the compressor clutch engages so that when it does engage the idle speed will land very close to the desired speed.