1.3 Swell and Sag
The metrology firmware supports respective swell/sag thresholds for all voltage channels x (where x = [A, B, C]):
There are respective flags SWELL_DET_Vx/SAG_DET_Vx to indicate the swell/sag status for every voltage channels. These flags are updated every half cycle.
Example:
If VSWELL-RMS = 220 * 1.2 = 264V and KVx = 1651, then this is possible:
SWELL_THRESHOLD_Vx = ((220 * 1.2 / 1651)2) * 232 = 0x068BB09A
If VSAG-RMS = 220 * 0.8 = 176V and KVx = 1651, then this is possible:
SAG_THRESHOLD_Vx = ((220 * 0.8 / 1651)2) *232 = 0x02E8C044