Unsupervised Fault Detection and Analysis for Large Photovoltaic Systems Using Drones and Machine Vision

One of the most important sources of clean energy in the future is expected to be solar energy which is considered a real time source. Research efforts to optimize solar energy utilization are mainly concentrated on the components of solar energy systems. Photovoltaic (PV) modules are considered the main components of solar energy systems and PVs’ operations typically occur without any supervisory mechanisms, which means many external and/or internal obstacles can occur and hinder a system’s efficiency. To avoid these problems, the paper presents a system to address and detect the faults in a PV system by providing a safer and more time efficient inspection system in real time. In this paper, we proposing a real time inspection and fault detection system for PV modules. The system has two cameras, a thermal and a Charge-Coupled Device CCD. They are mounted on a drone and they used to capture the scene of the PV modules simultaneously while the drone is flying over the solar garden. A mobile PV system has been constructed primarily to validate our real time proposed system and for the proposed method in the Digital Image and Signal Processing Laboratory (DISPLAY) at Western Michigan University (WMU). Defects have been detected accurately in the PV modules using the proposed real time system. As a result, the proposed drone mounted system is capable of analyzing thermal and CCD videos in order to detect different faults in PV systems, and give location information in terms of panel location by longitude and latitude.


Introduction
The energy of the Sun is renewable, clean, and costs nothing.Solar energy generates green and cheap electricity from sunlight using photovoltaic modules which generate electricity from sunlight.A PV module has individual PV cells, typically arranged and grouped in an array.The light strikes the solar cell, where a certain amount of the light is absorbed, which means the energy of the absorbed light is transferred to the solar cell.Thus, the electrons will flow freely because the energy will knock electrons loose [1].Solar cells have electric fields which act to force the electrons freed by light absorption to flow in a certain direction, which produces a current [1].This current could be used externally by placing metal contacts on the top and bottom of the solar cell.The solar cell's voltage, which is a result of its built-in electric fields, together with the current, provides the power that can be produced by the solar cell.PV modules produce an amount of electricity that depends on the prevailing natural factors, the type and the composition of the module, and the combined effect of the installation [2].One big limitation for solar (and wind) power is that it only generates electricity when the sun is shining (or the wind is blowing)-falling short at peak demand times like the evenings.Unlike conventional generation sources, wind and solar power outputs are highly uncertain and unpredictable [3,4].In addition, temperature fluctuation is an important factor in PV modules due to changes in solar irradiance and temperature.For example, crystalline PV modules have a 0.5% reduction in efficiency when the temperature is increased by 1 • C [2].Solar radiation is the main component of the heat balance of PV modules.Solar radiation influences the output power of the PV module, radiation heat exchanges and convective heat exchanges [2].Additionally, because of fluctuating weather conditions and/or a lack of abundant historical data, a growing generation share of renewable energy (e.g., wind and solar) significantly complicates power system operations hence imposing more severe system constraints (voltage, frequency, etc.).On the customer side, "flexible/dispatchable loads" can adjust their own electric energy usage on the basis of a real-time set point.With the growing share of these intermittent energy sources and flexible/dispatchable loads, it becomes much more difficult to maintain the power balance [5][6][7].
PV systems are used to produce power and provide electricity to homes, buildings, and more.The importance of PV systems is attracting more attention and research across the world because the energy demand is continuously increasing.The utilization of renewable energy resources is important in order to reduce environmental effects [8].Solar modules have been distributed rapidly due to the fast-technological development and decreasing production costs.In addition, recently the price of PV systems is depreciating as well the PV system installation process takes less time and provides a better return the investment [8].Numerous countries have announced governmental support for the production of solar energy [9].For example, many countries have plans for building and using PV systems to develop or modernize existing street lighting systems [9].Regarding the future, the Earth is exposed to the hazards due to global warming and the greenhouse effect, and the use of renewable energy may be the only solution to stop the effects of these hazards on human life [10].Therefore, in order to get more efficient power and higher performance for PV systems, save energy, money and minimize the harmful impact faults should be detected as soon as possible.
The common faults in the PV module types can be considered as manufacturing faults; such as delamination that can occur when the adhesion between the glass, encapsulant, active layers, and back layers becomes weak, back sheet adhesion loss, junction box failure that takes place when there are no reliable soldering contacts of the string interconnects; this could cause high a resistance and consequent heating, and frame breakage [11].The most common failures due to external causes are clamping, connector failures, lightning, transport and installation failures [11].Some faults in a PV module are categorized [12] as follows: hot spots caused by the panel act as a load; hot spots can be taken as a sign of heat loss from the PV module due to some electrical problems, as shown in Figure 1, for example in a bypass diode, or in a shunt resistor.Defects in the anti-reflective coating; the color of the module can change due to a change in the coating layer.The light that reaches the cells may be lower [12], and as a result the antireflection properties may suffer changes.Bubbles in the solar modules; when the adherence between Tedlar and the back side of the module has been lost, bubbles will develop.As a result, overheating will take place which means a reduction of cell life.Delamination over cells and interconnections; this occurs when the Tedlar adherence is lost with subsequent unstuck layers, and as a result water penetration can take place inside the module, and this is considered as a major problem.Browning and yellowing; it is caused by water penetration inside the module, because of lack of adherence between the Tedlar and the module.Newly cracked cells; the thickness of the solar cells has changed from 300 µm to 200 µm [12].In other words, the cells have become more fragile which means they are easily breakable on manipulation or storage of the modules.Some of the considered electrical faults in the PV modules [13][14][15] include the functionality of the shunting in cells' bypass The faults in PV arrays can be divided in three categories; line-line faults, open circuit faults, and ground faults.The faults inside PV arrays usually cause an overcurrent which damages PV components [16].When an accidental connection goes through a low resistance path between two points in the PV module, a line-line fault will occur [16].A line-line fault may occur between two adjacent strings or between two points on the same string.The potential difference between the connected points influences the magnitude of the line-line fault, so the higher potential difference means higher feedback current results, and tripping the over-current protection devices (OCPD) will increase [17].A line-line fault can be considered as a ground fault if one of the points is on the equipment grounding conductor (EGC) [16].A line-line fault may not be detected once the current flowing through one of the current carrying conductors (CCC) is less than the rated current of the OCPDs.This will reduce the system efficiency [18].
The electromagnetic spectrum is a scale classifying the different forms of electromagnetic radiation [19], such as X-rays, gamma rays, radio waves, microwaves, visible rays, and invisible rays.Because the human vision system can see just the visible light, the use of infrared imaging is often necessary.Infrared imaging is the technique of capturing invisible infrared images and converting them into visible images.Infrared imagers and cameras have special sensors that do not need visible light to see in infrared light [19].Infrared radiation is produced from any warm object with a temperature above absolute zero because there is no molecular and atomic activity at absolute zero [19].Molecular and atomic activity increases when the temperature increases, which means more thermal radiation and heat is produced, and more infrared radiation is emitted [19].The targeted objects or the reflected radiation in the infrared imaging emit radiation.Using sunlight for illumination will cause reflected radiation, or the imaging device may have infrared illuminator lasers equipped with LEDs.These infrared waves absorb or reflect from any object that falls within the range of these invisible illuminators [19].Using long wave thermal infrared imagers will help to detect and pick up the infrared radiation reflected from or emitted by warm objects.The infrared rays are directed onto an array of infrared sensors, and there can be many thousands of sensors on the sensor array [19].The infrared energy is transformed into electrical signals and then converted into an image.Infrared light has many uses because it has the ability to cross areas that cannot be reached by visible light, and it reveals unclear objects.The military has developed it to produce night vision cameras and gun sights [19].Infrared imaging is used in many applications, such as helping firefighters and police to catch criminals in the dark, or to rescue people lost at night and in dark places.Using infrared imaging enables technicians to locate leaking chemicals as well as overheated or underheated parts, which helps to eliminate potential hazards.Infrared imaging also helps researchers in the wild to study animals in their habitat at night.On the other hand, infrared imaging can be used for medical diagnostic purposes; it is used to perform body scans.Satellites also use infrared imaging to study the Earth's condition.Fault detection on PV modules plays a main role in getting more efficient power production from PV system and reduce maintenance costs when the faults can be detected in their early stages.Using IR images can help to detect hot spots in PV The faults in PV arrays can be divided in three categories; line-line faults, open circuit faults, and ground faults.The faults inside PV arrays usually cause an overcurrent which damages PV components [16].When an accidental connection goes through a low resistance path between two points in the PV module, a line-line fault will occur [16].A line-line fault may occur between two adjacent strings or between two points on the same string.The potential difference between the connected points influences the magnitude of the line-line fault, so the higher potential difference means higher feedback current results, and tripping the over-current protection devices (OCPD) will increase [17].A line-line fault can be considered as a ground fault if one of the points is on the equipment grounding conductor (EGC) [16].A line-line fault may not be detected once the current flowing through one of the current carrying conductors (CCC) is less than the rated current of the OCPDs.This will reduce the system efficiency [18].
The electromagnetic spectrum is a scale classifying the different forms of electromagnetic radiation [19], such as X-rays, gamma rays, radio waves, microwaves, visible rays, and invisible rays.Because the human vision system can see just the visible light, the use of infrared imaging is often necessary.Infrared imaging is the technique of capturing invisible infrared images and converting them into visible images.Infrared imagers and cameras have special sensors that do not need visible light to see in infrared light [19].Infrared radiation is produced from any warm object with a temperature above absolute zero because there is no molecular and atomic activity at absolute zero [19].Molecular and atomic activity increases when the temperature increases, which means more thermal radiation and heat is produced, and more infrared radiation is emitted [19].The targeted objects or the reflected radiation in the infrared imaging emit radiation.Using sunlight for illumination will cause reflected radiation, or the imaging device may have infrared illuminator lasers equipped with LEDs.These infrared waves absorb or reflect from any object that falls within the range of these invisible illuminators [19].Using long wave thermal infrared imagers will help to detect and pick up the infrared radiation reflected from or emitted by warm objects.The infrared rays are directed onto an array of infrared sensors, and there can be many thousands of sensors on the sensor array [19].The infrared energy is transformed into electrical signals and then converted into an image.Infrared light has many uses because it has the ability to cross areas that cannot be reached by visible light, and it reveals unclear objects.The military has developed it to produce night vision cameras and gun sights [19].Infrared imaging is used in many applications, such as helping firefighters and police to catch criminals in the dark, or to rescue people lost at night and in dark places.Using infrared imaging enables technicians to locate leaking chemicals as well as overheated or underheated parts, which helps to eliminate potential hazards.Infrared imaging also helps researchers in the wild to study animals in their habitat at night.On the other hand, infrared imaging can be used for medical diagnostic purposes; it is used to perform body scans.Satellites also use infrared imaging to study the Earth's condition.Fault detection on PV modules plays a main role in getting more efficient power production from PV system and reduce maintenance costs when the faults can be detected in their early stages.Using IR images can help to detect hot spots in PV modules which provide indications of abnormal operations which can lead to a reduction in the power production or hazards to the PV system or humans.The proposed method takes the advantages of using an IR imaging system with drone capability to detect the faults in PV systems.
In 2004, a temperature-controlled stage with a vacuum chunk was used for fast shunt analysis in solar cells.The solar cell has a layer of liquid crystal foil, and images allow for the localization of places where the temperature changes the reflectivity of the liquid crystal overlayer [20].In 1998, the hot spots in circuits and devices were located using fluorescence microthermography (FMT).FMT is based on the efficiency of the temperature-dependent luminescence of rare earth chelate dyes [20].In 2001, infrared methods were used for non-destructive testing, for example, thermal emissions, IR sensors and optics, and imaging and analysis.In 2000, the applications of infrared imaging have been summarized in a survey which included shunts in solar cells, such as reverse-bias heating, by-pass diode functionality, resistive solder bonds, and other components of the balance of a system [20].In 2002, the thermographic imaging was used to inspect cracked solar cells [20].In 2011, an IR camera was used in the field to monitor solar modules' performance [20].The proposed methods for using thermal images for fault detection in PV modules are discussed.Using infrared images via a camera mounted on a moving cart was proposed by Gao et al. to detect and recognize defective PV modules [21].They used an optical flow to establish frame-to-frame association in order to count the number of panels within any given array.They recognized the panels using a Hough Transform (HT) and the DBSCAN clustering technique to identify a hot panel by comparing it with its neighbours.Several drawbacks were reported such as, the first column of an array cannot be recognized when the top row is missed, or challenges with image registration in relation to optical flow results [21].The use of electroluminescence (EL) and independent component analysis (ICA)-based images to detect a defective solar cell was reported by Tsai et al. [22].Defects were presented as some dark spots in EL images, such as finger interruptions, breaks, and microcracks.All of these defects have been detected using EL images.To measure the distance and minimize reconstruction errors, the cosine function has been used for these purposes.The drawback of their work is that small localized defects can be missed because the results are all based on a global approach [22].Canny edge detection and the use of standard thermal image processing is proposed by Tsanakas et al.This method was proposed for module-related faults that results in hot spot heating.The main objective was the applicability of thermal image processing and edge detection to detect defective PV modules.The fault types are not classified by this method.Another limitation is false alarms will occur because of the unwanted grey-level variations, that are caused by any specular object present in the background, that will conflict with the actual variations related to hot spots.There are further limitations referring to emissivity uncertainties [23].A fault detection and automatic supervision method for a PV system based on power loss analysis is proposed by Chouder and Silvestre [24].The method calculates the main parameters of the PV system for monitoring data in real time while taking into account the temperature evolution and environmental irradiance.Their method focuses on the output power losses present in the DC side of the PV system generator and capturing losses.This model defines two power loss types: thermal loss and miscellaneous loss.The system can generate a fault-signal indicator based on the values of these two loss types.These indicators show the voltage and current ratios.After analyzing both, the fault-signal and the current/voltage ratios, the type of fault can be identified.Detecting the array faults in the PV modules can be accomplished by comparing current operation characteristics with recorded reference characteristics that account for time, season and climate which will affect the performance.Regarding [25], due to the complexity of these numerous conditions, the need for reference profiles and the need for generating reference profiles, as well as the comparison of the parameters with the reference profiles, this process can be very complicated and the result could be inaccurate.One of the methods used to detect the fault in PV modules is reverse current faults.
The idea is to detect the abnormal current flow [13].The PV system combines multiple power resources to provide a single output, such as systems for combining the power generated by multiple PV module arrays [13].It generates power from multiple PV modules.In this case it is important to detect the faults generated by reverse currents [13].The fault detection based on the current flow checks for the current flow in the opposite direction.Using a plurality of photovoltaic elements provides a system for sensing and interrupting a reverse current.Each conductor is associated with a sensor.The sensor is able to detect the current flow in the respective conductor, and it is configured to provide an output of the detected direction of the current.The method proposed in this paper presents a fault detection in a PV system where the prompt identification of faulty PV cells taking place using thermal and CCD cameras which they can detect internal and external defects.They are mounted on a drone which can fly over the PV system and recorded videos where the image processing techniques will be executed in order to detect the faults in PV modules and determine the longitude and latitude of the modules which allows for better system operation and enhance safety.

