Efficient Implementation Of Real-time Monitoring And Prediction Of SOC For Lithium-ion Battery Packs

Nov 25, 2024 Leave a message

Abstract

 

This study delves into the monitoring of the charging status of lithium-ion batteries, which is crucial for the safety and efficiency of battery energy management in embedded applications. Accurately understanding the charging status of batteries is of decisive significance for ensuring their safe use and performance. The research team developed and implemented an observer algorithm based on Kalman filter, which was deployed on Spartan 6 FPGA. The algorithm can accurately estimate the charging state of the battery, even if there is a deviation between the initial estimated value and the actual state. This article particularly emphasizes the advantages of FPGA in fast computing, which enables FPGA to serve as an efficient slave component in battery management systems (BMS), monitoring the charging status of a large number of batteries at a lower cost. Implementing this observer on low-cost FPGA is of great significance for reducing the cost of battery management systems in applications such as electric vehicles. In addition, the observer model has been validated for its effectiveness through rigorous simulation and real-time testing. This study proposes an effective method for accurately estimating the charging status of lithium-ion batteries, providing strong support for the effective management of battery energy in various applications.

 

 

 

 

1. Introduction


The importance of energy management and SOC estimation: Energy management is crucial in embedded applications, especially battery powered devices, as it affects battery life and overall system performance. Lithium ion batteries are widely used due to their high energy density, low self discharge rate, and long cycle life. To ensure the safety and efficiency of the battery power supply system, accurate estimation of SOC is essential. Inaccurate estimation can lead to overcharging, overdischarging, and premature failure of the battery. However, the nonlinear and time-varying characteristics of lithium-ion batteries make SOC estimation quite challenging, hence various estimation methods have been proposed, including model-based and data-driven approaches.

 

 

Battery Management System and SOC Estimation Method

 

The Battery Management System (BMS) is an important component of a battery pack, which monitors the battery status and controls the charging and discharging process. Accurate SOC estimation is one of its key functions, which helps optimize battery use, prevent overcharging and overdischarging. The algorithm needs to meet high-precision, robustness to low precision sensor errors and battery parameter misestimation, and low computational power requirements. The modeling and estimation techniques for achieving accurate SOC estimation include electrochemistry, equivalent circuits, and data-driven methods. Electrochemical models are accurate but computationally expensive and require specialized knowledge, while observer based methods are relatively simple and have good accuracy.

 

SOC estimation methods are divided into two categories: open-loop and closed-loop estimation. Open loop methods such as Coulomb counting are simple but require initial SOC knowledge, slow dynamics, and poor reliability, while open circuit voltage methods are accurate but require the battery to be left idle for a long time. The closed-loop methods mainly include Model Predictive Control (MPC) and its related methods (such as Extended Kalman Filter (EKF), Dual Extended Kalman Filter (DEKF), Adaptive Extended Kalman Filter (AEKF), Adaptive Hybrid Algorithm (AMA), State Observer, Generalized Extended State Observer (GESO), Fuzzy Logic Method, and Neural Network), as well as methods such as H-infinity filter, Sliding Mode Observer (SMO), Particle Filter (PF) based methods, and variants of Kalman Filter (such as Unscented Kalman Filter (UKF) and Sigma Point Kalman Filter (SPKF)).

 

The application of EKF and FPGA in SOC estimation: There are various methods for online SOC estimation, and state observers (especially EKF) are popular due to their robustness. In battery management, EKF recursive algorithm can combine battery models and measurement data to estimate SOC. However, implementing complex algorithms with microcontrollers is costly and may not be suitable for multi battery systems. BMS costs (including monitoring and balancing) may reach 30% of battery pack prices. Therefore, this study focuses on the fast calculation of SOC estimation algorithm for electric vehicle batteries with multiple batteries in series using field programmable gate arrays (FPGAs). FPGAs have been proven to be efficient in the industrial field. The goal of this study is to implement an observer based on EKF algorithm on a low-cost and efficient Spartan 6 FPGA, which can correct initial inaccurate SOC estimation. The fast observation time can achieve simultaneous observation of multiple batteries with the same FPGA, reducing the BMS cost of electric vehicles or other battery SOC systems that need to be monitored. The subsequent chapters of the paper will introduce the lithium-ion battery model, observer design, implementation on FPGA, simulation in Xilinx environment, experimental results, research conclusions and future work in sequence.

 

640

 

 

 

 

2. Charging state observer


Battery Model


There are various modeling methods to accurately represent the dynamic behavior of electrochemical cells. Although electrochemical models can help predict battery performance and understand aging mechanisms, they require initial and boundary conditions of the battery, and are computationally complex and not suitable for real-time applications. So a simplified model based on equivalent circuit (EEC) was developed, which is suitable for non electrochemical professionals and easy to apply in real-time. However, electrochemical phenomena need to be considered at the battery level to simplify model recognition.  

 

640 1

 

The EEC model used in this study includes an open circuit voltage source (OCV), a resistor R Ω representing high-frequency phenomena such as electrolyte and connection resistance, as well as charge transfer dynamic resistance, and a parallel circuit R1C1 simulating low-frequency diffusion phenomena. To simplify real-time calculations, a single RC circuit is used to simulate diffusion phenomena with a sampling period of Te=0.1 seconds, which can be ignored compared to the sampling period due to the dynamic charge transfer (about 10ms). The battery model state equation is extended to SOC as shown in formula 1:

 

640 2

 

 (Where Qnom is the nominal capacity, V1 is the voltage across R1C1 circuit, SOC is the state of charge, Ubat is the battery terminal voltage), the discrete state battery model is extended to SOC as shown in formula 2:

 

640 3

 

 

SOC observer based on Kalman filter

 

SOC cannot be directly measured, and Extended Kalman Filter (EKF) is commonly used to solve this problem. It requires an accurate battery model and the ability to estimate SOC within a certain noise range. EKF initializes and predicts state variables at a specific sampling time Te, using a battery model state equation (Formula 1) that includes SOC for prediction. The observer performance depends on the confidence in the measurement and model, taking into account model uncertainty wk and voltage measurement uncertainty vk (Formula 3):

 

640 4

 

Assuming they are white noise, Gaussian noise, and have a mean of zero, they are included in the covariance matrices Q and R of the state and measurement noise, respectively.

 

Due to the nonlinearity of extending the battery model to SOC (as OCV is related to SOC), it is necessary to linearize it by calculating the Jacobian matrix at each sampling time (Formula 4):

 

640 5

 

Linearize and calculate the Kalman gain (Formula 5):

 

640 6

 

Update covariance matrix (Formula 6):

 

640 7

 

Finally, use the optimal gain correction to predict the state vector (Formula 7):

 

640 8

 

The EKF parameters are summarized in the table below.

 

640 9

 

 

 

 

3. FPGA implementation

 

FPGA architecture design: FPGA consists of processing resources (such as memory, logic, and registers, grouped into different types of logic blocks) and programmable interconnect resources. When programming, it is necessary to specify the functions of the logic blocks and organize the interconnect network. This study focuses on matrix programmable circuit architecture, whose logic blocks are in a regular rectangular structure and are connected to a routing network (consisting of horizontal and vertical channels) through programmable interconnect points. FPGA is composed of pre designed basic batteries and interconnects, and users can program and build specific hardware architectures that meet application requirements. It exhibits high throughput and low latency processing capabilities in the industrial field, and its flexibility can enhance performance, reduce costs, and have scalability. The use of FPGA for configurable parallel computing reduces algorithm execution time, but programming requires optimization of physical properties, including algorithm time/area performance and data format bit selection, while maintaining the basic accuracy of the observer.

 

Process technology 45 nm
Number of Logic Cells (LCs) 147443

