A simplified electrochemical model for lithium-ion batteries based on ensemble learning

Summary The mass transfer in lithium-ion batteries is a low-frequency dynamic that affects their voltage and performance. To find an effective way to describe the mass transfer in lithium-ion batteries, a simplified electrochemical lithium-ion battery model based on ensemble learning is proposed. The proposed model simplifies lithium-ion transfer in electrode particles with ensemble learning which ensembles discrete-time realization algorithm (DRA), fractional-order Padé approximation model (FOM), and three parameters (TPM) parabolic. The lithium-ion transfer in the electrolyte is simplified by the first-order inertial element (FIE). The results show that the proposed model achieves not only accurate lithium-ion concentration prediction in solid and electrolyte phase but also precise voltage prediction with low computational complexity.


INTRODUCTION
With the increasing depletion of fossil energy and the emission of greenhouse gases, it is urgent to electrify transportation widely.Developing electric vehicles (EVs) is one of the most important parts of transportation electrification. 1,2The battery pack is the power source of EVs and is their most expensive part.An accurate electrochemical battery model with low computational complexity is needed to monitor the critical states of batteries, maintain the safe and stable operation of batteries, and maximize batteries' performance and service life. 3n accurate lithium-ion battery model is the key to achieve accurate battery state estimation.The equivalent circuit model (ECM) is a classical and commonly used lithium-ion batteries model with low computational complexity.Plett [4][5][6] uses an extended Kalman filter (EKF) based on ECM to estimate the desired internal states.However, ECM cannot achieve high-precision prediction and describe the internal electrochemical mechanism of batteries, which limits monitoring high-precision multistate internal states in real-time embedded systems.Physics-based lithium-ion battery models can accurately describe the internal mechanism of batteries.The Pseudo-2D (P2D) model proposed by Newman et al. 7,8 is a well-known physics-based electrochemical model, which consists of four coupled partial differential equations (PDEs) and one algebraic equation.The four PDEs govern the basic physical principles of mass and charge conservation in solid and electrolyte materials of the cell, and the algebraic equation describes the lithium-ion flux between solid material and electrolyte material. 9However, these PDEs are computationally complex, which stems the P2D model from being applied in real-time embedded systems. 10To reduce the computational complexity of the P2D model, a single particle (SP) model is proposed. 11In the SP model, the cell electrode is regarded as a single particle, and it is assumed that lithium-ions only diffuse in the electrode particle radial direction.The SP model ignores the electrolyte phase lithium-ion distribution and considers the electrolyte phase potential as a constant. 12Although the SP model significantly simplifies the physical mechanism of lithium-ion batteries, there are still solid phase mass and charge conservation PDEs in the SP model, which is hard for embedded systems to solve.Therefore, it is necessary to simplify and approximate these PDEs.Han et al. 13,14 simplified the difference between the electrode surface lithium-ion concentration and the mean lithium-ion concentration by a system which consists of several first-order processes.The approximation system achieves highly accurate voltage prediction, but its parameters need to be identified for different cells.Lee et al. 15 used the discrete-time realization algorithm (DRA) to find a reduced-order discrete-time realization of the infinite-order transcendental transfer function which describes the solid phase lithium-ion distribution.Guo et al. 16 proposed a physics-based fractional-order model which simplifies the solid phase diffusion process by the fractional-order Pade ´approximation method (FOM).Luo et al. 17 developed a simplified electrochemical model with the three parameters approximation method (TPM) to describe the solid phase diffusion process.For further improving the accuracy of the electrochemical lithium-ion batteries model, especially when the cell charges and discharges at high rates of current, the lithium-ion transfer in the electrolyte is modeled and added to SP model.Moura et al. 18

Model structure
To accelerate the computational speed of electrochemical models and simplify the structure of traditional electrochemical models, a simplified electrochemical model for lithium-ion batteries is proposed, so that the electrochemical model can be applied to real-time BMS.There are some basic assumptions in the simplified electrochemical model. 12) The cell electrode is regarded as a single spherical particle, and the potentials at the same radial distance from the sphere center are equal.
(2) The solid phase diffusion is only considered in the radial direction.
(3) The lithium-ion pore wall flux is uniform in electrode particles.
The structure of the simplified electrochemical model is shown in Figure 1.The simplified electrochemical model greatly simplifies traditional physics-based electrochemical models in terms of model structure.However, there are still infinite-order transcendental transfer functions in the simplified electrochemical model, which is too complex to be applied directly in an embedded system.

Model deviation
Open circuit voltage.The simplified electrochemical model is a typical sandwich structure, which mainly consists of a positive electrode, a separator, and a negative electrode.When a cell is discharging, lithium-ion flows from the negative electrode to the positive electrode, and the current flows from the aluminum current collector to the copper current collector through the load circuit.Hence, the lithium-ion pore wall flux J i can be calculated by the applied current I as 26 where R s;i is the particle radius of electrode particle, ε s;i is the volume fraction of solid phase, F is the Faraday constant, A is the area of electrode, L i is the thickness of electrode, n, p represent negative and positive electrode respectively.When the cell is discharging, the current I is defined as negative (I < 0).Therefore, the lithium-ion pore wall flux that flowed into electrode particles is positive, and the lithium-ion pore wall flux that flowed out of electrode particles is negative.
The lithium-ion capacity of electrodes is related to the volume of electrodes and the maximum lithium-ion concentration of electrode material.Therefore, the lithium-ion capacity of electrodes can be calculated as 27 where Q i is the electrode capacity and c max s;i is the maximum lithium-ion concentration of the electrode material.The solid phase lithium-ion concentration stoichiometry of electrodes is defined as the ratio of the electrode solid phase lithium-ion concentration to the electrode maximum solid phase lithium-ion concentration.Therefore, the initial solid phase stoichiometry q 0 i and the average solid phase stoichiometry q ave i can be expressed as 3) where c 0 s;i is the initial solid phase lithium-ion concentration of electrodes, c ave s;i is the average solid phase lithium-ion concentration of electrodes.The average solid phase stoichiometry can be calculated by the initial solid phase stoichiometry and coulomb counting, as shown in Equation 4.
where t k is the cell operation time.
The open circuit voltage is defined as the voltage between the positive and negative electrodes when the cell reaches an equilibrium state, which can be expressed as where U p ð $Þ, U n ð $Þ are the positive and negative potentials as a function of positive and negative solid phase stoichiometry, respectively.
Solid phase diffusion overpotential.The solid phase diffusion overpotential is caused by the uneven distribution of lithium ions in electrode particles due to lithium-ion diffusion when the cell charges and discharges. 28The lithium-ion diffusion in electrode particles is governed by Fick's second law as shown in Equation 6.  7) Perform Laplace transform on Equation 6 and combine its boundary conditions Equation 7, the relationship between the electrode surface lithium-ion concentration change relative to the initial electrode lithium-ion concentration csurf s;i = c surf s;i À c 0 s;i and the lithium-ion pore wall flux J i can be derived as 29 : (Equation 8) where s is the Laplace differential operator.The solid phase diffusion time constant is defined as s;i D s;i : (Equation 9) However, the system is unstable, there is a pole at s = 0 in Equation 8. To establish a stable transfer function, the solid phase surface lithiumion concentration change after removing the integrator pole is defined as Dc surf s;i = csurf s;i À c ave s;i .The relationship between c ave s;i and J i can be expressed as 10) Therefore, the relationship between Dc surf s;i and J i can be calculated as 29 Dc surf s;i 11) Since the electrode particle radius and the solid-phase diffusion coefficient are constant, the key dynamics of Ji can be extracted from Equation 11as an intermediate transform function HðsÞ.12) HðsÞ is a transcendental transfer function, which is still too complex to be applied in real-time embedded systems.To simplify Equation 12, the reduced-order methods will be introduced in the following section.
The electrode solid phase surface stoichiometry q surf i can be calculated easily by Dc surf s;i and q ave i as 13) When the cell charges and discharges, solid phase diffusion causes an uneven lithium-ion distribution in the electrode particle, resulting in the electrode particle surface potential deviating from the equilibrium state. 30Therefore, the solid phase diffusion overpotential h s is defined as (Equation 14) Electrolyte phase diffusion overpotential.The lithium-ion diffusion in the electrolyte conforms to Maxwell-Stefan theory, which can be derived as where ε e;i is the electrolyte phase volume faction.x (0 % x % L n + L sep + L p ) is the location of cell thickness direction, where L sep represents the thickness of separator.c e;i ðx; tÞ is the lithium-ion concentration in the electrolyte, which is related to time and location.t 0 + is the lithium-ion transference number in the electrolyte.D eff e;i is the effective electrolyte ionic diffusivity, which can be calculated as D eff e;i = D e ε brugg e;i ; (Equation 16) where D e is electrolyte ionic diffusivity, brugg is Bruggeman coefficient, the specific surface area of electrodes.a s;i is the specific surface area of electrodes, which is determined as 17) The lithium-ion concentration overpotential in the electrolyte is caused by the uneven electrolyte phase lithium-ion concentration distribution between positive and negative electrodes, which can be calculated as (Equation 18) where c e;p and c e;n represent the lithium-ion concentration in positive and negative electrolyte phases at the terminal of the electrode near the current collector, respectively.
Lumped ohmic overpotential.The electrochemical reaction takes place on the surface of the electrode particles.The electrochemical reaction is a medium-high frequency dynamic, and the reaction time is usually in seconds. 31By linearizing the Butler-Volmer equation via Taylorseries expansion and decoupling the reaction flux j and the electrolyte concentration c e;i , the electrochemical reaction impedance can be approximated by an equivalent resistance R ct .
The lumped ohmic resistance contains the equivalent resistance of electrochemical reaction R ct , solid-electrolyte interphase film resistance R SEI , the resistance of solid and electrolyte material R mat , and contact resistance R con .Therefore, the lumped ohmic resistance can be calculated as (Equation 19) The lumped ohmic overpotential can be expressed as 20) The cell terminal voltage is the sum of the open circuit voltage and all overpotentials, which is given as 21)

Ensemble learning model
In order to accelerate the calculation speed of electrochemical models and accurately predict the internal states of lithium-ion batteries, a simplified electrochemical model with ensemble learning is proposed.The proposed model simplifies lithium-ion transfer in solid phase with ensemble learning model, and simplifies lithium-ion transfer in electrode phase with FIE.Finally, the cell voltage can be calculated according to the lithium-ion concentration in solid and electrolyte phases and the ohmic resistance.The structure of the proposed model is shown in Figure 2.

Reduced-order methods
According to the modeling process of the simplified electrochemical model, there is a transcendental transfer function in modeling the electrode particle surface lithium-ion concentration.To apply the simplified electrochemical model in real-time embedded systems, the transcendental transfer function should be simplified. 32screte-time realization algorithm.The DRA approximates the transcendental transfer function by a reduced-order discrete-time statespace realization, as the form of Equation 22.  22) The DRA is performed on the transcendental transfer function in the simplified electrochemical model.The continuous-time impulse response of the transcendental transfer function HðsÞ can be approximated by the frequency-domain emulation approach, as shown in Equation 23.
(Equation 23) where T 1 is the emulation sampling period.The emulation sampling period T 1 is set to 1/256s, so that 1=T 1 is much greater than the bandwidth of HðsÞ.The discrete Fourier transform (DFT) of a sequence is related to its z-transform as 24) where N is the point number for the basic sequence, and is usually a power of 2 for efficient computation.By performing the inverse DFT to H d ½f , the approximation of the continuous-time impulse response h d ½n at the emulation sampling period T 1 can be obtained as (Equation 25) The cumulative summation of the continuous-time impulse response is the approximation of the continuous-time step response h step as (Equation 26) The discrete-time unit-pulse response h½k can be calculated by the continuous-time step response as h½k = h step ½k À h step ½k À T s ; (Equation 27) where T s is the inter-sample period.The Ho-Kalman algorithm 33 is used to find the state-space realization from the discrete-time unit-pulse response.The dimension of the reduced-order model is chosen to be 2 considering a tradeoff between complexity and accuracy.The parameters of the simulation cell are shown in Table 1 , 34 , the state-space realization matrices A, B, and C of the simulation cell are generated to approximate HðsÞ by the Ho-Kalman algorithm as A p = 0:8316 0:2408 0:2408 0:4341 28) C p = ½ 1388:3 À 1103:1 : A n = 0:9710 0:0797 0:0797 0:5939 29) C n = ½ 1218:3 À 1820:9 : Because of the different constant time value t i of positive and negative electrodes, the reduced-order discrete-time state-space matrices of positive and negative electrodes are different.However, the D i matrix represents the high-frequency response of HðsÞ, which can be calculated as D i = lim s/N HðsÞ = 0. Therefore, the D i matrix of positive and negative electrodes are the same.
The DRA only requires the standard linear-algebra and signal-processing methods to realize the optimal reduced-order discrete-time approximation to the original continuous-time system, which does not need optimization and iteration.Therefore, the DRA has low computational complexity.
Fractional-order Pade ´approximation.The Pade ´approximation is a rational polynomial approximation method, which is widely applied in order reduction for complex systems and the solution of fractional-order equations. 35For an arbitrary function f ðxÞ, the Pade ´approximation form can be expressed as f ðxÞ = a 0 +a 1 x+/+a n x n 1+b 1 x+/+b m x m ; (Equation 30) where a and b are the numerator and denominator polynomial coefficients, respectively.n and m are the order of numerator and denominator polynomials, respectively.Guo et al. 16 have proven that the approximation of the transcendental function HðsÞ cannot be realized by simple low-order rational polynomials by analyzing the basic properties of logarithmic frequency characteristics.To simplify the approximation of HðsÞ and avoid too many polynomial coefficients to be identified, the basic order of Pade ´approximation form is set to be 1/2 according to the characteristics of HðsÞ.Hence, the fractional-order Pade ´approximation form can be expressed as 31) To achieve low-order fractional Pade ´approximation, m and n are set to 1 and 0, respectively.Therefore, the fractional-order Pade ´approximation form for the transcendental function HðsÞ can be expressed as (Equation 32) In accordance with Pade ´approximation theory, 36  (Equation 33) Three-parameter parabolic approximation.The solid phase lithium-ion concentration distribution in the radius direction can be approx- imated by a three-parameter parabolic function as shown in Equation 34.
c s;i ðr; tÞ = aðtÞ + bðtÞ r 34) where variables a, b, and c changes with time.
In accordance with the derivation of Subramanian et al., 37 when substituting Equation 34 into Equation 7to solve variables a, b and c, the following equations can be obtained d dt q ave i ðtÞ + 30 À c ave s;i ðtÞ i À 8D s;i q ave i ðtÞ = J i (Equation 36) where q ave i is the solid phase lithium-ion concentration per unit volume.Therefore, the relationship between Dc surf s;i and the lithium-ion pore wall flux J i can be approximated by the following state-space functions (Equation 37) The lithium-ion pore wall flux J i can be calculated by the applied current I according to Equation 1, then the transcendental transfer function HðsÞ can then be approximated by Equation 37.

Weighted averaging ensemble method
Ensemble learning is a typical machine learning technique that combines multiple models to achieve better predictive performance than any of the individual models alone.Error-ambiguity decomposition is a mathematical method for analyzing the performance of ensemble methods, 38 which considers the influence of the average error of individual models and the average ambiguity of individual models.The error-ambiguity decomposition is shown in Equation 38.38) where E is the average error of individual models, A is the average ambiguity of individual models, E is the prediction error of ensemble model.The error-ambiguity decomposition theory shows that the more accurate and diverse the individual models, the better the ensemble.An ensemble learning model (ELM), which simplifies the calculation of electrode particle surface lithium-ion concentration, is proposed to improve the prediction accuracy of lithium-ion mass transfer in electrode particles.The DRA, FOM, and TPM have shown certain accuracy in the prediction of electrode particle surface lithium-ion concentration in previous literature. 16,33,37There are large differences among DRA, FOM, and TPM according to the derivation in reduced-order methods section.The ensemble of DRA, FOM, and TPM can achieve better predictive performance in accordance with the error-ambiguity decomposition theory.The proposed ELM ensembles DRA, FOM, and TPM with the weighted average method.The ELM outputs are defined as   39) where k 1 and k 2 are the weighted coefficients of the ensemble learning model.

Electrolyte phase diffusion simplification
To reduce the computational complexity of the lithium-ion distribution in the electrolyte, a FIE is proposed to simplify the lithium-ion diffusion in the electrolyte.The lithium-ion concentration in the electrolyte near the current collector directly affects the cell voltage.Therefore, the proposed FIE is used to fit the lithium-ion concentration change in the electrolyte near the current collector Dc e;i = c e;i À c e;0 , which can be expressed as (Equation 40) where c e;0 is the initial lithium-ion concentration in the electrolyte, K e is the gain of electrolyte phase diffusion, T e is the time constant of electrolyte phase diffusion.

Weighted coefficient identification of ELM
Although the ensemble learning model is specifically designed for predicting the electrode particle surface lithium-ion concentration, the weighted coefficients are still unknown.A 17.5Ah LiM n 2 O 4 =Carbon cell is used for the weighted coefficients identification of ELM and model simulation, and its electrochemical parameters are shown in Table 1.
The particle swarm optimization (PSO) algorithm is used for identifying the weighted coefficients of ELM.The loss function is defined as the root-mean-square error (RMSE) between the output of ELM and the ground truth Dc surf s;i , shown in Equation 41. 41) where Dc surf s;ELM is the output of ELM.The electrode particle surface lithium-ion concentration changes after removing the integrator pole Dc surf s of P2D model are taken as ground truth.The optimal weighted coefficients of ELM for the negative electrode are k 1;n = 0:2165 and k 2;n = 0:0933, respectively.The negative particle surface lithium-ion concentration changes after removing the integrator pole Dc surf s;n comparison among DRA, FOM, TPM, ELM, and P2D is shown in Figure 3, and the predictive errors of DRA, FOM, TPM, and ELM are shown in Table 2.In Figure 3, the Dc surf s;n curve of ELM is significantly closer to that of the P2D model, which represents ELM achieves best predictive accuracy on Dc surf s;n .The same result is shown in Table 2. ELM gets the lowest Dc surf s;n RMSE with only 11.51 mol=m 3 .TPM is more accurate than DRA and FOM.Therefore, the weighted coefficient of TPM is larger than that of DRA and FOM in ELM.
The optimal weighted coefficients of ELM for the positive electrode are k 1;p = 0:2867 and k 2;p = 0:0998, respectively.The Dc surf s;p of DRA, FOM, TPM, ELM, and P2D are compared in Figure 4, and the Dc surf s;p error analysis among DRA, FOM, TPM, and ELM is shown in Table 3.In Figure 4

The cell voltage
The LiM n 2 O 4 =Carbon cell is simulated under 0.5C, 1C, and 2C rate constant current discharge, respectively.In order to validate the accuracy of the proposed ELM, P2D, DRA, FOM, and TPM are added for comparison.The voltage comparison among these models is shown in Figure 7.The voltage errors of ELM, DRA, FOM, TPM compared to P2D model are shown in Table 4.The voltage curves of DRA, FOM, TPM, and ELM are all very close to P2D model at 0.5C rate discharge, but ELM achieves the best voltage prediction with only 7.781mV RMSE and 0.209% MAPE.As the discharge rate increases, the voltage error of DRA, FOM, TPM, and ELM increases.Although the voltage curves of DRA, FOM, and TPM deviates significantly from that of P2D model at 1C and 2C discharge rate, the ELM voltage curve is still close to the P2D voltage curve.The results show that the proposed ELM achieves better voltage prediction over wide current range.Even if the cell is discharged at 2C current rate, the proposed ELM still achieves 37.71 mV RMSE and 0.985% MAPE.
To compare the computational complexity of DRA, FOM, TPM, ELM, and P2D model, all these models are simulated at 1C rate constant current discharge in Windows 11 with Intel(R) Core(TM) i7-10700F CPU @2.90 Ghz, 32G RAM.The computational time of these models is shown in Table 5.The computational speeds of DRA and TPM are faster because there are only two second-order state-space equations in DRA and TPM.FOM is slightly slower due to the fractional-order transfer function.ELM only takes 0.1676s to complete the 3500s 1C constant current discharge.The calculation speed of the P2D model is much slower than that of the other models.On the one hand, accurate  calculation of electrode surface lithium-ion concentration is more complicated, which costs more computational time.On the other hand, the calculation of electrolyte phase and solid phase potential distribution along the cell thickness direction costs extra computational time.
To further validate the effectiveness of the proposed model under dynamic operating conditions, DRA, FOM, TPM, ELM, and P2D are simulated at the federal urban driving schedule (FUDS) dynamics.FUDS dynamic takes 1372s to complete one full cycle, the cell is simulated with multiple FUDS cycles until the cell reaches the cut-off voltage.The simulation current and voltage are shown in Figure 8, and the voltage errors of these models are shown in Table 6.Since the current rate is small in most of time of FUDS dynamics, the voltage curves of DRA, FOM, TPM, and ELM are all close to that of P2D model.However, ELM still achieves the most accurate voltage prediction among these models with only 4.48 mV RMSE and 0097% MAPE.

Conclusions
The mass transfer in lithium-ion batteries not only determines the electrode potential but also influences the electrochemical reaction rates.It is critical for an electrochemical model to achieve accurate lithium-ion transfer prediction in electrodes.A simplified electrochemical model, which quickly and accurately characterizes lithium-ion transfer in lithium-ion batteries, is urgently needed for real-time embedded systems.Therefore, a simplified electrochemical lithium-ion batteries model with ensemble learning is proposed.The proposed model simplifies lithium-ion transfer in electrode particles by ensembling DRA, FOM, and TPM, which achieves precise lithium-ion concentration change prediction on the electrode particle surface.The proposed model simplifies lithium-ion transfer in the electrolyte with the FIE, which precisely predicts the lithium-ion concentration in the electrolyte attached to the current collector.The proposed ELM achieves more accurate voltage predictions than DRA, FOM, and TPM under both constant current and dynamic conditions.Although the proposed ELM introduces some parameters to be identified and takes a slightly longer time to compute than DRA, FOM, and TPM, its computational complexity is much less than that of P2D model.The proposed ELM achieves accurate solid-phase and electrolyte-phase lithium-ion concentration prediction and voltage prediction with low computational complexity, which provides a strong technical support for achieving future intelligent, multi-state volume monitoring BMSs.

STAR+METHODS
Detailed methods are provided in the online version of this paper and include the following:

Figure 1 .
Figure 1.The structure of the single particle model

Figure 2 .
Figure 2. The structure of the simplified electrochemical model with ensemble learning the coefficients a 0 and b 1 can be calculated as a 0 = 1=5 and b 1 = 12=95, respectively.Hence, the fractional-order Pade ´approximation function of the transcendental transfer function can be expressed as

1 2 s(
, ELM shows the best Dc surf s;p predictive performance, and the Dc surf s;p curve of ELM closely follows that of P2D model.The Dc surf s;p prediction error of ELM is minimal with only 0.6 mol=m 3 RMSE and 1.66% MAPE, while DRA, FOM, and TPM all show more prediction error.Parameter identification of FIEDue to different parameters in positive and negative electrolytes, the lithium-ion concentrations in positive and negative electrolytes are different.Therefore, the parameters of FIE in positive and negative electrolytes need to be identified respectively.The PSO algorithm is used for identifying the parameters of FIE, and the loss function is defined as the RMSE between the output of FIE and the ground truth of electrolyte phase lithium-ion concentration near the current collector, shown in Equation42ðc e;i À c e;i;FIE Þ Equation 42)

Table 2 .
Dc surf s;n error analysis among DRA, FOM, TPM, and ELM

Table 3 .
Dc surf s;p error analysis among DRA, FOM, TPM, and ELM

Table 4 .
Voltage error analysis among DRA, FOM, TPM, and ELM

Table 5 .
Computational time of DRA, FOM, TPM, ELM, and P2D Data and code availability d EXPERIMENTAL MODEL AND SUBJECT DETAILS d METHOD DETAILS d QUANTIFICATION AND STATISTICAL ANALYSIS d ADDITIONAL RESOURCES Figure 8. Simulation at FUDS dynamics (A) One cycle FUDS current.(B) Cell voltage at FUDS dynamics.B Materials availability B

Table 6 .
Voltage errors at FUDS dynamics