A Protection Technique for Microgrid Using Wavelet Packet Transform and Data Mining Classiﬁer

: In electrical power systems, the popularity of the microgrid is signiﬁcantly increasing because of its remarkable advantages. However, the microgrid often exhibits protection problems and seriously affects the reliability of power system. Hence, a proper protection strategy is extremely necessary to solve the protection issues. Therefore, this manuscript proposes a protection strategy against the faults in microgrids using a wavelet packet transform and data mining classiﬁer. MAT-LAB/SIMULINK and Python are used to investigate the proposed scheme performance. It was found that the proposed technique can detect and classify different types of faults for the islanded and grid-associated modes of the microgrid.


Introduction
Microgrid integration with traditional systems has enhanced the capability of the modern power system to perform more efficiently. Microgrids reduce dependency on conventional systems by providing uninterrupted power against the high load [1]. Despite its immense advantages, it also produces implementation, operational, control, and protection problems [2,3]. One cause of the protection issue is that the traditional system is usually radial with unidirectional (from source to consumers) power flow; however, in the microgrid, power flows bidirectionally. The other reason for the protection problem is associated with the fault current level. In grid-linked mode, the fault current is fed from the main utility and distributed generators (DGs); hence, the fault current is relatively higher. Conversely, in islanded mode, the fault current is low, as DGs in the microgrid are of low capacity [4][5][6][7]. The difference in the operation and control of a microgrid with conventional systems causes failures of overcurrent-based protection strategies. Thus, protection design and operation are challenged [8,9].
The protection issues of a microgrid are addressed through different techniques in the literature. In [10,11], the authors addressed the protection strategies by utilizing signal processing and data mining techniques. A discrete wavelet transforms (DWT) combined with an artificial neural network is proposed in [12]. A wavelet transforms (WT) and decision tree-based methodology is described in [13].
Recently, most of the research has addressed data mining approaches. Hence, in our proposed scheme, a combined signal processing and data mining technique is employed to detect the fault in a microgrid and then determine its classification. The main objectives of this study are as follows: • To protect the microgrid using the wavelet packet transform (WPT) and data mining technique.

•
To collect the input dataset by extracting the statistical indices of total harmonic distortion (THD).

of 7
• To validate the proposed technique's effectiveness for both operating modes of the microgrid.

Proposed Technique
This study provides a solution to the protection issues by utilizing WPT and data mining techniques. The proposed strategy block diagram is presented in Figure 1. First, the sample voltage and current are preprocessed to calculate the THD through WPT. Then, statistical indices (standard deviation, min, and max) of the THD are extracted to collect the input dataset. Once the dataset is collected, it is fed to the random forest classifier to develop the data mining model for fault detection and classification. While collecting the dataset, several fault and no-fault (NF) aspects are considered to perform the simulation, as shown in Tables 1 and 2 [11], for both operating modes and configurations of the microgrid.


To collect the input dataset by extracting the statistical indices of total harmonic dis tortion (THD).  To validate the proposed technique's effectiveness for both operating modes of th microgrid.

Proposed Technique
This study provides a solution to the protection issues by utilizing WPT and dat mining techniques. The proposed strategy block diagram is presented in Figure 1. First the sample voltage and current are preprocessed to calculate the THD through WPT. Then statistical indices (standard deviation, min, and max) of the THD are extracted to collec the input dataset. Once the dataset is collected, it is fed to the random forest classifier t develop the data mining model for fault detection and classification. While collecting th dataset, several fault and no-fault (NF) aspects are considered to perform the simulation as shown in Tables 1 and 2 [11], for both operating modes and configurations of the mi crogrid.

Wavelet Packet Transform
In DWT, the decomposition of an obtained signal is in non-uniform frequency bands However, for the analysis of harmonics, it is good to evaluate uniform frequency sub bands which can be obtained through WPT. The main difference between the WPT and DWT is the decomposition process. In DWT, after the first level, either approximation o detailed coefficients are used for further decomposition, whereas in WPT, after the firs level, both detailed and approximation coefficients are decomposed to extract the faul information. Hence, through WPT, more fault information can be gathered compared t DWT. The decomposition of a signal y[m] is given as:   Table 2. Simulated NF cases.

