BMS Modeling and Simulation

The rapid advancement of electric vehicle (EV) technology has positioned the battery management system (BMS) as a cornerstone for ensuring vehicle safety, optimizing performance, and extending battery lifespan. The complexity of battery pack behavior under dynamic real-world conditions makes model-based design an indispensable tool. In this context, I have undertaken a comprehensive study focused on developing and validating a high-fidelity BMS model within the Simulink environment. This work encompasses the creation of core battery models, the design and implementation of critical BMS algorithms—including state estimation, thermal management, and cell balancing—and their subsequent integration into a full-vehicle simulation framework for holistic verification. The primary objective is to establish a robust virtual prototyping platform that can provide strong technical support for the development and validation of electric vehicle BMS, reducing reliance on costly and time-intensive physical prototyping in early design stages.

The global shift towards electrified transportation is largely driven by the imperative to address energy security and environmental pollution. Electric vehicles, as clean and efficient alternatives to internal combustion engine vehicles, play a pivotal role in this transition. However, their widespread adoption hinges on overcoming significant technical challenges, with battery technology being paramount. The battery pack is not just an energy source; it is a complex electrochemical system whose performance, safety, and longevity are managed by the BMS. The BMS is responsible for a multitude of critical functions: precisely monitoring cell voltages, currents, and temperatures; accurately estimating the state of charge (SOC) and state of health (SOH); enforcing safe operating limits; maintaining cell uniformity through balancing; and managing thermal conditions. The efficacy of the BMS directly impacts the vehicle’s range, reliability, cost, and overall user experience. Consequently, developing efficient and reliable methods for BMS design, modeling, and verification is of utmost importance for the continued evolution of EV technology.

The architecture of the battery management system modeled in this work follows a centralized topology. This design integrates several core functional modules that communicate over a CAN bus network to provide real-time data and status of the traction battery pack. The key modules include:

  • State Monitoring Module: Continuously measures individual cell voltages, pack current, and temperatures at multiple points.
  • Safety Protection Module: Enforces operational boundaries by disconnecting the pack in case of over-voltage, under-voltage, over-current, or over-temperature faults.
  • Cell Balancing Module: Actively redistributes charge among cells to minimize state-of-charge (SOC) and voltage discrepancies.
  • State Estimation Module: Calculates key unmeasurable states, primarily the SOC and secondarily the SOH.
  • Thermal Management Module: Controls cooling systems (e.g., fans, liquid coolant pumps) based on battery temperature feedback.
  • Information Management Module: Logs data, manages communication with other vehicle controllers (like the VCU), and provides information for the user interface.

This modular approach within Simulink allows for independent development, testing, and refinement of each battery management system function before system-level integration.

1. Core Modeling of the Battery Management System (BMS)

1.1 Battery Cell Equivalent Circuit Model

The foundation of any high-fidelity BMS simulation is an accurate battery model. For this study, a first-order Thevenin equivalent circuit model (ECM) was selected to represent a high-energy lithium nickel manganese cobalt oxide (NMC) cell. This model offers a favorable balance between computational complexity and dynamic accuracy for BMS algorithm development. The model captures the key electrical characteristics: open-circuit voltage (OCV), internal ohmic resistance, and polarization dynamics.

The model’s governing equation is derived from Kirchhoff’s laws:
$$ V_{terminal}(t) = OCV(SOC(t)) – I(t)R_0 – V_{RC}(t) $$
where $V_{terminal}$ is the measured cell voltage, $OCV$ is a function of the state of charge, $I$ is the cell current (positive for discharge), $R_0$ is the internal ohmic resistance, and $V_{RC}$ is the voltage across the RC parallel branch representing polarization effects. The dynamics of the RC branch are described by:
$$ \frac{dV_{RC}(t)}{dt} = -\frac{1}{R_{p}C_{p}}V_{RC}(t) + \frac{1}{C_{p}}I(t) $$
Here, $R_{p}$ and $C_{p}$ are the polarization resistance and capacitance, respectively.

Parameter identification is critical. A Hybrid Pulse Power Characterization (HPPC) test was simulated/used to obtain data across a wide range of SOCs and temperatures. The parameters $R_0$, $R_p$, $C_p$, and the OCV-SOC relationship were then identified using a recursive least squares (RLS) algorithm. The OCV-SOC table is a primary input for accurate SOC estimation. Furthermore, a power limit module was integrated based on the following constraints to prevent unsafe operation:
$$ P_{discharge,max} = min( V_{terminal} \cdot I_{discharge,max}, V_{terminal} \cdot \frac{V_{terminal} – V_{min}}{R_{total}} ) $$
$$ P_{charge,max} = min( V_{terminal} \cdot I_{charge,max}, V_{terminal} \cdot \frac{V_{max} – V_{terminal}}{R_{total}} ) $$
where $R_{total} \approx R_0 + R_p$, and $V_{min}$/$V_{max}$ are the minimum and maximum allowable cell voltages.

