Power Spectrum and Power Spectral Density From signal theory we know that a very useful representation of some power signals is that of its power spectral density, whose curve represents how the total power of the signal is distributed at all frequencies. For instance, it is a couple of dirac pulses for a sine wave of frequency f0 because its power is concentrated at frequencies f0 and -f0. 

But in some different situations I have seen that we often use not exactly the power spectral density representation, but the power representation.

EXAMPLE 1: Measurements with Spectrum Analyzer

If we use a spectrum analyzer, we see in abscissa the different frequencies, and in ordinate the power of the signal. For instance, this is a measurement I have done:



I have sent to the instrument a sine wave of -13dBm of power, and its total power is represented in ordinate of the peak. What does it mean from a math point of view?

I think this representation has no sense: the ordinate should be the power spectral density, not its integral in a neighborhood around the frequency considered! 

Example 2: simulink

This is the representation of the power spectral density of a certain noise:



This is the representation of the power of the same noise:



What is the link between them? Power should not be function of frequency (it is the integral on all frequencies of power spectral density), power spectral density yes! So what does it mean that we see the "power spectrum"?
What is the link between them? Power should not be function of
  frequency (it is the integral on all frequencies of power spectral
  density)


As far as a Spectrum Analyzer is concerned, to display the power spectrum in dBm, what it does it to take the FFT and compute square of magnitude $P_n = 20  \times log_{10}(|X(f_n)|^2*1000/100)$ with $f_n$ being the discrete frequencies separated by resolution bandwidth (see it is set to 1kHz for this case). I multiplied by 1000 since unit is in dBm and I divided by 100 because to get to power, I have to pass voltage $X(f_n)$ through a resistance of $50\Omega$. ($\frac{V^2}{2R}$).

To derive power spectral density from power spectrum, I am sure it is just dividing power in each bin by RBW. $P_n/f_{rbw}$. Though I am not very sure whether it is the (dBm value divided by rbw) or (dBm value of linear power value divided by rbw).


  I think this representation has no sense: the ordinate should be the
  power spectral density, not its integral in a neighborhood around the
  frequency considered


Well, in this case it is the latter. I think that is how all commercial spectrum analyzers represent spectrum (if you choose units as dBm or Watts). The comment by MBaz correctly mentions this.

Note - The final plot will be slightly different because your FFT size output will be different from number of trace points used to display on the screen. In order to combine several FFT points into 1 trace point on screen, a detector logic is used.