Configurable Logic Blocks (CLBs)

Slices

Flip-Flops

Max Distributed RAM (Kb)

23038

184304

1355

DSP48A1 Slices 180
Max user l/O 576
Memory 4824 Kb
Clock 80 MHz

 

640 10

 

Equipment and Software: This study aims to implement an Extended Kalman Filter (EKF) for estimating the State of Charge (SOC) of a battery pack in a real-time system, using dSPACE's MicroAutoBox II (MABXII) hardware platform, which is reliable and robust for prototype design and testing in the automotive industry. Its embedded Xilinx Spartan-6 FPGA (XC6SLX150) has high performance and low power consumption (key specifications are shown in Table 2), making it suitable for this application. The SOC observer is implemented on this FPGA and tests the SOC of individual batteries in a battery pack consisting of 5 series connected lithium-ion batteries (battery pack parameters: total nominal voltage of 18V, nominal voltage of single battery of 3.6V, overall capacity of 2.5Ah, using Samsung 25R 18650 lithium-ion battery, positive electrode is a mixture of NCA and NMC chemicals, negative electrode is graphite, battery model parameters are identified by constant current intermittent titration technology GITT, as shown in Figure 4). Assuming a battery temperature of 25 ° C and constant parameters, the EKF algorithm is developed using Simulink blocks (as shown in Figure 5) and optimized for performance and resource utilization through pipeline, time-division multiplexing/folding, and customized precision.

 

640 11

 

640 12

 

Time division multiplexing technology: The battery pack under study contains 5 series connected lithium-ion batteries, and there are two methods for estimating the SOC of each battery. One is to develop a design with five battery models, but due to high resource requirements, it is not suitable for real-time applications and requires more expensive and resource rich FPGA. The second method is based on time-division multiplexing (see Figure 6), with each sampling time Te '=0.02 seconds. After the battery pack current and battery voltage are digitized by the MicroAutoBox DSP board ADC, the state machine sends the data to the FPGA to execute the EKF algorithm. After the algorithm is completed, the estimated and corrected SOC, error covariance matrix, and diffusion voltage are sent back to the DSP. Subsequent efforts will focus on verifying the observer through simulation, which is crucial for ensuring the accuracy and effectiveness of the observer before deployment on FPGA.

 

640 13

 

 

 

 

4. Xilinx's verification of observers

 

Verification process: The algorithm is validated using a system generator library specifically designed for FPGA programming. This library allows FPGA programming using Simulink blocks, and data processing can be done in floating-point or fixed-point mode. The higher the accuracy, the greater the FPGA resource requirements. To balance the accuracy of results and resource utilization, this study chose a signed representation in fixed-point mode, specifically the Fix32_16 format (15 bits for integer part, 16 bits for decimal part, and 1 bit for sign). The main advantage of using this Xilinx library is its ease of implementation on FPGA, without the need for complex VHDL programming.

 

 

Performance evaluation and results

 

The performance of the observer based on EKF is evaluated through the current curve of 1C discharge current (2.5A). The actual SOC is initialized to 100%, and the initial estimated SOC value SOC-0 is set to 0% (SOC-0 is an adjustable parameter that can achieve a wide range of estimated SOC initialization). The SOC reference value is obtained from a coulomb meter initialized with the correct initial SOC and nominal capacity. Place the designed estimator under the 1C current step discharge current curve for verification.

The results show that although the initial estimated value is different from the actual SOC initial value, the estimated SOC still converges to the actual SOC of the battery, indicating that the EKF observer can correct poor SOC estimation and make the estimated SOC converge to the actual value. However, the fixed-point representation used in the implementation limits the number of bits used, leading to estimation errors, and errors may accumulate during the current integration process when predicting state variables, resulting in a large range of errors between the estimated and actual values. However, as long as the absolute error is less than 5%, the filter is considered effective and can accurately estimate the state variables.

 

