Design of an Intelligent Battery Management System for Electric Oil-Water Separation Vehicles

Advancing the goals of carbon peak and carbon neutrality necessitates significant innovations in the intelligence of Battery Management Systems (BMS) for new energy vehicles. The BMS serves as the “brain” of the power battery, responsible for monitoring battery status, performing fault diagnosis, managing thermal conditions, and executing control functions. This article focuses on the lithium-ion battery pack of a pure electric oil-water separation vehicle, designing a smart BMS system based on a vehicle-mounted platform. The core contributions include a novel stackable distributed BMS architecture and an intelligent terminal, alongside the proposal of an advanced data-driven model for accurate battery state estimation.

The system architecture is designed with a two-layer approach: a bottom-level stackable BMS and an upper-level intelligent BMS terminal. The bottom layer is responsible for acquiring battery parameters such as voltage, current, and temperature from the battery modules. The intelligent terminal, or vehicle central control platform, is tasked with processing, storing, visualizing this data, and executing higher-order functions like state estimation using artificial intelligence algorithms.

Precise State of Charge (SOC) estimation is paramount for ensuring battery performance, longevity, and vehicle safety. Traditional methods like the Open Circuit Voltage (OCV) method are impractical for real-time applications. Data-driven approaches, which do not require complex physical modeling, have gained prominence. This study proposes an enhanced hybrid neural network model to achieve high-accuracy SOC estimation under dynamic operating conditions.

Proposed A-HyBiLSTM Model for SOC Estimation

The designed model, named A-HyBiLSTM (Attention-based Hybrid Bidirectional LSTM), integrates Convolutional Neural Networks (CNN), Bidirectional Long Short-Term Memory (BiLSTM) networks, and an attention mechanism. This three-stage architecture is particularly suited for scenarios with limited but temporally rich data samples, such as battery operation cycles.

1. CNN Layer for Spatial Feature Extraction: A one-dimensional CNN (1D-CNN) is employed to extract local spatial features from the input battery parameters (e.g., voltage, current, temperature). The convolution operation can be represented as:
$$ F_{k} = \sigma \left( \sum_{i} x_{i} * w_{k,i} + b_{k} \right) $$
where \( x_{i} \) is the input sequence, \( w_{k,i} \) is the kernel weight, \( b_{k} \) is the bias for the \(k\)-th filter, \(*\) denotes the convolution operation, and \( \sigma \) is the activation function.

2. BiLSTM Layer for Temporal Feature Modeling: The BiLSTM layer processes the feature maps from the CNN in both forward and backward temporal directions. This allows the model to capture long-term dependencies and contextual information from past and future states within the sequence. The output at time \(t\) is a concatenation of the forward hidden state \(\overrightarrow{h_t}\) and the backward hidden state \(\overleftarrow{h_t}\):
$$ y_t = \sigma(W_y \times [\overrightarrow{h_t}, \overleftarrow{h_t}] + b_y) $$
Here, \(W_y\) and \(b_y\) are the weight matrix and bias term for the output, and \(\sigma\) is a non-linear activation function.

3. Attention Mechanism for Feature Weighting: An attention layer is incorporated to dynamically assign importance weights to different time-step features extracted by the BiLSTM. This mechanism helps the model focus on the most relevant temporal information for SOC estimation while suppressing noise. Given an input sequence \(X = \{x_1, x_2, …, x_N\}\), the attention process involves:

  1. Similarity Score Calculation: Compute a score \(s_i\) between a query \(Q\) (derived from the target context) and each key \(K_i\) (derived from the input).
  2. Weight Normalization: Normalize the scores using the softmax function to obtain attention weights \(a_i\):
    $$ a_i = \text{softmax}(s_i) = \frac{e^{s_i}}{\sum_{j=1}^{N} e^{s_j}} $$

  3. Context Vector Generation: Compute a weighted sum of the value vectors \(V_i\) using the attention weights:
    $$ \text{Attention}(Q, K, V) = \sum_{i=1}^{N} a_i \cdot V_i $$

