主要内容

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

将温度依赖型电池参数变化应用于电池模组

自 R2024b 起

本示例演示了如何将温度相关的参数变化应用于使用 Simscape™ Battery™ 对象和函数生成的电池模组中的各个电池模型。对温度依赖性参数变化进行建模,对于实现准确的性能预测、优化效率以及设计和开发先进的电池系统至关重要。

该示例还突显了在 Simscape Battery 中对电池进行建模,而非仅使用 Simulink® 模块,所具有的一项显著优势。当引入电芯间差异时,Simscape 中的守恒定律会自动在并联的电芯之间分配电流。仅使用 Simulink 模块实现自动电流分配是一项极具挑战性且非常复杂的任务。

创建模组模块

通过创建一个 PouchGeometry 对象来定义电池电芯的几何形状。要创建一个 PouchGeometry 对象,请使用 batteryPouchGeometry 函数,并将单元格高度作为第一个参量、单元格长度作为第二个参量,同时指定选项卡的位置和宽度。

cellGeometry = batteryPouchGeometry(simscape.Value(0.13,"m"),...
    simscape.Value(0.36,"m"),...
    TabLocation="Opposed",...
    TabWidth=simscape.Value(0.05,"m"));

使用 PouchGeometry 对象创建一个质量为 0.8 kg 的软包电池电芯。要创建 Cell 对象,请使用 batteryCell 函数,并将电芯几何形状指定为第一个参量。要指定电芯质量,请使用名称-值参量 Mass

cell = batteryCell(cellGeometry,Mass=simscape.Value(0.8,"kg"));

默认情况下,Cell 对象将 Battery Equivalent Circuit 模块用作 Simscape 电芯模型模块。

disp(cell.CellModelOptions.CellModelBlockPath);
batt_lib/Cells/Battery Equivalent Circuit

请为电池电芯设置以下选项:

  • 该电芯的等效电路包含一个并联的 RC 支路。

  • 集中式热质量定义了电池电芯的热模型。

cell.CellModelOptions.BlockParameters.RCPairs = "rc1";
cell.CellModelOptions.BlockParameters.ThermalModel = "LumpedThermalMass";

使用 batteryChart 对象绘制电池电芯。

f = figure(Color="w",Position=[0,0,1000,500]);
moduleChart = batteryChart(f,cell);
title(moduleChart,"Cell Chart");

Figure contains an object of type simscape.battery.builder.batterychart.

接下来,使用 batteryParallelAssembly 函数和 Cell 对象来创建 ParallelAssembly 对象。将 Cell 对象作为第一个参量,将并行电芯数作为第二个参量。要指定其他并联组件属性,请使用名称-值参量 TopologyInterCellGap

parallelAssembly = batteryParallelAssembly(cell,2, ...
    Topology="SingleStack",...
    InterCellGap=simscape.Value(0.001,"m"));

使用 BatteryChart 对象绘制平行装配体。

f = figure(Color="w",Position=[0,0,1000,500]);
moduleChart = batteryChart(f,parallelAssembly);
title(moduleChart,"Parallel Assembly Chart");

Figure contains an object of type simscape.battery.builder.batterychart.

接下来,使用 batteryModule 函数和 ParallelAssembly 对象来创建一个 Module 对象。将 ParallelAssembly 对象作为第一个参量,将串联的并联组件数量作为第二个参量。要指定其他模组属性,请使用名称-值参量 InterParallelAssemblyGapModelResolutionAmbientThermalPath。模型分辨率定义了单个电芯模型所代表的电芯数量。在详细模组中,每个电芯由一个单独的电芯模型来表示。

module = batteryModule(parallelAssembly,3,... 
    InterParallelAssemblyGap=simscape.Value(0.008,"m"),...
    ModelResolution="Detailed",...
    AmbientThermalPath="CellBasedThermalResistance");

启用该选项,以对电芯间参数变化进行建模。当将 CellParameterVariation 属性设置为 "PercentDeviation" 时,生成的 Module 模块中的单元参数会关联一个百分比偏差 参数,该参数指定了电池中每个电芯模型对应单元参数值的百分比偏差。应用偏差后,相应电芯参数的值等于:

cellParameter=(1+cellParameterDeviation100)exposedCellParameter.

电池中的电芯模型数量和模型分辨率决定了百分比偏差参数的大小。

module.CellParameterVariation = "PercentDeviation";

使用 BatteryChart 对象绘制该模组。

f = figure(Color="w",Position=[0,0,1000,500]);
moduleChart = batteryChart(f,module);
title(moduleChart,"Module Chart")

Figure contains an object of type simscape.battery.builder.batterychart.

要创建一个包含此示例中 Module 对象的 Simscape Battery 模型的库,请使用 buildBattery 函数。

if not(isfolder("+ModuleTemperatureDependentVariation\") | isfile("ModuleTemperatureDependentVariation_lib.slx"))
    buildBattery(module,LibraryName="ModuleTemperatureDependentVariation",MaskParameters="VariableNamesByType");
end

在不改变参数的情况下仿真模组

打开 DetailedModuleDischarge 模型。在此模型中,Discharger 模块以 54 A 的恒定放电电流对电池模组进行放电,直至模组电压小于或等于 6 V。Module1 模块是基于 Simscape Battery Module 对象创建的自定义模块。

open_system("DischargeDetailedModule");

将生成的“模组”块的电池级环境热阻降低至 0.5 K/W,然后运行仿真。

Module1.AmbientResistance = 0.5; 
out = sim("DischargeDetailedModule");

绘制并可视化仿真结果。这些图表显示了模组内每个并联组中各电芯的电流、电荷状态 (SOC)、温度和电压值。所有不同电芯的值都重叠,这表明目前所有电芯的表现完全一致。

plotSimResults(out);

Figure contains 4 axes objects. Axes object 1 with title I, xlabel Time (seconds), ylabel I (A) contains 6 objects of type line. Axes object 2 with title SOC, xlabel Time (seconds), ylabel SOC contains 6 objects of type line. Axes object 3 with title T, xlabel Time (seconds), ylabel T (K) contains 6 objects of type line. Axes object 4 with title V, xlabel Time (seconds), ylabel V (V) contains 6 objects of type line. These objects represent Cell 1 of ParallelAssembly 1, Cell 2 of ParallelAssembly 1, Cell 1 of ParallelAssembly 2, Cell 2 of ParallelAssembly 2, Cell 1 of ParallelAssembly 3, Cell 2 of ParallelAssembly 3.

仿真具有容量变化的模组

双击 Module1 模块以打开“模块参数”对话框。由于 Module 对象的 CellParameterVariation 属性为 PercentDeviation,因此软件会将一个百分比偏差参数与开路电压 部分中的每个对应参数相关联。该参数的每个元素代表模组中某个特定电芯模型的参数偏差。

该详细模组由三个并联组件组成,每个组件包含两个电芯。每个电池电芯都有一个独特的电池电芯模型,共计六个电池电芯模型。百分比推导参数的值(例如 BatteryCapacityCell 的百分比推导)是长度为 6 的列向量。您可以在描述选项卡中查看电池的设计。

仿真当单个电芯容量存在差异时,电池的性能表现。电池制造中的误差或电池健康状态 (SOH) 值的不同都可能导致这种波动。

Module1.BatteryCapacityCellPercentDeviation = [5;-1;-3;-2;4;1];

根据这些变体设置,第二和第三个并联组件的容量分别最低和最高。在第一个并联组中,第一个电芯的容量比第二个电芯大。这两个电芯并联连接,且电压相同。

对模型进行仿真并绘制结果。这些图表显示了模块内每个并联组中各电芯的电流、SOC、温度和电压值。

out = sim('DischargeDetailedModule');
plotSimResults(out);

Figure contains 4 axes objects. Axes object 1 with title I, xlabel Time (seconds), ylabel I (A) contains 6 objects of type line. Axes object 2 with title SOC, xlabel Time (seconds), ylabel SOC contains 6 objects of type line. Axes object 3 with title T, xlabel Time (seconds), ylabel T (K) contains 6 objects of type line. Axes object 4 with title V, xlabel Time (seconds), ylabel V (V) contains 6 objects of type line. These objects represent Cell 1 of ParallelAssembly 1, Cell 2 of ParallelAssembly 1, Cell 1 of ParallelAssembly 2, Cell 2 of ParallelAssembly 2, Cell 1 of ParallelAssembly 3, Cell 2 of ParallelAssembly 3.

要查看各电芯之间的差异,请放大图表。

plotSimResults(out,[1000 1100]);

Figure contains 4 axes objects. Axes object 1 with title I, xlabel Time (seconds), ylabel I (A) contains 6 objects of type line. Axes object 2 with title SOC, xlabel Time (seconds), ylabel SOC contains 6 objects of type line. Axes object 3 with title T, xlabel Time (seconds), ylabel T (K) contains 6 objects of type line. Axes object 4 with title V, xlabel Time (seconds), ylabel V (V) contains 6 objects of type line. These objects represent Cell 1 of ParallelAssembly 1, Cell 2 of ParallelAssembly 1, Cell 1 of ParallelAssembly 2, Cell 2 of ParallelAssembly 2, Cell 1 of ParallelAssembly 3, Cell 2 of ParallelAssembly 3.

由于第二个并联组的容量较低,因此其状态 (SOC) 和电压较低,因此其状态 (SOC) 和电压均低于其他并联组。在三个并联组件中,第三个并联组件的 SOC 和电压最高。在第一个并联组中,第一电芯的大容量使其提供的电流比第二电芯更大。

仿真具有电阻变化和温度依赖性的模组

仿真在瞬时电阻 R0 引入温度依赖性变化时,电池模组的行为。

默认情况下,Battery Equivalent Circuit 模块的瞬时电阻,R0(SOC,T) 参数是一个 7×3 矩阵,包含 7 个 SOC 分段点和 3 个温度分段点。该型号的电池模组由六个电芯组成。要对该配置进行建模,请使用一个 6×1 的向量设置参数变化,并为同一电芯指定相同的百分比变化量,无论温度和 SOC 如何。

若要指定一种与 SOC 和温度相关的变化,则必须通过将六个 7×3 矩阵沿行方向拼接,来构建一个 42×3 矩阵,其中 6 代表模组中的电芯数量。每个 7-by-3 矩阵对应于模组中一个电芯的瞬时电阻 R0(SOC,T) 参数。

检查矩阵的维度兼容性,确保偏差为零。

Module1.BatteryCapacityCellPercentDeviation = zeros(6,1); 
Module1.R0ThermalCellPercentDeviation = zeros(42,3);
out = sim('DischargeDetailedModule');
plotSimResults(out);

Figure contains 4 axes objects. Axes object 1 with title I, xlabel Time (seconds), ylabel I (A) contains 6 objects of type line. Axes object 2 with title SOC, xlabel Time (seconds), ylabel SOC contains 6 objects of type line. Axes object 3 with title T, xlabel Time (seconds), ylabel T (K) contains 6 objects of type line. Axes object 4 with title V, xlabel Time (seconds), ylabel V (V) contains 6 objects of type line. These objects represent Cell 1 of ParallelAssembly 1, Cell 2 of ParallelAssembly 1, Cell 1 of ParallelAssembly 2, Cell 2 of ParallelAssembly 2, Cell 1 of ParallelAssembly 3, Cell 2 of ParallelAssembly 3.

由于没有偏差,所有六个电芯的电流、SOC、温度和电压值均重合。

接下来,引入非零偏差。为第一个并联组件的第一个电芯指定一个百分比偏差,使得 R0 在低 SOC 值时较高,在高 SOC 值时较低。

Module1.R0ThermalCellPercentDeviation(1:7,:) = [
     5  5  5;
     3  3  3;
     1  1  1;
     0  0  0;
    -1 -1 -1;
    -2 -2 -2;
    -4 -4 -4]; 

为第二个并联组件的第一个电芯指定一个百分比偏差,使得 R0 在高温时较高,在低温时较低。

Module1.R0ThermalCellPercentDeviation(15:21,:) = [
    -10 -5 5;
    -10 -5 5;
    -10 -5 5;
    -10 -5 5;
    -10 -5 5;
    -10 -5 5;
    -10 -5 5]; 

对模型进行仿真并绘制结果。

out = sim('DischargeDetailedModule');
plotSimResults(out);

Figure contains 4 axes objects. Axes object 1 with title I, xlabel Time (seconds), ylabel I (A) contains 6 objects of type line. Axes object 2 with title SOC, xlabel Time (seconds), ylabel SOC contains 6 objects of type line. Axes object 3 with title T, xlabel Time (seconds), ylabel T (K) contains 6 objects of type line. Axes object 4 with title V, xlabel Time (seconds), ylabel V (V) contains 6 objects of type line. These objects represent Cell 1 of ParallelAssembly 1, Cell 2 of ParallelAssembly 1, Cell 1 of ParallelAssembly 2, Cell 2 of ParallelAssembly 2, Cell 1 of ParallelAssembly 3, Cell 2 of ParallelAssembly 3.

在仿真开始时,当电池充满电时,由于电阻值较低,第一个并联组件中的第一节电池所吸取的电流比该组件中的第二节电池多;但随后由于电阻值较高,其吸取的电流反而变少。

同样,在仿真开始时,由于温度为 298 K 时电阻值较低,第二个并联组件中的第一电芯所吸取的电流比该组件中的第二电芯更多;但随后,由于温度升至 306 K 时电阻值较高,其吸取的电流反而减少了。

另请参阅

|

主题