1
$\begingroup$

Suppose we record $N$ repetions of a sinusoidal signal with noise (recording $M$ time points). We are interested in the magntiude spectrum. To improve the SNR, I average the signal traces from different repetitions. This, I can do in the time domain or in the complex Fourier domain (as the FFT is a linear operation). Then I calculate the magnitude spectrum.

Alternatively, I can also compute the magnitude spectrum for each individual trial and average over the magnitudes. This is not the same as the average above. For instance, for a signal with a fixed starting phase, I get a worse SNR. This is expected.

Assuming Gaussian or Possionian noise, what is the expected SNR difference? $\sqrt2$?

Peter

EDIT: It turns out that the SNR scaling for averaging in the time domain or the complex Fourier domain is $\mathrm{SNR} \propto \sqrt{N}$. When averaging the individual magnitude spectra, the scaling is $\mathrm{SNR} \propto {N}^{1/4}$. Besides these fundamental scalings, several improvements can be achieved as described in the answer of Dan Boschen.

$\endgroup$

1 Answer 1

1
$\begingroup$

What is important is how you do the averaging and to note that ultimately we are averaging to improve the estimate of a power measurement, and with this the square of the average is not the same as the average of the square. Averaging the magnitudes is not the same as averaging the square of the magnitudes and then taking a square root of this result (which would be called a "true-rms"), and for AWGN signals specifically, averaging the magnitudes will result in under-reporting the noise by -1.05 dB. Also if the magnitude is converted to dB first and then averaged the noise will be under-reported by -2.51 dB! This is detailed well in this great app-note AN-1303 by Key-sight back when it was Hewlett Packard as this is specifically of interest when making spectrum analyzer measurements. These factors are for complex signals which the magnitude computation converts the Gaussian distribution to a Rayleigh distribution as detailed in the app-note. If we are confident the noise process is AWGN, and we are computationally constrained, then simply averaging the magnitudes is simpler (and accurate once we account for the -1.05 dB), so it can make sense to proceed with that under those conditions. Note that similar to this for real signals is the "Mean Absolute Deviation" as a computationally efficient alternative to "Root Mean Square" which similarly under reports the true rms for AWGN specifically by $10log_{10}(2/\pi)= -1.96$ dB.

An AWGN process in time is an AWGN process in frequency so we would see similar results in both domains for that noise type. For different noise types averaging the magnitudes directly would lead to different error factors, but if a "true-rms" computation is done there is no additional error independent of signal type.

Another factor when estimating power from FFT's is the effect of windowing and how windowing increases the resolution bandwidth per bin and thus adds another factor for over-estimating noise! I detail this factor and how to properly compensate for that in these other posts.

Converting from PSD (V^2/Hz) to dBV (1 Volt RMS reference)

How to calculate resolution of DFT with Hamming/Hann window?

With these effects in mind, review implementations using Welch's Method for computing the power spectral density detailed on other posts on this site and available directly in MATLAB, Octave and Python's scipy.signal library.

$\endgroup$
3
  • $\begingroup$ Thank you very much for your detailed answer. The problem I see is that for coherent averaging I have a $SNR \propto \sqrt{N}$. However, it looks like for incoherent averaging, I get only a $SNR \propto {N}^{1/4}$. Is there anything I can do to improve e.g. if I know something about the phase of the signal I intend to measure? $\endgroup$
    – P. Egli
    Dec 18, 2021 at 18:17
  • $\begingroup$ @P.Egli yes for white noise specifically the SNR will increase at root-N when you do coherent averaging. If you know the phase of the signal then can’t you use that to then do coherent averaging? Best to update your original question if you have further clarification on what you are referring to. $\endgroup$ Dec 18, 2021 at 22:01
  • 1
    $\begingroup$ I updated the question and have outsourced the new question to a separate question dsp.stackexchange.com/q/80664/51469 as I agree this is a different situation that needs further clarification. $\endgroup$
    – P. Egli
    Dec 19, 2021 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.