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

조회 수: 3 (최근 30일)
Umesh Jung
Umesh Jung 2024년 3월 18일
답변: Javier Gazzarri 2024년 5월 7일
% 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