Unusual Voltage Sag Event Detection in Power Systems

Three multivariate statistical tools (Principal Component Analysis, Factor Analysis, Analysis Discriminant) have been tested to characterize and model the sags registered in distribution substations. Those models use several features to represent the magnitude, duration and unbalanced grade of sags. They have been obtained from voltage and current waveforms. The techniques are tested and compared using 69 registers of sags. The advantages and drawbacks of each technique are listed.


I. INTRODUCTION
HE importance of Power Quality monitoring has increased in the last years [1].Consequently, it has caused sudden advances in monitoring devices.Electric parameters are permanently monitored and registered, producing huge volume of data.The end-user has a large amount of data that can be used to assess and reduce the power quality problems [2] [5].Hence, statistical techniques have to be exploited to take advantage of information contained in those registers.Principal Component Analysis (PCA), Factor Analysis (FA) and Discriminant Analysis (DA) have been tested in this paper to characterize voltage sags and determine unusual ones.
This paper is organized in twelve sections.In the second section the features extracted from sag waveforms are described.Next, we present the registers of voltage sags.In the fourth to sixth sections, PCA, FA and DA are briefly explained.Later, in the seventh to ninth sections, the results of each technique are shown.Finally, comparison results, conclusion and future works are discussed.

II. FEATURES OF VOLTAGE SAGS
We have extracted, from the sags waveforms, a set of features useful to describe duration, magnitude and unbalance degree of sags.They are summarized in Table I.Each feature have been selected because the information it provides: 1) RCV and PNF: Minimum Remaining Complex Voltage and Positive-Negative Factor F contain information about magnitude and unbalance grade of sags, respectively.Sixphase and Symmetrical component are two algorithms to calculate them [4] [3].The first algorithm was used in this work.RCV is a voltage signal that represents the three phase voltages.
2) L v : Loss of voltage is defined as the integral of the RMS voltage drop during the event.L v describes magnitude and duration of sag [3].In this analysis L v was computed from RCV instead of the three gathered voltage signals, according to the equation 1: (1) 3) GVo: This is a new feature we propose in this paper.Gain of zero sequence voltage corresponds as the integral of the RMS zero sequence voltage during the event.It has been computed using the equation 2: (2) 4) I ratio : Ratio between the fundamental frequency component of the currents during and before of voltage sag event.It was previously defined in [6].

5) T:
Voltage sag event duration measured in samples.
Duration, magnitude and unbalanced grade were selected as sag characteristics in order to determine this unusualness.

III. DESCRIPTION OF VOLTAGE SAGS:
The study has been carried out with 69 registers of sags.All the registers contain 40 cycles, sampled at 128 samples per cycle (50Hz).
The sequence of RMS values has been calculated using the Short Fourier Transform (SFT) in one cycle (128-samples) sliding window to estimate the magnitude of the nominal frequency (50Hz).Matlab® has been used to compute the feaures whereas the statistical analysis has been performed on SPSS® 1 .All the features were standardized with zero mean and unit variance (µ=0; σ=1).Table II summarized the correlation among these features.The features GV 0 , T and N seg have low linear correlation (correlation coefficients are near to zero, especially N seg ).In order to determine the normality of each feature (variable) the Kolmogorov-Smirnov (KS) and Shapiro-Wilk (SW) normality tests were performed (Table III).KS and SW test the null hypothesis H 0 : The distribution of the population is normal.Hence, both tests rejected it; therefore the distribution of these features is not Gaussian.

IV. PRINCIPAL COMPONENT ANALYSIS
It is based on the analysis of the covariance matrix of a set of m observations represented by n variables.The singular value decomposition of this matrix is used to obtain a set of eigen-values and eigenvectors.And these are used to project the original data onto a lower dimension space preserving the same information and rejecting the noise.These new variables, or scores, are the result of the linear combination of the original variables [1].Then, the set of data can be expressed as a linear combination of r (lower than n) new variables, t i assuming an error E [9]: Where t i and p i are named scores and loading vectors respectively and are computed to reflect relevant relation amongst samples (t i ).While p i highlights the correlation among variables and they correspond to eigenvectors of covariance matrix (C).

€
Cp i = λp i (4) PCA assumes that the eigenvectors with bigger eigen-values 1 Statistical software to data analysis are the best ones for expressing the data upon based on the maximum variance criteria.
The first r principal components build up a new space with a lower dimensionality than the original one.Projection of the data to the i-th axis in this new space can be done using linear transformation presented in equation 5 [9].

