A required valve timing change rate Vreq is calculated so as to make a
deviation D between a target valve timing VTtg and an actual valve timing
VT small and then a required speed difference DMCRreq between a motor 26
and a camshaft 16 is calculated on a basis of the required valve timing
change rate Vreq. When the deviation D is larger than a predetermined
value, a required motor speed Rmreq is calculated by adding the required
speed difference DMCRreq to a camshaft speed RC and a motor control value
is calculated so as to control the motor speed RM to the required motor
speed Rmreq. When the deviation D is not larger than the predetermined
value, the camshaft speed RC is set as the required motor speed Rmreq and
the motor control value is calculated so as to control the motor speed RM
to the camshaft speed RC.