Photovoltaic module fault detection method and system

By combining image and circuit detection models, using improved YOLOv5 and PNN models, combined with drones and PLC to collect data, the problems of small range of photovoltaic module fault detection categories and slow detection speed in the existing technology are solved, achieving high efficiency and accuracy fault detection and real-time monitoring.

CN118944594APending Publication Date: 2024-11-12HOHAI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410898565.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

The existing photovoltaic module fault detection methods have a small range of detection categories, which cannot cope with complex environments, slow detection speed, and the model cannot be updated in time, which cannot meet the real-time monitoring needs.

Method used

The image detection model and circuit detection model are combined, and the photovoltaic module fault detection is used to detect photovoltaic modules using the improved YOLOv5 model and PNN model. Through the dual detection of image and circuit information, data is collected in combination with drone and PLC circuits, and data preprocessing and expansion are carried out. Use particle swarm algorithm to adjust hyperparameters and update the model in real time.

Benefits of technology

It improves the accuracy and efficiency of fault detection, can identify more fault categories, adapt to complex environments, ensures the generalization performance of the model and real-time update capabilities, and reduces manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118944594A_ABST
    Figure CN118944594A_ABST
Patent Text Reader

Abstract

The invention discloses a photovoltaic module fault detection method and system. The method comprises the following steps: firstly, collecting photovoltaic module image information and photovoltaic module circuit information; establishing an image detection model, and inputting the photovoltaic module image information into the image detection model to obtain a first fault; establishing a circuit detection model, and inputting the circuit information of the photovoltaic module into the circuit detection model to obtain a second fault; if the first fault type is the same as the second fault type, outputting the fault type of the photovoltaic module, otherwise, outputting the fault type of the photovoltaic module according to manual judgment; the image detection model is an improved YOLOv5 model, and a Backbone module of the improved YOLOv5 model comprises a first extraction unit, a second extraction unit, a third extraction unit and a fourth extraction unit which are connected in sequence. According to the invention, small target detection of the fault image is enhanced, the number of fault detection categories is increased, and the detection speed is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a fault detection method and system, in particular to a photovoltaic component fault detection method and system. Background Art

[0002] With the continuous development of the photovoltaic solar energy industry, the number of centralized photovoltaic power stations and distributed photovoltaic power stations has steadily increased. Manual inspection of large-scale photovoltaic power stations has become increasingly difficult. The photovoltaic module fault comprehensive detection system can not only greatly save manpower, but also monitor the status of photovoltaic modules in real time for timely maintenance. It can greatly reduce the operation and maintenance costs of enterprises, increase the power generation efficiency of photovoltaic power stations, and improve economic benefits. The existing photovoltaic module fault detection method has a small detection category range and cannot cope with frequent and complex environmental conditions. The detection model is relatively simple and the detection speed is slow. The model cannot be updated in time and cannot meet the needs of real-time monitoring in the current environment. Summary of the invention

[0003] Purpose of the invention: The purpose of the present invention is to provide a method and system for efficiently and accurately detecting photovoltaic module faults.

[0004] Technical solution: The photovoltaic module fault detection method of the present invention comprises the following steps:

[0005] Collecting photovoltaic module image information and photovoltaic module circuit information;

[0006] An image detection model is established, and the image information of the photovoltaic module is input into the image detection model to obtain a first fault;

[0007] A circuit detection model is established, and the circuit information of the photovoltaic module is input into the circuit detection model to obtain a second fault;

[0008] If the first fault is the same as the second fault type, the fault type of the photovoltaic module is output; otherwise, the fault type of the photovoltaic module is output according to manual judgment;

[0009] The image detection model is an improved YOLOv5 model, and the Backbone module of the improved YOLOv5 model includes a first extraction unit, a second extraction unit, a third extraction unit and a fourth extraction unit connected in sequence.

[0010] The first extraction unit divides the photovoltaic module image information into two paths. The first path extracts the first feature through the convolution block, and the second path obtains the second feature after passing through Patch Embedding and Swin Transformer Block (STB). The first feature and the second feature are added to obtain the third feature and input into the second extraction unit.