A. PCA Previous Tests
In order to assess if the data are suitable to perform a PCA these tests are performed.

1) Barlett's Test:
In PCA is convenient that the variables are correlated, so the correlation matrix differs from identity matrix).This test allows statistically determining if the variables are correlated or not.Barlett's tests the null hypothesis: H 0 : The correlation matrix is the identity matrix.With a confidence interval equal to 95% and Barlett significance value lower than 0,05 implies that variables are correlated (hypothesis H 0 is rejected).
Where r ij and p ij are the simple and partial correlation coefficients between variables respectively.

V. FACTOR ANALYSIS
Factor analysis is a method for investigating whether a number of variables of interest X 1 , X 2 ,… , X n , are linearly related to a smaller number of unobservable or subjacent variables known as factors [10].
Where, t i and p i are scores and loadings vectors respectively.µ is the mean of scores to k-th observation and E are the errors.
The meaning of the factors must be induced from seeing which variables are most heavily loaded on which factors.
FA and PCA methods are related but differ.PCA is generally used when purpose is data reduction.FA is generally used when the research purpose is to identify latent variables which contribute to the common variance of the set of measured variables.FA distinguishes the specific variability while PCA the global variability [10].

A. FA Previous Tests
Barlett's test and KMO coefficient revision have to be performed to analyze the suitability of this method.But also additional two test are recommended: 1) Determinant of correlation matrix: If determinant of the correlation matrix is close to zero the variables are highly correlated.
2) Measure of Sampling Adequacy -MSA: It is a coefficient similar to KMO but MSA is for each variable.MSA greater than 0,5 to perform FA is suggested.There is one discriminant function for 2-class discriminant analysis, but for higher order DA, the number of functions (each with its own cut-off value) is the least of (k -1), where k is the number of classes in the criterion variable, or p, the number of discriminating variables.Each discriminant function is orthogonal to the others [8].
The selected features are discriminating variables in this analysis.The criterion variable is a vector that indicates if the sag is unusual or not.

VII. PCA RESULTS
PCA has been applied using the whole set of features except Nseg.It has been excluded due to its poor correlation level.A significance value in Bartlett's test (0,01) has been obtained (lower than the original 0,05).Therefore, the null hypothesis (H 0 ) can be rejected, which means that the features are significantly correlated and suitable to apply the PCA method.
The KMO coefficient equal to 0,55 was obtained.Although it is lower than the recommended 0,7, it is close enough to continue with the method taking it in consideration.
Three principal components were selected because explain 81,1% of the global variability according to Table IV.Moreover, observing the loads vectors (p i ) in Table V, the last three components explain low variability of data.First and second loading vectors are depicted in Fig. 1.It shows that sags with low depth are located on the right hand side (positive first component axe), while the sags with high depth (high sag magnitude) will appear on the left hand side.The same occurs with the second principal component, the longest sags are located in the positive axe.In third component we can observe that the unbalanced grade is described because the greatest coefficient is GV 0 .Hence, these three components explain depth, duration and unbalance grade respectively.When the original data is projected on the PCA space, we observe clearly that the sags number 54 is the longest sag of the dataset, while sag number 21 is the deepest and shortest; view  In order to obtain a suitable set of features N seg was excluded.Thus, MSA coefficients are close to 0,5 when N seg is not included.A similar behavior was found in PCA too.
The number of factors through the Chi-square goodness-offit Test and some analysis was determined.It tests the hypothesis: H 0 : The adequate number of factors is lower or equal than extracted number of factors and H 1 : The adequate number of factors is greater than extracted number of factors.Then, Chi-Test suggests using two factors with a confidence interval of 95%, resulting in this case that H 0 is accepted (0,173>0,05) according to Table VII.However, with a number of factors equal to three, the meaning of each factor has a better interpretability than using only two.Observing the factorial coefficients shown in Table VIII, it is possible to determine the meaning of each factor.
Hence, first factor describes the depth of sags; second factor describes the loss of voltage and duration; and the third factor describes the degree of unbalance.
Sag number 36 is the sag event with a major loss of voltage and duration, while sag number 21 is the deepest; view Fig. 3.According to PCA the sag number 54 is the longest and most unbalanced, while in FA is only the most unbalanced (the highest score on third factor).

IX. DA RESULTS
In order to perform a DA, sags have been labeled with zeros or ones.Zeros is assigned to represent normal or usual sags and ones to unusual ones.A distance criteria defined on the projection space given by the PCA has been used.The sag with a Hostelling distance (it is referred as the T 2 statistic) to the origin (center of the model) greater than 2 units in the PCA space were considered as unusual sags.So, 12 sag events were labeled as unusual.The coefficients of the discriminant functions in Table IX are shown.The features N seg and T sag by DA were automatically excluded, due to their low discrimination.However, the features L v , V 0 and I ratio should be excluded too, because their coefficients are near to zero, as a result, their contribution is very low.Hence, the DA model only discriminates according to depth of sags.
In order to determine if the covariance matrices of groups are significantly equals, Box's test was performed.It tests the null hypothesis H 0 : The covariance matrices are equals.Box's test rejected H 0 , which means that the sag classes have different distribution in their original space.Therefore, Box's test suggests a quadratic discriminant function.But this is not completely true because of the reduced amount of data used.Consequently finally we used a linear discriminant function.Moreover, the quadratic discriminant analysis computational cost is O(n 2 ) for n-dimensional vectors [7].The linear function is: The sags will near to L=3.1 are considered as unusual whereas those close to L=-0.6 are the most common.
The F test of Wilks's showed that the means of these groups differ and consequently the null hypothesis H 0 was rejected (Ho: The group means are equals).
The Box's test showed that the covariance matrices differ between groups.Lack of homogeneity of variances will mean significance tests are unreliable.The lack of homogeneity is due to the dataset is small and split of the dependent variable is very uneven.
In spite of that DA model with 10-fold cross validation was tested.The classification rate was 94.2%.Two usual and two unusual sags were wrongly classified.The value taken for features corresponding to sags number 21, 36 and 54 are shown in Table X.Those have been compared with the mean value of each feature (id=0).According to PCA an FA results, the relevant features have been italicized.For instance, the deepest sag is the number 21, its RCV magnitude is 0,18; four times smaller than RCV mean (0,74).Similarly, Table X confirms that sag number 54 is the most unbalanced and longest.The sag number 36 has the highest L v and high T with respect to average sag.The sags 21 and 54 are plotted in Fig. 4.  Some differences between the three approaches are summarized in Table XI are related.However, they have the next common qualities: training process is not tedious, are based on model, can be online implemented.

XI. CONCLUSIONS
PCA, FA and DA have been assessed to determine the statistically usual and unusual voltage sags.PCA and FA allow knowing the causes of the unusualness, whereas the DA does not, also, an expert person is required to classify the sags as unusual or usual, whereas for using PCA and FA an expert is not required.
The selected features have shown a low correlation level in the registered sags used in this analysis.New features have to be proposed and to register more sags as well.
PCA, FA and DA can be used to determine unusual voltage sags.Advantages and drawbacks of each one have been presented in this paper.

XII. FUTURE WORKS
A set of features highly correlated has to be proposed.Features that describe the unbalanced grade and duration to proposed feature set have to be added.
To determine unusual sags through one or several statistically criterions, such as: Euclidean distance, Mahalanobis distance, Hotelling's T 2 .
Proposed a methodology based on features and statistically tools to determine unusual voltage sag events.
Discriminant analysis is a technique for classifying a set of observations into predefined classes.The purpose is to determine the class of an observation based on a set of variables known as predictors (discriminating variables).The model is built based on a set of observations for which the classes are known (criterion variable).The criterion variable contains the class of each observation.Based on the set of observations, the technique constructs a set of linear functions of the predictors, known as discriminant functions, such that [8]:(9)Where, b i , discriminant coefficient.x i , discriminating variables.c, constant term.L is analogous to multiple regression, but the b's are discriminant coefficients which maximize the distance between the means of the class.

Fig. 1 .
Fig. 1.Loadings vectors (pi).First and second component.The first component determines depth and second component the duration of sag.

Fig. 2 .
Fig. 2. Scores vectors.Voltage sag events projected on first and second principal component.Depth and duration of sag respectively.

Fig. 2 .
In third component the sag 54 appears as the most unbalanced.VIII.FA RESULTS Determinant of correlation matrix, significance value obtained from Barlett's test, KMO and MSA coefficients in Table VI are shown.

Fig. 3 .
Fig. 3. Voltage sag events projected on first and second factor.Depth and Lv+Tsag of sag respectively.