Battery cell detection method and system, electronic equipment and storage medium

By acquiring preliminary images of the battery cell and calculating the target observation angle, and combining a multi-axis motion mechanism and a dynamic detection path planning algorithm, the problems of accuracy and efficiency in battery cell detection are solved, enabling flexible and efficient detection of different defects.

CN122016879APending Publication Date: 2026-05-12YUANJIAN WIND POWER JIANGYINENVISION ENERGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YUANJIAN WIND POWER JIANGYINENVISION ENERGY CO LTD
Filing Date
2025-12-29
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Current cell testing solutions cannot balance testing accuracy and efficiency, and suffer from problems such as missed defects, limited functionality, limited testing range, and poor adaptability to unknown defects.

Method used

By acquiring a preliminary image of the battery cell at an initial angle, preliminary defect areas are identified and defect data is obtained. The target observation angle is calculated based on the defect data, and the target image of the battery cell at the target observation angle is obtained to determine whether the battery cell is qualified. Combined with a multi-axis precision motion mechanism and a dynamic detection path planning algorithm, dynamic angle adjustment is achieved.

Benefits of technology

It improves the accuracy and efficiency of cell testing, effectively identifies various defects, adapts to different defect levels and testing perspectives and angles, and enhances the flexibility and accuracy of testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122016879A_ABST
    Figure CN122016879A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of battery cell detection, and discloses a battery cell detection method and system, electronic equipment and a storage medium, and the battery cell detection method comprises the steps: obtaining a preliminary image of a battery cell at an initial angle; identifying a preliminary defect area in the preliminary image and acquiring defect data corresponding to the preliminary defect area; obtaining a target observation angle according to the defect data, and obtaining a target image of the battery cell at the target observation angle; and judging whether the battery cell is qualified or not through the initial image and the target image. According to the embodiment of the invention, the number and angle of the detection visual angles corresponding to the cells with different defect degrees are different, and the detection precision of the cells and the detection of the cells are both considered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of battery cell testing technology, and in particular to a battery cell testing method, system, electronic device and storage medium. Background Technology

[0002] Currently, the mainstream conventional method for inspecting battery cells is the fixed-angle inspection method, which involves installing the X-ray source and detector at a fixed, optimized angle. This method is specifically used to detect the overhang of the battery cell, i.e., the dimensional allowance of the negative electrode sheet exceeding the positive electrode sheet in the length and width directions. However, the fixed-angle inspection method has the problems of limited functionality and detection range, and has a very low detection rate for non-overhang defects, resulting in missed detections.

[0003] To address the problems of fixed-angle inspection solutions, current solutions include multi-station combined inspection, offline sampling inspection, and rotary inspection. Multi-station combined inspection involves deploying multiple X-ray inspection stations on the production line, each with a different fixed angle, responsible for detecting different types of defects. Offline sampling inspection, for some special defects, involves manually taking the cells to an offline, high-precision CT scanner with multi-angle adjustment capabilities for sampling inspection. However, it cannot achieve 100% online full inspection and can only serve as a supplementary analysis method, failing to effectively control batch quality issues during production. Rotary inspection solutions mostly involve simple modifications to the mechanical structure, resulting in poor actual inspection performance. Furthermore, some solutions limit operational flexibility and are unsuitable for inspecting large or irregularly shaped cells.

[0004] Therefore, current cell testing solutions cannot simultaneously achieve both testing accuracy and testing efficiency. Summary of the Invention

[0005] The purpose of this application is to provide a battery cell testing method, system, electronic device, and storage medium, thereby balancing battery cell testing accuracy and testing efficiency.

[0006] To address the aforementioned technical problems, embodiments of this application provide a battery cell testing method, comprising: acquiring a preliminary image of the battery cell at an initial angle; identifying a preliminary defect region in the preliminary image and acquiring defect data corresponding to the preliminary defect region; acquiring a target observation angle based on the defect data, and acquiring a target image of the battery cell at the target observation angle; and determining whether the battery cell is qualified based on the preliminary image and the target image.

[0007] An embodiment of this application also provides a battery cell testing system, including: an X-ray source, a battery cell carrier, a multi-axis precision motion mechanism, a flat panel detector, and a main controller; the multi-axis precision motion mechanism is used to drive the X-ray source or drive the battery cell carrier; the main controller is used to implement the above-described battery cell testing method.

[0008] Embodiments of this application also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the cell detection method as described above.

[0009] Embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described cell detection method.

[0010] In some embodiments, obtaining the target observation angle based on the defect data includes: constructing a covariance matrix based on the defect data; performing eigenvalue decomposition on the covariance matrix to obtain the defect principal direction vector; and obtaining the target observation angle based on the defect principal direction vector.

[0011] In some embodiments, obtaining the target observation angle based on the defect principal direction vector includes: matching the defect principal direction vector in a defect model library; if a match is found, searching for a corresponding first observation angle in the defect model library and using the first observation angle as the target observation angle; or, searching for a corresponding first observation angle in the defect model library and calculating a second observation angle based on the defect principal direction vector, using both the first and second observation angles as the target observation angle; if no match is found, calculating a second observation angle based on the defect principal direction vector and using the second observation angle as the target observation angle.

