# RMS vs DMM read not the same

## Recommended Posts

I'm reading a sine wave generated by a AO DAQ and reading this same signal with another AI DAQ and a DMM at the same time.

AO is set at 0.65V

AI RMS reads 0.5VÂ±0.0056

DMM reads 0.46053V Â± 0.00001

0.65/1.414=0.46 so the DMM read is accurate.

What makes the RMS LabVIEW function not reporting the accurate information? Could it be the Glitch Energy affecting the read?

On a side note, I also need an accuracy of 0.2%.

AO generates a 3KHz signal at 0.65V (450KS/s @ 150S/Buffer).

AI reads at 90KS/s at 15KS/channel.

DMM a 34401A is set VAC.

Thanks

##### Link to comment

Something I learned on one project is that you want a whole number of cycles of your waveform when you do the RMS calculation.  You could do a check for zero crossings to determine when a period ended.  I ended up doing some math with the sample rate and the expected frequency of the waveform I was capturing to figure out how many samples to truncate before doing the RMS calculation.

##### Link to comment

It might be worthwhile to look at what your AI waveform looks like. Maybe you have an offset in there.

##### Link to comment

It might be worthwhile to look at what your AI waveform looks like. Maybe you have an offset in there.

Yep, ran into that issue as well.  I had to take the cycle mean and subtract that from the waveform and then calculate the RMS.  I wonder if I still have that code floating around here...

##### Link to comment

Yep, ran into that issue as well.  I had to take the cycle mean and subtract that from the waveform and then calculate the RMS.  I wonder if I still have that code floating around here...

I have a Mean of ~0.013 for the 0.65V sine wave. Not enough to offset it. However my sine waves are not always nice. It captures the Glitch Energy and seems to be offset to the positive by much more.

It can reach the 1V at times. Not sure how it can get those kinds of values...

Both the 6723 and the 6225 are in the same PXIe-1073 chassis.

##### Link to comment

I have a Mean of ~0.013 for the 0.65V sine wave. Not enough to offset it. However my sine waves are not always nice. It captures the Glitch Energy and seems to be offset to the positive by much more.

It can reach the 1V at times. Not sure how it can get those kinds of values...

Both the 6723 and the 6225 are in the same PXIe-1073 chassis.

I think I would argue that the LabVIEW RMS calculation is more correct; if you want to get the same reading as the DMM, you would have to estimate your data to be a clean sine-wave (or calculate the RMS over more periods).

/J

##### Link to comment

I have a Mean of ~0.013 for the 0.65V sine wave. Not enough to offset it. However my sine waves are not always nice. It captures the Glitch Energy and seems to be offset to the positive by much more.

It can reach the 1V at times. Not sure how it can get those kinds of values...

Both the 6723 and the 6225 are in the same PXIe-1073 chassis.

You say your sine waves are "not always nice", but have you looked at your sine wave output on an oscilloscope to independently verify what they look like?

If the Keithley DMM is measuring the expected value, then I would think that the output should appear "clean" (not like the picture above) on the scope.

Near the zero crossing it's not unexpected to see problems in waveform measurements simply due to the resolution limit of the measuring device. That doesn't explain what is happening on some of the waves which approach ~1V when they shouldn't. That is what is causing your calculated RMS value to be higher than expected, so fix that and you'll fix your problem...

One thing I would do to see if it helped is change the voltage range used on both devices from -10V to 10V to something more in the range of -1V to 1V or -5V to 5V.

Edited by ShaunG
##### Link to comment

So I did some extra monitoring and found that the generated sine wave sometimes gives an 200015 Error.

I changed the monitoring to 1 channel and increased the sampling to 450KS/s and 45KS/channel and I get a bouncing Sine Wave with glitches all over. It gradually goes from nice to bad looking and back to nice in a loop.

You say your sine waves are "not always nice", but have you looked at your sine wave output on an oscilloscope to independently verify what they look like?

If the Keithley DMM is measuring the expected value, then I would think that the output should appear "clean" (not like the picture above) on the scope.

Near the zero crossing it's not unexpected to see problems in waveform measurements simply due to the resolution limit of the measuring device. That doesn't explain what is happening on some of the waves which approach ~1V when they shouldn't. That is what is causing your calculated RMS value to be higher than expected, so fix that and you'll fix your problem...

One thing I would do to see if it helped is change the voltage range used on both devices from -10V to 10V to something more in the range of -1V to 1V or -5V to 5V.

