🔋 Li-ion Battery Simulator

Visualise lithium intercalation, charge/discharge cycles, State-of-Charge (SoC), and how internal resistance and capacity fade evolve over repeated cycling.

SoC: 50%
Voltage: 3.70 V
Current: 0.00 A
Power: 0.00 W
Cycle: 0
Avail. capacity: 100%

How it works

Li-ion intercalation: During charge, lithium ions move from cathode (LiCoO2) through the electrolyte and intercalate into the graphite anode. Discharge reverses this process, releasing electrons via the external circuit.

OCV curve: The open-circuit voltage follows a characteristic S-shaped profile versus SoC. The simulation uses a piecewise Nernst-like function fitted to typical NMC chemistry (3.0–4.2 V range).

Terminal voltage: Vt = OCV ± I·Rint. During charge: Vt = OCV + I·Rint. During discharge: Vt = OCV − I·Rint.

Capacity fade: Repeated cycling causes lithium plating, SEI growth, and electrode cracking, permanently reducing available capacity. Adjust the Capacity degradation slider to simulate an aged cell.

Temperature effect: Low temperatures increase internal resistance and reduce ion mobility. High temperatures accelerate side reactions. The simulation applies a temperature correction factor to Rint.

About this simulation

This simulation models a lithium-ion cell being charged and discharged at a chosen C-rate. State of Charge (SoC) evolves as ions move between the graphite anode and the NMC-type cathode, and the terminal voltage is computed as Vt = OCV(SoC) ± I·Rint, where the open-circuit voltage follows a piecewise Nernst-like curve fitted to a 3.0-4.2 V chemistry. Internal resistance itself is temperature-dependent, rising in the cold and falling slightly above 25°C, while the Capacity degradation slider permanently shrinks the usable SoC range to mimic an aged cell. Charge and discharge automatically stop at 4.25 V and 2.95 V cutoffs, incrementing the cycle counter.

🔬 What it shows

Li⁺ ions moving between the graphite anode and the NMC cathode across the electrolyte, with the terminal voltage bar, an OCV-vs-SoC curve panel, and a rolling voltage/SoC history chart all updating live as the cell charges or discharges.

🎮 How to use

Press Charge or Discharge to start cycling, or Reset to return to 50% SoC. Adjust C-rate (0.1-5C) to change charge/discharge speed, Temperature (-20 to 60°C) to see its effect on internal resistance, Internal resistance (10-500 mΩ) directly, and Capacity degradation (0-30%) to simulate an aged cell with reduced available capacity.

💡 Did you know?

The stat chips track SoC, Voltage, Current, Power, Cycle count and Available capacity in real time. Notice that the terminal voltage during charge is always slightly higher than the open-circuit voltage, and during discharge slightly lower - that gap is the I·Rint drop, and it grows the faster you charge or discharge.

Frequently asked questions

What does State of Charge (SoC) actually represent?

SoC is the fraction of the battery's usable capacity that is currently stored, expressed as 0-100%. In this simulation it corresponds to how many lithium ions are intercalated in the graphite anode versus the cathode: at high SoC most ions sit in the anode, and during discharge they migrate back to the cathode, driving SoC toward 0%.

Why does the terminal voltage differ from the OCV curve?

The open-circuit voltage (OCV) is what the cell would read with no current flowing, and it follows a fixed S-shaped curve versus SoC. Under load, the terminal voltage is the OCV plus or minus the voltage drop across the internal resistance (I·Rint): higher during charge, lower during discharge. That is why the same SoC can show different voltages depending on C-rate and whether you are charging or discharging.

Why does internal resistance change with temperature?

Lower temperatures slow lithium-ion mobility in the electrolyte and across the electrode interfaces, which increases internal resistance - the simulation raises Rint roughly 1.2% per degree below 25°C. Warmer conditions slightly reduce resistance by improving ion transport, though real cells eventually suffer from accelerated side reactions at high temperature, which is not modelled here as a resistance change.

What causes capacity fade in a real Li-ion battery?

Repeated charge/discharge cycling gradually and irreversibly reduces how much charge a cell can hold. The main causes are growth of the solid-electrolyte interphase (SEI) layer on the anode, lithium plating during fast or cold charging, and mechanical cracking of electrode particles. The Capacity degradation slider mimics this by scaling down the maximum available SoC range and ion count shown in the animation.

Why do charge and discharge stop automatically at certain voltages?

Real Li-ion cells have safe voltage limits: charging above roughly 4.2-4.3 V or discharging below about 3.0 V accelerates degradation and can trigger unsafe reactions. The simulation reproduces this by ending the charge cycle at SoC = 100% or a 4.25 V cutoff, and ending discharge at SoC = 0% or a 2.95 V cutoff, then incrementing the cycle counter.