If a sampled voltage signal \$y[n]\$ is composed of its offset \$\bar y\$ plus noise \$x[n]\$; i.e. \$y[n] = \bar y + x[n]\$, are both following equations for the RMS value of the noise component \$\text{RMS}(x)\$ same?:

\begin{align} \text{RMS}(x) &= \text{RMS}(y - \bar y)\\ \text{RMS}(x) &= \sqrt{\text{RMS}(y)^2 - \bar y^2} \end{align}

  1. Are both equations above correct and same?
  2. For the equations to be correct does \$x[n]\$ have to be random in nature? What if \$x\$ has periodic component?
  • 1
    \$\begingroup\$ This reads like a homework question. What work have you already done? Are you sure this wouldn't be better suited on math.SE, as it seems like a numerical analysis question? \$\endgroup\$ – Hearth Feb 16 '19 at 17:29
  • \$\begingroup\$ Have you read Bernard Widrow's book? \$\endgroup\$ – analogsystemsrf Feb 16 '19 at 17:42
  • \$\begingroup\$ no, they are not same, which you could have simply tested by trying with two random numbers that you made up in your mind, for example \$\bar y = 2\$, RMS(x) =0. \$\endgroup\$ – Marcus Müller Feb 16 '19 at 17:42
  • \$\begingroup\$ It depends on noise BW , spectral shape and crest factor Pk/avg and periodic content. Normally sampled noise is measured in Vpp as RMS could be 0V if noise spectrum exceeds sample interval spectrum, but periodic by root of sum-squared components. I would normally use Vpp signal/Vpp noise to determine SNR \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Feb 16 '19 at 17:57
  • \$\begingroup\$ @Hearth What make you to think it is homework? I'm not a student, so no its not homework. Just trying to find which equation is valid for quantifying rms noise of a sampled volatge when using MATLAB. \$\endgroup\$ – pnatk Feb 16 '19 at 18:03

Yes, those equations are correct and the same.

In the first equation, you just replace \$x\$ with its expression following from \$y=\bar{y}+x\$.

For the second equation, you can do the following: The square of the rms value of y is equal to $$ \begin{aligned} rms(y)^2\ &= \frac{1}{N}\sum_{n=1}^N (y[n])^2\\ &= \frac{1}{N}\sum_{n=1}^N (\bar{y} + x[n])^2 \\ &= \frac{1}{N}\sum_{n=1}^N (\bar{y}^2 + 2 \bar{y} x[n] + (x[n])^2) \end{aligned} $$

The first term (\$\frac{1}{N}\sum\limits_{n=1}^N \bar{y}^2\$) is just equal to \$\bar{y}^2\$.

The second term (\$\frac{1}{N}\sum\limits_{n=1}^N 2 \bar{y} x[n]\$) is zero since you can take the constant factor \$2 \bar{y}\$ out of the sum and \$\bar{x}=\frac{1}{N}\sum\limits_{n=1}^N x[n]\$ is zero.

The third term (\$\frac{1}{N}\sum\limits_{n=1}^N (x[n])^2\$) is the square of the rms value of x.

Thus $$ rms(y)^2 = \bar{y}^2 + rms(x)^2 $$ and thus $$ rms(x) = \sqrt{rms(y)^2 - \bar{y}^2} $$

The example of Marcus Müller in the comments is still valid: \$\bar{y}=2\$, \$rms(x)=0\$, and thus \$rms(y)=2\$. Note that an rms value is not the same as a standard deviation if the signal (\$y\$ here) has a non-zero mean value.

|improve this answer|||||
  • \$\begingroup\$ Thanks a lot. Very neat solution. And any hint on the second question?:) \$\endgroup\$ – pnatk Feb 16 '19 at 18:24
  • \$\begingroup\$ The only assumption is that x has zero mean. If x has a periodic component, then you need to make sure to measure an entire period (or multiple periods). \$\endgroup\$ – Koen Tiels Feb 16 '19 at 19:41
  • \$\begingroup\$ Great but in practice given the samples it is I guess very hard to figure out to clip the entire period or even figure out what is composed of in time series. \$\endgroup\$ – pnatk Feb 16 '19 at 21:21
  • \$\begingroup\$ If you take an fft (Fast Fourier transform) of your data, you can immediately see if the signal is periodic or not (if not, then you can observe spectral leakage (dsp.stackexchange.com/questions/10120/…)). \$\endgroup\$ – Koen Tiels Feb 16 '19 at 21:27

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.