# Thermal Image and Inverter Data Analysis for Fault Detection and Diagnosis of PV Systems
## 3 Method and Analysis
### Thermal Imaging, Panels Settlement, and Fault Detection
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). Figure 8: Center points assigned to each panel. Figure 6: Drawing of rectangular structure covering panel blocks. Figure 7: Rotated mask for finding the center point of each panel. Figure 9: Panel dimensions requiring enhancement. 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 Tables 1 and 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. Figure 11: Example of activated and multiple activated bypass diode failures. Figure 3.0 Example of hotspot fault. Figure 3.1 Plant layout for Site-1. 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):  
Figure 3.2  
Figure 3.3  
Figure 3.4  
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 Figure 3.5  
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 \begin{table}
\begin{tabular}{l l} \hline
**Site Name** & **Site-1 (Malatya, Turkiye)** \\ \hline Inspection Location & 38.230585833, 38.049603833 \\ Irradiance & \textgreater{}600 W/m\({}^{2}\) \\ Wind Speed & \textless{}5 m/s \\ Inspection Summary & 1 round of visual scanning \\  & 1 round of thermal scanning \\ \hline \end{tabular}
\end{table} 
Table 1: Inspection Overview. \begin{table}
\begin{tabular}{l l} \hline
**Description** & **Specification** \\ \hline Drone & DJI Matrice 300 \\ Visual Camera & DJI Zenmuse H20T \\ Visual Camera Resolution & 4000 \(\times\) 3000 \\ Thermal Camera & DJI Zenmuse H20T \\ Thermal Camera Resolution & 640 \(\times\) 512 \\ Operating Range (0C) & \(-\)25 to 153 \\ Sensitivity (NedT) & \textless{}50 mK \\ \hline \end{tabular}
\end{table} 
Table 2: Inspection Hardware.