A Fast Fault Identiﬁcation in a Grid-Connected Photovoltaic System Using Wavelet Multi-Resolution Singular Spectrum Entropy and Support Vector Machine

: A new protection scheme based on applying a combination of wavelet multi-resolution singular spectrum entropy and support vector machine is proposed to identify di ﬀ erent types of grid faults in a three-phase grid-tied photovoltaic system. In this technique, discrete wavelet transform with multi-resolution singular spectrum entropy is utilized to extract the unique features of three-phase voltage signals at the point of common coupling. The three-phase voltage signals are decomposed to provide detail and approximation coe ﬃ cients of wavelet transform. Then, various features between di ﬀ erent types of grid faults can be extracted by a combination of multi resolution analysis and spectrum analysis with entropy as the output. The constructed features vector is utilized as input data of a support vector machine classiﬁer to identify and classify various types of faults. The results illustrate that the proposed intelligent technique not only recognizes di ﬀ erent types of grid faults correctly, but also performs quickly in identifying grid faults in a grid-connected photovoltaic system. Apart from this, a graphical investigation is executed to observe the e ﬀ ects of di ﬀ erent types of grid faults in photovoltaic (PV) operation which highlight the necessity of intelligent protection methods to protect PV systems.


Introduction
The rapid growth of photovoltaic (PV) installations around the world is no surprise owing to their benefits such as no pollution, easy installation and integration, noiseless operation, and economic benefits.The total installed capacity of PV systems reached 310 GW by the end of 2016 [1].In that year, PV generation was 200 TWh, about 1% of worldwide electricity demand [2].By 2050, about 20% of the world electricity will be provided by photovoltaics.As matter of fact, PV-based generation is the third most important source of renewable energy in terms of global installed capacity [2].However, in spite of the benefits, PV systems could be subject to different varieties of failures, mainly due to external operating conditions.The reliability of electrical systems can be put at risk by these failures [3].The main catastrophic failures in PV systems are symmetrical and asymmetrical faults [4].These faults in PV systems can cause a massive amount of energy loss and fire hazard [5].Hence, new methods need to be developed to assist in assessing the power production during normal operating situations and for fault recognition in PV systems.Recently, different techniques have been proposed to recognize and classify grid faults.For all methods, increasing the operational reliability of PV systems with low grid cost and detecting the causes of disturbance in PV systems are important.A review of these techniques can be found in [6][7][8][9].For example, rate of change of frequency (ROCOF) [10], the vector surge method [11], real-valued negative colon selection [12], under/over voltage (U/OV) [13], the high impedance method [14], the hypothesis testing method [15], and external events vectors [16] have been presented as traditional protection techniques in PV systems.Therefore, to solve the threshold problem in conventional fault detection techniques, intelligent fault detection techniques have been used in PV systems.In [17], a Slantlet transform in combination with Ridgelet probabilistic neural network was presented to detect grid faults in a grid-tied photovoltaic system.Wavelet singular entropy theory in combination with fuzzy logic was proposed to detect faults in a multiple distributed generation (DG) system [18].In [19], a methodology based on probabilistic neural network and wavelet packet transform was presented to predict and classify grid faults in a PV system.Various intelligent fault detection methods in PV systems have been proposed based on computational intelligent methods and modern signal processing techniques to detect grid faults correctly and to improve the performance of PV systems [20][21][22][23][24][25][26].The cumulative sum algorithm (CUSUM) [27] and permanent magnet synchronous motor [28] have been used to improve the performances of fault detection and diagnosis.In spite of the performed research work in this field, a more accurate intelligent fault detection method in PV systems is still required.
In this article, wavelet multi-resolution singular spectrum entropy in combination with support vector machine is presented to predict and classify grid faults in a grid-tied photovoltaic system.The protection scheme is divided into the following steps.Firstly, three-phase voltage signals at the point of common coupling (PCC) are measured for grid faults during different situations, e.g., type of fault, resistance, and distance.Using the discrete wavelet transform (DWT) with multi-resolution singular spectrum entropy (MRSSE), the prominent feature vectors are extracted for different types of grid faults.Then, the obtained feature vector values are used to train the SVM classifier for identifying and classifying the different types of faults in the system.The major priorities of the proposed approach are to achieve a simple, easy to implement method with a fast detection time, that is effective in recognizing grid faults and protecting the grid-connected photovoltaic system.Apart from this, a graphical investigation is executed to observe the effects of different types of grid faults in PV operation which highlight the necessity of intelligent protection methods for protecting PV systems.
The rest of the article is prepared as follows: Sections 2 and 3 describe the theoretical background and the proposed protection scheme, respectively.The studied model and simulation results are given in Section 4. The performance of the SVM classifier and comparative examination are presented in Section 5.The investigation of PV operation under different fault conditions is given in Section 6.Finally, the discussion and conclusions are given in Sections 7 and 8, respectively.

