## 3 Software Triggering Strategies
### AC PQ Based Triggers  
The three-phase AC PQ triggers are based on the analysis of PQ indices computed according to IEC 61000-4-30 [17]. The CIRCE's libPQ library [16] has been used, as it is capable of providing the following: power frequency, supply voltage magnitude, flicker, voltage harmonics, dips, swells and interruptions. Among them, the most useful for being used as software triggers are those parameters calculated every ten cycles (power frequency, supply voltage magnitude, voltage harmonics, and total harmonic distortion). The ability to detect PQ events, such as voltage dips, swells and interruptions, can also be exploited as a trigger source. Expected values and trigger intervals have been defined for each parameter based on the limits and ranges provided by the EN 50160 standard [21]. Then, only phenomena not complying with the requirements established in that standard will fire a capture. Suppose that some of the surveyed parameters falls outside the allowed range, a software trigger is fired, starting the waveform recording at both sides of the inverters and  
Figure 4: Capture of a synthetic impulsive transient. Figure 5: Capture of synthetic oscillatory transients: quick (**a**) and slow oscillations (**b**). also storing the PQ parameters obtained simultaneously. The chosen reference values and intervals for this trigger are shown in Table 2.  
Performance Evaluation, Synchronisation and Stability of AC PQ Based Triggers  
AC PQ-based triggers operate using the PQ parameters computed from waveforms measured at a lower sampling rate than the DC-measured waveforms, as mentioned in Section 2.1. Then, the evaluation of the AC PQ-based trigger mechanisms shall not include only the performance but also the signal synchronisation and the long-term stability. A laboratory setup has been prepared to test trigger conditions and signal timing. A Fluke 6100A was used as the PQ reference and configured to cyclically generate an AC waveform containing the sequence of PQ perturbations described in Table 3. The generator's output was attenuated using a 1\(\div\)100 probe to match the dynamic range of the PXIe-6124. The attenuated signal was then split and routed to both acquisition boards. This configuration allowed for checking the synchronisation of the digitised values from the two boards using different sampling rates. The synchronisation of both data acquisition boards was checked by comparing waveforms measured at high and low sampling rates. Data acquired at high frequency were subsampled and compared to those measured at low acquisition frequency. The differences of 120,000 samples were classified in bins of 0.01 V and plotted in a histogram, shown in Figure 6. The distribution shown in the figure shows that 99% of the difference values are lower than 0.18 V. This result is compatible with the absolute accuracy of the two boards [22] combined with the voltage probe (calibrated in our laboratory). \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Expected Value** & **Trigger Interval** \\ \hline Power frequency & 50 Hz & \(\pm\)1\% \\ \hline Magnitude of the supply voltage & 230 V & \(\pm\)10\% \\ \hline Total Harmonic distortion & - & \(>\)8\% \\ \hline
**Voltage events** & & \\ Swell (overvoltage) & - & \(>\)110\% \\ Dip (sag) & - & \(<\)90\% \& \(>\)10\% \\ Interruption & - & \(<\)10\% \\ \hline
**Voltage harmonic order** & & \\
5 & - & \(>\)6\% \\
7 & - & \(>\)5\% \\
11 & - & \(>\)3.5\% \\
3,13 & - & \(>\)3\% \\
2,17 & - & \(>\)2\% \\
9,18,23,25 & - & \(>\)1.5\% \\
4 & - & \(>\)1\% \\
6,8,10,12,14,15,16,18,20,21,22,24 & - & \(>\)0.5\% \\ \hline \hline \end{tabular}
\end{table} 
Table 2: PQ parameter reference values and intervals. Once the synchronisation between both acquisition boards was verified, the next test consisted of verifying the trigger capabilities of the system.