LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stft, frequency extraction

Hi,
 
I am acquiring data which has varying frequency in it. I have 7500 points (scan rate is 300 Hz but will be higher like 10000 Hz later).  I need to save the data divisions with the same frequency. I thought I should use some kind of STFT. I am new on this and I tried to work on an example vi but could not get anything. I could not get it work and I also do not know how to get frequencies and the data set it belongs to in STFT.vi.
 
Any help will greatly appreciated.
 
Thank you.
 
ilter
0 Kudos
Message 1 of 8
(4,239 Views)
Hi, ilter,
 
I'm not quite clear on your question of "varying frequency" on whether the frequency of signal varing or the sampling frequency varing. The attached VI "STFT example.vi" can show you how to use "STFT Spectrograms.vi", and how to correctely show time and frequency information on both axes, while "Display.vi" is a sub VI. You should copy both VIs to your local hard disk before running "STFT example.vi". The example uses a chirp signal for STFT analysis.
Download All
0 Kudos
Message 2 of 8
(4,190 Views)
Hello Ilter,
 
Wouldn't you better want to take the FFT of that signal to separate it into its frequency components?
 
You could use the example vi called Spectrum Measurements.vi  located under labview\examples\express\
 
Regards,
 
 
Juan Galindo
Juan Galindo
Applications Engineer
National Instruments
0 Kudos
Message 3 of 8
(4,186 Views)
Hello Ilter,
 
Wouldn't you better want to take the FFT of that signal to separate it into its frequency components?
 
You could use the example vi called Spectrum Measurements.vi  located under labview\examples\express\
 
Regards,
 
 
Juan Galindo
Juan Galindo
Applications Engineer
National Instruments
0 Kudos
Message 4 of 8
(4,185 Views)

Hello,

Thank you very much for replying. I have a data stream with three different frequencies in it. I mean the signal starts with for example 40 Hz then turns into 120 and then to 190Hz. I do not know what time this is happening in my real data. (Attached file has three sine waves; first 100 points = 40 hz, 100-200=120 hz, 200-300=190 ) , first column is the time information.

I need to analyze my data and group it like 100 points = 40 hz, 100-200=120 hz, 200-300=190hz.

 

I am little desperate, and trying anything I can get. I will appreciate your help.

Thank you

 

ilter 

 

0 Kudos
Message 5 of 8
(4,170 Views)
Hi, iter
 
I read your data, and processing your data with the example VIs I attached. The attached picture shows the screen shot of the result. It matches your descriptions very well.
 
0 Kudos
Message 6 of 8
(4,151 Views)
The application that pine created seems to match the request you have. You could add an array in which the values of the right hand side graph could be stored and you can display how many points were used in each frequency.

Cheers!

Juan Galindo
Juan Galindo
Applications Engineer
National Instruments
0 Kudos
Message 7 of 8
(4,144 Views)
Dear Pine,
 
I am very grateful for your help. You are wonderful.
Juan thanks to you as well.
 
I could make the VI work and got the same plot you attached.
 
My last questions,
I tried connecting an array but got some numbers I cannot understand. What I am seeing here?
 
Second I tried using this VI with my real data set and the plot looked little strange.
If you could try it one more time and tell me your opinion I will be very happy.
 
Scan rate for the attached file is 300 hz.
 
Thank you very much.
Download All
0 Kudos
Message 8 of 8
(4,132 Views)