^{1}College of Electronic Information, Hangzhou Dianzi University, Hangzhou, China^{2}Zhejiang Provincial Key Lab of Equipment Electronics, Hangzhou, China^{3}Tianneng Battery Group Co., Ltd., Changxing, China^{4}Zhejiang Leapmotor Technology Co., Ltd., Hangzhou, China

Accurate estimation of the state of charge plays a very important role in ensuring the safe and effective operation of battery lithium-ion batteries and is one of the most important state parameters. However, the estimation method of state of charge has various limitations, so it is of great significance to improve the accuracy and calculation speed of the method. In this article, we propose an improved recurrent neural network model to estimate lithium-ion battery state of charge. Simple recurrent units are used to replace the traditional recurrent neural network basic unit or long short-term memory unit, and the computation speed is improved by implementing parallel processing. Finally, the prediction results of the model are fed into an unscented Kalman filter module to remove the interference of noise on the prediction. This article studies the prediction accuracy and speed of Samsung INR 18650-20R and INR 18650-25R under various ambient temperatures, initial state of charge values, and electric vehicle drive cycles. The results show that the proposed method can obtain accurate state of charge estimation results in the INR 18650-20R data set. For different temperatures and initial SOC, the root mean square error is less than 0.015 and 0.016, and the prediction speed is about 30% higher than that of long short-term memory. In the INR 18650-25R data set, for three different driving cycles, the root mean square error is less than 0.034, and the average test speed is about 2.7s, which proves the effectiveness of this method in estimating accuracy and speed.

## 1 Introduction

With the continuous advancement of ecological environment construction and the key support of governments around the world, the development of low-energy-consumption, pollution-free electric vehicles is rapid, and lithium-ion batteries are widely used in electric vehicles due to their superior characteristics. One of the main technical bottlenecks of electric vehicles is battery technology. The state prediction is the main difficulty of battery management. State of charge (SOC) of the battery reflects the remaining energy of the battery, usually using the definition given by the United States Advanced Battery Consortium, that is, the percentage of the remaining power of the battery in the rated capacity under the condition of a specific discharge rate.

where *Q*_{s} is the remaining capacity of the battery, and *Q*_{z} is the rated capacity of the battery. SOC quantifies the remaining energy of the battery and indicates how long the battery can be maintained before charging. Therefore, an accurate understanding of SOC is necessary for the mileage and travel planning of electric vehicles, which plays an important role in ensuring that the battery works within the safe working window and prolonging the cycle life.

However, the definition is that in the case of constant current discharge, in practical work, rate, temperature, and initial state of discharge will make the calculation of battery power inaccurate. In addition, the rated capacity of the battery is affected by temperature, aging, and other factors, which often cannot show the actual capacity of the battery (Yong et al., 2015; Hannan et al., 2017). SOC estimation is limited by complex battery dynamics and different operating conditions, such as temperature, self-discharge, hysteresis, and battery aging. It cannot be measured directly but can only be derived indirectly from measurable battery parameters, so real-time and accurate SOC estimation is the focus and difficulty in electric vehicle technology (Dong et al., 2018a). In recent years, there has been a lot of research on improving the accuracy of SOC estimation from the aspects of battery model, parameter identification, and state estimation algorithm. However, SOC estimation methods have various limitations all the time. It is of great significance to improve the accuracy and real-time performance of SOC estimation methods.

### 1.1 Literature Review

Commonly used SOC estimation methods are mainly divided into three categories: traditional methods, filtering methods based on battery model, and data-driven methods (Yang et al., 2019a). Traditional SOC estimation methods are most widely used in practice, including the ampere hour (AH) method and the open-circuit voltage (OCV) method. The AH method calculates the amount of charge released within a certain period of time by calculating the integral of the current over time and then adding or subtracting it from the initial value to obtain the final SOC. The calculation formula is as follows:

where *SOC*_{0} is the initial capacity, C is the rated capacity, *I* is the charge or discharge current at each moment, and *k* is the coulomb efficiency coefficient. Only the current changes in the calculation process of the AH method, so it is easy to monitor in real-time, and this method is generally used for all kinds of batteries, so it is the most widely used method in the industry (Truchot et al., 2014). However, the SOC estimation accuracy based on the AH method depends on the accuracy of *SOC*_{0} and current measurement. Unknown *SOC*_{0} or inaccurate current sampling accuracy or frequency will lead to SOC calculation error, and its open-loop working principle is difficult to avoid cumulative error (Sepasi et al., 2014). The OCV method estimates the SOC by fitting the mapping relationship between the OCV and the SOC of the battery through a large number of experiments and establishing an OCV-SOC table. This method requires the battery to stand for a period of time to make the electrolyte in the battery reach a complete equilibrium state and obtain a more accurate OCV. However, the long-time standing makes it unable to be used for vehicle real-time SOC estimation, which is often used for offline detection (Dong et al., 2021). In addition, the OCV-SOC curve of the lithium-ion battery has a flat area, and a slight change in voltage in this area will cause a large SOC error, which has high requirements for the accuracy of the voltage sampling circuit (Ji et al., 2022).

In order to improve the accuracy of SOC real-time estimation and solve the problem of cumulative error, the filtering method based on the battery model has attracted extensive attention (Rahimi-Eichi et al., 2013). This method needs to model the battery first and then realize SOC estimation through an adaptive filtering method. The performance of this SOC estimation method largely depends on the quality of the equivalent model and parameter identification. Battery models generally include an electrochemical model (EM) based on a porous electrode and concentrated solution theory and an equivalent circuit model (ECM) using various circuit components to form a circuit to describe various dynamic changes in the battery (Chen et al., 2018). EM is limited by different battery materials and cannot be used for different types of batteries; it is difficult to adapt to the changes in a working environment. Therefore, ECM is preferred in the model-based SOC estimation method. The description of ECM is more simple and more intuitive, the equation is simpler, the detailed calculation of the internal electrochemical process is avoided, and the parameters of the model are easier to identify (Lai et al., 2018; Dong et al., 2018b). Common ECMs include R_{int} (Nemes et al., 2019), Thevenin (Hentunen et al., 2014), and PNGV (Zhang et al., 2017). In order to realize dynamic SOC estimation, the filtering algorithm is often combined with a battery model to form a model-based SOC estimation method. The model-based estimation method uses a closed-loop structure, which can estimate the SOC with an unknown initial state and adaptively adjust the cumulative error. The widely used filtering methods include extended Kalman filter (EKF), unscented Kalman filter (UKF), particle filter (PF), and H infinite filter (HIF). He et al. (2013) proposed an enhanced battery model, used UKF to estimate SOC, and compared the estimation results of the EKF algorithm. Wang et al. (2018) proposed an improved UKF noise suppression algorithm to estimate the SOC. The algorithm has the advantages of moderate computational complexity and short computational time. Especially under the obvious noise interference, it can effectively suppress the signal noise. Zhang et al. (2012) proposed a SOC estimation method based on HIF. This method can still ensure the SOC estimation accuracy without requiring the accuracy of the system and measurement error and is not sensitive to the uncertainty of external signals and dynamic models. The model-based method can calculate the error gain through the nonlinear estimation algorithm and effectively improve the accuracy of SOC. However, the online identification of model parameters is difficult, and the lithium-ion battery is a highly complex nonlinear time-varying system (Dong et al., 2019). The established battery model is difficult to accurately simulate the battery state under different discharge conditions. The estimation performance depends on the model accuracy and parameter identification degree of accuracy.

The data-driven method refers to the direct estimation of SOC by measuring parameters such as current, voltage, and temperature. Different from the model-based method, it does not need to understand the internal chemical reaction process of the battery or establish an equivalent model. It only directly establishes the nonlinear mapping relationship between SOC and measurements (Yang et al., 2016), which avoids the complex process of model parameter identification and the use of filtering algorithms for gain calculation (Chemali et al., 2018). In recent years, with the rapid development of the field of machine learning, the SOC estimation method based on neural networks and deep learning has received extensive attention. The intelligent algorithm automatically learns the parameters of the network and obtains the mapping relationship between battery measurements and SOC so as to realize the real-time and accurate estimation of SOC (Hossain lipu et al., 2019; Hu et al., 2016). Cui et al. (2018) combined an adaptive wavelet neural network with discrete wavelet transform and proposed a new hybrid wavelet neural network model based on wavelet transform and the Levenberg Marquardt algorithm to estimate the SOC of lithium-ion batteries. Chaoui and Ibe-Ekeocha (2017) *et al.* used the recurrent neural network (RNN) to estimate the SOC and health status of lithium-ion batteries and used two different types of batteries to evaluate their performance. The results show that the RNN model is robust to battery aging, hysteresis, dynamic current curve, nonlinear dynamic characteristics, and parameter uncertainty. When the sequence becomes longer due to the phenomenon of gradient disappearance or explosion in the process of back propagation training, RNN cannot use the training framework based on the classical gradient to solve the long-term dependence, which makes the gradient-based training method difficult to apply (Bengio et al., 1994; Pascanu et al., 2013). In order to solve this problem, RNN with long short-term memory (LSTM) (Hochreiter and Schmidhuber, 1997) and gated recurrent unit (GRU) (Cho et al., 2014) is proposed, which essentially weakens the probability of gradient disappearance. Yang et al. (2019a) used an LSTM-RNN network to simulate the complex dynamic process of lithium iron phosphate battery. The network is trained offline with battery data to establish the mapping relationship between battery measurements and SOC. The LSTM unit performs a nonlinear transformation on the input data, generates a storage state for historical information, and establishes a dependency relationship between SOC in different time periods. Yang et al. (2019b) proposed a SOC estimation model based on GRU. GRU-RNN has fewer layers and neurons, a simple structure, and easy training. The training process takes several hours in a GPU environment, but the test time is very short, so it is suitable for real-time vehicle applications. Generally, the data-driven method depends on the analysis of the measurable parameters of the battery in the process of charge and discharge. It does not need to have an in-depth understanding of the internal characteristics of the battery and the chemical reaction process. It avoids the problems of difficult parameter identification and high computational complexity of using a nonlinear observer in the model-based method. It has the advantages of speed and generalization. Therefore, in this study, the deep neural network method and filtering algorithm are combined to estimate the SOC for lithium-ion batteries.

### 1.2 Contributions of the Work

Existing SOC estimation models based on LSTM and GRU and their improved versions can significantly improve the estimation accuracy. Since the estimation performance of data-driven methods is highly dependent on the quality and quantity of data, a large amount of data is often needed to obtain features between sequences in order to ensure the accuracy of deep models. However, due to the large amount of data, the training of RNN and its variant models in traditional parallel computing takes too long, and the time consumption in one operation cycle increases. The low computational efficiency increases the time for SOC acquisition, and it is difficult to meet the real-time requirements in practical applications.