[0012] In some embodiments, the method further includes: when performing eigenvalue decomposition on the covariance matrix, obtaining a first eigenvalue and a second eigenvalue; obtaining an elongation rate based on the first eigenvalue and the second eigenvalue, and determining the defect type based on the elongation rate; the step of calculating the second observation angle based on the defect principal direction vector includes: when the defect type is a linear or elongated defect, using the normal direction of the defect principal direction vector as a first additional observation angle, and obtaining the second observation angle based on the first additional observation angle and the initial angle; when the defect type is a cluster, block, or diffuse defect, calculating the circumscribed rectangle of the smallest area surrounding the preliminary defect image, determining the first direction of the major axis and the second direction of the minor axis of the circumscribed rectangle, using the perpendicular direction of the first direction and the perpendicular direction of the second direction as two second additional observation angles, and obtaining two second observation angles based on the second additional observation angle and the initial angle.

[0013] In some embodiments, identifying preliminary defect regions in the preliminary image includes: calculating the average gray value and gray standard deviation of any pixel in the initial image within a neighborhood window; marking pixels that meet preset conditions as outliers; the preset conditions being: |I(p)-μ local |>k×σ local Where I(p) is the gray value of the pixel, μ_local is the average gray value of the pixel, σ_local is the gray standard deviation of the pixel, and k is the sensitivity coefficient; spatially continuous abnormal point clusters exceeding the preset area threshold are identified as the preliminary defect region.

[0014] In some embodiments, the sensitivity coefficient is obtained by: determining a first target coordinate point on a preset first ROC curve based on the target expected false alarm rate and / or expected detection rate, and determining the sensitivity coefficient based on the first target coordinate point; wherein each coordinate point of the first ROC curve is bound to a corresponding sensitivity coefficient; the preset area threshold is obtained by: determining a second target coordinate point on a preset second ROC curve based on the target expected false alarm rate and / or expected detection rate, and determining the preset area threshold based on the second target coordinate point; wherein each coordinate point of the second ROC curve is bound to a corresponding preset area threshold.

[0015] In some embodiments, identifying the preliminary defect region in the preliminary image includes: acquiring an edge map of the initial image; comparing the edge map with a pre-stored standard cell edge structure; identifying abnormal edge contours in the edge map; and identifying the abnormal edge contours as the preliminary defect region.

[0016] In some embodiments, before acquiring a preliminary image of the battery cell at an initial angle, the method further includes: determining a detection angle sequence based on the model of the battery cell, the detection angle sequence including at least one of the initial angles. The technical solution provided in this application has at least the following advantages: This application embodiment acquires a preliminary image of the battery cell at an initial angle, identifies preliminary defect areas in the preliminary image, and obtains defect data corresponding to the preliminary defect areas. Based on the defect data, a target observation angle is obtained. Thus, while identifying preliminary defect areas in the preliminary image, a new target observation angle is obtained based on the corresponding defect data to acquire a target image of the battery cell at the target observation angle and determine whether the battery cell is qualified. The new target observation angle is determined based on the preliminary defect areas of the battery cell at the initial angle, so that the number and angle of detection angles corresponding to battery cells with different defect levels are different, thus taking into account both the detection accuracy and the battery cell detection. Attached Figure Description

[0017] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0018] Figure 1 This is a schematic flowchart of a battery cell testing method according to an embodiment of this application; Figure 2 This is a schematic diagram of a battery cell testing system according to an embodiment of this application; Figure 3 This is a flowchart illustrating each sub-step of step 102; Figure 4 This is another flowchart illustrating the various sub-steps of step 102; Figure 5 This is a flowchart illustrating each sub-step of step 104; Figure 6 This is a flowchart illustrating each sub-step of step 1043; Figure 7 This is a structural block diagram of an electronic device according to another embodiment of this application. Detailed Implementation

[0019] As can be seen from the background technology, current cell testing solutions cannot simultaneously achieve both testing accuracy and cell testing performance.

[0020] Analysis and research have revealed the following shortcomings in current battery cell testing methods: 1. Insufficient inspection coverage leading to missed defects: The angles of the light tubes and detectors in existing X-ray inspection equipment are usually fixed, mainly used to inspect the alignment of the battery cell electrodes after winding. This diagonal inspection method cannot effectively detect internal defects (such as tab wrinkles, foreign objects, poor welding, etc.) that only appear on the main surface of the battery cell or at specific angles, leading to the risk of missed defects and affecting the final yield and safety of the battery.

[0021] 2. Limited detection functionality, unable to meet multi-task requirements: The single, fixed angle means that a single device can only perform one detection task. For different types of products or products requiring multiple defect detections, the production line has to configure multiple X-ray devices with different angles, or abandon some detection items, lacking flexibility and economy.

