2024 Volume 92 Issue 2 Pages 027007
The voltage difference of battery pack is a very important index for the state evaluation of energy storage battery. When the voltage difference is too large inside the battery pack, it may cause a series of safety problems. By predicting the voltage difference of battery pack, potential dangerous situations can be detected as early as possible, and necessary measures can be taken to ensure the safety of the energy storage battery, so as to realize the reliability improvement, efficiency improvement, and safety guarantee of the energy storage system. Through the multi-step prediction for the voltage difference of the energy storage battery pack, the variation trend of the voltage difference can be predicted in advance, so as to warn the possible voltage difference over-limit fault. At present, there are many methods for multi-step prediction of time series data, but which one is most suitable for predicting the voltage difference of the energy storage battery pack is still lack of research. In this paper, the stationarity and correlation of energy storage battery pack’s voltage difference data are analyzed and processed, and different multi-step prediction algorithms are used to predict the voltage difference of energy storage battery pack. The prediction results generated by different models are compared and analyzed, and the most suitable model selection for predicting the voltage difference of energy storage battery pack is discussed.

Lithium-ion batteries are widely used in electrochemical energy storage systems and electric vehicles because of their high energy density, high voltage, long cycle life, low self-discharge rate, no memory effect and superior performance of relatively light weight. This allows lithium-ion batteries to provide greater energy storage capacity and higher power output while maintaining a long service life, making them ideal for electric vehicles and energy storage plants. Although there are some challenges, such as safety and cost, efforts are being made to address these issues as the technology continues to advance to further the development of lithium-ion batteries. The energy storage battery is generally composed of multiple battery packs, each battery pack is composed of multiple battery modules, and each module is composed of multiple battery cells connected in series.1–5 The voltage difference of energy storage battery pack studied in this paper is the difference between the highest voltage and the lowest voltage of all cells in a battery pack.6 The energy storage battery used for the analysis in this paper has 12 cells in each module and 18 modules in each pack. This is equivalent to 216 cells in each pack. The formula of voltage difference is given as follows:
| \begin{equation} \text{Voltage Difference} = \mathrm{U}_{\text{h}} - \mathrm{U}_{\text{l}} \end{equation} | (1) |
where Uh is the highest voltage of all cells in a energy storage battery pack and Ul is the lowest voltage of all cells in a energy storage battery pack.
Voltage difference is an important indicator of the state of the energy storage battery pack. When there is an excessive voltage difference inside the battery pack, it may cause a series of safety problems, such as battery overheating, battery damage, and even dangerous situations such as fire or explosion.7 By predicting the voltage difference, potentially dangerous situations can be detected early and necessary measures can be taken to ensure the safety of the battery. In addition, the voltage difference of energy storage battery pack can also reflect the health status of the entire battery. When the battery is aged or there is a fault, the voltage difference may appear abnormal. By regularly monitoring and predicting the voltage difference of the energy storage battery pack, the battery cells that need to be maintained or replaced can be identified to extend the battery life and improve the reliability of the system. The voltage difference of energy storage battery pack can also affect the performance of the energy storage system. When the voltage difference is too large, it may lead to energy loss and efficiency degradation. By predicting the voltage difference, measures can be taken to optimize the performance of the battery system, such as balancing the voltage of the battery cells to improve the efficiency of energy storage and energy release.8 By predicting the voltage difference, the battery can be prevented from overdischarging or overcharging, thereby preventing damage to the battery, extending battery life and improving the safety of the system. In energy storage systems, accurate voltage difference prediction can help optimize energy management strategies. For example, in solar or wind energy systems, predicting the battery pack voltage difference can help decide when to charge or discharge to maximize energy utilization.9–11
With the continuous development of machine learning in recent years, and the use of more and more sensors in the energy storage system, using the time series model to predict the voltage difference of the energy storage battery pack, so as to realize the early warning of the voltage difference over-limit fault, has shown great advantages. Through multi-step prediction of time series data, the change of the characteristics of the data in the future time period is found. At present, time series models have been widely used in the field of energy. For example, the safety warning of nuclear power plants, load forecasting, and the prediction of household electricity consumption can be seen in the application of time series models. At present, many different forecasting models have been developed for time series data. However, there is still no detailed exploration of which model is more suitable for the prediction of energy storage battery pack voltage difference. The research direction of this paper is to use different time series prediction models to predict the voltage difference of energy storage batteries, and to determine which model can generate the optimal voltage difference prediction results through various comparisons. The significance of choosing this direction for research is to determine whether more complex prediction models perform better in multi-step time series prediction. So far, there have been a variety of very sophisticated models to predict time series data, such as Autoregression (AR), Moving Average (MA), Auto-Regressive Moving Average (ARMA), Vector AutoRegression (VAR), etc. These models have been widely used in academia and industry for a long time. At the same time, there are also some newly developed time series models, such as LSTM neural network model and GRU neural network model based on deep learning. These models are more complex than traditional time series prediction models.
The data set in this paper is the real operating data of an energy storage station in China, and the operating condition is the peak regulation condition. One of the modules is selected for data acquisition. Data were collected from 13 : 36 on December 3, 2021 for a total of 262 consecutive days. In order to avoid generating a large number of redundant data, the data acquisition frequency is set to record the current voltage difference of energy storage battery pack every one hour, and the measurement unit of the voltage difference is milliVolt (mV). There are a total of 6293 data in the current data set, and the dimension is one dimension. By using these data, different models are used for single-dimensional multi-step prediction, so as to analyze and compare the prediction results of different models. Missing values are filled with the mean of the two nearest data points. At the same time, the voltage difference data of energy storage battery is divided into training data set and test data set, and the ratio is 7 : 3. Its time series plot of all voltage difference data is shown in the Fig. 1.

