An internal combustion engine (1) causes an air/fuel mixture in a cylinder
to combust due to ignition by a spark plug (14). The engine controller
(50) calculates a temperature and pressure in the cylinder on the basis
of the operating state of the engine (1) (531), calculates a limit
ignition timing at which knock is not generated, on the basis of the
temperature and pressure in the cylinder (54), and controls an ignition
timing of the spark plug (14) to the limit ignition timing at which knock
is not generated (55). Therefore, suitable control of the ignition timing
is achieved, by means of a small number of adaptation steps.