Re: BASIC
RMS current and voltage are mostly used in alternate current (AC) measurements.
If you try to calculate the simple average of an AC sinusoidal (or any other periodic) waveform (current or voltage) symetrical from ground, you will get the value zero, as the waveform is composed of positive and negative values, unless you take only one semi cycle (positive or negative alone).
But AC waveforms of current or voltage can generate power, so using RMS (root mean square) calculation, you can obtain a value relationed to power (V x I) without the cancellation of negative with positive values. The RMS value is the equivalent AC voltage or current that generates the same power of a DC voltage or current value.
When you squared (to 2nd power) the negative samples/values of the waveform, you turn them into positive values that are added to the positive squared samples. After that you divide by the number of samples and do the root square of the "averaged sum of squares" and obtain the RMS value (for sinusoidal waveform, RMS value is 70% of the peak value, and average value of one semi cycle is 63% of the peak value).
RMS calculation can be used also in measuring vibration or any other physic event that is variable. Obs. power is not measured in RMS, there is no the unit Wrms, as it does not make sense.