Search code examples
audioreal-timesignal-processingfftamplitude

formula Amplitude using FFT


I want to ask about the formula of amplitude bellow. I am using Fast Fourier Transform. So it returns real and complex numbers. after that I must search amplitude for each frequency.

My formula is

amplitude = 10 * log (real*real + imagined*imagined)

I want to ask about this formula. What is it source? I have been search, but I don't found any source. Can anybody tell me about that source?


Solution

  • This is a combination of two equations:

    1: Finding the magnitude of a complex number (the result of an FFT at a particular bin) - the equation for which is m = sqrt(r^2 + i ^2)

    2: Calculating relative power in decibels from an amplitude value - the equation for which is p =10 * log10(A^2/Aref^2) == 20 log10(A/Aref) where Aref is a some reference value.

    By inserting m from equation 1 into a from equation 2 with ARef = 1 we get:

    p = 10 log(r^2 + i ^ 2)

    Note that this gives you a measure of relative signal power rather than amplitude.