Main Content

CellModelBlock

Set of conditional parameters for Cell object

Since R2022b

Description

Use CellModelBlock to construct the CellModelOptions property of a Cell object. This property contains the conditional parameters of the block that you specify in the CellModelBlockPath property.

By default, the CellModelBlockPath property uses the Battery (Table-Based) block, but you can also use the Battery Equivalent Circuit block or specify your own custom block. For more information, see the CellModelBlockPath property.

Creation

Description

Note

To quickly create a CellModelBlock object, use the batteryCellModelBlock function. By using this function, you avoid importing the namespace, using the full class name, or dealing only with name-value arguments when creating the object. (since R2024a)

To use this object, at the MATLAB® Command Window, run this command at least once each MATLAB session:

import simscape.battery.builder.*; 
All properties are exposed as name-value arguments in this object.

example

cellModelOpt = CellModelBlock sets default model options for the Cell object. To modify these options for your application, use dot notation.

Properties

expand all

Library path to a Simscape battery cell block, specified as a string. The default component model block is the Battery (Table-Based) block.

You can also use the Battery Equivalent Circuit or specify your own custom cell block, as long as your custom block meets all of these requirements:

  • The custom block must provide exactly two electrical conserving ports named n and p.

  • All variables must be scalar-valued.

  • The custom block cannot contain a variable or intermediate variable called power_dissipated.

You can connect the custom block to any number of thermal nodes. The software connects all nodes in parallel.

If you specify your own custom block, the fields of the BlockParameters structure depend on the parameters that you specified inside your custom block. To modify these options for your application, use dot notation.

Conditional parameters of the cell block that you specify in the CellModelBlockPath property. These conditional parameters control the visibility of the component members of the cell block, such as parameters, variables, nodes, inputs, and outputs.

Note

This property does not include the run-time parameters of the specified cell block.

These are the conditional parameters for the default Battery (Table-Based) block:

If you specify a custom block in the CellModelBlockPath property, these fields might differ.

Example: cellModelOpt.BlockParameters.thermal_port = "model"

Since R2024a

This property is read-only.

Flag that states whether the cell block exposes at least one thermal node, returned as true or false. To change conditionally exposed thermal nodes, update the relevant properties inside the BlockParameters property.

Examples

collapse all

Create a default CellModelBlock option set.

cellModelOpt = CellModelBlock
  CellModelBlock with properties:

    CellModelBlockPath: "batt_lib/Cells/Battery↵(Table-Based)"
       BlockParameters: [1×1 struct]

Show the BlockParameters property.

cellModelOpt.BlockParameters
    struct with fields:

          T_dependence: no
          thermal_port: omit
           prm_age_OCV: OCV
      prm_age_capacity: disabled
    prm_age_resistance: disabled
      prm_age_modeling: equation
               prm_dyn: off
               prm_dir: noCurrentDirectionality
              prm_fade: disabled
              prm_leak: disabled

Specify options using dot notation.

cellModelOpt.BlockParameters.thermal_port = "model";

Any property values you do not specify retain their default values.

Create a default Cell object.

batteryCell = Cell
  batteryCell = 

  Cell with properties:

            Geometry: []
    CellModelOptions: [1×1 simscape.battery.builder.CellModelBlock]
                Mass: [1×1 simscape.Value]

Show the BlockParameters property of the CellModelOptions object inside the Cell object.

batteryCell.CellModelOptions.BlockParameters
      struct with fields:

          T_dependence: no
          thermal_port: model
           prm_age_OCV: OCV
      prm_age_capacity: disabled
    prm_age_resistance: disabled
      prm_age_modeling: equation
               prm_dyn: off
               prm_dir: noCurrentDirectionality
              prm_fade: disabled
              prm_leak: disabled

Specify options using dot notation.

batteryCell.CellModelOptions.BlockParameters.thermal_port = "model";

Version History

Introduced in R2022b

expand all