The accurate and reliable estimation of the State of Charge (SOC) is a cornerstone for the safe, efficient, and durable operation of energy storage battery systems. Serving as the primary indicator of remaining usable energy, precise SOC knowledge is indispensable for Battery Management Systems (BMS) to optimize charge/discharge schedules, prevent detrimental over-charge or over-discharge conditions, and ultimately enhance user experience through predictable performance. Traditional SOC estimation methods, while foundational, often struggle with the dynamic, non-linear behavior of energy storage battery systems under real-world operating conditions, leading to estimation jumps, drift, and inaccuracies.

Common strategies include the Open-Circuit Voltage (OCV) method, which is simple but slow to respond; Coulomb Counting (current integration), which is prone to error accumulation; model-based filters like the Kalman Filter, which require precise system models; and data-driven machine learning approaches, which demand large datasets. Each method presents a trade-off between complexity, accuracy, and robustness. To address the persistent challenges of SOC jump and inaccuracy during real-time calibration for energy storage battery packs, this article proposes a novel, integrative strategy that synergistically combines advanced signal processing techniques with machine learning algorithms. The core innovation lies in a multi-stage pipeline designed to sequentially mitigate data noise, learn complex battery dynamics, refine predictions, and enforce physical constraints.
1. Related Work and Strategy Overview
The quest for accurate SOC estimation has led to diverse methodologies. A brief comparison highlights their respective strengths and weaknesses in the context of energy storage battery applications.
| Strategy | Key Advantages | Primary Limitations |
|---|---|---|
| Open-Circuit Voltage (OCV) | Simple, intuitive, low computational cost. | Static in nature, slow dynamic response, highly sensitive to temperature and aging. |
| Coulomb Counting (Current Integration) | Good dynamic tracking, effective during active charge/discharge. | Requires high-precision current sensors, susceptible to error accumulation from noise and coulombic efficiency uncertainty. |
| Kalman Filter (and variants) | Optimal estimation in a dynamic sense, handles measurement noise effectively. | Relies on an accurate battery model (e.g., equivalent circuit model), parameter identification can be complex. |
| Machine/Deep Learning | Capable of modeling highly non-linear and complex relationships, high potential accuracy. | Requires extensive, high-quality training data; model can be a “black box”; computational cost for complex models. |
| Multi-Sensor Data Fusion | Improves robustness by reducing reliance on any single sensor stream. | Increases system complexity, requires careful sensor calibration and synchronization. |
The proposed strategy aims to harness the strengths of several approaches while mitigating their weaknesses. It does not rely on a single intricate physical model but constructs an empirical model from operational data. Crucially, it incorporates pre- and post-processing stages specifically designed to handle the noisy, real-world signals from energy storage battery systems. The complete workflow is illustrated below and consists of six key stages: data acquisition, Kalman smoothing of input features, XGBoost-based SOC prediction, wavelet transform denoising of the predicted SOC, isotonic regression for monotonicity enforcement, and finally, the output of the calibrated SOC value.
2. Methodology: The Integrated Calibration Pipeline
2.1 Data Acquisition and Preprocessing
In a real-world energy storage battery system, the BMS periodically logs key operational parameters. For this strategy, the fundamental measurements are terminal voltage (V), current (I), temperature (T), and the BMS’s own SOC estimate. These time-series data streams, sampled at regular intervals (e.g., every 30 seconds), form the raw input. However, signals like current can exhibit significant high-frequency fluctuations due to load changes and measurement noise, which can adversely affect downstream modeling. The first critical step is therefore signal conditioning.
2.2 Kalman Smoothing for Input Features
A Kalman smoother is applied independently to the voltage, current, and temperature sequences. Unlike the Kalman filter used for state estimation, the smoother processes the entire dataset to provide an optimal estimate of the signal at each point using both past and future measurements. For a one-dimensional sequence like battery current, the algorithm operates with a simple state model. At each time step \(k\), it maintains a predicted state \(\hat{x}_k^{\text{pred}}\) and its covariance \(P_k^{\text{pred}}\), along with a measured value \(z_k\) with known measurement noise covariance \(R\).
The standard Kalman filter equations are applied in a forward pass, and then a backward smoothing pass is performed. The core update equations for the forward filter are:
Prediction:
$$ \hat{x}_k^{\text{pred}} = A \hat{x}_{k-1} $$
$$ P_k^{\text{pred}} = A P_{k-1} A^T + Q $$
Update (Correction):
$$ K_k = \frac{P_k^{\text{pred}} H^T}{H P_k^{\text{pred}} H^T + R} $$
$$ \hat{x}_k = \hat{x}_k^{\text{pred}} + K_k (z_k – H \hat{x}_k^{\text{pred}}) $$
$$ P_k = (I – K_k H) P_k^{\text{pred}} $$
Where \(A\) is the state transition matrix (often set to 1 for a slowly varying signal), \(H\) is the observation matrix (1 for direct measurement), \(Q\) is the process noise covariance, and \(R\) is the measurement noise covariance. The smoothed estimate \(\hat{x}_k^{\text{smooth}}\) is then computed via the Rauch–Tung–Striebel (RTS) smoother algorithm, which provides a more accurate estimate than the forward filter alone. This process effectively attenuates high-frequency noise in the voltage, current, and temperature signals, providing cleaner input features \(\tilde{V}, \tilde{I}, \tilde{T}\) for the prediction model. This step is vital for stabilizing the learning process of the machine learning model applied to the energy storage battery data.
2.3 XGBoost Model for SOC Prediction
With the smoothed features \(\tilde{V}, \tilde{I}, \tilde{T}\) as inputs, a supervised regression model is trained to predict the target SOC. The eXtreme Gradient Boosting (XGBoost) algorithm is chosen for its high performance, efficiency, and ability to model complex, non-linear relationships—perfect for capturing the intricate electro-thermal dynamics of an energy storage battery. XGBoost is an ensemble method that builds a strong predictive model by sequentially adding weak learners (decision trees), each correcting the errors of its predecessor.
The objective function \(L^{(t)}\) at the \(t\)-th iteration (tree) is a combination of a differentiable loss function \(l\) (e.g., squared error) and a regularization term \(\Omega\) that controls model complexity:
$$ L^{(t)} = \sum_{i=1}^{n} l(y_i, \hat{y}_i^{(t-1)} + f_t(x_i)) + \Omega(f_t) $$
where \(y_i\) is the true SOC, \(\hat{y}_i^{(t-1)}\) is the prediction from the previous iteration, \(f_t\) is the new tree being added, and \(x_i\) represents the input feature vector \([\tilde{V}, \tilde{I}, \tilde{T}]\). The model is trained on historical data, learning the mapping: \(f_{\text{XGB}}: (\tilde{V}, \tilde{I}, \tilde{T}) \rightarrow \text{SOC}_{\text{pred}}\). Key hyperparameters like learning rate, maximum tree depth, and number of estimators are typically tuned via cross-validation, though robust default values often yield excellent results for energy storage battery applications.
2.4 Wavelet Transform Denoising of Predicted SOC
Even with smoothed inputs, the XGBoost output \(\text{SOC}_{\text{pred}}\) may contain residual high-frequency prediction errors or artifacts. To further refine the signal, Wavelet Transform (WT) denoising is employed. Unlike Fourier analysis, WT provides time-frequency localization, making it ideal for analyzing non-stationary signals like the SOC trajectory of an energy storage battery during dynamic cycling.
The denoising process involves three steps:
1. Decomposition: The \(\text{SOC}_{\text{pred}}\) signal is decomposed into wavelet coefficients \(W_{j,k}\) using a selected mother wavelet (e.g., Daubechies ‘db8’):
$$ W_{j,k} = \langle \text{SOC}_{\text{pred}}, \psi_{j,k} \rangle $$
where \(\psi_{j,k}\) are scaled and translated versions of the mother wavelet, with \(j\) representing the scale (frequency) and \(k\) the position (time).
2. Thresholding: A threshold \(\lambda\) is applied to the detailed coefficients (high-frequency components). Common strategies include the universal threshold \(\lambda = \hat{\sigma} \sqrt{2 \log N}\), where \(\hat{\sigma}\) is an estimate of the noise level (e.g., median absolute deviation of coefficients) and \(N\) is the signal length. Soft-thresholding is often used:
$$ \eta_{\text{soft}}(W, \lambda) = \text{sign}(W) \cdot \max(|W| – \lambda, 0) $$
3. Reconstruction: The inverse wavelet transform is applied to the thresholded coefficients to reconstruct the denoised signal \(\text{SOC}_{\text{denoised}}\).
This step effectively filters out spurious fluctuations in the predicted SOC, yielding a smoother and more physically plausible estimation for the energy storage battery.
2.5 Isotonic Regression for Monotonicity Enforcement
A fundamental physical constraint during distinct charge or discharge phases of an energy storage battery is that the SOC should change monotonically (non-decreasing during charge, non-increasing during discharge). The \(\text{SOC}_{\text{denoised}}\) sequence, while smoother, may still violate this constraint due to residual errors. Isotonic Regression is applied to enforce this monotonicity.
Given a sequence of indices \(x_i\) (e.g., time steps within a charge phase) and the corresponding \(\text{SOC}_{\text{denoised}, i}\) values, isotonic regression finds a weighted least squares fit \(\hat{y}_i\) subject to the monotonic constraint \(\hat{y}_i \leq \hat{y}_j\) for all \(i < j\). It solves the optimization problem:
$$ \min_{\hat{y}} \sum_{i=1}^{n} w_i (\text{SOC}_{\text{denoised}, i} – \hat{y}_i)^2 \quad \text{subject to} \quad \hat{y}_1 \leq \hat{y}_2 \leq … \leq \hat{y}_n $$
for a charge phase (constraint is reversed for discharge). The PAVA (Pool Adjacent Violators Algorithm) provides an efficient solution. By applying isotonic regression separately to identified charge and discharge segments in the energy storage battery data, the final output \(\text{SOC}_{\text{calibrated}}\) is guaranteed to be physically consistent in its monotonic behavior, eliminating non-physical “dips” during charge or “rises” during discharge.
3. Experimental Validation and Results
The proposed strategy was validated using real-world operational data from a commercial energy storage station. The station configuration included multiple 100kW/215kWh liquid-cooled energy storage battery systems. Data such as total voltage, current, max/min temperature, and BMS-reported SOC were logged every 30 seconds.
3.1 Data Preparation and Model Training
Approximately 18 days of historical data (e.g., March 1-18) were used for training and validation. The Kalman smoother was applied to the voltage, current, and temperature streams, significantly reducing high-frequency noise, as visually confirmed by the smoothed trajectories. The XGBoost model was then trained on 80% of this smoothed data, with 20% held out for testing.
The model achieved a low Mean Squared Error (MSE) on the test set (e.g., ~0.79), and the distribution (mean, variance) of the predicted SOC closely matched that of the true SOC labels, indicating the model successfully learned the underlying relationship for the energy storage battery.
3.2 SOC Calibration on Unseen Data
The trained pipeline was applied to a subsequent day’s data (e.g., March 19). The raw current and voltage data for this day exhibited substantial fluctuations, particularly during a second charge phase.
- Kalman Smoothing: The input features were smoothed, mitigating the most severe fluctuations.
- XGBoost Prediction: The initial SOC prediction from the smoothed features still showed unrealistic volatility during the problematic charge phase, inherited from the input perturbations.
- Wavelet Denoising: Applying WT denoising with a ‘db8’ wavelet and an empirically tuned threshold (e.g., λ=1) effectively suppressed these spurious oscillations, producing a much smoother \(\text{SOC}_{\text{denoised}}\) curve.
- Isotonic Regression: The data was segmented into charge/discharge phases. Isotonic regression was applied per segment, ensuring the final \(\text{SOC}_{\text{calibrated}}\) increased monotonically during charges and decreased monotonically during discharges.
The final calibrated SOC trajectory was compared against the original BMS-reported SOC. The results were striking: where the original SOC displayed unphysical jumps and drops (e.g., sudden falls from 14% to 0% in low-SOC regimes, or erratic behavior during charge), the calibrated SOC presented a stable, smooth, and physically plausible evolution. This demonstrated the strategy’s effectiveness in correcting erroneous BMS estimations and providing a reliable reference for the energy storage battery‘s true state.
4. Discussion and Advantages
The integrative strategy presents several key advantages for real-time SOC calibration in energy storage battery systems:
- Robustness to Noise: The dual-stage noise handling (Kalman smoothing on inputs, WT denoising on output) makes the strategy highly resilient to measurement noise and transient disturbances common in field operations.
- High Accuracy without Complex Physics: The XGBoost model empirically learns the complex, non-linear battery behavior from data, bypassing the need for precise, hard-to-identify equivalent circuit model parameters.
- Physical Consistency: The isotonic regression post-processor guarantees that the final output adheres to the fundamental monotonic property of SOC, a feature often overlooked by purely data-driven models.
- Practical Applicability: The pipeline is designed for sequential, real-time processing. Once the XGBoost model is trained offline, the online computational cost is manageable for modern BMS hardware, involving smoothing filters, a fast tree ensemble prediction, and lightweight post-processing algorithms.
This approach effectively fuses the predictive power of machine learning with the signal conditioning prowess of classical signal processing and the constraint enforcement of statistical regression, creating a holistic solution tailored for the challenges of energy storage battery management.
5. Conclusion
This article has detailed a novel, integrated strategy for the real-time calibration of State of Charge in energy storage battery systems. By strategically combining Kalman smoothing, XGBoost machine learning, wavelet transform denoising, and isotonic regression, the method addresses the core issues of signal noise, model inaccuracy, and physical inconsistency that plague traditional SOC estimation techniques. Experimental validation on real operational data confirms its capability to transform noisy, jumpy SOC readings into stable, accurate, and physically meaningful estimates. This strategy provides a robust and practical framework for enhancing BMS performance, contributing to safer operation, improved efficiency, and extended lifespan of energy storage battery assets. Future work may explore adaptive thresholding in the wavelet stage, online model adaptation to account for battery aging, and integration with other state estimation techniques for a comprehensive battery digital twin.
