LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

find frequency from input signal

Hi
 
How can i find frequencies from input signal (*.txt file) that  consist of 7000 samples. I know the sampling rate.
0 Kudos
Message 1 of 13
(18,695 Views)

Load the text data into an array and build a waveform from it (dt is the known time interval), then you can use all the precanned waveform analysis functions to fine a whole heap of information including the frequency.

 

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 13
(18,685 Views)
Yes. I loaded the signal to Lab View and generated a waveform. Now the signal is in my graph. How can i solve the timing problem. In X-axes i have the sample number (1-7000 etc). How can i read out the frequency of different samples.
0 Kudos
Message 3 of 13
(18,682 Views)
If you don't have the sample interval in the file, you can't. Check the definition of frequency. It's changes over TIME and if there is no time information, you're out of luck.
0 Kudos
Message 4 of 13
(18,678 Views)
But i konw the sampling rate (i.e. 100Hz), that means that i know the time between every sample (0,01s). Can I use that somehow?
0 Kudos
Message 5 of 13
(18,679 Views)

Of course. You can use the Build Waveform function to create a waveform data type and wire that to both the graph and frequency function.

Message Edited by Dennis Knutson on 03-29-200609:12 AM

0 Kudos
Message 6 of 13
(18,670 Views)
Question about that frequency. In what point of time is that frequency calculated? How could I find specified frequencies from the whole signal?
0 Kudos
Message 7 of 13
(18,626 Views)
If you were to turn on Context Help (something that should always be on), and move your mouse over the function, you will get the description of Extract Single Tone and it will say it "finds the single tone with the highest amplitude". For spectrum analysis, you have other FFT based solutions. I suggest you start by searching the shipping examples. Enter "spectrum" into the search field.
0 Kudos
Message 8 of 13
(18,610 Views)
Frequency is usually measured across the whole set of data.  If you need both time and frequency information together the analysis is a little more complicated.  There is a whole family of approaches for this kind of analysis depending on what your data looks like.

If it is one or more fixed frequencies, then the simple Fourier transform based functions will work.  If it is one or more frequencies that vary over time, then some other algorithms will be required.

Can you describe your data in a little more detail or better yet post it?



Randall Pursley
0 Kudos
Message 9 of 13
(18,604 Views)
This is a question about this thread.
 
I am working on a program to pull the two frequencies from a touchtone phone signal and figure out what number was pressed.  I used the Spectral Measurements VI to perform an FFT on the data.  I want it to work in real time, but I can't figure out how to get the max two frequencies out of the 2D array that is coming out of the Spectral Measurments VI.  I am experimenting with the ptbypt functions, but can only get the single MAX value.   I need to then compare these with a lookup table.  Any ideas? 
 
I am attaching the VI.
 
 
Thanks,
 
Eric
0 Kudos
Message 10 of 13
(18,577 Views)