The thermal port for the battery seems to be not modeled using the code.

3 次查看(过去 30 天)
% IMPORT SIMSCAPE BATTERY PACKAGE
import simscape.battery.builder.*
% DEFINE FIGURE FOR VISUALIZATION
f = uifigure('Color', 'w');
% DEFINE CELL GEOMETRY
cylindricalGeometry = CylindricalGeometry();
% CREATE CELL OBJECT
batteryCell = Cell('Geometry', cylindricalGeometry);
% VISUALIZE CELL
BatteryChart('Parent', f, 'Battery', batteryCell);
% DEFINE CELL THERMAL PROPERTIES
batteryCell.CellModelOptions.BlockParameters.thermal_port = 'model';
batteryCell.CellModelOptions.BlockParameters.T_dependence = 'yes';
% DEFINE PARALLEL ASSEMBLY (4 CELLS CONNECTED IN PARALLEL)
batteryParallelAssembly = ParallelAssembly('Cell', batteryCell, 'numParallelCells', 4);
batteryParallelAssembly.StackingAxis = 'X';
% VISUALIZE PARALLEL ASSEMBLY
BatteryChart('Parent', f, 'Battery', batteryParallelAssembly);
% DEFINE MODULE (5 PARALLEL ASSEMBLIES CONNECTED IN SERIES)
batteryModule = Module('ParallelAssembly', batteryParallelAssembly, 'numSeriesAssemblies', 5);
% DEFINE SIMULATION STRATEGY
batteryModule.ModelResolution = 'Grouped';
batteryModule.SeriesGrouping = ones(1, 5);
% VISUALIZE MODULE
BatteryChart('Parent', f, 'Battery', batteryModule, 'SimulationStrategyVisible', 'on');
% DEFINE MODULE THERMAL PROPERTIES
batteryModule.AmbientThermalPath = 'CellBasedThermalResistance';
batteryModule.CoolantThermalPath = 'CellBasedThermalResistance';
% DEFINE MODULE ASSEMBLY (2 MODULES CONNECTED IN SERIES)
batteryModuleAssembly = ModuleAssembly('Module', repmat(batteryModule, 1, 2));
batteryModuleAssembly.InterModuleGap = simscape.Value(0.01, 'm');
% VISUALIZE MODULE ASSEMBLY
BatteryChart('Parent', f, 'Battery', batteryModuleAssembly, 'SimulationStrategyVisible', 'on');
% DEFINE PACK (2 MODULE ASSEMBLIES CONNECTED IN SERIES)
batteryModuleAssembly = ModuleAssembly('Module', repmat(batteryModule, 1, 2));
batteryPack.InterModuleAssemblyGap = simscape.Value(0.01, 'm');
% VISUALIZE PACK
BatteryChart('Parent', f, 'Battery', batteryPack, 'SimulationStrategyVisible', 'on');
% DEFINE BALANCING STRATEGY
batteryPack.BalancingStrategy = 'Passive';
% DEFINE THERMAL PROPERTIES
batteryPack.AmbientThermalPath = 'CellBasedThermalResistance';
batteryPack.CoolantThermalPath = 'CellBasedThermalResistance';
% BUILD SIMSCAPE MODEL OF BATTERY PACK
buildBattery(batteryPack, 'LibraryName', 'packModel',... 'MaskInitialTargets', 'VariableNames',... 'MaskParameters', 'VariableNames');
Error: Cell property ThermalEffects must be set to model.

回答(1 个)

Javier Gazzarri
Javier Gazzarri 2024-5-7
Hello Umesh,
I cannot find the battery pack definition in your code above. I see you defined a module assembly but not a pack. Can you please check?
Thanks,
Javier

类别

Help CenterFile Exchange 中查找有关 Battery Pack Modeling 的更多信息

产品


版本

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by