[0022] 3. The contradiction between detection efficiency and accuracy, and insufficient adaptability to unknown defects: Traditional X-ray inspection, whether using fixed angles or preset multi-angle scanning (such as the current production line solution), employs a fixed scanning path. This blind scanning mode presents a fundamental contradiction: to ensure coverage, a sufficient number of preset angles must be used, which significantly extends the inspection time for a single cell, reducing production line efficiency; conversely, reducing the number of angles for efficiency may miss defects that are only apparent at specific angles. Furthermore, for undefined, unknown morphological defects that occur incidentally during production, the fixed inspection sequence may fail to provide effective observation, resulting in poor adaptability.

[0023] To address the aforementioned technical problems, this application provides a battery cell testing method, comprising: acquiring a preliminary image of the battery cell at an initial angle; identifying a preliminary defect region in the preliminary image and acquiring defect data corresponding to the preliminary defect region; acquiring a target observation angle based on the defect data and acquiring a target image of the battery cell at the target observation angle; and determining whether the battery cell is qualified based on the preliminary image and the target image.

[0024] This application embodiment acquires a preliminary image of the battery cell at an initial angle, identifies preliminary defect areas in the preliminary image, and obtains defect data corresponding to the preliminary defect areas. Based on the defect data, a target observation angle is obtained. Thus, while identifying preliminary defect areas in the preliminary image, a new target observation angle is obtained based on the corresponding defect data to acquire a target image of the battery cell at the target observation angle and determine whether the battery cell is qualified. The new target observation angle is determined based on the preliminary defect areas of the battery cell at the initial angle, so that the number and angle of detection angles corresponding to battery cells with different defect levels are different, thus taking into account both the detection accuracy and the battery cell detection.

[0025] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the various embodiments of this application will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details have been provided in the various embodiments of this application to help readers better understand this application. However, the technical solutions claimed in this application can be implemented even without these technical details and various changes and modifications based on the following embodiments. The division of the various embodiments below is for the convenience of description and should not constitute any limitation on the specific implementation of this application. The various embodiments can be combined with and referenced by each other without contradiction.

[0026] One embodiment of this application relates to a battery cell testing method, the specific flowchart of which is shown below. Figure 1 As shown, the cell testing method of this application includes the following steps: Step 101: Obtain a preliminary image of the battery cell at the initial angle.

[0027] In this embodiment, a core multi-axis precision motion mechanism is added to the traditional X-ray equipment, and two major modules are added at the control level (i.e., the main controller): a preliminary defect identification module and a dynamic detection path planning algorithm module. Figure 2 The diagram shows the structure of a battery cell testing system. In terms of hardware, the system includes: an X-ray source, a battery cell carrier, a multi-axis precision motion mechanism, a flat panel detector (not shown), and an industrial computer or PLC (Programmable Logic Controller) as the main controller. The multi-axis precision motion mechanism can drive the X-ray source or the battery cell carrier to rotate. Figure 2 The placement of the multi-axis precision motion mechanism on the X-ray source is merely for illustrative purposes; in practical applications, the multi-axis precision motion mechanism can also be placed on the battery cell carrier. In this system, the X-ray source irradiates the battery cell located on the carrier with X-rays, and the flat panel detector converts the X-rays after they pass through the battery cell into a digital image, obtaining an image of the battery cell at the corresponding irradiation angle.

[0028] The execution subject of this application embodiment is the main controller, which can be an industrial computer or a PLC.

[0029] The main controller system has a pre-stored test formula database. Each cell product model corresponds to a formula. The formula defines the angle sequence (e.g., 0°, 45°, 90°) that the cell model needs to be tested, as well as the corresponding exposure time, tube voltage, tube current and other process parameters at each angle.

[0030] The initial angle in this embodiment is the sequence of angles that the battery cell needs to be tested as defined in the formula. Therefore, before step 101, i.e., obtaining a preliminary image of the battery cell at the initial angle, this embodiment further includes: determining a detection angle sequence based on the battery cell model, wherein the detection angle sequence includes at least one initial angle. If there are multiple initial angles, this embodiment obtains an initial image at each initial angle and performs subsequent operations such as suspected defect identification.

[0031] In this embodiment, after the battery cell enters the inspection station and is precisely positioned, the main controller obtains the battery cell model through MES (Manufacturing Execution System) or a barcode scanner. Based on the battery cell model, the main controller retrieves a basic inspection formula from the database. This formula may contain only one or two of the most efficient inspection angles (e.g., 0°, for inspecting overhangs). Then, the main controller drives a multi-axis motion mechanism to adjust the battery cell to the initial angle (e.g., 0°). The X-ray source completes the exposure imaging, obtaining a preliminary image of the battery cell at the initial angle. The preliminary image is transmitted to the main controller's preliminary defect identification module.

[0032] Step 102: Identify the preliminary defect areas in the preliminary image.

[0033] This application embodiment adds two major modules to the main controller's software layer: a preliminary defect identification module and a dynamic detection path planning algorithm module.

[0034] The preliminary defect identification module is embedded in the image analysis software of the main controller. After acquiring the preliminary image, the preliminary defect identification module does not make a final judgment of pass (OK) or fail (NG). Instead, it quickly extracts and analyzes the features of the image to identify the preliminary defect area, which can also be called the suspected defect area or the key quality control feature area.

