Identification of Power Quality Disturbances Based on Fast Fourier Transform and Artificial Neural Network

—This paper presents the proposed algorithms for the identification of short duration RMS variations and long duration RMS variations combined with harmonic. The proposed algorithms are Fast Fourier Transform (FFT) and Artificial Neural Network (ANN). The Algorithms identify nine types of Power Quality (PQ) disturbances such as normal signal, voltage sag, voltage swell, under voltage, over voltage, voltage sag combined harmonic, voltage swell combined harmonic, undervoltage combined harmonic, and over voltage combined harmonic. FFT is used to obtain the frequency spectrum of each PQ disturbance with frequency sampling of 1000 Hz and data length of 200. Output FFT is used to input data for ANN. Output ANN is a type of nine PQ disturbances. The result shows that proposed algorithms (FFT combined ANN) are effective for identification, which ANN with 20 neurons in the hidden layer has an accuracy of approximately 99.95 %

increase of RMS voltage greater than 1.1 pu in more than one minute. Typical magnitudes are between 1.1 to 1.2 pu. Large load switching or variations in the reactive compensation in the system (e.g., switching on a capacitor bank), incorrect tap settings on transformers, and incorrect system voltage regulation also can cause overvoltage [4].
Harmonics are sinusoidal voltages or currents having frequencies for integer multiples of the frequency at which the designed operating supply system (termed the fundamental frequency; usually 50 Hz or 60 Hz). Combined with the fundamental voltage or current, harmonics produce waveform distortion. It exists due to the nonlinear characteristics of devices and loads on the power system [4]. Among all these disturbances, they can cause sufficient damage to electrical instruments and equipment such as industrial consumer equipment that can ultimately lead to the shutdown of their system. Therefore, it requires the proposed algorithm that can accurately detect power quality disturbances [5].
Mohd Anuar bin Mohamed Ayub et al., [6] proposed an over and under-voltage detection system that integrated with an IoT monitoring system. The proposed method in this research for power quality disturbances was using a true-false logic. The author mentioned the system will give information about undervoltage disturbance when the RMS voltage of the electrical system was under 216 V and also information about overvoltage when the RMS voltage exceeds 253 V. This proposed method to know well the power quality disturbance couldn't be adaptable for the voltage fluctuation condition of the system. On another side, this system needs to develop for another power quality disturbance scope such as a short time power quality disturbance. Moreover, it might be a biased condition when a short-time period of power quality disturbance happens.
Billy Mahdianto Arsyad et al., [7] proposed a method of over/under voltage control by using a microcontroller implemented in the 220 V power system. This research only focused on long-period power quality disturbance and combined with a relay as an actuator to set off the main circuit. The author explained to determine the overvoltage condition, the RMS voltage should be equal to or higher than 225 V. For the Undervoltage condition, the RMS voltage value should be under 215 V. So, the main power system only can be detected as a normal condition when RMS value was between 215 V until 225 V. This paper could be more in-depth analysis when the proposed method can differentiate between any possible power quality disturbances.
Doan Duc Tung et al., [8] proposed a monitoring system that could protect the main system from overvoltage and undervoltage disturbance. This author proposed an algorithm that can be fit in fluctuation voltage conditions. It means the author didn't determine a fixed value to differentiate the undervoltage or overvoltage condition or normal condition. As a monitoring system, this research discusses the analytical scope expressed by graphs and waveforms. Based on this proposed algorithm, it might develop into a complex functional purpose for power quality disturbance also harmonics that may happen between the operation of the power system.
According to related works, methods are often to be applied to detect short-duration RMS variations and longduration RMS variations for their value and time duration. Meanwhile, these methods are not capable to detect the short-duration RMS variations and long-duration RMS variations that are combined with harmonic disturbances. The method often used to analyze harmonics is Fast Fourier Transform (FFT), but FFT is not capable to detect non-stationary signals. Therefore, this paper proposed two methods, namely FFT and Artificial Neural Network (ANN). ANN uses data from the FFT output to detect and classify nine types of power quality disturbances such as voltage sag, voltage swell, under voltage, over voltage, voltage sag combined with harmonic, voltage swell combined with harmonic, undervoltage combined with harmonic, and overvoltage combined with harmonic. Furthermore, by this method which is implemented in electrical power systems, power quality disturbances as mentioned before could be detected and gives improvement against the related works.

II. theoretIcal Background
This section presents the theoretical background of the paper topic which is a description of voltage variations and harmonic disturbances according to IEEE Std 1159, FFT, and ANN.

A. Types of Voltage Variations and Harmonic Disturbances
Types of voltage variations according to IEEE Std. 1159-2009 are short and long duration RMS variations. Short duration RMS variation is divided into 3 types such as instantaneous, momentary, and temporary which have different in duration and magnitude. Harmonic disturbances include waveform distortion. Characteristics of voltage variations and harmonic disturbances can be seen in Table 1.

B. Fast Fourier Transform
FFT algorithm supported the elemental principle of the DFT computation of a sequence of array data (N) length into smaller DFT. That algorithm only needs fewer multiplications and additions than direct DFT computation [9]. FFT during the process which is decomposition on a sequence x[n] is turning into a smaller subsequence. This process is also known as the time simplification formula. The fundamental plan is illustrated by considering the special case of N as a number that has a value from exponent of 2, where illustrates a bit value. Then X[k] may be computed by x [n] separating into two sequences that include even numbers of points and odd numbers of points, in x [n]. With X [k] given by [9]: ANN is the one artificial intelligence that represents the human brain form. As a complex architecture, ANN needs to reform input data into a value that can be processed by the neural network structure. Hence, ANN will convert the output neural network structure to a real value called as denormalization process.
Inside the neural network structure, it contains several

Waveform Distortion
Harmonics Steady State 0-9 kHz, 0-20 % functional parts which are the input layer, hidden layer, an output layer, weight, and bias. Between all layers such as the input layer and the hidden layer, there is a connection that consists of weight and bias. For the mathematical form of neural network structure, there is an activation function that uses for processing output value from weight and bias calculation into the next layer [10]. A simple architecture of ANN will be shown in Figure 1. Based on ANN architecture representing the human brain, it can identify, predict, and diagnose for a functional purpose. All of those are supported by the training process or learning process. By knowing raw and target data, it might process that training data to adjust the weight and bias value for the best ANN algorithm on the proposed system.

III. ProPosed Method
This paper identifies short-duration RMS variation and long-duration RMS variation with temporary type and combined with harmonics.
Based on equation (1), the result of FFT is a matrix in the frequency domain. Fourier analysis provides a set of mathematical tools which can be used to break down a signal into its various fault components [11]. Then, it's possible to predict the effect of the signal from its individual fault component. Hence, Fourier analysis can determine fault identification accurately by fault component characteristics. Fast Fourier Transform has been presented in this paper to the identification of faults in power system networks accurately [12]. The block diagram of the proposed method is presented in Figure 2.
ANN is applied to identify the type of power quality disturbances. The architecture of ANN consists of the input layer, hidden layer, and output. The input of ANN is output FFT. There is 250 x 9 data for input of ANN. 250 x 9 input data mean the fault components and their variations for all conditions. The important parameter of ANN is hidden layers. The hidden layer has 20 neurons, respectively. The iteration of ANN is 294. To describe the architecture of ANN, it can be shown in Table 2.
With the different number of neurons, same layer, and same parameters of training, the training has different results [13]. The training process of ANN and its result respectively are shown in Figures 3 and Figure 4.
The first layer is the input layer that receives data directly. The number of nodes in the input layer expressed the vector dimension. The hidden layer consists of some predetermined number of nodes and each of which is connected to each node of the input layer by some weight. Similarly, the output nodes are connected to each node of the hidden layer.

