Next Article in Journal
Predicting Changes in and Future Distributions of Plant Habitats of Climate-Sensitive Biological Indicator Species in South Korea
Next Article in Special Issue
Navigating the Path of Least Resistance to Sustainable, Widespread Adoption of Nuclear Power
Previous Article in Journal
The Socioeconomic Dimensions of Water Scarcity in Urban and Rural Mexico: A Comprehensive Assessment of Sustainable Development
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Fault Detection and Diagnosis of a Photovoltaic System Based on Deep Learning Using the Combination of a Convolutional Neural Network (CNN) and Bidirectional Gated Recurrent Unit (Bi-GRU)

1
Laboratory of Electrical Engineering (LGE), Electronic Department, University of M’sila, P.O. Box 166 Ichebilia, M’sila 28000, Algeria
2
Laboratory of Signal and System Analysis (LASS), Electronic Department, University of M’sila, P.O. Box 1667 Ichebilia, M’sila 28000, Algeria
3
Czech Technical University in Prague, University Centre for Energy Efficient Buildings, 1024 Třinecká St., 27343 Buštěhrad, Czech Republic
4
Laboratory of Electrical Engineering (LGE), Electrical Engineering Department, University of M’sila, P.O. Box 166 Ichebilia, M’sila 28000, Algeria
5
Department of Electronic Engineering, Universitat Politècnica de Catalunya (UPC), Mòdul C5 Campus Nord UPC, Jordi Girona 1-3, 08034 Barcelona, Spain
*
Authors to whom correspondence should be addressed.
Sustainability 2024, 16(3), 1012; https://doi.org/10.3390/su16031012
Submission received: 28 November 2023 / Revised: 16 January 2024 / Accepted: 23 January 2024 / Published: 24 January 2024

Abstract

:
The meticulous monitoring and diagnosis of faults in photovoltaic (PV) systems enhances their reliability and facilitates a smooth transition to sustainable energy. This paper introduces a novel application of deep learning for fault detection and diagnosis in PV systems, employing a three-step approach. Firstly, a robust PV model is developed and fine-tuned using a heuristic optimization approach. Secondly, a comprehensive database is constructed, incorporating PV model data alongside monitored module temperature and solar irradiance for both healthy and faulty operation conditions. Lastly, fault classification utilizes features extracted from a combination consisting of a Convolutional Neural Network (CNN) and Bidirectional Gated Recurrent Unit (Bi-GRU). The amalgamation of parallel and sequential processing enables the neural network to leverage the strengths of both convolutional and recurrent layers concurrently, facilitating effective fault detection and diagnosis. The results affirm the proposed technique’s efficacy in detecting and classifying various PV fault types, such as open circuits, short circuits, and partial shading. Furthermore, this work underscores the significance of dividing fault detection and diagnosis into two distinct steps rather than employing deep learning neural networks to determine fault types directly.

1. Introduction

1.1. Motivation

The global energy landscape is undergoing a significant transformation, placing a growing emphasis on renewable energy sources (RESs) to mitigate carbon emissions and address climate change. The World Energy Transitions Outlook 2023 by IRENA underscores the pressing need for bold, transformative measures to expedite the global energy transition. By 2030, the installed capacity of renewable power must expand nearly fourfold to propel the world toward this transition [1]. Within the field of RESs, solar photovoltaic (PV) energy plays a pivotal role in shaping a more sustainable future. As of early 2022, the global installed PV capacity surpassed the Terawatts threshold, constituting two thirds of the projected increase in global renewable capacity for 2023 [2]. Moreover, PV remains the most cost-effective option for new electricity generation in numerous countries, with anticipated reductions in generation costs by 2024 [3].
PV systems are susceptible to various types of faults, from temporary to permanent failures, and these faults can potentially have significant impacts on system performance and safety. Thus, the early detection of defects and their diagnoses are crucial for ensuring the long-term reliability and sustainable operation of the entire PV system. In the literature, diverse fault detection and diagnosis methods have been proposed, each varying in speed, complexity, sensor requirements, and the ability to identify types of faults.

1.2. Literature Review

In recent years, in contrast to standard model-based fault detection procedures [4,5,6], which involve simulating the PV installation’s performance and comparing the simulated output power with the monitored one, machine learning (ML) and deep learning (DL) techniques have gained popularity and are considered promising solutions for fault detection and diagnosis in PV systems. Numerous studies have evaluated the effectiveness of ML and DL approaches in fault detection and diagnosis in PV systems. For instance, Belaout et al. developed a multiclass adaptive Neurofuzzy technique for fault detection and diagnosis in PV systems [7]. This algorithm can detect partial shading conditions, increased series resistance, faulty bypass diodes, and PV module short circuit faults. However, this technique cannot detect short circuits or defective strings under varying weather conditions. Madeti and Singh introduced an algorithm based on k-nearest neighbors (KNN) for real-time fault detection in PV systems, demonstrating its capability to detect and classify open-circuit faults, line-to-line faults, and partial shading faults [8]. However, it is worth noting that the method, while computationally efficient, is not flawless in terms of accuracy. Chen et al. proposed an intelligent fault detection approach based on I-V characteristics, utilizing an emerging kernel-based extreme learning machine. This method exhibits high accuracy in detecting and classifying faults in PV arrays [9]. Bendary et al. proposed two adaptive neuro-fuzzy inference system (ANFIS)-based controllers to address cleaning, tracking, and faulty issues in PV systems [10]. This method relies on associating actual measured values of current and voltage with trained historical values for these parameters, accounting for ambient changes in conditions, including irradiation and temperature. Syafaruddin et al. suggested a simple and fast method based on several artificial neural networks (ANNs) capable of independently identifying the short-circuit location of PV modules in one string [11]. Garoudja et al. introduced a fault detection and diagnosis approach based on a Probabilistic Neural Network (PNN), which was tested using noisy and noiseless data [12]. Similarly, Vieira et al. proposed a fault detection method combining PNN with a Multilayer Perceptron algorithm. The process does not necessitate extensive datasets from pre-existing systems and primarily focuses on detecting short-circuited modules and disconnected strings [13]. While the results derived from the use of these machine learning approaches are promising, they also exhibit drawbacks, particularly with respect to extensive databases leading to overfitting. Furthermore, machine learning methods present limitations in representing features of complex high-dimensional data [14].
Deep learning (DL) has emerged as the next generation of machine learning, gaining considerable attention for its prowess in pattern recognition, data mining, and knowledge discovery. Its notable advantage lies in its capacity to learn high-level abstract features from substantial datasets, which is particularly beneficial for classification problems [15]. Liu et al. introduced a fault diagnosis method for a PV array utilizing stacked auto-encoder (SAE) and clustering. This approach mines inherent I-V characteristics, enabling automatic feature extraction and fault diagnosis [16]. Similarly, based on output I-V characteristic curves and input ambient condition data, a novel deep residual network (ResNet) based on an intelligent fault detection and diagnosis approach was proposed by Chen et al. [17]. Gao and Wai presented a fault identification method for PV arrays, employing a model that combines a Convolutional Neural Network (CNN) and residual gated recurrent unit (ResGRU) to observe differences in I-V curves under various fault conditions, achieving a classification accuracy of 98.61% [18]. Eldeghad et al. proposed a deep learning technique optimized via a particle swarm optimization (PSO) heuristic combination algorithm for fault diagnosis in PV systems. This algorithm exhibited good results in fault detection and is promising for enhancing system efficiency, reliability, and safety [19]. Appiah et al. leveraged long short-term memory (LSTM) to extract fault features, subsequently inputting them into the softmax regression classifier for fault detection and diagnosis [20]. Integrating DL with Infrared Thermography (IRT) for fault diagnosis in PV systems is another alternative, as presented in [21]. This study’s results show that the IRT-DL approach outperforms other IRT-ML methods in accuracy and classification. However, the utilization of IRT for fault detection in PV systems is confronted by enduring challenges. These challenges encompass constraints associated with surface defects, vulnerability to dynamic system conditions, heightened equipment expenses, and limitations in detecting specific fault types.

1.3. Contribution

This paper aims to contribute to advancing fault detection and diagnosis methods for PV systems, focusing on improving reliability, efficiency, and safety. This novel approach integrates a Convolutional Neural Network (CNN) and Bidirectional Gated Recurrent Unit (Bi-GRU) within a deep learning framework. This unique combination of parallel and sequential processing empowers the neural network to harness the strengths of both convolutional and recurrent layers simultaneously, facilitating effective fault detection and diagnosis. Unlike previous methods (existing in the literature and described above), which rely on I-V curves, the proposed approach utilizes dynamic PV system outputs at maximum power points (MPPs), which are more accessible to obtain for most PV systems, overcoming the challenges associated with accurate I-V curve measurements. The methodology uses an accurate PV model to create reliable databases representing PV system operation in healthy and faulty states. One year of monitored data from an actual PV installation in Czechia was used to calibrate the Sandia Array Performance Model (SAPM) PV model and validate the proposed fault detection and diagnosis procedure.
The remainder of this paper is organized as follows: Section 2 describes the chosen case study and the approach employed for PV modeling, followed by an in-depth explanation of the proposed fault detection methodology and the metrics utilized for its assessment. Section 3 presents the results acquired from PV modeling and the evaluation of the suggested fault detection procedure. Section 4 delivers a comparative analysis, contrasting the proposed method with existing approaches. The conclusions that can be derived from this work are summarized in Section 5.

2. Materials and Methods

2.1. Experimental Setup

The PV system used in this study comprises frameless Glass–Glass Cadmium Telluride (CdTe) thin-film PV panels installed on an experimental house in Buštěhrad, Czechia. The PV panels were seamlessly integrated into the east and west sides of the pitched roof, replacing the standard tiles (Figure 1). The total size of the PV system is equal to 3.84 kW. It is connected to four APsystems YC1000-3 three-phase microinverters. Each side of the roof contains 24 panels connected to two microinverters, and each microinverter has four channels connecting one string composed of three PV modules. The PV system’s outputs, namely current (Impp), voltage (Vmpp), and power (Pmpp) at the maximum power point, have been monitored for every channel in a five-minute timestep since October 2018. There are two Si-RS485TC-2T-MB irradiance sensors (for both east and west) with external temperature sensors glued to the back side of PV modules used for monitoring the solar irradiance (G) and module temperature (Tm) in a one-minute resolution. The proposed fault detection and diagnosis procedure was validated using one year of measured data from the east side of the roof. Table 1 and Table 2 summarize the characteristics of the selected PV generator and the PV panel data, respectively.

2.2. PV Modeling and Database Creation

Developing a high-quality database that precisely outlines the operation of a PV system is essential for effective fault detection and diagnosis. Therefore, it is imperative to have a dependable simulation model that accurately depicts the system’s behavior in both standard and faulty conditions. The Sandia Array Performance Model (SAPM), an empirical model from Sandia National Laboratories [22], was chosen in this work for its simplicity and reliability in precisely characterizing and simulating PV array performance. The model demonstrated notable accuracy during extensive validation across modules of diverse technologies, as emphasized in [23]. Estimations of the PV array outputs—current (Impp), voltage (Vmpp), and power (Pmpp) at the maximum power point (MPP)—are directly facilitated through the following equations:
I m p p = N p I m p C 0 E e + C 1 E e 2 1 + α I m p T m T m *
V m p p = N s V m p + C 2 N s c δ T m l n E e + C 3 N s c δ ( T m ) l n ( E e ) 2 + β V m p E e T m T m *
δ T m = n k T m + 273.15 / q
E e = G G *
P m p p = I m p p × V m p p
where Imp (A) and Vmp (V) represent the PV module current and voltage under Standard Test Conditions (STCs). The coefficients C0 and C1, dimensionless and empirically determined, relate Imp to the effective irradiance. The normalized temperature coefficient for Imp is denoted as αImp (°C−1), while C2 (dimensionless) and C3 (V−1) are empirical coefficients linking Vmp to the effective irradiance (Ee). Additionally, Nsc is the number of cells in a PV module, δ(Tm) represents the thermal voltage per cell at temperature Tm, q denotes the elementary charge (1.60218 × 10−19 coulomb), n is the ideality factor, k is the Boltzmann’s constant (1.38066 × 10−23 J/K), and βVmp (V/°C) stands for the temperature coefficient for module Vmp at STC.
The SAPM encompasses various coefficients and parameters (C0, C1, C2, C3, n, αImp, and βVmp) that are unknown, as the PV module’s manufacturer does not typically provide them. These parameters are commonly derived through testing and actual measurements of PV modules/arrays under static and dynamic conditions. The parameter extraction technique employed in this work aligns with the approach detailed in [23], as it involves using the artificial bee colony (ABC) optimization algorithm. This algorithm assesses the model parameters for PV arrays operating in real-world conditions, utilizing daily profiles of solar irradiance and module temperature and monitored DC output current and voltage profiles. The optimization process aims to minimize the objective function, defined as the root mean square error (RMSE) in Equation (6), where θ = f (C0, C1, C2, C3, n, αImp, and βVmp), N denotes the length of measured data, and Vi and Ii represent the measured voltage and current at data point i, respectively.
S θ = 1 N i = 1 N I i I V i , θ 2
The finalized PV system model forms the foundation for constructing databases that comprehensively capture the system’s performance under outdoor conditions. This model is instrumental in generating datasets encompassing optimal operation and intentionally simulated defects, utilizing yearly solar irradiance and module temperature profiles. The simulated scenarios, reflecting common issues in grid-connected PV systems, are outlined below and depicted in Figure 2:
  • Healthy system: This scenario represents the normal operation of the PV system without any anomalies.
  • Three short-circuited modules: This case involves disconnecting one channel of the microinverter.
  • Six short-circuited modules: In this situation, two channels from one microinverter are disconnected.
  • Nine short-circuited modules: This scenario entails having three channels of one microinverter disconnected.
  • Open-circuit faults: A situation where one microinverter of the PV system becomes non-functional.
  • Shading faults: This scenario replicates the effects of partial shading experienced by PV systems due to factors such as cloud movement or the presence of nearby objects during specific times. It includes different shading on various days and hours throughout the year.
The resulting databases encapsulate three crucial attributes—irradiance, temperature, and the output power at the maximum power point (MPP)—extracted from each simulated operational scenario.

2.3. Fault Detection and Diagnosis Procedure

The primary objective of this study was to establish a robust and reliable fault detection and diagnosis procedure for PV systems through combining Convolutional Neural Network (CNN) and Bidirectional Gated Recurrent Unit (Bi-GRU) deep learning techniques. This subsection starts with a general description of CNNs and Bi-GRUs. Then, the proposed hybrid model-based fault detection is detailed. Finally, it provides the evaluation metrics used to assess the performance of the proposed technique.

2.3.1. Convolutional Neural Network (CNN)

CNNs are a supervised and specific class of deep learning (DL) algorithms [24]. They differ from classical neural networks by using convolution in layers instead of matrix multiplication. A CNN is composed of two parts: the feature extractor part and the classifier part. The first part contains input layers, convolutional layers (CLs), and pooling layers (PLs), stacked layer by layer in the network as feature extractors. The input data matrix is passed through a progression of filters, creating new features called feature maps. Then, the convolution maps are flattened and concatenated into a CNN code feature vector. This CNN code at the output of the convolutional part is then associated with the input of a second part made of fully connected layers (multilayer perceptron). The classifier part is dedicated to classification and comprises fully connected (FC) layers and an output layer. The FC layers receive the features obtained by the last pooling layer as the input. The output is the last layer with one neuron per category [25]. The utilization of Conv1D layers in our model reflects the leveraging of CNNs for feature extraction, tailored explicitly to datasets showcasing spatial structures. CNNs excel in unraveling spatial relationships and subtle networks inherent in data, as mirrored by the Conv1D layers in our model. This capability is pivotal in comprehensively understanding fault evolution and manifestation within the PV system, aligning seamlessly with the model’s architectural implementation. The general architecture of a CNN is depicted in Figure 3.

2.3.2. Gated Recurrent Unit (GRU)

The GRU stands out as a special Recurrent Neural Network (RNN) variant originally proposed by Cho et al. [26]. Tackling the issue of gradient vanishing inherent in traditional RNNs, GRU combines the memory function of long short-term memory (LSTM) while exhibiting faster execution due to a reduced parameter count in the training process [27]. The GRU unit incorporates two gates—the reset gate and the update gate (as illustrated in Figure 4)—to regulate information transmission.
The update gate determines how much the prior hidden layer state (ht − 1) is preserved in the current hidden layer state (ht). It processes information from ht − 1 and the input of the present moment (xt) using an activation function, with a smaller activation result indicating greater information retention. The expression for the update gate is given as:
z t = σ ( W z x x t + W z h h t 1 + b z )
The reset gate decides how much information from the earlier moment is written into the candidate’s memory state (ȟt). Similar to the update gate, the reset gate processes ht − 1 and xt using an activation function, where a more significant activation result implies more information is written to ȟt. The reset gate is defined as:
r t = σ ( W r x x t + W r h h t 1 + b r )
GRU combines the reset gate (rt) with ht − 1 and xt to form a candidate memory state (ȟt) through the following expression:
ȟ t = t a n h [ W ȟ x x t + W ȟ ȟ   ( r t × h t 1 ) + b ȟ ]
The current hidden layer state (ht) is then obtained by combining the prior hidden layer state (ht − 1) with the candidate memory state (ȟt) using the following expression:
h t = ( 1 z t ) × h t 1 + z t × ȟ t
In the provided equations, xt represents the input of the current moment; ht − 1 and ht represent the hidden layer state of the prior and present moment, respectively; ȟt represents the candidate memory state; rt and zt represent the reset and update gate, respectively; Wzx, Wrx, and Wȟx pertain to the weight matrix concerning xt for the update gate, the reset gate, and the candidate memory state, respectively; Wzh, Wrh, and Wȟȟ pertain to the weight matrix concerning ht − 1 for the update gate, the reset gate, and the candidate memory state, respectively; and bz, br, and bȟ denote the corresponding biases.

2.3.3. Bidirectional Gated Recurrent Unit (Bi-GRU)

The Bi-GRU unit, derived from a bidirectional RNN [28], comprises two layers of GRUs with distinct information transmission directions, as illustrated in Figure 5. In the Bi-GRU configuration, a reverse layer is incorporated into the single-layer GRU network to optimally leverage input information. This architecture employs two hidden layers to capture both past and future information. The current state is influenced not only by historical data but also by future information, acknowledging that neglecting one-way communication may impact the prediction performance of the GRU model. Both hidden layers are connected to the same output layer, and the output of the current state ( y t ) is expressed as follows:
y t = h »   ,     h «
where h »  and   h « denote the output of the forward GRU layer and the backward GRU layer, respectively.
In fault detection within PV systems, identifying issues such as open circuits, short circuits, and shading faults is crucial for ensuring system reliability. While traditional unidirectional cyclic neural networks focus solely on past-to-future dependencies, bidirectional GRU (Bi-GRU) networks excel in capturing bidirectional dependencies by processing information from both historical and anticipated future conditions. By orchestrating two GRU networks moving in opposite directions—decoding past to present and future to present—Bi-GRUs provide a comprehensive understanding of a system’s temporal dynamics, significantly enhancing fault detection capabilities. This approach goes beyond mere historical data by incorporating insights into potential future conditions, which is especially useful in scenarios like anticipating shading faults. The ability of Bi-GRUs to comprehend evolving patterns and dependencies aids in discerning subtle fault patterns influenced by future conditions that might otherwise go undetected.

2.3.4. Proposed Hybrid CNN-Bi-GRU Architecture

The proposed hybrid model, integrating two potent neural networks—CNN and Bi-GRU architectures—aims to enhance fault detection accuracy. CNNs excel in feature extraction with a layered approach but face challenges like overfitting with high-dimensional data. On the other hand, Bi-GRU networks effectively handle high-dimensional data and time series due to their unique structure, although they may sometimes overlook explicit data features. In our model, Conv1D layers represent the CNNs feature extraction, and the Bidirectional GRU (Bi-GRU) layers handle high-dimensional data effectively. The innovative hybrid model’s structure (depicted in Figure 6) seamlessly integrates two Bi-GRU layers within the CNN framework. Placing these Bi-GRU layers before the fully connected layers offers advantages such as effective training on high-dimensional features extracted by the CNN without encountering overfitting. Moreover, this integration facilitates the convergence of spatial features captured by CNNs and temporal intricacies handled by Bi-GRUs in subsequent layers. Through fully connected layers and skip connections, this combination constructs a comprehensive data representation enriched with fault-specific features. Notably, the adaptability of both CNNs and Bi-GRUs empowers the model to dynamically adjust its feature extraction strategy, aligning effectively with the unique characteristics of the training data. This adaptability ensures that the model can capture and learn from the data’s varied and intricate fault patterns, enhancing its overall fault detection capabilities.
The concluding stage of the proposed fault detection strategy involves implementing two deep learning models. The first model identifies anomalies within the PV system, while the second model diagnoses the detected faults. Both deep learning models were developed using Python with Tensorflow-Keras and scikit-learn libraries [29,30,31,32]. The architecture encompasses the following layers:
  • Input Layer: A 3D input layer with a shape of (num_time_steps, Variables) was defined.
  • Convolutional Layers: Conv1D layers were utilized for feature extraction, with pooling and dropout being applied subsequently.
  • Bidirectional GRU Layers: Two sets of Bi-GRU layers process the features extracted from Conv1D. The first set returns sequences, and the second set returns only the final output of each sequence. Layer normalization and dropout were applied to both GRU layers for regularization.
  • Fully Connected Layers: Dense layers with dropout, kernel_regularizer_l2, kernel_regularizer_l1, and skip connections were implemented.
  • Output Layer: A dense output layer with softmax activation for binary classification in the detection model and multiclass type in the diagnosis model.
A detailed representation of the architectures of the models developed for fault detection and diagnosis is given in Figure 7.

2.4. Fault Detection and Diagnosis Procedure

To assess the performance of the proposed hybrid model, various metrics were employed, including Categorical Accuracy, Precision, Pecall, and F1-Score, as outlined in Equations (12)–(15). These metrics involve True Positives (TPs), True Negatives (TNs), False Positives (FPs), and False Negatives (FNs) [33]. Categorical Accuracy represents the ratio of correct predictions to the total number of predictions, calculated as follows:
A c c u r a c y = T P + T N T P + T N + F P + F N
Precision signifies the ratio of correctly classified positive samples to the total number of classified positive samples, denoted as:
P r e c i s i o n = T P T P + F P
Recall reflects the ratio of positive samples correctly classified as positive to the total number of positive samples, expressed as:
R e c a l l = T P T P + F N
Recall is more critical than Precision in threat detection, as false negatives can lead to severe consequences. However, there is an increasing desire to improve the efficiency of detector systems by reducing the rate of false positives. The F1-score is used when Precision and Recall are equally important and is defined as the harmonic mean of Precision and Recall:
F1-score = 2 × P r e c i s i o n × R e c a l l P r e c i s i o n + R e c a l l
For enhanced interpretability in multiclass classification, we incorporated averaging methods. Both macro and weighted averages for Precision, Recall, and F1-score were computed. Macro-average (Macro avg) involves an unweighted mean, potentially penalizing the model for poor performance in minority classes. In contrast, weighted average (weighted avg) accounts for the number of true instances in each class, addressing class imbalance and favoring the majority class.
Ultimately, the model was compiled using the Adam optimizer and categorical cross-entropy loss as defined by Equation (16). During the training process, strategies such as early stopping, model checkpointing, and learning rate reduction callbacks were employed to optimize model performance. Following training, the model underwent evaluation on the test set, computing its accuracy based on the generated classification report and confusion matrix.
L o s s = i = 1 N Y i   × l o g Ŷ i  

3. Results

This section presents the results derived from our PV modeling approach and the prepared databases, illustrating the operation of the PV system under diverse weather conditions and various fault scenarios. Subsequently, the efficacy of the proposed innovative fault detection and diagnosis procedure, which integrates both CNNs and Bi-GRU networks, is assessed considering different performance metrics.

3.1. PV Model Validation and Constructed Database

The PV model, relying on the empirical SAPM, was used to emulate the actual behavior of the PV installation considered in this study. Daily monitored profiles including PV output power at the MPP (Pmpp), on-plane solar irradiance (G), and module temperature (Tm) were employed to extract the unknown parameters of the model. The extracted parameters are given in Table 3, and the model’s validation across multiple days is depicted in Figure 8. The results indicate a good agreement between the measured and simulated hourly values of the PV system’s output power. The calculated total Root Mean Square Error (RMSE) value considering clear sky, semi-cloudy, and overcast days equals 2.69%. These findings underscore the effectiveness of the parameter identification process and the resilience of the SAPM.
The PV system model was subsequently utilized to generate databases that comprehensively depict the system’s performance under real outdoor conditions. These databases encompass datasets representing instances of optimal operation and intentionally simulated defects, using yearly monitored solar irradiance (G) and module temperature (Tm) profiles. A section of the simulated PV output, considering various faults as described in Section 2.2, is visually presented in Figure 9. Shading faults are randomly generated throughout the year. Figure 9 illustrates the impact of different faults on the PV output, emphasizing the consideration of temporary defects associated with shadings.

3.2. Evaluation of the Proposed Fault Detection Procedure

In the data generation phase, the recorded data undergo systematic annotation with relevant class labels. Specifically, 52,385 raw data samples were used for detection, while 43,624 were reserved for diagnosis. The initial focus of the preprocessing pipeline was on data quality and reliability. The removal of rows with missing values was executed to achieve this, effectively filtering out undesirable data. Following this, identifying duplicate rows enables the detection and potential elimination of redundant information. To fortify the dataset’s robustness, our attention was then directed towards handling outliers in numerical columns. The Interquartile Range (IQR) method calculates lower and upper bounds for each numerical column, and values falling outside these bounds are replaced with the corresponding boundary values. This contributes to a more accurate representation of the data distribution and reduces the impact of extreme values on subsequent analyses [34].
Post-preprocessing, 23,774 data samples were assigned for detection, and 19,788 data samples were allocated for diagnosis. The next steps involved separating the dataset into features (X) and target labels (y). Features (X) were derived from columns associated with solar irradiance (G), module temperature (Tm), and PV array output power (Pmpp), while labels corresponded to the ‘System_State’ column. Subsequently, the Features set underwent standardization using the StandardScaler from scikit-learn. This crucial step fosters convergence and enhances performance in deep learning models by ensuring consistent feature scaling. The length of sequential data (num_time_steps) and the number of columns (features) present in the scaled dataset were then defined. This was achieved through iterations that create sequences and corresponding labels based on the specified time steps. Sequences were generated by considering a data window with a length of num_time_steps. The loop appends these sequences and their respective labels to separate arrays (for the detection dataset, we obtained 23,575 sequences, leaving 19,589 sequences for the diagnosis dataset). The dataset was split into three sets—training, validation, and test—using the train_test_split function from scikit-learn. The training set comprised 70% of the data, while the remaining 30% was evenly divided between the validation (15%) and test (15%) groups. The specifics of constructing the detection and diagnosis datasets are outlined in Table 4.
Finally, an input layer was defined for the model and configured to accommodate the specified number of time steps and columns (features) present in the sequences (Tm, G, Pmpp, resulting in three features per time step). Additional details include the following:
  • num_time_steps: Each sample has a sequence length of num_time_steps, and for the fault detection and diagnosis model, the sequence length per sample is 200 time steps.
  • columns (features): Each time step contains three features (Tm, G, Pmpp).
The fine-tuning of the deep learning model’s parameters was accomplished using the grid search optimization method [31]. This meticulous tuning process systematically tests various combinations of internal hyperparameters to identify the optimal configuration that maximizes performance for our fault detection and diagnosis models. The conclusive hyperparameters for fault diagnosis and detection models are detailed in Table 5 and Table 6.
The findings based on the proposed deep learning (DL) architecture, which integrates CNN and Bi-GRU layers for the fault detection phase, are presented in Table 7 and visualized in Figure 10 and Figure 11. The evaluation of the classification report and loss value underscores the exceptional performance of the binary classification model in effectively discerning faulty and healthy systems, as detailed in Table 7. For Class 0, representing the Faulty System, the model showcases outstanding precision, accurately identifying 100% of instances predicted as faulty and minimizing false positives. The recall value of 1.00 is equally noteworthy, capturing all instances of faulty systems while minimizing false negatives. The F1-score, standing at 1.00, signifies a well-balanced and effective performance. Turning to Class 1, the healthy system, the model accurately identifies nearly all instances predicted as healthy (precision value of 0.99) and captures 98% of actual instances of healthy systems (recall value of 0.98), striking an effective balance. The corresponding F1-score of 0.99 further reinforces the model’s effectiveness in classification. In the overall evaluation, the model achieves an impressive accuracy of 99.45%, emphasizing its ability to make accurate predictions across both classes, as illustrated in Figure 3. The macro-average and weighted average values of 0.99 further affirm the solid overall performance.
The results indicate that the model has effectively learned underlying patterns during training, reflected in its high precision and recall for both faulty and healthy systems. The low loss value of 0.0080, depicted in Figure 11, underscores the model’s robust capability in accurate PV system fault classification. The reported recall value of 0.98 for “Class 1”, representing the healthy system, signifies the precise identification of 98% of actual instances, with the remaining 2% being false negatives. In the context of fault detection in PV systems, misclassifying a small proportion of healthy system instances is considered less critical than the opposite scenario. While a few cases of healthy systems may be misclassified, the overall model performance remains satisfactory for PV system fault detection, mitigating safety concerns associated with misclassifying faults as healthy instances.
The outcomes of the proposed hybrid model for the diagnosis phase are presented in Table 8 and visually represented in Figure 12 and Figure 13. Notably, the classification results showcase exceptional performance, marked by an impeccable overall accuracy of 100%. The comprehensive classification report in Table 8 highlights key metrics in the evaluation process. Precision, denoting the ratio of correctly predicted positive observations to the total predicted positives, maintains a flawless score of 1.00 across all fault classes, underscoring the model’s precision in fault-type prediction. Similarly, recall, indicating the ratio of correctly predicted positive observations to all observations in the actual class, also achieves a perfect score 1.00 for each fault type, affirming the model’s efficacy in capturing all instances of each fault type. The F1-score, a weighted average of precision and recall, uniformly registers a perfect score of 1.00 for all classes, indicating a harmonious balance between precision and recall. Figure 13 depicts the achieved meager loss value of 0.0001, approaching zero, underscoring the model’s high accuracy in predictions and its adeptness in learning intricate patterns and features essential for accurate classification. Consequently, the model showcases exceptional capabilities in fault classification, yielding perfect precision, recall, and F1-score for each fault type.

4. Discussion

To highlight the effectiveness of our hybrid deep learning model architecture, which combines a CNN with a Bi-GRU for fault detection and diagnosis, we conducted a comparative analysis with various alternative approaches, including CNN, CNN-LSTM, and CNN-BiLSTM models, all following the same architecture as our models. Additionally, we followed the same steps as in our study to ensure a fair and comprehensive comparison. We fine-tuned the internal hyperparameters for each algorithm using the grid search approach.
The obtained results listed in Table 9 reveal that during the detection phase, the CNN-LSTM achieved a precision score of 98.59%, and CNN-BiLSTM demonstrated the highest overall accuracy of 98.76%. In comparison, the CNN alone showed the lowest precision of 96.22%. In contrast, our deployed CNN-Bi-GRU model outperformed all, achieving an exceptional accuracy of 99.46%. Shifting to the diagnosis phase, CNN displayed notable progress and achieved an accuracy of 97.40%, while CNN-LSTM and CNN-BiLSTM reached 100% accuracy. The CNN-Bi-GRU model, also achieving 100% accuracy, surpassed the CNN method, emphasizing the hybrid model’s superior diagnostic capabilities. These results affirm the strength and effectiveness of the CNN-Bi-GRU hybrid model, showcasing its superiority in fault detection and diagnosis over individual models.
The proposed model demonstrates superior accuracy, recall, F1-score, and precision, with lower loss in both the detection and diagnosis phases. This enhanced performance can be attributed to the integrated feature extraction method, harnessing the strengths of both CNNs and Bi-GRUs. Furthermore, the efficacy of the softmax function in classification, similar to artificial neural networks (ANNs), which are recognized for their effectiveness in fault detection or classification in PV systems, further enhances our model’s remarkable outcomes.
To delve deeper into the suboptimal accuracy observed in the single CNN-based architecture, we identified that the model struggles in detecting temporal faults. The model encountered difficulties distinguishing between the healthy and the fault states induced by shading, as illustrated in Figure 14 (left side). Nevertheless, upon excluding shading faults from the training data and focusing solely on permanent faults, the single architecture exhibited improved performance, attaining 100% accuracy in the detection phase, as evident in the normalized confusion matrix depicted in the right part of Figure 14.
Finally, the analyses suggest that adopting a two-phase model structure proves more advantageous when dealing with temporary faults such as shading faults. This differentiation is crucial since discerning between these fault types and the PV system’s healthy state poses a considerable challenge. The complexities associated with identifying shading faults or similar issues demand a more nuanced approach, and a two-phase model enables a more accurate representation of the system’s behavior in such scenarios. In contrast, a single-phase model might be sufficient for permanent faults like open or short circuits. These faults are generally easier to distinguish from the healthy state, and a more straightforward model structure may yield satisfactory performance. Therefore, the model structure selection should align with the nature and complexity of the prevalent faults in the PV system, ensuring an optimal balance between accuracy and computational efficiency.

5. Conclusions

