Combustion control is assuming a crucial role in reducing engine tailpipe emissions and maximizing performance. The number of actuations influencing the combustion is increasing, and, as a consequence, the control parameters calibrations is becoming challenging.One of the most effective factors influencing performance and efficiency is the combustion phasing: gasoline engines Electronic Control Units (ECU) manage the Spark Advance (SA) in order to set the optimal combustion phase. SA optimal values are usually determined by means of calibration procedures carried out on the test bench by changing SA values while monitoring Brake and Indicated Mean Effective Pressure (BMEP, IMEP), Brake Specific Fuel Consumption (BSFC) and pollutant emissions. The effect of SA on combustion is stochastic, due to the cycle-to-cycle variation: the analysis of mean values requires many engine cycles to be significant of the performance obtained with the given control setting. Usually, the optimization process is carried out off-line, based on the data sampled on the test-bench.This paper presents the application of a new calibration concept, with the objective of improving the robustness of performance analysis, while reducing the test time. The approach is applied to a simple calibration problem, where a single input factor (SA) is tuned taking into account two issues: IMEP maximization and knock limitation. The paper shows how the methodology can be extended to multiple objective and multi-input optimization problems.The methodology is based on the observation that, due to cycle-to-cycle variation, the combustion phasing, represented by the 50% Mass Fraction Burned (MFB50) parameter, changes continuously, even with a fixed SA. The IMEP changes accordingly, forming a typical parabola distribution in the plane IMEP-MFB50. The optimization could then be carried out by choosing SA values maintaining the scatter around the vertex. Unfortunately the distribution shape is slightly influenced by heat losses (i.e., by SA): this effect must be taken into account in order to avoid over-advanced calibrations.The synthesis of this core-concept allows giving a contribution to a cost function, used to drive SA variations; another contribution comes from the knock intensity level. The final objective is to minimize the cost function absolute value, leading to the maximum IMEP achievable with tolerable knock intensity. The optimization process is carried out with an original approach: the cost function is by all means the error input of a PID (Proportional Integer Derivative) controller that, by definition, is intended to reduce the error, i.e., the cost function, thus performing the optimization.The methodology has been developed and tested off-line using data referring to three different PFI gasoline engines, then it has been implemented in Real-Time. The combustion control system used for the implementation performs a cycle-to-cycle combustion analysis, evaluating the combustion parameters necessary to calculate the target SA; the target SA is then actuated by the ECU. The approach proved to be efficient, reducing the number of engine cycles necessary for the calibration to less than 1000 per operating condition.