1. Introduction
According to REN21, over the past two years, global photovoltaic (PV) plants capacities and annual additions have grown and expanded rapidly. For instance, 621 GW were installed in the year 2019 and 760 GW in the year 2020 [
1], despite the reduction in electricity consumption and shifted daily demand patterns due to the COVID-19 pandemic [
2]. Additionally, it has become one of the most profitable options and is an energy resource that has recently decreased in cost. As a result, solar electricity generation has grown in residential, commercial, and utility-scale projects [
3]. The future of PV generation will focus on optimizing hybrid systems [
4] and improving the performance of each element of the system, as well as reducing their cost due to large-scale production [
5]. Furthermore, the sector trend has been asking for low prices, and the competitive market has encouraged investment in solar PV technologies across the entire value chain, particularly in solar cells and modules, to improve efficiencies and reduce the levelized cost of energy (LCOE) [
1]. As a result, PV power plants could grow almost sixfold over the next ten years, reaching a cumulative capacity of 2840 GW globally by 2030 and rising to 8519 GW by 2050, according to [
6].
Thus, it is established that the number of PV plants and generated power have increased around the world. This implies specific technical challenges in their maintenance and operation (O and M) [
7]. Some of these threats affect their production, which increases cost, and decreases profitability. The most common threats are the failures in the inverters and PV modules [
8]. Through dirty equipment, the state of the environment, or manufacturing defects in the PV modules, PV plant energy generation can be curtailed by 31% in the worst cases [
9,
10,
11].
One must consider that PV plants are commonly installed on roofs, rooftops, canopies, or facades for urban environments. Likewise, solar farms utilize rural environments, such as deserts, plains, and hills [
7,
12,
13]. Depending on the location of the PV plant, the manual inspection tasks could be exhausting and take up to 8 h/MW, if the number of modules is considerable. The amount of inspection time increases for solar PV plants on rooftops or canopies, by virtue of aspects of their installation [
14]. In addition, inspections to detect threats in the panels must be conducted by trained personnel. In some cases, problems occur in elevated installations, for which special training and certification is required. These jobs could put people and facilities at risk [
15].
In recent decades, unmanned aerial vehicles (UAVs) have been increasingly used in inspection and patrol tasks [
16,
17,
18]. UAV-based applications for PV plant inspections have many advantages in comparison with the manual inspection methods. The main advantages are flexibility, lower cost, larger area coverage, faster detection, higher precision, and the capacity to perform a superior and automatic inspections [
11,
17,
18,
19,
20,
21].
There are many approaches to performing an inspection with UAVs in PV modules. One of them used UAVs with a thermal imaging camera to take photos in the infrared spectrum to evaluate the UAVs parameters, such as height, speed, viewing angle, sun reflection, irradiance and temperature, all of which are necessary to perform defect inspection [
22]. In a second approach, UAVs were implemented to inspect different solar PV plants, wherein analysis of the correlation between altitude and the pixel resolution was used to detect PV panel defects and features like shape, size, location, and color, among others, of a particular defect were also detected [
7,
23,
24,
25,
26]. In a third approach, the authors proposed PV plant fault inspection with UAVs using image mosaics combined with orthophotography techniques to create a digital map; image mosaics were combined with multiple visible and/or infrared range images into a single mosaic image covering a large area [
14,
27,
28]. Whereas the orthophotography technique is a vertical photograph that shows images of objects in true planimetric position [
29]. Thus, these two techniques were integrated with previous works to achieve an advanced tool that allows monitoring and taking actions in the operation and maintenance (O and M) of PV plants [
7]. In short, this tool has been used to detect defects and dust or dirt in PV modules [
28]. Apart from this, some approaches have been developed for the detection of defects in PV modules using artificial vision techniques, machine learning, deep learning, and the integration therewith of the previous approaches [
7,
24,
30,
31,
32,
33]. Additionally, these approaches to planning the UAV’s flight path were configured from a ground control station (GCS) program. Irrespective of these approaches, an important aspect is that the UAV should automatically follow the path to cover important points in PV plants. Many research efforts have been made to calculate the paths of and solve the waypoint planning problem for UAV inspection of solar PV plant applications [
34,
35,
36,
37], but none of them propose the coverage path planning (CPP) as a method to complete this task.
The CPP, given a region of interest (RoI) in a 2D environment, consists of calculating the path that passes through each one of the points that make up the desired environment and must be found considering the limitations of movement [
38,
39]. CPP is classified as a classical NP-hard problem in the field of computational complexity. These problems were initially analyzed for indoor environments with mobile robots. However, with the development of GPS, CPPs began to be used for missions with UAVs. Due to the environment in which the task is performed and the obstacles present, precise localization in the environment is an arduous task, which makes the CPP a difficult problem [
40]. Additionally, it is classified as a motion planning subtopic in robotics, and has two approaches, heuristic and complete. In heuristic approaches, the robots follow a set of rules defining their behavior, but do not present a guarantee for successful full coverage. These guarantee using the cellular decomposition of the area, which involves space discretization into cells to simplify the coverage in each sub-region, unlike complete methods, which cannot afford such processing. Another important issue mentioned by the authors of reference [
39] is the flight time to fully cover the area, which can be reduced using multiple robots and by reducing the number of turning maneuvers. Finally, the available RoI information is important; several approaches accept previous knowledge of the robot’s respecting the search RoI (offline), while sensor-based approaches collect such information in real-time along the coverage (online) [
41].
In the literature, CPP approaches are needed in several application areas, such as floor cleaning [
42], agriculture [
43,
44], wildfire tracking [
45], bush trimming [
46], power line inspection [
47], photogrammetry [
39], visual inspection [
48], and many more. Additionally, many surveys regarding CPP present several approaches and techniques for performing missions with, mostly, land vehicles [
41,
49,
50]. The research interest in aerial robots (indoor and outdoor) has surely motivated the research of CPP [
51]. This can be implemented in many UAVs platforms, such as fixed-wing, rotary-wing, and hybrid UAV (VTOL) [
39]. Rotary-wing UAVs are inexpensive and have good maneuverability, and their small payload capacity limits the weight of on-board sensors and flight time. Hence, they are more suitable for CPP missions on a small scale. Additionally, the increasing usage of UAVs in applications with complicated missions has led to CPP methods being a very active research area for single and multiple UAVs, especially recently [
39,
52,
53,
54], As evidenced in a previous work [
43], the classic taxonomy of coverage paths in UAVs are classified into no decomposition, exact cellular decomposition, and approximate cellular decomposition. The first performs the coverage with a single UAV, for which no decomposition technique is required, because the shape of the RoI has a non-complex geometry. The second divides the free space into simple, non-overlapping regions called cells. The union of all cells fills the free space completely. The cells in which there are no obstacles are easy to cover and can be covered by the robot with simple movements. The third is based on grids. They use a representation of the environment decomposed into a collection of uniformly squared cells [
55], considering rectangular, concave, and convex polygons for RoIs. In addition to this, CPP performances were assessed with applied metrics according to [
39]. The elemental approach most used to solve offline CPP problem sis the area decomposition into non-overlapping sub-regions [
56], to determine the appropriate visiting sequence of each sub-region and to cover each decomposed region in a back-and-forth movement to secure a complete coverage path. As a result, the methods for obtaining complete coverage of an RoI are the exact and approximate cellular decomposition methods [
57,
58,
59].
On the other hand, image processing helps to obtain a map of the robot or RoI. Robots, such as UAVs, need to know the RoI before commencing CPP [
60], which represents where the PV plants are and can be determined in a process called boundary extraction [
61,
62]. Then, the deep learning (DL) image segmentation technique, also known as semantic segmentation [
63], is achieved by applying deep convolutional neural networks (CNN), such as the U-Net network model [
64,
65] or the FCN model [
66], which dramatically enhance the segmentation results. Once the segmentation is done and the mask is obtained or the RoI is identified, the GCS calculates the CPP that guides the UAV in the automatic plant inspection, during which it captures images of PV plants [
67]. Most of the failures occur at the centimeter or millimeter level, and that poses a challenge for the inexpensive sensors available today [
68]. Tests of coverage paths it can be conducted with drones in a real or simulated environment. The most viable option for this stage of the work is simulation, as verified by other research [
69,
70,
71,
72]. Simulation has been recognized as an important research tool; initially, simulation was an academic research tool, but with the advancement of computers, simulation has reached new levels. It is a remarkable tool that guarantees support in design, planning, analysis, and making decisions in different areas of research and development. Of course, robotics, as modern technology, has not been an exception [
73,
74].
This work is focused on implementing the best strategy of coverage path planning (CPP) over PV plants with UAVs using semantic segmentation in a deep learning server to obtain the RoI. The experimental results were obtained by simulating the CPP methods and using UAVs, such as the 3DR Iris and Typhoon aerial robots.
The key contributions of this work are as follows:
This work proposes CPPs as a novel strategy for conducting an inspection flight over a PV plant with an UAV, since there are no previous reports of such work.
This work used three CPP methods over three PV plants, which were modeled in a simulation environment to evaluate metrics and parameters. As a result, a relationship was found between the CPP width and energy consumption, and according to that, the best CPP method to implement.
This work proposes a hybrid CPP method that uses image processing and a DL server to find the RoI quickly and accurately, becoming a semi-automatic process.
A free simulation tool is provided, with an interface to simulate the inspection of PV plants with UAVs.
This paper is structured as follows. In
Section 2, necessary definitions and the techniques used to obtain the results are described. In
Section 3, the three CPP methods implemented are compared to show relationships among the CPP width, number of maneuvers, and energy consumption, with the aim of finding the best CPP method to implement. Finally, in
Section 4, some conclusions are given.
2. Materials and Methods
In this work, three PV power plants were selected that met the image requirements of no light distortions, non-complex geometry, and grouped panels. These plants are in different parts of the world. The first PV plant has an area of
square meters, located in Brazil
(−22.119948323621525, −51.44666423682603), known as Usina Solar Unioeste 1 [
75]. The second PV plant has an area of
square meters, located in Iran
(34.0504329771808, 49.796635265177294), known as Arak power plant [
37]. The third plant is in the United States
(38.55989816199527, −121.42374978032115); the plant has 1344 square meters of area, and it is part of a PV plant located on the roof of the California State University Sacramento Library (CSUSL) [
76].
These plants were subjected to a series of processing stages, as shown in
Figure 1. The RoIs were obtained from Google Maps satellite images with a predefined altitude, and limits, from which the image (input image) of the desired PV system was obtained as the first stage, shown in
Figure 1. In the second stage, the image was entered into a DL server that was developed in this work, taking into account the previous work [
65]. The DL server was launched with TensorFlow [
77] and Flask [
78]. This stage obtains a mask (image segmentation) of the PV plant, as shown in
Figure 1. In the third stage it was necessary to apply a series of OpenCV functions (post-processing), as referenced in Algorithm A1 in the
Appendix A, to adjust the mask (output mask) to the PV plant area, as seen in
Figure 1. Then, the output mask or RoI was introduced in the GUI interface, where the CPP method was selected to internally execute. Later, the path GPS positions (CPP computed) were sent to the UAV through MAVlink commands [
79,
80]. The UAV executed these commands in the Gazebo platform (CPP simulation) and, at the same time, the simulation data was fed back the GUI interface. Simultaneously all GPS points reached by the UAV were drawn in the GCS platform (CPP). In this stage, the trajectory was validated. Each stage is described in greater detail in the following sections.
2.1. Deep Learning (DL) Server for Segmentation
A deep learning (DL) server for segmentation was necessary to extract the RoIs from the Google Maps images. Additionally, the server was used to achieve this task automatically with the process called semantic segmentation, wherein each pixel is labeled with the class of its enclosing object [
65,
66]. In previous work, a convolutional neural network was proposed, wherein a public database was used; this data was prepared, resized for training, and assessed with two network structures. The U-net network had the best performance, in terms of metrics, in the semantic segmentation task [
65]. Then a DL server was employed to perform image segmentation and obtain the RoI [
81].
2.2. Post Processing
In this step, a set of OpenCV functions were applied with Python 3.7. For example, in the first function, morphological operators like “Erode” and “Dilate” were applied to the images, then the “FindCountours” function was applied to help extract their contours. The contour can be defined as a curve that joins all the continuous points at the boundary of the PV installation. So, the “ContourArea” function was then used to find the area of the previous contour. Following this pattern, the area was compared with 400 others to filter the bigger area and eliminate the little areas belonging to false positives. Then the “ApproxPolyDP” function was used to approximate a shape of the contour to another shape with fewer vertices. Subsequently, the “DrawContour” function was used to draw the resulting contour [
82,
83]. Finally, the “Erode” morphological operators were used again, to expand the known area and compensate for the limitations of the mask with regard to the CPP method and some faulty occurrences caused by the false positives of the DL server. The pseudocode of the openCV functions used is shown in Algorithm A1 in the
Appendix A.
2.3. 2D Coverage Path Planning Method in the GUI Interface
In previous studies of CPPs, there were many existing methods from which to select to solve the CPP problem. In this work, three methods based on CPP were selected, considering the following criteria: time of execution, ease of implementation, and more, which were used to cover the RoI. The methods were selected according to [
38,
39].
The boustrophedon exact cellular decomposition (BECD), which was proposed by [
84], was the first selected. The CPP method is delineated in
Figure 2.
The second was grid-based spanning tree coverage (GBSTC), which works with cellular decomposition, first proposed by [
85], and depicted in
Figure 3.
The third method selected for this project was grid-based wavefront coverage (GBWC), first proposed by [
86]. The method is illustrated in
Figure 4. Each of these CPP methods is explained in more detail in the following sections.
(a). The boustrophedon exact cellular decomposition (BECD) Method: This method takes the robot’s free space and obstacles and splits them into cells. These cells are covered by the robot using a back-and-forth pattern from the initial point to the final point, using maneuvers of 90 degrees to change direction from south to north or vice versa, as shown in
Figure 2. This method improves the trapezoid decomposition technique, as it exploits the structure of the polygon to determine the start and end of an obstacle, and thus is able to divide the free space into a few cells that do not require a redundant step, and it permits the coverage of curved areas [
84].
(b). Grid-Based Spanning Tree Coverage (GBSTC): This method is based on approximate cell decomposition and differs from the previous method in that the following postulates were considered. First, the method divides the space into grids of side
L. Second, the robot only moves in perpendicular directions to the sides of the grid. Third, every grid is subdivided into four grids of side
. Finally, GBSTC discards space that is partly occupied by obstacles. Consequently, considering these previous postulates, the method consists of several stages: in the first stage, a graphic structure is defined,
, where
N is nodes, defined as the central point of each grid, and
E is edges, defined as the line segments connecting the centers of adjoining grids, as shown in
Figure 3a. In the second stage, the method builds a spanning tree for S, and employs this tree to plan a cover path as follows. Starting in grid
I with a sub-grid of side
, the robot begins by travelling between adjoining sub-grids along a path that moves around the spanning tree at a constant distance and in a counterclockwise direction, finishing when the initial sub-grid,
I, is found again, which means it is also in the final point,
F [
85]. An example of this method is illustrated in
Figure 3b. The approximation depends on the side length,
L, of the grid.
(c). grid-based wavefront coverage (GBWC): The first grid-based method proposed for CPP, GBWC is an offline method that uses a grid representation, in addition to applying a full CPP method. The method requires an initial grid,
I, and a final grid,
F. A distance transformation that propagates a wavefront from the final to the initial point is used to assign a specific number to each item on the grid. That is, the method first assigns a zero to the final item, and then a one to all its surrounding grids. Then all unmarked grids adjoining those marked one are numbered two. The process is incrementally repeated until the wavefront reaches the initial grid [
86], as illustrated in
Figure 4a.
Once the distance transformation is determined, a coverage path can be found by starting at the initial grid,
I, and selecting the adjoining grid with the highest number that has not been explored. If two or more are unexplored, and adjoining grids share the same number, one of them is randomly selected, as shown in
Figure 4b.
2.3.1. Metrics
The metrics evaluate the performance of the three CPP methods. Such assessment can be performed by considering five commonly used metrics to evaluate the effectiveness of the proposed CPP methods both theoretically and in simulation (dynamically) [
7,
41,
43,
62]. These five metrics are covered path length, flight time, energy consumption, redundancy of points traveled, and percentage of coverage of the total area. Each of these metrics is described below.
The
metric (covered path length) is the length of the entire path covered by the UAV from the initial to the final point. For a trajectory in a 2D plane composed of
n points, assuming the initial point as
and the end point as
, the
can be computed as shown in Equation (
1):
where
, in which
, representing all the
n points of the UAV flight path in 2D coordinates. More details can be found in [
87].
The flight time metric of the PX4 SITL Gazebo model is the time required to travel the total flight path (takeoff, path travel, and landing) with a dynamic speed that considers the inertia and the variation in speed due to UAV turns angles. These data are collected through sensors in the Gazebo plugins [
88].
The redundancy of points traveled,
, corresponds to the number of points that are visited more than once from the total number of points that the path contains, Equation (
2).
where
, and
correspond to the number of points the trajectory contains, and the number of points visited more than once.
The percentage of coverage of the total area,
, measures the number of effectively covered points within the total number thereof by the points the area to be covered contains, given by Equation (
3).
where
, and
correspond, respectively, to the total number of points visited and the total number of points in the area.
Moreover, the number of maneuvers metric, which is the number of turning maneuvers the UAV performs on a path, is often used as the main performance metric in coverage [
89,
90].
The energy consumption metric is computed from the voltage and current data from the power module of the PX4 SITL model [
91]. Its value depends on parameters, such as the CPP width between lines and the speed and the height of the UAV at the time of implementing the CPP, which were configured in the interface and were simulated in Gazebo.
To validate the results of the methods described above, the BECD, GBSTC, and GBWC methods were implemented in two UAVs, simulated in Gazebo, and their performances were assessed by the metrics presented above [
39]. The next section describes the results and compares the models in detail.
2.4. Simulation and Validation Platform
Based on [
92], the Gazebo platform was selected to execute the simulation experiments, as it has extensive documentation on its webpage. In addition, it is the most mentioned and used simulation platform in previous work [
73,
74] that implemented path planning or CPP, used UAV sensors, or deployed several UAVs [
92]. Gazebo also allows the modeling of commercial UAVs using the PX4 autopilot software [
91], as shown in
Figure 5. In addition, this figure shows one of the experiments conducted with the Typhoon UAV, flown over the CSUSL plant. The UAV sonar sensor, represented by blue lines, is also shown, as is the UAV camera, in the box at the upper right.
The integration of Gazebo [
92], PX4 [
91], Python, and the CPP methods was implemented using ROS (Robot Operating System) as middleware [
93]. This tool allows communication among nodes. The nodes are processes, and each node has a task associated with it, such as sending a Mavlink command to control the UAV trajectory and permitting reading messages from the UAV to discern its status in flight, using a simulation mode referred to as software in the loop (SITL). This simulator provides the ability to run different vehicles, such as a plane, copter, or rover, without a need for any microcontrollers or hardware [
94]. In addition, two PX4 autopilot rotary wing UAVs, the 3DR Iris and Typhoon UAV, were chosen because they have good maneuverability and are more suitable for small-scale CPP missions. Furthermore, these UAVs have been widely used in other research [
67,
70,
95].
The GCS software (QGroundControl) was selected to validate the CPP calculated for each UAV and PV plant obtained, because it is the most compatible tool with the PX4 autopilot. It is also recommended on the PX4 webpage. On other hand, another compatible tool, namely a GUI, was designed using Qt to modify and vary the parameters and to convert the way points from RoI pixels to geo-referenced points [
96].
4. Conclusions
In this work, a method for implementing CPP in UAV for PV plant inspection was presented. The method consisted of a series of steps, one of these was the deployment of a DL-based U-net model to establish a DL service system from which to extract the limits of PV plants by extracting the boundaries of PV plants from an image. To summarize, the method was accurate, and fast without depending on the image, with low request latency and response.
This experiment focused on three novel path planning methods in the PV inspection missions in order to find the best path for covering each of the three PV power plants with less energy consumption. A GUI interface was used to order the UAV’s maneuvers in the inspection of the simulated PV plants. The results of each CPP method in the simulation were compared. The best CPPs was the BECD, for a range of CPP widths of 0 to 7 m. These path planning algorithms can be performed by any multirotor UAV that receives Mavlink commands, can carry a camera sensor, and transmit real-time video to GCS.
Performance on the CPP tasks was measured using two different types of flying robots, a Typhoon UAV and a 3DR Iris UAV. It was demonstrated that the Typhoon UAV (or one with similar characteristics) is better suited for large or medium-sized PV plants (such as those in deserts, plains, and hills); instead, the drone-like 3DR Iris UAV is more suitable for small-sized PV generation (such as on roofs and rooftops, canopies, and facades). The proposed strategy allows such comparisons to be made and enables the selection of the most suitable UAV for each type of installation.
The values obtained for the metrics collected from each of the tests show a correlation between covered path length, flight time, number of maneuvers as regards energy consumption, and ensuring that the CPPs implemented in UAVs to inspect photovoltaic plants could be similar when implemented in real plants. The results also help to predict the energy consumption of a given UAV when performing a plant inspection.