Automatic Detection System of Deteriorated PV Modules Using Drone with Thermal Camera

: In the last few decades, photovoltaic (PV) power station installations have surged across the globe. The output efﬁciency of these stations deteriorates with the passage of time due to multiple factors such as hotspots, shaded cell or module, short-circuited bypass diodes, etc. Traditionally, technicians inspect each solar panel in a PV power station using infrared thermography to ensure consistent output efﬁciency. With the advancement of drone technology, researchers have proposed to use drones equipped with thermal cameras for PV power station monitoring. However, most of these drone-based approaches require technicians to manually control the drone which in itself is a cumbersome task in the case of large PV power stations. To tackle this issue, this study presents an autonomous drone-based solution. The drone is mounted with both RGB (Red, Green, Blue) and thermal cameras. The proposed system can automatically detect and estimate the exact location of faulty PV modules among hundreds or thousands of PV modules in the power station. In addition, we propose an automatic drone ﬂight path planning algorithm which eliminates the requirement of manual drone control. The system also utilizes an image processing algorithm to process RGB and thermal images for fault detection. The system was evaluated on a 1-MW solar power plant located in Suncheon, South Korea. The experimental results demonstrate the effectiveness of our solution. approach on a real 1-MW power plant location in Suncheon, South Korea. Our results demonstrate that the proposed method can accurately detect and locate faulty modules autonomously.


Introduction
The development of renewable energy has gained a lot of attention worldwide. This increased interest in renewable energy is primarily due to environmental problems such as global warming, abnormal weather, depletion of fossil fuels, etc. Among various renewable energy sources, solar energy has attracted much attention in the renewable energy sector as a pollution-free, sustainable, and abundant energy source. Photovoltaic (PV) power station installations have significantly increased worldwide over the past few years. A PV power station typically consists of hundreds or thousands of PV modules which are connected together in a series circuit. These PV modules are the key components in a solar power station since the output efficiency of these stations are dependent upon these modules.
Unfortunately, PV modules are subject to various defects with the passage of time, which leads to adverse problems such as low-power efficiency. Usually, the electrical characteristics of all PV cells in the string are similar and operate at the maximum power point (MPP) current to achieve each cell's optimal output. However, when there is a discrepancy among the cell electrical characteristics, the single string current is not able to operate at every cell's MPP, which causes minimal performance [1]. The most common factors that lead to such discrepancy are partial shading, degradation, short-circuited bypass diodes, etc. When there is one low current PV cell (e.g., due to weed shadow) in the string of several high short-circuit current PV cells, the forward bias across all of these cells reverse biases the shaded cell, which drastically increases the cell temperature and leads to hot spotting [2]. It can damage the cell and reduce the total power output of the solar panel.
Therefore, regular inspection of PV modules is critical for maintaining an optimal output efficiency. Methods for PV module inspection include manual inspection, laser detection [3], satellite observations [4,5], infrared thermography, and electroluminescence imaging [6][7][8]. Manual inspection is highly time inefficient while laser detection and electroluminescence imaging cannot be applied to PV power stations. Infrared thermography gained significant attention due to its ease of use and applicability to large-scale PV systems. In infrared thermography, a technician usually inspects each PV module with a handheld infrared camera. Inspecting a single PV module is effortless; however, inspecting a large-scale PV system is a considerably lengthy procedure because large-scale PV systems consist of hundreds or thousands of PV modules. In the last few years, the academic and industrial communities are interested in time efficient drone-based infrared thermography methods. Typically, a drone equipped with thermal camera is operated wirelessly by a technician and images are captured and saved during the flight, which are later processed for fault detection. Most previous drone-based approaches [9][10][11] require manual drone control, which is an exhausting procedure since it involves manual labor. In addition, previous works [12][13][14] are unable to provide the exact locations of the defective solar panels, which further delays the recovery process.
This paper presents an autonomous drone-based infrared thermography solution for PV module fault detection and localization. The developed drone system consists of a gimbal-equipped drone based on Pixhawk 2.1 flight controller (FC). The drone was designed as a 1.1-m class hexacopter drone supporting a payload of 2 kg from K-Pro Systems, Seoul, Korea. A dual camera setup consisting of an RGB camera (Logitech C270 (Logitech, Suzhou, China)) and a thermal camera (FLIR Vue Pro R (FLIR Systems, Inc., Wilsonville, OR, USA)) was mounted on the drone system. Raspberry Pi 3 was used as the mainboard for interfacing with the dual camera setup and FC. The RGB camera was interfaced to Raspberry Pi via the USB port while the FC and the thermal camera were linked via MAVlink. The captured images, global positioning system (GPS) information, and drone status information are stored on an SD card connected to the mainboard. The saved information is later processed on an offline general-purpose computer. The proposed drone system can fly autonomously over an automatically planned flight path by our flight planning algorithm. As automatic hot-spot localization is one of the essential aspects of PV plant inspection, our system can estimate the exact GPS location of the faulty PV modules among thousands of PV modules. The main contributions of our study are as follows: 1. We propose an automatic drone-based solution that can operate autonomously with minimal user intervention. 2. The proposed solution can detect and exactly locate the faulty PV modules in a large-scale PV power station. 3. Our approach was tested in a real environment on a large-scale 1-MW PV power station, demonstrating the practical applicability of our work.
The remainder of the paper is organized as follows-Section 2 reviews related studies along with their limitations. The details about our hardware and software design are described in Section 3. Performance evaluation is presented in Section 4. The conclusions are covered in the last section of this paper.

