MATLAB: What is the relation between DFT and PSD of a signal

fftMATLABpsd

Mathematically the PSD of signal x(t) is the Fourier transform of Autocorrelation function of x(t)
2) But In MATLAB it is seen that the POWER SPECTRAL DENSITY (PSD) is directly obtained from the FFT of a signal x(t) as follows.
N = Number of data points or length of signal x(t), Nf = 2^nextpow2(N), Xk = fft (x, Nf), PSD = [ Xk * conj(Xk) ] / Nf, fs = Sampling frequency, f = fs * linspace (0, 1, Nf), Creates frequency vector, The graph of PSD Vs f is called PSD curve.
Does it mean that the DFT of x(t) directly gives PSD of x(t) ?

Best Answer

It can be shown that PSD can alternatively be estimated by the square of magnitude of FFT. You should be able to find it in most spectral analysis text books, e.g., Kay's Modern Spectral Estimation, equation 4.2, pp 65