Materials and Methods
The system description is shown in Figure 2. The proposed system consists of two cameras, a thermal and a CCD one.The two cameras are able to capture the scene of the PV modules simultaneously.The cameras are placed on a drone which is able to fly over the PV modules.The video recorded on both cameras can be monitored at ground stations for the thermal and CCD cameras.The recorded videos are processed on a multicore CPU in order to divide the input video into segments and start the running of fault detection algorithms in order to detect and locate the defective panels.The proposed system is running on the multicore CPU using a multiprocessing module in Python.The main steps for the proposed system are shown in Figure 3.
Image processing techniques are implemented in order to detect the defects in the PV module.We implement algorithms which are able to detect different defects in the PV modules.Each algorithm is implemented separately on different input data, and each algorithm is explained in the following sections.
Energies 2018, 11, 2252 5 of 18 checks for the current flow in the opposite direction.Using a plurality of photovoltaic elements provides a system for sensing and interrupting a reverse current.Each conductor is associated with a sensor.The sensor is able to detect the current flow in the respective conductor, and it is configured to provide an output of the detected direction of the current.The method proposed in this paper presents a fault detection in a PV system where the prompt identification of faulty PV cells taking place using thermal and CCD cameras which they can detect internal and external defects.They are mounted on a drone which can fly over the PV system and recorded videos where the image processing techniques will be executed in order to detect the faults in PV modules and determine the longitude and latitude of the modules which allows for better system operation and enhance safety.

Materials and Methods
The system description is shown in Figure 2. The proposed system consists of two cameras, a thermal and a CCD one.The two cameras are able to capture the scene of the PV modules simultaneously.The cameras are placed on a drone which is able to fly over the PV modules.The video recorded on both cameras can be monitored at ground stations for the thermal and CCD cameras.The recorded videos are processed on a multicore CPU in order to divide the input video into segments and start the running of fault detection algorithms in order to detect and locate the defective panels.The proposed system is running on the multicore CPU using a multiprocessing module in Python.The main steps for the proposed system are shown in Figure 3.
Image processing techniques are implemented in order to detect the defects in the PV module.We implement algorithms which are able to detect different defects in the PV modules.Each algorithm is implemented separately on different input data, and each algorithm is explained in the following sections.

Morphological Transformation and Canny Edge Algorithm
The first proposed framework is shown in Figure 4. Starting with converting the input image to grayscale in order to set the threshold values which help in edge detection for the binary images, we seek to identify regions of interest in the input thermal image.Since defective solar cells show a strong yellow or white color with sharp edges in thermal images, it should be quite straightforward to recognize regions of interest.In this algorithm, after converting the input image to a binary image, the thresholding process is applied to each frame.The threshold value, Th, for the CCD and thermal frames to be determined adaptively and at some experiments, was recomputed for each frame.In addition, morphological transformations were used after assigning a kernel (structuring element).The first morphological transformation technique is erosion.The main idea of erosion is that a pixel will be considered 1 only if all the pixels under the kernel are 1; otherwise, it is eroded [26].In other words, all the pixels near the boundary will be discarded depending upon the size of the kernel, which means white region decreases in the image.The second morphological transformation technique is dilation; the idea of dilation is the opposite of erosion: a pixel is 1 if at least one pixel under the kernel is 1.In other words, dilation increases the white region in the image or the size of foreground object increases [26].Then the defective cells in the PV module can be detected using the Canny edge detection algorithm.The Canny edge detection algorithm is an optimal edge detection algorithm [27] that has been used in many practical problems with excellent performance results.

Morphological Transformation and Canny Edge Algorithm
The first proposed framework is shown in Figure 4. Starting with converting the input image to grayscale in order to set the threshold values which help in edge detection for the binary images, we seek to identify regions of interest in the input thermal image.Since defective solar cells show a strong yellow or white color with sharp edges in thermal images, it should be quite straightforward to recognize regions of interest.In this algorithm, after converting the input image to a binary image, the thresholding process is applied to each frame.The threshold value, Th, for the CCD and thermal frames to be determined adaptively and at some experiments, was recomputed for each frame.In addition, morphological transformations were used after assigning a kernel (structuring element).The first morphological transformation technique is erosion.The main idea of erosion is that a pixel will be considered 1 only if all the pixels under the kernel are 1; otherwise, it is eroded [26].In other words, all the pixels near the boundary will be discarded depending upon the size of the kernel, which means white region decreases in the image.The second morphological transformation technique is dilation; the idea of dilation is the opposite of erosion: a pixel is 1 if at least one pixel under the kernel is 1.In other words, dilation increases the white region in the image or the size of foreground object increases [26].Then the defective cells in the PV module can be detected using the Canny edge detection algorithm.The Canny edge detection algorithm is an optimal edge detection algorithm [27] that has been used in many practical problems with excellent performance results.

Segmentation Based on Hot Pixels Seeds Algorithm
The segmentation process divides an image into constitutive objects or parts [28].Segmentation usually allows for object classification, pattern recognition, and/or the identification of clusters [28].Most segmentation algorithms are based on similarity or discontinuity features, such as edges and lines between different pixels [28].The proposed segmentation based hot pixel detection algorithm determines a seed pixel   (hot pixel) selection in the input image.Figure 5 shows the main steps of the proposed algorithm.The pre-processing processes, Gaussian filter, and histogram equalization for the input images could solve the low contrast problem which makes thresholding more difficult.After image pre-processing, the value of the hottest pixel is determined by finding the highest pixel value using Equation (1).Then check all the neighboring pixels if they are related to the hot pixel, calling them seed pixels   , or to the background   based on Equation (2):

Segmentation Based on Hot Pixels Seeds Algorithm
The segmentation process divides an image into constitutive objects or parts [28].Segmentation usually allows for object classification, pattern recognition, and/or the identification of clusters [28].Most segmentation algorithms are based on similarity or discontinuity features, such as edges and lines between different pixels [28].The proposed segmentation based hot pixel detection algorithm determines a seed pixel S P (hot pixel) selection in the input image.Figure 5 shows the main steps of the proposed algorithm.The pre-processing processes, Gaussian filter, and histogram equalization for the input images could solve the low contrast problem which makes thresholding more difficult.After image pre-processing, the value of the hottest pixel is determined by finding the highest pixel value using Equation (1).Then check all the neighboring pixels if they are related to the hot pixel, calling them seed pixels S P , or to the background B P based on Equation (2): Once the seed pixel   is detected, the mean value µ   is calculated using Equation (3).µ   is computed for each seed region with eight neighboring pixels of the   : Once the seed pixel S P is detected, the mean value u S P is calculated using Equation (3).u S P is computed for each seed region with eight neighboring pixels of the S P : Energies 2018, 11, 2252 9 of 18 At the same time, an average value for all hot pixels u hot_pixels is computed for each thermal frame, however, for the CCD frames, u hot_pixels 127 was used which is a value that worked well in most cases.This actually brings parameter selection as one of the issues to be investigated further and hopefully develop an adaptive method for its selection The actual seed pixel Act_S p is determined using Equation (4): Act_S p = u S P ≥ u hot pixels Sure Act_S p u S P < u hot_pixels , B P , In addition, for each actual hot pixel, the Minimal Deviation Distance (MDD) is calculated using Equation ( 5), where the standard deviation is computed using Equation ( 6): Regarding the background pixel, the mean value u B p is computed for each pixel with its' 8 neighbors, then delta value δ is computed using Equation (7).MDD value is used to determine if the B P is defected based on Equation (8).
De f ected B P = δ ≤ MDD, defected pixel If MDD is greater than (δ), then the background pixel is considered as a defected (hot) pixel (255); otherwise it is considered as a (zero) pixel.

Results
Images have been taken for our remote PV system in the Digital Image and Signal Processing (DISPLAY) lab at Western Michigan University (WMU) in order to validate our proposed work.In addition, the system has been taken outside of the college engineering and the drone has been flown over the system.The system has two panels of OPTIMUS 60 Cell modules (Model OPT285-60-4-1B0, SUNIVA, GA & MI, USA); each panel produces 285 W. Table 1 shows the main specifications of the PV modules in the DISPLAY lab.The whole system was built in our lab taking care of all the required components, connections, measurement, and mounting.Figure 6 shows the schematic diagram for the PV system while Figure 7 shows the complete installed system in DISPLAY.In addition to our own data, we used images taken for PV modules at the main campus WMU, while the drone is flying over them, and others from online sources, with permission.
Energies 2018, 11, 2252 11 of 18 Figure 6 shows the schematic diagram for the PV system while Figure 7 shows the complete installed system in DISPLAY.In addition to our own data, we used images taken for PV modules at the main campus of WMU, while the drone is flying over them, and others from online sources, with permission.The thermal camera that has been used in our system is a Vue Pro (FLIR, OR, USA).Thermal video is recorded with the NTSC frame rate, and with a resolution of 336 × 256 pixels.This resolution is high enough to show an accurate thermal resolution from the PV modules.The CCD camera that has been used in our system is the Hero 4 Black CCD camera (GoPro, Oakland, CA, USA); the camera has effective photo resolution of 12.0 MP, and the max video resolution 3840 × 2160.These two cameras are installed on a Q500 quadcopter (Yuneec, CA, USA) as shown in Figure 8.The FLIR Vue Pro thermal camera is shown in Figure 8a, the GoPro camera is shown in Figure 8b, ST-10 is the personal ground station as shown in Figure 8c.The ST-10 station is used to monitor the CCD camera photos and videos, and control the drone.A Flysight Black Pearl RC801 FPV Monitor shown in Figure 8d is used to monitor the scene captured by the FLIR thermal camera.We applied some external defects on our system in the DISPLAY lab, such as polystyrene behind the panel, adhesive paper on the front glass, a piece of gum, and a piece of polystyrene on the back of the panel to mimic a small defect, and we used an input image from an online source.Python 2.7 on the Eclipse IDE platform was used in order to process the input data form the thermal and The thermal camera that has been used in our system is a Vue Pro (FLIR, OR, USA).Thermal video is recorded with the NTSC frame rate, and with a resolution of 336 × 256 pixels.This resolution is high to show an accurate thermal resolution from the PV modules.The CCD camera that has been used in our system is the Hero 4 Black CCD camera (GoPro, Oakland, CA, USA); the camera has effective photo resolution of 12.0 MP, and the max video resolution 3840 × 2160.These two cameras are installed on a Q500 quadcopter (Yuneec, CA, USA) as shown in Figure 8.The FLIR Vue Pro thermal camera is shown in Figure 8a, the GoPro camera is shown in Figure 8b, ST-10 is the personal ground station as shown in Figure 8c.The ST-10 station is used to monitor the CCD camera photos and videos, and control the drone.A Flysight Black Pearl RC801 FPV Monitor shown in Figure 8d is used to monitor the scene captured by the FLIR thermal camera.Figure 6 shows the schematic diagram for the PV system while Figure 7 shows the complete installed system in DISPLAY.In addition to our own data, we used images taken for PV modules at the main campus of WMU, while the drone is flying over them, and others from online sources, with permission.The thermal camera that has been used in our system is a Vue Pro (FLIR, OR, USA).Thermal video is recorded with the NTSC frame rate, and with a resolution of 336 × 256 pixels.This resolution is high enough to show an accurate thermal resolution from the PV modules.The CCD camera that has been used in our system is the Hero 4 Black CCD camera (GoPro, Oakland, CA, USA); the camera has effective photo resolution of 12.0 MP, and the max video resolution 3840 × 2160.These two cameras are installed on a Q500 quadcopter (Yuneec, CA, USA) as shown in Figure 8.The FLIR Vue Pro thermal camera is shown in Figure 8a, the GoPro camera is shown in Figure 8b, ST-10 is the personal ground station as shown in Figure 8c.The ST-10 station is used to monitor the CCD camera photos and videos, and control the drone.A Flysight Black Pearl RC801 FPV Monitor shown in Figure 8d is used to monitor the scene captured by the FLIR thermal camera.We applied some external defects on our system in the DISPLAY lab, such as polystyrene behind the panel, adhesive paper on the front glass, a piece of gum, and a piece of polystyrene on the back of the panel to mimic a small defect, and we used an input image from an online source.Python 2.7 on the Eclipse IDE platform was used in order to process the input data form the thermal and We applied some external defects on our system in the DISPLAY lab, such as polystyrene behind the panel, adhesive paper on the front glass, a piece of gum, and a piece of polystyrene on the back of the panel to mimic a small defect, and we used an input image from an online source.Python 2.7 on the Eclipse IDE platform was used in order to process the input data form the and CCD cameras.Windows 10 Home, Intel (R) Core (TM) i5-4210M CPU @2.60 GHz with 8 Gigabyte RAM is used to implement the offline system.Python was installed on a Windows 10 environment, and other modules, extensions and libraries were installed using a pip command, for example, Multiprocessor module, Pillow, NumPy, and matplotlib.Python provides multiple modules for image processing which used OpenCV.

Morphological Transformation with the Canny Edge Detector
The morphological transformations and canny edge detector were implemented to detect the hot spots in the PV module, as shown in Figure 9.
Energies 2018, 11, 2252 12 of 18 CCD cameras.Windows 10 Home, Intel (R) Core (TM) i5-4210M CPU @2.60 GHz with 8 Gigabyte RAM is used to implement the offline system.Python was installed on a Windows 10 environment, and other modules, extensions and libraries were installed using a pip command, for example, Multiprocessor module, Pillow, NumPy, and matplotlib.Python provides multiple modules for image processing which used OpenCV.

Morphological Transformation with the Canny Edge Detector
The morphological transformations and canny edge detector were implemented to detect the hot spots in the PV module, as shown in Figure 9.The input thermal image (a) in Figure 9 shows that the panel on the left is healthy while the one on the right is defective.Polystyrene have been applied behind the panel to act as an external defect, on the sides causing heating to take place as hot spots.The thresholded image is shown in Figure 9b while the morphological process result is shown in Figure 9c,d for dilation and erosion, respectively.The canny edge detector with morphological transformation is clearly included in the resulting edges defected region, as shown in Figure 9e.The canny algorithm without using thresholding and morphological transformation is shown in Figure 9f showing a typical edge and not isolating the hot spot.Hot spots indicate that the PV module is working under abnormal conditions.

Segmentation Based Hot Pixels Detection
The last section in the results shows the use of the seed selection algorithm which is based on determining the seed pixels (hot pixels) and using the mean and standard deviation values in order to determine the defective pixels and the background pixels.Figure 10 shows the results of the implemented algorithm where the hot spots have been detected.The input image in Figure 10a is pre-processed using the Gaussian filter and histogram equalization in order to avoid the low contrast pixels as shown in Figure 10b,c.Then the algorithm which chooses the seed pixels is implemented and it determines if the background pixels are related to the seed (defective or not) as shown in Figure 10d.The dilation morphological transformation is applied after the algorithm to fill the holes in the output images as shown in Figure 10e.The algorithm is applied on the WMU PV The input thermal image (a) in Figure 9 shows that the panel on the left is healthy while the one on the right is defective.Polystyrene have been applied behind the panel to act as an external defect, on the sides causing heating to take place as hot spots.The thresholded image is shown in Figure 9b while the morphological process result is shown in Figure 9c,d for dilation and erosion, respectively.The canny edge detector with morphological transformation is clearly included in the resulting edges defected region, as shown in Figure 9e.The canny algorithm without using thresholding and morphological transformation is shown in Figure 9f showing a typical edge and not isolating the hot spot.Hot spots indicate that the PV module is working under abnormal conditions.

Segmentation Based Hot Pixels Detection
The last section in the results shows the use of the seed selection algorithm which is based on determining the seed pixels (hot pixels) and using the mean and standard deviation values in order to determine the defective pixels and the background pixels.Figure 10 shows the results of the implemented algorithm where the hot spots have been detected.The input image in Figure 10a is pre-processed using the Gaussian filter and histogram equalization in order to avoid the low contrast pixels as shown in Figure 10b,c.Then the algorithm which chooses the seed pixels is implemented and it determines if the background pixels are related to the seed (defective or not) as shown in Figure 10d.The dilation morphological transformation is applied after the algorithm to fill the holes in the output images as shown in Figure 10e.The algorithm is applied on the WMU PV system that we installed in our lab, and the algorithm was able to detect the hot spots in the PV module as shown in Figure 10.After applying the erosion morphological transformation, the defected PV module is shown clear on the right side of Figure 10e, and there is no significant white area on the left side to give any indications of defects.
Energies 2018, 11, 2252 13 of 18 system that we installed in our lab, and the algorithm was able to the hot spots in the PV module as shown in Figure 10.After applying the erosion morphological transformation, the defected PV module is shown clear on the right side of Figure 10e, and there is no significant white area on the left side to give any indications of defects.On our PV module system in the DISPLAY lab, external defects have been applied.Adhesive paper is the first defect; it is used to write WMU on the panel glass.Figure 11 shows how the defects have been detected using the two algorithms and show the comparison between them.On our PV module system in the DISPLAY lab, external defects have been applied.Adhesive paper is the first defect; it is used to write WMU on the panel glass.Figure 11 shows how the defects have been detected using the two algorithms and show the comparison between them.
Energies 2018, 11, 2252 13 of 18 system that we installed in our lab, and the algorithm was able to detect the hot spots in the PV module as shown in Figure 10.After applying the erosion morphological transformation, the defected PV module is shown clear on the right side of Figure 10e, and there is no significant white area on the left side to give any indications of defects.On our PV module system in the DISPLAY lab, external defects have been applied.Adhesive paper is the first defect; it is used to write WMU on the panel glass.Figure 11 shows how the defects have been detected using the two algorithms and show the comparison between them.In Figure 12, to mimic a small external defect, a piece of gum was put on the PV module glass which is marked by (D1) in and detected as a hot spot.A small piece of polystyrene behind the panel is placed too; this defect is represented by (D2).The polystyrene glued on the back of the panel has been detected.
In Figure 12, to mimic a small external defect, a piece of gum was put on the PV module glass which is marked by (D1) in and detected as a hot spot.A small piece of polystyrene behind the panel is placed too; this defect is represented by (D2).The polystyrene glued on the back of the panel has been detected.An input thermal image was taken from an online source [29], after getting the permission from the source.This image has some defective PV modules.The image was used to test the ability of these algorithms fault detection.Figure 13 shows the results of applying the detection algorithms on the input image.An input thermal image was taken from an online source [29], after getting the permission from the source.This image has some defective PV modules.The image was used to test the ability of these algorithms for fault detection.Figure 13 shows the results of applying the detection algorithms on the input image.
In Figure 12, to mimic a small external defect, a piece of gum was put on the PV module glass which is marked by (D1) in and detected as a hot spot.A small piece of polystyrene behind the panel is placed too; this defect is represented by (D2).The polystyrene glued on the back of the panel has been detected.An input thermal image was taken from an online source [29], after getting the permission from the source.This image has some defective PV modules.The image was used to test the ability of these algorithms for fault detection.Figure 13 shows the results of applying the detection algorithms on the input image.Figure 14 shows the output results for the morphological and canny edge detector algorithms where the defects have been detected and the location of the defective panel is determined by longitude and latitude, and external (E) and internal (I) defects have been detected as shown in Figure 14d.Figure 15 shows the output results for the segmentation based on hot pixels' algorithm where the defects have been detected and the location of the defective panel is determined by longitude and latitude as shown in Figure 15e.The use of a CCD camera is important in order to detect some external defects; such as shadows; the shadow could hide some hot spots as shown in Figure 15e.CCD images can be used in order to determine some external defects that cannot be shown as hot spots.Figure 16 shows the output results of a Simple Linear Iterative Clustering (SLIC) super algorithm where the shadow can be detected.The using of SLIC for fault detection in PV modules was discussed in [30].Figure 15 shows the output results for the segmentation based on hot pixels' algorithm where the defects have been detected and the location of the defective panel is determined by longitude and latitude as shown in Figure 15e.The use of a CCD camera is important in order to detect some external defects; such as shadows; the shadow could hide some hot spots as shown in Figure 15e.Figure 14 shows the output results for the morphological and canny edge detector algorithms where the defects have been detected and the location of the defective panel is determined by longitude and latitude, and external (E) and internal (I) defects have been detected as shown in Figure 14d.Figure 15 shows the output results for the segmentation based on hot pixels' algorithm where the defects have been detected and the location of the defective panel is determined by longitude and latitude as shown in Figure 15e.The use of a CCD camera is important in order to detect some external defects; such as shadows; the shadow could hide some hot spots as shown in Figure 15e.CCD images can be used in order to determine some external defects that cannot be shown as hot spots.Figure 16 shows the output results of a Simple Linear Iterative Clustering (SLIC) super algorithm where the shadow can be detected.The using of SLIC for fault detection in PV modules was discussed in [30].CCD images can be used in order to determine some external defects that cannot be shown as hot spots.Figure 16 shows the output results of a Simple Linear Iterative Clustering (SLIC) super algorithm where the shadow can be detected.The using of SLIC for fault detection in PV modules was discussed in [30].

Figure 1 .
Figure 1.Hot spots in PV modules at the WMU main campus.

Figure 1 .
Figure 1.Hot spots in PV modules at the WMU main campus.

Figure 2 .
Figure 2. System description showing main components of the hardware used.

Figure 2 .
Figure 2. System description showing main components of the hardware used.

Figure 4 .
Figure 4. Use of the morphological and canny algorithms.
Set the kernel size and thresholding value Each Process reads its dedicated segment Convert the input color frame to grayscale then to apply image Morphological transformation, then apply Canny edge detection Save the output frame

Figure 4 .
Figure 4. Use of the morphological and canny algorithms.

Figure 5 .
Figure 5. Segmentation based on hot pixels seeds.

Figure 6 .
Figure 6.Schematic diagram of the WMU PV module system in the DISPLAY Lab.Figure 6.Schematic diagram of the WMU PV module in the DISPLAY Lab.

Figure 6 .
Figure 6.Schematic diagram of the WMU PV module system in the DISPLAY Lab.Figure 6.Schematic diagram of the WMU PV module in the DISPLAY Lab.

Figure 7 .
Figure 7.Our PV module in the DISPLAY Lab at WMU.

Figure 7 .
Figure 7.Our PV module in the DISPLAY Lab at WMU.

Figure 7 .
Figure 7.Our PV module in the DISPLAY Lab at WMU.

Figure 9 .
Figure 9. WMU and healthy PV modules in DISPLAY lab: Morphological and canny detector results: (a) installed PV module, (b) thresholding output, (c) dilation output, (d) erosion output, (e) canny algorithm with morphological output, and (f) canny without morphological transformation.

Figure 9 .
Figure 9. WMU defective and healthy PV modules in DISPLAY lab: Morphological and canny detector results: (a) installed PV module, (b) thresholding output, (c) dilation output, (d) erosion output, (e) canny algorithm with morphological output, and (f) canny without morphological transformation.

Figure 11 .
Figure 11.Output results for an external defect using adhesive paper: (a) installed PV module in the DISPLAY lab at WMU, (b) morphological and canny edge algorithms, and (c) segmentation-based hot pixels detection algorithm.

Figure 11 .
Figure 11.Output results for an external defect using adhesive paper: (a) installed PV module in the DISPLAY lab at WMU, (b) morphological and canny edge algorithms, and (c) segmentation-based hot pixels detection algorithm.

Figure 11 .
Figure 11.Output results for an external defect using adhesive paper: (a) installed PV module in the DISPLAY lab at WMU, (b) morphological and canny edge algorithms, and (c) segmentation-based hot pixels detection algorithm.

Figure 12 .
Figure 12.Output results for external and internal defects produced using gum and polystyrene: (a) installed PV module in the DISPLAY lab at WMU (D1 is gum defect, D2 is polystyrene defect), (b) morphological and canny edge algorithms, and (c) segmentation-based hot pixels detection

Figure 12 .
Figure 12.Output results for external and internal defects produced using gum and polystyrene: (a) installed PV module in the DISPLAY lab at WMU (D1 is gum defect, D2 is polystyrene defect), (b) morphological and canny edge algorithms, and (c) segmentation-based hot pixels detection algorithm.

Figure 14
Figure14shows the output results for the morphological and canny edge detector algorithms where the defects have been detected and the location of the defective panel is determined by longitude and latitude, and external (E) and internal (I) defects have been detected as shown in Figure14d.Energies 2018, 11, 2252 15 of 18

Figure 14 .
Figure 14.Location information for defective PV modules (external (E) and internal (I) defects): (a) input frame, (b) histogram equalization, (c) canny detector output without morphological transformation, and (d) Morphological and canny detector output with location information.

Figure 15 .
Figure 15.Location information for defective PV modules (external defects with shadow): (a) input frame, (b) Gaussian filter output, (c) thresholding output, (d) segmentation-based hot pixels detection algorithm output, and (e) morphological output.

Figure 14 .
Figure 14.Location information for defective PV modules (external (E) and internal (I) defects): (a) input frame, (b) histogram equalization, (c) canny detector output without morphological transformation, and (d) Morphological and canny detector output with location information.

Figure 14 .
Figure 14.Location information for defective PV modules (external (E) and internal (I) defects): (a) input frame, (b) histogram equalization, (c) canny detector output without morphological transformation, and (d) Morphological and canny detector output with location information.

Figure 15 .
Figure 15.Location information for defective PV modules (external defects with shadow): (a) input frame, (b) Gaussian filter output, (c) thresholding output, (d) segmentation-based hot pixels detection algorithm output, and (e) morphological output.

Figure 15 .
Figure 15.Location information for defective PV modules (external defects with shadow): (a) input frame, (b) Gaussian filter output, (c) thresholding output, (d) segmentation-based hot pixels detection algorithm output, and (e) morphological output.

Table 1 .
System specifications of the WMU PV module in the DISPLAY lab.