18650 LI-ION CELL (2600 mAh) MINI PV SOLAR HARVESTER ONLINE KALMAN FILTER (FUSED SOH) RUL PROGNOSTICS WORKBENCH
HANDHELD SOLAR DEVICE HEALTH MONITOR

pencode

A digital twin and real-time algorithmic simulator for an autonomous, hand-sized solar device. It fuses daily coulometric discharge capacity with pulsed load internal resistance measurements using a 2-state Kalman filter, tracking capacity fade and forecasting Remaining Useful Life (RUL) until End of Life (EOL).

LAUNCH SIMULATOR VIEW BENCHMARKS HARDWARE ARCHITECTURE
SYSTEM ARCHITECTURE

From daily solar harvest to predictive service alert

Operating on an ultra-low-power microcontroller, the device executes a daily diagnostic cycle to monitor battery electrochemical aging without cloud reliance.

01 · SENSE

Dual-Domain Acquisition

Coulomb-counts full discharge capacity under solar load, and applies a brief 100ms test pulse to evaluate internal resistance $R_0 = \Delta V / \Delta I$.

02 · COMPENSATE

Temperature Normalization

Applies an Arrhenius temperature correction to adjust cell impedance against a 25°C baseline, stripping away seasonal weather swings.

03 · ESTIMATE

Kalman State Fusion

A 2-state linear Kalman filter $[\text{SOH}, \dot{\text{SOH}}]^T$ fuses noisy capacity and resistance telemetry, tracking the degradation velocity.

04 · FORECAST

RUL Extrapolation

Computes Remaining Useful Life (in cycles/days): $\text{RUL} = (\text{SOH}_k - \text{EOL}) / -\dot{\text{SOH}}_k$, evaluating against empirical polynomial models.

05 · ALERT

Horizon Warning

Signals SERVICE SOON when RUL drops beneath the maintenance threshold (e.g. 45 days), and REPLACE NOW upon hitting EOL.

INTERACTIVE SIMULATION LAB

Real-Time Diagnostics Workbench

All models execute natively in your browser: zero canned curves, 100% computed live. Scrub the timeline, alter aging kinetics, or test unexpected environmental stresses.

DAY 0
TRUE END OF LIFE — —
SOH ESTIMATE · KALMAN — —
RUL PREDICTION · SELECTED — —
DEVICE HEALTH STATUS — —
100.0% SOH 3.85 V Nom · Li-ion
SOLAR FLUX 840 W/m²
INTERNAL RESIST 51.2 mΩ
CELL TEMP 26.4 °C
KALMAN FADE RATE -0.06 %/d
ALGORITHM BENCHMARKS

Prognostic Accuracy Leaderboard

Evaluated across the active simulation run: Mean Absolute Error (MAE), prediction bias (positive = optimistic / late warning; negative = pessimistic / early warning), and micro-controller computational budget.

PREDICTION MODEL MAE (ERROR) BIAS (DIRECTION) MAX DEVIATION MCU RAM MCU CPU COST FITNESS VERDICT
DEVICE SCHEMATIC

Handheld Solar Hardware Implementation

Explore the physical embedded subsystem architecture designed to run this autonomous Kalman prognostics engine on a micro-watt energy budget.

HARVESTING

Mini PV Panel (5V 250mA)

Monocrystalline cell providing daily solar energy input and daylight timing cues.

MANAGEMENT

CN3791 MPPT Solar Charger

Maximizes solar efficiency with constant-current/constant-voltage Li-ion profile.

STORAGE

18650 Li-ion Cell (2600mAh)

Nominal 3.7V cell subject to cycling wear, SEI growth, and internal resistance ramp.

INSTRUMENTATION

INA226 & 100mΩ Shunt + NTC

16-bit high-side $I/V$ monitor for coulomb counting and temperature compensation.

DIAGNOSTIC PULSE

Switched 100mA Load Step

Pulsed MOSFET applies 100ms load step to measure pure ohmic resistance $\Delta V / \Delta I$.

COMPUTATION

STM32L0 / ESP32-C3 MCU

Ultra-low-power ARM Cortex-M0+ running the 2-state Kalman equations in <100 µs/day.

MATHEMATICAL FORMULATIONS

Four Prognostic Paradigms Compared

How each algorithm translates historical sensor data into a future End-of-Life day prediction.

ALGORITHM CORE PRINCIPLE STRENGTH VULNERABILITY
Expanding Linear Ordinary least-squares linear regression over the entire history: $\text{SOH}(t) = \beta_0 + \beta_1 t$. Extremely stable; zero sensitivity to single-day noise outliers. Fails completely when battery aging accelerates near the end (the "knee" effect).
Sliding Window Linear Linear regression restricted to the most recent $W$ cycles ($30\text{–}150$ days). Rapidly adapts to sudden changes in fade rate or temperature regime. Noisy and oscillatory if window size is too short; requires tuning.
Expanding Quadratic 2nd-degree polynomial regression: $\text{SOH}(t) = a t^2 + b t + c$ extrapolated to EOL. Captures non-linear aging curvature and late-life capacity cliffs. Prone to wild divergence during the first 30–50 cycles of life.
2-State Kalman Filter Recursive Bayesian filter tracking State of Health and fade velocity $[\text{SOH}, \dot{\text{SOH}}]^T$. Online, smooth, tracks $\pm 2\sigma$ confidence, requires almost zero memory. Requires proper tuning of process noise $Q$ and measurement noise $R$.
FREQUENTLY ASKED QUESTIONS

Engineering & Electrochemical FAQs

How does the device measure internal resistance without draining the battery?

A precision power MOSFET engages a 100 mΩ shunt load for just 100 milliseconds once every 24 hours. By sampling the cell terminal voltage immediately before and during the pulse ($R_0 = (V_{\text{rest}} - V_{\text{load}}) / I_{\text{pulse}}$), the device extracts pure ohmic resistance with negligible energy loss (less than 0.003% of daily battery capacity).

Why must internal resistance be temperature-compensated?

Electrochemical charge transfer kinetics follow the Arrhenius equation. In cold weather, internal resistance naturally surges even in a brand new battery. If uncompensated, a cold autumn morning would trigger a false battery failure warning. The device normalizes all readings to a 25°C baseline using the cell thermistor.

Where do the preset degradation numbers originate?

The Datasheet 18650 preset is derived from commercial Samsung/Panasonic 18650 specifications (typically rated for 500 cycles to 70% retention). The NASA Lab Test preset reflects empirical cycling data from the NASA Ames Prognostics Center of Excellence (PCoE) battery dataset (Cell B0005, which experienced severe accelerated fade within 168 cycles).

What is the "Knee Effect" in Lithium-ion degradation?

Lithium-ion cells degrade approximately linearly for the first 70–80% of their life as the Solid Electrolyte Interphase (SEI) grows steadily. Once the active lithium inventory depletes or microscopic lithium plating begins on the anode, the capacity fade rate suddenly accelerates exponentially (the "knee"). The quadratic predictor and adaptive Kalman filter are specifically designed to detect this knee.

Can this firmware run on a small battery-powered microcontroller?

Yes. The entire dual-state Kalman filter requires fewer than 25 floating-point arithmetic operations per day and under 256 bytes of RAM. It easily runs on an ultra-low-power ARM Cortex-M0+ (such as an STM32L0) or an ESP32-C3 in deep sleep.

Notification