# PINN surrogate of Li-ion battery models for parameter inference.
Part II: Regularization and application of the pseudo-2D model

Malik Hassanaly<EMAIL_ADDRESS>Peter J. Weddle  Ryan N. King
Subhayan De  Alireza Doostan
Corey R. Randall  Eric J. Dufek  Andrew M. Colclasure  Kandler Smith
Computational Science Center, National Renewable Energy Laboratory (NREL),
Golden, CO 80401  Energy Conversion and Storage Systems Center, National
Renewable Energy Laboratory, Golden, CO 80401  Aerospace Mechanics Research
Center, University of Colorado, Boulder, CO 80303  Mechanical Engineering
Department, Northern Arizona University, Flagstaff, AZ 86011  Energy Storage
and Electric Transportation Department, Idaho National Laboratory (INL), Idaho
Falls, ID 83415

###### Abstract

Bayesian parameter inference is useful to improve Li-ion battery diagnostics
and can help formulate battery aging models. However, it is computationally
intensive and cannot be easily repeated for multiple cycles, multiple
operating conditions, or multiple replicate cells. To reduce the computational
cost of Bayesian calibration, numerical solvers for physics-based models can
be replaced with faster surrogates. A physics-informed neural network (PINN)
is developed as a surrogate for the pseudo-2D (P2D) battery model calibration.
For the P2D surrogate, additional training regularization was needed as
compared to the PINN single-particle model (SPM) developed in Part I. Both the
PINN SPM and P2D surrogate models are exercised for parameter inference and
compared to data obtained from a direct numerical solution of the governing
equations. A parameter inference study highlights the ability to use these
PINNs to calibrate scaling parameters for the cathode Li diffusion and the
anode exchange current density. By realizing computational speed-ups of
$\approx$2250x for the P2D model, as compared to using standard integrating
methods, the PINN surrogates enable rapid state-of-health diagnostics. In the
low-data availability scenario, the testing error was estimated to
$\approx$2mV for the SPM surrogate and $\approx$10mV for the P2D surrogate
which could be mitigated with additional data.

###### keywords:

Physics-informed neural network (PINN) , Multi-fidelity machine learning , Li-
ion battery modeling , Bayesian calibration , Pseudo-2D model

††journal: J. Power Sources

##  1 Introduction

As batteries are pivotal to today’s economy, developing tools that accurately
diagnose and forecast battery state-of-health is essential [1] to
appropriately manage Li-ion batteries degradation [2]. In the present work,
the battery’s internal parameters are determined from the voltage response
during a discharge cycle, through Bayesian calibration. Bayesian calibration
for parameter inference is computationally expensive because the underlying
physics model that maps the internal parameters to the observed voltage
response must be run many times [3]. Here, a physics-informed neural network
(PINN) is trained to replace the more computationally expensive pseudo-2D
(P2D) battery model.

In Part I, a framework is discussed to develop a PINN for the single-particle
model (SPM). A companion repository (https://github.com/NREL/pinnstripes) is
provided. Here, the framework is extended to capture the P2D model physics.
The P2D model is a standard physics-based model in the Li-ion battery
community that captures heterogeneous electrode utilization during high-rate
cycling [4, 5, 6, 7, 8]. Using surrogates of higher fidelity models is
critical to mitigate modeling error and better capture the effect of
additional aging properties. After training, a P2D PINN surrogate model is
deployed to accelerate Bayesian calibration and identify the internal battery
parameters using a discharge (2 C) voltage response. Similar to Part I, an
emphasis is placed on the training procedure that can successfully train the
neural net using only the physics-informed loss, which mimics a typical data-
poor parameter inference in high dimensions.

###  1.1 Prior works

Li-ion batteries can age in different ways [9, 10, 11, 12, 13, 14, 15, 16, 17]
making aging forecast and diagnostics challenging. State-of-health diagnostics
can be divided into 1) experimental observations and 2) model inferences, with
significant overlap between these approaches. For non-intrusive experimental
measurements [18, 19], a significant amount of work focused on the evolving
electrochemical signatures with aging [20, 21, 22, 21, 13, 23, 24]. Model-
centric techniques that determine a battery’s internal state rely on
electrochemical signals [24, 3, 25, 25] or externally measured pressure
changes [23] to infer internal aging dynamics. These techniques typically
determine high-level aging “modes” such as loss-of-active-material (LAM),
loss-of-lithium-inventory (LLI), resistance growth, and/or capacity fade [8,
26, 27, 28].

An alternative approach is to map the measured aged response to internal
parameter dynamics [29, 30, 31]. Parameter inference necessarily requires a
proposed model that translates property variations to changes in cell
performance. Generally, inverse parameter inference is accomplished by either
finding an optimal parameter set that best explains experimental observations
[32, 33, 34], or by finding a distribution of candidate parameter values
(e.g., Bayesian parameter calibration) that describe the measured responses
[35, 36, 3]. The former approach is more computationally efficient and has
been used to calibrate up to 44 internal P2D parameters [33, 37, 38]. The
latter approach can be extremely computationally expensive and requires a fast
underlying model, and has recently been to calibrate 15 parameters of the P2D
model [3].

Importantly, when determining internal parameters, three sources of
uncertainty coexist. First, the available experimental observation may be
insufficient to accurately infer the battery’s internal parameters [39, 40].
This is referred to as coarse-graining uncertainty, which is typical of
partially observed systems [41, 42, 33]. Coarse-graining uncertainty may
affect each parameter differently, resulting in varying levels of
identifiability [43, 44, 18]. Second, experimental observations may be subject
to noise (e.g., Maccor Series 4000 has a voltage accuracy of $\approx$3
mV)111http://www.maccor.com/Products/Series4000.aspx. Third, the physics-based
models used to interpret the parameters’ influences on observed responses may
inaccurately depict the real system. One way to include the aforementioned
uncertainties in the inferred parameter uncertainties is to use Bayesian
calibration. A basic description of the Bayesian calibration procedure is
provided in Section 1.2.

The present work uses a PINN surrogate model to improve the computational
tractability of parameter inference using Bayesian calibration schemes. After
developing a PINN that reliably converts input parameters to observed voltage
responses, Bayesian calibration can be used to ask: “what parameters are most-
likely to produce the observed voltage response?”. By developing this tool,
internal property dynamics (and confidence intervals on these parameters)
during aging can be extracted from voltage/current responses. Notably, PINN
strategies [45] have been used previously in the literature as redox-flow
battery model surrogates [46, 47], and for low-fidelity Li-ion battery models,
such as the SPM [48], or the Verhulst model [49].

The novelty of this manuscript are as follows

  * •

We demonstrate for the first time the ability of PINN to predict P2D model
solutions in a data-poor environment for the first time granted training
regularization that we derive (Sec. 3).

  * •

We show that multi-fidelity hierarchical training is beneficial for the PINN
P2D surrogate and for parametric PINNs (Sec. 4.1).

  * •

We assess the effect of physics and data loss in a data-poor environment (Sec.
4.1).

  * •

We demonstrate the computational benefits of PINNs for parameter inference
(Sec. 4.2).

###  1.2 Bayesian calibration

Bayesian calibration in the context of parameter inference for Li-ion
batteries is typically an expensive calculation with increased cost when
considering every cycle and every observed battery response [50, 51, 42, 3].
There are at least two strategies that reduce the computational cost of
Bayesian calibration without losing cycle- or cell-specific fidelity. The
first strategy is to use insights from data to limit the number of inferred
parameters (based on prior knowledge of battery degradation). However, there
is evidence that reducing the number of parameters a priori can significantly
affect the posterior information sought about the parameters and the resulting
model [52]. In other words, reducing the Bayesian calibration to fewer
parameters can result in non-unique parameter sets that equally explain the
experimental data. A second approach is to reduce the likelihood function
$p_{\rm like}$ evaluation cost. In this manuscript, the main objective is to
provide a framework for constructing computationally inexpensive Li-ion
battery surrogate models to accelerate the likelihood function evaluation.

In Bayesian calibration, one seeks the posterior probability of battery
parameters $p_{\rm post}(\boldsymbol{p}|\boldsymbol{d})$, where
$\boldsymbol{p}$ represents the internal parameters, and $\boldsymbol{d}$ the
experimental observations. The posterior probability $p_{\rm post}$ is the
probability of a particular parameter value $\boldsymbol{p}$ given observation
$\boldsymbol{d}$. The posterior probability $p_{\rm post}$ is obtained by
applying the Bayes theorem

$p_{\rm post}(\boldsymbol{p}|\boldsymbol{d})\propto p_{\rm
prior}(\boldsymbol{p})p_{\rm like}(\boldsymbol{d}|\boldsymbol{p}),$ (1)

where $p_{\rm prior}(\boldsymbol{p})$ is the prior probability that encodes
prior knowledge about the parameters (e.g., maximum and minimum values) and
$p_{\rm like}(\boldsymbol{d}|\boldsymbol{p})$ is the likelihood function that
characterizes how likely a parameter set $\boldsymbol{p}$ is to explain the
observed data $\boldsymbol{d}$. In other words, the likelihood function gives
the probability that a particular parameter set $\boldsymbol{p}$ explains the
experimental observation. To compute the likelihood function, one needs to
choose a parameter set $\boldsymbol{p}$, use this parameter set to make a
prediction of the observation, and measure the discrepancy of the predicted
observation to the realized observation $\boldsymbol{d}$. In Bayesian
calibration, coarse-graining uncertainty is automatically captured because
multiple parameter samples can be proposed to explain the same observational
data, while the experimental noise and model inaccuracies can be lumped into
the uncertainty of the likelihood function $p_{\rm like}$ [53, 54].

The primary downside of Bayesian calibration is that it requires many model
evaluations to appropriately delineate the support of the posterior
distribution. At minimum a model evaluation at each parameter value where the
posterior is sought in $\boldsymbol{p}$-space (also shown in Appendix B). In
high dimensions, a common practice is to draw samples from the posterior
distribution via Markov chain Monte Carlo (MCMC) methods [55]. In MCMC, a
sequence of samples that span the $\boldsymbol{p}$-space is constructed such
that the samples converge to independent samples of the posterior
distribution. At every step of the sequence, an MCMC procedure requires an
expensive evaluation of the likelihood function, by interrogating the
numerical model for every available observational data point. The cost of MCMC
is also plagued by a “warm-up” time needed before convergence to the posterior
is achieved, during which discarded samples are also generated by evaluating
the likelihood function [56, 57].

Consistent with other analyses [54], the likelihood function is assumed to be
a multivariate normal distribution given by

$\begin{split}p_{\rm
like}(\boldsymbol{d}|\boldsymbol{p})&=\frac{1}{(2\pi\sigma^{2})^{N_{\rm
d}/2}}\\\ &\times\ \exp\left[-\frac{1}{2\sigma^{2}}\sum_{i=1}^{N_{\rm
d}}(\boldsymbol{d}-\boldsymbol{d}_{\rm
pred}(\boldsymbol{p}))^{2}\right],\end{split}$ (2)

where $N_{\rm d}$ is the number of observations, $\sigma$ is the standard
deviation of the multivariate normal distribution (where uncertainty is
assumed to be the same for all observations), and $\boldsymbol{d}_{\rm
pred}(\boldsymbol{p})$ is the prediction of observations that would be
obtained if parameter set $\boldsymbol{p}$ was chosen. The computation of
$\boldsymbol{d}_{\rm pred}$ is the expensive step that normally requires
evaluating a physics-based model. Using a pure optimization method – i.e.,
minimizing
$\sum_{i=1}^{N_{d}}(\boldsymbol{d}-\boldsymbol{d_{pred}}(\boldsymbol{p}))^{2}$
– implicitly assumes that any mismatch between the predicted and observed data
is due to a misspecification of $\boldsymbol{p}$. In reality, even if
$\boldsymbol{p}$ is exactly identified, $\boldsymbol{d}$ might not exactly
match $\boldsymbol{d}_{\rm pred}$ because of experimental or modeling errors
that provide the mapping between $\boldsymbol{p}$ and $\boldsymbol{d}_{\rm
pred}$. While both errors may be lumped into $\sigma$, a high uncertainty
reduces the confidence in the inferred parameters, as shown in Sec. 4.2.
Mitigating model errors is possible by adopting a higher fidelity model for
the Li-ion battery system (e.g., using the P2D model as opposed to the SPM
model).

Figure 1: PINN architecture schematic used to enforce spatiotemporal and
parametric dependencies of the state variables for the SPM (left) and the P2D
model (right). Layers are left blank for illustrative purposes.

##  2 Pseudo-2D battery model

The P2D battery model is a physics-based model that captures kinetic and
transport resistances and heterogeneous utilization across a cell electrode
assembly [58, 59, 4, 60, 61, 62, 63, 64, 65, 66, 67, 68]. The P2D model
resolves the Li species and charge transport within both composite electrodes,
the separator, and the percolating electrolyte. The model has two coordinate
directions: the primary direction is normal to the current collectors (also
referred to as through-plane), and the secondary direction radially points
outwards through the representative spherical electrode particles.

In the P2D model, there are four state variables, including the liquid-phase
Li-ion concentration within the electrolyte $c_{\rm e}$, the liquid
electrolyte potential $\phi_{\rm e}$, the solid-phase electrode potential
$\phi_{{\rm s},j}$, and the solid-phase Li concentration $c_{{\rm s},j}$. The
subscript $j$ indicates the domain (i.e., anode, separator, or cathode). All
state variables are resolved in the primary direction normal to the current
collector (i.e., the $x$-direction) aside from the solid-phase Li
concentration $c_{{\rm s},j}$, which is resolved in the secondary radial
direction $r$. The P2D governing equations are provided in Appendix A.

The coupled system of differential-algebraic equations used in the P2D model
is significantly more complicated and costly than the decoupled, ordinary,
differential equations used in the SPM (cf., Part I). Additionally, additional
material/transport/architecture parameters are introduced and are useful for
studying heterogeneous (through-plane) electrode utilization, and electrolyte
resistance/depletion that are non-negligible in high-rate ($\geq$2 C) demands.
For the present study, the PINN P2D surrogate is trained using parameters from
Colclasure et al. [7]. Some of the parameters are later modified in the
manuscript to study the PINN performance in determining “unknown” parameter
sets (Section 4).

##  3 Method: PINN surrogate for the P2D model

The P2D PINN surrogate construction follows similar design guidelines to those
developed in Part I. Compared to the SPM, the P2D model involves an additional
longitudinal spatial variable $x$ (cf., Fig. 1). The additional variables used
in the P2D model, as compared to the SPM, are the potential in the negative
electrode $\phi_{\rm s,an}$ and the concentration of Li-ions in the
electrolyte $c_{\rm e}$. Additionally, the model parameters $\boldsymbol{p}$
are shown as inputs to both the SPM and the P2D model in Fig. 1. Including the
parameters as inputs (which was not used in Part I) is needed to apply the
surrogate models to Bayesian calibration (i.e., the neural networks need to
encode the dependence of the solutions with respect to the parameters
$\boldsymbol{p}$ being inferred). The parameters $\boldsymbol{p}$ can be
treated similarly to the spatiotemporal variables – $t$ for the SPM, and $t$
and $x$ for the P2D model – that affect the prediction of all the state
variables.

###  3.1 Initial conditions enforcement

To prevent predicting $\phi_{\rm s,an}$ up to a constant shift as noted by
Chen et al. [47], the Dirichlet boundary condition for $\phi_{\rm s,an}$ at
$x=0$ is strictly enforced similarly to the strict initial conditions
enforcement described in Part I,

$\begin{split}\phi_{\rm s,an}(x)&=F(t)\left[\widetilde{\phi}_{\rm
s,an}(x,t)F(x)+\phi_{\rm s,an}(x=0)\right]\\\ &+\phi_{\rm
s,an}(x,t=0).\end{split}$ (3)

Here, $\widetilde{\phi}_{\rm s,an}(t,x)$ is the raw output of the neural net,
$F(t)=1-\exp(t/\tau)$, $\tau$ is a timescale over which the initial condition
is enforced (assumed to be 1 s), $F(x)=x/L_{\rm an}$ consistently with Sun et
al. [69], $\phi_{\rm s,an}(x=0)$ is the strictly enforced boundary condition,
and $\phi_{\rm s,an}(x,t=0)$ is the strictly enforced initial condition (if
any, as discussed below).

Figure 2: (a) Average PINN error over the training realizations (bar height)
that illustrates the effect of secondary conservation regularization and
strict enforcement of initial potential conditions. The error bar denotes the
95% percentile variability observed for all the realizations. (b) Prediction
of Faradaic current in the anode (left), electrolyte Li-ion concentration
(middle) and current (right), without secondary regularization (top) and with
secondary regularization (bottom). Variables are shown after 0 s ( ), 200 s (
) and 400 s ( ). The profiles obtained from the PDE are shown as dashed-dotted
lines with the same color coding. The electrode/separator boundaries are shown
for the electrolyte Li-ion concentration and current ( ).

Strict initial conditions enforcement is more difficult for the P2D model as
compared to the SPM due to the potential in the negative electrode $\phi_{\rm
s,an}$, in the positive electrode $\phi_{\rm s,ca}$, and in the electrolyte
$\phi_{\rm e}$ having spatial dependence. Unlike the Li concentrations, the
potential spatial distributions algebraically depend on the prescribed initial
concentrations. In the case of the SPM, the potentials were not spatially
dependent and their initial concentrations could be precomputed, and strictly
enforced during training. In the case of the P2D model, prescribing the
initial conditions of the potentials requires computing the entire initial
spatial distribution. In Eq. 3, this is emphasized by preserving the spatial
dependence of the initial condition $\phi_{\rm s,an}(x,t=0)$. While
prescribing the analytical solution of the initial potential values is
possible, the analytical solution would need to encode the dependence of the
initial conditions on the internal parameters $\boldsymbol{p}$.

To resolve the initial potentials in the P2D model, two methods are adopted
and compared hereafter: 1) the initial conditions are not strictly enforced
but are captured by virtue of minimizing the residuals near $t=0$. In this
case, the potentials in Eq. 3 only use an initial guess for the initial
condition $\xi_{0}$ where $\xi$ denotes a state variable, and the distance
function $F(t)=1$, thereby allowing to adjust the initial guess; 2) the
initial conditions are computed and encoded by a neural net by training
another PINN over the time interval [$0$, $0$] s. The advantage of the second
method is that the PINN in charge of learning the initial conditions will
naturally encode the dependence of the initial conditions with the internal
parameters being varied. The drawback of the second method is that an extra
PINN evaluation is needed when predicting the state variables. In practice,
the PINN in charge of the initial conditions learning can use a smaller
network since it does not aim to capture any temporal variability. When used
here, the neural network that encodes the initial conditions uses 12 neurons
per layer (as opposed to 20 for the spatiotemporal PINN) and only one gradient
pathology block (as opposed to 3 for the spatiotemporal PINN). In turn, the
added computing overhead due to the extra PINN evaluation is limited to about
5% of the total training time for the cases investigated here. Both methods
are evaluated in Sec. 3.2 and Sec. 3.3.

###  3.2 Training failure mode

The PINN design guiding principles identified for the SPM in Part I are reused
here for the P2D model. Specifically, a merged architecture with gradient
pathology blocks [70] is used. For now, a linearized Butler–Volmer formulation
is implemented and no hierarchical training is used. This training method is
referred to as Base. Given the added spatial variable $x$, as compared to the
SPM, the number of collocation points is twice that of the SPM (described in
Part I). The total number of epochs (number of times the entire training set
is shown to the network) is also doubled. The merged neural net architecture
contains two layers in the network trunk (compared to one for the SPM) and the
three gradient pathology blocks in the network branches. The number of neurons
per layer is held at 20 and the activation function is a hyperbolic tangent.
These choices are held throughout the manuscript. Compared to the SPM, the
learning rate is decreased by a factor of 10 but follows the same schedule.
Similar to Part I, the accuracy of the model is evaluated with a scaled mean
absolute error $\varepsilon$ defined as

$\varepsilon=\sum_{\xi\in\\{c_{\rm s,an},c_{\rm s,ca},c_{\rm e},\phi_{\rm
e},\phi_{\rm s,an},\phi_{\rm
s,ca}\\}}\frac{1}{N_{\xi}}\sum_{i\in[1,N_{\xi}]}\left|\frac{\xi_{\rm
PINN,i}-\xi_{\rm PDE,i}}{\xi_{\rm PDE,i}}\right|,$ (4)

where $N_{\xi}$ is the number of points over which the error is computed for
each state variable $\xi$.

Figure 2a illustrates the Base case error $\varepsilon$. Although the error
definition contains two additional variables, which artificially increases the
value of $\varepsilon$, the error observed is about 20 times higher as
compared to errors from the SPM in Part I. The results are also consistently
inaccurate. An example of the predicted state variables is shown in Fig. 2b
(top). Compared to the PDE solution, the surface net rates of progress for Li-
ion production $\dot{s}_{\rm an}$ (left) and $\dot{s}_{\rm ca}$ (not shown for
the sake of brevity) are severely under-predicted (see Appendix A for
computing $\dot{s}_{j}$). This is a key complication as compared to the SPM
model where the surface net rates of progress is known and assumed to be
uniform and constant throughout time. Since $\dot{s}_{j}$ is tightly coupled
to $c_{{\rm s},j}$ via the particle surface concentrations (Eq. 21), the
mismatch for $\dot{s}_{j}$ pushes the solid Li concentrations (not shown for
the sake of brevity) to remain near their initial value. The electrolyte Li-
ion concentration $c_{\rm e}$ (middle) also remains near its initial value.
Notably, $c_{\rm e}$ slowly decreases over time, which clearly violates the
conservation of salt in the system. The flat profile of $c_{\rm e}$ is also
explained by the fact that the current densities are nearly zero in both the
anode and the cathode. Finally, the electrolyte current density
$\mathbf{i}_{\rm e}$ is also consistently under-predicted since the
electrolyte potential $\phi_{\rm e}$ is predicted to be uniform (not shown for
the sake of brevity). Note that the under-predicted current also clearly
violates the conservation of charge in the separator. Overall, the PINN
attempts to push the output towards a trivial solution, which is that of the
initial profile with near-zero gradient boundary conditions for the spherical
particles. In the case of the SPM, this issue was resolved by sufficiently
weighting the solid-phase Li concentration gradient constraint at the particle
surface. In the case of the P2D model, this strategy is not viable as the
particle surface boundary is set by $\dot{s}_{j}$, which is itself under-
predicted.

As a first attempt to avoid the trivial failure mode, the authors tried to
strictly enforce the potential initial conditions, which inherently strictly
enforces the initial conditions for $\dot{s}_{j}$. This model is referred to
as Strict $\phi$ IC. Figure 2a illustrates the error of this approach compared
to the Base case. Unfortunately, the error is not reduced by this approach.
Further inspection of the predicted variables (not shown here) suggests that
the same trivial failure mode occurs in the Strict $\phi$ IC as in the Base
case.

###  3.3 Secondary conservation

To address the PINN P2D surrogate trivial failure mode, it is proposed here to
use secondary conservation constraint equations. In other numerical simulation
applications, secondary conservation commonly refers to conservation that is
not directly enforced, but is expected as a by-product of solving the
governing equations. For instance, while entropy conservation [71] or kinetic
energy conservation [72, 73] are not directly enforced in computational fluid
dynamics, they can be obtained through a strategic discretization. However,
solving secondary conservation equations in addition to the primary
conservation equations and reconciling the solution obtained can be difficult
with traditional numerical integrators. In the case of a PINN, there is no
need to constrain the state variables only once and secondary constraints can
be added as a physics-informed regularization. This strategy echos the gPINN
method [74] that constrains the residual gradient as well as the residuals
themselves. Unlike the generic gPINN approach, the objective is to derive
specific constraints that address the training failure mode observed (i.e., a
zero current density prediction).

In the present approach, four additional constraint equations are added to the
P2D model. Importantly, the additional constraints do not add “new physics” to
the P2D model but rather enforce a known consequence of the governing
equations described in Appendix A.

First, conservation of charge requires that for all $x$ spatial locations the
current is either carried in the electrolyte phase or in the solid-phase,
which can be stated mathematically as

$\nabla_{x}\cdot\left(\mathbf{i}_{\rm e}-\sigma^{\rm eff}_{{\rm
s},j}\nabla_{x}\phi_{{\rm s},j}\right)=0,$ (5)

where $\nabla_{x}$ indicates that the operator is in the $x$-direction,
$\mathbf{i}_{\rm e}$ is the electrolyte current density, and $\sigma^{\rm
eff}_{{\rm s},j}$ is the effective solid-phase conductivity. Alternatively,
propagating the cathode-current collector boundary condition results in

$\mathbf{n}_{x}\cdot\left(\mathbf{i}_{\rm e}-\sigma^{\rm eff}_{{\rm
s},j}\nabla_{x}\phi_{{\rm s},j}\right)=\frac{-I}{A},$ (6)

where $\mathbf{n}_{x}$ is the normal vector, $I$ is the current demand (in
Amps), and $A$ is the battery geometric area. Equation 6 is true for all
locations in the $x$ domain and for all time $t$. The residual of Eq. 6 is
added to the PINN loss alongside the typical P2D governing equations residuals
(Appendix A).

Second, conservation of charge requires that

$\int_{0}^{L_{\rm an}}J_{\rm an}~{}{\rm d}x=\frac{-I}{A}.$ (7)

and similarly for the cathode,

$\int_{L_{\rm an}+L_{\rm sep}}^{L_{\rm an}+L_{\rm sep}+L_{\rm ca}}J_{\rm
ca}~{}{\rm d}x=\frac{I}{A},$ (8)

where $J_{j}$ is the specific production of Li-ions (see Appendix A), and
$L_{j}$ is the thickness of each domain. Enforcing these constraints during
PINN training requires spatial integration across each electrode. For every
collocation point where the integral constraint is formulated, the spatial
integration is achieved with trapezoidal integration using 10 quadrature
points uniformly distributed throughout the electrodes. The cost of the
regularization residual is therefore typically higher since it requires
evaluating the PINN 10 times per collocation point. Therefore, only 640
collocation points are used for the regularization loss, while 2600
collocation points are used for the other losses in the domain interior.
Alternative strategies to decrease the cost of the integration are left for
future work [75].

Third, the total amount of Li-ions phase, at any given time, is constant.
Mathematically, this constraint can be expressed as

$\int_{0}^{L_{\rm an}+L_{\rm sep}+L_{\rm ca}}{\epsilon_{{\rm e},j}}c_{\rm
e}~{}{\rm d}x=C_{1},$ (9)

where $\epsilon_{{\rm e},j}$ is the electrolyte volume fraction and $C_{1}$ is
a constant that can be computed using the initial conditions for $c_{\rm e}$.
Equation 9 is added to the P2D governing equation set.

Similar to the weighting procedure for the residuals in Part I, the additional
constraints can be weighted within the PINN. A separate hyperparameter
optimization was used to optimize the weights on each additional constraint.
Preferentially weighting the conservation given by Eq. 7 and Eq. 8
significantly improved the accuracy metric $\varepsilon$. The model equipped
with secondary conservation constraints is referred to as Sec. Cons.. Figure
2a shows that using the secondary regularization significantly reduces the
error of the P2D PINN surrogate. Figure 2b (bottom) shows examples of the
predicted state variables. Importantly, the added constraints encouraged non-
trivial solutions, which allowed the inverting profile to develop for $c_{\rm
e}$. Note that even with secondary conservation, the current
$\boldsymbol{i_{\rm e}}$ at $t=0$ predicted by the PINN can be negative which
is non-physical. This can be resolved by using a strict enforcement of initial
conditions for the potentials. However, this non-physical behavior only
marginally affects the accuracy at later times.

###  3.4 Enhanced performance via hierarchical training

While using secondary conservation constraints improved the PINN accuracy,
significant discrepancies between the PINN and a finite-difference solution
are still observed (cf., Fig. 2b (bottom)). Given the encouraging multi-
fidelity hierarchical training results obtained in Part I, the same strategy
is deployed here. Unlike in Part I, the P2D surrogate has inaccurate
predictions even with a linearized Butler–Volmer formulation. The multi-
fidelity hierarchical training proposed here uses the SPM surrogate trained
with a linear Butler–Volmer formulation as the first level of the hierarchy
(see Part I). The choice of using the SPM PINN surrogate as the first
hierarchy level is motivated by its fast convergence and by the fact that the
P2D surrogate model errors are mostly related to its inability to
appropriately predict the current density, which is well-captured by the SPM.
Since $c_{\rm e}$ and $\phi_{\rm s,an}$ are not predicted by the SPM model,
the hierarchy is only used for $\phi_{\rm s,ca}$, $\phi_{\rm e}$, $c_{\rm
s,an}$, and $c_{\rm s,ca}$.

In this hierarchical study, three models are compared: 1) a PINN that uses the
proposed hierarchy but no secondary conservation is referred to as HNN SPM; 2)
a PINN that uses the hierarchy and the secondary conservation referred to as
HNN SPM Sec. Cons.; and 3) the Base model with secondary conservation and no
hierarchy. For the Base model, the number of layers and the number of training
steps are doubled to provide a fair comparison, which is referred to as Base
Sec. Cons. Double. The cost of training a model with twice as many layers is
more expensive than the hierarchy, where one model is frozen while the other
is trained. As a result, only three training realizations were done for the
Base Sec. Cons. Double model, which induces large statistical uncertainty on
the accuracy metrics. However, since the worst case scenario for HNN SPM Sec.
Cons. is more accurate than the best case scenario for Base Sec. Cons. Double,
the statistical uncertainty does not affect the following conclusions.

Figure 3 shows that the best of the Base models did not outperform any of the
HNN SPM Sec. Cons. models. Furthermore, using a hierarchy is not a substitute
for the secondary conservation regularization as combining the hierarchy and
the regularization achieves a higher accuracy than using the hierarchy alone.
For all the models, a strict enforcement of the initial conditions for the
potential was also used. Figure 3 suggests that strictly enforcing the initial
potentials does not provide a substantial benefit for the accuracy of the
PINNs. As a complementary note, the results shown here and in the rest of the
paper are obtained with a linearized Butler–Volmer formulation. Using a non-
linear formulation instead can simply be done by using an additional hierarchy
level such as the one presented in Part I. The HNN SPM Sec. Cons. models were
trained with one additional hierarchy level to account for the non-linear
Butler–Volmer formulation. Despite being trained with an additional hierarchy
level, the additional error reduction were marginal compared to using
secondary conservation constraints (about 12.5% in the case of the softly
enforced initial condition, and 11% error reduction for the strict enforcement
case).

Figure 3: Average PINN error (bar height) for hierarchical training with the
SPM as the lower hierarchy level (left), hierarchical training with the SPM as
the lower hierarchy level and secondary conservation regularization (middle),
and the base model with similar expressiveness as the hierarchical models
(right). The error bars denote the 95% percentile variability observed for all
the realizations.

A P2D PINN surrogate model was selected from the HNN SPM Sec. Cons. set using
strict enforcement of initial potentials. Once selected, training was
continued for twice as many epochs. Note that no data loss was used during the
training procedure. The results are shown in Fig. 4(a) (middle) and are
compared to results from Comsol PDE integration222Comsol v6.0;
https://www.comsol.com/ (top). The Comsol integration were done with a 30
meshpoints in the radial direction, 20 points throughout the anode and the
cathode thicknesses and 5 points throughout the separator. The timestep was
dynamically adjusted using a relative tolerance of $10^{-4}$ and absolute
tolerance of $10^{-1}$. The PINN surrogate accurately replicates the dynamics
and spatial profiles of all dependent variables. Some notable differences can
be observed for $c_{\rm e}$, $\phi_{\rm s,an}$ and $\mathbf{i}_{\rm e}$ where
the sharp variations at the anode current collector are visibly smoothed by
the PINN. Additionally, the temporal variations are slightly slower in the
case of the PINN surrogate as compared to the PDE solver, which is evident at
early times and results in a temporal shift for the prediction, which is
especially apparent for the current density in the anode (Fig. 4(a) bottom).
Figure 4(b) shows spatial distributions of the state variables. The solid-
phase Li concentrations $c_{\rm s,an}$ and $c_{\rm s,ca}$ are similar to the
results shown in Part I for the SPM, which justifies using the SPM solution as
the first level in the PINN hierarchy. The potentials $\phi_{\rm s,e}$ and
$\phi_{\rm s,an}$ quickly deviate and stabilize away from their initial
conditions, which may explain why strictly enforcing the initial potential
profiles did not have a significant impact on the accuracy. Similar to Part I,
the agreement between the PINN and the PDE solver using only a physics loss
validates the implementation and the regularization of the PINN, and its
ability to complement the data loss when only sparse data is available.

(a) Spatiotemporal contours ($x$-axis is the longitudinal direction, and
$y$-axis is the temporal direction from top to bottom) of primary and
secondary variables from P2D models. Top: results from PDE integration.
Middle: PINN predictions. Bottom: Absolute error between the PDE and PINN
solutions. Columns from left to right are for: electrolyte Li-ion
concentration, electrolyte potential, solid-phase anode potential, solid-phase
cathode potential, anode particle surface concentrations, cathode particle
surface concentrations, electrolyte-phase current, anode Faradaic current, and
cathode Faradaic current.

(b) State variable spatial distributions from the PINN and PDE solutions.
Profiles are shown for 0 s ( ), 200 s ( ) and 400 s ( ). Electrode/separator
boundaries are shown for the electrolyte Li-ion concentration and electrolyte
potentials ( ). The variables are the electrolyte Li-ion concentration (top
left), radial distribution of anode particle Li concentrations (top middle),
radial distribution of cathode particle Li concentrations (top right),
electrolyte potential (bottom left), anode potential (bottom middle), and
cathode potential (bottom right).

Figure 4: Predicted spatiotemporal Li-ion battery states using the physics-
informed loss from the P2D equations using the HNN SPM Sec. Cons. model with
strict enforcement potential initial conditions.

##  4 Parameteric PINN and application to parameter inference

In this section, the PINN is trained over a multi-dimensional parametric
domain, and the benefit of using a PINN for accelerating Bayesian parameter
inference is demonstrated. To the authors’ knowledge, this is the first
demonstration of using a PINN as a replacement for a physics-based Li-ion
battery model. While the computational cost involved in training a PINN to
solve the P2D or SPM equations is orders of magnitude higher than the
computational cost incurred by using a PDE solver (see Sec. 4.3), the
computational benefit of a PINN best shines when used repeatedly; for
instance, when used for parameter inference. In this section, the P2D and SPM
surrogates are trained to predict the battery state when using variable
battery internal parameters $\mathbf{p}$. In this study, two internal
parameters are varied: the exchange current density in the anode $i_{0,{\rm
an}}$ and the solid-phase Li diffusivity in the cathode $D_{\rm s,ca}$. Note
that these parameters depend on state variables (e.g., $c_{\rm e}$ and $c_{\rm
s,ca}$), but their variability is modeled with space- and time-independent
efficiency parameters $d_{i_{\rm 0,an}}$ and $d_{D_{\rm s,ca}}$, which scale
the magnitudes of $i_{\rm 0,an}$ and $D_{\rm s,ca}$, respectively. The
efficiency parameters are calibrated and are provided as the input of the PINN
surrogate. The choice of these internal parameters is motivated by aging
mechanisms linked to solid-electrolyte interface (SEI) degradation which
affects $i_{\rm 0,an}$, and cathode cracking that affects $D_{\rm s,ca}$. Both
internal parameters are modeled by the SPM and the P2D equations, which allows
using the same analysis with both surrogates. In the following, the prior
distribution $p_{\rm prior}$ of $d_{D_{\rm s,ca}}$ is a uniform distribution
$\mathcal{U}(1,10)$ and the prior distribution of $d_{i_{\rm 0,an}}$ is
$\mathcal{U}(0.5,4)$. The ranges are unitless since the efficiency parameters
scale the original parameters.

###  4.1 Internal property variation

Modeling the effect of $d_{i_{\rm 0,an}}$ and $d_{D_{\rm s,ca}}$ on the PINN
solution requires including the efficiency parameters $d_{i_{\rm 0,an}}$ and
$d_{D_{\rm s,ca}}$ as input variables of the PINN. Since the input domain
dimension is expanded, additional collocation points are needed to fully cover
the spatiotemporal and parametric space. Assuming a tensor expansion for the
number of collocation points that span the domain, one can quickly see how
relying solely on collocation points will expose the PINN to the curse of
dimensionality as the number of internal parameters included increases. Two
methods to mitigate this issue are explored here. First, a hierarchical
approach is used where the solution at one parameter set (here $(d_{i_{\rm
0,an}},d_{D_{\rm s,ca}})=(0.5,1.0)$) is used as the first level of the
hierarchy. The second level of the hierarchy learns to correct that solution
to adapt to different parameter sets. This approach uses the fact that the
sharp temporal and spatial variations occur at similar spatial and temporal
locations for all calibrated parameter values. Note that using the
spatiotemporal features of one solution to inform the spatiotemporal feature
of another is part of the recent success of the operator learning method,
where an explicit separation between spatiotemporal and parametric training is
enforced [76, 77, 78]. For the P2D model, the multi-fidelity hierarchical
approach results in the interaction of 4 distinct neural networks:

  * •

One for capturing the initial conditions at the parameter set $(0.5,1.0)$;

  * •

One for the SPM solution at the parameter set $(0.5,1.0)$;

  * •

One that uses the two previous neural nets to predict the P2D solution at the
parameter set $(0.5,1.0)$; and

  * •

One that learns the solution of the P2D equations for all parameter values.

Given that strict enforcement of initial conditions did not significantly
improve PINN accuracy, the initial conditions are only softly enforced.
Second, instead of solely relying on physics loss, one can also use data from
the PDE solver obtained for some parameter set in the domain. In the case of
the parameter calibration task (instead of the PINN regularization task),
using data will also allow evaluation of whether data can altogether be
replaced by physics loss. The number of data sets used here is limited to
four, which corresponds to two observations per calibrated parameter. For the
2D parameter domain considered here, one could theoretically generate a larger
amount of PDE solutions that would fully cover the calibrated parameter space,
and not require physics loss. However, this approach is not feasible as the
dimension of the parameter space increases. Assuming a $22$-dimensional
parameter space, which is half of the internal parameters considered in Reddy
et al. [38], a 360 s wall time to compute a single PDE solution, three PDE
solutions per dimension would require about $10^{9}$ CPUh and petabytes of
storage. Limiting the analysis to two PDE solutions per dimension aims to
mimic the sparse availability of data that can be expected. Ideally, data
should be available at the values
$\\{(0.5,1.0),(0.5,10.0),(4.0,1.0),(4.0,10.0)\\}$, i.e., at the corners of the
parameter space. A PDE solution at $(2.0,2.0)$ is also generated to serve as
test data to test the ability of the PINN to capture battery behavior in
unseen conditions. Figure 5 illustrates the parametric domain.

Figure 5: Full parametric domain space ( ), parameters included in the
training data ( ), and parameter set reserved for testing ( ).

For both the SPM and the P2D model, six PINN surrogate models are compared as
an ablation study:

  * 1)

A model using a hierarchy, physics loss, and data loss denoted as
$HNN+phys.+data$;

  * 2)

A model using the hierarchy and the physics loss only denoted as $HNN+phys$;

  * 3)

A model using the hierarchy and only the data loss denoted as $HNN+data$;

  * 4)

A model using only the physics loss and no hierarchy nor data loss denoted as
$phys$;

  * 5)

A model using the physics loss and the data loss but no hierarchy denoted as
$phys.+data$; and

  * 6)

A model that uses only the data loss denoted as $data$.

Note that in the case of the P2D model, “physics loss” contains the secondary
conservation regularization. Both SPM and P2D models trained for parameter
calibration use a linear Butler–Volmer formulation as a proof-of-concept. A
hierarchical approach to handling the non-linear Butler–Volmer formulation is
outlined in Part I. The models are evaluated against the PDE solution by
computing an error $\varepsilon$ with Eq. 9 in Part I for the SPM and Eq. 4
for the P2D model.

Figure 6: Average PINN error (bar height) over the parameter range considered
for the exchange current density in the anode $i_{\rm 0,an}$ and the Li
diffusivity in the cathode $D_{\rm s,ca}$. The red bar shows the accuracy
result for a parameter set not included in the data set. The black bars show
the accuracy for the parameter set included in the data set. The error bar
denotes the 95% percentile variability observed for all the realizations.

Figure 6a (resp. Fig. 6b) shows the training results for the SPM (resp. P2D).
The $data$ models show for both the SPM and P2D cases that high accuracy is
achieved where data is available. However, the error can be 2–3 orders of
magnitude higher in regions where no data is available. These observations
justify the procedure undertaken here (in training using physics loss) as one
cannot solely rely on the interpolation of a neural net between locations
where data is available. Comparing the $phys.+data$ and $data$ models
indicates that the error incurred where no data is available decreases when
physics loss is enforced, while lower accuracy is achieved where data is
available. The role of the physics loss is to ensure that the interpolation
between the available data does not violate the governing equations, which
results in a higher accuracy where no data is available. Comparing the $phys.$
and $phys.+data$ models highlights the importance of data. While the physics
loss alone can replicate the PDE solution, it is more efficient to use data if
it is available. This observation highlights that although the physics loss
can replace data, the physics loss is best used as a complement to data rather
than as a complete replacement. Comparing the $HNN+data$ and $data$ models,
the hierarchy is only slightly helpful in the absence of a physics loss to
predict the solution where data is not available. When data is available,
using the hierarchy increases the error incurred. This can be explained by the
fact that although the hierarchy helps steer the physics loss away from
trivial solutions, it may also reduce the expressiveness of the neural
network. This is the manifestation of the intended behavior of the
hierarchical approach where the higher hierarchy levels seek small corrections
to the solutions at the lower hierarchy levels. Comparing the $HNN+phys.$ and
$phys.$ models, it is clear that the hierarchical approach allows for a higher
effectiveness of the physics loss, in general. Comparing the $HNN+phys.$ and
$phys.+data$ models highlights that although the hierarchical approach helps
with the accuracy obtained with the physics loss, it is not a substitute for
using less data. In other words, if data is available, it should be used. This
conclusion is strengthened when comparing the $HNN+phys.+data$ and $HNN+phys.$
models, where higher accuracy is achieved overall if data supplements the
hierarchy and the physics loss.

###  4.2 Parameter calibration

Given an accurate surrogate model that captures the effect of the variability
in several internal parameters, the surrogate can be used to infer internal
parameters from partial experimental observations (i.e., the battery voltage
response). As mentioned in Section 1, multiple sources of uncertainty can
affect the parameter inference, which motivates the use of Bayesian
calibration. Here, the `numpyro` implementation of the no U-turn sampling
variant of Hamiltonian Monte-Carlo (HMC) is used [79, 80]. In short, HMC is a
sampling method that uses the gradient of the likelihood function with respect
to the parameters being inferred to guide sampling. As a result, it requires
minimal chain warm-up and allows for a high sample acceptance probability (set
to 0.9 here). This method is particularly attractive in the present context
given that gradients of the solution with respect to the parameters calibrated
can be readily computed with the neural net surrogate, which is, in general,
not possible for PDE solvers.

The variable $\phi_{\rm s,ca}$ (i.e., the battery voltage) is used as the
observation for the unseen parameter set $(2.0,2.0)$ over the time interval
$[0~{}\rm{s},1350~{}\rm{s}]$ during a 2 C discharge. The PDE integration is
replaced by a PINN surrogate that uses physics loss and a data loss (Model 1)
to compute the likelihood function $p_{\rm like}$. The standard deviation
$\sigma$ in the likelihood function (Eq. 2) is chosen to be uniform across the
observations and is set by a hyperparameter search within the bounds
$[1~{}{\rm mV},100~{}{\rm mV}]$. The chosen uncertainty value is the minimal
value that ensures that 95% of the predictions obtained with the surrogate
model evaluated at the sampled parameter values are contained within two
standard deviations of the observation data. This approach lumps the
observation uncertainty and the model uncertainty (inaccuracy of the PINN
surrogate) within the $\sigma$ value of the likelihood function (Eq. 2). The
first 10,000 samples are discarded as part of the Markov chain warm-up and the
next 4,000 are selected as the posterior samples. Two calibration scenarios
are considered: in the first scenario, the observation data is the unaltered
result of the PDE integration. In the second scenario, the observation data is
superimposed with a noise normally distributed with a standard deviation of
$3~{}\rm{mV}$. The purpose of the noisy scenario is to highlight the benefit
of using a Bayesian calibration procedure in the presence of experimental
uncertainty.

The Bayesian calibration results using the SPM surrogate are shown in Fig.
7a-f. For the noiseless scenario (Fig. 7a-c), the best likelihood standard
deviation $\sigma$ was found to be $2.0~{}\rm{mV}$. The variability in the
observation data is illustrated by plotting the positive electrode profile at
the edge of the parameter space. While varying the internal battery parameters
does have an effect on the observation data, the effect is contained within
about $20~{}\rm{mV}$, which requires a high accuracy from the surrogate model.
The calibration procedure successfully identifies that parameters near the
value $(2.0,2.0)$ explain the observation data. While the model is highly
confident in the value of the $d_{D_{\rm s,ca}}$, the uncertainty in
$d_{i_{\rm 0,an}}$ is about twice as large, which suggests that identifying
the exchange current density accurately would require a more accurate
surrogate or different observation data [81]. The difference in
identifiability between $d_{i_{\rm 0,an|}}$ and $d_{D_{\rm s,ca}}$ points to a
high level of parameter sloppiness [82, 83] (i.e., the parameters inferred are
not equally sensitive to the voltage response). Finally, the forward surrogate
model evaluation at the posterior samples closely predicts the observed
battery voltage (right).

In the case of noisy observations (Fig. 7d-f), the best likelihood uncertainty
is found to be $5.36~{}\rm{mV}$, which is consistent with the size of the
noise introduced in the observations. In turn, the uncertainty in the
predicted parameters increases, especially for the exchange current density,
which is subject to high uncertainty. Again, despite the high uncertainty
values, the forward model evaluation closely matches the observation data. The
ability of the Bayesian calibration procedure to reflect uncertainties into
the inferred parameter values is the main reason behind using the present
method in place of a non-Bayesian optimization procedure. Further validation
of the support of the posterior distribution is provided in Appendix B.

Figure 7: Parameter calibration results for the PINN surrogate for the SPM
model (a-f) and the P2D model (g-1). Shown are the calibration results for the
noiseless cases (a-c, g-i) and the noisy cases (d-f, j-l). The left figures
show the cathode potential at the current collector (i.e., the battery
voltage) for the trained cases and the test case. The middle figures show a
corner plot of the calibrated parameters. The right figures show the predicted
cathode potential at the current collector $\phi_{\rm s,cc}$ obtained with the
mean posterior samples along with responses from parameters at the 95%
percentile bounds.

Figure 7g-l shows the same experiments conducted for the P2D model. Just like
in the SPM case, the variability of $\phi_{s,cc}$ with respect to changes in
the parameters inferred is small. In the P2D case, the errors were typically
larger than for the SPM case throughout the parameter set. As a result, even
in the noiseless case (Fig. 7g-i), the best likelihood uncertainty value was
found to be $10.2~{}\rm{mV}$, which is higher than for the SPM case and
illustrates the higher model errors of the P2D surrogate. This observation
suggests that compared to the PINN SPM surrogate additional PDE data should be
used to train the PINN P2D surrogate. The joint PDF of the posterior sampled
in the parameter space has a structure similar to the SPM case but has a
larger support, which is a result of the higher uncertainties. Nevertheless,
the value of $d_{D_{\rm s,ca}}$ is confidently identified. In the noisy case
(Fig. 7j-l), the best likelihood uncertainty is found to be $10.4~{}\rm{mV}$,
which is only mildly larger than in the noiseless case. The similar
uncertainty value predicted suggests that the main source of uncertainty in
this case is the model uncertainty rather than the observational uncertainty,
and adding noise to the data does not hurt or improve the parameter inference.
As a result, the posterior PDF of the parameter inferred closely resembles the
PDF obtained in the noiseless case.

###  4.3 Computational cost

Although using surrogate models might incur higher uncertainty during
parameter inference, as shown in Sec. 4.2, the main advantage of the procedure
is its lower computational cost. In this section, computational savings are
described. An “apples-to-apples” computational cost comparison is difficult
for several reasons described hereafter. The PINN is being trained for a fixed
number of epochs to compare the performances across the models used. Early
stopping could be used to reduce the computational cost, while inducing
minimal effects on accuracy. Likewise, the PINN architecture and the number of
collocation points could be reduced to decrease the training procedure
computational cost. On the PDE solver side, several acceleration methods
through simplification of the governing equations could be used to speed-up
the PDE evaluations, while also incurring minimal errors. The number of
samples drawn with the MCMC procedure could be minimized to reduce the number
of PDE solves.

Table 1: Computational cost breakdown of the entire calibration procedure for the P2D model and the SPM. The computational cost is expressed in total computing time and “Time Equivalent PDE” which gives the number of forward evaluations that could have been done during the calibration. |  | Training |  | Total
---|---|---|---|---
| Data Gen. | SPM (0.5, 1) | IC (0.5, 1) | P2D (0.5, 1) | Full param. set | MCMC | Time | Time Eq. PDE
P2D | $1,440~{}{\rm s}$ | $3,674~{}{\rm s}$ | $310~{}{\rm s}$ | $17,274~{}{\rm s}$ | $44,985~{}{\rm s}$ | $51~{}{\rm s}$ | $67\times 10^{3}~{}{\rm s}$ | $186$
SPM | $120~{}{\rm s}$ | $3,674~{}{\rm s}$ | - | - | $12,338~{}{\rm s}$ | $44~{}{\rm s}$ | $16\times 10^{3}~{}{\rm s}$ | $530$
Table 2: Computational cost to run MCMC using the PINN surrogates and PDE solutions. Model |  Forward simulations for MCMC |  MCMC computational time
---|---|---
SPM PDE | 30 s |  12.6 $\times 10^{6}$s
PINN SPM surrogate |  314 $\mu$s | 44 s
P2D PDE | 360 s |  151.2 $\times 10^{6}$s
PINN P2D surrogate |  364 $\mu$s | 51 s

For the SPM PDE solver, a custom implicit solver is used (available in the
companion repository) and requires about $30$ s per parameter evaluation. For
the P2D solver, the Comsol PDE solver took on average $360$ s per parameter
evaluation. During the MCMC procedure, the calibration is repeated at most 10
times to optimize the uncertainty used in the likelihood. The computational
cost of the PINN training and calibration procedures are shown in Table
1333The runs were done Dual Intel Xeon Gold Skylake 6154 3.0 GHz processors.
For both the P2D and the SPM models, the vast majority of the computing time
is spent in training the model that encodes the effect of parameter
variations. In particular, the data generation accounts for at most 2% of the
total computing time. The total time spent is shown in terms of an equivalent
number of PDE solves. For the entire calibration procedure against measurement
of a single discharge cycle, $140,000$ MCMC samples were drawn. For each PINN
evaluation, the gradient of the voltage response with respect to the inferred
parameters, needed by the HMC procedure, can be obtained via auto-
differentiation [84]. For a PDE solver, this gradient can be obtained with
$N+1$ PDE solves, where $N$ is the number of parameters inferred, here $N=2$.
This results in a speed-up of $2250$x for the P2D surrogate and $780$x for the
SPM surrogate (Table 2).

The calibration step accounts for at most 0.3% of the total computational
time, while it is the main cost for calibrating with a PDE solver. Therefore,
once a PINN surrogate is trained, it can be reused for other cycle numbers and
other cells with minimal overhead. The actual speed-up for degradation
modeling is likely to be orders of magnitude higher.

Finally, in terms of memory requirements, the SPM surrogate including the
entire hierarchy contains $18,008$ parameters, while the P2D surrogate with
the entire training hierarchy contains $38,458$ parameters. Recasting the
parameter into single precision after training requires $72$ kB and $153$ kB,
respectively. Given the low computational intensity of the MCMC procedure, the
parameter inference could possibly be done onboard electrified devices.

##  5 Discussion

This work is a continuation of the Part I paper and highlights key
similarities and differences between training a PINN for an SPM or a P2D
model. As in the SPM model, the PINN can fail by only finding the trivial (no
change from initial conditions) solution. In the case of the SPM, this issue
was avoided by weighting the particle surface boundary condition. In the case
of the P2D equations, weighting the residuals alone can fail because the
current density is not held fixed. In this work, adding secondary conservation
constraints successfully avoids this training failure mode and encourages the
PINN to be trained with only physics-informed losses.

The secondary conservation is not a substitute for the multi-fidelity
hierarchical training introduced in Part I, which is shown to perform best
when used in tandem with the secondary conservation regularization loss. A
remarkable conclusion is that for the P2D model, the lower hierarchy levels
can be formulated with the solution of the SPM. First, the success of this
approach suggests that using other modeling fidelities of Li-ion batteries
could be a viable option for further improvement [85]. Second, using the SPM
solution as a base for the P2D solution effectively implemented a tensorial
expansion from two spatio-temporal variables ($t,r$) to three ($t,r,x$).
Potentially, the multi-fidelity training could apply to tensorial expansions
in the parametric domain and allow the PINN to be more efficiently trained in
higher dimensions.

The practical benefits of the trained surrogates is demonstrated for the first
time in the context of Li-ion battery parameter inference. The results
presented in Section 4 suggest that solely relying on interpolating a neural
network between available data can lead to inaccurate results where data is
not available. Using the physics-informed loss helps achieve higher accuracy
where data is not available. Nevertheless, using data and the physics loss is
the best combination to achieve high accuracy throughout the parameter space.
Designing a PINN regularization for battery models should therefore not
supplant data generation. Using a hierarchical training formulated via
tensorial expansion of the parameter space was beneficial, especially when
used with a physics and data loss. The regularization method for the PINN
training does not act as a substitute for training without data, but rather
complements data to make the Bayesian parameter inference possible in high-
dimensions.

For parameter inference, the PINN surrogate provides a fast calculation of the
likelihood function (Eq. 2) and enables calculating gradients with respect to
the inferred parameter values, thereby enabling efficient MCMC methods. Past
the initial investment of the PINN training, the surrogate decreases the cost
of model predictions by several orders of magnitude, making MCMC a cheap
process that can be used for offline and online diagnostics.

##  6 Conclusion

In this work, an approximation of a Li-ion battery P2D model was obtained for
the first time with a PINN. Using secondary conservation regularization and a
hierarchical training method derived in Part I, it was shown that the P2D
model solution could be well-approximated without data. The data-efficiency is
a key feature of the PINN, which can enable building a surrogate for high-
dimension problems with sparse data availability. The PINN was adapted to
predict the dependence of the state of Li-ion batteries with respect to
unknown internal parameters. Combining physics and data losses leads to the
highest accuracy throughout the explored parameter space. The surrogate model
was successful at accelerating Bayesian parameter inference, while leading to
a prediction that was two orders of magnitude faster than a PDE solver,
including training time. Future work will be dedicated to scaling up the
approach to higher-dimension parametric spaces either via multi-fidelity
training and/or operator learning.

## Acknowledgements

This work was authored by the National Renewable Energy Laboratory (NREL),
operated by Alliance for Sustainable Energy, LLC, for the U.S. Department of
Energy (DOE) under Contract No. DE-AC36-08GO28308. This work by authored in
part by Idaho National Laboratory (INL) operated by Battelle Energy Alliance,
LLC under contract No. DE-AC07-05ID14517. This work was supported by funding
from DOE’s Vehicle Technologies Office (VTO) with Simon Thompson as program
manager and DOE’s Advanced Scientific Computing Research (ASCR) program with
Steven Lee as program manager. A.D.’s work was also partially supported by the
AFOSR awards FA9550-20-1-0138. The research was performed using computational
resources sponsored by the Department of Energy’s Office of Energy Efficiency
and Renewable Energy and located at the National Renewable Energy Laboratory.
The views expressed in the article do not necessarily represent the views of
the DOE or the U.S. Government. The U.S. Government retains, and the
publisher, by accepting the article for publication, acknowledges that the
U.S. Government retains a nonexclusive, paid-up, irrevocable, worldwide
license to publish or reproduce the published form of this work, or allow
others to do so, for U.S. Government purposes.

## Nomenclature

Variable | Description | SI Units
---|---|---
$A$ | Battery geometric area |  m2
$c_{\rm e}$ | Electrolyte Li-ion concentration |  kmol m-3
$c_{{\rm s},j}$ |  Solid-phase Li concentration in phase $j$ |  kmol m-3
$c_{{\rm s,max},j}$ |  Max solid-phase Li concentration in phase $j$ |  kmol m-3
$C_{1}$ | Initial salt concentration |  kmol m2
$\boldsymbol{d}$ | Observations |
$\boldsymbol{d}_{\rm pred}$ | Predicted observations |
$d_{i_{\rm 0,an}}$ | Anode exchange current density efficiency factor | $-$
$d_{D_{\rm s,ca}}$ | Ca active material diff. coeff. efficiency factor | $-$
$D_{{\rm e}}$ | Bulk-phase Li-ion diffusion coefficient |  m2 s-1
$D^{\rm eff}_{{\rm e},j}$ | Effective Li-ion diffusion coefficient |  m2 s-1
$D_{{\rm s},j}$ | Solid-phase Li diffusion coefficient |  m2 s-1
$D_{\rm t}$ | Ramping function in time |  $-$
$D_{\rm x}$ | Ramping function in space | $-$
$F$ | Faraday’s constant |  s A kmol-1
$i_{0}$ | Exchange current density |  A m-2
$i^{0}_{0}$ | Exchange current density prefactor |  A m-2
$\mathbf{i}_{\rm e}$ | Electrolyte current density |  A m-2
$I$ | Current demand |  A m-2
$j$ | Phase indicator |  $-$
$J_{j}$ | Li-ion flux due to electrochemical reactions |  kmol m-2 s-1
$L_{\rm an}$ | Anode thickness | m
$L_{\rm ca}$ | Cathode thickness | m
$L_{\rm sep}$ | Separator thickness | m
$N_{\rm d}$ | Number of observations | $-$
$\boldsymbol{p}$ | Parameter set |
$p_{\rm like}$ | Likelihood function |  $-$
$p_{\rm post}$ | Posterior probability function |  $-$
$p_{\rm prior}$ | Prior probability function |  $-$
$p_{{\rm s},j}$ | Solid-phase Bruggeman coefficient | $-$
$p_{{\rm e},j}$ | Liquid-phase Bruggeman coefficient | $-$
$r$ | Radial coordinate | m
$R$ | Universal gas constant |  J kmol-1 K-1
$R_{{\rm s},j}$ | Representative active material particle radius | m
$\dot{s}_{j}$ | Production rate of Li-ions |  kmol m-2 s-1
$t$ | Time | s
$t^{0}_{+}$ | Li-ion transferrence number |  $-$
$T$ | Temperature | K
$U_{{\rm OCP},j}$ |  Open-circuit potential of active material $j$ | V
$x$ | Through-plane coordinate | m
$\alpha_{\rm a}$ | Anodic symmetry factor |  $-$
$\alpha_{j}$ | Phase concentration scaling factor |  kmol m-3
$\epsilon_{{\rm AM},j}$ |  Active material volume fraction in phase $j$ | $-$
$\epsilon_{{\rm e},j}$ |  Electrolyte volume fraction in phase $j$ |  $-$
$\epsilon_{{\rm s},j}$ |  Solid-phase volume fraction in phase $j$ | $-$
$\varepsilon$ | Scaled mean aboslute error |  $-$
$\eta_{j}$ | Kinetic overpotential | V
$\xi_{\rm m}$ |  Predicted state variable from model $m$ |
$\widetilde{\xi}$ | Raw predicted state variable from neural net |
$\sigma$ | Standard deviation |
$\sigma_{{\rm s},j}$ | Bulk-phase solid-phase conductivity |  S m-1
$\sigma^{\rm eff}_{{\rm s},j}$ | Effective solid-phase conductivity |  S m-1
$\tau$ | Timescale with significant init. condition effect | s
$\phi_{\rm e}$ | Electrolyte potential | V
$\phi_{{\rm s},j}$ |  Solid-phase potential in composite $j$ | V

