# Diagnosis of External Faults in Photovoltaic Systems based on a Deep Learning approach

Djemaa Rahmouni, Mohamed Djamel Mouss, Mohamed Benbouzid,

Leïla-Hayet Mouss

► To cite this version:

Djemaa Rahmouni, Mohamed Djamel Mouss, Mohamed Benbouzid, Leïla-Hayet Mouss. Diagnosis of External Faults in Photovoltaic Systems based on a Deep Learning approach. Revue des Energies Renouvelables, 2024, pp.47-57. 10.54966/jreen.v1i3.1293. hal-05344540

HAL Id: hal-05344540

https://hal.univ-brest.fr/hal-05344540v1

Submitted on 3 Nov 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution - ShareAlike 4.0 International License
<figure><img src="image_2.png" /></figure>

<figure><img src="image_3.png" /></figure>

Conference paper

# Diagnosis of External Faults in Photovoltaic Systems based on a Deep Learning approach

Djemaa Rahmouni<sup>a,b,*</sup>, Mohamed Djamel Mouss<sup>a</sup>, Mohamed Benbouzid<sup>b,c</sup>, Leïla-Hayet Mouss<sup>a</sup>

## ARTICLE INFO

### Article history:

Received September 30, 2024

Accepted October 16, 2024

### Keywords:

PV Systems,
Deep Learning,
Faults Diagnosis,
Classification,
Open source datasets.

## ABSTRACT

Due to the growing global demand for electricity energy, photovoltaic systems are becoming increasingly important as a continuous and environmentally friendly alternative. They ensure the continuity of electrical production in a healthy and sustainable manner. To ensure the efficiency and optimal performance of these systems, an effective diagnostic model is urgently needed to classify faulty and working solar cells. In recent years, deep learning methods have been used to analyse and process images, providing new insights and guidance in the field of fault diagnosis in PV systems. This research proposes a comparative study of the deep learning models ResNet50, VGG-19, and AlexNet to test their effectiveness in analysing and classifying defective solar cells from non-defective cells using EL images.

## 1. INTRODUCTION

Although manufacturers make great efforts to protect solar modules from natural factors that can prevent them from working properly, these efforts are not always sufficient to prevent deterioration of the photovoltaic cells or errors during the manufacturing process. As a result, photovoltaic modules may be exposed to various defects that can negatively affect the energy productivity of solar installations. Diagnosing and classifying defects can be challenging for engineers and experts, particularly when it comes to fine defects like cracks. Electroluminescence imaging offers a precise and thorough scan of photovoltaic modules, revealing imperfections that are not visible to the naked eye. This imaging technique is commonly used in manufacturing laboratories to detect faults before products are released to the market. It is also used in solar stations to identify defective units and facilitate their replacement

<figure><img src="image_4.png" /></figure>

<footnote><sup>a</sup> University of Batna 2, Laboratory of Automation and Manufacturing Engineering, 05000 Batna, Algeria</footnote>

<footnote><sup>b</sup> University of Brest, UMR CNRS 6027 IRDL,29238 Brest, France</footnote>

<footnote><sup>c</sup> Logistics Engineering College, Shanghai Maritime University Shanghai 201306, China</footnote>

<footnote>* Corresponding author, E-mail address: d.rahmouni@univ-batna2.dz</footnote>

<footnote>Tel: + 213 698222029</footnote>
during maintenance. Faults in PV systems can be classified into three categories: physical, chemical, and electrical, as illustrated in “Fig. (1)”. This study focuses on the first type of fault. The objective of this study is to assess deep learning models for binary classification of defective and non-defective units, using a unique and challenging dataset in reality.

<figure><img src="image_5.png" /><figcaption>Fig 1. Classification of failures in PV systems</figcaption></figure>

## 2. BACKGROUND INFORMATION

The function of diagnosing degradation by detecting and classifying defects, in solar cells is essential to ensure good performance, better monitoring and continuous follow-up of PV systems (Berghout, T. et al, 2021). A great deal of research has therefore been carried out in this area in recent years, as a result of the encouragement from various sectors of society to move towards this type of energy consumption (Rahmouni, D. et al, 2023). EL images of photovoltaic modules were first presented in 2005 by (Fuyuki, T. et al, 2005) after which several studies were carried out to improve the quality of the images, for example (Mantel, C. et al, 2018), (Bedrich, K. et al, 2017) and also to carry out imaging under difficult natural conditions (Owen-Bellini, M. et al, 2020). The diagnosis and classification of defects based on EL images of solar cells is very important in order to extract the maximum amount of information that will benefit the health of the solar unit in the future. With the huge leap in DL approaches to image analysis and processing, several models have been trained on different sets of EL images to classify solar cells based on defect type (Demirci, M. et al, 2021). EL images allow us to see the smallest surface defects and deformations of PV cells, such as broken fingers and tiny cracks. Faulty cells appear
completely black. Completely or partially electrically disconnected solar cells appear as dark areas. “Fig. (2)” shows the types of surface defects in PV cells.

As part of the detection and classification of external defects in photovoltaic modules, three types of external defects were classified: finger fractures, fractures and cracks (Tsai, M. et al, 2012). Although the study achieved its objective, it faced the challenge of detecting and classifying deep defects. Studies and research on defect detection and classification continued, but were linked to the extent of their impact on energy loss. A CNN architecture was proposed to detect and classify finger interruptions (Mehta, S. et al, 2018). In a comparative study between two CNN algorithms and SVMs for steel defect

<figure><img src="image_6.png" /><figcaption>Fig 2. Examples of various defects of photovoltaic cells in EL images: (a) and (b) fault in the material and during manufacturing, (c) representation of a cut finger, (d) micro cracks, (e) electrical disconnection or partial breakage, (f) total degradation. Figures of cells https://github.com/zae-bayern/elpv-dataset#.</figcaption></figure>

classification, the DL algorithm achieved twice the accuracy of machine learning (Masci, J. et al, 2012). In the same context, a comparative study was conducted among three advanced deep learning algorithms - VGG16, VGG19, and Resnet50 - with the aim of classifying five types of surface defects in solar cells using electroluminescence images of solar cells. The results showed the accuracy and efficiency of the Resnet50 model in classifying defective cells at a rate of 87.50%, compared to the other two models Rahmouni, D. et al, 2023). In general, DL methods have been used in parallel with remotely piloted aircraft technology to take aerial images of solar panels to ensure good monitoring of PV systems (Kang, D. and Y. Cha, D. et al, 2018). These methods have achieved excellent results in the field of detecting defects in photovoltaic modules, but they face great difficulties in classifying these defects. This is due to several reasons, including:

* The lack of availability of a data set and the difficulty of actually collecting it.

* The available image datasets are small and unbalanced.

Therefore, in this work we propose a study based on a comparison between two models deep learning algorithms to perform a binary classification between defective and functional solar cells. This paper is detailed as follows: The first section provides a general overview of the problem. Whereas the second section refers to the work related to the nature of the study. The third section elucidates the general outline of our study including the presentation and description of the dataset used, along with the proposed DL algorithms to achieve the study. Finally, we present and discuss the obtained results.

## 3. METHODOLOGY

DL methods depend mainly on the quality of the data. For the diagnosis and classification of external defects in photovoltaic systems, small data size and unbalanced samples are the main challenges for these methods. Although data optimizers are widely used in this field, it is difficult to generalize a particular defect to other cases. Therefore, the use of a transfer-learning model helps to detect defects in photovoltaic cells in addition to extracting complex and deep features. It increases the efficiency and
reliability of the model in the process of classifying these defects. The general methodology for the different stages of the applied study is shown in “Fig. (3)” below.

