If I want to estimate the rms noise of a DC signal, like a DC offset reading of an analog transducer sampled at a certain frequency.

So imagine I used the anti-aliasing filter correctly and and fed the DC output to a a 16-bit ADC and sampled it for 30 seconds and recorded samples of this DC analog signal.

Now since we can plot the data or make analysis of this logged DC by using the samples, my question is about estimating the rms noise of this sampled data of the DC input.

I call the sampled DC signal as s[n] or simply s. The mean of the signal as I call mean(s). And rms of the signal is rms(s) and standard deviation of the signal as stdv(s).

Now if I want to estimate the rms noise which one below is more convenient to use and why?:

1) rms noise = rms(s-mean(s)) ? (Should I subtract the mean value even if I short the ADC inouts+)

2) rms noise = stdv(s) ?

Are the above equivalent? If so, which type of standard deviation is this?

  • \$\begingroup\$ How can you have a standard deviation of a constant (dc) value? This does not make sense to me. \$\endgroup\$ – Elliot Alderson Sep 3 at 12:26
  • \$\begingroup\$ @ElliotAlderson The DC input is something like a 5V battery. It will have some noise on it but stiill called DC in the forum afaik- \$\endgroup\$ – user1999 Sep 3 at 12:37
  • \$\begingroup\$ @user1999 There are several ways of computing the RMS value around the mean. One is the obvious (found everywhere.) One is based upon a slight bit of algebraic manipulation. Both work. But they have numeric analytic differences. Are you looking to compute the RMS around a mean? (I just want to be sure.) \$\endgroup\$ – jonk Sep 4 at 8:31

The standard equation for computing \$\sigma\$ is:

$$\sigma^2=\frac1N\sum \left(x_i-\overline{x}\right)^2$$

The above is the population variance.

For sample variance there is a slightly different form:

$$\sigma^2=\frac1{N-1}\sum \left(x_i-\overline{x}\right)^2$$

Taking the population variance equation above, for example, a more computationally efficient algorithm is:

$$\sigma^2=\frac1N\left(\sum x_i^2-\frac1N\left(\sum x_i\right)^2\right)$$

Here, you compute two sums. One sum of \$x_i^2\$ and another of \$x_i\$. The problem here is that you are taking the difference of two "large" values. So long as these values of \$x_i\$ are integers and so long as your summation accumulator is sufficiently large enough to avoid overflow, there's no difficulty with the efficient algorithm.

Also, in most cases, the values of \$x_i\$ are close to each other. So even if the values of \$x_i\$ are in floating point notation, there may be no difficulties.

However, if your values of \$x_i\$ are in floating point notation and if their dynamic range is wide (spans from small values to large values as might be found over the large range of stellar distances), then you will need to pre-sort the values (smallest to largest) prior to performing the summations, so that the smaller values have a change to accumulate sufficiently to have an impact when the larger values begin to be summed into the result.

The more robust algorithm will pre-sort, smallest to largest, all the \$x_i\$ values before performing the summations. It will also be aware that the final result is the difference of two relatively large values. So the remaining precision of the result is limited by the residual significant bits of the result. Just a note to the wise.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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