Parameters Numbers
Mode of operation (Islanded or grid-associated) 2 Topology (Meshed or radial) 2 Switching of the capacitor (buses and PCC) 6 Load switching 6 DG 1 and DG 3 outage 2 Overall NF events 288

Wavelet Packet Transform
In DWT, the decomposition of an obtained signal is in non-uniform frequency bands. However, for the analysis of harmonics, it is good to evaluate uniform frequency sub-bands which can be obtained through WPT. The main difference between the WPT and DWT is the decomposition process. In DWT, after the first level, either approximation or detailed coefficients are used for further decomposition, whereas in WPT, after the first level, both detailed and approximation coefficients are decomposed to extract the fault information. Hence, through WPT, more fault information can be gathered compared to DWT. The decomposition of a signal y[m] is given as: where g[j] and h[j] are the frequency bands for low-pass and high-pass filters.

Test System
Figure 2 represents the test system of the microgrid, modeled in the MATLAB/SIMULINK. A 25 kV, 15 MVA, and 60 Hz grid is connected with a microgrid at the PCC through a switch, which is used to change the operating modes either into grid-connected or islanded mode. It contains one synchronous-based DG(DER4) of 7 MVA, with one 2 MVA (DGR2) and two 3 MVA (DER1 and DER3) IIDGs. It comprised of five distributed sections (DL1, DL2, DL3, DL4, DL5), with a 20 km line length. It contains six loads linked to each bus. A 120/25 kV Dyn transformer connects the microgrid with the grid, and a 0.630/25 kV transformer is used to connect all DG sources [11]. where [ ] and ℎ[ ] are the frequency bands for low-pass and high-pass filters.    Figure 3 represents the flowchart of the proposed algorithm. Accuracy, precision, and recall are the basic indices applied to find out the capability of the proposed strategy.

Results Discussion
(1) To measure the dependability of the predicted and actual fault events for fault and NF cases for the proposed technique, accuracy is considered as follows: whereψ and = ψ = predicted fault and NF events; ψ and ψ = actual fault and NF events.
(2) Precision gives the relation between the predicted and actual fault events, given as: whereψ T = predicted fault events; ψ T = actual fault events.
(3) Recall precisely measures the predicted and actual NF events as follows: where = ψ T = predicted NF events; ψ T = actual NF events.
(3) Recall precisely measures the predicted and actual NF events as follows: = where = predicted NF events; = actual NF events.

Fault Detection
The study considered overall 9088 cases (8800 fault and 288 NF) for the detec faults in the microgrid. Here, 75% of the cases are considered for training and 2 testing to build the data mining model. The fault detection is performed by assumin different values for both of the cases, given as: = 1, 0, events Figure 4 represents the fault detection confusion matrix. From the figure, it observed that the proposed scheme randomly selected 2272 cases (70 NF, 220 events). The figure further shows that the proposed scheme accurately detected 220 and 69 NF cases with an accuracy of 99.95%. The comparative analysis of the pro technique with DT and SVM is tabulated in Table 3. It is demonstrated in the tab the accuracy of the proposed technique is 99.95% (with a precision level of 100%, recall level of 98.57%), whereas SVM has an accuracy level of 99.42% (99.68% pr and 91.43% recall), and DT has an accuracy level of 99.56% (with a precision level o and a recall level of 94.28%). The comparative analysis can also be seen in Figure 5

