Patent ID: 7233869

Claim:
A phase comparing method for comparing first and second periodic signals, comprising the steps of: a) sampling the second periodic signal to generate a sample signal having a predetermined signal resolution M, including the sub-steps of: a-1) determining whether a frequency of the second periodic signal is greater than an allowable sampling signal frequency f ab , which is obtained by dividing a sampling frequency f s by the predetermined signal resolution M, M being an integer; a-2) upon determining that the frequency of the second periodic signal is not greater than the allowable sampling signal frequency f ab , sampling the second periodic signal at the sampling frequency f s for at least one signal cycle of the second periodic signal and at the predetermined signal resolution M so as to obtain a sample signal corresponding to the second periodic signal; and a-3) upon determining that the frequency of the second periodic signal is greater than and is N times the allowable sampling signal frequency f ab , N being an integer not smaller than 1 ,obtaining a sample signal corresponding to the second periodic signal and having the predetermined signal resolution M by conducting at least one of sampling the second periodic signal at the sampling frequency f s for more than one signal cycle of the second periodic signal, and generating interpolated values for the sample signal after sampling the second periodic signal at the sampling frequency f s in accordance with whether or not M/N yields a remainder and whether or not N is a prime number; and b) calculating a phase difference between the first periodic signal and the sample signal obtained in step a); and c) using the calculated phase difference to control a device.