Main Content

Estimate State of Charge of Lithium Iron Phosphate Battery

Since R2024b

This example shows how to estimate the state of charge (SOC) of lithium iron phosphate (LFP) batteries by using the Coulomb Counting method with error correction. The Coulomb counting method is implemented at 1 second sample time. To correct the estimate of the Coulomb counting method, the example implements an extended Kalman filter with a sampling time of 10 seconds. The initial SOC of the battery is equal to 0.4. The estimator uses an initial condition for the SOC equal to 0.6. The LFP battery keeps charging and discharging for six hours. The estimator converges to the real value of the SOC in approximately half an hour and then follows the real SOC value.

Open Model

View Simulation Results

This plot shows the real and estimated state of charge of the battery.

Results from Real-Time Simulation

This example has been tested on a Speedgoat Performance real-time target machine with an Intel® 3.5 GHz i7 multi-core CPU. This model can run in real time with a step size of 50 microseconds.

See Also

|

Related Topics