A variable compression ratio mechanism that changes the compression ratio
according to the rotation angle of a control shaft, wherein a stopper is
provided at the highest compression ratio side for regulating the
rotation of the control shaft. Then, the output detected by a compression
ratio sensor for detecting the rotation angle of the control shaft when
the stopper is in an abutted state is read. An adjustment value is
learned in order to revise the sensor output based on the detected
output.