[0035] The preliminary defect identification module can identify preliminary defect regions in the preliminary image in two ways: identification based on local intensity abrupt changes and identification based on structural and edge discontinuities.

[0036] The first method: Identification based on local intensity mutations.

[0037] like Figure 3 The diagram shown is a flowchart illustrating the various sub-steps of step 102. Step 102 in this embodiment includes the following sub-steps: Step 1021: Calculate the average gray value and gray standard deviation of any pixel in the initial image within the neighborhood window.

[0038] Step 1022: Mark pixels that meet the preset conditions as abnormal points.

[0039] The preset condition is: |I(p)-μ local |>k×σ local Where I(p) is the gray value of a pixel, μ_local is the average gray value of a pixel, σ_local is the standard deviation of gray values ​​of a pixel, and k is the sensitivity coefficient.

[0040] Step 1023: Identify spatially continuous clusters of abnormal points that exceed a preset area threshold as preliminary defect areas.

[0041] In the recognition method based on local intensity abrupt changes, for any pixel in the initial image, the average gray value μ_local and the gray standard deviation σ_local within its neighborhood window are calculated; when the gray value I(p) of a pixel satisfies the condition |I(p)-μ_local|>k When σ_local (where k is a preset sensitivity coefficient, for example, k=3), the pixel is marked as an anomaly; finally, a cluster of spatially continuous anomalies exceeding a preset area threshold is identified as a preliminary defect region, i.e., a suspected defect region.

[0042] To effectively control the false alarm rate and the false negative rate, this application introduces a cost-sensitive adjustable threshold mechanism, which can flexibly configure the sensitivity coefficient and the size of the preset area threshold.

[0043] The sensitivity coefficient is obtained as follows: a first target coordinate point is determined on a preset first ROC curve based on the target expected false alarm rate and / or expected detection rate, and the sensitivity coefficient is determined based on the first target coordinate point; wherein each coordinate point of the first ROC curve is bound to a corresponding sensitivity coefficient. The preset area threshold is obtained as follows: a second target coordinate point is determined on a preset second ROC curve based on the target expected false alarm rate and / or expected detection rate, and the preset area threshold is determined based on the second target coordinate point; wherein each coordinate point of the second ROC curve is bound to a corresponding preset area threshold.

[0044] The establishment of the first and second ROC curves is an offline calibration process. Simply put, the first ROC curve is generated by continuously changing the sensitivity coefficient k, and the second ROC curve is generated by continuously changing the area threshold. Determining the sensitivity coefficient k or the area threshold is essentially a reverse lookup table process. This mechanism will be explained in detail below.

[0045] First, define the following variables: K: Preset sensitivity coefficient (threshold variable). In identification based on local intensity abrupt changes, the judgment condition is: .

[0046] : The preset area threshold (threshold variable). That is, only when the number of abnormal point clusters exceeds this value will they be identified as defects.

[0047] D: The sample set used for offline calibration, which includes images known to be defective and defect-free.

[0048] TPR(k): True false positive rate, i.e., 1 - false negative rate.

[0049] FPR(k): False positive rate, i.e., false alarm rate.

[0050] Next comes the process of constructing the first ROC curve and the second ROC curve (forward calculation).

[0051] During the system debugging phase, the system iterates through a series of possible k values ​​(e.g., from 1.0 to 10.0, with a step size of 0.1), calculates the performance metric corresponding to each k value, and performs a test for each k value. Perform the test, using The sample set D was tested. The statistical results were then analyzed. That is, the number of defects that were correctly detected. That is, the number of good products that were mistakenly identified as defects, and thus the coordinate points are calculated. and This results in a set S of mapping relationships. These points (FPR, TPR) are plotted on a coordinate system to form the first ROC curve. Each point on the first ROC curve is bound to the specific coordinate used to generate it. value.

[0052] The second ROC curve is established in a similar way to the first ROC curve.

[0053] During the system debugging phase, the system will iterate through a series of possible area thresholds. Calculate each area threshold The corresponding performance metrics for each test Perform the test, using The sample set D was tested. The statistical results were then analyzed. That is, the number of defects that were correctly detected. That is, the number of good products that were mistakenly identified as defects, and thus the coordinate points are calculated. and This results in a set S of mapping relationships. These points (FPR, TPR) are plotted on a coordinate system to form a second ROC curve. Each point on the second ROC curve is bound to the specific coordinate system used to generate it. value.

[0054] Finally, in this embodiment of the application, the value of k can be determined based on the points on the first ROC curve, and the value can be determined based on the points on the second ROC curve. Value (reverse mapping).

[0055] When a point is selected on the first ROC curve based on the target expected false alarm rate and / or expected detection rate. In this case, the process of determining the value of k is not through geometric calculation, but through direct indexing. Assume a point is selected on the first ROC curve. ,in It is an acceptable false alarm rate. This is the expected detection rate. When a point is selected on the second ROC curve based on the target expected false alarm rate and / or expected detection rate... At that time, determine The process of determining the value is also a direct indexing. Assume a point is selected on the second ROC curve. ,in It is an acceptable false alarm rate. That is the expected detection rate.