Table 1: Identified ECM Parameters for an NMC Cell at 25°C (Example)
SOC (%) OCV (V) R0 (mΩ) Rp (mΩ) Cp (kF)
100 4.20 0.95 1.20 18.5
80 3.95 1.05 1.35 16.8
60 3.75 1.15 1.50 15.2
40 3.60 1.30 1.70 14.0
20 3.45 1.50 2.00 12.5
5 3.30 1.80 2.50 10.0

1.2 Thermal Model and Management Strategy

Battery temperature significantly influences performance, safety, and aging. An electro-thermal model was developed to simulate temperature evolution. The heat generation within a cell is primarily due to irreversible Joule heating and reversible entropic heat. For control purposes, a simplified lumped-parameter model focusing on Joule heating is often sufficient. The heat generation rate $\dot{Q}_{gen}$ for a cell is:
$$ \dot{Q}_{gen} = I^2 R_{total} $$
where $R_{total}$ is the effective internal resistance from the ECM.

The thermal dynamics of a cell/module cooled by forced convection (fan) can be modeled as:
$$ m C_p \frac{dT}{dt} = \dot{Q}_{gen} – \dot{Q}_{cool} $$
$$ \dot{Q}_{cool} = h A (T – T_{ambient}) $$
Here, $m$ is the mass, $C_p$ is the specific heat capacity, $h$ is the convective heat transfer coefficient (a function of fan speed), $A$ is the effective surface area, and $T_{ambient}$ is the cooling air temperature.

The battery management system implements a two-stage fan control strategy to maintain the pack within an optimal temperature window (25°C – 40°C). The control logic is summarized in the following state table:

Table 2: BMS Thermal Management Control Logic
Condition Action (Fan Command) Objective
$T_{max} \geq 40°C$ High Speed (1000 rpm) Aggressive cooling to prevent overheating.
$T_{max} \geq 35°C$ OR ($\Delta T \geq 8°C$ AND $T_{min} > 30°C$) Low Speed (500 rpm) Initiate cooling to manage rising temperature or gradients.
$T_{max} < 30°C$ AND $\Delta T < 5°C$ Off (Natural Convection) Save energy when thermal state is mild and uniform.

Where $T_{max}$ and $T_{min}$ are the maximum and minimum cell temperatures in the pack, and $\Delta T = T_{max} – T_{min}$. This strategy, modeled in Simulink using Stateflow or explicit logic blocks, ensures efficient thermal regulation by the battery management system.

1.3 Active Cell Balancing Model

Due to manufacturing variances and uneven operating conditions, cells in a series string inevitably diverge in their state of charge. The battery management system must employ a balancing mechanism to equalize these states, maximizing usable capacity and preventing individual cell over-charge/discharge. This work models a switched-inductor (multi-inductor) active balancing topology.

The principle involves using inductors as temporary energy storage elements to transfer charge from higher-voltage cells to lower-voltage cells. For a cell `i`, the adjacent inductors $L_{i}$ and $L_{i-1}$ can be used to transfer energy. The switching logic for balancing from cell `i` to cell `i-1` involves turning on the MOSFET switch $S_i$ to build current in $L_i$, then turning $S_i$ off and turning on the body diode of $S_{i-1}$ (or a synchronous switch) to discharge the inductor’s stored energy into cell `i-1`. The governing equation during the inductor charging phase (switch on) is:
$$ V_{cell,i} = L_i \frac{di_L}{dt} $$
Assuming a constant cell voltage during the short switching period, the inductor current increases linearly: $ \Delta i_L = \frac{V_{cell,i} \cdot \Delta t_{on}}{L_i} $. The energy transferred per switching cycle is approximately $ \frac{1}{2} L_i (\Delta i_L)^2 $.

The BMS balancing control algorithm continuously monitors all cell voltages (or better, estimated SOCs). Balancing is activated when the maximum voltage/SOC difference exceeds a threshold (e.g., 20 mV or 2% SOC). The Simulink model implements this control logic and the switching circuitry to simulate the convergence of cell voltages over time, a critical function of any advanced battery management system.

1.4 State of Charge (SOC) Estimation Model

Accurate SOC estimation is one of the most challenging and vital tasks for a BMS. The coulomb counting (Ampere-hour integral) method is simple but suffers from cumulative error due to unknown initial SOC and current sensor drift. The open-circuit voltage (OCV) method is accurate but requires long rest periods. Therefore, a fusion algorithm combining the strengths of both is essential.

This model employs an Unscented Kalman Filter (UKF) combined with OCV lookup and coulomb counting for initialization and correction. The UKF is particularly suited for the nonlinear battery model. The state-space model for the UKF is defined as:
State Vector: $ \mathbf{x}_k = [SOC_k, V_{RC,k}]^T $
Process Equation (State Update):
$$ SOC_{k+1} = SOC_k – \frac{\eta \Delta t}{C_{nominal}} I_k + w_{1,k} $$
$$ V_{RC,k+1} = V_{RC,k} e^{(-\Delta t / (R_p C_p))} + R_p (1 – e^{(-\Delta t / (R_p C_p))}) I_k + w_{2,k} $$
Measurement Equation (Output):
$$ V_{terminal,k} = OCV(SOC_k) – I_k R_0 – V_{RC,k} + v_k $$
Here, $\eta$ is coulombic efficiency, $C_{nominal}$ is the nominal capacity, $\Delta t$ is the sampling time, and $w_k$, $v_k$ are process and measurement noise vectors, respectively.

The UKF algorithm involves the following key steps, which were implemented within a Simulink embedded MATLAB function block:

  1. Initialization: Set initial state estimate $\hat{\mathbf{x}}_0$ and error covariance $\mathbf{P}_0$. The initial SOC can be derived from an OCV measurement after a key-off period.
  2. Sigma Point Calculation: Generate a set of sigma points around the current state estimate.
  3. Prediction (Time Update): Propagate each sigma point through the nonlinear process model. Compute the predicted state mean and covariance.
  4. Update (Measurement Update): Propagate the predicted sigma points through the measurement model. Compute the predicted measurement mean, covariance, and the cross-covariance between state and measurement. Finally, compute the Kalman gain and update the state estimate and covariance using the actual voltage measurement $V_{terminal,k}$.

This advanced estimation core significantly enhances the intelligence and reliability of the battery management system.

2. Full-Vehicle Integration and Simulation

To validate the BMS algorithms under realistic dynamic conditions, the entire BMS model was integrated into a full-vehicle simulation platform in Simulink. This integration allows for closed-loop testing where the BMS responds to the power demands of a virtual vehicle and its driver.

The vehicle model comprises several interconnected subsystems:

  • Driver Model: A PID controller that manipulates the accelerator/brake pedal signals to follow a target drive cycle (e.g., NEDC, WLTC, UDDS).
  • Vehicle Dynamics Model: Calculates the total road load force $F_{total}$ required at the wheels:
    $$ F_{total} = F_{roll} + F_{aero} + F_{grade} + F_{accel} $$
    $$ F_{roll} = \mu_{rr} m g \cos(\theta); \quad F_{aero} = \frac{1}{2} \rho C_d A v^2; \quad F_{grade} = m g \sin(\theta); \quad F_{accel} = m a $$
    where $\mu_{rr}$ is the rolling resistance coefficient, $\rho$ is air density, $C_d$ is drag coefficient, $A$ is frontal area, $v$ is velocity, $\theta$ is road grade, and $a$ is acceleration.
  • Powertrain Model: Includes a Permanent Magnet Synchronous Motor (PMSM) with vector control (modeled with a torque-speed-efficiency map for simplicity in system-level studies) and a single-speed reduction gear. The motor torque request $T_{m,req}$ is derived from $F_{total}$ and the wheel radius.
  • BMS & Battery Pack Model: The core model described previously, now representing a full pack with `n` cells in series and `m` strings in parallel. It receives the pack current demand from the powertrain and outputs available power, voltage limits, and thermal commands.
  • Vehicle Control Unit (VCU) Model: A supervisory controller that arbitrates torque requests based on driver input, battery power limits from the BMS, and other vehicle states.

This integrated environment creates a powerful virtual test bench for the battery management system.

3. Simulation Test Verification and Results

The integrated model was subjected to various drive cycles and specific test scenarios to verify the functionality and accuracy of each BMS module. System-level testing under dynamic load is crucial for validating the battery management system design before hardware prototyping.

