Author Topic: Data logging with meters: Average on meter or on logging computer  (Read 2344 times)

0 Members and 1 Guest are viewing this topic.

Offline TheUnnamedNewbieTopic starter

  • Super Contributor
  • ***
  • Posts: 1211
  • Country: 00
  • mmwave RFIC/antenna designer
I'm working on a framework in matlab to log data from my keithley 2000 (and other meters lateron). I know there are frameworks in place but I am doing this to learn about the interfacing between instruments and the computer.

One of the features I wanted to add to my meter window was an averaging capability.
My keithley 2000 can already do averaging internally. But then again, the server I am using to do this communications does not exactly have a shortage of CPU cycles...
What are the pros' and cons' of doing averaging on the logging computer vs doing averaging on the meter itself? I imagine if I don't do any averaging on the meter, it will be able to take more measurements every second and increase the amount of data?
The best part about magic is when it stops being magic and becomes science instead

"There was no road, but the people walked on it, and the road came to be, and the people followed it, for the road took the path of least resistance"
 

Offline cellularmitosis

  • Supporter
  • ****
  • Posts: 1111
  • Country: us
Re: Data logging with meters: Average on meter or on logging computer
« Reply #1 on: March 09, 2018, 08:18:42 am »
A possible advantage of averaging on the computer is that you have more flexibility with how you average the data.  For example, rather than a simple rolling average, you might apply a Savitzky-Golay filter, which is similar but doesn’t induce a “phase lag”.

Here’s a python script I recently used to add and additional column to a csV file with a savitzky-golay filter.  You’ll want to tune the window size for your application.  https://github.com/cellularmitosis/logs/blob/master/20180205-r-tempcos/savgol.py
LTZs: KX FX MX CX PX Frank A9 QX
 
The following users thanked this post: TiN

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 7276
  • Country: hr
Re: Data logging with meters: Average on meter or on logging computer
« Reply #2 on: March 09, 2018, 09:35:38 am »
It's a matter of entropy...

You collect original data in it's pure form, and store it completely, in full precision and with defined sampling criteria (sample time, frequency, settings). Than you process is later to whatever extent you want.. Same dataset can be processed in any conceivable way later, even for the purposes you didn't expect or forsee when you collected data.

That's how you do it. And with today's processing power and cheap and ample data storage easily available , quite easy to do.

Regards,

Sinisa
 

Offline TheUnnamedNewbieTopic starter

  • Super Contributor
  • ***
  • Posts: 1211
  • Country: 00
  • mmwave RFIC/antenna designer
Re: Data logging with meters: Average on meter or on logging computer
« Reply #3 on: March 09, 2018, 10:06:03 am »
You raise good points. I will try to do all averaging on computer once I figure out how to do it properly (ie, without spending a lot of time waiting for the meter etc - this is just a matter of me figuring out how to program things).

On a related note: How does this change when you go from a mathematical average to measurement averaging (IE, number of PLC)? better to have 1 PLC and average on computer over larger number of samples, or 10 PLC with ten times less datapoints?
The best part about magic is when it stops being magic and becomes science instead

"There was no road, but the people walked on it, and the road came to be, and the people followed it, for the road took the path of least resistance"
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 7276
  • Country: hr
Re: Data logging with meters: Average on meter or on logging computer
« Reply #4 on: March 09, 2018, 12:36:55 pm »
You raise good points. I will try to do all averaging on computer once I figure out how to do it properly (ie, without spending a lot of time waiting for the meter etc - this is just a matter of me figuring out how to program things).

On a related note: How does this change when you go from a mathematical average to measurement averaging (IE, number of PLC)? better to have 1 PLC and average on computer over larger number of samples, or 10 PLC with ten times less datapoints?

That will actually depend on inherent noise and characteristics of actual data sampler (voltmeter in this case). For instance, some meters will have maximum 10 NPLC in hardware, and when you put them in 100 NPLC they will average it in software...  There is a topic on this blog regarding meter noise where it is explained in quite detail, with data for many common benchtop meters. For what I remember, for Keithley 2000 10 PLC might be a good choice (if it is fast enough for what you need).

As for how you will implement it on a PC, if you are using Matlab, there is oodles of support for all kinds of data massaging in Matlab..
Matlab is THE tool to do that...

Regards
Sinisa
 