Photovoltaic (PV) systems are prone to various faults, ranging from temporary to permanent failures, each potentially exerting a substantial impact on performance and safety. The timely identification of these faults and their diagnosis are imperative for ensuring the enduring reliability and sustainable operation of the entire PV system. This study introduces an innovative application of deep learning (DL) techniques tailored explicitly for fault detection and diagnosis within PV systems.
The proposed DL architecture integrates Convolutional Neural Network (CNN) and Bidirectional Gated Recurrent Unit (Bi-GRU) layers to enhance fault identification and diagnosis in PV systems. Incorporating Conv1D layers at the outset facilitates robust feature extraction, harnessing their capacity to discern intricate patterns within the data. Subsequently, the Bi-GRU layers operate sequentially, capitalizing on their bidirectional processing capabilities to comprehend the temporal dependencies and subtleties inherent in PV system-monitored data.
The combination of parallel CNN and sequential Bi-GRU processing empowers the neural network model to proficiently detect and classify various fault types, including open circuits (inverter disconnection), short circuits, and partial shading. This novel approach optimizes fault identification by exploiting the complementary strengths of convolutional and recurrent layers, enabling the model to interpret spatial and temporal information simultaneously, thereby ensuring accurate fault detection and diagnosis.
Two key pillars underpin this combined hybrid model approach. The first pillar harnesses the precision of a simulation model, specifically the Sandia Array Performance Model (SAPM), finely tuned through metaheuristic optimization algorithms to replicate actual PV system behavior. The accuracy of this model was validated against measured data from a real PV installation, yielding a Root Mean Square Error (RMSE) value lower than 3%. The second pillar involves the construction of reliable databases that meticulously represent normal and abnormal PV system operations.
Finally, in a comparative analysis featuring established methods such as CNN, CNN-LSTM, and CNN-BiLSTM, our hybrid model showcased exceptional accuracy rates exceeding 99% for both the fault detection and diagnosis phases. This performance superiority underscores the significance of aligning model structure selection with the nature and complexity of prevalent faults in PV systems to ensure an optimal balance between accuracy and computational efficiency.
In summary, the presented fault detection approach demonstrated promising results within the context of the studied PV installation. Our future analyses will aim to encompass PV plants with different specifications, particularly those allowing for the testing and evaluation of the approach on various faults—including PV module degradation, dust accumulation, line-to-line faults, etc. Further, our future work will focus on implementing the proposed approach in autonomous hardware such as Raspberry Pi, with the aim of assessing its performance in real-time operations. This step is crucial in gaining valuable insights into the practical application and efficiency of the developed fault detection methodology.

Author Contributions

Conceptualization, A.F.A. and S.K.; methodology, A.F.A., S.K., H.O., A.C. and S.S.; validation, A.F.A., S.K. and H.O.; investigation, A.F.A., S.K., H.O., A.C. and S.S.; resources, S.K.; writing—original draft preparation, S.K. and A.F.A.; writing—review and editing, A.F.A., S.K., H.O., A.C. and S.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data are contained within the article.

Conflicts of Interest

The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

