# How to properly express periodogram over analog frequency?

Assume a signal $x[n]$ with $N$ samples and its $N$-point FFT $X[k]$. Assume also the simplest power spectral density estimator: $$S_x[k] = \frac{\left| X[k] \right|^2}{N}$$

With this estimator, the average total power can be evaluated as:

\begin{align} P_x = \sum \limits_{k=0}^{N-1} S_x[k] \Delta F \end{align} where $\Delta F$ is the distance between digital frequency points represented by the FFT and is equal to $\frac{1}{N}$.

At this point, a first question arises, what is the unit of $S_x[k]$? Is it $\frac{V^2}{\text{subcarrier}}$?

In the case of an analog frequency horizontal axis, the total power would be evaluated as: \begin{align} P_x = \sum \limits_{k=0}^{N-1} S_x[k] \Delta f \end{align} where $\Delta f$ is the distance between analog frequency points represented by the FFT and is equal to $\frac{f_s}{N}$ (FFT frequency spacing).

Sequentially, in order to represent the power spectral density over an analog frequency, the PSD estimator has to be modified to: \begin{align} S_x[k]' = \frac{S_x[k]}{f_s} \end{align} where $f_s$ is the sampling frency.

Is this analysis correct?

Here is a MATLAB snippet to verify this:

clear all
clc

N = 4096;   % FFT size
fs = 200e6; % Sampling frequency in Hz

Px = 4;     % Target total power

x = sqrt(Px)*randn(N,1);    % Gaussian noise with power Px

% Verify signal variance
fprintf('Signal total power: %d\n', var(x))

X = fft(x,N);

Sx = (abs(X).^2)/N;  % Simplest PSD estimator

deltaF = 1/N;        % Digital frequency spacing

figure
plot((0:N-1)*deltaF, 10*log10(Sx))
xlabel('Digital Frequency')
grid on

% Verify total power
Px = sum(Sx*deltaF)

Sx_analog = Sx/fs;

deltaf = fs/N;        % Analog frequency spacing

figure
plot((0:N-1)*deltaf, 10*log10(Sx_analog))
xlabel('Analog Frequency (Hz)')
grid on

% Verify total power
Px_2 = sum(Sx_analog*deltaf)