A method for detecting and cleaning foreign matter of a photovoltaic panel based on a Swin Transformer

CN116388669BActive Publication Date: 2026-10-27XI'AN UNIVERSITY OF ARCHITECTURE AND TECHNOLOGY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310362424.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-06
Publication Date
2026-10-27
Estimated Expiration
2043-04-06

AI Technical Summary

Technical Problem

[0003]目前我国光伏组件清洗大多采用人工清洗和高压洒水车冲洗的方式,虽能有效解决组件表面异物对光伏发电效率影响的问题,但随之产生的高额人工费用和水资源紧缺问题又制约企业的发展,同时国内外也有研制光伏组件清洗机器人,清洗过程机械化,不能实现智能化点对点高效清洁

Benefits of technology

[0032]本发明在光伏产业高速发展的背景下,将计算机视觉技术有效结合到光伏板异物检测中,使得光伏板的清洁方式不再局限于人工清洁以及机械化的清洁机器人,通过SwinTransformer目标检测算法和激光测距仪精准定位到光伏板异物的位置信息,自适应控制机器人上高压喷枪的伸缩杆长度、压力以及清洁时间,启动清洁程序进行清洁,清洁过程中实时检测污染物状态直到清洁完成。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116388669B_ABST
    Figure CN116388669B_ABST
Patent Text Reader

Abstract

The application discloses a kind of photovoltaic panel foreign matter detection and cleaning method based on Swin Transformer, comprising the following steps;S1: robot automatically plans path and inspects photovoltaic panel base, and photovoltaic panel image is collected by high-resolution camera;S2: Swin Transformer target detection algorithm is used to accurately locate the pollutant attached on photovoltaic panel in image, and the center coordinates of pollutant are obtained;S3: laser range finder emits laser, adjusts laser spot to the center coordinates of pollutant in image, and the distance from robot to pollutant is obtained;S4: read the attitude data of attitude sensor on laser range finder, and adjust the length and pressure of telescopic rod of high-pressure spray gun according to the size and distance of pollutant;S5: start the cleaning program of robot, and monitor the state of pollutant in real time during cleaning process, stop cleaning when no pollutant is detected, and complete cleaning.The application adjusts the spray gun of robot according to position to clean pollutant point by point, and the cleaning process is intelligent and efficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of photovoltaic panel cleaning technology, and in particular to a method for detecting and cleaning foreign objects in photovoltaic panels based on the Swin Transformer. Background Technology

[0002] Solar photovoltaic (PV) power generation, with its widespread distribution, abundant reserves, and mature technology, is unleashing new vitality against the backdrop of global energy structure transformation and upgrading, becoming a highly promising power generation technology in the new energy field. PV modules are the core components of a PV power generation system, directly affecting the system's power output. With the increasing problem of dust accumulation on solar panel surfaces, cleaning PV modules has become a critical issue that urgently needs to be addressed in the operation and maintenance of PV power plants. In actual operation, it is essential to monitor the accumulation of dust and other pollutants in real time and carry out efficient cleaning to increase the power generation of the PV power plant.

[0003] Currently, most photovoltaic module cleaning in my country is done manually or by high-pressure water trucks. While this effectively addresses the issue of foreign matter on the module surface affecting photovoltaic power generation efficiency, the resulting high labor costs and water scarcity restrict the development of enterprises. Meanwhile, photovoltaic module cleaning robots have been developed both domestically and internationally, but the mechanized cleaning process cannot achieve intelligent, point-to-point, and efficient cleaning.

[0004] A Chinese patent application with application number CN202211577775.6 and publication date of January 31, 2023 discloses a photovoltaic panel cleaning robot, which includes a frame and two walking devices. Each walking device includes a walking motor, a walking wheel assembly, and a load-bearing wheel assembly. The cleaning robot proposed in this invention is installed on the surface of the photovoltaic panel and cleans it from top to bottom and from left to right. The cleaning process is mechanized, but it cannot achieve point-to-point detection of foreign objects and intelligent cleaning. Summary of the Invention

[0005] To overcome the shortcomings of the prior art, the present invention aims to provide a method for foreign object detection and cleaning of photovoltaic panels based on SwinTransformer. This method is implemented by a robotic device and uses the SwinTransformer target detection algorithm to accurately locate the position of contaminants attached to the photovoltaic panel. The robot's spray gun is adjusted according to the position to perform point-to-point cleaning of the contaminants, making the cleaning process intelligent and efficient.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0007] A method for foreign object detection and cleaning of photovoltaic panels based on Swing Transformer includes the following steps;

