Normalization when calculating power spectral density

Power spectral density calculation method: -

F = fft (s);

PSD = (1/N) * F * conj(F);

      

Where "s" is the input that is provided to me as an array.

I also know the sample rate (Fs)

.

I want to know what should be the value of the Normalizing Factor "N"

.

+3


source to share


2 answers


There are many different definitions for the power spectral density function and therefore different scaling factor capabilities. Section 13.4 Numerical Recipes in C contains several general definitions such as:

  • defined for discrete positive, zero and negative frequencies, and its sum over them is the mean square amplitude of the function
  • is determined only for zero and discrete positive frequencies, and its sum over them is the mean root-mean-square amplitude
  • defined in the Nyquist interval of -f c to f c, and its integral over this range is the mean square amplitude of the function
  • defined from 0 to f c, and its integral over this range is the rms amplitude function

The correct definition and scaling factor will therefore be specific to your application. To illustrate the impact that these different definitions can have on scaling factor, I have provided below some specific implementations that use different definitions.

Since I mentioned the Numerical recipes book, we can start looking at the definition chosen to show an example PSD implementation (without assuming that this is the correct definition). In this case, the second definition indicated above was used (ie "Defined only for zero and discrete positive frequencies, and its sum over them is the mean root mean square amplitude"), which leads to normalization:



len = length(F);
N   = 0.5*len^2;
PSD = (1/N) * F(1:len/2) * conj(F(1:len/2));

      

Octave pwelch , on the other hand, uses a different definition of power spectral density (namely the last one mentioned above), which results in a different normalization, approximated by:

len = length(F);
N   = 0.5*len*Fs; % where Fs is the sampling rate
PSD = (1/N) * F(1:len/2) * conj(F(1:len/2));

      

+4


source


N

is simply the number of points in the FFT. So if your FFT has, say, 2048 points, then you need to scale the size of the FFT's output bins to 1 / 2048

.



+1


source







All Articles