[0056] This application embodiment can establish a multi-level operation strategy, that is, at least three operation modes can be preset based on the first ROC curve and the second ROC curve, for production line administrators to select as needed according to production tasks: 1. High-Efficiency Mode: Selects a point with a lower false alarm rate on the first and second ROC curves as the threshold. In this mode, the system is more conservative in judging suspected defects, letting go of some ambiguous anomalies, thereby minimizing unnecessary additional scans and ensuring the fastest production line cycle time. Suitable for large-scale, mature product production.

[0057] In high-efficiency mode, select points with low false alarm rates and set a maximum allowable false alarm rate. (For example, 0.5%), we get: , .

[0058] 2. Balanced Mode: Select the point on the first ROC curve and the second ROC curve where the combined FPR and FNR are optimal (e.g., the point closest to the top left corner). This is the standard factory default setting.

[0059] In the balanced mode scenario, The equilibrium mode selects the point closest to the top left corner on the first ROC curve. Mathematically, this finds the k value corresponding to the point with the smallest Euclidean distance from the ideal point (0,1). The system will automatically find the value that minimizes the value in the formula above. As the current running parameters.

[0060] In the balanced mode scenario, The equilibrium mode selects the point on the second ROC curve closest to the top left corner. Mathematically, this is to find the point with the smallest Euclidean distance from the ideal point (0,1). The system will automatically find the value that minimizes the formula above. As the current running parameters.

[0061] 3. Quality Priority Mode: This mode selects a point on the first or second ROC curve with an extremely low false negative rate as the threshold. In this mode, the system is highly sensitive and will perform additional scans to ensure a high defect detection rate. It is suitable for new product ramp-ups, process validation, or orders from customers with extremely high quality requirements.

[0062] In a quality-first scenario, select points with extremely low false negative rates and set an extremely high detection rate target. (For example, 99.9%), then: Here, a smaller k value results in greater sensitivity and a higher TPR; also: , here is set The smaller the value, the more sensitive it is, and the higher the TPR (Total Physical Rate).

[0063] In this way, the system gives the user control over false alarms and false alarms, allowing them to dynamically weigh time costs and quality risk costs, rather than being a fixed black box.

[0064] The second method is based on the identification of structural and edge discontinuities.

[0065] like Figure 4 The diagram shown is another flowchart illustrating the various sub-steps of step 102. Step 102 in this embodiment includes the following sub-steps: Step 102a: Obtain the edge map of the initial image.

[0066] Step 102b: Compare the edge map with the pre-stored standard cell edge structure, identify abnormal edge contours in the edge map, and identify the abnormal edge contours as preliminary defect areas.

[0067] In the identification based on structural and edge discontinuities, an edge detection algorithm is applied to the initial image to generate an edge map. The edge map is then compared with a pre-stored standard cell structure template to identify the locations where edges are missing, interrupted, or where abnormal edge contours appear in areas where edges are not allowed (such as inside the electrode). These locations are then identified as preliminary defect areas, i.e., suspected defect areas.

[0068] Step 103: Obtain the defect data corresponding to the preliminary defect area.

[0069] After identifying a preliminary defect region, the preliminary defect identification module in this embodiment acquires the corresponding defect data. This data includes at least the centroid coordinates (Xc, Yc) of the suspected defect in the preliminary image (e.g., a 0° angle image) and the set of pixels P = p1, p2, ..., pn constituting the defect. The preliminary defect identification module outputs the defect data to the subsequent dynamic detection path planning algorithm module.

[0070] Step 104: Obtain the target observation angle based on the defect data.

[0071] This application embodiment adds a dynamic detection path planning algorithm module to the main controller's software layer. The dynamic detection path planning algorithm module is the core technology enabling the entire system to leap from programmed scanning to intelligent detection. Its fundamental goal is to calculate in real time the optimal subsequent observation angle for characterizing the defect based on preliminary, low-cost scan information of suspected defects, thereby maximizing the defect detection rate and qualitative accuracy without sacrificing overall detection efficiency. In short, the projection of any three-dimensional object onto a two-dimensional plane is closely related to its observation angle. This is especially true for irregularly shaped internal defects (such as wrinkles, cracks, and foreign objects). Only when the X-ray beam's penetration direction has a large angle (ideally perpendicular) with the defect's main extension plane or extension direction can an image with the highest contrast and clearest outline be formed on the detector. The dynamic detection path planning algorithm module transforms this physical principle into a real-time executable mathematical model and computational logic.

[0072] The execution of the dynamic detection path planning algorithm module in this embodiment begins with the defect data output by the preliminary defect identification module. If the preliminary defect identification module does not output defect data, it means that there are no suspected defects in the current cell, that is, no suspected defect area or key feature area is found in the preliminary image. At this time, the dynamic detection path planning algorithm module does not need to add target observation angles. The main control only needs to make a final OK / NG judgment on the cell quality through the preliminary image and upload the detailed detection results (including all shooting angles and defect information) to the MES system. After the cell detection is completed, it flows out of the workstation.

[0073] like Figure 5 The diagram shown is a flowchart of each sub-step of step 104. Step 104, which involves obtaining the target observation angle based on the defect data, specifically includes the following sub-steps: Step 1041: Construct a covariance matrix based on the defect data.

[0074] To determine the geometric orientation of the initial defect region, the dynamic detection path planning algorithm module first needs to calculate the principal direction of the initial defect region in the two-dimensional image. Principal Component Analysis (PCA) can be used here. First, the coordinates of the defect pixel set P are constructed into a matrix X, and the covariance matrix C of X is calculated. X : ;in, It is the mean vector of the data points.

[0075] Step 1042: Perform eigenvalue decomposition on the covariance matrix to obtain the principal direction vector of the defect.

[0076] The dynamic detection path planning algorithm module detects the covariance matrix. Eigenvalue decomposition is performed to obtain the corresponding eigenvector e1. During eigenvalue decomposition, the first eigenvalue λ1 and the second eigenvalue λ2 can also be obtained. Eigenvector e1 represents the most dominant direction of the defect region's extension, i.e., the defect principal direction vector. The first eigenvalue λ1 and the second eigenvalue λ2 represent the degree of dispersion of the data in the principal and secondary directions, respectively. The angle of the defect principal direction vector in the image coordinate system is also considered. It can be calculated from its components: ,in, and These are the x and y components of the eigenvector e1, respectively.

[0077] Step 1043: Obtain the target observation angle based on the defect principal direction vector.

[0078] After obtaining the main direction vector of the defect, the dynamic detection path planning algorithm module obtains the target observation angle based on the main direction vector of the defect. The target observation angle is the newly added observation angle.

[0079] like Figure 6 The diagram shown is a flowchart of each sub-step of step 1043. Step 1043, which involves obtaining the target observation angle based on the defect principal direction vector, includes the following sub-steps: Step 10431: Determine whether the main direction vector of the defect matches the defect model library.

[0080] If a match is found, proceed to step 10432; otherwise, proceed to step 10433.

[0081] The dynamic detection path planning algorithm module matches the defect principal direction vector against the defect model library. If the defect principal direction vector is found in the defect model library, it indicates that the defect is a specific type with known morphological characteristics and can be imported into the defect model library for optimization. The defect model library is constructed by establishing standard models for common key defects (such as tab wrinkles, weld defects, and internal bubbles) through offline analysis or historical data. The models not only contain the morphological characteristics of the defects but also pre-store one or more sets of experimentally verified optimal observation angles.

[0082] Step 10432: Find the corresponding first observation angle in the defect model library and use the first observation angle as the target observation angle; or, find the corresponding first observation angle in the defect model library and calculate the second observation angle based on the defect principal direction vector, and use both the first observation angle and the second observation angle as the target observation angle.

[0083] Step 10433: Calculate the second observation angle based on the main direction vector of the defect, and use the second observation angle as the target observation angle.

[0084] The dynamic detection path planning algorithm module calculates the main direction vector of the defect. Then, its morphological features can be compared with models in the model library. If a match is successful: the system can prioritize using the preset expert angles in the model library, or combine the calculated angles with the angles recommended by the model library to generate a more comprehensive supplementary detection sequence (e.g., a calculated angle plus an expert angle). If no match is found: this indicates that it may be an unknown or atypical defect. In this case, the detection relies entirely on the target observation angles (including the second observation angle) calculated by real-time geometry. The calculation of target observation angles (including the second observation angle) by real-time geometry will be explained in detail later. This combination method enables the algorithm to not only deal with linear defects with regular morphology, but also to more accurately handle complex defect types with specific prior knowledge, further improving the intelligence and reliability of the detection.

[0085] The second observation angle for real-time geometric calculation will be explained in detail below.

[0086] The embodiments of this application further include: when performing eigenvalue decomposition on the covariance matrix, obtaining a first eigenvalue and a second eigenvalue; obtaining the elongation rate based on the first eigenvalue and the second eigenvalue, and determining the defect type based on the elongation rate.

[0087] The embodiments of this application consider the covariance matrix of the defective pixel set. After performing eigenvalue decomposition, we obtain two eigenvalues, namely the first eigenvalue. Second eigenvalue ,in These two eigenvalues ​​represent the degree of dispersion of the defect data in the primary and secondary directions, respectively. Therefore, embodiments of this application can define an elongation rate. : Meanwhile, this application embodiment sets an elongation threshold. ,For example, =3.

[0088] The specific implementation method of determining the defect type based on elongation in this application embodiment is as follows: the calculated elongation... With elongation threshold To make a comparison, if This indicates that the defect extends much further in the primary direction than in the secondary direction, and can be identified as a linear or elongated defect; if This indicates that the size of the defect is similar in all directions, and it can be identified as a cluster, block, or diffuse defect.

[0089] The embodiments of this application obtain the second observation angle (i.e., the target observation angle) in different ways depending on the type of defect.