Offline ramon

  • Regular Contributor
  • *
  • Posts: 143
  • Country: tw
Re: Data logging with meters: Average on meter or on logging computer
« Reply #5 on: March 09, 2018, 03:56:28 pm »
It's a matter of entropy...

You collect original data in it's pure form, and store it completely, in full precision and with defined sampling criteria (sample time, frequency, settings). Than you process is later to whatever extent you want.. Same dataset can be processed in any conceivable way later, even for the purposes you didn't expect or forsee when you collected data.

That's how you do it. And with today's processing power and cheap and ample data storage easily available , quite easy to do.

Regards,

Sinisa

And after those wise words are said I just drop by to add that there is a software named R that is awesome for statistical computing and graphic visualization of data. And it is completely free.
 

Offline dacman

  • Frequent Contributor
  • **
  • Posts: 411
  • Country: us
Re: Data logging with meters: Average on meter or on logging computer
« Reply #6 on: March 10, 2018, 07:44:50 pm »
If the meter is just averaging the data, then I would prefer to have the raw data, unless there is a reason to reduce measurement noise.  The individual measurements could be used to calculate the uncertainty of the measurement, and to calculate a standard error for each averaged set of data, which could be used to identify noisy instruments.
 

Offline alm

  • Super Contributor
  • ***
  • Posts: 2903
  • Country: 00
Re: Data logging with meters: Average on meter or on logging computer
« Reply #7 on: March 10, 2018, 08:42:51 pm »
That will actually depend on inherent noise and characteristics of actual data sampler (voltmeter in this case). For instance, some meters will have maximum 10 NPLC in hardware, and when you put them in 100 NPLC they will average it in software... 
Even if the meter does due true analog integration for longer integration times, the limited output resolution (and hence quantization noise) may still limit the improvement in noise. I did a test a while ago with a 6.5 digit Prema DMM that could vary its integration time up to 20 seconds (no mention of software averaging in the manual), and would output 6.5 digits to both front panel and GPIB for integration times from 1 to 20 seconds. I measured a 10 V source for something like a week, changing the integration time every 300 seconds (so 300 seconds taking however many samples it could with 1 second integration time, then 2 second, then ... 300 seconds of 20 seconds integrations, and then back to 1 second integration again. This way any external noise sources (like temperature fluctuations) would be spread out evenly across all integration times. At the end I calculated the standard error of the mean over all samples per integration interval.

Integration time (seconds)Standard error of the mean (ppm of mean)
10.2663
20.1898
40.1027
100.1467
200.1752

Clearly in this case for this setup, digital averaging (in the meter or on the computer) with an integration time of four seconds gives the most stable average.
 
The following users thanked this post: trebejo

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 7276
  • Country: hr
Re: Data logging with meters: Average on meter or on logging computer
« Reply #8 on: March 10, 2018, 10:41:25 pm »
That will actually depend on inherent noise and characteristics of actual data sampler (voltmeter in this case). For instance, some meters will have maximum 10 NPLC in hardware, and when you put them in 100 NPLC they will average it in software... 
Even if the meter does due true analog integration for longer integration times, the limited output resolution (and hence quantization noise) may still limit the improvement in noise. I did a test a while ago with a 6.5 digit Prema DMM that could vary its integration time up to 20 seconds (no mention of software averaging in the manual), and would output 6.5 digits to both front panel and GPIB for integration times from 1 to 20 seconds. I measured a 10 V source for something like a week, changing the integration time every 300 seconds (so 300 seconds taking however many samples it could with 1 second integration time, then 2 second, then ... 300 seconds of 20 seconds integrations, and then back to 1 second integration again. This way any external noise sources (like temperature fluctuations) would be spread out evenly across all integration times. At the end I calculated the standard error of the mean over all samples per integration interval.

Integration time (seconds)Standard error of the mean (ppm of mean)
10.2663
20.1898
40.1027
100.1467
200.1752

Clearly in this case for this setup, digital averaging (in the meter or on the computer) with an integration time of four seconds gives the most stable average.

@Alm, well I didn't explain it well enough.. sorry for that.. I did mean that you should find "sweet spot" where you get best results from your meter... Exactly like you did..
And then sampling with longer integration in meter wouldn't make sense, and if you wanted to average further, you do it on PC.......

So in your case , 4 sec integration time would be best for most stable measurements..
Regards,

Sinisa
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf