A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

BLAST-Lite

Battery Lifetime Analysis and Simulation Toolsuite provides a library of battery lifetime and degradation models for various commercial lithium-ion batteries from recent years.
https://github.com/nrel/blast-lite

Category: Energy Storage
Sub Category: Battery

Last synced: about 5 hours ago
JSON representation

Repository metadata

README.md

BLAST-Lite

BLAST-Lite

Battery Lifetime Analysis and Simulation Toolsuite (BLAST) provides a library of battery lifetime and degradation models for various commercial lithium-ion batteries from recent years. Degradation models are indentified from publically available lab-based aging data using NREL's battery life model identification toolkit. The battery life models predicted the expected lifetime of batteries used in mobile or stationary applications as functions of their temperature and use (state-of-charge, depth-of-discharge, and charge/discharge rates). Model implementation is in both Python and MATLAB programming languages. The MATLAB code also provides example applications (stationary storage and EV), climate data, and simple thermal management options. For more information on battery health diagnostics, prediction, and optimization, see NREL's Battery Lifespan webpage.

A wide variety of battery degradation models are provided for simulating batteries of different chemistries, manufacturers, formats, and capacities. All current examples are Lithium-ion batteries.

Example battery life predictions

In addition to the capabilities in BLAST-Lite, NREL's Electrochemical Energy Storage group has a wide-variety of modeling and simulation tools from nano-scale to megawatt-hour system level. Please contact us if you have further interest in NREL's battery modeling capabilities: Paul.Gasper@nrel.gov, Kandler.Smith@nrel.gov.

Simulating real-world battery use cases

Battery degradation is a complex interplay between battery-specific degradation behaviors, battery operating strategy and controls, and environmental conditions. BLAST-Lite provides a simplified set of tools to enable exploration of battery degradation versus all of these parameters, and has pre-built tools to help evaluate the life of applications like electric vehicles and stationary energy storage systems with reasonable assumptions.

Electric vehicles

Electric vehicle simulations are conducted after generating realistic state-of-charge profiles using NREL's FASTSim vehicle simulation tool. The state-of-charge profile for an 'average' week of vehicle use can then be scaled according to annual vehicle miles traveled (VMT), using U.S. Department of Transportation data (documented here) to estimate the distribution of annual VMT across the U.S. population, utilizing the scale_vehicle_profile_to_annual_efcs function.

For example, the Panasonic NCA-Gr 18650 battery model can be compared to real world Tesla Model 3 Long Range vehicle data (extracted from https://tesla-info.com/ YouTube videos), which used Panasonic NCA-Gr 21700 batteries from their first model year in 2018 through at least 2022. Both the distribution of annual VMT and degradation model variability need to be accounted for to match the observed distributions of capacity fade and miles driven.

Example electric vehicle lifetime simulation

Stationary storage

Stationary storage battery systems vary substantially in their design, operation, and application. Specifically, the application can have huge impacts on battery lifetime, as operations like peak shaving or backup-power have completely different battery use than operations like PV load-firming or electric vehicle charging station support. Here, we have compiled a wide variety of stationary storage system battery applications.

Summary of stationary storage applications

Degradation of batteries adds complexity to the sizing of battery systems for stationary storage applications, as there is a trade-off between intial cost of the battery and the degradation: oversizing a battery reduces degradation by reducing the stress on the battery to meet a given load, but the oversized battery costs more initially. However, it can be financially beneficial to oversize, if oversizing the battery results in fewer battery replacements over the working lifetime of the system. Battery degradation simulations can help make these trade-offs clear:

Optimization of stationary energy storage system size

Caveats

These battery models predict 'expected life', that is, battery life under nominal conditions. Many types of battery failure will not be predicted by these models:

  • Overcharge or overdischarge
  • Impact of physical damage, vibration, or humidity
  • Operating outside of manufacturer performance and environmental limits, such as voltage, temperature, and charge/discharge rate limits
  • Pack performance loss due to cell-to-cell inbalance

All models are trained on accelerated aging test data. While we can accelerate the freqeuncy of cycles in the lab compared to the real world, we cannot accelerate the passage of time. Thus all models are trained on data collected over just 1-3 years, and we are extrapolating these models to predict real world lifetimes of 10+ years. As such, it is good to treat all models as qualitative. Also, over extremely long periods of time in the real-world, new bad things might happen that were not observed during accelerated aging.

Aging models are generally trained on a limited amount of data, that is, there is not enough information to estimate cell-to-cell variability in degradation rates.
Battery 'warranty life' is generally much more conservative than 'expected life'.
These models are estimating cell level degradation, there will be additional performance penalties and caveats for estimating lifetime of battery packs. A good rule-of-thumb is to assume that pack lifetime is 20-30% less than cell lifetime, but when using life models trained on cell testing data, as all models here are, please support simulations of pack level degradation with pack level data if you have it.

Setup and quick-start

Installation

Set up and activate a Python environment:

conda create -n blast-lite python=3.12
conda activate blast-lite

Install BLAST-Lite via PyPI.
In the environment created and activate above, run pip install blast-lite.

Note: Fetching temperature data from NSRDB

The blast.utils.get_nsrdb_temperature_data() function uses an API key to access the NREL NSRDB for climate data for any requested location. If making many requests, please get your own API key and replace the existing API key with yours in the 'examples.hscfg' file. This configuration file is assumed by default to be in your 'home' folder, that is, the same folder as the code that is being run.

If using a Windows machine, you may need to additionally run the following:

$ python -m pip install python-certifi-win32.

import certifi
import ssl
import geopy

ctx = ssl.create_default_context(cafile=certifi.where())
geopy.geocoders.options.default_ssl_context = ctx

Quickstart

Once the package is installed, you can generate an example usage dataset by running:

from blast import utils
data = utils.generate_example_data()

To see a list of available battery models, run:

from blast import models
models.available_models()

Select a model, instantiate a cell, and run the simulation:

cell = models.Lfp_Gr_250AhPrismatic()
cell.simulate_battery_life(data)

See the various example files for more detail on the different capabilities in BLAST-Lite:

Simulation details

Simplistic assumptions related to battery control can be easily selected. Given a state-of-charge timeseries, there are two straightforward ways this state-of-charge profile can evolve over time:

  • Conserve energy throughput, that is, increase the size of state-of-charge swings as the battery ages. Basically, as the battery degrades, the depth-of-discharge (and average state-of-charge) will decrease as the battery needs to discharge to a lower SOC to provide the same amount of energy for every discharge/charge event.
  • Maintain constant state-of-charge limits, which effectively decreases the energy-throughput per cycle as the battery ages. This is not a very common strategy, as you'd be getting less use out of the battery (it's like driving an electric vehicle fewer miles each trip as the battery degraded), but does tend to extend battery lifetime.

