Accurate phase measurement with relativly low sampling frequency

Click For Summary

Discussion Overview

The discussion revolves around methods for accurately measuring the phase difference between two periodic sine wave signals sampled at relatively low frequencies. Participants explore both analog and digital techniques, as well as the implications of sampling rates on phase measurement accuracy.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant describes a method involving simultaneous sampling of two sine waves, multiplication, and low-pass filtering to extract in-phase and out-of-phase components, questioning how to achieve accurate phase measurement with a sampling frequency of only five times the signal frequency.
  • Another participant suggests using zero-crossing detectors as a simpler alternative to measure phase shifts.
  • A historical perspective is provided by a participant who details an analog approach using comparators and logic gates to measure phase difference, emphasizing the importance of component selection and board layout.
  • One participant mentions the use of a quadrature demodulator (AD8333) to compute in-phase and out-of-phase components, raising questions about the amplitude requirements of the reference and signal inputs.
  • A later reply introduces the idea that asynchronous sampling may be more beneficial than synchronous sampling for phase measurement.

Areas of Agreement / Disagreement

Participants express various methods and approaches without reaching a consensus. Multiple competing views on the best technique for phase measurement remain, with some favoring analog methods and others exploring digital solutions.

Contextual Notes

Participants note limitations related to sampling frequency, component selection, and the need for specific configurations in analog circuits. There is also uncertainty regarding the amplitude conditions for the quadrature demodulator.

Who May Find This Useful

This discussion may be useful for engineers and researchers interested in signal processing, phase measurement techniques, and the application of both analog and digital methods in high-frequency environments.

Phat
Messages
5
Reaction score
0
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 explanation/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!
 
Engineering news on Phys.org
Phat said:
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 explanation/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?
 
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 don't 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/application-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...
 
Last edited by a moderator:
Thank you for the answers and suggestions! I have considered a bunch of analog approaches and digital ones, but the one I mentioned above I want to know more about.
The comparators is ok, but the micro controller would not be fast enough detecting the lo/hi hi/lo transitions within reasonable time I think. (running at 72MHz, with max pin speed 50MHz I think) meaning I would get less than 2 degrees, probably a lot less accuracy.

I want to measure impedance/admittance and phase. If I were to choose an analog approach I would consider using the AD8333. This is a quadrature demodulator that (if I have understood this chip correctly) I can feed with my signal and reference signal and it will compute the in-phase (I) and out-of-phase (Q) component. The I and Q output will be currents so I would have to use a current-to-voltage converter and a low pass filter as I assume the output is not a constant current?

This way I have the real and imaginary part and can calculate the phase θ = arctan(I/Q).

What I don't know about this chip is if I can feed it with a reference signal that has a higher amplitude than the signal. This will also be the case since my signal will go through and unknown impedance and be attenuated. I can't seem to find any information about the amplitudes. Do they have to be equal?

Here is a link to the chip on Analog Devices webpage:
AD8333 Quadrature Demodulator
 
Phat,
Regarding your original post, synchronous sampling is not helping you. It is better to have your sampling clock asychronous to your sampled sine wave. You can then define your accuracy using your low pass filter. For example, if you are willing to allow a couple seconds of settling time, you can have a low pass filter of 0.1Hz and have excellent phase accuracy.
This is taking advantage of the fact that the sampled signal is repetitive and averaging over many cycles to obtain your accuracy. (Also assumes there is no jitter).

Regarding the 8333, its LO input is (or can be) a digital signal. Its amplitude does not effect measurement.
 
the_emi_guy: Thanks for the help on the AD8333 amplitude question.

I was thinking maximum 100-300ms, but I think I can accept the trade-off with phase accuracy.

What you are explaining with the averaging is similar to what I would do with the AD8333. Here I would just low pass filter the alternating voltage at each output (I and Q) and sample this value for a time (100ms) and calculate the average.

I think I might do this with the AD8333 as I can get the resistance/conductance and reactance/suspectance and easily calculate the phase as well.

I was thinking of using a DDS as the sine wave signal generator. Splitting this signal to a reference signal and an excitation signal. The reference signal will go directly to the LO input while the excitation signal will go through a "black box" with an unknown impedance (RC, no L), and then to the RF input. The signal out from the "black box" will probably be attenuated and phase shifted. I am interested in getting the phase shift phi = arctan(Q/I) and amplitude A = sqrt(I^2 + Q^2). This way I can know what to expect in the "black box" (or some equivalent circuit).
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
7
Views
4K
  • · Replies 46 ·
2
Replies
46
Views
6K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
26
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K