主要内容

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

检测电池模组中断开连接的电芯

自 R2024a 起

此示例说明如何检测电池模组中脱离连接的电芯。电芯可能会因接线故障、腐蚀或电芯物理损坏而断开连接。为了防止电池包进一步损坏,电池管理系统 (BMS) 必须检测到断开的电池电芯并采取适当措施。

在此示例中,您首先使用电池构建器为电池模组创建一个 Simscape(TM) 模型。然后,为模组中的电芯定义断开电芯故障。最后,使用 Battery Cell Contact Monitoring 模块检测断开的电芯。

构建电池模组模型

在此示例中,电池模组的电芯为圆柱形几何形状。Battery Equivalent Circuit 模块表示电芯。要创建 Cell 对象,请使用 batteryCell 函数。

cylindricalCell = batteryCell(batteryCylindricalGeometry);
cylindricalCell.CellModelOptions.CellModelBlockPath = "batt_lib/Cells/Battery Equivalent Circuit";

每个并联组件由 30 个电芯组成,以三行几何排列。要创建具有这些属性的 ParallelAssembly 对象,请使用 batteryParallelAssembly 函数。

parallelAssembly = batteryParallelAssembly(cylindricalCell,30,Rows=3);

该模组由 15 个串联并联组件组成。要创建 Module 对象,请使用 batteryModule 函数。此外,将可选的名称-值参量 ModelResolution 指定为“分组模式”,以自定义电池的分组策略。对于此应用案例,第一个并联组件中的电芯的行为特别值得关注,而其他并联组件中的电芯可以合并在一起。使用可选的名称-值参量 SeriesGroupingParallelGrouping 指定分组策略。

module = batteryModule(parallelAssembly,15,ModelResolution="Grouped",...
    SeriesGrouping=[1,14],ParallelGrouping=[30,1],StackingAxis="X");

使用函数 batteryChart 可视化该模组。

batteryChart(module);

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

使用函数 buildBattery 为对象 Module 生成组件 Simscape。要将模块参数导出到脚本中,请将名称-值参量 MaskParameters 指定为 VariableNamesByType"。要定义导出库的名称,请指定 LibraryName 名称-值参量。

libraryName = "moduleLibrary";
buildBattery(module,...
    "MaskParameters","VariableNamesByType", ...
    "LibraryName",libraryName,...
    "Verbose","off");

定义断开连接的电芯故障

为了仿真模组的电气行为,将生成的模块集成到框架模型中,并加载电池参数。

modelName = "disconnectedCellDetection";
moduleLibraryPath = strcat(libraryName,"_lib/",module.Name);
createDischargeHarnessModel(moduleLibraryPath,modelName);
moduleLibrary_param;

使用实际放电电流指定电池电流,然后保存模型。

load("DischargeCycle.mat","batteryCurrent");
currentSpecificationBlock = strcat(modelName,"/","Current");
set_param(currentSpecificationBlock,"VariableName","batteryCurrent");
set_param(modelName,"StopTime","100");
save_system(modelName);

要对断开连接的电芯的模组行为进行建模,请为特定电芯指定一个高电阻值为 1000 欧姆的 Additional Resistance 故障。在这种情况下,您将在 30 秒后触发第一个并联组件中的第一个电芯的故障。

batteryPath = strcat(modelName,"/Battery");

faultPath = strcat(batteryPath,"/Cell1(1)/Additional resistance");
fault = Simulink.fault.addFault(faultPath);
faultModel = strcat(modelName,"_FaultModel");
addBehavior(fault,faultModel);
fault.TriggerType = "Timed";
fault.StartTime = 30;

仿真模型并可视化并联组件的电压。在仿真开始时,所有并联组件的电压一致。在 t = 30s 时,包含故障电芯的第一个并联组件的电压低于其他并联组件的电压。

simout = sim(modelName);
vParallelAssembly = simout.simlog.Battery.vParallelAssembly;
vParallelAssemblyValues = vParallelAssembly.series.values;
plot(vParallelAssembly.series.time,vParallelAssemblyValues(:,[1,2]));
title("vParallelAssembly");
ylabel("vParallelAssembly, V");
xlabel("Time, s");
legend(["Parallel Assembly 1","Parallel Assembly 2"],Location="best");
xlim([20,40]);

