In an internal combustion engine provided with a variable valve mechanism that
variably controls at least an operating characteristic (valve lift amount and the
like) of an intake valve, a valve opening area AWm at a valve overlap time is calculated
based on a valve lift amount (VCS-ANGL) and opening timing IVO of the intake valve,
and a spit-back gas amount Wm at the valve overlap time is calculated based on
the valve opening area AWm. On the other hand, a volume flow ratio (basic actual
engine volume flow ratio) RQH0VEL1 in the intake valve, equivalent
to an actual intake air amount of the engine, is calculated based on the valve
lift amount and closing timing of the intake valve, and a basic residual gas amount
Wcyl is calculated based on the basic actual engine volume flow ratio RQH0VEL1.
Then, a resultant obtained by adding the spit-back gas amount Wm and the basic
residual gas amount Wcyl, is set as a total residual gas amount of the engine.
Further, in the case where an intake air amount control is performed by the variable
valve mechanism, a target valve operating characteristic is set based on a target
intake air amount which is set according to an operating condition of the engine,
and the variable valve mechanism is controlled so that the valve operating characteristic
of the intake valve reaches the target valve operating characteristic. At the moment,
by executing a residual gas based correction to set the target valve operating
characteristic, a high accurate intake air amount control is realized.