# 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.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
• ### Similar Content

• This is a post as a reference to others on how I resolved my ghosting issues. Well mostly resolved, I still have a 1mV per 1V adjustment. Works fine with my hardware in between. You may want to tweak the values around to get none at all. Feel free to post your values and how you fixed ghosting issues. I only added Crosstalk as a reference in subject for those that are unaware of ghosting.

Same Topic on NI Forums:
http://forums.ni.com/t5/Multifunction-DAQ/Ghosting-Resolved-Crosstalk/td-p/3196396

My Offline Setup:
Direct connection of a NI PXI-6723 to a NI PXI-6255. I tweaked around with the capacitors, but not so much with the resistors.
Ghosting was resolved having a 100K resistor and 25nF capacitor on each Analog Input Signal to GND.
A dummy channel (in my case I just added an extra AI reads to DAQmx AI) between each Analog Input Signal. These dummy channels were connected to GND using a 100K resistor and 47nF capacitor.
I had to reduce either my rate or the AIConv.Rate proprety node.

My Live setup with the minor hardware in between:
I had to remove the 100K resistor and 25nF capacitor on the Analog Input Signals (This caused too much voltage drop on the system).
Everything else remained. No ghosting at all.

Other References:
How Do I Eliminate Ghosting from My Measurements?
M Series User Manual (Chapter 4)

• By Sagi
Hello,
I am trying to get my Keithley3706A up and running with LabVIEW but there are still some problems I am facing.

I want to measure x channels with usage of filter.
So I want to measure each channel x times and filter the results.

I have found some functions like:
dmm.filter.enable = True
dmm.filter.count = 100
dmm.filter.type = dmm.FILTER_REPEAT_AVG
dmm.filter.window =0,1

but it seems it still wont work.

I am using the vi's Keithley itself provides on their homepage.

Another problem I have is that I cant get more than 9 values into my buffer, for example if i want to create a scanlist with 1001:1010 I only get one value. If i create my scanlist with 1001:1009 it works just fine.

I could not find any reference to this problem by now.

Sagi

• Hello,

The 34401A is not longer available in Canada. We need to change and use the 34461A as a replacement and we are having trouble with the peak-to-peak measurements (We are using LabVIEW).

We use the peak-to-peak option while reading a communication line in order to get the min and max values. The code:

Visa Write

34410A
CONF:VOLT:AC
VOLT:AC:PEAK:STAT ON
INIT
FETC?

Visa Write

FETC:VOLT:AC:PTP?

This code no longer works with the 34461A. Reading the AC will only give the RMS values. We dont really care how to get the min-max of the communication channel, as long as it is in a respectable time (10s at most...). Reading the signal with DC is not fast enough. The communication signal is Â±100mv. We verify the min-max range to be around 200mV.

Thanks
×