A Comparison of Time-Domain Implementation Methods for Fractional-Order Battery Impedance Models

This paper is a comparative study of the multiple RC, Oustaloup and Grünwald–Letnikov approaches for time domain implementations of fractional-order battery models. The comparisons are made in terms of accuracy, computational burden and suitability for the identification of impedance parameters from time-domain measurements. The study was performed in a simulation framework and focused on a set of ZARC elements, representing the middle frequency range of Li-ion batteries’ impedance. It was found that the multiple RC approach offers the best accuracy–complexity compromise, making it the most interesting approach for real-time battery simulation applications. As for applications requiring the identification of impedance parameters, the Oustaloup approach offers the best compromise between the goodness of the obtained frequency response and the accuracy–complexity requirements.


Introduction
Energy storage systems (ESSs) are among the most critical components concerning the full adoption of renewable energy sources and electric transportation [1]. In such applications, energy management systems (EMSs) are required for coordinating the operations of systems with multiple energy generation resources, as often is the case with microgrids and hybrid ESSs, which employ multiple complementary energy storage subsystems. For the energy management of ESSs, the most commonly desired objectives are: improved energy efficiency, extended lifetimes for storage elements and compliance with constraints of internal energy storage modules, e.g., no over-charging and no over-discharging [2]. In the case of rechargeable batteries, those goals typically require accurate monitoring; state of charge (SoC) and state of health (SoH) estimations; and charging control, which can be accomplished by using dedicated battery management systems (BMS). The methods employed for these operations range from experiment-based ones, such as incremental capacity [3], to data-driven ones, including machine learning [4]. State estimation and control algorithms in a BMS may require battery models capable of approximating the battery's response under given operating conditions [5].
Equivalent circuit models (ECMs) are preferred over electrochemical or empirical models, as they approximate the dynamic behaviour of a battery with relatively high accuracy [6], while offering simplified descriptions of the complex physical and chemical processes occurring within batteries, by representing them with a set of lumped elements, including resistors, capacitors and inductors. ECMs have been widely used as parts of battery state estimation and charging control strategies. The adoption of ECM-based optimal state estimation, by directly solving the model-constrained optimisation problem [7] or using techniques such as the Kalman filter and all its variants [8], has enabled the implementation of online SoC and SoH estimations in EMS frameworks. The implementation of online optimal charging strategies, known for their high computational burden, has also been enabled by algorithms, including ECMs, by profiting from the accuracy-complexity trade off offered by such models [9].
The parameters of an ECM can be fitted from voltage and current data obtained during specific operating conditions [6]. However, these circuit components are often insufficient for modelling the dynamics of electrochemical processes such as charge and mass transfers and double layer capacitance in a battery, due to the spatial distribution of those processes [10]. This lack of physical significance may compromise the identification of relationships between health estimation and ECM parameters. Said drawback may be overcome by substituting capacitors in the ECM with constant phase elements (CPEs), defined in the frequency domain and analytically derived from the electrochemical principles of the diffusion processes. Such elements are often used to fit electrochemical impedance spectroscopy (EIS) data [11]. The reduced number of parameters in ECMs using CPEs instead of capacitors is mainly attractive for SoH estimation approaches based on the analysis of variations in the parameters associated with specific electrochemical processes [12].
The direct time-domain implementation of such models is particularly challenging, because they represent dynamic systems with non-integer-order derivative operations, hence the name fractional order models (FOM) [10]. The time-domain implementations of FOMs' electrical responses have been employed in applications such as online SoC estimation using fractional-order (FO) Kalman filters [13] and a time-domain characterisation of battery diffusion dynamics [14]. Three main implementation approaches have been identified: the multiple RC (mRC) circuit [15], the high-order integer transfer function [16] and the Grünwald-Letnikov (GL) fractional derivative [17] approximations. However, the literature is rather obscure about the motivation for the selection of one approach over the others. This work fills this gap by presenting a comparative study of the three approaches. The comparisons are made in terms of: • Accuracy: by analysing the error of each implementation with respect to a reference analytical model for given input signals; • Complexity: by writing the sets of equations required by each approach using similar structures and comparing the sizes of the arrays involved and the numbers of required additions and multiplications, in view of an embedded use of the FOMs; • Suitability for identification of impedance parameters from time-domain measurements.
We used a simulation environment with a set of FOMs representing the middlefrequency range impedance of Li-ion batteries, normally represented by the so-called ZARC elements. Our study identifies which of the analysed approaches offers the best compromise between accuracy and computational burden for applications such as real-time simulations. The second goal was to understand for which of the three cases the timedomain identification of the FOM leads to a correct frequency-domain response, keeping the impedance model meaningful. This analysis may serve as a guide for the selection of implementation approaches for FOMs in EMS applications.
The paper is organised as follows. Section 2 introduces the battery impedance models based on constant phase elements, Section 3 presents, in detail, the three time-domain implementation approaches studied in this work. Then, the results of the comparative analysis in terms of accuracy and complexity are presented in Sections 4 and 5, respectively. Section 6 presents a time-domain identification study performed for the three implementation approaches. Finally, the conclusions are drawn in Section 7.

