LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get a spreadsheet with amplitud and frequencies values from a spectral measurements VI?

Hello, I am new to LabView and I am working on a project in which I have to analyze an analog signal with the spectral measurements VI.

What I want to achieve is to get a spreadsheet with the dominant frequencies of the signal and their amplitudes.

In my personal computer I don´t have access to a DAQ so what I did is this:

  • I simulated three sinusoidal waves with white noise.
  • I added them together
  • I analyzed them with the spectral measurements Vi (Power Spectrum).
  • I created a waveform graph for the output signal.
  • I write that output data to a spreadsheet

In the spreadsheet I get the amplitude values (50 samples I don´t know why) but I can´t find a way to get the frequencies of that amplitude.

 

Thanks in advance.

labview.PNG

 

 

 

0 Kudos
Message 1 of 4
(2,360 Views)

You get 50 samples because you told your Simulate Signals to only give you 100 samples.  An  FFT will give you N/2 bins when you collect N samples.

 

You should put a small wait in your code, or don't tell the Simulate Signals to "Run as fast as possible", so that you aren't running so fast.

 

If you are only looking for 3 data points representing your frequencies, you should use some sort of peak detector on the output of the FFT.  Right now you are getting exactly what you asked for which are the amplitudes for all the frequencies that make up you signal, even though most of them are low and just an artifact of the noise.

0 Kudos
Message 2 of 4
(2,341 Views)

That's great! Thank you. Do you have any tip on how to get the dominant frequencies in the same spreadsheet? 

0 Kudos
Message 3 of 4
(2,325 Views)

Look for examples on Peak Detection and Threshold detection.

0 Kudos
Message 4 of 4
(2,316 Views)