Discrete Wavelet Transform
Discrete wavelet transform (DWT) is an influential tool to examine the steady-state and non-stationary signals.It cuts up information, then interprets and scales versions of a single function [29].Mathematically, DWT for a discrete signal f (k)(k = 1, 2, 3, . . ., N) with regard to the wavelet function ψ(.) is assumed to be as follows [30]: where ψ * m,n is the discretized mother wavelet, given as follows: where a 0 (> 0) and b 0 (> 0) are adjusted as real values, and m and n are positive integers.Generally, the selection of a suitable mother wavelet for analysis, depending on the type of information used and the determination of decomposition at the best level, plays a prominent role in DWT applications.Different mother wavelets have been presented to examine the grid fault studies such as Haar, Mexican, Biorthogonal, Daubechies, and Morlet.In this article, the mother wavelet at scale 4 (DB4, Daubechies 4) is considered to extract features of grid fault waveforms by experimentation and trial and error.

Multi-Resolution Singular Spectrum Entropy
Multi-resolution analysis (MRA) was firstly introduced by Mallat as a necessary part of decomposition and reconstruction of the signal at different resolution levels [31].The easy implementation and low memory usage are two important merits of MRA.The discrete signal f (k)(k = 1, 2, 3, . . ., N) with respect to the selection of the mother wavelet and the best decomposition layer is processed by the MRA algorithm.The DWT of a discrete signal can be calculated as follows [32]: where H is the low-pass filter and G is the high-pass filter.c j and d j are approximate and detailed parts of the signal scale, respectively.j represents the decomposition layer.The signal f (k) can be decomposed in terms of the wavelet coefficients at (J = 1, 2, 3, . . ., j) resolution levels into d 1 , d 2 , d 3 , . . ., d j , c j , which illustrate detailed (high-frequency) and approximation (low-frequency) data coefficients.The coefficient vector data for signal f (k) is given as follows: The reconstruction of DWT coefficients for the parsed signal of each layer is implemented as follows: where H * is the dual operator of H and G * is the dual operator of G.
In order to reconstruct the reconstruction signal of layer j in an n-dimensional phase space, an (N − n + 1) * n dimensional matrix M is given as follows: In order to compute the singular spectrum entropy, matrix M is decomposed by singular value decomposition as follows [33]: where Λ l * l possesses a nonzero diagonal element, which is called singular values of the matrix M from layer j.Hence, the signal singular spectrum entropy is calculated as follows: where H j indicates the information entropy of level j and P ji shows the undefined probability distribution of the nonzero diagonal elements.P ji is expressed as follows: where λ ji is the nonzero diagonal elements from Λ l * l .

Support Vector Machine
One of the intelligent classifiers that is commonly utilized for classification in power system applications is support vector machine (SVM).It is developed based on determining a decision boundary to divide the training examples into their relevant classes.To classify the normal and grid fault cases, SVM creates a hyperplane to separate data into their respective classes in a d-dimensional feature space.In this paper, a linear decision boundary is used.A class decision function linked with a hyperplane is defined as follows [34].
where indicates the weight vector normal to the hyperplane and b is the bias.x r is the training vector that is mapped into a d-dimensional feature space by the function ϕ.Mathematically, the learning task of SVM is defined as follows [34]: which is subject to where parameter (C > 0) shows the error's penalty factor.ξ r is the slack variable.Furthermore, the kernel function is shown by k(x r , x s ) = ϕ(x r ) T ϕ(x s ).In this work, radial basis function (RBF) is used as the kernel function because of its excellent performance in practice and because it is relatively easy to calibrate, which is also mentioned in [35], as opposed to many kernels being utilized.It is defined as follows: The steps to determine the optimum values of C and γ parameters are given below: Step 1.The values of C and γ parameters are specified experimentally by a grid search and cross-validation process.
Step 2. The values of C and γ parameters are changed in increments of the power of 2.
Step 3. A k-fold validation is used for any parameter combination.The training data set is partitioned into k subsamples of equal size.k -1 subsamples from the whole of k subsamples are utilized as the training data, and only the remaining subsample is applied as validation data.
Step 4. The cross-validation process is iterated k times, and SVM is trained by all subsamples except the validation data.
Step 5.The trained SVM is tested only via the validation data, and the classification error for this subsample is computed.
Step 6.The training subsamples are tested separately once and the percentage of correct classification is calculated as the cross-validation accuracy.
Step 7. To select the best value combinations of C and γ parameters, this process is repeated until the best pair gives the maximum assessment accuracy.

