How to Measure Phase of Signals
How to Measure Phase of Signals
(OP)
This is not necessarily a communications situation, but I figure a good communications engineer might have a solution. I am trying to measure the phase difference between three signals.
The signals are given mathematically by the equations:
X = sin(2w) - cos(w)
Y = -sin(-2w) - cos(w)
Z = cos(2w) - cos(-w)
where w = 1800Hz
The 3 double frequnecy components are 120 +/- 12 degrees apart. The single frequency components are 0 +/- 5 degrees apart.
Mathematically the easiest thing to do (i.e. for phase between X & Y) would be to be use the MATH function on the scope and add a cos(w) to X & Y, however, the problem is (I believe) there is a phase shift between the cos(w) of the measured signal and the input cosine signal and so the components do not cancel each other out completely. (I do not have acces to the individual signals components on the module). When I simulate the signals myself, it works out great, becasue I am using the same cosine signal at the same phase shift, however, in my reality, I cannot get this to work. I have also tried using the Spectral Magnitude, Spectral Phase, and several other scope functions, but I can't get the reading.
Are there any suggestions on methods (or equipment) I can use to perform this measurement? I have also tried a NAII Phase Angle Voltmeter model 227 and either I did something wrong or it will not make the measurement either.
I would prefer to do this in either software (Labview or C) or with test equipment, preferably test equipment. I do not want to add hardware to my test fixture at this point.
Thanks in advance for any input. My deadline is looming...
The signals are given mathematically by the equations:
X = sin(2w) - cos(w)
Y = -sin(-2w) - cos(w)
Z = cos(2w) - cos(-w)
where w = 1800Hz
The 3 double frequnecy components are 120 +/- 12 degrees apart. The single frequency components are 0 +/- 5 degrees apart.
Mathematically the easiest thing to do (i.e. for phase between X & Y) would be to be use the MATH function on the scope and add a cos(w) to X & Y, however, the problem is (I believe) there is a phase shift between the cos(w) of the measured signal and the input cosine signal and so the components do not cancel each other out completely. (I do not have acces to the individual signals components on the module). When I simulate the signals myself, it works out great, becasue I am using the same cosine signal at the same phase shift, however, in my reality, I cannot get this to work. I have also tried using the Spectral Magnitude, Spectral Phase, and several other scope functions, but I can't get the reading.
Are there any suggestions on methods (or equipment) I can use to perform this measurement? I have also tried a NAII Phase Angle Voltmeter model 227 and either I did something wrong or it will not make the measurement either.
I would prefer to do this in either software (Labview or C) or with test equipment, preferably test equipment. I do not want to add hardware to my test fixture at this point.
Thanks in advance for any input. My deadline is looming...





RE: How to Measure Phase of Signals
Since you have Labview available, this should be easy.
Mix each line with two complex conjugate tones. i.e. Make a complex signal geneator that makes e^(-jwt). If you do not have complex numbers, like in excel, then you can just carry the real and imag parts individually and generate
cos(wt) - j*sin(wt). Make a second oscillator for the harmonic. Mix (that is multiply the x line by one of the complex signal generators) each line by each oscillator. That will give you 6 complex signals to work with. Integrate (just sum up the mixed samples) the output of the mixers by an integer number of fundamental cycles. The integer number of samples is important. Now you can take the angle each of the integrated mixed signals. The difference of these phases is the phase difference you are interested in. The amount of time you want to integrate is a function of your signal to noise ratio, the accuracy you desire, and the error in your reference frequency. I would try at least 10 cycles. You might want to find the common multiple between your sample frequency and your 1800 Hz to be even more accurate.
Good Luck!
John Solar
RE: How to Measure Phase of Signals
Thanks for the feedback. That is a great way to attack the problem. It was the method I had thought in my mind I wanted use, but just couldn't figure out the steps I needed to accomplish it.
I ended solving the problem by getting the signal data from the scope and using labview to do a least squares fit to get the coefficients for a generalized fourier series. I then used the coefficients to determine the phases. Not the greatest thing, but it works and that's all that counts.
Time permitting, I am going to go back and try your suggested method. If nothing else, I will learn something useful!
Thanks again, Terry
RE: How to Measure Phase of Signals
Best Regards,
John Solar