The present invention is constructed such that there is provided a variable valve
opening mechanism which varies an opening of an engine valve continuously, the
opening of the engine valve is feedback controlled to a target opening and at the
same time, at least the opening of the engine valve relative to controlled variable
of a first reference opening is detected to be learned at an initial time, and
after the initial learning, the opening of the engine valve relative to controlled
variable of a second reference opening different from the first reference opening
is detected to be learned, and based on the initial learning result and a newest
learning result of the second reference opening, an opening detection characteristic
of an opening sensor is learned.