Battery Impedance Models
EIS analyses the impedance of battery cells in a specific range of frequencies, drawing conclusions about internal electrochemical processes with different time constants. A typical EIS test is performed by injecting a sinusoidal voltage or current signal; acquiring the cell response; and computing the impedance through the amplitude ratio and the phase difference between voltage and current signals. That experiment is repeated for several frequencies in a selected frequency range. Then, by calculating the impedance, a Nyquist plot, often called impedance plot, can be generated. If this is performed for multiple battery operating conditions (temperature, SoC and dc operating point), it is possible to visualise and quantify their influences over the frequency response. For a Li-ion battery cell, a typical impedance plot is shown in Figure 1 [18]. In the qualitative impedance plot shown in Figure 1, it is possible to identify four sections that can be associated with particular electrochemical processes [18]. In the first part, an inductive behaviour can be seen at high frequencies, related to the inductive reactances of metallic elements in the cell and wires. The presence of an ohmic resistance is revealed by the intersection with the real axis at a nonzero value. This corresponds to the sum of the current collectors, active material, electrolyte and separator resistances. The semi-circle-like section represents the double layer capacitance and charge transfer processes at the electrodes. Finally, at low frequencies, the main effect corresponds to the diffusion processes of the active material of the electrodes, which manifests as a section with a constant slope in the impedance plot. It is worth noting that measured spectra often show variations with respect to the qualitative curve presented. For example, the number of semi-circles can be increased to two or more, or the inductive part can exhibit a slope with an increasing real part. Moreover, the semi-circle section may tend to present a depression at its mid-point (non-constant radius) [19].
For a relatively accurate and meaningful reproduction of the impedance spectrum of a battery cell, the ECMs presented in Figure 1 can be considered [20]. The behaviour of the cell at high frequencies is represented by an ideal inductor L and the resistor R s represents the ohmic resistance of the cell elements. The semi-circle section can be represented using a ZARC element, which corresponds to a parallel connection between a resistor and a CPE. The impedance of a CPE, Z CPE , is presented in: where Q corresponds to a generalised capacitance, φ to the depression factor, ω to the angular frequency and j to the imaginary unity [21]. The low-frequency response is represented by a Warburg impedance, which models a semi-infinite linear diffusion process. The Warburg impedance, namely, Z W , is characterised by a 45 • phase, and therefore can be also represented by a CPE: where A w is the diffusion coefficient [21], and the equivalent generalised capacitance and depression factor for the Warburg element are given by Q w = 1/( √ 2A w ) and φ w = 0.5, respectively.
CPEs are used instead of capacitors because when they are connected in parallel with a resistor forming a ZARC element, φ represents the depression often observed in the semi-circles in the impedance plot of a Li-ion cell. The factor φ can take values between zero and one; when φ = 0, the ZARC element represents only an ohmic resistor, and if φ = 1, the response of an RC element is obtained. The ZARC impedance is represented by: where R p1 , Q 1 and φ 1 characterise the resistance and CPE parameters of the ZARC element. The overall impedance of the circuit presented in Figure 1 is then defined by: For the sake of simplicity, the discussion that follows focuses on the computation of the voltage v(t) of the ZARC element for a given current signal i(t). The presented results can easily be extended to the Warburg element using similar principles, and from there to the whole battery's impedance.

Time-Domain Implementation of the ZARC Element Response
In the framework of battery modelling, three main approaches for approximating the time-domain responses of elements with FO transfer functions have been proposed.

1.
Approximation 1. The FO impedance is approximated with a series of parallel RC branches [22][23][24]. In [22], the mRC approximation was used for the implementation of two battery diffusion impedance models. A comparison in terms of the accuracy of the two models is presented. Similarly in [23], a CPE was used for approximating the diffusion dynamics of Li-ion batteries. A comparison of the identification performances of multiple implementations of the CPE based on the mRC approach is presented. The authors of [24] used the mRC approach for the approximation of the response of a ZARC element, in the framework of time-domain-based identification of impedance models for batteries.

2.
Approximation 2. The approximation of the FO transfer function with a high-degree integer-order system, the Oustaloup (OU) approach being the most widely adopted [10,14,25]. In [10] and [25], this implementation was used for FOM identification with time-domain measurements. In [14], the approximation was used for studying and identifying the diffusion dynamics of Li-ion batteries.

3.
Approximation 3. The approximation of a derivative of FO with a specific definition that allows for implementing difference equations, mainly based on the GL definition of the FO derivative [13,26,27]. Another study [26] analysed the performance of a FOM, implemented using the GL definition of the FO derivative, for the approximation of the battery voltage, and compared the results with a typical single RC model. Additionally, a method for the time-domain identification of the FOM was provided to the readers. In [13], the implementation was used in conjunction with a FO Kalman filter for online SoC estimation. Similarly, in [27], a GL-based implementation was used with an extended Kalman filter scheme for online estimation of SoC and SoH.
Flowcharts for the three implementation approaches are given in Figure 2. In the three approaches, the time response of the FOM is approximated by a set of discrete equations, corresponding to discrete state-space representations for the mRC and OU approaches and to a difference equation for the GL approach. These discrete implementations were evaluated in our simulation environment in terms of accuracy and complexity, as presented in the following sections. The main differences between the approaches lie in the parametrisation processes. For the GL approach, the coefficients in the difference equation are computed directly from the impedance parameters using predefined mathematical relationships, which are introduced in Section 3.3. As illustrated in Figure 2, the other two approaches require an initial approximation of the FO transfer function with an integer-order system, for which a discrete state-space representation can be obtained. The main difference between the mRC and OU approaches is the structure of the integer-order transfer function and the method used for the approximation of the FO transfer function, which are introduced in Sections 3.1 and 3.2, respectively.
In this section we will focus on defining difference equations for the computation of the ZARC voltage v(t) for each one of the mentioned approaches. The resulting expressions have the form given by: Equation (

Approximation 1: Multiple RC Approach
For the approximation of the ZARC element impedance, series connections of multiple parallel RC circuits have been considered in the literature [15]. The values of the components for this kind of approximations are normally fitted from time measurements directly, by minimising the differences between experimental data and the model voltage output. However, for the case in which the initial point is an impedance model, the estimation process requires fitting the impedance spectra. The idea is to approximate the transfer function of the ZARC element with a set of RC parallel elements: In (6), a transfer function representation is used for the impedance, using s as the Laplace complex variable. The approximation of the ZARC impedance Z RC (s) employs a set of n RC RC branches. The parameters R h and C h represent the resistance and capacitance of the h-th RC parallel branch in the approximation of the ZARC impedance presented in (6), accounting for 2n RC parameters to fit.
The values for the resistance and capacitance in (6) can be computed by minimising the difference between the ZARC impedance, given in (3), and the mRC approximation. One method for solving this minimisation problem is presented with detail in Appendix A. This method is employed from this point on during the parametrisation stage of the mRC-based implementations.
Once the values for R h and C h have been fitted, the continuous time response of the mRC circuit can be written in state-space representation: where the states' vector x RC contains the RC elements voltages,ẋ RC represents the states' derivatives and v RC is the approximation of the ZARC voltage using the mRC approach. Additionally, the matrices A RC , B RC , C RC and D RC are n RC × n RC , n RC × 1, 1 × n RC and 1 × 1 matrices, respectively, given by: For the discretisation of this set of equations, the derivatives are approximated using the backward Euler approximation for stability reasons [28]. The obtained set of difference equations can be rewritten and used for estimating the value of the ZARC element voltage in a discrete instant k, v RC [k], as a function of the current i[k] and the RC elements voltages x RC [k]: in which I n RC is the n RC × n RC identity matrix, and T is the sampling period. Equations (13) and (14) can be used for implementing the response of the RC approximation given a current signal and a set of initial values for the RC branch voltages.

Approximation 2: Oustaloup Approach
This approach relies on approximating the transfer function of the CPE in the ZARC element using a transfer function with integer order n OU (the same number of zeros and poles) in a given frequency range. One of the most popular methods for the approximation of the CPE transfer function with a rational transfer function of odd order n OU was presented by Oustaloup et al. [16]. The approximation is valid in the frequency range ω ∈ [ω l , ω h ], where ω l and ω h are the lower and higher frequency limits, respectively. Following this method, the transfer function of the CPE can be rewritten as: where Z OU(CPE) (s) is the integer-order approximation of the CPE impedance using the OU approach; ω c = √ ω l ω h is the central frequency between the bounds of the range of interest; and K CPE and N are given by K CPE = 1 . In order to estimate the n OU zeros ω z(CPE)h and n OU poles ω p(CPE)h in (15), Oustaloup et al. proposed [16]: The transfer function can be used to approximate the frequency response of the CPE. Then, the approximation Z OU (s) of the whole ZARC impedance using the OU approach is: In order to obtain a time representation of the response of this approximation, the transfer function Z OU (s) needs to be rewritten in zero-pole-gain form, as expressed in: where K ZARC , ω zh and ω ph represent the gain, zeros and poles of the Z OU (s) transfer function, respectively. A time-domain state-space representation for the OU approximation with the structure presented in (17) was introduced in [28]: where x OU andẋ OU represent the system states and their derivatives, and v OU is the approximation of the ZARC element voltage. The matrices A OU n OU × n OU , B OU n OU × 1, C OU 1 × n OU and D OU 1 × 1, are given by: Again, the backward Euler approximation was used to discretise the obtained statespace system. This discrete representation is obtained by replacing A RC , B RC , C RC and D RC with A OU , B OU , C OU and D OU in (13) and (14).

Approximation 3: Grünwald-Letnikov Approach
The ZARC element response can be approximated by adopting a FO derivative definition in the time domain. The FO differential equations representing the ZARC voltage can be obtained from transfer function (3) by replacing Z ZARC (s) = V(s)/I(s) and rewriting the equation as: where V(s) and I(s) represent the Laplace transform of the ZARC voltage and current, respectively. Then, by applying inverse Laplace transform, the FO differential equation is rewritten as: D φ 1 represents the derivative of FO φ 1 . Among the multiple definitions of the FO derivative, the GL one is of particular interest, as it allows one to directly obtain difference equations for the approximations of the time response of a FO system [17]. The definition of the considered equation is: where the derivative of FO α of the causal function f (t) is computed between 0 and t.
In (26), T is the sampling period, t T represents the integer part of t/T and ( α h ) represents the Newtonian binomial coefficients generalised to real numbers, computed as: where Γ(·) stands for the gamma function, which works as a generalisation of the factorial operator for real numbers.
It is worth noting that, according to the GL definition in (26), the derivative of order α of the function at time t depends on all the values of that function in [0, t], which is due to the non-local property of fractional derivatives [29].
By fixing the value of T to an appropriately low value for the application, and adopting the discrete variable k instead of the continuous time t, it is possible to obtain the first order discrete approximation of the FO derivative: This approximation may be used to obtain a difference equation for the numerical evaluation of function f [k]. The discrete version also requires all the data points of f [k] since k = 0 for the computation of the derivative approximation, which may imply large memory requirements for simulations using this approach. This drawback may be addressed by applying the short-memory principle reported in reference [17], taking into account the behaviour of the signal in only the recent past, in the interval [k − L, k], where L is the memory length. Applying this principle, we rewrite: This short-memory approximation allows one to implement numerical difference equations in cases in which the required memory is a critical constraint. Obviously, this introduces some inaccuracy, mostly manifested in the form of static error [30].
By replacing (29) in (25), we obtain the difference equation: which allows one to compute the approximation of the ZARC element voltage using the GL approach v GL . For the sake of comparison with the other implementation approaches, (30) can be written in matrix form: where x GL [k] is a L × 1 vector with the L previous values of the ZARC voltage: The matrices C GL and D GL , having size L × 1 and 1 × 1, respectively, are given by: It is worth noting that for the matrix C GL , the coefficients (−1) h ( φ 1 h ) for the previous samples can be precomputed for the implementation of the ZARC voltage.

Accuracy Comparison
Ideally, the data required for the validation of approximations of the responses of FO battery impedance models must consider EIS and pulsed current tests both performed under similar SoC, SoH and temperature conditions. Due to the lack of availability of such data in the known datasets, and in order to perform accuracy comparisons between the analysed approximations, a reference model based on the analytical solution of FO differential equations was utilised for the generation of the reference data.

Reference Data Generation from the Analytical Solution of Fractional Differential Equations
Assuming that the current signal can be written as a set of steps: where u(t) corresponds to the unit step function. Each one of the N u current steps in i(t) is characterised by an amplitude U h and application time t uh . The ZARC element voltage can be expressed as [17]: where the function E α,β is the two-parameter Mittag-Leffler function, defined by a series expansion presented in Appendix B, which also includes a derivation of (36). Equation (36) was implemented in Matlab ® for the generation of the reference data. For the Mittag-Leffler function, the implementation introduced in [31] was employed. It is worth mentioning that such an analytical voltage representation is not suitable for online implementation, due to the limitations imposed by the assumed input signal and to the iterative nature of the Mittag-Leffler function computation, which makes the evaluation of a single data point highly demanding from a computational point of view.

Analysis of the Voltage Approximation Signals
The evaluation of the accuracy of the considered approximations requires one to perform an analysis of the differences between the responses of the reference model and the approximation of interest, for given ZARC element parameters and while using the same input current signal, as illustrated in Figure 3. The test proposed in Figure 3 requires one to define an input current signal, a set of ZARC elements parameters and the order or memory length of the approximations. Tests such as this one were performed for six sets of ZARC element parameters, for currents generated with different sampling and dynamic characteristics and with variations of n RC , n OU and L. In order to generate the input currents and select the ZARC elements to be employed, first, we focused on the typical middle-frequency range of the dynamic response of Li-ion batteries, namely, the range between 0.01 and 200 Hz. This dynamic range is normally associated with the response of the double layer capacitance and the charge transfer resistance [18].
The considered input signals contained two stages: one aimed at evaluating the transient responses of the different approximations, and the second stage was for testing the steady state error. An input signal sample is presented in Figure 4. In this signal, the first stage has a total duration of 200 s, for which the amplitude and duration of each current pulse were selected randomly in the ranges [−1, 1] A and [0.5, 10] s, respectively. The second stage contains one single 0.5 A step with a duration of 500 s, with fixed 150 s rests before and after the step.  The six sets of ZARC parameters we used are presented in Table 1. The ZARC parameters were selected for obtaining characteristic frequencies ω 0 = (1/(R p1 Q 1 )) 1/φ 1 covering the frequency range of interest, with ω 0 = 2π f 0 , while keeping the parameters' values inside typical ranges-namely, R p1 ∈ [0.1, 100] mΩ, Q 1 ∈ [1, 1000] F s φ 1 −1 and φ 1 ∈ [0.5, 0.9] [32,33].   Figure 5a present the reference voltage and the voltages obtained for three mRC-based approximations during the first 20 s of the random stage of the accuracy test. In general, all the implementations were able to approximate the dynamics of the reference signal, with only appreciable differences for the approximation being of the lowest order. The error signals, presented in Figure 7a for this set of implementations, show spikes always under a few hundred µV during all the current steps, which reduce in magnitude as the order increases. Similar results can be observed for the OU-based implementations, as shown in Figure 5b and the first 200 s of the error signal in Figure 7b. The low-order OU approximations resulted in higher error magnitudes than the mRC ones. In the case of the GL approximations, as seen in Figure 5c, the lower L values caused higher offset errors. This is further illustrated by the error signal in Figure 7c during the first 200 s on which the spikes, at least for the lower memory lengths, seem to be wider than those in the mRC and OU approximations. An increase in L led to decreases in the magnitudes of the error signal, showing that adding terms to the sum in (30) leads to a better approximation of the analytical response, as expected. As is shown in the static state results presented in Figure 6a for three mRC-based implementations, increasing the order of the approximation reduced the errors during this stage. A higher value of n RC allowed a better approximation of the distribution of time constants represented by the FO element, leading to an extension of the validity of the approximation over a wider frequency range. Similar considerations apply for the OU approximations, presented in Figure 6b, except for the worse performance at low orders, under nine, with respect to the mRC case. The offset error for the GL approximations is more evident during the static stage of the test, as shown in Figures 6c and 7c. The static error obtained for GL implementations with L under a few thousand for ZARC 4 is considerably higher than the errors obtained for the other approximations. This highlights the main drawback of the GL approximations using the short memory principle: by reducing the number of previous samples that are used for the computation, some level of inaccuracy appears, particularly in static state. For the sake of completeness, it is worth mentioning that Podlubny [17] proposed a relationship for estimating a suitable memory length for the approximation of the FO derivative presented in (28), given an expected error level.

Effects of the Approximation Order and Memory Length on The Accuracy
In order to analyse the effects of the parameters in each implementation approach, namely, n RC , n OU and L, on the approximation accuracy, the mean relative errors during the dynamic and the static stages were used as indicators. For ZARCs 1, 3 and 6, the mean relative errors during the dynamic and the static stages are presented in Figures 8a and 9a, respectively. The very similar results for the other ZARC elements are not reported for the sake of brevity. The error during the static stage of the tests for the RC approximations remained under 1%, even for the approximations with fewer RC branches. This result was expected, as in the fitting procedure adopted in this work (Appendix A), the sum of the resistances in the mRC approximation was set to match the value of R p1 , leading to similar voltage drops in the response after the initial transitory. On the other hand, even if the values of the relative error during the dynamic stage tended to decrease with the number of employed RC elements, considerable improvements were only obtained up to n RC = 9. After that point, further improvements could be achieved by decreasing the value of T. The observed behaviour at the highest orders may be associated with the variability introduced by the fitting procedure required for the computation of the parameters of the mRC case from the ZARC parameters. Nevertheless, for cases over n RC = 5, the mean relative errors were always under 5%.
In the case of the OU-based approximations, the mean relative errors during the dynamic and the static stages are presented in Figures 8b and 9b, respectively. In general, for the OU approximations during the dynamic stage, orders n OU higher than nine are required for reaching average relative errors under 5%. It is worth noting that, compared with the mRC approach, similar average relative errors were achievable in general, but with approximations of higher order. Again, the average relative errors for the static tests were almost always below 1%. For both stages of the accuracy tests, a monotonic reduction in the errors could be observed with increases in the approximation order, highlighting the advantage of computing the integer order approximation of the FO transfer function with a set of predefined equations instead of performing a fitting. This behaviour can be useful when trying to select the approximation order by analysing the accuracy-complexity trade off.
Then, for a set of GL-based approximations, with L values between 5 and 10,000 samples (which correspond to time windows between 0.05 s and 100 s), a similar accuracy analysis was performed. Figures 8c and 9c show the results obtained for the dynamic and static average relative errors obtained for this set of approximations. Regarding the results in the dynamic stage, only the higher memory lengths, over 500 samples, allowed us to reach values in the same order of magnitude as the ones obtained for the other approaches. In the case of the static stage, the average relative error is always about one order for magnitude higher, and it is evident that higher memory lengths or sampling times need to be considered for reducing the static error to a similar range. The errors were higher for the ZARC elements with slower dynamics, showing that slower systems require longer memory lengths to reach an acceptable accuracy level.

Computational Burden Comparison
A battery ECM can be used in an EMS as a part of the BMS state estimation structure or for battery simulation purposes during validation of energy management algorithms, particularly in real-time simulation scenarios. In both cases, considering that normally middle to low-end processing devices are often favoured due to budgetary restrictions, care needs to be taken in regard to the computational requirements of the battery model implementation. Here, we analyse those requirements in a general sense, by addressing the sizes of the matrices and the number of operations for each FOM implementation approach as indicators of required memory and computational complexity, respectively, in an eventual deployment.
For the three approaches, the time implementation relies on a set of matrix additions and multiplications. For mRC and OU-based approaches, the implementations consist of sets of equations in the form of (37) and (5) for the state and output equations, respectively. The discrete state equation established for the mRC approach can be generalised as: where A d and B d , namely, the discrete state and input matrices, are given by: Conversely, the GL-based implementation relies only on a difference equation with the structure of (5), but in which x[k] does not represent the system states vector but a vector with L previous values of the ZARC voltage. Table 2 presents the sizes of the matrices and vectors used in the three approaches. Even if the mRC and OU approaches seem to be equivalents in terms of memory requirements, the simpler structure of the mRC can be exploited for the reduction of its memory requirements. Additionally, even if the number of arrays required for a GL implementation is lower and its size dependency given L seems simpler than those for the matrices in the other approaches, it is worth keeping in mind that in general for a given accuracy level L will take values in the range of hundreds or thousands, while n RC or n OU will be under 20. Table 2. Sizes of the matrices in the state and output equations in the analysed implementations. Table 3 summarises the numbers of additions and multiplications required by each implementation approach. The specific structures of the matrices can be also exploited in the mRC and OU-based implementations, to refine the results presented in Table 3 by skipping the multiplications by zero and expressing the multiplication of column vectors by row vectors full of ones as an addition. The new operations count with this considerations is presented in Table 4. Table 3. Numbers of additions and multiplications required for the analysed implementations. Table 4. Numbers of additions and multiplications with simplifications.

Approach Additions Multiplications Total
Similarly to what was concluded for the array dimensions discussion, the expressions in Table 4 show that for the same order, a mRC implementation will require fewer operations than an OU one. It is worth mentioning that for the GL approach, even if there is not dependence on the square of L in the expressions for the number of operations required, the value of L needs to be considerably higher than the order for the other approaches to reach a given accuracy level.
The number of multiplications required for the evaluation of each type of implementation was used for assessing the computational burden in each case. Figure 10 plots the accuracy against the computational burden in terms of the number of multiplications for ZARC 4. The errors in static and dynamic stages are shown in Figure 10a,b, respectively. The curves for T = 0.01 s in Figure 10a show clearly how for a fixed mean relative error level in the dynamic stage of the accuracy tests, the number of required multiplications is always lower for the mRC approach, followed by the OU one. It is worth mentioning that the three approaches converge to values in the same order of magnitude for the mean relative error when increasing the complexity of the implementation; this may be an effect of the local truncation error due to the discretisation process. The asymptotic values of the analysed errors are comparable for a fixed sampling time. This can be ascribed to the fact that both the backward Euler and the GL derivative approximations are firstorder approximations, leading to an O(T) local truncation error, using big O notation [17]. To show the dependency on the sampling time of the identified error asymptotic values, the accuracy test was repeated using the current signal in Figure 4, but downsampled using T = 0.1 s. Those results are also summarised in Figure 10a, showing how the limit in the mean relative error is reached at a higher value, confirming the relationship between the sampling time and the maximum achievable accuracy.
The results presented in Figure 10b show that an increase in complexity has a more pronounced effect on the accuracy under static conditions, which tracks back to the requirement of higher orders or memory lengths for covering a wider time-constant range in the response approximation. In this case the previously observed oscillatory behaviour for higher orders in the mRC implementations is more evident for the two considered values of T. The effect of the local truncation error due to the discretisation process is also observed in this case, even if for lower values of the mean relative error.
From the results of the accuracy against complexity analysis, it can be clearly observed that the best accuracy-complexity compromise is offered by the mRC approach, allowing one to reach low error levels with a small computational burden. It is worth mentioning that this is the case provided good fitting of the ZARC element in the frequency domain can be performed. This is true for applications in which the model is used for battery simulation, but it is not the case when identification of impedance models from time measurements is required. In such instances, a good relationship between the parameters fitted from time-domain experiments with the frequency response is required. Thus, it is worth checking the suitability of the implementations for the time-domain identification of impedance parameters.

Analysis of the Suitability of Time-Domain Identification of the Battery Impedance
One of the main reasons for adopting battery FOMs is the capability of accurately approximating the voltage response while requiring a low number of parameters, which is of interest for tasks such as state estimation and battery characterisation. For this reason, in order to illustrate the applicability of the considered FOM implementation approaches in the framework of battery model identification using time-domain measurements, a set of time-domain FOM fitting tests were performed.
For the fitting tests, the reference voltage data v[k] correspond to the random stage of the accuracy tests as the reference voltage signals presented in Figure 5. For all the ZARC elements and the implementations considered in the accuracy analysis, the associated parameters were fitted by minimising the mean square error between the reference voltage v[k] and v x [k], which corresponded to v RC [k], v OU [k] or v GL [k] depending on the evaluated approximation. For all cases, the minimisation problem was solved in Matlab ® using the default particle swarm optimisation (PSO) algorithm, implemented by the Matlab ® function "particleswarm". The default PSO algorithm employs a number of particles automatically selected as the minimum between 10 times the number of parameters to be fitted and 100 particles; a function tolerance of 10 −6 ; and a maximum iteration number of 200 times the number of parameters to find [34].
The set of identified parameters changes depending on the approach evaluated. In the case of the GL-based implementations, the three parameters of the ZARC element, namely, R p1 , Q 1 and φ 1 , can directly be identified due to the nature of this implementation, where the time response of the FO element is directly approximated, as presented in Section 3.3. This can be observed in the schematic of the identification procedure presented in Figure 11c, where the parametrisation process takes the identified values of the ZARC parameters as inputs for generating the vectors required for the time-domain implementation. Similarly, for the OU approach, the direct identification of the ZARC element parameters from time measurements is possible due to the direct relationship between R p1 , Q 1 , φ 1 and the poles and zeros of the implemented integer-order transfer function, as introduced in Section 3.2. Figure 11b shows the implementation based on the OU approach, which was not modified for the fitting tests; only the source of the ZARC element parameters' changes, now being generated by the minimisation algorithm.
For the mRC approach, an initial frequency-domain fitting of the FO element impedance is required. For identification using time-domain measurements, this step cannot be performed. The resistance and capacitance values needed to be fit directly, as represented in the flowchart in Figure 11a. On the one hand, for the OU and the GL approaches, the number of parameters to be identified was always 3, independently of the order n OU or memory length L. On the other hand, the number of parameters to identify with the mRC approach increased with the order, being equal to 2n RC . This highlights the main drawback of the mRC approach: when fitting the time response of the FO element, overfitting issues may arise due to the high number of parameters.
For all the fitting tests, the mean of the relative error between the reference voltage and the response of the fitted approximation was computed as an indicator of the goodness of the time-domain fit. Additionally, the indicator of how close the obtained impedance is to the expected one in the range from 0.01 to 20 Hz is the following: Here, δ Z corresponds to the relative distance between the impedance of the fitted approximation, called Z app , and the one of the original ZARC element, Z ZARC .
The results obtained for ZARC 3 are summarised in Figure 12 as a plot of the relative error in time against the one in frequency. Even if relative errors in time under 5% were obtained for multiple instances of each approach, similar results in frequency were only reached for OU and GL approximations. In the case of mRC-based approximations, a good fitting in time is not necessarily translated to a low distance between the approximation impedance and the original one. It is worth mentioning that the minimisation algorithm was not optimised, but despite this, good accordance between the original and approximated impedance was reached for the OU and the GL approximations and not for the mRC case. Similar results were reached for all the other ZARC elements, illustrating how for the mRC approach, the lack of a direct relationship between the approximation parameters-namely, the resistance and capacitance values-and the ZARC impedance parameters reduces the possibility of identifying an approximation in time domain that also has a frequency response close to the real one.
An on-board-oriented implementation of these identification methods should address additional issues. One of them is the noise affecting the current and voltage measurements. Such noise contributes to causing a bias in the identified parameters, which should be compensated for with advanced fitting algorithms, as shown, for instance, in reference [35]. The noise compensation is worthy to be a matter of future study.

Conclusions
In this work, the three main approaches adopted in the literature for the implementation of the time-domain response of battery FOMs were introduced and compared in terms of accuracy, computational requirements and suitability for the time-domain identification of battery impedance. The study was performed in a simulation framework with six different ZARC elements, which are normally used for the approximation of battery impedance in the middle-frequency range. The comparison was performed in a simulation environment where the reference solution was an analytical expression for the response of a ZARC element under a multiple-step current. The proposed expression, obtained using FO calculus theory, was used for generating the reference data required for the accuracy analysis of the considered implementations. Even if the discussion focused on ZARC elements, the results can be extended to the Warburg element and to the total battery impedance.
The primary results of the study can be summarised as follows.

•
In terms of accuracy under static conditions, average relative errors under 0.1% were reached for all the evaluated ZARC elements using the three evaluated approaches. From the computational complexity viewpoint, these results were achieved with the mRC and OU approaches having similar computational requirements, whereas the GL approach often required a number of multiplications two orders of magnitude higher. • In terms of accuracy under dynamic conditions, the mean relative errors converged to values in the same order of magnitude for the three approaches, when increasing the complexity of the implementation. The asymptotic errors were comparable for a fixed sampling time. For instance, the best mean relative error was around 2% using a sampling time of 0.01 s for all the methods. The best accuracy-complexity relationship is offered by the mRC approach. It reached low error levels with the smallest computational burden. This should be the case as long as good fitting of the ZARC element in the frequency domain can be performed. This conclusion does not hold up if the starting point for the ZARC identification is timedomain measurements. In this latter case, the RC parameters may not lead to a correct frequency-domain response, and therefore, the best compromise for identification from time-domain data is represented by the OU approximation, which outperforms GL in terms of computational complexity.
The selection of the FOM implementation method depends on the application requirements. On the one hand, if the interest is only in the battery response simulation, the mRC approach offers the best accuracy-complexity compromise, which is desirable for real-time simulations oriented towards the validation of energy management algorithms. On the other hand, if the application requires accurate identification of the impedance parameters from time-domain measurements, the OU approach offers the best compromise among identifying the impedance model parameters, the complexity and the accuracy requirements.  Then, the values of the capacitors can be estimated using the resistance and the characteristic frequency ω 0 = (1/(R p1 Q 1 )) 1/φ 1 values as follows: While using this method for rewriting the optimisation problem presented in (A1), we can replace the parameters vector for Θ RC = [K 1 , . . . , K M ], reducing the number of unknown parameters from 2M + 2 (the number of resistors plus the number of capacitors) to M. The solution of the optimisation problem presented in (A1), and the set of Equations (A2)-(A7), were implemented in Matlab ® , allowing us to obtain the parameters of the RC circuit that approximate the frequency response of an ideal ZARC element.

Appendix B. ZARC Element-Analytical Voltage Expression
For a ZARC element, the voltage v(t) = L −1 {V(s)} can be computed as [17]: where L −1 {X(s)} is the inverse Laplace transform of X(s), E α,β is the two-parameter Mittag-Leffler function, the symbol * stands for convolution and τ is the integration variable. The two-parameter Mittag-Leffler function is defined by the following series expansion: and it can be seen as a generalisation of the exponential function e t , which can be considered as a particular case of the E α,β (t) function with α = β = 1 [17]. Equation (A8) can be used for computing the voltage response of the ZARC element from the current signal. The main limitation of this solution is that it requires an expression for the current in order to be evaluated. Additionally, this analytical expression is very demanding computationally, as the computation for a given time value requires all the previous values. Simplifications of this analytical expression can be achieved by considering a step current signal i(t) = Uu(t − t u ), where U and t u are the step amplitude and time, and u(t) represents the unit step function. By taking (A8), and using I(s) for the Laplace transform of the current step, it is possible to obtain an expression that does not require the evaluation of an integral for the computation of the ZARC voltage: Using the superposition principle, it is possible to extend these results for current signals composed by combinations of sets of N u step signals, meaning that they can be written as: which is true for inputs such as square or pseudo-random binary sequence signals. If such an input current signal is considered, the resulting voltage signal for the ZARC element is given by: