Tab welding detection method, equipment, storage medium and program product
By combining welding height data and image analysis, the missed welding problem in the electrode welding process of lithium battery is solved, the detection accuracy and reliability of the production process are improved, and the misjudgment rate is reduced.
Patent Information
- Application Number
- CN202510513279.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2045-04-23
AI Technical Summary
During the production process of lithium batteries, the ultrasonic welding of the battery ear and the adapter sheet has a risk of missing welding, resulting in a weak connection, affecting the battery performance and bringing safety risks, and existing detection methods are difficult to effectively monitor and identify.
By obtaining the welding height data of the battery ear, using the statistical characteristics of the welding height data of multiple normal battery ears for abnormal judgment, combined with welding image analysis, comprehensively considering factors such as the folding of the electrode, foil thickness and welding head wear, dynamically adjusted target statistical characteristics and grayscale threshold processing are used to improve detection accuracy.
It significantly improves the accuracy of extreme ear welding detection, reduces overkill problems, ensures battery quality and reduces misjudgment rate, and improves the reliability and safety of the production process.
Smart Images

Figure CN120046118B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of battery technology, and in particular to a tab welding detection method, device, storage medium, and program product. Background Art
[0002] Due to process and equipment limitations, lithium battery production is prone to defects, requiring various detection methods to identify these defects and improve battery yield. For example, ultrasonic welding between the battery tabs and the adapter carries the risk of leaks, especially during battery transportation, when the lower tabs come into direct contact with the pallet. Frequent folding and leaks often occur, making monitoring difficult. Currently, there are no effective detection methods. If these defects are forwarded to subsequent processes, they can lead to batch disassembly and material loss. Furthermore, leaks can weaken the connection between the tabs and the adapter, degrading battery performance and even posing safety risks.
[0003] The above statements are only used to provide background information related to the present application and do not necessarily constitute prior art. Summary of the Invention
[0004] In view of the above problems, the present application proposes a tab welding detection method, device, storage medium and program product to solve the problem of battery abnormality caused by welding leaks caused by battery tab welding in the prior art.
[0005] A first aspect of the present application provides a tab welding detection method, the method comprising:
[0006] Acquire first welding height data of the battery tab to be detected;
[0007] When it is determined based on a target statistical feature that the first welding height data meets a preset abnormal condition, obtaining a welding image of the battery tab; the target statistical feature is statistical data of the second welding height data of multiple normal battery tabs;
[0008] Determine whether the battery tab has a welding leak problem based on the welding image.
[0009] In the technical solution of the embodiment of the present application, the statistical characteristics of the weld height data of multiple normal battery tabs are used to determine abnormalities in the weld height data of the battery tab to be inspected, thereby avoiding the use of threshold judgment to reduce detection accuracy. In addition, considering that not only can the weld height be reduced due to tab folding, but also the thickness of the adapter, foil material, and welding head wear can affect the value of the weld height, the battery tab weld height data and welding images are combined for comprehensive analysis and judgment, avoiding the over-detection problem caused by using a single data source for judgment, thereby improving the accuracy of tab welding detection.
[0010] In some embodiments, determining that the first welding height data is abnormal based on target statistical features includes:
[0011] According to the target statistical characteristics, multiple indicators of the first welding height data are determined; when each of the indicators meets the corresponding abnormality determination condition, the first welding height data is determined to be abnormal.
[0012] In this embodiment, by utilizing the target statistical characteristics, the indicators of multiple dimensions of the first welding height data are calculated, and then the multiple dimensional indicators are combined to perform abnormality judgment. When the indicators of multiple dimensions meet their respective abnormality judgment conditions, it is considered that the first welding height data of the battery tab is abnormal, thereby reducing the over-kill problem of the tab welding detection.
[0013] In some embodiments, the multiple indicators include at least Mahalanobis distance and percentile; the Mahalanobis distance is obtained using the first welding height data, the covariance matrix and the average value in the target statistical feature, the percentile is one of the features in the target statistical feature, and the percentile is used to represent the second welding height data at a position corresponding to a preset percentage in the second welding height data of the multiple normal battery tabs; the abnormality judgment condition corresponding to the Mahalanobis distance is: the Mahalanobis distance exceeds the preset value; the abnormality judgment condition corresponding to the percentile is: the first welding height data is less than the percentile.
[0014] In this embodiment, the Mahalanobis distance of the first welding height data is calculated using the covariance matrix and the mean value in the target statistical feature. The Mahalanobis distance can represent the degree to which the first welding height data deviates from the normal data set distribution. Therefore, a Mahalanobis distance exceeding a preset value indicates that the first welding height data deviates from the normal range. Considering that there are two possible reasons for the abnormal Mahalanobis distance: the welding height data deviates from the lower limit of the normal range or deviates from the upper limit of the normal range, and a weld leak will only cause the welding height data to deviate from the lower limit, based on the judgment of the Mahalanobis distance abnormality, the percentile in the target statistical feature is used to compare with the first welding height data. The percentile can represent the distribution of the data. If the first welding height data is smaller than the percentile, it indicates that the first welding height data is abnormal and deviates from the lower limit. This can more accurately determine the abnormality of the welding height data and avoid the problem of over-killing.
[0015] In some embodiments, the method further comprises:
[0016] A counter is set; each time the detection of a battery tab is completed, the count value of the counter is increased by 1; when the count value of the counter reaches a preset number, the second welding height data of the normal battery tab is obtained from the battery tab that has completed the detection, the counter is reset, and the step of increasing the count value of the counter by 1 each time the detection of a battery tab is completed is continued; and the target statistical feature is updated using the obtained second welding height data.
[0017] In this embodiment, taking into account that the industrial production environment is changing dynamically, for example, the wear of the welding head and welding seat will affect various parameters in the ultrasonic welding process, by using the welding height data of normal battery tabs after detecting a certain number of battery tabs, the target statistical characteristics are automatically adjusted, which can reflect the dynamic changes of the production environment in real time, thereby maintaining detection accuracy and reliability.
[0018] In some embodiments, the updating of the target statistical feature using the acquired second welding height data includes:
[0019] Determine the covariance matrix and average value of the acquired second welding height data; use the determined covariance matrix and average value to replace the covariance matrix and average value in the target statistical feature respectively; sort the acquired second welding height data in ascending order; use the sorted second welding height data to determine the target welding height data at a position corresponding to a preset percentage; and use the target welding height data to replace the percentile in the target statistical feature.
[0020] In this embodiment, the target statistical features are updated by calculating the covariance matrix, mean value and percentile at a preset percentage position of the newly acquired second welding height data, which can ensure the accuracy of subsequent calculations of multiple dimensional index values (such as Mahalanobis distance).
[0021] In some embodiments, determining whether the battery tab has a welding leak problem based on the welding image includes:
[0022] Based on the welding image, a grayscale threshold for distinguishing the foreground and the background is determined; the welding image is converted into a binary image using the grayscale threshold; and the binary image is input into a trained detection model so that the detection model determines whether the battery tab has a welding leak problem based on the binary image.
[0023] In this embodiment, considering that the acquisition of welding images is easily affected by light interference, especially the tab material is metal foil, which has reflective properties, the welding image is binarized by determining a dynamic grayscale threshold to achieve accurate distinction between foreground and background while reducing the data processing amount of the detection model, thereby using the trained detection model to perform anomaly detection on the smaller binary image to improve detection efficiency.
[0024] In some embodiments, determining a grayscale threshold for distinguishing foreground and background based on the welding image includes:
[0025] Determine the grayscale histogram of the welding image; and use a preset inter-class variance relationship expression and the grayscale histogram to solve a threshold value that maximizes the inter-class variance in the preset inter-class variance relationship expression as a grayscale threshold value for distinguishing foreground and background.
[0026] In this embodiment, the optimal grayscale threshold for binarization is obtained by maximizing the inter-class variance, so as to be applicable to images under different lighting conditions.
[0027] In some embodiments, the first welding height data includes at least a pre-welding height and a post-welding height, wherein the pre-welding height is the thickness of the battery tab before welding, and the post-welding height is the thickness of the battery tab after welding.
[0028] In this embodiment, considering that there is a certain correlation between the pre-weld height and the post-weld height, the fluctuation of one variable will be masked by the fluctuation of another variable, and analyzing the pre-weld height and the post-weld height separately will result in omissions. Therefore, during the detection process, the pre-weld height before welding of the battery tab and the post-weld height after welding are obtained for subsequent abnormality judgment, thereby avoiding the influence of the correlation between the pre-weld height and the post-weld height on the detection accuracy.
[0029] The second aspect of the present application proposes an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect when executing the program.
[0030] A third aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when the program is executed by a processor.
[0031] An embodiment of the fourth aspect of the present application provides a computer program product, including a computer program, which is executed by a processor to implement the method described in the first aspect above.
[0032] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present application. The same reference numerals are used throughout the drawings to represent the same components. In the drawings:
[0034] Figure 1 This is a schematic diagram of the tab being flattened after being folded in the prior art;
[0035] Figure 2 This is a schematic diagram of image acquisition of tab folding in the prior art;
[0036] Figure 3 1 is a schematic diagram showing a height before welding and a height after welding according to an exemplary embodiment;
[0037] Figure 4 A schematic diagram of image acquisition of a tab wrinkle in the prior art;
[0038] Figure 5 1 is a flow chart of a tab welding detection method according to an exemplary embodiment;
[0039] Figure 6 1 is a flowchart of online detection of tab welding according to an exemplary embodiment;
[0040] Figure 7 is a schematic diagram showing detection results of a large number of battery cells according to an exemplary embodiment;
[0041] Figure 8 is a schematic diagram of a hardware structure of an electronic device according to an exemplary embodiment;
[0042] Figure 9 The figure is a schematic structural diagram of a storage medium according to an exemplary embodiment. DETAILED DESCRIPTION
[0043] The following embodiments of the technical solution of the present application will be described in detail with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application and are therefore only examples and are not intended to limit the scope of protection of the present application.
[0044] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned figure descriptions are intended to cover non-exclusive inclusions.
[0045] In the description of the embodiments of this application, the technical terms "first" and "second" are used only to distinguish different objects and should not be understood to indicate or imply relative importance or implicitly specify the quantity, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, the meaning of "plurality" is more than two, unless otherwise clearly and specifically defined.
[0046] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0047] In the description of the embodiments of this application, the term "and / or" is simply a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent the following three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.
[0048] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).
[0049] Currently, there are three ways to solve the problem of welding leaks caused by the folding of the lower layer of the battery tab during ultrasonic welding:
[0050] The first one is the physical method: Figure 1 As shown, a flattening line is placed above the pallet. When the battery is transported, when the battery is placed from the top to the pallet, the flattening line is used to flatten the folded tabs on the lower layer.
[0051] The second method uses visual methods: Figure 2 As shown in the figure, after the tab welding is completed, the CCD (Charge Coupled Device) installed below can take a picture of the tab area and determine whether the tab is folded through image algorithm.
[0052] The third method uses data analysis: the ultrasonic welding process can be divided into the welding head pressing the tab, and then performing high-speed vibration downward pressure. By monitoring the vertical height between the welding head and the welding seat, the vertical height can include the height before welding and the height after welding, such as Figure 3 As shown, the height before welding refers to the thickness of the tab plus the adapter before welding, and the height after welding refers to the thickness of the tab plus the adapter after welding). When the tab is folded, the height before welding and the height after welding will become smaller due to the missing tab in the welding area. Therefore, by comparing the height before welding or the height after welding with the threshold range, it is possible to identify whether the tab is leaking.
[0053] For the first physical method mentioned above, in order to ensure that the smoothing line plays a smoothing role, it is necessary to ensure that the end of the folded tab cannot exceed the position of the smoothing line, and the position of the folded crease must exceed the position of the smoothing line. These restrictions result in this method only being able to solve some of the welding leak problems, and the smoothing line also has the risk of scratching the tab; for the second visual method mentioned above, the CCD image is easily interfered by light, especially the metal foil of the tab has the characteristic of reflectiveness, which can easily cause misjudgment, and the image algorithm has a relatively low ability to distinguish between the tab wrinkling phenomenon and the tab folding phenomenon. Figure 4 The CCD image of the wrinkled tab shown is similar to the above Figure 2 The CCD images of the tab fold shown are almost similar and difficult to distinguish. For the data analysis of the third method, in addition to the tab fold causing the welding height to become smaller, the adapter, foil, welding head wear, etc. will affect the height value after welding, and when the foil is thin, the folding of a few layers has little effect on the height data, so it is difficult to judge the abnormality of the height data.
[0054] Based on this, some embodiments of the present application propose a tab welding detection solution. By using the target statistical features of the welding height data of multiple normal battery tabs, the welding height data of the battery tab to be detected is judged as abnormal, avoiding the use of threshold judgment to reduce the accuracy of data judgment. In addition, considering that the bending of the tab will cause the welding height to decrease, the adapter, foil thickness, welding head wear, etc. will also affect the value of the welding height. Therefore, by combining the welding height data of the battery tab and the welding image for comprehensive analysis and judgment, the over-kill problem caused by the judgment based on a single data source is avoided, thereby improving the accuracy of tab welding detection.
[0055] The battery tabs used in the tab welding detection scheme disclosed in the embodiments of this application may be, but are not limited to, tabs of battery cells. Battery cells may be secondary batteries, which are batteries that can be recharged to activate their active materials after discharge and continue to be used. Battery cells may be lithium-ion batteries, sodium-ion batteries, sodium-lithium-ion batteries, lithium metal batteries, sodium metal batteries, lithium-sulfur batteries, magnesium-ion batteries, nickel-metal hydride batteries, nickel-cadmium batteries, lead-acid batteries, and the like, but are not limited in the embodiments of this application.
[0056] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application.
[0057] Figure 5 1 is a flow chart of a tab welding detection method according to an exemplary embodiment. The tab welding detection method includes the following steps:
[0058] Step 501: Acquire first welding height data of a battery tab to be detected;
[0059] Step 502: Acquire a welding image of the battery tab when it is determined that the first welding height data is abnormal based on a target statistical feature, where the target statistical feature is statistical data of second welding height data of multiple normal battery tabs;
[0060] Step 503: Determine whether there is a welding leak problem on the battery tab based on the welding image.
[0061] The first and second welding height data are both welding data monitored during ultrasonic welding of the battery tab. The first welding height data can be considered the height data of the tab to be inspected, while the second welding height data can be considered the height data corresponding to the battery tab with a normal inspection result. A normal inspection result indicates that there is no leaking welding problem in the battery tab.
[0062] For example, the first welding height data includes two dimensions: the height before welding and the height after welding. There is an obvious correlation between the height before welding and the height after welding. The fluctuation of one variable will be masked by the fluctuation of another variable. Analyzing the height before welding and the height after welding separately may result in omissions. Therefore, by obtaining the first welding height data including the height before welding and the height after welding, abnormality judgment is performed to avoid the impact of the correlation between the height before welding and the height after welding on the detection accuracy.
[0063] The target statistical feature is used to characterize the statistical distribution of a data set consisting of welding height data of battery tabs whose detection results are normal.
[0064] The welding image can be understood as the image of the tab area after ultrasonic welding is completed, specifically referring to the image collected by the CCD on the side of the battery tab away from the welding head, which can also be called the bottom CCD image.
[0065] It is worth noting that the execution order of the above steps 502 and 503 is not specifically limited in this application. The welding image can also be judged first, and then the abnormality of the first welding height data can be judged based on the abnormality.
[0066] At this point, the above Figure 5 The tab weld inspection process shown uses the statistical characteristics of weld height data from multiple normal battery tabs to determine abnormalities in the weld height data of the battery tab being inspected, avoiding the use of threshold judgments that reduce detection accuracy. Furthermore, considering that not only does a bent tab reduce the weld height, but also factors such as the adapter, foil thickness, and welding head wear can affect the weld height value, a comprehensive analysis and judgment based on the battery tab weld height data and weld images is performed to avoid the over-detection problem caused by using a single data source, thereby improving the accuracy of tab weld inspection.
[0067] In some embodiments, the process of determining that the first welding height data is abnormal based on the target statistical characteristics in step 502 may include:
[0068] According to the target statistical characteristics, multiple indicators of the first welding height data are determined, and when each indicator satisfies the corresponding abnormality determination condition, it is determined that the first welding height data is abnormal.
[0069] The multiple indicators can be understood as determination criteria of different dimensions for determining whether the first welding height data is abnormal.
[0070] The abnormality determination condition refers to the condition that the indicator needs to meet when the first welding height data is abnormal. Different indicators use different abnormality determination conditions.
[0071] In this embodiment, by utilizing the target statistical characteristics, the indicators of multiple dimensions of the first welding height data are calculated, and then the abnormality judgment is performed in combination with the indicators of multiple dimensions. When the indicators of multiple dimensions meet their respective abnormality judgment conditions, it is considered that the first welding height data of the battery tab is abnormal, thereby avoiding the over-killing problem of the tab welding detection.
[0072] In some embodiments, the plurality of indicators mentioned above may include Mahalanobis distance and percentile.
[0073] The Mahalanobis distance is a statistical method used to measure the distance between a multidimensional data point and the distribution of a dataset. It takes into account the correlation between the dimensions in the dataset. As mentioned earlier, the first weld height data includes two dimensions: pre-weld height and post-weld height. A large Mahalanobis distance may indicate abnormal variations in the first weld height data (pre-weld height and post-weld height), such as wear of the welding head or welding base causing welding parameters to deviate from the normal range. Therefore, a larger Mahalanobis distance indicates that the data point deviates more from the dataset distribution and is likely an outlier.
[0074] Thus, the abnormality determination condition corresponding to the Mahalanobis distance is: the Mahalanobis distance exceeds a preset value. The preset value can be set according to actual experience, for example, the preset value of the Mahalanobis distance is set to 5.
[0075] The Mahalanobis distance is obtained by using the first welding height data, the covariance matrix in the target statistical features, and the average value. The covariance matrix describes the linear relationship between the dimensions in multidimensional data and reflects the correlation between the data dimensions. In the Mahalanobis distance calculation, the covariance matrix is used to standardize the data and eliminate the influence of the correlation between the dimensions. The average value is the sum of all data points in the data set divided by the number of data points. It reflects the central tendency of the data. In welding quality inspection, the average value can represent the typical values of the pre-weld height and post-weld height. The calculation formula of the Mahalanobis distance is as follows:
[0076]
[0077] In the above formula, , Indicates the first welding height data of the battery tab to be detected, is the height before welding and is the height after welding; , represents the average value, that is, the mean vector; represents the covariance matrix, , the calculation formula of each element in the covariance matrix is as follows:
[0078]
[0079]
[0080]
[0081] in, It represents the height of the ith battery tab before welding among n normal battery tabs. It represents the post-weld height of the i-th battery tab among n normal battery tabs.
[0082] Percentiles are one of the target statistical features. They represent the second weld height data at a predetermined percentage of the second weld height data for multiple normal battery tabs, reflecting the data distribution. In welding quality testing, percentiles can be used to determine whether the first weld height data is too small or too large. Considering that Mahalanobis distance anomalies can be caused by weld height data deviating from the lower or upper limit of the normal range, and that weld leaks only cause the first weld height data to deviate from the lower limit, percentiles are used to determine whether the first weld height data is too small, based on the determination of Mahalanobis distance anomalies.
[0083] It can be seen that the abnormality judgment condition corresponding to the percentile is: the first welding height data is less than the percentile.
[0084] It can be understood that the first welding height data includes the pre-welding height and the post-welding height, so the pre-welding height is compared with its corresponding percentile, and the post-welding height is compared with its corresponding percentile.
[0085] In this embodiment, the Mahalanobis distance of the first welding height data is calculated using the covariance matrix and the mean value in the target statistical feature. The Mahalanobis distance can represent the degree to which the first welding height data deviates from the normal data set distribution. Therefore, a Mahalanobis distance exceeding a preset value indicates that the first welding height data deviates from the normal range. Considering that there are two possible reasons for the abnormal Mahalanobis distance: the welding height data deviates from the lower limit of the normal range or deviates from the upper limit of the normal range, and a weld leak will only cause the welding height data to deviate from the lower limit, based on the judgment of the Mahalanobis distance abnormality, the percentile in the target statistical feature is used to compare with the first welding height data. The percentile can represent the distribution of the data. If the first welding height data is smaller than the percentile, it indicates that the first welding height data is abnormal and deviates from the lower limit. This can more accurately determine the abnormality of the welding height data and avoid the problem of over-killing.
[0086] It should be noted that in addition to using Mahalanobis distance and percentiles to determine anomalies, other methods such as Euclidean distance, cluster analysis, and isolation forests can also be used to determine anomalies in the first weld height data. It is understood that different indicators require appropriate calculation methods based on actual needs, and the target statistical features may need to be expanded. For example, when using Euclidean distance to measure the degree of deviation of the first weld height data, the Euclidean distance between the first weld height data and the mean of the dataset can be calculated.
[0087] In some embodiments, the battery tab detection process may further include:
[0088] A counter is set; each time the detection of a battery tab is completed, the count value of the counter is increased by 1. When the count value of the counter reaches a preset number, the second welding height data of the normal battery tab is obtained from the battery tab that has completed the detection, the counter is reset, and the step of increasing the count value of the counter by 1 each time the detection of a battery tab is completed is continued, thereby using the obtained second welding height data to update the target statistical characteristics.
[0089] That is to say, the second welding height data of the normal battery tab within a specific window size is used as a training set, and the target statistical features are calculated using the second welding height data in the training set. The target statistical features are used for subsequent abnormality judgment of the battery tabs. When the number of detected battery tabs reaches a specific window size, the second welding height data of the normal battery tabs is obtained from the window to recalculate the target statistical features for subsequent abnormality judgment of the battery tabs. In this way, the target statistical features can be kept in an updated state at all times, and can reflect in real time the changes in various parameters in the ultrasonic welding process caused by the wear of the welding head and the welding seat, thereby avoiding the decline in the generalization ability of the target statistical features due to the wear of the welding head and the welding seat.
[0090] In this embodiment, taking into account that the industrial production environment is changing dynamically, for example, the wear of the welding head and welding seat will affect various parameters in the ultrasonic welding process, by using the welding height data of normal battery tabs after detecting a certain number of battery tabs, the target statistical characteristics are automatically adjusted, which can reflect the dynamic changes of the production environment in real time, thereby maintaining detection accuracy and reliability.
[0091] In some embodiments, as described above, when the target statistical features include a covariance matrix, a mean value, and a percentile, the process of updating the target statistical features using the acquired second welding height data may include:
[0092] Determine the covariance matrix and average value of the acquired second welding height data, use the determined covariance matrix and average value to replace the covariance matrix and average value in the target statistical feature respectively, sort the acquired second welding height data in ascending order, use the sorted second welding height data to determine the target welding height data at the position corresponding to the preset percentage, and use the target welding height data to replace the percentile in the target statistical feature.
[0093] The calculation method of the covariance matrix and the average value can be found in the relevant description of the above embodiment and will not be repeated here.
[0094] The preset percentage can be set based on actual experience. The position calculation formula corresponding to the preset percentage is as follows:
[0095] Q p =(n +1)× p
[0096] in, p is a preset percentage, and n is the number of second welding height data, that is, the number of multiple normal battery tabs.
[0097] It should be noted here that Q p The result of may or may not be an integer. Q p The result is an integer, which is found directly in the sorted second welding height data. Q p The target welding height data at the corresponding position replaces the percentile in the target statistical feature. If Q p The result is not an integer, found in the second weld height data after sorting Q p The target welding height data at the corresponding left and right positions are linearly interpolated, and the interpolation results are used to replace the percentiles in the target statistical features.
[0098] Furthermore, the percentiles in the target statistical feature include the percentile of the height before welding and the percentile of the height after welding.
[0099] For example, assuming that the number of the second welding height data is 1000, p =0.01, Q p =( n +1)× p =10.01, thereby finding the second welding height data at the 10th position and the 11th position, and replacing the percentile in the target statistical feature with the mean of these two second welding height data, that is, finding the pre-weld height at the 10th position and the 11th position, replacing the percentile corresponding to the pre-weld height in the target statistical feature with the mean of these two pre-weld heights, and finding the post-weld height at the 10th position and the 11th position, replacing the percentile corresponding to the post-weld height in the target statistical feature with the mean of these two post-weld heights.
[0100] In this embodiment, the target statistical features are updated by calculating the covariance matrix, mean value and percentile at a preset percentage position of the newly acquired second welding height data, which can ensure the accuracy of subsequent calculations of multiple dimensional index values (such as Mahalanobis distance).
[0101] In some embodiments, the above step 503 of determining whether there is a welding leak problem in the battery tab based on the welding image may include:
[0102] Based on the welding image, a grayscale threshold for distinguishing the foreground and background is determined, and the welding image is converted into a binary image using the grayscale threshold. The binary image is then input into a trained detection model so that the detection model can determine whether there is a welding leak problem on the battery tab based on the binary image.
[0103] The grayscale threshold can be understood as a dynamic threshold, and the threshold value is obtained according to the grayscale distribution of the welding image.
[0104] The binarization formula is as follows:
[0105]
[0106] in, is the grayscale threshold, which is also the optimal threshold, is the foreground pixel value, usually .
[0107] In this embodiment, considering that the acquisition of welding images is easily affected by light interference, especially the tab material is metal foil, which has reflective properties, the welding image is binarized by determining a dynamic grayscale threshold to achieve accurate distinction between foreground and background while reducing the data processing amount of the detection model, thereby using the trained detection model to perform anomaly detection on the smaller binary image to improve detection efficiency.
[0108] In some embodiments, a process for determining a grayscale threshold for distinguishing foreground from background based on the welding image may include:
[0109] The grayscale histogram of the welding image is determined, and a threshold value that maximizes the inter-class variance in the preset inter-class variance relationship is solved by using a preset inter-class variance relationship and the grayscale histogram, as the grayscale threshold for distinguishing the foreground and the background.
[0110] Grayscale histogram is used to count the number of pixels at each gray level in an image. Assuming that the gray level range of the image is [0, L−1], L is the total number of gray levels (usually 256), the probability of each gray level is calculated. , is the total number of pixels in the image, i is the gray level (i=0,1,2,…,L-1), is the number of pixels at the i-th grayscale level. The preset inter-class variance relationship can be expressed as follows:
[0111]
[0112] in, is the between-class variance of foreground and background, is the threshold, is the global mean of the image, , is the cumulative probability, , is the cumulative mean, .
[0113] For each threshold , calculate the between-class variance , then find the Maximum threshold As the grayscale threshold used to distinguish foreground and background.
[0114] With respect to the technical solutions provided in the above embodiments, Figure 6 The flowchart of an online detection process for tab welding according to an exemplary embodiment includes the following steps:
[0115] Step 1: Collect the pre-weld and post-weld heights of the battery tab to obtain a data point. Calculate the Mahalanobis distance of the data point using the covariance matrix and mean value in the target statistical feature.
[0116] Step 2: Compare the Mahalanobis distance with a preset value. If the Mahalanobis distance exceeds the preset value, execute step 3; otherwise, execute step 5.
[0117] Step 3: Compare the pre-weld height of the battery tab with the percentile of the pre-weld height in the target statistical feature, and compare the post-weld height of the battery tab with the percentile of the post-weld height in the target statistical feature. If the pre-weld height of the battery tab is less than the percentile of the pre-weld height and the post-weld height of the battery tab is less than the percentile of the post-weld height, execute step 4; otherwise, execute step 5.
[0118] Step 4: Determine whether the battery tab is abnormal based on the welding image. If so, proceed to step 6; otherwise, proceed to step 5.
[0119] Step 5: Make sure the battery tabs are welded properly without any leaks;
[0120] Step 6: Determine if the battery tab is leaking and generate an interception signal.
[0121] In the actual online detection process, a total of 38786 battery tabs were detected, of which 2 were actually leaking. Using this solution, a total of 11 leaking battery tabs were identified, such as Figure 7 As shown, the horizontal axis is the number of the battery tab starting from 0, and the vertical axis is the Mahalanobis distance of the battery tab. Figure 7 The hollow circles mark the leaked battery tabs, and the solid dots mark the Mahalanobis distance. Two leaked battery tabs were identified 100% of the time, with an over-detection rate of 0.023%. This shows that this solution significantly improves the accuracy of ultrasonic weld leak detection.
[0122] The above description of the various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced with each other and will not be repeated herein for the sake of brevity.
[0123] Those skilled in the art will understand that, in the above-mentioned method of a specific embodiment, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0124] The embodiment of the present application further provides an electronic device corresponding to the tab welding detection method provided in the above embodiment, so as to execute the above tab welding detection method.
[0125] Figure 8 This is a hardware structure diagram of an electronic device according to an exemplary embodiment of the present application. The electronic device may include: a communication interface 601, a processor 602, a memory 603, and a bus 604. The communication interface 601, the processor 602, and the memory 603 communicate with each other via the bus 604. The processor 602 can execute the tab welding detection method described above by reading and executing machine-executable instructions corresponding to the control logic of the tab welding detection method in the memory 603. The specific content of this method is described in the above embodiment and will not be repeated here.
[0126] The memory 603 referred to in this application can be any electronic, magnetic, optical, or other physical storage device, and can contain stored information, such as executable instructions, data, and the like. Specifically, the memory 603 can be RAM (Random Access Memory), flash memory, a storage drive (such as a hard disk drive), any type of storage disk (such as a CD, DVD, etc.), or similar storage media, or a combination thereof. The system network element communicates with at least one other network element via at least one communication interface 601 (which can be wired or wireless), and can utilize the Internet, a wide area network, a local area network, a metropolitan area network, and the like.
[0127] The bus 604 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 603 is used to store programs, and the processor 602 executes the programs after receiving an execution instruction.
[0128] The processor 602 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 602 or by instructions in the form of software. The above-mentioned processor 602 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The various methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor.
[0129] The electronic device provided in the embodiment of the present application and the tab welding detection method provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, operated or implemented therein.
[0130] The present application also provides a computer-readable storage medium corresponding to the tab welding detection method provided in the above embodiment. Figure 9 As shown, the computer-readable storage medium is a CD 30 on which a computer program (ie, a program product) is stored. When the computer program is run by a processor, the tab welding detection method provided by any of the aforementioned embodiments is executed.
[0131] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.
[0132] The computer-readable storage medium provided in the above-mentioned embodiment of the present application and the tab welding detection method provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, run or implemented by the application program stored therein.
[0133] An embodiment of the present application further provides a computer program product corresponding to the request processing method provided in the aforementioned embodiment. The computer program product includes a computer program, which is executed by a processor to implement the tab welding detection method provided in the aforementioned embodiment.
[0134] The computer program product provided in the above-mentioned embodiments of the present application and the tab welding detection method provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.
[0135] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0136] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0137] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for detecting tab welding, characterized in that: The method comprises: Acquire first welding height data of the battery tab to be inspected, where the first welding height data is obtained by monitoring the vertical height between the welding head and the welding base during the battery tab welding process, including a pre-weld height before welding the tab and the adapter, and a post-weld height after welding the tab and the adapter; When it is determined that the first welding height data is abnormal based on a target statistical feature, obtaining a welding image of the battery tab; the target statistical feature is statistical data of the second welding height data of multiple normal battery tabs; Determining whether the battery tab has a welding leak problem according to the welding image; Wherein, determining that the first welding height data is abnormal based on target statistical features includes: Determining multiple indicators of the first welding height data according to the target statistical characteristics, the multiple indicators at least including Mahalanobis distance and percentile; When all the indicators meet their corresponding abnormality determination conditions, it is determined that the first welding height data is abnormal.
2. The method according to claim 1, characterized in that The Mahalanobis distance is obtained by using the first welding height data, the covariance matrix in the target statistical feature, and the average value. The percentile is one of the features in the target statistical feature, and the percentile represents the second welding height data at a position corresponding to a preset percentage of the second welding height data of the plurality of normal battery tabs. The abnormality determination condition corresponding to the Mahalanobis distance is: the Mahalanobis distance exceeds a preset value; The abnormality determination condition corresponding to the percentile is: the first welding height data is less than the percentile.
3. The method according to any one of claims 1-2, characterized in that The method further comprises: Set up a counter; Each time a battery tab is detected, the count value of the counter is increased by 1; When the count value of the counter reaches a preset number, obtaining second welding height data of a normal battery tab from the battery tab that has completed the inspection, resetting the counter, and continuing to perform the step of increasing the count value of the counter by 1 each time the inspection of a battery tab is completed; The target statistical feature is updated using the acquired second welding height data.
4. The method according to claim 3, characterized in that The updating of the target statistical feature by using the acquired second welding height data includes: determining a covariance matrix and a mean value of the acquired second weld height data; Replacing the covariance matrix and the mean value in the target statistical feature with the determined covariance matrix and mean value respectively; Sorting the acquired second welding height data in ascending order; Determine target welding height data at a position corresponding to a preset percentage using the sorted second welding height data; The target welding height data is used to replace the percentile in the target statistical feature.
5. The method according to claim 1, wherein The determining whether the battery tab has a welding leak problem according to the welding image includes: determining a grayscale threshold for distinguishing foreground and background based on the welding image; Converting the welding image into a binary image using the grayscale threshold; The binary image is input into a trained detection model so that the detection model determines whether the battery tab has a welding leak problem based on the binary image.
6. The method according to claim 5, characterized in that Determining a grayscale threshold for distinguishing foreground and background based on the welding image includes: determining a grayscale histogram of the welding image; By using a preset inter-class variance relational expression and the grayscale histogram, a threshold value that maximizes the inter-class variance in the preset inter-class variance relational expression is solved as a grayscale threshold value for distinguishing the foreground from the background.
7. The method according to any one of claims 1-2, 5-6, characterized in that: The first welding height data includes at least a pre-welding height and a post-welding height, wherein the pre-welding height is the thickness of the battery tab before welding, and the post-welding height is the thickness of the battery tab after welding.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the method according to any one of claims 1 to 7 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer program product comprising a computer program, characterized in that The computer program is executed by a processor to implement the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Battery pack welding quality image detection method
CN116664579A
Welding quality evaluation method and device, electronic equipment and storage medium
CN119831411A