Rafi Nasrallah
ENFR
Smart BMS · Internship Engineering Extract

Smart BMSAdvanced StateEstimation &Active Balancing

Emove Véhicules · Battery intelligence, embedded hardware, and active energy redistribution

A focused case study on the algorithmic and hardware engineering of a smart battery management system. The work centers on robust state-of-charge (SoC) estimation under dynamic scooter loads and an active balancing architecture based on bidirectional synchronous flyback energy transfer.

BMS Active balancing Synchronous flyback STM32 MATLAB/Simulink Altium Designer

Problem Statement

Field observations of the electric scooter fleet revealed critical performance anomalies, specifically:

Premature Power Cut-offs

The vehicle would experience abrupt power loss, despite the dashboard State-of-Charge (SOC) indicator displaying approximately 20% remaining capacity.

Severe SOC Instability

The estimated SOC exhibited rapid, erratic drops under high-current discharge profiles (e.g., strong accelerations), indicating severe instability in the fuel gauge algorithm.

Probable Causes

A root-cause analysis identified three primary factors contributing to these failures:

Root-cause diagram linking premature shutdown at 20% SoC and energy-gauge instability to hardware, software, and process factors on the electric scooter BMS

1. Cell Heterogeneity

Inherent variations in cell capacity and internal resistance, resulting in the weakest series element prematurely constraining the entire battery pack.

2. Insufficient Balancing Capability

Traditional passive balancing mechanisms proving inadequate to compensate for significant capacity drift over time.

3. Non-Robust SOC Estimation

The baseline estimation algorithm failing to dynamically and accurately track the true State-of-Charge under transient load conditions.

Project Scope

The ensuing engineering work focuses specifically on mitigating Cause #3 (Non-Robust SOC Estimation), while simultaneously integrating a high-performance active balancing architecture to address cell heterogeneity.

Engineering Workflow

1

Modeling & Algorithm Development

The engineering cycle began with a high-fidelity virtual battery model (digital twin). The SoC estimator combines an equivalent circuit model (ECM), an unscented Kalman filter (UKF), and a long short-term memory (LSTM) residual observer. This model supported algorithm design and closed-loop testing in MATLAB/Simulink before hardware constraints were introduced.

Hybrid state-of-charge (SoC) estimation algorithm workflow: equivalent circuit model (ECM) with three resistors and three capacitors (3RC), unscented Kalman filter (UKF), and long short-term memory (LSTM) residual observer feeding a finite-state machine (FSM) safety supervisor
2

Validation by Simulation

To guarantee algorithmic robustness under diverse and highly dynamic load profiles, a comprehensive suite of 12 rigorous test scenarios was executed via Model-in-the-Loop (MiL) simulation. Three critical scenarios are detailed below:

Scenario A: Nominal Dynamic Profile

This scenario evaluates the estimator's response under a nominal yet highly dynamic current profile. The results confirm exceptional estimation stability under heavy dynamic loads, achieving a Root Mean Square Error (RMSE) of just 0.23% and a final estimation error of 0.61%.

Scenario A test current profile used to validate the ECM 3RC + UKF + LSTM SOC estimator against real battery data Scenario A: UKF+LSTM-estimated State of Charge versus real measured SOC over the test cycle

Scenario B: Battery Aging (80% state of health (SoH))

This scenario assesses algorithmic robustness against battery degradation, specifically simulating a State-of-Health (SOH) of 80%. The estimated SOC accurately tracks the true SOC despite the reduced available capacity. Demonstrating a root-mean-square error (RMSE) of 0.89% and a final error of 1.33%, this scenario validates the architecture's capability to maintain a highly reliable estimation in the presence of moderate capacity fade.

Scenario B: UKF+LSTM-estimated State of Charge versus real measured SOC over the test cycle Scenario B SOC estimation error over time for the hybrid ECM 3RC + UKF + LSTM observer

Scenario C: Sensor Bias and Measurement Noise

To evaluate sensitivity to measurement inaccuracies, realistic sensor biases were introduced to the voltage and current readings. Despite these perturbations, the UKF-LSTM fusion, governed by the supervisory logic, successfully mitigated the impact of sensor uncertainty. The system maintained tight tracking with an RMSE of 0.49% and a final error of only 0.25%.

Scenario C: UKF+LSTM-estimated State of Charge versus real measured SOC over the test cycle Scenario C measured versus real terminal voltage used to validate the battery digital twin
3

Hardware Prototyping

Upon achieving successful simulation metrics, the algorithmic pipeline was ported to a simplified Hardware-in-the-Loop (HiL) prototype for empirical validation. This setup featured a custom Analog Front-End (AFE) for precise acquisition of cell voltages (via precision resistive dividers), pack current (via a 0.22Ω shunt), and temperatures (via negative temperature coefficient (NTC) thermistors).

Crucially, this phase validated the power-protection architecture: a high-side double-switch topology using P-channel metal-oxide-semiconductor field-effect transistors (MOSFETs; IRF5210), safely driven by a 2N3904 NPN transistor level-shifting stage connected to the microcontroller.

STM32-based 16S Smart BMS prototype printed circuit board (PCB) with LTC3300-1 active balancing circuitry
4

Industrial Hardware Architecture

The validated prototype was subsequently transitioned into a comprehensive six-layer printed circuit board (PCB) layout using Altium Designer. The architecture centers around a high-performance STM32H743VIT6 microcontroller, leveraging its floating-point unit (FPU), direct memory access (DMA), and dual clocks (32.768 kHz / 25 MHz) to guarantee real-time execution of the ECM, UKF, and LSTM networks.

The board integrates a BQ76952PFBR analog front end for primary autonomous hardware protection, and an LTC3300-1 active balancing controller to enable bidirectional energy transfer. Strict electromagnetic compatibility (EMC) and signal-integrity constraints were applied, including galvanic isolation (TME 0505S) and a dedicated Controller Area Network (CAN) bus interface for vehicle integration.

Industrial 16S BMS PCB — power and control side, STM32 architecture with EMC protections
Industrial BMS PCB — acquisition, protection, and control architecture.
Industrial 16S BMS PCB — LTC3300-1 active balancing side
Active balancing stage — bidirectional energy transfer layout.
5

Conclusion & Future Work

The proposed intelligent BMS architecture successfully mitigates premature power cut-offs and maximizes the extraction of usable energy. Future engineering directives involve comprehensive real-time validation on full-scale lithium iron phosphate (LFP) packs under actual vehicle operating conditions to certify the system for mass production.

Interested in this project?

Connect on LinkedIn or contact me to discuss battery modeling, embedded systems, and electric mobility engineering.