modifyBattery
Description
modifies one or more properties of the battery object updatedBattery = modifyBattery(battery,Name=Value)battery by using
one or more name-value arguments.
Unlike the modifyCell,
modifyParallelAssembly, modifyModule,
and modifyModuleAssembly functions, you do not need to know which battery object
contains the property you want to modify.
Examples
This example shows how to quickly modify the number of
series-connected parallel assemblies inside a battery pack by using the
modifyBattery function.
Create a Pack object and display the number of series-connected
parallel assemblies.
battery = batteryPack; disp(battery.ModuleAssembly(1).Module(1).NumSeriesAssemblies)
1
Change this value to 100 series-connected parallel assemblies and display the updated value.
updatedbattery = modifyBattery(battery,NumSeriesAssemblies=100); disp(updatedbattery.ModuleAssembly(1).Module(1).NumSeriesAssemblies)
100
Input Arguments
Battery to modify, specified as a ParallelAssembly, Module,
ModuleAssembly, or Pack
object.
Example: modifyBattery(Pack,CellMass=10) sets the value of the
Mass property of all the underlying Cell objects
inside the Pack object to 10.
Name-Value Arguments
Specify pairs of arguments
as Name1=Value1,...,NameN=ValueN, where Name is the
argument name and Value is the corresponding value. Name-value arguments
must appear after other arguments, but the order of the pairs does not matter.
Example:
modifyBattery(Pack,CellMass=10)
Cell component in the parallel assembly, specified as a Cell
object.
Example: modifyBattery(Pack,Cell=Cell(Geometry=CylindricalGeometry))
Capacity of the battery cell, specified as a positive scalar or a simscape.Value object that represents a scalar with the specified unit of
measurement. The value of this property must be strictly positive.
If you set this argument directly with a positive scalar value instead of using a
simscape.Value object, the function converts the value to a
simscape.Value object with A*hr as its
physical unit.
Example:
modifyBattery(Pack,CellCapacity=8)
Mass of the battery cell, specified as a scalar in the range (0, 100] or a simscape.Value object that represents a scalar with the specified unit of
measurement. The value of this property must be strictly positive and lower than 100
kg.
If you set this property directly with a positive scalar value instead of using a
simscape.Value object, the object converts the value to a
simscape.Value object with kg as its
physical unit.
Example: modifyBattery(Pack,CellMass=10)
Shortest distance between modules inside the module assembly, specified as a
scalar in the range (0, 0.1] or a simscape.Value object that represents a positive scalar with a unit of
length. The value of this property must be less than 0.1 m.
If you set this property directly with a positive scalar value instead of using a
simscape.Value object, this object converts the value to a
simscape.Value object with meter as its physical unit.
Example:
modifyBattery(Pack,InterModuleGap=simscape.Value(0.01,"m"))
Dependencies
To enable this name-value argument, the input argument
battery must be a ModuleAssembly
object.
Number of parallel-connected cells inside the parallel assembly, specified as an integer in the range (0, 150].
You can also modify this name-value argument by using the name
P.
Example:
modifyBattery(Pack,NumParallelCells=48)
Example:
modifyBattery(Pack,P=48)
Number of series-connected parallel assemblies inside the module, specified as an integer in the range (0, 150].
You can also modify this name-value argument by using the name
S.
Example:
modifyBattery(Pack,NumSeriesAssemblies=48)
Example:
modifyBattery(Pack,S=48)
Dependencies
To enable this name-value argument, specify the battery as
a Module, ModuleAssembly, or Pack
object.
Output Arguments
Updated battery, returned as a ParallelAssembly,
Module, ModuleAssembly, or Pack
object.
Version History
Introduced in R2023b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)