This is the sine waves I was getting when I scoped it a few weeks ago (shown 4 of the 8):

The spikes at the 0V are known as Glitch Energy, an effect known to happen with any DAQs when all the relays switch at once. Difficult to remove, must add hardware filters.

##### Link to comment

Is your RMS at least better?

Yeah, the symmetric errors do look like glitching. I wonder if the high input impedance is a possible contributor. You could throw a 1KOhm in parallel and see what that does. If that isn't enough add a 20nF cap in there.

Edited by infinitenothing
##### Link to comment

Try using a lower sampling rate. Start at 20 KS/sec , and increase the rate by 3 KS/sec.

Also, is it every 3rd sample peak that is distorted to ~1V?

##### Link to comment

Is your RMS at least better?

Actually the RMS is much better with 1 signal at 450KS/s and 45KS/channel. It varies between 0.459 and 0.464.

Yeah, the symmetric errors do look like glitching. I wonder if the high input impedance is a possible contributor. You could throw a 1KOhm in parallel and see what that does. If that isn't enough add a 20nF cap in there.

I did add the low pass filter in parallel and it stabilizes the signal when Read with a single channel. It stops floating on water and the most of the noise is gone.

Difference between running with 1 channel at 450KS/s @ 45KS/channel and 8 channels @ 15KS/channel:

1 Channel RMS varies between 0.4615 and 0.4617

8 Channel RMS varies between 0.4659 and 0.4660

A jump of 4mV is added to the RMS when running with 8 channels. The other channels do not have the filter installed yet.

The DMM doesn't see a difference between having 1 or 8 channels running.

This is what I get after the filter is added in parallel

Try using a lower sampling rate. Start at 20 KS/sec , and increase the rate by 3 KS/sec.

Also, is it every 3rd sample peak that is distorted to ~1V?

Yea its always the 3rd one that has the spike. I tried at 1/3 of the rate at 30KS/s and 5KS/channel and had the same effect but doesn't reach the 1V as with 90KS/s

RMS @ 30KS/s: 0.45939-0.45952

RMS @ 90KS/s: 0.49820-0.49860

What could cause such a difference? I would have assumed the higher the sampling rate the better accuracy.

##### Link to comment

When you increase the sampling rate you are starting to measure various higher order frequency harmonics associated with the DAC signal generation, ADC signal measurement, etc. These are some of the causes of the glitches you see when measuring with an ADC.

By decreasing the sampling rate you aren't able to properly sample/measure the signals with higher frequencies. I had a hunch something like this was going on when every 3rd wave looked bad.

What exactly are you trying to measure? The waveform shape, RMS voltage, or both?

If you want to measure a clean waveform shape try a higher sampling rate that isn't an integer frequency harmonic of the waveform you are sampling to see if it helps.

Edited by ShaunG
##### Link to comment

When you increase the sampling rate you are starting to measure various higher order frequency harmonics associated with the DAC signal generation, ADC signal measurement, etc. These are some of the causes of the glitches you see when measuring with an ADC.

By decreasing the sampling rate you aren't able to properly sample/measure the signals with higher frequencies. I had a hunch something like this was going on when every 3rd wave looked bad.

What exactly are you trying to measure? The waveform shape, RMS voltage, or both?

If you want to measure a clean waveform shape try a higher sampling rate that isn't an integer frequency harmonic of the waveform you are sampling to see if it helps.

I need to measure the RMS of the generated sine wave with a 0.2% precision.

There will be a transformer between the output of the 6723 card and the input of the 6225 that cleans up the signal a little.

So I guess I won't have the harmonics issues once I go live. Still strange to see those issues wince 3KHz is not a very high frequency and with the number of samples from the AI.

##### Link to comment

This isn't a matter of "3 kHz not being a very high frequency" though.  If you were measuring a 3 kHz signal from a non-digital based source such as an op-amp oscillator you might not be having the same issues.

Digitally synthesized signals have lots of interesting things going on in them. If you have access to a spectrum analyzer try looking at your signal with it to see how "clean" it really is. You'll see your signal, harmonics of your signal, possibly even reference signal frequencies used inside the hardware and their harmonics, etc.

##### Link to comment

You will be able to leave a comment after signing in

• ### Similar Content

• #### Ghosting Resolved (Crosstalk)

• 0 replies
• 3,764 views
• #### Keithley 3706A automation

By Sagi,

• 3,765 views
• #### 34461A Min-Max Not available like the 34401A

• 0 replies
• 2,332 views
×