In order to solve this problem, this work proposed an improved RNN-based method combined with UKF. While considering the spatiotemporal dependence between battery charge and discharge sequences, simple recurrent units (SRU) is used to realize parallel computing to improve the calculation of RNN, and UKF is used to smooth the estimation results and filter out noise to improve the anti-interference ability of the algorithm. In order to verify the effectiveness and robustness of the proposed method, experiments and analysis are carried out through a test bench and an authoritative data set. The effects of various temperatures, initial SOC, and drive cycles on the estimation accuracy and speed are discussed. The contribution of this work is as follows.

1) A SRU–RNN model for SOC estimation is proposed, which can capture the long-term time dependence of battery sequence in the forward and backward directions and ensure the accuracy of SOC estimation. In addition, the parallel mechanism can significantly improve the computing power of the constructed model.

2) A UKF is added to the SRU model to filter the model output noise and improve the stability of the model estimation results.

3) The effects of various temperatures, initial SOC, and drive cycles on the accuracy of the model are analyzed through experiments, and the effectiveness of the proposed SOC estimation method based on SRU–UKF is verified by using a test bench and a public data set.

### 1.3 Organization of This Article

The rest parts of this article are as follows: Section 2 introduces the modeling and algorithms in detail and introduces a SOC estimation method using SRU–UKF; Section 3 and Section 4 introduce the data preparation, experiment setup, verifications and analysis; Section 5 presents the conclusion.

## 2 SRU–UKF Based SOC Estimation Method

### 2.1 SRU Network

RNN can increase the consideration of time correlation, which overcomes the disadvantage that the traditional ANN model cannot capture the relationship between data and time, and it is very suitable for the application of time series prediction. By adding cyclic connections to neurons, RNN can build sequence-to-sequence mapping between input and output. Therefore, the output of each time step is affected by the input of the previous, which makes RNN have the characteristic of “information storage”. Although RNN can process time-series data, with the passage of time, RNN may not be able to capture the long-term correlation or even cause gradient disappearance or explosion. The basic structure of the RNN model is the unit, among which the more common ones are the LSTM unit and the GRU. They have a gating mechanism inside, which can adjust the information flow and understand which data in the sequence needs to be retained or discarded. By passing relevant information to long sequences for estimation in this way, RNN models can solve short-term memory problems. However, the development of LSTM and GRU comes from the increased model capability and related calculation, which often involves larger and deeper neural networks. Although the deep neural network has brought significant performance improvement, it also greatly increases the training cost of the model.

In order to enhance computing efficiency, parallel processing methods have been widely used in the field of deep learning. For example, the training speed of convolutional neural networks accelerated by graphics processing units has been significantly improved, but LSTM cannot achieve parallel processing. This is because LSTM needs the output state *h*_{t-1} at the previous moment when calculating *h*_{t}; that is, LSTM must operate the samples one by one in a sequential order to output the result (Dong et al., 2022). This way of computing makes it impossible to play the best role in an environment where multiple machines are computing in parallel. In order to enable RNN to achieve parallel processing and improve training speed, SRU was published in 2017. SRU retains the loop structure of the LSTM. By adjusting the sequence of operations, the matrix multiplication is placed outside the serial loop, and the operation of multiplying and then adding is placed in the serial loop so that the calculation of *h*_{t} no longer depends on the calculation of the previous moment, which improves the operation speed. The process of traditional LSTM serial computing and SRU parallel computing is shown in Figure 1. Compared with traditional serialized computing, SRU sets up an independent simple output in each step and then combines the outputs to achieve a high degree of parallelism.

Similar in nature to LSTM, SRU is a basic unit of RNN. In addition to avoiding the disappearance and explosion of gradients after many time steps, its parallel computing capability can also effectively improve the training speed of the model. SRU includes forget gate, reset gate, input *x*_{t}, output *h*_{t}, and status of the unit *C*_{t}. A schematic diagram of an SRU is shown in Figure 2.

In order to get rid of the dependence of *f*_{t}, *r*_{t}, and *C*_{t} on *h*_{t-1} and maintain parallelism and independence, a complete drop connection is proposed to remove the dependence of *h*_{t-1}. The implementation process of SRU is as follows.

where *f*_{t} is the activation vectors of the forget gate, and *r*_{t} is the activation vectors of the reset gate. *W* and *b* denote the weight matrix and bias parameter, and *σ* is the sigmoid activation function given by

It can be seen that *f*_{t}, and *r*_{t} can be calculated in parallel, as follows:

where *L* is the sequence length, and

### 2.2 Unscented Kalman Filter

The essence of the Kalman filter (KF) is a series of mathematical calculation equations, which are often used to predict or correct, and it is an optimal estimation algorithm. The classical KF is only suitable for linear systems, but its estimation performance in nonlinear systems is weak, so on the basis of KF, different forms such as EKF and UKF are derived. EKF uses the expansion of the Taylor series and ignores the higher-order terms, so the accuracy will be reduced. At the same time, the EKF also needs to calculate the Jacobian matrix, which makes the calculation more complicated. In contrast, UKF combines unscented transform (UT) and KF. There is no need to calculate the complex matrix differentiation and simplify the Taylor series, but the unscented transformation is used to deal with the nonlinearity of the system, which greatly reduces the amount of calculation. Therefore, in this work, we used UKF to improve the SOC estimation model based on SRU and optimize the estimation performance of the network model while enhancing the computing power.

The UT first samples the estimated points and approximates the state variables in the system. This series of sampling points is called Sigma points. The mean and covariance information between the Sigma points are the same, and the Sigma point can capture the state estimation of the system through nonlinear propagation and weighting calculation. The dimension of the state vector is *n*,

### 2.3 SRU–UKF Model for SOC Estimation

The SRU–RNN structure not only makes it possible to capture the dependencies of time series like LSTM but also increases the model’s ability to handle nonlinear input data by taking advantage of its parallel computing characteristics. UKF revises the estimated result curve to improve the anti-interference of the network model. Therefore, this combinatorial structure can improve the performance of the SRU–UKF proposed in this article. The overall structure of the proposed SRU–UKF model for lithium-ion battery SOC estimation is shown in Figure 3. The input of the model is battery measurable parameters, such as terminal voltage, current, and ambient temperature, which can be expressed as ** x** = [

**,**

*T***,**

*I***],**

*V***= [**

*T**t*

_{1},

*t*

_{2}, … ,

*t*

_{n}],

**= [**

*I**i*

_{1},

*i*

_{2}, … ,

*i*

_{n}], and

**= [**

*V**v*

_{1},

*v*

_{2}, … ,

*v*

_{n}]. The hidden layer uses the SRU with memory feature to obtain the temporal features of the measured signal. The fully connected layer maps all the distributed features output by the SRU to the sample label space and finally merges the outputs. The output layer gives the pending state of the SOC:

*ŷ*= [

*SOC*

_{1},

*SOC*

_{2}, … ,

*SOC*

_{n}]. Finally, the undetermined state passes through the UKF module to obtain the final SOC estimate. Eqs 8 and 9 are the state equation and measurement equation of UKF, respectively.

where *i*_{k} is the current value at time *k*, *SOC*_{k} is the estimated state value, *η* is the charge-discharge efficiency, *w*_{k} and *v*_{k} are the process noise and measurement noise, respectively, and *E*_{k} is the estimation of the SRU–RNN network.

Due to the different dimensions of ambient temperature, voltage, and current, if the raw sequence is directly fed into the network for training, the network will converge slowly or even be difficult to converge. Therefore, minimum–maximum normalization is used to process the input sequence of the network, and the sequence is scaled between 0–1 to improve the accuracy of the network and eliminate the impact of inconsistent data dimensions on network performance. The minimum–maximum normalization is as follows:

In deep network models, the network structure design is crucial. Appropriate network structure or hyperparameter selection makes the training results easier to converge and more accurate. Common hyperparameters related to the network structure include the number of hidden layers and neurons. The parameters related to the data are the number of input and output dimensions and time steps. Parameters related to training are batch size, learning rate, and loss function. In this study, the batch size and time step of SRU–UKF are set to 128 and 50, respectively, through multiple trials. The number of neurons in a single hidden layer is 300. ReLU is used as the activation function in the output layer with the formula *f*(*x*) = max (0, *x*). Considering possible overfitting during the training phase, the hidden layer uses a dropout algorithm with a dropout percentage of 30%. In order to obtain better training results, the optimization algorithm of the network is Adam. The mean squared error of the estimated SOC from the measured SOC as a loss function:

Three evaluation criteria, including max error, mean absolute error (MAE), and root mean square error (RMSE), are used in this research to evaluate the estimation performance:

## 3 Lithium-Ion Battery Data Preparation

### 3.1 EV Drive Cycles

The driving cycle, also known as the vehicle test cycle, is a speed–time curve that describes the driving of the vehicle. In the study of battery characteristics, the speed of the vehicle is often converted into the change of power or current. The driving cycle embodies the kinematics characteristics of vehicle road driving. It is an important and common basic technology in the automotive industry, and it is also the main benchmark for battery testing and calibration and optimization of various performance indicators. In recent years, developed countries such as Europe, the United States, and Japan have adopted standards adapted to their respective driving conditions for vehicle performance calibration optimization and energy consumption or emission certification. At present, the most widely used are the vehicle driving conditions specified by EPA, which include Federal Test Procedure (FTP), Urban Dynamometer Driving Schedule (UDDS), US06, and LA92. The target vehicle speed driving schedules of these four drive cycles are shown in Figure 4. For FTP driving schedules, duration = 1874 s, distance = 11.04 miles, and average speed = 21.19 mph. For UDDS driving schedules, duration = 1,369 s, distance = 7.45 miles, and average speed = 19.59 mph. For US06 driving schedules, duration = 596 s, distance = 8.01 miles, and average speed = 48.37 mph. For LA92 driving schedules, duration = 1,435 s, distance = 9.82 miles, and average speed = 24.61 mph.

**FIGURE 4**. EPA vehicle speed driving schedules of four drive cycles: **(A)** FTP, **(B)** UDDS, **(C)** US06, and **(D)** LA92.

### 3.2 Li-Ion Battery Dataset From CALCE

In this work, the lithium-ion battery dataset from the Center for Advanced Life Cycle Engineering (CALCE) at the University of Maryland was one of the dataset sources used to validate the proposed method. CALCE tested the INR 18650-20R lithium-ion battery with a rated capacity of 2000 mAh; its test platform included a test sample, incubator, Arbin BT2000 battery test equipment, and a computer equipped with Arbin software. The tests included four dynamic current configurations, including Dynamic Stress Test (DST), Federal Urban Driving Schedule (FUDS), US06, and Beijing Dynamic Stress Test (BJDST), and its current configuration is shown in Figure 5.

**FIGURE 5**. Battery test loading profiles in INR 18650-20R dataset: **(A)** DST, **(B)** FUDS, **(C)** US06, and **(D)** BJDST.

