Lemonergy Wiki

Worked examples

Recover a cell’s resistance and capacitances from pulse data

Follow the CT-01 parameter-recovery experiment: prepare synthetic pulse data, estimate equivalent-circuit parameters and check the recovered response.

Document created Updated
Draft explanationSource record reviewed

Recover parameters from a known pulse response

Benchmark MW-HPPC-2RC-SOC40-25C recovers R0, R1 and τ1 for the BAK N18650CL-29 row at 25 °C and 0.4 SOC. OCV, R2 and τ2 stay fixed. The comparison uses authored noiseless analytical waveforms, not measured HPPC data.

V[n] = OCV − I[n]R0 − v1[n] − v2[n], with exact zero-order-hold RC updates on an authored 0.1 s grid. Calibration uses 6.1871 A; the derived holdout uses 5 A. Each has 2,100 end-of-step samples over the authored rest/pulse sequence.

Connect the fit to the prepared forward model

The two-RC battery pulse tutorial explains how resistance and two polarization states produce terminal voltage. Its exact prepared model opens in the public viewer, where you can inspect and run it read-only. Choose Edit with Pro to change the model in the authenticated Design editor. The picture below is that real prepared model, showing what the fitted parameters mean in the calculation; it is not a parameter-fitting dialog.

The prepared two-RC forward model in Lemonergy, used here to explain the roles of fitted parameters
Battery pulse: two RC branches: the complete prepared graph and Display outputs in the public Lemonergy example viewer. Fit, zoom and scroll reveal its connected blocks; the graph is read-only. Captured .

The fitting experiment is a separate repository benchmark. Its optimizer runs through the benchmark's JavaScript path; it is not the Rust/WebAssembly forward solver or an interactive Studio fitting feature. Use the procedure below to reproduce that specific experiment.

Recorded recovery and gates

The linked campaign fit result was recorded at 2026-10-01T15:47:38.477Z and has overall verdict PASS. All eight benchmark-level checks passed. These are the locally declared experiment gates.

The retained fit result records recovery against the source parameter row at 25 °C and SOC 0.4. The table separates that source row from the fitted values and locally declared error limits; these are model parameters, not manufacturer cell ratings.

ParameterSource valueRecovered valueUnitRelative error (%)Error limit (%)
R040.83940.84130972mΩ0.005656≤ 5
R12.03432.031905775mΩ0.117693≤ 10
τ11.13181.132871591s0.094680≤ 10

The holdout uses an authored 5 A pulse response from the same linear model. Its error metrics compare the recovered model with the separately authored oracle.

Holdout metricRecorded errorUnitError limit
Root mean square error0.000841162mV/cell≤ 2
Maximum absolute error0.010181481mV/cell≤ 5

Direct forward checks at exact published parameters use a stricter 1e−6 mV/cell gate for both RMSE and maximum error. All four checks pass against the separately authored oracle.

Reproduce and inspect

This fitting benchmark is separate from the public prepared-example viewer. Open the linked two-RC pulse tutorial's prepared model, confirm Battery pulse: two RC branches is selected, and choose Run prepared model to exercise the forward response only.

The following commands require the full Lemonergy engineering repository; the public viewer source download does not include this historical fitting benchmark. From that engineering repository root, run:

node benchmarks/cross-tool/mathworks-hppc-2rc/run.mjs

Check valid and deliberately invalid cases with:

node --test tests/distilled-mathworks-hppc.test.mjs tests/distilled-mathworks-hppc-negative-controls.test.mjs

Read the linked fit result for the parameter dispositions, all eight gates, optimizer stages, sensitivity probes and scientific evidence checksum.

Interpret the outcome

R0, R1 and τ1 start at +20%, +35% and +40% relative to source values. The deterministic bounded Nelder–Mead stages terminate at their evaluation budgets; convergence is not claimed. The recorded execution uses 180 candidate evaluations: nine sensitivity probes and 171 proposals, with five cache hits.

R2 and τ2 are fixed, so their zero error is not a fitting success. The 5 A holdout is derived from the same linear model; it is not an independent experiment.

The source reports a measured pulse minimum of 3.4001 V, but that measured trace was not imported. The authored waveform’s different minimum is recorded as not compared. The source FitPc value is not equated to Lemonergy RMSE.

No external commercial tool was executed. The wider SOC/temperature program and measured-data validation remain open. This local result does not establish physical accuracy or authorize external performance claims.

This is a historical result tied to its retained inputs, settings, reference version and source fingerprints. The current source tree or Wasm artifact may differ; a new prepared-model run creates new evidence and does not retroactively update this result.

Troubleshoot and extend the study

ObservationInterpretation and next step
Fixed parameters show zero errorThey were not estimated; evaluate only the fitted parameters as recovery results
A fitting stage reaches its evaluation budgetInspect its residual and retained proposals; do not relabel termination as convergence
Training error is small but a new duty differsPreserve the holdout and compare both traces before accepting parameters
Measured data differ from the synthetic waveformEstablish measurement quality and model adequacy; the noiseless contract does not cover that discrepancy

Before using a fit for engineering decisions, extend the data across operating points and independent measured duties. Experimental two-RC identification research gives useful context for pulse-based parameter identification; it is related reading, not evidence that this benchmark reproduced the paper.

See the forward pulse tutorial to inspect the model, result interpretation for numerical gates, and the source parameter record for the retained operating point.

Models and evidence

  • Download HPPC fit evidence (JSON) 2186989 bytes
    Artifact provenance

    Repository origin: benchmarks/cross-tool/matlab-campaign/evidence/hppc/result.json

    SHA-256: a989986e6048bf620ebc9f0a9c0856253b6b023551e1b40c43377cd7ff8cfff3

  • Download reference contract (JSON) 22401 bytes
    Artifact provenance

    Repository origin: benchmarks/cross-tool/matlab-campaign/evidence/reference.json

    SHA-256: 5fafd62331140b6ea2c47df3ba25dcaed14632d63e1b9a6e0537fc31c688d171

  • Browse prepared examples

Downloads preserve recorded inputs and results. Opening a saved result does not run a new simulation.

Related papers and references