Kalman Filtering for Electric Vehicle Battery Pack SOC Estimation

In my research, I focused on the accurate and online estimation of the state of charge (SOC) of an electric vehicle battery pack. The electric vehicle battery pack is not only the main energy carrier of an electric vehicle but also the key component that determines driving range, safety, and cycle life. Because the electric vehicle battery pack operates under highly dynamic current profiles, its SOC behaves as a nonlinear and time-varying state. My goal was to build a practical SOC estimation method that can be implemented on a real electric vehicle battery pack management platform while maintaining acceptable accuracy and real-time performance.

I began by examining why electric vehicles have become an important direction for transportation. The shortage of petroleum resources, the increase in atmospheric pollution, and the demand for lower carbon emissions have all pushed the automotive industry toward electrification. An electric vehicle uses an electric motor for propulsion and relies on an electric vehicle battery pack for energy storage. The main types of electric vehicles can be summarized as follows.

Electric vehicle categories and their main characteristics
Type Energy source Main advantage Main challenge
Battery electric vehicle Electric vehicle battery pack only Zero tailpipe emission, simple drivetrain Limited range, long charging time
Hybrid electric vehicle Internal combustion engine and electric vehicle battery pack Good range, improved fuel economy Complex control, high battery stress
Fuel cell electric vehicle Fuel cell with auxiliary electric vehicle battery pack High theoretical efficiency, low emission Hydrogen storage, high cost

Among these categories, the electric vehicle battery pack is always a critical subsystem. For a pure electric vehicle, the electric vehicle battery pack supplies all traction energy. For a hybrid electric vehicle, the electric vehicle battery pack provides peak power and recuperates braking energy. For a fuel cell electric vehicle, the electric vehicle battery pack buffers the slow dynamics of the fuel cell stack. Therefore, accurate SOC estimation for the electric vehicle battery pack is essential in every architecture.

The requirements for an electric vehicle battery pack are much stricter than those for consumer electronics. I summarized the main requirements as follows.

Performance requirements for an electric vehicle battery pack
Requirement Description
High energy density The electric vehicle battery pack should be light and compact while storing sufficient energy for a reasonable driving range.
High power density The electric vehicle battery pack must support acceleration, climbing, and regenerative braking.
Fast charging capability The electric vehicle battery pack should accept high charging current without excessive heating.
Long cycle life The electric vehicle battery pack should endure many charge and discharge cycles with low capacity fade.
Wide temperature tolerance The electric vehicle battery pack should work safely over a broad temperature range.
High safety The electric vehicle battery pack must resist overcharge, overdischarge, short circuit, and thermal runaway.
Low cost and recyclability The electric vehicle battery pack should be economically acceptable and environmentally friendly.

I selected lithium iron phosphate polymer cells for my study because they offer a favorable combination of safety, cycle life, and cost. The positive electrode material is lithium iron phosphate, and the negative electrode is graphitic carbon. The cell works through reversible insertion and extraction of lithium ions. The charge and discharge reactions can be written as follows.

$$LiFePO_4 \rightleftharpoons Li_{1-x}FePO_4 + xLi^+ + xe^-$$

$$FePO_4 + xLi^+ + xe^- \rightleftharpoons Li_xFePO_4$$

During charging, lithium ions leave the positive electrode, pass through the separator and electrolyte, and enter the negative electrode. During discharging, the process reverses. Because the olivine structure of lithium iron phosphate is stable, the electric vehicle battery pack based on this chemistry can tolerate abuse conditions better than many other lithium-ion chemistries. I compared several common battery chemistries in the following table.

Comparison of common battery chemistries for an electric vehicle battery pack
Chemistry Specific energy (Wh/kg) Energy density (Wh/L) Specific power (W/kg) Cycle life Safety
Lead-acid 30-45 60-90 200-300 400-600 Good
Nickel-cadmium 40-60 80-110 150-350 600-1200 Moderate
Nickel-metal hydride 60-70 130-170 150-300 600-1200 Good
Lithium-ion 90-130 140-200 250-450 800-1200 Good
Lithium iron phosphate 160-170 ~200 250-450 Good Excellent