Figure contains an axes object. The axes object with title vParallelAssembly, xlabel Time, s, ylabel vParallelAssembly, V contains 2 objects of type line. These objects represent Parallel Assembly 1, Parallel Assembly 2.

检测断开连接的电芯

要检测包含断开电芯的并联组件,请使用 Battery Cell Contact Monitoring 模块。BMS 可访问每个并联组件的测量电压。在此示例中,Probe 模块建模了访问并联组件电压变量 (vParallelAssembly) 的接口。然后,该接口将并联组件电压转发到 Battery Cell Contact Monitoring 模块。

probeBlockPath = strcat(modelName,"/Probe");
add_block('nesl_utility/Probe',probeBlockPath,position=[450,125,510,175]);
simscape.probe.setBoundBlock(probeBlockPath,batteryPath);
simscape.probe.setVariables(probeBlockPath,"vParallelAssembly");
probePortHandles = get_param(probeBlockPath,"PortHandles");

contactMonitoringBlockPath = strcat(modelName,"/Battery Cell Contact Monitoring");
add_block("batt_sl_lib/Protection/Battery Cell Contact Monitoring",contactMonitoringBlockPath,position=[625,110,785,190]);
contactMonitoringPortHandles = get_param(contactMonitoringBlockPath,"PortHandles");
set_param(contactMonitoringPortHandles.Outport(1),"DataLogging","on");
set_param(contactMonitoringPortHandles.Outport(2),"DataLogging","on");
add_line(modelName,probePortHandles.Outport,contactMonitoringPortHandles.Inport);

terminator1BlockPath = strcat(modelName,"/Terminator1");
add_block("simulink/Sinks/Terminator",terminator1BlockPath,position=[900,120,920,140]);
terminator1PortHandles = get_param(terminator1BlockPath,"PortHandles");
cellConnectionErrorLine = add_line(modelName,contactMonitoringPortHandles.Outport(1),terminator1PortHandles.Inport);
set_param(cellConnectionErrorLine,"Name","CellConnectionError");

terminator2BlockPath = strcat(modelName,"/Terminator2");
add_block("simulink/Sinks/Terminator",terminator2BlockPath,position=[900,160,920,180]);
terminator2PortHandles = get_param(terminator2BlockPath,"PortHandles");
cellConnectionSymptomLine = add_line(modelName,contactMonitoringPortHandles.Outport(2),terminator2PortHandles.Inport);
set_param(cellConnectionSymptomLine,"Name","CellConnectionSymptom");
set_param(modelName,"ZoomFactor","FitSystem");

并联组件中的一个电芯断开会导致与其他并联组件相比电压变化率更高。当 Battery Cell Contact Monitoring 模块检测到较高的电压变化率时,CellConnectionsSymptom 输出为 true。如果此输出的值在模块的资格时间参数中指定的时间长度内仍为 true,则 CellConnectionError 输出为 true

您可以使用多个参数来调整模块的灵敏度。将电压变化检测阈值(dV/dT) 参数设置为,以排除电池处于待机模式或接近待机模式时的测量值。要确定此参数的值,请在代表性驱动循环下对未断开电芯的电池进行仿真,并确定仿真过程中的平均和最小电压变化。

Simulink.fault.enable(faultPath,false);
simout = sim(modelName);
parallelAssemblyVoltages = simout.simlog.Battery.vParallelAssembly.series.values("V");
absoluteVoltageChange = abs(diff(parallelAssemblyVoltages(:,1)));
disp(min(absoluteVoltageChange));
   2.1030e-06
disp(mean(absoluteVoltageChange));
    0.0017

为了考虑正常负载下的大部分电压变化,将电压变化检测阈值(dV/dT) 参数设置为低于平均值但高于最小电压变化值的值。

set_param(contactMonitoringBlockPath,"VoltageChangeDetectionThreshold","1e-5");

您可以使用允许的电压变化峰值与平均值之比参数进一步调整模块的灵敏度。如果并联组件的电压超过该比例,则该测量值将计入断开电芯症状。要估计此参数的值,请估计并联组件中连接电芯的数量与并联组件电压之间的线性关系。通过此近似值,您可以使用并联组件中的电芯数值的倒数来计算单个断开电芯导致的电压变化相对增加量。

disconnectedVoltageChange = 1/module.ParallelAssembly.NumParallelCells;
disp(disconnectedVoltageChange);
    0.0333

