0

From the output results, i see that the arduinoFFT returns only positive frequencies, thus i think it self removes the negative sided values and compensates the lost energy by multiplying by 2. Is this correct?Ar

1
  • What's a "negative" frequency?
    – Majenko
    May 29, 2022 at 20:55

1 Answer 1

1

I don't know what you mean by a "negative" frequency.

FFT takes a set of samples and returns a group of "buckets", the number of buckets equal to half the number of samples. These buckets cover frequencies from 0Hz to F/2 where F is the sample frequency.

Each bucket contains the power magnitude of a block of frequencies in both the real and imaginary "axis" (effectively a pair of coordinates depicting a vector).

You compute the absolute power of a bucket through taking the square root of the sum of the squares of the real and imaginary components (basically good ol' pythagoras).

This "absolute power" value is the magnitude of a vector. A vector can never have a magnitude < 0. After all, if you have a vector of (1,1) and one of (-1, -1) they are both the same magnitude, just with a different angle (in this example a phase difference of 180 degrees).

11
  • thanks for the answer mister Majenko. Though I just found out that in the arduinoFFT library, the paramter "FFT_FORWARD" does all the job(returns one sided energy spectrum, and also normalizes the amplitudes). May 29, 2022 at 21:15
  • I'm not familiar with that specific library or what facilities it provides.
    – Majenko
    May 29, 2022 at 21:24
  • Last question sir: Would the DC component of the signal affect the amplitudes at other harmonics(components) of the FFT(the FFT is applied to the output signal of an amplified electrt microphone, for some purpose). May 29, 2022 at 21:45
  • No, the DC component should only affect the DC bucket, if at all
    – Majenko
    May 29, 2022 at 21:45
  • 1
    @أيمنالفحصي: that's the whole point of filtering: to alter the amplitude of some frequency components. In the case of a running median, you will be strongly attenuating higher frequencies. May 30, 2022 at 7:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.