Voltage Variation Signals Source Identification and Diagnosis Method

Power Quality (PQ) problem has become an important issue for generating bad impact to the users nowadays. It is important to detect and identify the source of the PQ problem. This paper presents a voltage variation signals source identification and diagnosis method by determining the average time frequency representation (TFR) phase power of the impedance. The signals focused in this study are the voltage variation signals, which include voltage sag, swell and interruption. The voltage variation signals from different source location (upstream, downstream as well as up and downstream) according to the IEEE Standard 1159 by using the mathematical models. The signals are first analyzed by using the Spectrograms which act as the feature producing tool. Then, the average power TFR of phase domain of each signal is calculated and tabulated. Finally, the performance of the method is identified by using support vector machine (SVM) and k-nearest neighbor (kNN). The results show that this method is an effective and suitable technique for identifying the source of voltage variation. Keywords—Power quality; voltage variation; spectrogram; source identification; average time frequency representation phase power


I. INTRODUCTION
This Nowadays, electrical power supply quality problem is becoming great and major concern for both the industries and customers due to the increased use of electrical and electronics equipment [1].Power quality (PQ) problem is explained as the variation in term of frequency or amplitude of the voltage or current waveform flow within a power distribution system.PQ problems are getting deliberated [2] owing to the pervasive use of switching devices within the electrical power distribution systems.PQ problem is related to the discrepancy of current and voltage from their standard pure sinusoidal waveforms.It covers a diversity of electromagnetic incident which may be transient or steady-state in nature.The incidents or phenomenon include the voltage sag, swell, interruption, harmonics, spikes, unbalance, flicker and so on [3].Indigent quality of power may bring system failures, malfunction of equipment, reduced accuracy and efficiency of the equipment, ageing of the equipment as well as overheating of lines within the power distribution system.PQ improvement action is required to identify the source of the PQ disturbances.The improvement can be accomplished by proper detection, analysis and source identification of PQ events signals.
Studies have been done by researchers to investigate the characteristics of PQ events signals.One of the most popular PQ signals characteristics is the time-frequency characteristic [4], [5].In the literature, there are diverse of signal processing methods have been applied in analyzing PQ disturbance signals.The Fourier Transform (FT) and short time FT (STFT) are being applied to detect PQ signals.FT has advantages of compelling less amount of calculation as well as deep suitability, yet it has limitation for detecting steady state signals only.STFT divulges the frequency characteristics of the signals in time interval but it is difficult to reach equilibrium between time resolution and frequency resolution due to its fixed time window.From [6]- [9], these methods may bring poor efficiency of signal recognition.They are uncapable to analyze transient signals due to their fixed window size.A Wavelet transform (WT) has then been used to overcome the limitation of STFT which able to improve classification accuracy due to its fluctuating window size.However, WT method [10]- [13] is time consuming and can be easily affected by noises.From the literature, spectrogram has been proposed by researchers to analyze PQ signals.It provides information [14]- [16] of signal energy with respect to time and frequency in three-dimensional form with squared modulus of STFT.This algorithm is popular and simple to be used.
Most of the researchers focus on detection and classification of PQ disturbances by using various time frequency algorithms but not much on diagnosis of disturbances.Some studies [17]- [20] have been done on PQ disturbances which involve identification of source and classification of PQ events with the implementation of automated software approach analysis.From the literature, there is no much information regarding source identification of the PQ events.In [21], the author implemented a network based PQ diagnostic system (PQDS) which has the functions to detect PQ signals, analyze PQ signals and identify the cause of the event as well as the location of the event.However, this PQDS is only applicable on voltage sag by analyzing the power system topography.
In recent days, signal processing methods and machine learning techniques are becoming the attention of the researchers.The k-nearest neighbor (kNN) has been commonly used as the choice of classification method.The kNN algorithm shows a promising classification results with low computation costs [22], [23].Besides that, support vector machine (SVM) with Gaussian Radial Basis based kernel [24], [25] is widely used in the classification analysis of the PQ disturbances due to its excellent performance in PQ analysis studies.
The aim of this study is to explore the area of PQ events source identification and diagnosis method.The diagnosis method is developed by using the frequency and phase of www.ijacsa.thesai.orgspectrogram algorithm on the impedance of the signals.In this study, the PQ events focused will be the voltage variation which includes voltage sag, swell and interruption.Then, the optimal window size in spectrogram is selected based from the literature [26], [27].The PQ signals from upstream, downstream and both upstream and downstream will be generated according to IEEE Standard 1159 and then be analyzed with the spectrogram.Next, the phase of the impedance of the PQ events will be used to identify the source of the event.SVM and kNN are employed to classify the performance of the diagnosis method.It is important to find out the source of the PQ problem for reducing of the PQ problem towards the equipment.Source from upstream is the power source utility while downstream source is the source in the consumer's side.However, the noise evaluation is not included in this study.
The rest of paper is organized as follows.Section 2 introduces the methodology of the PQ event (voltage variation) analysis and diagnosis method.Section 3 reports the results of the study.Section 4 discusses the results showed in Section 3.Last but not least, the conclusion is presented in Section 5.

A. Voltage Variation Signal Types
PQ disturbances that may appear in a power system are different in their characteristics.To differentiate the characteristics of each specific PQ event, IEEE Standard 1159-2009 explains the categories and specific threshold value of PQ disturbances.The PQ event data can be obtained through repeatedly monitoring of power signal at various plants for a long period of time.However, the uncertainty in occurrence of PQ events in power distribution system result in inadequacy of real time data [28].To avoid time lose due to the scarcity of real time data collection, the researchers have employed the mathematical model given in IEEE Standard 1159 for generating the PQ disturbances signals, for their analysis work.
In this paper, the type of PQ disturbance focused is voltage variation which is voltage sag, swell and interruption.Mathematical models in MATLAB are modelled to simulate the signals of 50Hz of the PQ events (voltage variation) according to IEEE Standard 1159 [29].Table I presented the voltage variation types focused in this paper.Each disturbance is presented and tabulated with equation along with the parameters.They are defined accordingly based on the IEEE standard 1159 [29].

B. Frequency Spectrogram
Short duration PQ disturbances can be easily detected and analyzed by using signal processing technique such as the time frequency distributions which give the representation of the signal in term of time frequency.STFT is the most fundamental time frequency analysis technique.It is known to be the simplest and fastest, without much computation time.While spectrogram is formulated from squared modulus of STFT.STFT and spectrogram can be mathematically written as follows [15]: x a where x(t) is the input signal and ω(τ-t) is the observation window.The observation window used is Hanning window according to the literature, with window size of 1024 samples.Generally, the spectrogram exhibits a three-dimensional observant perceptive of the signal interested with respect to time and frequency.As a result, the input signal is presented in both time and frequency domains.

C. Phase Spectrogram
To obtain phase spectrogram, the signal will be processed with STFT.It can be expressed as follows: where x(t) is the input signal and ω(τ-t) is the observation window.The observation window here used is rectangular window.The parameter t in the observation window in ( 3) is defined as: where FF is the fundamental frequency of the signal.The result of STFT is a complex-valued function which grants the representation in both magnitude and phase parts of the signal.In this study, the average power time frequency representation (TFR) of the phase domain can be represented by: where the imaginary part or phase part of the TFR is used.The phase angle of the signal input can be obtained by applying trigonometry function onto the STFT b .It is calculated as follows: where the calculated phase angle of STFT b is in a line of numbers which is equal to the length of the signal.The average phase angle of STFT b can be expressed as follows: where n is length of the input signal.

