R2025b

Bug Fixes

Quality and stability improvements

R2025b delivers quality and stability improvements, building on the new features introduced in R2025a.

R2025a

New Features, Bug Fixes, Compatibility Considerations

 Battery Model Parameter Estimation: Model equivalent circuits, estimate parameters from hybrid pulse power characterization (HPPC) and electrochemical impedance spectroscopy (EIS) test data, and parameterize battery blocks

Simscape™ Battery™ includes objects and functions for performing parameter estimation of equivalent circuit models (ECM) for different electrochemical systems. These objects and functions allow you to process and tabulate battery or fuel cell test data, characterize the performance or map the impedance of an electrochemical cell, verify and visualize parameters, and automatically parameterize Simscape Battery cell blocks. Hybrid pulse power characterization (HPPC) and electrochemical impedance spectroscopy (EIS) represent the most typical sources of data in the parameter estimation process. In an HPPC test, you measure the voltage response of a battery over time. In an EIS test, you obtain the impedance of an electrochemical system over a wide array of frequencies.

You can import, view, process, and store data from both HPPC and EIS experimental techniques. You can then extract the necessary parameters for the ECM from the voltage or impedance data. Use HPPC data to estimate the parameters of a battery ECM across different temperatures, states of charge, and currents. This battery ECM is linear. You can then use the estimated parameters to parameterize a Battery Equivalent Circuit block. Use EIS data to estimate the parameters of a fractional-order equivalent circuit model (FOECM) for batteries, fuel cells, and other electrochemical components. After estimating the parameters of a FOECM, you can use them to simulate the frequency response of your system in MATLAB®. You can also obtain the FOECM parameters for different temperatures, states of charge, and remaining capacity conditions.

To learn how to perform model parameter estimation from HPPC and EIS test data, see Hybrid Pulse Power Characterization (HPPC) Parameter Estimation (R2025a) and Electrochemical Impedance Spectroscopy (EIS) Parameter Estimation (R2025a).

These examples show you how to estimate the model parameters from HPPC or EIS data:

Store Battery Data

  • hppcTest (R2025a) — Create test container object for hybrid pulse power characterization test data.

  • hppcTestSuite (R2025a) — Store HPPCTest objects.

  • eisTest (R2025a) — Create test container object for electrochemical impedance spectroscopy test data.

  • HPPCChart (R2025a) — Chart for visualizing identified discharge and charge pulses in a voltage plot.

Create Equivalent Circuit Models

  • ecm (R2025a) — Create equivalent circuit model object for estimating battery parameter from impedance data.

  • eisModel (R2025a) — Create fractional-order equivalent circuit model object for analyzing battery impedance data.

  • ImpedanceVerificationChart (R2025a) — Nyquist chart for visualizing measured and simulated impedance data.

  • VoltageVerificationChart (R2025a) — Chart for visualizing and comparing measured and simulated voltage over time.

Estimate Model Parameters

  • fitECM (R2025a) — Perform impedance parameter estimation for battery ECM from time-based HPPC data.

  • fitEISModel (R2025a) — Perform impedance parameter estimation for battery fractional-order model from frequency-based EIS data.

  • FitEquivalentCircuitModel (R2025a) — Equivalent circuit model for fitting parameters from time-based pulse power characterization data.

  • FitFractionalOrderModel (R2025a) — Fractional order model for fitting parameters from frequency-based electrochemical impedance spectroscopy data.

  • estimateBatteryEISParameters (R2025a) — Estimate initial parameters for electrochemical-impedance-spectroscopy fractional-order model.

  • eisParameterEstimator (R2025a) — Manually tune parameter values of fractional-order equivalent circuit model and graphically verify the accuracy of the fit against the measured data.

Battery Equivalent Circuit Block Enhancement: Model cycling aging data with respect to the number of discharge cycles, temperature, and current

You can now model the cycling aging data for the Battery Equivalent Circuit (R2025a) block with respect to the number of discharge cycles, temperature, and current by specifying these parameters:

  • Current breakpoints for cycling aging data, I

  • Percentage change in terminal resistance, R0Change(N,T,I)

  • Initial target for percentage change in internal resistance due to cycling aging

  • Percentage change in cell capacity, CapacityChange(N,T,I)

  • Initial target for percentage change in capacity due to cycling aging

  • Percentage change in self-discharge resistance, SelfDischargeRChange(N,T,I)

  • Initial target for percentage change in self-discharge resistance due to cycling aging

  • Percentage change in first polarization resistance, R1Change(N,T,I)

  • Initial target for percentage change in first polarization resistance due to cycling aging

  • Percentage change in second polarization resistance, R2Change(N,T,I)

  • Initial target for percentage change in second polarization resistance due to cycling aging

  • Percentage change in third polarization resistance, R3Change(N,T,I)

  • Initial target for percentage change in third polarization resistance due to cycling aging

As a result of this change:

  • The Lookup tables (temperature dependent) value of the Cycling aging model parameter has been renamed to Lookup tables (constant temperature dependent). This option is valid only if you simulate the battery with a constant temperature value.

  • The Cycling aging model parameter now comprises two more values:

    • Lookup tables (temperature dependent) — Set tabulated data for the percentage change in parameters as a function of N and variable temperature. This tabulated data must be strictly monotonically increasing or decreasing with respect to the number of discharge cycles.

    • Lookup tables (temperature and current dependent) — Set tabulated data for the percentage change in parameters as a function of N, variable temperature, and variable current. This tabulated data must be strictly monotonically increasing or decreasing with respect to the number of discharge cycles.

 Battery Equivalent Circuit Block Enhancement: Parameterize overpotential parameters with respect to SOC, temperature, and current

You can now parameterize the overpotential parameters of the Battery Equivalent Circuit (R2025a) block with 2-D lookup tables depending on SOC and current or 3-D lookup tables depending on SOC, temperature, and current. You can continue to parameterize the existing dependencies on SOC, temperature, and current directionality.

To enable the current dependency of the overpotential parameters, set the new Current dependence for resistance parameters parameter to Lookup tables (current dependent).

For more information, see Battery Equivalent Circuit block supports current dependency for overpotential parameters.

Battery Equivalent Circuit Block Enhancement: Support calculation of number of discharge cycles with nominal capacity

The Battery Equivalent Circuit (R2025a) block now supports the calculation of the number of discharge cycles for cycling aging by using the nominal capacity. Set the Cycle calculation method parameter to:

  • Equivalent cycles — The block uses the aged capacity to calculate the number of discharge cycles.

  • Equivalent full cycles — The block uses the nominal capacity to calculate the number of discharge cycles.

Battery Equivalent Circuit Block Enhancement: Generate digital data sheet

You can now generate a digital data sheet for the Battery Equivalent Circuit (R2025a) block, including charging, discharging, cycle life, shelf life, and hysteresis characteristics, using a MATLAB live script. The script imports the parameters from the Battery Equivalent Circuit block you select in the model.

To open the MATLAB live script:

  1. Double-click the block to open the Block Parameters window.

  2. Open the Description tab.

  3. Click the Generate datasheet hyperlink.

To generate the data sheet, in the live script, click the Generate Datasheet button.

Battery Single Particle Block Enhancement: Inject additional resistance fault and configure fault behaviors

The Battery Single Particle (R2025a) block now supports the new interface for modeling faults. This interface separates the system model files from files that store the fault information. You can systematically model the fault as an open-circuit cell when the additional series-connected resistance is high (greater than 1000 ohm) or when there is an abnormal internal resistance. You can also safely separate the nominal model behavior from the faulted model behavior to avoid safety tasks interfering with design tasks. For more information, see Introduction to Simscape Faults (R2025a).

Battery Single Particle Block Enhancement: Normalize open-circuit potentials to absolute stoichiometry

The Battery Single Particle (R2025a) block now allows you to normalize the open-circuit potentials of the electrodes to the absolute stoichiometry. To specify the open-circuit potentials normalized to the absolute stoichiometry, set the Stoichiometry breakpoints specification parameter to Absolute. The block then exposes these four parameters:

  • Absolute anode stoichiometry breakpoints

  • Anode open-circuit potential relative to absolute stoichiometry

  • Absolute cathode stoichiometry breakpoints

  • Cathode open-circuit potential relative to absolute stoichiometry

Bar-Delta Filter SOC Estimator Blocks: Estimate battery state of charge using bar-delta filtering

These blocks allow you to estimate the state of charge of a battery by using the Kalman filter algorithms with bar-delta filtering:

The bar-delta filtering uses the similar states in pack cells to estimate all cell state-of-charge values of the battery pack. This filtering uses only slightly more computation than is needed for estimating the values for a single cell.

CC-CV Charging (Proportional Control) Block: Implement constant-current constant-voltage charging algorithm with proportional control

The CC-CV Charging (Proportional Control) (R2025a) block implements a constant-current (CC), constant-voltage (CV) charging algorithm for a battery with proportional control.

Battery Management System Blocks Enhancement: Switch between single-precision and double-precision floating-point simulation

You can now easily switch between single-precision and double-precision floating-point simulation by using the Algorithm data type parameter in these blocks:

Battery Builder App Enhancement: Export battery chart to additional file types

The Battery Builder (R2025a) app now supports additional file types for exporting the 3-D plot of a battery object.

To export the battery chart of a battery object to a file, such as a FIG, JPG, or PNG file, first select the battery object in the Battery Browser panel of the app. Then, under the Battery Chart tab, in the Export section of the toolstrip, click Export Chart.

buildBattery Function Enhancement: Control command line output

You can now control the command line output of the buildBattery (R2025a) function by setting the Verbose argument. A value of 'on' is equivalent to true and a value of 'off' is equivalent to false.

exportBatteryStl Function: Create stereolithography file of battery objects

The exportBatteryStl (R2025a) function creates a stereolithography (STL) file of a battery object. STL is a file format that you can use for 3-D printing and computer-aided design.

Fault Qualification Block Enhancement: Specify vectorized inputs of logical signals

The Symptom input port of the Fault Qualification (R2025a) block now accepts vectors of logical values 0 or 1. The qualification and disqualification times are the same for all input symptoms.

Battery Charging Current Limit and Battery Discharging Current Limit Blocks Enhancement: Specify inputs as vector of minimum and maximum values

You can now specify the minimum and maximum values for the CellVoltage and CellTemperature input ports of the Battery Charging Current Limit (R2025a) and Battery Discharging Current Limit (R2025a) blocks. To specify these inputs as minimum and maximum values, select the Specify inputs as [Min,Max] parameter.

Battery CC-CV Block Enhancement: Specify CellVoltage input as vector of minimum and maximum values

You can specify the minimum and maximum values for the CellVoltage input port of the Battery CC-CV (R2025a) block. To specify this input as a vector of minimum and maximum values, select the Specify CellVoltage input as [Min,Max] parameter.

Battery Temperature Monitoring Block Enhancement: Specify CellTemperature input as vector of minimum and maximum values

You can specify the minimum and maximum values for the CellTemperature input port of the Battery Temperature Monitoring (R2025a) block. To specify this input as a vector of minimum and maximum values, select the Specify input as [Min,Max] parameter.

Battery Coolant Control Block Enhancement: Specify CellTemperature input as vector of minimum and maximum values

You can specify the minimum and maximum values for the CellTemperature input port of the Battery Coolant Control (R2025a) block. To specify this input as a vector of minimum and maximum values, select the Specify CellTemperature input as [Min,Max] parameter.

Battery State Estimation: Self-paced, interactive course available as part of Online Training Suite subscription or for individual purchase

Battery State Estimation is a new course that teaches you to:

  • Model Kalman filter-based techniques to estimate battery state using Simscape Battery software.

  • Parameterize and tune the Kalman filter for battery state estimation.

  • Estimate the state of charge, state of energy, and state of health to ensure optimum performance of the battery pack.

Battery State Estimation uses tasks to teach concepts incrementally. You receive automated assessments and feedback after submitting tasks.

Battery State Estimation describes the task, displays an interactive model, and assesses whether the model matches the requirements set by the training.

For more information, see Battery State Estimation.

Featured Examples

New examples in this release include:

 Functionality being removed or changed

Battery Equivalent Circuit block supports current dependency for overpotential parameters

Behavior change

The Battery Equivalent Circuit (R2025a) block now supports the parameterization of the overpotential parameters with 2-D lookup tables depending on the state of charge and current or 3-D lookup tables depending on the state of charge, temperature, and current. In earlier releases, the block only supports the dependency of the overpotential parameters on the instantaneous current charge or discharge direction.

As a result of this change:

  • The Current directionality for resistance parameters parameter has been replaced with the Current dependence for resistance parameters parameter.

  • If you create a CellModelBlock object in an earlier release and you set the CellModelBlockPath property to "batt_lib/Cells/Battery Equivalent Circuit" and the BlockParameters property contains a CurrentDirectionality field equal to "Enabled", then the software replaces the CurrentDirectionality field with the CurrentDependence field and sets it to "CurrentDirectionalityDependent".

  • If you save a model in an earlier release containing a composite component with the Battery Equivalent Circuit block and you have set the Current directionality for resistance parameters parameter to Enabled, the simulation of the model still runs successfully in R2025a even if the new Current dependence for resistance parameters parameter is set to Disabled. The model still runs because the Current directionality for resistance parameters parameter takes precedence over the Current dependence for resistance parameters parameter. You cannot access or modify the Current directionality for resistance parameters parameter.

  • If you save a model in an earlier release containing the Battery Equivalent Circuit block, the software automatically updates the value of the new Current dependence for resistance parameters parameter with the value of the old Current directionality for resistance parameters parameter.

Array of Electrical Nodes Connector and Array of Thermal Nodes Connector blocks will be removed

Still runs

The Array of Electrical Nodes Connector (R2025a) and Array of Thermal Nodes Connector (R2025a) blocks will be removed in a future release. Use the Array Connection (R2025a) block instead.

R2024b

New Features, Bug Fixes

Battery Pack Modeling: Self-paced, interactive course available as part of Online Training Suite subscription or for individual purchase

Battery Pack Modeling builds upon concepts covered in Simscape Battery Onramp. To get the most out of Battery Pack Modeling, take Simscape Battery Onramp first. Simscape Battery Onramp is a free, self-paced, interactive course that offers a quick and high-level introduction to Simscape Battery.

Battery Pack Modeling is a comprehensive course that teaches you to:

  • Use the Battery Builder (R2024b) app to define and visualize your battery design, choose the model fidelity, and build a Pack (Generated Block) (R2024b) block.

  • Connect the Pack (Generated Block) block to a Simulink® model and simulate different thermal paths to observe the effects on the battery pack temperature.

  • Implement coolant path modeling using the Parallel Channels (R2024b) block and analyze its effects on the battery pack temperature.

Battery Pack Modeling uses tasks to teach concepts incrementally. You receive automated assessments and feedback after submitting tasks.

Battery Pack Modeling describes the task, displays an interactive model, and assesses whether the model matches the requirements set by the training.

Your progress is saved when you exit the training, so you can complete the training in multiple sessions.

To open Battery Pack Modeling, perform one of these actions:

  • Simulink Start Page: On the Learn tab, click the Launch button that appears when you pause on Battery Pack Modeling.

  • MATLAB Command Window: Enter learning.simulink.launchOnramp("otslbpm").

Alternatively, you can take the course at Self-Paced Online Courses.

Fuel Cell Equivalent Circuit Block: Calculate maximum charging and discharging power of battery pack over a specific time horizon

The Fuel Cell Equivalent Circuit (R2024b) block models a polymer-electrolyte-membrane (PEM) fuel cell by using electrical circuit elements and a dynamic membrane water content model that determines the cell ohmic losses.

The Fuel Cell Equivalent Circuit block models these parts of a fuel cell:

  • Fuel cell potential — Model an ideal PEM fuel cell potential with Tafel equation approximation of losses.

  • Fuel cell dynamic overpotential — Model the dynamic overpotential contributions of the fuel cell.

  • Fuel cell membrane — Model the water content dynamics.

Battery Equivalent Circuit Block Enhancement: Additional built-in parameterizations

The Battery Equivalent Circuit (R2024b) block now supports these additional built-in parameterizations that represent components from specific suppliers:

  • CSB Battery/EVX12300

  • CSB Battery/EVX12340

  • CSB Battery/EVX12520

  • CSB Battery/GP12340

  • CSB Battery/GP1245

  • CSB Battery/GPL12260

  • CSB Battery/GPL12520

  • CSB Battery/GPL1272

  • Exide/EP10012

  • Exide/EP1212

  • Exide/EP16012

  • Exide/EP1712

  • Exide/EP3212

  • Exide/EP6512

  • Exide/EP912

  • Panasonic/BK_10V1S

  • Panasonic/BK_110AAO

  • Panasonic/BK_130AA

  • Panasonic/BK_200A

  • Panasonic/BK_200AAB

  • Panasonic/BK_210A

  • Panasonic/BK_250A

  • Panasonic/BK_260SCP

  • Panasonic/BK_300SCP

  • Panasonic/BK_310CH

  • Panasonic/BK_380A

  • Panasonic/BK_450A

  • Panasonic/BK_60AAAH

  • Panasonic/BK_65AAAK

  • Panasonic/BK_70AAAJ

  • Panasonic/BK_70AAH

  • Panasonic/BK_80AAAB

The parameterizations of these batteries match the manufacturer data sheets. To load a predefined parameterization, double-click the Battery Equivalent Circuit block, click the <click to select> hyperlink of the Selected part parameter and, in the Block Parameterization Manager window, select the part you want to use from the list of available components.

Battery Equivalent Circuit Block Enhancement: Discretize thermal model into multiple elements along the cell height

To increase the fidelity of the thermal modeling, you can now discretize the thermal model of the Battery Equivalent Circuit (R2024b) block along the cell height. To discretize the thermal model along the cell height, set the Thermal model parameter to Height distributed thermal mass. The block then exposes the HDist thermal port, which is an array of thermal nodes that represents the nodes along the height of the cell.

Battery Power Estimator Block: Calculate maximum charging and discharging power of battery pack over a specific time horizon

The Battery Power Estimator (R2024b) block calculates the maximum charging and discharging power capabilities of a battery pack across a specified time horizon. This block adheres to the sign convention where the current and power are positive values during the battery charging process. To estimate the maximum charging and discharging power capabilities of a battery pack, the Battery Power Estimator block uses the hybrid pulse power characterization (HPPC) method.

Explore Techniques to Estimate Battery State of Charge Example: Learn more about batteries, Kalman filter, and coulomb counting

The Explore Techniques to Estimate Battery State of Charge (R2024b) example teaches you about the different techniques you can employ to estimate the state of charge (SOC) of a battery, including the Kalman filter algorithm and the coulomb counting method. The SOC of a battery measures the current capacity of the battery in relation to its maximum capacity. The Kalman filter is an estimation algorithm that infers the state of a linear dynamic system from incomplete and noisy measurements. This example illustrates the effectiveness of the Kalman filter in dynamically estimating the SOC of a battery, even when starting with inaccurate initial conditions and when the measurements are noisy.

To highlight the accuracy of the Kalman filter, you also estimate the SOC of the battery by using the coulomb counting algorithm. You then compare these results with the SOC values you previously estimated using the Kalman filter.

For a more straightforward and compact version of this example, see the Battery State-of-Charge Estimation (R2024b) example.

Generated Battery Blocks Enhancement: Expose the cell-level output ports in parent battery blocks

The battery blocks now expose the same output ports of the cell model block that you used to generate these battery blocks.

Array of Thermal Nodes Connector Block Enhancement: Concatenate arrays horizontally or multidimensionally

You can now perform horizontal and multidimensional concatenation of arrays of thermal nodes by using the Array of Thermal Nodes Connector (R2024b) block.

To concatenate the inputs horizontally, set the Concatenate dimension parameter to 2. To perform multidimensional concatenation, set the Concatenate dimension parameter to 3 or more. The concatenation requires that all of the dimensions of the input arrays are the same size except for the dimension they are concatenated along.

Featured Examples

New examples in this release include:

R2024a

New Features

Simscape Battery Onramp: Free, self-paced, interactive Simscape Battery course

Simscape Battery Onramp (R2024a) is a free, self-paced, interactive course that helps you get started with Simscape Battery software.

Simscape Battery Onramp teaches you to:

  • Build a battery pack and model its heat exchange with the environment.

  • Estimate the state-of-charge (SOC) level of the battery pack to design a charging method that keeps the SOC within safe limits.

  • Model algorithms for safely charging and discharging batteries under different temperature conditions.

Simscape Battery Onramp uses tasks to teach concepts incrementally. You receive automated assessments and feedback after submitting tasks.

Simscape Battery Onramp describes the task, displays an interactive model, and assesses whether the model matches the requirements set by the training.

Your progress is saved when you exit the training, so you can complete the training in multiple sessions.

To open Simscape Battery Onramp, perform one of these actions:

  • On the Simulink Start Page, on the Learn tab, click the Launch button that appears when you pause on Simscape Battery Onramp.

  • In the MATLAB Command Window, enter learning.simulink.launchOnramp("orsb").

Alternatively, you can take the course at Self-Paced Online Courses.

Battery Single Particle Block: Model a battery using a single-particle approach

The Battery Single Particle (R2024a) block models a battery using a single-particle approach. This implementation considers the ohmic and mass transport overpotentials in both the liquid electrolyte phase and the solid electrode phase. Additionally, it considers the reaction kinetics and the current collector resistance.

The battery comprises three sections: two electrodes, the anode and cathode, and a porous separator between the electrodes. In this block, the anode refers to the negative electrode during discharge and the cathode refers to the positive electrode during discharge. The block models the ohmic overpotentials of the electrodes and electrolyte, as well as the concentration across the cell cross section from the anode current collector to the cathode current collector, in a one-dimensional framework.

ParallelAssembly and Module Objects and Blocks Enhancement: Expose thermal nodes at specific surface boundaries

For a more detailed thermal modeling of the battery cells in the battery pack environment, you can now expose the thermal nodes for the cells located at the surface boundaries of a ParallelAssembly (R2024a) or a Module (R2024a) object. To expose these thermal nodes, specify the XminThermalNodes, XmaxThermalNodes, YminThermalNodes, and YmaxThermalNodes properties accordingly.

For parallel assemblies and modules with hexagonal cylindrical cells, you can also enable the heat transfer between the cells and a serpentine cooling plate. To expose the thermal nodes at a serpentine cooling plate inside the parallel assembly or the module, specify the SerpentineCoolingPlate property.

Then, the generated ParallelAssembly (Generated Block) (R2024a) and Module (Generated Block) (R2024a) expose thermal conserving ports associated with the surface boundaries you have specified in the ParallelAssembly and Module objects.

Battery Cell Contact Monitoring Block: Monitor the state of the contact between cells in a battery

Use the Battery Cell Contact Monitoring (R2024a) block to monitor the state of contact between the cells of a battery. Algorithms for cell contact monitoring are essential for the safety, performance, and reliability of battery systems, especially in a battery pack with many cells.

This block first checks for contact loss symptoms in cells or parallel assemblies. If the block detects a symptom, and this symptom lasts for a time longer than the value of the Qualification time (s) parameter, then the block reports the symptom as a loss-of-contact error.

Battery Capacity Estimator (Least Squares) Block: Estimate cell capacity of a battery by using least square algorithms

Use the Battery Capacity Estimator (Least Squares) (R2024a) block to estimate the cell capacity of a battery by using least square algorithms.

Use this block in conjunction with another block that estimates the state of charge (SOC) of the battery, such as SOC Estimator (Kalman Filter) (R2024a) or SOC Estimator (Adaptive Kalman Filter) (R2024a).

Battery Capacity Estimator (Least Squares, Variable Weights) Block: Estimate cell capacity of a battery by using least square algorithms and variable weights

Use the Battery Capacity Estimator (Least Squares, Variable Weights) (R2024a) block to estimate the cell capacity of a battery by using least square algorithms and variable weights.

Use this block in conjunction with another block that estimates the state of charge (SOC) of the battery, such as SOC Estimator (Kalman Filter) (R2024a) or SOC Estimator (Adaptive Kalman Filter) (R2024a).

Battery Creation Functions: Create battery objects by using functions

You can now create the battery objects available in Simscape Battery by using these creation functions:

Use these functions to avoid importing the namespace, using the full class name, or dealing with name-value arguments when you create battery objects.

State-of-Charge Estimator Blocks Enhancement: Estimate state of charge using equivalent models with two time-constant charge dynamics

You can now estimate the battery state of charge (SOC) by using equivalent models with two time-constant charge dynamics for these blocks:

To select an equivalent model with two time-constant charge dynamics, set the Charge dynamics parameter to Two time-constant dynamics and specify the values of the new Second polarization resistance, R2(SOC,T), (ohm) and Second time constant, tau2(SOC,T), (s) parameters.

State-of-Energy Estimator Blocks Enhancement: Estimate state of energy using equivalent models with two time-constant charge dynamics

You can now estimate the battery state of energy (SOE) by using equivalent models with two time-constant charge dynamics for these blocks:

To select an equivalent model with two time-constant charge dynamics, set the Charge dynamics parameter to Two time-constant dynamics and specify the values of the new Second polarization resistance, R2(SOE,T), (ohm) and Second time constant, tau2(SOE,T), (s) parameters.

Passive Balancing Interface Block: Model an abstracted vectorized interface for cell balancing

The Passive Balancing Interface (R2024a) block provides an abstracted vectorized interface for cell balancing between a battery and a cell supervisory circuit. Use this block with desktop simulations and hardware-in-the-loop battery emulation hardware.

Battery Pack Model Builder Objects and Blocks Enhancement: Specify external cell balancing strategy

You can now specify an external balancing cell strategy for these objects:

To specify and model an external cell balancing strategy, set the BalancingStrategy property to "External".

After you specify the strategy, these blocks expose two electrical array-of-nodes ports, +BUS and -BUS:

For desktop simulations and hardware-in-the-loop battery emulation hardware, use this option in conjunction with the Passive Balancing Interface (R2024a) block.

Featured Examples

New examples in this release include:

R2023b

New Features

Battery Equivalent Circuit Block: Model the electro-thermal dynamics of a battery by using electrical circuit elements

The Battery Equivalent Circuit (R2023b) block models the electro-thermal dynamics of a battery by using electrical circuit elements with variable characteristics and a zero-dimensional lumped-mass thermal heat equation. You can also use this block to simulate the faulted dynamics of a battery in shorted, open-circuit, and thermal runaway states. To model cycling aging and calendar aging of the battery, you can use lookup tables or empirical relationships. The block tabulates the variable characteristics of the electrical circuit elements as functions of the state of charge of the battery and, optionally, current directionality and temperature. This block comprises these constituent model files:

  • Electrical model

    • Open-circuit voltage and hysteresis model

    • Instantaneous overpotential model

    • Dynamic overpotential model

  • Thermal model

    • Constant temperature

    • Lumped thermal mass model

  • Cycling aging model

    • Equations

    • Temperature-independent table lookup

    • Temperature-dependent table lookup

  • Calendar aging model

    • Resistance aging model

    • Capacity aging model

  • Faults model

    • Short model

    • Open-circuit model

    • Thermal runaway model

BatterySimulationChart Object: Dynamically visualize the battery states of a specific battery block

The BatterySimulationChart (R2023b) object constructs a dynamic version of the BatteryChart (R2023b) object. Use the dynamic version of the battery chart to visualize the time-series data of a specific dynamic variable that you store and select inside a BatterySimulationLog (R2023b) object.

Use this object with a BatterySimulationLog object to visualize the relevant battery states of a specific battery block that are impacted by the electro-thermal design and battery architecture, including cell temperature, current, and state of charge.

ParallelAssembly and Module Enhancement: Vary parameters for each cell model in the system

For the ParallelAssembly (R2023b) and Module (R2023b) objects, you can now vary the cell parameters between individual cell models inside the battery system. To support specific cell parameterization, set the CellParameterDeviation property to "PercentDeviation".

When you set this property value, the cell parameters in the generated ParallelAssembly (R2023b) and Module (R2023b) blocks have an associated Percent deviation parameter. Use this parameter to specify the percent deviation of the parameter value corresponding to each cell model in the battery.

SOE Estimator Blocks: Estimate the state of energy of a battery with Kalman filter or energy counting algorithms

Estimate the state of energy (SOE) of a battery with Kalman filter or energy counting algorithms using these blocks:

These blocks are fully compatible with the custom battery models that you can generate by using the buildBattery (R2022b) function.

Battery Capacity Estimator (Kalman Filter) Block: Estimate cell capacity of a battery by using Kalman filter algorithms

Use the Battery Capacity Estimator (Kalman Filter) (R2023b) block to estimate the cell capacity of a battery by using the Kalman filter algorithms.

Use this block in conjunction with another block that estimates the state of charge (SOC) of the battery, such as SOC Estimator (Kalman Filter) (R2023b) or SOC Estimator (Adaptive Kalman Filter) (R2023b).

Functions for Battery Pack Model Builder Objects: Modify properties of some or all underlying battery objects inside a parent battery object

You can now modify one or more properties of some or all underlying battery objects inside a parent battery object using these functions:

When you perform sensitivity analysis on design variables, you can use these functions to quickly modify design variables from the higher-level battery objects, including ModuleAssembly (R2023b) or Pack (R2023b) objects, without using nested for-loops.

SOH Estimator (Capacity-Based) Block: Estimate state of health based on capacity fade

Use the SOH Estimator (Capacity-Based) (R2023b) block to estimate the state of health (SOH) of a battery based on the capacity fade.

The cell capacity is an important indicator of the aging of a battery. During the life cycle of a battery, the cell capacity decreases over time. Usually, the cell SOH is 0 when the cell capacity decreases to about 80% of its nominal value.

BatterySimulationLog Object: Store Simscape simulation log of a specific battery block inside a Simulink model

The BatterySimulationLog (R2023b) object stores the Simscape simulation log of a specific battery block inside a Simulink model.

This Simulink model must contain at least one of the Simscape Battery blocks that you generate by using the objects and functions in the Battery Pack Model Builder, including ParallelAssembly (R2023b), Module (R2023b), ModuleAssembly (R2023b), or Pack (R2023b).

Use this object as an input to the BatterySimulationChart (R2023b) object to dynamically visualize the values of a specific variable on top of the 3-D battery simulation chart using a colormap.

Cell and CellModelBlock Objects Enhancement: Specify a Battery Equivalent Circuit block for the cell model block component

The Cell (R2023b) object now supports the Battery Equivalent Circuit (R2023b) block for the cell model block component. To use the Battery Equivalent Circuit block, set the CellModelBlockPath property of the associated CellModelBlock (R2023b) object to "batt_lib/Cells/Battery Equivalent Circuit".

You can also parameterize the Cell object with pre-parameterized data if its cell model block component is the Battery Equivalent Circuit block.

buildBattery Function Enhancement: Generate instance-specific parameterization script for Module and ParallelAssembly blocks

You can now parameterize each single instance of module or parallel assembly inside a generated library separately by setting the MaskParameters argument of the buildBattery (R2023b) function to "VariableNamesByInstance". The function then generates a script that contains a set of parameters for each instances of the same type of battery object. For example if a ModuleAssembly (Generated Block) (R2023b) block contains five Module (R2023b) blocks of the same type, the function generates five different sets of parameters for the five module instances in the generated library.

To learn more on how to generate instance-specific variable names, see Manage Battery Run-Time Parameters with Centralized Script (R2023b).

SOC Estimator Blocks Enhancement: Specify Current input as vector of cell currents

You can now specify the value of the Current input port as a vector of cell currents for these blocks:

To enable vector input, select the Specify Current input as cell current(s) parameter. If you select this parameter, the Current input port must have the same size as the other inputs. The elements of this input represent individual cell currents.

SOC Estimator (Adaptive Kalman Filter, Variable Capacity) Block: Estimate state of charge and terminal resistance by using Adaptive Kalman filter algorithm and variable capacity

Use the SOC Estimator (Adaptive Kalman Filter, Variable Capacity) (R2023b) block to estimate the state of charge (SOC) and the terminal resistance of a battery by using the adaptive Kalman filter algorithms. The cell capacity of the battery is an input to the block.

SOC Estimator (Kalman Filter, Variable Capacity) Block: Estimate state of charge by using Kalman filter algorithm and variable capacity

Use the SOC Estimator (Kalman Filter, Variable Capacity) (R2023b) block to estimate the state of charge (SOC) of a battery by using the Kalman filter algorithms. The cell capacity of the battery is an input to the block.

Battery (Table-Based) Block Enhancement: Define breakpoint values for the fading and calendar aging options when the number of discharge cycles or time intervals is zero

The Battery (Table-Based) (R2023b) block now supports the definition of breakpoint values for the fading and calendar aging options when the number of discharge cycles or time intervals is zero.

If you do not define the zero breakpoint values:

  • If you set the Extrapolation method for all tables parameter to Linear, the block extrapolates an incorrect value for some table data. For example, the extrapolated capacity can rise above one, meaning that the capacity of the cell at that point is greater than the nominal capacity of the cell.

  • If you set the Extrapolation method for all tables parameter to Nearest, the block extrapolates the nearest value. For a brand new battery, this extrapolation indicates that the fading and calendar aging have already occurred.

  • If you set the Extrapolation method for all tables parameter to Error, the software throws an error if the number of discharge cycles or storage duration is lower than the lowest breakpoint for this table data.

Featured Examples

New example in this release includes:

R2023a

New Features, Bug Fixes, Compatibility Considerations

Battery Builder App: Design battery systems interactively and generate dynamic models

Use the Battery Builder (R2023a) app to create Simscape™ battery models by interactively creating, modifying, and visualizing MATLAB battery objects.

With the Battery Builder app, you can:

  • Import existing battery objects from your workspace or a MAT file.

  • Create new Cell (R2023a), ParallelAssembly (R2023a), Module (R2023a), ModuleAssembly (R2023a), and Pack (R2023a) objects.

  • Generate a 3-D plot of the battery object, edit the plotting options, and export the plot to a FIG file.

  • Inspect the hierarchy of a battery object and visualize its subcomponents.

  • Edit the properties of a battery object, such as geometrical data and thermal boundary conditions.

  • Export the objects you create in the app to your workspace or a MAT file.

  • Create a Simscape battery model from an object.

Cell and CellModelBlock Objects Enhancement: Specify a custom block for the cell model block component

The Cell (R2023a) object now supports custom blocks for the cell model block component other than the Battery (Table-Based) (R2023a) block. To use your own custom block, set the CellModelBlockPath property of the associated CellModelBlock (R2023a) object to the library path of your custom block.

To use a custom block, it must meet all 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.

Cell Object Enhancement: Model a battery cell from built-in parameterizations

You can now parameterize the Cell (R2023a) object with built-in parameterizations. Use this pre-parameterization data to set up the object to represent components from specific suppliers. The parameterizations of these batteries match the discharge curves in the manufacturer data sheets.

To parameterize the Cell object with pre-parameterized data, specify the ParameterizationManufacturer and ParameterizationPartNumber properties. You can parameterize the Cell object only if its cell model block component is the Battery (Table-Based) (R2023a) block.

Cell Object Enhancement: Specify the capacity and energy of a battery cell

Use the Capacity and Energy properties of the Cell (R2023a) object to specify the capacity and energy of a battery cell, respectively.

As a result of these new properties, the ParallelAssembly (R2023a), Module (R2023a), ModuleAssembly (R2023a), and Pack (R2023a) objects now contain two new read-only properties, CumulativeCellCapacity and CumulativeCellEnergy, which represent the cumulative cell capacity and the cumulative cell energy of the battery, respectively.

Battery Pack Modeling Objects and Blocks Enhancement: Model a cooling plate at the ModuleAssembly and Pack levels

You can now model a cooling plate component directly at the ModuleAssembly or Pack level by setting the CoolingPlate property to either "Top" or "Bottom".

Moreover, inside the ParallelAssembly (R2023a), Module (R2023a), ModuleAssembly (R2023a), and Pack (R2023a) objects, you can now use the new CoolingPlateBlockPath property to specify which cooling plate block to assign to the object at the boundary defined by the CoolingPlate property.

As a result of these changes, the ModuleAssembly (Generated Block) (R2023a) and Pack (Generated Block) (R2023a) blocks have these new ports:

  • CP_out — Vector that contains the plate temperature, the fluid pressure drop, and the fluid temperature change of each cooling plate in the model.

  • Fluid_In — Fluid that comes into each cooling plate.

  • Fluid_Out — Fluid that comes out of each cooling plate.

  • CPB — Thermal conserving port for connecting the bottom side of the module assembly with a cooling plate. This port is available only in the ModuleAssembly generated block.

  • CPT — Thermal conserving port for connecting the top side of the module assembly with a cooling plate. This port is available only in the ModuleAssembly generated block.

Battery Pack Modeling Objects and Blocks Enhancement: Model intercell heat transfer

You can now model direct cell-to-cell heat exchange. Direct cell-to-cell heat exchange is important when you want to simulate more detailed thermal management strategies or thermal propagation scenarios where the intercell heat transfer happens at faster rates than the ambient or coolant rates.

This enhancement comprises:

  • Two new properties in the ParallelAssembly (R2023a), Module (R2023a), ModuleAssembly (R2023a), and Pack (R2023a) objects:

    • InterCellThermalPath — Option to use thermal resistance blocks to represent a linear cell-to-cell heat transfer path between adjacent battery cells

    • InterCellRadiativeThermalPath — Option to use thermal resistance blocks to represent a radiative cell-to-cell heat transfer path between adjacent battery cells

  • New read-only properties in the ParallelAssembly (R2023a) and Module (R2023a) objects that show the internal thermal connections and mapping of cells and parallel assemblies:

    • NumInterCellThermalConnections — Number of internal thermal connections between the cells.

    • NumInterParallelAssemblyThermalConnections — Number of internal thermal connections between the parallel assemblies. This property is available only in the Module object.

    • InterCellConnectionsMapping — 2-D map of the internal connections between the cells.

    • InterParallelAssemblyConnectionsMapping — 2-D map of the internal connections between the parallel assemblies. This property is available only in the Module object.

    • InterParallelAssemblyCellConnectionsMapping — 2-D map of the internal connections between the battery cell models inside each parallel assembly of the module and the intercell heat transfer resistors. This property is available only in the Module object.

    • Layout — 2-D distribution of subcomponents or cells within the parent.

  • New thermal parameters in the ParallelAssembly (R2023a) and Module (R2023a) generated blocks:

    • Inter-cell thermal path resistance — Resistance of the thermal path between the cells inside the parallel assembly or module.

    • Inter-parallel assembly thermal path resistance — Resistance of the thermal path between the parallel assemblies inside the module. This parameter is available only in the Module generated block.

    • Inter-cell radiation heat transfer area — Area of the radiation heat transfer between the cells inside the parallel assembly or module.

    • Inter-cell radiation heat transfer coefficient — Coefficient of the radiation heat transfer between the cells inside the parallel assembly or module.

    • Inter-parallel assembly area for radiation heat transfer — Area of the radiation heat transfer between the parallel assemblies inside the module. This parameter is available only in the Module generated block.

    • Inter-parallel assembly coefficient for radiation heat transfer — Coefficient of the radiation heat transfer between the parallel assemblies inside the module. This parameter is available only in the Module generated block.

Battery Management System Blocks Enhancement: Specify single data type for all inputs and parameters

These blocks in the Battery Management System library now support single-precision floating-point simulation in addition to the existing double-precision floating-point simulation support:

Note

To enable single-precision-floating point simulation, the data type of all inputs and parameters, except for the Sample time (-1 for inherited) parameter, must be single.

Note

Continuous-time implementation of these blocks works only in double-precision floating-point simulation. If you provide single-precision floating-point parameters and inputs, these blocks cast them to double-precision floating-point values to prevent errors.

SOC Estimator (Coulomb Counting, Variable Capacity) Block: Estimate state of charge by using Coulomb counting and variable capacity

Use the SOC Estimator (Coulomb Counting, Variable Capacity) (R2023a) block to estimate the state of charge (SOC) of a battery by using the coulomb counting method and the cell capacity of the battery. The block calculates the SOC by dividing the accumulated charge by the value of the cell capacity. The block then calculates the accumulated charge by integrating the battery current.

Battery CC-CV Block Enhancement: Specify the tracking coefficient of a proportional integral (PI) controller

You can now specify the tracking coefficient Kt of the Battery CC-CV (R2023a) block.

The block feeds the difference between the tracking signal and the controller output back to the integrator input with a gain value Kt. Use this parameter to specify the gain in that feedback loop.

Signal tracking has several applications, including bumpless control transfer and avoiding windup in multiloop control structures.

Featured Examples

New examples in this release include:

 Functionality being removed or changed

The Modeling Option parameter of Battery block is replaced

Behavior change

The Modeling option parameter of the Battery (R2023a) block is removed and replaced with the Expose charge measurement port and Thermal port parameters. To expose the internal charge output port q, set the Expose charge measurement port parameter to Yes. To expose the thermal port H and simulate thermal effects, set the Thermal port parameter to Model.

As a result of this change, if you created a custom component by using the Battery block in an earlier release, you must update the custom component accordingly.

For batteryecm.battery_thermal: 
charge_measurement_port=simscape.enum.thermaleffects.model
For batteryecm.battery_instrumented: 
charge_measurement_port=simscape.enum.battery.enable.yes
For batteryecm.battery_thermal_instrumented: 
charge_measurement_port=simscape.enum.thermaleffects.model 
charge_measurement_port=simscape.enum.battery.enable.yes

R2022b

New Features

Introducing Simscape Battery: Design and simulate battery and energy storage systems

Simscape Battery provides design tools and parameterized models for designing battery systems. You can create digital twins, run virtual tests of battery pack architectures, design battery management systems, and evaluate battery system behavior across normal and fault conditions. Battery Pack Model Builder is a design tool that lets you interactively evaluate different battery pack architectures. The tool automates the creation of simulation models that match the desired pack topology and includes cooling plate connections so electrical and thermal responses can be evaluated.

Parameterized models of battery packs and battery management systems demonstrate operations, including cell balancing and state of charge estimation. You can use these examples to determine cell requirements, perform trade-off analyses and hardware-in-the-loop (HIL) testing, and generate readable and efficient C/C++ code.

To learn how to build your own battery models with Simscape Battery, see the Get Started with Simscape Battery (R2022b) category.

Battery Pack Model Builder: Create and evaluate different pack architectures

The Battery Pack Model Builder is a design tool that lets you interactively evaluate different battery pack architectures. The tool automates the creation of simulation models that match the desired pack topology and includes cooling plate connections so that you can evaluate electrical and thermal responses. The MATLAB objects of the Battery Pack Model Builder allow you to define your own battery design specifications, visualize your battery in a 3-D space, customize the modeling resolution during simulation, and generate a Simulink library that contains your custom generated battery blocks. You can use these blocks to assist with virtual battery design and verification, help develop battery control algorithms using Simulink, explore design sensitivities, and design thermal management strategies.

The Build a Simple Model of a Battery Pack in MATLAB and Simscape (R2022b) and Build Detailed Model of Battery Pack From Cylindrical Cells (R2022b) examples show how to build simple and detailed models of a battery pack by using the objects and methods in Simscape Battery.

  • Cell (R2022b) — Create a single electrochemical battery cell. The Cell object is the foundational element for the creation of a battery pack system model.

  • CylindricalGeometry (R2022b) — Define a cylindrical geometry for a battery Cell object.

  • PouchGeometry (R2022b) — Define a pouch geometry for a battery Cell object.

  • PrismaticGeometry (R2022b) — Define a prismatic geometry for a battery Cell object.

  • CellModelBlock (R2022b) — Specify set of conditional parameters for a battery Cell object.

  • ParallelAssembly (R2022b) — Create a battery parallel assembly which represents a number of cells connected electrically in parallel under a specific topological configuration or geometrical arrangement.

  • Module (R2022b) — Create a battery module which represents a number of battery parallel assemblies connected electrically in series.

  • ModuleAssembly (R2022b) — Create a battery module assembly which represents a number of Module objects connected electrically in series or in parallel.

  • Pack (R2022b) — Create a battery pack which represents a number of ModuleAssembly objects connected electrically in series or in parallel.

  • BatteryChart (R2022b) — Construct a battery chart to visualize a Simscape Battery object.

  • buildBattery (R2022b) — Generate custom library blocks from battery objects

Battery Management System: Implement control strategies using controllers, estimators, monitors, and balancers

Simscape Battery includes Simulink blocks that perform typical battery management system (BMS) functions, such as state estimation, battery protection, cell balancing, thermal management, and current management.

Use these blocks to implement estimation algorithms for battery cell state-of-charge and battery cell state-of-health, simulate battery cell balancing algorithms, size the balancing resistors, get and apply battery charging and discharging limits based on the internal states, simulate battery protection algorithms, and much more. These libraries are fully compatible with the custom battery models that you can generate by using the buildBattery (R2022b) function.

These examples perform typical battery management system (BMS) functions:

Cell Balancing

  • Passive Cell Balancing (R2022b) — Implement a passive battery cell balancing algorithm that keeps a similar state-of-charge value in all cells by dissipating the excess charge in a bleed resistor.

Current Management

Estimators

  • SOC Estimator (Adaptive Kalman Filter) (R2022b) — Implement an estimator which estimates the state-of-charge and the terminal resistance of a battery by using the Kalman filter algorithms.

  • SOC Estimator (Coulomb Counting) (R2022b) — Implement an estimator which estimates the state-of-charge of a battery by using the Coulomb counting method.

  • SOC Estimator (Kalman Filter) (R2022b) — Implement an estimator which estimates the state-of-charge of a battery by using the Kalman filter algorithms.

  • SOH Estimator (R2022b) — Implement an estimator that estimates the state-of-health (SOH) of a battery.

Protection

Thermal Management

Cyclers

  • Charger (R2022b) — Implement an ideal battery charger.

  • Discharger (R2022b) — Implement an ideal battery discharger.

  • Cycler (R2022b) — Implement an ideal galvanostat, potentiostat, or a cycler.

Thermal Management: Simulate battery cooling systems for modules or packs

Simscape Battery includes blocks and models of battery cooling systems for simulations of battery thermal management. Use these blocks to add detailed thermal boundary conditions and thermal interfaces to the battery Module or ParallelAssembly blocks:

  • Edge Cooling (R2022b) — Model a battery cooling plate with edge cooling.

  • Parallel Channels (R2022b) — Model a battery cooling plate with multiple channels and a pair of distributor channels for inlet and outlet flow.

  • U-shaped Channels (R2022b) — Model a battery cooling plate with flat channels.

The cooling system blocks in this library are flat cooling plates. These blocks support three main flow configurations: parallel channels, U-shaped rectangular channels, and edge cooling. In the edge cooling configuration, the coolant flows at one end of the flat plate and all the heat from the battery cells is transferred via conduction within the cooling plate material. You can discretize these cooling plates into elements to closely capture temperature spreads resulting from the dynamic interaction with the battery and the coolant flow.

For more information on how to connect a cooling plate to a battery module or parallel assembly, see Connect a Cooling Plate to a Battery Module and Parallel Assembly (R2022b).

Deployment and Hardware-in-the-Loop Simulation: Implement interfaces and workflows for real time simulation

Simscape Battery includes Simscape blocks to connect to real-time hardware inputs and outputs:

  • Active Interface (R2022b) — Provide an abstracted active interface between a battery and a cell supervisory circuit.

  • Passive Interface (R2022b) — Provide an abstracted passive interface between a battery and a cell supervisory circuit.

When you use these blocks with real-time hardware, you can easily connect your battery simulations to a real-world battery balancing hardware. Use this capability to help design and verify your battery balancing algorithms, to ensure that they work correctly during both regular operation and adequately detect, degraded operation, or ride through faults.

You can develop and test battery balancing strategies by simulating your custom battery blocks with the blocks in the Battery Management System library of Simscape Battery. Options on the physical blocks enable you to assume ideal thermal measurements, thermal estimation or state-of-charge estimation algorithms until you have designed and implemented actual thermal measurements or state-of-charge algorithms.

Featured Examples

New examples in this release include: