Li-ion Battery Modeling and State of Charge Estimation Method Including the Hysteresis E ﬀ ect

: In this paper, a new approach to modeling the hysteresis phenomenon of the open circuit voltage (OCV) of lithium-ion batteries and estimating the battery state of charge (SoC) is presented. A characterization procedure is proposed to identify the battery model parameters, in particular, those related to the hysteresis phenomenon and the transition between charging and discharging conditions. A linearization method is used to obtain a suitable trade-o ﬀ between the model accuracy and a low computational cost, in order to allow the implementation of SoC estimation on common hardware platforms. The proposed characterization procedure and the model e ﬀ ectiveness for SoC estimation are experimentally veriﬁed using a real grid-connected storage system. A mixed algorithm is adopted for SoC estimation, which takes into account both the traditional Coulomb counting method and the developed model. The experimental comparison with the traditional approach and the obtained results show the feasibility of the proposed approach for accurate SoC estimation, even in the presence of low-accuracy measurement transducers.


Introduction
The estimation of battery state of charge (SoC) has been a topic of high interest in recent literature because it allows the available energy in the batteries and that which can still be stored to be identified.Therefore, it is the main indicator of the system state and its knowledge allows the system security level to be increased (avoiding overcharge and over-discharge situations) and the success rate of optimization algorithms oriented to the maximum performance exploitation to be improved [1][2][3].SoC estimation methods are classified in [4] as direct methods (such as open circuit voltage estimation, Coulomb counting, and electrochemical impedance methods) [5][6][7]) and indirect methods (such as those based on artificial intelligence, adaptive filters, and models [8][9][10][11]).In [4], the advantages and disadvantages of the different methods and the related open issues are also analyzed.Among them, the main problems are related to the estimation algorithm's computational cost and not zero-mean error noises, due, for example, to measurement sensors drifting or non-correct modeling of the hysteresis phenomenon.The latter aspect has not been well-investigated in the literature, even though this phenomenon is characteristic of most widespread chemistries, such as LiFePo4 and LiMn [12][13][14][15][16][17][18][19][20][21].Therefore, its correct interpretation is essential for evaluating the battery state.The hysteresis phenomenon in Li-ion batteries was observed from a chemical point of view in [13,14], which gave an explanation of its origin.In [15], a model of the hysteresis phenomenon was presented using the Discrete Preisach Model.It was used to estimate the SoC, allowing the non-linearity of the phenomenon to be accurately modeled.On the other hand, the proposed model has a high computational cost.In [16], a compact and accurate model was proposed in which the hysteresis was modeled as the output of a linear time invariant four-state system with various initial conditions.The method gives good results, but it has a high computational complexity due the accurate tuning of eight parameters that is required.It should be underlined that if, for some chemical batteries, such as Nickel-metal hydride (NiMH) batteries, the hysteresis effect is extremely significant, in Lithium-ion (Li-ion) batteries, it is less relevant, but it cannot be ignored [13,14].This suggests that a simpler approach can be used in order to include the hysteresis model in an online SoC estimation.For this reason, this paper aims to model the hysteresis phenomenon in a simple way, by linearizing the transition phase between the two open circuit voltages (OCVs) (during charge and discharge).The feasibility of the proposed method in an on-line implementation of SoC estimation is verified with experimental tests in a real grid-connected storage system.
The paper proposes a methodology to characterize a single battery.The suggested characterization tests are used to identify the parameters of the battery model and in particular, those related to the hysteresis phenomenon and the transition between charging and discharging conditions.To fulfill this aim, a linearization method is used to guarantee a good compromise between the accuracy and a low computational cost, in order to facilitate its implementation on common hardware platforms, such as those used for intelligent electronic devices for smart grid applications [22,23].Furthermore, since the hysteresis effect causes two different trends in battery charge and discharge conditions, the Li-ion battery model is modified so that it includes two look-up tables and proper modeling of the transition between the charge and discharge condition (and vice versa).Starting from the obtained model, a mixed algorithm is used for SOC estimation, which takes into account both the traditional Coulomb counting method and the developed model itself.It allows good estimation accuracies to be obtained, even when low-accuracy or drifting measurement transducers are used to acquire the current absorbed or supplied by the battery.In fact, it is known that measurement transducers, if not properly calibrated, can be the main source of uncertainty in both ac and dc power system applications [24,25].The model is verified in a real case study of a grid-connected storage system.The proposed estimation algorithm was implemented in a PC-based instrument, which acquired the voltage and current and estimated the battery series' SoC.Experimental tests were performed to verify the proposed method's accuracy and to compare its performances with those of other estimation methods presented in the literature.
The paper is structured as follows: Section 2 presents the proposed procedure for battery characterization and modeling; Section 3 illustrates a case study on Li/Mn batteries and the experimental set-up; Section 4 describes the characterization tests and the results used for model parameter identification; Section 5 reports a model verification test of the battery being tested; Section 6 presents the algorithm employed to estimate the SoC; Section 7 describes the hardware implementation and experimental validation using a real grid-connected storage system; and finally, Section 8 draws the paper's conclusions.

Proposed Procedure for Battery Characterization and Modeling
The battery behavior can be modeled, starting from the first-order circuit Thevenin model shown in Figure 1.This model is widely used in the literature [17][18][19][20], thanks to its low computational cost and the fidelity of its response.The voltages and currents of the model are regulated by the following equations: where U L is the voltage at the battery terminals, I L is the current, and U Th is the voltage drop at the RC group terminals.
Generally, the parameters R Th , C Th , and R 0 vary with SoC, so their behavior has to be emulated through functions.This causes an increase of the computational cost in SoC estimation.In order to limit such a problem, in the proposed approach, the mean values of the three parameters are used, which are obtained between 10% and 100% of SoC.The 10% value is chosen because lower SoC values are normally not used, in order to preserve battery life.
To obtain the model parameters, the characterization procedure consists of only three tests, in order to make a suitable compromise between the execution time, costs, and results.The three tests are as follows: 1.A capacity test, aimed at evaluating the actual battery capacity in Ah and Wh; 2. An impulse charge/discharge test, necessary for quantifying the circuit parameters; 3. A hysteresis test, which is a test cycle employed to model the OCV phenomenon of hysteresis.
As regards the battery OCV (U OC ), the Li-ion battery has two different trends for charge and discharge conditions, because of the hysteresis effect.In order to take into account such an effect, in the proposed method, the model is modified, including two look-up tables and proper modeling of the transition between the charge and discharge condition (and vice versa).
The procedure steps are described in the following subsections, including both model parameter evaluation and charging/discharging transition modeling.In next sections, it is applied to a case study battery to obtain the model parameters and verify the SoC estimation effectiveness.

Capacity Test
The capacity test consists of a constant current charging phase, followed by a constant voltage charging phase.These two phases are used to be sure that the battery is fully charged [26], so the total charging capacity of the battery ( ) is obtained as the sum of the energies used in these two phases, according to the following formula: The voltages and currents of the model are regulated by the following equations: where U L is the voltage at the battery terminals, I L is the current, and U Th is the voltage drop at the RC group terminals.Generally, the parameters R Th , C Th , and R 0 vary with SoC, so their behavior has to be emulated through functions.This causes an increase of the computational cost in SoC estimation.In order to limit such a problem, in the proposed approach, the mean values of the three parameters are used, which are obtained between 10% and 100% of SoC.The 10% value is chosen because lower SoC values are normally not used, in order to preserve battery life.
To obtain the model parameters, the characterization procedure consists of only three tests, in order to make a suitable compromise between the execution time, costs, and results.The three tests are as follows: 1.
A capacity test, aimed at evaluating the actual battery capacity in Ah and Wh; 2.
An impulse charge/discharge test, necessary for quantifying the circuit parameters; 3.
A hysteresis test, which is a test cycle employed to model the OCV phenomenon of hysteresis.
As regards the battery OCV (U OC ), the Li-ion battery has two different trends for charge and discharge conditions, because of the hysteresis effect.In order to take into account such an effect, in the proposed method, the model is modified, including two look-up tables and proper modeling of the transition between the charge and discharge condition (and vice versa).
The procedure steps are described in the following subsections, including both model parameter evaluation and charging/discharging transition modeling.In next sections, it is applied to a case study battery to obtain the model parameters and verify the SoC estimation effectiveness.

Capacity Test
The capacity test consists of a constant current charging phase, followed by a constant voltage charging phase.These two phases are used to be sure that the battery is fully charged [26], so the total charging capacity of the battery (C tot-charge ) is obtained as the sum of the energies used in these two phases, according to the following formula: where C CC-charge is the capacity measured during the constant current charging phase and C CV-charge is the capacity measured during the constant voltage charging phase.Similarly, to obtain the total discharging capacity, a constant current discharge phase is carried out, followed by a constant voltage discharge phase.The energy required to discharge the battery (C tot-discharge ) is obtained as the sum of the energies used in these two phases, according to the following formulas: where C CC-discharge and C CV-discharge are the capacities measured during the constant current and voltage phases, respectively.
The ratio between discharging and charging capacities determines the battery's efficiency: and In the equations above, the energy capacities are expressed in Ah (for amperometric efficiency) and Wh (for energy efficiency), respectively.

