# A Novel Real-Time Battery State Estimation Using Data-Driven Prognostics and Health Management
###### Abstract  
This paper presents a novel data-driven framework for real-time State of Charge (SOC) estimation in lithium-ion battery systems using a data-driven Prognostics and Health Management (PHM) approach. The method leverages an optimized bidirectional Long Short-Term Memory (Bi-LSTM) network, trained with enhanced datasets filtered via exponentially weighted moving averages (EWMAs) and refined through SHAP-based feature attribution. Compared against a Extended Kalman Filter (EKF) and Unscented Kalman Filter (UKF) across ten diverse drive cycles, the proposed model consistently achieved superior performance, with mean absolute errors (MAEs) as low as 0.40%, outperforming EKF (0.66%) and UKF (1.36%). The Bi-LSTM model also demonstrated higher R\({}^{2}\) values (up to 0.9999) and narrower 95% confidence intervals, confirming its precision and robustness. Real-time implementation on embedded platforms yielded inference times of 1.3-2.2 s, validating its deployability for edge applications. The framework's model-free nature makes it adaptable to other nonlinear, time-dependent systems beyond battery SOC estimation. P 2025 15 8538 14 June 2025 26 July 2025 27 July  
filter-based methods are valuable for real-time onboard estimation with moderate computational demand, while Bayesian and hybrid models offer superior predictive accuracy and uncertainty quantification, which are especially beneficial when long term SOC/SOH prognostics are required in battery management systems. Bayesian machine learning approaches, notably Gaussian Process Regression (GPR), have been increasingly adopted to predict SOH with quantified uncertainty. Recent reviews highlight that GPR can model nonlinear degradation trends, offering probabilistic SOC/SOH forecasts with both mean and variance, often achieving 1% accuracy over wide SoC ranges [7]. The most well-known algorithms for battery state estimation include Kalman filters and their variants [3]. An in-depth feasibility study of using Kalman filters (KFs) for the state estimation of Li-ion batteries is presented in [8]. It implements a wide variety of KFs for a total number of 224 Panasonic NCR18650 PD Nickel Cobalt Aluminum (NCA) Oxide cells with a nominal capacity (\(C_{nom}\)) of 2.85 Ah used to construct two battery modules. A ternary Li-ion battery SOC was estimated using the Unscented Kalman Filter (UKF) in [9] with maximum absolute errors below 3%. Conversely, the emergence of big data and powerful computers has paved the way for the development of relatively new approaches in data-driven SOC estimation. These methods, also referred to as black-box models, rely on empirical observations rather than extensive knowledge of the underlying processes [3]. One of these methods is the long short-term memory network (LSTM), which exhibits faster convergence to the true SOC compared to the Unscented Kalman Filter (UKF) when the initial SOC is inaccurate. The LSTM achieves a root mean square error (RMSE) and mean absolute error (MAE) of less than 2% and 1%, respectively [10]. Moreover, the LSTM can accurately assess SOC by solely monitoring battery measurements such as current, voltage, and temperature. It does not rely on the information of battery internal chemistry, complex reactions, or model parameter estimation [11]. In this paper we propose a novel data-driven PHM (Prognostics and Health Management) framework for the battery SOC estimation, combining a robust offline trained machine learning model, based on a bidirectional LSTM, with an online inference deployment, to forecast the SOC in real time. The offline processing, extensively explored herein, comprises four main stages: measurement noise reduction, additive features attribution, automated model hyperparameter optimization, and model cross-validation.