Main Content

Charge and Discharge Battery Module with State of Charge Estimator

Since R2024a

This example shows how to cyclically charge and discharge a battery module while estimating the state of charge (SOC) of the three parallel assemblies of the module over time. This example uses the SOC estimation to switch between the charging and discharging profiles. For the estimation, the Kalman filter uses an initial SOC estimation and the voltage, current, and temperature of the parallel assemblies. The model estimates the temperature of the parallel assemblies from the average of the cell temperatures of each parallel assembly.

To further highlight the stability of the filter, this example combines the filter inputs with noise signal, that represents measurement noise, and the initial SOC values are purposely set to wrong values.

Model Overview

Open the stateEstimation model.

modelname = "stateEstimation";

The model comprises a pre-generated Module block, a Battery CC-CV block, and a SOC Estimator block. The Module block represents a battery module with three parallel assemblies with a gap between each parallel assembly of 0.5 mm, a detailed model resolution, and an enabled ambient thermal path. Each parallel assembly comprises four single-stacked pouch cells. Each pouch cell measures 300 mm in length, 100 mm in height, and 10 mm in thickness. For more information on how to generate the Module block, open the controlledChargingCreatelib.mlx file.

Run the simulation.

ssc_statEstim = sim(modelname);

Simulation Results

This plot shows a comparison between the estimated and the real SOC values of the parallel assemblies inside the module.


See Also

| | |

Related Topics