Contenido principal

Estimate Battery State of Charge Using Bar-Delta Filtering

Since R2025a

This example shows how to estimate the state of charge (SOC) of a battery cell by using bar-delta filtering. The battery pack comprises five series-connected cells. Each battery cell has an initial SOC that varies between 0.45 and 0.65. The estimation technique uses a pack bar SOC estimator to obtain the pack-average SOC. A cell delta SOC estimator uses the pack-average SOC to estimate the cell SOC. The battery keeps charging and discharging for six hours. The estimator converges to the real value of the SOC in less than 10 minutes and then follows the real SOC value. The bar-delta filtering is computationally efficient as it uses one full Kalman filter and Ns one-state Kalman filters, where Ns is the number of series-connected cells.

Open Model

View Simulation Results from Simscape Logging

This plot shows the estimated and real SOC values for cell 1 and the estimation error for all cells.

Results from Real-Time Simulation

This example has been tested on these platforms:

  • Speedgoat™ Performance real-time target machine with an Intel® 3.5 GHz i7 multi-core CPU and 4 GB RAM.

  • dSPACE® SCALEXIO LabBox with Intel® Core XEON E3-1275v3 at 3.5GHz and 4 GB RAM.

You can run this model in real time with a step size of 70 microseconds by using the Simscape local solver. For small sample rates, a task overrun might occur during the initial task execution due to a cold cache. To avoid this overrun, if the selected platform supports these options, relax the start-up behavior by specifying a limited number of task overruns or increasing the sample time of periodic tasks during the start-up phase of the real-time application.

See Also

|

Topics