Coder Social home page Coder Social logo

todor-markov / spmet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scott-moura/spmet

0.0 1.0 0.0 101.04 MB

Single Particle Model with Electrolyte and Temperature: An electrochemical battery model

License: GNU General Public License v3.0

MATLAB 90.85% C 8.67% Python 0.38% Shell 0.11%

spmet's Introduction

SPMeT

Single Particle Model with Electrolyte and Temperature: An Electrochemical-Thermal Battery model

DOI

Originally published November 5, 2016 by Professor Scott Moura
Energy, Controls, and Applications Lab (eCAL)
University of California, Berkeley
http://ecal.berkeley.edu/

Executive Summary

This repository provides Matlab code for the Single Particle Model with Electrolyte & Thermal Dynamics (SPMeT). A diagram of the SPMeT is below. The SPMeT can be run and edited from filename spmet.m. The SPMeT model code is based upon the equations in the publications below.

"Battery State Estimation for a Single Particle Model with Electrolyte Dynamics"
by S. J. Moura, F. Bribiesca Argomedo, R. Klein, A. Mirtabatabaei, M. Krstic
IEEE Transactions on Control System Technology, to appear
DOI: 10.1109/TCST.2016.2571663

"Optimal Charging of Batteries via a Single Particle Model with Electrolyte and Thermal Dynamics"
by H. E. Perez, X. Hu, S. J. Moura 2016 American Control Conference DOI: 10.1109/ACC.2016.7525538

SPMe Diagram

This repository also contains Matlab code for the SPMe, i.e. isothermal conditions with no temperature dynamics. The SPMe can be run and edited from filenames spme.m.

Features

Specifically, the code models the following dynamics:

  • Solid-phase lithium diffusion
  • Surface and bulk concentrations of lithium in solid-phase single particles
  • Electrolyte-phase lithium diffusion
  • Two-state thermal dynamics (jelly roll & can)
  • Temperature-dependent parameters
  • Optional SEI layer growth aging submodel
  • Voltage

Detailed Features

  • Concentration dependent exchange current density
  • Concentration dependent electrolyte diffusivity
  • Concentration dependent electrolyte conductivity
  • Concentration dependent electrolyte activity coefficient function

Features not included

  • Concentration dependent solid phase diffusivity
  • Multiple particle sizes / chemistries
  • Aging mechanisms besides anode-side SEI layer growth

Inputs

The SPMeT requires the following inputs:

  • Parameter file: A parameter file in directory /param which provides model parameter values that correspond to a particular chemistry. For example, params_LCO.m provides model parameter values for a graphite anode/lithium cobalt oxide cathode.
  • Input current trajectory: A definition or input file in directory /input-data that provides a time series of electric current applied to the battery cell model in terms of A/m^2.
  • Initial conditions: Initial conditions values for the state variables. These include:
    • Voltage V0: Initial voltage. Variable V0 and the moles of solid phase lithium p.n_Li_s in the parameter structure together are used to compute initial conditions for solid phase lithium csn0 and csp0
    • Electrolyte concentration ce0: Initial concentration of lithium ions in the electrolyte, e.g. p.c_e from the parameter structure, in units of [mol/m^3]
    • Jelly Roll Temperature T10: Initial temperature.
    • Can Temperature T20: Initial temperature.
    • SEI layer thickness delta_sei0: Initial thickness

Outputs

The SPMeT simulates the following outputs:

  • Bulk State-of-Charge SOC_n, SOC_p: Bulk SOC in anode and cathode, respectively. SOC_n is the typical SOC value reported in any battery-powered device.
  • Voltage V: Terminal voltage of battery with SPMe.
  • SPM Voltage V_spm: Terminal voltage of battey predicted with SPM model (i.e. without electrolyte subsystem).
  • Solid-phase Lithium concentrations c_n and c_p: Concentration of lithium in the solid phase of the anode and cathode, respectively, as a function of time step 1:NT and radial distance r_vec. Units are [mol/m^3].
  • Surface concentrations of Lithium c_ss_n and c_ss_p: Concentration of lithium at SURFACE of solid phase particles in the anode and cathode, respectively, as a function of time step 1:NT. Units are [mol/m^3].
  • Electrolyte-phase Lithium concentrations c_e: Concentration of lithium in the electrolyte phase, as a function of time step 1:NT and distance across cell sandwich x_vec_spme. Units are [mol/m^3].
  • Temperatures T1 and T2: Temperature of the jelly roll and metal can, respectively. Units are [K].
  • SEI Layer Thickness delta_sei: Thickness of SEI layer on graphite anode. Units are [m].

Visualizations

To visualize the SPMe simulation results, run the following code:

  • plot_spmet.m: Generates one static figure with (i) current, (ii) surface concentrations, (iii) temperatures, and (iv) voltage.
  • animate_spmet.m: Generates an animated figure with (i) solid-phase lithium concentrations, (ii) electrolyte phase concentrations, and (iii) voltage.

Numerical Method Parameters

The solid and electrolyte phase PDEs are solved with the central difference method and second-order accurate boundary conditions to ensure conservative solutions (i.e. conservation of matter). The accuracy / simulation speed can be adjusted by changing the following parameters.

  • p.delta_t: Time step in [sec]. Default: 1 sec
  • p.Nr: Number of nodes in finite discretization of single particles. Default: 30
  • p.Nxn: Number of nodes along x-coordinate in Anode. Default: 10
  • p.Nxs: Number of nodes along x-coordinate in Separator. Default: 5
  • p.Nxp: Number of nodes along x-coordinate in Cathode. Default: 10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.