## 1 Introduction
Furthermore, a graph convolutional network was used to improve fault diagnosis performance in [28]. For the islanded microgrid system, a convolutional neural network (CNN)-based protection model was designed to detect possible unsymmetrical and symmetrical faults in an inverter photovoltaic grid [29]. Various signal processing algorithms have also been used to increase the prediction accuracy of ML-based fault detection models. For instance, wavelet transform (WT) was used with decision tree (DT) [30] and support vector machine (SVM) [31] to detect faults in power grid signals. Moreover, statistical distribution and Kullback-Leibler divergence of power grid signals were used in [32] to detect anomalies in the signals. Furthermore, using real-world recorded power grid signals from the Grid Event Signature Library repository [33], a spectral correlation function-based feature extraction method was developed in [34] to extract the characteristic behavior of faults in power grid signals. However, it has not yet been combined and tested with any ML algorithm to improve detection accuracy in a real-world environment. Various conventional feature extraction methods [i.e., fast Fourier transform (FFT), amplitude and phase (AP), autocorrelation function (ACF), power spectral density (PSD), and WT] were investigated in combination with ML algorithms in [35; 36]; however, the training dataset was simulated based on a 46 kV substation and tested with real data from the same substation. However, these developed ML-based fault detection models have yet to be tested under real-world conditions because they are generally trained and tested on datasets created based on the same power grid system models or parameters. Thus, the literature still demands more generalized ML-based fault detection algorithms for practical system models. This article proposes a cascaded fault type detection model comprising three main components: anomaly area detection, ML-based fault presence detection, and ML-based fault type detection. The first part uses an envelope-based detector to identify the anomaly region as created in a previous study [37]. However, we enhance this concept by adapting a new filter design to account for the noisier nature of power grid signals collected from meters compared with simulated signals. The second part functions like a switch that determines whether ML-based fault type detection should proceed. It applies the model to detect the presence of a fault in the examined signal by considering four classes (i.e., normal, motor, switching, and fault). If a \"fault\" is detected in the signal, the second part of the proposed model activates the third part of the system to identify the fault type, including single-line-to-ground (SLG), line-to-line (LL), double line-to-ground (LLG), and three line-to-ground (3 LG). Moreover, in this study, various feature extraction methods (i.e., raw data, AP, ACF, FFT, PSD, and WT) are investigated to achieve maximum prediction accuracy in the ML models of the proposed cascaded system. Additionally, different ML algorithms [SVM, DT, random forest classifier (RFC), and CNN] are evaluated for these ML-based models. To test the proposed method, the electrical distribution grid testbed is emulated in a software environment using different sample rate intelligent electronic devices (IEDs) (i.e., relays and meters) located near and far from the IB-PV array farm. As mentioned earlier, the ML-based fault detection models in the literature are typically trained and tested on datasets created using the same substation configuration or power grid system model. However, these trained models are not well suited for practical cases. Therefore, the dataset for training the proposed system model is generated by a simulation model based on a 46 kV substation, which is not considered in the emulated testbed environment used as a validation set in this study.