I have a signal that is sampled at $20 \mathrm{Hz}$. It has almost stationary behavior, with a main frequency around $1\ \mathrm{Hz}-1.5 \ \mathrm{Hz}$. This frequency range is to be expected and is of interest for further processing. Unfortunately, I don't know the noise present at the signal in order to calculate the SNR of the signal as a way of assessing its quality.

I was thinking that since I know a priori the frequency range of the fundamental frequency of interest that should exist in the signal, I could calculate the SNR based on the power spectral density (PSD) of the signal. Moreover, after PSD calculation using Welch's method, I could integrate within a frequency range that corresponds to my main frequency (assuming that within this frequency range there is one main lobe) and divide that to the integration of the rest of the calculated spectrum as an SNR metric:

$$\mathrm{SNR}_\textrm{metric}=\frac{\int_{n_{f_1}}^{n_{f_2}}p_{xx}(n)*f(n)dn}{\int_{n_\textrm{f=0}}^{n_{f=f_1}}p_{xx}(n)*f(n)dn + \int_{n_{f=f2}}^{n_{f=\textrm{flast}}}p_{xx}(n)*f(n)dn}$$

where $p_{xx}$ the PSD, $f(n)$ the corresponding frequencies vector based on Welch's PSD calculation method, $n$ is the index of the frequencies and $f_1$, $f_2$ is the bandwidth at the PSD that surrounds the fundamental peak of the frequency of interest that should be around 1.0 to 1.5 Hz when the lobe attenuates completely.

  1. Would you consider this approach valid and why?
  2. If you have advice for a different method to calculate the SNR let me know!

I would like to thank everyone in advance.


1 Answer 1


Assuming the noise is evenly distributed among all frequencies, this approach makes sense in principle. However, some corrections:

  1. You should not integrate over $pxx(n)f(n)dn$, since n is already the frequency. I think, you mean $\Delta_f(n)$, which is the frequency step between two bins. Assuming $\Delta_f(n)$ is equal and independent of n, then you can even cancel it in the equation.

  2. You need to divide the noise and signal components by the respective bandwidth of the integral. Otherwise you will calculate more noise, when the bandwidth increases.

  3. currently, you calculate (signal+noise)/noise. Though, you want to calculate signal/noise, i.e. (signal+noise-noise)/noise


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.