Application of Extension Neural Network with Discrete Wavelet Transform and Parseval’s Theorem for Power Quality Analysis

The development of renewable energy and the increase of intermittent fluctuating loads have affected the power quality of power systems, and in the long run, damage the power equipment. In order to effectively analyze the quality of power signals, this paper proposes a method of signal feature capture and fault identification, as based on the extension neural network (ENN) algorithm combined with discrete wavelet transform (DWT) and Parseval’s theorem. First, the original power quality disturbance (PQD) transient signal was subjected to DWT, and its spectrum energy was calculated for each order of wavelet coefficients through Parseval’s theorem, in order to effectively intercept the eigenvalues of the original signal. Based on the features, the extension neural algorithm was used to establish a matter-element model of power quality disturbance identification. In addition, the correlation degree between the identification data and disturbance types was calculated to accurately identify the types of power failure. To verify the accuracy of the proposed method, five common power quality disturbances were analyzed, including voltage sag, voltage swell, power interruption, voltage flicker, and power harmonics. The results were then compared with those obtained from the back-propagation network (BPN), probabilistic neural network (PNN), extension method and a learning vector quantization network (LVQ). The results showed that the proposed method has shorter computation time (0.06 s), as well as higher identification accuracy at 99.62%, which is higher than the accuracy rates of the other four types.


Introduction
In recent years, the vigorous development of renewable energy, the rise of Industry 4.0, and the transformation of traditional industries into high-tech industries, a large number of power electronic instruments and equipment have become widely used. However, due to the tight interconnection of power networks, voltage waveforms can be affected by system failures or the switching actions of devices, resulting in transient changes and waveform distortions that lead to power quality and stability problems. This may affect power supply stability, cause power interruptions, and even cause equipment damage and industrial operation losses. Therefore, the industry, government, and academia are paying close attention to the measurement and analysis of power quality and related research [1][2][3][4].
Good power quality is critical in power systems. Several studies have been conducted on the detection and classification of power quality disturbances (PQDs). The detection algorithms for signal processing, such as Fourier transform [5][6][7], short-time Fourier transform (STFT) [8,9], wavelet transform (WT) [10,11], S-transform (ST) [12][13][14], Hilbert-Huang transform (HHT) [15], and chaos synchronization [16] are commonly used for power quality analysis. Artificial intelligence schemes containing support vector machines (SVM) [17,18], particle swarm optimization and support vector machines (PSO-SVM) [19], and neural networks [20][21][22] have been widely utilized for classifying power quality disturbances in accordance with the features extracted by signal processing algorithms. Liu et al. proposed an improved generalized discrete Fourier transform (GDFT) for harmonic extraction, which plays a key role in power quality assessment [5]. Ashouri et al. used a protection method based on the application of STFT as the major signal processing algorithm for meshed multi-terminal voltage source converter-high-voltage direct current (VSC-HVDC) grids [8]. Thirumala et al. utilized a recognition technique that contains the tunable-Q wavelet transform (TQWT) and dual multiclass support vector machines (MSVM) for detection of PQDs [10]. Alqam and Zaro proposed a method based on S-transform and the rule-based decision tree for detection and recognition of PQDs under noiseless and noisy situations [12]. Sahani et al. used an integrated intelligence method of Hilbert-Huang transform, and weighted bidirectional extreme learning machine (WBELM) with empirical mode decomposition (EMD) to detect and recognize PQDs [15]. Yau et al. applied the extension recognition algorithm combined with a chaos synchronization-based method, which can detect small dynamic variations in system signals, in order to analyze different power quality problems [16]. Mohammadi1 et al. developed a hybrid classification technique based on particle swarm optimization and support vector machines (PSO-SVM) for categorizing the features extracted by wavelet transform and diagnosing the various types of faults in a smart grid [19]. Shen et al. presented an algorithm based on improved principal component analysis (IPCA) for extracting the features of PQDs and 1-dimensional convolution neural networks (1-D-CNN), which were used to obtain the highest classification accuracy of PQDs [20].
As shown in the above literature review, most previous studies regarding the detection of PQDs described just a single method for signal processing, and extracted the limited features from the original signal. Existing research in extracting fewer and meaningful features has ignored the role of combining of discrete wavelet transform (DWT) and Parseval's theorem. This study intends to take the advantage of DWT and Parseval's theorem to reduce the large number of data and utilize the extension neural network [8], with the aim to shorten the detection time and obtain maximum classification accuracy in PQDs.
In order to effectively detect and classify the types of PQDs, this study developed an identification method, as based on ENN with DWT and Parseval's theorem. The proposed ENN [23,24], which has been widely applied to the field of fault diagnosis [25][26][27], combines the extension theory with an artificial neural network. The ENN proposed in this paper, replaces the Euclidean distance with the extension distance to calculate the geometric distance between the test samples and clusters for rapid and proper classification and identification. To prove the feasibility of the proposed method, the transient signals of five common power quality disturbances were analyzed, including power interruptions [28,29], voltage surges [30], voltage sag [31], voltage flicker [32], and power harmonics [33]. First, the power transient signals were processed by DWT [34,35] and Parseval's theorem [36,37] to extract the meaningful features and reduce the large data. The matter-element model of the power quality disturbances was established with the aim of generating the wavelet energy coefficients of each order as eigenvalues. The correlation degree of each eigenvalue of power transient signal to be measured was then calculated using the extension distance function through ENN, in order to achieve the highest accurate identification and shorten the computation time.
The proposed method was then verified by numerical simulations and compared with different algorithms, including the back-propagation network (BPN), probabilistic neural network (PNN), learning vector quantization network (LVQ), and extension method in order to illustrate its advantages and effectiveness for potential engineering applications. In addition, this method can be realized by the system-on-chip (SoC) in the foreseeable future, due to its simple structure good expandability, and high accuracy.
The remainder of this paper is organized as follows. Section 2 presents the proposed methods including DWT, Parseval's theorem, and ENN. Section 3 discusses simulation results obtained from the proposed method and compares with the results from other algorithms. Finally, Section 4 provides concluding remarks. Figure 1 is the flow chart of the signal analysis and identification of the proposed method applied to power quality disturbances. First, the original power quality signals were transformed into wavelet signals in each order by DWT. Then, the energy features of each order were extracted by Parseval's theorem. Finally, the identification of power quality disturbance signals was carried out by ENN. The following section explains some parts of the proposed algorithm.

