Sampling rate of emonLib

For anyone who is concerned about the sampling rate of the methods in emonLib, the sampling rates, measured with a standard emonTx V3.4 (and the emonPi is the same processor) are:

calcIrms( ) - approx 5588 current samples per second.

calcVI( ) - approx 2535 pairs of voltage & current samples per second.

For calcVI( ), which can start and finish sampling close to a zero crossing point, those values are informative only.

For calcIrms( ), the numbers are important because they enable you to get as close as practical to sampling a whole number of complete cycles, which is important for accuracy & repeatability.

Useful values to use as a parameter into calcIrms( ) are:

1 cycle of mains:
112 for a 50 Hz system, or 93 for a 60 Hz system.

The smallest ‘universal’ number:
559 (100 ms, or 5 cycles of 50 Hz or 6 cycles of 60 Hz).

The recommended monitoring period:
1676 (300 ms).

The closest integer to an integral multiple of 558.8 is also a good choice.
[Note: If your mains frequency is not exactly 50 Hz or 60 Hz, then these numbers are only a ‘best guess’.]

2 Likes

Good info! To put this in context, do you happen to have any references to what other common metering solutions use for their sample rates?

Typical energy ICs as used in modern digital revenue meters sample at around 8kHz. They invariably have dedicated paths for each channel, so 8kHz for RMS calculations and 8kHz for (V,I) pairs for power calculations. Their ADC readings are typically 24-bits for added dynamic range so you get 8,000 24-bit (V,I) pairs per second.

At the upper end of the sample-rate-speed spectrum:

The GE kV2c meter ADC runs at 1.68 Ms/S. (16 bit)

The MAX11046 includes eight simultaneous-sampling, low-power, 16-bit, 250ksps, successive-approximation ADCs in a single package.

The two ADCs of the ADE7755 digitize the voltage signals from the current and voltage transducers. These ADCs are 16-bit, second-order Σ-Δ with an oversampling rate of 900 kHz.

With those Σ-Δ ADCs you’ve got to be somewhat careful you’re comparing apples with apples. For example, the one I was referring to as doing 8000 24-bit V,I pairs per second actually oversamples each of the signals at 1.024MHz.

A post was split to a new topic: New function in emonLib