Inmathematics, theroot mean square (abbrev.RMS,RMS orrms) of aset of values is thesquare root of the set'smean square.[1]Given a set, its RMS is denoted as either or. The RMS is also known as thequadratic mean (denoted),[2][3] a special case of thegeneralized mean. The RMS of a continuousfunction is denoted and can be defined in terms of anintegral of the square of the function.Inestimation theory, theroot-mean-square deviation of an estimator measures how far the estimator strays from the data.
The RMS value of a set of values (or acontinuous-timewaveform) is the square root of the arithmetic mean of the squares of the values, or the square of the function that defines the continuous waveform.
In the case of a set ofn values, the RMS is
The corresponding formula for a continuous function (or waveform)f(t) defined over the interval is
and the RMS for a function over all time is
The RMS over all time of aperiodic function is equal to the RMS of one period of the function. The RMS value of a continuous function or signal can be approximated by taking the RMS of a sample consisting of equally spaced observations. Additionally, the RMS value of various waveforms can also be determined withoutcalculus, as shown by Cartwright.[4]
Sine,square,triangle, andsawtooth waveforms. In each, the centerline is at 0, the positive peak is at and the negative peak is atA rectangular pulse wave of duty cycle D, the ratio between the pulse duration () and the period (T); illustrated here witha = 1.Graph of a sine wave's voltage vs. time (in degrees), showing RMS, peak (PK), and peak-to-peak (PP) voltages.
If thewaveform is a puresine wave, the relationships between amplitudes (peak-to-peak, peak) and RMS are fixed and known, as they are for any continuousperiodic wave. However, this is not true for an arbitrary waveform, which may not be periodic or continuous. For a zero-mean sine wave, the relationship between RMS and peak-to-peakamplitude is:
Peak-to-peak
For other waveforms, the relationships are not the same as they are for sine waves. For example, for either a triangular or sawtooth wave:
Waveforms made by summing known simple waveforms have an RMS value that is the root of the sum of squares of the component RMS values, if the component waveforms areorthogonal (that is, if the average of the product of one simple waveform with another is zero for all pairs other than a waveform times itself).[5]
Alternatively, for waveforms that are perfectly positively correlated, or "in phase" with each other, their RMS values sum directly.
Electrical engineers often need to know thepower,P, dissipated by anelectrical resistance,R. It is easy to do the calculation when there is a constantcurrent,I, through the resistance. For a load ofR ohms, power is given by:
However, if the current is a time-varying function,I(t), this formula must be extended to reflect the fact that the current (and thus the instantaneous power) is varying over time. If the function is periodic (such as household AC power), it is still meaningful to discuss theaverage power dissipated over time, which is calculated by taking the average power dissipation:
So, the RMS value,IRMS, of the functionI(t) is the constant current that yields the same power dissipation as the time-averaged power dissipation of the currentI(t).
Average power can also be found using the same method that in the case of a time-varyingvoltage,V(t), with RMS valueVRMS,
This equation can be used for any periodicwaveform, such as asinusoidal orsawtooth waveform, allowing us to calculate the mean power delivered into a specified load.
By taking the square root of both these equations and multiplying them together, the power is found to be:
Both derivations depend on voltage and current being proportional (that is, the load,R, is purely resistive).Reactive loads (that is, loads capable of not just dissipating energy but also storing it) are discussed under the topic ofAC power.
In the common case ofalternating current whenI(t) is asinusoidal current, as is approximately true for mains power, the RMS value is easy to calculate from the continuous case equation above. IfIp is defined to be the peak current, then:
wheret is time andω is theangular frequency (ω = 2π/T, whereT is the period of the wave).
SinceIp is a positive constant and was to be squared within the integral:
but since the interval is a whole number of complete cycles (per definition of RMS), the sine terms will cancel out, leaving:
A similar analysis leads to the analogous equation for sinusoidal voltage:
whereIP represents the peak current andVP represents the peak voltage.
Because of their usefulness in carrying out power calculations, listedvoltages for power outlets (for example, 120V in the US, or 230V in Europe) are almost always quoted in RMS values, and not peak values. Peak values can be calculated from RMS values from the above formula, which impliesVP = VRMS × √2, assuming the source is a pure sine wave. Thus the peak value of the mains voltage in the USA is about 120 × √2, or about 170 volts. The peak-to-peak voltage, being double this, is about 340 volts. A similar calculation indicates that the peak mains voltage in Europe is about 325 volts, and the peak-to-peak mains voltage, about 650 volts.
RMS quantities such as electric current are usually calculated over one cycle. However, for some purposes the RMS current over a longer period is required when calculating transmission power losses. The same principle applies, and (for example) a current of 10 amps used for 12 hours each 24-hour day represents an average current of 5 amps, but an RMS current of 7.07 amps, in the long term.
The termRMS power is sometimes erroneously used (e.g., in the audio industry) as a synonym formean power oraverage power (it is proportional to the square of the RMS voltage or RMS current in a resistive load). For a discussion of audio power measurements and their shortcomings, seeAudio power.
In thephysics ofgas molecules, theroot-mean-square speed is defined as the square root of the average squared-speed. The RMS speed of an ideal gas iscalculated using the following equation:
whereR represents thegas constant, 8.314 J/(mol·K),T is the temperature of the gas inkelvins, andM is themolar mass of the gas in kilograms per mole. In physics, speed is defined as the scalar magnitude of velocity. For a stationary gas, the average speed of its molecules can be in the order of thousands of km/h, even though the average velocity of its molecules is zero.
When two data sets — one set from theoretical prediction and the other from actual measurement of some physical variable, for instance — are compared, the RMS of the pairwise differences of the two data sets can serve as a measure of how far on average the error is from 0. The mean of the absolute values of the pairwise differences could be a useful measure of the variability of the differences. However, the RMS of the differences is usually the preferred measure, probably due to mathematical convention and compatibility with other formulae.
From this it is clear that the RMS value is always greater than or equal to the average, in that the RMS includes the squared deviation (error) as well.
Physical scientists often use the termroot mean square as a synonym forstandard deviation when it can be assumed the input signal has zero mean, that is, referring to the square root of the mean squared deviation of a signal from a given baseline or fit.[8][9] This is useful for electrical engineers in calculating the "AC only" RMS of a signal. Standard deviation being the RMS of a signal's variation about the mean, rather than about 0, theDC component is removed (that is, RMS(signal) = stdev(signal) if the mean signal is 0).