Photovoltaic Modules Diagnosis Using Artiﬁcial Vision Techniques for Artifact Minimization

: The installed capacity of solar photovoltaics has increased over the past two decades worldwide, evolving from a few small scale applications to a daily power source. Such growth involves a great impact over operating processes and maintenance practices. The RGB (red, green and blue) and infra-red monitoring of photovoltaic modules is a non-invasive inspection method which provides information of possible failures, by relating thermal behaviour of the modules to the operational status of solar panels. An adequate thermal measurement module strongly depends on the proper camera angle selection relative to panel’s surface, since reﬂections and external radiation sources are common causes of misleading results with the unnecessary maintenance work. In this work, we test a portable ground-based system capable of detecting and classifying hot-spots related to photovoltaic module failures. The system characterizes in 3D thermal information from the panels structure to detect and classify hot-spots. Unlike traditional systems, our proposal detects false hot-spots associated with people or device reﬂections, and from external radiation sources. Experimental results show that the proposed diagnostic approach can provide of an adequate thermal monitoring of photovoltaic modules and improve existing methods in 12% of effectiveness, with the corresponding ﬁnancial impact.


Introduction
Accelerated demographic and economic growth in several countries has led to an increase in the electrical energy demand. Currently, Chile promotes the electric power generation with non-conventional renewable energies, mainly solar photovoltaics (PV), because of the country outstanding sunlight conditions, its climate and its geographical location [1]. However, despite favorable characteristics, technological innovations and advances of the electrical sector, there is a concern regarding to the PV-module performance and duration in desert environments. It is estimated that approximately 27% of PV-plant failures occurred as a result of damage to PV modules [1]. In this context, preventive maintenance carried out periodically could extend the PV-plant lifetime, providing trouble-free operation.
The future of the photovoltaic plant inspection is focused on the maintenance robotics with emphasis on robots able to detect and correct damaged electric equipment [2]. Nowadays, both autonomous robotics and tele-operated machines, despite being useful, have found only limited application because of payload capacity of platforms (mainly aerial platforms), limited access and rugged environments [3].
Robotic platforms can be combined with Internet of Things (IoT) and artificial intelligence algorithms, perform a variety of PV-related tasks such as visual inspection [2,4] (modules, wiring and/or other plant equipment), infrared thermography [5] (hot-spots detection) and vegetation Operational and maintenance traditional practice, commonly known as a truck roll, is a method that mainly involves dispatching personnel and mobile vehicles to a PV-plant, to carry out routinized inspections and equipment servicing tasks -preventive maintenance-or to correct equipment failures after their occurrence -corrective maintenance-. These truck rolls typically cost companies between 300 and 600 dollars per visit depending on labor and fuel costs, as well as distance of the dispatch [15]. If using robotized machinery, the costs might vary between 1.000 and 5.000 dollars for climbing robots. In addition, aerial monitoring can costs thousands of dollars, like the Unmanned Aircraft System (UAS) developed by Electric Power Research Institute, which costs between 16.000 dollars and 100.000 dollars per unit. However, these aerial platforms have operated costs relatively small [15].
Truck roll using ground robots is another inspection alternative which promises to be an adequate solution for performing the maintenance work in photovoltaic plants [3]. Nowadays, significant progress has already been made in several fields, becoming in an advanced technology, which is used to develop maintenance task in free access places due to its great autonomy [18]. These systems are ideal technology for heavy duty tasks such as detecting and correcting damages over photovoltaic panels or to perform their cleaning [11]. Nevertheless, the systems have important challenges related to detection system of damages and the navigation in the PV-plant [10].
A variety of different defects stemming from manufacturing, internal module damages, faulty interconnections, defective bypass diodes or hard and soft shadowing affect the PV equipment [19]. Early warning of these failure conditions enables to find appropriate solutions to improve efficiency, while enhancing the PV system economics and reducing the labor cost [20]. Ultrasonic methods [21], infra-red analysis [22,23] and electroluminescence imaging [24] allow to identify and reject defective cells during the early stages of manufacturing process. However new damages are possible to appear either within the assembly stage or during the operating lifetime.
Photovoltaic module maintenance technologies can be classified in two groups: invasive and noninvasive. Invasive technology uses the module proprioceptive information (e.g., voltage and current of the module, internal temperature) to sense a fault condition. With this aim, methods based on AC parameter characterization [25], comparison of the PV model in normal and test condition [26,27], laser beam induced current [28], electron beam induced current [29] and DC electrical parameters [30] have been developed. Unfortunately, these methods often require calibration of models and specific sensors network, restricting their usage. On the other hand, noninvasive methods use exteroceptive sensors [15] (e.g., monocular camera, laser, infra-red camera) to perform the PV-plant inspection. In addition, exteroceptive sensors used can be mounted in a robotic platform. However, the usage of this technology is limited by adverse environmental conditions. Imperfections over PV-modules may be seen as hot-spots in the thermal images as a consequence of the abnormal short-circuit current in at least one PV-cell [15,31]. This unusual behaviour appears when PV-cells are totally or partially shaded, cracked, damaged or electrically mismatched. Under these conditions, defective cells are forced to conduct a current higher than their generation capabilities, becoming reverse biased, entering in a breakdown regime and subsequently sinking power instead of sourcing it. These issues can be detected using a visual and a thermal analysis. However, one important challenge is related to automatic detection of hot-spots in a thermal image. Since the inspection system needs to be able to detect the PV-structure, determining hot-spots in images and localizing the damages in the PV-module, a variety of algorithms based on matching learning and computer vision have been used. For example, Tsanakas et al. proposes a hot-spot detection algorithm based on the image histogram and line profile (see [32]), although this approach strongly depends on the thermal viewing patterns (only used with high contrast mode). In addition, it does not filter false hot-spots, as well as hot-spots in the background of the image. With the same aim, in [33,34] it is proposed an algorithm based on standard thermal image processing and Canny's edge detector, with similar results and without facing the problem of the reflection, artificial light sources and external hot-spots. M. Aghaei et al. shows the defects in PV-modules using a Laplacian model and a Gaussian filter [35]; however the false hot-spots analysis is not addressed. Additionally, photovoltaic modules can be detected using calculation of the co-occurrence matrices for fragments of images, as shown in [36]. On the other hand, image segmentation using k-means was proposed in [37] which needs the previous conversion of each acquired frame into CIELAB color space, as also shown in [38].
In this work, an inspection system of PV-modules is presented with the aim of characterizing the most representative artifacts associated with the PV's functionalities, and hence to improve preventive maintenance. The proposed system detects and classifies hot-spots associated with PV-module failures, by eliminating false positives related to external radiation sources and reflections. Due to the system flexibility, it can be mounted on any manual, tele-operated or robotic platform. The issue addressed in this work can be expressed as follows: given an RGB and infra-red image set, the goal is to identify hot-spots stemming from manufacturing defects, module damage, temporary shadowing, defective bypass diodes, and faulty interconnections. The proposed system is described in two stages: PV-module detection and hot-spots classification.
In the first stage, unlike the works presented in [16,36,[39][40][41][42], we use the same visual information acquired to localize the sensor and to reconstruct the PVs. The latter is based on an artificial vision system strategy called photogrammetry, but instead of using RGB (red, green and blue) information, as used in [43][44][45], we use the same thermal information. The method was empirically and theoretically validated in a previous work of the authors shown in [46]. The second stage is focused on using the 3D reconstruction and visual information processing to extract artifacts from the PVs. This stage includes the artificial intelligence algorithms used for classification and pattern recognition described herein.
This manuscript is organized as follows. Section 2 presents in detail the hardware, software and protocols followed to test our methods for PV characterization; Section 3 shows the results obtained when tested our approach on PVs under different environmental and lightning conditions. Section 4 shows a conscientious pros and cons of our approach as well as a comparative table of our approach with others already published that face similar issues as the ones presented herein. Additionally, we include an analysis of the financial impact of our methodology in preventive maintenance tasks. Finally, Section 5 shows the conclusions and our future work.

Material and Methods
The infra-red inspections performed in this work uses long wave infra-red detection methods, suitable for detecting a host of different risks in PV-modules. We use a monocular camera to acquire the RGB and thermal environmental features. The data are sent to a companion station for its processing and evaluation, where the risky hot-spot cells are identified, and the size of the affected surface is computed. All algorithms presented here were implemented in C/C++ under Windows 10 operating system and in Matlab R2017a programming environment. The system operation is summarized as follows: 1. The device is exclusively used for RGB and thermal inspection of PV-modules. The system can be used under variable lighting conditions, but not under direct sunlight. 2. The device is positioned facing the PV-structure at different locations. The distance from the tripod to the structure base and tilt angle of the camera vary depending on field conditions. 3. The distance of the tripod locations between two consecutive images was empirically computed (about 20 cm), in order to ensure proper performance of the matching algorithm (as stated in [47]). 4. The structure supporting the camera can be moved around a horizontal axis, as shown in Figure 1a.
Roll and yaw rotations are blocked on the tripod, as shown in Figure 1b. 5. The RGB and thermal images, from a single location, are merged to obtain a new 2D representation with visual and thermal information. The used thermal camera has a fusion mode, which allows to directly merge thermal and visual images for each location. The latter is important since photovoltaic modules need to be displayed at the proper angle relative to their surface to obtain accurate thermal measurements and reduce the probability of misinterpretations. 6. The proposed two-step algorithm isolates the PV-structure and detects collapsed cells by analysing the visual and thermal information. 7. The PV-module inspection involves storing a merged image (thermal and visual information) of each tranche of PV-structure (between modules), with reference position. In addition, the system returns an inspection report with the location of each hot-spot and the damaged area. 8. Finally, a 3D view, providing thermal and geometrical information of the PV structure, is made available.  Following, each step is explained in detail.

Hardware Design
The thermal camera was mounted on a manually-operated tripod, as shown in Figure 2. The exteroceptive data provided by the sensor are stored in a local memory card and later processed on a ground computer. Briefly, • The device deployed in real applications is a commercial tripod Soligor WT-330A, whose technical characteristics such as the weight (0.73 kg) and height (51.5 cm), allow for its portability in inhospitable and rugged environments. The tripod has a load capacity of 3 kg, that is suitable for this type of applications. • Visual and thermal images are acquired with a Ti25 Fluke thermal camera. This device is mounted on the plate of the tripod, aligned with the vertical axis. Each new frame is stored locally in a 16 GB internal memory card with its respective time stamp. • Both cameras have been previously calibrated to find the focal point and estimate their main parameters.

Figure 2.
Proposed measurement system. The system is composed of an thermal camera Fluke Ti25, which is provided with a monocular RGB and infra-red camera. The device was mounted on a commercial tripod.
The technical specifications of the proposed system are summarized in Table 2.

Photovoltaic Module Segmentation
To filter all hot-spots it becomes mandatory the implementation of an efficient segmentation of the PV-modules, especially when such hot-spots are not associated with PV-structure. In this section, the mathematical formulation and the detailed analysis of the segmentation algorithms are derived.
The architecture of the module extraction algorithm is shown in Figure 3, and summarized in the following sections. Hotspots are detected and classified using probabilistic analysis.

A full 3D view,
is then available. The false hot-spots are providing thermal and geometrical information of the PV-structure filtered.

1.2
Pre-processing PV-module detection Data analysis Hot-spot 2

Pre-Processing Images
Lens distortion and noise are two phenomenons that directly disturb the acquired images (both RGB and thermal). To measure PV-panel distances in world-units and to compute the camera's position on the environment, these phenomenons must be filtered out. With this aim, traditional camera calibration method is used as presented in [48]. In addition, digital processing algorithms -presented herein-help to reduce the noise and correct image defects, guaranteeing the PV-module detection.

Matching Algorithm
Due to the low resolution of the infra-red camera and with the aim of detecting false hot-spots, the PV-module is acquired in different images and in multiple frames. All pre-processed images are then merged. To do this, we implemented the matching algorithms previously published in [47], to get an image with the desired PV-structure. Additionally, the camera position is determined in this step using structure from motion, which is a process that estimates the 3D structure of a scene from a set of 2D views [43]. In addition, a pre-processing stage based on Brightness and Contrast Adjustment, previously published in [49], it is used to improve the photovoltaic module detection.

Background Filtering
The merged image has additional objects, which are not related to the PV-structure. These objects from the scene have to be filtered or eliminated to isolate the PV-modules. With this goal, the merged image is subjected to two thresholding conditions. First, the color constrain is applied to obtain a gray-scale image. Then, since the PV-module brightness is related to the saturation of the image, it is possible to eliminate all secondary objects by manipulating these parameters. The thresholds are manually defined by evaluating the histograms of the gray-scale image and the saturation image in off-line mode. Finally, the system refines the PV-structure estimation using a filter, which aim is to remove all connected components that have fewer than P pixels. Such parameter, P, is determined off-line and it is related to the module size. This step returns a binary mask associated with the surface of PV-modules.

Perspective Correction
The inclination of PV-modules is reflected on the binary mask as a perspective distortion. This phenomena must be considered and corrected to compute the real position of the each detected hot-spot. Homographic mapping method illustrates the relationship between two different views of the same real world scene. Let p and p be the corresponding projected image points on the image plane of two different views of the same point located in the 3D real world coordinates system, where the coordinates of this pair of matching points in homogeneous form can be respectively denoted as (x 1 , y 1 , z 1 ) T and (x 2 , y 2 , z 2 ) T . The homographic mapping is a planar projective transformation, that can be expressed as shown in Equation (1) for an homogeneous form. The main challenge is the selection of vectors [x 1 , y 1 , z 1 ] T to compute the homogeneous transformation matrix H: Due to the fact that the system is positioned facing rectangular PV-modules, the proposed algorithm searches for patterns with similar characteristics to module edges on the binary mask. Hough transform can be successfully used to solve this problem, since this method allows to identify the section of the binarized image where high probability of finding straight lines exits (see [50] for further reading). The Hough transform defines a straight line as a co-linear set of points, mapping R 2 into the function space of sinusoidal functions defined by: where ρ, θ are the perpendicular distance of the line i to the center of the coordinates and the angle between the normal of this line and x-axis, respectively. Figure 4 illustrates the relation between ρ, θ and line i . Hough's parameters (ρ and θ) allow to find the horizontal and vertical metal edges of the PV-module. Since there are several metal edges in the merged image, related to the amount of inspected PV-modules, the algorithm selects those edges that do meet two conditions: (a) two horizontal lines, that are parallel and equidistant, and have the maximum separation among them; (b) two diagonal lines, that have a slope between [−30 • , −30 • ], are complementary and have the maximum separation among them.
Once the four lines have been detected, the system finds the specific cut points, which are then used for solving the homogeneous transformation matrix. This step returns a binary mask correcting the perspective distortion and the homogeneous transformation matrix.

Photovoltaic Structure Refined
Sometimes, the corrected binary mask eliminates a portion of the PV-structure due to the thresholding process. To avoid this, the system uses Normalized Cross Correlation (NCC) to evaluate the similarity between different surfaces of the image with a fixed pattern, which is determined in off-line mode, and it is related to the dimension of the module in an image. The NCC is a cosine-like correlation coefficient, which is defined as: where: f is the corrected binary mask; t is the mean of the fixed pattern selected; and f u,v is the mean of f (x, y) in the region under the fixed pattern selected.
If the value of NCC is closer to 1, then it represents that two images are more similar. Finally, the algorithm returns a refined binary mask with the surface of PV-modules and the number of the analysed PV-modules.

Inspection Algorithm
Once the surface of PV-modules is segmented from the rest of the environment with the previous method, the algorithm detects probable hot-spots using infra-red information provided by the 2D cloud.

Temperature Scale Adjustment
The correlation between the PV-module operating temperature T c and the three basic environmental variables (the ambient air temperature T a , the air velocity V f and the incident irradiance flux G) is computed by the following semi-empirical equation [51]: With this information, the algorithm finds a simple and fast correlation between the expected temperature of each PV-cell, and the measured ones obtained from the field thermographic inspection. The estimated temperature of PV-cell is subtracted from each acquired image, in order to obtain an image with the temperature variation.
The temperature scale adjustment procedure of a thermal image I t (x, y) (gray-scale mode) can be formulated as follows: where (x, y) is the image coordinates, T max and T min are the maximum and minimum temperature of the thermal image respectively and T c is the estimated temperature of the PV-cell.

Hot-Spot Detection
Ideally, the estimated temperature of PV-cell is similar to the temperature provided by the infra-red sensor. In this work, it was empirically determined that a variation of 5 • C induces an abnormal overall temperature pattern, witnessing a potential hot-spot. In addition, this temperature was selected based on the thermal camera accuracy. The algorithm filters all temperatures that are not more than 5 • C, and puts a one in those temperatures that fulfil this condition.
The algorithm clusters the measurements on the raw binary image. To reduce computational time, the algorithm uses an edge detector. Edge detector stage extracts the edges of tentative hot-spots from the rest of the image, and it is based on a combination of contrast adjust and morphological operations.
Then, all measurements related to same hot-spot are merged using Fuzzy C-Means algorithm [52] and each characteristic is stored in a matrix of measurements M t for each time t.
where x t i and y t i are the coordinates of the probable hot-spot in pixels.
Since several hot-spots associated with the same characteristic are detected in different frames, it is necessary to relate the frame t + 1 to frame t. Therefore, the corresponding points between two sequential images are initially found in order to compute the displacement and the rotation between both images. These points allow for the system to deliver a transformed version refereed to an initial image, which is then analysed in order to detect the probable hot-spots and to create the matrix M t+1 . The merging between matrices M t and M t+1 at time t and t + 1 can be performed using Mahalannobis distance, as shown in Equation (8).
where M t i are the coordinates of i-th detected characteristic by the sensor, M j t+1 are the coordinates of j-th previously detected characteristic and Σ is the co-variance matrix of the hot-spot, associated with the j-th previously detected characteristic. The algorithm begins with an empty matrix M 0 .
Then, if such distance is greater than an established threshold, the detected characteristic is a new hot-spot. Otherwise, the system merges the detected characteristic with the associated hot-spot. The new mean is defined as: where µ n and µ n−1 are the coordinates of the center of the hot-spot for n and n − 1 detection respectively. Due to the system mainly searches damaged PV-cells, the threshold is directly determined with the PV-cell width measured in pixels. This parameter is determined in off-line mode.
The new covariance matrix associated with the hot-spot is computed as: where Σ i M k,m is the element (k row, m column) of the covariance matrix of the detected characteristic.

False Hot-Spot Extraction
In this work, our system detects false hot-spots from reflections by analysing the statistical behaviour of the hot-spots.
Once there are not new measurements related to a previously detected hot-spot, it is necessary to verify if this hot-spot is a consequence of module defects. An internal hot-spot always appears in the same placement in an image, regardless of the camera position. In this work, since the camera moves around the y-axis, false hot-spots will be located in different position on each image. To differentiate between a false hot-spot and a true hot-spot, the system computes the difference between the hot-spot covariance matrix Σ and the covariance matrix of the last hot-spot detection Σ last M . Frobenius distance is used, as shown in Equation (9).
If this distance d mat is less than a threshold, which is determined as 10% of the value of the PV-cell width squared, the hot-spot is a consequence of external radiation sources.

3D Reconstruction
The set of images (both RGB and infra-red) must be attached to a common global reference frame, to achieve a complete view of the PV-structure. To fully characterization the PV-structure, an algorithm based on image matching, perspective correction, norm cross-correlation and Hough transform was implemented. Briefly: 1. The matching algorithm previously detailed in Section 2 returns a panoramic view of all PV-structure and the camera's locations for each image respect to the first image. 2. The perspective distortion of the panoramic view is corrected with the homogeneous transformation matrix computed in Section 2. The binary corrected mask is applied to this corrected panoramic view, obtaining the photovoltaic surface viewed from a parallel plane. 3. The normalized cross-correlation computed in Section 2 provides the number of PV-panels in the analysed images and the location of each PV-module. The algorithm takes advantage of the PV-module shape and determines the width and height of each panel by comparing the distance between boxes determined in the images and the real distances of the PV-module. 4. The system eliminates false hot-spots detected, and replaces their area with the estimated temperature of the PV-cell T c . 5. The system returns the 3D fully characterization of the PV-structure and the location of the camera.

Results
The experimental part consisted on the evaluation of an array with eight PV-modules. The thermographic measurements took place in the city of Valparaíso, Chile, by three daily sets, i.e., January 14, 15 and 16 of 2018, under variable sky conditions. Each set included three instant measurements, according to the time: (i) 08:00 hs, power on of modules; (ii) 12:00 hs, steady-state conditions; and (iii) 18:00 hs, power off of modules. To compute the algorithm robustness regarding variations of camera position and lightning conditions, the images were acquired at two distances from the PV-structure: at 3 m (on January 14th) and 4 m (on January 15th and 16th). An overview of the recorded environmental conditions is shown in Table 3. Ambient air temperature, wind velocity and humidity were obtained by a local weather station and a portable temperature sensor. We measured the solar irradiance flux using a pyranometer. The illuminance values were measured using a conventional luxometer.
The inspection system was mounted on a commercial tripod. The complete system was positioned in front an array of monocrystalline silicon photovoltaic modules, whose main technical characteristics are summarized in Table 4. To obtain the entire PV-structure, the system was displaced in a straight line path, equidistantly to PV-structure, maintaining the camera plane fixed. About 40 images (both thermal and RGB) were acquired in each test.
The status of the tested photovoltaic modules is in proper operating condition. Under this state, we generated four hot-spots in the structure by shading two PV-cells. Figure 5 shows a picture of the tripod facing the PV-structure tested here.    Figure 6 presents the resultant images in all four stages of the PV-module detection approach, with regards to: (a) Photovoltaic array analysed at 8:00, the system was positioned at 3 m with respect to PV-structure; (b) Photovoltaic array analysed at 18:00, the system was positioned at 4 m with respect to PV-structure; and (c) Photovoltaic array analysed at 12:00, the system was positioned at 4 m with respect to PV-structure.  Figure 6, in all cases, depicts the merged image. The raw merged image is subjected to thresholding condition, which is based on the image saturation and a color filter. The thresholds are determined by analysing the histograms of the gray scale image and the saturation image in off-line mode, as shown in Figure 7. For the first case, the usual range for module detection factor is [30,85], as shown in Figure 7a. The usual range of the saturation in this experiments for each analysed image is [0.6, 0.8], as shown in Figure 7b. The usage of Hough transform allows to correct the perspective distortion, as shown in third image row of each case. In addition, this step returns the homogeneous transformation matrix. The segmentation is refined by finding the maximum values in the Normalized 2D cross-correlation, as shown in Figure 8. This step provides us the location of each panel in the general image, as shown in Figure 9. The resultant images from this stage provide a valuable sum of binary data, overly clear from possible erroneous variation. These data, in the form of the images with the location of each PV-module, constitute the mask of all images.  The PV-surface detection is an important action in order to guarantee the true detection of hot-spots. The algorithm in its first part applies image processing tools and develops a cropped module image with only cell regions, isolating the PV-module from the rest of the environment, as shown in Figure 10.

Hot-spot 1 True Hot-spot 3 True
Hot-spot 2 True Hot-spot 4 True Figure 10. Results of the hot-spot detection: The system searches for two hot-spots over the analysed photovoltaic module. The camera is positioned facing the PV-structure at 3 m.
Four measures are used to evaluate the obtained results quantitatively. On the one hand, the numbers of correctly detected pixels, either belonging to the object or to the background, are respectively called true positives (TP) and true negatives (TN). On the other hand, the numbers of incorrect detection are, respectively, called false positives (FP) for background pixels included into the object or false negatives (FN) for object pixels included into the background. These different measures are used in the computation of six parameters, two special parameters: Dice coefficient (DIC) and Jaccard index (JCD), as well as the four traditional parameters: precision, sensitivity, specificity, and accuracy. Table 5 shows the statistical analysis of the photovoltaic module detection algorithm. It is worth noticing that our proposal's accuracy rises up to 96.33% in the best case and 94.05% in the worst case, whereas its precision is 95.93% and 92.86% for the best and worst case respectively.

Hot-Spots Detection
Once the system isolates the PV-modules from the rest of the environment, the algorithm identifies the position of hot-spots on each PV-module. Four hot-spots were generated in the PV-structure by shading two cells, which generated a temperature change in the cell surface and two punctual hot-spot above of each one. The results of hot-spot detection are shown in Figure 10. It is possible to observe that the covariance matrix -coloured circles-is maintained constant when the system detected a true hot-spot, and it wraps the area of the hot-spot. In addition, the mean value of the estimated hot-spot -red circle-was approximately located in the center of the real hot-spot.
As previously mentioned, the performance of the algorithm is analysed through four measures: the number of correctly detected pixels belonging to TP, TN, FP and FN. These different measures are used in the computation of three parameters: precision, sensitivity and accuracy. The statistical analysis for each experiment is shown in Table 6. It is possible to note that the algorithm is able to detect surfaces affected by hot-spots with a precision of 98.0% and accuracy of 97.1% in the worse cases respectively. Table 6. Statistical analysis of hot-spot detection algorithm.

Day
January 14th January 15th January 16th

False Hot-Spots Detection
To test our system, we simulated three hot-spots associated with the linear edge shunt (see [53]) in a monocrystalline photovoltaic module, and using an external radiation source, we generate a false hot-spot in the PV-module surface, as shown in Figure 11. Data acquisition consisted on taking thirty visual and thermal images in order to completely scan the PV-module. The complete system was located facing the PV-structure at a distance of approximately one meter to ensure that the cameras acquired all PV-module in each frame. This distance was determined by performing a first scan and then manually verifying that the entire PV-module was acquired on each frame. The angle between to ground and PV-module planes is approximately 80 • , in order to generate the false hot-spot associated with the external source radiation used. Initially, each acquired image was pre-processed using the photovoltaic module detection algorithm. Figure 12 shows the results of the fusion algorithm and the results of the hot-spot detection algorithm. It is possible to observe that the covariance matrix -color circles-is maintained constant when the system detected a true hot-spot, and it wraps the area of the hot-spot. In addition, the mean value of the estimated hot-spot -red circle-was approximately located in the center of the real hot-spot.
On the other hand, it is possible to note that the covariance matrix increased for false hot-spots, wrapping a greater area than the area of detected hot-spot. In this case, the mean value of estimated hot-spot was located outside of the real hot-spot. The fault diagnostic of each detected hot-spot is shown in Table 7. The system returns the location of each hot-spot respect to upper border of PV-module, the damaged surface and the reason the possible failure.

3D Reconstruction
The system provides the 3D visual and thermal reconstruction of PV-modules, as shown in Figure 13, which offers a complete morphological characterization of each PV-module. If the system detects false hot-spots, the surfaces associated with false hot-spots are replaced with average temperature from PV-module in good condition. Figure 14a,b respectively show the results of 3D-thermal reconstruction with and without false hot-spots.

Discussion
In this work, a fault diagnostic algorithm based on thermographic analysis was proposed. The experimental results showed that the system was capable of detecting PV-modules with approximately 94.05% accuracy for each studied case. The system used the geometric patterns of photovoltaic panels. For this reason, the previous training is not necessary. The computational burden was less than 0.1 s. for each acquired frame. An important disadvantage was related to data acquisition, since it was completely manual in this work. This drawback can be overcome by mounting the inspection system in an autonomous or tele-operated robotic platform.
Once that PV-modules were segmented, the system was able to detect hot-spots associated with photovoltaic failures on PV-modules. In contrast with traditional and commercial systems, our proposal was capable of determining if a detected hot-spot was related to panel failures (true hot-spot) or external agents such as speculator objects present in the background (false hot-spot), which could cause false alarms. Unfortunately, there are further limitations referring to the lack of damage classification ability, which is under research by the authors.

Comparison with Existing Approaches
To test the effectiveness of our approach against others previously published, we repeated the experimentation shown in Section 3 with the following approaches [32,33,37]. We chose such works since they better resemble the goals of our research. However, the three methods has two limitations: (i) the analysed methods extract manually the regions of interest (PV-modules). In this context, we test the PV-module segmentation algorithm with these techniques; (ii) the three methods cannot detect false hot-spots, they are limited to true hot-spots, unlike our work.

ROI, Line Profile Analysis and Image Histogram Analysis
Tsanakas et al. proposed in [32], an algorithm for detection of damaged PV-cells, which is based on image histogram analysis and line profile analysis. The main aim of the algorithm is to find regions on the PV-module with elevated risk of failures. In contrast with Tsanakas' algorithm, in our work, we automatically find the regions of interest (ROI) by applying the proposed PV-module detection algorithm. Since our procedure finds all PV-module in the merged image, the histogram analysis is simplified. Figure 15 shows, the histograms of ROI 1, 2 and 3, for the measurement of January 14th at 8:00, with regards to detected modules (5 and 8). Although in the three histograms, there is a main pixel (Y-axis) distribution in the temperature (X-axis) range from 24.48 • C to 24.61 • C that practically corresponds to estimated cell temperature, the histograms of ROI 2 and 3 are characterized by a second distribution data, approximately between 28.1 • C and 30 • C, that corresponds to damaged cells in each ROI. In addition, Tsanakas et al. locates hot-spots using line profile analysis of the regions of interest previously analysed. The temperature is relatively fixed in the the line profile analysis of the ROI 1. It implies that the ROI 1 is not affected by a hot-spot. On the other hand, the temperature increased between pixels 225 and 255 for the ROI 2, indicating that the region is affected by a hot-spot between these pixels. Similarly, the ROI 3 is affected by a hot-spot between pixels 800 and 900.

Color Segmentation with k-Means
Salazar et al. proposed a hot-spot detection algorithm, which segments colors in an automated fashion using the CIELAB color space and K-means clustering. This technique has two important disadvantages: (i) the algorithm does not extract the PV-module from the rest of the environment; (ii) The algorithm can be only used with images acquired with high contrast mode. Figure 16 shows the results of the algorithm. Sometimes, the algorithm performs a bad segmentation because of the confusion of the colors. In addition, if the hot-spots are small, the system eliminates these failures.

Panel 5
Panel 8 Panel detected Hot-spot detection

Bad segmentation
Hot-spot Hot-spot  Figure 17 shows the resulting images in all four stages of the intended diagnostic approach with regards to: module 5 and module 8. The first column depicts the raw thermal images of each case. The binary mask is presented in the second column. The last two columns show the results from the applied edge detector and the output of the algorithm. Depending of threshold selected in the stage of binarization, the small hot-spot can or cannot be detected.

Raw thermal image
Thresholding Canny edge detector Output edge map/count Figure 17. Results of Canny edge detection and output edge map/count applied to: module 5 and 6.

Statistical Analysis
The three methods are evaluated with the metrics described previously in Section 2. The comparison is shown in Table 8. It is possible to note a 12% increase in the algorithm precision with respect to other existing methods, improving the thermal monitoring of the photovoltaic structure. An attractive and novel advantage of our system is the capacity of filtering the false hot-spots automatically. In addition, system has a particular characteristic that makes it more attractive for industrial applications: its detection time is less than 2.7 s, which compared to other methods has a significant improvements (e.g., the algorithm based on color segmentation takes 25 s).

Potential Benefits
Currently, the infra-red inspections of PV-modules utilizes Long Wave Infrared detection methods, suitable for detecting several damages in PV-cell. Such defects can be stemmed from a host of different errors (e.g., manufacturing defects, module damage, partial shadowing, PV-cell delamination). The traditional systems carry out a zone-inspection to reduce the maintenance time. This inspection allows to identify defective modules or rows of defective modules and, sometimes, damaged cells or rows of damaged cells . However, several defects are significantly small, and due to the low resolution of thermal cameras, they cannot identified. Unlike traditional systems, our proposed system performs a detailed inspection that allows to detect a single cell, partial cell and regional cell heating.
Methods based on short wave infra-red technology are carried out in field to detect snail trail, dead spots, voids or micro-cracks, but they requires of controlled conditions (e.g., Electroluminecence technology detects PV-cell defects in a dark environment).
In addition, our system is able to automatically isolate PV-structure from the environment background. This characteristic will allow to mount the system in a robotic platform to optimize the inspection time. Table 9 summarizes the main contributions of the proposed system, comparing with other methods analyzed in this work.

Assessing tHe Costs and Benefits of System
Determining the cost-benefit of system is a difficult proposition given the early stage of the system and a general lack of available data. Generally, most crystalline silicon solar cells decline in efficiency by 0.50%/ • C and more amorphous cells decline by 0.15-0.25%/ • C. In Chile, it is estimated that approximately 27% of PV-plants failures occurred as a result of damages in PV-modules. It is known that the performance of PV-modules reduces with the temperature increase and, sometimes, this increment can be elevated. The monthly losses can be analyzed using the following factor L t , which is computed as follows: L t = g × (T c + 25) where g is a temperature factor provided by manufacturer, that indicates the power decrease when the cell temperature increases 1 • C, and T c is the PV-cell temperature. Considering a period time of one year, it is obtained a mean value for L t of 9.5%. On the other hand, two phenomena that affect the PV-module are dust, particles and dirt, and the shadowing. Different researches show that the losses associated with dust, particles and dirt must be less than 3%, and losses related to shadows must be less than 2%. Our approach can detect these failures using the visual inspection and thermography monitoring in a simple and easy way, which helps to increase the PV-panel efficiency.

Conclusions
In this work, a PV-module fault diagnosis algorithm based on infra-red thermography was proposed and experimentally assessed. The system was able to detect and classify hot-spots stemming from manufacturing defects, module damage, temporary shadowing, defective bypass diodes, and faulty interconnections. The two-stages algorithm allowed us to isolate the PV-modules from the rest of the environment and to detect real hot-spots while filtering false hot-spots. Concerning our PV-module detection algorithm, we found the PV-module with a precision of 92.86% and an accuracy of 94.05% in the worst case. On the other hand, the system had a precision of 95.12% and an accuracy of 94.19% in the hot-spots detection. In addition, our system was capable of filtering false hot-spots due to the analysis of hot-spot position in each frame and the proper segmentation provided by the detection algorithm. Experimental results showed that the quality of the output depends on the accuracy in the classification and segmentation of the module in the RGB camera readings and the thermal image, respectively. Misclassification produced due to the mixed pixels problem could lead to incorrect conclusions about the thermal status. This work pushed forward some artificial vision methods applied to the exploitation of information provided by different sensors. The absence of such technology commercially available will lead the authors future work in order to design, develop and test more efficient hardware and accurate processing algorithms.