Power quality disturbances classification using complex wavelet phasor space reconstruction and fully connected feed forward neural network

Received May 20, 2021 Revised Aug 17, 2021 Accepted Oct 19, 2021 Power quality disturbances (PQD) degrades the quality of power. Detection of these PQDs in real time using smart systems connected to the power grid is a challenge due to the integration of energy generation units and electronic devices. Deep learning methods have shown advantages for PQD classification accurately. PQD events are non-stationary and occur at discrete events. Pre-processing of power signal using dual tree complex wavelet transform in localizing the disturbances according to time-frequency-phase information improves classification accuracy. Phase space reconstruction of complex wavelet sub bands to 2D data and use of fully connected feed forward neural network improves classification accuracy. In this work, a combination of DTCWT-PSR and FC-FFNN is used to classify different complex PSDs accurately. The proposed algorithm is evaluated for its performance considering different network configurations and the most optimum structure is developed. The classification accuracy is demonstrated to be 99.71% for complex PQDs and is suitable for real time activity with reduced complexity.


INTRODUCTION
The renewable energy generated are integrated with power grid and monitored through smart systems have been increasing with encouragement from government and amicable policies. Voltage and frequency variations arise when renewable energy sources are integrated into the grid system since they are intermittent. Dealing with these variances is the most challenging difficulty for modern renewable energy resources [1], [2]. In order to minimize losses and improve efficiency of smart grid network, it is required to continuously monitor power quality and sources of disturbances that affect power quality. Accurately detecting power quality disturbances (PQD) will help in developing control strategy for power generation, conversion and distribution. PQDs are defined for interoperability as in EN50160, IEC 61000 and IEEE 1159 standards. PQD detection is a two-step process: detection of features from power signal and classification of features as PQDs. Over the last two decades several techniques have been reported in literature for PQD detection and classification. Feature detection using "fourier transforms, short time fourier transform, wavelet transform, s-transform and hilbert hung transform" is popular methods [3]- [6]. Feature classification methods such as "Decision tree, artificial neural network, probabilistic neural network, support vector machines, fuzzy logic, genetic algorithm" are few of the reported methods [7]- [12]. Convolutional neural networks (CNN), a deep learning approach has been a prominent approach for PQD classification in recent years. Deep learning algorithm automatically helps in identifying optimal features at multiple levels of abstraction from the input signal. Deep learning models such as "CNNs, long short term memory (LSTM), deep belief network (DBF) and hybrid CNNs" are demonstrated [13]- [15]. The complexity in use of deep learning methods for power signal analysis is the huge data sequence that needs to be analysed and most of the data samples will be without distortion. Distortions will occur randomly and will be for short durations. The 1D data need to be sequentially analyzed to detect these short duration randomness which is a complex process. The work reported in [16] uses image files of PQ events instead of sampled voltage data. Deep learning algorithms are used to classify image data demonstrating 100% accuracy. A complete framework for PQ event classification using 2D CNNs and space phasor model (SPM) is presented in [17] demonstrating improved accuracy in both classification and characterization. The work carried out in [18] have used phase space reconstruction as a pre-processing method that converts 1D to 2D phasor diagrams and CNN based classification is used to classify 2D images. Real time data from IEE working group was used to evaluate the algorithm and 20 events for each PQD were classified at a rate of 98.8%. A dual neural-network-based methodology that combines adaptive linear network (ADALINE) and feed forward neural network (FFNN) has been used to detect and classify PQD's in [19]. A novel method that combines compressive sensing (CS), singular spectrum analysis (SSA), wavelet methods (WT) and deep learning model for PQD classification is reported in [20] achieves classification accuracy of 99.56% for classifying 15 PQDs. Combining SSA, CS and DNN is recommended to be the best method for complex PQD classification as compared with wavelet based methods. A new approach presented in [21] uses machine learning algorithms based on K-nearest neighbour algorithm, decision tree and SVM to classify the Stockwell features. Classification accuracy of 97.6% is reported in classifying 13 PQDs with 5 features.
PQDs are non-stationary events and it is required to capture non-stationary features for classification of these features by training a deep learning model that is dependent on training features. In this work shift invariant transform such as dual tree complex wavelet transform (DTCWT) is used as pre-processor to capture non-stationary events at different complex sub bands with hierarchal time-frequency resolution. phase space reconstruction (PSR) is used in converting the 1D complex sub bands into 2D complex PSRs those are processed independently to classify the PQDs. Complex PSRD are used for evaluation of proposed algorithm. Detailed discussion on proposed method is presented in this paper.

DTCWT
Selesnick et al. [22] have reported the advantages of DTCWT over DWT in signal decomposition such as shift invariant and good directionality approximately analytic wavelets defined as in (1), where, j stands for imaginary unit. The imaginary part of the wavelet ψi(t), is the Hilbert transform of the real part ψr(t). The FIR scaling filters in three stages dual-tree complex wavelet transforms are denoted by {h0(n), g0(n)}. The two trees FIR wavelet filters are denoted by {h1(n), g1(n)}. The two scaling filters are made to approximate the half-sample delay condition as seen in (2).
A 2-channel perfect reconstruction filter bank's filters must satisfy the requirements in (3) and (4), where H0(z),F0(z) are the Z-domain representations of low pass filters and H1(z), F1(z) are the Z-domain representations of high pass filters.
In this work, power signal is pre-processed using three-level DTCWT to generate multiple complex sub bands for localizing the PQDs in different sub bands. The input signal is decomposed in the first stage by three levels to generate both real and imaginary sub bands denoted as (1_R, 2_R, 3_R, 4_R, 1_I, 2_I, 3_I, 4_I). In the second level, the low pass sub band 4_R and 4_I are further decomposed into 3 levels to generate lower level sub bands. The total number of sub bands generated is presented in Table 1.
The PQD are of short duration and the dominant information in the signal is the undistorted power signal of 50 Hz and hence the computation complexity in 1D data processing is reduced by transforming the complex wavelet sub band data into PSR diagrams and is termed as complex wavelet PSRs.

PSR OF COMPLEX WAVELET SUB BANDS
Phase space reconstruction (PSR) in [23] is a time series representation of signal trajectory in a chaotic system. Considering a time series variable x1, x2, x3, x4, …., xN, an m-dimensional phase space with time intervals τ, 2τ, 3τ, 4τ, …, (m-1)τ can be constructed embedding the dimension and delay parameter in the time series as shown in (5), where i= 1, 2, 3, ……, L and L = N -(m-1)τ, N is the total number of samples.
Using (5), a phase space matrix representing the coordinates of signal trajectory is produced as shown in (6), The PQ events are transformed into 2D data using the phase space reconstruction process that provides information on deviations or nonlinearities in the signal from the regular behaviour of time series data. Considering the 2D phase space reconstruction diagrams the traditional 1D time series analysis is converted to 2D time-frequency analysis. Figure 1, presents the PSR diagrams for undistorted PQ signal and PQD signal with swell. The time domain representation is presented at the top of figure. The PSR diagram for PQD with swell is distorted and has two parabolas and short duration distortion (left bottom of PSR) that links both parabolas. Changes in swell amplitude will change the major and minor axes geometries. A short spike is observed on the smaller parabola that protrudes towards origin. Similarly PSR models Signal with sag, transients, harmonics and Signal with flicker events were developed accordingly.

RESEARCH METHOD
The following is a block diagram representation of the suggested methodology for PQD classification:

PQD classification
The novel method for PQD classification is presented in Figure 2, input data (PQ signal with different events) are generated by setting the event parameters. To get the wavelet sub bands and complex wavelet sub bands for each PQD signal, both DWT and DTCWT transformations are used. From the wavelet sub bands generated SPM diagrams are computed. PSR diagrams generated from low pass sub bands and all high pass sub bands are organized in order to identify the information content. Each of the PSR diagrams generated from wavelet sub band information content is identified by computing entropy. From the entropy of information identified from wavelet SPMs the most significant wavelet PSR is selected for further processing. Each of the selected wavelet PSRs is resized and reordered. The reordered 1D wavelet PSR is normalized and is grouped into training data set and test data set. Fully connected feed forward neural network (FC-FFNN) model is defined by setting input layer, hidden layer and output layer parameters. The network is trained to perform classification of reordered Wavelet PSR events. The network is trained until it is capable of accurately classifying PQD events using 1D wavelet PSR. Classified as expected (CAE) parameter is considered for optimizing training of the network and change in network parameters. The trained network with optimum weights and biases will be used for classification of PQDs.

Resizing and reordering of complex wavelet PSR
The low pass PSR diagrams are of 8 x 8 resolutions and the high pass PSRs are of varied sizes and hence in this work a normalization algorithm is developed to resize all the images to 16 x 16. The normalization algorithm considers the region of Interest (ROI) and the background data which is white (pixel intensity of 255) is removed. Considering the ROI data in the image the resizing algorithm generates 16 x 16 images. Resizing all the PSR diagrams generates 12 images for every PQD event of which 6 of them are real PSR diagrams and 6 of them are imaginary PSR diagrams.
The Figure 3 presents the reordering process for converting 16 x 16 images to 256 x 1 vectors. For illustration 4 x 4 images is reordered to 16 x 1 vectors. The reordering algorithm circular scanning logic is developed that scans the pixels from the centre of the image. The advantage of this scanning method is the information content in the PSR diagrams are localized in the middle of the image are scanned and placed at the top of 1D vector. The background in the PSR diagram is placed at the bottom of 1D vector.
Considering the complex wavelet PSR diagrams (12 images of size 16 x 16) for each of the power quality disturbance events, after reordering and rearranging the input data vector size will be 256 x 12. The first 6 column vectors represent the real wavelet coefficients and the next 6 represent imaginary wavelet coefficient.

