Battery Modeling
Model batteries when designing battery-powered systems
Battery models have become an indispensable tool for the design of battery-powered systems. Their uses include battery characterization, state-of-charge (SOC) and state-of-health (SOH) estimation, algorithm development, system-level optimization, and real-time simulation for battery management system design.
Battery models based on equivalent circuits are preferred for system-level development and controls applications due to their relative simplicity. Engineers use equivalent circuits to model the thermo-electric behavior of batteries, parameterizing their nonlinear elements with correlation techniques that combine models and experimental measurements via optimization.
Equivalent circuit of a battery with three distinct time constants, internal resistance, and open circuit potential.
Battery Characterization
The first step in the development of an accurate battery model is to build and parameterize an equivalent circuit that reflects the battery’s nonlinear behavior and dependencies on temperature, SOC, SOH, and current. These dependencies are unique to each battery’s chemistry and need to be determined using measurements performed on battery cells of exactly the same type as those for which the controller is being designed. Example battery models are available for download from MATLAB Central.
Voltage response (top) to a pulsed current (middle) discharge, and resulting SOC (bottom) for an NMC Li-ion battery.
SOC Estimation
One common application of battery models is to develop algorithms for SOC estimation. Open-circuit voltage (OCV) measurement and current integration (coulomb counting) may give reasonable estimates for SOC. However, to estimate the SOC in modern battery chemistries that have flat OCV-SOC discharge signatures, you need to use a different approach, such as Kalman filtering.
Degradation
Batteries degrade over time due to their calendar life and charge-discharge cycles, showing a gradual loss in reserve capacity and an increase in internal resistance. The battery management system (BMS) needs to adapt to these changes for effective control of the battery. Battery models can help you develop a BMS that accounts for degradation.
Progressive degradation of a lithium ion battery reflected on increase in internal resistance (R0) and time constants (τ1 , τ2 , τ3), with minimal variation in open circuit potential (Em).
Real-Time Simulation
Hardware-in-the-loop testing of BMS is another common application of battery models. A battery model built for system-level design can be reused for real-time simulation.
开发调度控制算法
开发 BMS 调度控制算法的工程师使用状态机对调度逻辑建模,实现故障检测和管理、充电和放电功率限制、
温度控制和电芯平衡。Stateflow® 是一个基于状态机和流程图来构建组合和时序逻辑决策模型并进行仿
真的环境。在为 BMS 开发调度控制算法时,您可以使用 Stateflow 对电池系统响应事件、基于时间的条件以及外
部输入信号的方式进行建模。例如,在恒流恒压 (CCCV) 充电的情况下,您可以开发并测试状态逻辑,控制电芯
何时从电流充电模式变换到电压充电模式。
在 Stateflow 图中实现的电芯平衡逻辑
估计荷电状态
精确的电池模型对于开发用于估计 SOC 的算法至关重要。开路电压 (OCV) 测量和电流积分(库仑计数)
等传统 SOC 估计方法在某些情况下相当精确。但是,估计具有平面 OCV-SOC 放电特征的现代化学电池的 SOC
需要使用不同的方法。扩展卡尔曼滤波 (EKF) 就是这样一种方法,实践表明,它可以在合理的计算工作量前提
下提供精确的结果。Simulink 包含一个 EKF 模块,使您能够开发用于估计 SOC 的观察器。此类观察器通常包
括一个非线性系统(电池)的模型和一个递归算法。该模型使用从电芯测得的电流和电压作为输入,该算法根
据一个两步式预测/更新进程来计算系统的内部状态(其中包括 SOC)
估计健康状态
所有电池,包括在出厂时符合性能规格的电池,由于使用寿命和充放电循环,性能会随着时间而降低,表现为
储能会逐渐损失,同时内部电阻增加。使用短时间测量方法进行内部电阻估测是一个相对直接的方法,而通常
需要完全充电或放电过程才能准确计算,但这种方法有时并不可行。此项挑战导致健康状态 (SOH) 估计以及
EKF 公式的开发越来越受关注,这类方法现已不只包括状态,还包括电池参数。精确估计瞬时内部电阻对于
BMS 建立功率限制非常有帮助。
SOH 估计比 SOC 估计更主观;对于如何定义 SOH 尚无共识。因此,每个组织可能有其自己特定的量化 SOH
估计的方法,因而不可能使用通用的现成解决方案。利用 Simulink,您可以开发和仿真自定义 SOH 估计算法,
与您的组织特定的电池健康状况的解释保持一致。
在 Simulink 中创建的 BMS 算法和对象动态模型,包括电池包、接触器、逆变器和充电器。