Related Works
This section discusses about previous drone-based infrared thermography methods for PV module fault detection and the limitations of those works. Researchers across the world have studied infrared thermography for more accurate solar panel fault detection. Quater et al. [12] proposed a novel monitoring system using UAV that detects several photovoltaic modules' failures. Thermal imaging and visual cameras were used as monitoring tools for inspecting PV power station. Aghaei et al. [13] designed an algorithm which detects the defects and failures on PV systems using thermography analysis. Their algorithm detected the hot temperature area in infrared images.
First, the original image was transformed to gray scale, which was followed by Gaussian filtering to reduce noise. Then, binary model was applied on the resulting images to distinguish hot and cold regions in the PV modules. Finally, the use of Laplacian model presented the characteristics of defective parts and determined the boundary area of the panel. A similar approach was proposed by Aghaei et al. [15], who computed the percentage of degradation and boundary area. Aghaei et al. [14] captured images using a drone at varying altitude to investigate the relationship between the altitude of image capture and possible defect identification in PV modules. However, these methods [12][13][14] can only detect the defects and not the exact location of the fouled PV module. This limitation hinders fast repairing process after detection of defective modules. Dotenco et al. [16] proposed image processing pipeline for the automatic detection of individual photovoltaic modules, analysis of malfunctioned modules using infrared thermography, and classification into three main groups: overheated modules, hot spots, and overheated substrings. Lee et al. [17] proposed a solar panel fault detection system using drones, thermal images, and RGB images. They detected the position of the solar panel array using RGB image and used thermal images to detect the faulty panels. Although these methods [15][16][17] can detect and localize the defective modules, they have been tested on a small scale dataset or in an artificial environment. On the contrary, some studies [9][10][11] have focused on the detection of fouling in large-sale PV panel systems. In [9], a computer vision approach was applied to identify and detect anomalies in PV modules in large-scale PV plants. The authors integrated geographic information with the results of template matching algorithm applied to thermal images, allowing panel identification by assigning identifier to each module during different flight sessions. In [10], a drone-mounted infrared thermography system was designed to rapidly detect fouling on PV panel systems. K neighbor mean filter was used for preprocessing the infrared images and single PV module in each image was recognized and extracted. In [11], the internal and external faults were detected by using thermal and charge-coupled device (CCD) cameras mounted on a drone. Morphological transformations and canny edge detection were used to find hotspots in the modules and the seed selection algorithm was used to determine the defective and the background pixels. These methods can detect and localize faulty modules and have been tested on real large-scale PV power stations. However, the drones used in these methods are remotely controlled by a technician, which adds manual labor to the procedure.

Limitations
For a fair comparison, we present the strengths and weaknesses of previous works along with the proposed method in Table 1. Most of the previous works have at least one of the following limitations: • The drones are controlled remotely in most previous approaches [9][10][11], which puts a burden on the technicians. Remotely controlling a drone in large PV stations can take several minutes to completely monitor the whole area. • Previous works [12][13][14] are unable to localize the exact location of the faulty PV module. The location of the defective module is crucial for quick repairing process in case of large-scale PV systems. • Most researchers [15][16][17] have tested their approaches on small datasets or in artificial environments. This can limit the practical applicability of their works. Table 1. Comparison between proposed approach and related works in terms of strengths and weaknesses.
-Unable to localize faulty PV modules.
-Lacks testing on large-scale PV power station.
Dotenco et al. [16] -Detection of PV modules and classification of defects.
-Remote controlled -Lacks testing on large-scale PV power station.
-Compute degradation percentage and boundary area.
-Does not specify specific defects.
-Unable to localize faulty PV modules.
-Lacks testing on large-scale PV power station.
Aghaei et al. [14] -Identify the correlation between altitudes of aerial images taken by the UAV and possible defects' identification.
-Remote controlled -Unable to localize faulty PV modules.
-Lacks testing on large-scale PV power station.
-Panel identification and detection of thermal anomalies.

System Configuration
The overall workflow of our system is presented in Figure 1. Our proposed solution consists of the following main steps: 1. Prepare drone's hardware structure which includes mounting of the dual camera setup. 2. Plan the flight's path automatically with flight planning algorithm and feed it to the drone. 3. The drone flies over the designated path autonomously and the captured images are saved to an SD card along with the GPS information. 4. The saved images are processed using our proposed image processing algorithm on a desktop computer. 5. The locations of the defective solar panels are displayed to the user.

Drone Hardware Details
We developed a gimbal-equipped drone based on the Pixhawk 2.1 flight controller. A dedicated ground control station (GCS) program was also developed based on C Sharp. The drone is a 1.1-m hexacopter class drone which can carry a payload of 2 kg and has a flight time of 20 min. A XEON 6S 22,000 mAH high voltage lipo battery with twelve supporting motors was selected, having two serial connections. It holds a higher voltage charge per cell, which results in more potential power for the drone and improves the flight time efficiency by 20%. A picture of the designed drone and a block diagram of our drone system are shown in Figures 2 and 3, respectively. The drone consists of the three main components:  This study uses Raspberry Pi 3 Model B+ as the mainboard for the drone system. It is mainly responsible for capturing/saving images and for saving the flight information for later use. Raspberry Pi is a credit-card sized computer developed by the Raspberry Pi Foundation in the United Kingdom. Raspberry Pi 3 Model B+ is equipped with four Cortex-A53 CPUs clocked at 1.4 GHz. A total of 1 GB of RAM along with four USB 2.0 ports, HDMI output, LAN port, Wi-Fi, and a MicroSD card port are available onboard the Raspberry Pi 3 Model B+. Raspberry Pi was selected as the mainboard due to its compact size, low weight, and cost efficiency.

Dual Camera Setup (Thermal and RGB Camera)
The dual camera system consists of a FLIR Vue Pro R thermal camera and a Logitech C270 RGB camera, as shown in Figure 4. FLIR Vue Pro R has a sensor resolution of 336 × 256 and uses an uncooled VOx microbolometer as the detector. The thermal camera weighs about 92.13-113.4 g, has dimensions 5.74 × 4.44 cm, and operates in a spectral range of 7.5-13.5 µm, which is enough for our imaging requirements. The Logitech C270 RGB is a fixed focus camera supporting a maximum resolution of 1280 × 720 at 30 frames per second.

Software Implementation Details
The entire software was developed in C Sharp programming language and OpenCVSharp v3.4.1 was used as the image processing library. GMap.NET.Windows v1.8.5 was used for integrating Google Maps into the proposed system whereas Newtonsoft.Json v9.0.1 was utilized for using MAVLink. Entity Framework v6.1.3 was used for database management.

