Detection of Malfunctioning Photovoltaic Modules Based On Machine Learning Algorithms
Detection of Malfunctioning Photovoltaic Modules Based On Machine Learning Algorithms
ABSTRACT In recent years, with the rise of environmental awareness worldwide, the number of solar
power plants has significantly increased. However, the maintenance of solar power plants is not an easy
job, especially the detection of malfunctioning photovoltaic (PV) cells in large-scale or remote power
plants. Therefore, finding these cells and replacing them in time before severe events occur is increasingly
important. In this paper, we propose a hybrid scheme with three embedded learning methods to enhance
the detection of malfunctioning PV modules with validated efficiencies. For the first method, we combine
the improved gamma correction function (preprocess) with a convolutional neural network (CNN). Infrared
(IR) thermographic images of solar modules are used to train the abovementioned improved algorithm. For
the second method, we train a CNN model using the IR temperatures of PV modules with the preprocessing
of a threshold function. A compression procedure is then designed to cut the time-consuming preprocesses.
The third method is to replace the CNN with the eXtreme Gradient Boosting (XGBoost) algorithm and the
selected temperature statistics. The experimental results show that all three methods can be implemented
with high detection accuracy and low time consumption, and furthermore, the hybrid scheme provides an
even better accuracy.
INDEX TERMS Solar power generation, fault detection, infrared imaging, image processing, machine
learning.
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/
37210 VOLUME 9, 2021
H. P.-C. Hwang et al.: Detection of Malfunctioning PV Modules Based on Machine Learning Algorithms
intelligence (AI) has become the most important research where (f ) = γ T + 2 λ kwk .
1 2
Another major difference between XGBoost and GBDT is further improve the anomalous detection accuracy of the local
that it uses the Taylor series in the objective function, which fault [18].
makes the convergence of XGBoost faster than that of GBDT. Pierdicca et al. proposed a CNN model to detect PV cell
XGBoost is widely used by data scientists to solve many degradation using the VGG-16 network [19]. The authors
machine learning problems in practice [7]–[8]. used PV IR images to train the deep learning model, and
an automatic recognition algorithm was then developed to
B. IMAGE PREPROCESSING detect PV module faults. Li et al. proposed a CNN solution
1) GAMMA CORRECTION FUNCTION for the defect detection of PV farms by using a drone to take
The gamma correction function is often used to correct an IR pictures [20]. In [21], Nie et al. presented a CNN-based
image’s luminance [9]. This function is defined by the fol- model to detect the hot spots of PV modules, and IR image
lowing power-law expression: data were used to train the CNN model. Grimaccia et al. also
suggested a method with an image processing algorithm to
γ
Vout = aVin (2) detect defects using UAVs [22]. The PV modules could be
classified into healthy, hot spots, bypass diodes, and dis-
where Vin is the input value, Vout is the output value, a is a connected. In [23], another method with an image process-
constant and γ is the power. To make the difference between ing algorithm was presented for the thermography defect
the abnormal and normal locations of IR images more obvi- detection of PV modules. These improved IR images could
ous, we design an improved gamma correction function to provide more details about the types of defects. In [24], an IR
achieve better preprocessing performance. thermography system on a drone was developed to detect and
locate malfunctioning PV modules. The K neighbors mean
2) OTHER IMAGE PROCESSING TECHNIQUES filter and Canny technique were used to preprocess these
Some image-processing techniques, such as Canny edge images.
detection and Gaussian filtering, have also been proposed However, based on a survey of previous works, we believe
to enhance the detection of malfunctioning PV modules. that the training image dataset could be further modified
In [10], the authors used a Gaussian filter and a binary model by the specifically designed image preprocessing technique,
to determine the defect and degradation percentages of PV which should enhance the learning result with the emphasized
modules. In [11], both the thermal image process and Canny contrast between normal cells and malfunctioning cells and
edge detection technique were used to detect the module- then provide higher accuracy. Similarly, a numerical prepro-
related faults that lead to hot-spot malfunctions. cessing method is proposed for the temperature dataset. Fur-
thermore, we also select some particular statistical features
C. LITERATURE REVIEW to better train the machine learning model. Finally, a hybrid
There have been some published methods for detecting dam- scheme embedded with these three detection procedures is
aged PV modules. Chouder and Silvestre presented a method proposed with even better accuracy. Many experiments are
based on power-loss data analysis to automatically detect implemented to validate our proposals.
faults in a PV system [12]. To calculate the main parameters
of the PV system from monitoring data, a parameter extrac-
III. PROPOSED DETECTION SCHEME
tion method was adopted. In [13], the authors proposed a deep
In this section, we detail three proposed detection meth-
learning-based method to detect and classify the defects of
ods and one corresponding hybrid scheme that includes the
PV modules. The CNN was used to extract features from 2-D
deep learning algorithm, the image preprocessing method,
scalograms of system data. This approach could effectively
the threshold function, and the machine learning algorithm.
classify five different faulty cases. Another type of fault
The parameter adjustment and feature selection steps are also
detection method was based on electroluminescence (EL)
introduced.
images. Both [14] and [15] used the EL images of solar cells
as the input dataset for a deep learning method to automati-
cally detect and classify the defects of solar cells. In [16], the A. CNN DEEP LEARNING ALGORITHM
authors also built two detection models using a support vector For the first two methods, the same CNN deep learning
machine (SVM) and CNN for an EL image dataset. algorithm is chosen to train the detection models to assess
Furthermore, two other studies proposed different methods whether a PV module has malfunctioned. Table 1 shows the
for detecting the defects of PV modules. In [17], an indepen- CNN structure and feature extraction adopted in this study.
dent component analysis reconstruction algorithm was used The architecture of the CNN consists of six convolutional
to detect surface faults. Another novel algorithm was used layers, six max pooling layers and one fully connected layer.
in [18]. In this paper, local detection and global detection The convolutional layer is used to extract the features of the
methods were proposed. In local detection, a water filling input data using kernels, and the output of the convolutional
algorithm was used to determine the local maximum tem- layer is a feature map. The objective of max pooling is
perature of the PV panel region. Then, global detection, to downsample an input image, and the output of the max
namely, multiframe recognition of PV faults, was adopted to pooling layer is the maximum value in each area. The fully
TABLE 1. CNN structure and feature extraction. red pixels can cause larger differences between the defective
locations and normal locations. The greater the difference, the
easier the CNN model can distinguish between normal and
abnormal PV modules during the detection process.
Algorithm 1 is the improved gamma correction function
and includes the following four steps:
C. CLASSIFICATION ACCURACY
To evaluate the performance of the proposed methods, the
FIGURE 5. Two parameter adjustment flows using images with improved following formula for the classification accuracy is employed
gamma and temperatures with a threshold function.
and shown in (8). The formula is calculated based on the
confusion matrix in Table 3.
Separated Values (CSV) files of temperatures first. Both the TP + TN
Accuracy = (8)
image files and temperature files are adjusted by the cor- TP + TN + FP + FN
rection function and threshold function, respectively. Then,
these outputs and selected features are inputted into the CNN D. CLASSIFICATION STEPS
models and the XGBoost model for individual learning and After the thermal image dataset is generated from the ther-
identification. mographic camera, the images are converted to temperatures
first. Then, either dataset is forwarded to the enhancement
A. EXPERIMENTAL DATASET function as in step (1) and is further fed into the CNN model
The thermal images are collected from the roof of the for classification as in step (2). In step (3), five major features
Industrial Technology Research Institute in Hsinchu, Taiwan. are calculated using the temperatures and then inputted to the
This thermographic inspection dataset includes 684 images XGBoost model. Finally, the outputs of the above models are
and 684 converted temperature CSV files as follows. used to decide if a PV module is malfunctioning or normal,
1) These 240 × 320 thermographic images include 189 as in step (4).
images for normal PV modules and 495 images for 1) Preprocess the IR thermographic images using the
malfunctioning PV modules. Some samples are shown improved gamma correction function and preprocess
in Fig. 6. the temperatures using the threshold function.
2) These 240 × 320 CSV files include 189 CSV files for 2) Forward the enhanced image file and the temperature
normal PV modules and 495 CSV files for malfunc- file to the CNN deep learning models. In the second
tioning PV modules. model, temperatures are used to complete the one-
Approximately 76% of the data are used as the training dimensional matrix.
dataset, and approximately 24%, i.e., 161 photovoltaic mod- 3) Five major features were calculated and then fed into
ules, are used as the detection test set. To deal with the the XGBoost model.
imbalanced data, we double train the minor classes of data 4) Identify the PV module as malfunctioning or normal
during the training processes [25]. using the outputs of the above models.
TABLE 4. Comparison of some image processing techniques. TABLE 6. Comparison of various compression ratios.
[18] V. Carletti, A. Greco, A. Saggese, and M. Vento, ‘‘An intelligent flying COOPER CHENG-YUAN KU (Member, IEEE)
system for automatic detection of faults in photovoltaic plants,’’ J. Ambient received the B.S. degree in control engineering
Intell. Hum. Comput., vol. 11, no. 5, pp. 2027–2040, May 2020, doi: from National Chiao Tung University, Taiwan,
10.1007/s12652-019-01212-6. in 1987, and the M.S. and Ph.D. degrees in
[19] R. Pierdicca, E. S. Malinverni, F. Piccinini, M. Paolanti, A. Felicetti, and electrical engineering from Northwestern Uni-
P. Zingaretti, ‘‘Deep convolutional neural network for automatic detection versity, USA, in 1993 and 1995, respectively.
of damaged photovoltaic cells,’’ Int. Arch. Photogramm., Remote Sens. From 1999 to 2014, he was with the Department of
Spatial Inf. Sci., vol. 42, pp. 893–900, May 2018, doi: 10.5194/isprs-
Information Management, National Chung Cheng
archives-xlii-2-893-2018.
University. Since 2014, he has been with the
[20] X. Li, Q. Yang, Z. Lou, and W. Yan, ‘‘Deep learning based module defect
analysis for large-scale photovoltaic farms,’’ IEEE Trans. Energy Convers., Institute of Information Management, National
vol. 34, no. 1, pp. 520–529, Mar. 2019, doi: 10.1109/tec.2018.2873358. Yang Ming Chiao Tung University, Hsinchu, Taiwan. His current research
[21] J. Nie, T. Luo, and H. Li, ‘‘Automatic hotspots detection based on UAV interests include artificial intelligence, information security and manage-
infrared images for large-scale PV plant,’’ Electron. Lett., vol. 56, no. 19, ment, blockchain systems, the Internet of Things, and data communication
pp. 993–995, Sep. 2020, doi: 10.1049/el.2020.1542. networks.
[22] F. Grimaccia, S. Leva, and A. Niccolai, ‘‘PV plant digital mapping for
modules’ defects detection by unmanned aerial vehicles,’’ IET Renew.
Power Gener., vol. 11, no. 10, pp. 1221–1228, Aug. 2017, doi: 10.1049/iet-
rpg.2016.1041.
[23] M. W. Akram, G. Li, Y. Jin, X. Chen, C. Zhu, X. Zhao, M. Aleem, and
A. Ahmad, ‘‘Improved outdoor thermography and processing of infrared
images for defect detection in PV modules,’’ Sol. Energy, vol. 190,
pp. 549–560, Sep. 2019, doi: 10.1016/j.solener.2019.08.061.
[24] P. Zhang, L. Zhang, T. Wu, H. Zhang, and X. Sun, ‘‘Detection and
location of fouling on photovoltaic panels using a drone-mounted infrared
thermography system,’’ J. Appl. Remote Sens., vol. 11, no. 1, Feb. 2017,
Art. no. 016026, doi: 10.1117/1.jrs.11.016026.
[25] M. Buda, A. Maki, and M. A. Mazurowski, ‘‘A systematic study of the
class imbalance problem in convolutional neural networks,’’ Neural Netw.,
vol. 106, pp. 249–259, Oct. 2018, doi: 10.1016/j.neunet.2018.07.011.
[26] S. Johnston, ‘‘Contactless electroluminescence imaging for cell and
module characterization,’’ in Proc. IEEE 42nd Photovolt. Spec.
Conf. (PVSC), New Orleans, LA, USA, Jun. 2015, pp. 1–6, doi:
10.1109/PVSC.2015.7356423.
[27] C. Shorten and T. M. Khoshgoftaar, ‘‘A survey on image data augmentation
JAMES CHI-CHANG CHAN was born in Taipei,
for deep learning,’’ J. Big Data, vol. 6, no. 1, Dec. 2019, Art. no. 60, doi:
10.1186/s40537-019-0197-0. Taiwan, in January1958. He received the Ph.D.
degree from the Computer-Aided Engineer-
ing (CAE) Group, Department of Civil Engi-
HUMBLE PO-CHING HWANG received the B.S. neering, National Taiwan University. Since 1989,
degree from the Department of Business Adminis- he has been with the Laboratory of Research
tration, National Chung Cheng University, Chiayi, and Development, Industrial Technology Research
Taiwan, in 2017. He is currently pursuing the Ph.D. Institute (ITRI). His research interests include
degree with the Institute of Information Manage- computer-aided engineering, engineering informa-
ment, National Yang Ming Chiao Tung University, tion technology, structure safety non-destructive
Hsinchu, Taiwan. His research interests include detection, civil and disaster prevention, solar PV system planning and
machine and deep learning, solar energy, informa- evaluation design, solar PV system detection and evaluation, solar PV system
tion security, and game theory. data value-added analysis, and solar BIPV systems.