For an electric vehicle battery pack, the most important measurable quantities are voltage, current, and temperature. I modeled the electric vehicle battery pack as a nonlinear dynamic system whose SOC is the hidden state. The SOC itself is defined as the ratio of remaining capacity to nominal capacity.

$$SOC = \frac{Q_c}{Q_n} = 1 – \frac{Q_i}{Q_n} = 1 – \frac{Q_I}{\eta Q_n}$$

Here, \(Q_n\) is the nominal capacity, \(Q_c\) is the remaining standard capacity, \(Q_i\) is the standard used capacity, \(Q_I\) is the actual used capacity, and \(\eta\) is an efficiency coefficient that combines the effects of discharge rate and temperature. For an electric vehicle battery pack, I followed the principle that the SOC of the whole pack should be represented by the minimum SOC among all cells, because the weakest cell limits the usable energy.

Many factors influence the SOC of an electric vehicle battery pack. I summarized the main factors and their effects in the following table.

Factors affecting SOC estimation for an electric vehicle battery pack
Factor Effect on available capacity Practical implication
Discharge rate Higher current reduces usable capacity Rate compensation is necessary
Temperature Higher temperature increases available capacity up to a limit Temperature model is required
Cycle number Capacity fades with aging State of health should be considered
Self-discharge Stored charge decreases with time Initial SOC may be uncertain
Cell imbalance Pack capacity is limited by the weakest cell Cell-level monitoring is important
Polarization and hysteresis Terminal voltage differs from open-circuit voltage Dynamic model must include relaxation effects

I reviewed conventional SOC estimation methods before proposing my own solution. The discharge test method is accurate but cannot be used online. The open-circuit voltage method gives a good initial value but requires a long rest period. The ampere-hour counting method is simple and real-time but accumulates current measurement error. The internal resistance method is sensitive to operating conditions. The load voltage method is affected by current variation. Neural network methods can fit nonlinear behavior but need large training data. A comparison is given below.

Comparison of SOC estimation methods for an electric vehicle battery pack
Method Online capability Main advantage Main limitation
Discharge test No Very accurate in laboratory Interrupts operation, slow
Open-circuit voltage Partly Good initial value Long rest time, flat middle region
Ampere-hour counting Yes Simple, real-time Accumulated error, needs initial SOC
Internal resistance Yes Useful near end of discharge Complex resistance behavior
Load voltage Yes Simple online indication Depends strongly on current
Neural network Yes Strong nonlinear mapping Large training data, uncertain generalization

To overcome the limitations of single methods, I adopted a Kalman filtering correction algorithm. The Kalman filter estimates a dynamic system state from noisy measurements. For an electric vehicle battery pack, the state is SOC, the input is current, and the measurement is terminal voltage. The standard Kalman filter is suitable for linear systems.

$$x_{k+1} = A_k x_k + B_k u_k + w_k$$

$$y_k = C_k x_k + D_k u_k + v_k$$

Here, \(w_k\) is process noise and \(v_k\) is measurement noise. Both are assumed to be zero-mean Gaussian white noise. The prediction and correction steps are

$$x_k^- = A_{k-1} x_{k-1}^+ + B_{k-1} u_{k-1}$$

$$P_k^- = A_{k-1} P_{k-1}^+ A_{k-1}^T + D_w$$

$$L_k = \frac{P_k^- C_k^T}{C_k P_k^- C_k^T + D_v}$$

$$x_k^+ = x_k^- + L_k (Y_k – C_k x_k^- – D_k u_k)$$

$$P_k^+ = (1 – L_k C_k) P_k^-$$

Because an electric vehicle battery pack is nonlinear, I used the extended Kalman filter (EKF). The nonlinear state-space model is

$$x_{k+1} = f(x_k, u_k) + w_k$$

$$y_k = g(x_k, u_k) + v_k$$

Linearization is performed around the current estimate. The Jacobians are

$$A_{k-1} = \left. \frac{\partial f}{\partial x} \right|_{x_{k-1}^+}$$

$$C_k = \left. \frac{\partial g}{\partial x} \right|_{x_k^-}$$

I studied several battery models for the electric vehicle battery pack. The combined model, simplified model, hysteresis model, and polarization correction model each have advantages. I selected the combined model because it avoids direct open-circuit voltage measurement while retaining a compact form.

Battery models considered for the electric vehicle battery pack
Model State Output equation Comment
Combined model SOC \(y = K_0 – R i – K_1/x – K_2 x + K_3 \ln(x) + K_4 \ln(1-x)\) Compact and suitable for EKF
Simplified model SOC \(y = OCV(SOC) – R i\) Requires OCV-SOC relation
Hysteresis model SOC and hysteresis \(y = OCV(SOC) – R i + h\) Captures relaxation effects
Polarization correction model SOC, filter state, hysteresis Includes low-pass dynamics Higher accuracy, higher complexity

For my electric vehicle battery pack, I built a rate-dependent SOC model. I discharged fully charged cells at different currents and recorded the actual capacity. The following table summarizes the measured rate coefficient.

Discharge-rate coefficient data for my electric vehicle battery pack
Current (A) Standard capacity (Ah) Actual capacity (Ah) Rate coefficient \(\eta_i\)
0.5 14.967 14.967 1.000
2 14.967 14.736 1.016
3 14.967 14.713 1.017
4 14.967 14.647 1.022
5 14.967 14.540 1.029
6 14.967 14.423 1.038
7 14.967 14.353 1.043
8 14.967 14.283 1.048
9 14.967 14.202 1.054
10 14.967 14.165 1.057
11 14.967 14.142 1.058
12 14.967 14.108 1.061
13 14.967 14.113 1.061

I fitted the rate coefficient with a second-order polynomial.

$$\eta_i = a_i i^2 + b_i i + c_i$$

For my data, the fitted values are approximately \(a_i = -2.08 \times 10^{-4}\), \(b_i = 7.41 \times 10^{-3}\), and \(c_i = 1.002\). This model allows the electric vehicle battery pack to compensate for capacity loss under high current.

I also built a temperature-dependent SOC model. The electric vehicle battery pack surface temperature was used instead of ambient temperature because it better reflects the internal condition of the pack. The following table shows the measured capacity at different temperatures.

Temperature-dependent capacity for my electric vehicle battery pack
Temperature (C) Discharged capacity (Ah) Temperature coefficient \(\eta_T\)
-20 10.06 0.672
0 13.28 0.887
20 14.68 0.981
25 14.97 1.000
40 15.75 1.052
60 15.88 1.061

I represented the temperature coefficient with a fourth-order polynomial.

$$\eta_T = a_T T^4 + b_T T^3 + c_T T^2 + d_T T + e_T$$

In the embedded software, I stored this relationship as a look-up table to reduce computation time. The electric vehicle battery pack temperature is measured by a surface-mounted sensor, and the temperature coefficient is updated every sampling period.

For the open-circuit voltage model, I rested the electric vehicle battery pack after partial discharge and recorded the stable terminal voltage. The relationship between open-circuit voltage and SOC was then approximated by piecewise functions. A typical form is

$$SOC = \begin{cases}
1, & V_{OC} > 3335 \\
f_1(V_{OC}), & 3327 \le V_{OC} \le 3335 \\
f_2(V_{OC}), & 3297 < V_{OC} < 3327 \\
f_3(V_{OC}), & 3283 \le V_{OC} \le 3297 \\
f_4(V_{OC}), & 3179 < V_{OC} < 3283 \\
f_5(V_{OC}), & 2828 \le V_{OC} \le 3179 \\
0, & V_{OC} < 2828
\end{cases}$$

Here, \(V_{OC}\) is expressed in millivolts. This model is mainly used to initialize the SOC of the electric vehicle battery pack when the pack has been at rest. Because the middle region of the lithium iron phosphate cell is very flat, the open-circuit voltage method alone cannot provide high accuracy during normal driving. Therefore, I used it only as an auxiliary method.

My proposed method is a Kalman filtering correction algorithm. It combines the open-circuit voltage method, the ampere-hour counting method, and the extended Kalman filter. The open-circuit voltage method supplies a reasonable initial SOC. The ampere-hour method provides fast online updates. The extended Kalman filter corrects the estimation using the measured terminal voltage of the electric vehicle battery pack. The state equation is

$$x_{k+1} = x_k – \frac{\eta_i \eta_T \Delta t}{Q_n} i_k$$

The output equation is

$$y_k = K_0 – R i_k – \frac{K_1}{x_k} – K_2 x_k + K_3 \ln(x_k) + K_4 \ln(1-x_k)$$

I identified the model parameters from experimental data. The identified values are listed below.

Identified parameters for the EKF combined model of my electric vehicle battery pack
Parameter Value
\(K_0\) 3.391
\(R\) 0.0048
\(K_1\) -0.000268
\(K_2\) 0.1495
\(K_3\) 0.111
\(K_4\) -0.01955

The Jacobians used in the EKF are

$$A_{k-1} = 1$$

$$C_k = \frac{K_1}{(x_k^-)^2} – K_2 + \frac{K_3}{x_k^-} – \frac{K_4}{1-x_k^-}$$

The recursive steps are

$$x_k^- = x_{k-1}^+ – \frac{\eta_i \eta_T \Delta t}{Q_n} i_{k-1}$$

$$y_k = K_0 – R i_k – \frac{K_1}{x_k^-} – K_2 x_k^- + K_3 \ln(x_k^-) + K_4 \ln(1-x_k^-)$$

$$P_k^- = A_{k-1} P_{k-1}^+ A_{k-1}^T + D_w$$

$$L_k = \frac{P_k^- C_k^T}{C_k P_k^- C_k^T + D_v}$$

$$x_k^+ = x_k^- + L_k (Y_k – y_k)$$

$$P_k^+ = (1 – L_k C_k) P_k^-$$

In my implementation, the electric vehicle battery pack SOC is updated every five seconds. The first four seconds use ampere-hour counting with rate and temperature compensation. The fifth second uses the extended Kalman filter on each cell, and the minimum cell SOC becomes the pack SOC. This alternating strategy reduces computation load while preserving accuracy.

I designed a complete hardware platform for online SOC estimation of the electric vehicle battery pack. The platform includes a data acquisition circuit, a microcontroller unit, a display module, a storage module, communication interfaces, and a protection circuit. The overall structure is summarized below.

Hardware modules for the electric vehicle battery pack SOC estimation platform
Module Function Key component
Data acquisition Measures cell voltage, pack voltage, current, and temperature Max1174, HCF4051, LTS 6-NP, LM35
Processing unit Runs SOC algorithm and manages peripherals MC9S08AW32
Display Shows SOC, voltage, current, and temperature 12864 graphic LCD
Storage Stores previous SOC and cycle count 24C08 EEPROM
Communication Transfers data to host and expansion boards RS-232, SPI
Protection Disconnects the electric vehicle battery pack under fault Power MOSFET and driver

The current measurement is critical for the electric vehicle battery pack. I used a Hall-effect current sensor with high linearity and low temperature drift. The sensor output voltage is proportional to the measured current.

$$V_{OUT} = V_0 \pm 0.625 \left( \frac{I_P}{I_{PN}} \right)$$

For voltage measurement, I used a precision resistor divider. For temperature measurement, I used an integrated sensor whose output is proportional to Celsius temperature.

$$V_{OUT} = 10 \text{ mV}/^\circ C \times T$$

The protection circuit continuously checks cell voltage, pack current, and temperature. If any variable exceeds its safe range, the microcontroller turns off the MOSFET and disconnects the electric vehicle battery pack. The protection thresholds I used are listed in the following table.

Protection thresholds for my electric vehicle battery pack
Parameter Threshold
Cell overcharge voltage 3.8 V
Cell overdischarge voltage 2.8 V
Maximum discharge current 15 A
Maximum charge current 7.5 A
Maximum surface temperature 45 C
Maximum temperature rise 4 C per 10 s

The software for the electric vehicle battery pack SOC estimator was written in C and organized into modules. The main modules are system initialization, AD sampling, SOC estimation, protection, communication, display, and data storage. The SOC estimation module uses the Kalman filtering correction algorithm. The data sampling module is triggered by a real-time clock interrupt every second. The SOC algorithm runs every five seconds.

Software modules for the electric vehicle battery pack SOC estimator
Module Task
Initialization Configures clock, I/O, serial port, SPI, I2C, LCD, and timer
AD sampling Selects analog channels and reads voltage, current, and temperature
SOC estimation Runs open-circuit voltage initialization, ampere-hour counting, and EKF correction
Protection Checks limits and controls the disconnect switch
Communication Sends data to host and receives data from expansion boards
Display Updates the LCD with SOC and other pack variables
Storage Saves final SOC and cycle number

I used look-up tables to reduce the computational burden on the microcontroller. The SOC initialization table, rate coefficient table, temperature coefficient table, Jacobian table, and output voltage table were all precomputed. For example, the SOC initialization table was stored as

$$SOC_0′ = 10^4 \times SOC_0 = table[V_{OC} – 3335]$$

The rate coefficient table was stored as

$$\eta_i’ = 10^4 \eta_i = table[i/0.05]$$

The temperature coefficient table was stored as

$$\eta_T’ = 10^4 \eta_T = table[T + 20]$$

These tables made it possible to execute the Kalman filtering correction algorithm in real time on the electric vehicle battery pack without using floating-point operations for every calculation.

I validated the method using three driving cycles: HWFET, UDDS, and FUDS. The electric vehicle battery pack was connected to a programmable electronic load. The load current profile followed the selected driving cycle, and the maximum discharge current corresponded to the maximum speed of the cycle. The experimental conditions are summarized below.

Experimental conditions for the electric vehicle battery pack tests
Item Value
Cell chemistry Lithium iron phosphate polymer
Nominal cell voltage 3.2 V
Nominal cell capacity 15 Ah
Pack configuration 4 cells in series
Pack nominal voltage 12.8 V
Pack nominal capacity 15 Ah
Sampling period 1 s
SOC algorithm period 5 s
Maximum discharge current 15 A

For the HWFET test, the electric vehicle battery pack started from a fully charged state. The initial cell voltages were 3.442 V, 3.444 V, 3.410 V, and 3.388 V. The open-circuit voltage method gave an initial pack SOC of 1. The discharge lasted 4293 s and completed six HWFET cycles. The final SOC was 0. The maximum SOC estimation error was 4.04%, and the average error was 1.74%.

HWFET test results for my electric vehicle battery pack
Quantity Value
Duration 4293 s
Completed cycles 6
Initial SOC 100%
Final SOC 0%
Maximum output power 195 W
Initial surface temperature 26 C
Final surface temperature 30 C
Maximum SOC error 4.04%
Average SOC error 1.74%

For the UDDS test, the electric vehicle battery pack was not fully charged. The measured open-circuit voltages were 3.292 V, 3.291 V, 3.291 V, and 3.290 V. The corresponding cell SOC values were 65.8%, 63.7%, 63.7%, and 61.6%. The stored SOC from the previous run was 68.8%. I averaged the open-circuit result and the stored value to obtain an initial pack SOC of 65.2%. The discharge lasted 4980 s and completed five UDDS cycles. The maximum output power was 192.9 W. The maximum SOC error was 7.8%, and the average error was 3.11%.

UDDS test results for my electric vehicle battery pack
Quantity Value
Duration 4980 s
Completed cycles 5
Initial SOC 65.2%
Final SOC 0%
Maximum output power 192.9 W
Maximum SOC error 7.8%
Average SOC error 3.11%

