Battery Pack Generator · model check
The generator's thermal and electrical model, run over 30 real rides of an electric scooter and checked against what the pack's own sensors recorded in the same seconds. The model is given time, current and the pack's starting charge. Voltage and temperature are its predictions.
how it was run
Two numbers come from independent measurements on this scooter; everything else is an application default. No parameter was tuned against the curves being compared.
Where the two resistances come from. The 128 mΩ is measured, not chosen: the scooter
repo confirms it three independent ways — v_in against current_in
on the controller side gives 128 mΩ, pack_v against pack_i on the
BMS side 129, and the fourteen groups summed separately 128.7.
The 64 mΩ is then back-solved rather than measured. In a 14S7P pack the cells contribute
s/p = 14/7 = twice one cell's resistance, so 128/2 = 64 is what the field needs
to hold for the model's total to land on the measured one. It happens to agree with the
repo's own per-cell estimate of about 62 mΩ — but that estimate carries a warning worth
repeating: it includes the interconnects, the connectors and the BMS FETs, and calling it
cell resistance would be wrong. A healthy 18650 of this type sits nearer 30–40 mΩ, so a
third to a half of the 64 is something other than the cell itself. This log cannot separate
the two.
For what is compared here, it does not have to. Voltage is predicted at the controller,
where the sag is the current times the whole series path, so one lumped resistance
is the right construction rather than an approximation. And simulate() computes
heat as I²·packR against a heat capacity of cells only, so it puts all of the
heat into the cells however the resistance is attributed — splitting the same 128 mΩ between
cells and joint resistance would not move the temperature curve at all. The split would
matter to the per-element heat map, which nothing here tests.
one ride, whole
The longest record in the archive. On top, the current the model was given; below it, what the model made of that, over what the pack measured. The stairs on the measured temperature are the sensor's 1 °C step, not noise.
where the model drifts
One point per ride. Temperature carries the only systematic dependency in the set: the longer the record, the worse it gets. Voltage shows no such thing.
all 30
In odometer order. Each card carries its own vertical scale — what is being compared is the shape of the curves, not absolute levels between rides.
all 30
The same rides in the same order. Start charge given is the model as it stands: told what the pack actually held, it lands on the measured curve closely enough that the blue line disappears under the orange one on most cards. Ignored is the same run with the field back at its 100 % default — every prediction before v1.36.0 looked like that, and on a ride begun half empty the whole curve rides volts high.
per ride
“was” is the voltage RMSE the same ride produced before the starting-charge input existed; “no offs.” is today's RMSE after its remaining constant offset is subtracted; “rise” is the temperature climb over the ride, model against measurement.
| odometer | km | min | start | rms current | V RMSE | was | V offs. | V no offs. | T RMSE | rise mod. | rise meas. | points | verdict | source |
|---|
what follows from it
Median RMSE against the pack's own voltmeter is 0.56 V on a signal that sags 6–7 V under load. Of that, 0.37 V is shape — the part current-times-resistance has to get right — and the remainder is a constant offset that now spans −1.27 to +0.62 V instead of the −1.27 to +8.09 V it spanned before.
The rides that still carry the most error are, inverted from before, the ones that started full: their median RMSE is 1.04 V and did not move, because there was nothing about their starting charge to correct. What they are showing is the OCV curve itself — a generic NMC table against this particular pack, running about a volt low at the top. That is now the largest single term, and the next one worth attacking.
Before v1.36.0 the model began every run at 100 % charge, because there was nowhere to say otherwise. Across these 30 rides that cost:
Median voltage RMSE 1.46 → 0.56 V. p90 4.56 → 1.07 V. Worst ride 8.10 → 1.33 V. On the 20 rides that did not begin on a full pack, median 3.53 → 0.52 V — a factor of 6.8. On the 10 that did, 1.04 → 1.04 V, unchanged, which is the control: a correction that also “improved” those would have been a fit rather than a fix.
Temperature did not move at all, and could not have: heat is I²·packR, with no
term containing charge anywhere in it.
The median temperature error is 0.87 °C, and 0.45 °C on rides under twenty minutes. The sensors step in whole degrees, which is σ ≈ 0.29 °C on its own, so on short rides the model is up against the resolution of the measurement rather than its own limits. The median error in temperature rise over a ride is +0.34 °C — and neither cell mass nor heat capacity was tuned to this data.
Under 20 minutes the median is 0.45 °C; longer, 1.62 °C, reaching 4.2 °C. Movement is what builds it: the error correlates with time under current at 0.56, with total duration at 0.48, and with the share spent parked at −0.11 — standing still, if anything, dilutes it. The stops are not incidental: the median ride is stationary for 42 % of its record.
What grows is the scatter, not a drift. Time under current barely relates to the
error in temperature rise (−0.03), and on the longest rides that error goes both ways, from
−2.6 to +4.3 °C. That points at ambient: one field serves as both the starting
temperature and the temperature of the surroundings, they cannot be set apart, so a run
begins at the pack's own reading and cools back to it. How wrong that is, and in which
direction, is settled by the particular day. The numbers agree: the temperature offset
correlates with the product of the ambient error and the duration at 0.54 —
higher than with either factor alone (0.47 and 0.16).
While the scooter stands, both current sensors write exactly 0.000, and write it as a value: there are no missing samples in those seconds, and voltage keeps reporting live in the same rows. So nothing was filled in with zeros — not in the log, and not in the data preparation, where a missing sample is dropped rather than turned into one. The BMS shunt steps in 0.01 A, and the standing draw does not reach even that.
None of the thermal conclusions turn on it: a hundred milliamps through 130 mΩ is milliwatts. What it does mean is that self-discharge and parasitic draw while parked are invisible in the amp-hour accounting, and this log cannot recover them.
Not everything is checked. All of the above concerns the thermal and electrical model on the scale of minutes and hours. The steady-state temperature the app's verdict rests on is not tested by this data at all: about 6 % of the heat generated over a ride leaves the pack, and the cooling coefficient barely participates in a balance like that. The geometry — cell packing, the waist of the interconnects, busbar section, current sharing between cells — is tested by nothing here: the onboard log knows nothing about it.
The median ride is 2178 points, which importPoints() compresses to 70. At the
median that costs 3.1 % of the rms current, and 9.3 % at worst. Short active stretches lose
more than long ones: their peaks have less to average against.
The profile duration field stops at 7200 s, and beyond it the app enumerates no configurations at all. Four rides had to be cut, and the window has to be anchored on the first movement: in sessions that open with hours of standing still, the first two hours of record contain no riding.