Proposed Protection Scheme
Figure 1 illustrates the application procedure of the proposed protection scheme using wavelet multi-resolution singular spectrum entropy (WMRSSE) and SVM for identifying and classifying grid faults.The steps in detecting and classifying grid faults are given as follows: Step 1.The three-phase voltage signals at the PCC are measured for different types of grid faults by simulating a three-phase grid-tied photovoltaic system in a Matlab/Simulink (r2015a, Mathworks, Natick, MA, USA) environment.Step 2. A suitable mother wavelet is selected and the number of levels of decomposition is determined.
In this paper, Daubechies 4 (DB4) was designated as the mother wavelet by experimentation and trial and error and the measured PCC voltage signals were decomposed by eight layers.Step 3. The reconstruction voltage signals of each layer are reconstructed in the phase space.In this article, the number of sampling points is N = 29700.The n-dimensional phase space is 2970-dimensional.Hence, matrix M (N−n+1) * n is reconstructed into (26731 * 2970) dimensions.
Step 4. Matrix M is decomposed by singular value decomposition in order to compute the singular spectrum entropy of each layer.So, 2970 singular values of each layer are obtained.
Step 5.The entropy value of each layer, e.g., H j , is calculated.
Step 6.The extracted H j for different types of grid faults are collected in vector T and used to train the SVM classifier: Step 7. The grid faults are detected and classified by SVM.
Step 8.A command block diagram is considered to specify whether a fault occurs or not.The proposed fault detection technique transfers a "trip signal is set to 1" command if fault cases are predicted; otherwise, for normal conditions a "trip signal is set to 0" command is set.

Studied System
Figure 2 shows a 250 kW grid-connected PV system, the details for which are given in [19].The studied system was modeled using the MATLAB simulation tool.This electrical system consists of a PV system that is connected to a 25 kV electrical grid with the frequency of 60 Hz by a 250 kVA 250 V/25 kV three-phase transformer.In the utility grid part, two feeders (Line 1 and Line 2) are connected to the PCC, having lengths of 14 km and 8 km, respectively.There is a ground transformer between Line 1 and transformer T1.The relay is located at the end of the DG to obtain voltage and current signals at different types of fault conditions.The studied grid fault conditions were simulated with different types, resistances, and distances away from the PCC of the PV system.The grid fault locations were selected as follows:

Simulation Results
In this study, three-phase voltage signals at the PCC were retrieved and an analysis based on the algorithm in Figure 1 was executed.The abnormal voltage changes must be detected by the proposed protection scheme in a timely manner when faults occur.Moreover, the protection relay must transfer the disconnection command to arrest the DG in the main utility grid based on the IEEE Std.1547 [36].The simulation sampling frequency was 19.8 kHz and sampling time was 1.5 s.The signals were decomposed by eight layers and the mother wavelet at scale 4 (DB4, Daubechies 4) was examined.The obtained results are described as follows: Figure 3 1.As seen, the differences between the entropy of different types of faults and the normal condition are noticeable and the entropy of each layer is different.Thus, the fault conditions influence the entropy values in the system and the classification results.Hence, entropy feature vectors were obtained by MRSSE, which was utilized to simplify the identification and classification as input data for the training SVM so as to specify the response time required to detect faults in the system with the relevant provisions.As observed in Table 2, the noise does not have much effect on the MRSSE, and the proposed protection scheme can be employed in practical applications.

Performance of SVM Classifier and Comparative Examination
To investigate the performance of the proposed method, i.e., SVM and wavelet multi-resolution singular spectral entropy, to detect grid faults in PV systems, evaluation metrics such as accuracy and F-measure were taken into account as follows: where TP is the total number of fault cases correctly detected by the model and TN is the total number of other cases (e.g., normal and other fault events) correctly predicted.FP indicates the total number of fault cases wrongly detected as other cases and FN is the total number of other cases wrongly predicted as fault events.The C and γ parameters were determined by varying their values in ranges of 2 −5 to 2 10 and 2 −8 to 2 8 , respectively.Four-fold cross-validation was implemented to provide the optimum values of C and γ parameters.The data set was partitioned into four parts, where three parts were utilized for training and one part for testing.To ensure that the error is consistent, the four parts were rotated until all cases were covered.Table 3 indicates the performance result of the SVM classifier in the training phase with different combinations of values of C As seen, the suitable values of parameters C and γ were 8 and 0.125, respectively.According to Equations ( 15) and ( 16), the accuracy and F-measure of SVM were 100% when the values of C and γ were 8 and 0.125, respectively.To achieve a good generalization performance of SVM, the training and testing processes were repeated 11 times, until the error rate converged, with 80% of the data set for training and 20% of the data set for testing.The average detection accuracy was then calculated.In the training phase, the overall detection accuracy was 100%.
Table 4 illustrates the classification accuracy per event and the overall detection accuracy in the testing phase.To examine the performance of the proposed method in detail, the test data were mentioned separately according to the event type, i.e., SP-G fault, PTP fault, PP-G fault, or PPP-G fault.The detection time of each event is shown in Table 4.As seen, the proposed method can detect grid faults a few milliseconds after they occur.The overall response time for the proposed protection scheme was 11 ms.
Compared with other methods, the proposed method exhibits a better performance.The comparison results are given in Table 5.As seen, the overall detection accuracy for the protection scheme in [37] is lower than other mentioned methods.WSE + FL [18] and the proposed method possess high classification accuracy and detection accuracy.

