LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tone Phase Conversion

hello one and all,  i am trying to use the "Extract Single Tone" vi in LabView v8.20.  the phase i get is 7.3986 degrees with a detected frequency of 99.9942876 Hz.  i actually have four 100 Hz cycles in a waveform and plotted on a waveform graph ranging in time from 0 to 40 ms.  i can not seem to convert the 7.3986 degrees to the proper time and get the proper x-intercept or any increments therein.  i have done these conversions for years and i can not seem to get the correct answer from the 7.3986 degrees.  any suggestions?  lucas
0 Kudos
Message 1 of 3
(2,762 Views)
Does the Extract Single Tone.vi use any windowing or filtering internally? This could produce small errors on short samples. What happens if you give it 400 cycles? Is your sampling synchronous with the signal? What is the sampling rate? If you are not getting an integer number of samples (the same number) on every cycle, the processing algorithms likely will see this as a slightly different frequency or phase.

Remember that the underlying mathematics usually assumes continuous signals extending to +/- infinity and you are feeding it a finite number of discrete samples. The assumptions may not be valid.

Lynn
0 Kudos
Message 2 of 3
(2,750 Views)
ok, i got it.  a bit stupid after i figured the phase was in the negative direction.  so the equation i got was phs=(-p+180*hc)/(360*f);  where p and f are the phase, in degrees, and frequency from the single tone vi, hc is the half cycle integer and phs is the calculated phase in time, units of seconds.  lucas
0 Kudos
Message 3 of 3
(2,740 Views)