In PV systems, hotspot faults and bypass diode failures are just two of the many possible fault types. These flaws reduce the PV system’s generated output power and impair system performance. This study will provide a native and national solution for hotspot and bypass diode problems, starting with panel architecture and ending with analysis results. Two distinct verifications will be made using both the images obtained from thermal images with image processing techniques and the numerical data obtained from the real-time monitoring system.
3.1. Thermal Imaging, Panels Settlement, and Fault Detection
In this study, a DJI Matrice 300 drone equipped with a DJI Zenmuse H20 T camera developed by FLIR (Wilsonville, OR, USA) was used to capture the thermal images with 640 × 512 pixel resolution, at a relative flight height of 35 to 65 m. In the study, varied quantities of images were employed for each site, with the quantity of photos differing based on factors like field size and overlay rates. The drone operated at altitudes of either 35 or 65 m, contingent on the field’s features such as slope. The mapping process was facilitated by the utilization of the WebODM 1.9.16 software. Image processing was coded in the Python 3 language using the principal libraries of NumPy, OpenCV, Pillow, and the Detectron 2 package was used for object detection. To conduct an aerial thermal inspection for testing our proposed algorithm, and detect potential faults, the data collected from a total of 10 MWp PV farms in Malatya, Türkiye, will hereinafter be referred to as Site-1.
Panel detection primarily revolves around the task of recognizing rectangular structures. But as mentioned by Diaz et al. [
38], accomplishing this task becomes challenging when applied to thermal images. This difficulty arises due to the partial visibility of panel edges, coupled with the interference of irregularities like shadows from weeds, reflections caused by sunlight, and thermal hot spots. These diagnostic challenges are compounded by various other factors, including variations in flight altitudes, shifts in lighting conditions, the presence of structures resembling panels, the existence of energy lines, and the occurrence of lens distortion in images, as shown in
Figure 3. All these factors collectively contribute to the complexity of the background against which the panel detection must be performed.
Panel detection is essential for defining the region of interest required in identifying and categorizing anomalies. This is because accurate classification relies on the geometric characteristics within panels or the spaces between them. Rectangular structures are detected and roughly fixed as panels (
Figure 4). Since thermal images are raw, that is, under real conditions, they are of poor quality, and therefore, some corners and edges are not fully visible. Therefore, to obtain the exact corner coordinates is needed (
Figure 5). In order to attain an accurate estimation, a geometric model for the PV modules is established. The segmented contour is then adjusted to conform to this assumed model, as shown in
Figure 6. The resulting rectangular shape possesses distinctive attributes like its longer/shorter edges, center point, and angle. The angle value holds significant importance in this context. It is used to properly find coordinates of each panel. In this rectangular structure, a center point is assigned for each panel with the help of the mask (
Figure 7) used from the OpenCV library as in
Figure 8. Nevertheless, it is evident that there exists a discrepancy among the designated centers for each panel within the panel block. Despite the accurate count of center points, they fail to accurately represent the actual layout. As can be seen from
Figure 9, panel dimensions need to be harmonized with the image. The panel drawing is rearranged to reflect the real situation by using the upper left and lower right corner coordinates of the rectangular structure covering the block and the number of center points assigned to each panel (
Figure 10). Hence, the arrangement of the panels is established using thermal images acquired through drone assistance.
After placing the panels on the map, the existing faulty panels are marked. The examination of hotspot and bypass diode failures relies on color identification with the aid of OpenCV. Initially, colors are categorized into distinct color groups, and color histograms are generated for a detailed color analysis. To create this histogram, the images are converted to HSV (Hue, Saturation, Value) color space. The hue component represents the actual color information of the image. A process known as filtering is employed to isolate the HSV format panel images from their consistent background clutter. Through this, a threshold value is determined by examining the output vector of each filter. By comparing these threshold values to the characteristics of each panel, we select the higher value, thereby identifying the defective panels. Furthermore, the coordinate values were calculated to establish the correspondence between the defective panel and its respective string order.
Detectron2 is a flexible computer vision model package implemented by PyTorch 1.0.0. In the proposed algorithm, Detectron2 is used with Faster R-CNN Mask for faulty object detection, and then faults are categorized. Faults that show continuity throughout the predefined area are considered as bypass diode failure (
Figure 11), and point faults that are seen as regional and scattered in this area are considered as hotspot faults (
Figure 12).
The model proposed in this study was implemented and tested using the images of Site-1 shown in
Figure 13. The general information about the thermal inspection and the inspection hardware is given in
Table 1 and
Table 2, respectively. There are six different power plants (TK-1 to TK-6) on this PV farm; five of them consist of 160 strings with 22 panels each, and the last one consists of 125 strings with 22 panels.
As reported in [
39], accuracy assessment is performed to evaluate the detection results of the testing dataset from the ML algorithms. Three precision metrics, namely precision, recall, and F1-score, are defined as Equations (1)–(3):
where True Positive (
TP), False Positive (
FP), True Negative (
TN), and False Negative (
FN) indicate the correctly detected, the incorrectly detected, the correctly rejected, and the incorrectly rejected objects, respectively.
The area under the receiver operating characteristics (ROC) curve (AUC) value and the above-mentioned accuracy metrics obtained for PV settlements of Site-1 are as follows: AUC of 0.911, Precision of 0.849, Recall of 0.848, and F1-score of 0.848. The actual and predicted results of defects for the Site-1 solar PV plant are given in
Table 3.
With the thermal images at hand, the identification of defective panels and the characterization of the faults were reiterated employing an application known as Orange data mining platform. It is an open-source and component-based visual programming software package for data visualization, machine learning, data mining, and data analysis. From the thermal images acquired, panels were chosen, and individual panel images were captured at a resolution of 24 × 40 pixels and 96 dpi.
In the real situation, 127 bypass diode faults and 38 hotspot faults were detected throughout Site-1. By making use of these determinations, a sample of the system was tried to be created and the sample in question includes a total of 415 images, including all images of defective panels and 250 randomly selected no-fault panel images. Hierarchical clustering of images was performed on the Orange platform. The image transformation was made with the help of the image embedding algorithm, then the distance metrics were applied for calculating the distances. Once the data are passed to the hierarchical clustering, the widget displays a dendrogram, a tree-like clustering structure. According to the branches of the dendrogram, the data are divided into several clusters.
Table 4 shows the number of clusters needed to group each state under consideration with different distance metrics. Comparative representation of the actual and the predicted values is given in
Table 5.
Table 5 reveals that the cosine distance metric yields the most successful results. While all three metrics achieved a 100% success rate in detecting hotspot fault, the algorithm should exhibit greater sensitivity to differentiate between a defect-free panel and bypass diode failure. This observation is consistent with the recorded results, which indicate a correct prediction rate of 96.9% for bypass failure malfunctions and 99.6% for panels without faults.
3.2. Processing Historical Inverter Data
Within this section, we have undertaken a mathematical examination of both hotspot faults and bypass diode failures using the current and voltage measurements obtained from the inverters of Site-1. For this purpose, four different machine learning methods, namely Neural Network, Random Forest, kNN, and Gradient Boosting, were used.
According to thesis study of Kaloorazi and Yazdi [
40], the simulation results show deviation from measurements of 2% in summer and 25% in winter conditions. The reasons for the higher inaccuracy in the wintertime are lower production, higher uncertainty in the albedo values, and more diffuse irradiation. In this study, data from the March–August period collected for 3 years were used. Thus, the effect of seasonal deviations was minimally reflected in the dataset. The dataset consists of instantaneous data obtained from Site-1 and there are also missing data and extraordinary instantaneous data. Therefore, the dataset was revised, and missing and meaningless data lines were excluded.
As is known, bypass diodes are wired within the PV module and provide an alternate current when a cell or panel becomes shaded or faulty. They are used to enhance the output power production during partial shading conditions and to protect partially shaded PV cells from fully operating cells in full sun within the same solar panel when used in high-voltage series arrays.
The three inputs, percentage of voltage drop, percentage of open-circuit voltage, and percentage of short-circuit current, employed by Dhimish et al. [
41] to investigate bypass diode failure, were also incorporated into this study. On the other hand, hotspot faults events have a percentage of 50% compared to all fault events in the PV modules, according to Pramana et al. [
42]. Hotspots in solar panels refer to localized areas on the panel experiencing elevated temperatures compared to the surrounding regions. While they are frequently encountered, predicting their occurrence poses a considerable challenge. Cell temperatures within these hotspots can often soar to 150 degrees Celsius, resulting in permanent and irreversible damage. For this reason, we used the temperature values of the panels as input parameters in this study.
Current and voltage (I–V) values obtaining from the inverters of Site-1 were utilized to create training and testing datasets including two fault types (hotspot faults and bypass diode failures) and a normal operation. The dataset consists of real-time data between March and August of the last three years, including 2021–2023. The reason for choosing the data covering the period in question is that Site-1 receives more sunlight in this period of the year due to its location.
The random sampling method was applied to test the fault detection ability of the algorithms employed and to measure the unbiased estimate of our proposed models. In this random sampling method, the dataset was randomly divided into a training set and a test set (i.e., 75% and 25% of the dataset, respectively). Accordingly, each set contained approximately the same percentage of samples of each class. The overall performance was obtained by determining the average for all 10 iterations. Hyperparameters used for the selected four machine learning algorithms are given in
Table 6.
3.3. Results of Processing Historical Inverter Data
The ability of four algorithms to detect faults in PV plants was evaluated, and the results were achieved, as shown in
Table 7.
Precision is defined as the ratio of the TP to all the positives, as stated in
Section 3.1. That would be the measures of defective panels that, out of all the panels with a fault, our model accurately recognizes as faulting according to our problem statement. For example, in July 2021, the Neural Network achieved a precision score of 0.944. This means that when predicting a panel failure, it is accurate approximately 94%. Similarly, the recall rate is obtained as 0.951. Recall rate also gives a measure of how accurately our model can identify the relevant data. A faulty panel that is not intervened in is an undesirable situation for us. Deciding accuracy of the model requires a tradeoff between precision and recall. Both metrics are important for our classification problem, and the results showed that our model has balanced precision and recall rates giving a good F1-score.
Similar to the artificial neural network, the F1-score, precision, and recall values for the other three machine learning models were above 0.93, and there was a slight increase in these values compared to the artificial neural network. Looking at the averages of the performance values obtained from the data analyzed for three different years and a total of 18 different months, the highest numerical values were obtained for the kNN model.
Duranay [
43] presented the performance metric results of the classification of PV faults and compared the results of different studies given in the literature using the same dataset [
43]. The results reported in the study show that the average precision was in the range of 88.55–98.24%, and average F1-score was in the range of 84.45–97.51%. Based on the comparison between the results of our study and results published in the literature, our approach is successful for anomaly detection in PV plants and consistent with the currently ongoing studies.