LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fft find frequency

Solved!
Go to solution

I am new to Labview. I need to plot the data (2 cols, one is time, x array, the other one is signal intensity,y array)provided by my instructor in time domain, which I already did. Then I need to convert the data into frequency domain. What should I do? I tried FFT function for my y array. But how can I find out the frequency informaiton?  From the x array, I know it's sampling rate is 2500Hz. T= 40s, N=100,000. the effective maxmium frequency should be 1250Hz, right?

 

And I also need to isolate the 1000Hz signal... I am totally confused.

Hope you can help me. Thanks in advance.

 

John

0 Kudos
Message 1 of 22
(6,152 Views)

John,

 

your VI fails as you obviously haven't taken into account that FFT (mathematical) always returns complex numbers.

That being said, you are looking for "power spectrum".

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 22
(6,122 Views)

Norbert,

 

Thanks for your reply.

 

I am suppose to get a power spectrum. But what makes me confused is the frequency axis. Am I on the right track?

0 Kudos
Message 3 of 22
(6,109 Views)

Please search for a function "power spectrum" instead of using the basic FFT.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 22
(6,100 Views)

Thanks.

 

Could you please look at my vi. ?

0 Kudos
Message 5 of 22
(6,095 Views)

Hi Norbert,

 

I tried many times today. 

Do I need to do a FFT before I feed the array to power spectrum function or feed the raw data(in time domain) directly to it?

What's the x-axis? time domain or frequency domain?

 

Thanks a lot.

John

0 Kudos
Message 6 of 22
(6,066 Views)

An FFT takes a time series signal and produces its associated spectrum. Similarly, power spectrum takes a time series and produces a (power in this case) spectrum.

 

So.... you feed the time series straight into the power spectrum VI and forget the FFT.

0 Kudos
Message 7 of 22
(6,057 Views)

Thanks. It makes a lot sense. 

 

So similarly, I need to consider the effective frequency, which is one half of maxium frequency. In this case, I need to split the array generated via power spectrum. vi. Is this correct?

 

I also have another question. 

isolate the signal with specific frequency and then plot the isolated data in frequency domain and time domain respectively. Does it mean that I need to do FFT first to findout the specific frequency then isolate the data with respect to frequency domain, then do a inverse FFT to get the isolated data with respect to time domain?

 

Thanks again.

0 Kudos
Message 8 of 22
(6,045 Views)

John,

 

your latest questions are very general and do not really connect directly to LV.

Therefore, i recommend you to create a VI where you can play a little.

 

Your playground should contain the following:

- Waveform Generator. This enables you to have known signals where you should know the FFT/Power Spectrum.

- Use Power Spectrum and display the result. Depending on the input waveform, you will see no, one or several "peaks". The hight of those peaks reflect the amplitude of that frequency in your time domain signal.

- Try to figure out where those peaks are using basic LV functions (hint: either use array or waveform functions)

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 9 of 22
(6,028 Views)
Solution
Accepted by topic author John008

Norbert makes some good points- you need to have a play and maybe get a good book on signal processing (not LabVIEW specific).

 

The 'effective' frequency you talk about is I assume the Nyquist frequency=sample rate/2. If this is what you mean, you don't have to do anything about it- just be aware that the maximum frequency your power spectrum will show is sample rate/2.

 

You can isolate a specific time domain signal in the manner you mention, FFT->zero spectral bins you're not interested in->inverse FFT, (use FFT not power spectrum for this). A standard FFT will put out a double sided spectrum, which is symmetrical for time series that do not contain complex numbers, so you will need to blank a given bin on both sides of the spectrum- which is maybe what you were talking about RE: effective frequency. Use the whole thing (not just +ve half) to reconstitute the original signal.

 

The 'blank a bin and inverse FFT' method is not considered a 'good' way of obtaining time series in a reduced band for real signal processing for reasons I won't explain here. You usually just use a filter on the time series, of which LabVIEW provides many. 

0 Kudos
Message 10 of 22
(6,022 Views)