This is a two part article to describe rms ... it is particularly aimed at basic PWM calculation here.
Part 2:
Find (∑ v)/n when v = -1,-2,-3,-4,-5,1,2,3,4,5
If that looks difficult to understand, then see part 1 here:
http://everycircuit.com/circuit/4722989450133504
You should find here that ∑ v = 0
We have hit a common problem:
The minus values have offset the +ve values.
To get round this problem we can:
1: Square every value, then find the sum .... ie: ∑ v²
2: Then we can find the mean .... ie: (∑ v²)/n
3: Then we can take the square root of that result, to undo the squaring: √ [(∑ v²)/n]
The reason we squared/unsquared, was (amongst other things) to get rid of minus signs. eg: -3² = +9 etc.
Let's do that for the original problem above. ie: Find √ [(∑ v²)/n] when v = -1,-2,-3,-4,-5,1,2,3,4,5
1: 1,4,9,16,25, 1,4,9,16,25 ie: ∑ v² = 110 ..... the sum of v squareds is 110
2: 110/10 ie: (∑ v²)/n = 11 ..... the mean of the v squareds is 11
3: √11 = 3.32 ..... the sq root of the mean squareds is 3.32 ... the mean of original numbers.
That final answer for the mean of all of those numbers is very slightly different to the exact 3 that you might expect, but that difference has extremely important implications in data analysis regarding sampling. Simply altering each -ve to become a +ve instead of using √ [(∑ v²)/n] would miss this analytical potential (see footnote).
Here is what we did:
We ended up taking the square root (often just called the root) of the mean which was found by using the squared values.
See again how you did that just above here in those three steps as a reminder now.
So ....
You took the Root of the Mean Squared values ....
ie: You found the RMS ie: rms = √ [(∑ v²)/n]
You squared all the values, then found the mean of that, then unsquared the result.
Finding the rms of a set of digits in that way is a well known method of finding a "mean" average answer, which is useful because it overcomes the -ve values which were offseting the +ve values ... which otherwise may give us a mean average answer of zero, which we can't use.
Now think of a wave such as the Mains a.c. 50Hz. To find the average (ie the mean) voltage, the rms is used just as above here so that the -ve values do not cancel out the +ve values along the sine wave curve.
The peak values of approx. +/- 325v occur, and are shown on the EC scope, but on average the voltage is the rms of approx 230v. (325 / √2 = 230v where that √2 is an easy factor result for a sine wave to replace the equivalent of all of the maths squaring etc which we did above.)
If instead, we have a square wave (such as with PWM) then the handy √2 factor which replaced all the maths squaring etc. does not apply as it did for the sine wave.
However, to obtain RMS for a PWM we find that:
Vrms = Vpeak x √D where D is the Duty Cycle
eg: if d.c. Vpeak is 15v and the duty cycle (D) is 0.5
then Vrms = 15 x √0.5
ie: Vrms = 15 x 0.707107
so Vrms = 10.6066v
compare that Vrms of Vpeak x √D ≈ 10.6v against the Vavg which is a simple Vpeak x D = 7.5v
We also know that Pavg = V²rms/R (as in P=V²/R)
where Pavg is the average Power for a PWM
so .... if say R = 10k Ohm
Then Pavg = 10.6066²/10000 ..... (cp 7.5²/10000 if we had used Vavg instead of Vrms as our average).
so Pavg = 112.5/10000 Watt
ie: Pavg = 0.01125 W
ie: Pavg = 11.25mW
Q: Can we be sure that this Pavg is correct?
A: Check .... Pavg = (V²peak/R) x Duty Cycle .... this is an alternative valid formula.
15²/10000 = 0.0225W for full 100% duty cycle.
Then since our duty cycle is 0.5 .... we have 0.0225 x 0.5 = 0.01125W ie: 11.25mW as found above.
This confirmation also consolidates the validity of the Vrms.
You now understand how to obtain RMS as the "mean" average and can use known factors or formulae to obtain required values such as Vrms, and Pavg by using that Vrms.
Irms current can also be used when calculating Pavg for PWM:
eg: Pavg = Irms x Vrms
or Pavg = I²rms x R
The Irms is found in a similar way to the Vrms:
Vrms = Vpeak x √D
Irms = Ipeak x √D
Pavg = V²rms/R is the recommended formula to use whenever possible for average Power.
rms = √ [(∑ v²)/n] is the general formula to find the rms mean (average) of any set of digits.
Avoid using the current if possible since it just makes things a little more confusing, but the answers work out just the same if you do need to use the current.
The Vavg could be used instead of Vrms, but it would need pointless re-arrangement of formula and would not conform to the industry standard of P = V²/R
Notice that Pavg is used throughout and is found by using Vrms ...
(There is no sensible usage of the term "Prms").
This article does not cover a.c. caps, inductors or frequency/carrier/signal considerations. It is a basic introduction to rms.
You are now able to use and read things like ∑ and (∑ v)/n wherever you like within or outside EC.
Maths symbols like that to use in EC can be copied and pasted from here: http://everycircuit.com/circuit/5283024345759744
Footnote: **
You may be wondering how the Vrms works to provide the correct Pavg outcome, and how the formula of Vrms = Vpeak x √D in PWM relates to the earlier description of summing numbers etc.
To answer that we would have to talk in the language of integral calculus, where the discrete digits symbol ∑ (often used in statistical analysis) is replaced by the continuum symbol ∫ .... so there are times when we just need to accept the derived formulae and use them. If any reader here would like to pursue that line however, then I would be happy to encourage that, because it gives far greater insight in to the working principles. eg: how does √2 replace all the mentioned calculations for a sine wave rms etc.
For now just remember that for a sine wave:
Vrms = Vpeak / √2
Pavg = V²rms /R just as it is for PWM as per P=V²/R
|