For the FUDS test, the electric vehicle battery pack started at a medium SOC. The measured open-circuit voltages were 3.297 V, 3.296 V, 3.296 V, and 3.295 V. The corresponding cell SOC values were 74.8%, 73.2%, 73.2%, and 71.5%. The stored SOC was 69.1%. The initial pack SOC was therefore 70.3%. The discharge lasted 4255 s and completed four FUDS cycles. The maximum output power was 194.7 W. The final SOC was 21.7%. The SOC estimation error remained within the required range.

FUDS test results for my electric vehicle battery pack
Quantity Value
Duration 4255 s
Completed cycles 4
Initial SOC 70.3%
Final SOC 21.7%
Maximum output power 194.7 W
Maximum SOC error Within 10%

In my experiments, I calculated the reference SOC of the electric vehicle battery pack after the test using the full current record. The standard used capacity was obtained by

$$Q_i = \sum \eta_i \eta_T i(t) \Delta t$$

The reference SOC was then

$$SOC = 1 – \frac{Q_i}{Q_n}$$

This post-processing step provided the true SOC curve for comparison. The Kalman filtering correction algorithm tracked the true SOC closely in all three driving cycles. The largest error occurred during rapid current changes, but the EKF correction reduced the error quickly. The average error was below 5% in all tests, which satisfies the typical requirement for an electric vehicle battery pack.

I also verified the technical specifications of the completed system. The main indicators are listed below.

Technical specifications of my electric vehicle battery pack SOC estimator
Specification Value
Number of monitored cells 4
Maximum SOC error < 10%
Average SOC error < 5%
Overcharge protection 3.8 V per cell
Overdischarge protection 2.8 V per cell
Maximum discharge current 1 C
Maximum charge current 0.5 C
Maximum temperature 45 C
Data acquisition period 1 s
SOC update period 5 s

From the experimental results, I observed several important behaviors of the electric vehicle battery pack. First, the open-circuit voltage method provided a useful initial SOC, especially when combined with the stored SOC from the previous run. Second, the first 200 seconds after the pack started discharging were dominated by relaxation and hysteresis effects. During this period, I used ampere-hour counting to avoid large EKF errors. Third, once the EKF was active, it corrected the SOC estimate effectively and reduced the accumulated error from current measurement. Fourth, the alternating use of ampere-hour counting and EKF kept the computational load low while maintaining accuracy.

The electric vehicle battery pack remains a complex electrochemical system. My method accounts for discharge rate and temperature, but other factors also matter. Self-discharge, state of health, and cell imbalance can change the available capacity. In future work, I would include a state-of-health estimator and a cell balancing strategy. I would also test larger electric vehicle battery packs with more cells in series and parallel. A larger pack will produce more variable thermal gradients and more severe imbalance, which will further test the SOC algorithm.

I also recognize that the automotive environment introduces high noise and electromagnetic interference. The SOC estimation platform for the electric vehicle battery pack should be designed with better shielding, filtering, and fault diagnosis. A low-power mode would reduce the energy consumed by the management system itself. In addition, a dedicated battery management integrated circuit could improve speed and reliability, although most available chips target small low-voltage batteries rather than a full electric vehicle battery pack.

In summary, I developed an online SOC estimation method for an electric vehicle battery pack based on Kalman filtering correction. The method combines open-circuit voltage initialization, rate and temperature compensated ampere-hour counting, and extended Kalman filtering. I built the hardware and software platform, established the required battery models, and validated the approach with HWFET, UDDS, and FUDS driving cycles. The results show that the proposed method achieves stable and accurate SOC estimation for the electric vehicle battery pack under dynamic operating conditions. The maximum error remains below 10%, and the average error remains below 5%, which meets the practical requirements for an electric vehicle battery pack management system.

For future development, I believe that SOC estimation for the electric vehicle battery pack will move toward more adaptive and intelligent models. The algorithm should update its parameters as the pack ages. It should also be portable across different cell chemistries and pack configurations. Real-time implementation on high-performance embedded processors will make it possible to include more electrochemical detail without sacrificing speed. As the electric vehicle battery pack becomes more advanced, accurate SOC estimation will remain one of the most important functions in the battery management system.

Scroll to Top