Skip to Content
You are currently on the new version of our website. Access the old version .
AlgorithmsAlgorithms
  • Article
  • Open Access

11 April 2026

21 Pages

Robust Deep Learning for Multiclass Power System Fault Diagnosis Using Edge Deployment

,
,
,
and
1
Department of Electrical & Electronics Engineering, Gandhi Institute of Engineering & Technology University, Gunupur 765022, Odisha, India
2
Department of Electrical Engineering, Veer Surendra Sai University Technology, Burla 768018, Odisha, India
3
School of Electrical Sciences, Odisha University of Technology and Research, Bhubaneswar 751029, Odisha, India
4
Department of Computer Science and Engineering, Gandhi Institute of Technology and Management, Visakhapatnam 530045, Andhra Pradesh, India

Abstract

This article introduces an intelligent framework using deep learning to recognize and classify different faults through the real-time detection of multiple faults in power distribution systems. A collection of data representing normal operating conditions, alongside various fault scenarios including line-to-ground (LG), line-to-line (LL), double line-to-ground (LLG), and three-phase line (LLL) faults, was created using three phase current signals obtained from the Real-Time Digital Simulator (RTDS) microgrid test system. To properly model the system dynamics, a feature extraction method that integrates phase currents, differential currents, summation currents and magnitude results was developed. The temporal features of the fault signals were identified by using a sliding window approach to fit the data. A one-dimensional convolutional neural network (CNN) was developed to identify different types of faults. This model performed well, obtaining nearly 96.15% accuracy while testing. In order to evaluate the feasibility of the approach, the trained model was loaded on Raspberry Pi 5, NodeMCU, ESP32 and existing sensing devices. The fault classification performed in real-time was time-sensitive. The proposed intelligent framework is applicable to low-scale operation for smart grid fault monitoring and protection and it is an economically viable solution.

1. Introduction

Accurate fault detection and classification will play a vital role in ensuring the safety, stability, and continuity of power distribution systems in the modern context, so these characteristics are crucial for reliability. Modern renewable sources of energy, distributed generation and smart grid technologies have made it more complicated than previous relay-style protections to maintain adequate operation in today’s ever-changing environmental conditions. In addition, traditional methods cannot detect faults accurately due to the nonlinearity of signal behavior and extremely fast transient disturbances, leading to an overall lower detection rate than traditional methods provide. AI, or artificial intelligence, methods together with data-driven methods have been considered as alternatives and as tools capable of improving robustness and automating fault detection and classification in power system protection systems [1,2]. However, generating highly accurate intelligent models that maintain their performance in real time on resource-limited embedded platforms is still a challenge.
In recent years, intelligent fault diagnosis has received increasing attention with the developments of machine learning and deep learning techniques. Hybrid models of convolutional neural networks (CNNs) have been widely reported to achieve superior results in automatic feature extraction and fault classification for transmission and distribution systems [3,4,5]. Several researchers have also reported the feasibility of deploying deep learning models on edge devices including Raspberry Pi for real-time IoT-based applications [6,7,8]. According to reports, a CNN-LSTM hybrid model yields superior performance in the classification of faults based on time dependencies for distributed systems [9,10,11]. Notably, multiple review papers have also been published, elucidating the potential of deep learning techniques in the intelligent fault diagnosis of industrial and power system faults [12,13,14]. For practical applications, data-driven CNN-based intelligent fault diagnosis frameworks have been reported to have excellent performance [15,16].
New studies [17,18,19] have focused on embedding AI in microgrid architectures and platforms, aiming to achieve the continuous and real-time monitoring of faults. This indicates the feasibility of the integration of AI-equipped models into resource-limited systems, which would also alleviate the reliance on cloud services. Recently, AI-based protection schemes have been proposed to improve the effectiveness of adaptive control schemes, ensure system robustness, and facilitate intelligent decision processes in smart grid systems [20,21,22]. For example, sensor technologies and edge inference mechanisms have enhanced the ability of embedded systems to collect and process data in real time [23,24]. Edge-based architectures, which do computation closer to the data source, minimize communication latency, enabling fault identification in a short time. In addition, intelligent fault detection systems and AI-assisted smart grid monitoring systems have received ample attention for their automation of diagnostics and predictive maintenance aspects [25,26,27]. These developments are augmented with innovation in IoT-enabled smart grid systems and distributed edge computing frameworks, enabling localized data processing and scalable deployment in modern power networks [28,29]. Moreover, in emerging research, previous studies have discussed pathways of technology integration and AI-based operational enhancement methods for enabling next-generation smart grids [30,31,32].
Recent improvements in deep learning-based fault detection have significantly improved classification accuracy in power systems. However, there are still numerous limitations in current studies. Current research typically relies heavily on simulation to test feasibility and prove implementation simplicity for actual real-time edge/embedded devices, limiting their practical applicability. Current approaches also tend to focus on a small number of fault types and are rarely tested against multi-class fault scenarios while operating dynamically. Finally, many models depend significantly on raw signal inputs without contributing any domain-specific electrical features, leading to interpretation issues and thus a lower model performance. Due to the temporal characteristics of transient fault signals, which are traditionally not fully utilized in power system fault detection, model performance may suffer if implemented in real time. A better and more scalable fault detection system can overcome issues such as temporal complexity and time scale issues that only a strong framework or robust tools for fault detection can address [3,4,5,9,10,11].
To overcome these issues, a deep learning-based framework is presented that leverages domain-specific knowledge to make system modeling easy. The proposed framework uses multi-dimensional feature extraction with phase current, differential current, summation current and the resultant magnitude to describe the features of the system and define a temporal window model to capture the characteristics for the transient error signals instead of just using the magnitude to calculate the signal. A lightweight one-dimensional (1D) CNN architecture is described that learns from time series data in real time, and the trained model is used on many other edge devices (Raspberry Pi 5, NodeMCU, ESP32 in that case) to observe faults in real time. Thus, the overall framework will be distinguished by its end-to-end integration from simulation to real-time hardware deployment [3,4,5,6,7,8].
In recent years, various deep learning-driven systems such as CNN and hybrid systems like CNN-LSTM have been deployed as fault classification approaches in power operations. While their associated high level of accuracy is achieved in the data processing environment, they are expensive and are mostly programmed with raw signal data, not a deep learning model in context, and hence do not offer a robustness in power systems. Also, real-world problems with constrained edge devices are not addressed properly in real time. To overcome these limitations, domain-related feature extraction techniques are proposed which are combined with temporal window-based modeling to solve the issue of power system accuracy in the real world [3,4,5,9,10,11].
The main contributions of the research are
  • Developing a deep learning-based multi-class fault classification framework using a 1D CNN to identify normal, line-to-ground (LG), line-to-line (LL), double line-to-ground (LLG), and three-phase line (LLL) fault conditions.
  • Designing a domain-informed feature extraction method that integrates phase currents, differential currents, summation current, and magnitude to enhance fault.
  • Employing a temporal window-based modeling approach to capture transient fault characteristics and improve classification performance.
  • Deploying the trained CNN model on resource-constrained edge devices (Raspberry Pi 5 and NodeMCU ESP32) for real-time fault detection.
  • Comprehensive evaluation of the proposed framework using multiple performance metrics and comparison of existing methods to show its effectiveness.
  • Bridging the gap between simulation-based deep learning models and real-time implementation of multi-fault classification in smart grid environments.
A significant connection and research gap between the simulation detection of faults and the practical application of fault detection on edge-based devices in a smart grid scenario has been established through the proposed framework.
This research article is organized as follows. Section 2 provides a review of previous research done on intelligent fault detection systems with a focus on edge-based systems. In Section 3, the mathematical modeling and creation of features will be described. In Section 4, the methodology is presented with the architecture used for the CNN and how to implement it. In Section 5, there will be a discussion on hardware implementation. Section 6 includes a description of the results obtained and how well they worked. Section 7 provides the conclusion and future research directions, etc.

2. Literature Review

The reliability and secure performance of contemporary power transmission and distribution systems have been the subject of a number of research studies, especially regarding the detection and classification of intelligent faults. Traditional protection schemes are based on impedance calculation, overcurrent relays, and distance protection schemes, but these schemes can suffer from a lack of dynamic operating requirements; they have also had a tendency towards under-utilization in highly penetrated regions where distributed generation is abundant in smart grids. Based on the increasingly complex features of modern power systems, there is a crucial requirement to introduce data-driven intelligent schemes for fault diagnosis. The recent evolution of fault detection, with machine learning (ML) schemes in the present scheme, aims to enhance the performance of the fault detection process by performing an efficient analysis of electrical parameters, such as voltage and current signals. At first, ML schemes improve classification performance compared with current schemes [1,2]. To ensure reliable fault detection in transmission systems, better ML schemes have been suggested for achieving effective fault detection and reliability [3]. Transformer-based and hybrid deep learning architectures have been developed for better performance robustness in classification tasks with dynamic operation [4]. For the detection of fault events and power quality in hybrid power systems, such CNN-based schemes have been proposed for their efficiency of fault classification and power quality improvement.
Recent research has concentrated on using deep models in embedded platforms. Ensemble learning and neural networks have been previously demonstrated to work well on platforms like the Raspberry Pi which are utilized in real-time applications [5,6]. To supplement real-time monitoring performance on embedded systems, Internet of Things (IoT)-based deep learning models have been applied [7,8]. CNN and LSTM are among the deep learning architectures applied in hybrid architectures to improve deep learning models in distributed generation networks [9]. IoT-based monitoring frameworks are used for transmission line fault detection [10]. In addition, detailed investigations have been performed on real and synthetic datasets, which show that the models of deep learning have a better performance than traditional methods among multi-class fault classification [11]. As a generalization method, deep learning-based fault diagnosis has been explored in much depth in studies, including models able to extract features automatically and their better generalization performance [12,13,14,15]. Data-driven models of convolutional neural networks have become common for removing the required preprocessing steps [16] and streamlining the classification process. The recently expanded deployment pipelines of edge AI have also exploited efficient modeling transformation [17]. Raspberry Pi has been expanded for different intelligent monitoring systems. Furthermore, neural network-based methods were proposed for fault detection in the AC microgrid system [18,19].
Meanwhile, in the field of smart grid stability, control and protection [20,21,22], artificial intelligence is identified as one of its key enablers. Intelligent sensing and monitoring systems relying on advanced current measurement techniques have also been suggested for real-time data acquisition processes. Resource-aware inference systems have been proposed to accelerate the deployment of AI models on embedded devices [23,24]. In simulated environments, the classification accuracy of deep learning-based intelligent fault detection systems is very high [25]. So-called edge intelligence paradigms have emerged as promising tools for smart grid monitoring and decision-making processes [26]. Experimental test systems and Real-Time Digital Simulators [27] have also been used to test the implementation efficiency of the protection strategies under real-life operational scenarios. The coupling of edge computing and IoT infrastructures may lead to latency and response time reduction in the smart grid context [28,29]. In the context of the increase in renewable energy sources, the development of a smart grid using technology should be adaptive and flexible with respect to protection strategies, and the AI-based relay protection strategies for the smart grid are well suited in this regard [30]. Moreover, intelligent algorithms play an important role in the development of renewable energy-based power system security [31,32].
Some recent edge intelligences have been developed for resource-aware and distributed learning frameworks. CoCFL proposes a collaborative federated learning mechanism for edge-oriented learning, while Hybrid Zone proposes a hybrid edge–cloud architecture for managing computational load and latency. These new approaches offer very simple and highly scalable intelligence in edge networks. The work in this article considers a single edge with real-time fault detection approach to avoid any communication burden and provide fast and reliable decision-making [33,34].
To fill these gaps, the proposed study presents a convolutional neural network-based multi-fault classification framework that is integrated with edge-enabled deployment. The proposed framework is designed to leverage the strengths of automated feature extraction, window-based signal segmentation, and real-time inference on embedded hardware. Table 1, presented below, provides an overview of recent studies regarding fault identification and detection in power systems. While numerous machine learning and deep learning models demonstrate high levels of accuracy, the majority of these investigations have taken place in simulated environments rather than in real-time edge computing applications.
Table 1. Summary of existing studies on fault detection in power systems.
Many researchers have shown high accuracy when using CNNs or hybrid models to classify faults; however, most of these systems are validated only through simulations or do not support deployment in real time. There are some examples of using edge implementations for fault detection; many of these are limited either by the number of caused faults or through using simplified datasets. The proposed framework is different because it incorporates all four (three phase current signals, composite current, differential current, and resultant current magnitude discussed in Section 3) of the necessary components to provide an integrated solution for multi-fault classification (notably, domain informed feature extraction and temporal modeling). As a consequence, this integration will provide more practical applications for the fault detection library, while also increasing its robustness.

3. Mathematical Modeling

To identify the faults in the power distribution systems accurately, it is essential to analyze the behavior of the electrical signals in both normal and abnormal situations. Mathematical modeling helps to model the three-phase electrical signals in a systematic way and identify the significant features that can be used to classify various faults. In this paper, a mathematical model is proposed using the three phase current signals to enable intelligent multi-fault classification.

3.1. Three-Phase Signal Representation

Let the three instantaneous phase current signals of the power system be represented as: Ia1(t), Ib1(t), and Ic1(t), where Ia1, Ib1, and Ic1 represent the phase currents of phases A, B, and C. When balanced, these currents are symmetrical. Under fault conditions, significant amplitude and phase variations occur, enabling fault identification.

3.2. Composite Current Feature Extraction

To analyze the system behavior during faults, a composite current summation function is introduced as follows:
I S U M = I a 1 + I b 1 + I c 1
The sum current describes the balance of the three phase systems. When at work, the system is normalized, and it is found that the algebraic sum of the three phase currents does not change due to symmetry in operation. But in cases of a fault, particularly the ground faults, the balance is disturbed so that the sum current remains non-zero. This is one such feature which helps to detect system imbalance, and if some other problems are encountered the significance of that difference can be observed.

3.3. Differential Current Modeling

The errors in power systems can cause asymmetry in the phase currents. To describe these changes, the differential current components are calculated as follows:
I d i f 1 = I a 1 − I b 1
I d i f 2 = I b 1 − I c 1
I d i f 3 = I c 1 − I a 1
The differential current components detect how much the phase currents differ from one another, and their sensitivity relates to the amount of electrical asymmetry in the phases. Under normal operation, these differences remain relatively small. However, in fault conditions (for example: LL or LLG faults), there will be a large difference in the amount of phase imbalance displayed within the differential current components of the fault type. Due to the above characteristics, the differential current components are useful in differentiating the type of fault based on the amount of phase imbalance.

3.4. Resultant Current Magnitude

The total current magnitude of the system is calculated using the equation
I m g t = I a 1 2 + I b 1 2 + I c 1 2
The total current magnitude is a measure of the total level of electrical current in the electrical system. Under fault conditions, there will be a noticeable increase in the amount of electrical current at the point of the fault, particularly for LLL faults. The current magnitude is therefore useful for determining the severity of the fault and determining whether the fault is a light or heavy fault.

3.5. Feature Vector Formulation

The extracted features are then combined to create a comprehensive feature vector as follows:
F =   [ I a 1 ,   I b 1 ,   I c 1 ,   I S U M , I d i f 1 ,   I d i f 2 ,   I d i f 3 ,     I m g t ]
The feature vector contains both instantaneous and relational information about the electrical system and is used as deep learning model input for classification.
The proposed feature extraction technique is unique, since it combines both physical parameters and relationships for current features. The differential and summation currents increase the sensitivity to system imbalance and phase asymmetry, which are important indicators of the fault as well as a product of this process to assess its strength for different types of faults. Therefore, it is expected that the improved recognition of different kinds of faults can be further established through the inclusion of temporal window-based modeling. The ability to detect these dynamic responses in electrical signals and not static features gives us a better learning model in general. Thus, the approach improves the classification performance, especially for closely related fault conditions, i.e., normal and different faults as well.

3.6. Temporal Window-Based Modeling

To model the dynamic behavior of fault signals, the feature vector is divided into fixed-size time windows. The time window is defined as a sequence of samples that describe the system behavior over a short period of time. The time window can be expressed as
W = F 1 , F 2 , F 3 ,   … . , F n
where n is the size of the window and F 1 , F 2 , F 3 ,   … . , F n are the feature values at different time samples. The temporal window-based model allows for the extraction of temporal information related to different fault modes. This helps to improve the learning capacity of the deep learning model.
The projected mathematical modeling approach is an effective way to model the characteristics of electrical signals under different operating conditions. The proposed approach, which integrates composite, differential, and magnitude-based features with temporal windows, offers a strong basis for intelligent multi-fault classification and detection in a smart grid environment.

4. Proposed Method

This section outlines the suggested intelligent framework for identifying and classifying multiple faults in power distribution networks. The proposed method includes data collection, feature extraction, window modeling, deep learning classification, and real-time deployment. The aim is to create a dependable and efficient system capable of accurately identifying different fault scenarios with minimal response times.

4.1. Data Acquisition

Figure 1 shows the microgrid system used in this work [19]. It is a hybrid AC microgrid system with a supply line rated at 13.2 kV and a connection to a utility grid rated at 138 kV via a 1200 MVA step-down transformer with 8% impedance. Additionally, the microgrid system simulates weak grid conditions with a short-circuit ratio (SCR) of 0.1, which improves fault response and makes classification more complicated.
Figure 1. Single-line diagram of simulated microgrid.
The data collected in this research work are obtained from the microgrid test system developed using the Real-Time Digital Simulator (RTDS, V5), as depicted in Figure 2. The test system is designed to work in various modes, including normal and faulty modes, of a three-phase power distribution network. The test system is capable of working in various modes, which helps in simulating the system behavior and acquiring electrical signals.
Figure 2. RTDS-based microgrid test system.
The three phase current signals were continuously observed in the normal operating mode, as well as in various fault modes such as single LG, LL, LLG, and LLL faults. The RTDS simulation environment allows for the realistic simulation of power system dynamics and high-resolution electrical signal measurements for analysis.
Figure 3 below illustrates the three normalized phase current waveforms under normal operating conditions. The currents in the three phases are balanced and sinusoidal with equal amplitudes and a 120° phase shift. The balanced characteristic is an indication of the healthy operation of the system and is used as a reference for fault detection. Any variation from the balanced waveform is an indication of a fault in the power system. The normalized waveforms of the three phase currents in the normal operating mode were first observed to create a reference baseline for system performance. In the faulty operating modes, the changes in current magnitude and phase unbalance were measured and observed for data collection. For the purpose of establishing a comprehensive dataset for multi-class fault classification, the collected current signals were systematically arranged and labeled based on their respective operating modes. The preprocessing and normalization of the collected data were then applied to make sure that the data already had consistent and stable characteristics before training our deep learning model. This dataset will serve as the backbone for future analysis in our proposed intelligent fault detection system.
Figure 3. Three normalized phase current waveforms under normal operating condition.

4.2. Feature Extraction

To retrieve relevant features of system behavior under the conditions of faults, useful features are provided from the acquired three phase current signals. In addition to the individual phase current values, other features, namely current summation, phase current differences, and total current magnitude, are estimated. These features help characterize variations in current patterns for specific fault scenarios. The acquired features become input for the deep learning model to comprehensively model the system dynamics. Feature normalization is used to preserve feature consistency in training.
The proposed method uses derived electrical features instead of raw current features to classify similar fault conditions, thus providing a complete picture of system behavior and consequently improving classification accuracy.

4.3. Window-Based Modeling

The electrical fault in the power system is time-varying and has transient characteristics during abnormal operating conditions. In the proposed approach, the feature vectors extracted from the three phase current signals are segmented into overlapping windows of equal size. A window is a set of consecutive samples that indicate the system’s operating conditions for a short period of time. This approach helps the model to capture variations in the current magnitude, phase unbalance, and transient characteristics that occur during faulty operating conditions. The deep learning model distinguishes normal from problematic conditions by analyzing time-varying properties.
The feature vector at time t will be represented as Ft. A window that contains all features from Ft to Ft + N is represented mathematically as
w = F t , F t + 1 , F t + 2 ,   . . . , F t + N
N indicates the number of samples in each window. In this research, a fixed window size is chosen to represent the signal characteristics.
The temporal window-based approach enables us to map the signal-changing transient variations that are relevant for fault classification. This leads to a superiority over methods that use instantaneous signal values.

4.4. Dataset and Training Configuration

The dataset used in this research comprised a collection of five separate classes that represent the following different operating conditions of the power distribution system: normal, LG, LL, LLG, and LLL fault types. The data were produced through the use of an RTDS under diverse operating conditions to provide a wide range of different fault characteristics for each separate class, which are labeled according to their system behavior so that they can be used for multi-class classification purposes easily. As a preprocessing step before training, the input data were normalized so as to provide consistent scales across all features and improve convergence rates when training models. Temporal data were segmented using a temporal windowing technique that segmented the time series signals into fixed length sequences, allowing the models to capture transient fault behavior properly.
Training and validation sets were created from this dataset in 80:20 proportions, respectively. The 1D CNN with an Adam optimizer and a learning rate of 0.001 was used to train the proposed model with a batch size of 32 for 100 epochs. The categorical cross-entropy loss function was used to model the multi-class problem. To increase the generalizability of the proposed model and improve its training stability, dropout regularization and batch normalization were included in the network. Hyperparameters were chosen through empirical trial and error to provide a balance between classification performance and computation speed.

4.5. CNN Architecture

A one-dimensional CNN architecture is designed to accomplish the multi-class fault classification task using the obtained feature sequences. The CNN architecture is designed to learn the discriminative features from the time series electrical signals and classify the faults accordingly. The input to the CNN architecture is the windowed feature sequence obtained from the three phase current signals.

4.5.1. Input Layer

The CNN architecture receives an input in the form of a feature window represented as
X ∈   R N × E
Here, N denotes the size of the window and E represents the number of extracted features, which consist of phase currents, differential currents, and magnitude features.

4.5.2. Convolution Operation

The convolution layer is used to extract local features from the input feature sequence. The convolution layer output is calculated using the following equation:
Y i = σ ∑ k = 1 m w k x i + k − 1 + b
where x = input feature sequence, w k = convolution kernel weights, σ is the activation function (ReLU), and b signifies the bias term.

4.5.3. Proposed CNN Structure

The proposed 1D CNN model is shown in Figure 4, which detects faults in the power system by analyzing the features of the windowed sequence obtained from the three phase current signals. Each input sample contains a fixed-size window with eight extracted features.
Figure 4. Proposed CNN architecture for multi-fault classification.
To achieve a balance between classification accuracy and computational efficiency for real-time fault classification, the proposed 1D CNN architecture employs a progressively hierarchical number of convolutional layers that successively extract features from the input signal. Shallow convolutional layers are designed to extract low-level temporal changes from the signal, while deep convolutional layers focus on learning more complicated fault characteristics. The filter sizes utilized in this architecture (160 and 320) allow the model to progressively learn richer feature representations while still providing a manageable level of computational complexity. A kernel size of 3 was chosen to extract local temporal relationships in the time-domain signal because it provides a basis for identifying transient characteristics of faults. The ReLU activation function was chosen because it is efficient to compute and minimize problems with vanishing gradients during training. Max-pooling is used to reduce the dimensionality of features and decrease the computational cost, while batch normalization is applied to stabilize training and improve convergence. The application of dropout will help avoid overfitting and improve generalization. Overall, the architecture was developed to be as lightweight as possible so that it can run efficiently on resource-limited edge devices (e.g., Raspberry Pi) for real-time fault detection.

4.5.4. Training Process

For evaluating models’ performance, the dataset is separated into training and testing portions. The CNN is trained on the labeled feature windows utilizing the Adam optimizer, which functions with a specified learning rate and applies a categorial cross-entropy loss function to minimize classification errors. Training is done over multiple epochs with an appropriate batch size for stable learning. The trained model identifies distinctive patterns for each fault type, enabling accurate classification.
The model was developed using a cross-entropy loss function, expressed as
L = − ∑ i = 1 C Y i . log Y ^ i
In this equation, Y i is the true label, Y ^ i represents the predicted probability, and C refers to total number of classes. During the training phase, accuracy and loss curves for both the training and validation datasets were systematically evaluated.

4.5.5. Real-Time Deployment

In order to prove the applicability of the trained model, it is deployed on an edge-enabled embedded system for real-time fault detection.
The electric signals that are being received are processed instantly as they are received, and the trained CNN will come to a conclusion about the type of fault that has occurred almost instantly as it starts processing this information. The faults that have been identified can either be presented on a monitoring screen or can be used for the purpose of protecting the electric grid from any future occurrences of faults. The use of edge computing enables faster decision-making compared to the use of cloud computing. Thus, the proposed method offers an efficient and scalable solution for the intelligent monitoring and protection of modern electric power distribution systems.
The real-time deployment architecture of the proposed system is presented in Figure 5. The power load is linked to the current sensing module, which continuously monitors the current signal. The sensed signal is sent to the NodeMCU ESP32 for preprocessing and then to the Raspberry Pi 5. The Raspberry Pi 5 analyses the real-time fault classification based on the trained deep learning model. The fault detection outcome is shown using the display system, which includes the LCD module and the monitoring screen. The regulated power supply is utilized to supply constant power to the Raspberry Pi and ESP32 for continuous real-time analysis. In Section 6.6, we discuss the computational performance of our proposed solution and prove the viability of applying this approach in situations where real-time edge learning is an appropriate requirement.
Figure 5. Real-time deployment architecture of the proposed fault detection system using NodeMCU ESP32 and Raspberry Pi.

5. Hardware Implementation

The experimental setup for the proposed real-time fault detection system is shown in Figure 6. The prototype developed incorporates the sensing, processing, and display units for intelligent fault detection in a power distribution system, utilizing an embedded edge computing platform.
Figure 6. Experimental hardware setup of the proposed model.
The system includes a power load modeled by a bulb, a current sensing module, a NodeMCU ESP32 controller, a Raspberry Pi 5, an LCD display module, and a regulated power supply. The power load is connected to the power supply via the current sensing module, which continuously monitors the load current during normal and faulty operations. The current sensor produces analog signals proportional to the load current and delivers them to the data acquisition module.
The NodeMCU ESP32 is an intermediate data acquisition and communication system. It acquires the current data, carries out initial processing, and then sends the data to the Raspberry Pi 5 using a serial communication system. This will ensure a continuous flowing of real-time electrical data to the processing system. The Raspberry Pi 5 is the main edge computing device in the proposed design. It will execute the trained convolutional neural network model to classify the current data into different types of faults. All the data will be processed locally using Raspberry Pi for fault detection without cloud computing.
A 16 × 2 LCD display module is connected to the Raspberry Pi in order to display real-time electrical values such as voltage, current, and status of the detection. The display module lets us monitor system status in real time and makes fault detection easy. A power supply unit is used to supply a stable voltage to the Raspberry Pi, ESP32 controller, and sensing modules for continuous operation. The hardware prototype developed proves the possibility of implementing an intelligent fault detection system with the use of low-cost embedded technology. The combination of sensing, processing, and display modules facilitates real-time monitoring and correct fault identification in a real-world power distribution setup.

6. Results and Discussion

This section provides an evaluation of the proposed deep learning-based defect detection system. The analysis includes both real-time hardware and simulated environments, and the corresponding results are presented.

6.1. Performance Evaluation of Suggested Model

The proposed CNN model was trained using the sequence of features extracted from the three phase current signals for both normal and different fault scenarios. The model was trained with a total of five classes, namely normal, LG, LL, LLG, and LLL faults. The trained model performed with a classification accuracy of about 96% on the test data.
Following the results of the training and validation accuracy graph shown in Figure 7, the proposed CNN model demonstrates stable learning behavior in a steady state, stable convergence, and minimal overfitting. The suggested CNN model manages to sustain a high level of accuracy across all epochs.
Figure 7. Accuracy curves for the proposed CNN model and its training and validation performance.
Table 2 shows that, in most fault scenarios, the proposed model achieves high precision and recall, with a perfect classification performance for LL, LLG, and LLL fault scenarios, as indicated by an F1-score of 1.00. In contrast, the performance for normal and LG scenarios is marginally lower, which may be attributed to similarities in current characteristics.
Table 2. Performance of the proposed CNN model for different fault conditions.

6.2. Analysis of the Robustness

To evaluate the robustness of the proposed model under practical operating conditions, a number of experiments were carried out by adding noise and signal variation to the input data. Gaussian noise was added with different variance (0, 0.15) to simulate problems during the measurement. Our results show that the model can achieve stable accuracy at 94.12% for all noise levels, with strong resistance to this noise.
Experiments were also carried out using various signal-to-noise ratio (SNR) levels in order to evaluate performance under realistic noisy environments. As illustrated in Table 3, for moderate levels of noise, the model had an F1-score of 92.8% with an associated false positive rate of 1.5%. In extreme levels of noise (5 dB), the model maintained an F1-score of 89.1%, demonstrating its ability to generalize under challenging scenarios. Gaussian- and SNR-based noise are different conditions for evaluation. For Gaussian-based noise (variance-based), the model is able to reliably observe the noisy world (94.12%), but SNR-based noise provides a better-quality picture for more realistic noisy environments (F1-score: 92.8% to 89.1%). This result clearly indicates that the model is efficient under both scenarios.
Table 3. Performance of the proposed CNN model under different noise levels.
Additionally, the input signals were scaled out to simulate the current strength, while the fault resistance levels varied to a different value. The model achieved an accuracy of about 94.12%, showing robustness to the changing fault resistance. Also, shifted input signals were used to test how well the model was able to learn temporal features. The model was able to achieve an accuracy of 96.08% (i.e., learning temporal characteristics). Thus, these results show that the proposed framework is strong and reliable in noisy and dynamic conditions.

6.3. Confusion Matrix Analysis

A confusion matrix is employed to assess the classification accuracy of the proposed CNN model for the five operating conditions: normal, LG, LL, LLG, and LLL faults. Figure 8 shows the confusion matrix derived from the testing dataset.
Figure 8. Confusion matrix for the multi-fault classification using the suggested CNN model.
Upon further inspection of the confusion matrix, it can be seen that there are only a couple of misclassified instances between the classification of normal and LG. Specifically, one instance of normal gets classified as LG, and one instance of LG gets classified as normal. This slight degree of overlap exists between the two classifications. The reason for this is due to the fact that, under low fault current or at early stages of a fault, there is not a significant difference in the current waveform characteristics of the normal and LG classes. The differences between them when they deviate from normal operation are not large enough that the features extracted from them, such as summation currents and differential currents, have much different behavior, resulting in misclassification.
The model performed very well for the other types of faults (LL, LLG, LLL), with a 100% accuracy for those fault classifications. The results show that the proposed model works extremely well, with only minor misclassifications occurring for closely related operating conditions. One thing that should be considered for future iterations of this model is to provide more discriminative features or to use adaptive thresholding to reduce misclassifications.

6.4. Waveform Analysis

The waveforms of normal and fault currents have been discussed in Section 4.1. In this section, the features of the waveforms are analyzed to understand their effect on the proposed feature extraction and classification system.
From Figure 3, it can be seen that the normal operating state is represented by three balanced sinusoidal phase currents with equal amplitude and a 120° phase difference. The waveform is steady without any distortion, which indicates that the system is in a healthy state.
On the other hand, Figure 9 illustrates the current waveform during the fault state. It can be seen that there is a marked increase in the amplitude and phase unbalance of the current waveform during the fault duration. The unique features for fault detection are the unbalanced and distorted waveform of a fault. The features that can be extracted from the differences in amplitude, symmetry, and phase difference are differential current, summation current, and resultant magnitude. The unique features that can be captured by the CNN model can also be used to classify normal or faulty conditions.
Figure 9. Current waveform of LG fault.

6.5. Real-Time Hardware Results

The experimental setup demonstrated the real-time performance of the fault detection system. The trained CNN model on the Raspberry Pi 5 continuously collected current data from the ESP32 module and categorized it in real time. The LCD display output for the normal operating condition is shown in Figure 10a, where the voltage and current readings are shown, along with the system status as normal. For the fault conditions, the system correctly identified the faulty behavior and showed the corresponding fault message on the LCD display, as shown in Figure 10b.
Figure 10. Real-time hardware experimental results: (a) LCD display during normal condition; (b) LCD display during fault condition.
The terminal output in Raspberry Pi, as shown in Figure 11, clearly indicates real-time data acquisition and processing of the current signals. The system continuously collected sensor data and employed a trained convolutional neural network (CNN) model for inference. It demonstrated the accurate, real-time detection and categorization of errors with minimal latency, thereby confirming the viability and reliability of this deep learning-based fault detection approach for power system monitoring.
Figure 11. Raspberry Pi terminal output showing real-time data acquisition.

6.6. Computational Performance Analysis

To evaluate the performance of the proposed framework, a computational performance analysis was conducted with the Raspberry Pi 5 platform for edge deployment. The trained CNN model has been converted into TensorFlow Lite format so it can be efficiently run on resource-constrained devices.
The model takes roughly 0.1036 s to process each batch of samples, which produces an average inference time of about 3.97 ms per sample. For this reason, the latency of the proposed system demonstrates the ability to provide real-time fault detection and classification for use in smart grid applications. Approximately 2.37 million parameters characterize the proposed 1D CNN architecture, thus providing a good balance between classification accuracy and computational complexity. The overall architecture consists of 1D convolutional layers with a compact design that decreases the computational overhead while providing an efficient level of accuracy.
The size of the TensorFlow Lite model of the 1D CNN architecture is approximately 9.07 MB. Therefore, the architecture will have a lightweight memory footprint and can be implemented on embedded and edge devices. Efficient implementation will also facilitate working in resource-limited environments. The proposed framework provides an optimal trade-off between computational efficiency, accuracy, and real-time performance.

6.7. Comparison to Other Techniques

The following Table 4 compares the proposed approach to existing methods. It can be observed from the below table that most of the fault detection methods have been conducted through simulation. On the other hand, the proposed solution is based on combining deep learning with real-time edge computing using a Raspberry Pi 5. The appropriately high classification accuracy and ability to provide data in real time makes this an effective method for monitoring smart grids.
Table 4. Comparison of proposed model with existing fault detect techniques.
In spite of it being validated for both the RTDS-based microgrid system and real-world hardware implementation, the results can be generalized through publicly available benchmark datasets. This will be a priority for future work on the standard power system datasets in order to improve their generalizability. Moreover, hybrid-designed deep learning models such as CNN-LSTM and transformer-based models are useful for analyzing data. However, these models face more computational burden; the lightweight CNN model is suited for real-time edge deployment and can be used to negotiate between accuracy and computational efficiency.

7. Conclusions

Today’s advanced electric distribution or utility systems require an intelligent and effective approach to fault detection within their networks to guarantee reliable and safe functioning of the power system. The current established protection methods struggle to accurately identify multiple faults quickly and under real-time conditions. A multi-fault detection model using deep learning has been designed and developed using three phase current measurements of an RTDS microgrid. A comprehensive feature extraction method has been used, applying phase current, differential current, the sum of all three phase currents, and the total phase current magnitude. Window modeling was employed to extract temporal information from fault currents. A one-dimensional CNN model was designed and trained for five-class fault identification. The trained model was implemented on a Raspberry Pi 5 setup with ESP32 and current sensing modules for real-time edge implementation.
A comparative analysis indicates that most existing methods in the literature rely on simulation-based validation and lack hardware implementation. For instance, CNN, CNN–Transformer, and other techniques have reported accuracies of 93–96%; however, real-time implementation remains a significant challenge. In contrast, the proposed approach achieves comparable accuracy through edge-based implementation, thereby bridging the gap between simulation and real-time performance. In addition, hardware verification further increases the overall practical applicability of the approach. The experimental results indicate that LL, LLG, and LLL defects are all perfectly classified, with an overall classification accuracy of 96.15%. Although there may be small categorization errors between the normal and LG class due to the similarities in waveforms, the real-time confirmation by hardware proves the effective defect detection under those conditions with minimal processing delay. Therefore, these findings indicate that the proposed intelligent system offers a scalable and cost-effective approach to smart grid fault monitoring and protection.
The proposed work addresses fundamental limitations of the existing fault detection-based deep learning methods involving feature engineering, temporal modeling, and real-time edge implementation. Future work will involve the analysis of distributed and hybrid edge learning architectures (e.g., CoCFL and Hybrid Zone) in the model, with the idea to effectively scale the network and its performance and ability on a global level. In addition to using openly accessible datasets, future work will also evaluate against various architectures, including CNN-LSTM networks and transformer models, to help support further validation of the proposed solution.

Author Contributions

R.S.: Conceptualization, methodology design, software implementation, formal analysis, visualization, validation of experimental results and original draft preparation. P.K.P.: Supervision, technical review, data curation and manuscript editing. D.K.L.: Model validation, analysis, interpretation of results and manuscript review. R.P.: Investigation, RTDS-based experimental setup support and performance evaluation. C.M.: Administration, resource management, fund acquisition support and final approval of the manuscript. All authors have read and agreed to the published version of the manuscript.

Funding

This research did not receive any external funding.

Data Availability Statement

The data can be obtained from the corresponding authors upon request. The data are not publicly available due to privacy and system security restrictions.

Acknowledgments

The authors would like to thank the Department of EEE, GIET University, Gunupur, for providing infrastructure and technical support for this research work.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

References

  1. Pour Shafei, A.; Silva, J.F.A.; Monteiro, J. Convolutional neural network approach for fault detection and characterization in medium voltage distribution networks. e-Prime Adv. Electr. Eng. Electron. Energy 2024, 10, 100820. [Google Scholar] [CrossRef] [Scilit]
  2. França, I.A.; Vieira, C.W.; Ramos, D.C.; Sathler, L.H.; Carrano, E.G. A machine learning-based approach for comprehensive fault diagnosis in transmission lines. Comput. Electr. Eng. 2022, 101, 108107. [Google Scholar] [CrossRef] [Scilit]
  3. Wang, H.; Yang, Q.; Zhang, B.; Gao, D. Deep learning-based insulator fault detection algorithm for power transmission lines. J. Real-Time Image Process. 2024, 21, 115. [Google Scholar] [CrossRef] [Scilit]
  4. Thomas, J.B.; Chaudhari, S.G.; Shihabudheen, K.V.; Verma, N.K. CNN-based transformer model for fault detection in power system networks. IEEE Trans. Instrum. Meas. 2023, 72, 1–10. [Google Scholar] [CrossRef] [Scilit]
  5. Quawi, A.; Shuaib, Y.M.; Manikandan, M. CNN based fault event classification and power quality enhancement in hybrid power system. Int. J. Power Electron. Drive Syst. 2024, 15, 1851–1870. [Google Scholar] [CrossRef] [Scilit]
  6. Musthafa, M.B.; Huda, S.; Nguyen, T.T.; Kodera, Y.; Nogami, Y. Optimized ensemble deep learning for real-time intrusion detection on resource-constrained raspberry pi devices. IEEE Access 2025, 13, 113544–113556. [Google Scholar] [CrossRef] [Scilit]
  7. Mohammad, A.S.; Jarullah, T.G.; Al-Kaltakchi, M.T.S.; Al-Ani, J.A.; Dey, S. Iot-mfacenet: Internet-of-things-based face recognition using mobilenetv2 and facenet deep-learning implementations on a raspberry pi-400. J. Low Power Electron. Appl. 2024, 14, 46. [Google Scholar] [CrossRef] [Scilit]
  8. Hichri, A.; Saadaoui, W.; Hajji, M.; Mansouri, M.; Nounou, M.; Bouzrara, K. Implementation of Genetic Algorithm Optimization based Artificial Neural Network on Raspberry Pi for Fault Diagnosis. In Proceedings of the 2024 10th International Conference on Control, Decision and Information Technologies (CoDIT), Vallette, Malta, 1–4 July 2024; IEEE: New York, NY, USA, 2024. [Google Scholar] [CrossRef] [Scilit]
  9. Alhanaf, A.S.; Farsadi, M.; Balik, H.H. Fault detection and classification in ring power system with DG penetration using hybrid CNN-LSTM. IEEE Access 2024, 12, 59953–59975. [Google Scholar] [CrossRef] [Scilit]
  10. Behera, S.K.; Yuvaraj, K.; Sudharsankumar, P.; Sanjay, N. Electrical & Electronics Engineering, Sri Sai Ram Engineering College, Chennai, Tamil Nadu, India Fault detection in transmission line by using IoT. In Proceedings of the 2024 International Conference on Power, Energy, Control and Transmission Systems (ICPECTS), Chennai, India, 8–9 October 2024; IEEE: New York, NY, USA, 2024. [Google Scholar] [CrossRef] [Scilit]
  11. Turanlı, O.; Yakut, Y.B. Classification of faults in power system transmission lines using deep learning methods with real, synthetic, and public datasets. Appl. Sci. 2024, 14, 9590. [Google Scholar] [CrossRef] [Scilit]
  12. Hoang, D.-T.; Kang, H.-J. A survey on deep learning-based bearing fault diagnosis. Neurocomputing 2019, 335, 327–335. [Google Scholar] [CrossRef] [Scilit]
  13. Said, N.; Mansouri, M.; Al Hmouz, R.; Khedher, A. Deep learning techniques for fault diagnosis in interconnected systems: A comprehensive review and future directions. Appl. Sci. 2025, 15, 6263. [Google Scholar] [CrossRef] [Scilit]
  14. Kouraichi, M.; Mansouri, M.; Trabelsi, M.; M’hAlla, A.; Abdel-Khalik, A.S.; Sakly, A.; Mhalla, A. Deep learning for fault diagnosis in power transmission lines: Current trends, limitations, and future directions. IEEE Access 2025, 13, 192105–192142. [Google Scholar] [CrossRef] [Scilit]
  15. Daang, J.A.M.; Omas-As, A.M.; Arboleda, E.R. Advancements in fault detection techniques for transmission lines: A literature review. Preprints 2024. [Google Scholar] [CrossRef] [Scilit]
  16. Wen, L.; Li, X.; Gao, L.; Zhang, Y. A new convolutional neural network-based data-driven fault diagnosis method. IEEE Trans. Ind. Electron. 2017, 65, 5990–5998. [Google Scholar] [CrossRef] [Scilit]
  17. Din, S.U.; Hussain, M.A.; Ikram, M.; Ignatov, D.; Timofte, R. Ai on the edge: An automated pipeline for pytorch-to-android deployment and benchmarking. Preprints 2025. [Google Scholar] [CrossRef]
  18. Joice, A.; Tufaique, T.; Tazeen, H.; Igathinathane, C.; Zhang, Z.; Whippo, C.; Hendrickson, J.; Archer, D. Applications of Raspberry Pi for precision agriculture—A systematic review. Agriculture 2025, 15, 227. [Google Scholar] [CrossRef] [Scilit]
  19. Pradhan, R.; Mishra, S.; Mahapatra, A.; Chhotaray, A. Advanced fault detection and classification via fully connected neural network using multilayer perceptron in AC microgrid. Sādhanā 2025, 50, 146. [Google Scholar] [CrossRef] [Scilit]
  20. Alhamrouni, I.; Kahar, N.H.A.; Salem, M.; Swadi, M.; Zahroui, Y.; Kadhim, D.J.; Mohamed, F.A.; Nazari, M.A. A comprehensive review on the role of artificial intelligence in power system stability, control, and protection: Insights and future directions. Appl. Sci. 2024, 14, 6214. [Google Scholar] [CrossRef] [Scilit]
  21. Aminifar, F.; Abedini, M.; Amraee, T.; Jafarian, P.; Samimi, M.H.; Shahidehpour, M. A review of power system protection and asset management with machine learning techniques. Energy Syst. 2022, 13, 855–892. [Google Scholar] [CrossRef] [Scilit]
  22. Bakkar, M.; Bogarra, S.; Córcoles, F.; Aboelhassan, A.; Wang, S.; Iglesias, J. Artificial intelligence-based protection for smart grids. Energies 2022, 15, 4933. [Google Scholar] [CrossRef] [Scilit]
  23. Wibowo, A.; Jayendra, I.G.B.; Utari, D.Y.; Rasyiid, M.; Aprilianto, R.A. Design of ACS712-based current sensing monitoring evaluation for PWM solar charge controller. Sainteknol J. Sains Dan Teknol. 2024, 22, 80–91. [Google Scholar] [CrossRef] [Scilit]
  24. Wang, Y.; Zhao, J. A unified and resource-aware framework for adaptive inference acceleration on edge and embedded platforms. Electronics 2025, 14, 2188. [Google Scholar] [CrossRef] [Scilit]
  25. Liu, C.; Ding, L.; Yu, H. Intelligent Fault Detection in Power Grids Using Deep Learning Algorithms. IEEE Access 2025, 13, 162713–162730. [Google Scholar] [CrossRef] [Scilit]
  26. Beng, G.H.; Wang, T.; Tang, Y. Edge intelligence for smart grid: A survey on application potentials. CSEE J. Power Energy Syst. 2023, 9, 1623–1640. [Google Scholar] [CrossRef] [Scilit]
  27. Wei, X.; Zhou, G.; Cong, W.; Lv, J.; Zhang, S.; Li, J. Teaching experimental design of flexible DC system protection based on RTDS. Exp. Technol. Manag. 2024, 41, 178–185. [Google Scholar] [CrossRef]
  28. Mehmood, M.Y.; Oad, A.; Abrar, M.; Munir, H.M.; Hasan, S.F.; Muqeet, H.A.U.; Golilarz, N.A. Edge computing for IoT-enabled smart grid. Secur. Commun. Netw. 2025, 2021, 5524025. [Google Scholar] [CrossRef] [Scilit]
  29. Minh, Q.N.; Nguyen, V.-H.; Quy, V.K.; Ngoc, L.A.; Chehri, A.; Jeon, G. Edge computing for IoT-enabled smart grid: The future of energy. Energies 2022, 15, 6140. [Google Scholar] [CrossRef] [Scilit]
  30. Wei, T.; Li, H.; Miao, J. Integration and development path of smart grid technology: Technology-driven, policy framework and application challenges. Processes 2025, 13, 2428. [Google Scholar] [CrossRef] [Scilit]
  31. Xiao, W.; Ren, X. Artificial intelligence algorithms enhancing relay protection and operational efficiency in high and low voltage distribution networks. Intell. Decis. Technol. 2025, 19, 3072–3087. [Google Scholar] [CrossRef] [Scilit]
  32. Zhuang, Y. Analysis of the role of artificial intelligence in enhancing the network security protection of renewable energy systems. Int. J. High-Speed Electron. Syst. 2025, 2540271. [Google Scholar] [CrossRef] [Scilit]
  33. Liu, X.; Li, C.; Shi, Y.; Hu, D.; Li, K. CoCFL: A Lightweight Blockchain-Based Federated Learning Framework for Large-Scale IoT Cluster. IEEE/ACM Trans. Netw. 2025, 34, 1851–1864. [Google Scholar] [CrossRef] [Scilit]
  34. Li, M.; Wang, W. Hybrid Zone: Bridging Acoustic and Wi-Fi for Enhanced Gesture Recognition. In Proceedings of the IEEE INFOCOM 2024-IEEE Conference on Computer Communications, Vancouver, BC, Canada, 20–23 May 2024; pp. 981–990. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.