[0011] The second extraction unit divides the third feature into two paths. The first path obtains the fourth feature after maximum pooling and convolution. The second path obtains the fifth feature after Patch Merging and STB. The fourth feature and the fifth feature are added to obtain the sixth feature and input into the third extraction unit.

[0012] The third extraction unit and the fourth extraction unit have the same structure as the second extraction unit, and the final feature map is input into the Neck module and the Head module to obtain the first fault;

[0013] The circuit detection model is a PNN model.

[0014] Furthermore, before the photovoltaic module image information is input into the image detection model, the photovoltaic module image information is subjected to denoising and angle rotation.

[0015] Furthermore, before inputting the photovoltaic module circuit information into the circuit detection model, the photovoltaic module circuit information is also preprocessed, and the preprocessing includes: calculating the voltage and current according to the photovoltaic module circuit information to obtain the IV curve; using the open circuit voltage, the voltage at the maximum power point, the current at the maximum power point, and the equivalent series resistance as circuit characteristic quantities; using SMOTE to expand the circuit characteristic quantities to obtain expanded circuit characteristic quantities, and inputting the expanded circuit characteristic quantities into the circuit detection model.

[0016] Furthermore, the photovoltaic assembly image information includes a visible light image and an infrared image of the photovoltaic assembly.

[0017] Furthermore, a particle swarm algorithm is used to adjust the hyperparameters of the image detection model and the circuit detection model for retraining thereof.

[0018] Furthermore, the photovoltaic module image information, the photovoltaic module circuit information and the output photovoltaic module fault type are stored in an update data set, and the image detection model and the circuit detection model are updated using the update data set.

[0019] Furthermore, the image information of photovoltaic modules is collected by the drone camera, and the circuit information of photovoltaic modules is collected by building a PLC circuit.

[0020] The photovoltaic module fault detection system of the present invention comprises:

[0021] A collection unit, used for collecting photovoltaic module image information and photovoltaic module circuit information;

[0022] An image detection unit, used to establish an image detection model, input the photovoltaic module image information into the image detection model, and obtain a first fault;

[0023] A circuit detection unit, used to establish a circuit detection model, input the photovoltaic module circuit information into the circuit detection model, and obtain a second fault;

[0024] a fault output unit, which outputs the fault type of the photovoltaic module if the first fault is the same as the second fault type, and otherwise outputs the fault type of the photovoltaic module according to manual judgment;

[0025] The image detection model is an improved YOLOv5 model, and the Backbone module of the improved YOLOv5 model includes a first extraction unit, a second extraction unit, a third extraction unit and a fourth extraction unit connected in sequence.

[0026] The first extraction unit divides the photovoltaic module image information into two paths. The first path extracts the first feature through the convolution block, and the second path obtains the second feature after Patch Embedding and STB. The first feature and the second feature are added to obtain the third feature and input into the second extraction unit;

[0027] The second extraction unit divides the third feature into two paths. The first path obtains the fourth feature after maximum pooling and convolution. The second path obtains the fifth feature after Patch Merging and STB. The fourth feature and the fifth feature are added to obtain the sixth feature and input into the third extraction unit.

[0028] The third extraction unit and the fourth extraction unit have the same structure as the second extraction unit, and the final feature map is input into the Neck module and the Head module to obtain the first fault;

[0029] The circuit detection model is a PNN model.

[0030] The electronic device described in the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, the photovoltaic component fault detection method is implemented.

[0031] The computer-readable storage medium of the present invention stores a computer program, and when the computer program is executed by a processor, the photovoltaic component fault detection method is implemented.

[0032] Beneficial effects: Compared with the prior art, the advantages of the present invention are: (1) The present invention uses photovoltaic module images and circuits for fault detection respectively, which strengthens the small target detection of fault images and increases the number of fault detection categories. Since photovoltaic modules are often contaminated by bird droppings or blocked by a small amount of leaves, the present invention simplifies the network structure while ensuring recognition accuracy. The network depth is shallower and the recognition speed is faster, thereby improving the efficiency of photovoltaic fault detection; (2) The present invention uses a data expansion method to adjust the training set, which can make it closer to the real environment and ensure the generalization performance of the model; (3) The present invention updates the database in real time according to the detected fault category, continuously expands the data volume during monitoring, and can continuously optimize the model. At the same time, combined with double comparison, when there is a difference in the monitoring of the two, manual assistance will be cited to further ensure the accuracy of detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 is a flow chart of the fault detection method of the present invention;

[0034] Figure 2 This is a YOLOV5-Swin Transformer network structure diagram of an embodiment of the present invention;

[0035] Figure 3 is a PNN structure diagram of an embodiment of the present invention;

[0036] Figure 4 A structural diagram of a drone according to an embodiment of the present invention;

[0037] Figure 5 A diagram of a photovoltaic module area electrical signal acquisition system according to an embodiment of the present invention;

[0038] Figure 6 is a wireless communication flow chart of an embodiment of the present invention;

[0039] Figure 7 It is an image information fault labeling and circuit IV curve diagram of an embodiment of the present invention;

[0040] Figure 8 2 is a diagram showing the detection results of an embodiment of the present invention. DETAILED DESCRIPTION

[0041] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.

[0042] The photovoltaic module fault detection method of the present invention comprises the following steps:

[0043] Step 1: Use a drone’s dual-light camera to obtain a dataset of common faults of photovoltaic modules, such as occlusion and pollution in visible light images, reflection, open circuit, hot spot and short circuit in infrared images; build a PLC circuit to collect circuit information and calculate and extract feature information.

[0044] Step 2: Preprocess the PV module image dataset and preprocess the collected PV module circuit information.

[0045] Step 21: Convert the PV module images to a uniform size of 640×640×3 and use Labelimg to annotate them. You can get the type of the fault area and the coordinate values ​​of the upper left corner and the lower right corner of its minimum circumscribed rectangle. Fault types include occlusion and contamination in visible light images, and reflection, open circuit, hot spot and short circuit in infrared images.

[0046] Step 22: De-noise and rotate the image, and store the processed images in various categories to expand the data set.

[0047] Gaussian filtering is used for denoising:

[0048]

[0049] Where (x, y) is the original image coordinate.

[0050] Image rotation is done using:

[0051] x′=x-cx

[0052] y′=y-cy

[0053] x″=x′cos(θ)-y′sin(θ)

[0054] y″=x′sin(θ)+y′cos(θ)

[0055] x2=x″+cx

[0056] y2=y″+cy

[0057] (x, y) is the coordinate of the pixel in the original image, (cx, cy) is the coordinate of the rotation center, and (x2, y2) is the coordinate after rotation.

[0058] Step 23: Calculate the voltage and current of the extracted circuit information to obtain its IV curve, and select the open circuit voltage V oc , Maximum power point voltage V m and current I m , and the equivalent series resistance R s As a characteristic quantity for state evaluation:

[0059]

[0060] The obtained eigenvector is: [V oc ,V m ,I m ,Rs ] and the data set is aggregated by PLC communication and augmented using SMOTE. SMOTE data set augmentation:

[0061] X new =X i +λ·(X zi -X i )

[0062] Among them, a minority class sample X i , and its nearest neighbor X zi Then the new synthetic sample X new λ is a random number, and its value range is usually [0,1]. This formula means that in X i and X zi On the line segments between , new synthetic samples are generated by interpolation.

[0063] Step 3: Build an image detection model based on the improved YOLOV5-Swin Transformer and build a circuit feature information detection model based on PNN.

[0064] like Figure 2 As shown in (a), for the construction of the improved YOLOV5-Swin Transformer network, the Backbone part of YOLOV5 is replaced by the improved Swin Transformer, and CNN is added to the original STB for network interaction and fusion. The original CNN network is not effective in extracting features at a long distance, but has a better spatial perception ability for local information, while Swin Transformer has a better effect on global feature extraction, but is not as good as CNN in local spatial perception. After the features extracted by the two are interacted and then deeper feature extraction is performed, the lost information can be complemented, and the network's ability to extract image features is improved, thereby increasing the accuracy of its fault recognition.

[0065] For example, if the size of the input image is 640×640×3, a feature map of size 160×160×96 is obtained after the first column of convolution operations and Patch Embedding. The part that passes through Patch Embedding is further sent to STB for feature extraction to obtain a feature map of size 160×160×96. The image after feature extraction by CNN and the image after extraction by STB are added to obtain the overall feature information extraction image. The feature map of size 160×160×96 is continued to be sent to the next round of CNN-Swin Transformer extraction module. Figure 2 (b) shows the structure of convolution.

[0066] Unlike the first CNN-Swin Transformer extraction module, the subsequent CNN branch extraction will first enter a maximum pooling module to reduce the number of training parameters and maintain the advantages of local receptive field and parameter sharing, and the other feature will first pass through Patch Merging and then STB. After the second round of CNN-Swin Transformer extraction module, the size of the feature image is 80×80×192. At this time, after information interaction, it is sent to the third round of CNN-Swin Transformer extraction module to obtain a feature map size of 40×40×384. After the interaction, the last round of extraction is performed to obtain a feature map size of 20×20×768. At this point, the feature extraction task of the Backbone part is completed, and the subsequent processing method is the same as the traditional YOLOV5.

[0067] like Figure 3 As shown in Figure 1, the PNN structure is: the number of neurons in the input layer is 4, the number of neurons in the hidden layer is N, the number of neurons in the summation layer is the number of classification faults, and the number of neurons in the output layer is 1. The radial basis function is (where x is the input vector, c i is the i-th feature sample in the hidden layer, σ i is the width parameter associated with the radial basis function, and n is the number of samples):

[0068] Initially, N feature samples are selected from all samples. During training, the output of the i-th neuron in the hidden layer is:

[0069]

[0070] The hidden layer to the summation layer is (F is the activation function, commonly used silu):

[0071]

[0072] Its summation layer is only connected to the hidden layer units of the same category as itself, but not to the other units. The hidden layer units are the N feature vectors initially selected from the sample.

[0073] The summation layer to the output layer uses the sigmoid function to convert it into the probability of each category, and the category with the largest probability is used as the output.

[0074] The training of PNN usually involves determining the center and width parameters of the radial basis function, as well as the weights of the output layer. Adam is used to implement it, and the loss function to be minimized is the classification cross entropy.

[0075] The categorical cross entropy is:

[0076]

[0077] y i is the actual value, p i is the predicted value, y i is the total number of data points and C is the total number of categories.

[0078] Step 4: Use the processed photovoltaic module image dataset to train the YOLOV5-Swin Transformer network model, and use the processed photovoltaic module circuit information feature dataset to train the PNN.

[0079] Step 41: Divide the processed data set (images and circuits) into a training set, a validation set, and a test set;

[0080] Step 42: Input the image training (visible light image and infrared image) data sets into the improved YOLOV5-Swin Transformer network model obtained in step 3, and input the circuit feature information data set into the PNN model for training. The image data is forward-passed through the network model to obtain the output value of the network model. According to the error value between the output value and the corresponding true value in the fault data set, the contribution of each network parameter to the error value is calculated by the back-propagation algorithm Adam, and the parameters of the network model are updated according to the gradient obtained by back-propagation, and the model parameters are continuously adjusted until the preset number of training times or convergence is reached, and the training ends;

[0081] Step 43: Use the test set to test the trained model and evaluate performance indicators such as network model accuracy, recall rate, precision, and classification error.

[0082]

[0083] Among them, TP represents true positive examples, that is, the real category is predicted as the real category; TN represents true negative examples, that is, the number of wrong categories predicted as wrong categories; FP represents false positive examples, that is, the number of wrong categories predicted as real categories; FN represents false negative examples, that is, the number of real categories predicted as wrong categories;

[0084] Step 44: Use the particle swarm algorithm to adjust the hyperparameters for model retraining to improve the accuracy and robustness of the model. First, limit the value range of each hyperparameter, and then randomly generate a batch of data within the value range as the initial data. For the graphics part, the fitness function is defined as the map (average accuracy) value of the improved YOLOV5-Swin Transformer on the test set. For the circuit part, the fitness function is defined as the average accuracy of the three-fold cross validation of the PNN network. pbest is the individual optimal position, gbest is the global optimal position, inertiaweight is the inertia weight coefficient, and the particle speed and position update usually follow the following formula:

[0085]

[0086] is the velocity of particle i in dimension d, is the position of particle i in dimension d, w is the inertia weight coefficient, c1 and c2 are acceleration constants, r1 and r2 are random numbers in [0,1], and pbest id is the optimal position of individual particle i in dimension d, gbest id is the optimal position of the entire particle swarm in dimension d. The particle swarm algorithm usually updates the speed and position of each particle in each iteration until the stopping condition is met, such as reaching the maximum number of iterations or reaching a certain convergence threshold. Thus, the particle swarm algorithm can derive the optimal training model and corresponding hyperparameters.

[0087] Step 5: Equip the drone with a dual-light camera to take aerial photos of the photovoltaic power station, and transmit the aerial images to the detection system in real time for detection. Turn on the circuit measurement element, collect the circuit feature information and input it into the detection system for detection. After detection, load the detected images into the database for model update and iteration.

[0088] Step 51: Preprocess the image and transform it into an image size of 640×640×3. After the size transformation, perform Gaussian filtering. Input the filtered image into the improved YOLOV5-Swin Transformer network for detection.

[0089] Step 52: Summarize the circuit characteristic information and input it into the PNN for detection.

[0090] Step 53: Compare the fault information (image and circuit) of the corresponding photovoltaic panel. If the fault type displayed by the two is consistent, the fault information is output, and this information and the corresponding image and circuit information are stored in the update database for model update. If the faults reported by the two are not related, they will be sent to manual review. After the manual review determines the final fault, the correct fault information will be stored in the update database to update the model.

[0091] This embodiment uses a dual-light version drone to collect image information and a PLC processor to collect circuit information. The structure of the dual-light version drone is as follows: Figure 4 As shown, it includes a rotor, a dual-light camera and a wireless communication module; Figure 5 As shown in the figure, the PLC processor collects the circuit information of each photovoltaic module, including the voltage and current values ​​during operation, and calculates and extracts the characteristic values ​​of these circuit information according to the region, and transmits the circuit characteristic information through wireless communication. Figure 6 The figure shows a wireless communication flow chart in this embodiment. The method of the present invention specifically includes the following steps:

[0092] (1) Select a dual-light version of the drone, the camera resolution is required to be no less than 4056×3040 (4:3, visible light camera) 4056×2280 (16:9, infrared camera), and it has the function of data transmission on the local area network, and the camera can rotate 360° freely. The circuit for collecting characteristics of photovoltaic modules is required to have a PLC input interface number of ≥100, and wireless communication can be used for data transmission.

[0093] (2) After obtaining a dataset of common faults of photovoltaic modules, including image data and circuit feature data, the data is preprocessed. For image data: the image is converted to 640×640×3. Assuming that the size of the original image is M×N, it needs to be scaled to an image of size P×Q:

[0094]

[0095] The corresponding value of the scaled pixel point (x′, y′) to the original image (x, y) can be obtained by bilinear interpolation:

[0096] I′(x′,y′)=(1-a)(1-b)I(x,y)+a(1-b)I(x+1,y)+(1-a)bI(x,y+1)

[0097] +abI(x+1,y+1)

[0098] I′ is the transformed image, I is the original image, and a and b are the relative distances between the four pixels closest to the interpolation point.

[0099] Gaussian filtering is used for denoising:

[0100]

[0101] Where (x, y) is the original image coordinate.

[0102] Image rotation is done using:

[0103] x′=x-cx

[0104] y′=y-cy

[0105] x″=x′cos(θ)-y′sin(θ)

[0106] y″=x′sin(θ)+y′cos(θ)

[0107] x2=x″+cx

[0108] y2=y″+cy

[0109] (x, y) is the pixel coordinate in the original image, (cx, cy) is the rotation center coordinate, (x2, y2) is the coordinate after rotation, and the processed image is labeled using Labelimg.

[0110] After classifying the circuit feature data, use SMOTE to expand the data set:

[0111] X new =X i +λ·(X zi -X i )

[0112] Among them, a minority class sample X i , and its nearest neighbor X zi Then the new synthetic sample X new λ is a random number, and its value range is usually [0,1]. This formula means that in X i and X zi On the line segments between , new synthetic samples are generated by interpolation.

[0113] The two complete the formation of the initial database. Figure 7 (a) shows an example of visible light image fault description. Figure 7 (b) shows an example of infrared light fault description. Figure 7 (c) shows the circuit information IV curve.

[0114] (3) Build an image detection model based on the improved YOLOV5-Swin Transformer and a circuit information detection model based on PNN.

[0115] The improved YOLOV5-Swin TransformerBackbone network is as follows: the size of the input image is 640×640×3, and after the first column of convolution operations and Patch Embedding, a feature map of size 160×160×96 is obtained. The part that passes through Patch Embedding is continued to be sent to STB for feature extraction to obtain a feature map of size 160×160×96. The image after CNN feature extraction is added to the image after STB extraction to obtain the overall feature information extraction image, and the feature map of size 160×160×96 is continued to be sent to the next round of CNN-Swin Transformer extraction module. Unlike the first CNN-Swin Transformer extraction module, the subsequent CNN branch will first enter a maximum pooling module before extraction to reduce the number of training parameters and maintain the advantages of local receptive field and parameter sharing. After the second round of CNN-Swin Transformer extraction module, the size of the feature image is 80×80×192. At this time, after information interaction, it is sent to the third round of CNN-Swin Transformer extraction module to obtain a feature map size of 40×40×384. After the interaction, the last round of extraction is performed to obtain a feature map size of 20×20×768. At this point, the feature extraction task of the Backbone part is completed, and the subsequent processing method is the same as the traditional YOLOV5.

[0116] PNN is: the input layer dimension is the dimension of the extracted circuit feature information, and the number of hidden layers N can be selected by the particle swarm algorithm to find the optimal number of hidden layers.

[0117] (4) Use the processed PV module failure dataset to train the improved YOLOV5-Swin Transformer network model, and use the processed circuit information dataset to train the PNN;

[0118] (41) Divide the processed dataset (images and circuits) into training set, validation set, and test set;

[0119] (42) The image training set (visible light and infrared) is input into the improved YOLOV5-SwinTransformer network model obtained in step 3, and the circuit feature information data set is input into the PNN model for training. The image data is forward-passed through the network model, and the circuit information data is input into the PNN model, using three-fold cross-validation. The output value of the network model is obtained, and the contribution of each network parameter to the error value is calculated by the back-propagation algorithm Adam according to the error value between the output value and the corresponding true value in the fault data set. The parameters of the network model are updated according to the gradient obtained by back-propagation, and the model parameters are continuously adjusted until the preset number of training times is reached or the convergence state is reached, and the training ends; during training, the learning rate adopts the cosine annealing algorithm, and the cosine function is used to gradually reduce the learning rate during the training process to better explore the loss function space and improve the performance of the model:

[0120]

[0121] n max is the initial learning rate, T is the total number of training epochs, and t is the current epoch number. During the entire training process, the learning rate will be max It changes between 0 and 0, showing a cosine curve trend.

[0122] (43) Use the test set to test the trained model and evaluate the performance indicators of the network model such as accuracy, recall rate, precision, and classification error.

[0123]

[0124] Among them, TP represents true positive examples, that is, the real category is predicted as the real category; TN represents true negative examples, that is, the number of wrong categories predicted as wrong categories; FP represents false positive examples, that is, the number of wrong categories predicted as real categories; FN represents false negative examples, that is, the number of real categories predicted as wrong categories;

[0125] (44) The particle swarm algorithm is used to adjust the hyperparameters for retraining to improve the accuracy and robustness of the model. Specifically:

[0126] (441) The value range of each hyperparameter is limited, and then a batch of data is randomly generated within the value range as initial data.

[0127] (442) The fitness function is defined as the final map (average precision) value of the improved YOLOV5-Swin Transformer on the test set and the average accuracy of the three-fold cross validation of the PNN network.

[0128] (443) Iterate according to this formula until the condition is met:

[0129]

[0130] is the velocity of particle i in dimension d, is the position of particle i in dimension d, w is the inertia weight coefficient, c1 and c2 are acceleration constants, r1 and r2 are random numbers in [0,1], and pbest id is the optimal position of individual particle i in dimension d, gbest id is the optimal position of the entire particle swarm in dimension d.

[0131] (444) After obtaining the optimal training model parameters, the parameters are stored in the database as the latest model structure parameters and the corresponding training model.

[0132] (5) A dual-light camera is installed on a drone to take aerial photos of the photovoltaic power station, and the aerial images are transmitted to the detection system in real time for detection. The circuit measurement elements are turned on, and the circuit characteristic information is collected and input into the detection system for detection.

[0133] (51) The image is preprocessed and transformed into an image size of 640×640×3. After the size transformation, Gaussian filtering is performed. The filtered image is input into the improved YOLOV5-Swin Transformer network for detection.

[0134] (52) The circuit feature summary information is input into the PNN for detection.

[0135] (53) Compare the fault information (image and circuit) of the corresponding photovoltaic panel. If the fault types displayed by the two are consistent, the fault information will be output, and this information and the corresponding image and circuit information will be stored in the database for model update. If the faults reported by the two are not related, they will be sent for manual review. After the manual review determines the final fault, the correct fault information will be stored in the database for model update. The final detection effect diagram is shown in the figure below. Figure 8 As shown, Figure 8 (a) shows the visible light image fault detection result. Figure 8 (b) shows the infrared image fault detection result.

[0136] When a fault is detected, the detection will be stored in the update database, which contains normal detection information and manually corrected information. 0.2 of the normal information in the database and 0.8 of the manually corrected information are used as the data set for model update. The data set for model update is divided into training set and validation set in a ratio of 7:3. When the stock of the data set for model update reaches 100, the model will be updated, and the previously trained model will be transferred for learning. After manual confirmation, the updated model will replace the current model and clear the current database to wait for the next fault information to be filled in.

[0137] The photovoltaic module fault detection system of the present invention comprises:

[0138] A collection unit, used for collecting photovoltaic module image information and photovoltaic module circuit information;

[0139] An image detection unit, used to establish an image detection model, input the photovoltaic module image information into the image detection model, and obtain a first fault;

[0140] A circuit detection unit, used to establish a circuit detection model, input the photovoltaic module circuit information into the circuit detection model, and obtain a second fault;

[0141] a fault output unit, which outputs the fault type of the photovoltaic module if the first fault is the same as the second fault type, and otherwise outputs the fault type of the photovoltaic module according to manual judgment;

[0142] The image detection model is an improved YOLOv5 model, and the Backbone module of the improved YOLOv5 model includes a first extraction unit, a second extraction unit, a third extraction unit and a fourth extraction unit connected in sequence.

[0143] The first extraction unit divides the photovoltaic module image information into two paths. The first path extracts the first feature through the convolution block, and the second path obtains the second feature after Patch Embedding and STB. The first feature and the second feature are added to obtain the third feature and input into the second extraction unit;

[0144] The second extraction unit divides the third feature into two paths. The first path obtains the fourth feature after maximum pooling and convolution. The second path obtains the fifth feature after Patch Merging and STB. The fourth feature and the fifth feature are added to obtain the sixth feature and input into the third extraction unit.

[0145] The third extraction unit and the fourth extraction unit have the same structure as the second extraction unit, and the final feature map is input into the Neck module and the Head module to obtain the first fault;

[0146] The circuit detection model is a PNN model.

[0147] The electronic device described in the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, the photovoltaic component fault detection method is implemented.

[0148] The computer-readable storage medium of the present invention stores a computer program, and when the computer program is executed by a processor, the photovoltaic component fault detection method is implemented.

[0149] The computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and that can be accessed by a computer.

[0150] The processor is used to execute the computer program stored in the memory to implement each step of the method involved in the above embodiment.

Claims

1. A photovoltaic module fault detection method, characterized in that: The steps include: Collecting photovoltaic module image information and photovoltaic module circuit information; An image detection model is established, and the image information of the photovoltaic module is input into the image detection model to obtain a first fault; A circuit detection model is established, and the circuit information of the photovoltaic module is input into the circuit detection model to obtain a second fault; If the first fault is the same as the second fault type, the fault type of the photovoltaic module is output; otherwise, the fault type of the photovoltaic module is output according to manual judgment; The image detection model is an improved YOLOv5 model, and the Backbone module of the improved YOLOv5 model includes a first extraction unit, a second extraction unit, a third extraction unit and a fourth extraction unit connected in sequence. The first extraction unit divides the photovoltaic module image information into two paths. The first path extracts the first feature through the convolution block, and the second path obtains the second feature after passing through the Patch Embedding and Swin Transformer Block. The first feature and the second feature are added to obtain the third feature and input into the second extraction unit; The second extraction unit divides the third feature into two paths. The first path obtains the fourth feature after maximum pooling and convolution. The second path obtains the fifth feature after Patch Merging and Swin Transformer Block. The fourth feature and the fifth feature are added to obtain the sixth feature and input into the third extraction unit. The third extraction unit and the fourth extraction unit have the same structure as the second extraction unit, and the final feature map is input into the Neck module and the Head module to obtain the first fault; The circuit detection model is a PNN model.

2. The photovoltaic module fault detection method according to claim 1, characterized in that: Before the photovoltaic module image information is input into the image detection model, the photovoltaic module image information is also subjected to denoising and angle rotation.

3. The photovoltaic module fault detection method according to claim 1, characterized in that: Before inputting the photovoltaic module circuit information into the circuit detection model, the photovoltaic module circuit information is preprocessed, and the preprocessing includes: The voltage and current are calculated according to the photovoltaic module circuit information to obtain an IV curve; the open circuit voltage, the voltage at the maximum power point, the current at the maximum power point, and the equivalent series resistance are used as circuit characteristic quantities; the circuit characteristic quantities are expanded using SMOTE to obtain expanded circuit characteristic quantities, and the expanded circuit characteristic quantities are input into a circuit detection model.

4. The photovoltaic module fault detection method according to claim 1, characterized in that: The photovoltaic assembly image information includes a visible light image and an infrared image of the photovoltaic assembly.

5. The photovoltaic module fault detection method according to claim 1, characterized in that: The particle swarm algorithm is used to adjust the hyperparameters of the image detection model and the circuit detection model for their retraining.

6. The photovoltaic module fault detection method according to claim 1, characterized in that: The photovoltaic module image information, the photovoltaic module circuit information and the output photovoltaic module fault type are stored in an update data set, and the image detection model and the circuit detection model are updated using the update data set.

7. The photovoltaic module fault detection method according to claim 1, characterized in that: The image information of photovoltaic modules is collected through the drone camera, and the circuit information of photovoltaic modules is collected by building a PLC circuit.

8. A photovoltaic module fault detection system, characterized in that: include: A collection unit, used for collecting photovoltaic module image information and photovoltaic module circuit information; An image detection unit, used to establish an image detection model, input the photovoltaic module image information into the image detection model, and obtain a first fault; A circuit detection unit, used to establish a circuit detection model, input the photovoltaic module circuit information into the circuit detection model, and obtain a second fault; a fault output unit, which outputs the fault type of the photovoltaic module if the first fault is the same as the second fault type, and otherwise outputs the fault type of the photovoltaic module according to manual judgment; The image detection model is an improved YOLOv5 model, and the Backbone module of the improved YOLOv5 model includes a first extraction unit, a second extraction unit, a third extraction unit and a fourth extraction unit connected in sequence. The first extraction unit divides the photovoltaic module image information into two paths. The first path extracts the first feature through the convolution block, and the second path obtains the second feature after passing through the Patch Embedding and Swin Transformer Block. The first feature and the second feature are added to obtain the third feature and input into the second extraction unit; The second extraction unit divides the third feature into two paths. The first path obtains the fourth feature after maximum pooling and convolution. The second path obtains the fifth feature after Patch Merging and Swin Transformer Block. The fourth feature and the fifth feature are added to obtain the sixth feature and input into the third extraction unit. The third extraction unit and the fourth extraction unit have the same structure as the second extraction unit, and the final feature map is input into the Neck module and the Head module to obtain the first fault; The circuit detection model is a PNN model.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is loaded into a processor, the photovoltaic component fault detection method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the photovoltaic component fault detection method according to any one of claims 1 to 7 is implemented.