Spark timing is one of the major parameters influencing engine performance and emissions. In most of today's automotive spark ignition (SI) engines an electronic control unit controls spark timing based on preset values that are functions of load and speed. In this system, the preset spark timing can be different from the optimum value owing to deviations from mass production, ageing effects and a number of other factors.In the present study, a control logic is investigated for the real-time adaptation of spark timing to the optimal value. The simulation program, including an engineering model for cycle-by-cycle combustion variation, is developed for investigating the spark timing control logic. It has been found that the location of the peak pressure in the cylinder is one of the appropriate parameters used to estimate the optimum spark timing. It is also shown that experimental results reflect the simulation outputs and reasonableness of the spark timing control logic for location of the peak pressure.