Autonomous Flight Path Planning Algorithm
This step is responsible for planning the flight path of our drone system. The overall block diagram of the flight planning algorithm is shown in Figure 5. An image of the whole PV power station downloaded from Google Maps. In the absence of internet service, an alternate approach for getting the image of the entire PV power station is to use image stitching. The drone is flown over the entire PV power station and images corresponding to various parts of the power station are captured. The captured images are stitched using image stitching technique, which results in an image mosaic that includes the whole power station, as shown in Figure 6b. After obtaining the image (see Figure 7a), we need to segment the solar panels from the image. Since solar panels have homogenous color, we opted for color-based segmentation. For colorbased segmentation, the image is converted into HSV color space in order to separate chroma information from intensity information. This is followed color thresholding in the HSV (Hue, Saturation, Value) color space to extract the region of interest (ROI), which in our case is the solar panel area. A threshold with a lower limit of (80, 65, 65) and an upper limit of (140, 255, 255) was selected based on the fact that most of the solar panels are blue in color. The segmented image I ROI as shown in Figure 7b is smoothed to remove noise before inputting it to the canny edge detection algorithm for edge detection. After edge detection, we find contours in the edge image I e (see Figure 7c) and filter out contours below a certain threshold area. Bounding boxes (see the red boxes in Figure 7d  The drone captured images of the entire PV station at an altitude of 10 m while moving with a velocity of 3 m/s. RGB and Thermal images were captured at an interval of 1 s with a resolution of 1024 × 768 and 640 × 480, respectively. The captured images were stored in internal SD card. A trigger signal from the main controller was used to capture images from thermal and RGB camera simultaneously.

Thermal Image Processing
The proposed system uses the thermal image processing algorithm that was proposed in our previous study [18]. The overall block diagram for thermal image processing is visualized in Figure 8. This step is responsible for detecting faulty PV modules using image processing. Let I RGB and I th denote the images captured by the RGB and the thermal camera, respectively. Each step of the image processing algorithm is summarized below:

ROI Segmentation
Given image I RGB , the PV modules are extracted from the image by using color thresholding approach similar to the one used in Section 3.2. The image is converted to HSV color space which separates the color information from the intensity information. After color space conversion, color thresholding is applied with a lower threshold limit as (80, 65, 65) and an upper threshold limit as (140, 255, 255). The resulting image I ROI is smoothed and inputted to canny edge detection algorithm [19]. Contours detected in the edge image I e are filtered based on area of the contours. Contours below a certain threshold area are removed, which results in binary image containing the borders of the PV modules. The boundaries/borders are flood filled to create a mask M RGB for input to the feature detection algorithm.

RGB and Thermal Image Registration
The main goal of this step is to register images I RGB and I th since the images have a disparity/ misalignment among them. This disparity is attributed to the slight difference in the real world coordinates of both the cameras. Failure to align the images will lead to wrong localization of the faulty PV modules. The first step towards image registration is feature detection. Maximally Stable Extremal Region (MSER) [20], one of the most popular feature detectors, was used in this step of our algorithm. MSER algorithm extracts extremal regions from an image. An extremal region R t is essentially a connected component that is stable across multiple gray-level sets in an image. Simply, MSERs are regions which remain unchanged over a wide range of thresholds. Given an input image, MSER thresholds an image into multiple thresholded images I t where t indicates the threshold value. The first image in the sequence would be totally black and the following images would contain white blobs which continue to grow until all of them merge into a totally white image. The stability of these blobs are monitored by MSER algorithm across the image sequence with respect to a function. Generally, stability of a region is defined as follows: where A(R t ) represents the area of the region R t and d dt A (R t ) represents the rate of change of area. A region is stable only if its area changes slightly at different threshold values. Additionally, a stable region might be rejected if its area is below a minimum area threshold (2000 in our experiments) or above a maximum area threshold (400,000 in our experiments) value. MSER features F RGB and F th are extracted from the RGB image I RGB and the thermal image I th , respectively. The extracted features must be matched in order to apply homography for aligning the images. For robust matching of features, the following criterion is applied: where x i RGB , y i RGB and x j th , y j th represent the x and y value of the ith feature point of the F RGB and the jth element of the F th , respectively. M RGB and M th are the set of valid feature points in I RGB and I th , respectively. A feature point set is only valid if the distance value r between the two points is lower than the threshold distance th r . After matching the features, homography is applied to align the two images. Homography is the mapping between two projection planes sharing the same center of projection. It is represented as a 3 × 3 matrix that maps points in source image to the corresponding points in the target image. The homography matrix can be estimated by approaches such as direct linear transform (DLT) and is represented as follows: After estimating the homography matrix, we get the registered image I reg . An example of the rectified image can be seen in Figure 9.

Abnormal PV Module Detection
This step is responsible for classifying a PV module as defective or as normal. The decision is made based on the criterion in Equation (10). Firstly, the maximum temperature value T max , minimum temperature value T min , and average temperature value T avg are calculated from the thermal image. This is followed by calculating the high temperature threshold value T high or the low temperature threshold value T low using Equations (7) and (8), respectively. The count value a count is increased if the temperature value is lower than T max and T min . If a count exceeds 0.2% of the module area value area module , then the module is considered as abnormal.

Experimental Results, and Discussion
To verify the validity of the developed system, photovoltaic modules were photographed by autonomous flight on a 1-MW solar power plant located in Suncheon, Korea using the proposed drone system. The flight path for the drone system was calculated by our automatic flight path planning algorithm, as explained in Section 3.2. The images captured by the dual camera device mounted on the drone were sent to the ground station. The images were then analyzed by the image processing algorithm, as explained in Section 3.3, to identify and localize defective PV modules. Figure 11a displays an image of overall PV plant, while Figure 11b displays the automatically planned flight path calculated by our path planning algorithm. The drone acquired 400 thermal and visible images, which were processed by the image processing algorithm, obtaining the result displayed in Figure 11c. The various steps proposed in the algorithm contributes in distinguishing defective modules from normal modules in the PV array. Through image analysis, we deduced that the detection and identification depend on various characteristics of the defects such as its shape, size, location, etc. Within a photovoltaic module, a wide range of defects can occur. Many of these defects cause overheating of the entire module, single substrings, small solar cells, or even tiny cell parts. To verify the efficiency of the proposed system, three experiments were conducted, as shown in Table 2. In the first experiment, 14 defective panels were detected in different areas of the PV plant indicating the possible failures. Depending on the shape and location, the hot spots and hot areas highlighted different faults. Out of 14 defected modules, 10 were due to shade, 2 were due to the soiling matter, and the remaining 2 were due to unknown reason. However, due to PV panel reflectance by sunlight, there were 60 unknown reasons, which were caused by panel emissivity. Usually, emissivity is at its highest when the camera is perpendicular to the modules being inspected and decreases with an increasing angle [21]. To prevent these errors, we controlled the camera angle, which resulted in the second and third experiments. From the second experiment, it is observable that, out of 21 defective panels, 17 were affected by the shadow, 3 were affected by solid matter, and 1 was unknown. Figures 12 and 13 illustrate PV modules affected by shadow of weed. Among the total number of hot spots detected, the weed shadows caused the maximum number of faults. Similarly, Figure 14 shows a PV module affected by reflection due to sunlight. When using a thermal imaging camera, it is confirmed that an error may occur in absolute temperature measurement. However, it can vary with the location of panel and the angle of view taken from the camera with respect to the altitude.    Figure 15 shows the region where the system detected a hot spot, but the reason was unidentifiable. Different types of defects or failures can be detected only at different heights. Moreover, characteristics of defects also play an important role in its detection. Therefore, further investigation is needed to perform more efficient identification of faults. Figure 16 shows another defective PV module, which was affected by various causes such as reflection, solid, and shadow. In addition, the exact geolocalization of deteriorated PV modules in large-scale plants is one of the most critical issues in PV plant inspection. In this work, we used GPS information to locate the faulty modules. Aluminum marks can be used for thermal images georeferencing due to its low emissivity nature, which facilitates in better pointing. However, for the precise location in large-scale plants with centimeter accuracy, a further survey on RTX modules needs to be performed. In conclusion, our experiments demonstrated that hot spots generally occur due to partial shading from weeds, solid things present on the surface of PV module, broken interconnects, and/or reflection from sunlight.

Conclusions
In this paper, an autonomous drone-based infrared thermography system is proposed for automatic detection and localization of defective PV modules in a PV power station. The drone system is mounted with a dual camera setup consisting of a thermal camera and an RGB camera. The proposed drone system can fly autonomously without the need of manual control by using our automatic flight path planning algorithm. In addition, our system can detect and precisely locate the exact location of the faulty PV modules. Contrary to most previous methods, we tested our approach on a real 1-MW power plant location in Suncheon, South Korea. Our results demonstrate that the proposed method can accurately detect and locate faulty modules autonomously.