为了提高精度并考虑并联组件电压变化的非线性行为,将允许的电压变化峰值与平均值之比设置为低于近似值的值。

set_param(contactMonitoringBlockPath,"VoltageChangePar","0.015");

要指定电芯接触失效症状导致电芯接触错误所需的时间,请设置合格时间(秒) 参数。

set_param(contactMonitoringBlockPath,"QualTime","5");

启用断开电芯故障,仿真模型,并绘制结果 CellConnectionSymptomCellConnectionError

Simulink.fault.enable(faultPath,true);
simout = sim(modelName);
legendLabels = "Parallel Assembly " + string(1:15);

figure("Name","Cell Connection Symptom");
simout.logsout.getElement("CellConnectionSymptom").Values.plot();
legend(legendLabels,Location="best");

Figure Cell Connection Symptom contains an axes object. The axes object with title Time Series Plot:CellConnectionSymptom, xlabel Time (seconds), ylabel CellConnectionSymptom contains 15 objects of type stair. These objects represent Parallel Assembly 1, Parallel Assembly 2, Parallel Assembly 3, Parallel Assembly 4, Parallel Assembly 5, Parallel Assembly 6, Parallel Assembly 7, Parallel Assembly 8, Parallel Assembly 9, Parallel Assembly 10, Parallel Assembly 11, Parallel Assembly 12, Parallel Assembly 13, Parallel Assembly 14, Parallel Assembly 15.

figure("Name","Cell Connection Error");
simout.logsout.getElement("CellConnectionError").Values.plot();
legend(legendLabels,Location="best");
ylim([0 1]);

Figure Cell Connection Error contains an axes object. The axes object with title Time Series Plot:CellConnectionError, xlabel Time (seconds), ylabel CellConnectionError contains 15 objects of type stair. These objects represent Parallel Assembly 1, Parallel Assembly 2, Parallel Assembly 3, Parallel Assembly 4, Parallel Assembly 5, Parallel Assembly 6, Parallel Assembly 7, Parallel Assembly 8, Parallel Assembly 9, Parallel Assembly 10, Parallel Assembly 11, Parallel Assembly 12, Parallel Assembly 13, Parallel Assembly 14, Parallel Assembly 15.

您可以根据断开电芯检测的要求进一步调整参数。在这种情况下,模块会在故障发生后 10 秒内检测到电芯连接错误,这是可以接受的。

为了验证参数化,在不同的放电情况下运行仿真,并在 t = 30s 时再次引入故障。断开的电芯在第一个并联组件中再次被正确检测到。

load("DischargeCycle.mat","batteryCurrentValidation");
set_param(currentSpecificationBlock,"VariableName","batteryCurrentValidation");
simout = sim(modelName);

figure("Name","Cell Connection Symptom");
simout.logsout.getElement("CellConnectionSymptom").Values.plot();
legend(legendLabels,Location="best");

Figure Cell Connection Symptom contains an axes object. The axes object with title Time Series Plot:CellConnectionSymptom, xlabel Time (seconds), ylabel CellConnectionSymptom contains 15 objects of type stair. These objects represent Parallel Assembly 1, Parallel Assembly 2, Parallel Assembly 3, Parallel Assembly 4, Parallel Assembly 5, Parallel Assembly 6, Parallel Assembly 7, Parallel Assembly 8, Parallel Assembly 9, Parallel Assembly 10, Parallel Assembly 11, Parallel Assembly 12, Parallel Assembly 13, Parallel Assembly 14, Parallel Assembly 15.

figure("Name","Cell Connection Error");
simout.logsout.getElement("CellConnectionError").Values.plot();
legend(legendLabels,Location="best");
ylim([0 1]);

Figure Cell Connection Error contains an axes object. The axes object with title Time Series Plot:CellConnectionError, xlabel Time (seconds), ylabel CellConnectionError contains 15 objects of type stair. These objects represent Parallel Assembly 1, Parallel Assembly 2, Parallel Assembly 3, Parallel Assembly 4, Parallel Assembly 5, Parallel Assembly 6, Parallel Assembly 7, Parallel Assembly 8, Parallel Assembly 9, Parallel Assembly 10, Parallel Assembly 11, Parallel Assembly 12, Parallel Assembly 13, Parallel Assembly 14, Parallel Assembly 15.

另请参阅

|