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.
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