09-24-2013 03:20 PM
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
Solved! Go to Solution.
09-25-2013 06:29 AM
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
09-25-2013 08:27 AM
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?
09-25-2013 08:53 AM
Please search for a function "power spectrum" instead of using the basic FFT.
Norbert
09-25-2013 09:16 AM
Thanks.
Could you please look at my vi. ?
09-25-2013 07:39 PM
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
09-25-2013 08:54 PM
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.
09-25-2013 09:57 PM
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.
09-26-2013 02:11 AM
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
09-26-2013 05:28 AM
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.