# Calculating DC from signal avg or rms value required?

If we want to calculate a dc value of any given signal, should the dc value be RMS or average value?

• When calculating an RMS, the information about signs of signal samples is lost. Also, the RMS result sign is ambiguous. Even not delving deeper into the matter, which of these two operations, averaging or RMS, is a better candidate to find an (unique) DC value? Jul 2 at 8:47

The average value of a signal $$s(t)$$ is given by

$$\overline{s(t)}=\lim_{T\to\infty}\frac{1}{T}\int_{-T/2}^{T/2}s(t)\, dt\tag{1}$$

The RMS (root mean square) value is the square root of the average of the squared signal:

$$\left(\overline{s^2(t)}\right)^{1/2}=\lim_{T\to\infty}\sqrt{\frac{1}{T}\int_{-T/2}^{T/2}s^2(t)\, dt}\tag{2}$$

Note that given two signals $$s_1(t)$$ and $$s_2(t)=-s_1(t)$$ we have

$$\overline{s_1(t)}=-\overline{s_2(t)}\tag{3}$$

i.e., their average values have opposite signs, whereas

$$\left(\overline{s_1^2(t)}\right)^{1/2}=\left(\overline{s_2^2(t)}\right)^{1/2}\tag{4}$$

because both signals have the same power.

Property $$(3)$$ indicates that it is the average value $$(1)$$ of a signal that is useful for defining its DC value. Also note that if you used the rms value as a DC value, all sinusoids and all other periodic functions would always have a non-zero DC level.

As a final note, the DC value of a signal is not equal to the value of its Fourier transform at zero frequency. This is explained in this answer.

• To clarify and confirm we agree: If there is DC in a signal, then we will have an impulse at $f=0$ in the Fourier Transform with the area of that impulse equal to the DC value. Any continuous function in the Fourier Transform that passes through $f=0$ with non-zero values does not have anything to do with the DC value - it must be an impulse. Jul 2 at 12:39
• @DanBoschen: Yes, if the Fourier transform has no impulse at DC, then the DC value must be zero. A finite value of the Fourier transform at DC means that the DC value of the signal is zero. Think about the presence of a sinusoidal component at some (non-zero) frequency. It's only present if there's an impulse in the Fourier transform. A non-zero value of the Fourier transform at that frequency doesn't imply a sinusoidal component at that frequency. Jul 2 at 13:10 RMS is the square root of the mean of the squares, and is typically used as a measure of average power (as the squares are the power units, and the square root of that bringing it back to a magnitude quantity). DC is simply the mean or the component of the signal that is constant with time. If there is only DC, then the DC value and RMS value will be the same, but for an arbitrary or unknown signal, the mean should always be used to determine the DC component.

• +1 :) ${ }{}{}$ Jul 2 at 13:13
• It added a 1000 words to your good math. Jul 2 at 13:15
• Just one little thing, I was wondering about the rms value of $11.446$ Volts in the right-most figure. It's correct when looking at the sum of the two functions on the left, but it doesn't add up when looking at the function in the figure on the right (where the sinusoid has an amplitude of $1$ instead of $10$). No big deal, but it might be confusing for a beginner. Jul 2 at 17:26