These assumptions are highly simplistic. The BLAST degradation modeling framework could be coupled with a more realistic battery performance model and simulated battery controllers to result in more accurate simulations, but obviously at increased computational cost and effort.

Example battery control strategies

Simple time-, capacity-, or charge-throughput based thresholds can be used to easily run simulations to specific endpoints.

Example simulation thresholds

While we do not have the data to model every single type of battery, it is easy to scale any model in BLAST-Lite to have faster or slower degradation via the optional degradation_scalar input when instantiating a model. Varying the degradation_scalar also can quickly tune any model to capture the variability of degradation observed in the real world or during testing, with the helper function simulate_battery_life_distribution available to make this quick and easy.

Example simulation with uncertainty

Citations

Authors

Paul Gasper, Nina Prakash, Kandler Smith

NREL SWR-22-69


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 6 days ago

Total Commits: 107
Total Committers: 3
Avg Commits per committer: 35.667
Development Distribution Score (DDS): 0.252

Commits in past year: 96
Committers in past year: 3
Avg Commits per committer in past year: 32.0
Development Distribution Score (DDS) in past year: 0.208

Name Email Commits
pauljgasper 3****r 80
Prakash, Nina N****h@n****v 18
pauljgasper P****r@n****v 9

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 2
Total pull requests: 2
Average time to close issues: about 1 month
Average time to close pull requests: 15 days
Total issue authors: 2
Total pull request authors: 1
Average comments per issue: 0.0
Average comments per pull request: 0.0
Merged pull request: 2
Bot issues: 0
Bot pull requests: 0

Past year issues: 2
Past year pull requests: 2
Past year average time to close issues: about 1 month
Past year average time to close pull requests: 15 days
Past year issue authors: 2
Past year pull request authors: 1
Past year average comments per issue: 0.0
Past year average comments per pull request: 0.0
Past year merged pull request: 2
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/nrel/blast-lite

Top Issue Authors

  • c-randall (1)
  • calbaker (1)

Top Pull Request Authors

  • ninaprakash1 (2)

Top Issue Labels

Top Pull Request Labels


Package metadata

pypi.org: blast-lite

Tool to model lifetime and degradation for commercial lithium-ion batteries.

  • Homepage: https://github.com/NREL/BLAST-Lite
  • Documentation: https://blast-lite.readthedocs.io/
  • Licenses: Copyright (c) 2023, Alliance for Sustainable Energy, LLC All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  • Latest release: 1.1.0 (published about 1 month ago)
  • Last Synced: 2025-04-27T06:02:06.752Z (1 day ago)
  • Versions: 10
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 548 Last month
  • Rankings:
    • Dependent packages count: 10.515%
    • Average: 34.862%
    • Dependent repos count: 59.208%
  • Maintainers (2)

Dependencies

pyproject.toml pypi
  • geopy *
  • h5pyd *
  • matplotlib *
  • nrel-rex *
  • numpy *
  • pandas *
  • scipy *
environment.yml conda
  • h5pyd
  • ipykernel
  • matplotlib
  • myst-parser
  • nrel-rex
  • numpy <2.0.0
  • pandas
  • pip
  • pytables
  • python 3.12.*
  • scipy
  • seaborn

Score: 11.046116726621012