References

  1. Tripling Renewable Power and Doubling Energy Efficiency by 2030: Crucial Steps towards 1.5 °C. Available online: https://www.irena.org/Publications/2023/Oct/Tripling-renewable-power-and-doubling-energy-efficiency-by-2030 (accessed on 27 November 2023).
  2. Europe, S.P. Global Market Outlook for Solar Power 2023–2027; Technique Report; European Photovoltaic Industry Association: Brussels, Belgium, 2023; Available online: https://www.solarpowereurope.org/insights/market-outlooks/global-market-outlook-for-solar-power-2023-2027-1 (accessed on 27 November 2023).
  3. IEA—International Energy Agency—IEA. Available online: https://www.iea.org/reports/worldenergy-outlook-2023 (accessed on 27 November 2023).
  4. Drews, A.; de Keizer, A.C.; Beyer, H.G.; Lorenz, E.; Betcke, J.; van Sark, W.G.J.H.M.; Heydenreich, W.; Wiemken, E.; Stettler, S.; Toggweiler, P.; et al. Monitoring and Remote Failure Detection of Grid-Connected PV Systems Based on Satellite Observations. Sol. Energy 2007, 81, 548–564. [Google Scholar] [CrossRef]
  5. Silvestre, S.; Kichou, S.; Chouder, A.; Nofuentes, G.; Karatepe, E. Analysis of Current and Voltage Indicators in Grid Connected PV (Photovoltaic) Systems Working in Faulty and Partial Shading Conditions. Energy 2015, 86, 42–50. [Google Scholar] [CrossRef]
  6. Hariharan, R.; Chakkarapani, M.; Saravana Ilango, G.; Nagamani, C.; Member, S. A Method to Detect Photovoltaic Array Faults and Partial Shading in PV Systems. IEEE J. Photovolt. 2016, 6, 1278–1285. [Google Scholar] [CrossRef]
  7. Belaout, A.; Krim, F.; Mellit, A.; Talbi, B.; Arabi, A. Multiclass Adaptive Neuro-Fuzzy Classifier and Feature Selection Techniques for Photovoltaic Array Fault Detection and Classification. Renew. Energy 2018, 127, 548–558. [Google Scholar] [CrossRef]
  8. Madeti, S.R.; Singh, S.N. Modeling of PV System Based on Experimental Data for Fault Detection Using KNN Method. Sol. Energy 2018, 173, 139–151. [Google Scholar] [CrossRef]
  9. Chen, Z.; Wu, L.; Cheng, S.; Lin, P.; Wu, Y.; Lin, W. Intelligent Fault Diagnosis of Photovoltaic Arrays Based on Optimized Kernel Extreme Learning Machine and I-V Characteristics. Appl. Energy 2017, 204, 912–931. [Google Scholar] [CrossRef]
  10. Bendary, A.F.; Abdelaziz, A.Y.; Ismail, M.M.; Mahmoud, K.; Lehtonen, M.; Darwish, M.M.F. Proposed ANFIS Based Approach for Fault Tracking, Detection, Clearing and Rearrangement for Photovoltaic System. Sensors 2021, 21, 2269. [Google Scholar] [CrossRef] [PubMed]
  11. Syafaruddin; Karatepe, E.; Hiyama, T. Controlling of Artificial Neural Network for Fault Diagnosis of Photovoltaic Array. In Proceedings of the 16th International Conference on Intelligent System Applications to Power Systems, Hersonissos, Greece, 25–28 September 2011. [Google Scholar] [CrossRef]
  12. Garoudja, E.; Chouder, A.; Kara, K.; Silvestre, S. An Enhanced Machine Learning Based Approach for Failures Detection and Diagnosis of PV Systems. Energy Convers. Manag. 2017, 151, 496–513. [Google Scholar] [CrossRef]
  13. Vieira, R.G.; Dhimish, M.; de Araújo, F.M.U.; da Silva Guerra, M.I. Comparing Multilayer Perceptron and Probabilistic Neural Network for PV Systems Fault Detection. Expert Syst. Appl. 2022, 201, 117248. [Google Scholar] [CrossRef]
  14. El-Banby, G.M.; Moawad, N.M.; Abouzalm, B.A.; Abouzaid, W.F.; Ramadan, E.A. Photovoltaic System Fault Detection Techniques: A Review. Neural Comput. Appl. 2023, 35, 24829–24842. [Google Scholar] [CrossRef]
  15. Hong, Y.Y.; Pula, R.A. Methods of Photovoltaic Fault Detection and Classification: A Review. Energy Rep. 2022, 8, 5898–5929. [Google Scholar] [CrossRef]
  16. Liu, Y.; Ding, K.; Zhang, J.; Li, Y.; Yang, Z.; Zheng, W.; Chen, X. Fault Diagnosis Approach for Photovoltaic Array Based on the Stacked Auto-Encoder and Clustering with I-V Curves. Energy Convers. Manag. 2021, 245, 114603. [Google Scholar] [CrossRef]
  17. Chen, Z.; Chen, Y.; Wu, L.; Cheng, S.; Lin, P. Deep Residual Network Based Fault Detection and Diagnosis of Photovoltaic Arrays Using Current-Voltage Curves and Ambient Conditions. Energy Convers. Manag. 2019, 198, 111793. [Google Scholar] [CrossRef]
  18. Gao, W.; Wai, R.J. A Novel Fault Identification Method for Photovoltaic Array via Convolutional Neural Network and Residual Gated Recurrent Unit. IEEE Access 2020, 8, 159493–159510. [Google Scholar] [CrossRef]
  19. Eldeghady, G.S.; Kamal, H.A.; Hassan, M.A.M. Fault Diagnosis for PV System Using a Deep Learning Optimized via PSO Heuristic Combination Technique. Electr. Eng. 2023, 105, 2287–2301. [Google Scholar] [CrossRef]
  20. Appiah, A.Y.; Zhang, X.; Ayawli, B.B.K.; Kyeremeh, F. Review and Performance Evaluation of Photovoltaic Array Fault Detection and Diagnosis Techniques. Int. J. Photoenergy 2019, 2019, 6953530. [Google Scholar] [CrossRef]
  21. Liu, H.; Perera, A.; Al-Naji, A.; Boubaker, S.; Kamel, S.; Ghazouani, N.; Mellit, A. Assessment of Machine and Deep Learning Approaches for Fault Diagnosis in Photovoltaic Systems Using Infrared Thermography. Remote Sens. 2023, 15, 1686. [Google Scholar] [CrossRef]
  22. Kratochvil, J.A.; Boyson, W.E.; King, D.L. Photovoltaic Array Performance Model; Sandia Report 2004 (SAND2004-3535); Sandia National Laboratories (SNL): Albuquerque, NM, USA, 2004; Volume 8, pp. 1–19. [Google Scholar] [CrossRef]
  23. Kichou, S.; Silvestre, S.; Guglielminotti, L.; Mora-López, L.; Muñoz-Cerón, E. Comparison of Two PV Array Models for the Simulation of PV Systems Using Five Different Algorithms for the Parameters Identification. Renew. Energy 2016, 99, 270–279. [Google Scholar] [CrossRef]
  24. Aziz, F.; Ul Haq, A.; Ahmad, S.; Mahmoud, Y.; Jalal, M.; Ali, U. A Novel Convolutional Neural Network-Based Approach for Fault Classification in Photovoltaic Arrays. IEEE Access 2020, 8, 41889–41904. [Google Scholar] [CrossRef]
  25. Mansouri, M.; Trabelsi, M.; Nounou, H.; Nounou, M. Deep Learning-Based Fault Diagnosis of Photovoltaic Systems: A Comprehensive Review and Enhancement Prospects. IEEE Access 2021, 9, 126286–126306. [Google Scholar] [CrossRef]
  26. Cho, K.; Van Merriënboer, B.; Gulcehre, C.; Bahdanau, D.; Bougares, F.; Schwenk, H.; Bengio, Y. Learning Phrase Representations Using RNN Encoder-Decoder for Statistical Machine Translation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Doha, Qatar, 25–29 October 2014; pp. 1724–1734. [Google Scholar] [CrossRef]
  27. Hochreiter, S.; Schmidhuber, J. Long Short-Term Memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed]
  28. Schuster, M.; Paliwal, K.K. Bidirectional Recurrent Neural Networks. IEEE Trans. Signal Process. 1997, 45, 2673–2681. [Google Scholar] [CrossRef]
  29. Keras: Deep Learning for Humans. Available online: https://keras.io/ (accessed on 27 November 2023).
  30. Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; et al. Scikit-Learn: Machine Learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. [Google Scholar]
  31. Dive into Deep Learning—Aston Zhang, Zachary C. Lipton, Mu Li, Alexander J. Smola—Google Books. Available online: https://books.google.cz/books?hl=en&lr=&id=vfDiEAAAQBAJ&oi=fnd&pg=PR17&dq=Dive+into+deep+learning&ots=ZQbbDvCBqo&sig=PYL93fDS3JV_ppmGeZ-rhUEzADg&redir_esc=y#v=onepage&q=Diveintodeeplearning&f=false (accessed on 27 November 2023).
  32. Abadi, M.; Agarwal, A.; Barham, P.; Brevdo, E.; Chen, Z.; Citro, C.; Corrado, G.S.; Davis, A.; Dean, J.; Devin, M.; et al. TensorFlow: Large-Scale Machine Learning on Heterogeneous Distributed Systems. arXiv 2016, arXiv:1603.04467. [Google Scholar]
  33. Mellit, A.; Kalogirou, S. Assessment of Machine Learning and Ensemble Methods for Fault Diagnosis of Photovoltaic Systems. Renew. Energy 2022, 184, 1074–1090. [Google Scholar] [CrossRef]
  34. Dash, C.S.K.; Behera, A.K.; Dehuri, S.; Ghosh, A. An Outliers Detection and Elimination Framework in Classification Task of Data Mining. Decis. Anal. J. 2023, 6, 100164. [Google Scholar] [CrossRef]
