フィルターのクリア

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 Center および File ExchangeBattery Pack Modeling についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by