# Fault Classification with Convolutional Neural Networks for Microgrid Systems

Authors: Prateem Pan; Rajib Kumar Mandal; Md. Mojibur Rahman Redoy Akanda
Journal: International Transactions on Electrical Energy Systems
 (2022)

---

## Abstract

The microgrid (MG) networks require adaptive and rapid fault classification mechanisms due to their insufficient kinetic energy reserve and dynamic response of power electronic converters of distributed generation (DG) systems. To achieve this requirement, this study explores the issues in standalone (SA) and grid-connected (GC) operating modes of MG and develops a near-real-time intelligent disturbance detection and protective solutions for their stable operation. In the proposed approach, an intelligent fault classification mechanism is developed using the advantages of wavelet transform and convolutional neural networks (CNNs). Initially, the voltage and current outcomes for each and every possible fault in the MG network are identified and the wavelet transforms are applied for preprocessing and image conversion. The converted images are identified as scalograms which are further trained with the CNNs. To assess the development of the proposed approach, the IEEE 13 bus system is considered for data gathering. To replicate the real-time behavior of the MG network, the additive white Gaussian noise (AWGN) and additive impulsive Gaussian noise (AIGN) are injected at various levels during the classifier development process. The trained classifier has an average training accuracy of 99.1% for SA MG and 97.7% for GC MG, and the average testing accuracies are 98.9% for SA MG and 97.1% for GC MG.


---

## Body

## 1. Introduction

In the microgrid (MG) operation, detecting and locating faults is a critical procedure to ensure system protection, smooth operation, and service restoration. Successful detection of faults results in accurate operation of the protective relays which further isolates the faults and de-energizes the faulted section. Furthermore, the protection of MGs proved to be a difficult task due its multiple modes of operation and diverse power generation technologies [1]. Given that MGs rely on distributed generation (DG) systems at the load end for a stable operation, it is important to avoid the generation capacity loss while isolating the faults. Hence, for the MGs to sustain an operation during the unbalanced faults, several factors such as the inverter internal protection schemes designed to meet the protection requirements of standalone (SA) operation and to trip during unbalanced conditions need to be considered [2]. Besides, the MGs must be equipped with DGs that can operate through unbalanced faults for developing the smart MG network. Failing to adhere with any of the above factors, any asymmetrical fault may result in the shutdown of SA MGs. Therefore, smart MGs should be capable of identifying the phases, which can account for the majority of failures that occur in the system during unbalanced faults [3].To achieve this, in recent years, signal processing and data driven approaches have become increasingly popular for detection and classification of faults in MGs. In [4], the authors use discrete wavelet transform (DWT) [5] to extract features from the branch current signals. These features are used to detect faults and are further fed into a neural network comprising of gated recurrent units for fault classification. The authors tested their proposed scheme on the Consortium for Electric Reliability Technology Solutions (CERTS) MG test bed [6] and the IEEE-34 bus system, to achieve high accuracy in fault classification. In [7], the authors developed a protection scheme using CNN approach for PV-based MGs to improve their robustness during varying irradiance levels. The developed scheme utilized spatiotemporal features obtained by modelling the uncertainty in the irradiance levels over a period. This approach has drawbacks due to diverse data analysis aspects which resulted in various challenges during the process of exploiting the hidden data patterns. Furthermore, in [8], the authors extracted the relative wavelet energy of the signals using DWT-based multiresolution analysis (MRA) of the input signals for achieving fault detection in DC MGs. A simple feedforward neural network (NN) is used for training these input features and for developing the fault classifier. Various similar instances of applying wavelet transforms along with the NN approaches for developing fault classification algorithms have been further illustrated in [9–13]. In addition to NNs, k-nearest neighbors (k-NNs) and decision trees (DTs) are widespread approaches used in the development of fault classification algorithms. In [12], the authors used two DTs for fault classification in transmission lines based on fifteen features extracted using DWT. The results identified that the trained classifier was able to achieve a classification accuracy of 94% using the random forest method. However, the method suffers from major drawbacks as 12% of the line-to-line to ground (LLG) faults were classified as line-to-ground (LG) faults. Also, the method fails to identify the faulted phases. Furthermore, DTs were also used in [14] to classify the faults in transmission lines. In [10], a semisupervised machine learning approach is used to handle both labelled and unlabeled data by co-training DTs and k-NN classifiers to classify faults in both transmission and distribution systems including MGs. In [15], the series arc faults in PV systems are classified by generating different types of series arc faults by training the corresponding data with the light convolution neural network. This approach heavily relied on expert-designed characteristics from the simulations and is identified to be difficult while training models with strong generalization. Similarly, in [16], the series AC arc fault detection is achieved with an adaptive asymmetric convolutional neural network. Furthermore, this method used generative adversarial networks (GANs) to enhance the data used in the arc fault detection approach. The major drawback with the developed approach is its unstable training associated with the GANs, where different types of data need to be continuously provided to check the accurate working of the method.In addition to the techniques discussed, some other novel approaches to fault classification are as follows. In [17], the authors used the principal component analysis (PCA) to classify faults based to the phase current values in only one fourth of a cycle. In [18], a fault classification and change detection approach is developed using Teager–Kaiser energy operator for AC MGs. The methodology extracted the signatures from the summation of squared three-phase currents measured at the end of a line in the MG. The developed scheme is capable of identifying the operating state of the network in both grid-connected (GC) and standalone (SA) modes, but faced drawbacks due to the wraparound effects at the ends of the record data. Furthermore, the work done in [19] develops a classification scheme based on Discrete Fourier Transform (DFT) and fuzzy logic (FL). In [20], a data-mining-based fault classification approach for microgrid protection is developed to resolve the issues of high penetration of distributed generation units in the network. The developed approach used voltage and current signals measured at the system output to extract the features using Hilbert transform and train the AdaBoost classifier. The developed approach has disadvantages due to empirical evidence form of AdaBoost classifier and its vulnerability to uniform noise. These aspects lead to low margins and overfitting during the data training process. In the literature surveyed so far, only few studies paid consideration to the quality of the simulated signals. The authors in [4] tested the proposed scheme on data generated with 30−40dB signal-to-noise ratio (SNR). Furthermore, the authors in [21] tested the used of deep learning classifiers on perfect signals and signals with 20dB SNR. Since the machine learning and deep algorithms are data driven, it is essential that considerable attention is paid to train the network on data that is as close as possible to the real-world data. Failing to adhere with these aspects could result in a significant difference in the performance of the scheme when implemented in the field.In light of this requirement, this research aims to generate data that are close to the real-world data. Thus, in addition to20dB SNR with additive white Gaussian noise (AWGN) [22–24], the additive impulse Gaussian noise (AIGN) [24–26] is added to mimic the impulses generated due to random switching of loads in the MG and impulses created from the switching operation of inverters [27, 28]. Furthermore, this research adapts the widely used DWT along with the convolutional neural networks (CNNs) to develop the fault classification approach. The application of CNNs to fault classification is an interesting approach in the sense that the signals are not directly used as inputs to the classifier. Similar approaches were adapted in [29] to detect the single-phase Earth faults and in [30] for estimating and classifying the voltage sag where the inputs to the CNNs were matrices of selected variables formed using the concept of system area mapping. The role of CNN is to make the input data easier to process without losing the essential functionality of good prediction. This is important not only for learning features but also for designing extensible architectures for large datasets. The purpose of the convolution operation is to extract high-level features from the input data. Besides, the CNN does not have to be limited to just one convolutional layer. Traditionally, the first ConvLayer is responsible for capturing low-level features, and with additional layers, the architecture also adapts to higher levels of functionality, providing a comprehensive understanding of the dataset. Furthermore, by adapting the implementation principles developed in the literature, the major contributions of this research are as follows:(i)
Develops a fault classification approach for MG networks operating under both SA and GC modes(ii)
Examines the behavior of the proposed classification process with real-time signals by replicating their behavior using AWGN and AIGN(iii)
Localizes the faults in the system according to the zone of occurrence(iv)
Improves fault classification accuracy and fault detection speed for different faults that can occur in a MG networkFurthermore, sections of this study are organized as follows. Section2 identifies the faults and challenges faced by the MG network. Section 3 discusses the requirements for developing the proposed fault classification approach, and the methodology is discussed in Section 4. The results are discussed in Section 5, and the conclusion and future work are given in Section 6.