The Proposed Methods
Appl. Sci. 2019, 5, x FOR PEER REVIEW 3 of 13 advantages and effectiveness for potential engineering applications. In addition, this method can be 96 realized by the system-on-chip (SoC) in the foreseeable future, due to its simple structure good 97 expandability, and high accuracy.

98
The remainder of this paper is organized as follows. Section 2 presents the proposed methods where,

117
: is the analytic hierarchy where,  Figure 1. Flow chart of the proposed system.

Discrete Wavelet Transform
Wavelet transform is used to discuss the global and local characteristics of signals according to the expansion and contraction of the wavelet function. In the process of DWT, the signal can be decomposed into multi-level analytic decomposition by scaling function ϕ(x) and wavelet function ψ(x), as shown in Equation (1) and Equation (2), respectively: where, j: is the analytic hierarchy k: is the operational index c k : s the scaling coefficient d k : is the wavelet coefficient While d k = (−1) k c −k+1 , using different wavelet families will result in different coefficients. Assume that the measured signal after sampling is v(t) = (v 0 , v 1 , . . . , v N−1 ) and the number of sampling points is N = 2 j ; the DWT of v j [t] decomposes from analytic level j to analytic level j − 1, as follows: where, cA is the approximated coefficients and signals that high resolution has decreased to low resolution; cD is the detailed coefficients and solution signals between high and low resolution; n is the operation modulation parameter, as shown in Equation (6): where, v j−1 is the approximate decomposition signal of the original signal and w j−1 is the decomposition signal of the detail change of the original signal. Through Equations (1)- (6), the original function of v j is transformed from the base of ϕ jk (x) to the base of v j−1 ⊕ w j−1 . v j−1 , which can be further decomposed into v j−2 and w j−2 . Hence, the decomposition signals of approximation are decomposed continuously to obtain a series of w detail vectors and v approximation vectors of the lowest resolution space, as shown in Equation (7), i.e., multi-level analysis of the wavelet transformation, as shown in Figure 2: is the approximated coefficients and signals that high resolution has decreased to low 127 resolution; is the detailed coefficients and solution signals between high and low resolution; n is 128 the operation modulation parameter, as shown in Equation (6): where, vectors and approximation vectors of the lowest resolution space, as shown in Equation (7), i.e.,

136
multi-level analysis of the wavelet transformation, as shown in Figure 2:  coefficients. This is known as Parseval's theorem, as shown in Equation (8): where, is the sampling period and is the spectrum coefficient.

145
This theorem is applied to the wavelet transform. If the scaling function and the mother wave

149
The energy contained in Parseval's theorem is divided with time and scale , as shown in 150 Equation (9) derived from Equations (3) and (8):

Parseval's Theorem
If a discrete sampling signal X[n] is regarded as a current, the energy consumed by the current through a 1 Ω resistance would be equal to the sum of the squares of the Fourier spectrum coefficients. This is known as Parseval's theorem, as shown in Equation (8): where, N is the sampling period and a k is the spectrum coefficient. This theorem is applied to the wavelet transform. If the scaling function and the mother wave have an orthogonal basis, Parseval's theorem can be used to explain the relationship between the energy of the signal and the energy possessed by each order of wavelet coefficients, that is, it can allow the signal energy to be cut in the time domain and frequency domain of the wavelet transform.
The energy contained in Parseval's theorem is divided with time k and scale j, as shown in Equation (9) derived from Equations (3) and (8): The former term in the above formula represents the average power generated by the decomposed signal, which is similar to the original signal component, while the latter term is the sum of the average power of multiple analyses of each detail change.

Extension Neural Network (ENN)
ENN is a new type of artificial neural network formed by combining an artificial neural network and the extension theory, which can effectively use the calculation method of the extension correlation degree and shorten the training time of a neural network. It is a kind of supervised learning that can deal with classification problems using continuous input and discrete output. Figure 3 is the architecture of ENN, including the input layer and output layer. Neurons in the input layer are the features of the samples, as they connect the weights of the input neurons and output neurons, including the maximum weight value and the minimum weight value. These connections are the j th input neuron and k th output neuron, respectively, and are denoted by W kj and U kj . The weight center Z kj is calculated according to W kj and U kj . After adding the concept of extension distance to the weight value in the artificial neural network, the convergence speed of various features trained by the output layer can be strengthened, in order to achieve the purpose of shortening the learning time.     Step 1: Set the weight value between the input node and the output node according to the

179
Step 2: Calculate the middle value of the weight of each feature.

Weight Training Phase of ENN
The weights of ENN are trained mainly by selecting the set X ≡ x 1 , x 2 , . . . , x N p to be trained from the samples, where N p is the number of all training data. The number of training data includes the samples and sample features, where n is the number of training data and p is the feature of the i th training data. ENN's training steps are, as follows: Step 1: Set the weight value between the input node and the output node according to the feature-matter element model.
where, R k is a multi-dimensional matter-element; k = 1, 2, . . . , n c ; j = 1, 2, . . . , n; c j is the characteristic of N k ; V kj are the classical domains of the k th cluster (N k ).
Step 2: Calculate the middle value of the weight of each feature.
Different training samples are denoted by N k , c j are the various features of training samples, where V k j = W k j , U k j is the interval of the features (weight interval) where, i = 1, 2, . . . , Np; j = 1, 2, . . . , n; k = 1, 2, . . . , n c .
Step 3: Read i th training samples and eigenvalue p.
Step 4: Calculate the distance between each training data and the k th cluster using the extension distance.
Step 5: Look for k, so that ED ik = min{ED ik }. If k = p, jump to step 7; otherwise, go to step 6.
Step 6: Update the weights of the p th and k th clusters, as follows: where η is the learning rate. The learning process is just to adjust the weights of the p th and k th clusters in this step.
Step 7: Repeat Step 3 to Step 6 until all samples have been sorted.
Step 8: After training, the ideal weight interval and weight center can be obtained. Let ENN classify all the data to be measured.

Identification Phase of ENN
When ENN is trained, it can carry out identification, and the steps are described, as follows. The ENN flow chart is shown in Figure 4.
Step 1: Read the trained weighting matrix of ENN.
Step 2: Calculate the median values of each weight, such as Equations (13) and (14).
Step 3: Read the sample identification data.
Step 4: Calculate the distance between the identification sample and each cluster by the extension distance, such as Equation (16).
Step 5: Find k, make ED ik = min{ED ik }, and set the output O ik = 1 to identify the cluster classification of the samples. Step

Electric Power Analysis Data
In this paper, the signals of power quality disturbances were analyzed by DWT at 13 levels to obtain 16 wavelet coefficients (cD1-cD15 and cA15). Then, the eigenvalues of different power quality disturbances were captured by Parseval's Theorem. Finally, the identification of various power quality disturbances was carried out by ENN. This paper used MATLAB/Simulink to construct a power quality disturbance simulation and generate the required types of disturbance waveform signals as shown in Figure 5 Figure 4. ENN flow chart.