<figure><img src="image_7.png" /><figcaption>Fig 3. General study flowchart</figcaption></figure>

**3.1 Transfer Learning**

Transfer learning aims to take the features that the model has learned from one problem and use them in a new, similar task. Usually, and most often, this method is applied to very small data sets, or to many categories with small data sizes. So we take layers from the previously trained model and freeze them to avoid losing information during future training. New layers are then added to them. As a result, old features are transformed into predictions for the new dataset. In this study, we propose the VGG-19 model, based on transfer learning on the dataset Image-Net, where the layers of the target model were frozen, and then the target weights were added and the process of training the final layers was carried out. In addition, with the Alex-Net from Scratch model. Moreover, comparing the results. The model-driven transfer-learning model is illustrated in “Fig. (4)”.

<figure><img src="image_8.png" /><figcaption>Fig 4. Illustration of the stages of transfer learning based on the model.</figcaption></figure>

**3.2 Proposed models for classification of defective and non-defective cells**

* VGG-19 Transfer Learning

The VGG-19 convolutional neural architecture has been used depending on the type of dataset we have. The dataset is characterised by similarities in the general characteristics of photovoltaic cells between defective and non-defective cells, in addition to the multiple categories of defects specific to defective solar cells. The overall architecture of VGG-19 contains 19 convolutional layers, including 16 layers, 5 max-pooling layers and 3 fully connected layers. The architecture is inspired by VGG16 (A. Victor, 2021). The dimensions for the image input process are (224 x 224 x 3), and the filter has a size of (3 x
3). This network is connected to the Softmax output layer. This model aims to improve deep feature extraction and feature detection.

* AlexNet architecture

The AlexNet network was proposed in 2012 and was the first deep CNN architecture (Gonzalez, F. 2007). After being used in the field of image classification, it showed excellent results. It is therefore highly regarded in this field. The architecture consists mainly of 5 convolutional layers (Conv2D), immediately followed by 3 fully connected layers. The algorithm achieves good reliability in the defect classification function by detecting features and then optimizing the parameters. The basic structure of AlexNet is shown by "Fig. (5)".

<figure><img src="image_9.png" /><figcaption>Fig 5. The architecture of the AlexNet</figcaption></figure>

**3.3 Dataset Introduction**

To carry out this study, we use a public dataset of EL images for photovoltaic cells, which is open source and publicly available at https://github.com/zae-bayern/elpv-dataset#. The sample consists of 2624 images obtained from 44 photovoltaic modules, between non-defective cells and cells with different defects, taken from 26 polycrystalline photovoltaic modules and 18 monocrystalline photovoltaic modules. In addition, the samples have been normalized to 300 x 300 pixel greyscale images with high resolution and clarity. It includes internal defects such as short circuits and electrically degraded cell parts, and external defects such as cracks, partially or completely broken cells, separated layers and severed fingers. The latter do not have a significant impact on the energy loss of the photovoltaic system, but they do have a negative effect over time.

* Images data splitting and normalization

To complete the applied work, we divided the data set into 80% of the EL images into a training sample and the remaining percentage into a test sample. “Table. 1” shows how the data set is divided. The two sets are then normalized to achieve accuracy and to normalize the input image data between [-1, 1]. The very similar nature of defective and non-defective photovoltaic cells has posed a challenge to the classification models in terms of deep feature detection and feature extraction between the two classes. The study evaluates the models based on performance metrics, and the Adam optimizer was used to correct and improve the missing parameters.
<table><caption>Table 1. Statistics of the dataset divided into training and testing ratios</caption><thead><tr><td>Photovoltaic Cell Type</td><td>Train</td><td>Test</td><td>Total</td></tr></thead><tbody><tr><td>Defective cells</td><td>1150</td><td>288</td><td>1438</td></tr><tr><td>Non-defective cells</td><td>949</td><td>237</td><td>1186</td></tr></tbody></table>

# 4. RESULTS AND DISCUSSION

The last part presents the results of the evaluation of the two models for the binary classification function of photovoltaic cells. The experiments were carried out using Python software and the Google Colab environment, together with a computer equipped with an Intel(R) Core(TM) i3-1005G1 @ 1.20 GHz (1.19 GHz) CPU. ), 8 GB memory, GPU/NVIDIA-SMI 525.85.12 driver version: 525.85.12 CUDA version: 12.0. We examine the results obtained and try to compare the two proposed models.

## 4.1 Hyper parameters used for models

In order to classify of images of PV cells, we trained and tested the models. We split the electroluminescence image set and then normalize it. We evaluate the models using some performance metrics. In addition, we used the Adam optimizer to detect missing parameters and improve them. The imbalance in the total defect categories of PV cells and the small size of the dataset with more than one defect in the PV cell is considered a major challenge for the deep networks. Accordingly, the classification process was a little difficult in the beginning, so we conducted different experiments with certain values were chosen as the most appropriate for the performance of the models. The values are recorded in “Table. 2”.

<table><caption>Table 2. Hyper-parameters Adopted In Binary classification Models.</caption><thead><tr><td>Model</td><td>Optimizer</td><td>Epoch</td><td>Batch size</td><td>Early stopping</td></tr></thead><tbody><tr><td>Res-Net From Scratch</td><td>Adam (lr=1e-6)</td><td>50</td><td>32</td><td>10</td></tr><tr><td>VGG19 Transfert Learning</td><td>Adam (lr=1e-6)</td><td>30</td><td>32</td><td>5</td></tr><tr><td>AlexNet From Scratch</td><td>Adam(lr=0.00001)</td><td>18</td><td>32</td><td>5</td></tr></tbody></table>

## 4.2 Metrics used to assess

Four measures were used to monitor the performance of the two models. The first is accuracy, which is inversely proportional to the other two measures, loss and average absolute error (MAE), and then recall. Precision is the result of the formula “Eq. (1)”

$$ \text{Accuracy} = \frac{\text{TP} + \text{TN}}{\text{TP} + \text{TN} + \text{FP} + \text{FN}} \qquad (1) $$

Knowing that TP and TN represent the true positives and negatives respectively, while FP and FN represent the false positives and negatives respectively. The ratio between the total numbers of positives, whether true positives or false negatives, is the recall measure ratio, which is the result of the following relationship “Eq. (2)”

$$ \text{Recall} = \frac{\text{TP}}{\text{TP} + \text{FN}} \qquad (2) $$
## 4.3 Accuracy and loss over time

In the process of training a model on a classification problem, accuracy and loss are generally the most appropriate metrics to show changes in prediction over time. In addition to the average absolute error, which represents the percentage of error in classifying classes. The results of these metrics on the training and test sets are shown in “Fig. (6)” and “Fig. (7)” for the Alex-Net and VGG-19 Transfert learning models, respectively.

“Fig. (6)” shows the changes in the Alex-Net model. As “a” shows the changes in the model’s accuracy scale, the model tries to stabilise and match the training and test curves, but after round 15, the model shows that it cannot find the deep features of the two image types, so the two curves start to diverge. “b” Shows the loss curve. It can be seen that the loss value for the training sample decreases proportionally to the test sample, but not in an ideal way. “c” Represents the average absolute error of the outputs of the two classified classes of the model. It is clear that the Alex-Net model was not able to learn well as it failed to detect deep and weak features between the two classes of defective and non-defective cells.

<figure><img src="image_10.png" /></figure>

<figure><img src="image_11.png" /></figure>

<figure><img src="image_12.png" /><figcaption>Fig 6. ((a): Accuracy evolution, (b): Loss evolution, (c): Mean Absolute Error evolution) of the model AlexNet network</figcaption></figure>