[0090] If the defect is determined to be linear or elongated, the normal direction of the defect's principal direction vector can be used as the first additional observation angle, and the second observation angle can be obtained based on the first additional observation angle and the initial angle. That is, in the case of a linear or elongated defect, the normal direction of the defect's principal direction vector is used as the first additional observation angle, and the second observation angle is obtained based on the first additional observation angle and the initial angle.

[0091] According to the principles of geometric optics, the optimal observation angle should be such that the direction of the X-ray beam is perpendicular to the principal direction vector of the defect. This application's embodiments calculate the normal direction vector of the defect within the principal direction vector, and the angle of its normal direction... for: Assuming the initial scan is at an initial angle... (For example, The procedure is performed at 0°. To ensure the X-ray beam hits at the optimal angle, the angle the motion mechanism needs to rotate is _____. Therefore, the second observation angle generated by the dynamic detection path planning algorithm module for: In most cases, the initial angle = Therefore, the formula can be simplified to: .

[0092] If the defect is determined to be clumpy, blocky, or diffuse, the principal direction extracted by PCA is not very meaningful, and the dynamic detection path planning algorithm module automatically switches to the minimum bounding rectangle strategy. That is, when the defect type is clumpy, blocky, or diffuse, the bounding rectangle with the smallest area enclosing the initial defect image is calculated. The first direction of the major axis L and the second direction of the minor axis S of the bounding rectangle are determined. The perpendicular directions of the first and second directions are used as two second additional observation angles. These second additional observation angles are obtained based on the initial angle. The purpose of this is to ensure observation from the two widest and narrowest dimensions of the defect, because some internal defects (such as bubbles or foreign matter clusters) may have the greatest thickness in a specific projection direction, thus obtaining optimal contrast.

[0093] This application embodiment calculates the first direction of the major axis L. vertical direction for The second direction of the minor axis S vertical direction , Assuming the initial scan is at an initial angle... (For example, The procedure is performed at 0°. To ensure the X-ray beam hits at the optimal angle, the motion mechanism needs to rotate at two angles. , Therefore, the dynamic detection path planning algorithm module generates two second observation angles. They are respectively: , In most cases, the initial angle = Therefore, the formula can be simplified to: , .

[0094] In this embodiment, the target observation angle is the core output of the dynamic detection path planning algorithm module, and the target observation angle will be sent to the motion control system to perform additional scanning.

[0095] It should be noted that, in this embodiment of the application, a defect model library may not be required. That is, there is no need to match the defect principal direction vector with the defect model library. After obtaining the defect principal direction vector, the second observation angle can be directly calculated based on the defect principal direction vector. The second observation angle As the perspective for observing the target.

[0096] Step 105: Obtain the target image of the battery cell at the target observation angle.

[0097] Step 106: Determine whether the battery cell is qualified based on the preliminary image and the target image.

[0098] After the preliminary defect identification module in this embodiment identifies a suspected defect, it transmits its coordinates, dimensions, and other information to the dynamic detection path planning algorithm module. The dynamic additional angle generation algorithm module calculates one or more new target observation angles in real time based on the input information and generates a temporary detection angle sequence containing the new angles and corresponding exposure parameters. The main controller drives the multi-axis motion mechanism to adjust to the corresponding target observation angles one by one according to the temporary detection angle sequence generated by the algorithm for imaging and analysis. The main controller combines the preliminary image at the initial angle and the target images at all additional target observation angles to make a final OK / NG judgment on the cell quality and uploads the detailed inspection results (including all shooting angles and defect information) to the MES system. After the cell inspection is completed, it flows out of the workstation.

[0099] Another embodiment of this application relates to a battery cell testing system, such as... Figure 2 The diagram shows the structure of a battery cell testing system, which includes: an X-ray source, a battery cell carrier, a multi-axis precision motion mechanism, a flat panel detector (not shown), and a main controller. The multi-axis precision motion mechanism is used to drive the X-ray source or the battery cell carrier. Figure 2 The multi-axis precision motion mechanism is positioned on the X-ray source for illustrative purposes only; in practical applications, it can also be mounted on the battery cell carrier. The main controller is used to implement the aforementioned battery cell detection method. Specifically, the X-ray source irradiates the battery cell located on the battery cell carrier with X-rays, and the flat panel detector converts the X-rays after passing through the battery cell into a digital image to obtain an image of the battery cell at the corresponding irradiation angle.

[0100] This embodiment is a system embodiment corresponding to the above-described cell testing method. The relevant technical details mentioned in the above embodiment are still valid in this embodiment, and will not be repeated here to avoid repetition.

[0101] Another embodiment of this application relates to an electronic device, such as... Figure 7 The diagram shown is a structural block diagram of the electronic device of this embodiment. The electronic device includes at least one processor 201 and a memory 202 communicatively connected to the at least one processor 201. The memory 202 stores instructions that can be executed by the at least one processor 201. The instructions are executed by the at least one processor 201 to enable the at least one processor 201 to perform the cell detection method as described above.

[0102] The memory 202 and processor 201 are connected via a bus, which may include any number of interconnecting buses and bridges, connecting various circuits of one or more processors 201 and memory 202 together. The bus may also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by processor 201 is transmitted over a wireless medium via an antenna, which further receives data and transmits it to processor 201.

[0103] Processor 201 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory 202 can be used to store data used by processor 201 during operation.

[0104] Another embodiment of this application relates to a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the method embodiments described above.

[0105] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0106] Those skilled in the art will understand that the above embodiments are specific embodiments for implementing this application, and in practical applications, various changes can be made to them in form and detail without departing from the spirit and scope of this application.

Claims

1. A method for testing battery cells, characterized in that, include: Acquire a preliminary image of the battery cell at the initial angle; Identify the preliminary defect regions in the preliminary image and obtain the defect data corresponding to the preliminary defect regions; Based on the defect data, the target observation angle is obtained, and a target image of the battery cell is obtained at the target observation angle. The battery cell is judged to be qualified based on the preliminary image and the target image.

2. The cell testing method according to claim 1, characterized in that, The step of obtaining the target observation angle based on the defect data includes: Construct a covariance matrix based on the defect data; The covariance matrix is ​​decomposed into eigenvalues ​​to obtain the defect principal direction vector; The target observation angle is obtained based on the principal direction vector of the defect.

3. The cell testing method according to claim 2, characterized in that, The step of obtaining the target observation angle based on the principal direction vector of the defect includes: The main direction vector of the defect is matched in the defect model library; If a match is found, the corresponding first observation angle is searched in the defect model library and used as the target observation angle; or, the corresponding first observation angle is searched in the defect model library, and a second observation angle is calculated based on the defect main direction vector, and both the first observation angle and the second observation angle are used as the target observation angle. If there is a mismatch, a second observation angle is calculated based on the main direction vector of the defect, and the second observation angle is used as the target observation angle.

4. The cell testing method according to claim 3, characterized in that, The method further includes: When performing eigenvalue decomposition on the covariance matrix, a first eigenvalue and a second eigenvalue are also obtained; The elongation rate is obtained based on the first feature value and the second feature value, and the defect type is determined based on the elongation rate; The calculation of the second observation angle based on the principal direction vector of the defect includes: When the defect type is linear or elongated, the normal direction of the main direction vector of the defect is used as the first additional observation angle, and the second observation angle is obtained based on the first additional observation angle and the initial angle. When the defect type is a cluster, block, or diffuse defect, calculate the circumscribed rectangle of the smallest area surrounding the preliminary defect image, determine the first direction of the major axis and the second direction of the minor axis of the circumscribed rectangle, and use the perpendicular direction of the first direction and the perpendicular direction of the second direction as two second additional observation angles. Obtain two second observation angles based on the second additional observation angles and the initial angle.

5. The cell testing method according to claim 1, characterized in that, The identification of preliminary defect regions in the preliminary image includes: Calculate the average gray value and gray standard deviation of any pixel in the initial image within a neighborhood window; Pixels that meet the preset conditions are marked as outliers; the preset conditions are: |I(p)-μ local |>k×σ local Where I(p) is the gray value of the pixel, μ_local is the average gray value of the pixel, σ_local is the gray standard deviation of the pixel, and k is the sensitivity coefficient. A cluster of anomalous points that are spatially continuous and exceed a preset area threshold is identified as the preliminary defect region.

6. The cell testing method according to claim 5, characterized in that, The sensitivity coefficient is obtained as follows: A first target coordinate point is determined on a preset first ROC curve based on the target expected false alarm rate and / or expected detection rate, and the sensitivity coefficient is determined based on the first target coordinate point; wherein, each coordinate point of the first ROC curve is bound to the corresponding sensitivity coefficient; The preset area threshold is obtained as follows: A second target coordinate point is determined on a preset second ROC curve based on the target expected false alarm rate and / or expected detection rate, and the preset area threshold is determined based on the second target coordinate point; wherein each coordinate point of the second ROC curve is bound to the corresponding preset area threshold.

7. The cell testing method according to claim 1, characterized in that, The identification of preliminary defect regions in the preliminary image includes: Obtain the edge map of the initial image; The edge map is compared with the pre-stored standard cell edge structure, and abnormal edge contours are identified in the edge map. The abnormal edge contours are identified as the preliminary defect areas.

8. The cell testing method according to claim 1, characterized in that, Before acquiring a preliminary image of the battery cell at an initial angle, the process also includes: The detection angle sequence is determined according to the model of the battery cell, and the detection angle sequence includes at least one of the initial angles.

9. A battery cell testing system, characterized in that, include: X-ray source, battery carrier, multi-axis precision motion mechanism, flat panel detector, main controller; The multi-axis precision motion mechanism is used to drive the X-ray source or the battery cell carrier; the main controller is used to implement the battery cell detection method according to any one of claims 1 to 8.

10. An electronic device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the cell testing method as described in any one of claims 1 to 8.

11. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the cell detection method according to any one of claims 1 to 8.