Fast charging of lithium-ion batteries is a multi-objective control problem that requires reducing charging time and sustaining high energy throughput while suppressing accelerated degradation and safety-critical electrochemical reactions. Conventional protocols are easy to implement but have limited ability to adapt to variations in battery chemistry, operating conditions, and aging state. Model-based optimization and conventional data-driven control often require accurate models, costly iterative search, or task-specific policies. We develop a large language model (LLM)-empowered intelligent agent for adaptive battery fast-charging control. In this closed-loop framework, the agent interprets structured battery states, generates executable charging actions, observes the resulting battery response, and continuously adjusts subsequent decisions. We construct a large-scale simulation corpus with PyBaMM across five battery chemistries and 11 parameter sets and convert the resulting state-action-response trajectories into structured process data for agent training. Our two-stage strategy combines supervised fine-tuning (SFT) and Group Relative Policy Optimization (GRPO). SFT establishes battery-control semantics and feasible decision priors from simulation-derived demonstrations. GRPO aligns the agent with a multi-objective control objective covering energy throughput, degradation mitigation, and operational constraints. Closed-loop simulations show that, under matched energy-throughput requirements, the agent achieves longer cycling life than conventional charging baselines and optimization-based strategies across heterogeneous battery configurations. This study provides a simulation-grounded proof of concept for using LLM agents as sequential decision makers in battery management and takes a step toward language-model-enabled control of physical energy systems.
Figures & tables
Fig. 1 : Simulated charging-signal distributions for the five physics-based battery models. Results are presented for the SPM, SPMe, DFN, LOQS, and Full lead–acid models. For each model, the four panels show terminal voltage versus SOC, charging-current magnitude versus SOC, cell-temperature rise relative to ambient versus SOC, and SOC versus elapsed charging time, respectively. The hexagonal-bin color indicates the logarithmic sample density, whereas the red curve denotes the pooled binned median.
Single representative spherical particle is resolved in each electrode. Solid-state diffusion and interfacial kinetics are retained, whereas electrolyte spatial dynamics are neglected [ 29 ] . The principal equations are ∂t∂cs,k=r21∂r∂(Ds,kr2∂r∂cs,k),−Ds,k∂r∂cs,kr=Rk=Fjk,V=Up(cs,psurf)−Un(cs,nsurf)+ηp−ηn−IRΩ.
Extends the SPM by resolving through-cell electrolyte concentration and potential dynamics, providing an intermediate-fidelity approximation [ 29 ] . In addition to the SPM equations, εe∂t∂ce=−∂x∂Ne+F1−t+0akjk,Ne=−Deeff∂x∂ce+Ft+0ie,∂x∂ie=akjk, with the corresponding electrolyte-polarization contribution included in the terminal voltage.
Pseudo-two-dimensional porous-electrode model resolving both particle-scale solid diffusion and electrode-scale electrolyte transport. The principal electrochemical relations include ∂x∂(σkeff∂x∂ϕs,k)=akjk,∂x∂ie=akjk,jk=2j0,ksinh(2RTFηk),ηk=ϕs,k−ϕe−Uk, together with the solid-phase diffusion and electrolyte mass-balance equations [ 36 ] .
LOQS
Lead–acid; Sulzer2019 parameter set [ 37 ]
Leading-order quasi-static porous-electrode approximation for regimes with relatively weak electrolyte concentration gradients. Starting from ε∂t∂ce=−∂x∂Ne+Fskjk,∂x∂ie=akjk,is+ie=I,ce(x,t)=ce(0)(t)+O(Cd),ϕe(x,t)=ϕe(0)(t)+O(Cd), where Cd denotes the diffusional C-rate [ 37 ] .
Full
Lead–acid; Sulzer2019 parameter set [ 37 ]
Spatially resolved porous-electrode model retaining electrolyte transport, charge conservation, electrode kinetics, and porosity evolution: ε∂t∂ce=−∂x∂Ne+Fskjk,∂x∂ie=akjk,jk=2j0,ksinh(2RTFηk),∂t∂ε=−βkjk. This model provides the fully resolved lead–acid reference formulation used in the corpus [ 37 ] .
TABLE I : Physics-based battery models and parameterizations used to construct the simulation corpus. The equations summarize the principal physics retained by each model, while the numerical coefficients and constitutive relations are provided by the corresponding PyBaMM parameter sets.
Fig. 2 : Physics-grounded GRPO for adaptive battery fast charging. Starting from the SFT-initialized policy, the LLM agent samples multiple candidate actions for the same battery state. The actions are safety-filtered and evaluated through one-step PyBaMM rollouts, with rewards balancing SOC progress against temperature, degradation, safety intervention, and charging time. Group-relative advantages derived from these physics-based rewards are then used to update the policy toward safer and more effective charging decisions.
State condition
Initialized action
zt≥ztar
terminate
Tt≥55∘C or Vt≥4.17V
rest (120 s)
Tt≥42∘C or Vt≥4.05V
charge_cc (0.25C, 120 s)
ztar−zt≥0.35 and Tt≤35∘C
charge_cc (0.8C, 120 s)
Otherwise
charge_cc (0.5C, 120 s)
TABLE II : Expert action initialization for SFT.
Invalid output
Penalty rt
No JSON object found
−12
Invalid JSON syntax
−10
Invalid decoded action fields
−8
Environment transition failure
−6
TABLE III : Penalties for invalid agent outputs.
Controller
Charging strategy
CCCV-0.5C / 1C / 2C*
Constant-current charging followed by voltage-limited charging.
MSCC
SOC-dependent charging at 1.2C, 0.8C, and 0.4C.
Pulse
Three 1.2C charging steps followed by a rest period.
Heuristic C-rate adjustment based on SOC and temperature.
P-SOC
Proportional SOC feedback (gain 3; 0.2–1.5C).
TABLE IV : Comparison of baseline charging strategies and the proposed LLM agent.
Fig. 3 : Lifetime and capacity-retention comparison across four battery model–parameter configurations under (a–d) isothermal (25 °C) and (e–h) non-isothermal conditions. Each panel shows SOH versus cumulative charge-stage energy Ech , with insets reporting E80 and N80 at the 80% SOH threshold. Right-hand plots show capacity loss versus energy and cumulative energy versus cycle. Solid and dashed lines denote LLM strategies and baseline methods, respectively.
Model Parameter set
Thermal
E∗ (Wh)
CCCV-1C SOH (%)
Best non-LLM SOH (%)
LLM ( β=.01 ) SOH (%) ( Δ , pp)
LLM ( β=.10 ) SOH (%) ( Δ , pp)
LLM ( β=.40 ) SOH (%) ( Δ , pp)
DFN Chen2020
Iso.
150.9
27.56
39.16
45.99 (+18.43)
45.99 (+18.43)
45.99 (+18.43)
Noniso.
147.7
33.66
46.01
46.73 (+13.08)
46.55 (+12.89)
46.73 (+13.08)
SPM Chen2020
Iso.
149.9
29.97
41.78
43.08 (+13.11)
43.08 (+13.11)
43.08 (+13.11)
Noniso.
147.0
32.24
45.61
43.87 (+11.63)
44.19 (+11.94)
43.87 (+11.63)
SPMe Chen2020
Iso.
147.3
27.69
38.56
46.79 (+19.09)
47.08 (+19.39)
47.54 (+19.85)
Noniso.
143.7
34.37
47.08
47.90 (+13.53)
47.96 (+13.60)
48.49 (+14.13)
TABLE V : Matched-energy capacity retention across thermal conditions.
Fig. 4 : Cycle-based lifetime and matched-energy capacity retention. Bars show N80, N50, and N20; annotations report SOH differences relative to CCCV-1C at equal cumulative charge-stage energy, in percentage points.
Comparator
DFN / Chen2020
SPM / Chen2020
Time red. (%)
Degradation red. (%)
Energy-rate gain (%)
Time red. (%)
Degradation red. (%)
Energy-rate gain (%)
CCCV-0.5C
+65.8
+44.3
+207.0
+54.1
+42.2
+203.7
CCCV-1C
+46.7
+19.3
+50.5
+27.5
+17.4
+50.5
CCCV-2C*
+25.7
+1.0
+1.6
+0.7
-2.5
-1.1
MSCC
+54.6
+27.4
+80.5
+38.5
+24.4
+78.7
Pulse
+29.5
+21.7
+41.3
+6.3
+19.0
+40.7
TABLE VI : Charging-time reduction, matched-energy degradation reduction, and charge-stage energy-rate gain for LLM preference β=0.01 .
Fig. 5 : Charge and discharge endpoint current, voltage, and temperature versus normalized stage progress. Lines and shading indicate cycle medians and 10th–90th percentiles. Annotations report action-level voltage and peak-temperature exceed rates.
Parameterizing high-fidelity "digital twins" of batteries is a critical yet challenging inverse problem that hinders the pace of battery innovation. Prevailing methods formulate this as a black-box optimization (BBO) task, employing algorithms that are sample-inefficient and blind to the underlying physics. In this work, we introduce a new paradigm that reframes the inverse problem as a reasoning task, and present Battery-Sim-Agent, the first framework to deploy a Large Language Model (LLM) agent in a closed loop with a high-fidelity battery simulator. The agent mimics a human scientist's workflow: it interprets rich, multi-modal feedback from the simulator, forms physically-grounded hypotheses to explain discrepancies, and proposes structured parameter updates. On a systematically constructed benchmark suite spanning diverse battery chemistries, operating conditions, and difficulty levels, our agent significantly outperforms strong BBO baselines like Bayesian optimization in identifying accurate parameters. We further demonstrate the framework's capability in complex long-horizon degradation fitting tasks and validate its practical applicability on real-world battery datasets. Our results highlight the promise of LLM-agents as reasoning-based optimizers for scientific discovery and battery parameter estimation.
Jiawei Chen, Xiaofan Gui, Shikai Fang +4
Peking University Beijing, China · Microsoft Research Beijing, China · Chalmers University of Technology Gothenburg, Sweden
Accurate state-of-charge (SOC) estimation is critical for the safe and efficient operation of lithium-ion batteries in battery management systems (BMS). Although data-driven approaches can effectively capture nonlinear battery dynamics, many existing methods rely on long historical input sequences, resulting in high computational cost and introducing padding-induced positional bias at the beginning of drive cycles. To address these limitations, we propose C2L-Net, a novel context-to-latest data-driven framework for realistic online SOC estimation using only a short historical window (20 s). Unlike existing short-receptive-field or long-history models, the proposed framework explicitly separates contextual encoding from latest-measurement updating, enabling both efficient temporal modeling and rapid adaptation to dynamic battery states. The proposed model incorporates a chunk-based feature extraction mechanism that combines Theta Attention Pooling with a Fourier-based Seasonality Basis to capture local temporal patterns while reducing sequence length. A causal context encoder, integrating a gated recurrent unit (GRU) with Causal Cosine Attention, models temporal dependencies without information leakage. Furthermore, a latest-measurement decoder, inspired by recursive filtering, updates the contextual state using the most recent measurement, enhancing responsiveness to dynamic operating conditions. Extensive experiments on a public lithium-ion battery drive-cycle dataset under multiple fixed-temperature conditions demonstrate that the proposed method achieves state-of-the-art or competitive accuracy while significantly improving computational efficiency. In particular, C2L-Net achieves up to 60 times faster inference and requires fewer parameters than recent data-driven baselines, while maintaining robust performance across unseen driving profiles.
Khoa Tran, T. Nguyen-Thoi, Vin Nguyen-Thai +3
Data Science Laboratory, Faculty of Information Technology, Ton Duc Thang University, Ho Chi Minh City, Vietnam. · Laboratory for Applied and Industrial Mathematics, Institute for Computational Science and Artificial Intelligence, Van Lang University, Ho Chi Minh City, 70000, Viet Nam. · Faculty of Mechanical, Electrical, and Computer Engineering, Van Lang School of Technology, Van Lang University, Ho Chi Minh City, 70000, Viet Nam. +6
Battery life remains a critical challenge for mobile devices, yet existing power management mechanisms rely on static rules or coarse-grained heuristics that ignore user activities and personal preferences. We present PowerLens, a system that tames the reasoning power of Large Language Models (LLMs) for safe and personalized mobile power management on Android devices. The key idea is that LLMs' commonsense reasoning can bridge the semantic gap between user activities and system parameters, enabling zero-shot, context-aware policy generation that adapts to individual preferences through implicit feedback. PowerLens employs a multi-agent architecture that recognizes user context from UI semantics and generates holistic power policies across 18 device parameters. A PDL-based constraint framework verifies every action before execution, while a two-tier memory system learns individualized preferences from implicit user overrides through confidence-based distillation, requiring no explicit configuration and converging within 3--5 days. Extensive experiments on a rooted Android device show that PowerLens achieves 81.7% action accuracy and 38.8% energy saving over stock Android, outperforming rule-based and LLM-based baselines, with high user satisfaction, fast preference convergence, and strong safety guarantees, with the system itself consuming only 0.5% of daily battery capacity.
Xingyu Feng, Chang Sun, Yuzhu Wang +5
China University of Geosciences (Beijing) · Shenzhen University · Hong Kong University of Science and Technology +1