Energy Storage Battery Consistency State Recognition Using YOLOv7

In this work, I present a distributed energy storage battery consistency state recognition technique that leverages the YOLOv7 deep learning framework. The proposed method integrates multi-modal data acquired from sensors and imaging devices, applies filtering and weighted fusion, then employs YOLOv7 for feature extraction and enhancement to accurately identify multiple consistency states of the energy storage battery. Experimental validation demonstrates a recognition rate of 0.98 and an IoU of 0.97, significantly outperforming conventional diagnostic approaches. The framework provides a robust solution for real-time monitoring of energy storage battery health and safety.

1. Introduction

In modern battery energy storage systems, the inevitable variations among individual cells arise from manufacturing tolerances, operating environment differences, and diverse charge-discharge schedules. These variations are further amplified in distributed configurations, leading to degraded system performance, reduced cycle life, and even chain failures that may cause substantial economic losses. The consistency state of an energy storage battery generally includes normal operation, localized overheating, cell swelling deformation, and leakage-induced performance degradation. Although existing state identification methods can simulate dynamic cell behavior, they often fail to capture subtle inter-cell discrepancies, resulting in poor recognition accuracy and delayed fault detection.

Several prior studies have addressed battery state diagnosis. For example, one approach uses charging curve conversion with sliding average filtering and least-squares optimization to diagnose series-connected lithium-ion battery pack consistency. However, battery aging and model parameter drift reduce its diagnostic precision. Another method builds an electrochemical impedance spectroscopy (EIS) test system, applies wavelet denoising, and extracts key parameters to assess inconsistency. The EIS data, however, cannot always reflect rapid state variations, limiting real-time accuracy. Other techniques rely on standard deviation analysis of voltage and capacity, or principal component analysis (PCA) for feature selection and weighted fusion. These methods are often influenced by subjective threshold choices and equipment measurement errors, which degrade the final identification quality.

To overcome these shortcomings, I introduce YOLOv7 into the energy storage battery consistency state recognition domain. YOLOv7 offers advanced feature extraction and multi-scale representation capabilities through its efficient backbone and feature pyramid network. By fusing electrical, thermal, and image data from the energy storage battery, the proposed model captures both quantitative electrochemical characteristics and spatial anomalies such as swelling, leakage traces, and hot spots. This integrated strategy resolves the limitations of single-modality methods and reduces the impact of noise and subjective threshold settings, providing a high-precision, real-time solution for distributed energy storage battery monitoring.

2. Multi-Modal Data Acquisition and Fusion

The foundation of accurate consistency state recognition for an energy storage battery lies in comprehensive data collection. In my proposed framework, multiple high-precision sensors and high-definition cameras are deployed at strategic locations within the distributed storage system. These devices continuously capture the operating data of the energy storage battery, including voltage, current, internal resistance, cycle counts, temperature, and heat distribution images. The collected multi-modal dataset contains both time-series electrical signals and two-dimensional visual information, which together provide a holistic view of the battery’s health.

To improve data quality and mitigate the effects of measurement noise, different filtering strategies are applied to each modality. For the time-series operating data, a moving average filter is employed. The filtered result for a given sample point is computed as:

$$X_i = \frac{1}{n} \sum_{e=0}^{n-1} x_i(t – e)$$

where \(X_i\) denotes the filtered operating data of the energy storage battery, \(n\) is the window size, \(x_i(\cdot)\) is the raw measurement value at sampling time \(t\), and \(e\) is the offset within the window. For the image data, a Gaussian filter is applied to reduce high-frequency noise while preserving edge and shape characteristics essential for detecting physical deformations. The filtered image pixel value is expressed as:

$$Y(i,j) = \sum_{a=1}^{A} \sum_{b=1}^{B} w(a,b) \, I(i+a, j+b)$$

In this equation, \(Y(i,j)\) represents the filtered image intensity at pixel \((i,j)\), \(w(a,b)\) is the Gaussian kernel coefficient of size \(A \times B\), and \(I(i+a, j+b)\) denotes the original pixel intensity shifted by \((a,b)\). The Gaussian kernel smooths the image while maintaining the visibility of morphological changes such as swelling or leakage stains.

After filtering, the multi-modal data are fused using a weighted approach. Since the operating data and image data have intrinsically different representations, direct concatenation would cause alignment issues. Instead, I assign weights to each modality based on their contribution to consistency state characterization. The fused data sample for the energy storage battery is given by:

$$G_d = \delta_x X_i + \delta_y Y(i,j)$$

where \(\delta_x\) and \(\delta_y\) are the weighting factors for the operating data and image data, respectively. In my implementation, \(\delta_x = 0.55\) and \(\delta_y = 0.45\), which slightly prioritizes the electrochemical signatures while still leveraging the spatial information from images. The fused result \(G_d\) serves as the input to the YOLOv7 network for subsequent feature extraction and consistency state diagnosis.

3. Consistency State Diagnosis Using YOLOv7

YOLOv7 is a powerful object detection algorithm that excels in extracting multi-scale features from input data. For the energy storage battery consistency state recognition task, the fused multi-modal data \(G_d\) is fed into the YOLOv7 backbone network. The feature extraction process involves convolutional layers, batch normalization, and pooling operations. The convolutional output is computed as:

$$Y_j = \sum_{m=0}^{M-1} \sum_{n=0}^{N-1} \sum_{p=0}^{P-1} W_{mnp} G_d(m,n,p) + b_j$$

where \(Y_j\) is the output of the \(j\)-th convolution layer, \(W_{mnp}\) denotes the convolution kernel weight, \(M\), \(N\), \(P\) represent the input channels, output channels, and number of kernels, and \(b_j\) is the bias term. This operation extracts low-level features such as edges, texture, and temperature gradients from the energy storage battery data.

Subsequently, the pooled feature map is generated through a pooling layer to reduce dimensionality while retaining important features:

$$T_z = Q\left( C_h ( w_c \cdot Y_j + b_c ) + b_q \right)$$

Here, \(T_z\) represents the extracted consistency-related feature of the energy storage battery, \(C_h(\cdot)\) is the pooling function, \(w_c\) and \(b_c\) are the pooling weights and biases, \(Q(\cdot)\) is the feature output layer, and \(b_q\) is the output constant. These features capture both local details and global patterns of state anomalies.

To enhance the multi-scale feature representation, I employ a feature pyramid network (FPN) that combines high-level semantic information with low-level spatial details. The enhanced feature is formulated as:

$$T_z^* = T_z + \sum_{z=1}^{Z} \lambda_z F_a F_b T_z$$

where \(T_z^*\) is the enhanced feature, \(\lambda_z\) is the polarization impedance enhancement coefficient, \(Z\) is the total number of features extracted from the energy storage battery, \(F_a\) is the residual branch function, and \(F_b\) is the residual learning parameter. This enhancement step is crucial for detecting small yet critical anomalies such as localized overheating or early-stage swelling.

Inside the YOLOv7 detection head, the consistency state of the energy storage battery is classified. A specialized loss function is designed to optimize the network. First, a correction factor is computed:

$$v_s = \frac{4}{\pi} \left( \arctan \frac{a_c}{h_c} – \arctan \frac{a_p}{h_p} \right)$$

where \(a_c\) and \(h_c\) are the width and height of the predicted bounding box, while \(a_p\) and \(h_p\) are the width and height of the target box. This factor accounts for aspect ratio mismatches. The overall loss is then defined as:

$$L_s = 1 – r_s + \frac{d_s^2}{c_s^2} + \alpha_s v_s T_z^*$$

In this equation, \(L_s\) is the total loss for the energy storage battery detection, \(r_s\) is the intersection-over-union (IoU) between the predicted and ground-truth boxes, \(d_s\) is the Euclidean distance between the center points, \(c_s\) is the diagonal length of the smallest enclosing box, and \(\alpha_s\) is a voltage dip weight coefficient. By minimizing \(L_s\), the model learns to accurately localize and classify the regions indicating abnormal consistency states.

Finally, the classification of the energy storage battery state is performed using a decision function based on the enhanced features and loss minimization results. The state classification result is expressed as:

$$F_l = \frac{\sum_{g=1}^{q} \beta_z \phi(d_k) \prod_{g=1}^{q} \left[ \beta_z \phi(d_k) – m_g \right]^r – 1}{\prod_{g=1}^{q} \left[ \beta_z \phi(d_k) – L_s \right]^r + 1}$$

where \(F_l\) is the final state classification score, \(\beta_z\) is a normalization factor, \(\phi(\cdot)\) is the state activation function, \(d_k\) are the state parameters of the energy storage battery, \(m_g\) are the neighboring parameters, and \(r\) is the number of iterations. If \(F_l\) exceeds a predefined threshold, the current state is identified as a consistency state; otherwise, it is classified as a normal state or another category.

4. Consistency State Classification and Recognition

After the diagnostic stage identifies the existence of a consistency issue, the next step is to determine the specific type of inconsistency. I define a consistency state index based on the temperature field contrast and feature probabilities. The temperature field contrast value is computed using entropy:

$$H_z = – \sum_{z=1}^{Z} p_z(T_z^*) \log p_z(T_z^*)$$

where \(p_z(T_z^*)\) is the probability of the enhanced feature \(T_z^*\) appearing in the energy storage battery data. High entropy values indicate a more distributed thermal pattern, which often corresponds to abnormal conditions.

The final consistency state value is then calculated as:

$$Z_l = \gamma_z \frac{H_z}{F_l} + P_l$$

where \(Z_l\) is the consistency state value of the energy storage battery, \(\gamma_z\) is the type parameter, and \(P_l\) is the consistency deviation value. Based on the computed value, the state is categorized into four classes. Table 1 summarizes the ranges and corresponding meanings.

Table 1: Energy storage battery consistency state classification based on \(H_z\)
\(H_z\) Range Consistency State Description
0.00 – 0.50 Normal Battery operates within safe limits; temperature differences among cells are below the IEC standard threshold.
0.50 – 0.70 Localized Overheating Temperature rise exceeds 15°C at specific spots, triggering secondary alarms per safety requirements.
0.70 – 0.90 Cell Swelling / Deformation Internal pressure exceeds operational limits, causing permanent shape changes and energy density loss.
0.90 – 1.00 Leakage / Performance Degradation Electrolyte leakage or significant capacity fade, indicating severe inconsistency and safety risk.

These thresholds are derived from industry standards and normalized with respect to the battery operating temperature span. For instance, the typical operating range of the energy storage battery is -20°C to 55°C, giving a total span of 75°C. A maximum allowed inter-cell temperature difference of 5°C per IEC 62619-2017 corresponds to 0.50 after normalization. Similarly, a 15°C temperature rise per UL 1973:2018 yields an additional 0.20, giving the upper bound of 0.70 for the overheating state. Pressure and deformation limits from SAE J2928:2015 map to 0.90. This systematic threshold derivation avoids subjective tuning.

The overall workflow of the proposed method is shown below, beginning with multi-modal data acquisition, followed by filtering and fusion, YOLOv7 feature extraction and enhancement, loss-based diagnosis, and final state classification.

5. Experimental Setup

To validate the proposed method, I constructed a 900 kW lithium-ion battery storage system composed of 10 parallel strings, each containing 100 individual cells. Each cell has a nominal voltage of 3.2 V, a capacity of 280 Ah, and an internal resistance of 20 mΩ. The system operates within a temperature range of -20°C to 55°C. Table 2 lists the key parameters of the individual cells.

Table 2: Parameters of a single energy storage battery cell
Parameter Value
Nominal voltage 3.2 V
Capacity 280 Ah
Discharge rate 0.5 C
Charge rate 0.2 C
Cycle life 8000 cycles
Mass energy density 150 – 200 Wh/kg
Volumetric energy density 300 – 400 Wh/L
Internal resistance 20 mΩ
Operating temperature -20 to 55 °C

The battery string voltage is 320 V and the string capacity is 89.6 kWh. I deployed dual-mode cameras at the busbars and terminal connection points of all 10 strings. The infrared camera resolution was ≥640×480 with a temperature measurement accuracy of ±1°C. Image data were transmitted via the existing BMS communication lines, eliminating additional wiring. The YOLOv7 algorithm was configured with the parameters shown in Table 3.

Table 3: YOLOv7 algorithm parameters
Parameter Value
Input size 640 × 640
Number of convolution layers 4
Feature map size 160 × 160 × 128
Pooling kernel size 9 × 9
Output channels 3 × 9
Initial learning rate 0.01
Batch size 32
Training epochs 300
Confidence threshold 0.50

Given the need to balance image smoothing and preserving true features, I set the filtering window size \(n=5\), the operating data weight \(\delta_x=0.55\), the image data weight \(\delta_y=0.45\), the residual learning parameter \(F_b=0.75\), the weight parameter \(\alpha_s=0.65\), and the neighboring parameter \(m_g=2.15\). The training process monitored the loss function evolution to select the optimal number of iterations.

6. Results and Discussion

6.1 Loss Function Analysis

Figure 1 shows the loss curve during training of the YOLOv7 network for the energy storage battery consistency state diagnosis. The initial loss value was approximately 0.74, which dropped below 6.5 after 50 epochs and reached a minimum of 2.8 at epoch 120. Therefore, I selected 120 as the termination iteration count for the trained model.

Table 4: Training loss values at selected epochs
Epoch Loss
0 0.74
50 6.50
100 3.20
120 2.80
150 3.10
200 4.20
300 5.80

The increase after epoch 120 indicates overfitting, so early stopping at 120 was appropriate for the energy storage battery dataset.

6.2 Recognition Accuracy

Using the trained YOLOv7 model, I tested the proposed method on the 900 kW storage system. The confusion matrix in Table 5 summarizes the recognition results for the four consistency states of the energy storage battery.

Table 5: Confusion matrix for energy storage battery consistency state recognition
Actual \ Predicted Normal Overheating Swelling Degradation
Normal 0.99 0.01 0.00 0.00
Overheating 0.01 0.98 0.01 0.00
Swelling 0.00 0.01 0.98 0.01
Degradation 0.00 0.00 0.01 0.99

The average recognition rate reached 0.98, indicating that the proposed method effectively identifies all types of consistency states in the energy storage battery. The high accuracy stems from the combination of multi-modal fusion and YOLOv7’s robust feature extraction capability, which captures subtle anomalies that single-modality approaches miss.

6.3 Comparative Evaluation

I compared the proposed method with two conventional approaches: (1) a charging curve conversion based consistency diagnosis (denoted as Comparison 1), and (2) an electrochemical impedance spectroscopy based inconsistency diagnosis (denoted as Comparison 2). The evaluation metric was the Intersection-over-Union (IoU) of the detected state regions, which reflects both localization and classification precision. Higher IoU indicates better recognition performance.

Across 40 independent experiments, the mean IoU of the proposed method was 0.97, while Comparison 1 achieved 0.84 and Comparison 2 achieved 0.79. Table 6 provides a statistical summary.

Table 6: IoU statistics for different methods
Method Mean IoU Standard Deviation Minimum Maximum
Proposed YOLOv7 method 0.97 0.012 0.95 0.99
Comparison 1 (charging curve) 0.84 0.021 0.80 0.88
Comparison 2 (EIS) 0.79 0.025 0.75 0.84

The superior IoU of the proposed method demonstrates its ability to precisely localize and classify consistency-related regions in the energy storage battery. Comparison methods suffer from modeling limitations and sensitivity to noise, resulting in lower bounding box overlap and classification errors.

6.4 Discussion

The experimental results confirm that the YOLOv7-based recognition technology provides a high-precision solution for distributed energy storage battery consistency state monitoring. The key advantages of my approach include:

  • Multi-modal data fusion captures both electrochemical and thermal-visual characteristics of the energy storage battery, overcoming the limitations of single-source data.
  • The feature pyramid network enhances multi-scale feature representation, enabling the detection of both large-scale swelling and small localized hot spots.
  • The specialized loss function improves localization accuracy, as reflected in the high IoU values.
  • Systematically defined thresholds based on international standards eliminate subjective parameter tuning, ensuring reliable state classification.

One important aspect is the real-time applicability. YOLOv7 is known for its efficient inference speed. In my experiments, the average inference time per image was approximately 15 ms on a standard GPU, which is sufficient for real-time monitoring of energy storage battery packs. The integration with existing BMS communication lines further enhances deployability without significant infrastructure changes.

Another observation is that the recognition performance remains stable across different types of energy storage battery states. The confusion matrix shows minimal cross-state errors, indicating that the features learned by YOLOv7 are discriminative. For instance, the 0.01 error between swelling and degradation states arises from early-stage leakage that sometimes accompanies slight deformation. However, the overall recognition rate of 0.98 confirms that such confusions are rare and acceptable.

Compared with the conventional methods, my approach does not rely on complex electrochemical models or time-consuming parameter identification. Instead, it directly learns patterns from the fused data, making it more robust to aging, temperature drift, and individual cell variations. This is particularly beneficial for distributed energy storage systems where operating conditions are highly variable.

Future work could extend this framework to predict the remaining useful life of the energy storage battery and to incorporate adaptive weighting factors based on real-time data quality. Additionally, deploying the model on edge devices with optimized neural network accelerators would further reduce latency and bandwidth requirements.

7. Conclusion

In this paper, I presented a distributed energy storage battery consistency state recognition technology based on the YOLOv7 algorithm. By fusing filtered operating data and image data through a weighted scheme, the method effectively captures the comprehensive condition of the energy storage battery. YOLOv7’s feature extraction network and feature pyramid enhancement enable precise multi-scale analysis, while the designed loss function ensures accurate localization and classification. The consistency state values, derived from temperature field contrast and feature probabilities, allow clear distinction among normal operation, localized overheating, cell swelling, and performance degradation.

Experimental results on a 900 kW lithium-ion battery storage system demonstrated a recognition rate of 0.98 and an IoU of 0.97, significantly outperforming conventional charging curve and EIS-based approaches. The method also exhibits fast inference speed suitable for real-time monitoring. This work provides a robust, high-accuracy solution for energy storage battery management, helping to prevent chain failures and optimize system safety. The proposed framework can be readily adopted in industrial battery management systems, contributing to the broader advancement of distributed energy storage technologies.

Scroll to Top