Compressing Oscilloscope Data

In my typical use case I need to make oscilloscope measurements which would run for at least 5 - 10 minutes, creating multi-giga-byte-sized data files. In such use case I am not interested in seeing fast transients, but want to see how the device’s energy profile changes over time and how much energy the device is consuming at different stages. So, I came up with this idea of decimating:

Currently the sample rate is 2 Ms/s, which limits the oscilloscope capture buffer to 30 seconds, and which creates very large data files very quickly.

Sometimes it may not be necessary to be able to see/plot the capture data at full 2 Ms/s, nor store the captured data into a file at 2 Ms/s. For example, it might be useful to plot/store the data only at 100 kHz rate, which would increase the 30 second limit by 20 times up to 600 seconds and reduce the file size by factor of 20.

We could call this as decimating at factor of N. During decimating the data would be still sampled at 2Ms/s, but its min, max and average would be computed over N samples, thus reducing the sample rate effectively by N.

Using this decimation the data would still contain useful information for analysis purposes, although some very quick transients are smoothed out by averaging, but the statistics are still maintained reasonably well.

Would this sound as a useful feature to be added?

1 Like

Hi @tomis and welcome to the Joulescope forum. Thank you for the recommendation. Decimation is definitely on the list of future features. The Joulescope software already decimates by 200 internally and stores the mean, variance, min, and max, so operating at 10 kHz is easy.

To operate at 100 kHz, the software would not get much effective compression storing statistics:
2 MSPS x 2 x 2 = 8 MB/s
100 kHz x 4 x 4 x 2 => 3.2 MB/s.

However, it could store just the filtered value for 100 kHz x 4 x 2 => 0.8 MB/s.

Would what spice does, specify reltol and abstol, work?

I.e. a new point is only saved if it differs by these thresholds from the last one.


Hi Matt,
Thank you for your response.

You wrote:
“However, it could store just the filtered value for 100 kHz x 4 x 2 => 0.8 MB/s.”

Could you please elaborate this a bit more as I am not familiar with the internals of Joulescope.

Anyway, the 1:10 compression for decimation of 20 is not too bad at all!

The decimated power and the energy calculations should give accurate results, so that the decimated power and energy match “well enough” with the non-compressed power and energy calculations.