“Fig. (7)” gives us a clearer picture of the changes in the VGG19 model. “a” shows the accuracy achieved by the model. For example, we can see that the first rounds up to round 10 were a bit difficult for the training and testing process, but the model quickly recovered and started to learn and classify the deep features. “b” gives good results in terms of loss value, and shows the consistency of the two curves after the fifth round, by adjusting the parameters on the detected features and their classification. “c”
shows the average absolute error of the outputs of the two classes. The training curve and the test curve show greater homogeneity and high efficiency in the attempt to classify the features of each class.

<figure><img src="image_13.png" /><figcaption>Fig 7. ((a): Accuracy evolution, (b): Loss evolution, (c): Mean Absolute Error evolution) of the model VGG-19 Transfer learning.</figcaption></figure>

"Fig. (8)" illustrates the changes in the Res-Net50 model accuracy as rounds progress. Curve "a" represents the model's accuracy, which shows strong performance in feature extraction during training and learning periods and aims to achieve the highest accuracy in testing. Figure "b" displays a low loss value and illustrates the matching of the two curves from the initial rounds by adjusting the parameters to the discovered parameters and classifying them. Figure "c" shows the average absolute error of the outputs of the two classes. The training and test curves demonstrate greater homogeneity and higher efficiency.

The in "Table. 3" displays the results of our proposed binary classification models. The accuracy values for Alex-Net and VGG-19 models were 81% and 83%, respectively. The Res-Net50 model achieved the highest accuracy value of 87%. These results suggest that the deep feature extraction stage of the Res-Net50 model is distinct and promising. However, to further improve the efficiency and accuracy of classification models, more image samples of defective PV cells are required for analysis.

<table><caption>Table 3. Models Accuracy Results</caption><thead><tr><th>Model</th><th>Alex-Net</th><th>VGG19</th><th>Res-Net</th></tr></thead><tbody><tr><td>Accuracy</td><td>81.42</td><td>83.70</td><td>87.98</td></tr><tr><td>Recall</td><td>79.78</td><td>82.94</td><td>86.74</td></tr></tbody></table>
<figure><img src="image_14.png" /><figcaption>Fig 8. ((a): Accuracy evolution, (b): Loss evolution, (c): Mean Absolute Error evolution) of the model Res-Net 50 from Scratch</figcaption></figure>

**4.4 Confusion Matrix**

The matrices provide a summary of the binary classification network prediction model results. Notably, the first model shows confusion between the non-defective and defective cell categories to varying degrees. This is due to the cells' similar surface, which Alex-Net could not extract and learn deep and difficult features from. The small size of the data set affects the accuracy of PV cell diagnosis. However, the VGG-19 and Res-Net50 models achieved a good percentage of true positive results. Res-Net50 outperformed VGG-19 in correctly predicting real images. The resulting matrices from the transfer models are shown in “Fig. (9)”: (a) Alex-Net, (b) VGG-19, and (c) Res-Net50.

**5. CONCLUSION**

This paper presents a comparative study of popular deep networks, namely VGG-19, Alex-Net, and Res-Net50, for automatically classifying defective and non-defective cells in EL images of PV systems. The results show that the Res-Net50 architecture is the most reliable in classifying photoelectric images, with the ability to detect and train deep features. The small data set posed a difficult challenge to the diagnostic and classification function. We believe that further research is necessary in the field of electroluminescence (EL) images for photovoltaic (PV) systems. This can be achieved by collecting additional samples of defective cells and combining them to enhance the model's ability to accurately determine the health status of solar cells. This is an essential aspect of effective diagnosis and continuous monitoring of faults in PV systems.
<figure><img src="image_15.png" /><figcaption>Fig 9. Confusion matrices for models ((a): AlexNet, (b): VGG19 Transfert learning, (c): Res-Net50).</figcaption></figure>

## NOMENCLATURE

<table><tr><td>CNN</td><td>Convolutional Neural Networks</td></tr><tr><td>VGG-19</td><td>Visual Geometry Group (having 19 Convolutional layers, respectively</td></tr><tr><td>Alex-Net</td><td>The name of a convolutional neural network architecture, designed by Alex Krizhevsky</td></tr></table>

## REFERENCES

Bedrich, K. G., Bliss, M., Betts, T. R. & Gottschalg, R. (2017). Electroluminescence imaging of PV devices: Camera calibration and image correction. 2017 IEEE 44th Photovolt. Spec. Conf. PVSC 2017 3254–3255 doi:10.1109/PVSC.2017.8366325.

Berghout, T. et al. (2021). Machine learning-based condition monitoring for PV systems: State of the art and future prospects. Energies 14, 1–24

Demirci, M. Y., Beşli, N. & Gümüşçü, A. (2021). Efficient deep feature extraction and classification for identifying defective photovoltaic module cells in Electroluminescence images. Expert Syst. Appl. 175,.
Fuyuki, T., Kondo, H., Yamazaki, T., Takahashi, Y. & Uraoka, Y. (2005). Photographic surveying of minority carrier diffusion length in polycrystalline silicon solar cells by electroluminescence. Appl. Phys. Lett. 86, 1–3.

Gonzalez, T. F. Handbook of approximation algorithms and metaheuristics. Handb. Approx. Algorithms Metaheuristics 1–1432 doi:10.1201/9781420010749.

Kang, D. & Cha, Y. J., (2021). Autonomous UAVs for Structural Health Monitoring Using Deep Learning and an Ultrasonic Beacon System with Geo-Tagging. Comput. Civ. Infrastruct. Eng. 33, 885–902 (2018).

Mantel, C. et al. (2018). Correcting for Perspective Distortion in Electroluminescence Images of Photovoltaic Panels. IEEE 7th World Conf. Photovolt. Energy Conversion, WCPEC 2018 - A Jt. Conf. 45th IEEE PVSC, 28th PVSEC 34th EU PVSEC 433–437 doi:10.1109/PVSC.2018.8547724.

Masci, J., Meier, U., Ciresan, D., Schmidhuber, J. & Fricout, G. (2012). Steel defect classification with Max-Pooling Convolutional Neural Networks. Proc. Int. Jt. Conf. Neural Networks 10–15 doi:10.1109/IJCNN.2012.6252468.

Mehta, S., Azad, A. P, (2018) Chemmengath, S. A., Raykar, V. & Kalyanaraman, S. (2018). DeepSolarEye: Power Loss Prediction and Weakly Supervised Soiling Localization via Fully Convolutional Networks for Solar Panels. Proc. -IEEE Winter Conf. Appl. Comput. Vision, WACV 2018 2018-Janua, 333–342.

Owen-Bellini, M. et al. (2020). Methods for in Situ Electroluminescence Imaging of Photovoltaic Modules under Varying Environmental Conditions. IEEE J. Photovoltaics 10, 1254–1261.

Rahmouni, D., Benbouzid, M., Mouss, M.D. & Mouss, L.H. (2023). Efficient Diagnosis of Photovoltaic Cell Degradation Based on Deep Learning Using Drone Thermal Imagery. Int. J. Energy Convers. 11, 153–169.

Rahmouni, D., Mouss, M.D., Mouss, L.H., Benbouzid, M. (2023). Enhancing Photovoltaic Module Reliability: A Comparative study of Deep Learning Models for Failure Diagnosis Using Electroluminescence Images. first Int. Conf. Electr. Eng. Adv. Technol. ICEEAT23 979-8–3503.

Tsai, D. M., Wu, S. C. & Li, W. C., (2012). Defect detection of solar cells in electroluminescence images using Fourier image reconstruction. Sol. Energy Mater. Sol. Cells 99, 250–262.

Victor, A. (2007). ResNet-50 vs VGG-19 vs training from scratch: a comparative analysis of pneumonia segmentation and classification from chest X-ray images. Proc. Glob. Transitions Proceeding.