All tests were performed at a low temperature of 0°C, room temperature of 25°C, and a high temperature of 45°C, and the initial SOC was 80% and 50%, respectively. Parameters such as current, voltage, temperature, capacity, and power of the battery were recorded. The sampling frequency was 1s. A complete dynamic test process in the INR 18650-20R dataset includes four stages: 1) Operate in a constant current–constant voltage (CC-CV) charge mode: constant current 1 A charging to cut-off voltage 4.2 V, and then constant voltage charging until the current reaches 0.02 A. 2) Standstill for 2 h 3) Discharge to 80% or 50% SOC. 4) Standstill for 2 h; 5) Drive cycling according to the standard dynamic current configuration until the voltage drops to 2.5 V. The voltage distributions of the four cycle conditions at 0, 25, and 45°C are shown in Figure 6.

The INR 18650-20R dataset from CALCE has the characteristics of a scientific measurement scheme, high precision of test instruments, and wide application in lithium-ion battery research. It is an authoritative public dataset in the field of lithium-ion battery research. It is widely used in the research of lithium-ion battery SOC estimation methods, which provides the possibility to compare the performance of various SOC estimation algorithms.

### 3.3 Test Bench

Another source of dataset in this work was the test bench. The test data of lithium-ion batteries under various environmental conditions can be obtained by setting the test scheme flexibly. The test bench is shown in Figure 7. It consists of a testing sample, ESPEC GMC-71 temperature test chamber, programmable electronic load IT8818B manufactured by ITECH, BT3562 battery tester manufactured by HIOKI, and a PC with IT9000 software. The IT9000 can provide test system commands, setting constant discharge rate, programmable current, test switch conditions, and monitor information.

This work tested a new Samsung INR18650-25R battery cell, and Table 2 shows its basic specifications. The battery cells are placed inside the ESPEC GMC-71 to simulate the charging and discharging process of the cells under various temperature conditions. Usually, the battery needs to be placed at the set temperature for 2 h before the test to adapt to the environment. The IT8818B can add programmable loads to simulate the operation of the battery under different rates or driving cycles. BT3562 can accurately measure the voltage and AC internal resistance of the battery. Monitor and save test schedule *via* PC and IT9000.

Throughout the experiments, drive cycles were chosen from EPA standards and CALCE, including FTP, UDDS, US06, LA92, DST, BJDST, and FUDS. The sampling period was 1s. The test was carried out at a low temperature of 0°C, a room temperature of 25°C, and a high temperature of 45°C. The specific steps of the experiment are as follows.

** •** Step 1: Initialization. Charging with 1C constant current, when the voltage reaches 4.2 V, transferring to constant voltage charging, until the charging current drops to 100 mA. At this point, the SOC can be considered 100%.

** •** Step 2: Simulation of the ambient temperature. Placing the battery in an incubator for 2 h to ensure that the battery temperature is consistent with the ambient temperature.

** •** Step 3: Discharge. Discharging according to the drive cycles until the voltage reaches 2.5 V. The SOC of the battery is considered to be 0%.

** •** Step 4: Charge. Charging with 1C constant current, when the voltage reaches 4.2 V, transferring to constant voltage charging, until the charging current drops to 100 mA.

** •** Step 5: Repetition of steps 2–4. The temperature is set to 0, 25, and 45°C, respectively.

** •** Step 6: Repetition of steps 2–5. The driving cycle is set to FTP, UDDS, US06, LA92, DST, and FUDS, respectively.

Public datasets are often only tested for specific scenarios, such as a single battery sample, a fixed ambient temperature sample, a fixed charge-discharge rate, and a fixed working condition sample. The test bench can obtain a large number of battery charge-discharge measurements under various test conditions, which greatly improves the test conditions of the public data set, so it is of great significance for SOC estimation. However, compared with authoritative public data sets, it has the characteristics of insufficient test accuracy, difficulty in collecting battery aging data, few application scenarios, and poor feasibility of battery performance estimation methods. Therefore, in this work, the proposed SOC estimation method was validated and analyzed by combining two types of datasets.

## 4 Verification and Analysis

The validity of the SRU–UKF model is verified through three aspects, which are to verify the performance at various temperatures, various initial discharge conditions, and different drive cycles.

In this study, the experiments were conducted on a PC with an Intel(R) Core(TM) i7-6850K CPU @ 3.60 GHz, using Python 3.6. Under the GeForce RTX 3060 Ti GPU condition, the training time was approximately 14 min with 500 epochs.

### 4.1 Performance Verification Under Various Temperatures

In real life, high temperature or severe cold weather is often encountered, so the SOC estimation model needs to be robust at various temperatures so as to cope with the situation of the car in different climates and temperature differences between day and night. The influence of ambient temperature cannot be ignored. DST, FUDS, and UDDS in 0, 25, and 45°C environments are used as the training set, and BJDST is used as the test set to verify the performance of the proposed model at different temperatures. It is worth noting that the discharge process of the battery is always at a fixed ambient temperature. In addition, the proposed method is mainly to solve the estimation problem of battery discharge under different operating conditions, so the model is tested with the discharge process data. The estimated results of BJDST with 80% initial SOC values are shown in Figure 8. Table 2 shows the comparison among GRU, LSTM, and SRU–UKF at various ambient temperatures.

**FIGURE 8**. Performance of GRU, LSTM, and SRU–UKF models with various ambient temperatures: **(A)** 0°C, **(B)** 25°C, and **(C)** 45°C.

It can be seen from Figure 8 that the prediction has a large error in the initial stage, but it is quickly stable, and then the error fluctuates greatly when the SOC is lower than 20% in the latter part of the discharge process. This is because in the early stage, the internal characteristics are difficult to predict and the number of input data is small, and the model still needs a certain capture and convergence time; In the middle of the discharge process, the predicted curve is stable, which may be related to the battery in this discharge period, which is in a stable period of voltage, which is, of course, good for battery load, but for SOC estimation, a small voltage fluctuation may bring about a large error in SOC prediction. When the SOC is lower, the internal resistance increases and the internal characteristics of the battery are found to change significantly, which is difficult to predict and reduces the prediction accuracy of the model.

According to the MAE, RMSE, training time, and average testing time of the GRU, LSTM, and SRU–UKF models at different temperatures shown in Table 3, the MAE and RMSE of the model at high temperature and room temperature are lower because the performance of the battery is better, but the high temperature will damage the battery and accelerate the aging of the battery. Perhaps after several cycles, the performance of the battery will change, and the model will no longer be applicable to the estimation of the SOC. At low temperatures, the charge–discharge performance of the battery deteriorates, the chemical substances inside the battery are inactive, and the battery characteristics change, making SOC estimation more difficult. Overall, the proposed model has reliable SOC estimation results at different temperatures, and the RMSE tested at all three temperatures is below 0.018. In addition, it can also be concluded from the table that the proposed model has estimation accuracy similar to LSTM and GRU, while the training time is only one-sixth of that of LSTM, and the test time is only three-quarters of that of LSTM. If the UKF filtering process is abandoned, the training or testing speed of the SRU-based SOC estimation model will be faster.

### 4.2 Performance Verification Under Various Initial SOC Values

In fact, in daily life, people often use it when the battery power is not full and conduct prediction experiments when the initial SOC is 100%, 80%, and 50%; in this way, the prediction robustness of the proposed model under different initial battery charge conditions is verified. Figure 9 shows the prediction of GRU, LSTM, and SRU–UKF models under various initial SOC values. In this validation, BJDST, FUDS, and UDDS at 25°C are used as the training set and DST as the test set. It can be seen that, regardless of the initial state, the model converges to the real curve almost immediately, indicating the robustness of the model against unknown initial states.

**FIGURE 9**. Performance of GRU, LSTM, and SRU–UKF models with various initial SOC values: **(A)** 100%, **(B)** 80%, and **(C)** 50%.

Table 4 lists the results of GRU, LSTM, and SRU–UKF models under different initial SOC values. The proposed SRU–UKF model has a similar RMSE to the classical LSTM, and the estimation accuracy is slightly higher than that of GRU, and the RMSE is both less than 0.016, indicating that the proposed model can have good prediction effects under different initial SOC values. In addition, the parallel processing mechanism enables it to significantly reduce the training time and testing time of the model. Due to the addition of a UKF filtering process at the end of the test process, the larger the test sample, the more obvious the speed advantage. In this test, the DST sequence lengths used for testing are about 14,000, 11,000 and 7,000, and the average test time of GRU, LSTM, and SRU–UKF models is 3.523, 3.548, and 2.554 s, respectively.

### 4.3 Robustness of the Proposed Method Against Different Drive Cycles

The abovementioned training and testing were all based on the CALCE dataset. In order to simulate the SOC estimation using the data from the actual measurement of lithium-ion battery discharge and verify the robustness of the proposed method, the SOC estimation performance under different driving cycles was verified using the dataset from the test bench. In this test, UDDS, DST, BJDST, and FUDS at 25°C were taken as training sets, while FTP, LA92, and US06 were taken as test sets. Figure 10 shows the performance of GRU, LSTM, and SRU–UKF models against FTP, LA92, and US06.

**FIGURE 10**. Performance of GRU, LSTM, and SRU–UKF models against three drive cycles: **(A)** FTP, **(B)** LA92, and **(C)** US06.

It is obvious from Figure 10 that curves fluctuate significantly in this dataset because the data quality obtained is affected by sensor and sampling error in the charge–discharge process, indicating the importance of data quality for data-driven methods. On the other hand, SRU–UKF can still obtain the decreasing trend of the electric quantity despite the continuous jitter during the full discharge process of the predicted result, and the estimated error of most sampling points is kept within 4%, except for the error increase caused by some noise.

Table 5 shows the MAE and RMSE against FTP, LA92, and US06. Compared with GRU and LSTM, the proposed SRU–UKF obtained lower RMSE on LA92 and US06 test sets. Although the RMSE of LSTM on FTP was 0.0292, the results of the three models showed little difference. This verifies the robustness of SRU–UKF under different drive cycles. In terms of the training speed of the model, it took 19 min for SRU to train 300 epochs, which was about one-fifth of the training time of LSTM, indicating that the proposed model had similar estimation accuracy to LSTM and the training time was greatly reduced. In addition, for sequences with a length between 10,000 and 15,000, the test time was about 2.7 s. Compared with classical LSTM, it saves one-third of the time.

## 5 Conclusion

Based on the data-driven SOC estimation method, this study proposed an SRU–UKF method for SOC estimation of lithium-ion batteries. The contribution of this work mainly focuses on three aspects. 1) A lightweight recursive unit SRU that balances model capacity and scalability is used to provide expressive recursion and support highly parallel implementation to facilitate the training of the depth model. 2) A UKF algorithm is added to the model to balance the noise interference and enhance the anti-interference of the model. 3) The estimation performance and robustness of the model under various ambient temperatures, initial SOC values, and driving cycles are completed through experiments.

The experimental results based on the CALCE dataset show that SRU–UKF can obtain better estimation accuracy under three temperatures and various initial SOC values. The RMSE is less than 0.018. Compared with LSTM, the training speed is increased by about five times and the prediction speed is increased by about 30%. The evaluation results of the dataset from the battery test bench show that SRU–UKF can be applied to SOC estimation under various driving cycles. For US06 driving cycle, RMSE is less than 0.016, and the average test time is about 2.7 s, which shows that the proposed SRU–UKF SOC estimation method obtains satisfactory estimation results for prediction speed and accuracy. For FTP, LA92, and US06 used for testing, RMSE is less than 0.034, indicating the robustness of the SRU–UKF model for driving cycles.

## Data Availability Statement

The original contributions presented in the study are included in the article/Supplementary Material; further inquiries can be directed to the corresponding author.

## Author Contributions

ZZ: writing—original draft preparation, data curation, and software. XZ: reviewing and editing. ZH: visualization and investigation. CZ: supervision. WS: software. MG: methodology. YS: validation.

## Funding

This work was supported by the National Key Research and Development Program of China (2020YFB1710600) and the Key Research and Development Program of Zhejiang Province (2021C01111).

## Conflict of Interest

WS was employed by Tianneng Battery Group Co., Ltd. YS was employed by Zhejiang Leapmotor Technology Co., Ltd.

The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

## Publisher’s Note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors, and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

## References

Bengio, Y., Simard, P., and Frasconi, P. (1994). Learning Long-Term Dependencies with Gradient Descent Is Difficult. *IEEE Trans. Neural Netw.* 5 (2), 157–166. doi:10.1109/72.279181

Chaoui, H., and Ibe-Ekeocha, C. C. (2017). State of Charge and State of Health Estimation for Lithium Batteries Using Recurrent Neural Networks. *IEEE Trans. Veh. Technol.* 66 (10), 8773–8783. doi:10.1109/tvt.2017.2715333

Chemali, E., Kollmeyer, P. J., Preindl, M., and Emadi, A. (2018). State-of-charge Estimation of Li-Ion Batteries Using Deep Neural Networks: A Machine Learning Approach. *J. Power Sources* 400, 242–255. doi:10.1016/j.jpowsour.2018.06.104

Chen, J., Ouyang, Q., Xu, C., and Su., H. (2018). Neural Network-Based State of Charge Observer Design for Lithium-Ion Batteries. *IEEE Trans. Contr. Syst. Technol.* 26 (1), 313–320. doi:10.1109/TCST.2017.2664726

Cho, K., Van merrienboer, B., Bahdanau, D., and Bengio, Y. (2014). On the Properties of Neural Machine Translation: Encoder-Decoder Approaches. Available at: https://arxiv.org/abs/1409.1259v2.

Cui, D., Xia, B., Zhang, R., Sun, Z., Lao, Z., Wang, W., et al. (2018). A Novel Intelligent Method for the State of Charge Estimation of Lithium-Ion Batteries Using a Discrete Wavelet Transform-Based Wavelet Neural Network. *Energies* 11, 995. doi:10.3390/en11040995

Dong, Z., Ji, X., Lai, C. S., Qi, D., and Zhou, G. (2022). *Memristor-Based Hierarchical Attention Network for Multimodal Affective Computing in Mental Health Monitoring*. IEEE Consumer Electronics Magazine

Dong, Z., Lai, C. S., Qi, D., Xu, Z., Li, C., and Duan, S. (2018). A General Memristor-Based Pulse Coupled Neural Network with Variable Linking Coefficient for Multi-Focus Image Fusion. *Neurocomputing* 308, 172–183. doi:10.1016/j.neucom.2018.04.066

Dong, Z., Lai, C. S., Zhang, Z., Qi, D., Gao, M., and Duan, S. (2021). Neuromorphic Extreme Learning Machines with Bimodal Memristive Synapses. *Neurocomputing* 453, 38–49. doi:10.1016/j.neucom.2021.04.049

Dong, Z., Qi, D., He, Y., Xu, Z., Hu, X., and Duan, S. (2018). Easily Cascaded Memristor-CMOS Hybrid Circuit for High-Efficiency Boolean Logic Implementation. *Int. J. Bifurc. Chaos* 28 (12), 1850149. doi:10.1142/s0218127418501493

Dong, Z., Sing Lai, C., He, Y., Qi, D., and Duan, S. (2019). Hybrid Dual-complementary Metal-Oxide-Semiconductor/Memristor Synapse-Based Neural Network with its Applications in Image Super-Resolution. *IET Circuits, Device. Syst.* 13 (8), 1241–1248. doi:10.1049/iet-cds.2018.5062

Hannan, M. A., Lipu, M. S. H., Hussain, A., and Mohamed, A. (2017). A Review of Lithium-Ion Battery State of Charge Estimation and Management System in Electric Vehicle Applications: Challenges and Recommendations. *Renew. Sustain. Energy Rev.* 78, 834–854. doi:10.1016/j.rser.2017.05.001

He, Z., Gao, M., Wang, C., Wang, L., and Liu, Y. (2013). Adaptive State of Charge Estimation for Li-Ion Batteries Based on an Unscented Kalman Filter with an Enhanced Battery Model. *Energies* 6 (8), 4134–4151. doi:10.3390/en6084134

Hentunen, A., Lehmuspelto, T., and Suomela, J. (2014). Time-Domain Parameter Extraction Method for Thévenin-Equivalent Circuit Battery Models. *IEEE Trans. Energy Convers.* 29 (3), 558–566. doi:10.1109/tec.2014.2318205

Hochreiter, S., and Schmidhuber, J. (1997). Long Short-Term Memory. *Neural Comput.* 9 (8), 1735–1780. doi:10.1162/neco.1997.9.8.1735