Impulse Charge/Discharge Test
The test is divided into two stages.The first stage starts with a total capacity charge.Then, a sequence of discharging phases is carried out.Each discharging phase is performed with a constant current.The phase duration is the time required to discharge the battery to 10% of its total capacity C tot−discharge .The amplitude of the test current is chosen as a compromise between the desired accuracy of the model parameter evaluation and the duration of each phase.In fact, in order to have the maximum accuracy in resistance measurement, the current value must be as high as possible.However, this would limit the time duration of the step and it may not be compatible with the battery time constant (typically hundreds of seconds for electrochemical batteries).
Each discharging phase is followed by a rest phase.The duration of this rest phase is chosen so that it is equal to several times the battery time constant.This ensures that the voltage measured at the end of each rest phase can be assumed as its steady state value, i.e., the OCV.In this way, at the end of the test, the OCV characteristic (OCV vs. SoC) can be drawn.This OCV trend is characteristic of the discharging condition.By repeating the impulse test procedure with charging phases, the OCV trend in a charging condition is obtained.
The current and voltage samples are measured in the test and they are used to obtain the OCV at different SoC values, which are calculated as follows: In the equation above, SoC(t) is the SoC value at the t interval, SoC(0) is the initial SoC value, i(t) is the current at the t interval, and C n is the total capacity equal to C tot-discharge .
The remaining circuit parameters (R 0 R Th , C Th ) can be found by processing the pulse test data in the following way.As already mentioned, R 0 models the voltage drop that occurs at battery terminals when switching between a load and no-load operation, and can be determined as follows: where ∆V 0 is the difference between the load voltage and open circuit voltage measured in the instants immediately following the step from the load to no-load operation and ∆I is the related current step.
As regards R Th and C Th , the RC group models the transient voltage trend and the additional voltage drop that occurs at battery terminals after a sufficiently long time.
The resistance R Th is calculated as follows: where ∆V 1 is the additional voltage variation at battery terminals during the phase with zero current (rest phase), which is measured as the difference between the voltage after 1 s of the current step and the voltage at the end of the rest phase.
Finally, the capacitance C Th can be calculated by observing the time constant of the system τ: where t 1 and t 0 are the initial and final time instants of the rest phases, respectively, and V(t1) and V(t0) are the voltages at instants t 1 and t 0 , respectively.
Once the time constant of the circuit has been determined, the capacitance C th is obtained as Starting from the obtained values of the circuit parameters, the model of Figure 1 can be modified by using the average values related to different SoC values.The transition between the two OCVs can be modeled using a coefficient (lambda) that varies instantaneously, depending on whether the current is flowing into or out of the battery.This coefficient is then used to linearize the transition between charging and discharging OCV curves.Therefore, the U OC value can be calculated as follows: where U oc_charge and U oc_discharge are the U oc values on OCV charge and OCV discharge curves, respectively, for a given SoC value (see Figure 2).As regards RTh and CTh, the RC group models the transient voltage trend and the additional voltage drop that occurs at battery terminals after a sufficiently long time.
The resistance is calculated as follows: where Δ is the additional voltage variation at battery terminals during the phase with zero current (rest phase), which is measured as the difference between the voltage after 1 s of the current step and the voltage at the end of the rest phase.
Finally, the capacitance can be calculated by observing the time constant of the system : where and are the initial and final time instants of the rest phases, respectively, and ( 1) and ( 0) are the voltages at instants and , respectively.
Once the time constant of the circuit has been determined, the capacitance is obtained as Starting from the obtained values of the circuit parameters, the model of Figure 1 can be modified by using the average values related to different SoC values.The transition between the two OCVs can be modeled using a coefficient (lambda) that varies instantaneously, depending on whether the current is flowing into or out of the battery.This coefficient is then used to linearize the transition between charging and discharging OCV curves.Therefore, the UOC value can be calculated as follows: where U oc_charge and U oc_discharge are the U oc values on OCV charge and OCV discharge curves, respectively, for a given SoC value (see Figure 2).

Hysteresis Test
The proposed test consists of a sequence of several charge and discharge phases, alternating with some rest phases, where the voltage at battery terminals is evaluated.
In detail, the transition between OCV charge and discharge can be evaluated by performing decreasing deep discharges, which allows the saturation value beyond which there is a certain passage to OCV discharge to be evaluated.Once this value is found, it is assumed that the same value is obtained for the reverse procedure and that the process is linearized during intermediate phases between the two OCVs.For example, the test sequence in the case study herein presented consisted of 17 phases (charging, rest, discharging, rest, and so on; see Section 4).
To further improve the model's accuracy, the values of the previous test can be used to identify a logical scheme that allows one to discriminate among OCV curves (charging, discharging, or

Hysteresis Test
The proposed test consists of a sequence of several charge and discharge phases, alternating with some rest phases, where the voltage at battery terminals is evaluated.
In detail, the transition between OCV charge and discharge can be evaluated by performing decreasing deep discharges, which allows the saturation value beyond which there is a certain passage to OCV discharge to be evaluated.Once this value is found, it is assumed that the same value is Electronics 2019, 8, 1324 6 of 20 obtained for the reverse procedure and that the process is linearized during intermediate phases between the two OCVs.For example, the test sequence in the case study herein presented consisted of 17 phases (charging, rest, discharging, rest, and so on; see Section 4).
To further improve the model's accuracy, the values of the previous test can be used to identify a logical scheme that allows one to discriminate among OCV curves (charging, discharging, or intermediate phase).The scheme is shown in Figure 3.It shows how the lambda parameter depends on both the direction of the current and also an integrator (saturated at the value of 1), according to a coefficient of proportionality K.The greater K or the measured current are, the faster the transition is from one curve to another.on both the direction of the current and also an integrator (saturated at the value of 1), according to a coefficient of proportionality K.The greater K or the measured current are, the faster the transition is from one curve to another.

Case Study and Experimental Set-Up
To verify the proposed procedure and model, a battery composed of 6 Li/Mn cells connected in series was used as a case study.It is shown in Figure 4.The tests were carried out in an "Angelantoni Discovery 340L" climatic chamber at a temperature of 25 °C.An "Arbin Instruments EVTS-X" system was used to perform charging and discharging cycles on the battery.The Arbin cycler is able to impose charging and discharging cycles with a constant current, voltage, or power.The battery voltage was acquired at each second with an Agilent 34410A multi-meter.The current was acquired with an LEM PR30 or an Agilent N7281A current clamp, depending on the maximum current value of the test, i.e., 20 or 150 A, respectively.The current clamp was connected to a GDM-8342 multi-meter.The instrumentation-rated data are shown in Table 1.The experimental set-up schematic is shown in Figure 5.

Case Study and Experimental Set-Up
To verify the proposed procedure and model, a battery composed of 6 Li/Mn cells connected in series was used as a case study.It is shown in Figure 4. on both the direction of the current and also an integrator (saturated at the value of 1), according to a coefficient of proportionality K.The greater K or the measured current are, the faster the transition is from one curve to another.

Case Study and Experimental Set-Up
To verify the proposed procedure and model, a battery composed of 6 Li/Mn cells connected in series was used as a case study.It is shown in Figure 4.The tests were carried out in an "Angelantoni Discovery 340L" climatic chamber at a temperature of 25 °C.An "Arbin Instruments EVTS-X" system was used to perform charging and discharging cycles on the battery.The Arbin cycler is able to impose charging and discharging cycles with a constant current, voltage, or power.The battery voltage was acquired at each second with an Agilent 34410A multi-meter.The current was acquired with an LEM PR30 or an Agilent N7281A current clamp, depending on the maximum current value of the test, i.e., 20 or 150 A, respectively.The current clamp was connected to a GDM-8342 multi-meter.The instrumentation-rated data are shown in Table 1.The experimental set-up schematic is shown in Figure 5.The tests were carried out in an "Angelantoni Discovery 340L" climatic chamber at a temperature of 25 • C.An "Arbin Instruments EVTS-X" system was used to perform charging and discharging cycles on the battery.The Arbin cycler is able to impose charging and discharging cycles with a constant current, voltage, or power.The battery voltage was acquired at each second with an Agilent 34410A multi-meter.The current was acquired with an LEM PR30 or an Agilent N7281A current clamp, depending on the maximum current value of the test, i.e., 20 or 150 A, respectively.The current clamp was connected to a GDM-8342 multi-meter.The instrumentation-rated data are shown in Table 1.The experimental set-up schematic is shown in Figure 5.
temperature of 25 °C.An "Arbin Instruments EVTS-X" system was used to perform charging and discharging cycles on the battery.The Arbin cycler is able to impose charging and discharging cycles with a constant current, voltage, or power.The battery voltage was acquired at each second with an Agilent 34410A multi-meter.The current was acquired with an LEM PR30 or an Agilent N7281A current clamp, depending on the maximum current value of the test, i.e., 20 or 150 A, respectively.The current clamp was connected to a GDM-8342 multi-meter.The instrumentation-rated data are shown in Table 1.The experimental set-up schematic is shown in Figure 5.

Characterization Tests
The test procedure described in Section 2 was applied to the case study battery of Section 3, in order to obtain the model parameters.The results of each test are reported in the following subsections, where the charging/discharging transition modeling is also described in detail.

Results of the Capacity Test
The current and voltage measured during the capacity tests are shown in Figure 6.
The test procedure described in Section 2 was applied to the case study battery of Section 3, in order to obtain the model parameters.The results of each test are reported in the following subsections, where the charging/discharging transition modeling is also described in detail.

Results of the Capacity Test
The current and voltage measured during the capacity tests are shown in Figure 6.The energy capacities obtained both in Ah and Wh are summarized in Table 2. From the test results, it can be seen that the battery used in the test has an amperometric efficiency of η A = 0.98 and an energy efficiency of η E = 0.75.

Results of the Impulse Charge/Discharge Test
As described in Section 2, the test starts with a total capacity charge.Then, a sequence of discharging phases is carried out.In the case under study, each discharging phase was performed at a constant current of 30 A. The phase duration was the time required to discharge the battery of 10% (7.1 Ah) of its total capacity C tot−discharge (i.e., 71.4 Ah, see Table 2).Each discharging phase was followed by a rest phase of one hour.The current and voltage samples measured in the test are shown in Figure 7. Current negative values correspond to discharging phases and voltage reduction, while current positive values correspond to charging phases and a consequent voltage increase.These data were used to draw the OCV characteristic (OCV vs. SoC), according to Equation (6).
a constant current of 30 A. The phase duration was the time required to discharge the battery of 10% (7.1 Ah) of its total capacity (i.e., 71.4 Ah, see Table 2).Each discharging phase was followed by a rest phase of one hour.The current and voltage samples measured in the test are shown in Figure 7. Current negative values correspond to discharging phases and voltage reduction, while current positive values correspond to charging phases and a consequent voltage increase.These data were used to draw the OCV characteristic (OCV vs. SoC), according to Equation (6).The OCV curves obtained in charge and discharge conditions are shown in Figure 8.The difference between these two curves provides evidence for the hysteresis behavior of this type of battery.The OCV curves obtained in charge and discharge conditions are shown in Figure 8.The difference between these two curves provides evidence for the hysteresis behavior of this type of battery.The circuit parameters, , , , and were obtained according to Equations ( 7)- (10).The results are shown in Figures 9-12.As can be seen, the variability of and is small and it is comparable with the measurement uncertainty.On the other hand, a higher variability of τ and was found for low SoC values.This is due to the higher variability of the voltage measured in the final steps of discharge phases.The circuit parameters, R 0 , R Th , τ, and C Th were obtained according to Equations ( 7)- (10).The results are shown in Figures 9-12.As can be seen, the variability of R 0 and R Th is small and it is comparable with the measurement uncertainty.On the other hand, a higher variability of τ and C Th was found for low SoC values.This is due to the higher variability of the voltage measured in the final steps of discharge phases.
The circuit parameters, , , , and were obtained according to Equations ( 7)- (10).The results are shown in Figures 9-12.As can be seen, the variability of and is small and it is comparable with the measurement uncertainty.On the other hand, a higher variability of τ and was found for low SoC values.This is due to the higher variability of the voltage measured in the final steps of discharge phases.results are shown in Figures 9-12.As can be seen, the variability of and is small and it is comparable with the measurement uncertainty.On the other hand, a higher variability of τ and was found for low SoC values.This is due to the higher variability of the voltage measured in the final steps of discharge phases.Table 3 shows the voltage drops used in formulas ( 7) and ( 8), during both charging and discharge phases.2, the battery output voltage was obtained and it was compared with the voltage values experimentally measured during the test.The results obtained are shown in the following figures.Figure 13 shows the comparison of the measured battery voltage and the model output voltage (calculated with the input current shown in Figure 6).Figure 14 shows the difference between the measured and model output voltages.It can be observed that the largest differences are near the Table 3 shows the voltage drops used in formulas ( 7) and ( 8), during both charging and discharge phases.By using the circuit parameter values shown in the previous graphs and the Simulink model of Figure 2, the battery output voltage was obtained and it was compared with the voltage values experimentally measured during the test.The results obtained are shown in the following figures.Figure 13 shows the comparison of the measured battery voltage and the model output voltage (calculated with the input current shown in Figure 6).Figure 14 shows the difference between the measured and model output voltages.It can be observed that the largest differences are near the lowest SoC values (less than 10% of SoC).Generally, such values are not used, in order to preserve battery life.However, in all cases, the differences do not exceed 0.5 V. lowest SoC values (less than 10% of SoC).Generally, such values are not used, in order to preserve battery life.However, in all cases, the differences do not exceed 0.5 V.

Results of the Hysteresis Test
The phase sequence identified for the test described in Section 2.3 is the following (Figure 15):

Results of the Hysteresis Test
The phase sequence identified for the test described in Section 2.3 is the following (Figure 15): A level of 40% of SoC was chosen because it is a representative working point where a significant difference is observed between charging and discharging OCV curves (see Figure 8).The other charging and discharging percentages were chosen to obtain gradually decreasing variations of SoC and corresponding OCV.By using the profile of Figure 15 as the input of the model, the hysteresis effect was taken into account by considering the instantaneous passage between the two OCV curves of Figure 8, depending on the charging or discharging phases.The results are shown in Figure 16.It can be seen that the difference between the measured and simulated profiles becomes more marked when the discharges become less deep.A level of 40% of SoC was chosen because it is a representative working point where a significant difference is observed between charging and discharging OCV curves (see Figure 8).The other charging and discharging percentages were chosen to obtain gradually decreasing variations of SoC and corresponding OCV.
By using the profile of Figure 15 as the input of the model, the hysteresis effect was taken into account by considering the instantaneous passage between the two OCV curves of Figure 8, depending on the charging or discharging phases.The results are shown in Figure 16.It can be seen that the difference between the measured and simulated profiles becomes more marked when the discharges become less deep.By using the profile of Figure 15 as the input of the model, the hysteresis effect was taken into account by considering the instantaneous passage between the two OCV curves of Figure 8, depending on the charging or discharging phases.The results are shown in Figure 16.It can be seen that the difference between the measured and simulated profiles becomes more marked when the discharges become less deep.On the other hand, considering the enhanced model, where the lambda parameter and its variations are taken into account, the results shown in Figure 17 were obtained.In this case, a significantly smaller difference can be observed between the modeled and measured voltage.On the other hand, considering the enhanced model, where the lambda parameter and its variations are taken into account, the results shown in Figure 17 were obtained.In this case, a significantly smaller difference can be observed between the modeled and measured voltage.

Model Experimental Verification
To verify the model effectiveness in an unconventional test, a work cycle was performed.This consisted of the following charge and discharge phases at constant power, with rest phases not exceeding one minute: 1. 1800 W discharge phase; 2. 30 s rest phase; 3. Discharge phase at 1200 W; 4. 30 s rest phase; 5. Charge phase at 900 W; 6. Discharge phase at 300 W.
The obtained results are reported in Figure 18 and

Model Experimental Verification
To verify the model effectiveness in an unconventional test, a work cycle was performed.This consisted of the charge and discharge phases at constant power, with rest phases not exceeding one minute: 1. 1800 W discharge phase; 2. 30 s rest phase; 3.
Discharge phase at 300 W.
The obtained results are reported in Figures 18 and 19.It can be seen how, although the model makes use of the average values of the results of the characterization tests previously obtained, the difference between the measured and model output voltages does not exceed 250 mV.
The obtained results are reported in Figure 18 and Figure 19.It can be seen how, although the model makes use of the average values of the results of the characterization tests previously obtained, the difference between the measured and model output voltages does not exceed 250 mV.

Mixed Algorithm for SoC Estimation: Real Application.
Once the tests on the single six-cell module were completed, further experiments were carried out to test the model in a real application and to verify the advantages of its use.In the experimental setup, the tested module was connected in series with another seven modules of the same type; the system was connected to the network via a DC/AC inverter and a step-up transformer (see Figure 20) [27].From the model's point of view, this means connecting eight circuit models in series, according to the basic rules of electrical engineering.Two multimeters and a current probe were used to simultaneously acquire the voltage and current (see Figure 21).The previously proposed model was used to estimate the battery SoC in real-time, by using a virtual instrument in the LabVIEW environment.

Mixed Algorithm for SoC Estimation: Real Application
Once the tests on the single six-cell module were completed, further experiments were carried out to test the model in a real application and to verify the advantages of its use.In the experimental setup, the tested module was connected in series with another seven modules of the same type; the system was connected to the network via a DC/AC inverter and a step-up transformer (see Figure 20) [27].From the model's point of view, this means connecting eight circuit models in series, according to the basic rules of electrical engineering.Two multimeters and a current probe were used to simultaneously acquire the voltage and current (see Figure 21).The previously proposed model was used to estimate the battery SoC in real-time, by using a virtual instrument in the LabVIEW environment.
Different approaches to estimating SoC can be found in the literature [28][29][30].Two of them are the Coulomb counting (CC) and mixed algorithms (MA) methods.In this work, a mixed algorithm is used, which combines the use of the model with the CC method.
system was connected to the network via a DC/AC inverter and a step-up transformer (see Figure 20) [27].From the model's point of view, this means connecting eight circuit models in series, according to the basic rules of electrical engineering.Two multimeters and a current probe were used to simultaneously acquire the voltage and current (see Figure 21).The previously proposed model was used to estimate the battery SoC in real-time, by using a virtual instrument in the LabVIEW environment.system was connected to the network via a DC/AC inverter and a step-up transformer (see Figure 20) [27].From the model's point of view, this means connecting eight circuit models in series, according to the basic rules of electrical engineering.Two multimeters and a current probe were used to simultaneously acquire the voltage and current (see Figure 21).The previously proposed model was used to estimate the battery SoC in real-time, by using a virtual instrument in the LabVIEW environment.The method block diagram is shown in Figure 22.The voltage measured at battery terminals is compared with the model output voltage.This last value is obtained from I L measurement and the current SoC.The greater the deviation is between the real and estimated SoC, the greater the resulting error is.This error is then integrated by choosing Ts equal to the sampling interval, 0.5 s, and K as a proportionality constant.In parallel to this process, the SoC is obtained with the CC method and the result is added to the previous data.In this way, it is also possible to choose the weight to give to the two methods by varying the K value.Therefore, the weight choice depends on the accuracy of model and measurement systems.The more accurate the model is, the higher the value of K is.On the contrary, a low accuracy of the model results in a lower value of K, thus giving more weight to the Coulomb counting method.In the case tested, the optimum value of the weight was found iteratively by minimizing the error between the estimated and measured values.
It should be noted that the CC method is sensitive to the initial SoC value and the uncertainty of the current probe, while the SoC estimation based on the model is more sensitive to the uncertainty of the model itself [28].Therefore, by combining the two methods, the aforesaid disadvantages can be balanced.
As already mentioned, the CC method mainly requires knowledge of the current measurement, as well as the voltage measured at battery terminals, in order to allow correct initialization.Regarding this, to take into account the influence of measurement transducers on SoC estimation, different current measurements were made, by using current transducers with different adjustments.This allowed the effect of transducer drifting, which can affect the SoC estimation, to be evaluated.The obtained results are reported in the following; two cases are reported, with a calibrated (high-accuracy) and uncalibrated (low-accuracy) transducer.The results obtained using the mixed algorithm were also analysed (the current was acquired through the low-accuracy probe), to demonstrate how MA results are less sensitive to measurement errors.contrary, a low accuracy of the model results in a lower value of K, thus giving more weight to the Coulomb counting method.In the case tested, the optimum value of the weight was found iteratively by minimizing the error between the estimated and measured values.
It should be noted that the CC method is sensitive to the initial SoC value and the uncertainty of the current probe, while the SoC estimation based on the model is more sensitive to the uncertainty of the model itself [28].Therefore, by combining the two methods, the aforesaid disadvantages can be balanced.As already mentioned, the CC method mainly requires knowledge of the current measurement, as well as the voltage measured at battery terminals, in order to allow correct initialization.Regarding this, to take into account the influence of measurement transducers on SoC estimation, different current measurements were made, by using current transducers with different adjustments.This allowed the effect of transducer drifting, which can affect the SoC estimation, to be evaluated.The obtained results are reported in the following; two cases are reported, with a calibrated (highaccuracy) and uncalibrated (low-accuracy) transducer.The results obtained using the mixed algorithm were also analysed (the current was acquired through the low-accuracy probe), to demonstrate how MA results are less sensitive to measurement errors.

Test for SoC Estimation in Grid-Connected Energy Storage System
The test was aimed at verifying the performances of the whole storage system in a real case, where batteries were continuatively used (with subsequent charging and discharging cycles).The system was observed in an 8-hour real working cycle.The exchanged power measured in the test is shown in Figure 23.It can be seen that only one rest phase (with no exchanged power) occurred during the real working cycle.The voltage was measured during the whole cycle.Figure 24 reports

Test for SoC Estimation in Grid-Connected Energy Storage System
The test was aimed at verifying the performances of the whole storage system in a real case, where batteries were continuatively used (with subsequent charging and discharging cycles).The system was observed in an 8-hour real working cycle.The exchanged power measured in the test is shown in Figure 23.It can be seen that only one rest phase (with no exchanged power) occurred during the real working cycle.The voltage was measured during the whole cycle.Figure 24 reports the comparison between the measured and estimated voltage values.As can be seen, the model accurately estimates the voltage.On the other hand, its value can be considered equal to the OCV only after the aforementioned rest phase, at the beginning and end of the test.Consequently, the actual SoC values are only available in these three points, as highlighted in the figures.Figure 25 shows the results of SoC estimation, which were obtained by using the proposed methods (CC and MA).The figure shows that the CC method is strongly affected by the offset error due to the clamp; in fact, the whole curve has on offset with respect to the curve obtained by using a high-accuracy probe.However, in comparison with the curves obtained with the MA method, for both CC curves, the error is very high.As regards the MA curves, only one of them was obtained, including the OCV hysteresis phenomenon, in the model.Figure 25 shows the results of SoC estimation, which were obtained by using the proposed methods (CC and MA).The figure shows that the CC method is strongly affected by the offset error due to the clamp; in fact, the whole curve has on offset with respect to the curve obtained by using a high-accuracy probe.However, in comparison with the curves obtained with the MA method, for both CC curves, the error is very high.As regards the MA curves, only one of them was obtained, including the OCV hysteresis phenomenon, in the model.
To evaluate which of the curves shown in Figure 25 is the closest to the real SoC, it is necessary to compare the measured and estimated voltages at battery terminals when the battery is not delivering current, i.e., at the starting time, at the end of the fourth hour, and at the end of the cycle.Unlike the CC method, with the MA method, there is no need to initialize the algorithm, because the estimator autonomously moves to the correct value by measuring the terminal's voltage.To demonstrate this, it is sufficient to note that at the initial instant, the SoC value coincides in all cases.At the end of the fourth hour, both MA curves (yellow and black in Figure 25) are close to the real SoC value and the error is small (a few percent).On the other hand, at the end of the cycle, the differences are noteworthy because, as expected, the non-hysteresis model does not consider the OCV during discharge, so during the final discharge phase, it leads to an unacceptable error; on the

Conclusions
In this paper, a new approach is presented to model the OCV hysteresis phenomenon of lithiumion batteries and to estimate the battery SoC.A characterization procedure is proposed to determine the battery model parameters, taking into account both the hysteresis phenomenon and the consequent change in the transition between charging and discharging conditions.
The proposed procedure and the model effectiveness for SoC estimation were experimentally verified with a real grid-connected storage system.The recommended algorithm for SoC estimation is a mixed algorithm, which makes use of both the traditional Coulomb counting method and the proposed battery model.This allows the sensitivity of SoC estimation to be reduced to zero-mean errors due to drift of the current probes, improving the SoC estimation accuracy.The experimental results confirm the feasibility of the proposed method, which allows a good trade-off between computational costs and the SoC estimation accuracy to be obtained, and the possibility of implementing the SoC estimator on commercial hardware platforms.
It should be underlined that the battery characterization procedure and the experimental tests were performed at a fixed temperature.This allowed the reliability of the proposed model, whose aim is the correct evaluation of the hysteresis phenomenon and the accurate estimation of SoC, to be verified.In the hypothesis of a constant ambient working temperature, the proposed model has given good results, as demonstrated in the experimental tests.On the other hand, since the model parameters can be temperature-dependent, for more complete modeling of the battery, the proposed procedure should be repeated at different temperatures of the cell, characterizing the parameter variability with temperature.The obtained functions or look-up tables could then be used to obtain the parameter values at the temperature measured in the working condition.To evaluate which of the curves shown in Figure 25 is the closest to the real SoC, it is necessary to compare the measured and estimated voltages at battery terminals when the battery is not delivering current, i.e., at the starting time, at the end of the fourth hour, and at the end of the cycle.Unlike the CC method, with the MA method, there is no need to initialize the algorithm, because the estimator autonomously moves to the correct value by measuring the terminal's voltage.To demonstrate this, it is sufficient to note that at the initial instant, the SoC value coincides in all cases.At the end of the fourth hour, both MA curves (yellow and black in Figure 25) are close to the real SoC value and the error is small (a few percent).On the other hand, at the end of the cycle, the differences are noteworthy because, as expected, the non-hysteresis model does not consider the OCV during discharge, so during the final discharge phase, it leads to an unacceptable error; on the contrary, the model including the OCV hysteresis provides results with an error of less than 2% (Figure 25).

Conclusions
In this paper, a new approach is presented to model the OCV hysteresis phenomenon of lithium-ion batteries and to estimate the battery SoC.A characterization procedure is proposed to determine the battery model parameters, taking into account both the hysteresis phenomenon and the consequent change in the transition between charging and discharging conditions.
The proposed procedure and the model effectiveness for SoC estimation were experimentally verified with a real grid-connected storage system.The recommended algorithm for SoC estimation is a mixed algorithm, which makes use of both the traditional Coulomb counting method and the proposed battery model.This allows the sensitivity of SoC estimation to be reduced to zero-mean errors due to drift of the current probes, improving the SoC estimation accuracy.The experimental results confirm the feasibility of the proposed method, which allows a good trade-off between computational costs and the SoC estimation accuracy to be obtained, and the possibility of implementing the SoC estimator on commercial hardware platforms.
It should be underlined that the battery characterization procedure and the experimental tests were performed at a fixed temperature.This allowed the reliability of the proposed model, whose aim is the correct evaluation of the hysteresis phenomenon and the accurate estimation of SoC, to be verified.In the hypothesis of a constant ambient working temperature, the proposed model has given good results, as demonstrated in the experimental tests.On the other hand, since the model parameters can be temperature-dependent, for more complete modeling of the battery, the proposed procedure should be repeated at different temperatures of the cell, characterizing the parameter variability with temperature.The obtained functions or look-up tables could then be used to obtain the parameter values at the temperature measured in the working condition.

Figure 1 .
Figure 1.First-order Thevenin model.In this model, the voltage generator U OC represents the open circuit voltage (OCV) of the battery at different SoC levels, the resistance R 0 models the voltage drop that occurs in the transition between no-load and load conditions, and the RC group (R Th and C Th ) models the exponential transient phenomena.The voltages and currents of the model are regulated by the following equations:

Figure 1 .
Figure 1.First-order Thevenin model.In this model, the voltage generator U OC represents the open circuit voltage (OCV) of the battery at different SoC levels, the resistance R 0 models the voltage drop that occurs in the transition between no-load and load conditions, and the RC group (R Th and C Th ) models the exponential transient phenomena.The voltages and currents of the model are regulated by the following equations:

Figure 2 .
Figure 2. Model of the battery module (implemented in the Matlab/Simulink environment).

Figure 2 .
Figure 2. Model of the battery module (implemented in the Matlab/Simulink environment).

Figure 5 .
Figure 5. Schematic of the experimental set-up.

Figure 5 .
Figure 5. Schematic of the experimental set-up.

Figure 4 .
Figure 4. Test module of Li/Mn.The rated parameters of the battery module are as follows: • Minimum terminal voltage of 16.2 V (2.7 V per cell); • Maximum terminal voltage of 25.2 V (4.2 V per cell); • Rated terminal voltage of 22 V; • Rated capacity of 75 Ah (1.75 kWh).

Figure 5 .
Figure 5. Schematic of the experimental set-up.

Figure 5 .
Figure 5. Schematic of the experimental set-up.

Figure 6 .
Figure 6.Battery current and voltage measured during the capacity test.Figure 6. Battery current and voltage measured during the capacity test.

Figure 6 .
Figure 6.Battery current and voltage measured during the capacity test.Figure 6. Battery current and voltage measured during the capacity test.

Figure 7 .
Figure 7. Current and voltage measured in the impulse test.

Figure 7 .
Figure 7. Current and voltage measured in the impulse test.

Figure 8 .
Figure 8. Open circuit voltage measured in the charging and discharging impulse test.

Figure 9 .
Figure 9. R0 at different values of state of charge (SoC).

Figure 8 .
Figure 8. Open circuit voltage measured in the charging and discharging impulse test.

Figure 9 .
Figure 9. R0 at different values of state of charge (SoC).

Figure 10 .
Figure 10.Rth at different values of SoC.

Figure 9 .
Figure 9. R 0 at different values of state of charge (SoC).

Figure 9 .
Figure 9. R0 at different values of state of charge (SoC).

Figure 10 .
Figure 10.Rth at different values of SoC.

Figure 11 .
Figure 11.τ at different values of SoC.

Figure 11 .
Figure 11.τ at different values of SoC.

Figure 11 .
Figure 11.τ at different values of SoC.

Figure 12 .
Figure 12.at different values of SoC.

Figure 12 .
Figure 12.C th at different values of SoC.

Figure 14 .
Figure 14.Difference between measured and simulated voltage.

Figure 14 .
Figure 14.Difference between measured and simulated voltage.

Figure 15 .
Figure 15.Scheduling of the test for hysteresis modeling.

Figure 15 .
Figure 15.Scheduling of the test for hysteresis modeling.

Figure 15 .
Figure 15.Scheduling of the test for hysteresis modeling.

Figure 19 .
It can be seen how, although the model makes use of the average values of the results of the characterization tests previously obtained, the difference between the measured and model output voltages does not exceed 250 mV.

Figure 18 .
Figure 18.Measured voltage and simulated voltage.Figure 18. Measured voltage and simulated voltage.

Figure 18 .
Figure 18.Measured voltage and simulated voltage.Figure 18. Measured voltage and simulated voltage.

Figure 19 .
Figure 19.Difference between the measured voltage and simulated voltage.

Figure 19 .
Figure 19.Difference between the measured voltage and simulated voltage.

Figure 21 .
Figure 21.Picture of the current probe and the two multi-meters connected to the battery series.

Figure 21 .
Figure 21.Picture of the current probe and the two multi-meters connected to the battery series.Figure 21.Picture of the current probe and the two multi-meters connected to the battery series.

Figure 21 .
Figure 21.Picture of the current probe and the two multi-meters connected to the battery series.Figure 21.Picture of the current probe and the two multi-meters connected to the battery series.
the measured and estimated voltage values.As can be seen, the model accurately estimates the voltage.On the other hand, its value can be considered equal to the OCV only after the aforementioned rest phase, at the beginning and end of the test.Consequently, the actual SoC values are only available in these three points, as highlighted in the figures.

Figure 23 .
Figure 23.Test for algorithm evaluation.Figure 23.Test for algorithm evaluation.

Figure 23 .
Figure 23.Test for algorithm evaluation.Figure 23.Test for algorithm evaluation.

Figure 25 .
Figure 25.Comparison of the different SoC estimation methods (* stands for measurement point).

Figure 25 .
Figure 25.Comparison of the different SoC estimation methods (* stands for measurement point).

Table 1 .
Instrumentation used in the experimental set-up.

Table 1 .
Instrumentation used in the experimental set-up.

Table 1 .
Instrumentation used in the experimental set-up.

Table 2 .
Capacity test results.
Voltage drops used for R0 calculation [V] (discharge phase) 0.153 0.153 0.164 0.159 0.147 0.164 0.153 0.170 0.164 0.221 Voltage drops used for RTh calculation [V] (discharge phase) By using the circuit parameter values shown in the previous graphs and the Simulink model of Figure

drops ∆V 0 used for R 0 calculation [V] (discharge phase)
Voltage drops ∆V 1 used for R Th calculation [V] (discharge phase)