主要内容

本页采用了机器翻译。点击此处可查看最新英文版本。

使用多模组冷却板构建电池模组组件模型

此示例说明了如何使用 Simscape™ Battery™ 创建和构建一个带多模组冷却板的模组组件的 Simscape™ 系统模型。在电池系统设计中,包括汽车和消费电子领域,横跨多个电池模组的大型冷却板非常常见。此示例中的工作流将多个模组热耦合到单个电池冷却板的过程自动化。要创建电池 ModuleAssembly 的系统模型,必须先创建构成电池模组组件的 Cell, ParallelAssemblyModule 对象,然后使用 buildBattery 函数。buildBattery 函数为以下 Simscape Battery 对象生成 Simscape 模型:

该函数会在工作文件夹中创建一个库,其中包含一个电池模组的系统模型模块。请在仿真中将此模型用作参考。创建模型后,您可以修改此模型模块的运行时参数,例如电池电芯电阻或电池开路电压。要定义运行时参数,可在生成的 Simscape 模型的模块封装中指定,或使用 buildBattery 函数的 MaskParameters 参量。

在 MATLAB 中创建电池 ModuleAssembly 对象

要创建电池模组组件对象,必须先设计并创建电池模组组件的基础元素。

下图以自下而上的视图显示电池包对象的层次结构:

电池模组组件包括多个电池模组。这些模组组件又由多个电池并联组件组成,这些组件在特定的拓扑结构或几何排列下,以并联或串联的方式连接在一起。

创建 Cell 对象

要创建 ModuleAssembly 对象,首先创建一个具有软包几何形状的 Cell 对象。

PouchGeometry 对象定义了电池电芯的软包几何排列。要创建 PouchGeometry 对象,请使用 batteryPouchGeometry 函数。指定电芯高度为第一个参量,指定电芯长度为第二个参量,并使用名称-值参量 TabLocation 指定选项卡位置。

pouchGeometry = batteryPouchGeometry(simscape.Value(0.1,"m"),...
    simscape.Value(0.3,"m"),TabLocation="Opposed");

现在,使用 PouchGeometry 对象可创建软包电池电芯。

pouchCell = batteryCell(pouchGeometry)
pouchCell = 
  Cell with properties:

            Geometry: [1×1 simscape.battery.builder.PouchGeometry]
    CellModelOptions: [1×1 simscape.battery.builder.CellModelBlock]
                Mass: 0.1000 (kg)
            Capacity: 5 (A*hr)
              Energy: 50 (W*hr)

Show all properties

通过 Cell 对象,可以使用简单的一维模型仿真电池电芯的热效应。要仿真电池电芯的热效应,请在 Cell 对象的 CellModelOptions 属性的 BlockParameters 属性中,将 thermal_port 属性设置为 "model",将 T_dependence 属性设置为 "yes"

pouchCell.CellModelOptions.BlockParameters.thermal_port = "model";
pouchCell.CellModelOptions.BlockParameters.T_dependence = "yes";

只有事先在电芯级别定义了热模型,才能定义电池并联组件和模组的热边界条件。

创建 ParallelAssembly 对象

并联组件包括多个电池电芯,这些电池电芯在特定的拓扑配置或几何排列下电连接成并联。在此示例中,您要创建一个由三个软包电芯组成的并联组件。

要创建 ParallelAssembly 对象,请使用 batteryParallelAssembly 函数。将 Cell 对象定义为第一个参量,并将并联电芯数定义为第二个参量。要指定模型分辨率,请使用名称-值参量 ModelResolution

parallelAssembly = batteryParallelAssembly(pouchCell,3,...
     ModelResolution="Detailed");

创建 Module 对象

电池模组由多个串联的并联组件组成。在此示例中,您将创建一个由四个并联组件组成的电池模组,每个并联组件之间的间隙为 0.005 米,并使用集总模型分辨率。您还可以创建另一个具有详细模型分辨率的 Module 对象。

要创建这些 Module 对象,请使用 batteryModule 函数。将 ParallelAssembly 对象定义为第一个参量,并将串联的并联组件数定义为第二个参量。要指定其他属性,请使用名称-值参量 InterParallelAssemblyGap ModelResolution

lumpedModule = batteryModule(parallelAssembly,4,...
    InterParallelAssemblyGap=simscape.Value(0.005,"m"));

detailedModule = batteryModule(parallelAssembly,4,...
    InterParallelAssemblyGap=simscape.Value(0.005,"m"), ...
    ModelResolution="Detailed");

创建 ModuleAssembly 对象

电池模组组件由串联或并联的多个电池模组组成。在此示例中,您将创建一个由三个不同模组组成的电池模组组件,每个模组之间的间隙为 0.01 米。默认情况下,以电气方式串联 ModuleAssembly 对象。

要创建 ModuleAssembly 对象,请使用 batteryModuleAssembly 函数。将 Module 对象定义为第一个参量。要指定其他属性,请使用名称-值参量 CoolantThermalPath InterModuleGap

moduleAssembly = batteryModuleAssembly([detailedModule,repmat(lumpedModule,1,5),detailedModule],...
    CoolantThermalPath="CellBasedThermalResistance", ...
    InterModuleGap=simscape.Value(0.05,"m"))
moduleAssembly = 
  ModuleAssembly with properties:

    Module: [1×7 simscape.battery.builder.Module]

Show all properties

将冷却板添加到模组组件中

要在所有电池模组中添加一个冷却板,必须首先定义冷却板边界。将 ModuleAssembly 对象的 CoolingPlate 属性设置为 "Bottom"

moduleAssembly.CoolingPlate = "Bottom";

要从 Simscape™ Battery™ 库中指定所需的冷却板模块,请使用 CoolingPlateBlockPath 属性。在此示例中,您使用 Parallel Channels 模块对冷却板进行建模。

moduleAssembly.CoolingPlateBlockPath = "batt_lib/Thermal/Parallel Channels";

为了获得更高的电池控制温度和荷电状态信号分辨率,您可以对模组组件内的每个模组使用不同的模型分辨率。要对冷却板进行参数化设置,您可以可视化模组组件级别的热节点信息。在调用 buildBattery 函数后,该热节点信息会传播到生成的模型中。

或者,要单独为每个模组定义冷却板,请修改 ModuleAssemblyPack 对象中的每个模组的 CoolingPlateCoolingPlateBlockPath 属性。

查看热节点连接信息

要可视化模组组件的热连接信息,请使用 ThermalNodes 属性。

thermalNodes = moduleAssembly.ThermalNodes.Bottom;
disp(thermalNodes)
     Locations: [29×2 double]
    Dimensions: [29×2 double]
      NumNodes: 29

该属性包含有关电池与冷却板之间的热接口的信息,包括节点数量、接口区域的 XY 位置以及每个接口区域的尺寸。

disp(thermalNodes.NumNodes)
    29
disp(thermalNodes.Locations)
    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
disp(thermalNodes.Dimensions)
    0.3600    0.0100
    0.3600    0.0100
    0.3600    0.0100
    0.3600    0.0100
    0.3600    0.0100
    0.3600    0.0100
    0.3600    0.0100
    0.3600    0.0100
    0.3600    0.0100
    0.3600    0.0100
    0.3600    0.0100
    0.3600    0.0100
    0.3600    0.1430
    0.3600    0.1430
    0.3600    0.1430
    0.3600    0.1430
    0.3600    0.1430
    0.3600    0.0100
    0.3600    0.0100
    0.3600    0.0100
    0.3600    0.0100
    0.3600    0.0100
    0.3600    0.0100
    0.3600    0.0100
    0.3600    0.0100
    0.3600    0.0100
    0.3600    0.0100
    0.3600    0.0100
    0.3600    0.0100

可视化电池 ModuleAssembly 并检查模型分辨率

要获得用于仿真的 Simscape Battery(Table-based) 模块的数量,请使用 ModuleAssembly 对象的 NumModels 属性。

disp(moduleAssembly.NumModels)
    29

要在构建系统模型之前可视化电池模组组件并查看其模型分辨率,请在要可视化模组组件的位置创建图形,然后使用函数 batteryChart。要查看模组组件的模型分辨率,请将名称-值参量 SimulationStrategyVisible 定义为 "On"

f = figure(Color="w",Position=[0 0 1000 500]);
tl = tiledlayout(1,2,"Parent",f,"TileSpacing","Compact","Padding","tight");
nexttile(tl)
moduleAssemblyChart1 = batteryChart(tl,moduleAssembly);
nexttile(tl)
moduleAssemblyChart2 = batteryChart(tl,moduleAssembly,SimulationStrategyVisible="On");

Figure contains objects of type simscape.battery.builder.batterychart.

构建 ModuleAssembly 对象的 Simscape 模型

创建电池对象后,需要将其转换为 Simscape 模型,以便在模块图中使用。然后,您可以将这些模型作为参考,用于系统集成和需求评估、冷却系统设计、控制策略开发、硬件在环等许多应用。

要创建一个包含 ModuleAssembly 对象的 Simscape Battery 模型的库,请使用 buildBattery 函数。要创建一个脚本,以便单独定义每个热连接的电芯间热阻参数以及电池中的所有其他参数,请将函数 buildBattery 的参量 MaskParameters 设置为 "VariableNamesByInstance"

buildBattery(moduleAssembly,"LibraryName","multiModuleCoolingPlate", ...
    "MaskParameters","VariableNamesByInstance" ,...
    "MaskInitialTargets","VariableNamesByInstance",...
    "Verbose","off");

此函数在工作文件夹中创建 multiModuleCoolingPlate_libmultiModuleCoolingPlate SLX 库文件。multiModuleCoolingPlate_lib 库包含 Modules 和 ParallelAssemblies 子库。

要访问 ModuleParallelAssembly 对象的 Simscape 模型,请打开 multiModuleCoolingPlate_lib SLX 文件,双击子库,然后将 Simscape 模块拖到模型中。

multiModuleCoolingPlate 库包含 ModuleAssembly 对象的 Simscape 模型。

CPModuleScreenshot.png

另请参阅

|

主题