neoflash
Advanced Member level 1
power spectral density fft
There is a matlab embeded example for FFT PSD analysis:
-----------------------------------------------
t = 0:.001:.25;
x = sin(2*pi*50*t)
X = fft(x,256)
% why PSD is |x(f)|^2/256 ? should not that be divided by T=256*0.001 ??
PSD = X.*conj(X)/(256);
f = 1000/256*(0:127);
plot(f,PSD(1:128))
title('Power spectral density')
xlabel('Frequency (Hz)')
-------------------------------------------
As stated above, matlab calculated x's fft and derive its PSD by using:
PSD = X.*conj(X)/(256);
I am very very curious about why it is divided by 256, not 256*0.001??
Since PSD should be defined as |X(f)|²/T, T is the length of computing length in time domain.
thanks.
There is a matlab embeded example for FFT PSD analysis:
-----------------------------------------------
t = 0:.001:.25;
x = sin(2*pi*50*t)
X = fft(x,256)
% why PSD is |x(f)|^2/256 ? should not that be divided by T=256*0.001 ??
PSD = X.*conj(X)/(256);
f = 1000/256*(0:127);
plot(f,PSD(1:128))
title('Power spectral density')
xlabel('Frequency (Hz)')
-------------------------------------------
As stated above, matlab calculated x's fft and derive its PSD by using:
PSD = X.*conj(X)/(256);
I am very very curious about why it is divided by 256, not 256*0.001??
Since PSD should be defined as |X(f)|²/T, T is the length of computing length in time domain.
thanks.