LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Phase Measurement

Randall,

The variables I am measuring are: (1) output voltage (amplitude), and (2) phase (phase difference b/w i/p & o/p). And according to your phase vi, I think it is a true phase measurement and not a time delay measurement, which is what I have used in my application. Further, your first phase vi is array-based and the current one is point-by-point based which is preferrred for real-time high speed data acquisition...correct me of I am wrong. Below is a brief synopsis of my application that should give you an idea of my objective(s).

"Sense the influence of metal proximity and thickness upon the impedance characteristics of a inductive sensor at multiple input frequencies. Towards this goal, I am trying to explore the possibility of employing amplitude and phase information at different input frequencies to determine the metal thickness and proximity of the metal sheet to the sensor."

Going back to the actual problem, sampling rate is dependent on the input frequency, right. And as we have discussed previously, sampling rate has to be chosen where in one finds the least amount of variation in phase and minimal noise. I have attached a word document with sample phase measurements for 1 KHz i/p frequency at different sampling rates. Could you please look into it and comment appropriately. Which according to you best represents the phase information? All the measurements had almost consistent amount of deviation from the measured phase. What is the reason of the ripples existing in the phase measurements. Is due to some phase ambiguity? Will look forward to your reply. Thanks.
0 Kudos
Message 51 of 65
(1,801 Views)

Randall,

Adding to my previous email sent earlier today...

Why is it that the phase measured using "Extract Single Tone Information.vi" is different from the measured phase using the phase vi suggested by you?

0 Kudos
Message 52 of 65
(1,796 Views)
The "Extract Single Tone Information.vi" gives an average phase value for a single tone.  Kind of like the first approach I sent you where you would have one answer for the whole waveform.  I would guess that if you used this vi on both waveforms and then subtracted the phase outputs of each, I would hope you would get a similar answer to what I sent you.

As for the variation in the phase, I will try to get back to you tomorrow after I check out a couple things.
Randall Pursley
0 Kudos
Message 53 of 65
(1,794 Views)

Randall,

Thanks for the information. Would like to give you some more information related to the first email I sent out today. I am trying to minimize the measurement error (standard deviation which depends on the sampling rate) in phase to the maximum extent possible. Will look forward to your reply(s). Thanks.

0 Kudos
Message 54 of 65
(1,790 Views)
That sinusoidal variation may result from a small DC offset on one or both of the signals.  You should add the AC/DC measurement vi and subtract out the DC part of each as shown.

Also, the result will me more accurate if you make sure you acquire a whole number of cycles of the 1 kHz signal (i.e. 10 cycles, 100 cycles, etc).  This makes the Hilbert transform more accurate across the whole waveform.  There will be less error at the beginning and end of the result.

Message Edited by rpursley8 on 01-12-2006 08:09 AM

Message Edited by rpursley8 on 01-12-2006 08:10 AM

Randall Pursley
0 Kudos
Message 55 of 65
(1,795 Views)
Randall,
Thanks a lot for the information. How does one make sure that whole number of cycles (10, 100, 1000, etc) are collected? Is this something which can be controlled using software.
0 Kudos
Message 56 of 65
(1,781 Views)
If I were you,  I would just truncate a little bit of the data to get an appropriate number of points (i.e. 1 kHz at 100 kS/s you would reduce your data array to a multiple of 100 since 100 points would be required for 1 cycle of 1 kHz).  I don't know how you set the number of points that you acquiring, so you may be able just to set that number (i.e. collect 1000 points).  In the data you posted earlier you had 2048 points for each waveform.  If I truncated that to 2000 points, the phase mesurement was pretty good.
Randall Pursley
0 Kudos
Message 57 of 65
(1,777 Views)

Randall,

The number of sampling points (record length) is set by the user on the front panel. I had initially set the record length to 2048 points. Tried out your suggestion and set it to 2000 points and it works perfectly fine. The standard deviation is less than 1 degree for the phase measurment, which is what I was looking for. The standard deviation tends to creep up if: (1) the i/p frequency is not an exact multiple of the sampling rate, say if the i/p frequency is set to 750 Hz. The standard deviation tends to go over a degree (around +/-1.28 degrees) in this case as the number of cycles is not a multiple of 10, 100, etc. I guess this is tough to contain practically. (2) the standard deviation increases as the gap distance (separation distance b/w the sensor and the metal sheet) is increased. The o/p signal amplitude is in the order of "mVolts", and the amplitude decreases with increase in gap distance. And I guess as the signal gets smaller the amount of uncertainty increases. Again, I am not sure if one can really do anything about this practical problem as I think this has nothing to do with the phase algorithm. This depends more on the i/p signal strength and frequency as well as the probe (sensor) size. I have attached a Word document file with a snapshot of the phase o/p included.

Could you pls comment appropriately to my questions in this email and what you think of the phase measurement this time around. Thanks.

0 Kudos
Message 58 of 65
(1,775 Views)
I am trying to set up a frequency sweep in LabVIEW by programming a HP33120A Function Generator. Would appreciate if someone who has worked on it suggest a method appropriately. Thanks!
0 Kudos
Message 59 of 65
(1,752 Views)
You just have to figure out how many points you need to acquire depending on sampling frequency and input frequency.  For example, with an input frequency of 750 Hz, it would take 3 cycles of that frequency to get a whole number of points with a sampling rate of 100,000 kS/s.

100000/750 = 133.333333333
133.333333*3 = 400

So I think 2000 points would work for this frequency since it would equate to 15 cycles of 750.  For a tougher case of let's say 790 Hz at 100,000 kS/s, it would take 79 cycles of that frequency to get a whole number of points.

100000/790 = 126.58227848101265822784810126582
126.58227848101265822784810126582*79 = 10000

So it would take 10000 points for this frequency to give you good results.  Essentially you factor out the common factors between sampling rate and input frequency to get the number of points needed.


As for the low signal amplitude, I have attached a vi that performs an ideal filter in the frequency domain to minimize noise.  Play around with it and see if it would help you with your signal processing.  Cleaning up the noise in the signal will help alot if this can work for you.
Randall Pursley
0 Kudos
Message 60 of 65
(1,757 Views)