Homogeneity-PMU-Based Method for Detection and Classification of Power Quality Disturbances

Over the past few years, power quality (PQ) monitoring has become of paramount importance for utilities and users since poor PQ generates negative consequences. In monitoring, fast detection and accurate classification of PQ disturbances (PQDs) are desirable features. In this work, a new method to detect and classify PQDs is proposed. The proposal takes advantage of the low computational resources of both a phasor measurement unit (PMU)-based signal processing scheme and the homogeneity approach. To classify the PQDs, if–then–else rules are used. To validate and test the proposal, synthetic and real signals of sags, swells, interruptions, notching, spikes, harmonics, and oscillatory transients are considered. For the generation of real signals, a PQD generator based on a power inverter is used. In the proposed method, the PMU information is directly used to classify sags, swells, and interruptions, whereas the homogeneity index is used to distinguish among the remaining PQDs. Results show that the proposal is an effective and suitable tool for PQ monitoring.


Introduction
The topic of power quality (PQ) is of paramount importance for utilities and users [1][2][3], since poor PQ negatively affects both electric network infrastructure and equipment connected to the power line.In general, poor PQ is associated with the presence of different electromagnetic phenomena, commonly called PQ disturbances (PQDs), in the voltage or current signals [4,5].In order to apply proper solutions, fast detection and accurate classification of PQDs have become fundamental features in PQ monitoring tasks.Although many efforts have been presented in the literature for these tasks [4,6,7], there is still need of further research.On one hand, there are several problems associated with modern power systems, such as a massive proliferation of non-linear loads that generate harmonic content and a distributed generation that produces intermittent and variable power [8][9][10][11].These require the development of both new technologies to reduce their negative impact, such as compensators, active filters, and energy storage systems, among others [9,11,12], and PQ monitoring systems that provide information about the voltage and current waveforms for further processing and analysis of the measured signals [13,14].For the latter, the proposal of efficient and reliable methodologies in terms of computational resources and performance, respectively, to detect and classify PQDs is desirable [3,[13][14][15].On the other hand, the needs, requirements, capabilities, and improvements of existing measurement equipment in electric power networks have to be taken into consideration [16][17][18][19], since they can be exploited for many applications, even those that are different from their original design.In particular, phasor measurement units (PMUs) are powerful monitoring tools [18,20], which provide amplitude, phase, and frequency of electric signals in a synchronized way, that have been rapidly integrated in many applications of power systems [18], making them suitable and promising to perform monitoring in a PQ context.
Regarding the methodologies proposed in the literature for detection and classification of PQDs, it should be pointed out that many signal processing techniques, waveform indices, and artificial intelligence-based algorithms have been already presented.In particular, the short-time Fourier transform (STFT) [21], wavelet transform (WT) [22], tunable-Q-wavelet transform [23], generalized empirical wavelet transform [24], S-transform [25,26], double resolution S-transform and directed acyclic graph support vector machines [27], Gabor-Wigner transform [28], Kalman filter [29], and empirical mode decomposition (EMD) methods [15,30], among others, have been reported as signal processing methods.Although promising results have been obtained, some aspects have to be taken into consideration.For instance, STFT degrades its performance in the analysis of transient phenomena because the analyzed time window has a fixed size.Although the WT can adequately analyze transient phenomena, its performance depends on the used mother wavelet.In a similar way, the Gaussian window has to be calibrated in the S-transform in order to obtain the most suitable results.Other issues and limitations that have to be considered in the aforementioned techniques (Gabor, Wigner, and Gabor-Wigner transforms) have been mentioned in [31].For the Kalman filter, the measurement noise and a harmonic model have to be defined a priori; in practice, they cannot be known accurately.Unlike the Kalman filter, EMD-based methods are adaptive techniques, i.e., information of the input signal is not required; however, the mode-mixing effect in the EMD method and the high computational burden in the ensemble EMD method can compromise their performance and applicability for PQ monitoring.
On the other hand, some indices and well-established parameters such as root-mean-square (RMS)-based parameters (RMS value, variation rate of the RMS values, oscillation number of the RMS values, total harmonic distortion factor, and lower harmonic distortion factor) [32], a PQ deviation index based on principal curves [33], higher order statistics (mean, variance, skewness, and kurtosis) [34], and a derivative factor with some threshold-based rules [35], have been reported to characterize PQDs.Although characterization of PQDs has been achieved, research to reduce both the number of indices needed to perform this task and their complexity is required since the computational resources would be significantly reduced as well.Regarding intelligent algorithms, artificial neural networks [36], support vector machines [37], fuzzy systems oriented by particle swarm optimization [38], a decision tree and fuzzy C-means clustering classifiers [39], and the AdaBoost algorithm [40], among many others, have been presented.In these algorithms, the training dataset, training algorithm, topology or structure (size, complexity, and elements), and designer expertise are issues that have a direct impact on their performance.Therefore, special attention and, sometimes, great effort, have to be applied in order to obtain a good enough performance.Also, the reconfiguration of some algorithms, e.g., neural networks, to include a new category can be a highly demanding task since the training has to include both the previous categories and the new ones, where even the initial topology and/or the features used as inputs may not be good enough for the new cases.From all the aforementioned facts, some opportunities of research can be highlighted, e.g., development and application of low-complexity methodologies, exploration of new indices, and proposal of simpler classification schemes, among others.
In this work, a new methodology for PQ monitoring is proposed.In general, it is based on two main approaches: (1) information provided by a PMU scheme and (2) the homogeneity index.The former is used to extract the fundamental component, i.e., the frequency component, of 50 or 60 Hz, from the original signal.Thus, the PQDs at the fundamental component (sag, swell, and interruption) are separated from those at the non-fundamental component (notching, spike, harmonic, and oscillatory transient).This separation allows for an easier classification and exploits the inherent operation of a PMU scheme, i.e., it already provides the magnitude, phase, and frequency of the fundamental component.From the magnitude information, sags, swells, and interruptions can be classified using a rule-based decision unit.On the other hand, notching, spikes, harmonics, and oscillatory transients are classified using the homogeneity index, which, to the best of the authors' knowledge, has not been presented for this task.In order to validate and test the proposal, synthetic and real measured signals are used.Results show the effectiveness and usefulness of the proposed methodology for PQDs monitoring.

Power Quality Disturbances
For electric systems, a nominal voltage waveform is described in a general way by [35,41,42]: where X m is the peak voltage or amplitude, ω = 2πf is the angular frequency, f is the frequency for the fundamental component (50 or 60 Hz), and θ is the phase angle.Deviations of these parameters from their nominal values during a time interval are commonly known as disturbances that affect the PQ, i.e., PQDs.In this regard, a non-ideal voltage signal, e.g., a real voltage signal measured in the electric network, is presented in [35] as: where x PQD (t) represents the PQDs.According to the IEEE Standard 1159 [2], there are different categories for the PQDs.Correct identification and classification play an important task since there are different solutions depending on the PQD of concern.In this Standard [2], sags, swells, and interruptions are categorized by their RMS values; for instance, interruptions present amplitudes lower than 0.1 pu, sags present amplitudes from 0.1 to 0.9 pu, and swells present amplitudes greater than 1.1 pu.The quantity pu refers to per unit, which is dimensionless and corresponds to 100% of a nominal value [2].On the contrary, oscillatory transients, harmonics, and notching are considered as non-fundamental frequency components, i.e., frequency components different from 50/60 Hz.More detailed information about categories and typical characteristics of PQDs can be found in [2].
In different studies, several mathematical models have been reported to generate different waveforms that represent the dynamic behavior of PQDs [42,43].These waveforms are commonly used to test new methods for PQ monitoring since their parameters are known a priori; thus, numerical and classification errors can be assessed.

Phasor Measurement Unit
A PMU is an increasingly used monitoring tool in power systems [18].In general, this tool uses both a phasor estimator to obtain magnitude, phase, and frequency of voltage and current signals, and a global positioning system to synchronize the measurements to an absolute time reference [44,45].The IEEE Standard C37.118.1 establishes the steady-state and dynamic requirements that have to be achieved by a PMU and presents a reference phasor estimation model that satisfies them [41].This model is shown in Figure 1.In this figure, it is observed that the input signal is modulated by a quadrature oscillator, i.e., sine and cosine functions.Then, a demodulation process is carried out using two low-pass (LP) filters, resulting in two signals in quadrature, the real one, Re, and the imaginary one, Im.These signals allow the phasor representation of x(t) = X m cos(ωt + θ) as follows [45]: where X m and θ are the amplitude and phase of the signal, respectively.Re and Im are used to compute the magnitude and phase as follows: In addition, the frequency can be obtained from φ(t) = ωt + θ as follows: Electronics 2018, 7, x FOR PEER REVIEW 4 of 13 In addition, the frequency can be obtained from ϕ(t) = ωt + θ as follows: The abovementioned parameters are given by a PMU at different reporting rates, e.g., 60 frames per second (fps).This reporting rate implies that the parameters of magnitude, phase, and frequency are provided each period for electric systems with a fundamental frequency of 60 Hz.
It is important to mention that the IEEE Standard C37.118.1 establishes the P class and the M class of performance for a PMU.In this regard, two different LP filters are presented [41], i.e., one for each class.In this work, the filter for the P class is selected since it offers a faster response [41]; however, other filters that satisfy the PMU requirements could be used in the proposal.The P-class filter coefficients are given by [41]: where k = −N/2:N/2 (integer values only) and N represents the filter order.

Homogeneity
The homogeneity approach is presented in [46] as a texture feature in the analysis of images.Recently, it has been also presented as a diagnosis index for a time-series signal [47].In this index, a signal with soft changes presents a high homogeneity since it presents a high regularity; on the other hand, if the signal presents abrupt changes, e.g., the changes associated with PQDs, its homogeneity value will be low; in fact, it could change in a different way for each kind of PDQ.In this regard, the homogeneity approach can be a useful index to characterize different PQDs.The abovementioned parameters are given by a PMU at different reporting rates, e.g., 60 frames per second (fps).This reporting rate implies that the parameters of magnitude, phase, and frequency are provided each period for electric systems with a fundamental frequency of 60 Hz.
It is important to mention that the IEEE Standard C37.118.1 establishes the P class and the M class of performance for a PMU.In this regard, two different LP filters are presented [41], i.e., one for each class.In this work, the filter for the P class is selected since it offers a faster response [41]; however, other filters that satisfy the PMU requirements could be used in the proposal.The P-class filter coefficients are given by [41]: where k = −N/2:N/2 (integer values only) and N represents the filter order.

Homogeneity
The homogeneity approach is presented in [46] as a texture feature in the analysis of images.Recently, it has been also presented as a diagnosis index for a time-series signal [47].In this index, a signal with soft changes presents a high homogeneity since it presents a high regularity; on the other hand, if the signal presents abrupt changes, e.g., the changes associated with PQDs, its homogeneity value will be low; in fact, it could change in a different way for each kind of PDQ.In this regard, the homogeneity approach can be a useful index to characterize different PQDs.
The homogeneity index can be computed using the following steps: • Compute the vector of differences for a signal, x, as follows: where v is a fixed integer and n ranges from 0 to N − 1. N is the number of samples in x.These samples are quantized into K different values.

•
By considering a total number of differences, A, compute the probability function as: • Finally, compute the homogeneity index using P D (j) as follows: It should be pointed out that H can take values from 0 to 1.A constant signal leads to the maximum value of H, i.e., H = 1, regardless of the value of v as shown in Figure 2a.If the signal is constant, the histograms using different values of v are identical; hence, H does not change.For a time-varying signal, the value of H changes for different values of v as shown in Figure 2b; as can be observed in this figure, a higher number of v may imply both a more dispersed histogram and a lower value of H.
Electronics 2018, 7, x FOR PEER REVIEW 5 of 13 The homogeneity index can be computed using the following steps: • Compute the vector of differences for a signal, x, as follows: where v is a fixed integer and n ranges from 0 to N − 1. N is the number of samples in x.These samples are quantized into K different values.

•
By considering a total number of differences, A, compute the probability function as:

•
Finally, compute the homogeneity index using PD(j) as follows: It should be pointed out that H can take values from 0 to 1.A constant signal leads to the maximum value of H, i.e., H = 1, regardless of the value of v as shown in Figure 2a.If the signal is constant, the histograms using different values of v are identical; hence, H does not change.For a time-varying signal, the value of H changes for different values of v as shown in Figure 2b; as can be observed in this figure, a higher number of v may imply both a more dispersed histogram and a lower value of H.

Proposed Method
The proposed methodology to detect and classify PQDs is shown in Figure 3a.In the first step, the input signal, xR, is processed by the phasor estimation model shown in Figure 1.As a result, the amplitude, phase, and frequency of the fundamental component are obtained using Equations ( 4)- (6).It should be pointed out that these parameters are intrinsic information of a PMU, implying no further computational resources.From these parameters, the amplitude, Xm, is seized to classify sags, swells, and interruptions, since these PQDs depend on the RMS values.Therefore, the block of "Threshold-based rules" (Figure 3a, right side) implements if-then-else rules by considering the limits stated in [2] as shown in Figure 3b.An example of one rule is: if Xm is greater than 1.1 then the PQD is a Swell else another rule has to be explored.As can be observed in Figure 3b, the last block considers the energy, E [13,48], of the non-fundamental component, xPQD, in order to determine the nominal condition, i.e., if there is neither swell, sag, nor interruption and there is not enough E at xPQD, the input signal presents a nominal condition.This restriction is necessary because the nominal condition cannot be assured since a PQD can exist at xPQD.The limit of E is set to C = 1% of the nominal voltage value, as the noise typically ranges from 0 to 1% [2].

Proposed Method
The proposed methodology to detect and classify PQDs is shown in Figure 3a.In the first step, the input signal, x R , is processed by the phasor estimation model shown in Figure 1.As a result, the amplitude, phase, and frequency of the fundamental component are obtained using Equations ( 4)- (6).It should be pointed out that these parameters are intrinsic information of a PMU, implying no further computational resources.From these parameters, the amplitude, X m , is seized to classify sags, swells, and interruptions, since these PQDs depend on the RMS values.Therefore, the block of "Threshold-based rules" (Figure 3a, right side) implements if-then-else rules by considering the limits stated in [2] as shown in Figure 3b.An example of one rule is: if X m is greater than 1.1 then the PQD is a Swell else another rule has to be explored.As can be observed in Figure 3b, the last block considers Electronics 2018, 7, 433 6 of 13 the energy, E [13,48], of the non-fundamental component, x PQD , in order to determine the nominal condition, i.e., if there is neither swell, sag, nor interruption and there is not enough E at x PQD , the input signal presents a nominal condition.This restriction is necessary because the nominal condition cannot be assured since a PQD can exist at x PQD .The limit of E is set to C = 1% of the nominal voltage value, as the noise typically ranges from 0 to 1% [2].On the other hand, the PMU parameters (Xm, θ, f) are also used to construct a fundamental sinusoidal signal, x, using Equation (1), which is extracted from the input signal in order to separate the signal that contains the PQDs at the non-fundamental component, xPQD, i.e., notching, spikes, oscillatory transients, and harmonics.For this signal, and by considering that its E is greater than C, its homogeneity value is computed in order to classify the PQD.In a similar way to sags, swells, and interruptions, the non-fundamental PQDs are classified using the block of threshold-based rules (Figure 3a, left side).The threshold values are obtained by analyzing synthetic signals that represent the different PQDs.In order to do so, the mathematical models presented in [42] for oscillatory transients, spikes, notching, and harmonics are used, where 100 signals for each disturbance are constructed.The numerical parameters for these signals are randomly selected by considering the limits in [42].Figure 4 shows the obtained results.In this figure, an example of the constructed signal for notching/spike, oscillatory transient, and harmonics is shown (see Figure 4a-c), where the fundamental component is not shown because it is extracted in the previous step.It should be pointed out that one cycle of the signal is only constructed since the PMU results are considered for a reporting rate of 60 frames per second, i.e., the classification results are computed per period.This classification rate is useful for an online monitoring system since the time that a specific PQD lasts or exists would be both tracked and determined.For the homogeneity, the notching and spike are considered as the same PQD, since they only change in sign [42].In Figure 4d-f, the homogeneity results for the PQDs by testing different values of v are shown (each bar in these figures represents the H index for the signal under test using a specific value of v).As can be observed, the homogeneity value remains almost constant for the notching and spike regardless of the v value.For the oscillatory transient, the homogeneity value oscillates around 0.5, whereas it oscillates around 0.1 for harmonics.In order to have a wider separation among the homogeneity values for each kind of PQD, a v value of 5 is selected.Figure 4g shows the homogeneity results for the 100 tests of each disturbance, remembering that the PDQs are randomly generated using the mathematical models presented in On the other hand, the PMU parameters (X m , θ, f ) are also used to construct a fundamental sinusoidal signal, x, using Equation (1), which is extracted from the input signal in order to separate the signal that contains the PQDs at the non-fundamental component, x PQD , i.e., notching, spikes, oscillatory transients, and harmonics.For this signal, and by considering that its E is greater than C, its homogeneity value is computed in order to classify the PQD.In a similar way to sags, swells, and interruptions, the non-fundamental PQDs are classified using the block of threshold-based rules (Figure 3a, left side).The threshold values are obtained by analyzing synthetic signals that represent the different PQDs.In order to do so, the mathematical models presented in [42] for oscillatory transients, spikes, notching, and harmonics are used, where 100 signals for each disturbance are constructed.The numerical parameters for these signals are randomly selected by considering the limits in [42].Figure 4 shows the obtained results.In this figure, an example of the constructed signal for notching/spike, oscillatory transient, and harmonics is shown (see Figure 4a-c), where the fundamental component is not shown because it is extracted in the previous step.It should be pointed out that one cycle of the signal is only constructed since the PMU results are considered for a reporting rate of 60 frames per second, i.e., the classification results are computed per period.This classification rate is useful for an online monitoring system since the time that a specific PQD lasts or exists would be both tracked and determined.For the homogeneity, the notching and spike are considered as the same PQD, since they only change in sign [42].In Figure 4d-f by testing different values of v are shown (each bar in these figures represents the H index for the signal under test using a specific value of v).As can be observed, the homogeneity value remains almost constant for the notching and spike regardless of the v value.For the oscillatory transient, the homogeneity value oscillates around 0.5, whereas it oscillates around 0.1 for harmonics.In order to have a wider separation among the homogeneity values for each kind of PQD, a v value of 5 is selected.Figure 4g shows the homogeneity results for the 100 tests of each disturbance, remembering that the PDQs are randomly generated using the mathematical models presented in [42].As can be observed in Figure 4g, the homogeneity values are separated from each other.In order to observe their differences in a quantitative way, their probability density functions are computed and shown in Figure 4h, where 3 standard deviations, σ, are considered; therefore, the Gaussian functions are centered on the mean, µ, and have a width of ±3 σ.It is important to mention that the interval given by µ − 3σ, µ + 3σ in a Gaussian distribution contains approximately 99.7% of the data; therefore, if there is no overlap among the Gaussian functions, a discrimination rate of almost 100% is obtained.Table 1 shows the numerical values obtained.Regarding the threshold values, the limits of 0.2174 and 0.8705 are selected since they separate completely the Gaussian functions (see Figure 4h).With these values, the block of threshold-based rules computes the if-then-else rules shown in Figure 3c; in this block, a sign detector for x PQD is used to differentiate between spike and notching.[42].As can be observed in Figure 4g, the homogeneity values are separated from each other.In order to observe their differences in a quantitative way, their probability density functions are computed and shown in Figure 4h, where 3 standard deviations, σ, are considered; therefore, the Gaussian functions are centered on the mean, μ, and have a width of ±3 σ.It is important to mention that the interval given by μ − 3σ, μ + 3σ in a Gaussian distribution contains approximately 99.7% of the data; therefore, if there is no overlap among the Gaussian functions, a discrimination rate of almost 100% is obtained.Table 1 shows the numerical values obtained.Regarding the threshold values, the limits of 0.2174 and 0.8705 are selected since they separate completely the Gaussian functions (see Figure 4h).With these values, the block of threshold-based rules computes the if-then-else rules shown in Figure 3c; in this block, a sign detector for xPQD is used to differentiate between spike and notching.

Validation
Synthetic signals are used in many applications to validate and test new algorithms [42,47,48]; as the reference values are known a priori, errors or deviations from the expected values can be measured.In this regard, synthetic signals based on the mathematical models presented in [42] are used to validate the proposal.In this work, sags, swells, interruptions, harmonics, notching, spikes, and oscillatory transients, as well as the healthy condition, are considered.In total, 100 signals with random parameters that contain all the aforementioned conditions (PQDs and nominal signals) are generated using both a sampling frequency of 6000 samples/s and a nominal frequency of 60 Hz.

Validation
Synthetic signals are used in many applications to validate and test new algorithms [42,47,48]; as the reference values are known a priori, errors or deviations from the expected values can be measured.In this regard, synthetic signals based on the mathematical models presented in [42] are used to validate the proposal.In this work, sags, swells, interruptions, harmonics, notching, spikes, and oscillatory transients, as well as the healthy condition, are considered.In total, 100 signals with random parameters that contain all the aforementioned conditions (PQDs and nominal signals) are generated using both a sampling frequency of 6000 samples/s and a nominal frequency of 60 Hz. Figure 5a shows an example of one constructed signal; as can be observed, the PQDs are present at different time intervals.Following the proposed methodology, the PMU scheme computes X m , θ, and f, where the tracking of X m is presented in Figure 5b, allowing the classification of Sag, Swell, and Interruption.From the PMU parameters, the signal shown in Figure 5c is constructed and subtracted from the input signal.Figure 5d shows the resulting signal, i.e., the signal with the PQDs at the non-fundamental component.The homogeneity tracking is presented in a red color; as can be noted, its value changes according to the type of PQD.With the homogeneity tracking and the threshold-based rules, the harmonics, oscillatory transients, and notching/spikes can be classified.In addition, the duration of each PQD can be monitored.The classification results for all the synthetic signals are shown as a confusion matrix in Table 2, where all the correct classifications are located in the diagonal.For nominal conditions, 100% of effectiveness is obtained, i.e., 100 signals in nominal conditions are classified as nominal conditions; also, no false positives are generated, i.e., PQD conditions are not confused with a nominal condition.For sags, swells, and interruptions, a minimum effectiveness of 99% is obtained, where a sag is confused with an interruption.On the other hand, the PQDs at the non-fundamental component present a minimum effectiveness of 98%.Some signals with notching are confused with spikes and vice versa, which might be expected since these PQDs only differ in sign [42].
Electronics 2018, 7, x FOR PEER REVIEW 8 of 13 f, where the tracking of Xm is presented in Figure 5b, allowing the classification of Sag, Swell, and Interruption.From the PMU parameters, the signal shown in Figure 5c is constructed and subtracted from the input signal.Figure 5d shows the resulting signal, i.e., the signal with the PQDs at the nonfundamental component.The homogeneity tracking is presented in a red color; as can be noted, its value changes according to the type of PQD.With the homogeneity tracking and the threshold-based rules, the harmonics, oscillatory transients, and notching/spikes can be classified.In addition, the duration of each PQD can be monitored.The classification results for all the synthetic signals are shown as a confusion matrix in Table 2, where all the correct classifications are located in the diagonal.For nominal conditions, 100% of effectiveness is obtained, i.e., 100 signals in nominal conditions are classified as nominal conditions; also, no false positives are generated, i.e., PQD conditions are not confused with a nominal condition.For sags, swells, and interruptions, a minimum effectiveness of 99% is obtained, where a sag is confused with an interruption.On the other hand, the PQDs at the non-fundamental component present a minimum effectiveness of 98%.Some signals with notching are confused with spikes and vice versa, which might be expected since these PQDs only differ in sign [42].

Results for Real Signals
The performance of the proposed methodology is also tested in a more real scenario.In order to do so, the PQD generator shown in Figure 6a

Results for Real Signals
The performance of the proposed methodology is also tested in a more real scenario.In order to do so, the PQD generator shown in Figure 6a 3.As mentioned above, sags, swells, and interruptions are mutually exclusive; therefore, they cannot be combined with each other but can be combined with other disturbances.For this condition, the proposal is not negatively affected as it can separate PQDs at the fundamental component and PQDs at the non-fundamental component.Figure 7 shows some of the generated signals.Figure 7a shows a signal with notching, Figure 7b shows a signal with a sag plus an oscillatory transient, and Figure 7c shows a signal with a sag plus harmonics and a swell.As can be observed, the homogeneity index (H tracked in red color) allows classifying PQDs at the non-fundamental component and the magnitude of the PMU (X m tracked in black color) allows classifying PQDs at the fundamental component.Results of Table 3 show that most of the PQDs are accurately classified (five from five), but in the notching and the spike some errors are obtained, e.g., for "One PQD" in Table 3, only four signals with notching are accurately classified (4/5) whereas the other notching signal is confused with a signal with spikes (6/5).These results corroborate the point observed in the synthetic signals.A similar scenario is observed for "Two PQDs" in Table 3, where two tests of notching are confused with two tests of spikes.It should be pointed out that this test scenario is more demanding since, on the one hand, the noise generated by both the inverter and the acquisition system (quantization process, sensors, and signal conditioning) increases the complexity of the monitoring and, on the other hand, the classification of two combined PQDs is more difficult, mainly for notching and spikes where their waveform differences are not so evident.3.As mentioned above, sags, swells, and interruptions are mutually exclusive; therefore, they cannot be combined with each other but can be combined with other disturbances.For this condition, the proposal is not negatively affected as it can separate PQDs at the fundamental component and PQDs at the non-fundamental component.Figure 7 shows some of the generated signals.Figure 7a shows a signal with notching, Figure 7b shows a signal with a sag plus an oscillatory transient, and Figure 7c shows a signal with a sag plus harmonics and a swell.As can be observed, the homogeneity index (H tracked in red color) allows classifying PQDs at the nonfundamental component and the magnitude of the PMU (Xm tracked in black color) allows classifying PQDs at the fundamental component.Results of Table 3 show that most of the PQDs are accurately classified (five from five), but in the notching and the spike some errors are obtained, e.g., for "One PQD" in Table 3, only four signals with notching are accurately classified (4/5) whereas the other notching signal is confused with a signal with spikes (6/5).These results corroborate the point observed in the synthetic signals.A similar scenario is observed for "Two PQDs" in Table 3, where two tests of notching are confused with two tests of spikes.It should be pointed out that this test scenario is more demanding since, on the one hand, the noise generated by both the inverter and the acquisition system (quantization process, sensors, and signal conditioning) increases the complexity of the monitoring and, on the other hand, the classification of two combined PQDs is more difficult, mainly for notching and spikes where their waveform differences are not so evident.observed in the synthetic signals.A similar scenario is observed for "Two PQDs" in Table 3, where two tests of notching are confused with two tests of spikes.It should be pointed out that this test scenario is more demanding since, on the one hand, the noise generated by both the inverter and the acquisition system (quantization process, sensors, and signal conditioning) increases the complexity of the monitoring and, on the other hand, the classification of two combined PQDs is more difficult, mainly for notching and spikes where their waveform differences are not so evident.One PQD

Discussion
Based on recent studies that have published methodologies for classification of PQDs, this proposal presents some features that have to be highlighted.Firstly, the present proposal does not require a space transformation unlike other works [15,[22][23][24][25][26][27][28]30,31]; as the proposal uses both a PMU scheme based on filters and a time-domain index, low computational resources are required.Secondly, the proposal only uses the H index to classify PQDs, unlike other approaches that compute more than two indices [32,34].This fact simplifies the proposed methodology, reduces the computational burden, and shows the effectiveness of the H index for detection of PQDs.In [35], similar to the present proposal, periodic or aperiodic disturbances are separated from the nominal voltage signal in the time domain; however, the proposed PMU-based scheme exploits its inherent operation to compute the parameters of the fundamental component in a synchronized way.Synchronization is very important in the subtraction process of the fundamental component.In addition, the advantages of the PMU algorithm under dynamic and steady state conditions are already presented [41].Finally, in [33], a PQ index based on principal curves is presented.It is a general index that determines how much the voltage signal has deviated from its nominal value according to the kind of disturbance, allowing the classification of PQDs according to the obtained value.Similar to that work, the proposed H index allows determining the kind of PQD presented in the voltage signal, but the fusion with the PMU scheme allows differentiating when some PQDs appear simultaneously, which is desirable in order to apply a proper solution for each kind of disturbance.Although the simultaneous appearance of PQDs in both the fundamental component and the non-fundamental component (a single PQD) is considered in this work, the behavior of the H index for the simultaneous presence (more than one PQD) of notching, spikes, harmonics, and oscillatory transients has to be firstly characterized.

Conclusions
In this work, a new method to detect and classify PQDs is presented.It is based on the phasor estimation model for P-class PMUs and the homogeneity approach.The magnitude of the fundamental component, which is estimated by the PMU model, allows the classification of sags, swells, interruptions, and the nominal condition.On the other hand, the homogeneity index allows the classification of notching, spikes, harmonics, and oscillatory transients.In the H index, v = 5 provides the most discriminant information for PQD classification; in fact, non-overlapped intervals from µ − 3σ to µ + 3σ for each disturbance are obtained.These intervals imply data discrimination of approximately 99.7%.As the proposal separates PQDs at the fundamental component (sags, swells, and interruptions) from PDQs at the non-fundamental component (notching, spikes, harmonics, and oscillatory transients), two main advantages arise.On the one hand, the classification task is easier since the different types of PQDs are separated into two groups, requiring fewer features in each group to discriminate them; on the other hand, the correct classification of simultaneous PQDs (sags, swells, or interruptions with notching, spikes, harmonics, or oscillatory transients) is possible.In order to test the proposal, synthetic and real signals are analyzed, where mathematical models and a PDQ generator based on power electronics are used to generate them.It is important to mention that the proposal requires low computational resources to be implemented since it is based on filters and a time-domain index.In addition, the proposal considers a period of the signal as the time window of analysis unlike other studies that consider several periods of the analyzed time window, implying a higher required time resolution for the proposal.The time window is directly determined by the reporting rate of the PMU; in this work, 60 fps is used.
In a future work, a hardware implementation of the proposal will be developed in order to provide an online and real-time monitoring tool.Also, the analysis of combined PQDs at the non-fundamental component using the H index will be explored.Last but not least, the proposal will be also adapted and/or expanded to contribute to other regulations, such as the IEC 61000 series and EN-50160 for PQ measurement methods.

Electronics 2018, 7 , 13 Figure 3 .
Figure 3. (a) Proposed methodology, (b) threshold-based rules for PQDs at the fundamental component, and (c) threshold-based rules for PQDs at the non-fundamental component.

Figure 3 .
Figure 3. (a) Proposed methodology, (b) threshold-based rules for PQDs at the fundamental component, and (c) threshold-based rules for PQDs at the non-fundamental component.
is used.It consists of a personal computer (PC) with MATLAB software which is used to generate the PQD signals and implement the overall methodology.These signals are sent to the dSPACE DS1103 board to control DC/AC power
is used.It consists of a personal computer (PC) with MATLAB software which is used to generate the PQD signals and implement the overall methodology.These signals are sent to the dSPACE DS1103 board to control DC/AC power converters.The dSPACE is also used for the acquisition of the voltage signals.The power inverter based on IGBTs is in a full-bridge configuration; for this work, the inverter is implemented using both a unipolar voltage switching at 3 kHz and a DC voltage source of 200 V.An inductor of L = 2 mH and a capacitor of C = 4 µF are used in the LC filter to cut off the switching frequency in the generated signals; also, a resistor of R = 600 Ω is connected in order to have a constant load.Figure 6b shows the electric circuit for the aforementioned elements.Using the PQD generator, five signals for each PQD condition are generated.These conditions are sag, swell, interruption, oscillatory transient, harmonics, notching, spikes, and the combination of two PQDs, such as a sag, a swell, or an interruption with an oscillatory transient, harmonics, notching, or spikes, resulting in 95 signals as shown in Table

Electronics 2018, 7 ,
x FOR PEER REVIEW 9 of 13 a capacitor of C = 4 μF are used in the LC filter to cut off the switching frequency in the generated signals; also, a resistor of R = 600 Ω is connected in order to have a constant load.Figure 6b shows the electric circuit for the aforementioned elements.Using the PQD generator, five signals for each PQD condition are generated.These conditions are sag, swell, interruption, oscillatory transient, harmonics, notching, spikes, and the combination of two PQDs, such as a sag, a swell, or an interruption with an oscillatory transient, harmonics, notching, or spikes, resulting in 95 signals as shown in Table

Table 2 .
Confusion matrix for synthetic signals.

Table 3 .
Results for real signals.

Table 3 .
Results for real signals.