Time series diagram of all voltage difference data for the energy storage battery pack.
At the beginning of processing time series data, it is necessary to test the stationarity and correlation of time series data. The stationarity of data plays a very important role in prediction. Because most time series prediction models predict future data based on the past data, stable data has a decisive impact on the prediction accuracy of the model. If unstable time series data are used, the consistency as the basic condition of model prediction will not be established, so that the prediction of the model is no longer reliable.12 If there is a huge gap between the training data set and the test data set due to instability at the same time, then the model’s prediction results will have a large error with the actual results. Usually, the stationarity of the model is judged by observing the characteristics of the mean, variance, and distribution of the data. Commonly used observation methods include drawing, Augmented Dickey-Fuller Test (ADF test) and Kwiatkowski-Phillips-Schmidt-Shin test (KPSS test). Visualize data through plotting to observe data trends.
There are many types of drawings. It should be noted that the time series chart is a two-dimensional chart (usually a line chart), which is generally divided into a time axis (x-axis) and a data axis (y-axis). Visualizing the data is the easiest way to determine whether the data is stable. However, judging whether time series data is stable by the plots of visualizing data may be misled by your own intuition. Therefore, time series identification methods such as ADF test and KPSS test need to be used more systematically to judge whether the time series data is stable.
The ADF test is also called the Augmented Dickey-Fuller Test.13 The ADF test is the most widely used method of time series stationarity test, which determines whether the target time series has a unit root through statistical significance test, and then analyzes whether the series is stationary. In the significance test, the null hypothesis will first be set, that is, there is a unit root in the current time series and the current time series is not stable. And then the p-value and test statistic will be used to determine whether the null hypothesis should be rejected. The unit root is a property possessed by time series data, that is, Yt = Ø × Yt−1 + et, and Ø = 1. Among them, Yt is the value of time series data at time t, and et is the error at time t. When a unit root appears in a time series, it means that the current time series is not stationary, and the time series data may contain a stochastic trend. The pattern of such time series data is unpredictable, so using the ADF test to detect the unit root can detect whether the time series data is suitable for time series predictive modeling. The Augmented Dickey Fuller test is a new test derived from the Dickey Fuller test.14 The general Dickey Fuller test only calculate one lag data point of yt−1, that is, Δyt = yt − yt−1 = (Ø − 1) × yt−1 + ϵt. The Augmented Dickey Fuller test, on the other hand, includes multiple lags, called higher-order lags, to eliminate autocorrelation. However, both tests are significance tests and have the same assumptions.
The Kwiatkowski-Phillips-Schmidt-Shin test (KPSS test), like the ADF test, is also suitable for testing whether the current time series data is stable. However, the difference is that the null hypothesis of KPSS test in the significance test is that the time series data is stationary and there is no unit root. Therefore, the assumptions of the ADF test and the KPSS test are completely opposite.
Correlation of data is used to verify whether different columns are related to each other. When the direction in the dataset is the same for two columns, there is a dependency between them. By verifying the correlation of time series, we can know whether the data at the present time point is dependent on the data at the past time point.15 In this paper, by verifying whether the current time series data at time t is correlated with the data at time t − 1 or even more lagged time points, it is verified whether the lagged time point data can be used to predict the future time point. This feature is called autocorrelation, also known as serial correlation, that is, there is a correlation between the data at two different time points. The most common test used to test for autocorrelation is the Durbin-Watson test. Besides, there are also tests such as the Box-Pierce test that can be used to detect correlations in time series data. As well as testing the stationarity of the data, the autocorrelation of the data can also be tested visually. The most common ways to plot Autocorrelation are to plot Autocorrelation Function (ACF) and Partial Autocorrelation Function (PACF). ACF plots, also known as autocorrelograms, can show the magnitude of the correlation between the current data point and its past data points. The PACF plot, also known as a partial autocorrelogram, depicts the association between the residuals and past data points.
Durbin-Watson test is used to test the autocorrelation of model residuals.16
| \begin{equation} \mathrm{d} = \frac{\displaystyle\sum \nolimits_{\text{t} = 2}^{\text{T}}(\mathrm{e}_{\text{t}} - \mathrm{e}_{\text{t} - 1})^{2}}{\left(\displaystyle\sum\nolimits_{\text{t} = 1}^{\text{T}}\mathrm{e}_{\text{t}}^{2} \right)} \end{equation} | (2) |
where T is the number of samples in the time series, while et is the residual term.
The value range of the test is 0 to 4, where a value between 0 and 2 indicates positive autocorrelation in the time-series data, and a value between 2 and 4 indicates negative autocorrelation.
2.2.2 Validation of data propertiesNext, in the verification of the stationarity of the voltage difference data of the energy storage battery pack, the ADF test and KPSS test related to the stationarity of the data were carried out, and the following results were obtained. The results are shown in Table 1.
| T-Statistic | p-value | 1 %-level test critical value |
5 %-level test critical value |
10 %-level test critical value |
|
|---|---|---|---|---|---|
| ADF test |
−13.7 | 1.292 × 10−25 | −3.431 | −2.862 | −2.567 |
| KPSS test |
0.154 | 0.1 | 0.739 | 0.463 | 0.347 |
According to the above test data, it can be found that in the ADF test, the T-Statistic value of the ADF test is far less than the critical value at the 10 % level, and also far less than the critical value at the 5 % and 1 % levels. It can be seen that the original hypothesis of the ADF test, that there is a unit root in the voltage difference data of energy storage battery pack, does not hold true. At the same time, the p-value in the ADF test is also much less than 0.05, which also shows that the original hypothesis is not valid. In the KPSS test, the T-Statistic value is less than the critical values of 1 %, 5 % and 10 % at the same time.17,18 In addition, the p-value is greater than 0.05. Therefore, it adheres to the null hypothesis that there is no unit root in the voltage difference data of the energy storage battery pack. Through the above two tests, it is concluded that the voltage difference data of the energy storage battery pack used in this article meets the stability requirements.
In the detection of autocorrelation, this article first draws the ACF chart and PACF chart to detect the autocorrelation of the voltage difference data of the energy storage battery pack. And get the Figs. 2 and 3.

ACF chart according to voltage difference data of energy storage battery pack.

PACF chart according to voltage difference data of energy storage battery pack.
The ACF diagram is used to depict the relationship between the current time data points and the past time data points, that is, it describes the impact of current time data points on the predicted future time data points. The PACF diagram is different, which describes the influence of bias noise at past time data points on the current time data points, which excludes the effects that have been found by other data points between the past and current time data points.19 In addition, the model type suitable for the current data can be judged by whether the voltage difference data of energy storage battery pack is truncated or trailing in the ACF chart and PACF chart.
As can be seen from Fig. 2, the correlation coefficient in the ACF chart gradually decreases close to zero. It can be found that the voltage difference data of energy storage battery pack is trailing in the ACF chart. In Fig. 3, the correlation coefficient in the PACF chart suddenly drops sharply to zero, and the voltage difference data of energy storage battery pack is truncated in the PACF chart. According to the results of these two figures, combined with the data in Table 2, it can be found that the voltage difference time series data of energy storage battery pack is more suitable for using the autoregressive model to predict the voltage difference.20 (In order to highlight the comparison effect, a moving average model and an auto-regressive moving average model were also constructed for the voltage difference data of energy storage battery pack in this article). In addition, according to the data obtained from the PACF chart, it is possible to calculate how many lags need to be looked back in the autoregressive model to make the prediction, that is to find the order of p suitable for the autoregressive model. Based on the data of PACF chart in Fig. 3, it can be determined that p = 4 is the most suitable for the voltage difference data of energy storage battery pack to build autoregressive model.
| Model name | ACF chart | PACF chart |
|---|---|---|
| Autoregression | Trailing | Truncated |
| Moving Average | Truncated | Trailing |
| Auto-Regressive Moving Average | Trailing | Trailing |
In order to further prove the existence of autocorrelation in the voltage difference data of energy storage battery pack, this article uses the Durbin-Watson test for further testing.21,22 Through verification, it is concluded that the Durbin-Watson statistic of the voltage difference data of energy storage battery pack is 0.082, proving that there is the positive autocorrelation in the voltage difference time series data of energy storage battery pack.
In this section, five different multi-step prediction algorithms are used to predict the voltage difference of energy storage battery pack and output the corresponding prediction results. The five models are Autoregressive model, Moving Average model, Auto-Regressive Moving Average model, Long Short-Term Memory neural network, and Gated Recurrent neural network. In order to intuitively display the prediction results of the models, this paper uses two kinds of figures for display and explanation: The first kind of figure is the data points of the model for multi-step prediction and continuous backward prediction for 24 hours, that is, one data point is predicted every hour, and a total of 24 data points are predicted. The second kind of figure shows that the model makes a multi-step prediction for each data point in the test data set, which is used to test the accuracy of the prediction results of the models with different prediction step sizes. For each data point, the multi-step prediction is also a continuous backward prediction for the data points of 24 hours. Finally, the prediction results at the first, fourth, eighth, twelfth, sixteenth and twenty-fourth hour of multi-step prediction results for each data point are selected and statistically displayed in the figure.
In the second kind of figure, the meaning of “cycle” is that for the 1887 data points in the test data set, the models will make once prediction for each data point during model testing. For each prediction, it is recorded as a “cycle”. Furthermore, each data point in the test data set is compared as a true value with the corresponding prediction result. Then, the true value and the corresponding prediction result will be plotted in the figure, and the number of that cycle is used as the label of abscissa. Therefore, the numbers of “cycle” in the figure are in the following range: 1 ≤ cycle ≤ 1887.
3.1 Autoregressive model 3.1.1 The principle of autoregressive modelAutoregressive (AR) model is a widely used technique for forecasting of time series data.23 The autoregressive model uses the past value b to predict the future value of the feature. Through the formula, its’ principle can be understood as yt = b0 + b1 × yt−1 + et, where yt is the value of the time series data at time t, b0 is a constant, and the past value is determined by b1 × yt−1. b1 is also a constant term used to determine the weight of the past value yt−1 in determining the value of yt. And et represents the zero-mean white noise signal. Suppose the values of n past time data points are used to predict the data value at future time t. Then it can be expressed by the following Eq. 3:
| \begin{align} \mathrm{y}_{\text{t}} & = \mathrm{b}_{0} + \mathrm{b}_{1} \times \mathrm{y}_{\text{t} - 1} + \mathrm{b}_{2} \times \mathrm{y}_{\text{t} - 2} + \mathrm{b}_{3} \times \mathrm{y}_{\text{t} - 3} + \cdots\\ &\quad + \mathrm{b}_{\text{n}} \times \mathrm{y}_{\text{t} - \text{n}} + \mathrm{e}_{\text{t}} \end{align} | (3) |
Under normal circumstances, if the past data point is closer to the data point to be predicted, then the autoregressive model must meet the condition that the data is stationary. If the data used to predict cannot meet this condition, then the prediction of the autoregressive model will be inaccurate due to the instability of data, resulting in a huge gap between the prediction results and the actual values of data.
3.1.2 Training and prediction results of autoregressive modelIn this article, the autoregressive model uses single-dimensional data for multi-step prediction. The prediction principle is to use the recursive method to estimate the future energy storage battery pack voltage difference. The core idea is to use the results of previous predictions to make the next prediction. For example, the voltage difference data of energy storage battery pack yt at time t is predicted using the data of past five time points. yt = b0 + b1 × yt−1 + b2 × yt−2 + ⋯ + b5 × yt−5 + et. Then, use the obtained value of yt to calculate the value of the next data point yt+1. yt+1 = b0 + b1 × yt + b2 × yt−1 + ⋯ + b5 × yt−4 + et+1. By continuously using the generated predictions as new input data to predict the next new data point, the multi-step prediction of the future energy storage battery pack voltage difference is achieved.
However, using the recursive method will cause errors in the prediction results to accumulate. And with the increase of the number of prediction steps, the prediction results will become more and more inaccurate. Therefore, while using the recursive method, this paper also uses the moving window method for model training and prediction to reduce the cumulative error. The moving window algorithm refers to using the interstep method to select part of the data from the time series for prediction. After the model completes the prediction of the voltage difference data of energy storage battery pack in the current window, the window will be moved forward by one data point to allow a new data point to enter the window. At the same time, the window will move a data point that entered the window earliest out of the window to complete the new replacement of the data points in the window. By continuously moving the window, the model can traverse all data points in the time series to train and predict.24
In this article, we choose to use the past 5 lags, that is, 5 past time points, to predict the data value of future time points. Using 5 data points is equivalent to asking the model to use the data from the past 5 hours to make predictions for the next data point. In this article, the prediction strategy adopted is to predict one day’s data points backward, that is, the total data points of 24 hours for one data point per hour.
According to the prediction results shown in Fig. 4, it can be found that the autoregressive model can roughly predict the changing trend of energy storage battery pack voltage difference when predicting 24 data points backward. However, according to the results shown in Fig. 5, when the model predicts the whole test data set, 1887 data points, the model performs well in the first hour of prediction. But there are significant errors in the 12th, 16th, and 24th hour predictions. Even after using the sliding window, the model still has large errors.

