SBOA444 November 2020 TMCS1100
The raw ADS131M04 samples are signed integers and any stray DC or offset value on these converters are removed using a DC tracking filter. A separate DC estimate for all voltages and currents is obtained using the filter, voltage, and current samples, respectively. This estimate is then subtracted from each voltage and current sample.
The resulting instantaneous voltage and current samples are used to generate the following intermediate results:
Accumulated squared values of voltage and currents, which is used for VRMS and IRMS calculations, respectively
Accumulated energy samples to calculate active energy
Accumulated energy samples using current and 90° phase-shifted voltage to calculate reactive energy
The foreground process processes these accumulated values.