4. Output Layer for SOC Prediction: The final context vector from the attention layer is fed into a fully connected (dense) layer to produce the predicted SOC value.

The complete A-HyBiLSTM model structure effectively combines these components to perform deep feature extraction and contextual understanding of battery time-series data.

Stackable Distributed Battery Management System Design

The hardware core of the bottom-level BMS is built around the BQ79616 battery front-end monitoring chip. A “daisy-chain” topology is adopted to create a scalable, distributed architecture. This design significantly reduces wiring complexity and hardware cost while facilitating easy expansion of the battery pack capacity.

Hardware Architecture and Circuit Design

In the daisy-chain structure, multiple BQ79616 devices are connected in series. Only the base device communicates directly with the main Microcontroller Unit (MCU) via a UART interface, which is isolated using an ISO7742 chip for enhanced electromagnetic compatibility and safety. Each BQ79616 is powered by its associated battery module, and data is transmitted serially along the chain.

Voltage Measurement & Passive Balancing: The BQ79616’s main ADC measures individual cell voltages. The result, stored in dedicated registers, is a 16-bit two’s complement value. Converting this to a cell voltage \(V_{cell}\) in microvolts follows:
$$ V_{cell} (\mu V) = \text{Decimal}(\text{Register Value}) \times \text{LSB Weight} $$
where the LSB (Least Significant Bit) weight is a constant defined by the chip’s resolution. For passive cell balancing, external 300Ω resistors are connected across each cell, controlled by the BQ79616’s balancing FETs, allowing discharge currents up to 600mA.

Current Measurement: A shunt resistor (\(R_s = 2 m\Omega\)) is placed in series with the battery pack. The voltage drop across it (\(V_s\)) is amplified by a differential amplifier circuit with gain \(G\). The output voltage \(V_{out}\) is measured by an auxiliary ADC (AUXADC) on the BQ79616. The pack current \(I_{pack}\) is calculated as:
$$ I_{pack} = \frac{V_{out} – V_{ref}}{G \times R_s} $$
where \(V_{ref}\) is the amplifier’s reference voltage.

Temperature Measurement: Temperature is monitored using the BQ79616’s internal die temperature sensors (DieTemp1, DieTemp2), measured directly by the main ADC. The digital value is converted to temperature using a linear relationship defined in the chip’s datasheet.

The key hardware components of the BMS are summarized in the following table:

Component Model/Specification Description
MCU GD32F130C8T6 ARM Cortex-M3 Core, Automotive Grade
AFE Chip BQ79616 Monitors up to 16 battery cells in series
Communication Isolation ISO7742 Isolates UART signals
Balancing Resistor 300Ω For passive cell balancing
Current Sensing Differential Amplifier Shunt resistor: 2 mΩ
Temperature Sensor BQ79616 Internal Die temperature measurement
Storage KLM8G1GETF 8GB Flash Memory
Display (Terminal) ATK7016 7-inch LCD, 1024×600 resolution

Embedded Software Architecture

The BMS firmware is developed using a modular, three-layer architecture based on the RT-Thread Nano real-time operating system, which ensures reliable task scheduling and system management.

  1. Driver Layer: Provides hardware abstraction via the HAL library, BQ79616 driver, and peripherals drivers (UART, I2C, CAN).
  2. System Service Layer: Manages core RTOS functions like task scheduling, inter-thread communication, and memory management provided by RT-Thread Nano.
  3. Application Layer: Implements the core BMS business logic with prioritized tasks, including:
    • Periodic battery parameter acquisition.
    • Safety protection (over-voltage, under-voltage, over-temperature).
    • Passive cell balancing control.
    • Communication with the intelligent terminal via CAN/UART.

The main program flow for battery state monitoring involves initializing the system and the BQ79616 chip, then entering a loop where it sends commands to read voltage, current, and temperature registers, processes the data, and executes control actions like balancing.

Intelligent BMS Terminal Platform Design

The intelligent BMS terminal is built on an ARM-Linux platform and serves as the vehicle’s human-machine interface and data processing center. Its design encompasses three levels:

