# Study on a High-Accuracy Real-Time Algorithm to Estimate SOC of Multiple Battery Cells Simultaneously

Authors: Yong Luo; Yingzhe Kan; Yanli Yin; Li Liu; Huanyu Cui; Fei Wu
Journal: Journal of Control Science and Engineering
 (2017)

---

## Abstract

In traditional battery equalization strategy, open-circuit voltage (OCV) of battery cells was used to judge the difference of SOC between them. However, OCV is not only determined by SOC but also influenced by internal resistance, polarization voltage, capacity, and other nonlinear factors. As a result, OCV is not an ideal indicator of SOC differences, especially in transient conditions. In order to control battery consistency accurately, it is best to use SOC directly as standard for battery consistency judgment and control. To achieve this, an algorithm that can estimate SOC of multiple battery cells simultaneously with low computational complexity and high accuracy is needed. Limited by computing speed of Battery Control Unit (BCU), existing SOC estimation method is hard to estimate SOC of each battery cell simultaneously with high accuracy. In this research, a new SOC estimation strategy was proposed to estimate SOC of multiple battery cells simultaneously for battery equalization control. Battery model is established based on experimental data, and a processor-in-the-loop test system was established to verify the actual performance of the proposed algorithm. Results of simulation and test indicate that the proposed algorithm can estimate SOC of multiple battery cells simultaneously and achieved good real-time performance and high accuracy.


---

## Body

## 1. Introduction

Battery pack on EV is formed by connecting multiple battery cells together; since performance parameters of battery cells are different from one another, State of Charge (SOC) of these battery cells will be different in the process of using the battery pack. In the process of charging or discharging, battery cells with higher SOC or lower SOC are easier to get overcharged or overdischarged, resulting in a decline of performance and fatigue life of battery pack. The purpose of battery equalization control is to maintain the uniformity of SOC in all battery cells, so as to avoid overcharge or overdischarge of battery cells, and extend the fatigue life of battery pack [1].In traditional battery equalization strategy, open-circuit voltage (OCV) of battery cells was used to judge the difference of SOC between battery cells. The main reason is that OCV is easy to measure and reflects SOC of battery cells in some extent. However, OCV of battery cell is determined not only by SOC but also by internal resistance, polarization voltage, capacity, and other nonlinear factors. As a result, OCV is not an ideal indicator of battery consistency. In order to control the battery consistency accurately, it is best to estimate SOC of each battery cell and use SOC as the standard for battery consistency judgment and control.To use SOC as the indicator of consistency in battery equalization management, it is necessary to estimate SOC of each battery cell accurately in real time [2–4]. Typical structure of battery management system on electric vehicles is shown in Figure 1; Battery Module is composed of several battery cells, the Battery Monitoring Circuit (BMC) collects voltage and current data of battery cells and sends them to Battery Control Unit (BCU), and algorithm to estimate SOC is operated in BCU. As computing speed of BCU is limited, the SOC estimation algorithm which can estimate SOC of multiple battery cells simultaneously with high accuracy is a key issue. Traditional SOC estimation algorithms such as open-circuit voltage method and AH counting method have low computational complexity, but SOC estimation accuracy of these algorithms is low and cannot meet the requirements of battery equalization management. Extended Kalman filter algorithm can estimate SOC with high accuracy, but it has high computational complexity, and it is hard to use this algorithm to estimate SOC of multiple battery cells simultaneously with limited computing speed of BCU [5–7]. A new algorithm that can estimate SOC of multiple battery cells simultaneously with low computational complexity and high accuracy is needed for next generation of battery equalization management strategy.Figure 1
Typical structure of BMS.In this research, a new SOC estimation strategy that can estimate SOC of multiple battery cells simultaneously with low computational complexity and high accuracy was proposed. In this strategy, the initial value of SOC is determined by open-circuit voltage, AH counting algorithm which has low computational complexity is used as the main procedure to estimate SOC of each battery cell, and extended Kalman filter algorithm was operated intermittently to correct the accumulated error of AH counting algorithm. Battery model is established based on experimental data, accuracy, and computational complexity of the proposed algorithm and traditional algorithms were compared with each other to verify the effectiveness of the new algorithm. The proposed algorithm was then transformed to C code and downloaded to BCU, based on which a processor-in-the-loop test system was established to verify the actual performance of the proposed algorithm. Results of simulation and processor-in-the-loop test indicate that the proposed algorithm can estimate SOC of multiple battery cells simultaneously and can achieve good real-time performance and high accuracy. The proposed algorithm is suitable for next generation battery equalization control based on SOC of each battery cell.


## 2. A New Algorithm Used for Estimating SOC of Multiple Battery Cells Simultaneously

There are some shortcomings in the existing SOC estimation algorithms. Open-circuit voltage algorithm has low computational complexity, but it is only suitable for static condition when the vehicle is stopped. In transient conditions open-circuit voltage algorithm cannot estimate SOC accurately. AH counting algorithm is one of the most widely used algorithms because it is easy to implement. However, AH counting algorithm has accumulated measurement error as time passes by. Furthermore, initial value of SOC is needed when AH counting algorithm is used; it is important to get an accurate initial value of SOC. The core concept of extended Kalman filter algorithm is to make optimal variance estimation of system dynamic. Extended Kalman filter can correct the initial error and has a strong noise suppression effect. However, extended Kalman filter algorithm has high computational complexity and cannot used to estimate SOC of multiple battery cells simultaneously with limited computing speed of BCU.A new strategy is proposed to estimate SOC of multiple battery cells simultaneously with high accuracy and low computational complexity for battery equalization control. The new strategy operates as follows:(1) open-circuit voltage algorithm is used to get accurate initial value of SOC when vehicle is just starting up and battery cells were in static conditions; (2) after obtaining accurate initial value of SOC, SOC of multiple battery cells were estimated simultaneously by operating AH counting algorithm with low computational complexity for each battery cell; (3) accumulation error of AH counting algorithm increases with time passing by; extended Kalman filter algorithm is implemented to eliminate accumulation error of AH counting algorithm; (4) in order to keep computational complexity low, the extended Kalman filter algorithm operates for one battery cell after another and circles to the first battery cell after the last battery cell. As a result, only one extended Kalman filter algorithm is running at any moment; SOC of all battery cells were estimated with high accuracy and limited computational complexity.Taking an example, when SOC of six battery cells is needed, time sequence of SOC estimation algorithm of six battery cells is shown in Table1. Time sequence of SOC estimation algorithm in a single battery cell is shown in Figure 2.Table 1
Time sequence of new SOC estimation strategy for multiple battery cells.
Battery cells
Time
0-t1
t
1-t2
t
2-t3
t
3-t4
t
5-t6
(
1
)
OCV
Kalman
AH
AH
AH
(
2
)
OCV
AH
Kalman
AH
AH
(
3
)
OCV
AH
AH
Kalman
AH
(
4
)
OCV
AH
AH
AH
Kalman
(
5
)
OCV
AH
AH
AH
AH
(
6
)
OCV
AH
AH
AH
AHFigure 2
Time sequence of proposed SOC estimation strategy for single battery cell.


## 3. Implementation of the Proposed Strategy

### 3.1. Battery Model Selection

The purpose of the proposed algorithm is to find a method to estimate the SOC with low computation and high precision, so it is necessary to take care of both computation and precision when choosing battery model.EKF algorithm contains matrix inversion steps; since first-order ECM has less matrix dimension compared to second-order ECM, using first-order ECM can reduce time complexity of the algorithm to a certain extent. Meanwhile, many researches and literature indicate that using second-order ECM in EKF led to a slightly higher accuracy in SOC estimation than using first-order ECM. Generally speaking, using second-order ECM has higher SOC estimation accuracy but lower time efficiency and using first-order ECM has lower SOC estimation accuracy but higher time efficiency.In the proposed algorithm, EKF and AH method were operated one after another in a circle loop; SOC estimation results of EKF will be used as the initial value of the following AH algorithm. Since SOC estimation accuracy of AH algorithm greatly depends on the accuracy of initial value, SOC estimation accuracy of EKF is a key issue in the proposed strategy. Based on these considerations, second-order ECM which has slightly higher estimation accuracy is recommended.In practical applications of the proposed SOC estimation strategy, we can choose to use first-order ECM or second-order ECM in EKF according to the calculation speed of the BMS we use. If calculation speed of BMS is high enough, we can choose to use second-order ECM with higher accuracy; if calculation speed of BMS we use is not high enough to operate second-order ECM, we can choose to use first-order ECM with higher time efficiency and lower accuracy. In this paper, second-order ECM is selected.


### 3.2. Battery Modeling

High-precision battery model is needed when using extended Kalman filter algorithm to estimate SOC. Battery model is established by theoretical analysis and we use experimental data to obtain parameters in the theoretical model. Second-order RC circuit model is a widely used theoretical battery model [8, 9]; the model is shown in Figure 3, where Ri represents ohm resistance, R1 and R2 represent polarized resistance, and C1 and C2 represent equivalent capacitance.Figure 3
Second-order RC circuit battery model.According to the battery model, state equation and output equation of second-order RC model can be represented as follows:(1)V0˙V1˙V2˙=10001-1R1·C10001-1R2·C2·V0V1V2+-1C01C11C2·I,V=1-1-1·V0V1V2-Ri·I.State variable in the battery model can be represented as(2)x=x1x2x3T=V0V1V3T.State equation and observation equation of the second-order RC circuit model can be represented as(3)xk+1=Axk+Buk+ωk,yk=Cxk+Duk+νk,where xk represents system state vector with time indexk, input of the system is uk, output of system is yk, ωk represents process noise, νk is sensor noise, and A, B, C, and D describe dynamics of the system.Charge and discharge experiment were carried out to obtain parameters in the theoretical model; battery testing device was shown in Figure4. Parameters of second-order RC battery model obtained from experimental data were shown in Table 2.Table 2
Parameters of second-order RC battery model obtained by experimental data.
R
i (Ω)
R
1 (Ω)
R
2 (Ω)
C
1 (F)
C
2 (F)
C
0 (F)
0.0055
0.0041
0.0017
21797
3634
71354Figure 4
Battery testing device.In actual working conditions, current of batteries on EV changes drastically; an irregular discharge curve is used to verify the response speed and stability of the second-order RC battery model. Comparison of tested voltage and voltage estimated by second-order RC model under the irregular discharge working conditions was shown in Figure5. The difference of estimated voltage and tested voltage is shown in Figure 6. We can see from the result that the difference of estimated voltage and tested voltage is less than 0.048. Test results indicated that the proposed model can estimate voltage of the battery cells accurately.Figure 5
Comparison of tested voltage and voltage estimated by second-order RC model under driving condition.Figure 6
The difference of estimated voltage and tested voltage.


### 3.3. Algorithm of the Proposed Strategy to Estimate SOC of Multiple Battery Cells Simultaneously

In the proposed strategy, SOC of multiple battery cells were firstly estimated by operating AH counting algorithm with low calculation complexity for each battery cell simultaneously. AH counting algorithm can be represented as(4)SOC=SOC0-1CA∫t0tZidt,where SOC0 represents the initial value of SOC, CA represents capacity of battery, and Z represents the columbic efficiency.AH counting algorithm needs an initial value of SOC, and accuracy of the initial value has significant influences on accuracy of the estimate results. Initial value of SOC used in AH counting algorithm was obtained by open-circuit voltage algorithm accurately. The principle of open-circuit voltage algorithm is that SOC and open-circuit voltage of battery have a fixed relation, and this fixed relation was obtained by experiment. Relation of SOC and open-circuit voltage obtained by experiment was shown in Figure7.Figure 7
Relation of SOC and open-circuit voltage.AH counting algorithm has accumulated error and cannot correct by itself. Accumulated error of AH counting algorithm increases with time passing by; extended Kalman filter algorithm is implemented to eliminate accumulation error of AH counting algorithm. In order to keep computational complexity low, the extended Kalman filter algorithm operates for one battery cell after another and circles to the first battery cell after the last battery cell [10, 11]. The correction process can be represented as follows.(
1
) State variable in the battery model can be represented as(5)Vki=ik-1Ri,Vk1=ik-1R11+R1C1+R1C11+R1C1Vk-11,Vk2=ik-1R21+R2C2+R2C21+R2C2Vk-12,SOCk=ik-11C0+SOCk-1.Formula (5) can be rewritten as a matrix, and a state equation can be obtained as(6)xk+1=Axk+Buk+ωk.The second-order RC circuit model has the following relationships:(7)V=V0-Vi-V1-V2,V0=g⁡SOC.System observation equation can be represented as(8)yk+1=Cxk+Duk+νk.2 Computation is carried out as follows:(9)x^k+1/k=Ax^k+Buk,Pk+1/k=APkAT+Qk,Lk=Pk+1/kHkTHkPk+1/kHkT+Rk-1,x^k+1=x^k+1/k+Lkyk+1-Hkx^k+1/k,Pk+1=E-LkHkPk+1/k,where x^k+1/k and Pk+1/k represent value of the state and error covariance at timek, x^k+1 and Pk+1 represent value of the state and error covariance after correction, Qk represents system process noise matrix, Rk represents measurement noise error matrix, andE represents unit matrix.


### 3.4. Control Logic of Timing Sequence

The purpose of the proposed strategy is to estimate SOC of multiple battery cells simultaneously with low calculation complexity and high accuracy. Open-circuit voltage algorithm, AH counting algorithm, and extended Kalman filter algorithm used in the proposed strategy are coded in the Enabled-Subsystem. These algorithms were controlled to operate following the proposed strategy to reach low calculation complexity; thus timing sequence to control the operation of these algorithms is a key issue in the system.Control logic of timing sequence is consisting of a Timing-Sequence Module and an Output-Selection Module.Operating principle of Timing-Sequence Module is shown in Figure8. A clock is taken as the basis of Timing-Sequence Module to switch SOC estimation algorithm. In the first five seconds of vehicle start-up, open-circuit voltage algorithm operated to estimate initial SOC of all battery cells. After five seconds, Timing-Sequence Module generates control signals to control AH counting algorithm and extended Kalman filter algorithm to operate intermittently.Figure 8
Timing-Sequence Module.Taking a battery pack with twelve battery cells, for example, a twelve-number sequence from zero to eleven with interval timeT is generated by Timing-Sequence-Generate Module. T is the time to operate extended Kalman filter algorithm to eliminate accumulation error of AH counting method; the length of T is determined by converging speed of extended Kalman filter algorithm. Each battery cell has a Selection-Enable Module; these Selection-Enable Modules revive the number sequence generated by Timing-Sequence Module. When the revived number is the same as the number of the battery cells, the Selection-Enable Module then outputs enable or disable signals at three output ports according to the proposed SOC estimation strategy. The three SOC estimation algorithms are controlled by signals generated by Selection-Enable Module.The operating principle of Output-Selection Module is shown in Figure9. The function of Output-Selection Module is to change the output signal path so as to output the SOC estimate result of the algorithm which is operating.Figure 9
Output-Selection Module.


### 3.5. Definition of Battery Pack SOC

SOC of battery pack is an important parameter for vehicle control. The proposed SOC estimation algorithm has estimated SOC of each battery cell in a battery pack. Furthermore, it is necessary to convert SOC of each battery cell to SOC of the whole battery pack. The definition of pack capacity can be represented as follows [12, 13]: (10)Cpack=min1≤i≤n⁡SOCiCi+min1≤j≤n⁡1-SOCjCj,where Cpack represents the capacity of battery pack, min1≤i≤n⁡(SOCiCi) represents the minimum remaining capacity, min1≤i≤n⁡1-SOCjCj represents the minimum charging capacity,n is the number of cells in the battery pack, andiand j are the battery number.The definition of battery pack SOC can be expressed as(11)SOCpack=min1≤i≤n⁡SOCiCiCpack.The calculation principle ofSOCpack is shown in Figure 10.Figure 10
The calculation flow chart ofSOCpack.


## 3.1. Battery Model Selection

The purpose of the proposed algorithm is to find a method to estimate the SOC with low computation and high precision, so it is necessary to take care of both computation and precision when choosing battery model.EKF algorithm contains matrix inversion steps; since first-order ECM has less matrix dimension compared to second-order ECM, using first-order ECM can reduce time complexity of the algorithm to a certain extent. Meanwhile, many researches and literature indicate that using second-order ECM in EKF led to a slightly higher accuracy in SOC estimation than using first-order ECM. Generally speaking, using second-order ECM has higher SOC estimation accuracy but lower time efficiency and using first-order ECM has lower SOC estimation accuracy but higher time efficiency.In the proposed algorithm, EKF and AH method were operated one after another in a circle loop; SOC estimation results of EKF will be used as the initial value of the following AH algorithm. Since SOC estimation accuracy of AH algorithm greatly depends on the accuracy of initial value, SOC estimation accuracy of EKF is a key issue in the proposed strategy. Based on these considerations, second-order ECM which has slightly higher estimation accuracy is recommended.In practical applications of the proposed SOC estimation strategy, we can choose to use first-order ECM or second-order ECM in EKF according to the calculation speed of the BMS we use. If calculation speed of BMS is high enough, we can choose to use second-order ECM with higher accuracy; if calculation speed of BMS we use is not high enough to operate second-order ECM, we can choose to use first-order ECM with higher time efficiency and lower accuracy. In this paper, second-order ECM is selected.


## 3.2. Battery Modeling

High-precision battery model is needed when using extended Kalman filter algorithm to estimate SOC. Battery model is established by theoretical analysis and we use experimental data to obtain parameters in the theoretical model. Second-order RC circuit model is a widely used theoretical battery model [8, 9]; the model is shown in Figure 3, where Ri represents ohm resistance, R1 and R2 represent polarized resistance, and C1 and C2 represent equivalent capacitance.Figure 3
Second-order RC circuit battery model.According to the battery model, state equation and output equation of second-order RC model can be represented as follows:(1)V0˙V1˙V2˙=10001-1R1·C10001-1R2·C2·V0V1V2+-1C01C11C2·I,V=1-1-1·V0V1V2-Ri·I.State variable in the battery model can be represented as(2)x=x1x2x3T=V0V1V3T.State equation and observation equation of the second-order RC circuit model can be represented as(3)xk+1=Axk+Buk+ωk,yk=Cxk+Duk+νk,where xk represents system state vector with time indexk, input of the system is uk, output of system is yk, ωk represents process noise, νk is sensor noise, and A, B, C, and D describe dynamics of the system.Charge and discharge experiment were carried out to obtain parameters in the theoretical model; battery testing device was shown in Figure4. Parameters of second-order RC battery model obtained from experimental data were shown in Table 2.Table 2
Parameters of second-order RC battery model obtained by experimental data.
R
i (Ω)
R
1 (Ω)
R
2 (Ω)
C
1 (F)
C
2 (F)
C
0 (F)
0.0055
0.0041
0.0017
21797
3634
71354Figure 4
Battery testing device.In actual working conditions, current of batteries on EV changes drastically; an irregular discharge curve is used to verify the response speed and stability of the second-order RC battery model. Comparison of tested voltage and voltage estimated by second-order RC model under the irregular discharge working conditions was shown in Figure5. The difference of estimated voltage and tested voltage is shown in Figure 6. We can see from the result that the difference of estimated voltage and tested voltage is less than 0.048. Test results indicated that the proposed model can estimate voltage of the battery cells accurately.Figure 5
Comparison of tested voltage and voltage estimated by second-order RC model under driving condition.Figure 6
The difference of estimated voltage and tested voltage.


## 3.3. Algorithm of the Proposed Strategy to Estimate SOC of Multiple Battery Cells Simultaneously

In the proposed strategy, SOC of multiple battery cells were firstly estimated by operating AH counting algorithm with low calculation complexity for each battery cell simultaneously. AH counting algorithm can be represented as(4)SOC=SOC0-1CA∫t0tZidt,where SOC0 represents the initial value of SOC, CA represents capacity of battery, and Z represents the columbic efficiency.AH counting algorithm needs an initial value of SOC, and accuracy of the initial value has significant influences on accuracy of the estimate results. Initial value of SOC used in AH counting algorithm was obtained by open-circuit voltage algorithm accurately. The principle of open-circuit voltage algorithm is that SOC and open-circuit voltage of battery have a fixed relation, and this fixed relation was obtained by experiment. Relation of SOC and open-circuit voltage obtained by experiment was shown in Figure7.Figure 7
Relation of SOC and open-circuit voltage.AH counting algorithm has accumulated error and cannot correct by itself. Accumulated error of AH counting algorithm increases with time passing by; extended Kalman filter algorithm is implemented to eliminate accumulation error of AH counting algorithm. In order to keep computational complexity low, the extended Kalman filter algorithm operates for one battery cell after another and circles to the first battery cell after the last battery cell [10, 11]. The correction process can be represented as follows.(
1
) State variable in the battery model can be represented as(5)Vki=ik-1Ri,Vk1=ik-1R11+R1C1+R1C11+R1C1Vk-11,Vk2=ik-1R21+R2C2+R2C21+R2C2Vk-12,SOCk=ik-11C0+SOCk-1.Formula (5) can be rewritten as a matrix, and a state equation can be obtained as(6)xk+1=Axk+Buk+ωk.The second-order RC circuit model has the following relationships:(7)V=V0-Vi-V1-V2,V0=g⁡SOC.System observation equation can be represented as(8)yk+1=Cxk+Duk+νk.2 Computation is carried out as follows:(9)x^k+1/k=Ax^k+Buk,Pk+1/k=APkAT+Qk,Lk=Pk+1/kHkTHkPk+1/kHkT+Rk-1,x^k+1=x^k+1/k+Lkyk+1-Hkx^k+1/k,Pk+1=E-LkHkPk+1/k,where x^k+1/k and Pk+1/k represent value of the state and error covariance at timek, x^k+1 and Pk+1 represent value of the state and error covariance after correction, Qk represents system process noise matrix, Rk represents measurement noise error matrix, andE represents unit matrix.


## 3.4. Control Logic of Timing Sequence

The purpose of the proposed strategy is to estimate SOC of multiple battery cells simultaneously with low calculation complexity and high accuracy. Open-circuit voltage algorithm, AH counting algorithm, and extended Kalman filter algorithm used in the proposed strategy are coded in the Enabled-Subsystem. These algorithms were controlled to operate following the proposed strategy to reach low calculation complexity; thus timing sequence to control the operation of these algorithms is a key issue in the system.Control logic of timing sequence is consisting of a Timing-Sequence Module and an Output-Selection Module.Operating principle of Timing-Sequence Module is shown in Figure8. A clock is taken as the basis of Timing-Sequence Module to switch SOC estimation algorithm. In the first five seconds of vehicle start-up, open-circuit voltage algorithm operated to estimate initial SOC of all battery cells. After five seconds, Timing-Sequence Module generates control signals to control AH counting algorithm and extended Kalman filter algorithm to operate intermittently.Figure 8
Timing-Sequence Module.Taking a battery pack with twelve battery cells, for example, a twelve-number sequence from zero to eleven with interval timeT is generated by Timing-Sequence-Generate Module. T is the time to operate extended Kalman filter algorithm to eliminate accumulation error of AH counting method; the length of T is determined by converging speed of extended Kalman filter algorithm. Each battery cell has a Selection-Enable Module; these Selection-Enable Modules revive the number sequence generated by Timing-Sequence Module. When the revived number is the same as the number of the battery cells, the Selection-Enable Module then outputs enable or disable signals at three output ports according to the proposed SOC estimation strategy. The three SOC estimation algorithms are controlled by signals generated by Selection-Enable Module.The operating principle of Output-Selection Module is shown in Figure9. The function of Output-Selection Module is to change the output signal path so as to output the SOC estimate result of the algorithm which is operating.Figure 9
Output-Selection Module.


## 3.5. Definition of Battery Pack SOC

SOC of battery pack is an important parameter for vehicle control. The proposed SOC estimation algorithm has estimated SOC of each battery cell in a battery pack. Furthermore, it is necessary to convert SOC of each battery cell to SOC of the whole battery pack. The definition of pack capacity can be represented as follows [12, 13]: (10)Cpack=min1≤i≤n⁡SOCiCi+min1≤j≤n⁡1-SOCjCj,where Cpack represents the capacity of battery pack, min1≤i≤n⁡(SOCiCi) represents the minimum remaining capacity, min1≤i≤n⁡1-SOCjCj represents the minimum charging capacity,n is the number of cells in the battery pack, andiand j are the battery number.The definition of battery pack SOC can be expressed as(11)SOCpack=min1≤i≤n⁡SOCiCiCpack.The calculation principle ofSOCpack is shown in Figure 10.Figure 10
The calculation flow chart ofSOCpack.


## 4. System Modeling and Simulation

A simulation model of a battery pack consisting of twelve battery cells was built using Matlab/Simulink. Model of this battery pack was built based on experimental data and second-order RC circuit model as in Section3.1 of this paper. The proposed algorithm that can estimate SOC of multiple battery cells simultaneously was also coded using Matlab/Simulink. The system simulation model is shown in Figure 11.Figure 11
System simulation model.FUDS is a battery discharge working condition usually used to test battery characteristic; the modeled battery pack and proposed algorithm were tested under FUDS. A comparison of SOC of battery cells estimated by proposed algorithm and true SOC of battery cells was illustrated in Figure11. The proposed algorithm can estimate SOC of all twelve battery cells simultaneously; only 3 of them were illustrated in Figure 11 so as to save space. The true SOC illustrated in Figure 11 is calculated from the experimental data recorded by CT-4002 charge-discharge test device as shown in Figure 4.As we can see from Figure12, SOC of all twelve battery cells were estimated by the proposed algorithm simultaneously. Usually, SOC of battery cells were estimated by the AH counting algorithm; as time goes by, accumulated error of AH counting algorithm increases, so estimation of SOC deviated from the tested one. At particular times controlled by control logic of timing sequence of proposed SOC estimate strategy, extended Kalman filter intermittently operates to correct accumulation error of the AH counting algorithm. As a result, errors between SOC estimated by the proposed strategy and true SOC tested by the experiment stayed in a relatively small range. Accuracy and computational efficiency of the proposed algorithm were verified.Figure 12
Comparison of SOC of battery cells estimated by proposed algorithm and true SOC of battery cells.SOC of battery pack is an important parameter for vehicle control strategy. SOC of battery pack was estimated according to the definition in Section3.5. Comparison of SOC of battery pack estimated by the proposed algorithm, AH counting method, open-circuit voltage method, and extended Kalman filter and true SOC of battery pack tested by experiment under FUDS was illustrated in Figure 13. SOC estimation error is shown in Figure 14. The SOC estimation error of open-circuit voltage method is shown in Figure 14(a). The SOC estimation error of AH counting method is shown in Figure 14(b). The SOC estimation error of EKF is shown in Figure 14(c). The SOC estimation error of proposed algorithm is shown in Figure 14(d). As shown in Figure 14(a), the accuracy of SOC estimated by OCV method is low, but it can get accurate initial value of SOC when vehicle is just starting up and battery cells were in static conditions. As shown in Figure 14(b), AH counting algorithm cannot correct error by itself; as time goes by, the error of SOC estimation will be bigger and bigger. As shown in Figure 14(c), the error between estimated SOC of EKF and true SOC tested by experiment is less than 0.025. As shown in Figure 14(d), the proposed algorithm operates extended Kalman filter intermittently to correct accumulation error of the AH counting algorithm, so its SOC estimation accuracy is a little lower than EKF alone but higher than AH counting algorithm alone. Excluding SOC below 0.17, the error between the estimated SOC of the proposed algorithm and true SOC is less than 0.035.Figure 13
Comparison of SOC estimated by the proposed algorithm, EKF, AH counting method, and OCV method and true SOC tested by experiment under FUDS.Figure 14
SOC estimation error.
(a)
SOC estimation error of OCV method alone
(b)
SOC estimation error of AH method alone
(c)
SOC estimation error of EKF method alone
(d)
SOC estimation error of the proposed methodWe can see from Figure14 that EKF has the highest accuracy, but EKF algorithm has high computational complexity and cannot be used to estimate SOC of multiple battery cells simultaneously with limited computing speed of BCU. The accuracy of the proposed algorithm is a bit lower than EKF but the computational complexity of proposed algorithm is much better and suitable for estimating SOC of multiple battery cells simultaneously for battery equalization control. Taking both accuracy and computational complexity into consideration, the proposed algorithm has the most potential to use in battery equalization control that uses SOC directly as standard for battery consistency judgment. The computational complexity of EKF and the proposed algorithm will be analyzed and tested in detail in the next section.


## 5. Processor-in-the-Loop Tests

### 5.1. Time Complexity Analysis of the Proposed Algorithm

Computational efficiency of C program depended greatly on time complexity of the intrinsic functions of the program [14]. Computational efficiency of C code not only is decided by microcontroller’s response capability to various emergency interrupt requests, but also depends on calculation speed of the microcontroller. The purpose of the proposed algorithm is to estimate SOC of multiple battery cells with high accuracy and low computational complexity; it is necessary to evaluate computational complexity of the proposed algorithm.The discrete difference formula of traditional AH counting algorithm can be represented as(12)yn=yn-1+K×Ts×un-1,where u represents input of the integral,y represents output,K represents gain of input signal, and Ts represents the interval time of sampling.From (12), we can see that the execution frequency of AH counting algorithm is f1n=n. The execution frequency of extended Kalman filter algorithm can be calculated according to formula of extended Kalman filter in Section 3.2; it is f2n=n2+1. In the proposed algorithm, only one cell of the twelve battery cells operates the extended Kalman filter algorithm at any specific time, and the rest of the battery cells operate AH counting algorithm. As a result, execution frequency of the proposed algorithm can be represented as f3(n)=n2+n. On the basis of order of magnitude, computational complexity of the proposed algorithm can be represented as follows:(13)T1n=Of3n=On2.Computational complexity of extended Kalman filter algorithm to estimate one battery cell isT2(n)=Of2n=On2.In conclusion, the computational complexity of the proposed algorithm is of the same order of magnitude as that of extended Kalman filter algorithm, but it can estimate SOC of twelve battery cells simultaneously. Therefore, the proposed algorithm has great advantages in reducing the use of microcontroller computing resources and is suitable for battery equalization control.


### 5.2. Processor-in-the-Loop Tests

A processor-in-the-loop (PIL) test was carried out to verify the effectiveness of the proposed algorithm. In the test, C code of the proposed algorithm was downloaded to an actual microcontroller of BCU [15]. A high-precision battery model built based on test data was operated in an industrial computer. The microcontroller is connected to the industrial computer through a serial port to achieve data exchange. The PIL system provides a platform close to real working environment to verify the effectiveness of the proposed algorithm.In the PIL test system, Spansion MB9BF568R 32-bit microcontroller is used as BCU. Battery model based on test data was built with Simulink and transformed to C code and downloaded to industrial computer. SOC estimation algorithms were built with Simulink and transformed to C code; IAR Embedded Workbench compiler and J-link are used to compile and download C code to BCU. The industrial computer and BCU were connected with a serial port to transmit data. Processor-in-the-loop test platform is shown in Figure15.Figure 15
Processor-in-the-loop test platform.To verify the computational efficiency of the proposed algorithm, two tests were carried out on the PIL system:(1) test one: download C code of the proposed algorithm to target microcontroller; use the proposed algorithm to estimate SOC of twelve battery cells and the battery pack SOC simultaneously; (2) test two: download C code of extended Kalman filter algorithm to target microcontroller; use twelve extended Kalman filter algorithms to estimate SOC of twelve battery cells and battery pack SOC simultaneously.Results of test one are shown in Figure16. As shown in Figure 16, SOC of battery pack estimated by the proposed algorithm running in the BCU was compared to SOC of battery pack estimated by the proposed algorithm running in industrial computer. We can see from Figure 16 that the two results maintain a high degree of consistency with each other, which indicates that the proposed algorithm can run in BCU effectively and accurately. Meanwhile, in test two, the BCU operating twelve traditional extended Kalman filter algorithms at the same time to estimate SOC of twelve battery cells was unable to give a result, which indicates that the calculation quantity exceeds the calculation ability of BCU.Figure 16
PIL test results of test one.PIL test results indicate that the proposed algorithm achieved good real-time performance and high SOC estimation accuracy. The computational complexity of the proposed algorithm is much better than EKF alone and suitable for estimating SOC of multiple battery cells simultaneously. Taking both accuracy and computational complexity into consideration, the proposed algorithm has the most potential to use in battery equalization control which uses SOC directly as standard for battery consistency judgment.


## 5.1. Time Complexity Analysis of the Proposed Algorithm

Computational efficiency of C program depended greatly on time complexity of the intrinsic functions of the program [14]. Computational efficiency of C code not only is decided by microcontroller’s response capability to various emergency interrupt requests, but also depends on calculation speed of the microcontroller. The purpose of the proposed algorithm is to estimate SOC of multiple battery cells with high accuracy and low computational complexity; it is necessary to evaluate computational complexity of the proposed algorithm.The discrete difference formula of traditional AH counting algorithm can be represented as(12)yn=yn-1+K×Ts×un-1,where u represents input of the integral,y represents output,K represents gain of input signal, and Ts represents the interval time of sampling.From (12), we can see that the execution frequency of AH counting algorithm is f1n=n. The execution frequency of extended Kalman filter algorithm can be calculated according to formula of extended Kalman filter in Section 3.2; it is f2n=n2+1. In the proposed algorithm, only one cell of the twelve battery cells operates the extended Kalman filter algorithm at any specific time, and the rest of the battery cells operate AH counting algorithm. As a result, execution frequency of the proposed algorithm can be represented as f3(n)=n2+n. On the basis of order of magnitude, computational complexity of the proposed algorithm can be represented as follows:(13)T1n=Of3n=On2.Computational complexity of extended Kalman filter algorithm to estimate one battery cell isT2(n)=Of2n=On2.In conclusion, the computational complexity of the proposed algorithm is of the same order of magnitude as that of extended Kalman filter algorithm, but it can estimate SOC of twelve battery cells simultaneously. Therefore, the proposed algorithm has great advantages in reducing the use of microcontroller computing resources and is suitable for battery equalization control.


## 5.2. Processor-in-the-Loop Tests

A processor-in-the-loop (PIL) test was carried out to verify the effectiveness of the proposed algorithm. In the test, C code of the proposed algorithm was downloaded to an actual microcontroller of BCU [15]. A high-precision battery model built based on test data was operated in an industrial computer. The microcontroller is connected to the industrial computer through a serial port to achieve data exchange. The PIL system provides a platform close to real working environment to verify the effectiveness of the proposed algorithm.In the PIL test system, Spansion MB9BF568R 32-bit microcontroller is used as BCU. Battery model based on test data was built with Simulink and transformed to C code and downloaded to industrial computer. SOC estimation algorithms were built with Simulink and transformed to C code; IAR Embedded Workbench compiler and J-link are used to compile and download C code to BCU. The industrial computer and BCU were connected with a serial port to transmit data. Processor-in-the-loop test platform is shown in Figure15.Figure 15
Processor-in-the-loop test platform.To verify the computational efficiency of the proposed algorithm, two tests were carried out on the PIL system:(1) test one: download C code of the proposed algorithm to target microcontroller; use the proposed algorithm to estimate SOC of twelve battery cells and the battery pack SOC simultaneously; (2) test two: download C code of extended Kalman filter algorithm to target microcontroller; use twelve extended Kalman filter algorithms to estimate SOC of twelve battery cells and battery pack SOC simultaneously.Results of test one are shown in Figure16. As shown in Figure 16, SOC of battery pack estimated by the proposed algorithm running in the BCU was compared to SOC of battery pack estimated by the proposed algorithm running in industrial computer. We can see from Figure 16 that the two results maintain a high degree of consistency with each other, which indicates that the proposed algorithm can run in BCU effectively and accurately. Meanwhile, in test two, the BCU operating twelve traditional extended Kalman filter algorithms at the same time to estimate SOC of twelve battery cells was unable to give a result, which indicates that the calculation quantity exceeds the calculation ability of BCU.Figure 16
PIL test results of test one.PIL test results indicate that the proposed algorithm achieved good real-time performance and high SOC estimation accuracy. The computational complexity of the proposed algorithm is much better than EKF alone and suitable for estimating SOC of multiple battery cells simultaneously. Taking both accuracy and computational complexity into consideration, the proposed algorithm has the most potential to use in battery equalization control which uses SOC directly as standard for battery consistency judgment.


## 6. Conclusions

(1)
In traditional battery equalization strategy, open-circuit voltage (OCV) of battery cells was used to judge the difference of SOC between them. However, OCV is not only determined by SOC, but also influenced by internal resistance, polarization voltage, capacity, and other nonlinear factors. As a result, OCV is not an ideal indicator of SOC differences, especially in transient conditions. In order to control battery consistency accurately, it is best to use SOC directly as standard for battery consistency judgment and control. To achieve this, an algorithm that can estimate SOC of multiple battery cells simultaneously with low computational complexity and high accuracy is needed.
(2)
Limited by computing speed of Battery Control Unit (BCU), existing SOC estimation method is hard to estimate SOC of each battery cell simultaneously with high accuracy. In this research, a new SOC estimation strategy was proposed, in which AH counting algorithm with low computational complexity is used as the main procedure to estimate SOC of each battery cell, and extended Kalman filter algorithm with high accuracy was operated intermittently to correct accumulated error of AH counting algorithm.
(3)
Battery model is established based on experimental data, and the proposed algorithm was programmed by Simulink. Simulation and test results indicate that, excluding the SOC below 0.17, error between estimated SOC and true SOC tested by experiment is less than 0.035.
(4)
A processor-in-the-loop test system was established to verify the actual performance of the proposed algorithm. Results of simulation and tests indicate that the proposed algorithm can estimate SOC of multiple battery cells simultaneously and achieved good real-time performance and high accuracy.



---

*Source: 5390149-2017-08-30.xml*