New energy battery pole post weld defect detection method, device and storage medium
By acquiring point cloud data of the battery module using a linear array structured light sensor, converting it into a binary image, and performing ellipse fitting and mask calculations, the problem of not being able to detect the type and location of weld defects in existing technologies is solved, and automated, accurate weld defect identification and adaptive detection are achieved.
Patent Information
- Application Number
- CN202310957857.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-01
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2043-08-01
AI Technical Summary
Existing technologies cannot effectively detect the defect types, locations, and geometric information of weld seams in new energy battery terminals, and the detection methods suffer from high costs, complexity, and inapplicability.
A linear array structured light sensor is used to acquire point cloud data of the battery module, which is then converted into a binary image. By using ellipse fitting and mask calculation, combined with threshold judgment, the type, location, and geometric information of weld defects are detected.
It achieves automated and accurate weld defect detection, and can identify off-center welding, missing welding, poor welding and explosion points, adapting to the detection needs of different scenarios and reducing subjective misjudgment.
Smart Images

Figure CN117218057B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of battery weld joint detection methods, and in particular to a new energy battery pole weld joint defect detection method, device and storage medium. BACKGROUND
[0002] The battery is an important power component of a new energy vehicle, and the electrode pole weld joint of the battery needs to be detected after production. The existing technology for detecting the electrode pole weld joint of the battery mainly includes manual detection, acoustic flaw detection, 2D image detection and deep learning detection. Among them:
[0003] The reliability of the manual detection method is affected by the subjective factors of the detection personnel, resulting in uncertainty in the detection results. For example, due to fatigue or careless observation of the detection personnel, it is easy to cause missed detection of small defects; the proficiency of the individual affects the efficiency of the detection, and the differentiation makes it difficult to realize the assembly line production, in addition, manual detection also consumes high labor cost.
[0004] In the acoustic flaw detection, eddy current and ultrasonic flaw detection equipment are used for detection, and the detection precision is high, but due to the complex detection method and high price, the battery weld joint defects cannot be classified, and the width and area of the defects cannot be obtained, which has obvious limitations.
[0005] In the 2D image detection, the camera is used to shoot the new energy battery pole weld joint area, the features of specific defects are extracted by analyzing the shot image, and a special defect matching template is developed based on these features, and the developed template is used to detect the defects caused in the battery weld joint. Due to the complexity and diversity of the defects generated in the welding process, and the high influence of external light on the quality of the collected image, the scheme of relying only on 2D image for defect detection cannot complete effective detection.
[0006] The deep learning detection mainly uses deep learning method for detection, and a large amount of training data is needed to identify the weld joint defect features of the identification model, which has the problems of difficult data set acquisition, high development cost and long cycle, and the identification model of the deep learning detection needs to be retrained after changing the scene, cannot be reused, and does not have universality.
[0007] The above-mentioned manual detection, acoustic flaw detection, 2D image detection and deep learning detection methods all have their own problems, which makes it difficult to balance efficiency, cost and effectiveness when applied. In order to solve this problem,
[0008] The prior art also uses a 3D image detection method for detection. In the 3D image detection method, a linear array structured light sensor or a planar array structured light sensor is used to scan the new energy battery pole weld area to obtain point cloud data of the weld area and the surrounding area, and the point cloud data is analyzed to obtain weld defect information. For example, in the Chinese patent application No. 202210953067.1, a new energy cylindrical battery top sealing weld 3D defect detection method and system, a planar array structured light sensor is used to obtain battery top point cloud data, and an algorithm is used to detect weld defects, which can accurately determine whether the battery pole has a weld defect. However, the method of the patent cannot obtain the type information, position and geometric information of the weld defect, so there are still great limitations in application. SUMMARY
[0009] The present application provides a new energy battery pole weld defect detection method, device and storage medium to solve the problem that the prior art 3D image detection method cannot obtain the type and position of the weld defect and geometric information.
[0010] In order to achieve the above purpose, the technical scheme adopted by the present application is as follows:
[0011] The new energy battery pole weld defect detection method comprises the following steps:
[0012] Step 1, obtaining point cloud data of a measured surface of a battery module and converting it into a binary image;
[0013] Step 2, determining a pole pixel area screening threshold range, and counting each connected region of the binary image obtained in step 1, retaining a plurality of connected regions with a pixel area within the pole pixel area screening threshold range, and performing an external ellipse fitting on each connected region to obtain a corresponding fitting ellipse;
[0014] Calculating the ellipse confidence of each fitting ellipse, sorting the fitting ellipses in descending order according to the ellipse confidence, and retaining the top X fitting ellipses in the sorting, wherein X is the number of pole columns of the battery module, each retained fitting ellipse corresponds to each battery pole column of the measured surface of the battery module, and the average semi-major axis and the average semi-minor axis of each retained fitting ellipse are obtained;
[0015] Determining the pixel width W and the pixel height H of the theoretical weld area of each battery pole column, and the maximum weld offset pixel distance O1 of each battery pole weld in the X direction and the maximum weld offset pixel distance O2 of the weld in the Y direction; taking a region with a pixel width of W+O1 and a pixel height of H+O2 in the binary image as the actual weld area of each battery pole column positioned in the binary image, with the center of each retained fitting ellipse as the center.
[0016] Step 3, using the mask operation method, first construct a mask M for the battery post weld area determined in step 2, the number of rows of the mask M is equal to the pixel height H of the battery post theoretical weld area in the binary image, the number of columns of the mask M is equal to the pixel width W of the battery post theoretical weld area in the binary image, and the value of each row and column in the mask M is 0;
[0017] Draw a concentric ellipse ring composed of two ellipses with the center of the mask M as the center, the major axis of the inner ring ellipse is 2 times the average semi-major axis, the minor axis of the inner ring ellipse is 2 times the average semi-minor axis, the major axis of the outer ring ellipse is equal to the pixel width W of the corresponding battery post theoretical weld area, and the minor axis of the outer ring ellipse is equal to the pixel height H of the corresponding battery post theoretical weld area, and the value inside the concentric ellipse ring in the mask M is 1.
[0018] Take the absolute value of the depth information of each point cloud data of each battery post actual weld area in the binary image, and fill it into the empty matrix of H+O2 rows and W+O1 columns row by row and column by column, and then perform convolution calculation with the corresponding mask to obtain the convolution result.
[0019] Calculate the Euclidean distance between the reserved fitting ellipse center coordinates corresponding to each battery post and the row and column coordinates of the maximum value in the corresponding convolution result, and then compare the calculated Euclidean distance with the set offset welding judgment threshold value. If the calculated Euclidean distance is greater than the set offset welding judgment threshold value, it is judged that the corresponding battery post weld exists offset welding, and the obtained Euclidean distance is the weld offset distance.
[0020] Further in step 1, first, based on the depth of each point cloud data, remove the invalid point cloud data and retain the valid point cloud data, then perform detrending on the valid point cloud data to obtain detrended point cloud data, and finally convert the detrended point cloud data into a binary image.
[0021] Further in step 2, according to the design area of a single battery post on the measured surface of the battery module, determine the post pixel area screening threshold range.
[0022] Further in step 2, according to the average semi-major axis, the average semi-minor axis, the ideal weld width, the X-direction pixel scale, and the Y-direction pixel scale, determine the pixel width W and the pixel height H of each battery post theoretical weld area; according to the maximum offset empirical value of the weld in the X direction and the Y direction, and the X-direction pixel scale and the Y-direction pixel scale, determine the maximum weld offset pixel distance O1 of the weld in the X direction and the maximum weld offset pixel distance O2 of the weld in the Y direction, and take the area with a pixel width of W+O1 and a pixel height of H+O2 in the binary image as the actual weld area of each battery post.
[0023] Further, step 3 further comprises: for each battery pole, if the calculated Euclidean distance is less than the set offset welding judgment threshold, taking the row and column coordinates of the maximum value in the convolution result as the center, taking a region in the binary image with a width equal to the pixel width W of the theoretical welding seam region of the corresponding battery pole and a height equal to the pixel height H of the theoretical welding seam region of the corresponding battery pole as the accurate welding seam region;
[0024] After filling the depth information of each point cloud data of each battery pole accurate welding seam region into the H row W column matrix N row by row and column by column, performing point multiplication calculation on the corresponding mask M, comparing the point multiplication calculation result with the set burst point depth judgment threshold K2, and then storing the comparison result in the H row W column binary image I';
[0025] Traverse the point cloud data of the accurate welding seam region row by row and column by column, and compare the depth information dZ ij of each point cloud data obtained by traversal with the set burst point depth judgment threshold K2, if the depth information dZ ij of the point cloud data obtained by traversal is greater than K2, the gray value of the i row j column of the binary image I' is 0, if the depth information dZ ij of the point cloud data obtained by traversal is less than or equal to K2, the gray value of the i row j column of the binary image I' is 255;
[0026] Statistical binary image I' all connected regions and calculate each connected region pixel area s z , compare each connected region pixel area s z with the set burst point area judgment threshold K3, keep the connected region s z ≥K3, if s z ≥K3 The number of connected regions is greater than 0, it is judged that there is a burst point in the accurate welding seam region, calculate the minimum value z min of the depth information of each retained connected region point cloud data, and the corresponding position coordinates (x ij , y ij ), wherein the position coordinates (x ij , y ij ) are the burst point position coordinates of the corresponding battery pole welding seam, and the burst point depth of the corresponding battery pole welding seam is-z min .
[0027] Further, step 3 further comprises: counting the number q1 of elements in the matrix N greater than the set weld depth determination threshold K4 (K4 element 0) and the number q2 of elements less than -K4, and counting the number Q of elements with a value of 1 in the mask M corresponding to each battery pole; calculating the weld area ratio R0 corresponding to each battery pole = (q1+q2) / Q, and comparing the weld area ratio calculation result with the set missing weld determination threshold K5, if R0≤K5, it is determined that the corresponding battery pole is missing welding, and the missing welding battery pole weld area ratio R0 is obtained.
[0028] Further, step 3 further comprises: calculating the proportion R1 of each battery pole higher than the reference plane and comparing the calculated proportion higher than the reference plane with the set false welding determination threshold K6, if R1≤K6, it is determined that the corresponding battery pole is false welding, and the false welding battery pole center coordinates and the proportion R1 higher than the reference plane are obtained; if R1>K6, and it is determined that the corresponding battery pole weld is not detected as a qualified weld.
[0029] An electronic device comprising a processor and a memory, the memory storing program instructions readable and run by the processor, when the program instructions are read and run by the processor, the steps 1-3 of the new energy battery pole weld defect detection method are executed.
[0030] A storage medium storing program instructions, when the program instructions are read and run, the steps 1-3 of the new energy battery pole weld defect detection method are executed.
[0031] Compared with the prior art, the beneficial effects of the present application are:
[0032] (1) The present application can automatically detect defects after identifying and positioning the battery pole area in the new energy battery module, and obtain the type information of each weld defect, that is, whether there is partial welding, missing welding, false welding and burst point.
[0033] (2) The present application can output the position information and geometric information of each type of weld defect, which can reduce the misjudgment problem caused by subjectivity.
[0034] (3) When the measurement scene changes, only the setting parameters need to be modified to detect different sizes and types of battery modules; users can modify the determination conditions of each defect detection according to the actual scene demand, so the present application has the advantage of strong ease of use. BRIEF DESCRIPTION OF DRAWINGS
[0035] Figure 1 is a flowchart of an embodiment of the present application.
[0036] Figure 2is the brightness map of the battery module in the embodiment one of the present application.
[0037] Figure 3 is the point cloud depth map obtained according to the point cloud data in the embodiment one of the present application.
[0038] Figure 4 is the binary image obtained in the embodiment one of the present application. DETAILED DESCRIPTION
[0039] In order for those skilled in the art to better understand the present application, the following will be combined with the drawings and embodiments to explain the embodiments of the present application in detail, so that the process of how to apply technical means to solve technical problems and achieve corresponding technical effects can be fully understood and implemented. The embodiments of the present application and the features of the embodiments can be combined with each other without conflict, and the formed technical solutions are within the protection scope of the present application.
[0040] Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the protection scope of the present application.
[0041] It should be noted that the terms "include" and "have" in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0042] Embodiment one
[0043] As shown in Figure 1 , the present embodiment discloses a new energy battery pole weld defect detection method, comprising the following steps:
[0044] Step 1, obtaining point cloud data of the measured surface of the battery module and converting it into a binary image, the process is as follows:
[0045] (1.1), obtaining data.
[0046] Place the new energy battery module on the displacement platform, use the linear array structured light sensor, and fix the linear array structured light sensor directly above the battery module, keep the laser plane of the linear array structured light sensor perpendicular to the measured surface of the battery module. Make the linear array structured light sensor work, and make the battery module move uniformly in one direction on the displacement platform, obtain the point cloud data P1(x ij ,yij ,z ij The brightness map of the battery module is obtained by generating a brightness map and a point cloud depth map based on the point cloud data. The brightness map of the battery module obtained in this embodiment is shown below. Figure 2 As shown, the point cloud depth map obtained from the point cloud data is as follows: Figure 3 As shown.
[0047] In this embodiment, the obtained point cloud data P1(x) ij ,y ij ,z ij () represents m rows and n columns of uniform data, where i and j represent the row and column indices of the point cloud, respectively, and x... ij Represents the x-coordinate and y-coordinate of the point in the i-th row and j-th column. ij Represents the y-coordinate of the point in the i-th row and j-th column, z ij This represents the depth information of the point cloud in the i-th row and j-th column (i = 1, ..., m, j = 1, ..., n). Points in the same column have the same x-coordinate, and points in the same row have the same y-coordinate. Furthermore, the point cloud data is based on the depth information z... ij Perform filtering to remove depth information z. ij Exceeding the depth measurement range or obstructed area z ij For data with invalid values (NaN), retain the remaining point cloud data as valid point cloud data.
[0048] (1.2) Detrending processing.
[0049] First, fit the spatial plane equation F of the measured surface of the battery module: Let the effective point cloud data be P1(x ij ,x ij ,z ij The number of points is k, and the x-coordinate, y-coordinate, and depth information z-coordinate of the valid point cloud data are calculated. ij mean (
[0050] The x-coordinate, y-coordinate, and depth information z-coordinate of k valid point cloud coordinates are used. ij Subtract the mean respectively After that, sort them by row and column to obtain a matrix A with k rows and 3 columns. k3 For matrix A k3 Singular value decomposition yields a 3x3 orthogonal matrix V. 33 Singular value decomposition and orthogonal matrix V 33 It can be represented as:
[0051]
[0052] Among them, U kk For A k3 A left singular matrix, a k-row k-column orthogonal matrix, whose columns are formed by A k3 A k3T The eigenvectors of S are composed of... k3 For A k3 A singular value matrix, a k-row, 3-column diagonal matrix, with diagonal elements A k3 A k3 T The non-negative square roots of V are arranged in descending order. 33 For A k3 A right singular matrix, a 3x3 orthogonal matrix, whose columns are formed by A k3 T A k3 It consists of eigenvectors. 11 r 22 r 33 V 33 The diagonal coefficient.
[0053] According to the orthogonal matrix V 33 The four coefficients of the spatial plane equation F can be obtained, and the spatial plane equation F can be expressed as:
[0054] F: ax + by + cz + d = 0,
[0055] Where a, b, c, d are the coefficients of the equation, and are orthogonal to the matrix V. 33 The relationship can be represented as:
[0056]
[0057] The effective point cloud data P1(x) ij ,y ij ,z ij The x-coordinate of the midpoint ij With y coordinate ij Substituting the coordinates into the spatial plane equation F, we obtain the depth value fz of the fitted plane. ij The effective point cloud data P1(x) ij ,y ij ,z ij depth information z ij Depth value fz of the fitted plane ij Subtracting each point one by one yields the detrended point cloud data P2(x). ij ,y ij ,dz ij ), where dZ ij =z ij -fz ij .
[0058] (1.3) Obtain the binary image.
[0059] Construct an 8-bit single-channel image I with m rows and n columns, and set a binarization threshold T. Iterate through the valid point cloud data P2(x) row by row and column by column. ij,y ij ,dz ij If dz ij If dz > T, then the gray value of the i-th row and j-th column of image I is set to 0; if dz ij ≤T or dz ij If the value is invalid (nan), then the grayscale value of the i-th row and j-th column of image I is set to 255, thus converting the valid point cloud data into a binary image as follows: Figure 4 As shown.
[0060] Step 2: Locate the weld seam area of each battery terminal in the binary image obtained in Step 1. The process is as follows:
[0061] First, based on the design area S of the battery terminals on the tested surface of the battery module, the pixel area screening thresholds T1 and T2 are determined. Specifically, after converting S into pixel area s = S / (dx*dy), the pixel area screening thresholds T1 = s - Δ and T2 = s + Δ can be determined. Here, dx is the known pixel scale in the X direction, dy is the known pixel scale in the Y direction, in mm / pixel; Δ is the pixel deviation value, determined empirically.
[0062] Statistically analyze each connected region of the binary image obtained in step 1, and retain the pixel area s. p Within multiple connected regions of the pole pixel area selection threshold range, the retained pixel area satisfies T1≤s p Multiple connected regions ≤T2.
[0063] For each connected region, perform circumscribed ellipse fitting to obtain the corresponding fitted ellipse. Let the coordinates of the center of each fitted ellipse be C. p (x p ,y p ), semi-major axis A p and semi-short axis B p Calculate the elliptic confidence score K for each fitted ellipse. p K p The calculation formula is as follows:
[0064]
[0065] Obtain the elliptic confidence score K for each fitted ellipse. p Then, each fitted ellipse is sorted according to the ellipse confidence level K. p Sort the cells from largest to smallest and retain the top X fitted ellipses, where X is the known number of electrode posts in the battery module. Each retained fitted ellipse corresponds to a battery electrode post on the tested surface of the battery module, and the center C of each retained fitted ellipse is obtained in the binary image. p coordinates)(x p ,y p ), semi-major axis A p and semi-short axis Bp The specific value.
[0066] Based on the semi-major axis A of each retained fitted ellipse p and semi-short axis B p The average semi-major axis of each retained fitted ellipse was calculated. and mean semi-minor axis Then, based on the average semi-major axis Mean semi-minor axis In addition, based on the actual width L of each battery terminal weld on the tested surface of the battery module, the pixel width W and pixel height H of the corresponding theoretical area of the battery terminal weld are determined. The specific calculation formulas are: W = 2*(A + L / dx), H = 2*(B + L / dy), where A is the average semi-major axis. The length of is in pixels; B is the average semi-minor axis. The length of is in pixels; L is the known ideal weld width in mm; dx is the known pixel scale in the X direction; dy is the known pixel scale in the Y direction in mm / pixel.
[0067] Centered on the center of each retained fitted ellipse, a region corresponding to the pixel width W and pixel height H of the battery terminal is selected. This allows the location of the weld seam region for each battery terminal in the binary image. Let P be the point cloud data for each weld seam region of each battery terminal. p (,x ij , point y ij Cloud, d number z ij According to P p (of x) ij , sit y ij Label, dP is z pij ()x ij ,y ij ,dz ij ).
[0068] In this embodiment, considering the possibility of weld misalignment, it is necessary to further locate the weld area of each battery terminal post by combining the maximum weld misalignment distance O. Specifically, based on the maximum weld misalignment distance O, the maximum weld misalignment pixel distance O1 in the X direction and the maximum weld misalignment pixel distance O2 in the Y direction for each battery terminal post weld are calculated. The specific calculation formulas are: O1 = 2*o1 / dx, O2 = 2*o2 / dy, where o1 is the known empirical value of the maximum offset of the weld in the X direction, and o2 is the known empirical value of the maximum offset of the weld in the Y direction, in mm.
[0069] Then, in the binary image, the center C of each retained fitted ellipse is used. p (for x) p , middle y pIn the binary image, the region with a pixel width of W+O1 and a pixel height of H+O2 corresponding to the battery terminal is taken as the actual weld area of each battery terminal located in the binary image.
[0070] Step 3: Use mask calculation method to process the point cloud data of the battery terminal weld area to detect weld defects and obtain the type, location and geometric information of the weld defects.
[0071] In this embodiment, the following thresholds are set: a weld deviation judgment threshold K1, a blast point depth judgment threshold K2 (K2 < 0), a blast point area judgment threshold K3, a weld depth judgment threshold K4 (K4 > 0), a missed weld judgment threshold K5, and a cold weld judgment threshold K6. Weld defect detection is performed based on these thresholds. These thresholds are all judgment indicators given by the user for different weld defects, and are derived from these indicators.
[0072] The weld defect detection process is as follows:
[0073] (3.1) Detection of off-center solder joints.
[0074] First, a mask M is constructed for the battery terminal weld seam area determined in step 2. The number of rows in mask M is equal to the pixel height H of the theoretical weld seam area of the battery terminal in the binary image, and the number of columns in mask M is equal to the pixel width W of the theoretical weld seam area of the battery terminal in the binary image. The value of each row and each column in mask M is 0.
[0075] Draw a concentric elliptical ring composed of two ellipses with the center of mask M as the center. The major axis of the inner ring is twice the average semi-major axis. The minor axis of the inner ring ellipse is twice the average semi-minor axis. The major axis of the outer ring ellipse is equal to the pixel width W of the theoretical weld seam area of the corresponding battery terminal, the minor axis of the outer ring ellipse is equal to the pixel height H of the theoretical weld seam area of the corresponding battery terminal, and the value inside the concentric elliptical ring in the mask M is 1.
[0076] P is the point cloud data of each battery terminal's actual weld area in the binary image. p The absolute value of the depth information is taken and filled into the empty matrix of H+O2 rows and W+O1 columns one by one. Then, convolution is performed with the corresponding mask to obtain the convolution result.
[0077] Calculate the center C of the retained fitted ellipse corresponding to each battery terminal. p coordinates (x) p ,y p ), and the row and column coordinates (x, y) of the maximum value in the corresponding convolution result. pmax ,y pmaxThe Euclidean distance D between the two terminals is calculated, and then compared with the set welding deviation judgment threshold K1. If the calculated Euclidean distance D is greater than the set welding deviation judgment threshold K1, it is determined that there is a weld defect in the corresponding battery terminal weld, and the type of weld defect is welding deviation. The center coordinates of the battery terminal corresponding to the welding deviation are the center C of the corresponding retained fitting ellipse. p coordinates (x) p ,y p The obtained Euclidean distance D is the weld offset distance.
[0078] (3.2) Explosion point detection.
[0079] For each battery terminal, if the calculated Euclidean distance D is less than the set off-center welding threshold K1, then the row and column coordinates (x, y, y) of the maximum value in the convolution result are used. pmax ,y pmax Centered on a point cloud, a region in the binary image with a width equal to the pixel width W and a height equal to the pixel height H of the theoretical weld seam region of the corresponding battery terminal is selected as the precise weld seam region. Let P' be the point cloud data of each precise weld seam region. p The point cloud data is P' p The coordinates are (x ij ,y ij ,dz ij ).
[0080] P' of each battery terminal's precise weld seam area p Depth information dz ij After filling the matrix N with H rows and W columns one by one, perform a dot product calculation with the corresponding mask M, compare the dot product calculation result with the set explosion depth determination threshold K2, and then store the comparison result in the binary image I' with H rows and W columns.
[0081] Traverse the point cloud data of the precise weld area row by row and column by column, and extract the depth information (dz) from each point cloud data obtained during the traversal. ij Compare the depth information dz of the point cloud data obtained by traversing with the set threshold K2 for determining the depth of the explosion point. ij If the value is greater than K2, then the gray value in the i-th row and j-th column of the binary image I' is set to 0. If the depth information dZ of the point cloud data obtained through traversal is... ij If K2 is less than or equal to K2, then the gray value in the i-th row and j-th column of the binary image I' is set to 255.
[0082] Collect all connected regions in the binary image I' and calculate the pixel area s of each connected region. z The pixel area s of each connected region z Compare with the set threshold K3 for determining the explosion area, and retain s.z For a connected region ≥ K3, if s z If the number of connected regions ≥ K3 is greater than 0, then a burst point is determined to exist within the precise weld area, meaning the weld defect type corresponding to the battery terminal is a burst point. Calculate the minimum depth information z in the point cloud data of each retained connected region. min With the corresponding position coordinates (x) ij ,y ij ), where the position coordinates (x ij ,y ij The coordinates of the explosion point are the corresponding locations of the battery terminal weld seams, and the depth of the explosion point is -z. min .
[0083] (3.3) Detection of missing welds.
[0084] Count the number of elements q1 greater than the set weld depth judgment threshold K4 in the statistical matrix N, and the number of elements q2 less than -K4. Count the number of elements Q with a value of 1 in the mask M corresponding to each battery terminal. Calculate the weld area ratio R0 = (q1 + q2) / Q corresponding to each battery terminal, and compare the calculated weld area ratio with the set missing weld judgment threshold K5. If R0 ≤ K5, it is determined that the corresponding battery terminal has a weld defect, and the weld defect type is missing weld. The center coordinates of the battery terminal corresponding to the missing weld are the center C of the corresponding retained fitted ellipse. p coordinates (x) p ,y p ), and obtain the proportion R0 of the weld area of the missing battery terminal.
[0085] (3.4) Detection of cold solder joints.
[0086] Calculate the percentage of each battery terminal above the reference plane. The calculated proportion R1 above the reference plane is compared with the set threshold K6 for determining a false weld. If R1 ≤ K6, the corresponding battery terminal is determined to have a weld defect, and the type of weld defect is a false weld. The center coordinates of the battery terminal corresponding to the false weld are the center C of the corresponding retained fitted ellipse. p coordinates (x) p ,y p ), and obtain the center coordinates of the poorly welded battery terminal and the ratio R1 above the reference plane; if R1>K6, and no explosion point is detected in the corresponding battery terminal weld, it is judged as a qualified weld.
[0087] Example 2
[0088] This embodiment discloses an electronic device for implementing the new energy battery terminal weld defect detection method described in Embodiment 1, including a processor and a memory. The memory stores program instructions in its storage medium, which can be read and executed by the processor or by an external device. When the program instructions are read and executed by the processor, steps 1-3 of the new energy battery terminal weld defect detection method described in Embodiment 1 are performed.
[0089] The preferred embodiments of the present invention have been described in detail above with reference to the accompanying drawings. These embodiments are merely descriptions of preferred embodiments and are not intended to limit the scope or concept of the invention. The specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. Such combinations, as long as they do not violate the spirit of the present invention, should also be considered as part of this disclosure. To avoid unnecessary repetition, the present invention will not further describe the various possible combinations.
[0090] This invention is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this invention and without departing from the design idea of this invention, all modifications and improvements made by those skilled in the art to the technical solutions of this invention should fall within the protection scope of this invention. The technical content for which protection is sought in this invention has been fully described in the claims.
Claims
1. A method for detecting defects in weld seams of new energy battery terminals, characterized in that, Includes the following steps: Step 1: Obtain the point cloud data of the tested surface of the battery module and convert it into a binary image; Step 2: Determine the range of the pole pixel area screening threshold, and count the connected regions of the binary image obtained in Step 1. Retain multiple connected regions whose pixel area is within the range of the pole pixel area screening threshold, and perform circumscribed ellipse fitting on each connected region to obtain the corresponding fitted ellipse. Calculate the ellipse confidence score of each fitted ellipse, sort the fitted ellipses in descending order of ellipse confidence score, and retain the top X fitted ellipses in the sort, where X is the known number of battery terminals of the battery module. Each retained fitted ellipse corresponds to each battery terminal of the tested surface of the battery module, and the average semi-major axis and average semi-minor axis of each retained fitted ellipse are obtained. Determine the pixel width W and pixel height H of the theoretical weld seam region for each battery terminal, as well as the maximum weld deviation pixel distance O1 in the X direction and the maximum weld deviation pixel distance O2 in the Y direction for each battery terminal weld seam; take the center of each retained fitted ellipse as the center, and take the region with pixel width W+O1 and pixel height H+O2 in the corresponding battery terminal in the binary image as the actual weld seam region of each battery terminal located in the binary image; Step 3: Using the mask operation method, first construct a mask M for the battery terminal weld area determined in Step 2. The number of rows of the mask M is equal to the pixel height H of the theoretical weld area of the battery terminal in the binary image, and the number of columns of the mask M is equal to the pixel width W of the theoretical weld area of the battery terminal in the binary image. The value of each row and each column in the mask M is 0. A concentric elliptical ring composed of two ellipses is drawn with the center of mask M as the center. The major axis of the inner ring is twice the average semi-major axis, and the minor axis of the inner ring is twice the average semi-minor axis. The major axis of the outer ring is equal to the pixel width W of the theoretical weld seam area of the corresponding battery terminal, and the minor axis of the outer ring is equal to the pixel height H of the theoretical weld seam area of the corresponding battery terminal. The value inside the concentric elliptical ring in mask M is 1. The absolute value of the depth information of each point cloud data of the actual weld area of each battery terminal in the binary image is taken and filled into the empty matrix of H+O2 rows and W+O1 columns one by one. Then, convolution calculation is performed with the corresponding mask to obtain the convolution result. Calculate the Euclidean distance between the center coordinates of the retained fitted ellipse corresponding to each battery terminal and the row and column coordinates of the maximum value in the corresponding convolution result. Then compare the calculated Euclidean distance with the set welding deviation judgment threshold. If the calculated Euclidean distance is greater than the set welding deviation judgment threshold, it is determined that the weld of the corresponding battery terminal has welding deviation. The obtained Euclidean distance is the weld deviation distance.
2. The method for detecting defects in weld seams of new energy battery terminals according to claim 1, characterized in that, In step 1, the point cloud data is first filtered based on its depth to remove invalid point cloud data and retain valid point cloud data. Then, the valid point cloud data is detrended to obtain detrended point cloud data. Finally, the detrended point cloud data is converted into a binary image.
3. The method for detecting defects in weld seams of new energy battery terminals according to claim 1, characterized in that, In step 2, the threshold range for filtering the pixel area of the battery post is determined based on the design area of a single battery post on the tested surface of the battery module.
4. The method for detecting defects in weld seams of new energy battery terminals according to claim 1, characterized in that, In step 2, based on the average semi-major axis, average semi-minor axis, ideal weld width, X-axis pixel scale, and Y-axis pixel scale, the pixel width W and pixel height H of the theoretical weld area for each battery terminal are determined. Based on the empirical values of the maximum offset of the weld in the X and Y directions, as well as the X-axis pixel scale and Y-axis pixel scale, the maximum weld offset pixel distance O1 in the X direction and the maximum weld offset pixel distance O2 in the Y direction for each battery terminal are determined. The corresponding battery terminal in the binary image is selected as the actual weld area for each battery terminal with a pixel width of W+O1 and a pixel height of H+O2.
5. The method for detecting defects in weld seams of new energy battery terminals according to claim 1, characterized in that, Step 3 also includes: for each battery terminal, if the calculated Euclidean distance is less than the set off-weld determination threshold, then taking the row and column coordinates of the maximum value in the convolution result as the center, the region in the binary image with a width equal to the pixel width W of the theoretical weld seam region of the corresponding battery terminal and a height equal to the pixel height H of the theoretical weld seam region of the corresponding battery terminal is taken as the precise weld seam region. The depth information of each point cloud data in the precise weld area of each battery terminal is filled into a matrix N of H rows and W columns, and then multiplied with the corresponding mask M. The result of the multiplication calculation is compared with the set explosion point depth judgment threshold K2, and then the comparison result is stored in the binary image I' of H rows and W columns. Traverse the point cloud data of the precise weld area row by row and column by column, and extract the depth information dZ from each point cloud data obtained during the traversal. ij Compare the depth information dZ of the point cloud data obtained by traversing with the set threshold K2 for determining the depth of the explosion point. ij If the value is greater than K2, then the gray value of the i-th row and j-th column in the binary image I' is 0. If the depth information dZ of the point cloud data obtained through traversal is... ij If K2 is less than or equal to K2, then the gray value of the i-th row and j-th column in the binary image I' is 255; Collect all connected regions in the binary image I' and calculate the pixel area s of each connected region. z The pixel area s of each connected region z Compare with the set threshold K3 for determining the explosion area, and retain s. z For a connected region ≥ K3, if s z If the number of connected regions ≥ K3 is greater than 0, then it is determined that there are explosion points within the precise weld area. Calculate the minimum depth information z in the point cloud data of each retained connected region. min With the corresponding position coordinates (x) ij ,y ij ), where the position coordinates (x ij ,y ij The coordinates of the explosion point are the corresponding locations of the battery terminal weld seams, and the depth of the explosion point is -z. min .
6. The method for detecting defects in weld seams of new energy battery terminals according to claim 5, characterized in that, Step 3 also includes: counting the number of elements q1 in the statistical matrix N that are greater than the set weld depth judgment threshold K4, and the number of elements q2 that are less than -K4; counting the number of elements Q with a value of 1 in the mask M corresponding to each battery terminal; calculating the weld area ratio R0 = (q1 + q2) / Q corresponding to each battery terminal; and comparing the weld area ratio calculation result with the set missing weld judgment threshold K5. If R0 ≤ K5, the corresponding battery terminal is judged to be missing weld, and the weld area ratio R0 of the missing battery terminal is obtained.
7. The method for detecting defects in weld seams of new energy battery terminals according to claim 6, characterized in that, Step 3 also includes: calculating the proportion of each battery terminal above the reference plane. The calculated ratio above the reference plane is compared with the set threshold K6 for determining a false weld. If R1≤K6, the corresponding battery terminal is determined to be a false weld, and the center coordinates of the false welded battery terminal and the ratio R1 above the reference plane are obtained. If R1>K6, and no explosion point is detected in the weld of the corresponding battery terminal, it is determined to be a qualified weld.
8. An electronic device, comprising a processor and a memory, wherein the memory stores program instructions that can be read and executed by the processor, characterized in that, When the program instructions are read and executed by the processor, steps 1-3 of the new energy battery electrode weld defect detection method according to any one of claims 1-7 are performed.
9. A storage medium storing program instructions, characterized in that, When the program instructions are read and run, steps 1-3 of the new energy battery electrode weld defect detection method according to any one of claims 1-7 are executed.
Citation Information
Patent Citations
3D Defect Detection Method and System for Top Sealing Welds of New Energy Cylindrical Batteries
CN115032200B
High-precision defect detection method and device for annular weld joint
CN114088738A
Welding defect detection method, device and system
CN114693633A