Battery tab welding quality detection method
Through image processing and support vector machine method, the solder joint features in the battery electrode welding image are extracted, and the color moment is calculated for quality judgment, which solves the problem of low detection efficiency of multiple solder joints in the prior art, achieving efficient and accurate Welding quality inspection.
Patent Information
- Application Number
- CN202411176091.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2025-01-10
AI Technical Summary
The existing battery ear welding quality detection method is inefficient when multiple solder joints are detected, and the impedance value is required to be detected one by one, resulting in low detection efficiency.
By collecting welding images, using matching templates for affine transformation correction, extracting solder joint areas, calculating color moments for quality judgment, counting the proportion of qualified solder joints and dividing the quality levels, using the support vector machine method to train the detection model to improve detection efficiency and accuracy sex.
It realizes efficient and accurate detection of multiple welding joint areas, has high robustness and anti-interference, and improves the accuracy and efficiency of welding quality inspection.
Smart Images

Figure CN119295371A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of battery tab welding quality detection, and more specifically, to a battery tab welding quality detection method. Background Art
[0002] Battery tab welding is a key link in the manufacturing process of lithium-ion batteries. It involves a variety of welding technologies, each of which has its unique advantages and application scenarios. Common battery tab welding technologies include: laser welding technology, which uses a high-energy-density laser beam to locally heat the lithium battery tab and electrode material, causing it to melt quickly and form a strong metallurgical bond; ultrasonic welding technology, which transmits high-frequency vibration waves to the two metal surfaces to be welded, and under pressure, causes the two metal surfaces to rub against each other to form a fusion between the molecular layers; electric soldering iron welding, which requires the electric soldering iron to be left still for a while in advance, and then the horseshoe-shaped soldering iron tip is used to preheat the workpiece to ensure the welding quality. After welding, the welding quality of the battery tab needs to be tested to ensure the integrity, reliability, safety and usability of the welding structure.
[0003] Prior art CN111693573A A battery tab welding quality assessment method and device, the battery tab welding quality assessment method includes the following process: obtaining a standard impedance value of a tab welding place without welding defects; obtaining a test impedance value of a tab welding place to be tested; judging the welding quality of the tab welding place to be tested by the difference between the test impedance value and the standard impedance value; wherein, the test method for obtaining the standard impedance value and the test impedance value is as follows: applying a number of applied voltages to the tab welding place, obtaining the corresponding test current data, performing linear fitting on the obtained data, the slope of the straight line is the impedance value of the tab welding place, wherein the test sensitivity of the current is 1×10-6A / V~1×10-3A / V. The method obtains its impedance value by taking multiple sets of voltages and corresponding high-precision current data at the welding place and calculating their slopes, which can effectively detect welding quality problems that are difficult to detect by traditional detection methods, but the prior art needs to detect the impedance values of multiple welding points one by one for the quality detection of multiple welding points, and the detection efficiency is low. Summary of the invention
[0004] In order to overcome the problem of low detection efficiency in the above-mentioned prior art, the present invention proposes a battery tab welding quality detection method, which can detect multiple welding point areas with accurate detection and higher efficiency.
[0005] To achieve the above object, a battery tab welding quality detection method of the present invention comprises the following steps:
[0006] S1: Collect the scale image to determine the conversion relationship between the pixel distance and the actual physical distance, and construct a matching template corresponding to the welding head according to the actual size of the welding head;
[0007] S2: collecting a battery tab welding image, extracting edge contour information of the battery tab welding image, and performing a first correction on the battery tab welding image using affine transformation;
[0008] S3: binarizing the image after the first correction, and performing rough matching using the matching template to obtain a rough matched image;
[0009] S4: Binarizing the image after the rough matching and extracting the background skeleton of the welding point to obtain a skeleton image, and performing a second correction on the skeleton image using affine transformation;
[0010] S5: binarizing the image after the second correction, and performing fine matching using the matching template to obtain a finely matched image;
[0011] S6: Calculate the color moments of all the welding points in the finely matched image, judge the quality of all the welding points by the color moments, count the percentage of qualified welding points, and classify the welding quality grades.
[0012] In this technical solution, after confirming the conversion relationship between pixel distance and actual physical distance, different corresponding matching templates can be constructed according to different welding heads. After collecting the battery tab welding image, due to the neat arrangement of the battery tab welding points, the edge texture characteristics of the image show a regularity, and the first correction can be performed according to this regularity, which can effectively avoid interference such as the mixing of the foreground and background of the welding point and the high reflectivity of the metal. The welding point area is located through coarse matching, and the image is corrected for the second time to further eliminate interference. Subsequently, the welding point is extracted through fine matching, and the welding quality is judged by calculating the color moment of the batch welding points. Finally, the welding quality proportion is counted and the welding quality level is divided according to the demand to obtain the battery tab welding quality result.
[0013] As a preferred solution, in steps S2 and S4, the affine transformation process includes performing Hough line detection with a large threshold accumulator on the edge contour information of the image to obtain a peak angle, and calculating the peak angle to obtain an affine transformation angle. When the angle parallel to the long side of the welding head forms a peak among the multiple angles obtained by the Hough line detection with a large threshold accumulator, the peak angle can be used as the inclination angle of the image.
[0014] As a preferred solution, the tilted image can be converted into a normal image by affine transformation, and the affine transformation angle is calculated by the following formula:
[0015]
[0016] Where angle is the affine transformation angle; theta is the peak angle.
[0017] As a preferred solution, the coarse matching process in step S3 includes using the matching template in a large step size to traverse the image that was first corrected after binarization to obtain the fitness value to obtain a first fitness matrix. The maximum value in the first fitness matrix is the area where the solder joint is located. The perimeter of the area is expanded to obtain the coarsely matched image. Traversing with a large step size can reduce time and improve efficiency. By expanding the side lengths around the area, the error that may be caused by the large step size can be compensated.
[0018] As a preferred solution, in order to facilitate the distinction of welding points, in step S3, the image is binarized, the binarized welding points are green, and the background is red. The process of traversing to obtain the fitness value includes: calculating the fitness value one by one, calculating the size of the green area respectively, and taking the smallest area as the matching fitness value for traversal.
[0019] As a preferred solution, in order to facilitate the observation of the morphology of the boundary of the weld, the fine matching process in step S5 includes: using the matching template to traverse the image that has been corrected for the second time after binarization to obtain the fitness value to obtain a second fitness matrix, the maximum value in the second fitness matrix is the area where the weld is located, the weld is extracted from the area and the length and width of the weld are increased by 10px each to obtain the image after fine matching.
[0020] As a preferred solution, in order to effectively eliminate interference such as mixing of foreground and background of welding spots and high reflectivity of metals, and to facilitate the judgment of welding quality, the binarization process in steps S3, S4 and S5 includes: converting the color space of the image from the RGB color model to the HSV color model, and performing threshold segmentation on the layers of hue H, saturation S and brightness V respectively.
[0021] As a preferred solution, in order to highlight the morphology of the boundary of the solder joint, the hue H is 0-30, the saturation S is 100-255, and the brightness V is 0-100.
[0022] As a preferred solution, in step S6, the color moment is calculated by the following formula:
[0023]
[0024]
[0025] F color =[μ B ,μ G ,μ E ,σB ,σ G ,σ R ,s B ,s G ,s R ]
[0026] In the formula, μ i is the mean of the ith channel; σ i is the standard value of the i-th channel, reflecting the color distribution range of the image; s i is the bias value of the i-th channel, reflecting the symmetry of the color distribution of the image; p i,j is the color value of the jth pixel on the ith channel, representing the overall brightness of the image; F color is the color moment; N is the total number of pixels, where i includes three color channels B, G, R, μ i , σ i 、s i As the first-order color moment, the second-order color moment, and the third-order color moment, they can form a 9-dimensional vector. The color moment is used to construct a high-dimensional feature vector, so as to construct a classification hyperplane and accurately classify and identify solder joints.
[0027] As a preferred solution, the quality judgment process in step S6 includes: taking the color moment as the input of the support vector machine method, and adopting a one-to-many SVM training method to train a quality detection model, so that the trained quality detection model has better performance, and the detection of solder joint quality has objective feasibility, and each solder joint is judged by the quality detection model, which can greatly improve the judgment efficiency while ensuring the judgment accuracy.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] 1. The battery tab welding quality detection method of the present invention extracts the weld spot area by means of coarse matching and fine matching, and can accurately extract weld spot areas of different morphologies caused under various working conditions, has high robustness and high anti-interference ability, and improves recognition efficiency.
[0030] 2. By using color matrix to extract solder joint features to judge solder joint quality, it is objectively feasible to detect solder joint quality.
[0031] 3. The welding quality is divided by counting the proportion of qualified welds, which is coupled with the local characteristics and overall performance of battery tab welding, and can improve the accuracy of welding quality detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a flow chart of the battery tab welding quality detection method of the present invention;
[0033] Figure 2is a tooth size diagram of the welding head in Example 1;
[0034] Figure 3 is a schematic diagram of the matching template in Example 1;
[0035] Figure 4 It is the HSV diagram of the cold solder joint in Example 1;
[0036] Figure 5 is the HSV diagram of over-welding in Example 1;
[0037] Figure 6 This is the HSV diagram of normal welding in Example 1
[0038] Figure 7 is the skeleton extraction diagram in Example 1;
[0039] Figure 8 It is the fine matching diagram in Example 1. DETAILED DESCRIPTION
[0040] The drawings are only for illustrative purposes and cannot be construed as limiting the present invention. To better illustrate the present embodiment, some parts of the drawings may be omitted, enlarged, or reduced, and do not represent the size of the actual product. For those skilled in the art, it is understandable that some well-known structures and their descriptions may be omitted in the drawings. The positional relationships described in the drawings are only for illustrative purposes and cannot be construed as limiting the present invention.
[0041] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "long", "short" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, the terms describing the positional relationship in the drawings are only used for illustrative purposes and cannot be understood as limitations on this patent. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.
[0042] The technical solution of the present invention is further described in detail below through specific embodiments and in conjunction with the accompanying drawings:
[0043] Embodiment 1:
[0044] like Figure 1 As shown, this embodiment provides a method for detecting the welding quality of a battery tab, the method comprising the following steps:
[0045] S1: Collect the scale image to determine the conversion relationship between the pixel distance and the actual physical distance, and construct a matching template corresponding to the welding head according to the actual size of the welding head;
[0046] S2: Collect the battery tab welding image, extract the edge contour information of the battery tab welding image, and use affine transformation to perform the first correction on the battery tab welding image;
[0047] S3: Binarize the image after the first correction, and use the matching template to perform rough matching to obtain the image after rough matching;
[0048] S4: Binarize the image after rough matching and extract the background skeleton of the welding point, such as Figure 7 As shown, a skeleton image is obtained, and the skeleton image is corrected for the second time using affine transformation;
[0049] S5: binarize the image after the second correction, and use the matching template to perform fine matching to obtain the fine matched image;
[0050] S6: Calculate the color moments of all the welds in the finely matched image, judge the quality of all the welds by the color moments, count the percentage of qualified welds, and classify the welding quality grades.
[0051] In this embodiment, a 20KHz welding head is used for battery tab welding. Figure 2 As shown in the figure, it is the tooth size diagram of the welding head of this model. The tooth size diagram is photographed by a camera, and the proportional relationship is established between the scale distance of the tooth size diagram and the pixel distance of the image. The corresponding relationship between the pixel and the physical distance is determined by the proportional relationship. The arrangement shape of the welding head after welding can be determined, that is, it is composed of three rows and ten columns of neatly arranged welding points. The matching template of the image is constructed by the tooth size diagram, as shown in FIG. Figure 3 As shown, the white area is the soldering point area of the soldering head, where matching template is a commonly used technique in the field of image processing and computer vision, used to find an area similar to a given template image (or sub-image) in a larger image.
[0052] Specifically, the process of affine transformation in steps S2 and S4 includes: performing Hough line detection with a large threshold accumulator on the edge contour information of the image to obtain a peak angle, calculating the peak angle to obtain an affine transformation angle, and the affine transformation angle is calculated by the following formula:
[0053]
[0054] Where angle is the affine transformation angle; theta is the peak angle.
[0055] In this embodiment, the affine transformation maintains the linearity and parallelism of the graphics, that is, the characteristic straight line remains a straight line after the change, and the parallel line remains a parallel line after the change, but the length ratio in different directions will change, thereby overcoming the tilt caused by image acquisition. In this way, there is no need to use a multi-angle matching method. The image can be corrected by affine transformation in advance, and the subsequent image matching can reduce the time, among which, image correction: the angle of the straight line in the image is detected by Hough straight line, and the image is rotated by affine transformation based on the straight line angle; Hough straight line detection: by converting the points in the image into curves in polar coordinate space, the intersection points of the polar coordinate curves are straight lines in the spatial coordinate system, and the straight lines in the image are detected by counting the points on the curve using a voting mechanism; affine transformation: in geometry, a vector space is transformed into another vector space by a linear transformation and a translation.
[0056] Specifically, the rough matching process in step S3 includes: using a matching template with a large step size to traverse the image that has been corrected for the first time after binarization to obtain a first fitness matrix, the maximum value in the first fitness matrix is the area where the welding point is located, and the perimeter of the area is expanded to obtain a rough matched image.
[0057] In this embodiment, a sliding window is used for traversal, and a large step size is used to reduce the matching time. However, this method produces certain errors, and the target may exceed the area. By expanding the range, it can be ensured that all welds are within this area, avoiding missed detection and achieving coarse matching and positioning of the weld area.
[0058] Specifically, in steps S3, S4 and S5, the binarization process includes: converting the color space of the image from the RGB color model to the HSV color model, by thresholding the layers of hue H, saturation S and brightness V respectively, with hue H being 0 to 30, saturation S being 100 to 255, and brightness V being 0 to 100.
[0059] In this embodiment, Figures 4 to 6 The images of the welded workpiece in three morphologies in the HSV color space are respectively. The weld area is green and the background color is red. The colors at the welds are clustered similarly. The RGB color model is an additive color model used to represent and process color images. RGB stands for red, green, and blue, respectively. These three basic colors can generate various other colors through different combinations and intensities.
[0060] Specifically, in step S6, the color moment is calculated by the following formula:
[0061]
[0062]
[0063] F color =[μ B ,μ G ,μ R ,σ B ,σ G ,σ R ,s B ,s G ,s R ]
[0064] In the formula, μ i is the mean of the ith channel; σ i is the standard value of the ith channel; s i is the bias value of the i-th channel; p i,j is the color value of the jth pixel on the i-th channel; F color is the color moment; N is the total number of pixels, where i includes three color channels B, G, and R.
[0065] In this embodiment, i includes three color channels B, G, and R, where μ i , σ i 、s i As the first-order color moment, second-order color moment, and third-order color moment respectively, they can form a 9-dimensional vector. The color moment is used to construct a high-dimensional feature vector, so as to construct a classification hyperplane and accurately classify and identify solder joints. Among them, color moment: a simple and effective color feature representation method. Since color information is mainly distributed in low-order moments, the first-order moment, second-order moment and third-order moment are sufficient to express the color distribution of the image.
[0066] Specifically, the quality identification process in step S6 includes: taking the color moment as the input of the support vector machine method, using a one-to-many SVM (support vector machine) training method to train a quality detection model, and using the quality detection model to identify each solder joint.
[0067] In this embodiment, the quality inspection model is used to perform quality inspection on each solder joint to obtain the welding effect of the solder joint. The color matrix is used to extract the solder joint features. The solder joint features in high dimensions are easier to construct an accurate hyperplane, so that the performance of the trained quality inspection model is better, and the inspection of solder joint quality is objectively feasible. Among them, support vector machine: a generalized linear classifier that has binary classification of data in a supervised learning manner.
[0068] In this embodiment, the welding quality levels are divided according to Table 1, thereby obtaining the welding quality of the battery tab.
[0069] Table 1 Level requirements table
[0070]
[0071]
[0072] Embodiment 2:
[0073] This embodiment is similar to embodiment 1, except that, in this embodiment, in step S3, the process of traversing to obtain the fitness value includes: calculating the fitness values one by one, calculating the size of the green area respectively, and taking the smallest area as the matching fitness value for traversal.
[0074] In this embodiment, a sliding window traversal is used, and the fitness value is the similarity of the matching template sliding process in the image. The greater the similarity, the more the image resembles the matching template at that position. Since different morphologies will appear on the ultrasonically welded battery tabs, the traditional method requires many different matching templates. Therefore, by changing the calculation method of the fitness value, one matching template can be used to match images in all different situations. Among them, the sliding window traversal: maintain a fixed-size window on the sequence, and then slide the window sequentially to perform operations on the elements in the window at each position.
[0075] Embodiment 3:
[0076] This embodiment is similar to Embodiment 1, except that, in this embodiment, the fine matching process in step S5 includes: using a matching template to traverse the image that has been corrected for the second time after binarization to obtain fitness values to obtain a second fitness matrix, the maximum value in the second fitness matrix is the area where the solder joint is located, the solder joint is extracted from the area and the length and width of the solder joint are increased by 10px each to obtain an image after fine matching.
[0077] In this embodiment, when extracting the solder joints by fine matching, the length and width of the solder joints are increased by 10px each, so that the gap between the solder teeth can also be included in the solder joints, making it easy to observe the morphology of the solder joint boundary. Figure 8 As shown, the red box is the extracted solder joint ROI area. By calculating the color moment of the ROI area, the color moment can be used as the input of the support vector machine method.
[0078] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
[0079] Obviously, the above embodiments of the present invention are only examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. A battery tab welding quality detection method, characterized in that: The following steps are involved: S1: Collect the scale image to determine the conversion relationship between the pixel distance and the actual physical distance, and construct a matching template corresponding to the welding head according to the actual size of the welding head; S2: collecting a battery tab welding image, extracting edge contour information of the battery tab welding image, and performing a first correction on the battery tab welding image using affine transformation; S3: binarizing the image after the first correction, and performing rough matching using the matching template to obtain a rough matched image; S4: Binarizing the image after the rough matching and extracting the background skeleton of the welding point to obtain a skeleton image, and performing a second correction on the skeleton image using affine transformation; S5: binarizing the image after the second correction, and performing fine matching using the matching template to obtain a finely matched image; S6: Calculate the color moments of all the welding points in the finely matched image, judge the quality of all the welding points by the color moments, count the percentage of qualified welding points, and classify the welding quality grades.
2. A battery tab welding quality detection method according to claim 1, characterized in that: In steps S2 and S4, the affine transformation process includes: performing Hough line detection with a large threshold accumulator on edge contour information of the image to obtain a peak angle, and calculating the peak angle to obtain an affine transformation angle.
3. A battery tab welding quality detection method according to claim 2, characterized in that: The affine transformation angle is calculated by the following formula: Where angle is the affine transformation angle; theta is the peak angle.
4. A battery tab welding quality detection method according to claim 1, characterized in that: The rough matching process in step S3 includes: using the matching template in a large step size to traverse the first corrected image after binarization to obtain the fitness value to obtain a first fitness matrix, the maximum value in the first fitness matrix is the area where the welding point is located, and the perimeter of the area is expanded to obtain the image after rough matching.
5. A battery tab welding quality detection method according to claim 4, characterized in that: In step S3, the binary solder joint is green and the background is red. The process of traversing to obtain the fitness value includes: calculating the fitness value of each solder joint one by one, calculating the size of the green area respectively, taking the smallest area as the matching fitness value, and traversing.
6. A battery tab welding quality detection method according to claim 1, characterized in that: The fine matching process in step S5 includes: using the matching template to traverse the second corrected image after binarization to obtain the fitness value to obtain a second fitness matrix, the maximum value in the second fitness matrix is the area where the solder joint is located, extracting the solder joint in the area and increasing the length and width of the solder joint by 10px respectively to obtain the image after fine matching.
7. A battery tab welding quality detection method according to claim 1, characterized in that: The binarization process in steps S3, S4 and S5 includes: converting the color space of the image from the RGB color model to the HSV color model, and performing threshold segmentation on the layers of hue H, saturation S and brightness V respectively.
8. A battery tab welding quality detection method according to claim 7, characterized in that: The hue H is 0-30, the saturation S is 100-255, and the brightness V is 0-100.
9. A battery tab welding quality detection method according to claim 1, characterized in that: In step S6, the color moment is calculated by the following formula: F color =[μ B ,m G ,m R ,s B ,s G ,s R ,s B ,s G ,s R ] Where μi is the mean of the i-th channel; σ i is the standard value of the ith channel; s i is the bias value of the i-th channel; p i,j is the color value of the jth pixel on the i-th channel; F color is the color moment; N is the total number of pixels, where i includes three color channels B, G, and R.
10. A battery tab welding quality detection method according to claim 9, characterized in that: The quality identification process in step S6 includes: taking the color moment as the input of the support vector machine method, using a one-to-many SVM training method to train a quality detection model, and using the quality detection model to identify each solder joint.
Citation Information
Patent Citations
Battery tab welding quality evaluation method and device
CN111693573A
Cited By
Industrial visual detection method and system for cracks machined on surface of automobile casting mold
CN120765577A