An energy storage battery defect detection method and device based on internal and external cooperation, and a medium
Patent Information
- Application Number
- CN202611080470.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-20
- Publication Date
- 2026-11-03
AI Technical Summary
Existing technologies for battery defect detection suffer from slow detection rates and inaccurate results. In particular, they cannot effectively identify whether surface defects have extended inward to form through-type damage, and they cannot identify the risk of high-risk hidden defects that appear to be on a completely normal surface.
An energy storage battery defect detection method based on internal and external collaboration is adopted, which combines a multi-view polarimetric stereo imaging system and ultrasonic detection. A grayscale heat map is generated by a trained StyleGAN2 model and a logistic regression model to identify the defect area on the battery surface. Internal damage is analyzed by ultrasonic echo sequence analysis, and multi-threaded parallel processing is performed by dividing the data into blocks.
It improves the speed and accuracy of battery defect detection, effectively identifies whether surface defects extend inward and identifies hidden internal defects, and enables early warning and quality control of batteries.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of battery defect detection technology, and in particular to a method, device, and medium for detecting defects in energy storage batteries based on internal and external synergy. Background Technology
[0002] As a core component of electrochemical energy storage systems, the safety and reliability of energy storage batteries directly affect the operational safety of energy storage power stations. During the manufacturing process, batteries may develop surface defects such as scratches, dents, corrosion, and bulging, as well as hidden internal defects such as interlayer debonding of electrode sheets, microcracks in the casing, and internal gas generation. These defects may gradually expand during long-term cyclic use, eventually leading to safety accidents such as internal short circuits and thermal runaway. Therefore, comprehensive internal and external defect testing of batteries after manufacturing is a crucial step in achieving early warning of thermal runaway and quality control.
[0003] In existing technologies, surface inspection of batteries primarily employs a two-dimensional industrial camera with a ring light source to acquire images of the battery surface, followed by defect identification using traditional image processing algorithms. However, this method of inspecting the entire battery surface reduces the accuracy of defect detection. For internal battery inspection, existing technologies mainly utilize X-rays; however, using X-rays to inspect the entire battery reduces inspection efficiency and is not suitable for practical factory testing.
[0004] Furthermore, existing technologies often involve simple combinations of optical and ultrasonic testing, such as performing optical imaging and X-ray scanning sequentially at the same testing station. However, the two test results are output independently, lacking correlation analysis between internal and external defects based on physical failure mechanisms. Such solutions cannot determine whether surface defects have extended inward to form through-type damage, nor can they identify the risk of a completely normal surface but with high-risk hidden defects inside. This results in test conclusions that only meet appearance standards, making it difficult to achieve safety risk assessments for thermal runaway prevention.
[0005] Therefore, it is necessary to propose a defect detection method for energy storage batteries based on internal and external collaboration to solve the problems of slow detection rate and inaccurate detection results in the battery defect detection process, thereby improving the speed and accuracy of battery defect detection. Summary of the Invention
[0006] This invention provides a method, device, and medium for detecting defects in energy storage batteries based on internal and external synergy, which can improve the speed and accuracy of battery defect detection.
[0007] The first aspect of this invention discloses a defect detection method for energy storage batteries based on internal and external synergy, the method comprising: Acquire a battery surface image; input the battery surface image into a trained surface defect detection model to obtain defect detection results; based on the defect detection results, obtain the defect area and normal area of the battery surface; Based on the battery surface defect areas, a first dividing block and a second dividing block are determined; the first dividing block is the block corresponding to the smallest defect area among all the battery surface defect areas, and all the second dividing blocks constitute all areas of the battery surface except for all the first dividing blocks. A one-way echo sequence is obtained; the one-way echo sequence is obtained by emitting positive-phase or negative-phase ultrasonic waves to all the second partition blocks; based on the one-way echo sequence, the echo peak difference and echo attenuation rate difference are obtained; based on the echo peak difference and echo attenuation rate difference, the battery damage area is determined; based on all the second partition blocks corresponding to the battery damage area, a third partition block is determined; the third partition block is the same size as the first partition block. Obtain the superimposed echo sequence; the superimposed echo sequence is obtained by emitting positive-phase ultrasonic waves and negative-phase ultrasonic waves to all the first partition blocks and all the third partition blocks; the battery damage result is obtained based on the superimposed echo sequence.
[0008] As an optional implementation, in the first aspect of the invention, the surface defect detection model is trained in the following manner: Acquire training battery images; the training battery images are obtained through a multi-view polarimetric stereo imaging system, which includes an area array camera, several ring-distributed obliquely incident LED light sources, and switchable linear polarizers. The battery surface image is processed using a photometric stereo algorithm to obtain a three-channel image; the three-channel image includes an intensity map, a normal map, and a depth map; The StyleGAN2 model is trained using the three-channel image to obtain a trained StyleGAN2 model; the trained StyleGAN2 model is used to generate a three-channel image of the surface of the battery under test. Based on the trained StyleGAN2 model, a surface defect detection model is obtained.
[0009] As an optional implementation, in the first aspect of the present invention, obtaining the surface defect detection model based on the trained StyleGAN2 model includes: Obtain a reconstructed three-channel image; the reconstructed three-channel image is obtained by inputting the training three-channel image into the trained StyleGAN2 model. The training three-channel image is calculated from the training battery surface image, which includes a normal battery surface image and a defective battery surface image marked with a defect mask. Based on the training three-channel image and the reconstructed three-channel image, a three-channel image residual is obtained; the three-channel image residual includes an intensity map residual, a normal map residual, and a depth map residual. The preset logistic regression model is trained using the residual of the three-channel image and the defect mark mask of the defective battery surface image to obtain the trained logistic regression model; the logistic regression model is used to generate grayscale heatmaps of defective locations. Based on the trained logistic regression model, a surface defect detection model is obtained.
[0010] As an optional implementation, in the first aspect of the invention, determining the second dividing block based on the battery surface defect region includes: The defective area on the battery surface is covered and marked with several of the first dividing blocks to obtain the first marked area; Based on the normal area of the battery surface, the first marked area is subtracted to obtain the second marked area; The second marked region is divided according to a preset division standard to obtain several second division blocks.
[0011] As an optional implementation, in the first aspect of the present invention, obtaining the echo peak difference and the echo attenuation rate difference based on the unidirectional echo sequence includes: Based on the unidirectional echo sequence, the effective peak value is obtained; based on the effective peak value, the echo peak interval and echo peak attenuation rate are obtained; based on the echo peak interval and the preset reference peak interval, the echo peak difference is obtained; based on the echo peak attenuation rate and the preset reference peak attenuation rate, the echo attenuation rate difference is obtained. And, determining the battery damage area based on the difference between the echo peak values and the difference between the echo attenuation rates includes: When it is determined that the difference between adjacent echo peak values is greater than a preset peak value difference threshold, or when it is determined that the difference in echo attenuation rate is greater than a preset attenuation rate difference threshold, the battery damage area is determined.
[0012] As an optional implementation, in the first aspect of the present invention, obtaining the battery damage result based on the superimposed echo sequence includes: The superimposed echo sequence is subjected to Fourier transform to obtain an echo spectrum; the fundamental amplitude and harmonic amplitude are obtained from the echo spectrum; nonlinear coefficients are obtained from the fundamental amplitude and the harmonic amplitude; and the first internal damage result corresponding to the first partition block and the second internal damage result corresponding to the third partition block are determined from the nonlinear coefficients. Based on all the first internal damage results and all the second internal damage results, the battery damage results are obtained.
[0013] As an optional implementation, in a first aspect of the present invention, obtaining the battery damage result based on the first internal damage result and the second internal damage result includes: When it is determined that the first internal damage result is damage, and / or the second internal damage result is damage, the battery is marked as unqualified; When the existence of the first partition block is determined, and all the first internal damage results and all the second internal damage results are normal, the battery is marked for further testing.
[0014] A second aspect of this invention discloses a defect detection device for energy storage batteries based on internal and external synergy, the device comprising: A surface detection module is used to acquire images of the battery surface; input the battery surface images into a trained surface defect detection model to obtain defect detection results; and based on the defect detection results, obtain the defect area and normal area of the battery surface. The region determination module is used to determine a first partition block and a second partition block based on the battery surface defect region; the first partition block is the block corresponding to the smallest defect region among all the battery surface defect regions, and all the second partition blocks constitute all regions of the battery surface except for all the first partition blocks; A damage determination module is used to acquire a unidirectional echo sequence; the unidirectional echo sequence is obtained by emitting positive-phase or negative-phase ultrasonic waves to all second partitioned blocks; based on the unidirectional echo sequence, the echo peak difference and echo attenuation rate difference are obtained; based on the echo peak difference and echo attenuation rate difference, the battery damage area is determined; based on all second partitioned blocks corresponding to the battery damage area, a third partitioned block is determined; the third partitioned block is the same size as the first partitioned block; The result determination module is used to obtain the superimposed echo sequence; the superimposed echo sequence is obtained by transmitting positive-phase ultrasonic waves and negative-phase ultrasonic waves to all the first partition blocks and all the third partition blocks; the battery damage result is obtained based on the superimposed echo sequence.
[0015] As an optional implementation, in a second aspect of the invention, the surface defect detection model is trained in the following manner: Acquire training battery images; the training battery images are obtained through a multi-view polarimetric stereo imaging system, which includes an area array camera, several ring-distributed obliquely incident LED light sources, and switchable linear polarizers. The battery surface image is processed using a photometric stereo algorithm to obtain a three-channel image; the three-channel image includes an intensity map, a normal map, and a depth map; The StyleGAN2 model is trained using the three-channel image to obtain a trained StyleGAN2 model; the trained StyleGAN2 model is used to generate a three-channel image of the surface of the battery under test. Based on the trained StyleGAN2 model, a surface defect detection model is obtained.
[0016] As an optional implementation, in a second aspect of the invention, obtaining a surface defect detection model based on the trained StyleGAN2 model includes: Obtain a reconstructed three-channel image; the reconstructed three-channel image is obtained by inputting the training three-channel image into the trained StyleGAN2 model. The training three-channel image is calculated from the training battery surface image, which includes a normal battery surface image and a defective battery surface image marked with a defect mask. Based on the training three-channel image and the reconstructed three-channel image, a three-channel image residual is obtained; the three-channel image residual includes an intensity map residual, a normal map residual, and a depth map residual. The preset logistic regression model is trained using the residual of the three-channel image and the defect mark mask of the defective battery surface image to obtain the trained logistic regression model; the logistic regression model is used to generate grayscale heatmaps of defective locations. Based on the trained logistic regression model, a surface defect detection model is obtained.
[0017] As an optional implementation, in a second aspect of the invention, the region determination module determines a second dividing block based on the battery surface defect region, including: The defective area on the battery surface is covered and marked with several of the first dividing blocks to obtain the first marked area; Based on the normal area of the battery surface, the first marked area is subtracted to obtain the second marked area; The second marked region is divided according to a preset division standard to obtain several second division blocks.
[0018] As an optional implementation, in a second aspect of the invention, the damage determination module obtains the echo peak difference and the echo attenuation rate difference based on the unidirectional echo sequence, including: Based on the unidirectional echo sequence, the effective peak value is obtained; based on the effective peak value, the echo peak interval and echo peak attenuation rate are obtained; based on the echo peak interval and the preset reference peak interval, the echo peak difference is obtained; based on the echo peak attenuation rate and the preset reference peak attenuation rate, the echo attenuation rate difference is obtained. Furthermore, the damage determination module determines the battery damage area based on the difference between the echo peak values and the difference between the echo attenuation rates, including: When it is determined that the difference between adjacent echo peak values is greater than a preset peak value difference threshold, or when it is determined that the difference in echo attenuation rate is greater than a preset attenuation rate difference threshold, the battery damage area is determined.
[0019] As an optional implementation, in a second aspect of the invention, the result determination module obtains the battery damage result based on the superimposed echo sequence, including: The superimposed echo sequence is subjected to Fourier transform to obtain an echo spectrum; the fundamental amplitude and harmonic amplitude are obtained from the echo spectrum; nonlinear coefficients are obtained from the fundamental amplitude and the harmonic amplitude; and the first internal damage result corresponding to the first partition block and the second internal damage result corresponding to the third partition block are determined from the nonlinear coefficients. Based on all the first internal damage results and all the second internal damage results, the battery damage results are obtained.
[0020] As an optional implementation, in a second aspect of the invention, the result determination module obtains a battery damage result based on the first internal damage result and the second internal damage result, including: When it is determined that the first internal damage result is damage, and / or the second internal damage result is damage, the battery is marked as unqualified; When the existence of the first partition block is determined, and all the first internal damage results and all the second internal damage results are normal, the battery is marked for further testing.
[0021] A third aspect of the present invention discloses an apparatus comprising a memory and a processor, the apparatus comprising: Memory containing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute some or all of the steps in the energy storage battery defect detection method based on internal and external coordination as described in any of the first aspects of the present invention.
[0022] The fourth aspect of the present invention discloses a computer storage medium storing computer instructions, which, when invoked by a processor, are used to execute the energy storage battery defect detection method based on internal and external coordination as disclosed in any of the first aspects of the present invention.
[0023] Compared with the prior art, the present invention has the following beneficial effects: By acquiring images of the battery surface and inputting them into a trained surface defect detection model, defect detection results are obtained, leading to the identification of defective and normal areas on the battery surface. Based on the defective areas, a first and second partitioning block are determined. A unidirectional echo sequence is acquired, and the difference in echo peak value and echo attenuation rate is obtained to determine a third partitioning block. Then, a superimposed echo sequence is acquired, and based on the first, second, and third partitioning blocks, the battery damage result is obtained. The surface defect detection model identifies the defective and normal areas of the battery surface. The smallest defective area is then covered by the first partitioning block, followed by the complete coverage of all remaining defective areas. Finally, the normal areas are covered by the second partitioning block. By using the same partitioning blocks for coverage, ultrasonic detection of the defective areas can be performed, allowing for multi-threaded parallel and distributed processing of the detection data, improving the detection rate. For the first partitioning block identifying the defective areas, bidirectional ultrasonic waves are used for precise detection, improving detection accuracy. For the second division of the normal surface area, a single ultrasonic wave is used for preliminary inspection to find areas that may be defective, which are then designated as the third division. This improves the inspection speed and avoids the need for precise calculations using bidirectional ultrasonic waves for all blocks, reducing resource waste. Subsequently, bidirectional ultrasonic waves are used to inspect the third division to confirm the inspection results, improving the accuracy of the inspection. Finally, the battery damage result is determined. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is a flowchart illustrating a defect detection method for energy storage batteries based on internal and external collaboration disclosed in an embodiment of the present invention. Figure 2This is a schematic diagram of the structure of an energy storage battery defect detection device based on internal and external coordination, as disclosed in an embodiment of the present invention. Figure 3 This is a schematic diagram of the structure of a device including a memory and a processor disclosed in an embodiment of the present invention. Detailed Implementation
[0026] To enable those skilled in the art to better understand the present invention, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0027] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or end that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or ends.
[0028] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0029] This invention discloses a method, apparatus, and medium for detecting defects in energy storage batteries based on internal and external synergy, which improves the speed and accuracy of battery defect detection. These are described in detail below.
[0030] Example 1 Please see Figure 1 , Figure 1 This is a schematic flowchart of a defect detection method for energy storage batteries based on internal and external coordination, as disclosed in an embodiment of the present invention. Wherein, Figure 1 The described internal and external collaborative energy storage battery defect detection method can be applied to an internal and external collaborative energy storage battery defect detection device. This device can be integrated into a cloud server or a local server; the embodiments of this invention are not limited thereto. Figure 1As shown, the energy storage battery defect detection method based on internal and external collaboration can include the following operations: Step 101: Obtain a battery surface image; input the battery surface image into the trained surface defect detection model to obtain the defect detection results; based on the defect detection results, obtain the defect area and normal area of the battery surface.
[0031] In this embodiment of the invention, the battery surface image can be an image of the entire surface of the energy storage battery. The battery surface image can be obtained through a multi-view polarimetric stereoscopic imaging system. The multi-view polarimetric stereoscopic imaging system can include a high-resolution area array camera, four sets of ring-distributed obliquely incident LED light sources, and linear polarizers. The four sets of light sources are lit sequentially at different times, and four polarization intensity images under different illumination angles are captured in a single detection. The connection method can be that the four sets of LED light sources are respectively connected to a multi-channel light source controller through power supply lines. The light source controller receives synchronization signals from the camera or control computer through trigger lines. The light source controller is connected to the control computer through communication lines to receive time-division lighting commands. The linear polarizer is installed at the front end of the camera lens and is a fixed structural component. The light source end polarizer is installed at the light outlet of each set of LED light sources and is mechanically fixed to the light source.
[0032] For example, the control computer sends instructions to the LED light source controller to set the time-division lighting sequence and pulse width; the light source controller lights up the first group of LEDs and simultaneously sends a trigger signal to the camera, which exposes and captures the first polarization image, which is then transmitted to the control computer; the light source controller turns off the first group of LEDs and lights up the second group of LEDs, simultaneously triggering the camera to expose and capture the second polarization image, and repeats this process until all four groups of light sources are complete; at the end of a single detection, the control computer obtains four polarization intensity images under different illumination angles.
[0033] The polarizer of the multi-view polarized photometric stereo imaging system can filter the specular reflection of the aluminum shell and blue film surface, retain the diffuse reflection component, and eliminate reflective false defects and missed detections. By using the photometric stereo method to calculate the surface normal vector and micro-depth map of each pixel, it can identify weak morphological defects such as shallow scratches, micro-pits, early corrosion pits, and slight bulging.
[0034] In this embodiment of the invention, the initial training model architecture of the surface defect detection model can be a StyleGAN2 model and a logistic regression model. The training process can be as follows: first, a large number of normal, defect-free battery surface images are acquired, and then processed using a photometric stereo algorithm to obtain three-channel images. As those skilled in the art will understand, the photometric stereo algorithm is a three-dimensional surface reconstruction technique based on illumination changes to obtain the three-dimensional structural information of the object's surface. The StyleGAN2 model is then trained using the three-channel images. After the StyleGAN2 model is trained, it can accurately output the three-channel images of the battery surface. Next, a large number of images, including normal battery surface images and defective battery surface images with defects marked, are processed to obtain training three-channel images. These training three-channel images are then input into the trained StyleGAN2 model to obtain a large number of reconstructed three-channel images. The reconstructed three-channel images and the training three-channel images are compared and calculated to obtain the three-channel image residuals. Finally, the three-channel image residuals and the defect mark mask of the defective battery surface images are used to train the logistic regression model to obtain a trained logistic regression model. The output of the trained logistic regression model is a grayscale heatmap of the defect location. Finally, the trained StyleGAN2 model and the logistic regression model are combined to obtain the surface defect detection model.
[0035] In this embodiment of the invention, the defect detection result can be: generating a grayscale heatmap of the defect location; and obtaining a black-and-white binary mask by performing a global threshold binarization algorithm or a local adaptive threshold algorithm on the grayscale heatmap. The specific algorithm is not limited in this embodiment of the invention. In the black-and-white binary mask, the white area is the defect area on the battery surface, and the black area is the normal area on the battery surface.
[0036] Step 102: Determine the first and second division blocks based on the defect areas on the battery surface.
[0037] In this embodiment of the invention, the first dividing block is the block corresponding to the smallest defect area among all battery surface defect areas, and all second dividing blocks constitute all areas of the battery surface except for all first dividing blocks.
[0038] In this embodiment of the invention, the first partition block can be a square or a rectangle. The process of determining the first partition block can involve performing connected component analysis on the white area of the black-and-white binary mask to extract the pixel-level contour of the defect; finding the maximum span of the contour in the horizontal and vertical directions, or calculating its minimum bounding rectangle; the long and short sides of the bounding rectangle are the major and minor axes (in pixels) of the defect; converting the pixel size into the actual physical size according to the calibration parameters of the imaging system (e.g., how many micrometers each pixel corresponds to); then enclosing the smallest pixel-level contour in the white area with a minimum square and marking it as the first partition block; covering the remaining white areas larger than the smallest pixel-level contour with different first partition blocks. The area of the second partition block can be an integer multiple of the area of the first partition block, and the second partition block can also be a rectangle; in this case, the second partition block can be covered by several first partition blocks.
[0039] By performing precise internal detection on the internal region corresponding to the smallest pixel-level contour, the accuracy of detection is improved. Simultaneously, to prevent the remaining defect areas from being too large, which would decrease detection accuracy and computational efficiency, this embodiment of the invention uses the smallest defect area as a benchmark to determine the first partitioning block, improving the accuracy of local detection. The remaining defect areas are then covered and partitioned using several first partitioning blocks. Since all first partitioning blocks have the same area, and the remaining defect areas are all covered by first partitioning blocks, parallel computation can be performed, significantly improving computational efficiency while ensuring accuracy. Using the smallest bounding square of the smallest defect as the benchmark size of the partitioning block ensures that the smallest defect is completely contained within a single partitioning block, and that the defect features have a reasonable proportion within the block, preventing dilution by a large background area. This avoids the problem of small defect features being submerged or missed in large partitions, specifically improving the recognition accuracy of the most difficult-to-detect defects such as micro-scratches, micro-dimples, and pinholes on the battery surface. Based on the defect connectivity contour, block coverage is performed, ensuring that a single complete defect falls within the same block as much as possible. This avoids the recognition distortion caused by random cutting of defects and feature breakage across blocks under uniform grid partitioning, thus guaranteeing the integrity of the defect morphology and improving the accuracy of subsequent internal battery detection. All first-level blocks are of uniform size, naturally adapting to various parallel computing architectures such as GPU batch inference, multi-threaded parallelism, and distributed processing. There is no scheduling overhead or redundant calculation for padding of blocks of different sizes, and the utilization rate of parallel computing power can approach the theoretical peak. Using the outer dimension of the smallest defect as the sole benchmark for block partitioning, the most stringent accuracy for detecting tiny defects is guaranteed through the smallest granularity of partitioning, while avoiding the problem of a surge in the number of blocks and an exponential increase in computing power overhead caused by blindly reducing the block size. This achieves an optimal balance between detection accuracy and processing speed.
[0040] Furthermore, if the defective area is completely covered by the first partition block, the remaining normal area may not be completely covered by the second partition block. In this case, the covering principle is to first cover the area around the first partition block with the second partition block, and then continue to cover the remaining areas that cannot be completely covered by the second partition block by overlaying the second partition block, so as to ensure that all areas are covered.
[0041] Step 103: Obtain the unidirectional echo sequence; based on the unidirectional echo sequence, obtain the echo peak difference and echo attenuation rate difference; based on the echo peak difference and echo attenuation rate difference, determine the battery damage area; based on all the second partitions corresponding to the battery damage area, determine the third partition.
[0042] In this embodiment of the invention, the energy storage cell is a layered structure with alternating stacked electrodes and separators. Under normal conditions, when an ultrasonic pulse penetrates the cell, each interface generates a regular reflected echo, and the overall echo sequence exhibits a stable periodicity with equal intervals and exponential decay. When defects such as significant interlayer debonding, shell cracks, or localized gas generation occur internally, this periodicity is disrupted, resulting in abnormally raised echo peaks, abrupt changes in the interval between adjacent echoes, or jumps in amplitude attenuation rate. The algorithm can quickly determine whether there are significant internal defects in a region simply by verifying the periodic consistency of the echo sequence. Therefore, for large areas with completely normal surface inspection, the core requirement is speed—the ability to quickly identify significant internal defects without missing high-risk large defects—without requiring precise quantitative analysis of micro-destructive processes. Based on this, a single positive-phase or negative-phase ultrasonic wave is emitted to the normal surface area, i.e., the second partitioned area, for rapid detection.
[0043] In this embodiment of the invention, the unidirectional echo sequence can be obtained by transmitting positive-phase or negative-phase ultrasonic waves to all second-divided blocks. The echo peak difference and echo attenuation rate difference can be obtained by identifying all valid peaks in the unidirectional echo sequence, calculating the time interval between adjacent peaks, and then calculating the deviation between the time interval between adjacent peaks and a preset reference peak interval to obtain the echo peak difference; calculating the amplitude attenuation ratio of adjacent peaks to obtain the echo peak attenuation rate, and subtracting the echo peak attenuation rate from the preset reference peak attenuation rate to obtain the echo attenuation rate difference. The preset reference peak interval and preset reference peak attenuation rate can be obtained by pre-collecting standard echo sequences of healthy cells of the same model, extracting and solidifying two core reference parameters, calculating the standard time difference between the echo peaks of two adjacent electrode layers (i.e., the reference peak interval); and pre-collecting the amplitude attenuation ratio of healthy cells of the same model under normal stacking structure for each deeper layer (i.e., the reference peak attenuation rate).
[0044] An effective peak value can meet the following criteria: 1. The peak value must exceed a preset minimum amplitude line, which can be 10% or 20% of the maximum peak value. Fluctuations below this line are ignored, thus filtering out electronic noise at the bottom and small burrs caused by material grain scattering. 2. The width of the peak bottom must be within a reasonable range. Ultrasonic pulses themselves have a certain time width, and true interface reflection peaks have a corresponding width. Electromagnetic interference or random noise is often a very narrow, sharp pulse, which can be identified and eliminated by width. For example, a reasonable range for the width is that in a 10MHz ultrasonic testing system, the period is 1 / T, or 100 nanoseconds. Assuming 2-3 cycles are emitted, the reasonable range for the width of the peak bottom is usually a multiple of the period, between 200 and 300 nanoseconds. To improve fault tolerance, the reasonable range is increased to 2-4 cycles, or between 200 and 400 nanoseconds. 3. A complete echo pulse should consist of a peak and a trough. Only when a corresponding trough is detected after the peak can the verification be passed, ensuring that the complete periodic characteristics of the alternating sound pressure signal are captured, rather than a unilaterally drifting DC component or baseline fluctuation.
[0045] In this embodiment of the invention, the determination of the battery damage area can be achieved by emitting ultrasonic waves into the second segment and performing calculations. When it is determined that the difference between adjacent echo peak values is greater than a preset peak difference threshold, or when it is determined that the difference in echo attenuation rate is greater than a preset attenuation rate difference threshold, the second segment is determined as the battery damage area. The preset peak difference threshold can be 5%, 6%, or 7% of the reference peak interval, etc., and the preset attenuation rate difference threshold can be 0.05, 0.06, 0.1, etc.
[0046] In this embodiment of the invention, the third dividing block can be determined by dividing the second dividing block into several first dividing blocks after determining that a certain second dividing block is suspicious. The first dividing block used for this division is the third dividing block. This is to divide the second dividing block that may have internal problems into several first dividing blocks. In order to distinguish it from the first dividing block with defective positions, the first dividing block with normal surface is named the third dividing block.
[0047] Step 104: Obtain the superimposed echo sequence; based on the superimposed echo sequence, obtain the battery damage results.
[0048] In this embodiment of the invention, the superimposed echo sequence can be obtained by a focused piezoelectric transducer emitting positive-phase and negative-phase ultrasonic waves to all first and third partition blocks.
[0049] The specific process can be as follows: The device generates the first electrical pulse signal (positive-phase ultrasound). This electrical pulse signal is a waveform that first moves upward (positive voltage) and then downward (negative voltage), and is a narrow-band pulse at a specific frequency (around 5MHz). When the sound wave encounters an interface with different acoustic impedance (such as a normal interlayer interface, an air gap at a defect, or a crack surface), some of the energy is reflected back. The probe receives the reflected echo, obtains a positive-phase ultrasound echo, and converts it back into the first electrical signal. The first electrical signal includes a first linear fundamental wave component and a first nonlinear harmonic component. The first linear fundamental wave refers to the normal reflection signal generated by all intact interlayer interfaces. Its frequency is consistent with the emitted ultrasound, and its amplitude is large, reflecting the normal structure of the battery. The first nonlinear harmonic refers to the high-order harmonics (such as the second harmonic of 10MHz and the third harmonic of 15MHz) that are not originally present in the area through which the sound wave passes if there are defects such as microcracks or microdebonding. These defects will cause the sound wave to be distorted, generating high-order harmonics (such as the second harmonic of 10MHz and the third harmonic of 15MHz) that are not originally present. This component is very weak and is completely covered by the strong signal of the fundamental wave.
[0050] The device generates a second electrical pulse signal (negative-phase ultrasound). This second electrical pulse signal is a waveform that first moves downwards (negative voltage) and then upwards (positive voltage). This transmitted waveform is completely opposite to the first one: where it previously moved upwards, it now moves downwards first; where it previously moved downwards, it now moves upwards first. This is the "negative-phase pulse." Apart from this, the frequency, amplitude, and pulse width are exactly the same. The probe receives the reflected echo, obtaining a negative-phase ultrasound echo, which is converted back into a second electrical signal. The second electrical signal includes a second linear fundamental wave component and a second nonlinear harmonic component. Because the transmitted waveform is completely inverted, the linear reflected echo is also completely inverted. Therefore, the second linear fundamental wave is equal in magnitude and opposite in direction to the first linear fundamental wave. However, the nonlinear distortion caused by the defect does not follow the inversion rule. The harmonics generated by positive-phase excitation and the harmonics generated by negative-phase excitation are in phase and do not reverse. Therefore, the first and second nonlinear harmonics are the same in magnitude and direction.
[0051] Finally, the first and second electrical signals are superimposed and averaged to obtain a purified signal containing almost only nonlinear harmonic components. The harmonic signal intensity originally generated by the defect might have been only one ten-thousandth of the fundamental frequency, completely drowned out; now, by allowing the fundamental frequency to self-cancel, the "background light" is extinguished, and the previously invisible faint fluorescence becomes clearly visible. Amplifying the defective waveform by eliminating the normal waveform is something traditional filtering algorithms cannot achieve, because it does not damage the defective signal itself and even increases the intensity of the harmonics generated by the defect.
[0052] In this embodiment of the invention, the battery damage result can be obtained by performing a Fourier transform on the superimposed echo sequence to obtain a spectrum, and then calculating the nonlinear coefficient based on the spectrum. The nonlinear coefficient is only related to the degree of damage to the material itself, thus reflecting the internal damage of the battery. A low nonlinear coefficient value indicates that the material is linearly pure and the sound wave propagation is almost undistorted; a high nonlinear coefficient value indicates that there are a large number of micro-interfaces (micro-crack surfaces, debonding gaps) inside the material. These interfaces repeatedly open and close under the action of sound waves, producing strong nonlinear distortion. After knowing the internal damage result of the battery, it is compared with the location of surface defects to obtain the battery damage result. The battery loss result can be determined as follows: if the first internal damage result corresponding to the first partition block is determined to be damaged, or if the second internal damage result corresponding to the third partition block is determined to be damaged, the battery is marked as unqualified; if the first partition block is determined to exist, and all the first internal damage results corresponding to the first partition block and all the second internal damage results corresponding to the third partition block are normal, the battery is marked for further testing; only when the battery surface is normal and there is no internal damage is the battery marked as normal. Simply put, a battery is considered normal only if its surface is normal and there is no damage inside; if there is damage inside the battery, the battery is unusable and needs to be returned to the factory; if there are defects on the surface but the inside of the battery is normal, the battery needs to be marked for further testing.
[0053] As can be seen, in this embodiment of the invention, by acquiring a battery surface image and inputting it into a trained surface defect detection model, defect detection results are obtained, leading to the identification of battery surface defect areas and normal battery surface areas. Based on the battery surface defect areas, a first and second partitioning block are determined. A unidirectional echo sequence is acquired to obtain the echo peak difference and echo attenuation rate difference, thereby determining a third partitioning block. Then, a superimposed echo sequence is acquired, and based on the first, second, and third partitioning blocks, the battery damage result is obtained. The surface defect detection model obtains battery surface defect areas and normal battery surface areas. Then, the smallest defect area is covered by the first partitioning block, and then all remaining defect areas are covered by the first partitioning block. Finally, the normal battery surface areas are covered by the second partitioning block. By covering with the same partitioning block, ultrasonic detection of the defect areas can be performed, allowing for multi-threaded parallel and distributed processing of the detection data, improving the detection rate. For the first partitioning block that determines the defect areas, bidirectional ultrasonic waves are used for precise detection, improving detection accuracy. For the second division of the normal surface area, a single ultrasonic wave is used for preliminary inspection to find areas that may be defective, which are then designated as the third division. This improves the inspection speed and avoids the need for precise calculations using bidirectional ultrasonic waves for all blocks, reducing resource waste. Subsequently, bidirectional ultrasonic waves are used to inspect the third division to confirm the inspection results, improving the accuracy of the inspection. Finally, the battery damage result is determined.
[0054] In an optional embodiment, the surface defect detection model is trained in the following manner: Obtain training battery images; The training battery images are processed using a photometric stereo algorithm to obtain three-channel images; the three-channel images include an intensity map, a normal map, and a depth map. The StyleGAN2 model is trained using three-channel images to obtain a trained StyleGAN2 model; the trained StyleGAN2 model is then used to generate three-channel images of the surface of the battery under test. Based on the trained StyleGAN2 model, a surface defect detection model is obtained.
[0055] In this optional embodiment, the training battery images can be obtained using a multi-view polarimetric stereo imaging system, which includes an area array camera, several ring-shaped obliquely incident LED light sources, and switchable linear polarizers. The obtained training battery images are all confirmed to be images of normal battery surfaces without defects. Images obtained through the multi-view polarimetric stereo imaging system can better reflect defects on the battery surface.
[0056] In this optional embodiment, the intensity map can reflect the material properties of the object's surface itself, showing color and texture, and indicating whether there are blue film scratches on the battery surface. The normal map shows that the color encodes the three-dimensional orientation in the physical world, revealing slight bulges and smooth indentations at chamfers on the battery surface; these defects are very shallow, but their surface orientation changes continuously; they are not obvious in direct photographs, but the color transitions in the normal map will be abnormal. The depth map can be a grayscale image, highlighting geometric defects such as pinholes, deep scratches, indentations, and corrosion pits. Training the StyleGAN2 model with three-channel images can improve the model's accuracy in identifying battery surface defects.
[0057] The specific training process can be as follows: Defect-free training battery images are processed to obtain three-channel images. Each image contains a surface intensity map, a normal map, and a depth map. These three images are concatenated along the channel dimension to form a multi-channel tensor. A batch of real, normal images is randomly selected from the training battery image set, and a batch of latent vectors are randomly generated and fed into the generator of the StyleGAN2 model to obtain a batch of generated images. The real and generated images are then fed into the discriminator of the StyleGAN2 model, and the discriminator loss is calculated. The discriminator should be able to correctly distinguish between real and generated images. Afterward, backpropagation is performed to update the discriminator weights, maximizing the discriminator's ability to distinguish between real and fake images.
[0058] A batch of new latent vectors is randomly generated and fed into the generator to obtain a batch of generated images. These generated images are then fed into the discriminator to obtain its judgment results, and the generator loss is calculated. Backpropagation is performed, updating only the generator weights (the discriminator is frozen during this step), generating increasingly realistic images until the discriminator cannot distinguish between them. Training continues, allowing the generator to continuously improve its generation quality and the discriminator to continuously improve its discrimination ability. Training converges when the discriminator's probability of judging both real and generated images approaches 0.5 (i.e., it cannot distinguish between real and fake images). The trained generator network structure and weights are completely saved; the discriminator is only used to supervise the generator during training and is discarded after training. The generator weights are permanently frozen and not updated during deployment, resulting in the trained StyleGAN2 model. At this point, the StyleGAN2 model can accurately output three-channel images of the battery surface. A logistic regression model is then trained to obtain the surface defect detection model.
[0059] Training using a three-channel image can output a three-channel image of the test image; this training method only requires normal samples, solving the industry pain point of scarce defect samples; by learning from complete images of healthy surfaces, it has the ability to detect unknown defects in a general way; latent vector optimization generates pixel-aligned, dedicated health control images, eliminating false alarms caused by normal process fluctuations; training once and using it for a long time supports rapid deployment on new production lines. At the same time, it also provides an accurate training dataset for subsequent training of logistic regression models.
[0060] As can be seen, in this optional embodiment, in order to better identify battery surface defects, this application acquires high-quality battery images for training by establishing a multi-view polarization photometric stereo imaging system, processes the training battery images through a photometric stereo algorithm to obtain three-channel images, and uses the three-channel images to train the StyleGAN2 model to obtain a trained StyleGAN2 model. The input training image used to train the StyleGAN2 model is not a regular RGB image, but a three-channel combination of intensity image, normal image, and micro-depth image. By learning from complete images of healthy surfaces, a general detection capability for unknown defects is obtained, improving the accuracy of the model in identifying battery surface defects.
[0061] In another optional embodiment, the surface defect detection model obtained based on the trained StyleGAN2 model may include: Obtain the reconstructed three-channel image; Based on the training three-channel image and the reconstructed three-channel image, the three-channel image residual is obtained; The pre-set logistic regression model is trained using the residual of the three-channel image and the defect mark mask map of the defective battery surface image. The trained logistic regression model is then used to generate grayscale heatmaps of the defective locations. Based on the trained logistic regression model, a surface defect detection model is obtained.
[0062] In this optional embodiment, the reconstructed three-channel image is obtained by inputting the training three-channel image into the trained StyleGAN2 model. The training three-channel image is calculated from the training battery surface image, which includes a normal battery surface image and a defective battery surface image marked with a defect mask.
[0063] In this optional embodiment, intensity residual, depth residual, and normal residual are calculated pixel by pixel for the training three-channel image and the reconstructed three-channel image to obtain the three-channel image residual; then, a defect marking mask is obtained based on the defect battery surface image marked with a defect mask; in this defect marking mask, defect pixels can be marked as 1 and normal pixels can be marked as 0.
[0064] In this optional embodiment, the logistic regression model is trained using the three-channel image residuals and defect marker masks. The specific training process can be as follows: Randomly initialize four parameters:
[0065] The training formula is:
[0066]
[0067] In the above formula, These are the weighting parameters corresponding to the strength residuals. These are the weighting parameters corresponding to the depth residual. These are the parameters corresponding to the normal residual. The intercept parameter is used to adjust the baseline for outlier scores. For strength residual, For deep residuals, For normal residual, For residual fusion scores, The model predicts anomaly scores. Ideally, the score S for defective pixels should be close to 1, and the score S for normal pixels should be close to 0.
[0068] Then, the gradient loss is calculated using the cross-entropy loss function, and the gradient descent algorithm is used to adjust the gradient loss. The four parameters are updated in reverse. Training is repeated iteratively until the gradient loss no longer decreases, at which point training is complete, resulting in a trained logistic regression model. This trained logistic regression model outputs a grayscale heatmap composed of all pixel scores, where the heatmap marks the defect locations.
[0069] By using three-channel residuals, the accuracy of the model in identifying and labeling defect locations can be improved. This is because micro-pits may appear as a blurry shadow on the intensity map, but exhibit extremely strong signals in the depth and normal residuals; shallow scratches show almost no signal on the depth map, but the texture interruption is clearly visible in the intensity residual. This multi-dimensional fusion enables the stable detection of weak-shape defects, improving the model's detection and recognition accuracy. Finally, the trained StyleGAN2 model and the trained logistic regression model are combined to form a trained surface defect detection model.
[0070] As can be seen, in this optional embodiment, the logistic regression model is trained by using the difference between the reconstructed three-channel image and the trained three-channel image, and the defect label mask with defect markings, to obtain a trained logistic regression model that can directly output a grayscale heatmap with defect markings; by using the difference between the three-channel images, the accuracy of the logistic regression model in identifying and labeling defects can be improved.
[0071] In yet another optional embodiment, the second partitioning block is determined based on the battery surface defect region, including: The defective areas on the battery surface are covered and marked with several first dividing blocks to obtain the first marked area; Based on the normal area of the battery surface, the first marked area is subtracted to obtain the second marked area; The second marked region is divided according to a preset division standard to obtain several second division blocks.
[0072] In this optional embodiment, to improve the computational speed, the defective region is covered and marked with several first partition blocks. When the defective region is covered by all the first partition blocks, since the size of the first partition blocks is completely uniform, it naturally adapts to various parallel computing architectures such as GPU batch inference, multi-threaded parallelism, and distributed processing. There is no scheduling overhead or padding for redundant computation due to blocks of different sizes, and the utilization rate of parallel computing power can be significantly improved. Simultaneously, the remaining normal region is divided using second partition blocks. The division process can be as follows: first, determine the first marked region after all the first partition blocks have been covered and marked; then, subtract the first marked region from the normal region of the battery surface to obtain the second marked region; the second marked region is then divided according to a preset division standard to obtain several second partition blocks. The preset division standard can be determined by an integer multiple of the area of the first partition block; for example, if the area of the first partition block is A, then the preset division standard could be 4*A, or 8*A, etc., with different multiples determined based on different battery surface areas.
[0073] As can be seen, in this optional embodiment, by dividing the normal surface area of the battery into larger blocks, the system can perform parallel calculations simultaneously and quickly determine whether there are defects inside the normal surface area, thereby improving the calculation speed; and by determining the interior of the normal surface area, the problematic second block is then divided into a third block, and bidirectional ultrasonic testing is performed simultaneously with the first block, thereby improving the accuracy of the detection.
[0074] In yet another optional embodiment, the difference between echo peak values and the difference between echo attenuation rates are obtained based on the unidirectional echo sequence, including: Based on the unidirectional echo sequence, the effective peak value is obtained; based on the effective peak value, the echo peak interval and echo peak attenuation rate are obtained; based on the echo peak interval and the preset reference peak interval, the echo peak difference is obtained; based on the echo peak attenuation rate and the preset reference peak attenuation rate, the echo attenuation rate difference is obtained. Furthermore, based on the difference in echo peak value and the difference in echo attenuation rate, the battery damage area is determined, including: When it is determined that the difference between adjacent echo peak values is greater than a preset peak value difference threshold, or when it is determined that the difference in echo attenuation rate is greater than a preset attenuation rate difference threshold, the battery damage area is identified.
[0075] In this optional embodiment, the effective peak value can be: 1. The peak value must exceed a preset minimum amplitude line, which can be 10% or 20% of the maximum peak value. Fluctuations below this line are ignored, thus filtering out electronic noise at the bottom and small burrs caused by material grain scattering. 2. The width of the peak bottom must be within a reasonable range. Ultrasonic pulses themselves have a certain time width, and true interface reflection peaks have a corresponding width. Electromagnetic interference or random noise is often a very narrow, sharp pulse, which can be identified and eliminated by width. For example, a reasonable range of width is that in a 10MHz ultrasonic detection system, the period is 1 / T, which is 100 nanoseconds. Assuming 2 to 3 cycles are emitted, the reasonable range of the peak bottom width is usually a multiple of the period, between 200 and 300 nanoseconds. To improve fault tolerance, the reasonable range is increased to 2 to 4 cycles, which is between 200 and 400 nanoseconds. 3. A complete echo pulse should consist of a peak and a trough. Only when a corresponding trough is detected after the peak can the verification be passed, ensuring that the complete periodic characteristics of the alternating sound pressure signal are captured, rather than a unilaterally drifting DC component or baseline fluctuation.
[0076] In this optional embodiment, the echo peak interval can be: identifying all valid peaks in the unidirectional echo sequence and calculating the time interval between adjacent peaks; the echo peak attenuation rate can be: calculating the amplitude attenuation ratio of adjacent peaks.
[0077] The echo peak difference can be calculated by comparing the echo peak interval with the preset reference peak interval; while the preset reference peak interval can be calculated by collecting the standard echo sequence of the same type of healthy battery cell in advance, extracting two core reference parameters and fixing them, and calculating the standard time difference of the echo peaks of two adjacent electrode layers.
[0078] The return attenuation rate difference can be the difference between the return peak attenuation rate and the preset reference peak attenuation rate; and the preset reference peak attenuation rate can be the amplitude attenuation ratio of healthy cells of the same model under normal stacking structure, which is the reference peak attenuation rate.
[0079] In this optional embodiment, the determination of the battery damage area can be achieved by emitting ultrasonic waves to the second segment and performing calculations. If it is determined that the difference between adjacent echo peak values is greater than a preset peak difference threshold, or if it is determined that the difference in echo attenuation rate is greater than a preset attenuation rate difference threshold, then the second segment is determined as the battery damage area. The preset peak difference threshold can be 5%, 6%, or 7% of the reference peak interval, etc., and the preset attenuation rate difference threshold can be 0.05, 0.06, 0.1, etc.
[0080] Because the internal structure of an energy storage cell consists of alternating layers of electrodes and separators, when ultrasonic waves penetrate, they are reflected at each interface, forming an echo peak. Under normal, defect-free conditions, the electrode thickness is uniform, the spacing between each layer is fixed, and the echo peaks are evenly arranged on the time axis. With each deeper layer, the sound wave energy is lost at a fixed ratio, and the echo amplitude decreases exponentially with each layer. The envelope shape of the entire echo sequence is highly consistent with that of a healthy cell of the same model. When significant internal defects occur, the propagation path and reflection behavior of sound waves will change abruptly. For example, when interlayer debonding occurs: a thin air layer appears between the electrode and the diaphragm. When sound waves encounter the air layer, almost all of them are reflected, and the subsequent echoes become drastically weaker or even disappear. At the same time, the air layer changes the sound path, and the time interval of subsequent echoes will also shift. When local gas generation occurs: bubbles or air cavities are generated inside the cell. When sound waves pass through the gas, the attenuation is minimal, resulting in an abnormally strong echo amplitude at that point, and the attenuation pattern is broken. When internal cracks occur in the casing: the crack surface will reflect additional sound waves, inserting an abnormal echo peak between the normal echo sequences and disrupting the equidistant pattern.
[0081] By calculating the difference between the peak echo values and the difference between the echo attenuation rates, as well as the set threshold values for the peak difference and the attenuation rate difference, it is possible to determine whether there are defects in the internal area of the battery.
[0082] As can be seen, in this optional embodiment, by transmitting and receiving a one-way echo sequence, and by performing calculations on the one-way echo sequence, it is possible to quickly identify whether there are defects in the internal regions of the battery in the second partition block, thereby improving the identification rate of defective regions. By using the fast-identifying one-way echo to calculate the normal areas on the battery surface, areas where defects may occur are determined. These areas are then divided into third partition blocks of the same size as the first partition block. Finally, bidirectional echo detection calculations are performed on the first and third partition blocks, which not only improves the calculation rate but also enhances the accuracy of identification.
[0083] In yet another optional embodiment, the battery damage result is obtained based on the superimposed echo sequence, including: The superimposed echo sequence is subjected to Fourier transform to obtain the echo spectrum; the fundamental amplitude and harmonic amplitude are obtained from the echo spectrum; the nonlinear coefficients are obtained from the fundamental amplitude and harmonic amplitude; the first internal damage result corresponding to the first partition block and the second internal damage result corresponding to the third partition block are determined from the nonlinear coefficients. Based on all the first internal damage results and all the second internal damage results, the battery damage results are obtained.
[0084] In this optional embodiment, those skilled in the art will understand that the Fourier transform is a mathematical tool for signal analysis that can decompose signals in the time domain (time dimension) or spatial domain (position dimension) into a superposition of sine / cosine components with different frequencies, amplitudes, and phases, and output the frequency distribution characteristics of the signal.
[0085] In this optional embodiment, the horizontal axis of the echo spectrum is frequency, and the vertical axis is the amplitude of that frequency component. The fundamental amplitude and harmonic amplitude are read from the echo spectrum. For example, if the center frequency of the emitted ultrasonic wave is 5MHz, there will be a small residual peak at 5MHz in the echo spectrum. This is the fundamental wave that was not completely canceled out, and the resulting value is the fundamental amplitude. At 10MHz (exactly twice 5MHz), there will be a peak; this is the second harmonic, or harmonic amplitude. ; through formula Calculate the nonlinear coefficients, where, These are nonlinear coefficients.
[0086] In the nonlinear ultrasonic theory of materials, the harmonic amplitude of the second harmonic is... and fundamental wave amplitude It is proportional to the square of, that is Therefore, the nonlinear parameters of the material This is how it is calculated. The value is only related to the degree of damage to the material itself, and is not related to external factors such as transmission power and coupling conditions; A low value indicates that the material is linearly pure and that the sound wave propagation is almost undistorted. A high value indicates the presence of numerous micro-interfaces (microcrack surfaces, debonding gaps) within the material. These interfaces repeatedly open and close under the influence of sound waves, resulting in strong nonlinear distortion.
[0087] Furthermore, linear characteristics are directly read from the original positive-phase ultrasonic echoes. These linear characteristics include echo amplitude, sound wave flight time, and sound wave attenuation coefficient. Echo amplitude refers to the maximum amplitude of each echo; the amplitude of reflections from normal interfaces is stable, but it attenuates significantly when encountering large defects. Sound wave flight time refers to the delay from emission to reception of a particular echo. The depth and location of the defect can be calculated based on the speed of sound. If the sound wave's path is longer due to bypassing a large defect, the flight time will be abnormal. The sound wave attenuation coefficient refers to the rate at which the energy of a sound wave gradually decreases as it propagates through a material; internal damage to the material leads to increased scattering attenuation.
[0088] At this point, the judgment of the battery's internal test results can be: when The value is 20% higher than the healthy baseline (the statistical average of this location in normal batteries from the same batch); simultaneously, the echo amplitude, sound wave flight time, and sound wave attenuation coefficient are normal in the linear characteristics; therefore, it can be considered that there is early damage inside the battery at this location. Because the linear characteristics are normal, it indicates that macroscopic gaps, delamination, or large cracks have not yet formed, and sound waves can pass through normally; traditional ultrasound would show "no abnormalities." However, The increase in volume indicates that the sound waves encountered numerous micrometer- and nanometer-scale mechanical interfaces along their path. These interfaces repeatedly opened and closed under the influence of the sound waves, revealing early, diffuse microscopic damage within the material.
[0089] when The value increases significantly (usually well over 20%), and the linear characteristics are also obviously abnormal. Specifically, the abnormality is manifested as a significant decrease in echo amplitude (sound waves are blocked), abnormal sound wave flight time (sound wave detour path changes), or the appearance of abnormal echoes; this indicates that the damage inside the battery is very serious. Because the nonlinear distortion is extremely strong and has formed a physical discontinuity at the macroscopic scale, it can directly block or reflect sound waves.
[0090] when If the value is within the normal fluctuation range of the healthy baseline and all linear characteristics are normal, it indicates that the battery is internally intact.
[0091] In this optional embodiment, the breathing effect of microcracks or weak interfaces distorts the acoustic waveform, exciting higher harmonics (such as second and third harmonics) that were not originally present. By using a phase reversal method to cancel the linear fundamental wave and purify and amplify the nonlinear harmonics, the signals of these early micro-defects can be effectively separated from the strong background noise, improving the accuracy of detection.
[0092] Existing nonlinear ultrasonic testing techniques typically employ digital signal processing methods such as bandpass filters or wavelet transforms to attempt to separate weak higher-order harmonics from the received signal. However, the harmonic energy generated by micro-defects is usually several orders of magnitude lower than the fundamental frequency. Digital filtering, limited by the filter's cutoff characteristics and spectral leakage, struggles to completely separate harmonic signals immediately adjacent to the fundamental frequency, resulting in limited signal-to-noise ratio (SNR) improvement. This solution employs a physical-level signal cancellation strategy: positive and negative pulses with completely opposite phases are emitted sequentially to the same detection point, and the two echoes are superimposed. The linearly propagating fundamental component is precisely canceled out due to its opposite phase, while the nonlinear harmonic components are completely preserved unaffected by phase reversal. This is equivalent to "physically eliminating" the strongest interference source during the signal acquisition stage, rather than relying on "algorithmic filtering" in post-processing. The SNR improvement far surpasses traditional filtering methods, enabling the reliable extraction of even extremely weak nonlinear signals.
[0093] Traditional ultrasonic defect evaluation relies heavily on the relative changes in echo amplitude, making it difficult to quantify defect severity, especially in the micro-defect stage where amplitude changes are minimal, failing to provide effective quantitative criteria. This proposed method uses a nonlinear coefficient to determine the severity, normalizing the second harmonic amplitude to the square of the fundamental amplitude. This eliminates the influence of excitation power fluctuations and directly reflects the nonlinearity of the material itself. Higher micro-defect density and stronger interfacial contact nonlinearity result in a larger β value, forming a continuous quantitative index positively correlated with defect severity.
[0094] As can be seen, by calculating the superimposed echo sequence, the echo spectrum is obtained; the fundamental amplitude and harmonic amplitude are obtained from the echo spectrum, and the nonlinear coefficient is further calculated to determine the damage result inside the battery; the nonlinear coefficient calculated by the nonlinear ultrasonic theory of materials can improve the accuracy of detecting internal damage of the battery.
[0095] In yet another optional embodiment, the battery damage result is obtained based on the first internal damage result and the second internal damage result, including: When a first internal damage is determined to be a damage, and / or a second internal damage is determined to be a damage, the battery is marked as unqualified. When a first segmentation block is identified, and all first internal damage results and all second internal damage results are normal, the battery is marked for further testing.
[0096] In this optional embodiment, a battery will be marked as unqualified whenever internal damage is detected. If the surface is defective but the internal structure is normal, the battery will be marked for further testing to see if it can continue to be used. When it is determined that there are no first and third dividing blocks, and all first and second internal damage results are normal, the battery will be marked as normal.
[0097] As can be seen, in this optional embodiment, the usability of the battery is determined by comparing surface and internal damage, thereby improving the rationality of battery planning and deployment.
[0098] Example 2 Please see Figure 2 , Figure 2 This is a schematic diagram of the structure of an energy storage battery defect detection device based on internal and external coordination, as disclosed in an embodiment of the present invention. Figure 2 As shown, the device may include: The surface detection module 201 is used to acquire battery surface images; input the battery surface images into a trained surface defect detection model to obtain defect detection results; and obtain the defect area and normal area of the battery surface based on the defect detection results. The region determination module 202 is used to determine a first partition block and a second partition block based on the battery surface defect region; the first partition block is the block corresponding to the smallest defect region among all battery surface defect regions, and all second partition blocks constitute all regions of the battery surface except for all first partition blocks; The damage determination module 203 is used to acquire a unidirectional echo sequence; the unidirectional echo sequence is obtained by transmitting positive-phase or negative-phase ultrasonic waves to all second partition blocks; based on the unidirectional echo sequence, the echo peak difference and echo attenuation rate difference are obtained; based on the echo peak difference and echo attenuation rate difference, the battery damage area is determined; based on all second partition blocks corresponding to the battery damage area, a third partition block is determined; the third partition block has the same size as the first partition block. The result determination module 204 is used to obtain the superimposed echo sequence; the superimposed echo sequence is obtained by transmitting positive-phase ultrasonic waves and negative-phase ultrasonic waves to all first partition blocks and all third partition blocks; the battery damage result is obtained based on the superimposed echo sequence.
[0099] As can be seen, in this embodiment of the invention, by acquiring a battery surface image and inputting it into a trained surface defect detection model, defect detection results are obtained, leading to the identification of battery surface defect areas and normal battery surface areas. Based on the battery surface defect areas, a first and second partitioning block are determined. A unidirectional echo sequence is acquired to obtain the echo peak difference and echo attenuation rate difference, thereby determining a third partitioning block. Then, a superimposed echo sequence is acquired, and based on the first, second, and third partitioning blocks, the battery damage result is obtained. The surface defect detection model obtains battery surface defect areas and normal battery surface areas. The smallest defect area is then covered by the first partitioning block, and all remaining defect areas are covered by the first partitioning block. Finally, the normal battery surface areas are covered by the second partitioning block. By covering with the same partitioning block, ultrasonic detection of the defect areas can be performed, allowing for multi-threaded parallel and distributed processing of the detection data, improving the detection rate. For the first partitioning block that determines the defect areas, bidirectional ultrasonic waves are used for precise detection, improving detection accuracy. For the second division of the normal surface area, a single ultrasonic wave is used for preliminary inspection to find areas that may be defective, which are then designated as the third division. This improves the inspection speed and avoids the need for precise calculations using bidirectional ultrasonic waves for all blocks, reducing resource waste. Subsequently, bidirectional ultrasonic waves are used to inspect the third division to confirm the inspection results, improving the accuracy of the inspection. Finally, the battery damage result is determined.
[0100] Example 3 Please see Figure 3 , Figure 3 This is a schematic diagram of a device including a memory and a processor, as disclosed in an embodiment of the present invention. Figure 3 As shown, the device including memory and processor may include: Memory 301 storing executable program code; Processor 302 coupled to memory 301; The processor 302 calls the executable program code stored in the memory 301 to execute some or all of the steps in any of the energy storage battery defect detection methods based on internal and external coordination in Embodiment 1 of the present invention.
[0101] Example 4 This invention discloses a computer storage medium storing computer instructions. When these computer instructions are invoked, they are used to execute some or all of the steps in any of the energy storage battery defect detection methods based on internal and external coordination disclosed in Embodiment 1 of this invention.
[0102] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0103] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that various implementation methods can be achieved by means of software plus necessary general-purpose hardware platforms, and of course, they can also be achieved by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0104] Finally, it should be noted that the above embodiments are merely preferred embodiments of the present invention and are only used to illustrate the technical solutions of the present invention, not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting defects in energy storage batteries based on internal and external collaboration, characterized in that, The method includes: Acquire a battery surface image; input the battery surface image into a trained surface defect detection model to obtain defect detection results; based on the defect detection results, obtain the defect area and normal area of the battery surface; Based on the battery surface defect areas, a first dividing block and a second dividing block are determined; the first dividing block is the block corresponding to the smallest defect area among all the battery surface defect areas, and all the second dividing blocks constitute all areas of the battery surface except for all the first dividing blocks. A one-way echo sequence is obtained; the one-way echo sequence is obtained by emitting positive-phase or negative-phase ultrasonic waves to all the second partition blocks; based on the one-way echo sequence, the echo peak difference and echo attenuation rate difference are obtained; based on the echo peak difference and echo attenuation rate difference, the battery damage area is determined; based on all the second partition blocks corresponding to the battery damage area, a third partition block is determined; the third partition block is the same size as the first partition block. Obtain the superimposed echo sequence; the superimposed echo sequence is obtained by emitting positive-phase ultrasonic waves and negative-phase ultrasonic waves to all the first partition blocks and all the third partition blocks; the battery damage result is obtained based on the superimposed echo sequence.
2. The method for detecting defects in energy storage batteries based on internal and external collaboration according to claim 1, characterized in that, The surface defect detection model was trained in the following way: Acquire training battery images; the training battery images are obtained through a multi-view polarimetric stereo imaging system, which includes an area array camera, several ring-distributed obliquely incident LED light sources, and switchable linear polarizers. The battery surface image is processed using a photometric stereo algorithm to obtain a three-channel image; the three-channel image includes an intensity map, a normal map, and a depth map; The StyleGAN2 model is trained using the three-channel image to obtain a trained StyleGAN2 model; the trained StyleGAN2 model is used to generate a three-channel image of the surface of the battery under test. Based on the trained StyleGAN2 model, a surface defect detection model is obtained.
3. The energy storage battery defect detection method based on internal and external coordination according to claim 2, characterized in that, The step of obtaining a surface defect detection model based on the trained StyleGAN2 model includes: Obtain a reconstructed three-channel image; the reconstructed three-channel image is obtained by inputting the training three-channel image into the trained StyleGAN2 model. The training three-channel image is calculated from the training battery surface image, which includes a normal battery surface image and a defective battery surface image marked with a defect mask. Based on the training three-channel image and the reconstructed three-channel image, a three-channel image residual is obtained; the three-channel image residual includes an intensity map residual, a normal map residual, and a depth map residual. The preset logistic regression model is trained using the residual of the three-channel image and the defect mark mask of the defective battery surface image to obtain the trained logistic regression model; the logistic regression model is used to generate grayscale heatmaps of defective locations. Based on the trained logistic regression model, a surface defect detection model is obtained.
4. The energy storage battery defect detection method based on internal and external coordination according to claim 3, characterized in that, The step of determining the second division block based on the battery surface defect region includes: The defective area on the battery surface is covered and marked with several of the first dividing blocks to obtain the first marked area; Based on the normal area of the battery surface, the first marked area is subtracted to obtain the second marked area; The second marked region is divided according to a preset division standard to obtain several second division blocks.
5. The energy storage battery defect detection method based on internal and external coordination according to claim 4, characterized in that, The step of obtaining the echo peak difference and echo attenuation rate difference based on the unidirectional echo sequence includes: Based on the unidirectional echo sequence, the effective peak value is obtained; based on the effective peak value, the echo peak interval and echo peak attenuation rate are obtained; based on the echo peak interval and the preset reference peak interval, the echo peak difference is obtained; based on the echo peak attenuation rate and the preset reference peak attenuation rate, the echo attenuation rate difference is obtained. And, determining the battery damage area based on the difference between the echo peak values and the difference between the echo attenuation rates includes: When it is determined that the difference between adjacent echo peak values is greater than a preset peak value difference threshold, or when it is determined that the difference in echo attenuation rate is greater than a preset attenuation rate difference threshold, the battery damage area is determined.
6. The energy storage battery defect detection method based on internal and external coordination according to claim 5, characterized in that, The process of obtaining battery damage results based on the superimposed echo sequence includes: The superimposed echo sequence is subjected to Fourier transform to obtain an echo spectrum; the fundamental amplitude and harmonic amplitude are obtained from the echo spectrum; nonlinear coefficients are obtained from the fundamental amplitude and the harmonic amplitude; and the first internal damage result corresponding to the first partition block and the second internal damage result corresponding to the third partition block are determined from the nonlinear coefficients. Based on all the first internal damage results and all the second internal damage results, the battery damage results are obtained.
7. The energy storage battery defect detection method based on internal and external synergy according to claim 6, characterized in that, The step of obtaining the battery damage result based on the first internal damage result and the second internal damage result includes: When it is determined that the first internal damage result is damage, and / or the second internal damage result is damage, the battery is marked as unqualified; When the existence of the first partition block is determined, and all the first internal damage results and all the second internal damage results are normal, the battery is marked for further testing.
8. A defect detection device for energy storage batteries based on internal and external coordination, characterized in that, The device includes: A surface detection module is used to acquire images of the battery surface; input the battery surface images into a trained surface defect detection model to obtain defect detection results; and based on the defect detection results, obtain the defect area and normal area of the battery surface. The region determination module is used to determine a first partition block and a second partition block based on the battery surface defect region; the first partition block is the block corresponding to the smallest defect region among all the battery surface defect regions, and all the second partition blocks constitute all regions of the battery surface except for all the first partition blocks; A damage determination module is used to acquire a unidirectional echo sequence; the unidirectional echo sequence is obtained by emitting positive-phase or negative-phase ultrasonic waves to all second partitioned blocks; based on the unidirectional echo sequence, the echo peak difference and echo attenuation rate difference are obtained; based on the echo peak difference and echo attenuation rate difference, the battery damage area is determined; based on all second partitioned blocks corresponding to the battery damage area, a third partitioned block is determined; the third partitioned block is the same size as the first partitioned block. The result determination module is used to obtain the superimposed echo sequence; the superimposed echo sequence is obtained by transmitting positive-phase ultrasonic waves and negative-phase ultrasonic waves to all the first partition blocks and all the third partition blocks; the battery damage result is obtained based on the superimposed echo sequence.
9. An apparatus comprising a memory and a processor, characterized in that, The device includes: Memory containing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the energy storage battery defect detection method based on internal and external coordination as described in any one of claims 1-7.
10. A computer storage medium, characterized in that, The computer storage medium stores computer instructions, which, when invoked by the processor, are used to execute the energy storage battery defect detection method based on internal and external coordination as described in any one of claims 1-7.
