Info on Battery Modeling

This tutorial is available in the **Electrification Library** under *Electrification.Batteries*.

This package contains models of electrochemical batteries and experiments that demonstrate the usage of these.

In addition to this overview, please take note of the following guides:

Battery packs and cells

The models in this package are mainly used for describing battery packs. A "pack" is composed of a collection of several electrochemical "cells" that are electrically connected in series and parallel arrangements ("arrays"). Large battery packs are often grouped into several smaller "modules". A pack model could also be used for representing such a module.

The individual cells in a pack can be modeled as separate units, allowing the simulation of imbalances (differences) between the cells. This typically comes at a high computational cost however. So for most use cases, where imbalances are not specifically studied, it is recommended to use a "lumped" pack. This means that only a single cell is simulated, and the results are scaled to represent the whole collection of cells. For more information, please refer to the guide Electrification.Batteries.Information.CellGroups.

Example batteries

The Electrification.Batteries.Examples sub-package contains a set of example battery pack models. The simple variants of these can be used directly as building blocks in system models, while the more detailed examples serve as starting points when configuring new battery models.

Examples of models that represent a single battery cell, with different chemistries and levels of fidelity, are found in the Electrification.Batteries.Core sub-package.


The Electrification.Batteries.Experiments sub-package contains simulation experiment models that demonstrate different features of the battery models, along with experiment templates that can be a useful place to start for setting up e.g. standard verification experiments.

Note that experiments for verifying a single cell model are found in the Electrification.Batteries.Core.Experiments sub-package.

For an example with a single cell that includes both electrical and thermal dynamics, please refer to the Electrification.Examples.Rimac.Experiments.CellTest experiment.

Templates and Interfaces

The battery packs in the Electrification Library are based on one of the common templates found in the Electrification.Batteries.Templates sub-package. These templates provide a base structure for the models, including the modular separation of physical domains and their interconnections, as well as some common pack-level functionality and parameters.

A new battery pack model can be created by extending from one of the templates. For more information, please refer to the separate guides about selecting and configuring a battery model.

Furthermore, all of the templates are based on the common Electrification.Batteries.Interfaces, which ensures that all of the battery models are compatible. These interface models can be used for creating re-usable experiment templates and re-configurable system models.

Sub-domain models

The battery pack models based on the common templates, are separated into a set of modular sub-domains. Models for each of these domains have been organized into separate sub-packages:

This component describes the "core" electrochemical dynamics of the battery, including the charge capacity, voltage characteristics, heat losses, and aging. The core model represents the cells of the battery pack, excluding the temperature dynamics. In lumped packs, the core model represents the combined dynamics of all the cells, while array packs can have several core models, where each represents a single cell.

This domain models the temperature dynamics of the whole battery pack, including both the cells and additional packaging. This is usually modeled using thermal networks, consisting of thermal masses and heat transfer components.

This domain describes the electrical parts of the battery pack in addition to the cells. This can include e.g. bus bars, contactors, connector losses, cell routing schemes, cell balancing circuitry, and so on.

This domain contains any software ("controller") models for the battery pack. This is different from the other domains, which are physical ("plant") models. This domain captures the functionality of what is typically referred to as BMS (Battery Management System).

This domain represents the 3D mechanics of the battery pack, which is only present in some of the pack models intended for integration in a MultiBody3D system model.

The different domains can be seen by looking into e.g. the Electrification.Batteries.Examples.Lumped example model, as is shown in the figure below. Note the thermal connections between the domain models. The temperatures of the thermal domain affect the dynamics of the other domains, while the heat losses from these domains are transferred to the thermal domain model. Also, note the sensor/actuator signal connections between the controller and the physical domains. These connections are defined as part of the battery pack templates.