Fault Detection
The study considered overall 9088 cases (8800 fault and 288 NF) for the detection of faults in the microgrid. Here, 75% of the cases are considered for training and 25% for testing to build the data mining model. The fault detection is performed by assuming two different values for both of the cases, given as:  Table 3. It is demonstrated in the table that the accuracy of the proposed technique is 99.95% (with a precision level of 100%, and a recall level of 98.57%), whereas SVM has an accuracy level of 99.42% (99.68% precision and 91.43% recall), and DT has an accuracy level of 99.56% (with a precision level of 99.72% and a recall level of 94.28%). The comparative analysis can also be seen in Figure 5.

Fault Classification
The next task after fault detection is the classification of the fault. For fault classification while training, the values assumed are given as: For fault classification, 75% of the cases are used for training and 25% for testing Figure 6 represents the confusion matrix for fault classification. From the figure, it can be observed that the proposed scheme has arbitrarily considered 2200 fault cases. With seven misclassifications, it has classified 596 SLG cases accurately. Further observation shows that for LL faults it has accurately classified 582 cases, for LLG faults 590 cases, and for LLLG faults 417 cases with 98.84%, 99.32%, 100%, and 99.05% accuracy, respectively Hence, this leads to an overall accuracy of 99.32%. Table 4 and Figure 7 show a comparative analysis of the proposed scheme with DT and SVM. The comparative analysis verifies that the proposed scheme can effectively classify the faults with 99.32% accuracy compared to SVM and DT having accuracy levels of 97.78% and 98.27%, respectively.

Fault Classification
The next task after fault detection is the classification of the fault. For fault class tion while training, the values assumed are given as: For fault classification, 75% of the cases are used for training and 25% for te Figure 6 represents the confusion matrix for fault classification. From the figure, it c observed that the proposed scheme has arbitrarily considered 2200 fault cases. With s misclassifications, it has classified 596 SLG cases accurately. Further observation s that for LL faults it has accurately classified 582 cases, for LLG faults 590 cases, an LLLG faults 417 cases with 98.84%, 99.32%, 100%, and 99.05% accuracy, respect Hence, this leads to an overall accuracy of 99.32%. Table 4 and Figure 7 show a com tive analysis of the proposed scheme with DT and SVM. The comparative analysis ve that the proposed scheme can effectively classify the faults with 99.32% accuracy pared to SVM and DT having accuracy levels of 97.78% and 98.27%, respectively.

Fault Classification
The next task after fault detection is the classification of the fault. For fault classification while training, the values assumed are given as: 0 for SLG faults 1 for LL faults 2 for LLG faults 3 for LLLG faults (8) For fault classification, 75% of the cases are used for training and 25% for testing. Figure 6 represents the confusion matrix for fault classification. From the figure, it can be observed that the proposed scheme has arbitrarily considered 2200 fault cases. With seven misclassifications, it has classified 596 SLG cases accurately. Further observation shows that for LL faults it has accurately classified 582 cases, for LLG faults 590 cases, and for LLLG faults 417 cases with 98.84%, 99.32%, 100%, and 99.05% accuracy, respectively. Hence, this leads to an overall accuracy of 99.32%. Table 4 and Figure 7 show a comparative analysis of the proposed scheme with DT and SVM. The comparative analysis verifies that the proposed scheme can effectively classify the faults with 99.32% accuracy compared to SVM and DT having accuracy levels of 97.78% and 98.27%, respectively.

Conclusions
Microgrids cause many protection problems in power systems. Therefore, this scheme proposes a fault protection solution by using wavelet packet transform and random forest-based techniques. The proposed scheme is investigated in MATLAB to validate its performance. The results indicate improved results over the existing data mining techniques.

Conclusions
Microgrids cause many protection problems in power systems. Therefore, scheme proposes a fault protection solution by using wavelet packet transform and dom forest-based techniques. The proposed scheme is investigated in MATLAB to date its performance. The results indicate improved results over the existing data m techniques.

Conclusions
Microgrids cause many protection problems in power systems. Therefore, this scheme proposes a fault protection solution by using wavelet packet transform and random forestbased techniques. The proposed scheme is investigated in MATLAB to validate its performance. The results indicate improved results over the existing data mining techniques.