## 2. Faults and Challenges in Microgrid

Microgrids, which are defined as a small entity in a power system network, usually comprise of loads, microgenerators, some local energy storage, and an intelligent control system along with associated protection devices and energy management software. A brief overview of MG architecture is shown in Figure1. These networks are capable of coordinating and managing distributed energy resources (DERs) in a more decentralized way and reduce the need for the centralized coordination and management. They, thus, behave as a net load or a net generator to the broader grid [31]. In general, faults can be classified into two types. In the first type called shunt faults, insulation failure results in a short circuit between two or more live conductors when they come into contact with each other. These types of faults occur due to overstressing and degradation of insulation over time or due to a sudden over voltage condition. The second type of faults leads to an interruption of current flow and is called open circuit faults or series faults. Shunt faults that involve all three phases (LLL) or all three phases and the ground (LLL-G) are called symmetrical faults since all three phases are affected. Shunt faults that occur between two phases (LL), two phases and the ground (LL-G), or any single phase and the ground (L-G) are called unsymmetrical faults, since the phase balance is disrupted and involves unsymmetrical current components.Figure 1
Overview of microgrid architecture.Furthermore, when two or more faults occur at the same instant, then such faults are called simultaneous faults. Sometimes, these faults may be of the same type and can occur in the same location, or a different type of faults that occur in the same location. In some cases, one type of fault may evolve into other types known as the cross-country faults. A brief overview on the classification of faults is given in [32, 33] and depicted in Figure 2. This work aims to classify the five types of symmetrical and asymmetrical shunt faults and identify the phases involved.Figure 2
Classification of fault types in a power system network.Generally, these electrical faults in the MGs can occur due to diverse reasons such as equipment failures, weather conditions, human operation errors, and other factors. The effect of these faults in a MG ranges from over current flow to disturbances in the interconnected active circuits and also involves damage to equipment and dangers to operating personnel. Apart from the above, there are many other challenges that need to be addressed while developing a fault classification approach for MGs. When a MG is interconnected in the grid, the protection system must make sure that the MG is isolated in case of a fault in the main grid. For any case if the fault occurs in the MG itself, it must make sure that no or minimum number of consumers is only affected by the fault. The major challenges faced by the protection system in a MG are(i)
Smaller and intermittent magnitude of fault currents are due to high penetration of inverter-interfaced DG systems(ii)
Different modes of operation, i.e., GC and SA mode, may produce different levels of fault current(iii)
The irregular connections and unplanned disconnections of the MG components will result in topological changes to the MG network(iv)
The intermittent nature of DERs means that the assessing the level of fault current may prove to be challenging(v)
The power electronics converters that connect the generation and storage systems has a very limited tendency to generate short-circuit currents, i.e., not more than 1.2 or 2 times the rated current of the generator in the case of a faultThus, a data-driven approach combined with signal processing techniques could help in overcoming the above challenges as it does not rely on set thresholds used in traditional protection systems. Using signal processing techniques such as MRA allows us to detect faults with the smallest change in voltage or current thus reducing our dependence on large magnitude of fault currents for detection. In this work, we consider the classification of shunt faults; i.e., given that a fault has occurred, we aim to identify the phases involved which will allow the control system to trip only the faulted phases so as to avoid unnecessary islanding of the MG. We aim to classify the five types of symmetrical and asymmetrical shunt faults and identify the phases involved.


## 3. Requirements for Developing a Fault Classifier

### 3.1. Wavelet Transforms

Analyzing digital signals in different domains of representation allows us to better understand its salient features such as its periodicity, autocorrelation, and power spectrum of the signal which may be hard to extract from any single domain. Wavelets are an effective tool for analyzing and processing signals and have been used widely in fields such as computer vision, music, and digital signal processing to analyze and transform data. A wavelet is any wave that satisfies certain conditions. A wavelet is a small wave, which must be an oscillating zero-average function that is confined in a short period of time. A wavelet function that gives rise to a number of similar waves that are translated (shifted) or dilated (stretched or compressed) in time is called a mother wavelet. Any signal can be expressed by a summation of identical wavelets that have different translation and dilation factors, which are also called the wavelet coefficients. Furthermore, the Fast Fourier transform (FFT) and the wavelet transform share many similarities. In terms of signal representation, the FFT represents the signal as a sum of sine and cosine waves of different frequencies; while, wavelet transform utilizes a mother wavelet as a basis function in the transform domain. Mathematically, the inverse transformation matrix of both methods is the transpose of the original transformation matrix. Thus, both methods can be viewed as a rotation in function space to a different domain. Additionally, the basic functions of both methods are localized in frequency which can be leveraged by mathematical tools such as scalograms to calculate the power distribution among the frequencies.Analyzing digital signals in different domains of representation allows better understanding of its salient features such as its periodicity, autocorrelation, and power spectrum. These features are hard to extract for a signal from any single domain. Hence, wavelets are identified as an effective tool for analyzing and processing signals [34]. Wavelet transforms (WTs) represent the signal as a set of wavelet coefficients in the time-frequency domain that can be manipulated to achieve various signal processing effects. These coefficients have been used widely in fields such as computer vision, music, and digital signal processing to analyze and transform data. In the research, the DWTs are developed to extract the features of the various faults identified in a MG network for training with the classifier.For a continuous-time signalxt, the wavelet transform Wxa,b is defined as(1)Wxa,b=1a∫−∞∞xtt−badt.Here, the inner product ofxt and the translated and scaled variation of a single function ψt are computed to estimate the wavelet transform. The bandwidth and center frequency of the wavelet can be varied by changing the scaling parameter a. Hence, when a is fixed, the transformation is a convolution of xt with the scaled and time-reversed wavelets. Furthermore, the transforming of the signal into different domains of representation should also ensure a perfect reconstruction of the signal. To achieve this, the WT needs to satisfy the admissibility condition for the wavelet ψt as follows:(2)Cψ=∫−∞∞ψω2ωdω<∞,where ψω is the transformation ability of the wavelet. Furthermore,(3)ψ0=∫−∞∞ψtdt=0.Moreover,ψω must decrease rapidly for ω⟶0 and for ω⟶∞. The above conditions imply that, in a time domain, the average value of the wavelet must be zero and should be oscillatory.Furthermore, to overcome the challenges due to mapping of a signal in different time domains, the DWT are introduced [5, 35, 36]. The DWT scales and translates the signal in discrete steps and holds sufficient information related to analysis and synthesis of the signal. It also reduces the computational time and is considerably easy to implement. The DWT is applied to a signal as follows:(4)dj,k=1a0j∫−∞∞xtψ∗t−kb0a0ja0jdt,where j and k are the integers reflecting the level and location, respectively, and bo>1 is a fixed dilation step.Furthermore, the DWT evaluates the signal by decomposing it into approximation and detailed coefficients with different resolutions at different frequency bands. This process is achieved with successive low-pass and high-pass filtering of the time-domain signal. Generally, this filtering is executed with the wavelet and scaling functions associated with the low-pass and high-pass filters, respectively. Initially, the original signalxn is passed through a half-band low-pass filter gn and high-pass filter hn. This eliminates half the samples from the original signal, which further halves the time resolution and doubles the frequency resolution. This is because the frequency band of the filtered signal spans only half the frequency band of the original signal. Figure 3 shows a three-level decomposition of a signal showing the frequencies being split after each level of decomposition [37, 38].Figure 3
Three-level decomposition of a signal with discrete wavelet transform.The output of the high-pass filter is called the approximation coefficients and the output of the low-pass filter is called the detail coefficients. This procedure, also called subband coding, is repeated with the detail coefficients until such only two samples are left in the signal. At each level, the subsampling will lead to half the time resolution and half the frequency band thus doubling the frequency resolution. This procedure can be visualized, as shown in Figure3. Mathematically, the multiresolution decomposition of a signal xt at level M can be achieved by(5)xt=∑kaM,k12Mφt2M−k+∑jM∑kdj,kψt2j−k,where aM,k are the approximation coefficients at level M and φt is the scaling function. At each level of decomposition, the most prominent frequencies present in the signal will appear with high amplitudes in the respective region of the DWT signal that contains those frequencies.In this study, the Daubechies 5 (db5) mother wavelet with two-level decomposition and reconstruction is used. This choice of mother wavelet provides a set of highly well-located elements that which when scaled with a set of 5 integer coefficients provides a representation that can act as a reference to any fault type occurring in the MG. Thereafter, the two-level decomposition is identified to provide the maximum value for energy and Shannon entropy which is depreciated if any other level is used. Furthermore, these set coefficients for the mother wavelet carry the asymmetric, orthogonal, and biorthogonal properties which provide a better scaling and wavelet functions for sine wave representations. An example of how a measured variation in voltage and faulty voltage signal of phase a behave when subjected to db5 is presented in Figure4.Figure 4
Mother wavelet and the levels of decomposition. (a) Level decomposition of variations in measured signal. (b) Level decomposition of fault signal.
(a)(b)


### 3.2. Convolutional Neural Networks

Similar to the regular feedforward networks, the CNNs make an explicit hypothesis that the input to the network layer is always images. The CNNs are designed to attribute certain properties to neural networks that make its work with image inputs easier and efficient at extracting features. CNNs are primarily used for 2D image recognition. In this process, the color information carried by individual pixel of an image is usually represented through multiple channels. Furthermore, CNNs consist of different types of layers that perform the function of feature extraction, reducing architecture size and finally the classification. Here, we take a deeper look at the network architecture and elucidate the functioning of the CNNs’ model. The three main layers used in CNNs’ architectures are the convolutional layer, the pooling layer, and the fully connected layer. Furthermore, a CNN is learned by updating a set of trainable filters that slide across the input matrix spatially and compute dot products between the input values and the filter values. Furthermore, a 2D activation map is formed as the filters which slide across the width and height of the input image. This provides the response at each spatial position for the filter. Besides, when the filters are activated and encountered visual features such as colors or edges of the input image, the network iteratively learns them. Furthermore, the convolutional layer is tailed by a ReLu function so as introduce nonlinearity and help the network to converge [39]. In between each convolutional layer, a pooling layer is added to reduce the size of the input image and the number of input parameters to the next convolutional layer which helps to reduce overfitting. Neurons in a fully connected layer have connections to all activations in the previous layer, as seen in regular neural networks. The function of the fully connected layer is to take the features extracted by the convolutional layers as inputs and classify them. The pooling layer operates along the depth of the input image and resizes it by performing the MAX operation without changing the depth of the image [39]. The operation of CNNs is depicted in Figure 5.Figure 5
Layers and operating process of CNNs.Furthermore, to accommodate the change in network topology with the architecture of the CNN, the parameter selection and optimization are achieved such that there is a better tradeoff between computation speed, network depth, and accuracy. Generally, it is highly speculated that more layers will offer high accuracy without the need for achieving flexibility of the network architecture. However, this approach will make the network run slower and can also lead to overfitting and under fitting of the input data. Hence, to avoid the overfitting and achieve this during the algorithm development, the features of automatic differentiation, shared weights, and custom training loops provided by the deep learning toolbox of MATLAB are utilized.


## 3.1. Wavelet Transforms

Analyzing digital signals in different domains of representation allows us to better understand its salient features such as its periodicity, autocorrelation, and power spectrum of the signal which may be hard to extract from any single domain. Wavelets are an effective tool for analyzing and processing signals and have been used widely in fields such as computer vision, music, and digital signal processing to analyze and transform data. A wavelet is any wave that satisfies certain conditions. A wavelet is a small wave, which must be an oscillating zero-average function that is confined in a short period of time. A wavelet function that gives rise to a number of similar waves that are translated (shifted) or dilated (stretched or compressed) in time is called a mother wavelet. Any signal can be expressed by a summation of identical wavelets that have different translation and dilation factors, which are also called the wavelet coefficients. Furthermore, the Fast Fourier transform (FFT) and the wavelet transform share many similarities. In terms of signal representation, the FFT represents the signal as a sum of sine and cosine waves of different frequencies; while, wavelet transform utilizes a mother wavelet as a basis function in the transform domain. Mathematically, the inverse transformation matrix of both methods is the transpose of the original transformation matrix. Thus, both methods can be viewed as a rotation in function space to a different domain. Additionally, the basic functions of both methods are localized in frequency which can be leveraged by mathematical tools such as scalograms to calculate the power distribution among the frequencies.Analyzing digital signals in different domains of representation allows better understanding of its salient features such as its periodicity, autocorrelation, and power spectrum. These features are hard to extract for a signal from any single domain. Hence, wavelets are identified as an effective tool for analyzing and processing signals [34]. Wavelet transforms (WTs) represent the signal as a set of wavelet coefficients in the time-frequency domain that can be manipulated to achieve various signal processing effects. These coefficients have been used widely in fields such as computer vision, music, and digital signal processing to analyze and transform data. In the research, the DWTs are developed to extract the features of the various faults identified in a MG network for training with the classifier.For a continuous-time signalxt, the wavelet transform Wxa,b is defined as(1)Wxa,b=1a∫−∞∞xtt−badt.Here, the inner product ofxt and the translated and scaled variation of a single function ψt are computed to estimate the wavelet transform. The bandwidth and center frequency of the wavelet can be varied by changing the scaling parameter a. Hence, when a is fixed, the transformation is a convolution of xt with the scaled and time-reversed wavelets. Furthermore, the transforming of the signal into different domains of representation should also ensure a perfect reconstruction of the signal. To achieve this, the WT needs to satisfy the admissibility condition for the wavelet ψt as follows:(2)Cψ=∫−∞∞ψω2ωdω<∞,where ψω is the transformation ability of the wavelet. Furthermore,(3)ψ0=∫−∞∞ψtdt=0.Moreover,ψω must decrease rapidly for ω⟶0 and for ω⟶∞. The above conditions imply that, in a time domain, the average value of the wavelet must be zero and should be oscillatory.Furthermore, to overcome the challenges due to mapping of a signal in different time domains, the DWT are introduced [5, 35, 36]. The DWT scales and translates the signal in discrete steps and holds sufficient information related to analysis and synthesis of the signal. It also reduces the computational time and is considerably easy to implement. The DWT is applied to a signal as follows:(4)dj,k=1a0j∫−∞∞xtψ∗t−kb0a0ja0jdt,where j and k are the integers reflecting the level and location, respectively, and bo>1 is a fixed dilation step.Furthermore, the DWT evaluates the signal by decomposing it into approximation and detailed coefficients with different resolutions at different frequency bands. This process is achieved with successive low-pass and high-pass filtering of the time-domain signal. Generally, this filtering is executed with the wavelet and scaling functions associated with the low-pass and high-pass filters, respectively. Initially, the original signalxn is passed through a half-band low-pass filter gn and high-pass filter hn. This eliminates half the samples from the original signal, which further halves the time resolution and doubles the frequency resolution. This is because the frequency band of the filtered signal spans only half the frequency band of the original signal. Figure 3 shows a three-level decomposition of a signal showing the frequencies being split after each level of decomposition [37, 38].Figure 3
Three-level decomposition of a signal with discrete wavelet transform.The output of the high-pass filter is called the approximation coefficients and the output of the low-pass filter is called the detail coefficients. This procedure, also called subband coding, is repeated with the detail coefficients until such only two samples are left in the signal. At each level, the subsampling will lead to half the time resolution and half the frequency band thus doubling the frequency resolution. This procedure can be visualized, as shown in Figure3. Mathematically, the multiresolution decomposition of a signal xt at level M can be achieved by(5)xt=∑kaM,k12Mφt2M−k+∑jM∑kdj,kψt2j−k,where aM,k are the approximation coefficients at level M and φt is the scaling function. At each level of decomposition, the most prominent frequencies present in the signal will appear with high amplitudes in the respective region of the DWT signal that contains those frequencies.In this study, the Daubechies 5 (db5) mother wavelet with two-level decomposition and reconstruction is used. This choice of mother wavelet provides a set of highly well-located elements that which when scaled with a set of 5 integer coefficients provides a representation that can act as a reference to any fault type occurring in the MG. Thereafter, the two-level decomposition is identified to provide the maximum value for energy and Shannon entropy which is depreciated if any other level is used. Furthermore, these set coefficients for the mother wavelet carry the asymmetric, orthogonal, and biorthogonal properties which provide a better scaling and wavelet functions for sine wave representations. An example of how a measured variation in voltage and faulty voltage signal of phase a behave when subjected to db5 is presented in Figure4.Figure 4
Mother wavelet and the levels of decomposition. (a) Level decomposition of variations in measured signal. (b) Level decomposition of fault signal.
(a)(b)


## 3.2. Convolutional Neural Networks

Similar to the regular feedforward networks, the CNNs make an explicit hypothesis that the input to the network layer is always images. The CNNs are designed to attribute certain properties to neural networks that make its work with image inputs easier and efficient at extracting features. CNNs are primarily used for 2D image recognition. In this process, the color information carried by individual pixel of an image is usually represented through multiple channels. Furthermore, CNNs consist of different types of layers that perform the function of feature extraction, reducing architecture size and finally the classification. Here, we take a deeper look at the network architecture and elucidate the functioning of the CNNs’ model. The three main layers used in CNNs’ architectures are the convolutional layer, the pooling layer, and the fully connected layer. Furthermore, a CNN is learned by updating a set of trainable filters that slide across the input matrix spatially and compute dot products between the input values and the filter values. Furthermore, a 2D activation map is formed as the filters which slide across the width and height of the input image. This provides the response at each spatial position for the filter. Besides, when the filters are activated and encountered visual features such as colors or edges of the input image, the network iteratively learns them. Furthermore, the convolutional layer is tailed by a ReLu function so as introduce nonlinearity and help the network to converge [39]. In between each convolutional layer, a pooling layer is added to reduce the size of the input image and the number of input parameters to the next convolutional layer which helps to reduce overfitting. Neurons in a fully connected layer have connections to all activations in the previous layer, as seen in regular neural networks. The function of the fully connected layer is to take the features extracted by the convolutional layers as inputs and classify them. The pooling layer operates along the depth of the input image and resizes it by performing the MAX operation without changing the depth of the image [39]. The operation of CNNs is depicted in Figure 5.Figure 5
Layers and operating process of CNNs.Furthermore, to accommodate the change in network topology with the architecture of the CNN, the parameter selection and optimization are achieved such that there is a better tradeoff between computation speed, network depth, and accuracy. Generally, it is highly speculated that more layers will offer high accuracy without the need for achieving flexibility of the network architecture. However, this approach will make the network run slower and can also lead to overfitting and under fitting of the input data. Hence, to avoid the overfitting and achieve this during the algorithm development, the features of automatic differentiation, shared weights, and custom training loops provided by the deep learning toolbox of MATLAB are utilized.


## 4. Design and Implementation

This section provides an overview of the proposed method to classify faults in MGs using neural networks. The method is designed such that it addresses the challenges posed by MGs as discussed in Section2. It is designed so as to be scalable and adaptable to MGs of different sizes that operate at different voltages to be able to provide classification with high accuracy and confidence and facilitate its safe operation, in case of a fault. The goal is to employ deep learning methods to identify fault types in a MG rather than hard coding the values. The process involves the MG design and implementation, data generation, data preprocessing, and fault type classification, as shown in Figure 6.Figure 6
Stages of developing the fault classification approach.


### 4.1. Microgrid Implementation

For the purpose of this research, a MG that is a modified version of the IEEE 13 bus feeder [40] is designed and implemented. Figure 7 shows the one-line diagram of the feeder. It is an unbalanced system that models many of the typical characteristics of a standard distribution network [41].Figure 7
Schematic of the IEEE-13 bus microgrid.To implement the proposed fault classification approach with the various types of DGs in the MG, the network in Figure7 is modified to include by adding two photovoltaic (PV) systems at nodes 680 and 602. Besides, at node 675, an energy storage system (ESS unit for DG (DG-ESS) is associated in the network. To model the coupling point, a three-phase voltage source is utilized in a star configuration with ground connection. Furthermore, the variable is to model the point of common coupling (PCC) in the network. The variable loads are connected at the same nodes as the PV-DGs. The ESS is developed as a system level model that can be used for hybrid-phasor electro-magnetic transient studies. This is set to current control mode when the MG is GC and voltage control mode in the SA operation. The MG has several types of loads such as constant impedance, constant current, and constant power in star or delta configuration. In addition to the spot loads, a distributed load is present between nodes 632 and 671. The parameters of the DG-BESS are provided in Table 1. The storage system is operated in current control mode or voltage control mode depending on whether the MG is in GC mode or in SA mode, respectively. The parameters of the GC PV array and the transformer are also provided in Table 1. The complete IEEE-13 bus feeder as implemented in MATLAB/Simulink is shown in Figure 7.Table 1
System configuration and parameters.
SystemParametersValueDG-ESS modelNominal voltage4610kVNominal frequency50HzRated power500kWOverall system efficiency96%Recharge rate50%Initial SOC80%Mode of operationVoltage control/current controlPower500kWGrid-connected PV arrayNominal voltage4610kVNominal frequency50HzPower500kWTransformerPower rating (kVA)500kVAVoltage: high (kV)4.16kVVoltage: low (kV)0.48kVResistance (%)1.1Impedance (%)2


### 4.2. Data Generation

As the control system of a MG is responsible for the safe operation of the system in both the GC as well as the SA mode. The microgrid may be controlled from a central controller or may have the control system imbedded as autonomous parts in each DER. In the islanded mode, the control system needs to maintain a constant voltage and frequency while injecting and absorbing the real and reactive power difference between the generation and loads. Here, frequency control may prove to be challenging due to the unavailability of rotating masses that are usually present in larger system and are essential for their stability. On the contrary, MGs are vastly dependent on power electronic devices whose control systems must be adapted to provide the frequency response and voltage regulation which was previously obtained from directly connected rotating masses. Without proper voltage regulation, MGs are prone to experience oscillations in voltage and power. Hence, the fault classification approach is analyzed in both GC and SA modes. Before the classifier can be used to classify faults, their learning parameters need to be trained as explained in the previous chapter. To obtain the data for developing the proposed approach, eleven fault types are simulated under various conditions. These conditions include the location, resistance, and inception angle for the faults. Furthermore, the three-phase voltage and the three-phase line currents are measured from the simulation models.From Table2, there are 11 types of faults with 8 fault inception angles in 3 faults zones, as shown in Figure 7. Fault zone 1 is chosen as the PCC considering its distance from the grid. This zone experiences large fault currents in case of fault from the grid while operating in a GC mode. Nodes 680 and 602 were chosen as fault zone 2 and fault zone 3, respectively, as they are connected to the DERs. The fault resistances are varied from 1 ohm to 0.001 ohm, thus giving us a total of 1848 fault cases. The simulations were performed using MATLAB/Simulink 2019a. The 3-phase voltage and current signals were measured at a sampling rate of 10 kHz at nodes 602, 631, and 680. The sample voltages for GC and SA modes of operation of the MG network under various faults are shown in Figure 8.Table 2
Parameters for data generation.
ParametersConfigurationValueSimulated faultsA−G, B−G, C−G, A−B−G, A−C−G, B−C−G, A−B, A−C, B−C, A−B−C, and A−B−C−G11Location of faultZone 1, Zone 2, and Zone 33Inception angles0°, 60°, 90°, 135°, 180°, 225°, 270°, and 315°8Fault resistance1, 0.5, 0.1, 0.05, 0.01, 0.005, and 0.001 ohms7Operating modeGrid: connected/standalone2Figure 8
Different fault types in grid-connected and standalone modes. (a) Line-to-ground fault (GC mode), (b) line-to-line fault (GC mode), (c) line-to-line to ground (GC mode), (d) line-to-ground fault (SA mode), (e) line-to-line fault (SA mode), and (f) line-to-line to line-to-ground fault (SA mode).
(a)(b)(c)(d)(e)(f)To replicate the noise present in power lines in the real world, the AIGN along with the AWGN is added to the simulated signals. The AIGN noise was added by creating a vector of impulses of random amplitudes with random interarrival time. The noise vector was then passed through a bandpass filter to obtain the impulse response. The resultant noise vector was then added to the measured voltage signals.


### 4.3. Signal Preprocessing

Besides the abovementioned steps to denoise the signals, in order to train the CNNs, the signal sequences must be converted into images for the CNNs to process. This is achieved by using the wavelet-based signal analyzer available in MATLAB. The functions in the tool display any data in an array as an image using the full range of the colormap. For a 3-column array, the colormap defines color from the standard RGB triplets in which each element of the row will have a different color intensity or pixel value. Hence, for an input arrayC of size m,n, the resulting output image will be of the same size. The sample scalogram for voltages for GC and SA modes of operation of the MG network under LG and LL faults is shown in Figure 9.Figure 9
Scalogram of measured line voltages for grid-connected and standalone modes. (a) Grid-connected system LG fault (Va,Vb,Vc), (b) standalone system LG fault (Va,Vb,Vc), (c) grid-connected system LL fault (Va,Vb,Vc), and (d) standalone system LL fault (Va,Vb,Vc).
(a)(b)(c)(d)


### 4.4. Fault Classification

In the fault classification process, the processed fault data, as shown in Figure9, are labelled for their corresponding faults and trained with the classification algorithm. Initially, the data are randomized and split into training data, validation data, and testing data. Seventy percent of the randomly selected data are used for training and the rest is equally divided between validation and testing data. The input to the CNNs is the images of size 224 × 224 × 3 representing sequences of 3-phase voltages. As the number of layers increase, the feature extraction capability of the network improves, but the number of parameters required for training also increases. There is no theoretical framework to determine the right number of layers. Thus, a number of network layers must be evaluated. The architecture of the CNNs used in this study is depicted in Figure 10.Figure 10
Architecture of the convolutional neural network for fault classification approach.The first layer is the image input layer that accepts the input images and holds the value for each pixel of the input image. This is followed by a convolutional layer which hasF number of filters that traverse through the input vertically and horizontally with stride S. To control the size of the output volume, the borders are padded with zeros P. The output O of the convolutional layer is given as(6)O=int1−F+2PS+1.This process is followed up by the ReLU layer and the max pooling layer. To lower the chance of overfitting, the pooling layer downsamples the input data. This is further followed by two more sets of convolutions and a ReLU layers and a second max pooling layer along with a dropout layer. Finally, the fully connected layer is used with 11 neurons for each type of output class, along with a softmax layer and a classification layer. The loss function of this network structure is defined by the multiclass cross entropy. The information related to various layers used in the CNNs architecture is given in Table3, and the parameters for the CNN are shown in Table 4.Table 3
Layer data in the CNNs’ architecture.
Layer nameFilter sizeStride (width and height)Padding (top, bottom, left, and right)Output sizeConv. 17×7×642,23,3,3,3112×112×64Max Pool 13×3×642,20,1,0,156×56×64Conv. 21×1×641,10,0,0,056×56×64Conv. 33×3×1921,10,0,0,056×56×64Max Pool 23×3×1922,20,1,0,128×28×192FC Layer———1×1×11Table 4
Parameters of CNN for fault classifier development.
ParameterValueNumber of layers13Initial learn rate0.001OptimizerAdaptive moment estimation: AdamValidation frequency10Max epochs50Mini batch size15The main operation performed by the convolutional layer is the convolution between the filters and the input matrix. The size of the filter greatly affects the performance of the convolutional layer. If the size of the filter is too small, the CNNs model may be susceptible to information loss, or if the size of the filter is too big, the computational cost increases rapidly.


## 4.1. Microgrid Implementation

For the purpose of this research, a MG that is a modified version of the IEEE 13 bus feeder [40] is designed and implemented. Figure 7 shows the one-line diagram of the feeder. It is an unbalanced system that models many of the typical characteristics of a standard distribution network [41].Figure 7
Schematic of the IEEE-13 bus microgrid.To implement the proposed fault classification approach with the various types of DGs in the MG, the network in Figure7 is modified to include by adding two photovoltaic (PV) systems at nodes 680 and 602. Besides, at node 675, an energy storage system (ESS unit for DG (DG-ESS) is associated in the network. To model the coupling point, a three-phase voltage source is utilized in a star configuration with ground connection. Furthermore, the variable is to model the point of common coupling (PCC) in the network. The variable loads are connected at the same nodes as the PV-DGs. The ESS is developed as a system level model that can be used for hybrid-phasor electro-magnetic transient studies. This is set to current control mode when the MG is GC and voltage control mode in the SA operation. The MG has several types of loads such as constant impedance, constant current, and constant power in star or delta configuration. In addition to the spot loads, a distributed load is present between nodes 632 and 671. The parameters of the DG-BESS are provided in Table 1. The storage system is operated in current control mode or voltage control mode depending on whether the MG is in GC mode or in SA mode, respectively. The parameters of the GC PV array and the transformer are also provided in Table 1. The complete IEEE-13 bus feeder as implemented in MATLAB/Simulink is shown in Figure 7.Table 1
System configuration and parameters.
SystemParametersValueDG-ESS modelNominal voltage4610kVNominal frequency50HzRated power500kWOverall system efficiency96%Recharge rate50%Initial SOC80%Mode of operationVoltage control/current controlPower500kWGrid-connected PV arrayNominal voltage4610kVNominal frequency50HzPower500kWTransformerPower rating (kVA)500kVAVoltage: high (kV)4.16kVVoltage: low (kV)0.48kVResistance (%)1.1Impedance (%)2


## 4.2. Data Generation

As the control system of a MG is responsible for the safe operation of the system in both the GC as well as the SA mode. The microgrid may be controlled from a central controller or may have the control system imbedded as autonomous parts in each DER. In the islanded mode, the control system needs to maintain a constant voltage and frequency while injecting and absorbing the real and reactive power difference between the generation and loads. Here, frequency control may prove to be challenging due to the unavailability of rotating masses that are usually present in larger system and are essential for their stability. On the contrary, MGs are vastly dependent on power electronic devices whose control systems must be adapted to provide the frequency response and voltage regulation which was previously obtained from directly connected rotating masses. Without proper voltage regulation, MGs are prone to experience oscillations in voltage and power. Hence, the fault classification approach is analyzed in both GC and SA modes. Before the classifier can be used to classify faults, their learning parameters need to be trained as explained in the previous chapter. To obtain the data for developing the proposed approach, eleven fault types are simulated under various conditions. These conditions include the location, resistance, and inception angle for the faults. Furthermore, the three-phase voltage and the three-phase line currents are measured from the simulation models.From Table2, there are 11 types of faults with 8 fault inception angles in 3 faults zones, as shown in Figure 7. Fault zone 1 is chosen as the PCC considering its distance from the grid. This zone experiences large fault currents in case of fault from the grid while operating in a GC mode. Nodes 680 and 602 were chosen as fault zone 2 and fault zone 3, respectively, as they are connected to the DERs. The fault resistances are varied from 1 ohm to 0.001 ohm, thus giving us a total of 1848 fault cases. The simulations were performed using MATLAB/Simulink 2019a. The 3-phase voltage and current signals were measured at a sampling rate of 10 kHz at nodes 602, 631, and 680. The sample voltages for GC and SA modes of operation of the MG network under various faults are shown in Figure 8.Table 2
Parameters for data generation.
ParametersConfigurationValueSimulated faultsA−G, B−G, C−G, A−B−G, A−C−G, B−C−G, A−B, A−C, B−C, A−B−C, and A−B−C−G11Location of faultZone 1, Zone 2, and Zone 33Inception angles0°, 60°, 90°, 135°, 180°, 225°, 270°, and 315°8Fault resistance1, 0.5, 0.1, 0.05, 0.01, 0.005, and 0.001 ohms7Operating modeGrid: connected/standalone2Figure 8
Different fault types in grid-connected and standalone modes. (a) Line-to-ground fault (GC mode), (b) line-to-line fault (GC mode), (c) line-to-line to ground (GC mode), (d) line-to-ground fault (SA mode), (e) line-to-line fault (SA mode), and (f) line-to-line to line-to-ground fault (SA mode).
(a)(b)(c)(d)(e)(f)To replicate the noise present in power lines in the real world, the AIGN along with the AWGN is added to the simulated signals. The AIGN noise was added by creating a vector of impulses of random amplitudes with random interarrival time. The noise vector was then passed through a bandpass filter to obtain the impulse response. The resultant noise vector was then added to the measured voltage signals.


## 4.3. Signal Preprocessing

Besides the abovementioned steps to denoise the signals, in order to train the CNNs, the signal sequences must be converted into images for the CNNs to process. This is achieved by using the wavelet-based signal analyzer available in MATLAB. The functions in the tool display any data in an array as an image using the full range of the colormap. For a 3-column array, the colormap defines color from the standard RGB triplets in which each element of the row will have a different color intensity or pixel value. Hence, for an input arrayC of size m,n, the resulting output image will be of the same size. The sample scalogram for voltages for GC and SA modes of operation of the MG network under LG and LL faults is shown in Figure 9.Figure 9
Scalogram of measured line voltages for grid-connected and standalone modes. (a) Grid-connected system LG fault (Va,Vb,Vc), (b) standalone system LG fault (Va,Vb,Vc), (c) grid-connected system LL fault (Va,Vb,Vc), and (d) standalone system LL fault (Va,Vb,Vc).
(a)(b)(c)(d)


## 4.4. Fault Classification

In the fault classification process, the processed fault data, as shown in Figure9, are labelled for their corresponding faults and trained with the classification algorithm. Initially, the data are randomized and split into training data, validation data, and testing data. Seventy percent of the randomly selected data are used for training and the rest is equally divided between validation and testing data. The input to the CNNs is the images of size 224 × 224 × 3 representing sequences of 3-phase voltages. As the number of layers increase, the feature extraction capability of the network improves, but the number of parameters required for training also increases. There is no theoretical framework to determine the right number of layers. Thus, a number of network layers must be evaluated. The architecture of the CNNs used in this study is depicted in Figure 10.Figure 10
Architecture of the convolutional neural network for fault classification approach.The first layer is the image input layer that accepts the input images and holds the value for each pixel of the input image. This is followed by a convolutional layer which hasF number of filters that traverse through the input vertically and horizontally with stride S. To control the size of the output volume, the borders are padded with zeros P. The output O of the convolutional layer is given as(6)O=int1−F+2PS+1.This process is followed up by the ReLU layer and the max pooling layer. To lower the chance of overfitting, the pooling layer downsamples the input data. This is further followed by two more sets of convolutions and a ReLU layers and a second max pooling layer along with a dropout layer. Finally, the fully connected layer is used with 11 neurons for each type of output class, along with a softmax layer and a classification layer. The loss function of this network structure is defined by the multiclass cross entropy. The information related to various layers used in the CNNs architecture is given in Table3, and the parameters for the CNN are shown in Table 4.Table 3
Layer data in the CNNs’ architecture.
Layer nameFilter sizeStride (width and height)Padding (top, bottom, left, and right)Output sizeConv. 17×7×642,23,3,3,3112×112×64Max Pool 13×3×642,20,1,0,156×56×64Conv. 21×1×641,10,0,0,056×56×64Conv. 33×3×1921,10,0,0,056×56×64Max Pool 23×3×1922,20,1,0,128×28×192FC Layer———1×1×11Table 4
Parameters of CNN for fault classifier development.
ParameterValueNumber of layers13Initial learn rate0.001OptimizerAdaptive moment estimation: AdamValidation frequency10Max epochs50Mini batch size15The main operation performed by the convolutional layer is the convolution between the filters and the input matrix. The size of the filter greatly affects the performance of the convolutional layer. If the size of the filter is too small, the CNNs model may be susceptible to information loss, or if the size of the filter is too big, the computational cost increases rapidly.


## 5. Results and Discussion

This section discusses the various parameters used to evaluate the performance of the model. For multiclass classification problems, a confusion matrix is used to evaluate, quantify, and visualize the accuracy of the classifier on the test data for which the true values are known. The classification accuracy is defined and estimated as(7)Accuracy=TP+TNTP+TN+FP+FN,where TP is the true positive samples, TN is the true negative samples, FP is false positive samples, and FN is the false negative samples. In addition to the confusion matrix, the performance indices such as recall, precision, and F1-score are also estimated as mentioned below:(8)Recall=TPTP+FN,Precision=TPTP+FP,F1−score=2∗Recall∗PrecisionRecall+Precision.The CNNs’ models are tested on data generated when the MG is in the SA mode and the GC mode. In order to avoid the problem of overfitting, the data are randomized before partitioning into training, validation, and testing data. The confusion matrix for training the data generated at 30 dB noise is shown in Figure11, and the classification results using CNNs for the MG in SA mode for different noise levels are shown in Table 5.Figure 11
Classifier training results for fault classification in standalone mode. (a) Truly and falsely classified samples, (b) classification error, (c) true positive and false negative rate, and (d) positive prediction value and false detection ration.
(a)(b)(c)(d)Table 5
Performance indices for standalone mode fault classification.
Standalone modeNoise level20dB30dB40dBFault typePrecisionRecallF1-scorePrecisionRecallF1-scorePrecisionRecallF1-scoreAG96.60100.0098.27100.00100.00100.00100.00100.00100.00BG100.00100.00100.00100.00100.00100.00100.00100.00100.00CG100.00100.00100.00100.00100.00100.00100.00100.00100.00ABG100.00100.00100.00100.00100.00100.00100.00100.00100.00ACG85.7081.8083.7093.5090.6092.0396.70100.0094.31BCG100.00100.00100.00100.00100.00100.00100.00100.00100.00AB100.00100.00100.00100.00100.00100.00100.00100.00100.00AC100.0096.0097.96100.00100.00100.00100.00100.00100.00BC100.00100.00100.00100.00100.00100.00100.0095.80100.00ABC100.00100.00100.00100.00100.00100.00100.00100.00100.00ABCG88.2090.9089.5390.0093.1091.5296.7093.5094.04The confusion matrix for correctly and incorrectly identified samples is shown in Figure11(a). The samples on the matrix’s diagonal are correctly categorized, whereas the samples above and below are incorrectly classified. Four thousand nine hundred and fifty four samples are correctly identified for all converter operational condition, whereas 46 samples are incorrectly classified from a total of 5000 samples. Additionally, Figure 11(b) shows the least classification error throughout the training and testing of the trained classifier, which is used to determine estimated and observed error levels. All the hyperparameters that have been attempted so far, as well as this present iteration, are taken into account in the optimization procedure. Furthermore, in Figure 11(c), we can see the true positive and false negative rates of the classifier training procedure. Using the true positive and false negative rates, it is possible to determine the proportion of samples that are correctly identified as belonging to a true class and the percentage of samples that are incorrectly classified as belonging to another class. Figure 11(d) depicts the classifier training process positive predictive values and false discovery rate. These figures represent the proportion of samples that are correctly categorized for a given true class and the percentage of samples that are incorrectly classified for a given true class.Similar to the SA mode, the confusion matrix for training the data generated at 40 dB noise is shown in Figure12, and the classification results using CNNs for the MG in GC mode for different noise levels are shown in Table 6.Figure 12
Classifier training results for fault classification in grid-connected mode. (a) Truly and falsely classified samples, (b) classification error, (c) true positive and false negative rate, and (d) positive prediction value and false detection ration.
(a)(b)(c)(d)Table 6
Performance indices for grid-connected mode fault classification.
Grid-connected modeNoise level20dB30dB40dBFault typePrecisionRecallF1-scorePrecisionRecallF1-scorePrecisionRecallF1-scoreAG100.00100.00100.00100.00100.00100.00100.00100.00100.00BG100.00100.00100.00100.00100.00100.00100.00100.00100.00CG100.00100.00100.00100.00100.00100.00100.00100.00100.00ABG66.7035.7046.5134.6181.8148.6496.2083.3064.61ACG53.8084.0065.5955.5090.9068.9283.9096.3075.68BCG100.00100.00100.00100.00100.00100.00100.00100.00100.00AB96.2096.2096.20100.00100.00100.00100.00100.00100.00AC100.00100.00100.00100.00100.00100.00100.00100.00100.00BC100.00100.00100.0096.00100.0097.96100.00100.0098.97ABC100.00100.00100.00100.00100.00100.00100.00100.00100.00ABCG100.00100.00100.00100.00100.00100.00%100.00100.00100.00The confusion matrix for correctly and incorrectly identified samples is shown in Figure12(a). The samples on the matrix’s diagonal are correctly categorized, whereas the samples above and below are incorrectly classified. Four thousand eight hundred and eighty six samples are correctly identified for all converter operational condition, whereas 114 samples are incorrectly classified from a total of 5000 samples. Additionally, Figure 12(b) shows the least classification error throughout the training and testing of the trained classifier, which is used to determine estimated and observed error levels. All the hyperparameters that have been attempted so far, as well as this present iteration, are taken into account in the optimization procedure. Furthermore, in Figure 12(c), we can see the true positive and false negative rates of the classifier training procedure. Using the true positive and false negative rates, it is possible to determine the proportion of samples that are correctly identified as belonging to a true class and the percentage of samples that are incorrectly classified as belonging to another class. Figure 12(d) depicts the classifier training process positive predictive values and false discovery rate. These figures represent the proportion of samples that are correctly categorized for a given true class and the percentage of samples that are incorrectly classified for a given true class.The classification accuracies identified from the results for SA and GC modes of operation of the MG network during the training process are 99.1% and 97.7%, respectively. These models took an average of 15.8 secs to train and 0.4 secs to classify a fault, as presented in Table7. The validation and test accuracies for the CNNs in SA mode and GC mode are shown in Table 8. Furthermore, the validation accuracy and testing accuracy of the developed approach are compared with the techniques developed in the literature and conventional learning approaches, as shown in Table 9. This comparison is carried out considering the data with 30dB added noise in order to represent the real-time behavior of the system.Table 7
Average training and testing time for fault classifier development.
ProcessPreprocessing with DWTImage generationModel trainingFault classificationAverage Time1.3sec2.1sec15.8sec0.4secTable 8
Comparison of accuracies at various stages of classifier development.
Noise level20dB30dB40dBValidation accuracy (%)Testing accuracy (%)Validation accuracy (%)Testing accuracy (%)Validation accuracy (%)Testing accuracy (%)Standalone mode99.6799.599.4599.2799.299.63Grid-connected mode95.8197.297.1897.1295.1097.7Table 9
Comparison of accuracies for the developed model with literature and conventional approaches.
ReferencesApproachValidation accuracy (%)Testing accuracy (%)Detection time[10]Decision tree90.4090.01Not availablek-nearest neighbor95.6395.44Support vector machine93.3092.85Naive Bayes94.2494.06[11]Decision treeNot available974.5secsOver current relay56Differential relay96Random forest99[13]Cosine radial basis function network (RBFN)10094.110.4secsGaussian Euclidian RBFN10058.85Manual fusion RBFN10094.16Dynamic fusion RBFN10097.05Conventional approaches (SA mode)Support vector machine83.2781.150.7secsk-nearest neighbor87.4379.111.1secsDecision trees61.2658.422.3secsConventional approaches (SA mode)Support vector machine91.7191.270.7secsk-nearest neighbor94.2694.111.1secsDecision trees63.1859.912.3secsProposed approach (SA mode)Convolutional neural networks99.4599.270.4secsProposed approach (GC mode)Convolutional neural networks97.1897.120.4secsThus, based on the results presented above, it can be seen that both the networks were able to identify all the faulted phases accurately for all types of faults but struggled to identify the involvement of the ground when it came to distinguishing between LLL and LLLG faults. However, this issue may be overcome in future work by carefully identifying and extracting features that may help identify the involvement of ground in a three-phase fault. The CNN was able to provide a more accurate classification in considerably faster time as compared to the other conventional approaches available in the literature and required half the data to process.


## 6. Conclusion and Future Work

The study developed a fault classification mechanism for MG networks operating in both GC and SA modes. The algorithm adapts the signal analyzing properties of wavelet transform and classification aspects of the convolution neural networks to identify different electrical faults in the network. Initially, an IEEE 13 bus system operating with distributed generation units and storage unit is used to create the data. Efforts were made to replicate the real-world data with the simulated data by injecting AWGN and AIGN to measured outputs. These noisy signals were processed using discrete wavelet transforms, and the corresponding outputs are converted into scalograms to provide image inputs to the CNNs. Furthermore, the CNNs models were trained with data corresponding to both SA and GC modes, along with various noise levels. The performance of the CNNs is assessed with various performance indices such as recall, precision, F1-score, and accuracy. The average classification accuracies considering all the conditions are identified to be 98.9% for SA fault classification and 97.1% for GC fault classification. To protect the MG against electrical faults, a realistic data-based method may be developed, according to the findings of the study. A lot of research studies can be conducted to make the proposed approach much more robust and practical in the future. As faults are often accompanied by arcing, the effect of the nonlinear fault resistance can be studied on the performance of the model. Furthermore, the method can be extended to detect and classify “evolving faults,” i.e., faults that begin in one phase and spread to other phases subsequently. In this, only a single fault on the system at any given time are assumed; however, further research can be done to study the impact of multiple faults in different parts of the MG on the proposed methods. Finally, data-based approaches are limited by the data that they are trained on and may fail to perform in cases where the fault conditions do not match the training data; thus, a way to handle such cases must be found to make the proposed scheme truly practical.



---

*Source: 8431450-2022-04-28.xml*