## Accurate phase measurement with relativly low sampling frequency

Hello.

To give some more information on what I am to use this for: I have two signals. Both are periodic sine waves with the same frequency, but with a constant phase difference. Let's call one of the signals for ref (reference) and the other sig (signal). They can look like this:

ref(t) = sin(2*pi*f*t)

sig(t) = sin(2*pi*f*t + θ)

where f = 300 000 Hz.

I sample the two signals simultaneously, multiply them and low pass filter in the micro controller. This way I get the in-phase component. To get the out-of-phase component I shift ref with θ = 90°, multiply ref with sig and low pass filter to remove the high frequency component.

I understand how this works when having a sampling rate that is for example 360 times the signal frequency (in this case 360*300 000 = 108MSPS), which would give close to 1° accuracy over one period.

I am trying to understand how I can do accurate phase measurement of a signal with a sampling frequency that is for example only 5 times the signal frequency. I have been doing some reading and have found that this is to be possible by sampling more than one period of the periodic sine wave signal and do some averaging, but I am struggling finding a good explaination/examples on this.

So far I have figured out that to do this over several periods I have to satisfy the equation:

fs/fsig = N/M

where fs = sampling frequency, fsig = signal frequency, N = total number of samples, M = periods.

For my example fs could be 2.5MHz, N = 25 and M = 3. This will give a phase difference between each sample of:

Φ = 2*pi * (fsig/fs) = 2*pi * (M/N) = 43.2°

So for 3 periods we have 25 samples with a constant phase difference of 43.2°.

From this point I need some help what to do next. I want to know if someone can point me to a link, book, ebook or anything that explains this technique, tell me if this technique has a name (that would help my googling a lot) or can take some time explaining this in a short or long text.

Thanks!
 PhysOrg.com engineering news on PhysOrg.com >> Mathematical algorithms cut train delays>> Researchers design software to detect changes in colour vision>> Trend study identifies potential for humans and technology to interact in a manufacturing environment

Mentor
 Quote by Phat Hello. To give some more information on what I am to use this for: I have two signals. Both are periodic sine waves with the same frequency, but with a constant phase difference. Let's call one of the signals for ref (reference) and the other sig (signal). They can look like this: ref(t) = sin(2*pi*f*t) sig(t) = sin(2*pi*f*t + θ) where f = 300 000 Hz. I sample the two signals simultaneously, multiply them and low pass filter in the micro controller. This way I get the in-phase component. To get the out-of-phase component I shift ref with θ = 90°, multiply ref with sig and low pass filter to remove the high frequency component. I understand how this works when having a sampling rate that is for example 360 times the signal frequency (in this case 360*300 000 = 108MSPS), which would give close to 1° accuracy over one period. I am trying to understand how I can do accurate phase measurement of a signal with a sampling frequency that is for example only 5 times the signal frequency. I have been doing some reading and have found that this is to be possible by sampling more than one period of the periodic sine wave signal and do some averaging, but I am struggling finding a good explaination/examples on this. So far I have figured out that to do this over several periods I have to satisfy the equation: fs/fsig = N/M where fs = sampling frequency, fsig = signal frequency, N = total number of samples, M = periods. For my example fs could be 2.5MHz, N = 25 and M = 3. This will give a phase difference between each sample of: Φ = 2*pi * (fsig/fs) = 2*pi * (M/N) = 43.2° So for 3 periods we have 25 samples with a constant phase difference of 43.2°. From this point I need some help what to do next. I want to know if someone can point me to a link, book, ebook or anything that explains this technique, tell me if this technique has a name (that would help my googling a lot) or can take some time explaining this in a short or long text. Thanks!
This may not address your question, but there is a lot easier way to get the phase shift for your signals. Have you considered using 2 zero-crossing detectors (with crossing direction information) to accomplish this task?
 Recognitions: Gold Member Science Advisor In my day computers were not fast enough to do what you propose at your frequency. They might be now, i don't know. In 1975 i did exactly what you describe but with analog, as Berkeman suggested. My frequency was more modest - 1800 hz. Here's a rundown from memory of what i did, should you decide to go analog. We squared up the sinewaves with comparators - National LM710 was a fast comparator back then, 40 nsec. Newer & faster LM360 looks more suitable for your speed. We then applied the two square waves to an AND gate, plain old 7400 TTL. That effectively multiplies them. Output of AND gate we lowpassed with a sharp four pole filter to provide DC proportional to phase. 5V = inphase, 0V = 180° out. Inverting one of the squarewaves would reverse the signal direction, ie give 0V = in phase, 5V = 180° out. We may have done that, i just dont recall. Now, that leaves you not knowing which side of zero degrees phase difference you are on; are you in the 0 to +180° or the 0 to -180° half cycle? So we applied both square waves also to a D flip-flop, one as clock and one as data. Output of Flip-Flop tells you which sinewave is leading, ie what is sign of your phase difference.. Comparators are fast high gain devices prone to oscillate so board layout is real important. I learned that the hard way. At the speeds you intend to measure, i'd use newer parts for they're superior to what i had way back then. 1° at 300khz = only about 9 nanoseconds? A google led me to linear's AN 13, which is 'words to the wise designer' for using fast comparators, http://cds.linear.com/docs/en/applic...note/an13f.pdf and to their LT1116 datasheet. It looks nice, being single supply. http://cds.linear.com/docs/en/datasheet/1116fb.pdf I'm obsolete as to slecting the best parts, but there's an analog approach. Doubtless there's a DSP chip to do what you want.....

Recognitions:
Gold Member

## Accurate phase measurement with relativly low sampling frequency

PS: A search on terms 'radar dsp phase' returned some links that looked promising to me.

http://jocoleman.info/pubs/papers/SkolnikCh25.pdf