1 Introduction

Electric vehicles (EVs) offer large benefits over gasoline and diesel vehicles in terms of sustainability and reducing emissions. One of the biggest problems facing EVs is the charging time, which might discourage consumers from purchasing them [1]. Recent advances in charging time reduction include using direct current (DC) fast charging points thereby introducing the potential for battery loss and safety concerns [2, 3]. There is a need for the development of EV charging algorithms, as some fast charging algorithms are considered ‘sub-optimal’ for charging efficiency, time, and battery health [4,5,6,7]. This is further emphasized by the increased battery degradation due to the higher C-rates and ambient temperature factors [3].

Lithium-ion (Li-ion) batteries are a popular choice for EVs, due to their high voltage with good power and energy density [1, 8]. In particular, lithium iron phosphate LiFePO4 (LFP), LiNiCoAlO2 (NCA) and Li(NiMnCo)O2 (NMC) batteries are some of the most promising candidates due to their chemical and thermal stability, as well as low cost [9,10,11,12]. Heat generation in Li-ion batteries is characterized by considering the electrochemical reactions (reversible) and the low chemical reaction rates or poor transport properties (irreversible) losses [13]. Irreversible side reactions cause battery aging, which is accelerated at elevated temperatures. As cells age, their available capacity decreases and their battery model parameters change. Irreversible heat generation is dominant at higher C-rates, while reversible heat generation dominates at low C-rates [3, 8, 14, 15]. Temperature regulation of Li-ion batteries is important for health, safety, and efficiency of the battery [3]. Cell materials or high local current densities result in cell-level (greater core compared to surface temperatures) and pack-level heat dissipation irregularities, leading to varying cell-level degradation rates [3, 13]. Increased reaction rates with increasing temperature lead to a cascading effect at high temperatures known as thermal runaway, causing potential safety hazards in the form of fire and increased battery capacity loss [8, 14]. An outline of the Li-ion battery degradation mechanisms is presented in Refs. [3, 16]. Solid electrolytic interphase (SEI) growth is an irreversible reaction and the main degradation mechanism under most cycling conditions for Li-ion cells, including LFP and NMC [3, 11]. Reactions between the electrolyte and the anode form dendrite growths on the anode’s surface, thereby irreversibly removing active electrolyte and causing capacity and power fade [3, 17]. The SEI growth is accelerated at high temperatures, high state-of-charge (SoC), high depth-of-discharge (DoD), and high C-rates [3, 16, 18, 19]. SEI growth can lead to dendritic growth, especially at low temperatures and subsequent short-circuiting, which might lead to excessive heat generation and increased battery degradation [3]. Cell overpotential, caused at high C-rate or low temperatures, increases the rate of irreversible reactions and thus reduces battery health and safety [3, 14, 15, 20]. The operating range of a battery is given by the cell manufacturer, recommending safe charging temperatures to ensure long life as well as regulatory requirements of overcharging boundaries [8].

Various battery modelling techniques exist in the literature including electrochemical models, stochastic models and equivalent circuit models (ECMs) [14, 21]. Electrochemical models such as single particle models are the most accurate, easily incorporating health and thermal effects [3, 7]. ECMs are robust, simple and much less computationally demanding [7, 22, 23], leading to their use in real-time applications like battery management system (BMS). The most common ECM consists of multiple parallel resistor and capacitor circuits (RC circuits) in series with the battery and internal resistance [5]. Higher-order models have increased the number of RC circuits, sacrificing computational power for higher accuracy [24]. A second-order ECM was suggested to offer the best compromise between model fidelity and computational time [25, 26]. The ECM parameters are dependent on SoC, State-of-Health (SoH), internal temperature and current direction with a variety of models available in Refs. [27,28,29,30,31].

Thermal modelling of batteries utilizes either 1-D lumped parameter techniques [25, 28, 32], 2D/3D multi-node heat transfer models [33], or finite element heat transfer and generation models [34]. The finite element models present the highest accuracy but with the highest computational cost. A dual heat capacity 1D model of a cell provides reasonable fidelity for a cylindrical cell while offering good computational efficiency. However, the core temperature is difficult to obtain in real-time applications [1, 32]. The cooling type affects heat rejection with conductive coolant being more effective than air cooling [35].

The variety of degradation mechanisms makes modelling of battery health difficult. Data-driven degradation models are useful for real-time SoH estimation [36]. Considering SEI as the main degradation mechanism in Li-ion batteries, SoH can be modelled through semi-empirical equations, dividing the changes into time (calendar) and Ah throughput (cyclic) effects where the latter suggested as the main contributor to health loss [37, 38]. The existing degradation models in literature consider a wide range of stress factors including temperature, SoC, DoD and C-rate on the health of different Li-ion battery types such as LFP and NMC [11, 39,40,41,42,43,44,45,46].

Battery charging protocols are divided into three main groups: (i) model-free algorithms such as constant voltage (CV), constant current (CC), constant current–constant voltage (CCCV) and pulse methods [3, 7, 47], (ii) empirical models which utilize ECMs to characterize batteries and closely control the charging constraints [7], and (iii) electrochemical algorithms which utilize full electrochemical models to control the charging current. Model-free algorithms, in particular CCCV, are widely used techniques due to their simplicity [3, 5,6,7, 48, 49]. The CCCV protocol applies CC initially, switching to CV when the cut-off voltage is reached avoiding overcharging and poor charging times associated with the CC and CV charging methods, respectively [6, 47]. Multiple-stage CCCV is suggested to be faster at the expense of characterization cost and time [3, 50]. By not considering the battery health, the model-free algorithms can shorten the battery lifespan, thereby offering opportunities for their improvement through optimization [3, 7, 27, 49,50,51,52].

Various techniques have been applied to optimize a battery charging protocol in literature including model predictive control (MPC) [4, 22], dynamic programming [5, 50], min–max [53] and Legendre–Gauss–Radau (LGR) pseudo-spectral methods [1, 30]. MPC is popular because of its robustness, ability to deal with nonlinearity and simplicity to implement constraints [27, 32]. Dynamic programming requires a large amount of data, which makes it less feasible in a BMS. Although the LGR methods sometimes fail to converge, they can provide a locally optimal solution in a relatively short time interval [7]. In a battery charging optimization problem, the cost function should balance charging time and battery health [1, 32]. Restricting SoH can be implemented by defining an SoH function [1, 11, 42], or by constraining core temperature as low as possible [27, 32, 53]. In general, a battery charging cost function is given by Eq. (1), where tf, SoHf and SoH0 are the final time, final SoH and initial SoH.

$$J = \beta \cdot t_{\text{f}} + \left( {1 - \beta } \right) \cdot (SoH_{\text{f}} - SoH_{0} )$$
(1)

The parameter β offers a balance between charging as fast as possible and incurring the least damage [1, 32]. The optimal trade-off can be visualized through a Pareto frontier graph, demonstrating key parameters like charging time and battery SoH. Constraints need to be applied to ensure safe operation of the battery as discussed in Ref. [27]. Factors, such as limited charging power and limited cooling power, need to be considered in practical applications too.

This study aims at developing an optimization framework for EV charging by considering different trade-offs between battery degradation and charging time. An LFP battery is used as a case study to demonstrate the effectiveness of the proposed optimization framework. The work presented here is, to the authors’ knowledge, novel to existing literature [37, 52] by utilizing more detailed health models with the addition of practical limitations of charging and cooling power to demonstrate their effects on the optimized charging profile. This manuscript is organized as follows: In Sect. 2, all simulation models are explained. Battery charging optimization framework is introduced in Sect. 3. The optimization results are then discussed in Sect. 4, and conclusions are presented in Sect. 5.

2 Simulation Models

2.1 Electro-Thermal Equivalent Circuit Battery Model

A second-order equivalent circuit model (ECM) coupled with a thermal model of a cylindrical cell is used in this study, as shown in Fig. 1. The model’s parameters are assumed to be dependent on temperature, SoC and current direction as discussed in Refs. [25, 28, 29]. A separate battery health model is discussed in Sect. 2.2.

Fig. 1
figure 1

Battery electro-thermal model: a second-order ECM and b thermal model of a cylindrical cell

The SoC equation is modelled by Eq. (2) using the coulomb counting method [14], where i(t) is the current (i.e., assumed to be negative for charging), z is \({\text{SoC}}\) and Cbat is the battery capacity (with a value of 2.3 A · h). Using Kirchhoff’s second law, the terminal voltage is modelled using Eq. (3), where \(V\) is the terminal voltage, Voc is the open circuit voltage, V0 is the voltage of the series resistance Re0 and V1 and V2 are the voltages of their respective RC circuits. Using Kirchhoff’s first law, the RC circuit equations, Eqs. (4) and (5), are derived from Ref. [32], where the electrical parameter Ren represents the respective resistances, and Cen represents the respective capacitances. The voltage drop across the series resistor is given by Eq. (6), where Re0 is the series resistance.

$$\dot{z}\left( t \right) = - \frac{i\left( t \right)}{{C_{{{\text{bat}}}} }}$$
(2)
$$V\left( t \right) = V_{{{\text{oc}}}} \left( {z\left( t \right)} \right) + V_{1} \left( t \right) + V_{2} \left( t \right) + V_{0} (t)$$
(3)
$$\dot{V}_{1} \left( t \right) = - \frac{{V_{1} \left( t \right)}}{{R_{\text{e1}} C_{\text{e1}} }} - \frac{i\left( t \right)}{C_{\text{e1}} }$$
(4)
$$\dot{V}_{2} \left( t \right) = - \frac{{V_{2} \left( t \right)}}{{R_{\text{e2}} C_{\text{e2}} }} - \frac{i\left( t \right)}{{C_{\text{e2}} }}$$
(5)
$$V_{0} \left( t \right) = - R_{\text{e0}} \cdot i(t)$$
(6)

A two-stage thermal model is used, which consists of core (Tc) and surface (Ts) temperatures [1]. The rate of change of the surface and core temperatures are given by Eqs. (7) and (8), respectively, where Tf is the ambient temperature; Rtu and Rtc are the convective and conductive heat resistances, respectively, and Ctc and Cts are the core and surface heat capacities, respectively. The heat capacities of the cell relate to the materials used and the mass, while the heat resistances depend on the material, shape, and surface area for heat extraction. The irreversible heat loss, which is considered to constitute the majority of the cell heat generation [1, 32], is modelled using Eq. (9), where Qh is the heat generated. For higher fidelity, reversible heat losses can be included in the model as well [25, 54]. A common assumption in Refs. [1, 32] is to consider a 100% efficient coolant circuit, thereby allowing for the fluid temperature to remain constant. This could be extended by including a coolant temperature state, affected by the heat rejected by the surface. A further extension could include a heat exchanger to dissipate the fluid heat.

$$\dot{T}_{\text s} \left( t \right) = \frac{{T_{\text f} - T_{\text s} \left( t \right)}}{{R_{\text {tu}} C_{\text {ts}} }} - \frac{{T_{\text s} \left( {t } \right) - T_{\text c} \left( t \right)}}{{R_{\text {tc}} C_{\text {ts}} }}$$
(7)
$$\dot{T}_{\text c} \left( t \right) = \frac{{T_{\text s} \left( t \right) - T_{\text c} \left( t \right)}}{{R_{\text{tc}} C_{\text {tc}} }} + \frac{{Q_{\text h} \left( t \right)}}{{C_{\text {tc}} }}$$
(8)
$$Q_{\text h} \left( t \right) = - i\left( t \right) \cdot \left| {V_{{{\text{oc}}}} \left( {z\left( t \right)} \right) - V\left( t \right)} \right|$$
(9)

A study was carried out to determine the necessity of the thermal model, showing a negligible difference both in the difference in predicted SoH and the difference in optimized profile. Therefore, the temperature model could be excluded if simulation time was to be further traded off. However, one clear benefit to having the thermal model is to analyze the effects of thermal limitations on the batteries than what otherwise would be possible.

Numerical values of the model’s parameters, Voc, Re0, Re1, Ce1, Re2 and Ce2, are tuned for a 2.3 Ah Lithium Iron Phosphate (LFP) cell with a graphite anode from the literature [28, 29]. These were modelled through Eqs. (10)–(13), where \(n = 1,2\) and Tm denotes the average cell temperature, described by Eq. (14). The thermal model’s parameters were taken from an air-cooled cylindrical cell in Ref. [1], validated in Ref. [25], and are presented in Table 1.

$$V_{{{\text{oc}}}} = \gamma_{{V_{{{\text{oc}}}} - 1}} \exp \left( { - \gamma_{{V_{{{\text{oc}}}} - 2 }} \cdot z} \right) + \gamma_{{V_{{{\text{oc}}}} - 3}} + \gamma_{{V_{{{\text{oc}}}} - 4}} \cdot z + \gamma_{{V_{{{\text{oc}}}} - 5}} e^{{\frac{{ - \gamma_{{V_{{{\text{oc}}}} - 6}} }}{1 - z}}}$$
(10)
$$R_{e0} = \gamma_{{R_{0} - 1}} \exp \left( {\frac{{\gamma_{{R_{0} - 2}} }}{{T_{\text{m}} - \gamma_{{R_{0} - 3}} }}} \right)$$
(11)
$$R_{{{\text{en}}}} = \left( {\gamma_{{R_{n} - 1}} + \gamma_{{R_{n} - 2 }} \cdot z + \gamma_{{R_{n} - 3}} \cdot z^{2} } \right) \cdot \exp \left( {\frac{{\gamma_{{R_{n} - 4}} }}{{T_{\text{m}} - \gamma_{{R_{n} - 5}} }}} \right)$$
(12)
$$C_{{{\text{en}}}} = \gamma_{{C_{n} - 1}} + \gamma_{{C_{n} - 2}} \cdot z + \gamma_{{C_{n} - 3}} \cdot z^{2} + \left( {\gamma_{{C_{n} - 4}} + \gamma_{{C_{n} - 5}} \cdot z + \gamma_{{C_{n} - 6}} z^{2} } \right). T_{\text{m}} ,\quad n = 1,2$$
(13)
$${\text{where}}\quad T_{\text m} = \frac{{T_{\text s } + T_{\text c} }}{2}$$
(14)
Table 1 LFP cell thermal model’s parameters [1]

The battery pack constraints are applied, through limits in the optimal control software, according to the Tesla Model S 85 kW·h configuration [55], with 74 cells in parallel and 96 in series. Equations (15) and (16) are used to model the power constraints, where Ncell is the number of cells, Pcool is the cooling power and Pcharging is the charging power of the battery pack.

$$P_{{{\text{cool}}}} = \frac{{T _{\text{s}} - T_{\text{f}} }}{{R_{\text{u}} }} \times N_{{{\text{cell}}}}$$
(15)
$$P_{{{\text{charging}}}} = - i\left( t \right) \times N_{{{\text{cell}}}} \cdot V$$
(16)

2.2 Battery Health Model

Two models, developed by Wang et al. [11] and Naumann et al. [19, 42], are considered for battery health estimation of the LFP cell in this study. Both models consider cylindrical LFP/C cells of 2.1 and 3 A · h. A capacity loss of greater than 20% is considered as the battery end of life (EoL) [1]. The health model, proposed by Wang et al., considers only losses during charging as shown by Eq. (17) with capacity loss (ΔQloss in %), activation energy (Ea in J · mol−1), core temperature (Tc in K) and parameters ζ, M. This is then transposed according to the EoL definition [1] as stated in Eq. (18). A \(\zeta\) value of 0.5 is suggested to indicate SEI growth [11, 37, 56], and the universal gas constant R is set equal to \(8.314\) J · mol−1 · K−1 [19, 57]. The values of parameter M as a function of C-rate (\(c\)), are shown in Table 2, while Ea is calculated using Eq. (21). The total discharge throughput (Atol in Ah) is converted to the number of cycles by dividing it by the cell’s capacity as stated in Eq. (19). This is then doubled to get the total throughput rather than just charging, to be used in SoH calculation. By only considering the losses during charging, calendar effects outside the charging cycle are ignored; however, the calendar effects during the charging cycle are included in the model.

$$\Delta Q_{{{\text{loss}}}} = M\left( c \right) \cdot \exp \left( { \frac{{ - E_{\text{a}} \left( c \right)}}{{R \cdot T_{\text{c}} }}} \right) \cdot A\left( c \right)^{\zeta }$$
(17)
$$A_{{{\text{tol}}}} \left( {c,T} \right) = \left[ {\frac{20}{{M\left( c \right) \cdot \exp \left( {\frac{{ - E_{\text{a}} \left( c \right)}}{{R \cdot T_{\text{c}} }}} \right)}}} \right]^{{\frac{1}{\zeta }}}$$
(18)
$$N\left( {c,T} \right) = \frac{{3600 \cdot A_{{{\text{tol}}}} \left( {c,T} \right)}}{{C_{{{\text{bat}}}} }}$$
(19)
$$S\dot{o}H = \frac{{\left| {i\left( t \right)} \right|}}{{2N\left( {c,T_{\text{c}} } \right) \cdot C_{{{\text{bat}}}} }}$$
(20)
$$E_{\text{a}} = 31700 - 370.3 \times c$$
(21)
Table 2 Values of parameter \(M\) at different C-rates [11]

The Naumann battery health model, on the other hand, includes more details [19, 42]. The capacity loss (\(Q_{\text{loss}}\) in %) is given by Eqs. (22) and (23), in terms of calendar (\(Q_{{{\text{loss}}}}^{{{\text{cal}}}}\)) and cycle losses (\(Q_{\text{loss}}^{\text{cyc}}\)). Subsequently, the factors affecting the cycle life, Eq. (24), are the number of equivalent full cycles (Nfull), C-rate (\(c\)) and \({\text{DoD}}\), while the calendar life, Eq. (25), is affected by time (\(t\)), temperature (\(T\)) and SoC (\(z\)). The number of full cycles is determined using integrated current, shown by Eq. (26). The relevant parameters are given in Table 3. As the actual DoD of the cycle is likely to be unknown, thus it is assumed to be equal to 1.

$${SoH} = 1 - \frac{{Q_{{{\text{loss}}}} }}{{Q_{{{\text{tol}}}} }}$$
(22)
$$Q_{{{\text{loss}}}} = Q_{{{\text{loss}}}}^{{{\text{cyc}}}} + Q_{{{\text{loss}}}}^{{{\text{cal}}}}$$
(23)
$$ Q_{{{\text{loss}}}}^{{{\text{cyc}}}} = \left( {\alpha_{C1} \cdot c + \alpha_{C0} } \right).\left( {\alpha_{\text {DoD1}} \cdot \left( {DoD - 0.6} \right)^{3} + \alpha_{\text {DoD0}} } \right) \cdot \left( {N_{{{\text{full}}}} } \right)^{{\zeta_{{{\text{cyc}}}} }} $$
(24)
$$Q_{{{\text{loss}}}}^{{{\text{cal}}}} = \left( {\alpha_{\text {SoC1}} \left( {z - 0.5} \right)^{2} + \alpha_{\text{SoC0}} } \right) \cdot \alpha_{\text{Tref}} \exp \left( { - \frac{{E_{\text{a}} }}{R} \left( {\frac{1}{T} - \frac{1}{{T_{\text{ref}} }}} \right)} \right) \cdot \left( t \right)^{{\zeta_{\text{cal}} }}$$
(25)
$$N_{{{\text{full}}}} = \frac{{\smallint \left| {i(t)} \right| {\text{d}}t}}{{C_{{{\text{bat}}}} }}$$
(26)
Table 3 Battery health model’s parameters [19, 42]

To provide time derivative of the capacity losses, each of the equations is differentiated with respect to the time, shown by Eqs. (27) and (28). To determine the current equivalent full cycle and the equivalent aging time, Eqs. (29) and (30) are employed [37].

$$\frac{{{\text{d}}Q_{{{\text{loss}}}}^{{{\text{cal}}}} }}{{{\text{d}}t}} = \zeta_{{{\text{cal}}}} \cdot \left( {\alpha_{{{\text{SoC}}1}} \left( {z - 0.5} \right)^{2} + \alpha_{{{\text{SoC}}0}} } \right) \cdot \alpha_{{{\text{Tref}}}} \exp \left( { - \frac{{E_{\text{a}} }}{R} \left( {\frac{1}{T} - \frac{1}{{T_{{{\text{ref}}}} }}} \right)} \right) \cdot \left( {t_{{{\text{eq}}}} } \right)^{{\zeta_{{{\text{cal}}}} - 1}}$$
(27)
$$\frac{{{\text{d}}Q_{{{\text{loss}}}}^{{{\text{cyc}}}} }}{{{\text{d}}t}} = \left( {\frac{I}{{c_{{{\text{bat}}}} }}} \right) \cdot \zeta_{{{\text{cyc}}}} \cdot \left( {\alpha_{C1} \cdot C + \alpha_{C0} } \right) \cdot \left( {\alpha_{\text{DoD1}} \cdot \left( {DoD - 0.6} \right)^{3} + \alpha_{\text{DoD0}} } \right) \cdot \left( {N_{{{\text{full}}}} } \right)^{{\zeta_{{{\text{cyc}}}} - 1}}$$
(28)
$$N_{{{\text{full}}}} = \left( {\frac{{\left( { 1 - SoH} \right) \times 20}}{{\left( {\alpha_{C1} \cdot C + \alpha_{C0} } \right) \cdot \left( {\alpha_{\text{DoD1}} \cdot \left( {DoD - 0.6} \right)^{3} + \alpha_{\text{DoD0}} } \right)}}} \right)^{{\frac{1}{{\zeta_{cyc} }}}}$$
(29)
$$t_{{\text{eq }}} = \left[ {\frac{{\left( {1 - SoH} \right) \times 20}}{{\alpha_{\text{SoC1}} \left( {z - 0.5} \right)^{2 } + \alpha_{\text{SoC0}} \cdot \alpha_{{{\text{Tref}}}} \exp \left( { - \frac{{E_{\text{a}} }}{R} \left( {\frac{1}{T} - \frac{1}{{T_{{{\text{ref}}}} }}} \right)} \right)}}} \right]^{{\frac{1}{{\zeta_{\text{cal}} }}}}$$
(30)

The effects of temperature and C-rate on battery life are visualized in Fig. 2. For the Naumann model, the plot is presented for a case in which SoC = 1 and DoD = 1. According to Fig. 2, the number of cycles decreases as the temperature increases in both models, which is in line with the suggested increase in SEI growth at higher temperatures. Both models show a trend that at high and very low C-rates, more degradation occurs [18, 37, 42, 58]. However, the optimal peak band in the Wang model is wider, at a C-rate between 2 and 4, while the peak of the Naumann model appears at 0.5C. It is additionally observed that the C-rate peak becomes less prominent and shifts to a slightly higher C-rate at higher temperatures. The Naumann model demonstrates less temperature dependence, showing a reduced drop in the number of cycles at higher temperatures. The number of cycles of the Naumann model is similar to that of Ref. [17] where the same stress factors have been modelled. According to Ref. [17], the number of cycles rarely reaches over 10,000 full cycles, and by keeping the C-rate below 2C, it is almost guaranteed to achieve 5,000 full cycles.

Fig. 2
figure 2

The effect of temperature and C-rate on the number of cycles to battery failure

The effects of changing SoC and temperature on calendar life in the Naumann model are shown in Fig. 3, by considering a C-rate of 0. According to Fig. 3, an increased degradation rate occurs at higher SoCs, and a significant improvement in cell’s life is observed at mid SoCs and temperatures. The trend exhibited by the SoC is due to an increased amount of SEI formation as discussed in Refs. [9, 19].

Fig. 3
figure 3

The effects of SoC and temperature on battery calendar life in the Naumann 2020 model

3 Battery Charging Optimization

A nonlinear optimization software, called Imperial College London Optimal Control Software (ICLOCS2) [59], is used in this study for battery charging optimization. This was combined with an interior points-based solver IPOPT, taken from the OPTI toolbox [60]. That produces fast solutions for largely nonlinear models under constraints, however, care must be taken to ensure the global minima are reached. The IPOPT solver discretizes the model over the entire solution time. Then, a local mesh refinement is used along with an automatic aggressive refinement strategy. Mesh size is determined with the aim of reducing the optimization error. The available transcription methods in the software are as follows: (i) direct collocation method and (ii) integral residual minimization method. The direct collocation method uses a piecewise linear control for the input and state trajectories [61]. This however does not enforce system dynamics between collocation points, and therefore, there is no guarantee of constraint satisfaction between the points. On the other hand, the integral residual minimization method minimizes the residual error of the system dynamics, integrated over the whole solution trajectory. Thus, the integral residual minimization method is more accurate, even at coarse mesh sizes, but at the expense of computational time [62].

The available direct collocation methods include Euler, trapezoidal and Hermite-Simpson, as well as higher-order Legendre–Gauss–Radau methods [62]. The main difference between the methods is the state and input trajectory calculations with an estimation of the input trajectory always one polynomial order below the state trajectory. The Euler method considers constant input between mesh points whereas the trapezoidal and Hermite-Simpson methods assume linear and quadratic approximations, respectively. The LGR method, on the other hand, uses higher-order dynamics and subsequently one order higher for its states. In this study, the trapezoidal direct collocation method is used because of its computational efficiency and the recommended local absolute error [63].

Two different cost functions are defined and compared by considering the battery health and temperature. The health function, by directly considering the SoH value, allows for the lowest degradation to be achieved [1]. The temperature cost, made possible by the effect of temperature on SoH, aims at the minimization of the temperature itself. That minimizes the C-rate due to correlation between the C-rate and heat generation [32]. It might deem the SoH model unnecessary, thereby simplifying the solution. The health and temperature cost functions are formulated in Eqs. (31) and (32) with a time objective as well as objectives of change in SoH and average rise in temperature. The temperature rise is normalized by the ambient temperature. The λH and λT parameters are used to ensure the objectives are of the same order of magnitude and evenly distribute the Pareto, while the β parameter is used to control the relative objective weightings. By changing the β value between 1 and 0, a Pareto of the cost function can be created, allowing identification of the optimal balance between the two objectives. The λ parameters for each of the health models are given in Table 4.

$$J_{{{\text{health}}}} = \beta \cdot t_{\text f} + \left( {1 - \beta } \right) \cdot \lambda_{\text H} \cdot \left( {{{SoH}}_{0} - {{SoH}}_{\text f} } \right)$$
(31)
$$J_{{{\text{temp}}}} = \beta \cdot t_{\text f } + \left( {1 - \beta } \right) \cdot \lambda_{\text T} \cdot \left( {\frac{{T_{\text c } - T_{\text f} }}{{T_{\text f} }}} \right)^{T} \cdot \left( {\frac{{T_{\text c} - T_{\text f} }}{{T_{\text f} }}} \right)$$
(32)
Table 4 Cost function parameters of the health models

A maximum pack cooling power of 2–15 kW is used in Ref. [13] when investigating the heat loss effect on Li-ion cells. That is higher than the range of 1–5 kW, which is used in common vehicles [13, 64]. The difficulty in cooling is further emphasized by low vehicle speed and hence low heat exchanger effectiveness at low air velocities. Methods such as cooling integrated within chargers are suggested in Ref. [13]; however, challenges with these methods still exist. Current common fast chargers use 50 kW; however, chargers with higher power capacities are slowly being introduced as vehicles can withstand them, such as 120, 150 and 350 kW chargers [3]. The trend is to increase the charging power capacity of vehicles using higher voltage battery systems, thereby reducing the resistive heating effects and charging time [2, 3]. The current charging power and cooling power constraints prevent excessive stress on other system components such as converters, cables and the cooling system [32]. SoC, temperature and voltage constraints prevent accelerated SEI growth and hence degradation from overpotential and overcharging as well as safety from thermal runaway [1, 32].

