Quantitative Analysis of Lithium-Ion Battery Capacity Prediction via Adaptive Bathtub-Shaped Function

Batteries are one of the most important components in many mechatronics systems, as they supply power to the systems and their failures may lead to reduced performance or even catastrophic results. Therefore, the prediction analysis of remaining useful life (RUL) of batteries is very important. This paper develops a quantitative approach for battery RUL prediction using an adaptive bathtub-shaped function (ABF). ABF has been utilised to model the normalised battery cycle capacity prognostic curves, which attempt to predict the remaining battery capacity with given historical test data. An artificial fish swarm algorithm method with a variable population size (AFSAVP) is employed as the optimiser for the parameter determination of the ABF curves, in which the fitness function is defined in the form of a coefficient of determination (R2). A 4 x 2 cross-validation (CV) has been devised, and the results show that the method can work valuably for battery health management and battery life prediction.

highly flexible ability of parametric representation and the newly developed high efficient AFSA method with a variable population size (AFSAVP) [20,21]. This paper is organised as follows. Section 1 introduces the background of the quantitative approach for battery remaining useful life and the artificial fish swarm algorithm method. Section 2 introduces the definition of the adaptive bathtub-shaped function. Section 3 describes the method of AFSAVP. Section 4 discusses the modelling of battery capacity prediction. Section 5 defines the fitness function of battery capacity prediction using an index of the mean average precious of the coefficient of determination. Section 6 discusses the parameter determination for the battery capacity prediction using the experimental data. In Section 7, the feasibility of the AFSAVP-driven battery capacity behaviours approach using the adaptive bathtub-shaped function is concluded.

Adaptive Bathtub-Shaped Functions
The ABF was first proposed by Chen [19] to provide a parametric representation of the failure behaviours for universal applications. The ABF has been employed for a complementary metal-oxide-semiconductor (CMOS) life data prediction [20]. In that case, a CMOS device acceleration test was devised, and the quantitative representation of the failure behaviours was well demonstrated, which indicates a flexible parametric performance of the ABF function with the given CMOS experimental data.
As demonstrated in Figure 1, the ABF, λ (x), is defined in Equation (1), where α is the support factor, β is the boundary factor, γ is the internal scale factor, ζ is the shape factor, η is the external scale factor and δ is the shift factor [19,20].
In the case of δ = 0 and η = 1, Equation (1) can be re-written as Equation (2), which is taken as the basic formula of the fitness function definition in Section 5.  [19].

Swarm Fish Algorithm with Variable Population
Inspired by the swarm intelligence of fish schooling behaviours, the AFSA is an artificial intelligent algorithm that simulates the behaviour of an individual artificial fish (AF) and then constructs an AF school. The AFSAVP flow chart in pseudocode is given in Figure 2; similar to the basic AFSA, the AFSAVP includes five steps of operations: (1) behaviour selection; (2) searching behaviour; (3) swarming behaviour; (4) following behaviour; and (5) bulletin and update. Behaviour selection is to select one of the three types behaviours, i.e., searching, swarming and following, according to the parameters of the food density, the number of companion and visual conditions, in which the searching behaviour is taken as the default behaviour.
In the searching behaviour, one AF individual's finite state set is defined as S k = {s 1 , . . . , s M }, k = 1, · · · , M ; M is the total types of states. When the AF is in this behaviour, it moves from the current state, S i stated in Equation (3), to the next state, S j , randomly and updates its state conditions, as stated in Equation (4), where is the food density for this AF, δ is the iterate step and υ is the AF visual constant: In the swarming behaviour, as stated in Equation (5), one AF is swarming with α neighbours within its visual field, in which S c is the central state, c is the food density and η is the crowd factor.
In following behaviour, as stated in Equation (6), one AF updates its state under the condition of food density or moves to searching behaviour.
With the same conditions as Equation (5), the AF updates its state in the highest food density area; otherwise, the AF will go on with the searching behaviour, as expressed in Equation (5). With α AF neighbours around, when the food density reaches the "max" state max , the AF's companions gather to a upper limit.
As described by Equation (7), the bulletin operation compares each AF's current state with its historical state, which will be replaced and updated if the current state is better than the last one.
A "max-generation" is the trial number of an AF school searching for food under given initial conditions, which is one of the widely used criteria for terminating the AFSAVP simulation [21]. Table 1 summarises the batteries test conditions; in this test, the test batteries have a graphite anode and a lithium cobalt oxide cathode verified by electron dispersive spectroscopy, with a rated 0.9 Ah capacity. The tests were accomplished by multiple charge-discharge cycles using an Arbin BT2000 battery test equipment under room temperature [7], and the discharge current was 0.45 A, the batteries' charging and discharging cut-off voltage was 2.5 V , guided by the manufacturer's specification, and the capacity of the tested batteries was assessed by the Coulomb counting method with full charge-discharge cycles. Table 1. Summary of battery test conditions.

A3
Arbin BT2000 20 Figure 3 gives the battery capacity experimental setup, which consists of a set of Lithium-ion battery cases, chargers, loads, data acquisition (DAQ) system, switchers, a computer for control and analysis and some other modules, such as a set of sensors of voltage, current and temperature. As can be seen in Figure 4, there are four groups of the battery capacity raw data (observed data), A3, A5, A8 and A12.  Inspired by the shapes and trends of the raw data curves, the ABF is employed to build a parametric model for the experimental data based on prediction analysis.
Let's define a vector, X j , with the values, {x 1 , x 2 , ..., x i , ..., x n }, as the observed battery capacity data, a vector,X j , with the values, {x 1 ,x 2 , ...,x i , ...x n }, as the estimated battery capacity data, where i = 1, 2, ..., n, j = 1, 2, ..., N , n is the length of the vector, X j , and the population of vectors, X j , as N . The flow chart of the battery capacity prediction analysis is given in Figure 5, in which there are five steps, as described below, Step 1-Normalisation: since the four groups of data are not the same length, all the raw data need to be normalised by scale and shift operations before the next step. The data shift and scale operations are stated in Equations (8) and (9), respectively [22]. The charge-discharge cycles (x-axis, unit: cycle) and the battery capacity (y-axis, unit: Ah) are put through the normalisation.
As given in Equation (8), the scale operation first calculates the scale factor according to the input range, [x min , x max ], of the raw data, x i , and then, all the input data are scaled to the range of [c l , c u ]. That is, The variables are mapped from the practical value range, [x min , x max ], to the normalised value range, [c l , c u ], which are [0, 1] in this context.
In the shift operation, the scaled data, x ic , are shifted to the unit range of [c l , c u ], as given in Equation (9).
Step 2-Training data generation: there are four groups, a k , for the training data generation. Each of the groups is calculated from the mean values of three out of the four raw data, A3, A5, A8 and A12, as stated in Equation (10). Table 2 lists the raw data grouping for each training data generation. The validation data are b k .  Step 3-ABF generation and optimisation: as defined in Equation (1), the ABF, λ (x), was employed to approximate the experimental data by the predicted data,x i , in which four parameters (α, β, ζ and γ) of ABF need to be determined by the AFSAVP.
Step 4-Validation and error analysis: the errors analysis of the estimated battery capacity data,x i , and experimental data, x i , validates the optimisation process.

Fitness Function
In this section, an index of the mean average precious (mAP) of the coefficient of determination (R 2 ) is defined as the fitness to evaluate the optimisation process.
As given in Equation (11), R 2 is a quantity utilised to measure the proportion of total fluctuation in the response trend prediction analysis, and a larger R 2 indicates a closer similarity between the predicted data,x i , and the experimental data, x i [23,24].x i is the mean value of the observed data, x i .
The mAP is the mean of the average precision scores for each vector, X j , as expressed in Equation (12), in which N is the population of the data set and Avg( * ) is the average value of each data sequence.
The fitness function, F , of battery capacity prediction is given in Equation (13).

Simulation Results and Discussions
The simulation results for the AFSAVP-driven hybrid modelling of the battery capacity behaviours are performed by SwarmF ish, which is a toolbox for MATLAB developed by Chen [25]. According to previous research and engineering applications, the parameters for the battery capacity prediction are initialised in Table 3, in which a max generation of 100 is the termination condition of each round test; the total test number is 100; the visual factor is 2.5; the crowd factor is 0.618; the population is 30, in which the non-replaceable, P N , and replaceable population, P R , are 20 and 10, respectively; the try number is five [19,20]; and the ranges of α, β, γ and ζ are [−10,10], [−10,10], [300,500] and [1,6], respectively. shape factor [1,6] As can be observed in Figure 6, the fitness mAP curves of four tests are represented by four types of lines, in which the fitness curves go up very quickly from generation one to 20 to reach a plateau point (about generation 20). Then from generation 20 to 100, the curves keep steady over the rest of the generations and the fitness mAP moves to the convergence. The 4 × 2 cross-validation (CV) is designed to validate the prediction method, in which the experimental data, A3, A5, A8 and A12, are split into two parts, one for training (training samples) and the other for validation (validation sample), as listed in Table 2. Table 4 is the 4 × 2 CV comparison of the four tests with the four groups of data sets for battery capacity prediction in the [0,0.9] normalised cycle range. The mean and standard deviation (MEAN ± STD) of α, β, ζ and γ of the four tests are listed, which indicate the optimised locations of the parameter settings within their initial ranges. error is the absolute error of the normalised battery capacity, between the predicted data and the experimental data of validation. The index of error demonstrates the acceptable errors of the battery capacity prediction using ABF over the optimisation process, in which the error values of the training tests are a little larger than the values of validation. The optimisation processes of Test 1 to Test 4 are demonstrated in Figures 7 to 10, respectively.
As can be observed in Table 4, the different raw data sizes could cause different prediction errors. The mean of validation errors are 8.51% > 8.04% > 7.42% > 5.45%, which indicates the closer the data lengths, the errors of battery capacity prediction could be smaller. Also, as shown in Figure 4, the larger data size provides the better battery capacity prediction results. That is, if the given raw data scale is closer to real battery life time scale, the prediction result is better. Contrarily, small data scale and data size should result in poor predictions.    Table 4, the mean errors (MEAN) are less than 10%, which indicate that this battery capacity prediction method is with acceptable accuracy for practical cases. The results also indicate that the proposed method can handle the raw data with different sizes, which is robust and applicable for field data acquisition system.
To summarise, the results indicate that the developed ABF-based prediction method can be employed to estimate the lithium-ion battery capacity and as a quantitative indicator to assist the users in their real-time applications.

Conclusions and Future Work
In this paper, a newly developed AFSAVP was employed to quantitatively predict battery RUL based on four groups of historical test data. Designed in the form of ABF, the index of mAP has been introduced as the fitness function of R 2 of observed battery data and estimated battery data for the optimisation process. The 4 × 2 cross-validation has been deployed to validate the developed model. Under this approach of battery capacity prediction, the four tests have shown agreement with the experiment results.
Quantitative analysis is always utilised to aid the users in the power sources planning to take good advantage of the available statistical battery data. The ABF formed a prognostic model that can capture the dynamic behaviours of the battery capacity. The contributions of this paper includes consideration of the dynamic behaviours of historical battery capacity, the development of a quantitative prediction analysis and a clear indicator of normalised battery capacity of the battery RUL for decision-making.
In aiming at on-board battery RUL prediction, this added-value approach has potential applications in the protection of battery failure for robotic systems (e.g., exoskeleton, robotic space tethers, humanoid robot and industrial robotics), mobile devices and other systems with electrochemical power sources. In further work, the frameworks of the computational intelligence aided design (CIAD) and computational intelligence aided engineering (CIAE) will be studied, and more computational intelligence (CI) methods, such as genetic algorithms, fuzzy logic method, artificial neural network and swarm algorithms, will be integrated into these frameworks for the recommended solutions of both an optimisation process and a decision process [14,18]. Some environmental factors, such as the ambient temperature, electricity usage per day, autonomy days and depth of discharge limit, should be considered for improved models. Furthermore, accelerated life test (ALT) techniques and small sample methodologies should also be employed to reduce the cost of battery capacity experiments.