In the context of the global “dual carbon” strategy, electrochemical energy storage technology, primarily centered on lithium-based energy storage battery systems, is undergoing a critical phase of large-scale deployment in sectors such as power grids and electric vehicles. However, during the manufacturing, transportation, and long-term cycling processes, energy storage battery components are prone to defects like delamination, gas bubble formation, cracks, and lithium plating. These anomalies are key triggers for thermal runaway, reduced lifespan, and safety hazards, posing significant challenges to the industry’s healthy development. Traditional energy storage battery condition monitoring methods, such as electrochemical impedance spectroscopy or infrared thermography, are often limited to identifying macroscopic faults. They lack effective detection capabilities for the subtle features of latent or hidden defects. In contrast, ultrasonic testing technology, with its high resolution and strong penetrability, offers a promising solution for non-destructive, high-resolution scanning and imaging across the entire energy storage battery area.
This paper proposes a comprehensive method for defect diagnosis and state evaluation of energy storage batteries, leveraging a fusion of ultrasonic longitudinal wave reflection and transmission techniques integrated with advanced artificial intelligence algorithms. The approach initially constructs an extensive ultrasonic image database using a Feli-300 ultrasonic non-destructive testing (NDT) device, encompassing various energy storage battery models and degradation states. Subsequently, the YOLOv12 algorithm is employed to automatically identify and classify internal and external defects within the energy storage battery, optimizing the model to enhance detection precision for multi-scale defect features. Finally, based on extracted ultrasonic signal characteristics and a multi-dimensional evaluation index system, a Support Vector Machine (SVM) model is built to provide a visual assessment of the energy storage battery condition. The results demonstrate that this method achieves a mean average precision (mAP) exceeding 90% for defect diagnosis and a state evaluation accuracy above 95%, enabling effective non-destructive detection and precise assessment of the energy storage battery state.