Autoregressive model predicts backward 24 data points (hours) continuously.

The prediction results at the first, the fourth, the eighth, the twelfth, the sixteenth and the twenty-fourth hour of the autoregressive model.
Moving average (MA) model is very similar to autoregressive model, but the difference between the two models is that the moving average model relies on error terms at past time points to predict future data points.25 The formula is as follows in Eq. 4:
| \begin{equation} \mathrm{y}_{\text{t}} = \mu + \mathrm{e}_{\text{t}} + \theta_{1} \times \mathrm{e}_{\text{t} - 1} + \theta_{2} \times \mathrm{e}_{\text{t} - 2} + \cdots + \theta_{\text{q}} \times \mathrm{e}_{\text{t} - \text{q}} \end{equation} | (4) |
where μ represents the average value of voltage difference in the time series of energy storage battery pack voltage difference, et represents the error value of white noise signal at time t, and the parameter θq represents the proportion of error value in predicting future data points.
Like the autoregressive model, the moving average model also requires the stability of data.26 The data for training and prediction must have stable mean and variance.
3.2.2 Training and prediction results of moving average modelIn the process of training the moving average model, in order to avoid error accumulation, a moving window is also used to predict the voltage difference of the energy storage battery pack.27 As shown in Fig. 6, the moving average model’s predictions show large errors after the fifth hour. And its predicted results tend to be a straight line. In Fig. 7, the model’s predictions for 1887 samples of test set also prove the same conclusion as that appearing in Fig. 6. The predictions of the moving average model at the eighth, twelfth, sixteenth, and twenty-fourth hour all become a straight line. It can be seen that the error accumulation of the moving average model is more serious than that of the autoregressive model. Therefore, the moving average model is not suitable for predicting the voltage difference of energy storage batteries, and the same conclusion can be drawn from the data results obtained from the ACF and PACF charts.

Moving average model predicts backward 24 data points (hours) continuously.

The prediction results at the first, the fourth, the eighth, the twelfth, the sixteenth and the twenty-fourth hour of the moving average model.
The Auto-Regressive Moving Average (ARMA) model can be viewed as a combination of an autoregressive model and a moving average model. The auto-regressive moving average model, like the two time series models mentioned above, also has requirements for the stationarity of the time series data.28 Its formula is as follows in Eq. 5:
| \begin{equation} \mathrm{y}_{\text{t}} = \mathrm{b}_{0} + \sum (\mathrm{b}_{\text{i}} \times \mathrm{y}_{\text{t} - \text{i}}) + \mathrm{e}_{\text{t}} - \sum (\theta_{\text{i}} \times \mathrm{e}_{\text{t} - \text{i}}) \end{equation} | (5) |
where b0 is a constant in the model, and et represents the white noise error value at time t, yt representing the value of the data point at time t. The parameter bi and parameter θi represent the weight of the corresponding past data points in the autoregressive model and the weight of the error in the moving average model.
The auto-regressive moving average model uses both data values of past time points and the error terms of past time points to predict the data values of future time points.29
3.3.2 Training and prediction results of auto-regressive moving average modelLike the previous autoregressive model and moving average model, the auto-regressive moving average model is shown in Fig. 8. It can be seen that the auto-regressive moving average model can also predict the general trend of the energy storage battery pack voltage difference like the autoregressive model. However, like the previous moving average model, its prediction results at the 16th hour and 24th hour in Fig. 9 also show a straight line. Because this is a situation caused by the voltage difference data of energy storage battery pack not being suitable for the auto-regressive moving average model. However, because the auto-regressive moving average model is a combination of the autoregressive model and the moving average model, its prediction errors at the fourth and eighth hours are not as severe as that of the moving average model, but they are still higher than that of the autoregressive model.

Auto-regressive moving average model predicts backward 24 data points (hours) continuously.

The prediction results at the first, the fourth, the eighth, the twelfth, the sixteenth and the twenty-fourth hour of the auto-regressive moving average model.
Long short-term memory neural network, also widely known as LSTM neural network. This neural network is a newer model emerging in the field of deep learning. LSTM is a neural network derived from Recurrent Neural Network.30 General recurrent neural networks will have the problem of forgetting data or experience learned a long time ago during training. This is because the recurrent neural network uses a chain structure. This causes the recurrent neural network to forget what it has learned before over time. In order to overcome this problem, a gate mechanism is set up in the neural unit of the long short-term memory neural network. These three gates are called “forget gate”, “input gate”, and “output gate” respectively. This mechanism allows the LSTM neural network to overcome the forgetting problem of the recurrent neural network, allowing it to more effectively complete the prediction of time series models.31
The model construction steps are as follows:
Step 1: Forget gate (determine the cell state to forget).
| \begin{equation} \mathrm{f}_{\text{t}} = \sigma(\mathrm{W}_{\text{f}} \cdot [h_{\text{t} - 1},\mathrm{x}_{\text{t}}] + \mathrm{b}_{\text{f}}) \end{equation} | (6) |
Step 2: Input gate (determine the cell state to be stored).
| \begin{equation} \mathrm{i}_{\text{t}} = \sigma (\mathrm{W}_{\text{t}} \cdot [h_{\text{t} - 1},\mathrm{x}_{\text{t}}] + \mathrm{b}_{\text{i}}) \end{equation} | (7) |
| \begin{equation} \tilde{\mathrm{C}}_{\text{t}} = \tanh (\mathrm{W}_{\text{c}} \cdot [h_{\text{t}-1},\mathrm{x}_{\text{t}}] + \mathrm{b}_{\text{c}}) \end{equation} | (8) |
Step 3: Complete the updation of new cell state (update the cell state using the new stored cell state and the old cell state).
| \begin{equation} \mathrm{C}_{\text{t}} = \mathrm{f}_{\text{t}}*\mathrm{C}_{\text{t} - 1} + \mathrm{i}_{\text{t}}*\tilde{\mathrm{C}}_{\text{t}} \end{equation} | (9) |
Step 4: Output gate (according to the cell state obtained in the previous steps to perform the hidden state output).
| \begin{equation} \mathrm{o}_{\text{t}} = \sigma (\mathrm{W}_{0}[h_{\text{t} - 1},\mathrm{x}_{\text{t}}] + \mathrm{b}_{0}) \end{equation} | (10) |
| \begin{equation} h_{\text{t}} = \mathrm{o}_{\text{t}}*\tanh (\mathrm{C}_{\text{t}}) \end{equation} | (11) |
According to the above steps, the neural units of the LSTM neural network can retain important information learned for a long time in the past and avoid forgetting problems. In the Eqs. 6–11, ht−1 is the hidden state of the output of the previous neural network unit, and ht is the hidden state of the current neural network unit. xt is the input of the current neural network unit and Wt represents the weight of the current neural network unit. Ct−1 is the old cell state in the neural network unit, and $\tilde{\text{C}}_{\text{t}}$ is the cell state generated in the neural network unit that needs to be stored. Ct is the new cell state in the neural network unit.
3.4.2 Data and model structureSince this time it is necessary to use voltage difference data of energy storage battery pack to perform one-dimensional multi-step predictions of LSTM neural networks, it is necessary to perform structural transformation on the time series data. In order to allow the data to be smoothly input into the LSTM neural network, this article converts the data into (N, T, D) three-dimensional array format. Among them, N represents the total number of samples to be input, T represents the time step size of looking back in the past, and D represents the number of features in the training samples. After conversion, the voltage difference data of energy storage battery pack is converted to (6293, 24, 1). In order to facilitate comparison with previous models, the LSTM neural network is also set to look back 24 lags, that is, inputting 24 past data points to make predictions.
At the same time, in order to eliminate the influence of abnormal samples and allow the model to converge faster during the training process, this paper normalizes the data.32 Therefore, all voltage difference data of energy storage battery pack are mapped into the interval of 0 to 1.
As the number of hidden layers of the model changes, the model’s prediction of nonlinear data will also change. However, the relationship between the model’s prediction of data and the number of hidden layers is not a simple linear relationship, because it involves the characteristics of the data. Such issues require more discussion to draw further conclusions. Therefore, this article temporarily sets the structure of the model to three layers. The first layer of the model is the input layer, the second layer is the hidden layer, and the third layer is the output layer. The first and second layers are LSTM neural network layers, and the third layer is a fully connected layer. In addition, in order to prevent overfitting, a dropout layer is added between the first layer and the second layer of the model. In addition, in order to prevent the gradient explosion problem, the activation function of the output layer is set to the RELU activation function.
3.4.3 Training and prediction results of LSTM modelIn this model training, the sample size for training a batch of samples (batch size) is set to 16 samples. The learning rate is set to 0.01. Set the number of training epochs to 50. First, the number of prediction steps is set to 24, that is, 24 future data points (hours) are predicted backward. Moreover, during the training process, in order to make the model perform gradient descent more effectively, a dynamic learning rate is set in the model. When the training epochs exceeds 5, if the loss of the model’s test data set still does not decrease, the model will halve the learning rate in the next epoch. At the same time, during the training and prediction process, the model also uses a moving window to reduce the accumulation of prediction errors of the model.
After training, the LSTM neural network model predicts future voltage difference of energy storage battery pack and achieves the results shown in the Figs. 10 and 11.

LSTM model predicts backward 24 data points (hours) continuously.

The prediction results at the first, the fourth, the eighth, the twelfth, the sixteenth and the twenty-fourth hour of LSTM model.
Compared with the previous autoregressive model, moving average model, and auto-regressive moving average model. The long short-term memory (LSTM) neural network model can better predict the voltage difference data of energy storage battery pack in the next 24 hours. It can be seen from Fig. 10 that the LSTM model can predict more complex data situations, so as to better show the whole trend of the energy storage battery pack voltage difference data. In addition, through the prediction results of the entire test data set showed in Fig. 11, it is not difficult to see that the prediction results of the LSTM neural network on the twelfth, sixteenth, and twenty-fourth hours are much better than the previous three models.
3.5 Gated recurrent neural network 3.5.1 The principle of gated recurrent neural networkGated neural recurrent network, also known as GRU neural network for short. Like the LSTM neural network, the GRU neural network is also a neural network derived from the recurrent neural network. GRU also has a gate mechanism to control what data needs to be remembered and what data needs to be forgotten. The difference is that compared with the LSTM neural network, the structure of the neural unit of the GRU neural network is simpler.
The model construction steps are as follows:
Step 1: Update gate (find the update gate vector Zt based on the weight of the update gate).
| \begin{equation} \mathrm{Z}_{\text{t}} = \sigma (\mathrm{w}_{\text{xz}}^{\text{T}}\mathrm{x}_{\text{t}} + \mathrm{w}_{h\text{z}}^{\text{T}}h_{\text{t} - 1} + \mathrm{b}_{\text{z}}) \end{equation} | (12) |
Step 2: Reset gate (find the reset gate vector based on the weight of the reset gate):
| \begin{equation} \mathrm{r}_{\text{t}} = \sigma (\mathrm{w}_{\text{xr}}^{\text{T}}\mathrm{x}_{\text{t}} + \mathrm{w}_{h\text{r}}^{\text{T}}h_{\text{t} - 1} + \mathrm{b}_{\text{r}}) \end{equation} | (13) |
Part 3: Output gate (find the new hidden state based on the results generated by the update gate and reset gate):
| \begin{align} h_{\text{t}} & = (1 - \mathrm{Z}_{\text{t}}) \cdot h_{\text{t} - 1} + \mathrm{Z}_{\text{t}} \cdot \tanh (\mathrm{w}_{\text{x}h}^{\text{T}}\mathrm{x}_{\text{t}}\\ &\quad + \mathrm{w}_{hh}^{\text{T}}(\mathrm{r}_{\text{t}} \cdot h_{\text{t} - 1}) + \mathrm{b}_{h}) \end{align} | (14) |
In the Eqs. 12–14, the gated recurrent neural network calculates the current hidden state based on the update gate Zt and the reset gate rt. The value of Zt will determine the proportion of data in the neuron that needs to be updated. The larger the value of Zt, the greater the proportion of data that needs to be updated. So, 1 − Zt represents the proportion of old data in the neuron. The value of rt will determine the combination relationship of the current input data and the hidden layer of the previous neuron.33 And ht is the hidden state.
3.5.2 Data and model structureWhen constructing the GRU neural network, the same three-dimensional data structure as the LSTM neural network is used, that is, the data structure is converted into a (6293, 24, 1) format. Compared with the previous LSTM model, the structure of the model has no other structural changes except that the two LSTM neural unit layers are converted into GRU neural unit layers.
3.5.3 Training and prediction results of GRU modelThe training strategy of the GRU model is the same as that of the LSTM model. The amount of training epochs is 50 and the batch size is set to 16. The prediction results after training are as follows.
According to the results in Figs. 12 and 13, it can be seen that there is not much difference between the prediction results of the gated recurrent neural network and the prediction results of the long short-term memory neural network. Perhaps using a larger data set can better reflect the differences between the two neural network models. However, the prediction results of GRU model are still much better than those of the other three models (AR, MA, and ARMA).

GRU model predicts backward 24 data points (hours) continuously.

The prediction results at the first, the fourth, the eighth, the twelfth, the sixteenth and the twenty-fourth hour of GRU model.
In this paper, multiple models are used for multi-step prediction to test the prediction effect of each model. The step size of the prediction is 24 data points, and the time interval of each data point is 1 hour, that is, the voltage difference is predicted for the next 24 hours. The purpose of setting 24 data points is to better simulate the possibility of predicting the voltage difference over-limit failure of the energy storage battery pack one day in advance. According to the predicted voltage difference of the energy storage battery pack in the next 24 hours, it is compared with the true value in the original data set. Then calculate the Root Mean Square Error (RMSE), the R Squared Value, the Mean Absolute Error (MAE), and Median Absolute Error (MedAE). Therefore these four evaluation indicators are used to compare and evaluate each model.
The formula of RMSE is shown in Eq. 15:
| \begin{equation} \mathrm{RMSE} = \sqrt{\frac{1}{\mathrm{N}} \sum_{\text{i} = 1}^{\text{N}}(\mathrm{y}'_{\text{i}} - \mathrm{y}_{\text{i}})^{2}} \end{equation} | (15) |
In the calculation process of Root Mean Square Error (RMSE), N represents the number of samples in the energy storage battery pack voltage difference data set, $\mathrm{y}'_{\text{i}}$ represents the energy storage battery pack voltage difference predicted by the model, and yi represents the corresponding true value of energy storage battery pack voltage difference in the original data set.
The formula of R square value is shown in Eq. 16:
| \begin{equation} \mathrm{R}^{2} = 1 - \frac{\displaystyle\sum\nolimits_{\text{i}}(\widehat{\mathrm{y}_{\text{i}}} - \bar{\mathrm{y}})^{2}}{\displaystyle\sum\nolimits_{\text{i}}(\mathrm{y}_{\text{i}} - \bar{\mathrm{y}})^{2}} \end{equation} | (16) |
In the calculation process of R square value, $\widehat{y_{i}}$ represents the energy storage battery pack voltage difference predicted by the model, $\bar{y}$ represents the average value of the real energy storage battery pack voltage difference data, and yi represents the corresponding true value of energy storage battery pack voltage difference in the original data set.
The formula of MAE is shown in Eq. 17:
| \begin{equation} \mathrm{MAE} = \frac{1}{\mathrm{N}} \sum_{\text{i} = 1}^{\text{N}} | \mathrm{y}'_{\text{i}} - \mathrm{y}_{\text{i}} | \end{equation} | (17) |
In the calculation process of Mean Absolute Error (MAE), N represents the number of samples in the battery pack voltage difference data set, $\text{y}'_{\text{i}}$ represents the battery pack voltage difference predicted by the model, and yi represents the corresponding true value of energy storage battery pack voltage difference in the original data set.
The formula of MedAE is shown in Eq. 18:
| \begin{equation} \mathrm{MedAE} = \text{median}(|\mathrm{y}_{1} - \mathrm{y}'_{1}|, \ldots, |\mathrm{y}_{\text{i}} - \mathrm{y}'_{\text{i}}|, \ldots,|\mathrm{y}_{\text{N}} - \mathrm{y}'_{\text{N}}|) \end{equation} | (18) |
In the calculation process of Median Absolute Error (MedAE), N represents the number of samples in the battery pack voltage difference data set, $\text{y}'_{\text{i}}$ represents the battery pack voltage difference predicted by the model, and yi represents the corresponding true value of energy storage battery pack voltage difference in the original data set.
4.2 Summarize and compare the model resultsIn order to compare the multi-step prediction results obtained by each model, the prediction results at the first, the fourth, the eighth, the twelfth, the sixteenth, and the twenty-fourth hour from the results of 24-hour energy storage battery pack voltage difference predicted by each model are extracted for comparison. The autoregressive model, moving average model, auto-regressive moving average model, long short-term memory neural network model, and gated recurrent neural network model participating in the comparison will all use the same training and test data set. In order to accurately reflect the prediction effect of the models and compare the accuracy of the prediction results from different models through a unified index, this article uses Mean Absolute Error (MAE), Root Mean Square Error (RMSE), R Squared Value, and Median Absolute Error (MedAE) as unified evaluation indexes of the prediction results from different models. To facilitate comparison, the following indicators are uniformly reserved to three decimal places. The comparison results are shown in the Tables 3–6.
| k | GRU | LSTM | ARMA | MA | AR |
|---|---|---|---|---|---|
| 1 | 0.353 | 0.307 | 0.258 | 0.291 | 0.259 |
| 4 | 0.505 | 0.456 | 0.598 | 0.661 | 0.596 |
| 8 | 0.543 | 0.546 | 0.741 | 0.717 | 0.741 |
| 12 | 0.567 | 0.676 | 0.731 | 0.716 | 0.728 |
| 16 | 0.645 | 0.600 | 0.723 | 0.716 | 0.721 |
| 24 | 0.567 | 0.562 | 0.716 | 0.715 | 0.719 |
| k | GRU | LSTM | ARMA | MA | AR |
|---|---|---|---|---|---|
| 1 | 0.519 | 0.483 | 0.435 | 0.468 | 0.436 |
| 4 | 0.806 | 0.803 | 0.883 | 1.047 | 0.881 |
| 8 | 0.986 | 1.014 | 1.121 | 1.182 | 1.122 |
| 12 | 1.044 | 1.138 | 1.174 | 1.182 | 1.174 |
| 16 | 1.117 | 1.119 | 1.185 | 1.182 | 1.187 |
| 24 | 1.101 | 1.090 | 1.182 | 1.181 | 1.185 |
| k | GRU | LSTM | ARMA | MA | AR |
|---|---|---|---|---|---|
| 1 | 0.276 | 0.215 | 0.150 | 0.186 | 0.146 |
| 4 | 0.337 | 0.282 | 0.400 | 0.519 | 0.390 |
| 8 | 0.326 | 0.329 | 0.575 | 0.564 | 0.575 |
| 12 | 0.385 | 0.471 | 0.585 | 0.564 | 0.583 |
| 16 | 0.486 | 0.385 | 0.573 | 0.564 | 0.574 |
| 24 | 0.362 | 0.363 | 0.563 | 0.563 | 0.568 |
| k | GRU | LSTM | ARMA | MA | AR |
|---|---|---|---|---|---|
| 1 | 0.807 | 0.833 | 0.864 | 0.843 | 0.864 |
| 4 | 0.534 | 0.538 | 0.440 | 0.214 | 0.443 |
| 8 | 0.302 | 0.263 | 0.099 | −0.002 | 0.098 |
| 12 | 0.218 | 0.071 | 0.012 | −0.002 | 0.011 |
| 16 | 0.105 | 0.102 | −0.007 | −0.002 | −0.011 |
| 24 | 0.130 | 0.148 | −0.004 | −0.002 | −0.009 |
As can be seen from Tables 3 and 4, the gated recurrent neural network model and long short-term memory neural network model using deep learning technology have smaller MAE and RMSE than other models. Compared with the three regression models of AR model, MA model, and ARMA model, GRU and LSTM models have better performance under these two indicators in the prediction results except for the prediciton of the first hour. Especially in the prediction of the energy storage battery pack voltage difference in the fourth hour, the RMSE of the GRU and LSTM models were reduced by 8.51 % and 9.08 % compared with the AR model. At the same time, in Table 5, under the indicator of MAE, the GRU model and the LSTM model also perform better than other models in the prediction results except for the prediction of the first hour. In Fig. 14, the results of the five models are continuously predicted backward for 24 hours. By comparing with the target value curve, it can be seen that the overall prediction accuracy of the GRU model and the LSTM model are still higher than that of the other three models.

Comparison of prediction results of different models.
It is also worth noting that although the results of the AR model are better than those of the MA model, they are not significantly different from the results of the ARMA model. For example, in the first hour prediction results, the R squared values of the AR model and the ARMA model both are 0.864.
This paper studies the multi-step prediction of energy storage battery pack voltage difference based on the Unified Computing Operation Platform (UCOP). By comparing the GRU model, LSTM model, autoregressive model, moving average model, and auto-regressive moving average model, the most appropriate multi-step prediction model for the voltage difference of energy storage battery pack is analyzed. The following conclusions are drawn:
1. Through the prediction results of each model, it is found that the GRU model and LSTM model using deep learning are more suitable for multi-step prediction than other models in this article in predicting the voltage difference of energy storage batteries. Furthermore, for larger amounts of data, the prediction effect of the deep learning model will be better.
2. In terms of predicting the voltage difference of energy storage battery pack in the first hour, the autoregressive model, moving average model and auto-regressive moving average model have better performance than the neural network model using deep learning. These models are more suitable for single-step prediction and are more suitable for prediction when the amount of data is small.
3. According to the current data situation, there is no obvious gap between the GRU model and the LSTM model both using deep learning in predicting the voltage difference data of energy storage battery pack. Therefore, more voltage difference data of energy storage battery pack are needed for further verification. At the same time, there is not much difference between the autoregressive model and the autoregressive moving average model. This may be related to the P value of the PACF diagram, which needs to be further proven in future work.
The five prediction models studied in this article all show that the prediction error increases with the growth of the prediction step size. Even if sliding windows are used in autoregressive models and moving average models, the error accumulation in the predictions of these models are still very large. However, it is worth noting that the error growth of the model using deep learning neural networks is much less than other models. By expanding the training data set, it may be possible to further reduce the prediction error of the GRU and LSTM models. This point needs to be further explored in future work.
The data that support the findings of this study are openly available under the terms of the designated Creative Commons License in J-STAGE Data at https://doi.org/10.50892/data.electrochemistry.24821742.
Weisen Zhao: Data curation (Lead), Investigation (Lead), Methodology (Lead), Software (Lead), Validation (Lead), Visualization (Lead), Writing – original draft (Lead), Writing – review & editing (Lead)
Jinsong Wang: Conceptualization (Lead), Investigation (Lead), Methodology (Equal), Project administration (Lead), Software (Equal), Writing – original draft (Equal), Writing – review & editing (Equal)
Peng Liu: Software (Equal), Visualization (Equal)
Dazhong Wang: Investigation (Equal), Project administration (Equal), Supervision (Equal)
Lanfang Liu: Software (Supporting), Validation (Supporting), Visualization (Supporting), Writing – original draft (Supporting)
Xiangjun Li: Conceptualization (Lead), Funding acquisition (Lead), Project administration (Lead), Resources (Lead), Supervision (Lead), Writing – review & editing (Lead)
The authors declare no conflict of interest in the manuscript.
National Natural Science Foundation of China: 52077202
National Key Research and Development Program of China, Gigawatt Hour Level Lithium-ion Battery Energy Storage System Technology: 2021YFB2400100
National Key Research and Development Program of China, Integrated and Intelligent Management and Demonstration Application of Gigawatt Hour Level Energy Storage Power Station: 2021YFB2400105