Photovoltaic panel defect detection method based on Raspberry Pi

By combining Raspberry Pi with an infrared focal plane array and an ACF-YOLO network model, non-contact and non-destructive testing of photovoltaic panel defects was achieved, overcoming the limitations of existing testing methods and improving the accuracy and efficiency of testing.

CN121724931APending Publication Date: 2026-03-24NANJING UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-10
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing methods for detecting defects in photovoltaic panels suffer from high contact risks, strong environmental dependence, complex data processing, and difficulty in achieving lightweight and accurate identification and location.

Method used

A photovoltaic panel defect detection method based on Raspberry Pi is adopted, which uses an infrared focal plane array to acquire image sequences, and combines FPGA-driven image processing and an ACF-YOLO network model to achieve non-contact and non-destructive detection.

Benefits of technology

It achieves accurate identification and location of defects in photovoltaic panels, and has the advantages of high efficiency, non-destructive testing, strong environmental robustness, and simple and flexible operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121724931A_ABST
    Figure CN121724931A_ABST
Patent Text Reader

Abstract

The invention provides a photovoltaic panel defect detection method based on Raspberry Pi, and the method comprises the steps: exciting a to-be-detected photovoltaic panel through a light source, and collecting a 16-frame original photovoltaic image sequence through an infrared focal plane array driven by an FPGA (Field Programmable Gate Array); carrying out frame average processing on the 16-frame original photovoltaic image sequence to obtain a background mean value image; according to the original photovoltaic image sequence and the background mean value image, calculating a deviation absolute value of a sample and a mean value by using a mean absolute error to obtain a deviation feature image representing defect information; de-noising processing is carried out on the deviation characteristic image by adopting a selective multi-stage median filtering algorithm and enhancement processing is carried out on the deviation characteristic image by adopting a self-adaptive linear segmentation stretching algorithm in sequence, so that a preprocessed photoluminescence image is obtained; making a training data set based on the preprocessed photoluminescence image, and training the constructed ACF-YOLO network model to obtain a photovoltaic defect detection model; and reasoning a to-be-detected image by using the photovoltaic defect detection model, and outputting a final photovoltaic module defect detection result. The invention solves the limitation of the existing photoluminescence (PL) defect detection instrument.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of photovoltaic panel defect detection, and particularly relates to a photovoltaic panel defect detection method based on a Raspberry Pi. BACKGROUND

[0002] Photovoltaic power generation is steadily moving towards "main power source" due to its cost and large-scale application advantages. However, its development is restricted by two core factors, energy storage technology and system reliability. The annual average inspection cost of a single 100MW power station is more than 800,000 yuan, and the power generation loss caused by component defects is as high as 5%-8%. Therefore, it is necessary to overhaul the photovoltaic panel before leaving the factory.

[0003] The current mature defect detection methods all have certain limitations. For example, the detection method based on EL needs to apply a reverse voltage to the component, which undoubtedly increases the risk of component damage, and the imaging effect of this method is highly dependent on the detection environment; the detection method based on phase-locked infrared thermal imaging is also extremely sensitive to environmental interference, and the technical threshold for data processing and interpretation is high, making it difficult to build a lightweight AI model to realize accurate identification and positioning of defects. SUMMARY

[0004] In order to overcome the shortcomings of the prior art, the application provides a photovoltaic panel defect detection method based on a Raspberry Pi, which realizes non-contact and non-destructive detection of photovoltaic panels, and has high accuracy and efficiency in defect identification and positioning.

[0005] A photovoltaic panel defect detection method based on a Raspberry Pi, comprising:

[0006] Step 1, exciting the photovoltaic panel to be detected by using a light source, and collecting 16 frames of original photovoltaic image sequences by an infrared focal plane array driven by an FPGA;

[0007] Step 2, performing frame average processing on the 16 frames of original photovoltaic image sequences to obtain a background mean image;

[0008] Step 3, calculating the absolute deviation of samples and mean values by using mean absolute error according to the original photovoltaic image sequences and the background mean image, to obtain a deviation feature image representing defect information;

[0009] Step 4, sequentially performing denoising processing on the deviation feature image by using a selective multi-level median filter algorithm, and performing enhancement processing by using an adaptive linear segmented stretching algorithm, to obtain a preprocessed photoluminescence image;

[0010] Step 5, preparing a training data set based on the preprocessed photoluminescence image, training an ACF-YOLO network model constructed, and obtaining a photovoltaic defect detection model;

[0011] Step 6, using the photovoltaic defect detection model to infer the image to be detected, output the final photovoltaic module defect detection result.

[0012] Further, the step 1 specifically comprises:

[0013] Step 1-1, position the photovoltaic panel to be tested at the starting position of the one-dimensional translation stage, so that the translation direction is perpendicular to the camera optical axis;

[0014] Step 1-2, the Raspberry Pi sends light source control instructions through the serial communication interface to drive the uniformization area array excitation light source to irradiate the photovoltaic cell panel with a specific intensity of light, and when the ambient light intensity is lower than 500 lux, the steady-state excitation mode is enabled, and when it is higher than 500 lux, the pulse width modulation excitation mode is switched to; At the same time, control the translation stage to move at a constant speed;

[0015] Step 1-3, the photoluminescence signal emitted by the photovoltaic panel to be tested is incident on the area array InGaAs short-wave infrared camera through the narrow-band filter structure;

[0016] Step 1-4, the area array InGaAs short-wave infrared camera synchronously collects and real-time executes non-uniformity correction and background noise suppression processing, generating 16 frames of original photovoltaic image sequences.

[0017] Further, the narrow-band filter structure comprises a near-infrared optical lens and a band-pass filter with a center wavelength of 1150nm and a bandwidth of ±50nm.

[0018] Further, the area array InGaAs short-wave infrared camera specifically comprises:

[0019] Area array InGaAs sensor circuit: composed of InGaAs focal plane array and its driving timing circuit, used for converting incident light signal into analog electrical signal;

[0020] Voltage conversion circuit: integrated multi-channel switching power supply chip, used for generating 3.3V, 5V and ±15V working voltage and distributing to each functional module;

[0021] Signal processing circuit: contains differential amplifier and 14-bit analog-to-digital converter, used for converting analog signal into LVDS format digital signal;

[0022] FPGA processing sub-card: built-in Xilinx FPGA chip, DDR3 cache module and Flash configuration memory, realizing real-time caching, non-uniformity correction and noise reduction, enhancement processing of digital signal;

[0023] Image output interface: using CameraLink protocol encoding chip and standard interface connector, transmitting processed image data;

[0024] The optical signal is converted into an analog electrical signal by the area array InGaAs sensor circuit, and after being digitally processed by the signal processing circuit, it is input into the FPGA processing daughter card. Finally, it is transmitted to the Raspberry Pi in the form of CameraLink video stream through the image output interface.

[0025] Furthermore, the data processing flow of the FPGA processing daughter card is as follows:

[0026] The IBUFDS, IDELAYE2, and ISERDESE2 primitives are used to sequentially perform differential-to-single-ended conversion, data bit alignment, and serial-to-parallel conversion on the LVDS digital signal.

[0027] Using the AXI4 bus protocol and MIG controller, the converted data is written to the DDR3 memory via the S2MM module;

[0028] Four black reference storage areas and one real-time image storage area are allocated in DDR3, and noise suppression is achieved by performing linear subtraction between the real-time image and the black reference data.

[0029] The denoised image data is buffered asynchronously via FIFO and output to the Raspberry Pi according to the CameraLink transmission protocol.

[0030] Furthermore, in step 4, a selective multi-level median filtering algorithm is used for denoising. Specifically, this includes: creating a 3*3 window and traversing the entire image through the window; triggering filtering only when the center pixel is the extreme value of the window; dividing the window into three feature regions during filtering: the diagonal is block 1, the cross shape is block 2, and the center point is block 3; then, taking the median of block 1 and block 2 respectively, and directly reading the center value of block 3; finally, taking the median of the three, and performing filtering based on the median.

[0031] Furthermore, in step 4, the adaptive linear piecewise stretching algorithm performs enhancement processing, specifically including: performing histogram statistics in the forward frame of each image frame to record the number of times each pixel's grayscale value appears; obtaining Xmin and Xmax of this frame image through frame retrace statistics; using Xmin and Xmax obtained from the previous frame to process the next frame image; and calculating Xmin and Xmax during frame retrace. The value of Q is calculated in the next frame; then, the result Q is divided by 64, which means that the stretching operation is completed by subtraction, multiplication and shifting for each pixel.

[0032] Further, the ACF-YOLO network model is embedded with an adaptive complementary fusion module ACF between a convolution module and a spatial pyramid pooling module of a backbone feature extraction network of a YOLO network model, the adaptive complementary fusion module ACF receives a deep feature map output from an upper-level convolution module as input, and outputs an enhanced feature map to a lower-level spatial pyramid pooling module after internal spatial and channel complementary fusion processing.

[0033] Further, the processing process of the adaptive complementary fusion module ACF on the input image is as follows:

[0034] First, the input embedding tensor is processed in the spatial dimension Perform group normalization operation , where N is the batch size, C is the number of channels, H and W are the height and width of the feature map respectively, is the feature map mean and standard deviation, is the learnable affine parameter, , and ε is a positive number;

[0035] Based on Parameter generation spatial normalization weight , i represents different pixels;

[0036] Based on the normalized weight, the strong / weak features are separated using the gating function and ;

[0037] Cross-fusion and tensor splicing are used to generate spatial refined embedding ;

[0038] Then in the channel dimension, the Perform group convolution with a group number of 2 to generate and branch features;

[0039] Construct a double-path mixed feature and , ;

[0040] Global average pooling and Softmax are used to generate channel weights , ; weighted fusion features and separated addition are used to output the final channel refined embedding .

[0041] Further, the Raspberry Pi is loaded with the trained photovoltaic defect detection model.

[0042] Compared with the prior art, the present application has the beneficial effects that: the image obtained by the infrared focal plane array is transmitted to the Raspberry Pi after being preprocessed and runs the ACF-YOLO target detection algorithm, the position and type of the defects of the photovoltaic panel are located, the non-contact and non-destructive detection of the photovoltaic panel is successfully realized, and the present application has high robustness to environmental brightness. At the same time, compared with the prior art, the present application also has the characteristics of simple operation, flexibility and convenience, and high detection efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0043] Figure 1 The flowchart of the method for detecting the photovoltaic panel based on photoluminescence provided by the present application.

[0044] Figure 2 The structural design diagram of the detection system provided by the embodiment of the present application.

[0045] Figure 3 The design diagram of the image acquisition module provided by the embodiment of the present application.

[0046] Figure 4 The FPGA hardware driving logic block diagram provided by the embodiment of the present application.

[0047] Figure 5 The original image acquired by the image acquisition module of the photovoltaic panel detection system based on photoluminescence provided by the embodiment of the present application.

[0048] Figure 6 The ACF-YOLO network architecture schematic diagram provided by the present application.

[0049] Figure 7 The defect detection effect diagram of the photovoltaic panel detection method based on the ACF-YOLO model provided by the present application. DETAILED DESCRIPTION

[0050] The technical solutions in the embodiments of the present application will be described clearly and detailedly below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0051] Unless otherwise defined, all the technical and scientific terms used in the present application have the same meanings as those commonly understood by those skilled in the art to which the present application belongs. The terms used in the present application are only for the purpose of describing the specific embodiments of the present application, and are not intended to limit the present application. The term "and / or" used in the present application includes any and all combinations of one or more related listed items.

[0052] Some embodiments of the present application will be described in detail with reference to the drawings. The following examples and features in the examples can be combined with each other in the case of no conflict.

[0053] The embodiment of the present application provides a photoluminescence-based photovoltaic panel detection device, referring to Figure 1 and Figure 2 The device comprises a planar array InGaAs short-wave infrared imaging camera, a narrow-band filter structure, a program-controlled direct-current power supply, a uniform planar excitation light source, a servo motor driving mechanism, a test Raspberry Pi and a photovoltaic cell panel to be detected. The photovoltaic cell panel to be detected is fixedly arranged on a precision one-dimensional translation stage controlled by the servo motor driving mechanism. The test Raspberry Pi is configured to output a control instruction to the program-controlled direct-current power supply, drive the uniform planar excitation light source to irradiate the photovoltaic cell panel to be detected with a specific intensity of light, so that the internal carrier of the photovoltaic cell panel to be detected is recombined to excite a photoluminescence signal of a specific wavelength. The signal is subjected to band-pass filtering processing through the narrow-band filter structure, and then is received by the planar array InGaAs short-wave infrared imaging camera and converted into an electric signal. The output signal of the imaging camera is processed by a noise reduction processing unit, and then transmitted to the test Raspberry Pi for real-time image display. Meanwhile, the test Raspberry Pi is configured to run an ACF-YOLO target detection algorithm based on a convolutional neural network, identify and analyze the received photoluminescence image, so as to realize accurate classification and spatial position positioning of the types of defects on the surface and inside of the photovoltaic cell panel to be detected. The structure of the device is only a kind of detection device, which is a conventional detection device in the field. The innovation of the present application lies in the combination of the ACF-YOLO target detection algorithm and the Raspberry Pi.

[0054] The servo motor driving mechanism comprises a precision single-axis electric translation stage and a matching driver. The movement speed of the precision single-axis electric translation stage is steplessly controlled through pulse instructions sent by the Raspberry Pi.

[0055] The uniform planar excitation light source is composed of an 850nm wavelength LED array. Each LED unit is integrated with a 100° divergence angle condenser lens optical structure.

[0056] Based on the system, a photovoltaic cell panel defect detection method comprises the following steps.

[0057] Step 1, a light source is used to excite a photovoltaic panel to be detected, and 16 frames of original photovoltaic image sequences are collected through an infrared focal plane array driven by an FPGA. The original image is as shown in Figure 5 ;

[0058] Step 2, frame average processing is performed on the 16 frames of original photovoltaic image sequences to obtain a background mean image.

[0059] Step 3, according to the original photovoltaic image sequence and the background mean image, the absolute value of the deviation of the sample and the mean value is calculated by using the mean absolute error, and a deviation feature image representing the defect information is obtained;

[0060] Step 4, the deviation feature image is sequentially subjected to denoising processing by using a selective multi-level median filtering algorithm, and enhancement processing by using an adaptive linear segmented stretching algorithm, and a preprocessed photoluminescence image is obtained.

[0061] Step 5, based on the preprocessed photoluminescence image, a training data set is prepared, and an ACF-YOLO network model is trained to obtain a photovoltaic defect detection model.

[0062] Step 6, the photovoltaic defect detection model is used to infer the to-be-detected image, and a final photovoltaic module defect detection result is output.

[0063] The raspberry here refers to a device with computing function and / or processing capability, which can be a single-chip microcomputer or a computer.

[0064] As described Figure 2 As shown, the photovoltaic panel is excited by the modulated light source to emit an image of infrared band light, and the image is transmitted to the raspberry via a cameralink protocol.

[0065] In the embodiment, the modulated light source can include the following two configuration modes:

[0066] In one possible configuration mode, the system uses direct current light to excite, that is, a steady-state PL technology, and then an infrared camera is used to collect the spatial radiation luminescence signal. It is worth noting that in this configuration mode, the system has weak anti-interference ability to the ambient light.

[0067] The contrast formula of the image is:

[0068]

[0069] With the increase of the ambient light intensity, the contrast of the image decreases, and the defects of the photovoltaic panel image will be significantly reduced.

[0070] In another possible configuration mode, the system uses modulated light to excite the photovoltaic panel, and the modulated light is a square wave with a certain fixed frequency and a duty cycle of 50%. In the embodiment, the system uses a 5Hz light source to excite.

[0071] The photoluminescence can be regarded as a direct current component of the photovoltaic panel ambient light. After the light source system applies excitation to the photovoltaic panel, due to the difference in the defect degree of the photovoltaic panel, light with different intensities can be radiated. Therefore, the light source is applied with light with modulation information, and the received light is demodulated, so that the defect information of the photovoltaic panel can be obtained. In the embodiment, 16 frames of images are selected as a group for multi-frame processing. At the same time, in order to balance the algorithm efficiency and accuracy, the average absolute error is used to represent the deviation of the sample from the mean value, so as to represent the defect information of the photovoltaic module.

[0072] In the embodiment, the design of the image acquisition module is as shown in Figure 3 The image acquisition module includes two parts, a compact optical design using a narrow-band filter and an infrared lens, and a hardware circuit design. The circuit is a conventional technology in the art, and will not be described here. The narrow-band filter structure includes a near-infrared optical lens and a band-pass filter with a center wavelength of 1150 nm and a bandwidth of ±50 nm.

[0073] In the embodiment, the hardware circuit design of the area array InGaAs short-wave infrared camera includes an area array sensor circuit, a voltage conversion circuit, a signal processing (AD conversion) circuit, and an FPGA subcard.

[0074] The area array InGaAs sensor circuit is composed of an InGaAs focal plane array and its driving timing circuit, which is used to convert the incident light signal into an analog electrical signal.

[0075] The voltage conversion circuit is an integrated multi-channel switching power supply chip, which is used to generate 3.3V, 5V and ±15V working voltage and distribute to each functional module.

[0076] The signal processing circuit includes a differential amplifier and a 14-bit analog-to-digital converter, which is used to convert the analog signal into an LVDS format digital signal.

[0077] The FPGA processing subcard is as shown in Figure 4 It is built-in Xilinx FPGA chip, DDR3 cache module and Flash configuration memory, which realizes real-time caching, non-uniformity correction and noise reduction of digital signal, and enhancement processing. Due to the structure of the subcard module, the hardware circuit design is a conventional technology in the art, which will not be described in detail here.

[0078] The image output interface adopts CameraLink protocol encoding chip and standard interface connector to transmit the processed image data;

[0079] Among them, the optical signal is converted into an analog electrical signal by the area array InGaAs sensor circuit, and is digitized by the signal processing circuit and input into the FPGA processing subcard, and finally transmitted to the Raspberry Pi in the form of CameraLink video stream by the image output interface.

[0080] The InGaAs sensor driving timing circuit realizes accurate driving of the focal plane array through five control signals, including:

[0081] CLK clock signal;

[0082] CDSRST reset control signal;

[0083] CTIARST charge transfer reset signal;

[0084] RD readout control signal;

[0085] SYNC frame synchronization signal.

[0086] In the embodiment, in order to optimize the defect detection speed of the photovoltaic panel, the parallel architecture characteristics of the FPGA are fully utilized, and the FPGA processing sub-card performs the following operation process:

[0087] (1) sequentially performing differential to single-ended, data bit alignment and serial to parallel conversion on the LVDS digital signal through IBUFDS, IDELAYE2 and ISERDESE2 primitives;

[0088] (2) using the AXI4 bus protocol and the MIG controller, writing the converted data into the DDR3 memory through the S2MM module;

[0089] (3) opening four frame black reference storage areas and one frame real-time image storage area in the DDR3, performing linear difference operation on the real-time image and the black reference data to realize noise suppression;

[0090] (4) storing the denoised image data in the asynchronous FIFO buffer and outputting to the Raspberry Pi according to the CameraLink transmission protocol.

[0091] The area array sensor and its peripheral circuit are driven by the FPGA, and the received optical signal is converted into an electrical signal (analog signal). The voltage conversion circuit and the signal processing circuit convert the analog signal into a digital signal. Then the FPGA performs preliminary image processing on the collected image.

[0092] The method for image processing on the collected information includes the following methods:

[0093] Optionally, the image is subjected to selective multi-level median filtering algorithm for noise reduction, a 3*3 window is created and the entire image is traversed, and filtering is triggered only when and only when the center pixel is the window extreme value. The filtering adopts a zoning weighting strategy, and the window is divided into three characteristic regions: block 1 for diagonal line, block 2 for cross shape, and block 3 for center point. Then, the median values of block 1 and block 2 are taken, and the center value of block 3 is directly read, and finally the median value is taken as the middle value of the three.

[0094] Optionally, the image is subjected to adaptive linear segment stretching algorithm. In each frame image frame forward, histogram statistics are performed, the number of occurrences of each pixel gray value is recorded, and Xmin and Xmax of the frame image can be obtained by frame reverse. Because the approximation degree of two adjacent images is high, Xmin and Xmax obtained by the previous frame can be used to process the next frame image. When frame reverse, the value of Q·[X(i,j)-Xmin] is calculated by calling the divider; when the next frame forward, only Q·[X(i,j)-Xmin] is calculated, and then the obtained result is divided by 64 (left shift 6 bits), that is, only 1 subtraction, 1 multiplication and shift are required for each pixel to complete the stretching operation.

[0095] In the embodiment, after image processing in the FPGA subcard, the preprocessed image is uploaded to the Raspberry Pi by writing the camera link timing logic, and the ACF-YOLO target detection algorithm is run to locate the position and type of the defects of the photovoltaic panel.

[0096] As shown in Figure 6 , in the backbone feature extraction network, in order to further excavate deep semantic features and enhance the model's ability to represent photovoltaic module defects, an adaptive complementary fusion module (ACF, marked as 8 in Figure 6 ) is embedded between the convolution module (Conv 7) and the spatial pyramid pooling module (SPPF 9). Specifically, the ACF module receives deep feature maps output from the upper convolution module (Conv 7) as input, and outputs enhanced feature maps to the next SPPF module after spatial and channel complementary fusion processing.

[0097] The embodiment provides an adaptive complementary fusion module (ACF) which realizes embedded information optimization through collaborative fusion of spatial dimensions and channel dimensions. Specifically, input embedded information E∈R(N×C×H×W) (where N is batch size, C is channel number, H and W are feature map height and width respectively) is processed by spatial adaptive fusion unit (AFs) and channel adaptive fusion unit (AFc) in turn: first, E input AFs to obtain refined spatial embedded information Es, then Es input AFc to generate final refined embedded information Ec, so as to improve detection performance and reduce model complexity.

[0098] ​The specific implementation of the spatial adaptive fusion unit is as follows: first, the input embedding information E is subjected to group normalization (GN) processing, normalization is realized by subtracting the mean m and dividing by the standard deviation d, the formula is GN(E) = γ·(E-m) / (d+ε)+β, wherein ε is a very small positive number to prevent division by zero, and γ and β are learnable affine parameters; the learnable parameters γ of the GN layer are used to calculate the spatial normalization weight Wγ, the formula is Wγ = γ / ∑γi, wherein the γ value is positively correlated with the spatial pixel variance. Subsequently, the normalized embedding information GN(E) is weighted according to Wγ, strong and weak information weights W1 and W2 are generated through a Sigmoid activation function and a gate function (the threshold T is usually 0.5), and the input embedding E is weighted element by element based on W1 and W2 to obtain strong embedding information E1^w and weak embedding information E2^w. Then, E1^w is divided into E 11 ^w and E 12 ^w, E2^w is divided into E 21 ^w and E 22 ^w, cross fusion is realized through element-by-element addition to obtain E_f1 and E_f2, and finally spatial refined embedding Es is generated by merging through a stitching function CT.

[0099] The processing process of the channel adaptive fusion unit is as follows: the spatial refined embedding Es is divided into two groups G1 and G2 by group convolution (GC) with a group number of 2, the GC result of the G1 group is added to the point-by-point convolution (PC) result to obtain E_C1 = GC(G1) + PC(G1), and the GC result of the G2 group is spliced with the 1×1 convolution result of the original input to obtain E_C2 = CT(GC(G2), 1×1Conv(Es)). Subsequently, E_C1 and E_C2 are spliced, the channel global information is summarized through global average pooling (GP), the channel weight W_C is generated through Softmax, the spliced result is weighted using W_C to obtain E^W, and E^W is separated into weighted embeddings corresponding to G1 and G2, and then element-by-element addition is performed to generate the final channel refined embedding Ec.

[0100] The above-mentioned adaptive fusion mechanism in the spatial and channel dimensions is combined with Figure 7 In the present implementation detection scene, it is found that, compared with the traditional fusion method, the parameter amount can be reduced by 20%, the inference speed can be improved by 30%, the detection accuracy remains unchanged, and the balance between model lightweight and performance optimization is effectively realized.

[0101] The embodiment of the present application provides a photovoltaic panel detection system based on photoluminescence. The limitations of existing photoluminescence (PL) defect detection instruments are solved, and these instruments are largely limited to process wafer detection in darkroom conditions in solar cell production. The system uses an accessible 850nm LED instead of a traditional laser as an excitation source, and is paired with a one-dimensional translation stage to realize scanning excitation.

[0102] The specific embodiments of the present application have been shown and described in detail to explain the principles of the present application, and as such, additional modifications can be made without departing from the scope thereof.

Claims

1. A method for detecting defects in photovoltaic panels based on Raspberry Pi, characterized in that, include: Step 1: Excite the photovoltaic panel under test using a light source, and acquire 16 frames of original photovoltaic image sequence through an FPGA-driven infrared focal plane array; Step 2: Perform frame averaging on the 16-frame original photovoltaic image sequence to obtain the background mean image; Step 3: Based on the original photovoltaic image sequence and the background mean image, calculate the absolute value of the deviation between the sample and the mean using the mean absolute error to obtain the deviation feature image representing the defect information; Step 4: The deviation feature image is then subjected to denoising processing using a selective multi-level median filtering algorithm and enhancement processing using an adaptive linear piecewise stretching algorithm to obtain a preprocessed photoluminescence image. Step 5: Create a training dataset based on the preprocessed photoluminescence images, train the constructed ACF-YOLO network model, and obtain the photovoltaic defect detection model. Step 6: Use the photovoltaic defect detection model to infer the image to be detected and output the final photovoltaic module defect detection result.

2. The method for detecting defects in photovoltaic panels based on Raspberry Pi according to claim 1, characterized in that, Step 1 specifically includes: Step 1-1: Position the photovoltaic panel to be tested at the starting position of the one-dimensional translation stage, so that the translation direction is perpendicular to the optical axis of the camera; In steps 1-2, the Raspberry Pi sends light source control commands through the serial communication interface to drive the uniform array excitation light source to illuminate the photovoltaic panel under test with a specific intensity of light. When the ambient light intensity is below 500 lux, the steady-state excitation mode is enabled, and when it is above 500 lux, it switches to the pulse width modulation excitation mode. At the same time, the translation stage is controlled to move at a constant speed. Steps 1-3: The photoluminescence signal emitted by the photovoltaic panel under test is incident on the area array InGaAs short-wave infrared camera through a narrow band filter structure. Steps 1-4: The area array InGaAs shortwave infrared camera synchronously acquires and performs non-uniformity correction and background noise suppression processing in real time to generate a 16-frame original photovoltaic image sequence.

3. The method for detecting defects in photovoltaic panels based on Raspberry Pi according to claim 2, characterized in that, The narrowband filter structure includes a near-infrared optical lens and a bandpass filter with a center wavelength of 1150nm and a bandwidth of ±50nm.

4. The method for detecting defects in photovoltaic panels based on Raspberry Pi according to claim 2, characterized in that, The area array InGaAs short-wave infrared camera specifically includes: The InGaAs focal plane array sensor circuit consists of an InGaAs focal plane array and its driving timing circuit, which is used to convert the incident light signal into an analog electrical signal. Voltage conversion circuit: integrates multiple switching power supply chips to generate 3.3V, 5V and ±15V operating voltages and distribute them to various functional modules; Signal processing circuitry: includes a differential amplifier and a 14-bit analog-to-digital converter, used to convert analog signals into LVDS format digital signals; FPGA processing daughter card: It has a built-in Xilinx FPGA chip, DDR3 cache module and Flash configuration memory to realize real-time caching, non-uniformity correction and noise reduction and enhancement processing of digital signals; Image output interface: Employs CameraLink protocol encoding chip and standard interface connector to transmit processed image data; The optical signal is converted into an analog electrical signal by the area array InGaAs sensor circuit, and after being digitally processed by the signal processing circuit, it is input into the FPGA processing daughter card. Finally, it is transmitted to the Raspberry Pi in the form of CameraLink video stream through the image output interface.

5. The method for detecting defects in photovoltaic panels based on Raspberry Pi according to claim 4, characterized in that, The data processing flow of the FPGA processing daughter card is as follows: The IBUFDS, IDELAYE2, and ISERDESE2 primitives are used to sequentially perform differential-to-single-ended conversion, data bit alignment, and serial-to-parallel conversion on the LVDS digital signal. Using the AXI4 bus protocol and MIG controller, the converted data is written to the DDR3 memory via the S2MM module; Four black reference storage areas and one real-time image storage area are allocated in DDR3, and noise suppression is achieved by performing linear subtraction between the real-time image and the black reference data. The denoised image data is buffered asynchronously via FIFO and output to the Raspberry Pi according to the CameraLink transmission protocol.

6. The method for detecting defects in photovoltaic panels based on Raspberry Pi according to claim 1, characterized in that, Step 4 employs a selective multi-level median filtering algorithm for denoising. Specifically, it involves creating a 3x3 window and traversing the entire image through the window. Filtering is triggered only when the center pixel is the extreme value of the window. During filtering, the window is first divided into three feature regions: the diagonal is block 1, the cross shape is block 2, and the center point is block 3. Then, the median values ​​of blocks 1 and 2 are taken respectively, and the center value of block 3 is directly read. Finally, the median value is taken as the middle value among the three, and filtering is performed based on the median value.

7. The method for detecting defects in photovoltaic panels based on Raspberry Pi according to claim 1, characterized in that, Step 4 involves using an adaptive linear piecewise stretching algorithm for enhancement processing. Specifically, this includes: performing histogram statistics on the forward frame of each image frame to record the frequency of each pixel's grayscale value; obtaining Xmin and Xmax for the current frame through frame retrace statistics; using Xmin and Xmax from the previous frame to process the next frame; and calculating... The value of Q is calculated in the next frame; then, the result Q is divided by 64, which means that the stretching operation is completed by subtraction, multiplication and shifting for each pixel.

8. The method for detecting defects in photovoltaic panels based on Raspberry Pi according to claim 1, characterized in that, The ACF-YOLO network model embeds an adaptive complementary fusion module (ACF) between the convolutional module and the spatial pyramid pooling module of the YOLO network's backbone feature extraction network. The ACF receives the deep feature map output from the previous convolutional module as input, and after internal spatial and channel complementary fusion processing, outputs the enhanced feature map to the next-level spatial pyramid pooling module.

9. A method for detecting defects in photovoltaic panels based on Raspberry Pi according to claim 8, characterized in that, The adaptive complementary fusion module (ACF) processes the input image as follows: First, embed tensors into the input in the spatial dimension. Execution group normalization operation Where N is the batch size, C is the number of channels, and H and W are the feature map height and width, respectively. The mean and standard deviation of the feature map. For learnable affine parameters, ε is a positive number; based on Parameter generation space normalized weights , where i represents a different pixel; Strong / weak features are obtained by separating them based on normalized weights and a gating function. and ; Spatial refined embedding is generated through cross-fusion and tensor splicing. ; Subsequently, at the channel dimension, Perform grouped convolution with 2 groups to generate and Branching characteristics; Constructing dual-path hybrid features and , ; Channel weights are generated using global average pooling and Softmax. , ; After weighted fusion and separate addition of features, the final channel refined embedding is output. .

10. A method for detecting defects in photovoltaic panels based on Raspberry Pi according to claim 2, characterized in that, The Raspberry Pi is equipped with a pre-trained photovoltaic defect detection model.