A method of controlling the combustion of a spark-ignition engine, wherein: - a setpoint value is determined for an ignition crank angle of said mixture, as well as setpoint values for physical parameters linked with the combustion of a mixture of gas and fuel in a combustion chamber, said setpoint values being determined so as to optimize combustion and said physical parameters being selected from among the following parameters upon valve closing: pressure in the combustion chamber ( P IVC), temperature in the combustion chamber ( T IVC), ratio ( X IVC) between a burnt gas mass and a total gas mass in the combustion chamber, air mass ( M IVC) in the cylinder and closure angle ( θ ivc) of an intake valve; - an engine control system controls actuators in such a way that the values of said physical parameters are equal to said setpoint values, characterized in that the method comprises the following stages: - using a combustion model modelling by a differential equation an evolution over time of a consumed fuel mass, - correcting the setpoint value of the ignition crank angle before said physical parameters reach their setpoint values, by calculating a correction dθ all to be applied to said setpoint value of the ignition crank angle, so that a crank angle CA y in which y per cent of the fuel is consumed during combustion is equal to a setpoint value of this angle for an optimized combustion, said correction dθ all being determined by taking account of differences dp between real values p of said physical parameters and said setpoint values p ref of said physical parameters, by means of a linearization of said combustion model to p around setpoint values p ref, then by calculating a first-order solution for the correction to be brought so that correction dθ all is proportional to said differences dp; - said engine control system controls the ignition of said mixture in the combustion chamber when the crank angle is equal to said corrected ignition crank angle setpoint value in order to keep combustion optimal. - a setpoint value is determined for an ignition crank angle of said mixture, as well as setpoint values for physical parameters linked with the combustion of a mixture of gas and fuel in a combustion chamber, said setpoint values being determined so as to optimize combustion and said physical parameters being selected from among the following parameters upon valve closing: pressure in the combustion chamber ( P IVC), temperature in the combustion chamber ( T IVC), ratio ( X IVC) between a burnt gas mass and a total gas mass in the combustion chamber, air mass ( M IVC) in the cylinder and closure angle ( θ ivc) of an intake valve; - an engine control system controls actuators in such a way that the values of said physical parameters are equal to said setpoint values, characterized in that the method comprises the following stages: - using a combustion model modelling by a differential equation an evolution over time of a consumed fuel mass, - correcting the setpoint value of the ignition crank angle before said physical parameters reach their setpoint values, by calculating a correction dθ all to be applied to said setpoint value of the ignition crank angle, so that a crank angle CA y in which y per cent of the fuel is consumed during combustion is equal to a setpoint value of this angle for an optimized combustion, said correction dθ all being determined by taking account of differences dp between real values p of said physical parameters and said setpoint values p ref of said physical parameters, by means of a linearization of said combustion model to p around setpoint values p ref, then by calculating a first-order solution for the correction to be brought so that correction dθ all is proportional to said differences dp; - said engine control system controls the ignition of said mixture in the combustion chamber when the crank angle is equal to said corrected ignition crank angle setpoint value in order to keep combustion optimal.