
Am 12.01.2017 um 22:53 schrieb Fernando
Jefferson:
HI Fernando, do you have to test for a single (or a few) known frequency? In that case, the Goertzel algorithm may be your friend. It is a DFT (not fast one) for a single frequency, which is faster for a single frequency tha FFT If you have to find the loudest tone; FFT is the first step. Then find the highest amplitude; for this don't rely on the real part, it may be zero with the imaginary part carrying all the power of the signal. Real and imaginary part can be converted to amplitude and phase angle. Phase is irrelevant in terms of power, amplitude is relevant. If you want to be exact, you need to computer the sum of the squares of real and imaginary part, and find the position of the largest result. Which frequency this is depends on the number of samples that you computed the FFT of. With 1024 samples, you get a frequency resolution of 16kHz/512.  Oliver 