0

How to choose scaling factor for calculating PSD? Because I saw abs(fft)^2 scaled by fs/N (frequency binwidth) and also 1/fs*N. obviously output amplitude values will be different. So I want to know which scaling factor will choose? or in which situation each scaling factor will take?

I am showing matlab program from google here.

N = length(x); xdft = fft(x); xdft = xdft(1:N/2+1); psdx = (1/(FsN)) * abs(xdft).^2; psdx(2:end-1) = 2psdx(2:end-1); freq = 0:Fs/length(x):Fs/2;

plot(freq,10*log10(psdx)) grid on title('Periodogram Using FFT') xlabel('Frequency (Hz)') ylabel('Power/Frequency (dB/Hz)')

psdx = (1/(Fs*N)) * abs(xdft).^2; this is scaling the amplitude of signal instead of that I did

bin=Fs/NFFT; B=F.*conj(F)/bin; %% F=fftshift( abs(fft(ampli,NFFT))); is this correct for psd calculation ?

ARATHI P
  • 29
  • 4

0 Answers0