[0008] S1: The robot automatically plans its path to inspect the photovoltaic panel base and collects images of the photovoltaic panels using a high-resolution camera;

[0009] S2: The Swing Transformer target detection algorithm is used to accurately locate pollutants attached to the photovoltaic panel in the image and obtain the center coordinates of the pollutants;

[0010] S3: The laser rangefinder emits a laser, and the laser spot is adjusted to the center coordinates of the contaminant in the image to obtain the distance L from the robot to the contaminant;

[0011] S4: Read the attitude data P2 from the attitude sensor on the laser rangefinder, set the attitude data of the high-pressure spray gun on the robot to P2, and then adjust the extension rod length and pressure of the high-pressure spray gun according to the size and distance of the pollutant.

[0012] S5: Start the robot's cleaning program, monitor the status of contaminants in real time during the cleaning process, and stop cleaning when no contaminants are detected, thus completing the cleaning process.

[0013] In step S1, the robot is placed in the photovoltaic panel base. The robot will automatically plan a path to carry out inspection work in the base according to the BIM model of the photovoltaic panel base. If no foreign objects are found, the robot will inspect according to the planned path. If foreign objects are found, the inspection will stop and cleaning will be carried out. After cleaning is completed, the robot will continue to inspect according to the planned path.

[0014] The robot includes a high-definition camera, a laser rangefinder, and a high-pressure spray gun. The high-definition camera, laser rangefinder, and high-pressure spray gun are located on the robot's central axis. They are all equipped with attitude sensors and can adjust their attitude 360°. When it enters the photovoltaic panel base, it adjusts the attitude of the high-definition camera until the photovoltaic panel components can be seen completely in the field of view. During the inspection process, the high-definition camera continuously collects images of the photovoltaic panels.

[0015] In step S2, the process of detecting foreign objects on the photovoltaic panel using the Swin Transformer algorithm includes the following steps:

[0016] S21. Collect a large number of photovoltaic panel images, and organize and manually label the image data;

[0017] S22. Data preprocessing: The dataset is augmented using the Mosaic data augmentation method. The augmented dataset is then divided into training set, validation set, and test set.

[0018] S23. Input the training set into the Swin Transformer object detection network to train the model. The backbone network of this model has a hierarchical structure containing four stages. Each stage reduces the resolution of the input feature map, expanding the receptive field layer by layer like a CNN. When the network inputs, the Patch Partition operation cuts the image into patches, and then the LinearEmbedding operation projects the patches into embedding vectors. Then, it goes through four stages for processing. Each stage consists of Patch Merging and an even number of Blocks. The Patch Merging operation mainly reduces the image resolution at the beginning of each stage. The Block structure includes Layer Norm, MLP, Window Attention, and Shifted Window Attention. Layer Norm is a normalization layer, MLP is a multilayer perceptron, Window Attention is a window-based self-attention module, and Shifted Window Attention is a moving window-based self-attention module.

[0019] S24. Input the image acquired in step S1 into the model to detect foreign objects and calculate the center coordinates of the foreign objects. This model is mounted on the edge computing module of the robot control center.

[0020] In step S21, a high-definition camera and a GoPro are used to acquire video data of foreign objects attached to the photovoltaic panel at the photovoltaic panel base. Valid frames from the video data are selected and saved as images. The original images are manually annotated, and the annotation file is in TXT file format. The TXT file contains the type and location of the foreign object.

[0021] In step S22, the dataset is image data collected on-site during a survey of the photovoltaic panel base. After processing, the original dataset is obtained. The Mosaic data augmentation method is used to expand the original dataset. The Mosaic data augmentation method stitches four images into one image through random scaling, random cropping, and random arrangement as training data, which greatly enriches the dataset. In particular, random scaling adds many small targets, making the trained network model more robust. The main process of Mosaic augmentation includes the following steps:

[0022] S221: Randomly read 4 images from the dataset each time;

[0023] S222: Perform flip, scale, color gamut change, and crop operations on the four images respectively;

[0024] S223: Combine images and tag files (TXT files).

[0025] The expanded dataset is then divided into a training set, a validation set, and a test set in an 8:1:1 ratio. The training set is used to train the model fitting parameters, the validation set is used to verify the effectiveness of the model and select the model that achieves the best results, and the test set is used to evaluate the performance of the final model. The test set does not participate in training and is mainly used to test the accuracy of the trained model. It cannot be used as a basis for parameter tuning or feature selection.

[0026] In step S23, the Swing Transformer algorithm applies the high-performance Transformer algorithm from the NLP field to visual tasks. Swing Transformer constructs hierarchical feature maps; the hierarchical structure offers flexibility in modeling at different scales and linear computational complexity in terms of image size. The algorithm also constructs a hierarchical Transformer, represented as a window-based computation. The shifted window method improves efficiency by limiting self-attention computation to non-overlapping local windows while allowing cross-window connections. The expanded training set obtained in step S22 is input into a model with Swing Transformer as the backbone network for training. After 1000 epochs, a target detection model for detecting foreign objects attached to photovoltaic panels is obtained, achieving an accuracy of 96.4% on the test set.

[0027] In step S24, the photovoltaic panel image acquired in step S1 is input into the SwinTransformer object detection model trained in step S23 to detect whether there are foreign objects on the photovoltaic panel assembly at the robot's current location. If foreign objects are found, the robot stops its automatic path planning and inspection work, and locates the position information of the foreign object through the SwinTransformer object detection model, that is, it outlines the bounding box of the foreign object, obtains the coordinate information Q1(x1,y1) of the upper left corner and the coordinate information Q2(x2,y2) of the lower right corner of the bounding box, and calculates the center coordinates Q(x,y) of the foreign object.

[0028] In step S3, the current attitude data P1 of the high-definition camera is obtained by the attitude sensor. After setting the attitude of the laser rangefinder to P1, the laser is emitted towards the photovoltaic panel. The laser hits the photovoltaic panel and presents a cross-shaped light spot. The image is binarized to determine the coordinate information of the light spot in the image. The position of the light spot is adjusted to the center coordinates Q(x,y) of the foreign object. The data of the laser rangefinder is obtained, that is, the distance L from the robot to the foreign object on the photovoltaic panel.

[0029] In step S4, the attitude data P2 from the attitude sensor on the laser rangefinder is read, and the attitude data of the high-pressure spray gun on the robot is set to P2. The telescopic rod of the high-pressure spray gun is adjusted according to the distance from the robot to the foreign object. The maximum length of the telescopic rod is 1.6m, and it has 3 sections, each 0.8m long. The maximum telescopic length of the high-pressure spray gun is adjusted according to the distance L obtained in step S3 (that is, the total length of the telescopic rod should be less than L while ensuring maximum telescopic extension). Then, the pressure of the high-pressure spray gun is adjusted. After several experiments, it was found that 0.3m is the dividing point for adjusting the spray gun pressure. When the difference between the total telescopic length of the high-pressure spray gun and L is less than 0.3m, low-pressure cleaning is set; when it is greater than 0.3m, high-pressure cleaning is set.

[0030] In step S5, the robot's cleaning program is initiated. The high-pressure spray gun is equipped with a professional photovoltaic panel cleaning agent, which will not affect the power generation efficiency of the photovoltaic panel or leave marks on the photovoltaic panel that could damage it. During cleaning, if the foreign object occupies more than 15 pixels in the image, it indicates that the attachment area of ​​the foreign object on the photovoltaic panel is large, and the high-pressure spray gun needs to move to clean it thoroughly, i.e., the nozzle moves up, down, left, and right to spray the cleaning agent. If the foreign object occupies less than 15 pixels in the image, it indicates that the attachment area of ​​the foreign object on the photovoltaic panel is small, and the high-pressure spray gun can perform fixed-point cleaning. In addition, the high-pressure spray gun sprays the cleaning agent in stages, spraying for 3 seconds and then stopping to perform real-time detection. The cleaning program stops when no foreign object is detected, and the cleaning is completed.

[0031] The beneficial effects of this invention are:

[0032] Against the backdrop of the rapid development of the photovoltaic industry, this invention effectively integrates computer vision technology into the detection of foreign objects on photovoltaic panels. This allows the cleaning methods for photovoltaic panels to move beyond manual cleaning and mechanized cleaning robots. By using the SwinTransformer target detection algorithm and a laser rangefinder to accurately locate the position information of foreign objects on the photovoltaic panel, the robot adaptively controls the extension rod length, pressure, and cleaning time of the high-pressure spray gun to initiate the cleaning program. During the cleaning process, the status of contaminants is monitored in real time until cleaning is completed.

[0033] The method proposed in this invention uses the Swin Transformer algorithm to achieve high accuracy in foreign object detection, and uses a robotic device to clean photovoltaic panels with low time and labor costs. By integrating the high-precision algorithm and the robotic cleaning device, it achieves high-precision point-to-point foreign object cleaning in large-scale photovoltaic panel bases, making the cleaning process intelligent and efficient. Attached Figure Description

[0034] Figure 1 This is a schematic diagram of the method flow of the present invention.

[0035] Figure 2 This is a frontal view of the robot.

[0036] Figure 3 This is a schematic diagram of the Swing Transformer backbone network.

[0037] Figure 4 This is a schematic diagram of two consecutive Swing Transformer Blocks.

[0038] Figure 5 The synthetic image obtained after augmenting Mosaic data.

[0039] Figure 6 This is a diagram showing the results of foreign object detection using the Swing Transformer.

[0040] The equipment includes: 1. High-definition camera, 2. Attitude sensor, 3. Laser rangefinder, 4. High-pressure spray gun, and 5. Cleaning agent storage tank. Detailed Implementation

[0041] The present invention will now be described in further detail with reference to the accompanying drawings.

[0042] This embodiment provides a method for foreign object detection and cleaning of photovoltaic panels based on the Swing Transformer, such as... Figure 1 As shown, it includes the following steps:

[0043] S1. The robot automatically plans its path to inspect the photovoltaic panel base and collects images of the photovoltaic panels using a high-resolution camera.

[0044] The robot is placed in the photovoltaic panel base. Based on the BIM model of the base, it automatically plans a path to inspect the area. If no foreign objects are found, it continues inspection along the planned path. If foreign objects are found, the inspection stops and cleaning begins. After cleaning, the robot resumes inspection along the planned path. Figure 2 The robot shown is equipped with a high-definition camera, laser rangefinder, and high-pressure spray gun, all located on its central axis. Each device is equipped with an attitude sensor and can adjust its attitude 360°. When it enters the photovoltaic panel base, the high-definition camera adjusts its attitude until the photovoltaic panel modules are fully visible in its field of view. During the inspection process, the high-definition camera continuously captures images of the photovoltaic panels.

[0045] S2. The Swin Transformer target detection algorithm is used to accurately locate pollutants attached to the photovoltaic panel in the image and obtain the center coordinates of the pollutants.

[0046] The process of detecting foreign objects on photovoltaic panels using the Swing Transformer algorithm includes the following steps:

[0047] S21. Collect a large number of photovoltaic panel images, and organize and manually label the image data;

[0048] High-definition cameras and GoPros were used at the photovoltaic panel base to acquire video data of foreign objects attached to the photovoltaic panels. Valid frames from the video data were selected and saved as images. The original images were manually annotated, and the annotation files were in TXT format. The TXT files contained the category and location of the foreign objects. The final annotated dataset consisted of approximately 3,000 photovoltaic panel images.

[0049] S22. Data preprocessing: The dataset is augmented using the Mosaic data augmentation method. The augmented dataset is then divided into training set, validation set, and test set.

[0050] The dataset used in this method consists of images collected on-site during a survey of a photovoltaic panel production base. After processing, the original dataset was obtained. The Mosaic data augmentation method was then used to augment the original dataset. Mosaic data augmentation involves stitching four images together into a single image using random scaling, cropping, and arrangement. This image is then used as training data. Figure 5 The image shown is synthesized from four images in the original dataset through random operations, which greatly enriches the dataset. In particular, random scaling adds many small objects, making the trained network model more robust. The main steps of Mosaic enhancement are as follows:

[0051] S221. Randomly read 4 images from the dataset each time;

[0052] S222, Perform operations such as flipping, scaling, color gamut change, and cropping on the four images respectively;

[0053] S223. Combine the images and the tag file (TXT file).

[0054] The expanded dataset is then divided into a training set, a validation set, and a test set in an 8:1:1 ratio. The training set is used to train the model fitting parameters, the validation set is used to verify the effectiveness of the model and select the model that achieves the best results, and the test set is used to evaluate the performance of the final model. The test set does not participate in training and is mainly used to test the accuracy of the trained model. It cannot be used as a basis for parameter tuning or feature selection.

[0055] S23. Input the training set into the Swin Transformer object detection network to train the model. The backbone network of this model adopts a hierarchical design, such as... Figure 3As shown, it contains four stages. Each stage reduces the resolution of the input feature map, expanding the receptive field layer by layer like a CNN. When the network inputs, the Patch Partition operation cuts the image into patches, and then the Linear Embedding operation projects the patches into embedding vectors. After processing through the four stages, each stage consists of Patch Merging and an even number of Blocks. The Patch Merging operation mainly reduces the image resolution at the beginning of each stage. The Block structure mainly consists of LayerNorm, MLP, Window Attention, and Shifted Window Attention. LayerNorm is a normalization layer, MLP is a multilayer perceptron, Window Attention is a window-based self-attention module, and Shifted Window Attention is a moving window-based self-attention module.

[0056] The Swin Transformer algorithm applies the high-performance Transformer algorithm from the NLP field to vision tasks. The Swin Transformer constructs hierarchical feature maps, which offer flexibility in modeling at different scales and exhibit linear computational complexity in terms of image size. The algorithm also constructs a hierarchical Transformer, represented as a window-based computation. The shifted window method improves efficiency by restricting self-attention computation to non-overlapping local windows while allowing cross-window connections.

[0057] The Swin Transformer backbone network consists of repeatedly stacked Swin Transformer Blocks, such as... Figure 4 As shown, there are actually two types of Block structures. The only difference between the two structures is that one uses a W-MSA (window-based multi-head self-attention) structure and the other uses a SW-MSA (moving window-based multi-head self-attention) structure. Both structures are used in pairs, with one W-MSA structure used first and then the other SW-MSA structure used. Therefore, the number of stacked SwingTransformer Blocks is always even.

[0058] When using the W-MSA module, self-attention calculation is only performed within each window, so information cannot be passed between windows. To solve this problem, the SW-MSA (Multi-Head Self-Attention Based on Moving Windows) module is introduced. Assuming W-MSA is the l-th layer, and since W-MSA and SW-MSA are used in pairs, the (l+1)-th layer uses SW-MSA. The calculation of consecutive Swing Transformer Blocks is as follows:

[0059]

[0060]

[0061]

[0062]

[0063] in and z l These represent the output characteristics of the l-th (S)W-MSA module and the MLP module, respectively; and z l+1 represents the output features of the (S)W-MSA module and the MLP module at the (l+1)th time, respectively; LN() represents Layer Norm, i.e., normalization; W-MSA and SW-MSA represent window-based multi-head self-attention using regular and shifted window partitioning configurations, respectively.

[0064] In step S22, the expanded training set was obtained and fed into a model with the Swing Transformer as the backbone network for training. After 1000 epochs, a target detection model capable of detecting foreign objects attached to photovoltaic panels was obtained, achieving an accuracy of 96.4% on the test set. The detection results are as follows... Figure 6 As shown.

[0065] S24. Input the image acquired in step S1 into the model to detect foreign objects and calculate the center coordinates of the foreign objects. This model is mounted in the edge computing module of the robot control center.

[0066] The photovoltaic panel image acquired in step S1 is input into the Swin Transformer object detection model trained in step S23 to detect whether there are foreign objects on the photovoltaic panel assembly at the robot's current location. If foreign objects are found, the robot stops its automatic path planning and inspection work. The Swin Transformer object detection model is used to locate the position information of the foreign object, that is, to draw the bounding box of the foreign object and obtain the coordinate information Q1(x1,y1) of the upper left corner and the coordinate information Q2(x2,y2) of the lower right corner of the bounding box. The center coordinates Q(x,y) of the foreign object are then calculated.

[0067] middle

[0068] S3. The laser rangefinder emits a laser and adjusts the laser spot to the center coordinates of the contaminant in the image to obtain the distance L from the robot to the contaminant;

[0069] The robot obtains its current attitude data P1 through the attitude sensor on the high-definition camera. After setting the attitude of the laser rangefinder to P1, it emits a laser towards the photovoltaic panel. The laser hits the photovoltaic panel and forms a cross-shaped spot. The image is binarized to determine the coordinate information of the spot in the image. The position of the spot is adjusted to the center coordinates Q(x,y) of the object. The data from the laser rangefinder is obtained, which is the distance L from the robot to the object on the photovoltaic panel.

[0070] S4. Read the attitude data P2 from the attitude sensor on the laser rangefinder, set the attitude data of the high-pressure spray gun on the robot to P2, and then adjust the extension rod length and pressure of the high-pressure spray gun according to the size and distance of the pollutant.

[0071] Read the attitude data P2 from the attitude sensor on the laser rangefinder, set the attitude data of the high-pressure spray gun on the robot to P2, and adjust the extension rod of the high-pressure spray gun according to the distance between the robot and the foreign object. The maximum length of the extension rod is 1.6m, and there are 3 sections, each 0.8m long. Adjust the maximum extension length of the high-pressure spray gun according to the distance L obtained in step S3 (that is, the total length of the extension rod should be less than L while ensuring maximum extension). Then adjust the pressure of the high-pressure spray gun. After several experiments, it was found that 0.3m is the dividing point for adjusting the spray gun pressure. When the difference between the total extension length of the high-pressure spray gun and L is less than 0.3m, low-pressure cleaning is set; when it is greater than 0.3m, high-pressure cleaning is set.

[0072] S5. Start the robot's cleaning program. During the cleaning process, monitor the status of contaminants in real time. When no contaminants are detected, stop the cleaning process and complete the cleaning.

[0073] The robot's cleaning program is initiated. The high-pressure spray gun is equipped with professional photovoltaic panel cleaning agent, which will not affect the power generation efficiency of the photovoltaic panels nor leave marks on them that could damage them. During cleaning, if the foreign object occupies more than 15 pixels in the image, it indicates that the attachment area on the photovoltaic panel is large, and the high-pressure spray gun needs to move around to clean it thoroughly, i.e., the nozzle moves up, down, left, and right to spray the cleaning agent. If the foreign object occupies less than 15 pixels in the image, it indicates that the attachment area on the photovoltaic panel is small, and the high-pressure spray gun can perform spot cleaning. In addition, the high-pressure spray gun sprays the cleaning agent in stages, spraying for 3 seconds and then stopping to perform real-time detection. The cleaning program stops when no foreign object is detected, completing the cleaning process.

Claims

1. A method for foreign object detection and cleaning of photovoltaic panels based on Swing Transformer, characterized in that, Includes the following steps; S1: The robot automatically plans its path to inspect the photovoltaic panel base and collects images of the photovoltaic panels using a high-resolution camera; S2: The Swing Transformer target detection algorithm is used to accurately locate pollutants attached to the photovoltaic panel in the image and obtain the center coordinates of the pollutants; S3: The laser rangefinder emits a laser beam, and the laser spot is adjusted to the center coordinates of the contaminant in the image to obtain the distance from the robot to the contaminant. ; S4: Read the attitude data from the attitude sensor on the laser rangefinder. Set the attitude data of the high-pressure spray gun on the robot to Then, the length and pressure of the high-pressure spray gun's telescopic rod are adjusted according to the size and distance of the pollutants; S5: Start the robot's cleaning program, monitor the status of contaminants in real time during the cleaning process, and stop the cleaning process when no contaminants are detected, thus completing the cleaning; In step S1, the robot is placed in the photovoltaic panel base. The robot automatically plans a path to carry out inspection work in the base according to the BIM model of the photovoltaic panel base. If no foreign objects are found, the robot will inspect according to the planned path. If foreign objects are found, the inspection will stop and cleaning will be carried out. After cleaning is completed, the robot will continue to inspect according to the planned path. The robot includes a high-definition camera, a laser rangefinder, and a high-pressure spray gun. The high-definition camera, laser rangefinder, and high-pressure spray gun are located on the central axis of the robot. They are all equipped with attitude sensors and can adjust their attitude 360°. When it enters the photovoltaic panel base, it adjusts the attitude of the high-definition camera until the photovoltaic panel components can be seen completely in the field of view. During the inspection process, the high-definition camera continuously collects images of the photovoltaic panels. In step S2, the process of detecting foreign objects on the photovoltaic panel using the Swin Transformer target detection algorithm includes the following steps: S21. Collect a large number of photovoltaic panel images, and organize and manually label the image data; S22. Data preprocessing: The dataset is augmented using the Mosaic data augmentation method. The augmented dataset is then divided into training set, validation set, and test set. S23. Input the training set into the Swin Transformer object detection network to train the model. The backbone network of this model has a hierarchical structure and contains four stages. Each stage reduces the resolution of the input feature map. When the network is input, the PatchPartition operation cuts the image into patches, and then the Linear Embedding operation projects the patches into embedding vectors. Then, it goes through 4 stages for processing. Each stage consists of Patch Merging and an even number of Blocks. The Patch Merging operation mainly reduces the image resolution at the beginning of each stage. The Block structure includes LayerNorm, MLP, Window Attention, and Shifted Window Attention. LayerNorm is a normalization layer, MLP is a multilayer perceptron, Window Attention is a window-based self-attention module, and Shifted Window Attention is a moving window-based self-attention module. S24. Input the image acquired in step S1 into the model to detect foreign objects and calculate the center coordinates of the foreign objects.

2. The method for foreign object detection and cleaning of photovoltaic panels based on Swing Transformer according to claim 1, characterized in that, In step S21, a high-definition camera and a GoPro are used to acquire video data of foreign objects attached to the photovoltaic panel at the photovoltaic panel base. Valid frames from the video data are selected and saved as images. The original images are manually annotated, and the annotation file is in TXT format. The TXT file contains the type and location of the foreign object.

3. The method for foreign object detection and cleaning of photovoltaic panels based on Swing Transformer according to claim 1, characterized in that, In step S22, the dataset is image data collected on-site during the survey of the photovoltaic panel base. After processing, the original dataset is obtained. The Mosaic data augmentation method is used to expand the original dataset. The main process of Mosaic augmentation includes the following steps: S221: Randomly read 4 images from the dataset each time; S222: Perform flip, scale, color gamut change, and crop operations on the four images respectively; S223: Combine images and tag files.

4. The method for foreign object detection and cleaning of photovoltaic panels based on Swing Transformer according to claim 1, characterized in that, In step S23, the expanded training set obtained in step S22 is input into the model with SwinTransformer as the backbone network for training, resulting in a target detection model for detecting foreign objects attached to photovoltaic panels.

5. The method for foreign object detection and cleaning of photovoltaic panels based on Swing Transformer according to claim 1, characterized in that, In step S24, the photovoltaic panel image acquired in step S1 is input into the SwinTransformer object detection model trained in step S23 to detect whether there are foreign objects on the photovoltaic panel assembly at the robot's current location. If foreign objects are found, the robot stops its automatic path planning and inspection work, and locates the position information of the foreign object through the SwinTransformer object detection model, that is, it outlines the bounding box of the foreign object and obtains the coordinate information of the upper left corner of the bounding box. and the coordinate information in the lower right corner The center coordinates of the foreign object were calculated. ,in , .

6. The method for foreign object detection and cleaning of photovoltaic panels based on Swing Transformer according to claim 1, characterized in that, In step S3, the current attitude data of the high-definition camera is acquired through the attitude sensor on the camera. Set the attitude of the laser rangefinder to A laser is emitted towards the photovoltaic panel, and the laser beam hits the panel, creating a cross-shaped spot. The image is binarized to determine the coordinates of the spot, and the position of the spot is adjusted to align with the center coordinates of the foreign object. At this location, data from the laser rangefinder is obtained, specifically the distance between the robot and the foreign object on the photovoltaic panel. .

7. The method for foreign object detection and cleaning of photovoltaic panels based on Swing Transformer according to claim 1, characterized in that, In step S4, attitude data from the attitude sensor on the laser rangefinder is read. Set the attitude data of the high-pressure spray gun on the robot to Adjust the extension rod of the high-pressure spray gun according to the distance between the robot and the foreign object, based on the distance obtained in step S3. Adjust the maximum extension length of the high-pressure spray gun, and then adjust the pressure of the high-pressure spray gun.

8. The method for foreign object detection and cleaning of photovoltaic panels based on Swing Transformer according to claim 1, characterized in that, In step S5, the robot's cleaning program is started. During cleaning, if the foreign object occupies more than 15 pixels in the image, it indicates that the attachment area of ​​the foreign object on the photovoltaic panel is large, and the high-pressure spray gun needs to move to clean it thoroughly, that is, the nozzle moves up, down, left, and right to spray the cleaning agent. If the foreign object occupies less than 15 pixels in the image, it indicates that the attachment area of ​​the foreign object on the photovoltaic panel is small, and the high-pressure spray gun can perform fixed-point cleaning. In addition, the high-pressure spray gun sprays the cleaning agent in stages, spraying for 3 seconds and then stopping to perform real-time detection. When no foreign object is detected, the cleaning program is stopped, and the cleaning is completed.

Citation Information

Patent Citations

  • Photovoltaic cell panel cleaning robot

    CN115646973A

  • Automatic cleaning system for photovoltaic module based on big data

    CN114669569A

  • Blast furnace iron notch blocking time online monitoring method and system based on two-stage classification

    CN115652003A