Investigation of PV Operation under Different Fault Conditions
In order to better understand the PV system operation during the aforementioned grid fault conditions, its performance was investigated graphically.The results are presented below.
The measured effective value of the PCC voltage and current under grid faults, i.e., SP-G fault, PTP fault, PP-G fault and PPP-G, at a distance of 8 km from the PCC with a fault resistance of 200 ohm are illustrated in Figures 4 and 5. Figure 4 shows the variations of amplitude of the effective PCC voltage in different phases.As seen, in phase A, the amplitude of the effective PCC voltage for all types of faults decreased significantly, whilst in phase B the amplitude of voltage increased only under SP-G faults.
This increase in amplitude of the PCC voltage was observed during SP-G, PTP, and PP-G faults, whilst the effective PCC voltage during PPP-G fault decreased in each of the three phases.Figure 5 shows that the highest and lowest values of the short circuit current belonged to ground faults and line to line faults, respectively.
Figure 6 shows the changes of the PCC frequency under fault conditions at a distance of 8 km from the PCC.As seen, during PPP-G faults, the frequency exceeded the boundaries imposed by the grid standards regardless of the fault location, whilst for PP-G, PTP, and SP-G faults, the frequency rose, but stayed inside the threshold.Moreover, two important components, i.e., voltage components and current components, are illustrated in Figures 7 and 8 during different types of faults at 8 km away from the PCC.The mentioned components were computed in the phase locked loop (PLL) and measurements block of the voltage source control (VSC), as explained in [38], by means of the abc to dq0 transformation.When Id is positive, the converter produces active power and engages reactive power once Iq is in inductive mode [38].
The modulation index of Uabc_ref, utilized by the pulse-width modulation (PWM) generator of VSC [38], can be seen in Figure 9 during fault conditions at a distance of 8 km from the PCC.The dc-link voltage fluctuation for all types of grid faults at different fault locations is illustrated in Figure 10.As seen, when the grid faults occurred, the dc-link voltage of PTP, PP-G, and PPP-G faults increased whilst their dc-link voltage reduced after the faults were cleared.Furthermore, for SP-G faults, the dc-link voltage fluctuations were opposite to the frequency changes.
The output PV voltage, current, and diode current [38] during different grid fault conditions that occurred 8 km from the PCC are illustrated in Figure 11.The variation of the PV voltage and current is clearly visible.The rising and dropping of the magnitude of voltage and current at the occurrence of the fault and at the fault clearance can be seen.For the diode current, as expected, the variation of the current is the same as the variation of the PV voltage and current during the grid faults.This influence is more noticeable for PPP-G faults, as can be observed in Figure 11.

Discussions
The obtained results indicate that the proposed protection scheme based on WMRSSE and SVM can easily detect symmetrical and asymmetrical faults in PV systems.As shown in Figure 1, the trip signal is activated to command the disconnection of the PV system if faults are detected.In the case of symmetrical faults where the effects are severe, the proposed protection scheme has no problem detecting them and thus can avoid relay maloperations.It is worth mentioning that extracted features based on MRSSE are stable for similar types of signals and samples.This capability gives the proposed technique two advantages, i.e., it is easy to implement and feasible to detect and classify grid faults.Finally, using the optimal combination of both parameters-C = 8 and γ = 0.125-the overall detection accuracy for the training data set and test data set reached 100%.The obtained results suggest that the proposed method is robust and accurate and can also be used for multiple distributed generation systems.A comparison between the performance of the proposed protection scheme with previous related works in terms of overall fault detection and classification accuracy is shown in Table 6.Most of the mentioned techniques have an acceptable performance to detect and classify grid faults with a fairly high accuracy.However, only a few of the referenced techniques evaluated their performance under noisy conditions.It is worth mentioning that the proposed protection scheme not only has an acceptable performance in terms of detecting and classifying grid faults in ideal and noisy conditions, but is also quick to identify them in real time.

Conclusions
In this paper, a protection scheme based on wavelet multi-resolution singular spectrum entropy and support vector machine is proposed to detect and classify different types of faults in a grid-tied photovoltaic system.Wavelet multi-resolution singular spectrum entropy is compounded wavelet transform and multi-resolution singular spectrum entropy, which is used to extract the prominent features of the PCC voltage as input data of a support vector machine that is able to react in fault detection and classification.The results determine which wavelet multi-resolution singular spectrum entropy is not sensitive to noise and sudden changes in signals and has the ability to detect grid faults of different types, at varying distances, and in different situations.Furthermore, it is proven that the proposed intelligent method not only recognizes different types of grid faults correctly, but also performs quickly in identifying grid faults in grid-connected photovoltaic systems.The classification and detection accuracies of the proposed protection scheme are 100% and its detection time is less than 0.12 ms.The algorithm is simple and easy to execute.Apart from this, a graphical investigation is shown to observe the effects of different types of grid faults on PV operation, highlighting the necessity of intelligent protection methods to protect PV systems.
There is still a lack of more complex conditions which need to be studied and solved by applying the proposed protection scheme in multiple DG systems in the future.

Conflicts of Interest:
The authors declare no conflict of interest.

Figure 1 .
Figure 1.Structure of the proposed protection scheme.

•
At the PCC location; • At two different distances of 8 km and 14 km away from the PV system.• The type of fault conditions are as follows: • Single phase to ground fault (SP-G); • Phase to phase to ground fault (PP-G); • Three phase to ground fault (PPP-G); • Phase to phase fault (PTP).•The grid faults occurred at t = 0.3 s, and after 150 ms they were cleared.

Figure 2 .
Figure 2. Structure of the studied system.
illustrates the wavelet decomposition levels of the PCC voltage signal for a PPP-G fault located 8 km away from the PCC in phase A. The DWT coefficients (d 1 , d 2 , d 3 , d 4 , d 5 , d 6 , d 7 , d 8 ) were utilized to provide the singular spectrum entropy that was used to calculate the entropy value of each layer, e.g., H j , to recognize faults in the PV system.As mentioned above, different types of faults such as SP-G fault, PTP fault, PP-G fault, and PPP-G fault were explored at different distances and at different fault resistances in this model.The entropy values of fault conditions that occurred 8 km away from the PCC of the PV system with a fault resistance of 120 ohm under normal conditions are presented in Table

Figure 3 .
Figure 3. (a-j) Wavelet decomposition levels of the point of common coupling (PCC) voltage signal at phase A during three phase to ground (PPP-G) fault condition.

Figure 4 .
Figure 4. (a-c) The changes of effective values of the PCC voltage during grid fault conditions in different phases.

Figure 5 .
Figure 5. (a-c) The variations of effective values of the PCC current during grid fault conditions in different phases.

Figure 6 .
Figure 6.The variations of frequency at the PCC during grid fault conditions.

Figure 7 .
Figure 7. (a-d) The Vd and Vq grid voltage components during grid faults.

Figure 8 .
Figure 8. (a-d) The Id and Iq grid current components during grid faults.

Figure 9 .
Figure 9. (a-d) The modulation index of Uabc_ref used by the pulse-width modulation (PWM) generator of the voltage source control (VSC).

Figure 10 .
Figure 10.Variation of the dc-link voltage under grid fault conditions at different distances away from the PCC.

Figure 11 .
Figure 11.(a) The output photovoltaic (PV) voltage; (b) the output PV current; (c) the PV diode current under grid fault conditions 8 km away from the PCC.

Author
Contributions: M.A. proposed the research topic with H.H. M.A. took part in discussing the results and gave valuable input.He also wrote the conclusion and wrote most of the paper with H.H. and N.C.H. M.L.O and M.A.M.R. took part in revising the paper and validated the idea as well as reviewed the final paper with M.A. and N.C.H. Funding: This research received no external funding.

Table 1 .
The entropy values of different fault types.

Table 2 .
The entropy values of different fault types with noise.

Table 3 .
Support vector machine (SVM) classification results at different values of parameters C and γ.

Table 4 .
Classification results of different types of events.

Table 5 .
Comparison results of different protection schemes.

Table 6 .
Comparison of the performance of the proposed protection scheme with previous related works.