Accurately estimating the State of Charge (SOC) in real-time is a fundamental and challenging task for Battery Management Systems (BMS) in energy storage applications. The SOC represents the available capacity remaining in a battery, analogous to a fuel gauge. Precise SOC knowledge is critical for ensuring safe operation (preventing over-charge/discharge), optimizing performance, scheduling charge/discharge cycles efficiently, and ultimately extending the service life of the energy storage battery system. Traditional estimation methods often struggle with the non-linear, time-varying dynamics of batteries, especially under real-world operating conditions characterized by fluctuating loads, temperature variations, and sensor noise, which can lead to SOC estimation drift, jumps, and inaccuracies.

Common SOC estimation strategies include the Open Circuit Voltage (OCV) method, Coulomb counting (current integration), model-based filters like the Kalman Filter, and increasingly, data-driven approaches using machine learning. Each has its limitations. The OCV method requires long rest periods and is not suitable for dynamic operation. Coulomb counting suffers from accumulated error from current sensor inaccuracy and unknown coulombic efficiency. Model-based filters depend heavily on the accuracy of the battery model, which is difficult to parameterize across the battery’s lifespan. Machine learning models can capture complex non-linearities but may produce non-physical, noisy, or non-monotonic outputs if not properly constrained and pre-processed.
To address these challenges, particularly the issues of jump and inaccuracy during real-time calibration, this paper proposes a novel hybrid strategy that synergistically combines signal processing techniques with machine learning. The core innovation lies in a multi-stage pipeline designed to robustly handle noisy real-world data and enforce physical constraints on the SOC estimate. The strategy first applies a Kalman smoother to preprocess the raw voltage, temperature, and current measurements, reducing high-frequency noise and transients. This smoothed data then feeds into an XGBoost machine learning model to generate an initial SOC prediction. Recognizing that the ML prediction may still contain artifacts, a Wavelet Transform (WT) based denoising step is applied to this predicted SOC sequence. Finally, to ensure the physical plausibility of the result, an Isotonic Regression algorithm is used to recalibrate the denoised SOC, guaranteeing a monotonic trend during charge/discharge phases. This integrated approach significantly enhances the accuracy, stability, and reliability of real-time SOC estimation for energy storage batteries, providing a more dependable foundation for BMS decisions.
The proposed real-time calibration workflow for an energy storage battery under practical operating conditions is illustrated below and consists of the following six key steps:
Step 1: Data Acquisition. Collect time-series data including battery terminal voltage \(V\), temperature \(T\) (both max and min), current \(I\), and the BMS’s own SOC estimate from the system’s operational database. Data is typically logged at fixed intervals (e.g., every 30 seconds).
Step 2: Kalman Smoothing of Input Features. The raw measurements of \(V\), \(T\), and \(I\) are often contaminated with noise and sudden fluctuations. A Kalman smoothing algorithm is applied independently to each of these one-dimensional signal sequences to suppress noise while preserving the underlying trend. For a signal \(x\), the Kalman algorithm operates based on a state-space model. The key equations for the forward pass (filtering) are:
Prediction:
$$ \hat{x}_{k|k-1} = A \hat{x}_{k-1|k-1} + B u_{k-1} $$
$$ P_{k|k-1} = A P_{k-1|k-1} A^T + Q $$
Update:
$$ K_k = P_{k|k-1} H^T (H P_{k|k-1} H^T + R)^{-1} $$
$$ \hat{x}_{k|k} = \hat{x}_{k|k-1} + K_k (z_k – H \hat{x}_{k|k-1}) $$
$$ P_{k|k} = (I – K_k H) P_{k|k-1} $$
Where \( \hat{x}_{k|k-1} \) is the prior state estimate, \( \hat{x}_{k|k} \) is the posterior state estimate (smoothed value), \( P \) is the error covariance, \( K_k \) is the Kalman gain, \( z_k \) is the measurement (raw data), \( Q \) is the process noise covariance, and \( R \) is the measurement noise covariance. Smoothing is then achieved by running a backward pass from the final time step. The outputs are smoothed sequences \(V_s\), \(T_s\), and \(I_s\).
Step 3: XGBoost Model for Initial SOC Prediction. Using the smoothed features \(V_s\), \(T_s\), \(I_s\) as inputs, an XGBoost (eXtreme Gradient Boosting) regression model is trained to predict the SOC. XGBoost is an ensemble learning method that builds a strong predictive model by sequentially adding decision trees that correct the errors of previous ones. Its objective function includes a loss term (e.g., Mean Squared Error) and a regularization term to control model complexity:
$$ \mathcal{L}^{(t)} = \sum_{i=1}^n l(y_i, \hat{y}_i^{(t-1)} + f_t(x_i)) + \Omega(f_t) $$
where \( \Omega(f_t) = \gamma J + \frac{1}{2}\lambda \sum_{j=1}^J w_j^2 \), \(J\) is the number of leaves, and \(w_j\) are leaf weights. The model learns the complex, non-linear mapping from battery operational parameters to SOC.
Step 4: Wavelet Transform Denoising of Predicted SOC. The initial SOC prediction from XGBoost, denoted as \(SOC_{pred}\), may still exhibit high-frequency jitter or bias. Wavelet Transform is employed for denoising. The discrete WT decomposes the signal into approximation coefficients (low-frequency components) and detail coefficients (high-frequency components) across multiple scales:
$$ W_{\psi}[s](a,b) = \frac{1}{\sqrt{|a|}} \int_{-\infty}^{\infty} SOC_{pred}(t) \cdot \psi^*\left(\frac{t-b}{a}\right) dt $$
where \(\psi\) is the mother wavelet (e.g., Daubechies ‘db8’), \(a\) is the scaling parameter, and \(b\) is the translation parameter. A thresholding function (e.g., soft-thresholding) is applied to the detail coefficients to suppress noise:
$$ \eta_{\lambda}(d) = \text{sign}(d) \cdot \max(0, |d| – \lambda) $$
where \(d\) are the detail coefficients and \(\lambda\) is the threshold, often set using a fixed value or a rule like \(\sigma \sqrt{2 \log N}\), with \(\sigma\) estimated from the coefficients. The denoised signal \(SOC_{denoised}\) is reconstructed via the inverse WT.
Step 5: Isotonic Regression for Monotonicity Enforcement. A fundamental physical constraint for an energy storage battery’s SOC during a continuous charge or discharge phase is monotonicity (non-decreasing during charge, non-increasing during discharge). The denoised sequence \(SOC_{denoised}\) may violate this due to residual errors. Isotonic Regression fits a piecewise constant, non-decreasing function \(SOC_{iso}\) to \(SOC_{denoised}\) that minimizes the sum of squared errors subject to the monotonic constraint:
$$ \min \sum_{i=1}^n (SOC_{iso}(i) – SOC_{denoised}(i))^2 $$
$$ \text{subject to } SOC_{iso}(1) \leq SOC_{iso}(2) \leq … \leq SOC_{iso}(n) \text{ for a charge phase.} $$
The Pool Adjacent Violators Algorithm (PAVA) is typically used to solve this. This step ensures the calibrated SOC adheres to expected physical behavior.
Step 6: Return Calibrated SOC Value. The final output \(SOC_{calibrated} = SOC_{iso}\) is returned as the real-time, calibrated SOC value for use by the BMS.
The performance of this strategy was validated using real-world operational data from an energy storage station. The key parameters of the station are summarized in Table 1.
| Product | Specification | Quantity | Unit |
|---|---|---|---|
| Outdoor Liquid Cooled Energy Storage System | 100kW/215kWh, 768V, 0.5C | 12 | unit |
| Battery Module | 43kWh, 153.6V, 0.5C | 5 | set |
| Liquid Cooler | Cooling Capacity: 3kW | 1 | unit |
| Battery Management System (BMS) | Matched with battery | 1 | set |
| Fire Protection System | Smoke/Heat Detection | 1 | set |
| Power Conversion System (PCS) | 100kW, AC 400V/50Hz, DC 600-900V | 1 | set |
Data from multiple points were collected. An example of the data structure from one point is shown in Table 2.
| Field Name | Description (Corresponding Variable) |
|---|---|
| S7A_AI_REAL_BMS1_GBC1_GU | Total Voltage (V) |
| S7A_AI_REAL_BMS1_GBC1_I | Total Current (I) |
| S7A_AI_REAL_BMS1_GBC1_MAX_T | Maximum Temperature (T_max) |
| S7A_AI_REAL_BMS1_GBC1_MIN_T | Minimum Temperature (T_min) |
| S7A_AI_REAL_BMS1_GBC1_SOC | BMS SOC (SOC_BMS) |
Data from March 1 to 18, 2024 (50,502 samples) was used for training the XGBoost model. The model was configured with default parameters (learning_rate=0.3, max_depth=6, n_estimators=100, etc.). On a held-out test set, the model achieved a mean squared error of 0.7869, with the distribution of predicted SOC closely matching that of the actual data (prediction mean=55.0856, variance=32.7915 vs. true mean=55.0938, variance=32.8064).
Data from March 19, 2024 (2,878 samples) was used for prediction and to demonstrate the full calibration pipeline. The raw current and voltage data exhibited significant fluctuations, particularly during the second charging phase. Kalman smoothing effectively reduced these high-frequency variations, producing cleaner signals \(I_s\) and \(V_s\). The XGBoost model’s initial SOC prediction \(SOC_{pred}\) inherited some instability from the input fluctuations. Subsequent wavelet denoising (using ‘db8’ wavelet and a fixed threshold of 1) effectively removed high-frequency jitter, yielding a smoother \(SOC_{denoised}\). Finally, isotonic regression was applied segment-wise (corresponding to identified charge/discharge/idle phases) to produce the monotonic \(SOC_{calibrated}\).
The effectiveness is most evident when comparing the calibrated SOC to the original BMS-reported SOC. In the test data, the BMS SOC showed unphysical, abrupt jumps and irregular plateaus during charging. In contrast, the calibrated SOC produced by our strategy exhibited a smooth, physically consistent monotonic increase during charge phases and decrease during discharge phases. The strategy proved particularly effective in correcting implausible SOC jumps below 20%, where the original BMS value might suddenly drop to 0% or oscillate wildly, while the calibrated value maintained a stable and reasonable trajectory. This demonstrates the robustness of the integrated signal processing and machine learning approach in handling real-world anomalies in energy storage battery data.
In conclusion, this paper presents a robust and effective real-time SOC calibration strategy for energy storage batteries by innovatively fusing signal processing techniques with machine learning. The multi-stage pipeline—comprising Kalman smoothing for input conditioning, XGBoost for non-linear modeling, Wavelet Transform for prediction denoising, and Isotonic Regression for physical constraint enforcement—systematically addresses the key sources of error in SOC estimation: measurement noise, model inaccuracy, prediction variance, and violation of physical laws. Validation on real operational data from an energy storage station confirms that the strategy significantly mitigates SOC jumps and inaccuracies, producing a stable, monotonic, and reliable SOC estimate. This enhances the decision-making capability of the Battery Management System, contributing to safer, more efficient, and longer-lasting energy storage battery operation. Future work will focus on adaptive parameter tuning, incorporating State of Health (SOH) estimation for lifelong adaptation, and extending the framework to pack-level SOC balancing for large-scale energy storage systems.
