State estimation of lithium-ion cells using a physicochemical model based extended Kalman ﬁ lter

(cid:129) Two di ﬀ erent recursive state-observer models using reduced p2D. (cid:129) In ﬂ uence of reduction schemes analyzed for estimation process. (cid:129) Adjusted ﬁ nite volume method for improved robustness. (cid:129) Modi ﬁ ed EKF uses improved initialization and mass conservation. (cid:129) Estimation accuracy analyzed for both global and local states. Two time-varying linear state-space representations of the generally accepted physicochemical model (PCM) of a lithium-ion cell are used to estimate local and global states during di ﬀ erent charging scenarios. In terms of computational speed and suitability towards recursive state observer models, the solid-phase di ﬀ usion in the PCM of an exemplaric MCMB/LiCoO 2 lithium-ion cell is derived with the aid of two di ﬀ erent numerical reduction methods in the form of a Polynomial Pro ﬁ le and an Eigenfunction Method. As a benchmark, the PCM using the original Duhamel Superposition Integral approximation serves for the comparison of accuracy and computational speed. A modi ﬁ ed spatial discretization via the ﬁ nite volume method improves handling of boundary conditions and guarantees accurate simulation results of the PCM even at a low level of spatial discretization. The Polynomial Pro ﬁ le allows for a signi ﬁ cant speed-up in computational time whilst showing a poor prediction accuracy during dynamic load pro ﬁ les. The Eigenfunction Method shows a comparable accuracy as the benchmark for all load pro ﬁ les whilst resulting in an even higher computational e ﬀ ort. The two derived observer models incorporate the state-space representation of the reduced PCM applying both the Polynomial and Eigenfunction approach combined with an Extended Kalman Filter algorithm based on a novel initialization algorithm and conservation of lithium mass. The estimation results of both models show robust and quick reduction of the residual errors for both local and global states when considering the applied current and the resulting cell voltage of the benchmark model, as the underlying measurement signal. The carried out state estimation for a 4C constant charge current showed a regression of the cell voltage error to 1mV within 30s with an initial SOC error of 42.4% under a standard deviation of 10mV and including process noise.


Introduction and literature review
The high energy and power density compared to other battery chemistries [1] established the lithium-ion battery as the state of the art technology for electrical energy storage systems for a wide application field, ranging from small electronic devices up to large scale applications such as stationary storage systems or automotive battery packs [2]. However, the manufacturing costs are still challenging [3], which slows down a market penetration to an economically competitive energy storage system especially in the automotive sector [3].
To address this circumstance, current efforts [4] aim to push the price below US$200 per kW h or even lower for lithium-ion cells [2] within the next few years. Other estimations are cautiously optimistic and presume lower reduction of the production costs [5]. Besides the development of enhanced battery materials such as the active materials, the electrolyte, the metal collector foils and the separator [6] as well as the economical factors through increased production volumes [7], the size of lithium-ion cells [2] is regarded to be a substantial factor in order to decrease the production costs. The size of the cell is enlarged either by longer electrodes or by thicker coatings of composite material. Compared to small-sized cells, the application of large-sized (i.e. >10 Ah) [8] cells offers potential towards the reduction of cost per kW h [3]. This comes along with an influence on the cell performance based on dynamics [9] and inhomogeneity effects [10] within the cell. With increasing the cell's size, safety hazards may also rise as the convertable amount of energy during a failure scenario of a single cell correlates directly to the cell size. Maximizing the efficiency and minimizing safety threats [1] for a single cell or a whole battery pack consisting of larger sized cells, brings up new challenges for battery management systems (BMS). Battery monitoring algorithms mainly focus on an accurate prediction of the state of charge (SOC), the state of health (SOH), the capacity and impedance of a cell in order to ensure all operations within its safe operating area (SOA) by means of BMS control strategy [11]. Size effects must be considered for an accurate observing and controlling of cells such as increased inhomogeneities for the local current, concentration, potentials and temperature within the cell. Since state of the art model-based monitoring algorithms incorporate non-physicochemical models such as the equivalent circuit model (ECM), besides the cell's voltage, surface temperature and applied current, no information on the local scale can be incorporated for state estimation purposes. Falsely predicted SOC of a lithium-ion cell increases the threat of using the cell out of the SOA and local harming processes [12] may occur during operation. Considering electric vehicles, a more simple but very meaningful worst-case scenario would be a falsely predicted available range based on SOC and temperature estimation considering no local effects within large-sized cells, which would compound the issue of range anxiety of the customer. A more profound and mechanistic model for the lithium-ion cell which offers information on the local scale is the physicochemical model (PCM), commonly known as pseudo two-dimensional model [13]. The generally more complex and also more inaccurate model compared to the strictly empirical ECM offers great potential to ease the problems accompanied with inhomogeneities in large sized cells. By reformulating the underlying equations, state observer models can be derived, which are able to incorporate information on the local scale to enhance the accuracy of monitoring lithium-ion cell performance during challenging tasks such as fast charging.
In this work, the PCM is used for implementation of two different recursive state observer models to show the suitability for accurate state monitoring of lithium-ion batteries under varying load scenarios. To the author's best knowledge, the presented work is the first attempt to estimate local states of a fully-spatially-resolved PCM solved via the finite volume method (FVM) using a modified extended Kalman filter (EKF) which conserves lithium mass and the states' physical interpretation along with their spatial distribution.

Models for monitoring lithium-ion batteries
The literature review reveals plenty of models to describe and predict the behaviour of lithium-ion batteries. In the following part, the decision for the PCM model is outlined in comparison to other, widely used models of lithium-ion batteries in the application field of battery monitoring algorithm.
Artificial neural networks (ANN) models incorporate mathematical models which reduce the error between input and output signal using weighting and cost functions, which are adjusted by training data. To parameterize an ANN, all battery operation areas need to be covered and the training process becomes a time and cost-intensive task. The work of Cai et al. [14] deals with a model for a nickel-metal hydride battery and uses the applied current and the cell voltage as input signals. Since a trial of different functions of these input signals is needed, a dramatical increase of the computational costs is seen. The authors aspire to a more computationally efficient model incorporating a mechanistic description of the electrochemical behaviour of a lithium-ion cell and thus neglect this type of model for this work.
Besides ANN models, the equivalent circuit model (ECM) is widely used in research and application field of the BMS for monitoring the global states of a lithium-ion battery. The work of Hu et al. [15] presents a variety of different ECMs and the reader is referred to this publication for more profound information. In short, the ECM is an empirical, mathematical approach which requests little computational power [11], therefore less simulation time and can be easily parameterized via experimental data of the cell [9]. The main drawback of this approach is its limited validity beyond the chosen parameterization window as the model parameters are fitted to experimental data under specific operating conditions [9] and the model itself is not based on general physical or chemical principles governing the performance of electrochemical cells. In automotive applications, the extending operating window in terms of temperature, voltage and applied current may lead to false predictions and subsequent reduction of lifetime, safety and performance. Since the efforts of Plett et al. which firstly used a non-linear Kalman filter (i.e. EKF) [16] to estimate the cell's SOC and subsequently a Sigma-Point Kalman Filter [17] to further increase the accuracy of the estimated global states of the cell, the application of filter and observer techniques is widely used in order to gain accurate monitoring of lithium-ion batteries via the ECM. Other works focussing on the same problem such as Zhang et al. [18] fitted the ECM parameters based on electrochemical properties and showed a distinct improvement compared to commonly used parameterization methods.
Most recent work of Wei et al. [19] seem to further ease the inaccuracy as well via data-driven, online adapted ECM parameterization. Nevertheless, since the ECM still lacks of a mechanistic description of the cell's electrochemical behaviour and no local states in the lithiumion battery can be estimated, this model is not suitable for this work.
The newman-type PCM [13] often referenced as pseudo two-dimensional modelcorrelates the fundamental principles of transport phenomena, thermodynamics and electrochemistry on a macroscopic (i.e. electrolyte domain) and microscopic (i.e. particle domain) scale for a lithium-ion battery [9]. Compared to the strictly empirical ECM, the mechanistic PCM not only consumes more computational time based on its complexity but also requires vast parameterization effort due to the amount of more than 30 parameters and the nature of the parameters such as transport properties, electrode's morphology or reaction rate constants. The comparably high computational demand and parameterization effort results in a model which then shows superior validity over a wider range of applications and offers the incorporation of further physics-based processes such as aging phenomena [20], volume expansion [21] and safety related effects [22]. Large-sized cells and increased coating thicknesses of the electrodes inevitably promote gradients in potential and concentration, which can be simulated by the PCM. Based on the growing importance of localized cell utilization, the PCM is the model of choice in order to describe the performance of future cell generations accurately enough.

Recursive state observer models using PCM
The complexity of the parameterization for a PCM recommends an application of filter techniques to iteratively reduce the deviance between simulated and measured states of a lithium-ion battery. Only a few research efforts [23][24][25] are dealing with recursive state observer models using the PCM [26], which shows the necessity of our work.
Smith et al. [23] reduced the PCM to a single input multiple output model, which is linearized at 50% SOC. Based on this model, a linear Kalman filter was implemented for the estimation of local potentials, concentration gradients and the SOC from the applied current and cell voltage measurements. The estimation for a 6 Ah lithium-ion cell shows good performance within a SOC range from 30% to 70% by using 2 A and 25 mV process noise for the applied current and the cell voltage. The computational efficiency is comparable to the performance of ECMs [23], however, the filter performance beyond 70% SOC could be improved. In this work, we show a robust and accurate estimation results of two state observer models until the fully charged state of a lithium-ion cell.
In the work of Domenico et al. [24], a simplified PCM was combined with an EKF. The simplification yields to significant loss of representativity of a lithium-ion cell but was investigated in this publication towards its feasibility in observer applications. Regarding the cell voltage as measured value, the focus lied on the estimation of the SOC which revealed excellent performance under various test scenarios. However, this work lacks an investigation of local states such as the potential drop between the electrolyte and the electrodes, which is an indicator for aging phenomena [27].
Regarding aging phenomena such as lithium-plating during charging processes, the work of Klein et al. [28] showed a PCM based observer model to identify the optimal charging strategy referring to the local side-reaction overpotential in the anode and the cell temperature. Since the electrolyte concentration was constant a certain loss of accuracy has to be considered. In this work, the electrolyte concentration is calculated via the fundamental mass balance equation of the PCM and gains a more accurate state-estimation for the lithium-ion battery. The publication of Bizeray et al. [25] was the first approach dealing with a fully-spatially-resolved PCM incorporating Chebyshev orthogonal collocation method using an EKF algorithm. The local states are corrected via measured values of cell voltage, applied current and surface temperature. The error in measured cell voltage and surface temperature is set to 10mV and 0.5 K, respectively. The approach showed robust behavior regarding falsified initialization of SOC (30%) and less than 1% error for the anode bulk SOC after 185 s estimation time for a 4C constant current discharge scenario. The publication lacks a detailed analysis of the spatial distribution of the local states and the total number of differential algebraic equations (DAEs) was not outlined. Since the microscopic domain is discretized with 15 nodes, the number of the overall DAE increases and conservation of lithium mass [29] is missing in the EKF algorithm in order to gain a more robust and more accurate state-estimation.
In this work, the authors present the first approach of a fully-spatially-resolved PCM solved by the FVM using a modified EKF algorithm accounting for conservation of lithium mass. This allows for conserving all the properties of the modeled dynamics over a wide operating window with no further assumptions such as constant concentration in the electrolyte [28]. Particular attention lies on the numerical reduction of the microscopic particle domain to limit the total number of DAEs and the modification of the FVM in terms of accurate handling of boundary conditions of the PCM with a low number of discretization elements.

Application of observer models for charging scenarios
The charging time is majorly affecting the customers' experience of any battery powered device. Improved battery monitoring algorithms will further help to correctly estimate not only global but also local states of the cell which is believed to allow for maximizing the charging current whilst monitoring and controlling accompanied safety risks. Hazardous processes inside the cell during charging scenarios were indentified to be lithium-plating [12] at the interface of anode and separator. With the aid of the estimated local states in the PCM, the overpotential for this side reaction can be described as follows: The potential drop ( − Φ Φ s l ) between the solid (i.e. electrode) and the liquid phase (i.e. electrolyte) at the anode-separator interface (x = L NEG ) at a certain time (t k ) holds as indicator for possible lithium plating when the state is 0 or becomes even negative [27]. The aforementioned publication of Klein et al. [28] uses an algebraic constraint for the side-reaction overpotential within the anode,which could be estimated with a residual error of 15 mV. In contrast to the observer model of Klein et al. [28], the concentration within the electrolyte is not assumed to be constant and improved accuracy of the gained simulation results is expected in this work. The two observer models in this work focus on the estimation accuracy and speed especially for the local states such as the characteristic potential drop in Eq. (1) in order to enable for a more precise indication of critical side reactions during charging such as lithium plating.

Physicochemical model
The PCM describes the lithium-ion cell on the macroscopic scale (i.e. x-dimension) via two porous insertion electrodes, a single insulating porous separator and the electrolyte. The porous electrodes are composed of active material, additives (e.g. carbon black) and binder, coated on a current collector foil [30], whereby the latter is neglected for the modeling approach in this work due to its in orders of magnitude higher electrical conductivity compared to the remaining materials. The additional dimension on microscopic scale (i.e. r-dimension) describes the particles of the active material, which is often referenced as "pseudo" dimension of the PCM. In Fig. 1, the electrochemical cell with MCMB/LiCoO 2 as active material pairing is schematically shown with the adjacent copper/aluminium current collector foils.
The underlying processes of charge and mass transport as well as electrode kinetics are mathematically described by the model in accordance with Doyle et al. [13]. The active material in the solid phase is modeled via symmetric, identically-sized spheres where the diffusion equation is implemented. The liquid phase describes the electrolyte. The coupling between the phases is implemented via mass and charge balances as well as the electrode kinetics, which results in a potential drop between the two phases [30]. A more precise description of the PCM is presented elsewhere [31] and the reader is referred to this work for more information, but for the readers' convenience the governing equations are summarized in the appendix (see Table 10). In addition, the related boundary conditions are depicted in Table 11 included in the appendix. In this work, the temperature dependency of the reaction kinetics, thermodynamics and the transport parameters in solid and liquid phase of the PCM is implemented and the temperature is calculated via the fundamental energy balance according to the work of Bernardi et al. [32]. For all simulations in this work, the ambient temperature was set to 25°C. The temperature of the cell is not included in the dynamic state vector but calculated at every time step. In sum, the PCM reduces the thermal-electrochemical performance of a lithiumion cell to a dynamic state vector of The state vector includes the concentrations (c c , l ss ) and potentials (Φ ,Φ l s ) in solid and liquid phase, the macroscopic current density in the electrolyte (i l ) and the molar flux ( j n ). One objective of this work is the development of a robust discretization of the PCM in time and space and the reduction of the solid-phase diffusion partial differential equation (PDE) in a form, which enables for a computational efficient and accurate model of a lithium-ion battery using a low number of spatial discretization elements and can be used for recursive state observer models.

Parameterization
The parameterization of the PCM includes thermodynamic, kinetic, transport and geometrical parameters [30]. The basic parameters were adopted from the publications of Mao et al. [33], which included a MCMB/LiCoO 2 cell with 1 M LiPF 6 in 1:1 EC/DMC electrolyte. The film resistance accounting for deposit layers on the surface of the MCMB particles was included in the PCM setup. The activity coefficient was adopted from the parameter set of Mao et al. [33] and thus set to zero. The temperature dependency is applied to the parameters of the diffusion coefficient in the active materials and the electrolyte, the reaction rate constants, the ionic conductivity and the film resistance at the anode surface. In the appendix of this work, the summary of the basic PCM parameters is given in Table 12 and the thermal parameters are depicted in Table 13. In terms of the lithium mass conservation in the EKF used in the observer models, the total lithium in the solid phase is calculated to 1.7040 mol m −2 . The initial concentrations are defined as the reference concentration (c ref ) for the electrolyte and according to the stoichiometric coefficient for the active materials depending on the regarded charge or discharge scenario. Note, that the initial stoichiometric coefficients for the charging scenarios were set to 0.1 and 0.96 in the anode and cathode domain, respectively.

Discretization via FVM
The DUALFOIL model is taken as reference for the PCM in developed in this work, which was the latest release [22] of the PCM embedded in FORTRAN of the Newman research group [34]. The fundamental equations (see Table 10) and the boundary conditions (see Table 11) of the PCM form a non-linear DAE system with the six aforementioned state variables (see Eq. (2)). The DAE consists of the two PDEs for the mass balances in solid and liquid phase, three ordinary differential equations (ODEs) for the charge balance and the definition of the potentials as well as a single algebraic equation for the electrode kinetics. The non-linearity is caused by the Butler-Volmer equation to describe the electrode kinetics as well as the temperature and concentration dependent physical properties of the cell components [30]. As the non-linear DAE cannot be solved analytically, numerical  [13]. The fundamental model equations are depicted for the solid (i.e. active material) and liquid (i.e. electrolyte) phase, including three different numerical approximation methods (i.e. DSI, PP and EM) for the solid-phase diffusion. The PP-and EM-approach are used for the development of the recursive state observer models using the EKF-algorithm. approximations in form of linearization schemes are used which include discretization methods in time and space. For all state variables, the time discretization is implemented by the Crank-Nicolson formulation [30]. The spatial discretization over the three domains differs for each equation and is explained more in detail. The numerical approximation within both electrode and the separator domain is based on the FVM, which uses Gauss' theorem to approach a state variable within a specified control volume [35]. The implementation itself uses the finite difference method (FDM) with differently oriented discretization directions. Regarding the associated boundary conditions within each domain and the type of the equation, the chosen approximation method and its orientation for each equation is depicted in Table 1. The number of discretization elements were set to 3, 2 and 5 in the anode, separator and cathode domain, respectively. This corresponds to characteristic spatial discretization lengths of 24, 12.5 and 10 μm. In this work, we used only equidistant distribution for the 3-2-5 discretization and thus the spatial discretization length is constant in each domain. Table 14 is attached in the appendix for the readers' convenience, which shows the FDM implementation using the FVM formulation of the mass balance in the liquid phase and the related three ODEs for the definition of the potentials as well as the charge balance at the anode-separator interface ( = x L NEG ) (see Table 2).
An approximation via FDM for the mass balance in the solid phase would increase the number of DAE since at every node in the electrode domains, a single discretized solid phase diffusion PDE must be taken into account. In order to save computational time and to limit the number of the DAE, this equation is approximated via three different numerical reduction methods and will be discussed later in this work. Note that the total number of DAE (n DAE ) is defined by the chosen number of spatial discretization elements (n j ) in each domain and summarizes to Looking into the discretization scheme for solving the ionic current density, the internal boundary conditions at the separator interfaces to the anode and cathode are already occupied (see Table 11 -"Charge Balance") and the discretization orientation is set to forward and backward, respectively. Note, that the adjacent boundary conditions at the current collector interface set the macroscopic ionic current density to zero and are fully respected by the chosen discretization scheme. To the authors' best knowledge, the referenced PCM embedded in FOR-TRAN includes similar boundary conditions at the interfaces and the adjacent boundaries. In addition, a second model to compare the simulation results was taken into account, namely the lithium-ion battery interface embedded in the commercial FEM-solver COMSOL Multi-physics®. As this model is based on the DUALFOIL model as well, the same boundary conditions are implemented in this model. In this work the robustness of the developed models is shown, guaranteeing accurate handling of these internal and external insulating boundary conditions with a low number of spatial discretization elements (3-2-5) and the accuracy of the gained simulation results in comparison to the FORTRAN and the COMSOL model.

Approximation of the solid-phase diffusion equation
As mentioned before, the spatial discretization of the microscopic particle domain incorporates no FDM, but is approximated via three different reduction schemes in this work. For instance, an arbitrarily chosen number of 5 nodes in each electrode and 2 nodes in the separator within the macroscopic electrolyte domain would lead to a total number of 100 nodes only to discretize the solid-phase diffusion PDE, if 10 nodes in the particle domain are chosen as well. The aforementioned total number of DAE would significantly increase when the FDM is used for the spatial discretization of the particle domain, which comes along with a larger computational time. The necessary memory space seems not critical for desktop PCs or workstations, but for microcontroller environments the size of the linearized DAE is crucial as typically, low memory space (i.e. in the range of Kilobytes) for the calculation is available. The total number of DAEs defines the size of the system matrix which needs to be solved for the simulation and a low number of DAE is important in the models presented in this work, as future work of the authors will be dealing with the implementation on a microcontroller, which is out of the scope of this paper but briefly discussed in the following. For instance, the chosen 3-2-5 discretization generates 63 DAEs according to Eq. (3), which leads to a 66 × 66 jacobian matrix as the entries for the dynamic and algebraic states of the solid phase have to be considered in the separator domain as well. On a standard microcontroller equipped with 192 kB available RAM, the allocated memory for this jacobian matrix accounts to 19.3% of the total RAM available, when the values are stored with double precision (8 kB). Since the solving process needs also the inverted matrix, the allocated memory rises to 38.6%. This shows, that the number of DAEs is crucial for the real application as the size of the jacobian matrix allocates the major part of the memory space.
Therefore, one of the main objectives in this work is a lean DAE which generates still accurate simulation results. The numerical approximation schemes in this work are adopted from other research groups and account for the calculation of the surface concentration as it is the relevant state for the PCM needed from the microscopic domain. As the original DUALFOIL model from the Newman group [13] serves as the reference for this work, the first approximation scheme is its inbuilt Duhamel Superposition Integral (DSI). The PCM incorporating this approximation is further used as a benchmark. Since the DSI is not suitable for recursive state observer models as it takes into account all previous concentration states in the solid phase, two other approximations were chosen which allow a recursive implementation only depending on the previous solid concentration states. The first approximation is a Polynomial Profile (PP) adopted from the work of Subramanian et al. [36] and the second approximation is an Eigenfunction Method (EM) adopted from the work of Guo et al. [37]. As the reduction schemes are only adopted from these works, the reader is referred to the original works for more detailed information.
In short, with the aid of the three approximation schemes in the Diff. = Difference. a Numerical reduction method. b Algebraic equation.
Extension for non-linear DAÊ≈  microscopic particle domain, the total number of the linearized DAE could be efficiently reduced for using the FDM in the macroscopic electrolyte domain. The Polynomial and the Eigenfunction approximation are used for the two models implemented in MATLAB (i.e. PPand EM-PCM) beside the benchmark model, which uses the DSI approach. The PP-and EM-PCM are crucial for enabling the implementation of the recursive state observer models using the steadystate representation of the fully-spatially-resolved PCM, which is of high interest for battery management system applications.

Solving of the linearized DAE
The linearized DAE is solved via the Newton-Raphson formula [38]. Let f be the vector summarizing all system equations of number n, by computing the Jacobian (J f ) of f, the system equations can be linearized around a trial function. The solution state vector ( + x i ( 1) ) can be gained by iterating for i-times until the required convergency is reached [39] as In terms of the convergency criteria [38], the absolute (∊ abs ) and relative tolerance (∊ rel ) are defined as [40] In this work, the relative tolerance was set to 1 × 10 −4 and the absolute tolerance was set to 1 × 10 −10 . The discrete time step is set to 25 ms up to 1 s of simulation time and subsequently increased to 1 s. The most computational effort is caused by generating and inverting the jacobian matrix. The linearized DAE considered in this work, is forming a block-tridiagonal matrix [31] when using the FDM. Thus, the system equations can be defined as with g j representing the model equations evaluated at the node j with the unknowns x j . The block-tridiagonal matrix is set of the matrices A B , j j and D j which represent the Jacobians of the model equations at the node (j) and its adjacent ones (i.e. − j 1 and + j 1) as and thus the solving procedure can be depicted as according to the Newton-Raphson formula shown in Eq. (4). The matrix inversion uses a MATLAB® 2016b in-built function [40], which adjust the solving algorithm according to the sparsity of the current constitution of the jacobian matrix. In short, only the matrix inversion was implemented via an MATLAB in-built function. The whole solving process is reduced to a simple matrix inversion. In terms of real applications, this function can be easily embedded by Gauß-Jordan [41] matrix inversion schemes in order to transfer the solving routine into compiled languages such as C which is used in microcontrollers.

Recursive state observer model
In order to enable for the recursive state estimation of a lithium-ion cell and to overcome parameterization uncertainties such as deviations for the reaction rate constants which increase the error of the simulated states, filter algorithms like the EKF are useful model-enhancements to reduce the residual error between measurement and simulation. Since the work of Plett et al. [42], this has been a widely used method in terms of state estimation for the lithium-ion battery.
As the state observer models need a recursive formulation, only the PP-and EM-PCM models are suitable for implementation. The benchmark-PCM using the DSI approach generates the targeted states of the lithium-ion cell in this work to enable the analysis of the estimation accuracy and speed of local states within the lithium-ion cell. In-situ measurements of local states in a lithium-ion battery are difficult and not available for this work, nevertheless the analysis of the local estimated states by the observer models can be evaluated by using the presimulated, noise corrupted states of the DSI-PCM.
In short, the application of a Kalman Filter [43] on a DAE system is performed by the prediction and the update step. First, the prediction step generates estimates of the current state variables including all its uncertainties. Second, the update step corrects the predicted states via the noise corrupted measurement values. For the readers' convenience, the authors attached the basic steps of the Kalman Filter briefly in the appendix (see Table 15) based on the works of Kalman et al. [43][44][45]. As the DAE of the PP-and EM-PCM is non-linear, the extended version of the Kalman Filter (i.e. EKF) must be used in this work. Following the general introduction of the Kalman filter and its extended version [46] the linearized state-space representation is defined aŝ̂= where Eq. (9) and (10) represent the process and the measurement model, respectively. The algorithm steps of the Kalman Filter and the EKF are the same except that the transition (F k ) and observation matrix (H k ) are linearized (i.e.F k and H k  ). Note, that the vectorsx k andû k refer to the state (i.e. most recent estimate) and input vector of the linearized state-space model. The algebraic states (z k ) are not regarded for the process model, as the EKF focuses on the dynamic states only. The vectors ω k and v k represent the Gaussian white process and measurement noise, which corrupt the process and the measurement model with independent uncorrelated continuous random variables with zero mean. The covariances of the noise vectors ω k and v k are defined as Q k and R k . The linearized transition and observation matrix are derived as follows: The functions f and h are mapping functions for the differential and state-output equations. The symbols x z , k k and u k are the vectors of the dynamic state, algebraic state and the input variables, respectively.
The linearized matricesF k and H k  represent the Jacobians referring to the dynamic states in case of our PP-and EM-PCM. The linearized DAE of the PP-and EM-PCM is thus reformulated to a linearized statespace representation around the most recent estimatex k for every time step k.
To the authors' best knowledge, this is the first time the linear statespace representation of the fully-spatially-resolved PCM is derived by using the FDM with control volume formulation (i.e. FVM). The implemented FDM of this work rectifies the insulting boundary conditions in the electrolyte and is suitable for a low number of chosen discretization elements, which leads to a lean DAE of the PCM and its state-space representation which makes it a suitable approach for microcontroller application, as discussed in the section before.

EKF with PP-PCM
The dynamic state vector for the PP-PCM based observer model is defined aŝ where c s and q s represent the volume-averaged concentration in the solid phase and the volume-averaged concentration flux, respectively. These can be calculated at each node j and at each discrete time step k referring to the previous time step by using the formulation according to Subramanian et al. [36] as Accounting for all spatial discretization nodes, an overall representation can be defined for the concentration in the liquid phase as where a matrix inversion allows for a definition, which relates the electrolyte concentration to its previous state and the ionic current density. For the reader's convenience we attached an example of the spatial discretization in the appendix (see Table 14), where the FDM for the mass balance in the electrolyte with central orientation combined with the Crank-Nicolson formulation over time is shown at the interface between the anode and the separator. To the author's best knowledge, the linear state-space representation using the FDM including both the solid and liquid concentration states was not shown before in literature. Note, that the vectors of concentration (c l k , ) and ionic current density (i l k , ) include every node at a discrete time step (t k ). The derived equations in Eqs. (12) and (13) yield to the linearized versions of the transition matrix (i.e.F k ) and the input matrix (i.e. B k ). For instance, the aforementioned discretization of 3-2-5 would lead to 31 equations, which lead to a system matrix of 33x33 since zero-entries of the solid dynamic states must be regarded in the separator as well. This would lead to an allocated memory space (i.e. RAM) on the aforementioned microcontroller of around 8.7 kB with double precision of the stored variables, which corresponds to 4.5% of the available memory space. This shows, that the implementation of the observer model in this microcontroller is possible since the implementation is based on a lean DAE which generates accurate states even at a low chosen number of discretization elements. The input vector can be defined aŝ The process noise covariance matrix Q k is of diagonal shape and dependent on the applied current in case of a pulsed charge or discharge scenario. In terms of the electrolyte concentration, the process noise variance refers to the amount of total lithium in the electrolyte within the pore of the anode domain, which is consumed or generated (i.e. charge or discharge scenario) for the estimated step ( t Δ k ) as follows The process noise variance of the averaged concentration in the solid phase is set to the amount of total lithium which enters or leaves the microscopic particle domain of the anode and can be written as follows In case of an applied pulsed current of 53.75 A m −2 (i.e. 2.5 C-rate) and a time step of 1 s, the process noise variances would exemplarily calculate to 75.7665(mol m −3 ) 2 and 4.3642 × 10 4 (mol m −3 ) 2 which corresponds to a standard deviation of 8.7mol m −3 and 208.9 mol m −3 for the liquid and averaged solid concentration, respectively. In case of a constant applied current, the process noise variance is set to 10 and 100 (mol m −3 ) 2 for the liquid and averaged solid concentration. The corruption for the volume-averaged concentration flux q s is set to zero for both the constant and pulsed applied current to avoid violations of the mass conservations, which is explained later in this section.
The measurement noise covariance matrix R k is set to 1 × 10 −4 V 2 which corresponds to a standard deviation of 10 mV and accounts for sensor noise of the measured cell voltage.
The Kalman gain matrix (K k ) and the approximation error covariance matrix (P k ) are calculated as shown in the appendix (see Table 15). The initialization of the approximation covariance matrix is set equal to the initial values of the process noise matrix. For more profound information about the meaning and impact of the filter specific matrices, the reader is referred to the work of Campestrini et al. [47]. The linearized observation matrix H  is determined by the voltage of the cell V cell , which is derived from the potential difference in solid phase between the external boundaries of the model.
Therefore, the potential in the solid phase is expressed via the dynamic states, the inversion of the electrode kinetics and the insertion of the overpotential as whereas the surface concentration can be directly related to the dynamic states in Eq. (11) using the PP-approximation of the work of Subramanian et al. [36]. The term E eq represents the equilibrium potential in each electrode, i 0 describes the exchange current density outlined in Table 14 and F and R represent Faraday's constant and the gas constant (see Table 17). The linearized observation matrix is defined with respect to the external nodes according to the partial derivatives of the dynamic states as Due to the non-observability of the reformulated PCM, lithium-mass conservation according to the work of Klein et al. [48] is included in the EKF algorithm. In contrast to this work, the mass conservation is included in an EKF algorithm and the linear state-space representation does not assume a constant electrolyte concentration, but the fullyspatially-resolved mass balance in the liquid phase of the PCM solved by the FVM. Referring to the initial concentration within the electrodes at the fully charged or discharged state of the cell, the total amount of cycleable lithium is predefined. For all times, the total amount of lithium is calculated within both electrodes and separately within the electrolyte. Both in the solid and liquid phase, the conservation of lithium referring to the predefined amount of cycleable lithium must hold at any time, as no aging effects or other side reactions are considered in this work. In this work, the EKF was modified to improve the estimation of the estimated solid-phase concentrations in the anode.
The chosen MCMB active material shows open circuit potential (OCP) areas with low gradients referring to the lithiation level, which may cause the estimation to fail. Therefore, the Kalman gains at the nodes within the LiCoO 2 domain are used in the anode domain for the concentration in the solid phase due to the relatively higher slope of the OCP. Thus, a better estimation of the solid states can be achieved. The mass conservation is subsequently used to correct the solid states in the negative electrode via a correction factor (γ s ).

EKF with EM-PCM
The dynamic state vector for the EM-PCM based observer model using the EKF is truncated in terms of the volume-averaged concentration flux q to the form of to reduce the computational effort and limit the computational time.
Hence, the reformulated model regards only the first row of Eq. (12) and incorporates Eq. (13) as already presented for the PP-PCM based observer model for determining the linear state-space representation. The implementation of the EM-PCM based observer model is similar to the aforegiven definition in Section 2.2.1, except that the dynamic state vector only incorporates two states. The linearization output matrix is hence defined as as the volume-averaged concentration flux is neglected. The EM-PCM is reformulated to a novel linear state-space representation using the fully spatially resolved PCM solved by the FVM, which needs only a 22 × 22 jacobian matrix with the chosen 3-2-5 discretization. As a consequence, the observer model would only allocate around 5.8kByte (i.e. 3.0% of the total RAM) for the calculation process on a microcontroller.

Initialization of the state estimation
Small derivatives of the OCP lead to several possible states at the beginning ( = k 0), due to the missing prior state ( − k 1) for the state estimation algorithm. To overcome this initialization problem, a novel iterative Newton-Raphson method [40] is implemented, which solves for the initial solid concentrations (c s,0 ) of each electrode.
The cell voltage is calculated in Eq. (22) from the OCPs of each electrode. The total amount of lithium in the solid phase is calculated in Eq. (23) from the volumetric fraction of active material in each electrode. As a first rough estimate, equilibrium is assumed and the current measured cell voltage is set as boundary condition in Eq. (22) and the second boundary condition in Eq. (23) takes into account the defined total amount of lithium in the solid phase. The iterative solving algorithm solves the non-linear system of Eqs. (22) and (23) until the relative and absolute tolerance criteria are fulfilled (see Eq. (5)). As a result, the initial concentrations in the solid phase are estimated and the approach offers great potential to ease the issue of the initialization for this kind of state observer models.

Process of the state estimation
The state estimation procedure used in this work is shown in Fig. 2 and shortly summarized in the following section. The initialization step calculates the initial dynamic and algebraic state vectors. In case of = k 0, the routine described in Section 2.2.3 proceeds, otherwise the previous estimated states are used ( − k 1). In the prediction step, the PCM simulates a priori state estimate ( − k k 1) from the initialization step ( − − k k 1 1). In the following correction gain, the linearized transition (F k ) and observation (H k  ) matrix are derived from the linear state-space representation of the PCM using the priori estimated dynamic states and the input vector. The approximate error covariance matrix  error ( ∼ y k ) and the updated Kalman gain matrix K k # . To proof the consistency of the updated states, the mass conservation is checked and adjusts deviations of the solid states within the negative electrode. According to this modification, the posteriori states are corrected as well (x k k | # ). The posteriori approximation error covariance matrix P k k is calculated at the end of the update step.
To find a consistent solution for all states (x k ) using the already estimated dynamic states (x # ), the priori estimated algebraic states ( − z k k 1 ) are propagated to find a consistent solution via applying the iterative Newton-Raphson method to the algebraic equations (g) of the PCM only.
In a nutshell, the presented recursive state observer models use the fully-spatially-resolved PCM for the definition of the linear state-space representation. The EKF algorithm is able to conserve lithium mass and incorporates a robust initialization routine solved by the Newton-Raphson formula which enables the observer-models to conserve the states' physical interpretation along with their spatial distribution. The implementation focussed on a lean DAE for the PCM and the observer models with no restrictions of the physical validity even for a low chosen number of discretization elements, which makes it a suitable approach for low computational environment such as microcontrollers.

Simulation results of the PCM
The first part of the result section analyzes the computational speed and the error of the simulated local and global states of the PP-PCM and the EM-PCM with reference to the benchmark, which is the PCM incorporating the original DSI approach. In particular, the accurate handling of the internal and external boundary conditions of the PCM compared to two reference models implemented in FORTRAN and COMSOL Multiphysics® is outlined. The second part shows the estimation results of the two observer models, which are designated with "PP-EKF" and "EM-EKF". The detailed analysis focusses on the timeconstants for accurately estimated global and local states, the computational speed and the possible application of the gained observer models in real application scenarios. Both the PCMs and the observer models are implemented in MATLAB® 2016b whereas the DUALFOIL model is embedded in FORTRAN and the COMSOL model uses the commercial FEM-solver COMSOL Multiphysics®. All simulations run on a desktop computer equipped with a Intel(R) Core(TM) i5-6500 CPU @ 3.20 GHz processor and 16 Gigabyte of RAM.

Constant discharge simulation
Four models are compared in the first analysis to show the accurate handling of the internal and external boundary conditions especially with a low chosen number of discretization elements (i.e. 3-2-5) for the PCMs in this work. The first PCM model is embedded in FORTRAN [31] (i.e. FORTRAN-PCM (3-2-5)), the second in COMSOL Multiphysics® (i.e. COMSOL-PCM (3-2-5)) and the third model is the implementation in MATLAB presented here, using the DSI-approach for the solid-phase diffusion (i.e. DSI-PCM (benchmark, 3-2-5)). An additional COMSOL model with a different, much larger number of discretization elements by choosing the in-built mesh configuration "physics-controlled" and "extremely fine" serves as additional reference (i.e. COMSOL-PCM ("extremely fine")). The simulation results for the current density in the electrolyte for a 8C discharge simulation at 210 s is shown in Fig. 3a. In terms of the COMSOL-PCM (3-2-5), the ionic current density is overestimated above the applied current in the narrow region close to the separator within the electrode domains. Slight deviances are seen at the external boundaries where the current density equals not exactly 0 A m −2 . The FORTRAN-PCM (3-2-5) underestimates the current density near the separator interface of the cathode domain. Within the electrode domains, the current density is permanently under-or overestimated compared to the extremely fine discretized reference COMSOL-PCM ("extremely fine"). At the external boundary to the adjacent copper current collector, the current density is overestimated and the zero flux condition is not conserved. In contrast to that, the DSI-PCM of this work (i.e. benchmark model) can handle the boundary conditions accurately at both the internal and external interfaces and shows marginal deviances compared to the extremely fine reference COMSOL model within the electrode domains. Note, that for a higher number of discretization elements all models generate very accurate simulation results and only marginal differences are seen.
After showing the suitability of our PCM implementation in MATLAB for simulating accurate states of a lithium-ion cell with a low number of discretization elements, the difference between the chosen approximation schemes for the solid-phase diffusion is analyzed in the following. The simulation results of three different constant current discharge scenarios (i.e. 0.2C-, 2C-and 8C-rate) using the PP-and the EM-approach are compared to the benchmark model in the range from 4.1 and 3.0 V. In Fig. 3b, the error of the simulated cell voltage for the 8C discharge scenario is shown. The error of the cell voltage reveals a slightly higher deviance of up to 20 mV at the beginning of the discharge simulation for the PP-PCM. In a wide range from six up to 17 Ah m −2 no significant difference can be seen between the PP-and the EM-PCM and the error falls below 1 mV. However, at the end of the discharge scenario the EM-PCM shows a cell voltage error up to 52.6 mV which is more than 8 times higher compared to the PP-PCM. The detailed analysis in terms of computational demand per time step and the simulation error compared to the benchmark model in each discharge scenario are shown in Table 3. The fastest computational time and the lowest number of iterations to reach convergency is observed for the PP-PCM. This computation is approximately 3.5 times faster than the benchmark needing roughly the same number of iterations. At 8C, the benchmark shows a reduced computational time and is even faster than the PP-PCM. This may be caused by the DSI approximation, which is working much faster for short simulation times as the number of previous stored states [49] is kept low. The EM-PCM requires both the highest number of iterations and the longest time on average for solving a single time step. This behavior improves for increasing C-rates compared to the PP-PCM. Compared to the benchmark, the EM-PCM shows an approximately 2.5 times higher computational time for each discharge rate. Regarding the average and maximum voltage error in Table 3, the PP-PCM generally provides a lower mean voltage error for the discharge scenarios compared to the EM-PCM.
To sum up the constant discharge simulations, the PP-PCM shows fast computational time and high accuracy up to 4C compared to the benchmark. For high discharge rates like 8C, the accuracy and computational speed is reduced, but still provides sufficient results. The EM-PCM generally consumes more computational time and the average voltage error is at least six times larger compared to the PP-PCM. Despite the different performances of the PP-and EM-PCM, both models reveal the same accurate handling of the internal and external boundary conditions as the benchmark model with a low number of discretization elements and thus guarantee sufficient accurate simulation of a lithium-ion cell with a lean DAE system.

Pulsed discharge simulation
The performance of the PP-and EM-PCM are further investigated under a dynamic load profile in the form of a 10C discharge pulse for 10 s followed by a 10 s resting phase. The cell voltage limits are kept as for the constant load scenario. The performance results including the average and maximum iteration steps and calculation times per single time step as well as the cell voltage error compared to the benchmark are shown in Table 4. Similar to the constant load profile, the PP-PCM shows the fastest computational time, followed by the benchmark model and again -as the slowest converging model -the EM-PCM takes the longest computational time. A similar characteristic can be observed for the maximum and average number of iterations. In terms of numerical accuracy, the benefit of the EM-PCM for dynamic profiles becomes apparent. The average voltage error is approximately six times smaller compared to the PP-PCM and the maximum voltage error is roughly 2.5 times lower. This shows the drawback of the PP approach for the solid-phase diffusion PDE. When it comes to dynamic load profiles, the prediction for the concentration profile is not accurate enough due to overshoots at the beginning of each pulse period caused by the parabolic approximation method. In addition to Table 4, Fig. 4 shows the impact of the chosen approximation method on the simulated SOC (see Fig. 4a) and the cell voltage (see Fig. 4b) in form of the deviance to the benchmark. Regarding the SOC, which is derived from the average lithiation level of the limiting cathode for the used parameter set, the simulation error shown in Fig. 4a reveals more instable calculation by the PP-PCM with a maximum error of 0.15% compared to the EM-PCM. The simulated deviance of the EM-PCM shows a rather stable deviance of around 0.06%. In sum, the deviances for both approaches   referring to the benchmark are acceptable. In Fig. 4b,the simulated cell voltage error illustrates the aforementioned more accurate calculation of the EM-PCM which results in a lower maximum and average error. The magnified section (see Fig. 4c) shows the pulse and resting period from 378 to 400 s. The pulse period from 379 to 389 s reveals the much higher deviance of the PP-PCM from the benchmark compared to the EM-PCM. During the resting period from 389 to 399, the PP-PCM recovers its accuracy to a certain extent, but still remains less accurate than the EM-PCM. In short, a certain deviation of the predicted SOC and cell voltage is seen for both reduced PCM models, which is more distinct in terms of the PP-PCM. The PP-PCM approximately might gain a factor of 2.5 and 4 on average in terms of computational speed compared to the benchmark and the EM-PCM, but calculates a 6 times less accurate cell voltage compared to the EM-PCM at the same time. This finding supports the reported drawback of the parabolic profile for simulating dynamic load-scenarios [50] which implies choosing the EM-PCM in this case.
Since the surface concentration is the most important state from the microscopic domain for the macroscopic domain of the PCM, Fig. 5 shows its error for the PP-(see Fig. 5a) and the EM-PCM (see Fig. 5b) at the cathode-current collector interface. The cathode-current collector interface is important for calculating the cell voltage, since the solid potential at this node directly influences its calculation. In accordance to Fig. 4a, the PP-PCM shows a more instable behavior in simulating the surface concentration than the EM-PCM. The mean error for the EM- To sum up, the first part of the results in this work proofed the accurate handling of the chosen FVM spatial discretization for the fullyspatially-resolved PCM for constant load scenarios, which holds also for the pulsed load scenario. The detailed analysis of the computational speed and the generated error for the PP-and the EM-approximation schemes revealed their suitability for both constant and pulsed load scenario, which is summed up in Table 5.
As automotive applications include dynamic profiles while driving as well as mainly constant load profiles during charging, a load-scenario distinction and the derived choice for either the PP-or the EM-approximation routine could help to minimize the error of cell voltage and SOC estimation. Since the PP-and the EM-approach require low computational effort, less memory space compared to the remaining solved equations and offer a recursive formulation, the implementation of both approaches in parallel is suitable even on a microcontroller and depending on the load scenario, the most appropriate approximation for the solid-phase diffusion can be selected whereas the other approach remains redundant.
The computational performance and accuracy was analysed for the PP-and EM-PCM for a pulsed and constant discharge load scenario at this point. The same performance applies for charging scenarios and when it comes to control algorithms in the BMS, state observer models are used in order to monitor the states of a lithium-ion cell for guaranteeing the SOA for charging and discharging, calculating the maximum available power and energy as well as predicting the SOH. In the following, the estimation results of the presented two observer models using the linear state-space representation based on the PP-or the EM-PCM combined with an EKF are evaluated for three different charging scenarios.

Recursive state estimation results
Knowing about the strengths and weaknesses of the PP-and EM-PCM, the second part of the results deals with the performance of the recursive state observer models and analyzes to which extent the chosen approximation scheme influences the state estimation of local and globals states within a lithium-ion battery, the regression speed of the related errors and the robustness towards constant and dynamic load scenarios.
The simulation results of the PP-and EM-EKF are presented for three different charging scenarios, including a constant current scenario (CCCV) at 2.5C current rate, a boost charging scenario with a high (4C) and low (0.1C) constant current rate (BCCV) and finally a pulsed current scenario (PCCV) at 10C for 10 s. Note, that for each charging scenario an additional constant voltage period at 4.1 V with a limiting applied current of 0.01C is added to avoid harming high potentials in the active material within the LiCoO 2 -electrode [2]. The presimulated states of the cell were set by the benchmark model which holds as the measurement input for the filter algorithm.
The state estimation started at 300 s and 120 s, for the CCCV and  both for the BCCV and PCCV scenario, respectively. The error of the initial SOC based on the averaged concentrations states of the limiting cathode is arbitrarily set to 36.1%, 42.4% and 35.2% for the CCCV, BCCV and PCCV, respectively. The specific initial errors depend on the elapsed time between the start of the charging and the estimation process. The initial error for the electrolyte concentration at the start of the state estimation depends on the local position within the cell and the applied charging scenario as well. For the CCCV, the minimum and maximum error was 15.4% and 31.4%, with reference to the current state when the state estimation started. In case of the BCCV and the PCCV, the error ranged from 32.0% to 38.1% and from 44.8% to 48.7%, respectively.

Constant current charging
In general, the estimation of the CCCV scenario shows comparable results for both observer models with a slight tendency of quicker estimation for the EM-EKF. In Fig. 6,the simulation results of the benchmark and the estimation results of the PP-and the EM-EKF are shown in terms of the cell voltage, the estimation error of the cell voltage and the error of the estimated potential drop between solid and liquid phase according to Eq. (1), which will be referenced as "potential drop" in this work. As seen in Fig. 6a, the estimation process starts at 300 s with a 36.1% error in the SOC and shows a deviation of less than 1% for the cell voltage error after 191 s and 187 s for the PP-and EM-EKF. The magnified subplot (b) illustrates the regression of both observer models between 800 and 900 s. Fig. 6c shows the regression of the related cell voltage error and the magnified subplot d) reveals the marginal differences of approximately 1 mV between both observer models in the same time limits as shown in subplot (b). In accordance to Fig. 6, the numerical analysis is presented for the cell voltage and various local states in Table 6. The relative error values are related to the targeted present value of each state (i.e. predefined by the benchmark model) and the given time is related to the start of the estimation process (i.e. 300 s). Comparing local and global states of both observermodels, the potential in solid phase at the anode-separator interface takes approximately 4 times longer reaching the 1%-threshold than the cell voltage. The surface concentration takes approximately twice the time of the local solid potential to fall below the 1% threshold. The pore-wall flux converges far slower and even avoids a convergency to the 1%-threshold for the PP-EKF.
In sum, the CCCV estimation results show the fast and robust regression of the initial error regarding the cell voltage, but an accurate estimation of the global cell voltage is not bound to a proper estimation of the internal states. This results raises the question, to which extent the internal states deviate over the thickness of the electrodes. Looking into Fig. 6e, the residual error of the potential drop at the anode separator interface shows a stable regression below 1 mV after 700 s. Lithium plating most likely occurs at this location due to the largest overpotential within the anode [12] and thus a control strategy in the BMS could consider a lower limit of 0 V for this side-reaction overpotential (see Eq. (1)) in order to reduce the applied charging current if the limit is exceeded. The time to gain accurate values for this indicator in this case 700 smust be known to evaluate the readiness for use of this control algorithm.
The recovery of local states from only the measured current and the cell voltage need further analysis of the spatial gradients over the thickness of the cell to proof the functionality of the presented observer models. To do so, Fig. 7 shows the estimated local states such as the concentrations in both liquid and solid phase, the pore-wall flux and the potential drop at two discrete times of 1315 (t A ) and 1900 s (t B ). These times were chosen in accordance with the threshold between CC and CV period (t A ) and close to the 1% residual error for the pore-wall flux shows the lowest deviation across the cell thickness at both times. Keeping in mind the initial errors ranged between 15.4 and 31.4%, the estimation error shows maximum values of 0.13% in the anode at the reference time t A , which equals approximately a full recovery for the liquid concentration. The differences between the PP-and EM-EKF are negligible with a maximum deviation of 0.2% in the anode domain.
Regarding the surface concentration in Fig. 7b, the highest deviation of around 0.85% occurs at the anode-separator interface at t B and differences of less than 0.01% for the mean error over the electrode thickness between both observer models can be seen.
The largest error is observed for the pore-wall flux (see Fig. 7c) whereas the potential drop (see Fig. 7d) shows marginal deviances over the thickness of the electrodes.
To sum up, both observer models show a fast regression of the residual error below 1% of the cell voltage from an initial SOC error of 35.2% in less than 200 s. Similar performance can be seen for the PPand the EM-EKF with only marginal differences in estimation accuracy and regression speed. In terms of the surface concentration, it takes up to 5 times longer to reach similar residual errors compared to the global cell voltage. The SOC estimation is derived on the averaged solid concentrations and thus needs about 5 times longer for accurate estimation results. The error of local states over the cell thickness appeared to be marginal, which proofs the functionality of the presented observer models. In terms of the potential drop, accurate estimation below 1 mV after 700 s enables to evaluate the readiness of the estimation process which is crucial for application of control algorithms especially for fastcharging scenarios.

Boost current charging
The BCCV scenario aims to proof the suitability of the two observer models towards varying boundary conditions in the form of changing the applied current. The BCCV simulation included a constant current rate of 4C during the boost period which was switched a 0.1C rate for the following low period at 750 s (t C ) to avoid an increase of the cell voltage above 4.1 V within the first period. The additional constant voltage period took place at 2135 s (t D ). The estimation results for the cell voltage, the error of the cell voltage and the potential drop at the anode-separator interface as well as its spatial distribution within the anode and the cathode at t C and t D are shown in Fig. 8.
As seen in Fig. 8a and c, the observer-models show a very quick  regression of the cell voltage recovery below 1% error within the first 5 s after the state estimation started at 120 s. Regarding the initial SOC error of 42.4%, this proofs the robustness of the presented models incorporating the novel initialization process against large initial failures. Again, the overall performance of the PP-and the EM-EKF show low deviances with a tendency of quicker estimation for the EM-EKF. Looking into Table 7, this can be seen especially in terms of the surface concentration at the anode-separator interface falling below the 1% error threshold 1/3 times faster than the PP-EKF. The slowest convergency below the 1% error threshold is seen for the surface concentration (545 s) and the pore-wall flux (482 s) for the PP-and EM-EKF, respectively. The cell voltage falls approximately after 150 s below the 0.1% error threshold which is approximately 3-4 times faster than the slowest estimated local state.
The magnified sections from 750 to 828 s in Fig. 8b and c show the fast recovery of the cell voltage with a comparably similar behavior for both observer-models at t C and emphasize, that the estimation is robust for changing boundary conditions. As seen in Fig. 8e, the maximum error of the potential drop at the anode-separator interface is around 12 mV at t C , but recovers very fast afterwards. Looking at the local states at t C and t B in Fig. 8f and g, also its estimated spatial distribution reveal sufficient accurate results for both observer models even at the change of the boundary condition. In short, the analysis of the BCCV estimation revealed a very quick regression of the cell voltage error and similar to the CCCV, longer estimation time is needed for accurate local states. The analysis of the changing boundary conditions showed the robustness of the presented observer models against an abrupt change of the applied current.

Pulsed current charging
The last estimated charging scenario aims to proof the suitability of the two observer models towards a pulsed input current. The PCCV estimation results are shown in Fig. 9 and the related numerical analysis is depicted in Table 8. Looking into Fig. 9a, the whole charging scenario is shown where the magnified subplot (see Fig. 9b) shows the approximation behavior of both models and no significant difference in terms of the cell voltage is seen between them. Both models converge below 1% error after approximately 8 s. At this time, the voltage error is around 39 mV. After 71 s, the error for both models falls below 4 mV. Regarding the error of cell voltage in Fig. 9c, the quick regression is shown and the magnified subplot (see Fig. 9d) between 205 and 300 s shows the characteristic error progression during the pulse and the resting period in the range of ±2 mV. Contrairy to the charging scenarios discussed before, both observer-models do not converge below   1% for all local states such as the surface concentration, the overpotential and the pore-wall flux as seen in Table 8. This is caused by the pulsed load and gives the estimation process not enough time for convergency during the pulse period. Therefore, an additional 5% error threshold was added for the estimation performance in Table 8. In general, the performance of both models is similar with a slight tendency of faster convergency for the PP-EKF. In Fig. 9f, the potential drop at the anode-separator interface is magnified between 445 and 465 s which reveals the slight better accuracy of the EM-EKF. Looking into the spatial distribution of the potential drop over thickness of the electrodes, sufficient accuracy can be seen for both observer models exemplarily shown in Fig. 9g and h at 455 (t E ) and 538 s, which depicts the beginning of the CV-period (t F ).
To sum up, both observer models showed a quick regression of the cell voltage error below 1% in less than eight seconds with an initial SOC error of 35.2%. Both the PP-and the EM-EKF showed robust regression under the pulsed current with a slight tendency for better accuracy for the EM-EKF. The analysis of the potential drop over time and spatially within the electrodes at two different times revealed an accurate estimation of the indicator state for lithium-plating.

Comparison of the state estimation performance
In general, the observer models gain comparable results in terms of accuracy and computational speed for all charging scenarios regarded in this work. The robustness against varying boundary conditions was shown and the quick regression of the residual error was seen in all charging scenarios. The regression speed is summarized for the three charging scenarios referring to the initial SOC error, the remaining cell voltage error of 1 mV and the related estimation time in Table 9. Regarding only the cell voltage, the EM-EKF shows slightly faster regression compared to the PP-EKF. Particular interest is laid on the potential drop at the anode-separator interface and its spatial distribution within both electrodes. The observer models proofed the accurate recovery of this local indicator state for lithium plating from the measured current and cell voltage. As the observer models gain an accurate and robust estimation for local states, these could be used for control strategies in fast charging algorithms for controlling the applied current to the cell based on this indicator. In Fig. 10, the regression of the SOC error of the limiting cathode based on the average lithium concentration is shown for all charging scenarios. Marginal differences are seen for the CCCV and BCCV scenario, whereas the pulsed current charging revealed a slightly quicker regression for the EM-EKF than for the PP-EKF, which is well in line with the suitability for dynamic and constant discharge load scenarios shown in the simulation results. Looking at the overall charging times in Fig. 10, a reduction of 24.3%, 13.5% and 42.3% could be reached for the CCCV, BCCV and PCCV scenario, compared to a constant charge process comprising a 1C charging rate whilst avoiding possible lithium plating, which was monitored via the indicator state.

Conclusion
The generally accepted pseudo two-dimensional physicochemical model (PCM) for lithium-ion batteries is used in this work for the simulation of constant and dynamic load scenarios. The non-linear differential algebraic equations were discretized in time via Crank-Nicolson formulation and the finite difference method with finite volume formulation was used for the fully-spatially-resolved PCM. Particular interest lied on the handling of boundary conditions with a low number of spatial discretization elements and the validity of the model was checked via comparison to reference models implemented in FORTRAN and COMSOL Multiphysics®. Further reducing the computational effort and enabling for a recursive formulation, the solid-phase diffusion equation was numerically approximated via a Polynomial Profile and an Eigenfunction Method. The simulation results confirmed the computational efficiency of the Polynomial Profile under constant current load and the Eigenfunction Method under dynamic load scenarios. The two computationally efficient PCMs were further used for implementation of two different linear state-space representations of the PCM using an Extended Kalman Filter algorithm which conserves lithium mass. To the authors best knowledge, this is the first approach using the PCM solved by finite volume method together with a nonlinear Kalman Filter which accounts for lithium mass conservation and incorporates a robust Newton-Raphson initialization routine to ease the initial value problem. The state-estimation results showed a quick recovery of the cell's state for the measured cell voltage and the applied current together with robustness against changing boundary conditions and pulsed current signals. The models were able to reduce the residual cell voltage error to 2 mV with an initial SOC error of 35.2% in less than 90 s for a 10C pulsed charging scenario. Current and future work of the authors deals with the implementation of these two models on  microcontrollers, as first implementations proofed the suitability of the models presented in this work in low computational hardware environment. With the aid of this hardware-based implementation and a further development of the presented observer models towards constraints on the local battery states, novel fast charging strategies will be investigated to reduce charging time whilst avoiding lithium plating. The state estimation process will also be extended in terms of integrating temperature effects. Further development of the presented observer models can focus on the implementation of side-reactions such as lithium-plating and solid-electrolyte interphase to account for aging phenomena.