Visual-Assisted Quality Inspection Method and System for Battery Housing Processing
Through the visually assisted battery shell quality inspection method, image processing technology is used to analyze weld and crack characteristics, which solves the problem of difficult to identify weld defects in traditional quality inspection methods, and achieves a more efficient and accurate battery shell quality assessment.
Patent Information
- Application Number
- CN202510541369.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-04-28
AI Technical Summary
Traditional battery shell quality inspection methods are difficult to accurately judge the defects caused by weld processing, resulting in insufficient detection efficiency, accuracy and consistency, and the inability to distinguish between the defects of the shell itself and the weld defects.
The quality inspection method of battery shell processing based on visual assistance is used to detect welds and welding cracks through image processing technology, analyze the texture uniformity and heat input degree of welds, combine the crack extension and shell deformation, determine the welding risk coefficient and judge the type of processing fault.
It improves the accuracy and efficiency of battery shell quality inspection, can accurately identify defects caused by weld processing, reduces negligence in manual inspection, and improves battery safety and production quality.
Smart Images

Figure CN120070435B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and particularly to a method and system for quality inspection of battery case processing based on visual assistance. Background Art
[0002] Battery cases are usually made of metal materials, and the shapes of battery cases are complex, requiring high processing precision. Various defects may occur during the production process of battery cases, such as cracks, scratches, shape deviations, etc. If these defects are not detected in time, they may affect the performance and safety of the battery, and even cause battery failure or safety accidents. For example, cracks or poor sealing of the battery case may lead to leakage of the electrolyte. For lithium-ion batteries, the electrolyte is flammable and explosive, and contact with air or moisture may cause short circuits, thermal runaway, and even fire and explosion. When structural defects such as deformation and damage occur, the mechanical strength of the case will be reduced, and when subjected to impact, extrusion or vibration, the internal battery cells may be damaged, resulting in internal short circuits or thermal runaway. Traditional quality inspection methods for battery cases mainly rely on manual inspection and simple automated equipment, and these methods have deficiencies in terms of detection efficiency, accuracy and consistency. Especially in large-scale production, manual inspection is often easily affected by factors such as fatigue and negligence. Moreover, through simple automated equipment, it is impossible to determine whether the defects of the battery case are caused by weld processing or the battery case itself has defects. Summary of the Invention
[0003] In order to solve the technical problem of difficultly determining whether the defects of the battery case are caused by weld processing, the purpose of the present invention is to provide a method and system for quality inspection of battery case processing based on visual assistance, and the specific technical solutions adopted are as follows:
[0004] In a first aspect, an embodiment of the present invention provides a method for quality inspection of battery case processing based on visual assistance, and the method includes:
[0005] Obtain the case image of the battery case after processing; detect the welds and corresponding welding cracks in the case image;
[0006] Determine the crack extensibility of the welding crack according to the diffusion situation of the welding crack in different directions;
[0007] Analyze the texture uniformity and texture interval of the weld to determine the heat input degree corresponding to the weld; based on the abnormal heat input degree, cluster the welds to obtain weld clusters;
[0008] Determine the affected degree of the welding crack according to the heat input degree and crack extensibility of each weld cluster;
[0009] Determine the shell defect coefficient based on the deformation of the battery shell, the location and sharpness of the welding crack; compare the crack extensibility and the shell defect coefficient to determine the welding risk coefficient;
[0010] Combine the degree of influence and the welding risk coefficient to determine the processing fault type of the battery shell.
[0011] Further, determining the crack extensibility of the welding crack according to the diffusion of the welding crack in different directions includes:
[0012] Determine the extension direction line of the welding crack; divide the welding crack into multiple pixel point clusters based on the vertical direction of the extension direction line of the welding crack;
[0013] For each pixel point cluster, calculate the distance between each pixel point in the pixel point cluster and the extension direction line; calculate the ratio between the maximum distance and the information entropy of the distance as the diffusion coefficient of the pixel point cluster;
[0014] Determine the crack extensibility of the welding crack on the battery shell according to the diffusion coefficients between different pixel point clusters.
[0015] Further, analyzing the texture uniformity and texture interval of the weld seam to determine the heat input degree corresponding to the weld seam includes:
[0016] Perform edge detection on the weld seam to obtain the edges on the weld seam as the weld seam texture; for any weld seam texture in the weld seam, obtain the distance between the weld seam texture and the weld seam textures on both sides as the weld seam texture distance;
[0017] Perform uniform analysis on the weld seam texture to obtain the texture uniform density of the weld seam;
[0018] Combine the texture uniform density, the weld seam texture distance, and the color of the weld seam texture to determine the heat input degree corresponding to the weld seam.
[0019] Further, the method for obtaining the abnormal heat input degree is:
[0020] Calculate the absolute value of the difference between the currently detected heat input degree and the normal heat input degree. When the absolute value of this difference is greater than the preset normal difference threshold, determine that the currently detected heat input degree is an abnormal heat input degree.
[0021] Further, determining the degree of influence of the welding crack according to the heat input degree and crack extensibility of each weld cluster includes:
[0022] Obtain the information entropy of the crack extensibility of all welding cracks during the processing of the battery housing and the mean value of the crack extensibility, and obtain the mean value of the heat input degree in each weld cluster; according to the difference between the mean value of the heat input degree and the mean value of the crack extensibility, adjust the information entropy of the crack extensibility, and perform normalization processing on the adjusted value to obtain the affected degree of the welding crack.
[0023] Further, determining the housing defect coefficient according to the deformation condition of the battery housing, the position and sharpness of the welding crack includes:
[0024] Determine the distance degree of each welding crack according to the distance between the centroid of each welding crack on the battery housing and the weld edge;
[0025] Determine the housing deformation coefficient of the battery housing corresponding to each welding crack according to the change of the upper edge of the battery housing plates on both sides corresponding to each welding crack;
[0026] Obtain the sharpness of the crack according to the fluctuation of the edge pixel points of the welding crack;
[0027] Combine the distance degree, the housing deformation coefficient and the sharpness of the crack to determine the housing defect coefficient of each welding crack; among them, both the housing deformation coefficient and the sharpness are positively correlated with the housing defect coefficient, and the distance degree is negatively correlated with the housing defect coefficient.
[0028] Further, comparing the crack extensibility and the housing defect coefficient to determine the welding risk coefficient includes:
[0029] Perform curve fitting on the housing defect coefficient of each welding crack of the battery housing to obtain a first fitting curve; perform curve fitting on the crack extensibility of each welding crack of the battery housing to obtain a second fitting curve; calculate the mean square error between the first fitting curve and the second fitting curve as the welding risk coefficient.
[0030] Further, combining the affected degree and the welding risk coefficient to determine the processing fault type of the battery housing includes:
[0031] Correct the affected degree through the welding risk coefficient, and use the corrected result value as the processing fault degree of the battery housing;
[0032] When the processing fault degree is greater than or equal to the preset fault threshold, it is determined that there is a problem with the welding processing of the battery housing;
[0033] When the processing fault degree is less than the preset fault threshold, it is determined that there is a factory quality problem with the battery housing.
[0034] Further, detecting the welding cracks in the housing image includes:
[0035] Learn the normal weld features through an autoencoder, and identify the welding cracks in the shell image through the reconstruction error.
[0036] In a second aspect, a visual-aided quality inspection system for battery shell processing is provided. The system includes the following modules:
[0037] An initial detection module, configured to obtain the shell image after battery shell processing; detect the welds and corresponding welding cracks in the shell image;
[0038] An extension analysis module, configured to determine the crack extensibility of the welding crack according to the diffusion conditions of the welding crack in different directions;
[0039] A heat input analysis module, configured to analyze the texture uniformity and texture interval of the weld, determine the heat input degree corresponding to the weld; cluster the welds based on the abnormal heat input degree to obtain weld clusters;
[0040] An influence analysis module, configured to determine the affected degree of the welding crack according to the heat input degree and crack extensibility of each weld cluster;
[0041] A processing risk determination module, configured to determine the shell defect coefficient according to the deformation condition of the battery shell, the position and sharpness of the welding crack; compare the crack extensibility and the shell defect coefficient to determine the welding risk coefficient;
[0042] A processing fault determination module, configured to determine the processing fault type of the battery shell by combining the affected degree and the welding risk coefficient.
[0043] In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor. An executable code is stored in the memory. When the processor executes the executable code, the embodiments of all possible implementations in the first aspect are implemented.
[0044] In a fourth aspect, an embodiment of the present invention provides a computer program product, which includes: computer program code. When the computer program code runs on a computer, the computer is caused to execute the method in the first aspect or any possible implementation manner of the first aspect.
[0045] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the embodiments of all possible implementations in the first aspect.
[0046] The embodiments of the present invention have at least the following beneficial effects:
[0047] In the embodiment of the present invention, by recognizing the image of the battery housing, the battery image with cracks is obtained. According to the morphology of the cracks in the weld of the battery housing, the crack extensibility of the cracks is obtained, and through the texture of the weld, the influence of the welding settings on the cracks is analyzed during the welding process to obtain the degree of influence on the welding cracks. Further, according to the position, sharpness of the cracks and the deformation of the housing in the welding processing result of the battery housing, the quality of the battery housing is evaluated to obtain the welding risk coefficient of the cracks caused by welding. Finally, through the welding risk coefficient corresponding to the welding process during the processing, the degree of influence on the weld is corrected, and the final processing failure degree of the battery housing is obtained, which is more accurate compared with the traditional quality inspection method for battery housing processing, and can judge whether the defect of the battery housing is caused by the weld processing based on the type of processing failure. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0049] Figure 1 It is a flowchart of a method for quality inspection of battery housing processing based on visual assistance provided by an embodiment of the present invention;
[0050] Figure 2 It is a schematic diagram of the housing image of the battery housing after processing provided by an embodiment of the present invention;
[0051] Figure 3 It is a partial schematic diagram of the welding crack provided by an embodiment of the present invention;
[0052] Figure 4 It is a schematic diagram of the extension direction line of the welding crack and the pixel point clustering provided by an embodiment of the present invention;
[0053] Figure 5 It is a schematic diagram of the weld with a higher heat input provided by an embodiment of the present invention;
[0054] Figure 6 It is a schematic diagram of the weld with a normal heat input provided by an embodiment of the present invention;
[0055] Figure 7 It is a schematic diagram of the weld with a lower heat input provided by an embodiment of the present invention;
[0056] Figure 8System block diagram of a battery case processing quality inspection system based on visual assistance provided by an embodiment of the present invention. Detailed implementation manners
[0057] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the intended invention purpose, the following describes in detail a method and system for processing and quality inspecting a battery case based on visual assistance proposed according to the present invention, including its specific implementation manners, structures, features, and effects, with reference to the accompanying drawings and preferred embodiments.
[0058] In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0059] Among them, in the description of the embodiments of the present invention, unless otherwise specified, " / " means "or". For example, A / B can represent A or B. The "and / or" in the text is only a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present invention, "a plurality" means two or more than two.
[0060] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as implying or suggesting relative importance or implicitly indicating the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features.
[0061] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs.
[0062] The following describes the embodiments of the present invention with reference to the accompanying drawings. Those skilled in the art will know that with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of the present invention are equally applicable to similar technical problems.
[0063] The following specifically describes the specific solutions of the method and system for processing and quality inspecting a battery case based on visual assistance provided by the present invention with reference to the accompanying drawings.
[0064] Please refer to Figure 1 , which shows a flowchart of the steps of a method for processing and quality inspecting a battery case based on visual assistance provided by an embodiment of the present invention. The method includes the following steps:
[0065] Step S100, obtaining an outer shell image of the battery case after processing; detecting welds and corresponding welding cracks in the outer shell image.
[0066] New energy batteries are usually composed of multiple battery cells, which are formed into battery modules through welding or other connection methods. The batteries within each module are connected in parallel or series to achieve the required voltage and capacity. Generally, to ensure the stability and safety of the battery pack, multiple battery cells or battery modules are fixed in a sealed enclosure.
[0067] When encapsulating the battery module, it is first necessary to connect and fix the battery cells or modules. After fixation, heat dissipation materials or a heat dissipation system need to be added, and a battery management system is installed. After installation, a metal enclosure is used to encapsulate the battery. During encapsulation, it is fixed by means such as screws, buckles, or welding. After encapsulation, sealant is used at the seams of the enclosure to ensure that the inside of the battery module is not affected by external environments such as water, dust, and oil stains.
[0068] Therefore, to ensure the welding quality at the weld seam before sealing, the weld seam of the battery enclosure after welding is subjected to quality inspection. An industrial camera with an appropriate resolution is selected according to the size of the battery. Also, to avoid reflections, shadows, and the texture of the enclosure surface, uniform illumination is required for the inspection scene.
[0069] An industrial camera is used to obtain the enclosure image of the processed battery enclosure, and this enclosure image is a grayscale image. Please refer to Figure 2 , Figure 2 which is a schematic diagram of the enclosure image of the processed battery enclosure.
[0070] After obtaining the enclosure image of the processed and welded enclosure, first, histogram equalization can be performed on the enclosure image to enhance the contrast of the crack area. The Canny operator is used to detect the edges in the enclosure image, and the Sobel operator can also be used to detect the edges in the enclosure image. After determining the edges, the region generation algorithm or contour analysis algorithm is used to extract the closed regions, and then the weld seam region is located.
[0071] Then, the normal weld seam features are learned through an autoencoder, and the welding cracks in the enclosure image are identified through the reconstruction error.
[0072] It should be noted that the method of locating the weld seam region from the closed regions can be to identify the weld seam region through a trained neural network, which will not be elaborated here.
[0073] Please refer to Figure 3 , Figure 3 which is a partial schematic diagram of the welding crack.
[0074] For the housing images in which no welding cracks are identified, no subsequent processing operations are performed. The embodiments of the present invention only make judgments on the battery housings in which welding cracks are detected in the housing images, and determine whether the welding cracks are caused by defects in the battery housing itself or by improper processing during welding through subsequent steps.
[0075] Step S200: Determine the crack extensibility of the welding crack according to the diffusion conditions of the welding crack in different directions.
[0076] In the images of the weld seams of the battery housing with cracks obtained by the above operations, some cracks may be caused by welding process problems during welding, and some cracks may be caused by housing substrate problems; in order to adjust the quality of subsequent processing, it is necessary to analyze the generation conditions of the welding cracks.
[0077] First, determine the extension direction line of the welding crack. Specifically: obtain the edge pixel points of the welding crack in the housing image, and use the line segment connecting the two edge pixel points with the largest distance as the extension direction line of the crack connection domain, and this extension direction line represents the extension direction of the welding crack.
[0078] Based on the vertical direction of the extension direction of the welding crack, divide the welding crack into multiple pixel clusters. Specifically: according to the perpendicular line of the extension direction line, divide the welding crack into multiple pixel clusters perpendicular to the extension direction line, where each line segment formed by each pixel cluster is perpendicular to the extension direction line.
[0079] Please refer to Figure 4 , Figure 4 which is a schematic diagram of the extension direction line of the welding crack and the pixel clusters. Figure 4 The closed area in Figure 4 is the welding crack, and the long line segment a in Figure 4 is the extension direction line of the welding crack, and the short line segment b in Figure 4 is the perpendicular line of the extension direction line of the welding crack; the pixel points belonging to the short line segment b and within the part boxed by the square in
[0080] For each pixel cluster, calculate the distance between each pixel in the pixel cluster and the extension direction line; calculate the ratio between the maximum distance and the information entropy of the distance as the diffusion coefficient of the pixel cluster.
[0081] The information entropy of the distance is the information entropy of the multiple distances corresponding to the extension direction line of each pixel in the same pixel cluster. The maximum distance is also the maximum distance between each pixel in the same pixel cluster and the extension direction line.
[0082] Arrange the pixel clusters according to their positions on the extension direction line to determine the next pixel cluster for each pixel cluster. For example, in Figure 4 , the pixel clusters are arranged in the order from top to bottom on the extension direction line.
[0083] Furthermore, according to the diffusion coefficients between different pixel clusters, determine the crack extensibility of the welding crack on the battery housing.
[0084] In the embodiments of the present invention, the crack extensibility is determined by combining the length of the extension direction line and the difference in diffusion coefficients corresponding to adjacent pixel clusters. Among them, the coefficient determined by the difference in diffusion coefficients corresponding to adjacent pixel clusters is the overall diffusion coefficient. The length of the extension direction line and the overall diffusion coefficient are both positively correlated with the crack extensibility.
[0085] Because, for the length of the extension direction line, the greater the length, the greater the extensibility of the crack, and the more likely it is that quality problems will occur in the corresponding area of the crack. The overall diffusion coefficient is determined by the difference in diffusion coefficients corresponding to adjacent pixel clusters. The greater the diffusion coefficients corresponding to adjacent pixel clusters, the more it indicates that the diffusion coefficient of the pixel clusters of the crack is continuously increasing. Therefore, it indicates that the crack is continuously spreading outwards, so its extensibility is higher.
[0086] In some embodiments, the normalized value of the product of the length of the extension direction line and the overall diffusion coefficient is used as the crack extensibility.
[0087] In some embodiments, the method for obtaining the overall diffusion coefficient is: the average value of the differences in diffusion coefficients corresponding to all adjacent pixel clusters.
[0088] The stronger the extensibility of the crack in the housing image, the greater the tendency for the crack to spread outwards. When the tendency for the crack to spread outwards is greater, the extension of the crack may cause damage to the integrity of the housing, and further lead to the exposure of the internal components of the battery, resulting in potential safety hazards.
[0089] Since the reason for the generation of the weld seam is due to some problems in the welding process, it is necessary to obtain the influence of the welding process on the crack based on the crack image on the weld seam in the battery housing.
[0090] Step S300: Analyze the texture uniformity and texture interval of the weld seam to determine the heat input degree corresponding to the weld seam; based on the abnormal heat input degree, cluster the weld seams to obtain weld clusters.
[0091] The settings of various parameters in the welding process will affect the total heat transferred to the workpiece during the welding process, thereby affecting the formation of the weld seam, the size of the weld pool, the cooling rate, and the flow of the metal, and further directly affecting the shape, thickness, and regularity of the surface texture of the weld seam.
[0092] When the heat input is excessive or too little, it will cause excessive melting or uneven cooling of the welded metal, resulting in cracks.
[0093] Therefore, in order to analyze the influence of parameter settings on the welding cracks of the battery case during the welding process, it is first necessary to judge the abnormal situation of the welding process parameters according to the cracks;
[0094] Perform edge detection on the weld seam to obtain the edges on the weld seam, which are recorded as weld textures.
[0095] When the heat input is excessive, it will cause a larger molten pool and a slower cooling rate during the processing, which may form coarser, larger and uneven textures; while when the heat input is low, it will cause a smaller molten pool and a faster cooling rate during the processing, which may form finer and uniform textures, but due to the finer texture, there may be discontinuous situations.
[0096] Please refer to Figure 5 , Figure 5 for a schematic diagram of the weld seam with a higher heat input; please refer to Figure 6 , Figure 6 for a schematic diagram of the weld seam with a normal heat input; please refer to Figure 7 , Figure 7 for a schematic diagram of the weld seam with a lower heat input.
[0097] Figure 5 The weld seam in has coarser textures in the weld seam and poorer uniformity between the textures due to the higher heat input; Figure 7 The weld seam in has finer textures between the weld seams but the textures disappear due to the too fast fusion of the weld seams due to the lower heat input; while Figure 6 The weld seam in has a more appropriate heat input, and at this time the weld seam texture will show a uniform and appropriate depth.
[0098] Perform a uniformity analysis on the weld seam texture to obtain the texture uniform density of the weld seam.
[0099] First, perform a similarity analysis on the weld seam texture to obtain the texture similarity of the weld seam. The higher the texture similarity, the more appropriate the heat input during the current welding is characterized.
[0100] In some embodiments, for each weld texture, a weld texture gray value sequence is constructed based on the gray values of the pixel points in each weld texture. The DTW distance between the weld texture gray value sequences of any two weld textures is calculated using the DTW algorithm, and the DTW distance is subjected to a negative correlation mapping to obtain the single texture similarity. In a certain order, the mean value of the single texture similarities between adjacent two weld textures is calculated respectively to obtain the texture similarity of the weld. Among them, in a certain order, it can be in the order from top to bottom, or in the order from bottom to top. If the weld is longitudinal, it can also be in the order from left to right. In short, according to a certain arrangement order, the texture similarity of adjacent weld textures is calculated.
[0101] The average width of the weld is denoted as the weld width, and for any weld texture in the weld, the distance between the weld texture and the weld textures on both sides is obtained as the weld texture distance. The difference between the minimum value and the maximum value among the weld texture distances in the weld is obtained as the maximum difference of the weld texture distances.
[0102] For each weld texture, the ratio of the weld texture distance of each weld texture to the weld width is calculated, and the mean value of the ratios of all weld textures is obtained and denoted as the weld width uniformity value.
[0103] The product of the weld width uniformity value, the variance of the weld texture distances, and the texture similarity is used as the texture uniformity density of the weld.
[0104] Combining the texture uniformity density, the weld texture distance, and the color of the weld texture, the heat input degree corresponding to the weld is determined.
[0105] In the embodiments of the present invention, the heat input degree corresponding to the weld is determined by combining the texture uniformity density, the maximum difference of the weld texture distances, and the average gradient value of the weld texture. Among them, the color of the weld texture is characterized by the average gradient value of the gray values of the weld texture.
[0106] In some embodiments, the calculation formula for the heat input degree RS is:
[0107] ; where j is the texture uniformity density, is the maximum difference of the weld texture distances; is the average gradient value of the weld texture; exp is the exponential function with the natural constant as the base.
[0108] Among them, The larger the value of, the shallower and more uniform the texture on the surface weld, and the texture in the weld may be interrupted. Therefore, the surface weld part is more likely to be caused by a low heat input amount.
[0109] Regarding the degree of heat input during the welding process of the battery case, either too large or too small heat input may cause problems during the welding process of the battery case. From the historical database, obtain the median of the heat input degree of the weld corresponding to the battery case image without welding cracks as the normal heat input degree.
[0110] After determining the heat input amount in the welding process of the currently detected battery case, compare the difference between the currently detected heat input degree and the normal heat input degree to obtain the abnormal heat input amount in the welding process of the tram car body shell. More specifically: calculate the absolute value of the difference between the currently detected heat input degree and the normal heat input degree. When the absolute value of this difference is greater than the preset normal difference threshold, determine that the currently detected heat input degree is the abnormal heat input amount, that is, the abnormal heat input degree. In the embodiment of the present invention, the value of the preset normal difference threshold can be 0.2, and in other embodiments, the implementer can also adjust this threshold according to the actual situation.
[0111] Cluster the abnormal heat input amounts in the welding process of the same battery case to obtain multiple abnormal amount clusters. According to the abnormal amount clusters, divide the welding cracks belonging to the same abnormal amount cluster into the same cluster to obtain a weld cluster. The abnormal heat input amounts of the welding cracks during the processing of the battery cases belonging to the same weld cluster are relatively close. Among them, each abnormal amount cluster corresponds to a weld cluster. It can also be understood that the welding cracks are divided based on the abnormal heat input amount as the data basis for clustering.
[0112] Step S400, determine the affected degree of the welding crack according to the heat input degree and crack extensibility of each weld cluster.
[0113] Obtain the information entropy and mean value of the crack extensibility of the welding cracks in the battery case processing in each weld cluster;
[0114] Obtain the mean value of the heat input degree in each weld cluster;
[0115] According to the difference between the mean value of the heat input degree and the mean value of the crack extensibility, adjust the information entropy of the crack extensibility and perform normalization processing on the adjusted value to obtain the affected degree of the welding crack.
[0116] The smaller the difference between the mean value of the heat input degree and the mean value of the crack extensibility, the higher the synchronization between the crack extensibility in the cluster and the abnormal heat input amount of the welding, indicating that the higher the abnormal heat input, the more likely it is to have cracks with strong extensibility after welding.
[0117] In some embodiments, the affected degree YX of the welding cracks within the cluster is:
[0118] ;
[0119] Among them, th is a hyperbolic function; N is the number of clusters; is the mean value of the heat input anomaly of the nth weld cluster; is the mean value of the crack extensibility of all welding cracks; is the information entropy of the crack extensibility of all welding cracks; is a non-zero constant between 0 and 1.
[0120] Among them, in the calculation formula of the degree of influence, adding is to prevent when the result of
[0121] The influence degree of the welding settings obtained by the above operations on the welding cracks shows that during the processing of the battery housing, changes in the welding process will affect the generation of cracks during welding and even cause the cracks to further extend; however, poor processing quality is not necessarily entirely caused by the process parameters during processing. If there are certain defects in the material of the battery housing itself, then even if reasonable process parameters are used for processing, the final processing quality will still have problems.
[0122] Step S500: Determine the housing defect coefficient according to the deformation condition of the battery housing, the position and sharpness of the welding cracks; compare the crack extensibility and the housing defect coefficient to determine the welding risk coefficient.
[0123] Quality problems in the material of the battery housing itself will cause welding cracks to appear during the welding of the battery housing and even exacerbate the welding cracks caused by welding parameter problems; therefore, it is necessary to analyze the battery housing material based on the performance of the welds on the battery housing.
[0124] When there are quality problems in the battery housing material, the welds after welding of the battery housing will show brittle fractures due to the defects in the material itself. And due to the material itself, the location where the cracks occur is in the fusion zone, and the fusion zone is generally located at the edge part of the weld. Moreover, the brittle fractures caused by material reasons are relatively sharp. Therefore, the housing defect coefficient of the battery housing can be determined based on the deformation condition of the battery housing and the sharpness of the welding cracks.
[0125] First, determine the distance degree of each welding crack according to the distance between the centroid of each welding crack on the battery housing and the weld edge. Specifically: Obtain the minimum distance between the centroid of each welding crack on the battery housing and the weld edge as the distance degree of each welding crack. When the welding crack is closer to the weld edge, that is, the welding crack is not closer to the middle of the weld but closer to the weld edge, this indicates that the crack is more caused by the battery housing.
[0126] Secondly, according to the changes in the upper edges of the battery housing plates on both sides corresponding to each welding crack, determine the housing deformation coefficient of each welding crack. Among them, the battery housing plates on both sides corresponding to the welding crack include: the edges of the battery housing plates with the same ordinate as the welding crack, and the edges of the battery housing plates with the same abscissa as the welding crack. Calculate the deformation coefficients of the edges of the battery housing plates obtained in the two cases of the same abscissa and the same ordinate respectively, and select the maximum deformation coefficients corresponding to the same abscissa and the same ordinate as the deformation coefficient of the welding crack. Specifically, the method for obtaining the deformation coefficient is as follows: for the edges of the battery housing plates on both sides with the same ordinate as the welding crack, calculate the mean value of the differences in the abscissas of any one side of the welding crack as the first deformation coefficient; calculate the mean value of the differences in the abscissas of the other side of the welding crack as the second deformation coefficient; take the mean value of the first deformation coefficient and the second deformation coefficient as the deformation coefficient of the edges of the battery housing plates on both sides with the same ordinate as the welding crack.
[0127] Then, according to the fluctuation situation between the edge pixel points of the welding crack, obtain the sharpness of the crack. Specifically: obtain the edge chain code on the edge of the welding crack, and obtain the sharpness according to the mean value of the differences at the corresponding positions between adjacent chain code values.
[0128] Finally, by combining the distance degree, the housing deformation coefficient of the battery housing, and the sharpness of the crack, determine the housing defect coefficient of the battery housing, where both the housing deformation coefficient and the sharpness are positively correlated with the housing defect coefficient, and the distance degree is negatively correlated with the housing defect coefficient.
[0129] In some embodiments, the calculation formula for the housing defect coefficient ZL of the welding crack is: ; where x is the sharpness of the welding crack; r is the housing deformation coefficient of the battery housing corresponding to the welding crack; c is the distance degree of the welding crack; th is the hyperbolic tangent function.
[0130] In the calculation formula of the housing defect coefficient, the larger the value, the sharper the crack on the battery housing, the closer it is to the fusion zone, and the more obvious the housing deformation, so it indicates that there are more quality problems with the battery housing.
[0131] Curve fitting is performed on the shell defect coefficient of each welding crack of the battery shell to obtain a first fitting curve; curve fitting is performed on the crack extensibility of each welding crack of the battery shell to obtain a second fitting curve; the mean square error between the first fitting curve and the second fitting curve is calculated, and this mean square error is denoted as the welding risk coefficient; the larger the mean square error, the greater the difference between the current two fitting curves, the smaller the probability that the crack is caused by the shell defect, the greater the probability that the crack is caused by welding, and the higher the corresponding welding risk coefficient; conversely, the smaller the mean square error, the smaller the difference between the current two fitting curves, and the lower the corresponding welding risk coefficient.
[0132] Step S600, combining the degree of influence and the welding risk coefficient, determine the processing fault type of the battery shell.
[0133] When the influence of welding on the welding crack is more serious, the corresponding degree of influence is greater, indicating a greater welding processing problem with the battery shell; and the larger the value of the welding risk coefficient, the smaller the probability that the crack is caused by the battery shell, and the greater the probability that the crack appears due to welding processing. It can also be understood that the welding risk coefficient is obtained by analyzing the form of the battery and is used as a coefficient for correcting the degree of influence. The degree of influence is corrected by the welding risk coefficient to ensure that the evaluation result of the welding processing problem will not be too high.
[0134] In some embodiments, the product value of the degree of influence and the welding risk coefficient is used as the processing fault degree of the battery shell.
[0135] As a preferred embodiment of the present invention, after obtaining the processing fault degree of the battery shell, compare the size of the processing fault degree and the preset fault threshold. When the processing fault degree is greater than or equal to the preset fault threshold, it is determined that there is a problem with the welding processing of the battery shell. At this time, it is necessary to detect the various parameter settings of the welding and the welding equipment. When the processing fault degree is less than the preset fault threshold, it is determined that there is an ex-factory quality problem with the battery shell. At this time, the battery shell needs to be returned to the factory, and if necessary, the raw materials of the battery shell can also be inspected for quality.
[0136] Please refer to Figure 8 , which shows a system block diagram of a vision-assisted quality inspection system for battery shell processing provided by another embodiment of the present invention. The system includes:
[0137] An initial detection module, configured to obtain an outer shell image after the battery shell is processed; detect the weld seams and corresponding welding cracks in the outer shell image;
[0138] An extension analysis module, configured to determine the crack extensibility of the welding crack according to the diffusion conditions of the welding crack in different directions;
[0139] A heat input analysis module, configured to analyze the texture uniformity and texture interval of the weld seam, determine the heat input degree corresponding to the weld seam; and cluster the weld seams based on the abnormal heat input degree to obtain weld clusters.
[0140] An influence analysis module, configured to determine the affected degree of the welding crack according to the heat input degree and crack extensibility of each weld cluster.
[0141] A processing risk determination module, configured to determine a shell defect coefficient according to the deformation condition of the battery shell, the position and sharpness of the welding crack; compare the crack extensibility and the shell defect coefficient to determine a welding risk coefficient.
[0142] A processing fault determination module, configured to determine the type of processing fault of the battery shell by combining the affected degree and the welding risk coefficient.
[0143] Optionally, the transmission medium may be a wired link, such as but not limited to, coaxial cable, optical fiber, digital subscriber line, etc., or a wireless link, such as but not limited to, Wireless Fidelity (WIFI), Bluetooth, mobile device network, etc.
[0144] It should be noted that: for the device provided in the above embodiment, only the division of the above functional modules is used for illustration. In actual application, the above functions may be allocated to different functional modules according to needs, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above.
[0145] A schematic structural diagram of a computer device provided by an embodiment of the present invention. Exemplarily, the computer device includes: a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the computer device can execute any of the above-described vision-assisted battery shell processing quality inspection methods.
[0146] In addition, an embodiment of the present invention also protects a device, which may include a memory and a processor. The memory stores executable program code, and the processor is used to call and execute the executable program code to execute the vision-assisted battery shell processing quality inspection method provided by the embodiment of the present invention.
[0147] In the embodiments of the present invention, the device can be divided into functional modules according to the above method examples. For example, each functional module can be corresponded, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is illustrative, only a logical function division, and there can be other division methods in actual implementation.
[0148] In the case of dividing each module according to each function, the device can also include a signal uploading module, a determination module, an adjustment module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be cited in the function description of the corresponding functional module, and will not be elaborated here.
[0149] It should be understood that the device provided by the embodiments of the present invention is used to execute the above method for visual-aided quality inspection of battery housing processing, so the same effects as the above implementation method can be achieved.
[0150] In the case of adopting integrated units, the device can include a processing module and a storage module. Among them, when the device is applied to a device, the processing module can be used to control and manage the actions of the device. The storage module can be used to support the device to execute mutual program codes, etc. Among them, the processing module can be a processor or a controller, which can implement or execute various exemplary logical blocks, modules and circuits described in combination with the disclosure of the present invention. The processor can also be a combination that realizes computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module can be a memory.
[0151] In addition, the device provided by the embodiments of the present invention can specifically be a chip, a component or a module. The chip can include a connected processor and a memory. Among them, the memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute the above method for visual-aided quality inspection of battery housing processing provided by the above embodiments.
[0152] The embodiments of the present invention also provide a computer-readable storage medium, in which computer program code is stored. When the computer program code runs on a computer, the computer is enabled to execute the above related method steps to implement the above method for visual-aided quality inspection of battery housing processing provided by the above embodiments.
[0153] The embodiments of the present invention also provide a computer program product. When the computer program product runs on a computer, the computer is enabled to execute the above related steps to implement the above method for visual-aided quality inspection of battery housing processing provided by the above embodiments.
[0154] Among them, the device, computer-readable storage medium, computer program product, or chip provided by the embodiments of the present invention are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be elaborated here. Through the description of the above embodiments, those skilled in the art can understand that for the convenience and simplicity of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In the embodiments provided by the present invention, it should be understood that the disclosed device and method can be implemented in other ways.
[0155] The device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections between each other can be through some interfaces. The indirect couplings or communication connections of devices or units can be in electrical, mechanical or other forms.
[0156] It should also be noted that in this article, the terms "including", "comprising" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or terminal device including the said element.
[0157] It should be noted that the above sequence of the embodiments of the present invention is only for description and does not represent the superiority or inferiority of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0158] Each embodiment in this specification is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments.
[0159] The above content is only a specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention.
Claims
1. A visual-aid-based quality inspection method for battery housing processing, characterized in that, The method includes the following steps: Obtain the shell image after processing the battery shell; detect the welds and corresponding welding cracks in the shell image; Determine the crack extensibility of the welding crack according to the diffusion conditions of the welding crack in different directions; Analyze the texture uniformity and texture interval of the weld to determine the heat input degree corresponding to the weld; cluster the welds based on the abnormal heat input degree to obtain weld clusters; Determine the affected degree of the welding crack according to the heat input degree and crack extensibility of each weld cluster; Determine the shell defect coefficient according to the deformation condition of the battery shell, the position and sharpness of the welding crack; compare the crack extensibility and the shell defect coefficient to determine the welding risk coefficient; Combine the affected degree and the welding risk coefficient to determine the processing fault type of the battery shell.
2. The visual-aid-based battery housing processing quality inspection method according to claim 1, characterized in that The determining the crack extensibility of the welding crack according to the diffusion conditions of the welding crack in different directions includes: Determine the extension direction line of the welding crack; divide the welding crack into multiple pixel clusters based on the vertical direction of the extension direction line of the welding crack; For each pixel cluster, calculate the distance between each pixel in the pixel cluster and the extension direction line; calculate the ratio between the maximum distance and the information entropy of the distance as the diffusion coefficient of the pixel cluster; Determine the crack extensibility of the welding crack on the battery shell according to the diffusion coefficients between different pixel clusters.
3. The visual-aid-based battery case processing quality inspection method according to claim 1, wherein The analyzing the texture uniformity and texture interval of the weld to determine the heat input degree corresponding to the weld includes: Perform edge detection on the weld to obtain the edges on the weld and record them as weld textures; for any weld texture in the weld, obtain the distance between the weld texture and the weld textures on both sides as the weld texture distance; Perform uniform analysis on the weld texture to obtain the texture uniform density of the weld; Combine the texture uniform density, the weld texture distance and the color of the weld texture to determine the heat input degree corresponding to the weld.
4. The visual-aid-based battery housing processing quality inspection method according to claim 1, wherein, The method for obtaining the abnormal heat input degree is: Calculate the absolute value of the difference between the currently detected heat input degree and the normal heat input degree. When the absolute value of the difference is greater than the preset normal difference threshold, determine that the currently detected heat input degree is an abnormal heat input degree.
5. The visual-aid-based battery housing processing quality inspection method according to claim 1, wherein, The determining the affected degree of the welding crack according to the heat input degree and crack extensibility of each weld cluster includes: Obtain the information entropy and mean value of the crack extensibility of all welding cracks during the processing of the battery shell, and obtain the mean value of the heat input degree in each weld cluster; adjust the information entropy of the crack extensibility according to the difference between the mean value of the heat input degree and the mean value of the crack extensibility, and perform normalization processing on the adjusted value to obtain the affected degree of the welding crack.
6. The visual-aid-based battery case processing quality inspection method according to claim 1, wherein The determining the shell defect coefficient according to the deformation condition of the battery shell, the position and sharpness of the welding crack includes: Determine the distance degree of each welding crack according to the distance between the centroid of each welding crack on the battery shell and the weld edge; Determine the shell deformation coefficient of the battery shell corresponding to each welding crack according to the change of the upper edge of the battery shell plates on both sides corresponding to each welding crack; Obtain the sharpness of the crack according to the fluctuation between the edge pixel points of the welding crack; Combine the distance degree, the shell deformation coefficient and the sharpness of the crack to determine the shell defect coefficient of each welding crack; wherein, both the shell deformation coefficient and the sharpness are positively correlated with the shell defect coefficient, and the distance degree is negatively correlated with the shell defect coefficient.
7. The visual-aid-based battery housing processing quality inspection method according to claim 1, wherein Comparing the crack extensibility and the shell defect coefficient to determine the welding risk coefficient includes: Perform curve fitting on the shell defect coefficients of each welding crack of the battery shell to obtain a first fitting curve; perform curve fitting on the crack extensibility of each welding crack of the battery shell to obtain a second fitting curve; calculate the mean square error between the first fitting curve and the second fitting curve as the welding risk coefficient.
8. The visual-aid-based battery housing processing quality inspection method according to claim 1, wherein Combining the degree of influence and the welding risk coefficient to determine the processing fault type of the battery shell includes: Correct the degree of influence through the welding risk coefficient, and use the corrected result value as the processing fault degree of the battery shell; When the processing fault degree is greater than or equal to the preset fault threshold, it is determined that there is a problem with the welding process of the battery shell; When the processing fault degree is less than the preset fault threshold, it is determined that there is a problem with the ex-factory quality of the battery shell.
9. The visual-aid-based battery housing processing quality inspection method according to claim 1, characterized in that, Detect the welding cracks in the shell image, including: Learn the normal weld features through an autoencoder and identify the welding cracks in the shell image through the reconstruction error.
10. A battery case processing quality inspection system based on visual assistance, characterized in that, The system includes the following modules: An initial detection module for obtaining the shell image after the battery shell is processed; detecting the welds and corresponding welding cracks in the shell image; An extension analysis module for determining the crack extensibility of the welding crack according to the diffusion of the welding crack in different directions; A heat input analysis module for analyzing the texture uniformity and texture interval of the weld to determine the heat input degree corresponding to the weld; Cluster the welds based on the abnormal heat input degree to obtain weld clusters; An influence analysis module for determining the degree of influence of the welding crack according to the heat input degree and crack extensibility of each weld cluster; A processing risk determination module for determining the shell defect coefficient according to the deformation of the battery shell, the position and sharpness of the welding crack; comparing the crack extensibility and the shell defect coefficient to determine the welding risk coefficient; A processing fault determination module for combining the degree of influence and the welding risk coefficient to determine the processing fault type of the battery shell.
Citation Information
Patent Citations
Power distribution equipment welding production defect detection system
CN116823814A
Photovoltaic steel structure component quality detection method based on image processing
CN117314893A