Development of a Hybrid Adaptive Neuro-fuzzy Inference System with Coulomb-Counting State-of-Charge Estimator for Lithium–Sulphur Battery

This study presents the development of an improved state of charge (SOC) estimation technique for lithium–sulphur (Li–S) batteries. This is a promising technology with advantages in comparison with the existing lithium-ion (Li-ion) batteries such as lower production cost and higher energy density. In this study, a state-of-the-art Li–S prototype cell is subjected to experimental tests, which are carried out to replicate real-life duty cycles. A system identification technique is then used on the experimental test results to parameterize an equivalent circuit model for the Li–S cell. The identification results demonstrate unique features of the cell’s voltage-SOC and ohmic resistance-SOC curves, in which a large flat region is observed in the middle SOC range. Due to this, voltage and resistance parameters are not sufficient to accurately estimate SOC under various initial conditions. To solve this problem, a forgetting factor recursive least squares (FFRLS) identification technique is used, yielding four parameters which are then used to train an adaptive neuro-fuzzy inference system (ANFIS). The Sugeno-type fuzzy system features four inputs and one output (SOC), totalling 375 rules. Each of the inputs features Gaussian-type membership functions while the output is of a linear type. This network is then combined with the coulomb-counting method to obtain a hybrid estimator that can accurately estimate SOC for a Li–S cell under various conditions with a maximum error of 1.64%, which outperforms the existing methods of Li–S battery SOC estimation.


Introduction
Energy storage systems and their development have been of main concern during the past years as transportation systems make their transition to electric powertrains. For that reason, a remarkable amount of research on different battery technologies have been conducted to improve their reliability, energy density and cycle life, as well as reducing costs associated with their production. One of those technologies is the use of lithium-sulphur (Li-S) batteries. When compared to more conventional technologies such as lithium-ion (Li-ion), some advantages can be seen such as higher energy density, lower cost of materials and improved safety [1,2]. Nevertheless, there are still some drawbacks that are yet to be solved associated with this battery technology such as high self-discharge, short cycle life and poor instantaneous power capabilities [3], which are currently limiting their commercialization [4]. The challenges that come with the use of this type of chemistry have already been outlined [5], with scientific efforts currently being made to improve their chemistry with the goal of reducing said issues [6] , while also studying and improving its cycle life [7][8][9][10]. As an example, some breakthroughs are recently reported in [11], where a combination of optimal chemical and mechanical aspects of the binder chemistry has led to significantly enhanced Li-S batteries with high specific capacity and long cycle life of initial 1629 mAh/g and 1000 cycles, respectively. As such, electrochemical studies for Li-S technologies have been increasing [12] while, in parallel, engineering works are being conducted, which are related to the development of battery management systems (BMS) for Li-S battery. One of the challenges in Li-S BMS development is the complexity of state-of-charge (SOC) estimation, which cannot be performed using the standard approaches developed for Li-ion cells. That is mainly due to the unique shape of Li-S battery's voltage curve versus SOC [13,14].
Different approaches have been developed for battery SOC estimation in the literature. Among them, the most used method, which also serves as benchmark for other techniques, is called 'coulomb-counting' [15]. This method works based on integration of the load current as shown below [15]: where SOC at a certain time t is determined by knowing an initial state of charge SOC 0 at a time t 0 ; c is the cell's coulombic efficiency (non-dimensional), i(t) is the load current (in A -assumed to be positive for discharging) and C t is the cell's total capacity (Ah). A SOC value of 1 is equivalent to a fully charged cell, while a value of 0 represents the opposite condition of a fully depleted battery. Although the coulomb-counting method is useful, it suffers from some limitations too. It is not always possible to have knowledge of conditions of the cell such as its initial state of charge and capacity [14]. Additionally, this method suffers from accumulated errors derived from measurement noise [16,17]. Using this strategy in Li-S cells can give an approximation of SOC behaviour; however, it will only yield accurate results under the ideal conditions in which the initial state of the battery is known. As mentioned before, Li-S cells suffer from high selfdischarge rate, which limits the usefulness of this method, resulting in the need of more robust techniques. One of these alternatives includes the use of look-up tables or polynomials for the cell's parameters, which can then be related to SOC values [18]. For example, the battery's open-circuit voltage (OCV) can be used as an indicator of SOC. However, this method also comes with its corresponding limitations such as different temperature and ageing conditions altering the tabulated SOC values. Subsequently, there will be a need of having knowledge of exact conditions of the cell to cover different variables and scenarios.
Other battery state estimators that have been studied for Li-S cells use Long Short-Term Memory Recurrent Neural Network (LSTM RNN) [19] or Classification Technique [20]. On the other hand, particle filters and Kalman filterbased SOC estimators have already been used widely in the literature, but applied for Li-ion batteries [21,22]. Their working principle is based on the reduction of the error between the measured output of the system and the predicted output from the filter. Thus, an accurate model of the battery is required for such methods to be effective. Another group of advanced battery state estimators use machine learning techniques to extract the required information directly from the measurements (i.e. current, terminal voltage and temperature), or by using an equivalent circuit network (ECN) model, with most of these being based on first-order approaches [23,24]. ECN models have been widely applied for Li-ion battery state estimation [25][26][27]; however, only recently these have been reported to be used for Li-S batteries [20,28,29].
One known technique from the family of machine learning methods is Adaptive Neuro-Fuzzy Inference System (ANFIS) [26,30,31], which has been successfully used for Li-ion battery state of charge estimation [13]. In that previous study, the prediction error minimization (PEM) algorithm was used for Li-S battery model identification, and then ANFIS method was used to estimate SOC based on the identification parameters [13]. The results obtained in that study were reported to achieve a mean error of 4% and maximum error of 7% in Li-S cell's SOC under realistic application scenarios.
In this study, the work, which has been reported in [13], is used as a baseline and then extended by proposing an improved ANFIS estimator for a Li-S cell. The proposed method combines the forgetting factor recursive least squares (FFRLS) algorithm and ANFIS together with the coulomb-counting technique to build a hybrid estimator. Although the individual elements of the proposed hybrid method have been used separately in other studies before, this is the first time that they are combined in one system. In addition to the novelty of the methodology, the application of Li-S cell is also new in comparison with the other battery chemistries. In comparison with the study in [13], where only two parameters (i.e. ohmic resistance R o and open-circuit voltage V oc ) have been used, here four parameters are identified and used for Li-S SOC estimation. This additional complexity aids in covering areas of the SOC curve where V oc and R o are not sufficient to accurately predict it under certain initial conditions. Furthermore, the new parameters have been added by considering a proper trade-off between accuracy and speed in online battery model identification as discussed in [25].
Thus, expanding on that study, an FFRLS model is developed, yielding two additional parameters that are then input into a new improved ANFIS estimator. The baseline ANFIS and the improved one are then simulated under the same conditions and the effectiveness of the proposed method is discussed based on the comparative results. As a summary, the contributions of this study are as follows: • The SOC estimator features a combination not used before of FFRLS and ANFIS, which allows to use four cell parameters to train the ANFIS network. • Using a four-parameter ANFIS estimator allows to accurately calculate SOC under any initial condition without the limitations imposed by the flat V oc characteristic of the Li-S cell. • The results obtained in terms of prediction error are superior to previous studies using ANFIS for a Li-S cell.

Experimental Tests on Li-S Cell
The Li-S prototype cells which are used in this study were provided by OXIS Energy ltd. [32], with the specifications presented in Table 1. As shown in Fig. 1, a cell is placed inside a thermal chamber which controls the temperature at a desired constant value throughout the test. The cell is connected to a power supply, which can also act as a power sink in discharge mode, to apply the desired current load to the cell. The cycle applied to the cells was the Millbrook London Transport Bus Cycle (MLTB) [33], shown in Fig. 2a. The way it was applied is as follows: the cells started at fully charged condition and the cycle from Fig. 2a was repeated until the cell reached its cut-off voltage of 1.9 V, to obtain the complete discharge profile seen in Fig. 2b. As discussed in the literature [20], the MLTB cycle needs a lower range of power due to the idle times and relatively low speeds involved in it, in comparison with other standard drive cycles. Indeed, the most critical feature that is expected in a city bus application is the range or in other words, energy on board, for which the Li-S battery is promising.

Resistance Model Parameter Identification
As mentioned in the Introduction Section, ANFIS method has been already used for Li-S SOC estimation in [13]. In that study, a simple battery model is parameterized, which only considers the open-circuit voltage (V oc ) and the ohmic resistance (R 0 ), as shown in Fig. 3, in which V t is the measured terminal voltage and i L is the load current. To parameterize such a model based on experimental measurements in real time, an identification technique is needed. The goal of this is to minimize the error between the measurement and the model's output by finding the optimum values of V oc and R 0 : whereV t is the estimated value of terminal voltage. If one has a set of measurement data containing current and voltage values: V history ðkÞ ¼ ½Vðk À nÞ Vðk À n À 1Þ Vðk À n À 2Þ :::VðkÞ ð3Þ I history ðkÞ ¼ ½Iðk À nÞ Iðk À n À 1Þ Iðk À n À 2Þ :::IðkÞ ð4Þ where n is the length of the window of values recorded and k is the current time step, it is then possible to develop a set of equations for R 0 and V oc based on obtaining the minimum value of (2). For this, the gradient of the error is obtained and set to zero: where e 1 and e 2 are the orthogonal unit vectors. The work conducted in [25] shows a more detailed deduction of the equations, obtaining the following expressions: Figure 4 shows the parameter identification results obtained using (6) and (7) with the current and voltage data from Fig. 2 (b). The V oc curve is characterized by having a high-gradient zone at high SOCs, then plateauing and maintaining a relatively constant value. On the other hand, the R o curve has a low plateau region in mid-SOCs and high-gradient zones for values higher than 90% and lower than 20% SOC. The behaviour of this curve slightly differs from what was reported in [13], where the R o high-gradient zones covered a wider SOC range. The reason behind that change is related to the difference between the Li-S cells used in the two studies. The cells that were used in the previous one had a capacity of 3.4 Ah while the new cells of this study have a higher capacity of 19 Ah and a lower resistance. The flat regions of both R o and V oc curves at the mid-SOC range cause the system to be less observable. This results in the method having limited accuracy, as it will be shown further ahead. Thus, the need of an improved technique arises, one which yields additional parameters that can improve robustness in SOC estimation. This is an important extension of this study in comparison with the work presented in [13].

RC-Equivalent Circuit Network Model Parameter Identification
In this section, an equivalent circuit network (ECN) model is parametrized using the forgetting factor recursive least squares algorithm (FFRLS). The outputs of this system identification will be the inputs to train the ANFIS network. The ECN model that is used in this case is a first-order Thevenin model [34], as shown in Fig. 5, where V t and V oc are terminal and open-circuit voltages, respectively; R o represents the battery's ohmic resistance, and R p and C p are polarization resistance and capacitance, respectively. By doing circuit analysis, it is possible to derive the following equations which describe the system: where V p is the voltage drop across the polarization capacitance and I L is the load current. By taking the Laplace transform of (9), the following expression is obtained: Thus, the voltage drop across the polarization terms of the circuit can be expressed as: Substituting V p in frequency domain from (11) into (8): The bilinear transform s ¼ 2 T zÀ1 zþ1 is then applied to (12) in order to transfer it from continuous to discrete time domain: Knowing that the shifting property of the z-transform defines x(k) as X(z) and xðk À 1Þ as z À1 XðzÞ, it is possible to obtain an expression that solves for the terminal voltage V t as a function of current signal at a time k, and voltage and current signals from the previous time step k À 1: where the parameters h 1 , h 2 , h 3 and h 4 group the rest of the terms of the RC network as follows: As the context of this study requires real-time identification, a method that can achieve this with relatively low computational effort and convergence time was required. The FFRLS algorithm achieves these needs (as it will be shown further ahead), working by updating the estimates recursively as new data become available [35]. The recursive form is given by: where the parameter vectorĥðkÞ is composed by the variables shown in Eqs. (15)- (18). The input vector is given by: Additionally, K is the Kalman gain, calculated as: where P is the covariance matrix, given by: The constant k is the forgetting factor, it allows to gradually discard older data and give more weight to new one [35]. Equation (19) updates the parameters at each step by reducing the error between the predicted output and the measured one. Once the vectorĥðkÞ is calculated, it is  12): To validate the model, it is possible to compare the measured voltage with its estimated value, using the following expression: By comparing the resulting plots in a close-up view of one cycle, as shown in Fig. 6, where the voltage estimation overlaps the measurement, it can be said that the model behaves as expected. On the other hand, Fig. 7 demonstrates the Thevenin model's identification results for the 19 Ah Li-S cell at 20 C, showing the curves for the two new parameters that will be used to improve the baseline estimator.

Li-S Cell SOC Estimation Using ANFIS
The main idea of the proposed estimation technique is to find an inverse function which can determine the SOC value based on the identified ECN model parameters. In general, each parameter of the ECN model is a function of SOC: where P i is the i-th parameter of the cell model. The parameter P i might depend on the cell's state of health (SOH) and temperature as well. However, as the experimental test was conducted on a fresh cell at a constant temperature, these variables do not have an impact on the cell's parameters in this case. Since the battery parameters can be obtained in real time, the inverse of (28) is more practical. By having a set of ECN model parameters, which are updated regularly, a nonlinear function (i.e. ANFIS) is sought to build the following map between them and the cell's SOC: The ANFIS architecture consists of five layers [36], as shown in Fig. 9. Here, the squares represent adaptive nodes and the circles represent fixed nodes. In the first one, the inputs (R o and V oc in this case) are fuzzified. The second one works as a multiplier yielding as output the firing strengths of each rule. Subsequently, the third layer   normalizes the previous output, resulting in normalized firing strengths. The fourth layer consists of the output membership functions and, finally, the last layer sums the results of the incoming outputs. The output z of this network can be expressed as: where n is the number of inputs, x i are the firing strengths of each rule, x i are the normalized firing strengths and z i ¼ p i x þ q i y þ r i are the membership functions with its tunable parameters p i ,q i and r i .
A diagram of the procedure carried for ANFIS training is depicted in Fig. 8. Schematic of the whole estimation procedure is depicted in Fig. 10 for both the baseline estimator and the improved one proposed in this study. The advantages of using ANFIS as an estimator can be summarized as follows: • It can be applied to different battery types.
• Unlike coulomb-counting, it is not necessary to know the cell's capacity. • Tunability: the different parameters that define ANFIS's structure are easily tunable.
Separate datasets are used for training and testing, which are based on full discharge cycles as the one shown in Fig. 2b. In the following sections, more details of the structure of both the baseline and the improved ANFIS estimators are presented, and their results are discussed.

Hybrid ANFIS Structure for the Ohmic Resistance Model (Baseline Model)
In order to design an ANFIS structure, all the inputs are characterized by defining a number of membership functions (MFs) for each of them. The optimum number of MFs as well as their shape for both of the inputs (i.e. V oc and R o ) was obtained through various iterations to achieve the minimum estimation error. A schematic of the selected baseline ANFIS structure is presented in Fig. 12. The network is built using the fis MATLAB function, which generates a Sugeno-type fuzzy inference system with one linear output. Some of the advantages of using such systems are that they are computationally efficient and work well with optimization, and it is guaranteed that they will  [37]. The algorithm uses a combination of least squares and backpropagation gradient descent methods to model the training dataset [38]. The network is trained using input-output data, from which the corresponding rules are extracted. Table 2 summarizes the characteristics of the baseline ANFIS structure. These final specifications were obtained by carrying different model iterations, varying the type of membership function as well as their respective numbers for each of the inputs. A total of 500 epochs were used in training, with Fig. 11 showing an optimal step size profile where it decreases as number if iterations increase. The reduction in this value shows that once the network is trained, different datasets are used to test the system. As mentioned before, these datasets are obtained from the discharge cycle shown in Fig. 2b. The estimator uses a multi-mode controller and is classified as hybrid due to ANFIS being supported by coulomb-counting. The modes are defined as follows: • Mode 1: in this mode, the estimator uses V oc data as the only input, making use of the high-plateau zone shown in Fig. 10b. Once the V oc value is under a specified threshold (V octhreshold ¼ 2:14V ), the controller switches to the next mode since the voltage remains almost constant and does not contribute to SOC estimation. • Mode 2: Once the open-circuit voltage value is under its threshold, the controller switches from ANFIS to coulomb-counting. In this case, the initial condition is the last value that ANFIS calculates under mode 1. Thus, a smooth transition is obtained between them. This method is required in the mid-SOC region as both V oc and R o present a flat curve as seen from their identification results, thus no useful information for SOC can be obtained from ANFIS in that specific range. • Mode 3: in this mode, the value of R o is used at low SOC range to correct any deviations in coulombcounting results due to cumulative measurement noise. As shown in Fig. 13a, approximately under 20% SOC, the ohmic resistance increases again, which provides useful information for ANFIS. Thus, a threshold for ohmic resistance is defined as R 0threshold ¼ 0:009X and, once the identification values surpass this, with the additional condition of being at low SOCs, the multimode controller switches from mode 2 to mode 3, where ANFIS predominates again.
In both Mode 1 and Mode 3, a hybrid weighted combination of ANFIS and coulomb-counting is used in order to smooth the fluctuations caused by ANFIS predictions and the measurement noise. The mathematical formulation of the hybrid system is as follows: where SOC ANFIS and SOC cc are the estimations using 100% ANFIS and 100% coulomb-counting, while W 1 and W 2 are their weights, respectively. After testing different combinations and the trade-offs involved with increasing each one's weights, the configuration of W 1 ¼ 0:9 and W 2 ¼ 0:1 is chosen for Mode 1 and Mode 3. On the other hand, because ANFIS is as effective in Mode 2, the estimator relies 100% on coulomb-counting (W 1 ¼ 0 and W 2 ¼ 1). Figure 14 shows the SOC estimation results for two different datasets with current and voltage profiles inputs as shown in Fig. 2. The real SOC is derived from the experimental tests and the other two curves represent the baseline ANFIS result (SOC ANFIS ) and the baseline hybrid (i.e. Step size    Fig. 15 Li-S cell SOC estimation using the hybrid baseline estimator at different initial conditions: a 100%, b 80%, c 50%, d 20% below 20%, the controller switches to mode 3, where R 0 is used as the main input of ANFIS. A small fluctuation in the ANFIS estimator can be seen when switching to this mode. However, coulomb-counting weighting prevents the hybrid estimator from adopting this sudden change. It can be seen that the final estimation is in good agreement with the real SOC value. Through this, an average and maximum error of 0.66% and 4.05% are achieved, respectively. It should be mentioned that the maximum error does not take into account the convergence of ANFIS from its default initial condition. As a next step, tests were conducted with the initial state of charge lying in each of the modes to evaluate how the initial condition affects the estimator's performance. In order to replicate a real-life scenario, no voltage, current, or SOC data previous to the starting point are provided to the estimator. It could be argued that it is possible for a battery management system (BMS) to store the last read value of SOC, and use it as initial condition for when the system is started again. However, Li-S cell's SOC might be affected by self-discharge due to internal polysulfide shuttle effect [39], so the previous stored value of SOC is not necessarily reliable. Thus, once the system is started, the first SOC estimation must come from the initial guess and then be corrected by ANFIS. This infers an issue if the initial state of charge lies in mode 2, as the estimation would entirely depend on the initial guess and ANFIS would only be able to correct it until mode 3 is activated. Figure 15 shows the estimation results when starting the baseline estimator from different initial conditions. In each case, the estimation result is compared against the real SOC value. For a fully charged initial condition, the estimation and real values overlap each other, showing an appropriate estimation. However, the fact that ANFIS is active only in modes 1 and 3 is still an issue since coulomb-counting (dominant in mode 2) needs a known initial SOC. As seen in Fig. 15b-d, if the initial SOC lies in mode 2, the estimation in this zone will be shifted depending on the value of the initial condition, which in this case is 40%. It is only when the controller switches to mode 3 that the estimator is able to correct itself. These results show the limitation of using this technique for estimation: although the average and maximum errors are quite low when the system starts at a known state of charge (such as fully charged state), the baseline hybrid estimator is not capable of accurately determining SOC if the initial value lies in mode 2, in which ANFIS is not active due to poor observability in that SOC range. Table 3 compares the estimation errors for each scenario. The relatively high values observed when starting at 80%, 50% and 20% are the reason why a second, more robust identification method and estimator are proposed in this study, with the goal of increasing observability and reducing the estimation error regardless of the initial state of the system. As it was mentioned earlier, the use of V oc and R 0 as parameters to train ANFIS in [13] was effective because the cell had a capacity of 3.4 Ah and a resistance curve with a clearer gradient than the cells of this study. For these new Li-S cells, however, the capacity is much higher, even though the chemistry is the same, which results in a flatter R o curve, subsequently limiting SOC observability. As a result, there is a need for development of a more complex system identification method, which yields additional parameters that can be used to train an ''improved hybrid ANFIS'' structure, which works throughout the complete SOC range.
As presented in the previous section, the baseline estimator uses a resistance-only model, which yields two parameters that are not fully observable throughout the SOC range, resulting in limited prediction capabilities for a 19 Ah Li-S cell. In this section, an improved version of the baseline estimator is proposed by using a more advanced identification method (i.e. FFRLS) together with the Thevenin RC network model. As seen in Fig. 7c, the parameter C p has a useful gradient versus SOC when it is below 70%, approximately. This results in improved observability (compared to the gradient of R 0 that was only significant below 20% SOC). In addition to that, the parameter R p also presents some gradient, although in a shorter SOC range. However, the most useful characteristic obtained from FFRLS is that there is a SOC range in which both V oc and C p have a high gradient. This means that now, throughout the SOC range, there is always at least one parameter with a high gradient. From this, it can be deducted that ANFIS can now be trained in the complete range of SOC and, consequently, the role of the coulomb-counting method in mode 2 will be eliminated too. In other words, the ANFIS network can now work in all three modes, as opposed to the baseline estimator, where it was only active in modes 1 and 3, resulting in decreased accuracy when starting at test in mode 2. It should be said that the combination of coulomb-counting and the improved ANFIS is still suggested because the former can contribute to the smoothness of the estimation results.
With four inputs instead of two, the improved ANFIS structure has more information to build a more robust rule set, and consequently, the SOC estimation results are expected be closer to the real values regardless of the initial SOC. Figure 16 shows the modified ANFIS structure using the additional inputs and their respective membership functions. Having four inputs increases computational time in comparison with the previous model; hence, the number of membership functions of each input is slightly reduced, as well as the number of epochs in order to keep a comparable level of computational effort while improving accuracy. The reduction in number of iterations does not affect the trained model, as seen in Fig. 17, where a converging behaviour is still present. Table 4 shows an overview of the specifications of the improved ANFIS structure, which its use results in a total computation time of 5 min (for 19 hours of input data), in comparison with 2 min, which is the simulation time of the baseline model (for the same length of input data). Step size An additional modification made to the improved estimator is the way the multi-mode controller works. The baseline estimator had three modes where Mode 2 was relying 100% on the coulomb-counting method. For the improved estimator, again three different modes are considered. However, none of them relies entirely on the support from the coulomb-counting method. That is particularly important because now, the improved estimator is able to converge from any given initial condition. The division of the proposed estimator is as follows, with Fig. 18 showing how each zone is used as an input for ANFIS: • Mode 1: As before, uses V oc as the input for ANFIS.
Once the voltage drops below the threshold V oc threshold , the controller switches to mode 2 which works based on the polarization capacitance. • Mode 2: As seen in Fig. 18c, the high-plateau region of C p below 75% SOC is used as the sole input for ANFIS. The data shown in Fig. 18c were filtered, as the raw identification output fluctuates significantly and would affect the final estimation results. This relatively linear result has the advantage of reducing the training and estimation error. • Mode 3: This is the region where the most computational effort is required, using three inputs at the same time: R 0 , R p and C p . By doing so, the predicted SOC value will be more reliable than the case of when only one input is used (such as with the baseline version of the estimator).
Although none of the estimation modes rely entirely on coulomb-counting, each one of them uses a hybrid weighted combination between this technique and the ANFIS estimator, with the goal of smoothing the fluctuations in SOC estimation. Said hybridization is performed using the same approach presented in Eq. (30). Another difference from the baseline hybrid estimator is the way that the weights are applied. Depending on the mode number, the estimator varies the weights given to both coulomb-counting and ANFIS. For example, a greater weighting is given to coulomb-counting whenever the estimator output fluctuates more than a given percentage. The weights in this case are as follows: This gives more relevance to coulomb-counting and aids to maintain the estimation under certain boundaries. Nevertheless, 100% ANFIS predominates throughout the SOC range. The results are shown in Fig. 19 for two different cycles of the same cell, with an initial condition of 40%. Small fluctuations in the estimation are observed around 80% -60% SOC, which are attributed to OCV behaviour from the ANFIS training data, as well as the switching between mode 1 and mode 2, which occurs around said range. Comparing these results with those from Fig. 14, it is also observed that the mid-region of SOC was slightly smoother for the baseline estimator. That can be explained by understanding that the baseline hybrid method relies entirely on coulomb-counting in Mode 2, which results in having a steady decrease in SOC. However, as mentioned earlier, coulomb-counting is not suitable for real-life applications since some drift can be present and it does not work if the initial SOC lies in that region. Even though the fluctuations are slightly greater, the results from the improved hybrid ANFIS structure are more reliable as they are completely based on rules obtained from the experimental data, and it does not rely 100% on coulombcounting results. Having tuned the proposed improved estimator, different tests were carried in the same way as for the baseline model, with the goal of evaluating its behaviour when starting at various initial SOC values. Figure 20 demonstrates Li-S cell SOC estimation results using the improved hybrid ANFIS estimator at different initial conditions. These new results show that the issue from the previous method is not present anymore. Using the improved method, the estimated SOC value always lies on top of the real SOC value regardless of the initial condition. A comparison between the error obtained in these tests with those from the previous estimator is presented in Table 5. As mentioned before, the use of R o and V oc is effective only when the initial SOC lies in Mode 1 (i.e. high voltage). However, when it does not, the error increases significantly, and this is corrected by adding the other two parameters and building a more robust ANFIS structure. According to the results in Table 5, a maximum error of 1.64% in SOC is achieved using the proposed improved estimator under any initial condition.
Using four inputs instead of two for ANFIS allows to carry additional information with regard to the relationship between the battery's dynamic characteristics and its state of charge. In addition to this, since ANFIS is fully connected, if one has n inputs with M membership functions assigned to each, then the network will be composed of N ¼ M n rules [40]. In this case, as shown in Table 4, the number of membership functions is 5,5,3 and 5. Thus: as it is also shown in Table 4. The greater number of rules results in having a significantly increased amount of tunable parameters, which in turn results in a more accurate SOC estimation.

Temperature effect
In this section, a complementary analysis is performed to investigate the effect of temperature on the estimation results. For that purpose, the same MLTB test is conducted at 10 C, 20 C and 30 C by controlling the temperature using the thermal chamber. The proposed improved hybrid estimator is then used to study the effect of temperature. Figure 21 shows the identification results using FFRLS at 10 C, 20 C and 30 C. Although V oc does not vary significantly in response to the temperature change, the rest of the parameters show more sensitivity throughout the whole SOC range. This is particularly important for parameters like C p , which is used for most of the SOC estimation.
These differences indicate that different estimators must be trained if it is desired to cover different temperatures, as the threshold values for each of the parameters will change. In a real application, the BMS reads the temperature of the cells and according to that, it can switch between different estimators to display a more accurate SOC value. Applying that solution, Table 6 presents the SOC estimation errors obtained from separately trained estimators at 10 C, 20 C and 30 C under different initial conditions. The results indicate an acceptable performance by the proposed hybrid ANFIS estimator at different temperatures, being consistently under 6% maximum error.

Conclusions
In this study, a promising battery chemistry, that is Li-S, was investigated with regard to its BMS technology readiness for real-time applications. A previous study on Li-S cell SOC estimation was investigated more deeply, which demonstrated the limitations associated with that existing technique using two parameters (i.e. voltage and resistance of the cell) to determine battery SOC. As a result, the need of developing a more robust estimator was shown based on comparative quantitative results. As a solution to this, an improved hybrid ANFIS model was developed for Li-S cell SOC estimation, showing a significant improvement in comparison with the previous version in the literature as a novelty of this study. Another unique feature of this work is related to the state-of-the-art 19 Ah Li-S cells, which are used here in comparison with the 3.4 Ah cells that were used in the literature. According to the new results, the use of two parameters, V oc and R 0 , to train the ANFIS estimator is not sufficient to achieve an accurate SOC under different initial conditions, even though it works properly from a fully charged state. Therefore, there was a need of taking a different approach and increasing the complexity of the estimator by adding additional parameters with a more robust system identification method. By doing so, it was possible to not only reduce the average and the maximum estimation errors, but also to cover different initial charging conditions without this affecting the convergence rate of the estimator. For the ambient temperature of 20 C, a maximum error of 1.64% was obtained when compared to the reference SOC value derived from the experiments. As a complementary analysis at the end, the effect of temperature was also investigated by conducting similar experiments at 10 C, 20 C and 30 C. Consequently, a switching strategy was proposed to cover a certain range of temperature by training different estimators. The achievement of these results contributes to Li-S battery technology being closer to commercialization. This is due to the development of a robust estimator which can now be compiled and integrated onto a BMS board. Nevertheless, a limitation of this study is the cell-ageing process. In order to consider that, a significant number of additional experiments are required to be able to determine the effect of cell's state of health (SOH) on the SOC estimation accuracy, which is left for future studies. These further experiments could also include testing at additional temperatures to the ones presented in this study, which would allow to cover a greater number of environmental scenarios during vehicle use.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.