Build Model of Battery Module Assembly with Multi-Module Cooling Plate
This example shows how to create and build a Simscape™ system model of a module assembly with a multi-module cooling plate by using Simscape™ Battery™. Large cooling plates that span across several battery modules are quite common in the design of battery systems, including in the automotive and consumer electronics sector. The workflow in this example automates the process of thermally coupling several modules together to a single battery cooling plate. To create the system model of a battery
ModuleAssembly, you must first create the
Module objects that comprise the battery module assembly, and then use the
buildBattery function. The
buildBattery function generates Simscape models for these Simscape Battery objects:
This function creates a library in your working folder that contains a system model block of a battery module. Use this model as reference in your simulations. You can modify the run-time parameters for this model block, such as the battery cell resistance or the battery open-circuit voltage, after you create the model. To define the run-time parameters, specify them in the block mask of the generated Simscape models or use the
MaskParameters argument of the
To use the functions and objects in Simscape Battery, first import the required Simscape Battery package:
Create Battery ModuleAssembly Object in MATLAB
To create a battery module assembly object, you must first design and create the foundational elements of the battery module assembly.
This figure shows the hierarchy of a battery pack object in a bottom-up view:
A battery module assembly comprises multiple battery modules. These module assemblies, in turn, comprise a number of battery parallel assemblies connected electrically in parallel or series under a specific topological configuration or geometrical arrangement.
Create Cell Object
To create the
ModuleAssembly object, first create a
Cell object with the pouch geometry.
pouchgeometry = PouchGeometry(Height = simscape.Value(0.1,"m"),... Length = simscape.Value(0.3,"m"), TabLocation = "Opposed" );
PouchGeometry object defines the pouch geometrical arrangement of the battery cell. To specify the height, radius, and location of tabs of the cell, set the
TabLocation properties of the
Now use this
PouchGeometry object to create a pouch battery cell.
batterycell = Cell(Geometry = pouchgeometry)
batterycell = Cell with properties: Geometry: [1×1 simscape.battery.builder.PouchGeometry] CellModelOptions: [1×1 simscape.battery.builder.CellModelBlock] Mass: [1×1 simscape.Value] Capacity: [1×1 simscape.Value] Energy: [1×1 simscape.Value] Show all properties
Cell object allows you to simulate the thermal effects of the battery cell by using a simple 1-D model. To simulate the thermal effects of the battery cell, in the
BlockParameters property of the
CellModelOptions property of the
Cell object, set the
thermal_port property to
"model" and the
T_dependence property to
batterycell.CellModelOptions.BlockParameters.thermal_port = "model"; batterycell.CellModelOptions.BlockParameters.T_dependence = "yes";
You can define the thermal boundary conditions for battery parallel assemblies and modules only if you have previously defined a thermal model at the cell level.
Create ParallelAssembly Object
A parallel assembly comprises multiple battery cells connected electrically in parallel under a specific topological configuration or geometrical arrangement. In this example, you create a parallel assembly of three pouch cells.
To create the
ParallelAssembly object, use the
Cell object and specify the
batteryparallelassembly = ParallelAssembly(Cell = batterycell,... NumParallelCells = 3, ... ModelResolution = "Detailed");
Create Module Object
A battery module comprises multiple parallel assemblies connected in series. In this example, you create a battery module of four parallel assemblies, with a gap between each parallel assembly of
0.005 meters, and a lumped model resolution. You also create another
Module object with a detailed model resolution.
To create these
Module objects, use the
ParallelAssembly object and specify the
lumpedbatterymodule = Module(ParallelAssembly = batteryparallelassembly,... NumSeriesAssemblies = 4, ... InterParallelAssemblyGap = simscape.Value(0.005,"m")); detailedbatterymodule = Module(ParallelAssembly = batteryparallelassembly,... NumSeriesAssemblies = 4, ... InterParallelAssemblyGap = simscape.Value(0.005,"m"), ... ModelResolution = "Detailed");
Create ModuleAssembly Object
A battery module assembly comprises multiple battery modules connected in series or in parallel. In this example, you create a battery module assembly of three different modules, with a gap between each module of
0.01 meters. By default, the
ModuleAssembly object electrically connects the modules in series.
To create the
ModuleAssembly object, use the
Module object and specify the
CoolantThermalPath and the
batteryModuleAssembly = ModuleAssembly(Module = [detailedbatterymodule,repmat(lumpedbatterymodule,1,5),detailedbatterymodule],... CoolantThermalPath = "CellBasedThermalResistance", ... InterModuleGap = simscape.Value(0.05,"m"))
batteryModuleAssembly = ModuleAssembly with properties: Module: [1×7 simscape.battery.builder.Module] Show all properties
Add Cooling Plate to Module Assembly
To add a single cooling plate across all battery modules, you must first define a cooling plate boundary. Set the
CoolingPlate property of the
ModuleAssembly object to
batteryModuleAssembly.CoolingPlate = "Bottom";
To specify the desired cooling plate block from the Simscape™ Battery™ library, use the
CoolingPlateBlockPath property. In this example, you use the Parallel Channels block to model the cooling plate.
batteryModuleAssembly.CoolingPlateBlockPath = "batt_lib/Thermal/Parallel Channels";
To obtain higher resolution in the temperature and state of charge signals for battery control, you can use different model resolutions for each module inside the module assembly. To parameterize the cooling plate, you can visualize the thermal node information at module assembly level. This thermal node information propagates to the generated model after you call the
Alternatively, to individually define cooling plates to each module, modify the
CoolingPlateBlockPath properties of each module inside the
View Information on Thermal Node Connectivity
To visualize the thermal connectivity information from the module assembly, use the
thermalNodes = batteryModuleAssembly.ThermalNodes.Bottom; disp(thermalNodes)
Locations: [29×2 double] Dimensions: [29×2 double] NumNodes: 29
This property contains information regarding the thermal interface between the battery and the cooling plate, including the number of nodes, the XY location of the interface areas, and the dimension of each interface area.
0.1800 0.0050 0.1800 0.0160 0.1800 0.0270 0.1800 0.0420 0.1800 0.0530 0.1800 0.0640 0.1800 0.0790 0.1800 0.0900 0.1800 0.1010 0.1800 0.1160 0.1800 0.1270 0.1800 0.1380 0.1800 0.2645 0.1800 0.4575 0.1800 0.6505 0.1800 0.8435 0.1800 1.0365 0.1800 1.1630 0.1800 1.1740 0.1800 1.1850 0.1800 1.2000 0.1800 1.2110 0.1800 1.2220 0.1800 1.2370 0.1800 1.2480 0.1800 1.2590 0.1800 1.2740 0.1800 1.2850 0.1800 1.2960
0.3300 0.0100 0.3300 0.0100 0.3300 0.0100 0.3300 0.0100 0.3300 0.0100 0.3300 0.0100 0.3300 0.0100 0.3300 0.0100 0.3300 0.0100 0.3300 0.0100 0.3300 0.0100 0.3300 0.0100 0.3450 0.1430 0.3450 0.1430 0.3450 0.1430 0.3450 0.1430 0.3450 0.1430 0.3300 0.0100 0.3300 0.0100 0.3300 0.0100 0.3300 0.0100 0.3300 0.0100 0.3300 0.0100 0.3300 0.0100 0.3300 0.0100 0.3300 0.0100 0.3300 0.0100 0.3300 0.0100 0.3300 0.0100
Visualize Battery ModuleAssembly and Check Model Resolution
To obtain the number of Simscape Battery(Table-based) blocks used for the simulation, use the
NumModels property of your
To visualize the
ModuleAssembly object before you build the system model and to view its model resolution, use the
BatteryChart object. Create the figure where you want to visualize your
f = uifigure(Color="w"); tl = tiledlayout(1,2,"Parent",f,"TileSpacing","Compact");
Then use the
BatteryChart object to visualize the battery module. To view the model resolution of the module assembly, set the
SimulationStrategyVisible property of the
BatteryChart object to
nexttile(tl) batteryModuleAssemblyChart1 = BatteryChart(Parent = tl, Battery = batteryModuleAssembly); nexttile(tl) batteryModuleAssemblyChart2 = BatteryChart(Parent = tl, Battery = batteryModuleAssembly, SimulationStrategyVisible = "On");
Build Simscape Model of ModuleAssembly Object
After you create your battery objects, you need to convert them into Simscape models to use them in block diagrams. You can then use these models as reference for your system integration and requirement evaluation, cooling system design, control strategy development, hardware-in-the-loop, and many more applications.
To create a library that contains the Simscape Battery model of the
ModuleAssembly object, use the
buildBattery function. To create a script where you can individually define the inter-cell thermal resistance parameters for each thermal connection, as well as all other parameters within your battery, set the
MaskParameters argument of the
buildBattery function to
buildBattery(batteryModuleAssembly,"LibraryName","multiModuleCoolingPlate", ... "MaskParameters","VariableNames" ,... "MaskInitialTargets","VariableNames");
This function creates the
multiModuleCoolingPlate SLX library files in your working folder. The
multiModuleCoolingPlate_lib library contains the Modules and ParallelAssemblies sublibraries.
To access the Simscape models of your M
ParallelAssembly objects, open the
multiModuleCoolingPlate_lib SLX file, double-click the sublibrary, and drag the Simscape blocks in your model.
multiModuleCoolingPlate library contains the Simscape models of your
Battery Builder | Parallel Channels