IV. sIMulatIon result and analysIs
To evaluate the performances of FFT and ANN, the proposed method required simulation with vary of power quality signals and several neurons in the hidden layer. Nine types of signals should be identified by FFT and ANN such as normal signal, voltage sag, voltage swell, undervoltage, overvoltage, voltage sag combined harmonic, voltage swell combined harmonic, undervoltage  To process the signal, FFT required frequency sampling of 1000 Hz and a number of data of 500 data. Figure 5 shows FFT for analyzing a sinusoidal signal. The simulation result shows that FFT analysis has accurately transformed sinusoidal signal into spectrum frequency. The spectrum magnitude in the frequency of 50 Hz is 5 and for other frequencies is 0. This value depends on the magnitude of the sinusoidal signal in the time domain because that's a pure sinusoidal signal. Figure 6 shows FFT for analyzing voltage sag. Voltage sag is modeled by degradation of voltage level from 0.08 until 0.12 s. The simulation result shows that FFT analysis has accurately transformed voltage sag into spectrum frequency which is different from the result of a sinusoidal signal. According to the FFT result, spectrum magnitude in the frequency of 50 Hz isn't 1 V because there's a disturbance between 0.08 and 0.12 s. Hence, the spectrum magnitude of 50 Hz is 0.9 V and there are spectrum magnitudes outside 50 Hz that appear in 0 -50 Hz and 50 -200 Hz below 0.1 V. Figure 7 shows FFT for analyzing voltage swell. Voltage swell is modeled by the addition of voltage level from 0.06 until 0.14 s. The simulation result shows that FFT analysis has accurately transformed voltage swell into spectrum frequency which is different from the result of a sinusoidal signal and also voltage sag. According to the FFT result, spectrum magnitude in the frequency of 50 Hz isn't 1 V because there's a disturbance between 0.06 and 0.14 s. Hence, the spectrum magnitude of 50 Hz is 1.3 V and there are spectrum magnitudes outside 50 Hz that appear in 0 -50 Hz and 50 -200 Hz below 0.1 V. Compared with FFT analysis from voltage sag, the FFT result of voltage swell gives more spectrum magnitude values in the outside 50 Hz that appear in 0 -50 Hz and 50 -200 Hz. It happens because, in the voltage swell simulation, the duration of the disturbance is longer than the voltage sag. The main difference between voltage sag and voltage swell from this simulation result is the spectrum magnitude from voltage swell at 50 Hz has a greater value than voltage sag. Figure 8 shows FFT for analyzing undervoltage. Undervoltage is modeled by the degradation of voltage   Figure 9 shows FFT for analyzing overvoltage. Overvoltage is modeled by the addition of voltage level from 0.2 until 1.8 s. The simulation result shows that FFT analysis has accurately transformed overvoltage into spectrum frequency which is different from the result of a sinusoidal signal, voltage sag, voltage swell, and undervoltage. According to the FFT result, spectrum magnitude of 50 Hz isn't 1 V because there's a disturbance between 0.2 and 1.8 s. Hence, the spectrum magnitude of 50 Hz is around 1.55 V and there are spectrum magnitudes outside 50 Hz that appear in 0 -50 Hz and 50 -200 Hz below 0.1 V. Compared with FFT analysis from voltage swell, the FFT result of overvoltage gives more spectrum magnitude values in the 50 Hz. It happens because, in the overvoltage simulation, the duration of the disturbance is longer than the voltage swell.
Different from the previous FFT result, Figures 10 to Figure 13 have more complex disturbances which include harmonics. Harmonics that combined with previous power quality disturbances consist of fault components in the frequency of 150 Hz, 250 Hz, and 350 Hz respectively. Figure 10 shows FFT for analyzing voltage sag combined with harmonics. Voltage sag combined with harmonics is modeled by degradation of voltage level from 0.08 until 0.12 s which is including harmonic components in the frequency of 150 Hz, 250 Hz, and 350 Hz respectively. The simulation result shows that FFT analysis has accurately transformed voltage sag combined with harmonics into spectrum frequency which is different from the previous result. According to the FFT result, spectrum magnitude in the fundamental frequency is around 5 V because there's a voltage sag combined with harmonics between 0.08 and 0.12 s. Hence, the spectrum magnitude of 150 Hz is 1.25 V, 250 Hz is 0.75 V, 350 Hz is 0.5 V, and there are spectrum magnitudes outside fundamental and harmonics frequency below 0.1 V. Figure 11 shows FFT for analyzing voltage swell combined with harmonics. Voltage swell combined with harmonics is modeled by the addition of voltage level from 0.06 until 0.14 s which is including harmonic components in the frequency of 150 Hz, 250 Hz, and 350 Hz respectively. According to the FFT result, spectrum magnitude in the fundamental frequency is around 5.2 V because there's a voltage swell combined with harmonics between 0.06 and 0.14 s. Hence, the spectrum magnitude of 150 Hz is 1.25 V, 250 Hz is 0.75 V, 350 Hz is 0.5 V, and there are spectrum magnitudes outside fundamental and harmonics frequency below 0.1 V. It happens because harmonics appear following the voltage swell with its fault components. Figure 13 show FFT for analyzing undervoltage combined with harmonics and overvoltage combined with harmonics. Those disturbances are modeled by degradation for undervoltage and the addition for overvoltage of voltage level from 0.2 until 1.8 s which is including harmonic components in the frequency of 150 Hz, 250 Hz, and 350 Hz respectively. According to the FFT result, spectrum magnitude in the fundamental frequency is around 4.2 V for undervoltage and 5.8 V for overvoltage because there are harmonics fault components between 0.2 and 1.8 s. Hence, the other spectrum magnitude appears such as 150 Hz is 1.25 V, 250 Hz is 0.75 V, 350 Hz is 0.5 V, and there are spectrum magnitudes outside fundamental and harmonics frequency below 0.1 V. It happens because harmonics appear following the undervoltage and overvoltage with its fault components. Compared between those two disturbances and voltage sag combined with harmonics also voltage swell combined with harmonics, the degradation or addition spectrum magnitude values depend on the duration of the power quality disturbances.

Figures 12 to
ANN is used to identify power quality disturbance types. Input ANN is the output of FFT which is magnitude The training process used Matlab to get the weight and bias. The result of the training data will be affected by the performance of an algorithm to identify the voltage variation event. If the training result is bad, then the algorithm couldn't identify the voltage variation clearly [14]. Refers to Figure 14, the error of identification result ANN of a normal signal is zero. Its regression is 100% because the ANN output must be 1. The error of identification result ANN of voltage sag is zero. Its regression is 100% because the ANN output must be 2.
The error of identification result ANN of voltage swell is 0.13%. Its regression is 99.87% because the ANN output must be 3. The error of identification result ANN of undervoltage is 0.03%. Its regression is 99.97% because the ANN output must be 4. The error of identification result ANN of overvoltage is zero. Its regression is 100% because the ANN output must be 5. The error of identification result ANN of voltage sag combined with harmonics is zero. Its regression is 100% because the ANN output must be 6. The error of identification result ANN of voltage swell combined with harmonics is zero. Its regression is 100% because the ANN output must be 7. The error of identification result ANN of undervoltage combined with harmonics is 0.15%. Its regression is 99.85% because the ANN output must be 8. The error of identification result ANN of overvoltage combined with harmonics is 0.13%. Its regression is 99.87% because the ANN output must be 9. Hence, the ANN output error which approaches zero indicated the proposed method to identify power quality disturbance was good.
According to Table 3, there's the ANN result of power quality disturbances identification. It has good accuracy for types of power quality disturbances. The proposed method that consists of 20 neurons in a hidden layer could have 100% accuracy.

V. conclusIon
This paper presents the identification of power quality disturbances using FFT and ANN. There are 8 types of power quality disturbances such as voltage sag, voltage swell, undervoltage, overvoltage, voltage sag combined harmonic, voltage swell combined harmonic, undervoltage combined harmonic, and overvoltage combined harmonic. Power quality disturbances are modelled by frequency sampling of 1000 Hz. Power quality disturbances signal is analysed by FFT. Output FFT is magnitude in the time domain, which is used to input ANN. The FFT combined with ANN can show good performance to detect and identify each power quality disturbance. In this case, more neurons give better performance than a few neurons. ANN with 20 neurons in the hidden layer can have an accuracy of approximately 99.95 %. references