For each half-cycle of the dominant phase, the RMS values of all voltages are
calculated, taking into account both the fundamental and harmonic components. Each
calculated value is then compared to the corresponding SAG_THRESHOLD_Vx, (where x =
[A, B, C]), to assess whether a voltage sag condition is present. For each half
cycle that a voltage sag exists, the associated flag, SAG_DET_Vx is set to 1.
A threshold is allowed for each phase and is computed using the native phase
voltages, before transformation to implied 4WY service. This allows setting
different thresholds for non-balanced service types.
The SAG_THRESHOLD_Vx is stored in the uQ0.32 format, therefore, set the threshold
value as follows: