2013 2nd International Symposium on Instrumentation and Measurement, Sensor Network and Automation (IMSNA)
Electric vehicle battery SOC estimation based on fuzzy Kalman filter Xiangwu Yan, Yang Yang, Qi Guo, Hechuan Zhang, Wei Qu State Key Laboratory of Alternate Electrical Power System with Renewable Energy Sources, North China Electric Power University, Beijing 102206, China
[email protected],
[email protected] network method [3-5] needs to train a large number of data, besides, training data and training method have influence on estimation error. Kalman filtering method can make optimal estimation for the state of the dynamic system in the sense of minimum mean square. When using this method to estimate SOC, SOC can be seen as a component of the state vector of the dynamic system. The method has a strong correction for the initial error of SOC and it can estimate online, so that it is especially suitable for the electric vehicle batteries which work in complex conditions. However, statistical properties of system noise and measurement noise must be known when using conventional Kalman filter, and the noise must be zero mean white noise [6]. But with the working conditions of the battery sharply changes, the statistical properties of system noise and measurement noise will change accordingly, which will lead to inaccuracy of SOC estimation, or even filtering divergence. This paper designs a fuzzy Kalman filtering method, and applies it to the battery SOC estimation. The method decreases the influence of noise on the estimation error, and improves accuracy and stability of the Kalman filter.
Abstract—Electric vehicle battery management system works in the poor working environment, so that using conventional Kalman filtering algorithm to estimate the state of charge of electric vehicle battery will lead to inaccurate estimation, even divergent filtering. Aiming at the poor adaptive ability , defects of traditional filtering algorithm, the paper designs an improved fuzzy adaptive Kalman filter method, and applies it in the estimation of state of charge of electric vehicle battery. By monitoring the changes of residual online, the method uses the mean and the variance of the residual as the input of fuzzy controller, and adjusts the weight of the system noise and observation noise with fuzzy logic in real time, thus improves the estimation accuracy and realizes the optimal estimation of the filter. The simulation results show that this algorithm can predict the battery SOC effectively, and its accuracy is better than that of conventional Kalman filtering algorithm. Keywords- electric vehicle; battery; SOC; fuzzy Kalman filter
I.
INTRODUCTION
Energy depletion and environmental pollution makes electric vehicles which are energy-efficient and environment friendly become the trend of development of future cars. The battery is the most commonly used energy storage element of all kinds of electric vehicles, and the accurate measurement of the state of charge is a key problem in the development process of electric vehicles. State of charge (SOC) refers to the remaining battery power, which is one of the most important indicator of battery. The estimation of electric vehicle SOC is the foundation of the battery management system, so that improving the accuracy of estimation is of great significance to many aspects such as improving the use efficiency of battery, extending the life of battery and improving the safety and reliability of the battery [1]. At present, estimation methods for SOC of the electric vehicle battery at home and abroad basically have the following kinds. The discharge experiment method is applicable to all batteries, but it requires a lot of time, and it fails to estimate online. Ah measurement method [2] is simple and popular, but cumulative error exists because of the inaccuracy of current measurement. The open circuit voltage method [2] needs the battery standing for a long time to get the stable open circuit voltage, so that it’s not suitable for the estimation of electric vehicle battery which requires to be estimated in real time and on line. Internal resistance method can reveal the change of the SOC directly, but the estimation results are not accurate enough because battery internal resistance is affected by many factors. The neural
978-1-4799-2716-6/13/$31.00 ©2013 IEEE
II. THE BATTERY MODEL Dynamic system of battery has many state variables, this paper only considers the SOC of the battery as the main state variable. SOC of battery refers to the stored energy in the battery that is available to be used at any given time relative to the stored energy that is available when the battery is fully charged, its value range is 0 to 1, SOC = 0 means that the batteries discharge completely, and SOC = 1 means that the batteries are fully charged. At time t, the remaining battery capacity can be expressed by t
η i (τ )
0
Qn
SOC (t ) = SOC (0) − ³
dτ
(1)
In the equation (1), η is Coulomb efficiency coefficient, which is the average coulomb efficiency of the whole battery charging and discharging process. i (τ ) is the transient current of the battery at time τ (positive when discharging and negative when charging). Qn is rated capacity of the battery. In order to apply the Kalman filter to recursive estimation, equation (1) can be discretized (SOC is expressed as x (k ) ) as:
863
2013 2nd International Symposium on Instrumentation and Measurement, Sensor Network and Automation (IMSNA)
ηΔt
x(k + 1) = x(k ) − (
Qn
)i (k )
(2)
Ki x(k )
Unnewehr model: y (k ) = E0 − Ri (k ) − K i x(k ) Nernst model:
C (k ) =
y (k ) = E0 − Ri (k ) + K 2 ln x( k ) + K 3 ln(1 − x( k ))
(6)
P(0 | 0) = Var ( x(0)) ; Q = E ( wwT ) ; S = E (vvT )
K y (k ) = K 0 − Ri( k ) − 1 − K 2 x( k ) + K 3 ln x(k ) + K 4 ln(1 − x(k )) x(k ) (3) Using standard discharge rate for a full discharge process of the battery at room temperature, according to the battery terminal voltage y (k ) at different time and the corresponding SOC values, parameters( K 0 , R , K1 , K 2 , K 3 and K 4 ) in the model can be obtained by curve fitting based on the least square method.
The time update equations: x( k | k − 1) = x( k − 1| k − 1) −
ηΔt Qn
i (k − 1)
P (k | k − 1) = A(k − 1) P(k − 1| k − 1) AT (k − 1) + Q
(7) (8)
The measurement update equations˖
K (k ) = P(k | k − 1)C T (k )(C (k ) P( k | k − 1)C T (k ) + S ) −1 (9) x( k | k ) = x(k | k − 1) + K (k )( y (k ) − C (k ) x(k | k − 1) − D(k )u ( k )) (10)
KALMAN FILTERING ALGORITHM TO ESTIMATE SOC
Kalman filtering takes the minimum mean square error as the best criterion of estimation [9]. Using the state space model of signal and noise, it takes advantage of the estimation value of the previous moment and the observed value of the current moment to update to get the estimated value of the current moment. When Kalman filter is used for SOC estimation, we describe the battery as a dynamic system which consists of a state equation and a measurement equation: x(k + 1) = A(k ) x( k ) + B(k )u (k ) + w(k )
K K K4 ∂y (k ) = 2 1 − K2 + 3 − ∂x(k ) x (k ) x(k ) 1 − x( k )
Initialization: k=0: x (0 | 0) = SOC (0) ;
In these models, y (k ) is the battery terminal voltage. i (k ) is the load current, which is positive when discharged and negative when charged. R is the internal resistance of the battery(different values may be used at different SOC levels in charge/discharge if desired). K i is the polarization resistance . K 2 and K3 are constants. All of these models may be collected to make a combined model [8]:
III.
(5)
In the equations, x(k ) is the system state at time k, SOC is a component of battery system state, and x( k ) represents SOC˄k˅for simplicity here. u (k ) is the input of the system. A(k ) is the system matrix. B (k ) is the input matrix. y (k ) is the output of the system, and it represents the working voltage of battery here. C (k ) is the measurement matrix. D(k ) is the connection matrix. w(k ) is the system noise which covariance is Q. v(k ) is the measurement noise which covariance is Q. w(k ) and v(k ) are both the Gaussian white noise. We can get Kalman filtering algorithm to estimate SOC with the battery model obtained above. According to equation (3):
In the equation (2), Δt is the interval of discrete time. As part of the model state, SOC has a certain relationship with the voltage of the battery, thus the voltage of the battery can be predicted if the SOC is known. Several different forms are given in reference [7]. Shepherd model: y (k ) = E0 − Ri (k ) −
y ( k ) = C ( k ) x ( k ) + D ( k )u ( k ) + v ( k )
P(k | k ) = ( E − K (k )C (k )) P(k | k − 1)
(11)
In the equations, x( k | k − 1) and x(k | k ) are priori estimation and posteriori estimation of the current state respectively. P is the state estimation error covariance matrix. y (k ) is the voltage of the battery measured at time k. K is the filter gain matrix. E is the identity matrix. The estimation of SOC can be get according to the above Kalman filtering algotithm.
(4)
864
2013 2nd International Symposium on Instrumentation and Measurement, Sensor Network and Automation (IMSNA)
IV.
SOC ESTIMATION BASED ON FUZZY KALMAN FILTERING
G (k ) =
Traditional kalman filter have to know statistical properties of system noise and measurement noise in advance to obtain the ideal filtering effect. But there is a great deal of randomness in the actual system, resulting in difficulty to accurately get the noise characteristics, thus affecting the accuracy of prediction. The definition of residual is the difference between the observed value and the estimate value of the filter. The smaller the residual is, the closer the model structure of the filter is to the actual structure of the system. Ideally, the mean residual is zero, and the measured value of the variance of the residual should be equal to the theoretical value. By designing a fuzzy self-adjusting controller, monitor online the mean residual and the ratio of residual’s measured variance and theoretical variance of every step from Kalman filter, then according to fuzzy inference rules, adjust Q and S on line and in real time, which could improve the accuracy of estimate values from Kalman filter. The adjustment coefficient a (k ) to the covariance Q of the initial system noise: Q(k ) = a (k )Q
(18)
The theoretical variance matrix of the residual is defined by H (k ) , according to equation (14) and (15):
H (k ) = C ( k )( A(k − 1) P(k − 1| k − 1) AT (k − 1) + a(k )Q)C T (k ) +b ( k ) S (19) The input of fuzzy controller:
(12)
The adjustment coefficient b(k ) to the covariance of the initial measured noise: S ( k ) = b( k ) S
1 k ¦ d (i)d T (i) n i = k − n +1
(13)
m1 (k ) = L(k ) y(k )
(20)
m2 (k ) = trace(G (k )) trace( H ( k ))
(21)
In the equation, trace() is trace operation for matrix. We take adaptive strategy based on fuzzy control method to process a(k ) and b( k ) by detecting the mean and the variance of the residual in real time. Under ideal condition, m1 ( k ) equals 0, m2 ( k ) equals 1. At this point, the filter is stable and it is in a state of optimal estimation. When the actual measurement noise increases, G (k ) will increase and L(k ) will deviate from the zero point, thus the degree of reliability of metrical information will decrease. In order to improve properties of the filter, we increase a (k ) which is
Thus, equation (8) can be rewritten as: P(k | k − 1) = A(k − 1) P(k − 1| k − 1) AT ( k − 1) + a( k )Q (14) Equation (8) can be rewritten as: K (k ) = P(k | k − 1)C T (k )(C (k ) P(k | k − 1)C T ( k ) + b( k ) S ) −1 (15)
The residual at time k is defined by d (k ) : d (k ) = y (k ) − C (k ) x(k | k − 1) − D(k )u (k )
(16)
The mean residual is defined by L(k ) , which is the average of n residuals: L(k ) =
1 k ¦ d (i) n i = k − n +1
(17)
Figure 1. membership function of input variables
The measured variance matrix of the residual is defined by G (k ) , which is the average of n variances of residual:
865
2013 2nd International Symposium on Instrumentation and Measurement, Sensor Network and Automation (IMSNA)
VI. CONCLUSION This paper proposes a SOC estimation method of electric vehicle battery based on fuzzy Kalman filter, which is built on the traditional algorithm of Kalman filtering. And it verifies the feasibility of this method through modeling. This method could overcome the drawbacks of traditional estimation method and be used for different complex electric vehicle battery conditions.
1 Actual measured values of SOC Conventional kalman filter to estimate SOC Fuzzy kalman filter to estimate SOC
0.9 0.8 0.7
SOC/%
0.6 0.5 0.4 0.3 0.2 0.1 0
0
20
40
60 t/min
80
100
120
ACKNOWLEDGMENT The research is sponsored by “Research and Demonstration on the Technology of Charging and Batterychanging of Electric vehicles”, Science and Technology Project from the Headquarters of the National Grid, China, 2012.
Figure 2. measured and estimated values of SOC
the weight of system noise Q and decrease b(k ) which is the weight of measurement noise S to make the filter more stable. On the contrary, we must decrease a (k ) and increase b( k ) .
REFERENCES
We fuzzifier m1 ( k ) and m2 ( k ) and take them as fuzzy
[1]
input variables. a(k ) and b( k ) are the fuzzy output variables. The stability of the filter is high when m1 ( k ) is near 0 and
[2]
decreases when m1 ( k ) deviates from 0 and m2 ( k ) deviates
[3]
m2 ( k ) is near 1. On the contrary, the stability of the filter
from 1. The membership functions of m1 ( k ) and m2 ( k ) are shown in Fig. 1. Determine the fuzzy values of output variables a (k ) and b(k ) by using the fuzzy control rules and then get the defuzzified values by taking the method of barycenter, so that we can adjust parameters a( k ) and b(k ) in real time by using fuzzy controller. V.
[4]
[5]
[6]
EXEPERIMENTAL RESULTS AND ANALYSIS
In order to verify the estimation method of SOC, we chose 320Ah LiFePO4 batteries as our experimental subjects and devided them into two groups, then we treated them by traditional and fuzzy Kalman filtering algrithm separately in 25 degree temperature. At last, we compared the output from the above two methods with true values. Picture 2 shows the battery discharge curves from estimation by using traditional and fuzzy Kalman filter and measurement. From Fig. 2, we could conclude that the SOC values by using fuzzy Kalman filtering algrithm has more accuracy since it is closer to the real measured values.
[7]
[8]
[9]
866
Wei Kexin, Chen Qiaoyan. Electric vehicle battery SOC estimation based on multiple-model adaptive kalman filter[J]. Proceedings of the CSEE㧘2012,32㧔31㧕㧦19-26㧚 Plett G L. Extended Kalman filtering for battery management systems of LiPB-based HEV battery packs Part 1 Background[J]. Journal of Power Sources, 2004, 134(2): 252-261. Lei Xiao㧘Chen Qingquan㧘Liu Kaipei㧘Ma Li㧚Support vector machine based SOC estimation for electric vehicles[J]㧚Proceedings of the CSEE㧘2008㧘28(18)㧦114-118㧚 Lei Xiao 㧘 Chen Qingquan 㧘 Liu Kaipei 㧘 Ma Li 㧚Radial-basedfunction neural network based SOC estimation for electric vehicles[J] 㧚 Transactions of China Electrotechnical Society 㧘 2008㧘23(5)㧦81-87㧚㧚 Charkhgard M㧘Farrokhi M㧚State-of-charge estimation for lithiumion batteries using neural networks and EKF[J]㧚IEEE Trans. on Industrial Electronics㧘2010㧘57(12)㧧4178-4187㧚 Ma Zhongxiao, Liu Zongyu, Chen Ming. Application of adaptive Kalman filtering based on fuzzy logic to the integrated GPS/INS navigation[J]. Information and Control, 2006, 35(4):457-461㧚 ThermoAnalytics Inc., Battery modeling for HEV simulation by ThermoAnalytics Inc. http:// www. thermoanalytics. com/support/ publications/batterymodelsdoc.html. Plett G L 㧚 Extended Kalman filtering for battery management systems of LiPB-based HEV battery packs part 2 modeling and identification[J]㧚Journal of Power Sources㧘2004㧘134(2)㧦262– 276㧚 Plett G L 㧚 Extended kalman filtering for battery management systems of LiPB-based HEV battery packs part 3 state and parameter estimation[J] 㧚 Journal of Power Sources 㧘 2004 㧘 134(2) 㧦 277292㧚