# RMS of a complex waveform

For a complex waveform as follows:

One can find the squared rms of the complete waveform by finding rms of individual components and then square multiplying it with the corresponding duty cycle. $$s_n = \frac{1}{T} \int_0^T u(t)^2 dt$$ $$u_{rms} = \sqrt{d_1 s_1 +d_2 s_2 + \cdots + d_n s_n}$$

EDIT1: For example finding the rms of following waveform,

$$I_{rms} = \sqrt{d_1 I_1^2 + d_2 I_2^2}$$ Is the above method also applicable for sinusoidal wave or any other non-linear waveforms?

EDIT2: If I want to calculate the rms of a sine function defined from 54 degrees to 180 degrees with peak value of 27.44 I get 11.48 but the actual answer is 12.66.

$$RMS = \sqrt{27.44^2 * 0.35 * 0.5} = 11.48$$ here, duty cycle = 0.35

• I don't see how the $u_i$'s are defined. What is $u_2$ for example?
– Curd
Commented Jan 21, 2017 at 16:40
• The diagram is just an idea of a complex waveform. $u_i$ could be any line. Commented Jan 21, 2017 at 16:42
• but $u_i$ is one voltage value while the voltage at section $i$ is not (necessarily) constant. So what dos $u_i$ mean? The starting voltage, the final voltage, the average voltage... of that section???
– Curd
Commented Jan 21, 2017 at 16:44
• @Ansh Kumar: I know that that is "just an idea". Still the symbols used need to have a well defined meaning (I'm not asking for numerical values)
– Curd
Commented Jan 21, 2017 at 16:48
• $u_i$ is the segment extended over the period $T$. I have edited and put an example in the question. Commented Jan 21, 2017 at 16:52

Yes, the formula is correct. If you reverse engineer it a bit, it will make a bit more sense.

For instance, $d_1s_1$ is the power contribution from $s_1$ if the waveform that produced $s_1$ ($u_1$, via the integral) was present for the whole of the period from 0 to T.

Ditto all the other contributors.

For this waveform: -

If you put numbers down like $d_1$ = $d_2$ i.e. 50% duty cycle with T=1, $I_2$=5 and $I_1$=1, the RMS calculated by the equation in the question would produce this: -

$\sqrt{\frac{25}{2}+\frac{1}{2}}$ = $\sqrt{13}$

Then if you compared this with the more conventional approach of assuming it was a symetrical square wave with peak values of +2 and -2 (superimposed on a DC level of 3) you would get: -

$\sqrt{2^2+3^2}$ = $\sqrt{13}$

• So, is it valid for sinusoidal and any other non-linear functions also ? Because on calculation I was getting wrong answer(small error). Commented Jan 21, 2017 at 17:00
• It is valid as far as I'm concerned - maybe you made some rounding error? Commented Jan 21, 2017 at 17:01
• Okay, I'm putting my calculation in the question above. Commented Jan 21, 2017 at 17:07
• I don't understand the numbers in your calculation, like, where does the 0.35 come from? Ditto the 0.5? Also what is T given that the partial duration of the sinewave is 0.2 x 360 degrees? Commented Jan 21, 2017 at 17:32
• rms of the sine is $(\text{peak value})/\sqrt{2}$ so in the final calculation of rms where we have to square its value, I replaced it with $(\text{peak value})^2/2$ and 0.35 is the duty cycle 126/360 = 0.35 Commented Jan 21, 2017 at 17:37