The first part of the formula likely comes from the definition of Decibel, with the reference P0 set to 1, assuming with log
you meant a logarithm with base 10.
The second part, i.e. the P1=real^2 + imagined^2
in the link above, is the square of the modulus of the Fourier coefficient cn
at the n-
th frequency you are considering.
A Fourier coefficient is in general a complex number (See its definition in the case of a DFT here), and P1
is by definition the square of its modulus. The FFT that you mention is just one way of calculating the DFT. In your case, likely the real and complex numbers you refer to are actually the real and imaginary parts of this coefficient cn
.
sqrt(P1)
is the modulus of the Fourier coefficient cn
of the signal at the n-
th frequency.
sqrt(P1)/N
, is the amplitude of the Fourier component of the signal at the n-
th frequency (i.e. the amplitude of the harmonic component of the signal at that frequency), with N
being the number of samples in your signal. To convince yourself you need to divide by N
, see this equation. However, the division factor depends on the definition/convention of Fourier transform that you use, see the note just above here, and the discussion here.