Hossain lipu, M. S., Hannan, M. A., Hussain, A., Saad, M. H., Ayob, A., and Uddin, M. N. (2019). Extreme Learning Machine Model for State-Of-Charge Estimation of Lithium-Ion Battery Using Gravitational Search Algorithm. *IEEE Trans. Ind. Appl.* 55 (4), 4225–4234. doi:10.1109/TIA.2019.2902532

Hu, X., Li, S. E., and Yang, Y. (2016). Advanced Machine Learning Approach for Lithium-Ion Battery State Estimation in Electric Vehicles. *IEEE Trans. Transp. Electrific.* 2 (2), 140–149. doi:10.1109/TTE.2015.2512237

Ji, X., Dong, Z., Lai, C. S., and Qi, D. (2022). A Brain-Inspired In-Memory Computing System for Neuronal Communication via Memristive Circuits. *IEEE Commun. Mag.* 60 (1), 100–106. doi:10.1109/mcom.001.21664

Lai, X., Zheng, Y., and Sun, T. (2018). A Comparative Study of Different Equivalent Circuit Models for Estimating State-Of-Charge of Lithium-Ion Batteries. *Electrochimica Acta* 259, 566–577. doi:10.1016/j.electacta.2017.10.153

Nemes, R., Ciornei, S., Ruba, M., Hedesiu, H., and Martis, C. (2019). *Modeling and Simulation of First-Order Li-Ion Battery Cell with Experimental Validation*. Cluj-Napoca, Romania: Institute of Electrical and Electronics Engineers Inc.

Pascanu, R., Mikolov, T., and Bengio, Y. (2013). “On the Difficulty of Training Recurrent Neural Networks,” in International Conference on Machine Learning, 1310

Rahimi-Eichi, H., Ojha, U., Baronti, F., and Chow, M. U. (2013). Battery Management System: An Overview of its Application in the Smart Grid and Electric Vehicles. *IEEE Ind. Electron. Mag.* 7, 4–16. doi:10.1109/mie.2013.2250351

Sepasi, S., Ghorbani, R., and Liaw, B. Y. (2014). A Novel On-Board State-of-Charge Estimation Method for Aged Li-Ion Batteries Based on Model Adaptive Extended Kalman Filter. *J. Power Sources* 245, 337–344. doi:10.1016/j.jpowsour.2013.06.108

Truchot, C., Dubarry, M., and Liaw, B. Y. (2014). State-of-charge Estimation and Uncertainty for Lithium-Ion Battery Strings. *Appl. Energy* 119, 218–227. doi:10.1016/j.apenergy.2013.12.046

Wang, W., Wang, X., Xiang, C., Wei, C., and Zhao, Y. (2018). Unscented Kalman Filter-Based Battery SOC Estimation and Peak Power Prediction Method for Power Distribution of Hybrid Electric Vehicles. *IEEE Access* 6, 35957–35965. doi:10.1109/ACCESS.2018.2850743

Yang, F., Li, W., Li, C., and Miao, Q. (2019). State-of-charge Estimation of Lithium-Ion Batteries Based on Gated Recurrent Neural Network. *Energy* 175, 66–75. doi:10.1016/j.energy.2019.03.059

Yang, F., Song, X., Xu, F., and Tsui, K.-L. (2019). State-of-Charge Estimation of Lithium-Ion Batteries via Long Short-Term Memory Network. *IEEE Access* 7 (7), 53792–53799. doi:10.1109/access.2019.2912803

Yang, F., Xing, Y., Wang, D., and Tsui, K.-L. (2016). A Comparative Study of Three Model-Based Algorithms for Estimating State-of-Charge of Lithium-Ion Batteries under a New Combined Dynamic Loading Profile. *Appl. Energy* 164, 387–399. doi:10.1016/j.apenergy.2015.11.072

Yong, J. Y., Ramachandaramurthy, V. K., Tan, K. M., and Mithulananthan, N. (2015). A Review on the State-of-The-Art Technologies of Electric Vehicle, its Impacts and Prospects. *Renew. Sustain. Energy Rev.* 49, 365–385. doi:10.1016/j.rser.2015.04.130

Zhang, F., Liu, G., Fang, L., and Wang, H. (2012). Estimation of Battery State of Charge with $H_{\infty}$ Observer: Applied to a Robot for Inspecting Power Transmission Lines. *IEEE Trans. Ind. Electron.* 59 (2), 1086–1095. doi:10.1109/TIE.2011.2159691

Zhang, K., Ma, J., Zhao, X., Zhang, D., and He, Y. (2019). State of Charge Estimation for Lithium Battery Based on Adaptively Weighting Cubature Particle Filter. *IEEE Access* 7, 166657–166666. doi:10.1109/access.2019.2953478

Keywords: state of charge, lithium-ion batteries, simple recurrent units, unscented Kalman filter, long short-term memory

Citation: Zhang Z, Zhang X, He Z, Zhu C, Song W, Gao M and Song Y (2022) State of Charge Estimation for Lithium-Ion Batteries Using Simple Recurrent Units and Unscented Kalman Filter. *Front. Energy Res.* 10:938467. doi: 10.3389/fenrg.2022.938467

Received: 07 May 2022; Accepted: 30 May 2022;

Published: 08 July 2022.

Edited by:

Xiaoshun Zhang, Northeastern University, ChinaCopyright © 2022 Zhang, Zhang, He, Zhu, Song, Gao and Song. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

*Correspondence: Mingyu Gao, mackgao@hdu.edu.cn