In this study, the voltage and power constraints are applied through path constraints in the optimization software. The constraints are applied in accordance with those used in Ref. [1] as stated in Table 5. As a typical case study in Ref. [1], the charging process is considered from 25% to 75% SoC. In addition, the ambient temperature is assumed constant at 25 °C, with the initial states of the cell given in Table 6. If the charging time is unrestricted, the maximum final time is set to 2 h, whereas the minimum time is set to 10 s. In addition, the ambient temperature is changed with the initial temperatures to study the effect of climate on the optimal charging solutions. Using the proposed framework, the computational requirements of the solution are not excessive. It takes around 20 s to find a solution using a PC with 8 Gb of RAM and an AMD Ryzen 4700 CPU, which offers the possibility for real-time implementation at charge stations too.

Table 5 Charging optimization constraints
Table 6 Initial states of the model

4 Results and Discussions

4.1 The Effect of Different Cost Functions

In this section, the effect of different cost functions, which were introduced in Eqs. (31) and (32), are analyzed. The Pareto functions, calculated by varying the parameter β, are shown in Fig. 4 for the Wang and Naumann models, respectively. These demonstrate the trade-off between the charging time and the change in battery SoH. The minimal damage for both cost functions when using the Wang model occurs at around t = 16.0 min whereas using the Naumann model, the time of minimum damage for the optimal temperature is slightly faster than that of the optimal health. It is noted that the optimal-temperature charging strategy has increased damage using both models. In fact, to achieve the same charging time, the β value will be greater than 0, unlike the optimal health scenario, thereby altering the charge profile for the same time which leads to a sub-optimal health charging. The increased calendar aging at low C-rates, which is more apparent in the Wang model, means any subsequent increase in charging time of the optimal-temperature cost function results in an increase in capacity fade. On the other hand, the reduced capacity fade when using the optimal temperature cost function compared to the optimal health cost function of the Naumann model is due to the decreased drop at low C-rates.

Fig. 4
figure 4

The Pareto functions of a Wang and b Naumann health models

In addition, it is observed that the computational time for the optimal temperature cost function is 8 s faster than that of the optimal health cost function due to not including highly nonlinear SoH function.

Figure 5 demonstrates that in the optimal-temperature scenario, the charging profile (i.e., C-rate) is identical regardless of the health model. This is because the optimization algorithm no longer relies on the SoH to solve the optimal solution. The reduced heat generation at lower C-rates means the optimal-temperature charging profile reduces the average core temperature from 26.5/26.3 °C for the Wang/Naumann models, respectively, to 25.2 °C. The lower C-rate of the Naumann model causes the average core temperature to drop compared to the Wang model. The optimal-temperature charge shows a high initial C-rate caused by cell’s heat capacity, a low Voc at low SoCs and RC circuit time constants. As charge is applied, the subsequent increase in RC voltage takes time, thus reducing the cell voltage, irreversible heat generation and temperature. As a result, the capacity fade of the cell increased from 0.0029% to 0.0034% for the Wang model and from 0.112% to 0.144% for the Naumann model.

Fig. 5
figure 5

Effect of different cost functions on a Wang and b Naumann health models

The C-rate profile shows a decrease in the early portion of the cycle. This can be attributed to the ECM parameters changing with SoC which in some cases can demonstrate a larger change than the effect of temperature. The initial increase in temperature and ECM voltages plays a less significant role in the optimized profile. C-rate is increased toward the end of the cycle as the optimization criteria stop once the desired SoC was reached. The effect that the battery will be hot thereby decreasing life after the simulation was complete was not factored into the optimization profile. Hence, an increase in c-rate at the end of the cycle would reduce the calendar aging time at the expense of temperature.

The sharp C-rate increase followed by a lower C-rate resembles that of the optimal health charge in Ref. [32], however, with the absence of a late peak. The limited C-rate of the charging profile in this work significantly reduces heat generation, hence decreasing peak temperature rise to 0.8 °C, lower than that of Ref. [32]. Their optimal-temperature charge includes a small additional inclusion of optimal-time objective, possibly causing an increased current and hence an increase in heat generation and temperature. This is further justified by the apparent convergence of their charge toward zero for the longer charge times. If the temperature at the end of the cycle is to be minimized, a similar profile to that of Ref. [32] is observed, as low current in most of the cycle reduces cell temperature at the end of the cycle.

It is evident that aging influenced the optimal health profile of the battery, with an aged optimal health profile similar to that of the optimal temperature when both are limited to 1 h, without the large peaks at the beginning and end of the cycle. As a result, the average temperature rise is 0.19 °C compared to 0.17 °C for the optimal temperature charge. The resulting capacity loss at 2,000 cycles showed a 5.5% change from a 14.5% loss for the optimal temperature to a 13.8% loss for the 1-h aged optimal-health profile, significantly lower than the 19.3% capacity loss of the unaged optimal-health charging. As was seen in the optimal temperature charge, charging for longer than 98.9 min results in a greater amount of damage compared with the aged optimal health profile. Hence for both models, the optimal-health cost function provides the best control of health retention.

4.2 Optimal-Health Charging

The charging power and the cooling power requirements of both health models are shown in Fig. 6. According to the results, a power limitation of 150 kW has an impact on the optimal health of both models by limiting the high C-rate at an early stage when using the Naumann model and at a later stage when using the Wang model. The cooling power of both health models has been below the maximum of 5 kW. The maximum charging power required by the Naumann model to achieve an optimal health charge is 489 kW. This is above that of common fast chargers; however, the lower cell number of smaller battery packs would reduce this requirement. The partially aged profile reduces the requirements to within that of common fast chargers at 19.5 kW charging and 0.9 kW cooling power.

Fig. 6
figure 6

Power requirements of the optimal-health charging scenario

The current profile of the Wang model, shown in Fig. 7, is in accordance with the result which is already presented in Ref. [1] using the same model, however, with the absence of a pulse-like response early in the cycle and a slightly higher final peak. That validation is particularly important because those previous results were obtained from a different solver, different discretization method (LGR) and original rather than fitted ECM parameter data. The current profile of the Naumann model is higher than the Wang model initially; however, the longer period below the Wang profile meant that the average C-rate was less and therefore has increased the charging time. This is due to the difference in the theoretical cell life peaks of the respective models (referring to Fig. 2) with the flatter and wider peak of the Wang model occurring at a higher C-rate than that of the Naumann model.

Fig. 7
figure 7

Optimal-health charging strategy: a C-rate, b voltage, c SoH and d temperature of both health models

The cell’s terminal voltage, shown in Fig. 7(b), increases with higher C-rates as we expect. According to Fig. 7(b), the Naumann model’s curve has a greater initial voltage; however, superseded by the Wang model after around 5 min. The higher C-rate at the beginning of the charging cycle for both models is due to the low Voc at low SoC and the time constant of the RC circuits. Terminal voltage is increasing over the entire cycle due to the combination of an increase in Voc with increasing SoC, as well as the voltage of the second RC circuit which slowly gains voltage due to its greatly increased capacitance.

In addition, Fig. 7(c) shows the cell’s SoH change during charging using the Wang and Naumann health models. The SoC is required to change during charging; however, DoD and Ah throughput are constant throughout the entire cycle. The overall SoH change is caused by a combination of different factors. For example, the Naumann model increases calendar aging by causing a longer charging time, whereas it can reduce the degradation process by providing a lower average temperature during charging. The temperature during the charging cycle, shown in Fig. 7(d), is greater at the core compared to the surface. The average core/surface temperatures are 26.5/25.9 °C and 26.3/25.8 °C for the Wang and Naumann models, respectively. The increased initial C-rate of the Naumann model increases heat generation hence temperature, which is then maintained for the rest of the cycle.

Further analysis was performed on the Naumann health model, comparing an unconstrained and constrained charging time in Fig. 8. In the case of unconstrained, the charging time is obtained to be around 99 min. In the other case, when the charging time is limited to 60 min, the C-rate is increased but the shape of the charging profile is preserved, compensating for the required final charge.

Fig. 8
figure 8

Comparison between ‘free time’ and ‘constrained time’ charging

In another analysis, the effect of the ambient temperature is investigated. According to the results shown in Fig. 9, for a higher ambient temperature, a higher C-rate is obtained to be optimum because it reduces the charging time. The increased calendar aging at higher temperatures causes the algorithm to increase the C-rate, therefore providing the best balance between cyclic and calendar aging.

Fig. 9
figure 9

Effect of changing ambient temperature on optimal-health charging

Subsequently, the Naumann model is used to simulate the effect of different charging time on battery health (i.e., change in SOH) as shown in Fig. 10. The damage incurred over 5 h is the lowest when charging for 5 h, hence as slow as possible coinciding with that presented in Refs. [30, 37]. A further comparison is drawn between “as soon as possible” and “just in time” charging strategies as depicted in Fig. 10. The “as soon as possible” charging strategy leaves the battery with a slightly higher SoC after the charge as well as dissipating the high final temperature after charging. The combination of these factors means the cell incurs a greater amount of calendar aging, as presented in Ref. [44]. That additional degradation has a greater effect at shorter charge times, where after 45 min, the difference becomes negligible. This is likely due to a reduced calendar life effect compared to that of cycle life degradation.

Fig. 10
figure 10

Effect of charging time on battery degradation over 5 h

4.3 Optimal-Time Charging

The charging current profile is the same for both health models when the optimal time is aimed because a health model is not included in the optimization process. In fact, an optimal-time charging solution is more affected by the charging power constraints rather than battery aging. For example, Fig. 11 shows the significant impact of any power limitation on the optimal-time charging profiles. In that figure, when no power constraint is applied, the optimized profile is voltage limited, representing a CV profile. In such an unconstrained case, the maximum cell’s temperature reaches 36.9 °C with a maximum and minimum power of 838 kW and 254 kW, respectively, and a maximum cooling power of 16.7 kW. It is therefore evident that by considering the reasonable 150 kW constraint, the entire charging profile will be limited as shown in Fig. 11. That leads to an increase in the charging time from 4.9 min to 11.3 min, shifting the limiting factor from voltage to charging power. By limiting the cooling power to 5 kW (i.e., around 0.708 W per cell), the charging profile becomes cooling-limited after 7.6 min, which consequently reduces the C-rate. By applying both power constraints, the optimal-time charging takes 12.2 min, a substantial increase from the unconstrained solution.

Fig. 11
figure 11

Effect of power constraints on optimal-time charging: a C-rate and b voltage

Figure 12 (a) shows that for the same charging power, the initial low voltage permits an increase in C-rate. As the voltage begins to level off so does the C-rate, slowly decreasing due to the increasing cell voltage, up until around t = 7.6 min when the limiting factor moves from charging to cooling power. It remains under this constraint until the end of the cycle. At  t = 12.2 min, for 25–75% SoC charge, the charge is faster than the 10–80% charge of the Tesla in 38 min, given the increased allowable power and increased SoC range [65]. With smaller battery packs such as that found in the Ioniq [66], the allowable charging power per cell is greater, thus increasing the allowable C-rate.

Fig. 12
figure 12

Optimal-time charging: a C-rate, b voltage, c SoH and d temperature

With the applied power constraints, the power limitation means the cell voltage limit is not reached during the cycle as shown in Fig. 12 (b). Initially, due to low Voc and RC circuit voltages, the voltage is low. As the SoC reaches its mid-range, the Voc and the voltage from the first RC circuit level off. However, due to the larger capacitance, the second RC circuit steadily increases in voltage as more current is applied, thereby steadily increasing the terminal voltage.

Figure 12 (c) shows a lower SoH for the optimal-time charging profile compared to the optimal-health scenario. For the Wang model, the C-rate remains below that of the peak number of cycles, which, however, remains in the wide range of improved cycle life. This is not the case for the Naumann model, however. The increase in C-rate increases the cycle losses as well as cell temperatures, while reducing the charging time. Nevertheless, the increased cycle loss and subsequently increased temperature cause increased capacity loss and thus a lower SoH.

Looking at Fig. 12 (d), the result demonstrates that the increased C-rate, compared to the optimal-health scenario, leads to increased heat generation and temperature. The average core/surface temperatures are recorded at 27.5/26.5 °C. As the cooling power limit is established at around t = 7.6 min, the difference between the surface and coolant temperatures reaches the cooling limit at around 2.2 °C, which is less than that of the imposed temperature limit.

Figure 13 compares the optimal-time charging profile with that of two CCCV profiles, one chosen to coincide with just under the 150 kW requirement and the other with both the 150 kW charging power and 5 kW cooling power. When the 2.6C CCCV profile is considered, the charging time is 11.5 min with a capacity loss of 0.113%. On the other hand, the 2.3C CCCV profile has 13.0 min of charging time with 0.119% capacity loss. Compared to the optimal-time charging profile, the faster CCCV profile causes more degradation whereas the slower CCCV profile causes less. In fact, an increased charging rate increases the capacity fade by increasing cyclic losses, despite decreasing calendar losses. The cyclic losses have been already higher for the optimal-time charging profile, further increased with an increased C-rate. Unlike the other two charging profiles, the 2.6C CCCV charging profile overshoots the cooling power limitation, therefore may not be feasible. Comparing the optimal-time algorithm to the CCCV counterpart, tighter control of parameters is established along with a significant 6.82% faster charging time, reducing charging time by 0.8 min.

Fig. 13
figure 13

Comparison of CCCV and the optimal-time charging profiles

Figure 14 demonstrates the effect of varying ambient temperature on the charging current profile. As temperature increases, the cooling power-limited phase decreases in both length and magnitude. This is due to the temperature difference required for the cooling power limit to be met later in the cycle. In addition, the allowable current under the charging power-limited phase is greater. These changes can be attributed to the changes in the ECM parameters in response to temperature. The parameter Re0 decreases with increasing temperature, causing less voltage for a given input current, and therefore increasing the allowable current for the same charging power.

Fig. 14
figure 14

Effect of the ambient temperature on optimal-time charging profile

5 Conclusions

In this study, a model-based battery charging optimization framework was proposed and simulated under various working conditions. By utilizing more detailed health models, along with the addition of practical limitations of charging and cooling power, their effects on the optimized charging profile were demonstrated as the novelty of this work. A second-order equivalent circuit model coupled with a thermal model of a cylindrical LFP cell was used in this study. In addition, two battery health models (i.e., Wang and Naumann models) were considered for battery health estimation under various temperatures and C-rates. All the models were then integrated into an optimization framework to generate an optimum battery charging profile by considering a desired objective function and certain constraints. Two different charging strategies were investigated called ‘optimal-health charging’ and ‘optimal-time charging.’

In the optimal-health charging scenario, firstly the power requirements of charging and cooling were compared between the Wang and Naumann health models. Secondly, other variables such as C-rate, battery voltage, battery SoH and temperature of both health models were presented and discussed. After that, a comparison between two cases in which the charging time is constrained and unconstrained was investigated. According to the results, the unconstrained charging time was obtained to be around 99 min to charge the EV battery from 25% to 75% SoC. In the other case, when the charging time was limited to 60 min, the C-rate was increased but the shape of the charging profile was preserved, compensating for the required final charge. In another analysis, the effect of the ambient temperature was investigated. According to the results, for a higher ambient temperature, a higher C-rate is obtained to be optimum because it reduces the charging time. The increased calendar aging at higher temperatures causes the algorithm to increase the C-rate, therefore providing the best balance between cyclic and calendar aging.

Next, an optimal-time charging scenario was proposed. Firstly, the impact of any power limitation on the charging profile was investigated. It was observed that when no power constraint is applied, the optimized profile is limited by the maximum voltage, representing a CV profile. It was therefore concluded that by considering the reasonable 150 kW charging power constraint and limiting the cooling power to 5 kW, the optimal-time charging takes around 12 min to charge the EV battery from 25% to 75% SoC. Secondly, other variables such as C-rate, battery voltage, battery SoH and temperature of both health models were presented and discussed. After that, the optimal-time charging profile was compared with the CCCV charging profile. Comparing the optimal-time algorithm to the CCCV counterpart, a tighter control of parameters is established along with a significant 6.82% faster charging time.

In terms of battery health, the difference in losses over 2000 cycles was improved by 0.08% by using the optimal-health charging protocol in comparison with a 0.3C CCCV. Considering losses until the vehicle is used again, the optimal charge was found to be to charge as slowly as possible, minimizing the losses experienced when charging faster than required and aging at higher SoC. Therefore, for preserving the health of a battery, one of the most important factors in how fast to charge is the amount of time available for the charge.