Originally Posted by LarThaL
This all depends on the ECU programming. Here's the "basic 101" version of how it works:
The fuel octane content will affect the oxygen content of the exhaust gases. This translates to voltage changes from your oxygen sensors. These signals are sent back to the ECU. If your ECU program allows for it, it will advance the ignition timing resulting in more power. A more sophisticated ECU program (which one would hope is in a high performance car) will be based on increasing detonation thresholds as the octane increases. It will sense the changed output from the oxygen sensor when high octane fuel is used, interpret this as a higher detonation threshold, and allow for ignition timing advance. This creates more power.
There are other factors, but this is the bulk of it. Most of the high end european performers will make more power up to about 95-96 octane. Beyond this, there is no more timing advance regardless of the change in oxygen sensor voltage output.
Taking advantage of higher octane fuel has nothing to do with the O2 sensors or the oxygen content (the addition of oxygenates, ethanol, methanol, etc. has the effect of increasing octane rating but it don't allow timing changes to be affected by the O2 sensor circuit) of the exhaust gases. Timing is controlled by the knock control circuit!
The Knock control circuit will monitor knock and allow the DME/ECM to advance the timing of the engine to the highest allowable value until knock occurs or until the target timing in the software is reached. The stock timing targets of the S65 are quite high so any fuel below ~ 96 octane never allows the timing advance targets to be reached hence the engine makes more power up until the octane rating of the fuel allows the max timing advance target to be reached.