2
\$\begingroup\$

For calculating RMS value , what I have found so far is that samples of a full cycle are taken then the ADC values are used to calculate RMS. Thus the RMS value stays independent of signal frequency. I can find the full cycle for a periodic signal. For example, a 50/60 Hz power line.

A problem arises for non-periodic signals, or a signal whose frequency and amplitude change to randomly. For example, an accelerometer placed in your hand and you are in a party. Then the waveshape from it will be too much random. A multimeter or an oscilloscope wpuld still show an RMS value.

How do they know from where to start taking samples and where to stop? Do they always take a fixed amount of samples and shows the RMS? In that case, RMS will not be independent of frequency.

\$\endgroup\$
1
  • \$\begingroup\$ Cheap DMMs simply LPF average the rectified signal and multiply by a constant term, the difference between average(abs) and rms for sine waves. This is obviously inaccurate for anything other than sine waves! See answers below for better equipment. \$\endgroup\$
    – user16324
    Feb 9, 2022 at 14:47

2 Answers 2

2
\$\begingroup\$

A problem arises for non-periodic signals, or a signal whose frequency and amplitude change to randomly.

The definition of RMS contains nothing about the period of the signal. In other words, the period is not a needed parameter in order to calculate the RMS of a signal.

Here's the generalised definition:

$$ x_{rms}=\lim_{T \to \infty} \sqrt{\frac{1}{2T}\int_{-T}^{+T}x^2(t) \ dt} $$

And it can be written as following for time-continuous signals:

$$ x_{rms}=\sqrt{\frac{1}{T_2-T_1}\int_{T_1}^{T_2}x^2(t) \ dt} $$

See? Nothing about the period.

It gets easier to calculate the RMS if the signal is periodic (e.g. sine wave) because you don't need a wide time interval to take measurements since the RMS of the whole signal in an infinite time interval is equal to the RMS of one period. That's probably why you are confused about the period.

How do they know from where to start taking samples and where to stop? Do they always take a fixed amount of samples and shows the RMS? In that case, RMS will not be independent of frequency.

The second formula above is the one that a DMM and an oscilloscope uses. And, as you might guess, the result approaches to a more accurate value as the time interval increases.

\$\endgroup\$
7
  • 2
    \$\begingroup\$ I found a web site a couple of years ago that explained the relationship between the number of cycles of the signal and the percentage of error. To get below 1% error, you need something like at least 8 cycles of the signal. I haven't been able to find that site again. \$\endgroup\$
    – JRE
    Feb 9, 2022 at 8:55
  • 1
    \$\begingroup\$ There's that, too. Take a sampling rate of 200 samples per second, a sampling period of 1 second, and a signal of 50Hz. You are getting four samples per cycle of the 50 Hz sine signal. That won't be a good representation of the signal - the calculated RMS will be off by a good bit. Raising the sampling rate will get a better representation of the sine - the calculated RMS will be better. \$\endgroup\$
    – JRE
    Feb 9, 2022 at 10:41
  • 1
    \$\begingroup\$ Now consider a sampling rate of 10kHz, a sampling period of 13 milliseconds, and a sine signal of 50Hz. That 13 milliseconds means you are only getting a small section of the wave. The calculated RMS will depend on which section of the wave you sampled. Increasing the sampling rate won't help. \$\endgroup\$
    – JRE
    Feb 9, 2022 at 10:44
  • 1
    \$\begingroup\$ Next consider a sampling rate of 1kHz, a sampling period of 20 milliseconds, a sampling period of 20 milliseconds, the sampling period is synchronized to the signal, and the signal is a 50 Hz sine. The RMS value of one sampling period will be good. A higher sampling rate would improve things a little. \$\endgroup\$
    – JRE
    Feb 9, 2022 at 10:51
  • 1
    \$\begingroup\$ Now consider a sampling rate of 1kHz, a sampling period of 23 milliseconds, and a 50 Hz sine signal. You'll get some wonky RMS value depending on where exactly you sample the 50Hz signal. If you now extend the sampling period by 20 milliseconds, it will get less "wonky." If you keep extending the sampling period, when you get to a sampling period of over 160 milliseconds the "wonkiness" will average out to less than 1 percent of the correct RMS value. \$\endgroup\$
    – JRE
    Feb 9, 2022 at 10:57
0
\$\begingroup\$

Oscilloscopes commonly have the integration period selectable to be either the RMS value over a period defined by the user (defaults to full screen) or over a complete period of a periodic waveform. If there isn't an integer number of cycles on the screen the two values can differ.

For example this is the calculation performed by the Rigol DS1054Z for "Period VRMS". There is an alternate selection called just "VRMS".

Page 6-30 of Rigol DS1054Z manual

Rigol DS1054Z manual

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.