主要内容

本页采用了机器翻译。点击此处可查看英文原文。

使用道尔–富勒–纽曼模型仿真电池

自 R2026a 起

本示例演示了如何使用道尔–富勒–纽曼 (DFN) 电池模型,对锂离子电池电芯在各种负载条件下的行为进行仿真。DFN 模型(也称为伪二维 (P2D) 模型)详细描述了电池内部发生的电化学过程,例如锂扩散、电化学反应、电荷守恒以及产热动力学。

打开模型

打开 DFN 模型。在此模型中,BatteryDFN 自定义模块代表单个电池电芯。为了设定电热边界条件,该模型使用了 Controlled Current SourceControlled Temperature Source 模块。您可以根据具体的电池负载工况和应用场景,对这些边界条件进行调整。在此示例中,您将对 BatteryDFN 模块在放电条件下的行为进行仿真。

modelName = "DFN";
open_system(modelName);

BatteryDFN block diagram.

在恒定放电电流条件下对 DFN 模型进行仿真

DFNParameterSetDefault 脚本用于存储 BatteryDFN 模块的参数和初始条件。每次运行该模型时,都必须运行此脚本。

run("DFNParameterSetDefault.m")

要在恒定放电电流条件下对 DFN 模型进行仿真,必须首先定义初始条件。有四个必需的初始条件:电解质浓度、阳极和阴极浓度,以及温度。为了放电并避免仿真误差(例如负电荷状态):

  • 阳极初始浓度必须大于最大阳极浓度乘以最小阳极化学计量比。

  • 阴极初始浓度必须低于最大阴极浓度乘以最大阴极化学计量比。

InitialElectrolyteConcentration = 1200; % mol/m^3
InitialConcentrationAnode = 30555*0.811; % mol/m^3
InitialConcentrationCathode = 22806*0.035; % mol/m^3
InitialTemperature = 298.15; % K

本例假设放电电流为负电流,充电电流为正电流。

Current = -1; % Amps
SimulationTime = 3600; % Seconds

运行放电仿真。

dfnOut = sim("DFN"); 

要绘制仿真结果,请运行 DFNOutputViewer 脚本。该脚本绘制:

  1. 电池的关键状态随时间的变化

  2. 电池堆沿长度方向的电池电化学状态

DFNOutputViewer

Figure DFN Model Results contains 6 axes objects. Axes object 1 with title Time Series Plot:batteryCurrent, xlabel Time (seconds), ylabel batteryCurrent (A) contains an object of type line. Axes object 2 with title Time Series Plot:batteryStateOfCharge, xlabel Time (seconds), ylabel batteryStateOfCharge contains an object of type line. Axes object 3 with title Time Series Plot:batteryTemperature, xlabel Time (seconds), ylabel batteryTemperature (K) contains an object of type line. Axes object 4 with title Time Series Plot:batteryVoltage, xlabel Time (seconds), ylabel batteryVoltage (V) contains an object of type line. Axes object 5 with title Time Series Plot:surfacePotentialAnode, xlabel Time (seconds), ylabel surfacePotentialAnode (V) contains 20 objects of type line. Axes object 6 with title Time Series Plot:surfacePotentialCathode, xlabel Time (seconds), ylabel surfacePotentialCathode (V) contains 20 objects of type line.

Figure DFN Electrochemical States contains 8 axes objects. Axes object 1 with title Anode Potential, xlabel Anode thickness (m), ylabel Potential (V) contains 2 objects of type line. These objects represent Start, End. Axes object 2 with title Liquid Potential, xlabel Cell stack distance (m), ylabel Electrolyte potential (V) contains 2 objects of type line. These objects represent Start, End. Axes object 3 with title Cathode Potential, xlabel Cathode thickness (m), ylabel Potential (V) contains 2 objects of type line. These objects represent Start, End. Axes object 4 with title Anode Polarization, xlabel Anode thickness (m), ylabel Potential drop (V) contains 2 objects of type line. These objects represent Start, End. Axes object 5 with title Current Density Anode, xlabel Anode thickness (m), ylabel Current density (A/m^3) contains 2 objects of type line. These objects represent Start, End. Axes object 6 with title Electrolyte Concentration, xlabel Cell stack distance (m), ylabel Electrolyte concentration (mol/m^3) contains 2 objects of type line. These objects represent Start, End. Axes object 7 with title Current Density Cathode, xlabel Cathode thickness (m), ylabel Current density (A/m^3) contains 2 objects of type line. These objects represent Start, End. Axes object 8 with title Cathode Polarization, xlabel Cathode thickness (m), ylabel Potential drop (V) contains 2 objects of type line. These objects represent Start, End.

要查看电池的电化学状态如何随电池堆叠距离的变化而动态变化,请运行 createDFNAnimation 脚本。在 MATLAB® 命令行窗口中,运行:

createDFNAnimation(dfnOut)

验证模型

为了验证 DFN 模型方程,请将 BatteryDFN 模块的输出电压和电荷状态与在 Python 电池数学建模 (PyBaMM) 软件包中实现的开源 DFN 模型的输出结果进行比较。PyBaMM 是一款领先的开源电池电化学建模工具,因此是进行比较的可靠参考。这些图表展示了使用 PyBaMM 默认参数集时的 1C 放电速率。

在 1C 放电速率和选定的初始温度下,两种 DFN 模型实现方案的端电压和电荷状态输出结果之间具有良好的一致性。

模型描述

本例中的 BatteryDFN 模块实现了以下方程:

该图展示了方程的空间离散化过程:

这些表格包含有关 BatteryDFN 模块的变量、参数和中间计算的补充信息。

参考

[1] Sulzer, V., Marquis, S. G., Timms, R., Robinson, M., & Chapman, S. J. (2021). “Python Battery Mathematical Modelling (PyBaMM)”. Journal of Open Research Software, 9 (1), 14. https://doi.org/10.5334/jors.309.

[2] G. Richardson, I. Korotkin, "Heat generation and a conservation law for chemical energy in Li-ion batteries", Electrochimica Acta, Volume 392, 2021, 138909, ISSN 0013-4686, https://doi.org/10.1016/j.electacta.2021.138909.

[3] Doyle, Marc and Fuller, Thomas F. and Newman, John. "Modeling of Galvanostatic Charge and Discharge of the Lithium/Polymer/Insertion Cell". Journal of The Electrochemical Society, vol. 140, no. 6, 1993, pp. 1526. https://doi.org/10.1149/1.2221597.

[4] Zeng, Yi, et al. ‘Efficient Conservative Numerical Schemes for 1D Nonlinear Spherical Diffusion Equations with Applications in Battery Modeling’. Journal of The Electrochemical Society, vol. 160, no. 9, 2013, pp. A1565–71. DOI.org (Crossref), https://doi.org/10.1149/2.102309jes.

另请参阅

| |