J. Mechatron. Electr. Power Veh. Technol 06 (2015) 31–38 Journal of Mechatronics, Electrical Power, and Vehicular Technology e-ISSN:2088-6985 p-ISSN: 2087-3379 www.mevjournal.com © 2015 RCEPM - LIPI All rights reserved. Open access under CC BY-NC-SA license. Accreditation Number: 633/AU/P2MI-LIPI/03/2015. doi: 10.14203/j.mev.2015.v6.31-38 PREDICTION MODEL OF BATTERY STATE OF CHARGE AND CONTROL PARAMETER OPTIMIZATION FOR ELECTRIC VEHICLE Bambang Wahono a, *, Kristian Ismail a , Harutoshi Ogai b a Research Centre for Electrical Power and Mechatronics, Indonesian Institute of Sciences Jl. Sangkuriang Komplek LIPI Gedung 20 Lantai 2 Bandung, 40135, Indonesia b Graduate School of Information, Production and Systems, Waseda University 2-7 Hibikino, Wakamatsu-ku, Kitakyushu, Fukuoka 808-0135, Japan Received 9 September 2014; received in revised form 23 February 2015; accepted 2 March 2015 Published online 30 July 2015 Abstract This paper presents the construction of a battery state of charge (SOC) prediction model and the optimization method of the said model to appropriately control the number of parameters in compliance with the SOC as the battery output objectives. Research Centre for Electrical Power and Mechatronics, Indonesian Institute of Sciences has tested its electric vehicle research prototype on the road, monitoring its voltage, current, temperature, time, vehicle velocity, motor speed, and SOC during the operation. Using this experimental data, the prediction model of battery SOC was built. Stepwise method considering multicollinearity was able to efficiently develops the battery prediction model that describes the multiple control parameters in relation to the characteristic values such as SOC. It was demonstrated that particle swarm optimization (PSO) succesfully and efficiently calculated optimal control parameters to optimize evaluation item such as SOC based on the model. Keywords: SOC; stepwise method; multicollinearity; electric vehicle; particle swarm optimization. I. INTRODUCTION Rising crude oil price and worldwide awareness of environmental issues have resulted in increased development of energy storage systems and electric vehicle (EV), which are essential for energy saving and environment protection [1]. Batteries get widely used in the electric car or hybrid power system. State of charge (SOC) estimation is a fundamental challenge for battery use. The SOC of a battery, which is used to describe its remaining capacity, is a very important parameter for a control strategy [2]. There are several methods to estimate battery SOC. In this paper, direct measurement is used to estimate the battery SOC. Direct measurement method refers to some physical battery properties like terminal voltage, current, and temperature. There are two kinds of direct measurement methods which are open circuit voltage and terminal voltage. Open circuit voltage method is a method where voltage is not connected to any load in a circuit. This voltage has a linear relationship to the SOC but this condition only occurs on lead-acid battery [3]. Because the relation between open circuit voltage and SOC differs among batteries there is a problem in this relationship. To estimate SOC accurately, it should be measured with terminal voltage method. Terminal voltage method is based on the terminal voltage drops from internal impedances when the battery is discharging, so the electromotive force (EMF) of battery is proportional to the terminal voltage. Since the EMF of battery is approximately proportionally linear to the SOC, the terminal voltage of battery is also approximately linear proportional to the SOC [4]. The terminal voltage method has been employed at different discharge currents and temperatures [4]. In this paper direct measurement was done using terminal voltage method. The advantages of this method are: it can be applied to any battery type with any discharger current profile, it * Corresponding Author. Phone: +62-22-2503055 Fax. +6222-2504773 E-mail: bambangwahono80@ yahoo.co.id, bamb053@lipi.go.id B. Wahono et al. / J. Mechatron. Electr. Power Veh. Technol 06 (2015) 31–38 32 offers low complexity of the algorithm, and it can be used as a real-time electro-analysis tool for battery diagnosis [5]. Although some physical battery properties as control parameters were used to estimate the battery SOC, a method which improves the performance of battery is required. This paper presents a construction of a battery SOC prediction model and an optimization method of the model to control the number of control parameters appropriately in accordance with the SOC as the battery output objectives. SOC is an important parameter for estimating residual capacity of the battery. An accurate SOC estimation can enhance the performance of the battery and increase the security of the electric vehicle. Stepwise method considering multicollinearity was applied to construct the polynomial battery model that describes the multiple control parameters in relation to the characteristic values such as SOC. In order to improve the performance of battery, particle swarm optimization (PSO) was applied in this prediction model. PSO was applied to calculate optimal battery control parameters and optimize evaluation item such as SOC based on the model. II. CONSTRUCTION OF THE MODEL USING STEPWISE METHOD A. Stepwise Method Some battery properties can be used to estimate the value of the battery SOC. However, a new method is needed in order to improve the efficiency and performance of the battery. The better the estimation of SOC the higher the battery performance will be. One method which can be used to estimate the SOC battery is stepwise method. In this study, stepwise method considering multicollinearity was applied to build battery SOC model. To enable the construction of a good mathematical model, stepwise method employs the addition and subtraction of variables taken from a multi linear model considering their importance level in regression [6]. This method uses statistical method to remove the pleonastic variables. In this research, good model was obtained using a method that enables less variable inputs and less computation. This method actually can choose the most significant variables to be incorporated in model construction. Stepwise method is a combination of backward elimination and forward selection. Backward elimination method works by issuing one by one independent variable that is not significant and carrying it out continuously until no insignificant variables left. On the contrary, forward selection method starts from zero variables (empty model), then one by one variable input is added until certain criteria are met. The first variable inputted in stepwise method is one that has the highest correlation and significance. Variables entered next is one with the highest partial correlation and still significant. After certain variables entered into the model, other variables in the model are evaluated. If there is a variable that is not significant, the variable will be removed. B. Construction of Mathematical Model Based on the experiment data 1x - 7x as control parameters (input) and 1y that represents the characteristic value of the optimization objective (output), the mathematical model was built using stepwise method. This model represents the value of a response variable as a multilinear function of one or more independent variables in 1 st order and 2 nd order: i p i iii p ji jiij p i iii exxxxy    1 2 1 0  (1) where 𝑦𝑖 is response variable in observation x , o  is coefficient constant, i  is coefficient of the ix variable, ij is coefficient of the ix and jx variable, ii is coefficient of the 2 nd order ix variable, p is total number of variables, and ie is error term. The model in equation (1) was estimated by least squares method, which yields parameters estimate such that the sum of squares of errors is minimized. In order to select a clause effectively in presumption, one explaining variable redefines about all the 2 nd order respectively. For example, 1u redefines 2 1x and 2u redefines 21 xx . Thus, the polynomial model selects the combination of an explaining variable effectively in presumption to be constituted by the stepwise method afterward. The resulting prediction equation is:    p i iii p ji jiij p i iii xxxxy 1 2 1 0 ˆˆˆˆˆ  (2) where the variables are defined as in Equation (1) except that “^” denotes estimated values. The error term in equation (1) is unknown because the B. Wahono et al. / J. Mechatron. Electr. Power Veh. Technol 06 (2015) 31–38 33 true model is unknown. Once the model has been estimated, the regression residuals are defined as: iii yye ˆˆ  (3) where iy is the observed value of response in observations i and iŷ is the predicted value of response in observation i . Then, the sum of squared residuals (SSE) equation is:    n i ieSSE 1 2 ˆ (4) where n is the number of observations. The sum of squared regression (SSR) equation is:    n i ii yySSR 1 2 )ˆ( (5) where iy is the mean of the iy values. The sum of squared total (SST) equation is:    n i ii yySSRSSESST 1 2 )( (6) SST SSE R  1 2 (7) )1/( /   pnSSE pSSR F (8) where F is the statistic value. The correlation coefficient R indicates the matching level of the calculation data by the regression equation and the original data, the result is better when R is closer to 1. Statistic values indicate the significance of the regression equation, whose values comply F distribution. C. Multicollinearity The procedure of the stepwise method generally has three steps. First, an initial regression model is determined. Second, the procedure is repeated until produces a good model by adding and removing the corresponding variable in accordance with the F -test [7]. Third, the search is stopped when the response variables that meet the stepping criterion are no longer exist, or when the step of iteration has reached a specified maximum number. The flowchart of the stepwise method is shown in Figure 1. Stepwise is one method to solve a case of multicollinearity, a condition where there is a strong correlation between independent variables. Multicollinearity does not cancel the model in terms that the estimation value of the equation may still be good as long as the estimations are based on combinations of independent variables within the same multivariate space used to calibrate the equation. One of negative effects of multicollinearity is the values of the individual regression coefficients may change radically by adding or removing independent variable in the equation. The variance inflation factor (VIF) is a statistic factor used to identify multicollinearity case in a matrix of independent variables [8]. It is used to mention the effect of multicollinearity on the variance of estimated regression coefficients. Multicollinearity depends not only on the bivariate correlation between pairs of independent variable, but also on the multivariate predictability of any one variable from other variables. Finally, the VIF is based on the multiple correlation coefficients of each variable in multivariate regression on all the other variables: 2 1 1 R VIF   (9) III. PARTICLE SWARM OPTIMIZATION A. Particle Swarm Optimization Technique The battery SOC prediction model which was built by stepwise method was not optimized yet. In this paper, PSO was applied to the prediction model to calculate optimal battery control parameters and optimize SOC based on the model. PSO is one of the optimization methods inspired by the behavior of herd animals such as fish movement (school of fish), herbivore animals (herd), and birds (flock) where each animal object is simplified into a particle. A particle in space has a position that is encoded as a vector coordinates. This position vector is considered as a state of being occupied by a particle in the search space. Each position in the search space is an alternative solution that can be evaluated using the objective function. Each particle moves with a specific velocity. The PSO characteristic is the particle velocity regulated heuristically and probabilistically. If a particle has a constant speed then the position of a particle visualized trail will form a straight line. With the external factors that distort the line which moves the particle in the search space it is expected that the particles can lead, approach, and ultimately achieve optimal point. External factors mean, among others, the best position ever visited by the particle, the best position throughout the particles (each particle is assumed to know the best position of every other particles), and the factor of creativity to explore. B. Wahono et al. / J. Mechatron. Electr. Power Veh. Technol 06 (2015) 31–38 34 First described by James Kennedy and Russell C. Eberhart in 1995 [9], PSO is similar to the genetic algorithm (GA), since it randomly generates a population of solutions. However, PSO still differs from GA in three aspects. First, it randomly initializes velocities for the first loop. Second, solutions are named as “particles” which are restricted with a search space [10]. The search Figure 1. Model-building procedure of stepwise regression (Adopted from [11]) B. Wahono et al. / J. Mechatron. Electr. Power Veh. Technol 06 (2015) 31–38 35 points are known as particles, indicated as particles positions and velocities with certain dimensions. Third, a particle regulates its velocity according to the best position of its own experience and the global best position of all particles in each iteration [12, 13]. B. The Basic Algorithm of PSO Here is the analogy of PSO mimicking animal herd: a random group of birds looking for food in an area. In this area, there is only a piece of food that will be searched. In each iteration of PSO, the whole group of birds does not know where the food is but they know the food distance. So, what is the best strategy to find this food? One effective way to find this food is by following the bird closer to the food [14]. PSO algorithm has two main operators: velocity update and position update. The procedure of PSO algorithm is as follows: first, define a set of random particles N (each particle represents a possible solution to the optimization problem). Second, establish the position of each particle j in iteration i   iX j and the velocity of each particle   iV j . Third, calculate the value of each particle objective function f   iX j based on formula and model that have been determined in accordance with the optimization problem. Fourth, for each particle, compare the value of objective function f   iX j with the best value has been achieved jbestP , (local best) if f   iX j < jbestP , then jbestP , will be replaced with f   iX j . Fifth, for each particle, compare the value of objective function f   iX j with the best value achieved in the population bestG (global best). If f   iX j < bestG , to bestG , then replace bestG with f   iX j . Sixth, based on the similarities in step 4 and 5, velocity   ijV and the position of the particle   iX j will change. The formula of velocity change is   ijV :           NjiXGrc iXPrciwViV jbest jjbestjj ,...,2,1;1 11 22 ,11   (10) where w is called the inertia weight; this value is usually a linear decreasing value from 0.9 to 0.4. The acceleration constants 1c and 2c are the cognitive (individual) and social (group) learning rates respectively, and 1r and 2r are uniformly distributed random numbers in the range 0 and 1. The parameters 1c and 2c denote the relative importance of the memory (position) of the particle itself to the memory (position) of the swarm. The values of 1c and 2c are usually assumed to be two so that 11rc and 22 rc ensure that the particles would overfly the target about half of the time. The formula of position change is   ijX :       NjiViXiX jjj ,...,2,1;1  (11) Finally, check the convergence of the final condition. If the final condition of all particles position has been converged (the maximum iteration or looping value has reached the optimum value) then the iteration stops. If this condition is not reached then step 3 is repeated. IV. EXPERIMENT Research Centre for Electrical Power and Mechatronics has built test vehicle which is able to monitor several parameters like voltage, current, velocity, temperature, and SOC [15]. The monitored data will be stored and displayed on board computer. Components layout and graphic user interface (GUI) are shown in Figure 2 and 3. The control parameters are set in Table 1 and the optimization objectives are listed in Table 2. The number of experiment data used to create the model is 202 data and number of experiment data used to test the model is 60 data. Figure 2. Components layout Figure 3. GUI from onboard computer B. Wahono et al. / J. Mechatron. Electr. Power Veh. Technol 06 (2015) 31–38 36 V. RESULT AND DISCUSSION A. Prediction and Experiment Result of SOC Model The results of the predicted value and experiment value of SOC employing stepwise method without multicollinearity and using multicollinearity are shown in Figure 4 and 5. In Figure 4, the dotted line is experiment value and solid line is predicted value. The multiple correlation coefficient is 0.99752 but this model uses 35 variables and F value is 951.0478. The polynomial model of SOC constructed by stepwise method without multicollinearity is: 2 776 2 6 7565 2 574 6454 2 473 6353 43 2 3 7262 5242 32 2 2 7161 5141 3121 2 176 543 211 005916.000149.00052275.7 00087659.00053938.1 0051506.301876.0 00066276.000019401.0 00064325.00075704.6 0075209.60071354.4 0061774.20109916.5 0011794.00054893.4 00011109.000015986.0 0081122.80062204.2 0057077.20064171.2 0063654.40050438.1 0085767.20064268.3 0086609.30237.1040672.0 02037.014627.000012173.0 011223.00004689.04602.7 xxxxe xxxxe xexx xxxx xxxe xxexxe xxexe xxxxe xxxx xxexe xxexxe xxexxe xxexxe xexx xxx xxy                 (12) In Figure 5, the multiple correlation coefficient is only 0.99492 but this model only uses nine variables and F value is higher i.e. 2083.5822. It shows higher accuracy. The polynomial model of SOC constructed by stepwise method considering multicollinearity is: 2 5 54 2 4 7161 51 2 1 541 0052797.1 00019556.000058728.0 0056051.10067938.4 0062566.30082148.7 011122.0056749.042384.0 xe xxx xxexxe xxexe xxy      (13) Based on the polynomial model of SOC in equation (13) it can be explained that some of the control parameters that give an effect significantly to the prediction of SOC are load current  1x , electronic temperature  4x , and vehicle velocity  5x . Internal resistance is affected by changes in the voltage drop during the load current. The change of internal resistance is linear with value of SOC. Electronic temperature is the temperature rise in power electronic components that is highly influenced by load current through it so that it indirectly affects the change of SOC. Load current is one of the significant control parameters which affect the prediction of SOC. Load current is also influenced by vehicle Table 1. Control parameter Control Parameter Meaning Unit Variation Range x1 Load Current Ampere 108-612 x2 Batteries Voltage Volt 50-74 x3 Electric Motor Speed rpm 1,422- 6,696 x4 Electronic Temperature o C 60-69 x5 Vehicle Velocity km/h 7.344- 80.784 x6 Time sec 4-67 x7 Gear - 1-4 Table 2. Optimization objective Optimization Objective y1 Meaning State of Charge Unit % Figure 4. The prediction and experiment value of SOC based on stepwise method without multicollinearity Figure 5. The prediction and experiment value of SOC based on stepwise method considering multicollinearity B. Wahono et al. / J. Mechatron. Electr. Power Veh. Technol 06 (2015) 31–38 37 velocity in which the test is done on a flat road. The greater the load current the smaller the vehicle velocity will be. Indirectly, vehicle velocity can affect the value of SOC. B. The Optimization of Battery Control Parameter The important factor to get the optimal results of PSO is a fitness function. In this research, one optimization objective is adjusted to a fitness function as: 15.0 YMinj  (14) where 1Y is normalized values of the 1y (Equation (1)). A simulation was realized using MATLAB, and performed on a PC with an Intel(R) Pentium(R) Dual CPU T2390 @ 1.86 GHz, and 0.99 GB RAM. A simulation using PSO was carried out based on the conditions in Table 3. An optimal control solution was found. The computing time took 1.061202 s. Convergence of the global best fitness value is shown in Figure 6. The global best fitness value convergences at J = 0.3322. Simulation with PSO was repeated 4 times based on the number of gear from 1 to 4, and 4 simulated optimal control parameters were obtained. The battery optimal control parameters are listed in Table 4 and the calculated battery optimal objectives based on prediction model is shown in Table 5. VI. CONCLUSION Based on the experiment data, in order to control the large number of control parameters appropriately considering SOC as the battery output objectives, the model construction which reproduce the characteristic value of SOC from control parameter is needed. In this study, the stepwise method considering multicollinearity was applied to construct the 1 st order and 2 nd order polynomial model. The accuracy of prediction model made by stepwise method depends on how well the function of regression suits the data. There should be routine to check how well the function of regression is suitable with the given data. This can be done through routine updates to ensure that the value of error is always below the pre-specified error threshold. In this paper, a prediction model of battery SOC has been reported using stepwise method Table 3. The condition of PSO simulation Items Value Number of particles 30 Number of iteration 200 Table 4. The battery optimal control parameters Control Parameter Meaning Gear (-) 1 2 3 4 x1 Load Current (Ampere) 601.41 572.04 577.10 580.19 x2 Batteries Voltage (Volt) 73.38 59.66 69.16 73.34 x3 Electric Motor Speed (rpm) 4,353.59 6,628.49 6,247.05 1,740.03 x4 Electronic Temperature ( o C) 67.86 67.71 67.98 67.48 x5 Vehicle Velocity (km/h) 71.72 71.37 69.75 70.77 x6 Time (sec) 5.92 6.73 7.91 8.25 Table 5. Calculated battery optimal objectives Optimization Objective y1 Meaning State of Charge (%) Gear (-) 1 0.704 2 0.703 3 0.696 4 0.690 Figure 6. Convergence of PSO (J = 0.3322) B. Wahono et al. / J. Mechatron. Electr. Power Veh. Technol 06 (2015) 31–38 38 considering multicollinearity. This paper shows that the predictive accuracy by stepwise method considering multicollinearity was high. This was proved by the multiple correlation coefficient of 0.9000 or more and F value that is very high. It can be regarded that the stepwise method can effectively estimate the objectives. The optimal control input parameters obtained by PSO were tested and analyzed. The result proved that the PSO is an effective method for battery optimization problem. In order to improve the performance of battery and increase the security of electric vehicle, in the future work, these battery optimal control parameters should be validated on the road, and the results of validation based on the optimal control parameters simulation should be compared with the calculated battery optimal objective values. Then, the battery model which added PSO should be mounted in a controller, and control performance should be evaluated. ACKNOWLEDGEMENT The author would like to thank to Aam Muharam, Sunarto Kaleg, Amin, Naili Huda, Mulia Pratama for the assistance in collecting experiment data, their suggestion, and productive discussion. REFERENCES [1] H, Wang, et al., “Estimation of state of charge of batteries for electric vehicles,” International Journal of Control and Automation, Vol. 6, No. 2, pp. 185-194, April 2013. [2] W.Y. Chang, “The state of charge estimating methods for battery: a review,” ISRN Applied Mathematics, Vol. 2013, Article ID 953792, 7 pages, 2013. http://dx.doi.org/10.1155/2013/953792. [3] J. Chiasson and B. Vairamohan, “Estimating the state of charge of a battery,” IEEE Transactions on Control Systems Technology, Vol. 13, No.3, pp. 465–470, 2005.http://dx.doi.org/10.1109/TCST.2004.8 39571. [4] H. Anbuky and P. E. Pascoe, “VRLA battery state-of-charge estimation in telecommunication power systems,” IEEE Transactions on Industrial Electronics, Vol. 47, No. 3, pp. 565–573, 2000. http://dx.doi.org/10.1109/41.847897. [5] B. Xiao, et al.,“A universal state-of-charge algorithm for batteries,” Design Automation Conference (DAC), 47 th ACM/IEEE, pp. 687-692, 2010. http://dx.doi.org/10.1145/1837274.1837449. [6] N. Zhou, et al., “A modified stepwise linear regression method for estimating modal sensitivity,” IEEE Power and Energy Soci- ety General Meeting, pp. 1-7, 24-29 July2011.http://dx.doi.org/10.1109/PES.201 1.6039795. [7] A.C. Rencher, “Methods of Multivariate Analysis,” New York: Wiley, 2002. [8] J.O. Rawlings, et al., “Applied regression analysis: a research tool,” 2 nd ed., New York: Springer, 1998. [9] J. Kennedy and R. Eberhart, “Particle swarm optimization,” Proceedings of the IEEE International Conference on Neural Networks, Vol. 4, pp. 1942–1948, 1995. http://dx.doi.org/10.1109/ICNN.1995.48896 8. [10] R. Eberhart, and Y. Shi, “Particle swarm optimization: developments, applications and resources,” Proceedings Congress on Evolutionary Computation, Vol. 1, pp. 81- 86, 2001. http://dx.doi.org/10.1109/CEC.2001.934374. [11] M. Ogawa et al., “Development of Method for Construction of a Response Surface Model and Control Parameter Optimization Method for Automobile Engine,” Transac- tions of the Society of Instrument and Con- trol Engineers, Vol. 47 No. 10, pp. 501-510, 2011. http://dx.doi.org/10.9746/sicetr.47.501. [12] J.J. Xu and Z.H. Xin, “An extended particle swarm optimizer,” Proceeding of the 19 th IEEE International Parallel and Distributed Processing Symposium, 2005. http://dx.doi.org/10.1109/IPDPS.2005.101. [13] S. He, et al., “A particle swarm optimizer with passive congregation,” Biosystems, Vol. 78, pp. 135-147, 2004. http://dx.doi.org/10.1016/j.biosystems.2004. 08.003. [14] J. Kennedy and R. Eberhart. “Swarm intelligence,” Morgan Kaufmann Publishers Inc., San Francisco, CA, 2001. [15] K. Ismail et al., “Desain Test Vehicle untuk Sistem Manajemen Energi Kendaraan Hibrida Seri,” Prosiding seminar nasional SMART, pp. D84-D89, 2010.