LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tone measurements question

I would like to find the "instantaneous frequency" aka 1/period of each individual pulse in a signal. I believe the extract single tone information vi found within the tone measurements express vi does this but am not sure as the description is a little vague.
 
Does the extract single tone information vi output the frequency of each pulse?
 
thanks
0 Kudos
Message 1 of 12
(3,846 Views)
Your description of what you are trying to measure is somewhat vague. Can you post an image of your signal or the VI you have attempted with some typical data saved as default?

The Extract Single Tone uses Fourier Transform methods internally so it may not be suitable for what you. I have not looked at it closely but I think it transforms the entire input signal into the frequency domain and then extracts information about the single tone.

Lynn
0 Kudos
Message 2 of 12
(3,839 Views)
Hi Lynn,
 
Attached are two pictures of the signal generated as well as the VI I'm using. Basically the signal is generated by a fiber optic system looking at the knurlings on the bottom of a bottle which is spinning. I would like to calculate the frequency of each pulse and produce a frequency vs. time graph. I realize the signal is very rough atm: mostly due to the positioning of the fiber optic which I am in the process of fixing. Neither smoothing filters nor frequency cutoff filters seem to clean the signal up well.
 
Thanks,
 
Ben
Download All
0 Kudos
Message 3 of 12
(3,833 Views)
Ben,

What do you expect as the result of the data as shown in overview.jpg? Does the bottle spin just one revolution or many? Is it moving past the sensor while the data is being recorded? Are you trying to determine the spinning speed or are you trying to measure some parameter of the knurlings? Is there any kind of index mark on the bottle or other means of synchronizing with the rotation?

Lynn
0 Kudos
Message 4 of 12
(3,822 Views)

Lynn,

The fiber optic is set up beneath a rotate station in an inspection machine. Each bottle is accelerated up to speed at the station (no linear movement, all rotational). Each bottle goes through multiple revolutions at the station. I'm trying to measure the angular velocity profile of each bottle as it is accelerated up to speed by calculating the frequency of the pulses produced by the knurlings (the frequency is directly related to the angular velocity).

Thanks for the quick reply.

-Ben

0 Kudos
Message 5 of 12
(3,819 Views)
Ben,

What is the maximum frequency you expect? How uniform are the knurlings on the bottles?

If you want to use Fourier transform methods, you need to look at the STFT and or WVD Spectrogram VIs because of the changing frequencies during the sample. If you can use those, they can produce very informative displays of frequency versus time.

Lynn
0 Kudos
Message 6 of 12
(3,802 Views)
Hi Lynn,
 
The knurlings are spaced evenly around the bottom of the bottle. Knowing the number of knurlings allows me to translate frequency to velocity. Does the STFT vi allow me to save the data to a file to later me analyzed/graphed in excel?
 
I'm attempting to use the extract multiple tone information vi which in theory should calculate the frequency of each pulse if the threshold amplitude is set low enough. Attached is a vi using this method. Does this seem like a viable/efficient way to calculate the frequency of this signal?
 
Thanks,
 
Ben
0 Kudos
Message 7 of 12
(3,783 Views)
Ben,

I have not had much time to look at it today. What you are looking at is essentially a swept frequency or chirp waveform. These tend to have a flat spectrum over the range of frequencies covered. I dug into the Extract Multiple Tone VI a bit and it appears that it is looking for peaks and valleys in the spectrum to define where the tones are. Your spectrum may not have this kind of characteristic.

The STFT (short time Fourier transform) and WVD (Wigner Ville Distribution) VIs can show the frequency variation with time for a chirp.

The STFT output is a 2D array which can easily be saved with the Write to Spreadsheet File function.

Lynn
0 Kudos
Message 8 of 12
(3,769 Views)

Lynn,

Attached is a the data generated from the STFT in excel for a simple chirp waveform. It would appear as though the STFT vi outputs the time and the amplitudes of the signal at that point in time, in order of increasing frequency. So the index of the maximum amplitude might be one way of approximating the frequency at each point.

Is there any way to just output frequency and time data using STFT or WVD?

Thanks,

Ben

Download All
0 Kudos
Message 9 of 12
(3,754 Views)
Ben,

The output of the WVD or STFT is just a 2D array which you have plotted on the intensity graph. If you search through that array for the maximum in each row (or column) you will find the locations of the maxima. Use the Array Max & Min function from the Array palette. Depending on how noisy the data is you may need to do some smoothing, but this should get you close. The maxima tend to follow the line of the bright path across the intensity graph.

Lynn
0 Kudos
Message 10 of 12
(3,746 Views)