Electric Power Analysis Data
In this paper, the signals of power quality disturbances were analyzed by DWT at 13 levels to obtain 16 wavelet coefficients (cD1-cD15 and cA15). Then, the eigenvalues of different power quality disturbances were captured by Parseval's Theorem. Finally, the identification of various power quality disturbances was carried out by ENN. This paper used MATLAB/Simulink to construct a power quality disturbance simulation and generate the required types of disturbance waveform signals as shown in Figure 5

Feature Signal Capture
According to the proposed signal feature extraction method, a set of fundamental wave energy feature is generated from normal power signals by Wavelet Transform and Parseval's theorem, in order to highlight the features of power quality disturbances. The power quality disturbance signals are processed by DWT and Parseval's theorem. The feature of the instantaneous signal of a PQD is obtained, from which the fundamental wave energy is deducted, the energy difference ∆ is obtained, and the mathematical Equation (19), the power quality disturbance signals in Figure 5a-e are calculated by the aforesaid signal characteristic energy. The obtained wavelet energy eigenvalue curve diagram is shown in Figure 6a-e. The feature curve diagram shows different energy distributions of different power quality disturbance signals, proving that the proposed method can effectively extract the power quality disturbance features.

Feature Signal Capture
According to the proposed signal feature extraction method, a set of fundamental wave energy feature E pure is generated from normal power signals by Wavelet Transform and Parseval's theorem, in order to highlight the features of power quality disturbances. The power quality disturbance signals are processed by DWT and Parseval's theorem. The feature E distortion of the instantaneous signal of a PQD is obtained, from which the fundamental wave energy is deducted, the energy difference ∆E is obtained, and the mathematical Equation (19), the power quality disturbance signals in Figure 5a-e are calculated by the aforesaid signal characteristic energy. The obtained wavelet energy eigenvalue curve diagram is shown in Figure 6a-e. The feature curve diagram shows different energy distributions of different power quality disturbance signals, proving that the proposed method can effectively extract the power quality disturbance features.

ENN Identification Results
The features of various disturbances were identified by ENN. In this paper, half of the voltage signals of power quality disturbances were taken as training samples and the other half as identification samples. Figure 7 shows the convergence curve of ENN. The error rate was zero after about eight iterations of 578 items of training data. The identification results are shown in Table 1. Other than the identification rate of voltage sags, which was 99.2%, the identification rates reached 100%.

ENN Identification Results
The features of various disturbances were identified by ENN. In this paper, half of the voltage signals of power quality disturbances were taken as training samples and the other half as identification samples. Figure 7 shows the convergence curve of ENN. The error rate was zero after about eight iterations of 578 items of training data. The identification results are shown in Table 1. Other than the identification rate of voltage sags, which was 99.2%, the identification rates reached 100%.

236
The features of various disturbances were identified by ENN. In this paper, half of the voltage 237 signals of power quality disturbances were taken as training samples and the other half as 238 identification samples. Figure 7 shows the convergence curve of ENN. The error rate was zero after 239 about eight iterations of 578 items of training data. The identification results are shown in Table 1.

240
Other than the identification rate of voltage sags, which was 99.2%, the identification rates reached    In order to verify the advantages of the proposed method, the disturbance voltage signals of the same training samples and identifying samples were used to identify power quality disturbances using BPN, PNN, LVQ network, and an extension method respectively, and compared with ENN. As shown in Table 2, it was found that the accuracy of the proposed ENN identification method was higher than that of BPN, PNN, LVQ, and the extension method and the required calculation time was also the least. The main reason was that ENN can execute features within a range, the extension distance can quickly obtain the correlation degree between the training data and clusters, and the network architecture is simpler. Therefore, the method proposed in this paper was applied to the identification of power quality disturbances, which had high accuracy and could quickly obtain the identification results.

Conclusions
In this paper, an ENN-based combination of wavelets and Parseval's theorem was proposed and effectively applied to power quality disturbance analysis including: voltage sag, voltage flicker, power interruptions, and power harmonics. The results showed that the identification accuracy of the proposed method was as high as 99.62% and the operation time was only 0.06 s. The identification accuracy of the proposed method was higher than that of the other kinds of algorithms. It also has a very simple structure and short computation time. Therefore, the proposed scheme can be realized in an embedded system-on-chip in the near future, for the use of hand-held mobile power quality analyzers. For future research, it is suggested that different types of power quality disturbances, such as three-phase imbalances, voltage pulses, and frequency drift, be added to construct more complete power quality disturbance data signals.