Many battery parameters depend on state of charge, temperature, or both. Piecewise interpolation enables the creation of smooth parameter functions suitable for physics-based models. This guide covers both general piecewise interpolants and specialized OCP interpolants.Documentation Index
Fetch the complete documentation index at: https://docs.ionworks.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Piecewise interpolation addresses several needs:- SOC-dependent parameters: Diffusivity, exchange current density, and other transport properties often vary significantly with lithiation state
- Temperature dependence: Non-Arrhenius behavior requires more flexible functional forms
- OCP functions: Open-circuit potential must be defined across the full stoichiometry range for simulation
Mathematical Formulation
Smooth Heaviside Function
Traditional piecewise functions use discontinuous step functions, which cause convergence issues in ODE/DAE solvers. Instead, we use a smooth approximation: where:- is the input variable (e.g., SOC)
- is the threshold value
- is the smoothing parameter (larger = smoother transition)
1D Piecewise Linear Interpolation
For a parameter varying with , given breakpoints with values : Each linear segment interpolates between adjacent knots:Piecewise Parameter Functions
1D Interpolation
For parameters that vary with a single variable (typically SOC):2D Interpolation
For parameters varying with two variables (e.g., SOC and temperature):Use different smoothing parameters for dimensions with different scales (e.g., SOC in [0, 1] vs Temperature in [273, 323] K).
The piecewise interpolant types and options shown are not exhaustive. See the API reference for full details.
Formulations: Knots vs Slopes
Two equivalent parameterizations are available:| Formulation | Parameters | Best for |
|---|---|---|
| Knots | Values at each breakpoint | Direct measurements |
| Slopes | Initial value + slopes between breakpoints | Optimization (smoother landscape) |
SlopesToKnots.
OCP Interpolants
Open-circuit potential (OCP) interpolants are specialized functions that return equilibrium voltage for a given stoichiometry.From Experimental Data
From MSMR Parameters
Blended MSMR / Experimental OCP
The recommended approach combines experimental data with MSMR extrapolation:The Inaccessible Lithium Problem
Experimental OCP data never covers the full 0-1 stoichiometry range due to:- Electrolyte decomposition at low voltages
- Structural instability at high voltages
Numerical Considerations
Smoothing Parameter Selection
| Value | Effect |
|---|---|
| Too small | Approaches discontinuous, may cause solver issues |
| Too large | Excessive smoothing, reduces accuracy |
| Recommended | to (range of variable) |
Extrapolation Behavior
Both piecewise and OCP interpolants use constant extrapolation outside their defined ranges. This prevents unbounded values and is physically reasonable for many battery parameters.Common Use Cases
SOC-Dependent Diffusivity
Capture phase transitions or concentration effects on transport
OCP Functions
Define equilibrium voltage for electrochemical models
Temperature Effects
Non-Arrhenius temperature dependence
Coupled Dependencies
Parameters depending on multiple variables simultaneously
Best Practices
- Breakpoint placement: Place more breakpoints where the parameter changes rapidly
- Smoothing selection: Start with defaults; increase if solver has trouble
- Visualization: Always plot interpolants across the full range to check for artifacts
- MSMR for OCP: Use blended interpolants for robust extrapolation