PSD normalization by sampling frequency (Fs) and Block Size (N)

20 views (last 30 days)
Hello,
I can not clearly understand the reason why the PSD in documentation of Signal Processing Toolbox is divided by (Fs*N) (sampling frequency (Fs) and Block Size (N)).
N = length(x);
xdft = fft(x);
xdft = xdft(1:N/2+1);
psdx = (1/(Fs*N)) * abs(xdft).^2;
psdx(2:end-1) = 2*psdx(2:end-1);
freq = 0:Fs/length(x):Fs/2;
I read in Siemens community (https://community.sw.siemens.com/s/article/what-is-a-power-spectral-density-psd) that the PSD is calculated by deviding the autopower spectra by the frequency resolution (Δf=Bandwidth/Spectral lines = (Fs/2)/(N/2)=Fs/N).
First, is the autopower spectra equal to abs(xdft).^2?
Second, why we should not divide it with Fs/N (frequency resolution (Δf))?
i.e.
psdx = (N/Fs) * abs(xdft).^2;
* I found a possible explanation in https://uk.mathworks.com/matlabcentral/answers/15770-scaling-the-fft-and-the-ifft#comment_847301 . However, I am not sure if the fft() function produces the f_scaled as this link states.
Thanks a lot,
Ilias
  2 Comments
theMking
theMking on 20 Oct 2022
@Mathieu NOE The attached .pdf is extremely helpful in terms of stating the obvious.
The intention is not to add or subtract correlated or uncorrelated samples nor is it to find the total power in a band, any band. The question is on normalisation of power spectrum with respect to the frequency resolution so ower spectrum can be converted to the power spectrum density. Frequency resolution is given by Fs/N and not Fs*N. It is unclear why matlab multimplies the power spectrum by (1/(Fs*N)) in order to find power spectrum density.
Can someone clarify this?
@Ilias_T take Siemens' analogies with extreme care.

Sign in to comment.

Answers (0)

Products


Release

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!