3.1 Thermal Management System Test

A combined urban and highway driving cycle was simulated to induce significant battery heating. The results clearly demonstrate the efficacy of the BMS thermal control strategy.

Table 3: Thermal Management Test Results
Event BMS Response Observed Outcome
$T_{max}$ rises to 35°C during acceleration. Fan switches to Low Speed (500 rpm). Rate of temperature rise decreases.
Sustained high-power demand causes $T_{max}$ to reach 40°C. Fan switches to High Speed (1000 rpm). $T_{max}$ stabilizes and then begins to decrease.
Vehicle stops (low load), $T_{max}$ falls to 29°C, $\Delta T < 5°C$. Fan is turned off. Temperature decays slowly via natural convection, saving energy.

The simulated temperature profiles and fan speed commands matched the designed control logic perfectly, confirming the correct implementation of the thermal management algorithms within the battery management system.

3.2 Cell Balancing Performance Test

An initial condition with a 5% SOC spread across 10 series cells was set. The balancing circuit was enabled during a constant-current charging process. The BMS balancing algorithm used voltage as the trigger initially, then SOC (once estimation was reliable) as the balancing criterion. The results are summarized below:

Table 4: Cell Balancing Performance Metrics
Metric Initial Value Value After 1 Hour of Charging/Balancing
Maximum Cell Voltage Difference 105 mV 18 mV
Maximum SOC Difference (Estimated) 5.2% 0.8%
Total Usable Capacity (based on weakest cell) ~94.8% of nominal ~99.2% of nominal

The convergence of cell states validates the design and control logic of the active balancing system, a critical feature for enhancing pack performance and longevity managed by the BMS.

3.3 SOC Estimation Accuracy Test

The ultimate test for the BMS state estimator is its performance under a realistic, dynamic load profile. The New European Driving Cycle (NEDC) was applied to the integrated vehicle model. The “true” SOC was calculated offline using a high-fidelity reference model with perfect knowledge of initial conditions. This was compared against the SOC estimated by the UKF-based algorithm in the BMS model.

The key performance indicator is the root mean square error (RMSE):
$$ RMSE_{SOC} = \sqrt{ \frac{1}{N} \sum_{k=1}^{N} (SOC_{true,k} – SOC_{estimated,k})^2 } $$
Over the complete NEDC cycle, the RMSE was calculated to be less than 1.5%. More importantly, the estimated SOC track closely followed the reference throughout the cycle, including during regenerative braking events and rest periods, demonstrating the robustness and accuracy of the proposed fusion algorithm. This level of precision is essential for providing reliable range prediction to the driver, a core user-facing function of the battery management system.

4. Conclusion and Future Perspectives

This comprehensive modeling study successfully developed and validated a detailed, modular battery management system (BMS) within the Simulink environment. The work encompassed the creation of foundational battery models, the design and implementation of core BMS algorithms for thermal management, cell balancing, and state estimation, and the final integration into a full-vehicle simulation context. The simulation results confirm the accuracy, reliability, and correct functional logic of the designed BMS strategies. The integrated model serves as a powerful virtual platform, offering strong technical support for the design, testing, and optimization of electric vehicle BMS architectures. It facilitates early-stage validation, reduces development risk and cost, and allows for the exploration of “what-if” scenarios that would be difficult or dangerous to test on physical hardware.

Future work will focus on enhancing the model’s fidelity and scope to address more complex real-world challenges. Key directions include:

  1. Incorporating Battery Aging Models: Integrating semi-empirical or physics-based degradation models (like capacity fade and resistance growth) to enable SOH estimation and study the long-term impact of BMS strategies on battery lifespan.
  2. Enhanced System Integration: Modeling the detailed network communication (CAN, Ethernet) between the BMS, Vehicle Control Unit (VCU), and Charger to evaluate communication delays and network management strategies.
  3. Extended Simulation under Diverse Conditions: Conducting extensive tests across a wider library of standard (WLTP, US06) and real-world driving cycles, as well as extreme ambient temperature profiles (-20°C to 50°C), to thoroughly stress-test the BMS algorithms.
  4. Transition to Real-Time Platforms: Preparing the validated BMS model for deployment on real-time hardware (e.g., dSPACE, NI) for Hardware-in-the-Loop (HIL) testing, which is a critical step before vehicle integration.

By pursuing these avenues, the virtual BMS development framework can evolve into an even more indispensable tool, accelerating the innovation and ensuring the robustness of next-generation battery management systems for electric vehicles.

Scroll to Top