Figure 1. PV system used to validate the proposed fault detection procedure.
Figure 1. PV system used to validate the proposed fault detection procedure.
Sustainability 16 01012 g001
Figure 2. A simple representation of the layout of the PV system, along with the faults considered in this study.
Figure 2. A simple representation of the layout of the PV system, along with the faults considered in this study.
Sustainability 16 01012 g002
Figure 3. General architecture of a Convolutional Neural Network.
Figure 3. General architecture of a Convolutional Neural Network.
Sustainability 16 01012 g003
Figure 4. Structure of a GRU.
Figure 4. Structure of a GRU.
Sustainability 16 01012 g004
Figure 5. Structure of a Bi-GRU.
Figure 5. Structure of a Bi-GRU.
Sustainability 16 01012 g005
Figure 6. The general structure of the adopted hybrid model integrating CNN and Bi-GRU.
Figure 6. The general structure of the adopted hybrid model integrating CNN and Bi-GRU.
Sustainability 16 01012 g006
Figure 7. Models designed for fault detection (left) and fault diagnosis (right).
Figure 7. Models designed for fault detection (left) and fault diagnosis (right).
Sustainability 16 01012 g007
Figure 8. Comparison between measured and simulated PV output power using SAPM.
Figure 8. Comparison between measured and simulated PV output power using SAPM.
Sustainability 16 01012 g008
Figure 9. Representative data of the DC output from the PV system operating under various faults.
Figure 9. Representative data of the DC output from the PV system operating under various faults.
Sustainability 16 01012 g009
Figure 10. Normalized confusion matrix of the CNN-Bi-GRU fault detection model.
Figure 10. Normalized confusion matrix of the CNN-Bi-GRU fault detection model.
Sustainability 16 01012 g010
Figure 11. Accuracy and loss evolution of the CNN-Bi-GRU fault detection model.
Figure 11. Accuracy and loss evolution of the CNN-Bi-GRU fault detection model.
Sustainability 16 01012 g011
Figure 12. Normalized confusion matrix of the CNN-Bi-GRU fault diagnosis model.
Figure 12. Normalized confusion matrix of the CNN-Bi-GRU fault diagnosis model.
Sustainability 16 01012 g012
Figure 13. Accuracy and loss evolution of the CNN-Bi-GRU fault diagnosis model.
Figure 13. Accuracy and loss evolution of the CNN-Bi-GRU fault diagnosis model.
Sustainability 16 01012 g013
Figure 14. A single CNN-based architecture model was employed for detecting all types of faults (left side) and specifically for detecting permanent faults (right side).
Figure 14. A single CNN-based architecture model was employed for detecting all types of faults (left side) and specifically for detecting permanent faults (right side).
Sustainability 16 01012 g014
Table 1. Summary of the characteristics of the selected PV generator.
Table 1. Summary of the characteristics of the selected PV generator.
Main ParametersPV System (East Roof)
PV size1.92 kW
Inverter nominal power2 × Microinverter 1 kW
Num. modules per inverter12
Num. modules in series (Ns)1
Num. strings in parallel (Np)3 × 4
Tilt–Azimuth30°–9° East
Table 2. PV module electrical data.
Table 2. PV module electrical data.
ParameterPmp
(W)
Isc
(A)
Voc
(V)
Imp
(A)
Vmp
(V)
βVoc
(%/°K)
αIsc
(%/°K)
Value802.3859.42.0343.2−0.210.03
Table 3. SAPM PV model-extracted unknown parameters.
Table 3. SAPM PV model-extracted unknown parameters.
ParameterC0C1C2C3 (V−1)nβVmp (V/°C)αImp (°C−1)
Value0.915−0.04461.88 × 10−16−7.981.31−0.1437.14 × 10−4
Table 4. The specifics of constructing the detection and diagnosis dataset.
Table 4. The specifics of constructing the detection and diagnosis dataset.
PhaseDefined FaultsAssigned
Class
Train
Dataset (70%)
Test Dataset (15%)Validation Dataset
(15%)
DetectionFaulty PV system013,83629662986
Healthy PV system12666571550
DiagnosisThree panels short circuited (fault1)02675564548
Six panels short circuited (fault2)12771580635
Nine panels short circuited (fault3)22783601602
One inverter disconnected (fault4)32779610598
Shading (fault5)42704584555
Table 5. Hyperparameter tuning for the fault detection model.
Table 5. Hyperparameter tuning for the fault detection model.
HyperparameterRange for SearchSelected Value
epochs[50–250]136
filters (Conv1D)[64–256]128
pool_size (MaxPooling1D)[2–4]2
dropout (Conv1D)[0.3–0.6]0.4
GRU units (Bidirectional GRU)[64–256]128
dropout (Bidirectional GRU)[0.3–0.7]0.5
return_sequences (Bidirectional GRU)[True, False]True/False
num_time_step[12–250]200
activation (GRU, Dense)[‘relu’, ‘tanh’, ‘sigmoid’]‘tanh’
batch_size[16–64]32
kernel_regularizer_l1[10−6–10−3]10−5
kernel_regularizer_l2[10−5–10−3]10−4
Table 6. Hyperparameter tuning for the fault diagnosis model.
Table 6. Hyperparameter tuning for the fault diagnosis model.
HyperparameterRange for SearchSelected Value
epochs[50–250]160
filters (Conv1D)[60–250]128
pool_size (MaxPooling1D)[2–4]2
dropout (Conv1D)[0.3–0.7]0.5
dropout (Bidirectional GRU)[0.3–0.6]0.3
GRU units (Bidirectional GRU)[64–256]128
return_sequences (Bidirectional GRU)[True, False]True/False
activation (GRU, Dense)[‘tanh’, ‘relu’, ‘sigmoid’]‘tanh’
num_time_step[12–250]200
batch_size[16–64]32
kernel_regularizer_l1[10−5–10−3]10−5
kernel_regularizer_l2[10−5–10−3]10−4
Table 7. Generated classification report for the fault detection model.
Table 7. Generated classification report for the fault detection model.
PrecisionRecallF1-Score
Class 01.001.001.00
Class 10.990.980.99
macro avg0.990.990.99
weighted avg0.990.990.99
accuracy0.99
Table 8. Generated classification report for the fault diagnosis model.
Table 8. Generated classification report for the fault diagnosis model.
PrecisionRecallF1-Score
Class 01.001.001.00
Class 11.001.001.00
Class 21.001.001.00
Class 31.001.001.00
Class 41.001.001.00
macro avg1.001.001.00
weighted avg1.001.001.00
accuracy1.00
Table 9. Comparative analysis of the proposed technique with various alternative approaches.
Table 9. Comparative analysis of the proposed technique with various alternative approaches.
ClassCNNCNN-LstmCNN-BiLstmCNN-Bi-GRU
Detection Precision00.960.990.991.00
10.950.970.970.99
Recall00.990.990.991.00
10.790.940.950.98
F1-score00.980.990.991.00
10.870.980.960.99
Accuracy (%) 96.2298.5998.7699.46
Loss 0.06800.02460.01430.0080
DiagnosisPrecision00.961.001.001.00
10.971.001.001.00
20.981.001.001.00
31.001.001.001.00
40.961.001.001.00
Recall00.961.001.001.00
10.981.001.001.00
20.981.001.001.00
30.981.001.001.00
40.971.001.001.00
F1-score00.961.001.001.00
10.971.001.001.00
20.981.001.001.00
30.991.001.001.00
40.971.001.001.00
Accuracy (%) 97.40100100100
Loss 0.09480.00020.00010.0001
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.

Share and Cite

MDPI and ACS Style

Amiri, A.F.; Kichou, S.; Oudira, H.; Chouder, A.; Silvestre, S. Fault Detection and Diagnosis of a Photovoltaic System Based on Deep Learning Using the Combination of a Convolutional Neural Network (CNN) and Bidirectional Gated Recurrent Unit (Bi-GRU). Sustainability 2024, 16, 1012. https://doi.org/10.3390/su16031012

AMA Style

Amiri AF, Kichou S, Oudira H, Chouder A, Silvestre S. Fault Detection and Diagnosis of a Photovoltaic System Based on Deep Learning Using the Combination of a Convolutional Neural Network (CNN) and Bidirectional Gated Recurrent Unit (Bi-GRU). Sustainability. 2024; 16(3):1012. https://doi.org/10.3390/su16031012

Chicago/Turabian Style

Amiri, Ahmed Faris, Sofiane Kichou, Houcine Oudira, Aissa Chouder, and Santiago Silvestre. 2024. "Fault Detection and Diagnosis of a Photovoltaic System Based on Deep Learning Using the Combination of a Convolutional Neural Network (CNN) and Bidirectional Gated Recurrent Unit (Bi-GRU)" Sustainability 16, no. 3: 1012. https://doi.org/10.3390/su16031012

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop