Photovoltaic panel defect appearance detection device and method
By designing a photovoltaic panel defect appearance inspection device, which uses visual sensors and machine learning models to automatically identify photovoltaic cell defects, the problem of low production efficiency caused by the need for manual defect confirmation in existing technologies has been solved, and efficient automated inspection of photovoltaic cells has been achieved.
Patent Information
- Application Number
- CN202410863137.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-29
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-06-29
AI Technical Summary
The current photovoltaic cell production process requires manual inspection of defects, resulting in low production efficiency.
Design a photovoltaic panel defect appearance inspection device that automatically identifies defects in photovoltaic cells using visual sensors and machine learning models. The device includes a rotary table, a conveying mechanism, and an actuator. Image data is collected by the visual sensor, preprocessed, and then the defect type is identified using a machine learning model. The actuator then performs automatic classification.
It enables automatic identification and classification of defects in photovoltaic cells, improving production efficiency and accuracy, and is suitable for automated factory inspection.
Smart Images

Figure CN118431102B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photovoltaic cells, and in particular to a device and method for detecting appearance defects of photovoltaic panels. Background Art
[0002] Photovoltaic cells are the core components of solar photovoltaic power generation. Their quality directly affects the efficiency and stability of the entire power generation system. EL testing equipment is used in the production process of photovoltaic cells to monitor the production of photovoltaic cells.
[0003] Existing adaptive sorting devices and methods for EL detection of photovoltaic cells, for example, a photovoltaic panel defect appearance detection structure disclosed in a Chinese patent with authorization announcement number CN220063808U, although the defect appearance detection structure can automatically complete the visual defect detection of photovoltaic panels, manual defect confirmation of photovoltaic panels is required, resulting in low production efficiency of photovoltaic cells. Summary of the invention
[0004] In order to overcome the above-mentioned technical problems, the purpose of the present invention is to provide a photovoltaic panel defect appearance detection device and method to solve the problem in the prior art that manual defect confirmation of photovoltaic panels is required, resulting in low production efficiency of photovoltaic cells.
[0005] The purpose of the present invention can be achieved through the following technical solutions:
[0006] Specifically, a photovoltaic panel defect appearance detection device is provided, including a device base, a rotating table is provided on the top surface of the device base, at least three groups of conveying mechanisms are provided on the side of the device base, a visual sensor is provided on the top of the rotating table, and the visual sensor is used to collect image data of the photovoltaic cell body, and an actuator is provided on the top surface of the rotating table, and the actuator is used to automatically clamp the photovoltaic cell body; a control module is loaded on the device base, and the control module collects a historical training data set in advance through the visual sensor, and trains a machine learning model for identifying the defect type of the photovoltaic cell body based on the historical training data set; the control module collects the image texture and image brightness of the photovoltaic cell body in real time through the visual sensor, and uses the machine learning model to identify the defect type of the photovoltaic cell body based on the image texture and image brightness.
[0007] As a further solution of the present invention: the image data of the photovoltaic cell body collected by the visual sensor is preprocessed, and the preprocessing includes image denoising, image size standardization, image grayscale and image normalization.
[0008] As a further solution of the present invention: the historical training data set includes N groups of training data, N is a positive integer, each group of training data includes feature data and label data; the feature data includes image texture and image brightness;
[0009] The image texture is the grayscale co-occurrence matrix parameters of the image data of the photovoltaic cell body when collecting each set of training data;
[0010] The image brightness is the grayscale value of the image data of the photovoltaic cell body when collecting each set of training data;
[0011] The label data is the defect type corresponding to the image data of the photovoltaic cell body when collecting each set of training data, and the defect type includes at least crack defect, contamination defect, bubble defect and no defect.
[0012] As a further solution of the present invention: the control module trains a machine learning model for identifying the defect type of the photovoltaic cell body in the following manner:
[0013] The image texture and image brightness in the feature data are used as the input of the machine learning model, and the defect type predicted by the machine learning model for the feature data is used as the output. The defect type in the label data corresponding to the feature data is used as the prediction target, and the training target is to minimize the sum of all prediction accuracies. The calculation formula for prediction accuracy is ɡi=(αi-βi) 2 , where ɡi is the prediction accuracy, αi is the value of the predicted defect type corresponding to the i-th group of feature data, and βi is the value of the defect type in the i-th group of label data. The machine learning model is trained until the sum of the prediction accuracies reaches convergence and the training is stopped.
[0014] As a further solution of the present invention: the conveying mechanism includes a conveying platform, and a plurality of guide mechanisms are arranged on both sides of the top surface of the conveying platform.
[0015] As a further solution of the present invention: the guide mechanism comprises a support block, a horizontal guide wheel and a vertical guide wheel are mounted on the support block via a rotating shaft, and a docking channel is opened on the inner side of the support block.
[0016] As a further solution of the present invention: a driving motor is installed inside the base of the device, and the output shaft of the driving motor is fixedly connected to the center position of the bottom surface of the rotating table.
[0017] As a further solution of the present invention: the actuator includes two groups of positioning rails, one end of the two groups of positioning rails is fixedly connected with a guide mechanism, the other end of the two groups of positioning rails is fixedly connected with a moving bar, an electromagnetic limit plate is slidably connected between the two moving bars, a moving platform is arranged on the bottom surface of the electromagnetic limit plate, track sliders are fixedly connected at both ends of the top surface of the moving platform, a docking bar is fixedly connected to the bottom surface of the track slider, and the docking bar matches the docking channel.
[0018] As a further solution of the present invention: a deceleration slider is slidably connected to the center of the top surface of the moving platform, an electromagnetic suction plate is fixedly connected to the top surface of the deceleration slider, and a deceleration spring is connected between the deceleration slider and the moving platform.
[0019] A photovoltaic panel defect appearance detection method is also specifically provided, which is implemented based on the above-mentioned photovoltaic panel defect appearance detection device and includes the following steps:
[0020] S1: The control module collects a historical training data set in advance through a visual sensor, and trains a machine learning model for identifying defect types of photovoltaic cell bodies based on the historical training data set;
[0021] S2: The control module collects the image data of the photovoltaic cell body in real time through the visual sensor and preprocesses the image data. The preprocessing includes image denoising, image size standardization, image grayscale and image normalization.
[0022] S3: Obtain image texture and image brightness from the preprocessed image data, and use a machine learning model to identify the defect type of the photovoltaic cell body based on the image texture and image brightness;
[0023] S4: Automatically classify the photovoltaic cell body based on the defect type using an actuator.
[0024] Beneficial effects of the present invention:
[0025] 1. In the present invention, by setting up a control module, the image data of the photovoltaic cell body can be collected in real time through a visual sensor, and then the defect type corresponding to the image data is identified using a trained machine learning model, and then the photovoltaic cell body is sorted based on the defect type of the photovoltaic cell body, which greatly improves the efficiency and accuracy of photovoltaic cell body sorting and is suitable for factory automation detection.
[0026] 2. In the present invention, an infrared sensor is arranged at the end position of the docking strip, and the infrared sensor can measure the specific position of the photovoltaic cell body on the top surface of the conveying mechanism, specifically, the distance between the end surface of the photovoltaic cell body and the guide mechanism on the positioning track. The control module controls the speed of the deceleration slider based on the distance, so that after the track slider contacts the guide mechanism on the positioning track, the electromagnetic suction plate just contacts the end surface of the photovoltaic cell body due to the inertial sliding distance. In this process, the deceleration slider will overcome its own friction and the elastic force of the deceleration spring to move. When the docking strip collects the distance between the end surface of the photovoltaic cell body and the guide mechanism on the positioning track, the specific speed of the deceleration slider is obtained based on the curve relationship between the sliding distance of the deceleration slider and the speed of the deceleration slider. Then, the electromagnetic suction plate is energized to generate magnetic attraction. When the deceleration spring retracts, the deceleration slider and the photovoltaic cell body are driven to move synchronously, ensuring that the photovoltaic cell body can move to the top surface of the rotating table, thereby realizing the automatic operation of the photovoltaic cell body. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The present invention will be further described below in conjunction with the accompanying drawings.
[0028] Figure 1 It is a schematic diagram of the structure of the present invention;
[0029] Figure 2 is a top view of the present invention;
[0030] Figure 3 It is a schematic diagram of the working structure of the conveying mechanism and the executing mechanism in the present invention;
[0031] Figure 4 It is a structural schematic diagram of the conveying mechanism and the executing mechanism in the present invention;
[0032] Figure 5 It is a structural schematic diagram of the conveying mechanism in the present invention;
[0033] Figure 6 yes Figure 5 A partial enlarged view of the middle A;
[0034] Figure 7 It is a schematic structural diagram of the locking end in the present invention;
[0035] Figure 8 It is a flow chart of the method of the present invention.
[0036] In the figure: 1. device base; 2. rotating table; 21. adjusting slot; 3. conveying mechanism; 31. conveying table; 32. guiding mechanism; 321. supporting block; 322. horizontal guide wheel; 323. vertical guide wheel; 324. docking channel; 4. column; 5. mounting plate; 6. hydraulic cylinder; 7. visual sensor; 8. photovoltaic cell body; 9. actuator; 91. positioning track; 92. moving bar; 93. electromagnetic limit plate; 94. moving table; 95. track slider; 96. docking bar; 97. deceleration slider; 98. electromagnetic suction plate; 99. deceleration spring. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] Example 1
[0039] like Figure 1-Figure 7 As shown, the present invention discloses a photovoltaic panel defect appearance detection device, including a device base 1, a rotating platform 2 is provided on the top surface of the device base 1, and at least three sets of conveying mechanisms 3 are provided on the side of the device base 1. It should be noted that Figure 1 and Figure 2 For example, the number of conveying mechanisms 3 is set to five groups, one of which is used to convey the undetected photovoltaic cell body 8 to the top surface of the rotating table 2, and the other four groups are used to analyze the photovoltaic cell body 8; a visual sensor 7 is arranged on the top of the rotating table 2. It should be noted that a column 4 is fixedly connected to the side of the rotating table 2, and a mounting plate 5 is fixedly connected to the top of the column 4. A hydraulic cylinder 6 is fixedly connected to one end of the mounting plate 5. The output end of the hydraulic cylinder 6 is connected to the visual sensor 7 for controlling the height of the visual sensor 7. The visual sensor 7 can be an infrared camera or a high-definition camera. The visual sensor 7 is used to collect image data of the photovoltaic cell body 8; an actuator 9 is arranged on the top surface of the rotating table 2. The actuator 9 is used to automatically clamp the photovoltaic cell body 8. Specifically, the actuator 9 first transfers the photovoltaic cell body 8 to be detected from the conveying mechanism 3 to the top surface of the rotating table 2, and then collects the image data of the photovoltaic cell body 8 through the visual sensor 7. After the collection is completed, the actuator 9 automatically transfers the photovoltaic cell body 8 to the corresponding conveying mechanism 3 to complete the sorting of the photovoltaic cell body 8.
[0040] A control module is loaded on the device base 1. The control module collects a set of historical training data in advance through the visual sensor 7, and trains a machine learning model for identifying the defect type of the photovoltaic cell body 8 based on the historical training data set; the control module collects the image texture and image brightness of the photovoltaic cell body 8 in real time through the visual sensor 7, and uses the machine learning model to identify the defect type of the photovoltaic cell body 8 based on the image texture and image brightness, and uses the actuator 9 to automatically classify the photovoltaic cell body 8 based on the defect type.
[0041] The image data of the photovoltaic cell body 8 collected by the visual sensor 7 is preprocessed, and the preprocessing includes image denoising, image size standardization, image grayscale and image normalization. It should be noted that image denoising adopts methods such as median filtering, Gaussian filtering and mean filtering. Image size standardization refers to adjusting the pictures in the image data to the same size. In the process of image size standardization, the aspect ratio of the picture is maintained to avoid distortion of the image shape. Image grayscale refers to converting the picture in the image data into a grayscale image. Grayscale can be achieved by taking the weighted average of the red, green and blue channels, or by directly using a formula to convert an RGB image into a grayscale image. Image normalization can make the pixels of the picture fall within a specific range, usually [0,1] or [0,255].
[0042] The historical training data set includes N sets of training data, where N is a positive integer. It should be noted that the historical training data is collected by a person skilled in the art by using a visual sensor 7, and the amount of the collected historical data set is set by a person skilled in the art according to a specific model training situation. Each set of training data includes feature data and label data; the feature data includes image texture and image brightness;
[0043] The image texture is the grayscale co-occurrence matrix parameter of the image data of the photovoltaic cell body 8 when collecting each set of training data. Specifically, the control module calculates the contrast, correlation, energy or uniformity corresponding to the image texture based on the image texture of the image data. The contrast represents the contrast between adjacent pixel pairs of gray levels in the image data. The higher the contrast, the greater the intensity difference between adjacent pixel pairs of gray levels in the image texture. The contrast is calculated by the standard deviation of the grayscale co-occurrence matrix parameter.
[0044] Correlation indicates the linear correlation between adjacent pixel pairs of gray levels in an image. The higher the correlation, the more linear the change of gray values of adjacent pixel pairs of gray levels in the image texture. The correlation is calculated by the correlation characteristics of the gray-level co-occurrence matrix parameters.
[0045] Energy represents the sum of probabilities between adjacent pixel pairs of gray levels in an image. The higher the energy, the more uniform the probability distribution of adjacent pixel pairs of gray levels in the image texture, and the richer the image texture. The energy is calculated through the energy characteristics of the gray-level co-occurrence matrix parameters.
[0046] Uniformity indicates the degree of consistency between adjacent pixel pairs of gray levels in an image. The higher the uniformity, the closer the gray values of adjacent pixel pairs of gray levels in the image texture are, and the more uniform the texture is. The uniformity is calculated by the inverse difference feature of the gray level co-occurrence matrix parameters.
[0047] The image brightness is the grayscale value of the image data of the photovoltaic cell body 8 when collecting each set of training data. The grayscale value of the image data is in [0, 255], where 0 represents all black image data and 255 represents all white image data;
[0048] The label data is the defect type corresponding to the image data of the photovoltaic cell body 8 when collecting each set of training data, and the defect type includes at least crack defect, contamination defect, bubble defect and no defect;
[0049] It should be noted that the grayscale co-occurrence matrix parameters and grayscale values corresponding to the defect types are preset thresholds, which are specifically adaptively set by those skilled in the art. For example, a crack threshold is set. When the grayscale co-occurrence matrix parameter is less than the crack threshold, it means that the photovoltaic cell body 8 has no cracks, and the defect type corresponding to the photovoltaic cell body 8 is no defect. When the grayscale co-occurrence matrix parameter is greater than or equal to the crack threshold, it means that the photovoltaic cell body 8 has cracks, and the defect type corresponding to the photovoltaic cell body 8 is a crack defect.
[0050] It is also necessary to set a bubble threshold. When the grayscale co-occurrence matrix parameter is less than the bubble threshold, it means that there are no bubbles in the photovoltaic cell body 8, and the defect type corresponding to the photovoltaic cell body 8 is no defect. When the grayscale co-occurrence matrix parameter is greater than or equal to the bubble threshold, it means that there are bubbles in the photovoltaic cell body 8, and the defect type corresponding to the photovoltaic cell body 8 is a bubble defect. Usually, the crack threshold of a crack defect is greater than the bubble threshold of a bubble defect. Therefore, the grayscale co-occurrence matrix parameter needs to set two gradient thresholds, namely the bubble threshold and the crack threshold. When the value of the grayscale co-occurrence matrix parameter is in the range of [0, bubble threshold), it indicates no defect. When the value of the grayscale co-occurrence matrix parameter is in the range of [bubble threshold, crack threshold), it indicates a bubble defect. When the value of the grayscale co-occurrence matrix parameter is greater than or equal to the crack threshold, it indicates a crack defect.
[0051] Similarly, a grayscale threshold can be set. If the grayscale value of the photovoltaic cell body 8 is greater than the grayscale threshold, it means that the photovoltaic cell body 8 has no defects, and the defect type corresponding to the photovoltaic cell body 8 is no defect. If the grayscale value of the photovoltaic cell body 8 is less than or equal to the grayscale threshold, it means that the photovoltaic cell body 8 is contaminated, and the defect type corresponding to the photovoltaic cell body 8 is contamination defect.
[0052] The value of the defect type is equal to the product of the gray-level co-occurrence matrix parameters and the gray-level value.
[0053] The control module trains a machine learning model for identifying the defect type of the photovoltaic cell body 8 in the following manner:
[0054] The image texture and image brightness in the feature data are used as the input of the machine learning model, and the defect type predicted by the machine learning model for the feature data is used as the output. The defect type in the label data corresponding to the feature data is used as the prediction target, and the training target is to minimize the sum of all prediction accuracies. The calculation formula for prediction accuracy is ɡi=(αi-βi) 2 , where ɡi is the prediction accuracy, αi is the value of the predicted defect type corresponding to the i-th group of feature data, and βi is the value of the defect type in the i-th group of label data. The machine learning model is trained until the sum of the prediction accuracies reaches convergence and the training is stopped. The convergence standard is set by those skilled in the art according to the specific model training situation. For example, ɡi is set to 0.001, that is, when the square difference between the defect type value corresponding to the defect type predicted by the machine learning model and the actual defect type value of the photovoltaic cell body 8 is less than or equal to 0.001, the prediction accuracy of the machine learning model is considered to have reached convergence;
[0055] By setting up a control module, the image data of the photovoltaic cell body 8 can be collected in real time through the visual sensor 7, and then the defect type corresponding to the image data can be identified using the trained machine learning model. Then, the photovoltaic cell body 8 is sorted based on the defect type of the photovoltaic cell body 8, which greatly improves the efficiency and accuracy of sorting the photovoltaic cell body 8 and is suitable for factory automated detection.
[0056] Example 2
[0057] like Figure 1-Figure 7 As shown, the conveying mechanism 3 includes a conveying platform 31, and a plurality of guide mechanisms 32 are arranged on both sides of the top surface of the conveying platform 31. It should be noted that the distance between the plurality of guide mechanisms 32 is adaptively set according to the specifications of the photovoltaic cell body 8, such as Figure 3As shown, the photovoltaic cell body 8 moves longitudinally on the conveying mechanism 3. If the length of the photovoltaic cell body 8 is l, the distance between the multiple guide mechanisms 32 can be set to 0.25l to ensure that the photovoltaic cell body 8 can be normally conveyed between the guide mechanisms 32.
[0058] like Figure 1 , Figure 3 , Figure 5 and Figure 6 As shown, the guide mechanism 32 includes a support block 321, on which a horizontal guide wheel 322 and a vertical guide wheel 323 are installed through a rotating shaft, and a docking channel 324 is provided on the inner side of the support block 321. It should be noted that the horizontal guide wheel 322 is supported on the bottom surface of the photovoltaic cell body 8, and the vertical guide wheel 323 is supported on the side of the photovoltaic cell body 8 to ensure the stability of the photovoltaic cell body 8 during movement. It should also be noted that in order to ensure that the photovoltaic cell body 8 can automatically slide on the guide mechanism 32, the front section of the conveying platform 31 can be set to be inclined, so that the photovoltaic cell body 8 can be transported The conveying platform 31 can slide freely along the inclined direction, and a chain can also be nested on the rotating shaft of the horizontal guide wheel 322 or the vertical guide wheel 323. The chain is connected to a motor. When there is a photovoltaic cell body 8 on the conveying platform 31, the motor can be turned on, and the power of the motor can be transmitted to the chain to rotate the chain. The rotating chain can drive the horizontal guide wheel 322 or the vertical guide wheel 323 through the rotating shaft. The horizontal guide wheel 322 or the vertical guide wheel 323 drives the photovoltaic cell body 8, so that the photovoltaic cell body 8 moves automatically, and finally the photovoltaic cell body 8 moves to the end of the conveying platform 31 close to the rotating table 2 and stops.
[0059] A driving motor (not shown) is installed inside the device base 1, and the output shaft of the driving motor is fixedly connected to the center position of the bottom surface of the rotating table 2. When the driving motor is turned on, the output shaft of the driving motor will drive the rotating table 2 to rotate, so that the rotating table 2 rotates to a set angle.
[0060] like Figure 4 , Figure 5 , Figure 6 and Figure 7As shown, the actuator 9 includes two sets of positioning rails 91, and an adjustment groove 21 is provided on the surface of the rotating table 2 near the positioning rails 91. The two sets of positioning rails 91 can be adaptively adjusted based on the width of the photovoltaic cell body 8 to ensure that the positioning rails 91 can fit the photovoltaic cell body 8 of different widths. One end of the two sets of positioning rails 91 is fixedly connected to a guide mechanism 32, and the other end of the two sets of positioning rails 91 is fixedly connected to a moving bar 92, and an electromagnetic limit plate 93 is slidably connected between the two moving bars 92. It should be noted that the electromagnetic limit plate 93 will generate magnetic attraction after the circuit is connected, and the magnetic attraction will be generated after the circuit is closed. The force will automatically disappear, a moving platform 94 is arranged on the bottom surface of the electromagnetic limit plate 93, track sliders 95 are fixedly connected to both ends of the top surface of the moving platform 94, docking strips 96 are fixedly connected to the bottom surface of the track slider 95, the docking strips 96 match the docking channel 324, the bottom surface of one end of the track slider 95 away from the moving platform 94 is in sliding contact with the top surface of the positioning track 91, the side surfaces of the two docking strips 96 are in sliding contact with the inner side surfaces of the positioning track 91, a deceleration slider 97 is slidably connected to the center position of the top surface of the moving platform 94, an electromagnetic suction plate 98 is fixedly connected to the top surface of the deceleration slider 97, and a deceleration spring 99 is connected between the deceleration slider 97 and the moving platform 94;
[0061] It should be noted that a driving groove is provided in the middle of the top surface of the rotating table 2, and a driving block matching the driving groove is fixedly connected to the middle of the bottom surface of the moving table 94. The driving method of the driving block can adopt a hydraulic push rod, an electric push rod, a pneumatic push rod or a lead screw nut. The main function of the driving block is to drive the moving table 94 so that the moving table 94 can move freely along the direction of the driving groove on the top surface of the rotating table 2.
[0062] It should be noted that this embodiment Figure 2 The conveying mechanisms 3 are numbered for the sake of subsequent explanation. The conveying mechanism 3 with the photovoltaic cell body 8 is the No. 1 conveying mechanism 3, and the remaining conveying mechanisms 3 are marked as No. 2, No. 3, No. 4 and No. 5 in a clockwise manner.
[0063] When the No. 1 conveying mechanism 3 conveys the photovoltaic cell body 8 to be detected, due to the friction force, the photovoltaic cell body 8 will stop at the middle position of the top surface of the conveying platform 31, and the stopping position of different photovoltaic cell bodies 8 will have a certain error. The driving block drives the moving platform 94 to make the moving platform 94 approach the side of the photovoltaic cell body 8. During the movement of the moving platform 94, the moving platform 94 will drive the docking bar 96 to move synchronously. The end position of the docking bar 96 is chamfered. When the docking bar 96 contacts the docking channel 324, the docking bar 96 will be directly inserted into the docking channel 324. During the cooperation between the docking bar 96 and the docking channel 324, the docking bar 96 will calibrate the position of the conveying mechanism 3 so that the conveying mechanism 3 is aligned with the moving platform 94. Since a guide mechanism 32 is installed at one end of the positioning track 91, as shown in FIG. Figure 4 and Figure 7 As shown, when the track slider 95 moves to the position of the guide mechanism 32 on the positioning track 91, the guide mechanism 32 will block the side of the track slider 95, restricting the moving platform 94 from continuing to move, and causing the moving platform 94 to stop, that is, the moving platform 94 moves to the guide mechanism 32 on the positioning track 91 and stops moving;
[0064] An infrared sensor is arranged at the end of the docking strip 96, and the infrared sensor can measure the specific position of the photovoltaic cell body 8 on the top surface of the conveying mechanism 3, specifically, the distance between the end surface of the photovoltaic cell body 8 and the guide mechanism 32 on the positioning track 91, and the speed of the moving platform 94 is controlled based on the distance, so that after the track slider 95 contacts the guide mechanism 32 on the positioning track 91 to stop the moving platform 94, the deceleration slider 97 slides due to inertia to a distance that just makes the electromagnetic suction plate 98 contact the end surface of the photovoltaic cell body 8. In this process, the deceleration slider 97 will overcome its own friction and the elastic force of the deceleration spring 99 to move. The technical personnel in this field prepare in advance the curve relationship between the sliding distance of the deceleration slider 97 and the speed of the deceleration slider 97. After the docking bar 96 collects the distance between the end face of the photovoltaic cell body 8 and the guide mechanism 32 on the positioning track 91, the specific speed of the deceleration slider 97 is obtained based on the curve relationship between the sliding distance of the deceleration slider 97 and the speed of the deceleration slider 97, that is, the speed of the moving platform 94 is controlled, and then the electromagnetic suction plate 98 is energized to generate magnetic attraction to absorb the photovoltaic cell body 8. When the deceleration spring 99 retracts, the deceleration slider 97 and the photovoltaic cell body 8 are driven to move synchronously, ensuring that the photovoltaic cell body 8 can move to the top surface of the rotating platform 2.
[0065] It should also be noted that when the moving platform 94 returns, the deceleration slider 97 will still have a certain moving speed. Therefore, the moving platform 94 can control the distance between it and the electromagnetic limit plate 93, ensuring that the other side of the electromagnetic suction plate 98 can continue to move and contact the electromagnetic limit plate 93, so that the electromagnetic limit plate 93 can connect the circuit to generate magnetic attraction, ensuring that the electromagnetic limit plate 93 can stabilize the photovoltaic cell body 8 on the top surface of the rotating platform 2 through the electromagnetic suction plate 98, so that the visual sensor 7 can collect image data of the photovoltaic cell body 8.
[0066] The No. 2, No. 3, No. 4 and No. 5 conveying mechanisms 3 correspond to different defect types. For example, the No. 2 conveying mechanism 3 corresponds to a defect type without defects, the No. 3 conveying mechanism 3 corresponds to a defect type with one defect, the No. 4 conveying mechanism 3 corresponds to a defect type with two defects, and the No. 5 conveying mechanism 3 corresponds to a defect type with three defects. After the visual sensor 7 collects the image data of the photovoltaic cell body 8, the defect type corresponding to the image data can be identified through the trained machine learning model, and then the conveying mechanism corresponding to the photovoltaic cell body 8 is selected based on the defect type corresponding to the image data. Conveying mechanism 3, if the photovoltaic cell body 8 has no defects, the control module can control the rotating table 2 to rotate to the second conveying mechanism 3 through the driving motor inside the device base 1, and then the electromagnetic limit plate 93 closes the circuit first, and the mobile platform 94 moves in the direction of the second conveying mechanism 3 under the drive of the driving block, and controls the moving speed of the mobile platform 94. A speed sensor is set on the deceleration slider 97. When the speed of the deceleration slider 97 is 0, the circuit of the electromagnetic suction plate 98 is disconnected, so that the electromagnetic suction plate 98 can automatically detach from the photovoltaic cell body 8, thus completing the automatic transportation and automatic sorting of the photovoltaic cell body 8;
[0067] It should be noted that when the deceleration slider 97 clamps the photovoltaic cell body 8 through magnetic attraction, since the contact speed between the deceleration slider 97 and the photovoltaic cell body 8 is 0, the deceleration slider 97 will not cause mechanical collision with the photovoltaic cell body 8, thereby ensuring the safety of the photovoltaic cell body 8 during transportation. The same is true when the deceleration slider 97 releases the clamping of the photovoltaic cell body 8, thereby ensuring that the photovoltaic cell body 8 stops on the No. 2, No. 3, No. 4 or No. 5 conveying mechanism 3, which is convenient for the subsequent transportation of the photovoltaic cell body 8.
[0068] Example 3
[0069] like Figure 1-Figure 8 As shown, the present invention discloses a photovoltaic panel defect appearance detection method, which is implemented based on the above-mentioned photovoltaic panel defect appearance detection device and includes the following steps:
[0070] S1: The control module collects a historical training data set in advance through the visual sensor 7. The historical training data set includes N groups of training data, where N is a positive integer. It should be noted that the historical training data is collected by those skilled in the art by using the visual sensor 7. The amount of the collected historical data set is set by those skilled in the art according to the specific model training situation. Each group of training data includes feature data and label data; the feature data includes image texture and image brightness.
[0071] The image texture is the grayscale co-occurrence matrix parameter of the image data of the photovoltaic cell body 8 when collecting each set of training data. Specifically, the control module calculates the contrast, correlation, energy or uniformity corresponding to the image texture based on the image texture of the image data. The contrast represents the contrast between adjacent pixel pairs of gray levels in the image data. The higher the contrast, the greater the intensity difference between adjacent pixel pairs of gray levels in the image texture. The contrast is calculated by the standard deviation of the grayscale co-occurrence matrix parameter.
[0072] Correlation indicates the linear correlation between adjacent pixel pairs of gray levels in an image. The higher the correlation, the more linear the change of gray values of adjacent pixel pairs of gray levels in the image texture. The correlation is calculated by the correlation characteristics of the gray-level co-occurrence matrix parameters.
[0073] Energy represents the sum of probabilities between adjacent pixel pairs of gray levels in an image. The higher the energy, the more uniform the probability distribution of adjacent pixel pairs of gray levels in the image texture, and the richer the image texture. The energy is calculated through the energy characteristics of the gray-level co-occurrence matrix parameters.
[0074] Uniformity indicates the degree of consistency between adjacent pixel pairs of gray levels in an image. The higher the uniformity, the closer the gray values of adjacent pixel pairs of gray levels in the image texture are, and the more uniform the texture is. The uniformity is calculated by the inverse difference feature of the gray level co-occurrence matrix parameters.
[0075] The image brightness is the grayscale value of the image data of the photovoltaic cell body 8 when collecting each set of training data. The grayscale value of the image data is in [0, 255], where 0 represents all black image data and 255 represents all white image data;
[0076] The label data is the defect type corresponding to the image data of the photovoltaic cell body 8 when collecting each set of training data. The defect type includes at least crack defect, contamination defect, bubble defect and no defect. Based on the historical training data set, a machine learning model for identifying the defect type of the photovoltaic cell body 8 is trained;
[0077] The control module trains a machine learning model for identifying the defect type of the photovoltaic cell body 8 in the following manner:
[0078] The image texture and image brightness in the feature data are used as the input of the machine learning model, and the defect type predicted by the machine learning model for the feature data is used as the output. The defect type in the label data corresponding to the feature data is used as the prediction target, and the training target is to minimize the sum of all prediction accuracies. The calculation formula for prediction accuracy is ɡi=(αi-βi) 2 , where ɡi is the prediction accuracy, αi is the value of the predicted defect type corresponding to the i-th group of feature data, and βi is the value of the defect type in the i-th group of label data. The machine learning model is trained until the sum of the prediction accuracies reaches convergence and the training is stopped. The convergence standard is set by those skilled in the art according to the specific model training situation. For example, ɡi is set to 0.001, that is, when the square difference between the defect type value corresponding to the defect type predicted by the machine learning model and the actual defect type value of the photovoltaic cell body 8 is less than or equal to 0.001, the prediction accuracy of the machine learning model is considered to have reached convergence;
[0079] S2: The control module collects the image data of the photovoltaic cell body 8 in real time through the visual sensor 7, and preprocesses the image data. The preprocessing includes image denoising, image size standardization, image grayscale and image normalization. Image denoising adopts methods such as median filtering, Gaussian filtering and mean filtering. Image size standardization refers to adjusting the pictures in the image data to the same size. In the process of image size standardization, the aspect ratio of the picture is maintained to avoid distortion of the image shape. Image grayscale refers to converting the picture in the image data into a grayscale image. Grayscale can be achieved by taking the weighted average of the red, green and blue channels, or directly using a formula to convert the RGB image into a grayscale image. Image normalization can make the pixels of the picture fall within a specific range, usually [0,1] or [0,255].
[0080] S3: Obtaining image texture and image brightness in the preprocessed image data, and using a machine learning model to identify defect types of the photovoltaic cell body 8 based on the image texture and image brightness, where the defect types include at least crack defects, contamination defects, bubble defects, and no defects;
[0081] It should be noted that the grayscale co-occurrence matrix parameters and grayscale values corresponding to the defect types are preset thresholds, which are specifically adaptively set by those skilled in the art. For example, a crack threshold is set. When the grayscale co-occurrence matrix parameter is less than the crack threshold, it means that the photovoltaic cell body 8 has no cracks, and the defect type corresponding to the photovoltaic cell body 8 is no defect. When the grayscale co-occurrence matrix parameter is greater than or equal to the crack threshold, it means that the photovoltaic cell body 8 has cracks, and the defect type corresponding to the photovoltaic cell body 8 is a crack defect.
[0082] Similarly, a grayscale threshold can be set. If the grayscale value of the photovoltaic cell body 8 is greater than the grayscale threshold, it means that the photovoltaic cell body 8 has no defects, and the defect type corresponding to the photovoltaic cell body 8 is no defect. If the grayscale value of the photovoltaic cell body 8 is less than or equal to the grayscale threshold, it means that the photovoltaic cell body 8 is contaminated, and the defect type corresponding to the photovoltaic cell body 8 is contamination defect.
[0083] S4: Automatically classify the photovoltaic cell body 8 using the actuator 9 based on the defect type. The specific classification method is as described in Example 2 and will not be described in detail again.
[0084] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A photovoltaic panel defect appearance detection device, characterized in that: include: A device base (1) having a rotating platform (2) on its top surface; Conveying mechanisms (3), which are at least three groups, and the conveying mechanisms (3) are all arranged on the side of the device base (1); A visual sensor (7) disposed on the top of the rotating platform (2), the visual sensor (7) being used to collect image data of the photovoltaic cell body (8); An actuator (9) is arranged on the top surface of the rotating platform (2), and the actuator (9) is used to automatically clamp the photovoltaic cell body (8); The device base (1) is loaded with a control module, which collects a historical training data set in advance through a visual sensor (7), and trains a machine learning model for identifying defect types of a photovoltaic cell body (8) based on the historical training data set; The control module collects the image texture and image brightness of the photovoltaic cell body (8) in real time through a visual sensor (7), and identifies the defect type of the photovoltaic cell body (8) using a machine learning model based on the image texture and image brightness; The image data of the photovoltaic cell body (8) collected by the visual sensor (7) is preprocessed, and the preprocessing includes image denoising, image size standardization, image grayscale conversion and image normalization; The historical training data set includes N groups of training data, where N is a positive integer, and each group of training data includes feature data and label data; the feature data includes image texture and image brightness; The image texture is the grayscale co-occurrence matrix parameters of the image data of the photovoltaic cell body (8) when collecting each set of training data; The image brightness is the grayscale value of the image data of the photovoltaic cell body (8) when collecting each set of training data; The label data is the defect type corresponding to the image data of the photovoltaic cell body (8) when collecting each set of training data, and the defect type at least includes a crack defect, a contamination defect, a bubble defect and no defect; The control module trains a machine learning model for identifying defect types of the photovoltaic cell body (8) in the following manner: The image texture and image brightness in the feature data are used as the input of the machine learning model, and the defect type predicted by the machine learning model for the feature data is used as the output. The defect type in the label data corresponding to the feature data is used as the prediction target, and the training target is to minimize the sum of all prediction accuracies. The calculation formula for prediction accuracy is ɡi=(αi-βi) 2 , where ɡi is the prediction accuracy, αi is the value of the predicted defect type corresponding to the i-th group of feature data, and βi is the value of the defect type in the i-th group of label data. The machine learning model is trained until the sum of the prediction accuracy reaches convergence and the training is stopped; The conveying mechanism (3) comprises a conveying platform (31), and a plurality of guide mechanisms (32) are arranged on both sides of the top surface of the conveying platform (31); The guide mechanism (32) comprises a support block (321), a horizontal guide wheel (322) and a vertical guide wheel (323) are mounted on the support block (321) via a rotating shaft, and a docking channel (324) is provided on the inner side of the support block (321); The actuator (9) comprises two groups of positioning rails (91), one end of each of the two groups of positioning rails (91) is fixedly connected to a guide mechanism (32), the other end of each of the two groups of positioning rails (91) is fixedly connected to a moving bar (92), an electromagnetic limit plate (93) is slidably connected between the two moving bars (92), a moving platform (94) is provided on the bottom surface of the electromagnetic limit plate (93), both ends of the top surface of the moving platform (94) are fixedly connected to rail sliders (95), the bottom surface of the rail slider (95) is fixedly connected to a docking bar (96), and the docking bar (96) matches the docking channel (324); A deceleration slider (97) is slidably connected to the center of the top surface of the moving platform (94), an electromagnetic suction plate (98) is fixedly connected to the top surface of the deceleration slider (97), and a deceleration spring (99) is connected between the deceleration slider (97) and the moving platform (94).
2. A photovoltaic panel defect appearance detection device according to claim 1, characterized in that: A driving motor is installed inside the device base (1), and the output shaft of the driving motor is fixedly connected to the center position of the bottom surface of the rotating platform (2).
3. A photovoltaic panel defect appearance detection method, which is implemented based on a photovoltaic panel defect appearance detection device according to any one of claims 1-2, characterized in that: The following steps are involved: S1: The control module collects a historical training data set in advance through a visual sensor (7), and trains a machine learning model for identifying defect types of a photovoltaic cell body (8) based on the historical training data set; S2: the control module collects image data of the photovoltaic cell body (8) in real time through the visual sensor (7), and pre-processes the image data, wherein the pre-processing includes image denoising, image size standardization, image grayscale conversion and image normalization; S3: Obtain image texture and image brightness from the preprocessed image data, and identify the defect type of the photovoltaic cell body (8) using a machine learning model based on the image texture and image brightness; S4: Automatically classify the photovoltaic cell body (8) based on the defect type using an actuator (9).
