Battery State of Charge Estimation Based on Composite Multiscale Wavelet Transform

: The traditional battery state of charge (SOC) estimation method, which is based on neural networks, directly uses terminal voltage and terminal current as the input data. Although it is convenient to implement, it produces a large estimation error when the current and voltage change drastically. To solve this problem, a new method, which uses a composite multiscale wavelet transform, is proposed to estimate the battery SOC. In the proposed method, a wavelet transform is applied to the input data, and this process obtains the approximate coefﬁcients and detail coefﬁcients of the input data at different scales. A neural network then uses these coefﬁcients as inputs to estimate the SOC. The experimental results show that the proposed method can improve the accuracy of the battery SOC estimation without changing the neural network structure or algorithm.


Introduction
The battery is the core component in an electric vehicle. A battery management system (BMS) can comprehensively manage battery characteristics, including charge and discharge patterns, temperature, the state of charge (SOC), battery equalization, and other functions. The estimation of the SOC is used to calculate the remaining battery capacity. An accurate estimation of the SOC is an important basis for the evaluation of other parameters and is vital for the safe and efficient use of batteries.
At present, the most commonly used battery SOC estimation methods are the amperehour method [1,2], open-circuit voltage method [3][4][5], internal resistance method [6], kalman filter method [7][8][9][10], and some data-driven methods, such as the Gaussian process regression method [11,12] and the support vector machine method [13]. The ampere-hour method is easy to implement, but errors can easily accumulate. The open-circuit voltage method is highly accurate, but in order to obtain an accurate open-circuit voltage, the battery needs to be in a static state. Because it is difficult to obtain the open-circuit voltage while the battery is in the working state, this method's applications are limited. The internal resistance method is very sensitive to external conditions such as current, voltage, and temperature, and it also produces large errors. The Kalman filter method can be combined with the traditional ampere-hour method, and its accuracy is high, but its performance depends on the accuracy of the particular battery model being used. The gaussian process regression method can quantify the estimation uncertainties, which enables a reliability assessment of the SOC estimation, but it relies on historical input data.
Because of the strong nonlinear processing ability of neural networks, many researchers have attempted to estimate the battery SOC using such networks. For example, Chen et al. employed a recurrent neural network to estimate the battery SOC [14], and Tian et al. utilized a deep neural network to identify the open-circuit voltage of the battery and estimate the SOC [15]. In addition, Zhang et al. used a radial basis function (RBF) neural network for battery SOC estimation [16]. Furthermore, Guo et al. studied the effects of the key parameters of neural network functions on the battery SOC estimation results [17]. Zhao et al. used the ant colony optimization algorithm to optimize the neural network to improve the estimation accuracy [18]. Feng et al. divided hidden layers into separate modules and employed a neural network to estimate the battery SOC [19]. Patel et al. investigated the impact of different battery working conditions and models on the accuracy of SOC estimation [20,21]. Finally, Wang et al. used a sliding window model for data processing and applied a neural network for battery SOC estimation [22].
In these studies, feedforward neural networks or neural networks with similar structures were used to estimate the battery SOC. By improving the structure and parameters of the neural network, a high estimation accuracy was achievable. However, the conclusions were primarily based on the constant current discharge data, which is not always an accurate representation of the actual discharge conditions. When using the drastically changing discharge data or the actual condition data, the estimation error of the feedforward neural network increases sharply. This is due to the fact that when the current changes drastically, the voltage cannot change synchronously with the current, generating a hysteresis. Consequently, when using only the current and voltage for the input of the neural network to estimate the battery SOC, there is a non-one-to-one mapping, which leads to an increase in the estimation error. This error cannot be mitigated by modifying the structure or parameters of the neural network. Moreover, some researchers began to use some kinds of time series neural networks to estimate battery SOC. However, the time series neural networks will have an over-fit phenomenon with the increase of the time delay parameter. To solve the above problems, this study proposes a multiscale wavelet transform for the input data, (i.e., terminal voltage and terminal current). The transformed data is used as the input for the neural network to estimate the SOC of the battery.
The main contributions of our work are as follows. First, an improved battery SOC estimation method based on a neural network is proposed. The proposed method preprocesses only the current and voltage without changing the original structure of the neural network. This method can be adapted into existing SOC estimation methods based on neural networks, and therefore it can be universally applied. Second, experiments are conducted to verify that the proposed method can improve the accuracy of the battery SOC estimation. Third, this method can overcome the disadvantages of the time series neural network. Forth, the accuracy of the battery SOC estimation for different transformation scales were tested in order to find the balance between accuracy and computation complexity.
The remainder of this paper is organized as follows. Section 2 provides the experimental platform and test data. Section 3 describes how we designed the experiment and processed the data with the wavelet transform. Section 4 presents the experimental data and analysis; in this section, the disadvantages of time series neural network are discussed as well. Section 5 presents the conclusion and future prospects.

Test Bench and Experimental Data
The test bench consisted of the test samples, a thermal chamber, a LANHECT-2001 battery testing system, and a computer, as shown in Figure 1. The magnitude of the current in the battery testing system ranged from 1 mA to 5000 mA, and the voltage magnitude ranged from 2 V to 15 V. The measurement accuracy for the current in the battery testing system was 0.1%RD ± 0.1%FS, and its voltage accuracy was 0.1%RD ± 0.1%FS. The RD means reading value, and the FS means full scale.
The test sample was a Samsung 18650 nickel-cobalt-manganese (NCM) three-element lithium-ion battery. The basic specifications are presented in Table 1.  To test the performance of the proposed algorithm, two discharge profiles were applied in the experiments: the urban dynamometer driving schedule (UDDS) and the dynamic stress test (DST). All experiments were conducted at a constant temperature of 20 • C, and the current, voltage, and corresponding SOC per second were recorded. The UDDS represents city driving conditions. It can be applied to any electric vehicle. In actual vehicles, the maximum current may exceed 300 A, which was difficult to imitate in the laboratory. In addition, in the neural network training and prediction steps, the input data needs to be normalized as 0 to 1. Therefore, the scale of the original current values will hardly affect the estimation results. In this paper, based on ADVISOR, in which the parameters of vehicles have been modified, the actual current values of UDDS were reduced to allow it to discharge all the power of the battery after 10 cycles, as shown in Figure 2. Each cycle of the DST discharge profile consisted of several large charge and discharge processes. The maximum discharge current was 6 A and the maximum charge current was 3 A. There was a long holding time between the discharge cycles, which was repeated until the SOC reached zero, as shown in Figure 3.
The state of health (SOH) of the battery will also affect the accuracy of the SOC estimation. However, according to some research, when the battery is in one life cycle, the change of the battery SOH can be ignored [23,24]. In addition, to avoid the influence of the SOH on the experiment, a new battery was used in each experiment. After five processes, the average value was used as the experiment data.

Composite Multiscale Wavelet Transform Method
In the traditional method of estimating the battery SOC using neural networks, the neural network accepts the current and voltage as input, and the output of the neural network is the SOC. When the current and voltage change significantly, the neural network produces a large estimation error. To improve the accuracy with which the battery SOC is estimated via neural networks, the composite multiscale wavelet transform was used to process the current and voltage data. The principle of the wavelet transform is as follows. If there is an input signal, its wavelet transform can be written as where is the mother wavelet function, * represents the complex conjugate of the mother wavelet, a 0 and b 0 are constants, and j, k ∈ R denote the scale and translation parameters, respectively. Setting a 0 and b 0 to 2 and 1, respectively, ψ j,k (t) can be expressed as: and DWT(j, k) can be expressed as By setting different values for the scale parameters and translation parameters, x(t) can be decomposed into low-frequency approximation parameters and high-frequency detail parameters in order to perform multi-resolution wavelet analysis. The approximate signal is composed of a scale function φ(t) and an approximate coefficient a j,k , and the detail signal is composed of a wavelet function ψ(t) and a detail coefficient d j,k . Based on these definitions, the J-layer discrete wavelet transform of the signal x(t) is given by: where N is the largest layer of decomposition, J is the current layer of decomposition, and J < N. After the signal x(t) is decomposed, it can be reconstructed using the inverse discrete wavelet transform. A single-layer decomposition diagram of the wavelet transform is shown in Figure 4, and the multilayer decomposition process is shown in Figure 5.  To simplify the calculation, the Haar wavelet was selected as the mother wavelet [25,26]. The φ and ψ values of the Haar wavelet are: and: respectively. The Haar wavelet can be generated using a linear transform, which has a fast calculation speed and is convenient for hardware implementation. The approximate coefficient A n of the n-th layer and n detail coefficients D 1 , ... D n are obtained by performing an n-level decomposition of the signal. As the scale value of the wavelet transform increases, the length of the transformed data also increases exponentially. When the signal data is decomposed by the third layer of the wavelet transform, at least eight data points are required; when the signal data is decomposed by the fifth layer of the wavelet transform, at least 32 data points are needed. In this case, there are insufficient data for processing in the initial stage, and the SOC data cannot be obtained immediately. Therefore, using only the decomposition of the n-th layer leads to a large delay in the battery SOC estimation.
To reduce this delay, a composite multiscale wavelet transform method is proposed. In this method, the wavelet transform of the signal from the first layer to the n-th layer is performed, and the approximate coefficients and detail coefficients obtained by the wavelet transform of each layer are recorded. Thus, the approximate parameters I(A 1 ), .., I(A n ) and detail parameters I(D 1 ), ..., I(D n ) at different scales are obtained, and the voltage is also processed to obtain V(A 1 ), ..., V(A n ) and V(D 1 ), ..., V(D n ). These data were used as the input to train the forward neural network and predict the battery SOC, as shown in Figure 6. The parameters of the neural network are listed in Table 2.

Experimental Results and Analysis
To train the neural network and test its prediction accuracy, the entire data sample was divided into a training set and a validation set. Seventy percent of the sample data points were randomly selected from the whole sample as the training set, and the rest were used as the validation set. Both the UDDS and DST discharge profiles were processed in this manner. Next, the current and voltage in the training and validation data sets from the UDDS and DST discharge profiles were processed using the wavelet transform introduced in Section 3. Then they were sent to the neural network for training and prediction. Each set of data and scale values were trained and predicted 100 times, and the neural network with the smallest error was used for comparison. When the composite multiscale wavelet transform method covered different maximum scales, the results of network training and prediction were also different. Therefore, four modes were used for comparison to test the performance of the proposed method. The first mode directly used current and voltage as inputs for the neural network, and the second model used the data processed by the composite multiscale wavelet transform with a maximum transformation scale of 1 as the input for the neural network. The maximum transformation scales used for processing data in the third and fourth modes were 2 and 3, respectively. The SOC estimation results and errors obtained using the UDDS discharge dataset are shown in Figures 7 and 8, respectively. The SOC estimation results and errors obtained using the DST discharge dataset are shown in Figures 9 and 10, respectively. The maximum error and mean squared error (MSE) results of the composite multiscale wavelet transformation are listed in Table 3.       Table 3 demonstrate that, as the maximum scale in the composite multiscale wavelet transform method increased, the accuracy of SOC estimation improved. Because this method requires current and historical measurement data, time-series neural networks that use the same principle were used for comparison [27][28][29]. Because the time delay parameters need to be assigned in temporal neural networks, the corresponding time delay parameter d was set as 2, 4, 8, and 16 according to the amount of data required for different levels of scale transformation in the composite multiscale wavelet transform method. When the UDDS and DST discharge data were used for the estimation, the results shown in Figures 11 and 12, respectively, were generated. The corresponding MSE and maximum errors are shown in Table 4. The figures show that when the DST dataset was used, the estimation error of the time-series neural network increased significantly as the time delay parameter increased. This is because when d is set to a large value, the data in the training set causes the time-series neural network to be more suitable for the time-series characteristics of the training set, resulting in over-fitting. When the validation set is used for prediction, the time-series features of the validation set are different to the time-series features of the training set, and the estimation error becomes very large. The method proposed in this study does not lead to this problem.
However, as the scale increased, the length of the input data increased, which resulted in a greater delay in the output of the neural network. Therefore, a better balance between the accuracy and the transformation scale was necessary. Figures 13 and 14 show the comparison between the maximum errors of the SOC estimation of the two discharge profiles using the composite multiscale wavelet transform method at different maximum scales. When the UDDS discharge data were used, the transformation scales of the current and voltage were 5, 6, and 7, and the maximum errors were 4.1%, 2.1%, and 1.1%, respectively. Therefore, we can use 5 as the maximum transformation scale. When the current and voltage are recorded once per second, the SOC begins to output 32 s after the battery begins to be used (the fifth power of 2 is 32). This delay is acceptable for general battery SOC estimation applications. However, if the scale is too large (i.e., a value greater than 6), the output delay of the SOC is too large to be used in practice.

