Main Content

Pack

Create pack of module assemblies

Description

Use Pack to create a battery pack object that represents a number of ModuleAssembly objects connected electrically in series or in parallel.

To generate a Simscape™ model of your Pack object, use the buildBattery function.

The Pack object only supports the definition of structural or design parameters. You can modify the run-time parameters for this object and for the models of its constituent module assemblies and modules after you create the model. The Pack object keeps track of its unique constituent module models and generates properties for these models instead of doing it for every model instance. You can generate a script that contains all the parameters of the Pack object by specifying the MaskParameters argument in the buildBattery function. A unique pack model is characterized by having the same properties (such as NumSeriesAssemblies and ModelResolution) and the same constituent cell properties (such as name, format, and weight).

The Pack object is the final stage of a battery pack system model in a bottom-up approach. Pack models are required for architecture evaluation in early development stages, software and hardware development, system integration and requirement evaluation, cooling system design, control strategy development hardware-in-the-loop, and many more applications.

Creation

Description

import simscape.battery.builder.*; batteryPack = Pack creates a battery pack that comprises module assemblies with default property values.

example

import simscape.battery.builder.*; batteryPack = Pack(Name=Value) sets Properties using one or more name-value arguments. For example, create a pack with four default module assemblies connected in series, stacked along the x-axis, and with a gap between the module assemblies equal to 0.005 m.

batteryPack = Pack(...
    ModuleAssembly=repmat(ModuleAssembly=ModuleAssembly,1,4), ...
    StackingAxis="X",...
    InterModuleAssemblyGap=simscape.Value(0.005,"m"));

You can define the number and types of module assemblies in the ModuleAssembly property. If your pack comprises many module assemblies with exactly the same property values, you can use the repmat function to specify the ModuleAssembly property. Otherwise, specify an array of distinct module assemblies.

Properties

expand all

Set of battery module assemblies in the battery pack, specified as a ModuleAssembly object or an array of ModuleAssembly objects. The Pack object electrically connects the module assemblies in series or in parallel according to the CircuitConnection property. If your pack comprises many module assemblies with the same property values, you can use the repmat function to specify this property. Otherwise, specify an array of distinct module assemblies.

Note

This property does not affect how the Pack object stacks the modules. Only the StackingAxis property defines the stacking strategy.

Example: batteryPack.ModuleAssembly = repmat(ModuleAssembly,1,2)

Example: batteryPack.ModuleAssembly = [repmat(moduleAssembly1,1,2),moduleAssembly2]

Shortest distance between module assemblies inside the battery pack, specified as a positive scalar or a simscape.Value object that represents a positive scalar with a unit of length. The value of this property must be less than 0.1 m.

If you set this property directly with a positive scalar value instead of using a simscape.Value object, this object converts the value to a simscape.Value object with meter as its physical unit.

Example: batteryPack.InterModuleAssemblyGap = simscape.Value(0.01,"m")

Example: batteryPack.InterModuleAssemblyGap = 0.01

State-of-charge cell balancing strategy for the pack, specified as "" or "Passive".

Note

Modifying this property in this object also modifies this property in the Cell, ParallelAssembly, Module, and Pack subcomponents of this object.

Example: batteryPack.BalancingStrategy = "Passive"

Option to use a simple thermal resistance block connected between the cells and a Simscape thermal network, specified as "CellBasedThermalResistance" or "".

Note

Modifying this property in this object also modifies this property in the Cell, ParallelAssembly, Module, and Pack subcomponents of this object.

Example: batteryPack.AmbientThermalPath = "CellBasedThermalResistance"

Option to use a simple thermal resistance block connected between the cells and a Simscape thermal network, specified as "CellBasedThermalResistance" or "". If you use a cooling plate, the object connects the thermal resistance block between the cells and the cooling plate block by using an array of thermal nodes.

Note

Modifying this property in this object also modifies this property in the Cell, ParallelAssembly, Module, and Pack subcomponents of this object.

Example: batteryPack.CoolantThermalPath = "CellBasedThermalResistance"

Location of the battery object in a 3-D Cartesian coordinate system, specified as a vector of real and finite entries.

Example: batteryPack.Position = [0 0 0]

Name of the battery pack, specified as a string.

Example: batteryPack.Name = "ModuleAssembly2"

Type of electrical connection between module assemblies, specified as "Series or "Parallel".

Example: batteryPack.CircuitConnection = "Series"

Preferential stacking direction for the arrangement of battery cells in a 2-D Cartesian coordinate system, specified as "X" or "Y".

This figure shows the global coordinate system for batteries.

To plot the Pack object in the direction of the y-axis, set this property to "Y" before creating the BatteryChart object.

Example: batteryPack.StackingAxis = "Y"

Additional non-cell-related mass added to the pack by components such as busbars, tabs, and collector plates, specified as a strictly positive double greater than or equal to 1.

Example: batteryPack.MassFactor = 1.2

Option to use electrical resistance blocks to represent additional electrical resistances from non-cell components, specified as "No" or "Yes".

Example: batteryPack.NonCellResistance = "Yes"

This property is read-only.

Volume of the battery, returned as a simscape.Value object with a unit of volume.

This property is read-only.

Cumulative mass of the battery, returned as a simscape.Value object with a unit of mass.

This property is read-only.

Number of cell model blocks in simulation, returned as a double.

This property is read-only.

Numbering for all of the cells inside of the battery, returned as a structure.

This property is read-only.

Type of battery, returned as "Pack".

Examples

collapse all

Create a Cell object with a cylindrical geometry.

batteryCell = Cell(Geometry=CylindricalGeometry)

Create a ParallelAssembly object of three parallel cells with the default topology.

pSet = ParallelAssembly(Cell=batteryCell,NumParallelCells=3)

Use this ParallelAssembly object to create a Module object of 10 parallel assemblies connected in series and stack them along the x-axis.

batteryModule = Module(ParallelAssembly=pSet,NumSeriesAssemblies=10,StackingAxis="X")

Use the Module object to create a ModuleAssembly object of four identical modules connected in series.

batteryModuleAssembly = ModuleAssembly(Module=repmat(batteryModule,1,4))

Use the ModuleAssembly object to create a Pack object of two identical module assemblies connected in series.

batteryPack = Pack(ModuleAssembly=repmat(batteryModuleAssembly,1,2))

Visualize the pack by using a BatteryChart object.

packChart = BatteryChart(Battery=batteryPack);

To define the cell balancing strategy for a pack, follow the steps in Create Cylindrical Cell Pack with Two Series Module Assemblies to create a pack.

Set a common cell balancing strategy.

batteryPack.BalancingStrategy = "Passive"

To maintain consistency between the BalancingStrategy properties of the pack and all of its underlying components, setting the pack balancing strategy automatically modifies all the BalancingStrategy property in each of the underlying module components of the pack.

disp(batteryPack.ModuleAssembly(1).Module(1).BalancingStrategy);
disp(batteryPack.ModuleAssembly(2).Module(1).BalancingStrategy);
Passive
Passive

Version History

Introduced in R2022b