## References

  * [1] J.M. Reiniers, G. Mulder, and D.A. Howey.  Unlocking extra value from grid batteries using advanced models.  J. Power Sources, 487:229355, 2021.
  * [2] J.S. Edge, S. O’Kane, R. Prosser, N.D. Kirkaldy, A.N. Patel, A. Hales, A. Ghosh, W. Ai, J. Chen, J. Yang, S. Li, M.-C. Pang, L.B. Diaz, A. Tomaszewska, M.W. Marzook, K.N. Radhakrishnan, H. Wang, Y. Patel, B. Wu, and G.J. Offer.  Lithium ion battery degradation: what you need to know.  Phys. Chem. Chem. Phys., 23:8200–8221, 2021.
  * [3] S. Kim, S. Kim, Y.-Y. Choi, and J.I. Choi.  Bayesian parameter identification in electrochemical model for lihtium-ion batteries.  J. Energy Storage, 71:108129, 2023.
  * [4] T. Fuller, M. Doyle, and J. Newman.  Simulation and optimization of the dual lithium insertion cell.  J. Electrochem. Soc., 141:1–10, 1994.
  * [5] P. Arora, M. Doyle, and R.E. White.  Mathematical modeling of the lithium deposition overcharge reaction in lithium-ion batteries using carbon-based negative electrodes.  J. Electrochem. Soc., 146:3453–3553, 1999.
  * [6] S. Santhanagopalan, Q. Guo, R. Ramadass, and R.E. White.  Review of models for predicting the cycling performance of lithium ion batteries.  J. Power Sources, 156:620–628, 2006.
  * [7] A.M. Colclasure, A.R. Dunlop, S.E. Trask, B.J. Polzin, A.N. Jansen, and K. Smith.  Requirements for enabling extreme fast charging of high energy density Li-ion cells while avoiding lithium plating.  J. Electrochem. Soc., 166:A1412–A1424, 2019.
  * [8] P.J. Weddle, S. Kim, B.-R. Chen, Z. Yi, P. Gasper, A.M. Colclasure, K. Smith, K.L. Gering, T.R. Tanim, and E.J. Dufek.  Battery state-of-health diagnostics during fast cycling using physics-informed deep-learning.  J. Power Sources, 2023.
  * [9] P. Verma, P. Maire, and P. Novák.  A review of the features and analysis of the solid electrolyte interphase in Li-ion cells.  Electrochim. Acta, 55:6332–6341, 2010.
  * [10] R. Gauthier, A. Luscombe, T. Bond, M. Baur, M. Johnson, J. Harlow, A.J. Louli, and J.R. Dahn.  How do depth of discharge, C-rate and calendar age affect capacity retention, impedance growth, the electrodes and the electrolyte in Li-ion cells?  J. Electrochem. Soc., 169:020518, 2022.
  * [11] T.R. Tanim, P.J. Weddle, Z. Yang, A.M. Colclasure, H. Charalambous, D.P. Finegan, Y. Lu, M. Preefer, S. Kim, J.M. Allen, F.L.E. Usseglio‐Viretta, P.R. Chinnam, I. Bloom, E.J. Dufek, K. Smith, G. Chen, K.M. Wiaderek, J. Nelson Weker, and Y. Ren.  Enabling extreme fast-charging: Challenges at the cathode and mitigation strategies.  Adv. Energy Mater., 12:2202795, 2022.
  * [12] T.R. Tanim, Z. Yang, D.P. Finegan, P.R. Chinnam, Y. Lin, P.J. Weddle, I. Bloom, A.M. Colclasure, E.J. Dufek, J. Wen, Y. Tsai, M.C. Evans, K. Smith, J.M. Allen, C.C. Dickerson, A.H. Quinn, A.R. Dunlop, S.E. Trask, and A.N. Jansen.  A comprehensive understanding of the agin effects of extreme fast charging on high Ni NMC cathode.  Adv. Energy Mater., 12:2103712, 2022.
  * [13] P. Mohtat, S. Lee, J.B. Siegel, and A.G. Stefanopoulou.  Reversible and irreversible expansion of lithium-ion batteries under a wide range of stress factors.  J. Electrochem. Soc., 168:100520, 2021.
  * [14] P.P. Paul, V. Thampy, C. Cao, H.-G. Steinrück, T.R. Tanim, A.R. Dunlap, E.K. Dufek, S.E. Trask, A.N. Jansen, M.F. Toney, and J.N. Weker.  Quantification of heterogeneous, irreversible lithium plating in extreme fast charging of lithium-ion batteries.  Energy Environ. Sci., 14:4979, 2021.
  * [15] E.J. Dufek, D.P. Abraham, I. Bloom, B.-R. Chen, P.R. Chinnam, A.M. Colclasure, K.L. Gering, M. Keyser, S. Kim, W. Mai, D.C. Robertson, M.-T.F. Rodrigues, K. Smith, T.R. Tanim, F.L.E. Usseglio-Viretta, and P.J. Weddle.  Developing extreme fast charge battery protocols – A review spanning materials to systems.  J. Power Sources, 526:231129, 2022.
  * [16] C.R. Birkl, M.R. Roberts, E. McTurk, P.G. Bruce, and D.A. Howey.  Degradation diagnostics for lithium ion cells.  J. Power Sources, 341:373–386, 2017.
  * [17] J. Vetter, P. Novák, M.R. Wagner, C. Veit, K.-C. Möller, J.O. Besenhard, M. Winter, M. Wohlfahrt-Mehrens, C. Vogler, and A. Hammouche.  Aging mechanisms in lithium-ion batteries.  J. Power Sources, 147:269–281, 2005.
  * [18] E. Miguel, M.S. Trimboli G.L. Plett, L. Oca, U. Iraola, and E. Bekaert.  Review of computational parameter estimation methods for electrochemical models.  J. Energy Storage, 44:103388, 2021.
  * [19] D. Lu, M.S. Trimboli, and G.L. Plett.  Cell discharge testing to calibrate a positive-electrode open-circuit-potential model for lithium-ion cells.  J. Electrochem. Soc., 169:070524, 2022.
  * [20] L.M. Thompson, J.E. Harlow, A. Eldesoky, M.K.G. Bauer, J.H. Cheng, W.S. Stone, T. Traskovic, C.R.M. McFarlane, and J.R. Dahn.  Study of electrolyte and electrode composition changes vs time in aged Li-ion cells.  J. Electrochem. Soc., 168:020532, 2021.
  * [21] R. Fathi, J.C. Burns, D.A. Stevens, H. Ye, C. Hu, G. Jain, E. Scott, C. Schmidt, and J.R. Dahn.  Ultra high-precision studies of degradation mechanisms in aged LiCO2/graphite Li-ion cells.  J. Electrochem. Soc., 161:A1572, 2014.
  * [22] Z. Yang, H. Charalambous, Y. Lin, L. Yu, J. Wen, A. Jansen, Y. Tsai, K.A. Wiaderek, and Y. Ren.  Extreme fast charge aging: Correlation between electrode scale and heterogeneous degradation in Ni-rich layered cathodes.  J. Power Sources, 521:230961, 2022.
  * [23] N.A. Samad, Y. Kim, J.B. Siegel, and A.G. Stefanopoulou.  Battery capacity fading estimation using a force-based incremental capacity analysis.  J. Electrochem. Soc., 163:A1584, 2016.
  * [24] M. Dubarry and D. Beck.  Perspecitve on mechanistic modeling of Li-ion batteries.  Acc. Mater. Res., 3(8):843–853, 2022.
  * [25] V. Sulzer, P. Mohtat, A. Aitio, Y.T. Yeh, F. Steinbacher, M.U. Khan, J.W. Lee, J.B. Siegel, and A.G. Stefanopoulou.  The challenge and opprotunity of battery lifetime prediction from field data.  Joule, 5:1934–1955, 2021.
  * [26] S. Lee, J.B. Siegel, A.G. Stefanopoulou, J.-W. Lee, and T.-K. Lee.  Electrode state of health estimation for lithium ion batteries considering half-cell potential changes due to aging.  J. Electrochem. Soc., 167:090531, 2020.
  * [27] N. Costa, L. Sánchez, D. Anseán, and M. Dubarry.  Li-ion battery degradation modes diagnosis via convolutional neural networks.  J. Energy Storage, 55:105558, 2022.
  * [28] M. Dubarry and D. Anseán.  Best practices for incremental capacity analysis.  Front. Energy Res., 10, 2022.
  * [29] R. Narayanrao, M.M. Joglekar, and S. Inguva.  A phenomenological degradation model for cyclic aging of lithium ion cell materials.  J. Electrochem. Soc., 160:A125, 2013.
  * [30] M.B. Pinson and M.Z. Bazant.  Theory of SEI formation in rechargeable batteries: capacity fade, accelerated aging and lifetime prediction.  J. Electrochem. Soc., 160:A243–A250, 2013.
  * [31] V. Sulzer, P. Mohtat, S. Pannala, J.B. Siegel, and A.G. Stefanopoulou.  Accelerated battery lifetime simuations using adaptive inter-cycle extrapolation.  J. Electrochem. Soc., 168:120531, 2021.
  * [32] A. Mallarapu an S. Santhanagopalan, W. Uno, Y. Kanai, Y. Uemura, R. Yagi, and S. Uchikoga.  Simulation of impedance changes with aging in lithium titanate-based cells using physics-based dimensionless modeling.  J. Electrochem. Soc., 170:090519, 2023.
  * [33] M. Andersson, M. Streb, J.Y. Ko, V.L. Klass, M. Klett, H. Ekström, M. Johansson, and G. Lindbergh.  Parameterization of physics-based battery models from input-output data: A review of methodology and current research.  J. Power Sources, 521:230859, 2022.
  * [34] W. Li, I. Demir, D. Coa, D. Jöst, F. Ringbeck, M. Junker, and D.U. Sauer.  Data-driven systematic parameter identification of an electrochemical model for lithium-ion batteries with artificial intelligence.  Energy Storage Mater., 44:557–570, 2022.
  * [35] P. Gasper, N. Collath, H.C. Hesse, A. Jossen, and K. Smith.  Machine-learning assisted identification of accurate battery lifetime models with uncertainty.  J. Electrochem. Soc., 169:080518, 2022.
  * [36] A. Aitio, S.G. Marquis, P. Ascencio, and D. Howey.  Bayesian parameter estimation applied to the Li-ion battery single particle model with electrolyte dynamics.  IFAC PapersOnLine, 53:12497–12504, 2020.
  * [37] L. Zhang, C. Lyu, L. Wang, J. Zheng, W. Luo, and K. Ma.  Parallelized genetic identification of thermal-electrochemical model for lithium-ion battery.  Adv. Mech. Eng., 5:754653, 2013.
  * [38] S.R. Reddy, M.K. Scharrer, F. Pichler, D. Watzenig, and G.S. Dulikravich.  Accelerating parameter estimation in Doyle–Fuller–Newman model for lithium-ion batteries.  COMPEL - Int. J. Comput. Math., 2019.
  * [39] M. Hadigol, K. Maute, and A. Doostan.  On uncertainty quantification of lithium-ion batteries: Application to an lic6/licoo2 cell.  Journal of Power Sources, 300:507–524, 2015.
  * [40] P. Constantine and A. Doostan.  Time-dependent global sensitivity analysis with active subspaces for a lithium ion battery model.  Statistical Analysis and Data Mining: The ASA Data Science Journal, 10(5):243–262, 2017.
  * [41] M. Hassanaly, A. Glaws, K. Stengel, and R.N. King.  Adversarial sampling of unknown and high-dimensional conditional distributions.  J. Comput. Phys., 450:110853, 2022.
  * [42] A. Bills, L. Fredericks, V. Sulzer, and V. Viswanathan.  Massively distributed bayesian analysis of electric aircraft battery degradation.  ACS Energy Lett., 8:3578–3585, 2023.
  * [43] W. Li, I. Demir, D. Cao, D. Jöst, F. Ringbeck, M. Junker, and D.U. Sauer.  Data-driven systematic parameter identification of an electrochemical model for lithium-ion batteries with artificial intelligence.  Energy Storage Mater., 44:557–570, 2022.
  * [44] A.M. Bizeray, J.-H. Kim, S.R. Duncan, and D.A. Howey.  Identifiability and parameter estimation of the single particle lithium-ion battery model.  IEEE Trans. Control Syst. Technol., 27(5):1862–1877, 2018.
  * [45] M. Raissi, P. Perdikaris, and G.E. Karniadakis.  Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations.  J. Comput. Phys., 378:686–707, 2019.
  * [46] Q. He, P. Stinis, and A.M. Tartakovsky.  Physics-constrained deep neural network method for estimating parameters in a redox flow battery.  J. Power Sources, 528:231147, 2022.
  * [47] W. Chen, Y. Fu, and P. Stinis.  Physics-informed machine learning of redox flow battery based on a two-dimensional unit cell model.  J. Power Sources, 584:233548, 2023.
  * [48] S. Singh, Y.E. Ebongue, S. Rezaei, and K.P.r Birke.  Hybrid modeling of lithium-ion battery: physics-informed neural network for battery state estimation.  Batteries, 9(6):301, 2023.
  * [49] P. Wen, Z.-S. Ye, Y. Li, S. Chen, and S. Zhao.  Fusing Models for Prognostics and Health Management of Lithium-Ion Batteries Based on Physics-Informed Neural Networks.  arXiv preprint arXiv:2301.00776, 2023.
  * [50] A. Bills, L. Fredericks, V. Sulzer, and V. Viswanathan.  Massively distributed bayesian analysis of electric aircraft battery degradation.  ACS Energy Lett., 8(8):3578–3585, 2023.
  * [51] A. Aitio, S.G. Marquis, P. Ascencio, and D. Howey.  Bayesian parameter estimation applied to the Li-ion battery single particle model with electrolyte dynamics.  IFAC-PapersOnLine, 53(2):12497–12504, 2020.
  * [52] V. Ramadesigan, K. Chen, N.A. Burns, V. Boovaragavan, R.D. Braatz, and V.R. Subramanian.  Parameter estimation and capacity fade analysis of lithium-ion batteries using reformulated models.  J. Electrochem. Soc., 158(9):A1048, 2011.
  * [53] M. Hassanaly, H. Sitaraman, K.L. Schulte, A.J. Ptak, J. Simon, K. Udwary, J.H. Leach, and H. Splawn.  Surface chemistry models for GaAs epitaxial growth and hydride cracking using reacting flow simulations.  J. Appl. Phys., 130(11), 2021.
  * [54] K. Braman, T.A. Oliver, and V. Raman.  Bayesian analysis of syngas chemistry models.  Combust. Theory Model, 17(5):858–887, 2013.
  * [55] Luke Tierney.  Markov chains for exploring posterior distributions.  Ann. Stat., pages 1701–1728, 1994.
  * [56] G.O. Roberts and A.F.M. Smith.  Simple conditions for the convergence of the Gibbs sampler and Metropolis-Hastings algorithms.  Stochastic Process. Appl., 49(2):207–216, 1994.
  * [57] A. Gelman, W.R. Gilks, and G.O. Roberts.  Weak convergence and optimal scaling of random walk Metropolis algorithms.  Ann. Appl. Probab., 7(1):110–120, 1997.
  * [58] M. Doyle, T.F. Fuller, and J. Newman.  Modeling of galvanostatic charge and discharge of the lithium/polymer/insertion cell.  J. Electrochem. Soc, 140:1526–1533, 1993.
  * [59] M. Doyle, T.F. Fuller, and J. Newman.  Relaxation phenomena in lithium-ion-insertion cells.  J. Electrochem. Soc., 141:982–990, 1994.
  * [60] M. Doyle, T.F. Fuller, and J. Newman.  The use of mathematical modeling in the design of lithium/polymer battery systems.  Electrochem. Acta, 40:2191–2196, 1995.
  * [61] J. Newman and K.E. Thomas-Alyea.  Electrochemical systems.  Wiley, Hoboken, NJ, 2004.
  * [62] A.M. Colclasure and R.J. Kee.  Thermodynamically consistent modeling of elementary electrochemistry in lithium-ion batteries.  Electrochim. Acta, 55:8960–8973, 2010.
  * [63] G.-H. Kim, K. Smith, K. Lee, and A. Pesaran.  Multi-domain modeling of lithium-ion batteries encompassing multi-physics in varied length scales.  J. Electrochem. Soc., 158:A955–A969, 2011.
  * [64] L. Rao and J. Newman.  Heat-generation rate and general energy balance for insertion battery systems.  J. Electrochem. Soc., 144:2697–2704, 1997.
  * [65] P.J. Weddle.  Developing and identifying physically based Li-ion battery models to inform real-time control applications.  Colorado School of Mines Arthur Lakes Library, 2019.
  * [66] A.M. Colclasure, T.R. Tanim, A.N. Jansen, S.E. Trask, A.R. Dunlop, B.J. Polzin, D. Robertson, L. Flores, M. Evans, E.J. Dufek, and K. Smith.  Electrode scale and electrolyte transport effects on extreme fast charging of lithium-ion cells.  Electrochem. Acta, 337:135854, 2020.
  * [67] M. Guo, G. Sikha, and R.E. White.  Single-particle model for a lithium-ion cell: Thermal behavior.  J. Electrochem. Soc., 158:A122–A132, 2011.
  * [68] R.B. Smith and M.Z. Bazant.  Multiphase porous electrode theory.  J. Electrochem. Soc., pages E3291–E3310, 2017.
  * [69] L. Sun, Han Gao, Shaowu Pan, and Jian-Xun Wang.  Surrogate modeling for fluid flows based on physics-constrained deep learning without simulation data.  Comput. Methods Appl. Mech. Eng., 361:112732, 2020.
  * [70] S. Wang, Y. Teng, and P. Perdikaris.  Understanding and mitigating gradient flow pathologies in physics-informed neural networks.  SIAM J. Sci. Comput., 43(5):A3055–A3081, 2021.
  * [71] A. Gouasmi, S.M. Murman, and K. Duraisamy.  Entropy-stable schemes in the low-Mach-number regime: Flux-preconditioning, entropy breakdowns, and entropy transfers.  J. Comput. Phys., 456:111036, 2022.
  * [72] Y. Morinishi.  Skew-symmetric form of convective terms and fully conservative finite difference schemes for variable density low-Mach number flows.  J. Comput. Phys., 229(2):276–300, 2010.
  * [73] M. Hassanaly, H. Koo, C.F. Lietz, S.T. Chong, and V. Raman.  A minimally-dissipative low-Mach number solver for complex reacting flows in OpenFOAM.  Comput. Fluids, 162:11–25, 2018.
  * [74] J. Yu, L. Lu, X. Meng, and G.E. Karniadakis.  Gradient-enhanced physics-informed neural networks for forward and inverse PDE problems.  Comput. Methods Appl. Mech. Eng., 393:114823, 2022.
  * [75] Ehsan Saleh, Saba Ghaffari, Timothy Bretl, Luke Olson, and Matthew West.  Learning from Integral Losses in Physics Informed Neural Networks.  arXiv preprint arXiv:2305.17387, 2023.
  * [76] S. Pan, S.L. Brunton, and J.N. Kutz.  Neural Implicit Flow: a mesh-agnostic dimensionality reduction paradigm of spatio-temporal data.  arXiv preprint arXiv:2204.03216, 2022.
  * [77] S. De, M. Reynolds, M. Hassanaly, R.N. King, and A. Doostan.  Bi-fidelity modeling of uncertain and partially unknown systems using DeepONets.  Comput. Mech., 71(6):1251–1267, 2023.
  * [78] L. Lu, P. Jin, G. Pang, Z. Zhang, and G.E. Karniadakis.  Learning nonlinear operators via deeponet based on the universal approximation theorem of operators.  Nat. Mach. Intell., 3(3):218–229, 2021.
  * [79] M.D. Hoffman, A. Gelman, et al.  The No-U-Turn sampler: adaptively setting path lengths in Hamiltonian Monte Carlo.  J. Mach. Learn. Res., 15(1):1593–1623, 2014.
  * [80] D. Phan, N. Pradhan, and M. Jankowiak.  Composable effects for flexible and accelerated probabilistic programming in NumPyro.  arXiv preprint arXiv:1912.11554, 2019.
  * [81] A. Verma, K. Smith, S. Santhanagopalan, D. Abraham, K.P. Yao, and P.P. Mukherjee.  Galvanostatic intermittent titration and performance based analysis of LiNi0.5Co0.2Mn0.3O2 cathode.  J. Electrochem. Soc., 164:A3380–A3392, 2017.
  * [82] E. Dufresne, H.A. Harrington, and D.V. Raman.  The geometry of sloppiness.  arXiv preprint arXiv:1608.05679, 2016.
  * [83] G.M. Monsalve-Bravo, B.A.J. Lawson, C. Drovandi, K. Burrage, K.S. Brown, C.M. Baker, S.A. Vollert, K. Mengersen, E. McDonald-Madden, and M.P. Adams.  Analysis of sloppiness in model simulations: Unveiling parameter uncertainty when mathematical models are fitted to data.  Sci. Adv., 8:1–19, 2022.
  * [84] Atilim Gunes Baydin, Barak A Pearlmutter, Alexey Andreyevich Radul, and Jeffrey Mark Siskind.  Automatic differentiation in machine learning: a survey.  Journal of Marchine Learning Research, 18:1–43, 2018.
  * [85] S.J. Moura, F.B. Argomedo, R. Klein, A. Mirtabatabaei, and M. Krstic.  Battery state estimation for a single particle model with electrolyte dynamics.  IEEE Trans. Control Syst. Technol., 25(2):453–468, 2016.

## Appendix

##  Appendix A P2D model governing equations

In the pseudo-2D (P2D) model, the electrolyte is represented as a dual-salt
concentrated solution [4]. Unlike the single particle model (SPM), the P2D
model does not assume that the electrolyte is ideal and instead resolves the
Li-ion and potential gradients. Li-ion conservation within the electrolyte can
be expressed as

$\frac{\partial\left(\epsilon_{{\rm e},j}~{}c_{\rm e}\right)}{\partial
t}=\nabla_{x}\cdot\left(D^{\rm eff}_{{\rm e},j}~{}\nabla_{x}c_{\rm
e}-\mathbf{i}_{\rm e}\frac{t^{0}_{+}}{F}\right)+J_{j},$ (10)

where $\epsilon_{{\rm e},j}$ is the domain-specific electrolyte volume
fraction, $t$ is time, $D^{\rm eff}_{{\rm e},j}$ is the domain-specific
effective diffusion coefficient accounting for porous electrode effects [68],
$\mathbf{i}_{\rm e}$ is the electrolyte current density, $t^{0}_{+}$ is the
Li-ion transference number, and $F$ is Faraday’s constant. The subscript $x$
indicates that the operator is in the $x$-direction (i.e., the through-plane
direction). The Li-ion sink term due to electrochemical reactions $J_{j}$ can
be represented as

$J_{j}=\frac{3\epsilon_{{\rm AM},j}}{R_{{\rm s},j}}\dot{s}_{j},$ (11)

where $\epsilon_{{\rm AM},j}$ is the active material volume fraction, $R_{{\rm
s},j}$ is the representative active material particle radius, and
$\dot{s}_{j}$ is the production rate of Li-ions due to electrochemical
reactions. To avoid confusion, $J_{j}$ is defined differently between Part I
and Part II. This difference arises because the electrochemical reaction is
heterogeneously distributed across the electrode in the P2D model as opposed
to being homogeneously distributed in the SPM. The current density in the
electrolyte phase $\mathbf{i}_{\rm e}$ for a dual-salt concentrated system can
be expressed as

$\mathbf{i}_{\rm e}=-{\kappa^{\rm eff}_{{\rm e},j}}\nabla_{x}\phi_{\rm
e}-\kappa^{\rm eff}_{{\rm D},j}\nabla_{x}\ln c_{\rm e},$ (12)

where $\kappa^{\rm eff}_{{\rm e},j}$ is the effective electrolyte
conductivity, $\kappa^{\rm eff}_{{\rm D},j}$ is the effective diffusive
conductivity. The effective electrolyte properties account for porous media
effects. The effective properties are related to the bulk-phase properties
through the Bruggeman relation, which can be expressed as

$\displaystyle D^{\rm eff}_{{\rm e},j}$ $\displaystyle=D_{\rm
e}\epsilon^{p_{{\rm e},j}}_{{\rm e},j},$ (13) $\displaystyle\kappa^{\rm
eff}_{{\rm e},j}$ $\displaystyle=\kappa_{\rm e}\epsilon^{p_{{\rm e},j}}_{{\rm
e},j},$ (14) $\displaystyle\kappa^{\rm eff}_{{\rm D},j}$
$\displaystyle=\frac{2RT}{F}\kappa^{\rm eff}_{{\rm
e},j}\left(t^{0}_{+}-1\right)\left(1+\frac{\partial\ln
f_{\pm}}{\partial\ln\left(c_{\rm e}\right)}\right),$ (15)

where $p_{{\rm e},j}$ is the Bruggeman exponent in the electrolyte phase,
$D_{\rm e}$ is the bulk-phase Li-ion diffusion coefficient, $k_{\rm e}$ is the
bulk-phase ionic conductivity, $R$ is the universal gas constant, $T$ is
temperature, and the final parenthetical term in Eq. 15 is referred to as the
thermodynamic factor. Equation 15 includes more than just the Bruggeman
relation and is formulated to satisfy concentration solution theory for two
charged species in a solution [62, 61, 4]. The Li-ion species conservation
equation (Eq. 10) is a parabolic, partial differential equation that has no-
flux conditions at the anode and cathode current-collector and requires an
initial salt concentration profile (typically assumed to be uniform).

The electrolyte potential is resolved through conservation of charge as

$\nabla_{x}\cdot\mathbf{i}_{\rm e}=J_{j}F,$ (16)

Conservation of charge in the electrolyte (Eq. 16) is expressed here as an
_algebraic constraint_ equation (i.e., there is no time-derivative). In other
words, the governing equation only requires the specified no-flux condition at
either electrode current-collector. An initial condition is not necessarily
specified a priori, which requires special handling in the PINN P2D surrogate
model (Section 3).

The solid-phase charge conservation is assumed to be well represented using
Ohm’s law and can be expressed as

$\displaystyle\nabla_{x}\cdot\left(\sigma^{\rm eff}_{{\rm
s},j}~{}\nabla_{x}\phi_{{\rm s},j}\right)=-J_{j}F,$ (17)

where $\sigma^{\rm eff}_{{\rm s},j}$ is the effective solid-phase electrical
conductivity. The effective conductivity can be specified using a Bruggeman
expression

$\sigma^{\rm eff}_{{\rm s},j}=\sigma_{{\rm s},j}\epsilon_{{\rm s},j}^{p_{{\rm
s},j}},$ (18)

where $\sigma_{{\rm s},j}$ is the bulk solid-phase electrical conductivity,
$\epsilon_{{\rm s},j}$ is the solid-phase volume fraction, and $p_{{\rm s},j}$
is the solid-phase Bruggeman coefficient. The solid-phase conservation
equations are only resolved in the anode and cathode domains. The boundary
conditions for this equation include no-flux conditions at the anode/separator
and cathode/separator interfaces. The potential of the one of the electrode
current-collectors is set to a reference value (e.g., $\phi_{\rm
s,an}|_{x=0}=0$) and the other electrode current-collector boundary condition
is either set to a Dirichlet boundary condition (in the case of a specified
voltage) or a Neumann boundary condition (in the case of current demand). For
the present study, a Neumann condition is specified at the cathode current-
collector as

$\mathbf{n}_{x}\cdot\left(\sigma^{\rm eff}_{{\rm s,ca}}\nabla_{x}\phi_{\rm
s,ca}\right)\Bigg{|}_{x=L_{\rm an}+L_{\rm sep}+L_{\rm ca}}=\frac{I}{A},$ (19)

where $\mathbf{n}_{x}$ is the unit normal in the $x$-direction, $L_{\rm an}$
is the anode thickness, $L_{\rm sep}$ is the separator thickness, and $L_{\rm
ca}$ is the cathode thickness, $I$ is the current demand (in Amps), and $A$ is
the battery geometric area. Like the governing equation for the liquid-phase
potential $\phi_{\rm e}$ (Eq. 16), the governing equation for the solid-phase
potential $\phi_{{\rm s},j}$ is an _algebraic constraint_ equation, which
requires special handling in the PINN.

Conservation of solid-phase Li is simulated in the secondary $r$ direction as

$\displaystyle\frac{\partial c_{{\rm s},j}}{\partial
t}=\frac{1}{r^{2}}\frac{\partial}{\partial r}\left(D_{{\rm
s},j}r^{2}\frac{\partial{c_{{\rm s},j}}}{{\partial r}}\right),$ (20)

where $D_{{\rm s},j}$ is the solid-phase Li diffusion coefficient. Like the
SPM (Part I), this parabolic governing equation has a no-flux condition at the
particle center due to symmetry, and has a Li surface flux due to
electrochemical reactions which can be expressed as

$\left(D_{{\rm s},j}\frac{\partial c_{{\rm s},j}}{\partial
r}\right)_{r=R_{{\rm s},j}}=-\dot{s}_{j}.$ (21)

The net production of lithium ions due to charge-transfer reactions
$\dot{s}_{j}$ couples the electrolyte/electrode equation set. The charge-
transfer reaction at the electrode/electrolyte surface is commonly expressed
using a Butler–Volmer expression as

$\displaystyle\dot{s}_{j}=\frac{i_{0,j}}{F}\left[\exp\left(\frac{\alpha_{{\rm
a},j}F\eta_{j}}{RT}\right)-\exp\left(\frac{(\alpha_{{\rm
a},j}-1)F\eta_{j}}{RT}\right)\right],$ (22)

where $\alpha_{a,j}$ is the anodic symmetry factor (assumed to be 0.5 in both
the anode and cathode domains), $i_{0,j}$ is the exchange current density, and
$\eta_{j}$ is the kinetic overpotential. The exchange current density
$i_{0,j}$ can be expressed as

$i_{0,j}=i^{0}_{0,j}c_{\rm e}^{\alpha_{{\rm a},j}}\left(c_{{\rm
s,max},j}-c_{{\rm s},j}|_{r=R_{{\rm s},j}}\right)^{\alpha_{{\rm
a},j}}\left(c_{{\rm s},j}|_{r=R_{{\rm s},j}}\right)^{(1-\alpha_{{\rm a},j})}.$
(23)

The kinetic overpotential $\eta_{j}$ can be expressed as

$\eta_{j}=\phi_{{\rm s},j}-\phi_{\rm e}-U_{{\rm OCP},j}\left(c_{{\rm
s},j}|_{r=R_{{\rm s},j}}\right),$ (24)

where $U_{{\rm OCP},j}$ is the electrode open-circuit potential evaluated
using the solid-phase surface concentration.

The spatiotemporal domain considered for P2D equations is the same as in Part
I for the time variable $t$ ([0, 1350s]) and the radial location $r$ ([0,
4$\mu\rm{m}$] in the anode and [0, 1.8$\mu\rm{m}$] in the cathode). In the
transversal direction, the $x$-domain is defined as [0, 44$\mu\rm{m}$] for the
anode, [44$\mu\rm{m}$, 64$\mu\rm{m}$] for the separator, [64$\mu\rm{m}$,
106$\mu\rm{m}$] for the cathode.

##  Appendix B PDE-based calibration

Figure 1: Posterior probability $p_{\rm post}$ obtained from integration of
400 realizations of the SPM PDE (bottom left). Marginal posterior PDF with
respect to $d_{\rm i_{0,an}}$ (top left) and $d_{\rm D_{s,ca}}$ (bottom left).

In this section the posterior PDF obtained with the PINN surrogate of the SPM
is validated. Instead of the performing the Bayesian calibration with an MCMC
procedure, the posterior is directly computed over the entire parameter space.
This is possible for the specific case tackled here given that the inferred
parameter space is only two dimensional. The product of $p_{\rm
prior}(\boldsymbol{p})p_{\rm like}(\boldsymbol{d}|\boldsymbol{p})$ is
evaluated for the noisy case by integrating the PDE of the SPM over 400 points
that uniformly span the parameter space. Given the higher cost of the P2D
model integration, this strategy is only doable for the SPM. The uncertainty
in the likelihood function is kept equal to $5.36~{}\rm{mV}$ to be consistent
with Sec. 4.2. The actual posterior $p_{\rm
post}(\boldsymbol{p}|\boldsymbol{d})$ is reconstructed by enforcing the
realizability constraint ($\int p_{\rm
post}(\boldsymbol{p}|\boldsymbol{d})d\boldsymbol{p}=1$).

The posterior obtained in shown in Fig. 1. It shows distinctive features that
were also captured by the PINN surrogate (Fig. 7 d-f). First, $d_{D_{\rm
s,ca}}$ can be identified more easily than $d_{i_{\rm 0,an}}$. Second, the
available measurements are insufficient to identify the value of $d_{i_{\rm
0,an}}$. On top of being wide, the support of the marginal posterior of
$d_{i_{\rm 0,an}}$ exhibits a bimodal structure also seen in Fig. 7e. Finally,
the curved shape of the joint posterior support (shown with the white contour
in Fig. 1) also resembles the contour of the joint posterior shown in Fig. 7e.