Method Validation and Comparison Study
As the method proposed in this study pre-processes the input of the neural network, it is independent of the specific neural network algorithm and structure that is employed. In order to prove the above point, the previously mentioned experiments were repeated. In the new experiments, the RBF neural network was used to replace the back propagation (BP) neural network without changing the other settings. The SOC estimation results are shown in Figures 15 and 16. The maximum error and MSE are listed in Table 5. It can be seen from Figures 15 and 16 and Table 5 that when the BP neural network was replaced with the RBF neural network in the experiment, the SOC prediction accuracy was also improved. In addition, the Figures demonstrate that when the proposed method was used, the estimation error decreased significantly as the transformation scale increased. Therefore, it can be concluded that this method, as a data pre-processing method, can be adapted to various neural networks.   In addition, in order to validate the performance of the proposed method, three other pre-processing methods based on the average values, moving average filter, and finite impulse response were utilized to perform a comparative study [30]. The current and voltage data were processed using the wavelet transform (scale = 5) and the three mentioned pre-processing methods. Since the scale of wavelet transform was set to five, at least 32 samples were required; for comparison, the input data length used by the three pre-processing methods was set to 32, as well. The SOC estimation results are shown in Figures 17 and 18. The maximum error and MSE are listed in Table 6. It can be seen from Figures 17 and 18 and Table 6 that if the above preprocessing methods are applied to the same BP neural network, the SOC prediction accuracies of all neural networks increases. When UDDS profile was used, the maximum error and MSE were 0.86% and 4.1%, respectively. The corresponding minimum values of the other methods were 0.91% and 4.6%, respectively. When the DST profile was applied for testing, the maximum error and MSE were 0.7% and 5.5%, respectively, and the corresponding minimum values of the other methods were 0.92% and 6.7%, respectively. In summary, the results significantly indicate that the proposed method has the best prediction accuracy. Moreover, the methods for SOC estimation are usually computationally demanding. The computational time determines whether the method can be implemented in the work condition. The computational time of different methods are shown in Table 7. The training time of the proposed method is larger than the compared methods; however, according to Table 7, the estimation time of the proposed method is less than 0.1 s, which means it can be deployed to an actual SOC estimation scenario.

Conclusions
In this study, the terminal current and terminal voltage in a battery were transformed by a wavelet transform, the results of which were used as the input to a neutral network that estimated the SOC. The experimental results for two discharge profiles, UDDS and DST, showed that the proposed method can obtain a higher estimation accuracy for the battery SOC. However, this method still contains problems that require further investigation. First, the larger the scale, the more accurate the estimation results; therefore, the scale should be maximized. However, it is difficult to guarantee the real-time output of the battery SOC estimation at a larger scale. Thus, in subsequent studies, it will be necessary to find an optimal balance between delay and accuracy. In addition, the delay can be decreased by increasing the sampling frequency, but this will result in a greater load on the software and hardware of the battery test bench. Second, because the composite multiscale wavelet transform method proposed in this study pre-processes the input of the neural network, it is independent of the specific neural network algorithm and structure that is employed. In theory, our method can also improve the accuracy of battery SOC estimation when applied to other neural networks. In addition to the feedforward and RBF neural networks used in this study, other types or structures of neural networks should be utilized to verify the proposed algorithm and improve the accuracy of battery SOC estimation further. The SOH of a battery is one of the important parameters affecting the accuracy of SOC estimation. In future work, this parameter will also be used as input for battery SOC estimation. Finally, the Haar wavelet is easy to implement in hardware, and therefore, the method proposed in this study is expected to be implemented on the embedded platform of the ARM processor architecture in subsequent works.