An electronic control unit corrects ignition timing according to changes in an
internal EGR amount accompanying actuation of a variable valve actuation mechanism
used in an internal combustion engine. The electronic control unit computes a base
correction amount AVVTb based on an engine speed NE and an engine load ratio KL.
The control unit multiplies the base correction amount AVVTb by the ratio of a
square number of an actual valve overlap amount realOL to a square number of a
target valve overlap amount tOL, thereby computing a VVT correction amount AVVT
of ignition timing. As result, the engine is easily and properly controlled based
on the relationship between the state of the variable valve actuation mechanism
and changes in the internal EGR amount.