FC-FFNN CLASSIFIER
The proposed multi-layered FC-FFNN structure for classification of PQD events is represented in Figure 4. The input layer is a 256 x 12 x 1 data vector that is grouped into two data vectors of 256 x 6 of real and imaginary data. Each of the 256 x 6 data is processed the two separate hidden layers that comprises of N1 neurons and tansig network activation function. Each of the two hidden layers processes the real and imaginary data to generated N1 outputs. The total number of neurons in the hidden layer 1 is 2N1 and intermediate outputs at the hidden layer are 2N1. The second hidden layer has N2 neurons and is designed to process 2N1 inputs from the hidden layer 1 output. The network activation function of hidden layer 2 is set to tansig. The third layer and the output layer are also set with tansig activation function.

Network training
The FC FFNN network model is trained with three initial layers and each layer having 140, 16 and 1 neurons respectively. The 256-140-16-1 classifier network is trained by setting the training parameters as 500 epochs and mean square error to 10 -5 . Figure 5 presents the performance plots of designed network, the performance plots during training, validations and testing. MSE of designed network during training phase is approximately 10 -2 and during validation phase is between 10 -2 and 10 -3 . The validation is carried out considering 20% of data from the test vectors and hence the MSE is found to be better compared with training MSE. From the performance graphs obtained it is found that the network is able to reach global minima point in 143 epochs and requires 28% of total training epochs set. The best MSE is found to be 0.0021327 at 143 epochs, gradient at 149 epochs is 0.0018451 and MU at 149 epochs is found to be 0.001. Similarly, training was done for several FC-FFNN classifier networks, and the results were compared in Table 2.

RESULTS AND DISCUSSION
This section displays the proposed technique's network performance and classification accuracy.

FC-FFNN network performances
The performance metrics of validation, MSE, gradient and MU (control parameter) for the 256-128-32-6 network is 8.5964e-14 , 5.93e -14 , 1.00e -07 and 1e -11 respectively at 303 epoch with regression parameter being 1. These parameters compared with 256-200-48-1 network parameters. Comparing 256-200-48-1 network model and 256-128-32-6 network model is found to be better in terms of network performance parameters. Table 2 Table 3, shows the performances of the best-proposed DTCWT-PSR-FC-FFNN as related to other literature-documented classification algorithms. The approaches provided accuracy statistics in proportion to noise levels of 20db. Rodriguez et al. [19] performs the classification of 12PQD's by achieving classification accuracy is 90.58% which is lower than proposed method . The suggested method has better classification accuracy than the findings in [20] of average precision 99.40 percent and 99.32 percent for 15 different types of PQDs. The combination of stockwell-transform+competitive swarm optimization algorithm+support vector machine (ST+CSO+SVM) were implemented in [21] by considering 13 types of PQ disturbances, obtaining classification accuracy of 97.6% in an average. Fast ST and embedded DT considered 12 types of  [24]. In order to boost the classification rate of PQ signals, S transform and a probabilistic neural network (PNN) were used , resulting in a classification accuracy of 98.38 percent by considering only nine forms of PQ disruptions into account in [25]. Wavelet with PNN network in [26] considered 14 PQDs with classification accuracy of 86.86%, However the suggested approach considers 15 different forms of PQ disturbances, with a classification accuracy rate of 99.871 percent. According to the results of the comparative analysis, the suggested approach focused on DTCWT-PSR-FC-FFNN is ideally adapted to identify several PQ disturbances with a high precision of classification accuracy.  Table 4 compares the collected findings in this paper with the published results in other studies in order to assess the efficacy and viability of the proposed algorithm. Except for sag, swell, and flicker in [20] and except harmonics in [27]. Each PQ disturbance has a lower classification accuracy than the proposed technique. The proposed method's mean classification accuracy produces better results than those found in the literature.

CONCLUSION
In this paper, a new algorithm based on DTCWT-PSR-FC−FFNN is used for accurate classification of PQ signals with 15 disturbances. Dual tree complex wavelet transform is used for pre-processing of power signal for localizing the disturbances according to time-frequency-phase information is carried out. Preprocessing of signals is carried out by filtering the signal with low pass filters with cut-off frequency limited to 5th harmonic of signal disturbances. The preprocessed signal is further checked for voltage rise and voltage dips of greater than 20% of 220V. Phasor diagrams are generated signals with 50 Hz and for signal 100 Hz and greater to compare the phasor diagrams. The computation complexity in 1D data processing is reduced by transforming the complex wavelet sub band data into phase space reconstruction (PSR) diagrams and is termed as complex wavelet PSRs. The most significant wavelet PSR is selected for further processing from entropy. Each of the selected Wavelet PSRs is resized and reordered. The reordered 1D wavelet PSR is normalized and is grouped into training data set and test data set. Fully connected feed forward neural network (FC-FFNN) model is used to classify 15 different complex PQDs accurately. The proposed algorithm is tested for its performance in various network configurations, and the best framework is created. The classification accuracy has been demonstrated to be 99.71 percent, making it ideal for real-time operation with reduced complexity.