Construction of the Ultrasonic Scanning Image Database
Principles and Experimental Platform for Ultrasonic Testing
Ultrasonic non-destructive testing technology identifies structural states by emitting high-frequency ultrasonic pulses and analyzing reflected or transmitted signals. In the context of energy storage battery inspection, ultrasonic longitudinal wave reflection signals are used to scan defects along the thickness direction, such as delamination, dents, and local cracks. Conversely, ultrasonic longitudinal wave transmission signals are used to scan overall consistency and internal structural anomalies, including electrolyte wetting status, lithium plating, and gas generation characteristics. By integrating both reflection and transmission modes, this technique enables rapid and non-destructive evaluation of large or complex battery structures. This capability is crucial for monitoring the health of an energy storage battery, covering aspects like wetting, defects, gas detection, surface quality, internal structure, and lithium plating.
The ultrasonic testing equipment used in our experiments is the Feli-300 model. This system has a detection range of 300 mm × 250 mm, supports a maximum cell thickness of ≤ 30 mm, and offers an imaging resolution between 0.1 mm and 1 mm with a detection resolution of 0.5 mm. It is capable of high-precision imaging for both pouch and prismatic energy storage battery cells.
The Feli-300 is the primary hardware for data acquisition.
We used a high-resolution industrial camera for surface defect documentation and a silicone oil immersion setup to ensure stable ultrasonic signal transmission.
Edge computing hardware was used for data preprocessing.
Model Construction and Data Collection
To ensure the representativeness and diversity of the ultrasonic scan images, we selected both pouch and prismatic cells as sample energy storage batteries. Considering the lack of comprehensive public datasets and the wide variety of defect types and severity levels, we designed battery state models covering the entire lifecycle of an energy storage battery—from incoming inspection, through operation and maintenance, to retirement. The following table summarizes the various conditions and the methods used to induce them.
| Defect/State Type | Cause / Manifestation |
|---|---|
| Gas Bubbles | Internal side reactions or overcharging leading to expansion or localized bulging of the battery casing. |
| Dents / Scratches | Physical damage incurred during production, transport, or installation of the energy storage battery. |
| Lithium Plating | Formation of lithium dendrites on the electrode surface or separator, often accompanied by swelling or localized hardening of the energy storage battery. |
| Charge/Discharge Abnormalities | Burn marks or discoloration on the surface caused by local overheating or electrochemical imbalance within the energy storage battery. |
| Micro-short Circuit | Direct contact between positive and negative electrodes within the energy storage battery, leading to heating, swelling, and rapid performance degradation. |
| High-Temperature Cycling Damage | Decomposition of electrolyte at high temperatures, reducing wettability. Decomposition gases can form bubbles inside the energy storage battery. |
| Low-Temperature Cycling Damage | Increased electrolyte viscosity at low temperatures, leading to decreased wettability and reduced charge/discharge efficiency of the energy storage battery. |
We standardized the testing process for each energy storage battery sample. The Feli-300 device was initialized and self-checked. Each test battery was placed in a fixture and fully submerged in silicone oil. Depending on the battery’s size, material, and packaging, we dynamically adjusted the ultrasonic frequency, driving voltage, scanning speed, and step distance. The detection depth and scanning resolution were configured to enable high-precision multi-mode imaging. Using raw ultrasonic scan images and data augmentation strategies, we built a structured database containing 2400 images. This database provides a complete data foundation for subsequent defect diagnosis and state evaluation of energy storage batteries.
Defect Identification and Classification in Energy Storage Batteries Using YOLOv12
To achieve intelligent and high-precision identification and classification of defects in ultrasonic scan images of energy storage batteries, we applied the YOLOv12 object detection model. Compared to its predecessors, YOLOv12 incorporates significant innovations in network architecture, feature fusion mechanisms, and loss function design. This results in substantial improvements in detection accuracy and speed, making it particularly suitable for our application scenario where defect sizes vary widely and features are complex. By combining YOLOv12 with ultrasonic testing, we can achieve efficient diagnosis of both internal and external defects in energy storage batteries.
Image Preprocessing and Data Annotation
Ultrasonic scan images were used as input and preprocessed to maintain detection accuracy while enhancing model robustness. First, all images were converted to the YOLO-compatible format and resized to a uniform resolution. To preserve the original aspect ratio, we applied padding with a gray value to avoid image deformation. Gaussian filtering was then used to remove random noise from the images.
Using the annotation tool Labelme, we labeled the various defects in the preprocessed image database of energy storage batteries. For efficient computation and compatibility, we used bounding boxes to precisely frame the defect locations and assigned corresponding type labels (e.g., “gas bubble,” “scratch,” “dent,” “lithium plating”). The image data and corresponding annotation information (bounding box coordinates, class labels) for each defect sample were organized into a standardized dataset format.
YOLOv12 Algorithm Framework
YOLOv12 continues the core principle of YOLO-series single-stage detectors, treating object detection as an end-to-end regression problem, which ensures excellent detection efficiency. The overall architecture of YOLOv12 consists of three main parts: Backbone, Neck, and Head. It incorporates innovations such as Area Attention, Residual Efficient Layer Aggregation Networks (R-ELAN), and Flash Attention. These features reduce computational load, preserve the network’s ability to handle large receptive fields, solve gradient vanishing problems in large-scale model training, and accelerate the computation of attention mechanisms. This enables efficient, high-precision, and robust identification and classification of multi-scale and complex-morphology defects in energy storage batteries.
The core improvements in YOLOv12 can be represented by the following equations. The Area Attention mechanism computes attention over contiguous blocks of features rather than individual pixel positions, which is a key theoretical contribution. For a given input feature map \( X \in \mathbb{R}^{H \times W \times C} \), the attention output \( \text{Attn}(Q,K,V) \) is computed as:
$$ \text{Attn}(Q,K,V) = \text{Softmax}\left(\frac{QK^T}{\sqrt{d_k}}\right)V $$
where \( Q, K, V \) are the query, key, and value matrices, respectively, and \( d_k \) is the dimension of the keys. The Residual Efficient Layer Aggregation Network (R-ELAN) ensures better gradient flow and feature fusion, with its output \( F_{\text{out}} \) defined as:
$$ F_{\text{out}} = \text{Conv}\left( \text{Cat}\left( F_{\text{in}}, G_1(F_{\text{in}}), G_2(F_{\text{in}}) \right) \right) $$
where \( F_{\text{in}} \) is the input feature, \( G_1 \) and \( G_2 \) are groups of convolutional layers, and \( \text{Cat} \) denotes concatenation.
Battery Defect Diagnosis Model
We built a defect diagnosis model for energy storage batteries using the YOLOv12-Nano version. This model has a parameter count of only 2.56M and a computational complexity of 6.3 GFLOPs. Its inference latency on an NVIDIA T4 GPU using FP16 precision is just 1.64ms, making it highly suitable for industrial real-time detection deployment. The model structure takes the preprocessed and annotated ultrasonic scan image dataset as input. After processing through 32 convolutional layers, 16 attention layers, 5 concatenation layers, and 3 detection heads in the YOLOv12 model, it outputs bounding boxes, class labels, and confidence scores for defect identification and classification. The dataset was split into 70% for training, 20% for validation, and 10% for testing.
Model training and deployment were performed using the PyTorch framework on a server with an NVIDIA GeForce RTX 4090 GPU. We loaded pre-trained YOLOv12 weights as a base model and performed transfer learning on our custom defect detection dataset. The training process was set for 200 epochs with an input image size of 640×640. A batch size of 4 was used. A two-stage augmentation strategy was employed: the first stage used Albumentations for geometric, color, and blur augmentation; the second stage used Pillow for pixel-level perturbations (brightness adjustment, noise injection) to simulate environmental uncertainty. This strategy significantly enhanced model robustness and generalization. After training, the best weight file was saved as best_model.pt, and performance was evaluated on the validation set.
Furthermore, we developed a desktop application using Tkinter. Users can load the trained model via a graphical interface and perform detection on images. The interface allows users to load models, select images, run detection, and save results. After detection, users can visually inspect the results with bounding boxes and confidence scores. This interface supports a human-in-the-loop training process where new defect samples can be annotated online and automatically synced to the training set.
Through these architectural innovations and training strategies, the YOLOv12 model can perform deep feature extraction on ultrasonic images of energy storage batteries, achieving fast, accurate, and robust automated defect detection.
Battery State Evaluation System Based on SVM
Support Vector Machine (SVM) is a supervised learning algorithm based on statistical learning theory, widely used for classification and regression problems. The core idea of SVM is to construct an optimal hyperplane to linearly separate different classes of samples. In the application of evaluating the health state of energy storage batteries, SVM can effectively classify a battery’s condition into multiple categories, enabling rapid detection, precise evaluation, and proactive warning of the energy storage battery state.
Image Feature Extraction
Utilizing the changes in acoustic parameters when ultrasound propagates through different media, we extract core features from the images. These features, which include wetting degree, gas accumulation areas, interface and material continuity, and lithium metal deposition areas, are used to infer and characterize the internal state of the energy storage battery. The following table defines these features and their extraction methods based on ultrasonic scanning images.
| Core Feature | Definition | Extraction Basis and Quantification Method |
|---|---|---|
| Wetting Degree | Degree of electrolyte penetration into the porous structure of the electrodes (anode/cathode). Unwetted areas contain air. | Let \( v_0 \) be the acoustic velocity in a fully wetted area and \( v_i \) be the velocity in the measured area. Wetting degree is quantified as \( I = v_i / v_0 \) (0 < I < 1). Data is collected via ultrasonic velocity testing equipment, with \( v_0 \) experimentally calibrated as the mean velocity of a standard fully wetted energy storage battery. |
| Gas Accumulation Areas | Gases have very low acoustic impedance, causing almost complete reflection or severe attenuation of ultrasound at their interfaces, leading to signal loss. | A signal intensity threshold \( T \) is set. This threshold is defined as \( T = 0.3 \times S_{\text{normal}} \), where \( S_{\text{normal}} \) is the mean ultrasonic signal intensity of a normal battery. An area where \( S < T \) is identified as a gas accumulation region. |
| Interface and Material Continuity | Any defects in surface quality detection or internal structure detection of the battery generate additional echo signals during ultrasonic scanning. | Let \( N_0 \) be the number of echoes from the main interface and \( N_t \) be the total number of echoes. The number of defect-related echoes is \( N_d = N_t – N_0 \). \( N_0 \) is experimentally calibrated as the mean number of echoes from a defect-free battery. A higher \( N_d \) indicates a greater degree of defects within the energy storage battery. |
| Lithium Metal Deposition Area | Non-uniform deposition of lithium metal on the anode surface, a primary side reaction during fast charging and low-temperature charging. | Let \( v_0 \) be the acoustic velocity in a fully wetted area and \( v_i \) be the velocity in the measured area. The degree of lithium deposition is quantified as \( L = 1 – v_i / v_0 \). |
Quantification of Evaluation Indices
To comprehensively evaluate the health state of an energy storage battery throughout its lifecycle, we designed a multi-index evaluation system considering wetting, gas, surface quality, internal structure, and lithium plating areas. The Technique for Order Preference by Similarity to an Ideal Solution (TOPSIS) method was used to quantify the weights of these indicators, constructing a comprehensive evaluation model for the health state of an energy storage battery. The TOPSIS process is as follows:
1) Indicator Attribute Homogenization: For \( m \) evaluation objects and \( n \) evaluation indicators (quantified versions of wetting, gas, surface quality, internal structure, and lithium plating area), low-optimal and neutral indicators are all transformed into high-optimal indicators. The method is:
$$ x’_{ij} = \begin{cases} x_{ij}, & \text{if high-optimal} \\ 1/x_{ij}, & \text{if low-optimal} \\ M / [M + |x_{ij} – M|], & \text{if neutral} \end{cases} $$
where \( x_{ij} \) is the original value for object \( i \) and indicator \( j \), \( x’_{ij} \) is the transformed value, and \( M \) is the expected value for a neutral indicator.
2) Construct the Normalized Initial Matrix: The homogenized data is normalized to obtain matrix \( Z \) and eliminate the influence of dimensions.
3) Determine the Positive and Negative Ideal Solutions: Based on the normalized matrix \( Z \), the positive ideal solution \( Z^+ \) and negative ideal solution \( Z^- \) are found using the cosine method. \( Z^+ \) consists of the maximum value from each column, and \( Z^- \) consists of the minimum value from each column.
4) Calculate Distances to Ideal Solutions: The Euclidean distance from the \( i \)-th object to the positive and negative ideal solutions is calculated:
$$ D_i^+ = \sqrt{\sum_{j=1}^{n} (z_{ij} – z_j^+)^2}, \quad D_i^- = \sqrt{\sum_{j=1}^{n} (z_{ij} – z_j^-)^2} $$
where \( z_{ij} \) is the normalized value, and \( z_j^+ \) and \( z_j^- \) are the positive and negative ideal solution values for indicator \( j \).
5) Calculate the Closeness to the Positive Ideal Solution:
$$ C_i = \frac{D_i^-}{D_i^+ + D_i^-} $$
where \( C_i \) represents the closeness for the \( i \)-th object, ranging from 0 to 1. A value closer to 1 indicates a better evaluation result.
6) Vector of Weights Fusion: Based on the \( C_i \) matrix (n objects × 5 indicators) obtained for the five evaluation indicators, the entropy weight method is used for weight fusion. The steps are:
- Calculate the standardized value \( P_{ij} = C_{ij} / \sum_{i=1}^{n} C_{ij} \).
- Calculate the information entropy for each indicator \( j \): \( E_j = -\frac{1}{\ln n} \sum_{i=1}^{n} P_{ij} \ln(P_{ij}) \).
- Calculate the difference coefficient: \( G_j = 1 – E_j \).
- Normalize to obtain the weight vector: \( w_j = G_j / \sum_{j=1}^{5} G_j \).
The final fused weight vector is \( W = (w_1, w_2, w_3, w_4, w_5) \), corresponding to the weights for wetting, gas accumulation, surface quality, internal structure, and lithium plating area, respectively, satisfying \( \sum_{j=1}^{5} w_j = 1 \).
SVM Intelligent Evaluation Model
The fused feature vector is input into an optimized SVM model for training and validation, which outputs an intelligent evaluation result. During the training phase, the system reads the ultrasonic image database of energy storage batteries to form a sample matrix and label vector. After data preprocessing (cleaning, alignment, standardization) and calling the extracted core ultrasonic image features via HOG descriptors with optimized parameters (gradient directions=6, cell size=(10,10), block size=(4,4)), the data is ready. We selected the Radial Basis Function (RBF) kernel. Using 5-fold cross-validation with a grid search method, the optimal parameters were found to be a penalty factor \( C = 10 \) and an RBF kernel parameter \( \gamma = 0.01 \). The model was trained and saved for subsequent inference.
In the validation phase, the system loads the test set’s feature file and uses the trained SVM model for classification prediction. The predicted results are compared with the true labels to calculate the accuracy. To ensure objectivity in state evaluation, we established a correspondence between the health state of an energy storage battery and the quantified values of its key ultrasonic features, as shown in Table 3. This relationship serves as a key decision-making basis for the SVM model’s classification.
| Health State | Wetting Degree (I) | Gas Accumulation (S<t) | Interface/Material Continuity (Nd) | Lithium Plating (L) | |
|---|---|---|---|---|---|
| Normal | I ≥ 0.9 | S < 1% | Nd ≤ 2 | L ≤ 0.03 | |
| Mildly Damaged | 0.75 ≤ I < 0.9 | 1% ≤ S < 5% | 2 < Nd ≤ 5 | 0.03 < L ≤ 0.08 | |
| Severely Damaged | I < 0.75 | S ≥ 5% | Nd > 5 | L > 0.08 |
The SVM model determines the state based on matching core feature parameters against these thresholds. If all key features are within the “Normal” range, the model classifies the energy storage battery as healthy. If one or more features exceed “Normal” but do not reach the “Severely Damaged” threshold, it is classified as “Mildly Damaged.” If any core feature reaches or exceeds the “Severely Damaged” threshold, the model classifies it as such, requiring immediate intervention. This clear quantitative correspondence reduces subjective judgment bias. The SVM model effectively classifies the health state into three categories: Normal, Mildly Damaged, and Severely Damaged, enabling the automated generation of differentiated maintenance plans. This risk-based intelligent decision-making optimizes maintenance resource allocation.
Experimental Validation and Result Analysis
The process for defect diagnosis and state evaluation of energy storage batteries based on ultrasonic NDT is described in the paper. We conducted experiments on both pouch and prismatic cells. Following the established process, we performed ultrasonic scanning, built a multi-stage battery state model and image database, and then used the YOLOv12 algorithm and SVM model sequentially to achieve comprehensive state evaluation of the energy storage batteries.
We used the metric mean Average Precision (mAP) to evaluate the detection accuracy of the defect diagnosis model. The mAP is calculated as follows:
$$ \text{mAP} = \frac{1}{M} \sum_{m=1}^{M} \text{AP}_m $$
where \( \text{AP}_m \) is the Average Precision for class \( m \), and \( M \) is the total number of classes. Based on the mAP@0.5 metric, the detection accuracy of our YOLOv12 defect diagnosis model for energy storage batteries exceeded 90%. The user interface for defect identification showed that the YOLOv12 algorithm achieved a confidence level of over 85% for well-defined defects and generally over 70% for smaller, more subtle defects.
Furthermore, we used Accuracy to evaluate the performance of the state evaluation model. Accuracy is defined as:
$$ \text{Accuracy} = \frac{TP + TN}{TP + TN + FP + FN} $$
where TP, TN, FP, and FN represent True Positives, True Negatives, False Positives, and False Negatives, respectively. The calculation results demonstrated that the accuracy of the SVM state evaluation model for energy storage batteries was greater than 95%. The visual interface for state evaluation confirmed that the combined ultrasonic NDT and SVM evaluation model can achieve precise and reliable state assessment of energy storage batteries, effectively differentiating between “Normal,” “Mildly Damaged,” and “Severely Damaged” conditions.
Conclusion and Future Work
In this study, we proposed a method for defect diagnosis and state evaluation of energy storage batteries by integrating non-destructive testing technology with artificial intelligence algorithms. The method uses ultrasonic longitudinal wave reflection-transmission fusion testing to acquire internal and surface image features of energy storage batteries in different states. We applied the YOLOv12 algorithm to develop a defect diagnosis model and built an SVM-based state evaluation model. Our research demonstrates that the proposed technology can achieve precise identification and classification of defects such as gas bubbles, dents, and scratches in energy storage batteries. Building on this, it enables efficient evaluation of battery states as “Normal,” “Mildly Damaged,” or “Severely Damaged.” This work provides technical support for the intelligent management and early warning of energy storage batteries, offering practical insights for enhancing safety and proactive maintenance in the energy storage industry.
