Charge and Discharge Module Assembly with Coolant Control
This example shows how to perform a charging and discharging cycle on a battery module assembly while monitoring the cell temperature and enabling cooling.
A Battery CC-CV block cyclically charges and discharges the battery module assembly. At the start of the simulation, each cell of the module assembly starts at a different temperature. During the cycle, a Battery Coolant Control block monitors the cell temperature and starts cooling the module assembly if the battery cells surpass a limit temperature value of 308.15 K. When the cell temperature goes below 298.15 K, the Battery Coolant Control block deactivates the coolant flow.
Model Overview
Open the coolantControl model.
modelname = "coolantControl";
open_system(modelname);
The model comprises a pre-generated ModuleAssembly block, a Battery CC-CV block, and a Battery Coolant Control block. The ModuleAssembly block represents a battery module assembly with a battery module and a cooling plate at the bottom. The battery module comprises 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 CoolantControlCreatelib.m file.
Run the simulation.
ssc_coolantCntrl = sim(modelname);
Simulation Results
This plot shows the temperature of the cells inside the module assembly during the simulation.
coolantControlPlotTemp;

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 2 millisecond 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
Module (Generated
Block) | batteryModule | Battery CC-CV | Battery Coolant
Control