D. Impedance Analysis
The impedance of the system is difficult to be simulated by using equation as the impedance varies to the power system itself.But in this study, the impedance of TFR of the event signal is used to perform source identification of the voltage variation.The alternative for obtaining the impedance of the event is by applying the Ohm's law.The equation of the impedance can be written as: E. Machine Learning Method Support vector machines (SVM) is a supervised machine learning method using computer science in classification.There is a method that expands the concept of hyperplane separation to the data is proposed in SVM to discriminate the data sets that unable to detach linearly according to the literature.In this study, SVM the Gaussian kernel function is implemented.The kernel function is applied in the hyperplane which takes role as the idea product of the nonlinear function.The Gaussian kernel can be expressed as follows: where x-y is the Euclidean distance between the feature vectors and σ is the kernel parameter.On the other hand, the knearest neighbor (kNN) has been commonly used as the choice of classification method due to its simplicity and speed.From the literature, the k values of kNN must be chosen carefully according to the specification of the model employed.In this study, the weight is utilized instead of the k value.The weight can be written as follows:  (10) where d st is the Euclidean distance.The Euclidean distance in (8) can be expressed as: where x s and x y are the vectors.

III. RESULTS AND DISCUSSION
The voltage variation signals which consist of voltage sag, swell and interruption from different source location (upstream, downstream, upstream and downstream) are generated in MATLAB.The number of signals generated are 50 for each event in each source location.In total, 450 signals (50 signals x 3 events x 3 locations) are simulated.The spectrogram transforms the voltage variation signals into time frequency representations with sampling frequency of 12 kHz and fundamental frequency of 50 Hz.The TFRs for each event at each source location will be presented in this section.In this study, kNN with k = 1 is used in the algorithm, due to its speed and simplicity [27].From the literature, the 2 nd and 5 th repetitions will be used for the testing set, then the remaining will be applied as training set.The classification accuracy and precision [30], [31] will be presented as the performance evaluation.The classification accuracy is calculated as follows: where TP and FP are the true positive and false positive which can be obtained from the confusion matrix.All the analysis is performed in MATLAB R2016a using computer with i7-4790 3.6 Ghz processing Intel(R) Core(TM) and 16 GB random access memory (RAM).The simulation of normal signal or pure sine wave is showed in Fig. 1(a) while the signals processed by spectrogram are presented in Fig. 1(b).

A. Source Location at Downstream
Fig. 2(a) demonstrates the simulated sag signals.As can be seen, the sag situation is set at time in between 0.05s to 0.15s.The signals are then analyzed by spectrogram and presented in Fig. 2(b).The signals are being captured in 50 Hz.The lighter areas exhibit higher amplitude.In turn, the darker areas display lower amplitude.During voltage sag in time period between 0.05s to 0.15s, there is a decline in voltage amplitude where the yellowish contour changes to blue contour when time approaching 0.05s and changes back to yellowish contour when approaching 0.15s.The TFR of magnitude and phase of the impedance is showed in Fig. 2(c).The TFR contour of the impedance is affected between the period of 0.05s and 0.15s.The TFR phase contour of impedance is captured at 50 Hz.The TFR power spectrum for the voltage, current, impedance and impedance TFR phase is plotted in Fig. 2(d).The value of the average power of impedance TFR phase obtained is -25.1.During voltage swell in time period between 0.05s to 0.15s, there is an increase in voltage amplitude where the yellowish contour appears between the duration 0.05s to 0.15s which indicates the amplitude of the signal is higher within the duration.The TFR of magnitude and phase of the impedance is showed in Fig. 3(c).The TFR contour of the impedance is affected between the period of 0.05s and 0.15s where the impedance has higher amplitude within that 0.05s duration.The TFR phase contour of impedance is captured at 50 Hz.The TFR power spectrum for the voltage, current, impedance and impedance TFR phase is plotted in Fig. 3(d).The value of the average power of impedance TFR phase obtained is -90.54.voltage interruption in time period between 0.05s to 0.15s, no contour is plotted as the amplitude of the voltage is dropping near to zero.The TFR of magnitude and phase of the impedance is showed in Fig. 4(c).The TFR contour of the impedance is affected between the period of 0.05s and 0.15s where the impedance has no value within that 0.05s duration.
TFR phase contour of impedance is captured at 50 Hz.The TFR power spectrum for the voltage, current, impedance and impedance TFR phase is plotted in Fig. 4(d).The value of the average power of impedance TFR phase obtained is -102.4.

B. Source Location at Upstream
Fig. 5(a) shows the sag signal.The sag occurs between 0.05s and 0.15s.The signals are then analyzed by spectrogram and presented in Fig. 5(b).The signals are being captured in 50 Hz.During voltage sag in time period between 0.05s to 0.15s, a decrease in voltage amplitude can be seen where the yellowish contour changes to blue contour when time approaching 0.05s and changes back to yellowish contour when approaching 0.15s.The TFR of magnitude and phase of the impedance is showed in Fig. 5(c).The TFR contour of the impedance is affected between the period of 0.05s and 0.15s.The TFR phase contour of impedance is captured at 50 Hz.The TFR power spectrum for the voltage, current, impedance and impedance TFR phase is plotted in Fig. 5(d).The value of the average power of impedance TFR phase obtained is 20.95.During voltage swell in time period between 0.05s to 0.15s, there is an increase in voltage amplitude where the yellowish contour appears between the duration 0.05s to 0.15s which indicates the amplitude of the signal is higher within the duration.The TFR of magnitude and phase of the impedance is showed in Fig. 6(c).The TFR contour of the impedance changes between the period of 0.05s and 0.15s where the impedance has higher amplitude within that 0.05s duration.The TFR phase contour of impedance is captured at 50 Hz.The TFR power spectrum for the voltage, current, impedance and impedance TFR phase is plotted in Fig. 6(d).The value of the average power of impedance TFR phase obtained is 114.5.The signals are being captured in 50 Hz.During voltage interruption in time period between 0.05s to 0.15s, no contour can be seen due to the dropping of the amplitude of the voltage approximately to zero.The TFR of magnitude and phase of the impedance is showed in Fig. 7(c).The TFR contour of the impedance is affected between the period of 0.05s and 0.15s where the impedance has no value within that 0.05s duration.The TFR phase contour of impedance is captured at 50 Hz.The TFR power spectrum for the voltage, current, impedance and impedance TFR phase is plotted in Fig. 7(d).The value of the average power of impedance TFR phase obtained is 38.87.

C. Source Location at both Upstream and Downstream
Fig. 8(a) shows the sag signal.The sag duration is between 0.05s and 0.15s.The signals are then analyzed by spectrogram and presented in Fig. 8(b).The signals are being captured in 50 Hz.During voltage sag in time period between 0.05s to 0.15s, the voltage amplitude drops from yellowish to blue contour.The TFR of magnitude and phase of the impedance is showed in Fig. 8(c).The TFR contour of the impedance is affected between the period of 0.05s and 0.15s.The TFR phase contour of impedance is captured at 50 Hz.The TFR power spectrum for the voltage, current, impedance and impedance TFR phase is plotted in Fig. 8(d).The value of the average power of impedance TFR phase obtained is 5001.12.The signals are being captured in 50 Hz.During voltage swell in time period between 0.05s to 0.15s, there is an increment in voltage amplitude where the yellowish contour appears between the duration 0.05s to 0.15s which indicates the amplitude of the signal is higher within the duration and changes back to blue contour.The TFR of magnitude and phase of the impedance is showed in Fig. 9(c).The TFR contour of the impedance changes between the period of 0.05s and 0.15s.The TFR phase contour of impedance is captured at 50 Hz.The TFR power spectrum for the voltage, current, impedance and impedance TFR phase is plotted in Fig. 9(d).The value of the average power of impedance TFR phase obtained is 397.43.During voltage interruption in time period between 0.05s to 0.15s, the contour comes to a halt where no contour plot can be seen.The TFR of magnitude and phase of the impedance is showed in Fig. 10(c).The TFR contour of the impedance is affected between the period of 0.05s and 0.15s where the impedance has no value within that 0.05s duration.The TFR phase contour of impedance is captured at 50 Hz.The TFR power spectrum for the voltage, current, impedance and impedance TFR phase is plotted in Fig. 10(d).The value of the average power of impedance TFR phase obtained is 999.81.

D. Experimental Results
In  Table IV shows the average power of impedance TFR phase for each case.As can be seen, case DVSG, DVSL and DVI has negative magnitude of average power.This shows that cases occurred in downstream have low average power of impedance TFR phase.Case UDVSG, UDVSL and UDVI has higher magnitude of average power compared to case UVSG, UVSL and UVI.The mean values for each case have showed similar trend.From this point of view, downstream voltage signals have lowest average impedance TFR phase power while up and downstream signals have highest average impedance TFR phase power.
Table V demonstrates the confusion matrix for each case by using SVM.The confusion matrix for each case with the kNN classifier is tabulated in Table VI.As can be seen, the classification accuracy of SVM is 94.2222%, which is higher than kNN which has classification accuracy of 93.5556%.Front this point of view, SVM has better performance in classifying the voltage variation with different location compared to kNN.According to the literature, the diagnosis method used in this study has different way of approach compared to other diagnosis methods.The performance of this method is analyzed by using the 450 sets of voltage variation data simulated according to the IEEE Standard 1159.Firstly, the signals generated can be analyzed by frequency and phase spectrogram to obtain the necessary parameters as mentioned in the methodology.The signals analyzed are captured at the frequency of 50 Hz and the differ in contour for each voltage variation can be observed from the contour plot.Secondly, the phase angle of the signals can be calculated according to the equation stated in the methodology.The obtained values are close to the actual input value.Secondly, the average power of the impedance TFR phase for the three cases (problem source from downstream, upstream as well as up and downstream) can be obtained by the equation stated.The results are able to categorize the signals into the three cases stated due to the differ values of each case.In addition, the classification accuracy for each type of case has been presented and SVM shows the better performance compared to kNN in this study.
Through the analysis, we found that the problem source of the voltage variation can be identified by the average power of impedance TFR phase.The average power for problem source at downstream has the lowest value while problem source at both up and downstream has the highest value.The range in between them is the range for problem source at upstream.In sum, this method is useful in identifying the problem source of the voltage variation.

IV. CONCLUSION
A method of diagnosis of source identification by implementing the imaginary part of the impedance of voltage variation is used in this study.The experimental results revealed that voltage variation occurs at both up and downstream has the highest value of average power, followed by the voltage variation occurs at upstream.The average power is lowest for downstream case.In summary, this source identification and diagnosis method is easy to be implemented and performed.As for future works, the implementation of hardware can be proposed in order to provide an online and real-time monitoring tool.On top of that, the source identification and diagnosis method used in this study can be improved and applying it on more type of PQ disturbances other than voltage variation.The analysis of using time frequency distributions can be explored too for getting more parameters and features for classification.

Fig. 3 .
Fig. 3. Voltage and Current Swell Signal, (b) TFR of the Voltage and Current Swell Signal, (c) TFR Power and Phase of Swell Impedance, (d) Power Spectrum.

Fig. 6 (
Fig. 6(a) shows the swell signals.The swell situation is set at time in between 0.05s to 0.15s as well.The simulated voltage has an increase of magnitude more than its nominal value within the time set.Fig. 6(b) shows the signals analyzed by spectrogram.The signals are being captured in 50 Hz.During voltage swell in time period between 0.05s to 0.15s, there is an increase in voltage amplitude where the yellowish contour appears between the duration 0.05s to 0.15s which indicates the amplitude of the signal is higher within the duration.The TFR of magnitude and phase of the impedance is showed in Fig.6(c).The TFR contour of the impedance changes between the period of 0.05s and 0.15s where the impedance has higher amplitude within that 0.05s duration.The TFR phase contour of impedance is captured at 50 Hz.The TFR power spectrum for the voltage, current, impedance and impedance TFR phase is plotted in Fig.6(d).The value of the average power of impedance TFR phase obtained is 114.5.

Fig. 7 (
Fig. 7(a) shows the interruption signals.The interrupted situation is set at time in between 0.05s to 0.15s where the voltage signal decreases to value approximately zero during the period.Fig. 7(b) shows the signals analyzed by spectrogram.The signals are being captured in 50 Hz.During voltage interruption in time period between 0.05s to 0.15s, no contour can be seen due to the dropping of the amplitude of the voltage approximately to zero.The TFR of magnitude and phase of the impedance is showed in Fig. 7(c).The TFR contour of the

Fig. 9 (
Fig. 9(a) shows the swell signals.The swell happens in between 0.05s to 0.15s.The simulated voltage has an increment of magnitude more than its nominal value within the time set.Fig. 9(b) shows the signals analyzed by spectrogram.The signals are being captured in 50 Hz.During voltage swell in time period between 0.05s to 0.15s, there is an increment in voltage amplitude where the yellowish contour appears between the duration 0.05s to 0.15s which indicates the amplitude of the signal is higher within the duration and changes back to blue contour.The TFR of magnitude and phase of the impedance is showed in Fig.9(c).The TFR contour of the impedance changes between the period of 0.05s and 0.15s.The TFR phase contour of impedance is captured at 50 Hz.The TFR power spectrum for the voltage, current, impedance and impedance TFR phase is plotted in Fig.9(d).The value of the average power of impedance TFR phase obtained is 397.43.

Fig. 10 (
Fig. 10(a) shows the interruption signals.The interrupted situation is set at time in between 0.05s to 0.15s where the voltage signal drastically drops to value approximately zero during the period.Fig. 10(b) shows the signals processed by spectrogram.The signals are detected in 50 Hz.During voltage interruption in time period between 0.05s to 0.15s, the contour comes to a halt where no contour plot can be seen.The TFR of magnitude and phase of the impedance is showed in Fig.10(c).The TFR contour of the impedance is affected between the period of 0.05s and 0.15s where the impedance has no value within that 0.05s duration.The TFR phase contour of impedance is captured at 50 Hz.The TFR power spectrum for the voltage, current, impedance and impedance TFR phase is plotted in Fig.10(d).The value of the average power of impedance TFR phase obtained is 999.81.
this study, there are two simulated signals (voltage and current) for each event from each source location are used to determine their phase angle.The signals are named as Downstream Voltage Sag (DVSG), Downstream Current Sag (DCSG), Downstream Voltage Swell (DVSL), Downstream Current Swell (DCSL), Downstream Voltage Interruption (DVI), Downstream Current Interruption (DCI), Upstream Voltage Sag (UVSG), Upstream Current Sag (UCSG), Upstream Voltage Swell (UVSL), Upstream Current Swell (UCSL), Upstream Voltage Interruption (UVI), Upstream Current Interruption (UCI), Up and Downstream Voltage Sag (UDVSG), Up and Downstream Current Sag (UDCSG), Up and Downstream Voltage Swell (UDVSL), Up and Downstream Current Swell (UDCSL), Up and Downstream Voltage Interruption (UDVI) as well as Up and Downstream Current Interruption (UDCI).Table II shows the phase angles of voltage signals calculated for all events along with the precision.The signals are simulated with fundamental angle of 20˚ for voltage signal and 90˚ for current signal.The phase angles of both the voltage and current signals showed an overall value which is not differ much from the original input angle.The phase angles of current signals calculated are tabulated in Table III.www.ijacsa.thesai.org

TABLE II .
PHASE ANGLES OF VOLTAGE SIGNALS

TABLE III .
PHASE ANGLES OF CURRENT SIGNALS

TABLE V .
CONFUSION MATRIX AND CLASSIFICATION ACCURACY BY USING SVM FOR VOLTAGE SIGNALS

TABLE VI .
CONFUSION MATRIX AND CLASSIFICATION ACCURACY BY USING KNN FOR VOLTAGE SIGNALS