# Power Spectral Density and Fast Fourier Transform basic question

I am new to signal processing and I am trying to get the basic concepts right. I have a signal and I performed the FFT of the signal in MATLAB. I also did the PSD of the signal in MATLAB using the psd command.

1) When we get the FFT of the signal, It's basically showing what frequency components are inside the signal. So it's a plot of frequency against what? It is amplitude in volt right(took the abs value of the signal)? What if I want to plot dbV against frequency should I just do a mag2dB conversion on the abs value? Is the following right?

Code I tried:

Fs = 16000;
t = 0: 1/Fs : 2*(Fs-1)/Fs;
y1 = sin(2*pi*500*t );
fshift = (fftshift(fft(y1)));
f = -8000 : 1/2 : 7999;
figure;
plot(f,mag2db(abs(fshift)));


2)Now for the PSD, I used the dspdata.psd of MATLAB and I get a plot. On the plot, I get my frequency component but the max amplitude (in dB) is not the same as the max amplitude (in dB) of the FFT plot. Why is that? Is it because dsp is using 10log 10 and mag2dB is using 20 log 10?

3) In the PSD plot I am getting two plots one blue one which is quite visible and a green one, smaller in amplitude, what is this green one?

Code below:

Fs = 16000;
t = 0: 1/Fs : 2*(Fs-1)/Fs;
y1 = sin(2*pi*500*t );
psd1=spectrum(y1,1024);
hpsd = dspdata.psd(psd1,'Fs',Fs); % Create a PSD data object.
figure;
plot(hpsd); % Plot the PSD


Yes, log power differs from log voltage by a factor of two. $2 \log{(V)} = \log{(V^2)}$. But different ways of calculating FT and inverse FT, or PSD and inverse PSD, put a constant value of $\pi$ in different places: If you use different methods of calculation, you sometimes find that you have choosen to normalize the FT differently.