Sign in

username:

password:



Not a member?

Search compdsp



Search tips

comp.dsp by Keywords

Adaptive Filter | ADPCM | ADSP | ADSP-2181 | Aliasing | AMR | Anti-Aliasing | ARMA | Autocorrelation | AutoCovariance | Beamforming | Bessel | Blackfin | Butterworth | C6713 | CCS | Chebyshev | CIC Filter | Circular Convolution | Code Composer Studio | Comb Filter | Compression | Convolution | Cross Correlation | DCT | Decimation | Deconvolution | Demodulation | DM642 | DSP Boards | DSP/BIOS | DTMF | Echo Cancellation | Equalization | Equalizer | ETSI | EZLITE (Ez-kit Lite) | FFT | FFTW | FIR Filter | Fixed Point | FSK | G.711 | G.723 | G.729 | Gaussian Noise | Goertzel | GPIO | Hilbert Transform | IFFT | IIR Filter | Interpolation | Invariance | JTAG | Kalman | Laplace Transform | Levinson | LPC | McBSP | MIPS | Modulation | MPEG | Multirate | Notch Filter | Nyquist | OFDM | Oversampling | Pink Noise | Pitch | PLL | Polyphase | QAM | QDMA | Quantization | Quantizer | Radar | Random Noise | Reed Solomon | Remez | Resampling | RTDX | Sampling | Sharc | TI C6711 | Undersampling | Viterbi | Wavelets | White Noise | Wiener Filter | Windowing | XDS510PP | Z Transform


Discussion Groups

Free Online Books

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | Comp.DSP | FFT question!

There are 9 messages in this thread.

You are currently looking at messages 0 to 9.


FFT question! - phunkyman - 2004-03-29 05:21:00

Hi,

When realising a FFT, can we get the frequency corresponding to each
point calculated? Apparently, the results given by a FFT is only the
[Re,Im] of each point?
If we can't know the frequency by a FFT, how can we do it?

The thing i'd like to do is detecting 2 different frequencies from the
same input signal. Can it be possible?

Thanks.
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: FFT question! - Robert Scott - 2004-03-29 07:44:00



On 29 Mar 2004 02:21:38 -0800, p...@caramail.com (phunkyman)
wrote:

>Hi,
>
>When realising a FFT, can we get the frequency corresponding to each
>point calculated? Apparently, the results given by a FFT is only the
>[Re,Im] of each point?
>If we can't know the frequency by a FFT, how can we do it?
>
>The thing i'd like to do is detecting 2 different frequencies from the
>same input signal. Can it be possible?

Every point in an FFT corresponds to a specific frequency - namely the
multiples of the inverse of the sample period.  In order to "find" a
frequency in a signal, you can search through the FFT looking for
amplitude peaks.  If you want more resolution than the raw FFT
provides, then you can employ one of the many interpolation techniques
which rely on the peak amplitude and the amplitudes of the nearby FFT
entries.  If your signal has two different frequencies, then the FFT
with have two separate peaks.


-Robert Scott
 Ypsilanti, Michigan
(Reply through this forum, not by direct e-mail to me, as automatic reply address is fake.)
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: FFT question! - Mark Borgerding - 2004-03-29 09:40:00

phunkyman wrote:
> Hi,
> 
> When realising a FFT, can we get the frequency corresponding to each
> point calculated? Apparently, the results given by a FFT is only the
> [Re,Im] of each point?
> If we can't know the frequency by a FFT, how can we do it?
> 
> The thing i'd like to do is detecting 2 different frequencies from the
> same input signal. Can it be possible?
> 
> Thanks.

If the only thing you need is detection of two specific frequencies, you 
might want to use goertzel filters instead of fft.  It will be more 
efficient and you can specify the frequencies of interest more precisely.


A goertzel filter is analogous to one bin of a DFT.  A google search 
should turn up some links.

-- Mark Borgerding

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: FFT question! - Ronald H. Nicholson Jr. - 2004-03-29 10:53:00

In article <e...@posting.google.com>,
phunkyman <p...@caramail.com> wrote:
>When realising a FFT, can we get the frequency corresponding to each
>point calculated? 

Only if you know the sample rate of the input data and the length of
the FFT.

>The thing i'd like to do is detecting 2 different frequencies from the
>same input signal. Can it be possible?

Depends on the separation of the 2 frequencies, how they relate to the
sample rate, and the signal-to-noise ratio.


IMHO. YMMV.
-- 
Ron Nicholson   rhn AT nicholson DOT com   http://www.nicholson.com/rhn/ 
#include <canonical.disclaimer>        // only my own opinions, etc.
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: FFT question! - Frank - 2004-03-29 12:22:00

Try http://www.dspdimension.com look for "The DFT Explained" (The DFT a Pied).

--frank
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: FFT question! - phunkyman - 2004-03-30 03:16:00

Thanks evryone.

Robert: 
> Every point in an FFT corresponds to a specific frequency - namely the
> multiples of the inverse of the sample period.  In order to "find" a
> frequency in a signal, you can search through the FFT looking for
> amplitude peaks.  If you want more resolution than the raw FFT
> provides, then you can employ one of the many interpolation techniques
> which rely on the peak amplitude and the amplitudes of the nearby FFT
> entries.  If your signal has two different frequencies, then the FFT
> with have two separate peaks.

I think i can do this, searching for two peaks. But i also need to
know the arrival time between these 2 frequencies! The signals i want
to study are sferic signals.
What do you mean by interpolation techniques rely on the peak
amplitude? Can you give me examples, please?

Thansk again.
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: FFT question! - Robert Scott - 2004-03-30 07:59:00

On 30 Mar 2004 00:16:52 -0800, p...@caramail.com (phunkyman)
wrote:

>I think i can do this, searching for two peaks. But i also need to
>know the arrival time between these 2 frequencies!

The resolution of arrival times depends on the length of each set of
sample points that go into the FFT.  A frequency that appears at the
beginning of a sample set will appear the same in the FFT as on that
appears late in that sample.  The only way to improve the resolution
is to take shorter sample sets, which will also reduce the frequency
resolution of the FFT.  So try to find a sample set period that is
long enough to give you adequate frequency resolution in the FFT and
yet short enough to define arrival times adequately.

Regarding bin interpolation, I don't have references at hand, but I
think you can find then in the FAQs for this group, or by googling
"finding frequency" and "interpolation".  There is a page I saw
somewhere that had several methods listed.  The one that I use is
called quadratic interpolation, and it relies on the peak amplitude
and the amplitudes of the immediately adjacent bins.


-Robert Scott
 Ypsilanti, Michigan
(Reply through this forum, not by direct e-mail to me, as automatic reply address is fake.)
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: FFT question! - Ronald H. Nicholson Jr. - 2004-03-30 20:18:00

In article <e...@posting.google.com>,
phunkyman <p...@caramail.com> wrote:
>I think i can do this, searching for two peaks. But i also need to
>know the arrival time between these 2 frequencies!

If the differences in arrival time are a multiple of your FFT length,
then you merely need to count FFT's from when you detect one frequency
until you detect the second and multiply by the offset in time between
FFT's.


IMHO. YMMV.
-- 
Ron Nicholson   rhn AT nicholson DOT com   http://www.nicholson.com/rhn/ 
#include <canonical.disclaimer>        // only my own opinions, etc.
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: FFT question! - phunkyman - 2004-03-31 02:37:00

Thanks everyone for your answers.

In fact i won't need to detect 2 different frequencies as i won't have
to detect this kind of signal.

Even though i thank you for the time you spent on my question.

Maybe I'll have other questions in the future!
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.