640 14

 

 

 

 

5. Real time FPGA implementation results

 

Real time verification (using pre recorded data): Before actual battery testing, simulate testing using pre recorded current/voltage data of the battery. The test results show that the observer has good real-time performance. The current curve is discharged with a 1C current step (2.5A), and the SOC is initialized to 0%. The SOC reference value is obtained by a correctly initialized coulomb meter. Compared with the simulation results of Xilinx, the performance of the observer is similar in both cases, and the Kalman filter implemented on FPGA successfully reduces the error between the measured voltage and the estimated voltage, making the estimated SOC converge to an accurate value that cannot be directly measured.

 

640 15

 

 

Experimental verification observer

 

Single battery testing: After real-time verification using pre recorded data, further testing is conducted during actual battery discharge. Using the testing platform shown in the figure, run the observer while discharging the battery to evaluate the accuracy of SOC estimation. By generating current pulse cycles as the set value for programmable active loads to discharge the battery, experimental results show that at the beginning of the current cycle, the filter can correct the initial SOC of 0%. As the voltage decreases, the SOC also decreases, and the system can automatically correct it. However, there is oscillation in the estimation process, mainly due to sensor measurement noise, requiring a smoother filter.

 

640 16

 

640 17

 

640 18

 

Battery pack testing: As the research battery consists of 5 series connected batteries, an estimator needs to be developed for testing the entire battery pack. By incorporating time-division multiplexing technology into the Kalman filter model, a current pulse cycle with a period of 3200s and an amplitude of -2.5A is generated as the programmable active load setting value for battery discharge. The results show that the observer can accurately estimate the voltage and SOC of each battery in the entire battery pack. Based on five curves, the SOC and voltage of each battery can be determined, which has significant advantages compared to previous studies that only estimate the overall voltage and SOC of the battery pack. The SOC observer has an execution time of 2.5 µ s and a typical sampling period of 0.1 s. The Spartan 6 chip has sufficient time to perform multiple SOC estimations and observe other states (such as internal temperature) within one sampling period. The FPGA implementation did not consume a significant amount of resources, and despite the complexity of the program, the available FPGA resources were not fully utilized.

 

640 19

 

640 20

 

Slice Logic Utilization

Number of Slice Registers (flip flops)

Number of Slice LUTs

Used
15395

11442

Available
184304
92152

Utilization
8%

12%

Slice Logic Distribution

Number of occupied Slices

Number of MUXCYs

4331
9148
23038
46076
18%
19%
I/O Utilization 180 498 36%
Number of DSP48A1s 94 180 52%

 

 

 

 

6. Summary

 

In the field of embedded applications, energy management is crucial for optimizing energy consumption and extending battery life. This requires us to be able to accurately monitor the charging status of the battery. This study focuses on developing a state observer to estimate the voltage and charging status of each battery in a lithium-ion battery pack. The observer adopts the Kalman filtering algorithm suitable for lithium-ion batteries and has the ability to correct the charging state when the initial estimated value is inconsistent with the actual charging state. The implementation of this complex algorithm on a low-cost Spartan 6 FPGA (priced below 20 euros) has been proven to be highly efficient, capable of monitoring multiple batteries simultaneously, thereby reducing the cost of battery management systems.

 

The experimental results demonstrate that the observer can accurately estimate the voltage and charging status of each battery, demonstrating significant advantages compared to previous studies that could only estimate the voltage and charging status of the entire battery pack. The low execution time and resource consumption of the observer make it a powerful tool for real-time monitoring and control of lithium-ion battery packs, suitable for various application scenarios. Although challenges such as data noise were encountered during the implementation process, these issues can be effectively addressed by adopting appropriate filtering techniques to ensure the accuracy of the results. Overall, this study has contributed significant value to the field of battery management systems and opened up new avenues for future research.

Send Inquiry

whatsapp

Phone

E-mail

Inquiry