07-10-2009 11:11 AM
All,
I'm working on an EEG data analysis vi, and am having mucho trouble when it comes to displaying a simple power spectrum that gives an accurate frequency on the sine wave simulation I'm now using. Most brain waves are between 1-50 Hz, and so I'm trying to get a frequency resolution of at least 1 Hz. However, no matter what I do (increase sampling rate, use different sub vi's and blocks), the graph only plots in frequency increments of 10 Hz! I know this must be a simple problem, but I can't find any good documentation on this, and would appreciate any advice anyone could give on this problem. I'm racking my brain here!
Nick
Solved! Go to Solution.
07-10-2009 11:26 AM
07-10-2009 11:29 AM - edited 07-10-2009 11:31 AM
You need to acquire 1 second of data to get 1 Hz resolution. Increasing the sampling rate only increases the frequency range the FFT covers.
Frequency resolution = 1/sampling time
Frequency span = sampling rate/2
For your application, you will need to have a sampling rate of a minimum of 100 Hz. At this rate you will need to acquire 100 samples to get 1 Hz resolution. At 1 kHz sampling rate, you will need to acquire 1000 points to get 1 Hz resolution.
05-02-2012 05:17 AM
Hi,
I also have the same issue.
My data acquisition time is 60 seconds at 25kHz of sampling rate.
Hence the frequency resolution in FFT comes as 1/60 = 0.016468 Hz.
But what I need is the frequency resolution should be 100Hz.
Can any one help me in this???
Thanks & Regards,
--Ashokan. M
05-02-2012 05:58 AM
Ashokan,
why does higher frequency resolution bother you ? Once you gain those frequency bins and you do not need them, you can allways just not use them / calculate mean value / etc.
You can decrease the resolution using shorter time frames, for 100 Hz it is 1ms. So you get 100 spectral measurements per second.
05-02-2012 11:23 PM
Dear Bublina,
Thanks for the reply.
My project is that I have to send these data via ethernet communication. Hence I need lower frequency resolution, which will reduce the size of the file size.
I don't have knowledge about shorter time frames!!!
Please reply.
Thanks & Regards
--Ashokan.
05-03-2012 02:00 PM - edited 05-03-2012 02:07 PM
Hi Ashokan,
I believe what Bublina means is to use a reduced sampling time interval. As rpursley8 mentioned above, the sampling time is inversely proportional to the frequency resolution. If you use a shorter time interval for sampling then you wil increase the frequency resolution.
1/0.01 s = 100 Hz
So use 0.01 seconds for your sampling time. This will give you 250 points with a frequency resolution of 100Hz.
I hope this information helps. If you have further questions on using shorter sampling times, please respond to this post.
Regards,
05-03-2012 11:57 PM
Hi James,
Thanks for the reply.
I fixed the error.
In the case of FFT or PSD or etc., Labview didn't give the same result of MATLAB.
There is a lot of differences in the output of FFT between labview and matlab.
Could you please help me in this???
Thanks & Regards
--Ashokan. M
05-06-2012 07:22 AM
@Ashokan wrote:
Hi James,
Thanks for the reply.
I fixed the error.
In the case of FFT or PSD or etc., Labview didn't give the same result of MATLAB.
There is a lot of differences in the output of FFT between labview and matlab.
Could you please help me in this???
Thanks & Regards
--Ashokan. M
I do not have checked this, but highly doubt there is any significant difference between FFT done in Matlab and Labview. You are probably using two different sets of parameters if not different data or wrong code.
Post here the labview code that you suspect of wrong or different output.
05-09-2012 06:39 AM
Sorry for late reply.
Here, am sending my labview code and the output of both labview & MATLAB.
In the output, there is a shifting in Y axis around 30 dB.
Could you please help me in this???
Thanks&Regards,
--Ashokan. M