SLVUDF6 September 2025
The instantaneous voltage, currents, active powers, and reactive powers are accumulated in 64-bit registers. A cycle tracking counter keeps track of the number of cycles accumulated. When CYCLES_PER_COMPUTATION number of cycles have been accumulated, the background process stores these accumulation registers and notifies the foreground process to produce the average results, such as RMS and power values. Cycle boundaries are used to trigger the foreground averaging process because this process produces very stable results.
For frequency measurements, a straight line interpolation is used between the zero crossing voltage samples. Because noise spikes can also cause errors, the application uses a rate-of-change check to filter out the possible erroneous signals and make sure that the two points are interpolated from genuine zero crossing points. For example, with two negative samples, a noise spike can make one of the samples positive, thereby making the negative and positive pair appear as if there is a zero crossing.
The resultant cycle-to-cycle timing goes through a weak low-pass filter to further smooth out any cycle-to-cycle variations. This filtering results in a stable and accurate frequency measurement that is tolerant of noise.