This project simulates lithium-ion battery charging using a system of coupled ordinary differential equations. We capture state-of-charge (SOC), SEI growth, thermal behaviour, and transient overpotentials under different charging policies such as constant voltage, constant current, and pulsed profiles.
The core of this work is an ODE-based model of a lithium-ion cell under charge. The state vector is:
\[ y(t) = \big[ V(t), I(t), R(t), T(t), \text{SOC}(t), \text{SEI}(t), V_{\text{transient}}(t) \big] \]
Each mechanism (charging, thermal dynamics, SEI formation, and transient RC behavior) contributes a set of differential equations. These are summed into a total derivative \( \frac{dy}{dt} \), which is integrated via a 4th-order Runge–Kutta (RK4) scheme.
The model is modular: each physical mechanism is implemented in its own class with a
get_gradient(y, t, v_source) method returning contributions to
\( \frac{dy}{dt} \).
Charging is driven by a set of control policies from charging_policy.py.
Each policy exposes a get_voltage(t, y) method that computes the source
voltage based on the current state.
Visit the Policies & Mechanisms page for details.
Use the Simulation page to interactively explore how different policies influence battery state over time.