HUNGARIAN JOURNAL OF INDUSTRY AND CHEMISTRY Vol. 45(1) pp. 67–71 (2017) hjic.mk.uni-pannon.hu DOI: 10.1515/hjic-2017-0010 INITIAL ELECTRICAL PARAMETER VALIDATION IN LEAD-ACID BATTERY MODEL USED FOR STATE ESTIMATION BENCE CSOMÓS, DÉNES FODOR, * AND GÁBOR KOHLRUSZ Department of Automotive Mechatronics, Institute of Mechanical Engineering, University of Pannonia, Egyetem u. 10., Veszprém, H-8200, HUNGARY The paper presents a current impulse-based excitation method for lead-acid batteries in order to define the ini- tial electrical parameters for model-based online estimators. The presented technique has the capability to track the SoC (State of Charge) of a battery, however, it is not intended to be used for online SoC estimations. The method is based on the battery’s electrical equivalent Randles’ model [1]. Load current impulse excitation was applied to the battery clamps during discharge while the voltage and current was logged. Based on the Randles’ model, a model function and a fit function were implemented and used by exponential regression based on the measured data. The diffusion-related non-linear characteristic of the battery was approximated by a capacitor- like linear voltage function for speed and simplicity. The initial capacitance of this bulk capacitor was estimated by linear regression on measurements recorded in the laboratory. Then, the RC parameters of the equivalent battery model were derived from exponential regression on transients during each current impulse cycle. The battery model with initial RC parameters is suitable for model-based online observers. Keywords: Battery, SoC, Exponential regression, Randles’ model, Load current impulse 1. Introduction In our daily lives, the number of mobile devices and utilities that can operate without grid connections is increasing. Even though lithium batteries possess better performance properties and energy indicators, lead-acid batteries are still cheaper, significantly present in commercial applications and almost fully recyclable. Therefore, any developments in lead-acid battery systems are still of interest. According to Ref. [1], several methods exist to estimate a battery’s State of Charge (SoC) and State of Health (SoH) but model-based prediction is the most widespread because of its reliablity and robustness. Model-based methods, as the name suggests, need a valid, properly detailed electric battery model. The Randles’ model as a standard battery model is very popular in the contexts of lead-acid and lithium-ion batteries because of its cost-effectiveness and the similarities of both types. By similarity it is meant that the same model can be reasonably used for the parameter estimation of both battery types [2-3]. Some additions to the standard Randles’ model can be made if more details in electrochemistry are required such as diffusion in the bulk and porosity amongst others. The model requires values of initial resistance (R) and capacitance (C). The more accurate the initial *Correspondence: fodor@almos.vein.hu parameters of the model, the faster and more reliable the convergence of a model-based predictor to the actual state, that is, the actual SoC. The scope of the present work is to identify the initial values of RC components (parameters) by evaluating the voltage impulse responses excited by load currents in the time domain. 2. Battery model for impulse excitation In this paper, a standard Randles’ model [7-12] was analyzed that consists of charge-transfer resistance, Rct, battery serial resistance, Rs, double-layer capacitance, Cdl, and bulk capacitance, Cb (Fig.1). The voltage references of the capacitors and currents in Fig.1 were set for discharge. Figure 1. Randles’ battery model applied to a discharging battery pack Rct Cdl Cb Udl Ub ibi(t) Uocv(t) Rs ict idl CSOMÓS, FODOR, AND KOHLRUSZ Hungarian Journal of Industry and Chemistry 68 2.1. State-space model and model function By neglecting the intermediate mathematical steps and rearranging the state-space model, the system can be written in the following form: i C C U U RC U U dt d b dl b dl ctdl b dl 1 1 00 0 1 (1) iR U U U s10 01 ocv b dl . (2) By solving the output in Eq.(2) in terms of the time domain using a current impulse as the system input, the output function in Eq.(2) can be expressed by Eq.(3) that can be considered as the model function of the system. This form of the output equation serves as a basis for creating a fit function on measured voltage data and then, derive R and C values from the fit parameters. For clarity, each of the terms of the output equation are grouped by alphabetical letters: DBtAetU t )(ocv (3) where tags A, B and C can be written according to )(ctdl 0 tiRUA (4) t U C ti B 0b b )( (5) )()( cts tiRRD (6) where Uocv is the battery’s open-circuit voltage, is the system’s time constant, t is the measurement time, and i(t) is the impulse load current. Since the proposed method is based on load and relaxation cycles that follow each other during the analysis, Ub0 represents the initial voltage of the bulk capacitor while Udl0 is the initial voltage of the double-layer capacitor at the beginning of each impulse cycle. It should be noted that changes in current during each impulse cycle can be neglected as a result of working in the short time-constant region of the discharge curve, thus the current can be considered as a constant. The battery model shown in Fig.1 is prepared for short-time transient analysis. Even though the model can be used and remains valid for modelling discharge processes that last for several hours, that is, for long- time transients, the accuracy of the model becomes poor under such circumstances. The reason for this is that the battery model presented excludes the diffusion effect that can even be observed by the initial valley-like voltage drop and later as a circle-like voltage response on the long-time discharge voltage curve (Fig.2). Such an exclusion was made because the scope of the current work is to focus on short-time voltage responses to avoid excessive measurement time intervals and computational resources. Consequently, the battery model was optimized for fast SoC detection by short- time battery checks. 2.2. Determining the initial capacity of Cb In Eq.(1), the Ub voltage represents the equilibrium voltage of the battery, therefore, it is related to the battery’s main charge and as a result its SoC. If the battery is excited by small C/10 - C/30 currents, Ub and Uocv can be considered equal. Instead of Ub, Uocv can be measured at the battery terminals. Therefore, the relationship between Uocv and SoC is important and can be determined from laboratory OCV measurements. A small discharge current was applied to the battery terminals under controlled conditions until the battery’s OCV reached the factory’s minimum voltage threshold from a fully charged state. The voltage, current and temperature were logged while the SoC could be calculated by the simple Coulomb-counting method during the process and saved in a lookup table. Then, the lookup table could be used to determine a discrete relationship betwen Uocv and SoC in itself. The Uocv - SoC characterisation method can be extended by the regression on lookup data in order to create a continous Uocv - SoC relationship. A linear function, such as a capacitor-like regression of Uocv - SoC characteristics can be legitimate if the battery’s excitation current is small, i.e. between C/10 and C/15 and is not discharged under 20-25% of SoC. This could be the case when low-power devices are considered as loads. In the case of plain discharge, the SoC changes can be basically tracked by the basis of the B term like in Eq.(5) as conducted in the Coulomb-counting method [1]. In the presented battery model, the B term provides information on the long-term state of the battery and requires initial parameters such as Cb and Ub0. The former represents the battery’s initial capacity, the latter is related to the battery’s initial voltage at the beginning of each impulse cycle. Right before the first current impulse, Ub0 is equal to the battery’s equilibrium voltage since a relaxation time of between 30 minutes and one hour is sufficient for chemical processes to decay. Figure 2. Discharge characteristics of a 15Ah AGM battery excited by different load currents INITIAL ELECTRICAL PARAMETER VALIDATION IN LEAD-ACID BATTERY MODEL 45(1) pp. 67–71 (2017) 69 The initial value of Cb is crucial because it has a strong influence on both the initial voltage drop and the gradient of the long-time discharge voltage curve. In the proposed model, a simplified, that is, capacitor-like formula was used for initial battery capacity estimation so it approximates the battery non-linear discharge characteristic linearly. The introduction of a regression error of a few percent, however, can lead to an easier and faster determination of the initial capacity Cb. The calculation of the battery’s initial capacity was realized according to [4]. The fully charged battery at room temperature needed to be slowly discharged by a C/15 current until its OCV voltage reached the factory recommended minimum voltage threshold. Once the discharge had finished, 2 hours of relaxation had to be observed in order to return the battery back to its almost equilibrium state. Then, a C/15 slow charge had to proceed until the battery’s OCV voltage reached the factory recommended maximum voltage threshold. In both cases, the battery’s OCV voltage, current and temperature were recorded (Fig.3/a). After averaging the discharge and charge-voltage measurements, linear regression was conducted on it according to 0bb b 15/C| )( 1 )( UtQ C tU ocv (7) where Qb(t) can be estimated by Qb(t) = i0 t. Eq.(7) can be identified by the standard form of the linear curve y=mx+b. In Eq.(7), Cb is the battery’s initial capacity, Qb(t) is the actual charge of the battery and Ub0 is the actual voltage of Cb at the beginning of the impulses. By rearranging Eq.(7), Cb can be determined. Even though charge/discharge currents and SoC levels are constrained, the ambient temperature should be controlled as well to provide a constant temperature during the test periods. The value of Cb was calculated as 37766 F at 22°C using C/15 load currents. 3. Exponential regression to derive RC model parameters The evaluation of measurement data and the comparision of measurements and simulations were realized using Matlab. The RC parameters in the model shown in Fig.1 and later in an OrCAD circuit were derived by an exponential regression using an appropriate fit function on the measured voltage data. The regression error between the measured and modelled characteristics can be minimized if the fit function follows the form of the model function, that is, both of them implement similar dynamics and the physical background of the inspected system. Therefore, the fit function can be written as BeAtU t ˆˆ)( ˆocv (8) in a form that is similar to Eq.(3). The hat sign means that the form of Eq.(8) is similar to Eq.(3), but uses a different reference system. When using Eq.(8) attention must be paid to the determination of RC parameters. Eq.(8) gives voltage references with respect to the ground, that is the x-axis, while Eq.(3) yields the references Udl and Us which correspond to Ub. References used by Eqs.(3) and (8) must be matched to derive correct RC parameters (Fig.3/b). It can be seen that Eq.(8) neglects the linear term from Eq.(3). Since the effect of continuous slow discharge of the battery, which is linked to the Cb bulk capacitance in the battery model, possesses a time- constant several orders of magnitude higher than the Cdl-Rct subsystem, it cannot be observed during the short impulse cycles. However, it should be considered during the whole discharge process so Eqs.(3) and (8) need to be used together to estimate the SoC during long-term discharge processes. According to Refs. [5-6], it is practical to evaluate only the discharge component of the voltage responses during every load cycle. This method is also supported by the fact that the dynamic behaviour of the battery for both load and relaxation states can be described by the same battery model since both responses originate from the same battery structure. Because load curves are only needed, the measured voltage should be separated from global data and then, concatenated right after each other. Since voltage data has been prepared in this way, a b Figure 3. (a) Linear regression on the average of C/15 discharge and charge voltage data to derive initial value of Cb. Initial cut-off has been filtered. (b) References of model function and fit function CSOMÓS, FODOR, AND KOHLRUSZ Hungarian Journal of Industry and Chemistry 70 regression can be made during every discharge impulse cycle simultaneously. The relaxation time during each impulse was set to provide enough time for the battery’s double-layer capacitance to almost fully discharge. It is practical because it simplifies Eq.(8) by reducing the effect of the Udl0 term in Eq.(4). The load time was set taking into consideration the time constant of the Cdl - Rct subsystem. According to experiments, it is within the range of 1 - 4s. The calculation method of the term B̂ in (8) is based on the calculation of the limit of the exponential term in Eq.(8). Practical experiments have proven that maintaining a load cycle of 4 in length can speed up and correct the regression. The RC values change during discharge. Due to offline voltage response evaluation, it is not possible to optimise these parameters according to load conditions. Therefore, the average RC values can be used for the whole period of discharge though this introduces a slight misalignment between the measured and modelled voltage characteristics. By applying Eq.(8) on the prepared measurement data, the average RC parameters shown in Table 1 were derived. 4. Model implementation and validation of the impulse excitation method in OrCAD The aim of the OrCAD implementation was to validate the proposed battery model and the applicability of the impulse excitation method for RC parameter determination. The equivalent circuit model shown in Fig.1 was transformed into an electric circuit. The duration of the simulation was set to 1 hour and the time step was equal to the sample time of the real measurement, namely 100 ms. 4.1. Initialization of the OrCAD simulator and RC elements The initial voltages of the capacitors and the proper directions of OrCAD elements should be set carefully. OrCAD uses a reference system of its own that influences the current references of each component. This should be considered while placing an element in the circuit editor and when comparing the electric circuit references to the Randles’ model. The initial voltages of the capacitors, Udl and Ub, were set to describe the battery’s discharge process and thus also follow the voltage references of the Randles’ model, shown in Fig.1. The values of initial capacitor voltages were derived from the chemical background and assumptions. Cdl can be considered fully discharged through Rct after the battery had relaxed (no load) for 2 hours so its initial voltage, Udl, was set to 0. The bulk capacitance of the battery, Cb, reflects the lengthy time constant as well as diffusion-related processes and is related to the main charge storage capability of the battery. If the relaxation time is sufficiently long, the battery reaches an equilibrium state and its OCV becomes equal to Ub. An optimal relaxation time that is sufficiently long was derived from preceding measurements of discharge/charge cycles by applying different load currents and relaxation times. Based on experiments, a relaxation time of 2 hours was applied and as a result the OCV could be considered equal to Ub. Using these assumptions, the initial voltage, Ub, was set to 12.7 V and Udl to 0 V. The introduction of the load current as an impulse excitation can be achieved through a switched power resistor element which is setup in a similar way to the real arrangement (Fig.3/b). The switching routine of the OrCAD element was tuned in accordance with real load-relaxation cycles that were applied to the real testbench. The resistor sets the load current that discharges the battery. During this work, a load current of 3A was used with a load of 5s and relaxation cycles that lasted 10s. All of the initial values are summarized in Table 2. 4.2. Comparing the simulation with the battery model In Fig.4/a, the results of measured and simulated voltage responses are shown. The validity of the model was analyzed by the comparison of measured and simulated voltages. According to the setup, the comparison is performed within a time frame of 5,600 s. The blue curve that represents the simulated data has a longer tail than the red one because filtering needed to be performed on the measured data to cut the initialization process at the beginning of the testbench. The zoomed-in segment shows the fitness of the simulated voltage response. The difference between the curves is relatively small, around 0.05 V to be precise. This error occurred because average RC values were used in the model instead of online tuned ones. Table 2. Initial values of simulation parameters that need to be set before a run Simulation parameter Initial value Simulation step time 100 ms Simulation duration 1 hour Udl0 0 V Ub0 12.7 V Relaxation time / cycles 10 s Load time / cycles 5 s Load current 3 A (with a 4 Ohm load) Table 1. Derived RC values of the battery model from regression Derived parameter name Average value Rct 0.032 Ohm Cdl 92 F Rs 0.056 Ohm SoC after discharge 87.9 % INITIAL ELECTRICAL PARAMETER VALIDATION IN LEAD-ACID BATTERY MODEL 45(1) pp. 67–71 (2017) 71 5. Conclusions This work shows a current impulse-based excitation method that can be used to either track SoC changes during moderate discharge or find proper RC model values for model-based algorithms. The method is founded on an equivalent model-based approach that can implement the dynamic behaviour of a battery without using excessive chemical equations. The technique uses offline analysis of a battery, therefore, it is not able to reasonably track SoC changes in real-time. This technique is not intended to estimate the SoC of batteries by itself, indeed, it estimates good set points for online estimators such as Kalman filters or other model-based observers. The advantages of the presented approach are its rapid nature and simplicity while minimising the error of SoC estimation. The disadvantages of this method are its offline nature and related consequences. This technique could potentially be applied to embedded systems and commercially. 6. Acknowledgement This research was supported by the EFOP-3.6.1-16- 2016-00015 project. The project was supported by the Hungarian Government and co-financed by the European Social Fund. The project was supported by the European Union and co-financed by the European Social Fund (EFOP- 3.6.2-16-2017-00002). REFERENCES [1] Piller, S.; Perrin, M.; Jossen, A.: Methods for state- of-charge determination and their application, Journal of Power Sources, 2001 96(1), 113–120 DOI: 10.1016/S0378-7753(01)00560-2 [2] Spagnol, P.; Rossi, S.; Savaresi, S.M.: Kalman fil- ter SoC estimation for Li-ion batteries, IEEE Inter- national Conference on Control Applications, 28- 30 Sept. 2011, Denver, USA, ISSN 1085-1992 [3] Devarakonda, L.; Wang, H.; Hu, T.: Parameter identification of circuit models for lead-acid batter- ies under non-zero initial conditions, American Control Conference, 4-6 June 2014, Portland, USA [4] Platt, G.L.: Battery modeling, Vol. I., 2015 ISBN-13: 978-1-63081-023-8 [5] Banaei A.; Fahimi B.: Real time condition moni- toring in Li-ion batteries via battery impulse re- sponse, IEEE Vehicle Power and Propulsion Con- ference (VPPC), 1-3 Sept. 2010, Lille, France ISSN 1938-8756 [6] Banaei A.; Khoobroo A.; Fahimi B.: Online detec- tion of terminal voltage in Li-ion batteries via im- pulse response, IEEE Vehicle Power and Propul- sion Conference, 2009. VPPC '09, 7-10 Sept. 2009, Dearborn, USA ISSN 1938-8756 [7] Kularatna, N.: Dynamics and modeling of re- chargeable batteries, IEEE Power Electronics Magazine, 2014 1(4), 23–33 DOI: 10.1109/MPEL.2014.2361264 [8] Lee, Y.-D.; Park, S.-Y.; Han, S.-B.: Online embed- ded impedance measurement using high-power battery charger, IEEE Transactions on Industry Applications, 2015 51(1), 498-508 DOI: 10.1109/TIA.2014.2336979 [9] Kiani, M.: High resolution state of charge estima- tion in electrochemical batteries, Applied Power Electronics Conference and Exposition (APEC), Twenty-Eighth Annual IEEE, 17-21 March 2013, Long Beach, USA [10] Kujundzic, G.; Ileš, Š.; Matuško, J.; Vašak, M.: Optimal charging of valve-regulated lead-acid bat- teries based on model predictive control, Applied Energy, 2017 187 189–202 DOI: 10.1016/j.apenergy.2016.10.139 [11] Bhangu B.S.; Bentley, P.; Stone, D.A.; Bingham C.M.: Observer techniques for estimating the state- of-charge and state-of-health of VRLABs for hy- brid electric vehicles, Vehicle Power and Propul- sion 2005 IEEE Conference, 2005 DOI: 10.1109/VPPC.2005.1554646 [12] Wang, Y.; Fang, H.; Zhou, L.; Wada, T.: Revisit- ing the state-of-charge estimation for lithium-ion batteries, IEEE Control Systems Magazine, 2017 37(4), 73–96 DOI: 10.1109/MCS.2017.2696761 a b Figure 4. (a) Validation of modelled (OrCAD) and measured voltage data in Matlab environment (b) Battery testbench used during the analyzis