A method for compensating for variable cam timing of an internal combustion engine
is provided. The method includes: a) providing a periodical crank pulse signal;
b) providing a periodical cam pulse signal; c) determining a segment, wherein the
internal combustion engine speed induces a volatile change upon Zphase values;
d) dividing the segment into sub-segments; and e) calculating Zphase values of
a plurality of points within the sub-segments.