# Image-Based Gimbal Control in a Drone for Centering Photovoltaic Modules in a Thermal Image +
## 1 Introduction  
As the photovoltaic system is becoming popular as a future-oriented green energy, there is a strong tendency to install more PV systems widely. However, as operation time is increasing, the efficiency of the PV system is decreasing due to several reasons such as contamination of the PV module's surface, back surface temperature, and shadows [1, 2]. Thus, it is necessary to inspect the current status of the module surface regularly. Having a regular diagnosis of the module surface will ensure the best efficiency is kept by sending a real-time alarm for maintenance before the problem occurs. Various previous studies have tested maintenance methods to keep the efficiency of the PV system. Conventional studies aimed to find a series of faulty modules by measuring the voltage and current of the PV module, monitoring the power generation status of the inverter [3, 4], and detecting contamination cracks on the surface with a camera [5, 6]. Other studies have manually inspected PV modules using thermal images or electroluminescence images [7, 8, 9, 10]. Recently, studies have been conducted to find hotspots using a thermal camera [11, 12]. Also, several studies used a drone to inspect a wider area and reduce inspection time. When using a drone-based thermal camera, there is an additional benefit: it caneliminate the hurdles of inspection caused by the problematic location of the site, e.g., on the roof of a high building or sea surface. Since it is difficult to distinguish objects only with a thermal imaging camera, most studies use dual cameras composed of a thermal camera and a visible camera. The region of interest (ROI) is derived through image processing of the most visible image, and temperature information of the object is extracted by referring to temperature data of the thermal image. However, a thermal camera generally has a lower resolution than a visible camera because of the limitations of cost. Due to different resolutions between the visible and thermal cameras, there are often invalid frames from a thermal camera. Using a reasonable low-resolution camera, it is impossible to take an image from high altitude due to limited resolution. Therefore, the drone has to be placed at a closer distance from the PV module. In that case, since we cannot see the whole picture of the module, it is a prerequisite to take the picture in the center of our target object. A gimbal system is commonly used for obtaining clean images from drone-mounted cameras, as drones in flight present a variety of vibration frequencies. The system consists of a structure to support a camera module and a stabilizer to block outside vibrations and keep the right angle [13]. A gimbal controls the target angle of a camera and provides advantages for acquiring better and proper images. This subject and the importance of using a gimbal on a drone was discussed by various authors [14; 15]. Furthermore, a gimbal dampens vibrations, which is significantly beneficial for real-time image stabilization applications [16]. Apart from smoothing angular movements and dampening vibrations, a gimbal maintains a camera in a predefined position [17]. This is mostly the position in which the camera's axis is horizontal or vertical, but all other positions according to the gimbal's technical capabilities are possible. In this paper, we propose an image processing and control system that can automatically adjust the gimbals for PV module inspection using autonomous drones. The proposed system consists of a dual camera, a gimbal frame, a gimbal control board (GCB), and a gimbal control system (GCS). The dual camera consists of a thermal imaging camera and a visible camera and uses a brushless DC (BLDC) motor for the gimbal frame. The GCB controls the motor through the pulse width modulation (PWM) input signal, and the main controller GCS implements image processing to control the angle of the thermal imaging camera in the visible camera.