LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Phase Measurement

Randall,
Pls take a look at the attached VI Phase.jpg. Ignore the previous picture of the same. I was trying out something and I don't think that was anywhere close to what I am expecting. Can you let me know how does one go from here with the same questions in my previous message applied to this newly attached picture. Thanks!
0 Kudos
Message 11 of 65
(2,148 Views)

Randall,

Does the AC & DC Estimator VI in your Phase measurement VI take into account a DC shift in the output signal while computing phase? Also, what is the reason for choosing DC Estimate and not AC Estimate in your Phase measurement VI. Is it possible for you to explain in brief the working of your phase algorithm. Thanks!

0 Kudos
Message 12 of 65
(2,146 Views)
Trig identities.  The DC component in the real part of the complex signal is cos(phase) and the imaginary part is sin(phase).
Randall Pursley
0 Kudos
Message 13 of 65
(2,137 Views)
See attached for trig identity detail
Randall Pursley
0 Kudos
Message 14 of 65
(2,123 Views)
As for your other question.  I can't tell exactly what the ATS vis in your program put out but if they put out both the reference signal and measured signal then maybe you would do the attached.  If the ATS vis do not put out the reference signal then you will have to provide more information to figure out where to get the reference signal.
Randall Pursley
0 Kudos
Message 15 of 65
(2,119 Views)

Randall,

Thanks for the explanation. This also holds good if the reference and measured signals are Sine, right? Also, I was wondering if you are aware of any VIs which eliminate DC offset (shift) in the output signal. Searched in the Functions Palette for a VI which could do this, but could not find a suitable VI. Appreciate your feedback. Thanks once again for all your help.

0 Kudos
Message 16 of 65
(2,115 Views)
Sine or Cosine, same thing.  As for DC offset, just use the AC/DC function and subtract the DC part from the original signal.
Randall Pursley
0 Kudos
Message 17 of 65
(2,102 Views)
Randall,
The ATS VI outputs both the reference and the measured signals in the cluster (pink). I tried your code, but for some reason did not work right with my data acquisition program. So I made some modifications to your code (see attached) and looks like it is working right this time around. However, I am kinda of unable to understand as to why your code didn't work and mine did (modified version). What exactly do the Array Max & Min and the Divide VIs do in your Phase VI? Also, for eliminating the DC offset, you mentioned about subtracting the DC signal from the AC using AC/DC Estimator. Can you please elaborate a little on that. Tried it out, but the results were no where close to the expected, am not sure if I am doing something wrong here. Thanks.
0 Kudos
Message 18 of 65
(2,080 Views)
My code didn't work because I was taking the first element of the array and using both arrays in that element.  You took the first two elements of the array and used only the second array in each element.  The min/max and division are used to normalize the signals.  For the trig identity approach to work, both signal have to have the same amplitude so the only difference between them is their phases.
Randall Pursley
0 Kudos
Message 19 of 65
(2,072 Views)
As for the AC/DC question.  If you have a signal with both an AC and DC component then use the AC/DC function and subtract the DC part from the original signal (see attached).

Is this what you are talking about?
Randall Pursley
0 Kudos
Message 20 of 65
(2,069 Views)