Re: Maximum resolution in Fourier
- From: falderals@xxxxxxxxxxx
- Date: Sat, 30 Aug 2008 23:36:45 -0700 (PDT)
On Aug 30, 7:21 pm, "Marc Kroeks" <i...@xxxxxxxxxxxx> wrote:
Question about maximum resolution in Fourier.
For a project i am asked to make an application measures the EEG with a
samplewindow of about 2 seconds and take a spectrum analysis of that with a
resolution of minimum .1 Hz. Apparently the resolution is usually given as
1/SampleLength, so in this case .5 Hz. Now my sampling device can make
recordings of with up to 2048 Hz sample rate, so I imagined that with a high
enough sample rate, there should be a way to disciminate a 8.5Hz wave from a
8.6Hz wave (we are looking at the peak energy in different ranges from 3 to
7, 7 to 13 and 13 to 20 Hz. So I came up with an algorithm that lays a sine
and a cosine wave over the sample with frequencies from 3 to 20 in steps of
.1Hz and stores the summation in an array. That seems to give some increase
in resolution, only for a single signal in the source, (eg. in source 8.3 hz
gives a peak energy at 8,3 hz exactly); when i mix two waves, the maximum
distance over which they show up separately is about .3 Hz, then the peaks
fuse.
DLLIMPORT long __stdcall MyFFT (long lNin, double dInArray[], long lNout,
double dOutArray[], double dFromHz, double dToHz, double dResolution, double
dSampleRate)
{
long i,j ;
double d, f, s, z ;
double re[lNout] ;
double im[lNout] ;
s = 0.0;
for (i = 0; i<lNout; i++)
{
d = i * dResolution + dFromHz;
re[i] = 0.0;
im[i] = 0.0;
f = (d * 2.0 * PI) / dSampleRate;
for (j = 0; j<lNin; j++)
{
z = j * f;
re[i] += dInArray[j] * cos(z);
im[i] += dInArray[j] * sin(z);
}
dOutArray[i] = sqrt(re[i] * re[i] + im[i] * im[i]);
}
return 0;
}
My question, is there a way to take a spectrum with a certain given
resolution (res Hz) when the samplelength is fixed (sl seconds) and the
samplerate (sr Hz) can be adjusted?
The idea is, that the things we are searching for last not so long, maybe a
few seconds, so that taking a longer samplelength would average that thing
out. Are "WaveLets" something that i should study for this purpose?
Looking forward to your reply,
Marc Kroeks.
Resolution of a DFT is fs/N where fs is sample rate and N is number of
samples.
Easy - work it out from that. ie you need a longer time to get more
resolution.
You could also reduce the sampling rate if you don't need a large
bandwidth.
.
- Follow-Ups:
- Re: Maximum resolution in Fourier
- From: John Barrett
- Re: Maximum resolution in Fourier
- References:
- Maximum resolution in Fourier
- From: Marc Kroeks
- Maximum resolution in Fourier
- Prev by Date: Re: 60Hz Notch filter at 25kHz sampling rate?
- Next by Date: Re: Maximum resolution in Fourier
- Previous by thread: Re: Maximum resolution in Fourier
- Next by thread: Re: Maximum resolution in Fourier
- Index(es):
Relevant Pages
|