1. Hardware Abstraction Layer: Manages communication interfaces with the underlying BMS (CAN/UART) and drives peripherals like the LCD display and USB ports.

2. System & Algorithm Layer: This layer handles core functionalities:

  • Data Management: Uses SQLite, a lightweight database, to structure and store historical battery data. Two main tables are designed: a Battery Pack Info table and a Cell Data table.
  • State Estimation: Hosts the trained A-HyBiLSTM model (or other algorithms) for real-time SOC and State of Health (SOH) prediction.
  • Network Communication: Supports wireless connectivity for remote data access and over-the-air updates via cloud/APP.

3. User Interface Layer: Developed with the Qt framework, the GUI provides a real-time monitoring dashboard. The interface is divided into four main sections for displaying overall battery status, detailed cell information, system alerts, and user controls. A QTimer ensures data is refreshed at a 1 Hz rate. The layout uses nested QHBoxLayout and QVBoxLayout for adaptability.

Experimental Analysis and Results

To validate the proposed A-HyBiLSTM model, experiments were conducted using publicly available battery datasets. Training data consisted of one complete discharge cycle under FUDS, DST, and US06 driving profiles at different temperatures. The test set comprised DST profile data at varying temperatures. The model was trained on approximately 7500 data samples. Key hyperparameters for the neural network training are listed below:

Parameter Value Parameter Value
Input Feature Dimension 4 Learning Rate 0.001
Number/Size of Conv. Filters 64 / 3 Batch Size 64
Optimizer (Adam) β₁=0.9, β₂=0.999 Time Steps / Epochs 60 / 300

The performance of the A-HyBiLSTM model was compared against baseline models like CNN-LSTM and CNN-BiLSTM. Evaluation metrics included Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and the Coefficient of Determination (R²).

The results demonstrated the superior performance of the proposed A-HyBiLSTM model. Under all tested driving profiles (FUDS, DST, US06), it achieved lower prediction errors compared to the CNN-BiLSTM model. The performance improvement is quantified in the following table, which shows the metrics on the DST test set:

Deep Learning Model MAE RMSE
CNN-BiLSTM (FUDS) 0.5089 0.6486 0.9995
A-HyBiLSTM (FUDS) 0.4527 0.5430 0.9997
CNN-BiLSTM (DST) 0.4322 0.5443 0.9996
A-HyBiLSTM (DST) 0.3773 0.4628 0.9997
CNN-BiLSTM (US06) 0.4823 0.6339 0.9995
A-HyBiLSTM (US06) 0.4179 0.5384 0.9997

The A-HyBiLSTM model achieved an additional performance enhancement of approximately 11%, 12%, and 13% in MAE (and 16%, 15%, 15% in RMSE) over the CNN-BiLSTM model for the FUDS, DST, and US06 profiles, respectively. Furthermore, the SOC estimation error remained within 2% even when tested under different temperature conditions, confirming the model’s robustness and high accuracy.

Conclusion

This study presents a comprehensive solution for the intelligent upgrade of battery management systems in specialized electric vehicles, such as oil-water separation trucks. The core achievements are twofold:

1. System Architecture: A practical and cost-effective BMS was developed, featuring a daisy-chain-based distributed hardware design using the BQ79616 AFE chip and a layered software architecture based on the RT-Thread RTOS. This is complemented by an ARM-Linux-based intelligent terminal that provides real-time data visualization, database management, and connectivity features.

2. Advanced State Estimation Algorithm: The novel A-HyBiLSTM model, which integrates CNN, BiLSTM, and attention mechanisms, was proposed and validated. It demonstrated significant improvements in SOC estimation accuracy across various dynamic driving cycles and temperature conditions compared to conventional hybrid neural networks.

The integrated smart BMS system offers an effective technical pathway for enhancing the safety, efficiency, and management intelligence of battery packs in pure electric commercial vehicles, contributing to the broader adoption of sustainable transportation technologies.

Scroll to Top