A Software-Based Lifetime Prediction of Lithium Batteries Using Deep Learning for Wireless Networks

: The operation of Wireless Sensor Networks (WSNs) is constrained by a number of factors, one of the most important of which is available energy. Electrochemical batteries are commonly used to power sensor nodes. The operating temperature and discharge current values have a significant impact on the stored energy in battery devices. As a result, estimating their voltage/charge behavior over time, which are important factors for the implementation of energy-conscious policies, becomes challenging. To this end, this paper proposes a RUL prediction model based wireless networks that integrates the three internal states of battery capacity, impedance and temperature, and introduces a two-way long and short-term memory network to learn the time correlation of the three state data. The goal of this research is to develop a software-based method for estimating the state of charge and voltage of batteries in WSN nodes using a temperature-dependent analytical battery model. The equivalence between dropout technology and Bayesian variational inference technology is used to quantify the uncertainty of RUL prediction results, and the 95% confidence interval and probability density distribution of the prediction results are obtained, and the influence of different dropout rates on the prediction uncertainty is analyzed. Impact. The experiment shows that the comparison experiment of four different deep learning model frameworks and two internal state input schemes verifies the effectiveness of the learning method based on the two-way long and short-term memory network.

stored energy restrictions, is a well-known constraint for their deployment.
The key constraint is the sensor node's limited battery capacity, which limits its operating life. In this case, estimating the battery State of Charge (SoC) and lifetime based on the set of jobs performed by the nodes (e.g., data reception/transmission/processing tasks) is critical. When energy-aware algorithms must be implemented in sensor nodes, for example, this type of information is quite useful. Analytical battery models typically estimate battery activity using a set of differential equations. Typically, these models are used in WSN simulators to estimate the sensor nodes' operating behaviour before they are deployed. The present battery status is mathematically assessed in this context in order to install energy-aware algorithms and protocols. However, it is required to determine whether or not similar differential equations-based models can be implemented in real-world WSN nodes. It would also be required to examine the impact of using COTS low-power hardware to implement such mathematical models.
Battery RUL prediction can be achieved by predicting dynamic changes in capacity and impedance during operation of a lithium battery [4] .There are two main types of existing RUL prediction methods for lithium batteries: model-based and data-driven. Method [5] .The data-driven method does not require the establishment of a specific predictive model based on complex degradation mechanisms within the system, and uses monitoring data directly during the lithium battery charging and discharging process to use the battery performance degradation law. To fit. Next, we realize the RUL prediction of lithium batteries [6,7] .This is more universal than the model-based method.
As a field of data-driven methods, deep learning methods are widely used in the field of lithium battery RUL prediction with powerful data processing capabilities. Zhao etal. [8] predicted a decrease in the capacity of a lithium battery by combining a deep belief network and a support vector machine (support vector machine, SVM),and obtained the RUL of the battery by extrapolating the capacity. Reference [9] further considers the effects of discharge current and ambient temperature on capacity reduction during recycling of lithium batteries, and establishes a lithium battery capacity and RUL prediction model that takes into account the effects of external conditions. Zhou et al. [10] used an artificial neural network and SVM to predict battery temperature for RUL. Although literature [11] is also based on battery temperature, the established model is a multi-channel neural network capacity prediction model that comprehensively considers the role of charge and discharge terminal voltages and currents in battery performance degradation. increase. Based on reference [10] ,X et al. [12] incorporated the voltage into a stack-type denoising auto encoder to directly predict the RUL of a lithium battery. However, the above literature only builds an RUL prediction model for lithium batteries with one internal state (i.e. capacity or battery temperature), ignoring the interaction of various internal states during pool operation. Therefore, it is difficult to make full use of it. To the extent that it affects the accuracy of the prediction results of the life information contained in each state. In addition, when implementing RUL predictions for lithium batteries using deep learning methods, most literature does not quantify the uncertainty in the prediction results, or the quantified calculations are too complex.

Bi-LSTM Model
The LSTM network mainly includes three parts: forget gate, input gate and output gate, which are represented as In the formula, t x represents the input of the neuron at time t, t h represents the output at time t, t c represents the current neuron state, W and U are the weight matrix, b is the bias,  is the Sigmoid function, and e is the element-wise product. However, LSTMs only learn the effect of past states on the current state.Ignore the role of future states and do not take full advantage of time series the front and back dependencies of columns limit the ability to learn from the data. WhenBi-LSTM networks can learn from past and future states to the present at the same time the role of state greatly increases the dependence on the front and back of the model.Ability to learn long-term data. Bi-LSTM network is transferred layers and backward layers can process time series data individually and combine the two.The processing result of the layer is sent to the output layer at the same time, so you can make the best use of the past.And life information contained in future data. In light of this, this article use Bi-LSTM network for modeling and complete Bi-LSTM network equation (2) shows the output results of the forward and reverse processes of the network. The proposed model implements data correlation and timing dependency learning by stacking multiple Bi-LSTM networks to obtain the battery RUL through a fully connected and regression layer. In addition, this paper uses root mean square error (RMSE) and mean absolute error (MAE) to evaluate the performance of the model. The formula is: Among them, m is the total number of data, i y represents the real RUL of the lithium battery at the i-th moment, and º i y represents the RUL predicted value of the model at the i-th moment.

Quantification of Uncertainty of Forecast Results
The RUL prediction model based on the Bi-LSTM network has a high learning ability of ordinal data and can achieve higher prediction accuracy, but the prediction result of this model is only point estimation, not interval estimation, and the prediction is uncertain. It cannot reflect gender. result. Bayesian neural networks are introduced into the model to explain the uncertainty of the prediction results, and the parameters of the Bi-LSTM network are considered random variables that follow a particular distribution. X represents the training dataset and Y represents the corresponding actual RUL label.
Let the random variable   ,

Wb
  represents the model parameters. Where W and b represent the network weights and bias vectors, respectively.   p  represents the prior distribution of the parameter  .   q  represents the approximate variational distribution of   p  .Optimal approximation can be obtained by minimizing the Kullback-Leibler (KL) divergence between the two distributions. Given that finding KL divergence becomes more complex when the number of neurons is large, the objective function uses the equivalence between the dropout technique and Bayesian variational inference under 2L regularization conditions. It is optimized as follows: In formula (10), S is the subset of training samples, p is the number of subsets, H is the total number of model parameters, ) Y is the model output obtained by using dropout technology, and  is the attenuation coefficient of the regularization technology.
The Adam optimization method is often used to optimize the objective function (10).When the optimal approximate distribution of the posterior distribution of the model parameters is obtained, for the newly obtained input sample X  ,the distribution of the model RUL prediction result is: In the formula, º t  is the specific sampling value of   q   ,and T is the number of cyclic sampling.

Experiment and Analysis
This white paper examines the performance of the model using a batch dataset of commercially available lithium iron phosphate batteries from Professor Severson's research group in the United States. Some batteries in the dataset will fluctuate significantly due to instrument measurement errors and other reasons. In this paper, in order to establish an RUL prediction model with better prediction performance, we will eliminate anomalous battery data in the experiment and keep the battery in line with the changing tendency. Based on this data, the lithium battery RUL prediction model looks like this: It was built. The model trains the capacity, impedance, and temperature of the first 9 lithium batteries out of the remaining 10 batteries as model inputs and the remaining service cycle of the lithium batteries as output. First, the Min-Max method is used to normalize battery capacity, impedance, and temperature data, and sliding time window technology is used to generate fixed-length training samples. The length of the sliding time window is set to 10 and the step size is as follows: Set to 1 and elapse time Enter the battery data after the above preprocessing operation into the model for training.
Setting different network structures can make a difference in the predictive effect. To choose the right model for your prediction, you need to compare the performance of the model with various hyper parameters. After processing the original data with the sliding time window technology, 9216 data segments are retrieved, and each data segment has data for 10 charge and discharge cycles. By comparison, the learning rate of the model is set to 0.01, Bi-LSTM-1 is set to a double hidden layer with 64 neurons in each layer, and Bi-LSTM-2 is set to 64 single hidden layers. You can see that. The last fully connected layer contains 100 neurons, the training epoch is 10000, and each epoch contains 90 random data segments. At this point, the model has the lowest RMSE and the highest RUL prediction accuracy.
In this paper, in order to verify the effectiveness of the lithium battery RUL prediction method based on the equivalent Bayes deep learning algorithm and the Bi-LSTM network, No. Compare the predictive effects of 10 fixed Bi-LSTM network parameter models. Battery by the method of this paper. The actual RUL at the time of prediction is 802 cycles. After running the lithium battery for a period of time, the fixed model parameter method and the random parameter method are used to predict the cycle period during which the battery can operate effectively. Due to the randomness of the model parameters and the uniqueness of the prediction results in this paper, the RUL prediction values for 1,000 groups of lithium batteries can be obtained through 1,000 cycles of prediction, and each group contains 802 prediction cycles. If the weights and biases of the model are considered to follow the Gaussian mixture distribution and the Gaussian distribution, respectively, the final RUL prediction result also follows the Gaussian distribution. According to the 802 × 1000 RUL prediction results, you can get the results with the mean u and standard deviation  802 points of the prediction. The 95% confidence interval for the forecast result can be obtained using equation (12). Figure 3 shows the 95% confidence intervals for RUL prediction results at various dropout rates.
In the formula, n is the number of samples and M is the mean of the samples.  Fig.2 (a), it can be intuitively understood that the predicted average value of the random parameter model is close to the actual RUL value and the fitting effect is excellent. Figure2(b) shows two models with a dropout rate of 0.1. The average RMSE for the random and fixed parameter models is 10.497 and 12.383, respectively, and the two MAEs are 6.262 and 11.022, respectively, so the model with parameter randomness is more predictive. In addition, when using dropout technology to achieve equal quantification of RUL prediction outcome uncertainty, different dropout rates have different effects on RUL prediction outcome uncertainty. To find the difference as an example when the dropout rate is equal to 0.1,0.2, and 0.3, the difference in RUL prediction performance under the dropout rate is shown here.
Based on 1000 sets of RUL prediction values, the probability density distribution (PDF) of the prediction results can be obtained by using the kernel density estimation function in MATLAB. As shown in Figure3, as the dropout rate increases, the height of the RUL prediction result PDF at cycle 600 decreases, and the width increases accordingly. In other words, as the dropout rate increases, the uncertainty in the RUL forecast results increases. Uncertainty in RUL prediction results directly affects the rationality and scientificity of equipment integrity management activities. The smaller the uncertainty, the more accurate the equipment maintenance strategy will be. However, if you pursue too little uncertainty, you may not be able to reflect various uncertainties, such as measurement errors and individual differences in actual projects, in your forecast results. To ensure the accuracy of RUL predictions while taking into account the uncertainty of RUL prediction results, this paper selects dropout rates from sets  0,0.05,0. From the comparison results in Table 3, for all models, the method in this paper takes into account the effects of the three states of capacitance, impedance, and temperature in the battery degradation process on the battery RUL, with equivalent Bayesian fractional inference techniques. Modeling a Bi-LSTM network minimizes both the RMSE and MAE predicted by RUL. However, the predicted time of the method in this paper is not the shortest, mainly due to the complexity of the network structure and the number of input variables. The more complex the structure and the more factors that take into account the internal state, the longer the model will be predicted. In addition, compared to methods 1, 3, 5, and 7, methods 2, 4, 6, and 8 learn the temporal correlation of the two-way data during the prediction, resulting in smaller RMSE and MAE. .. The RMSE and MAE of methods 1 to 4 are larger than the RMSE and MAE of the corresponding methods 5 to 8, and the RUL prediction result obtained by incorporating multiple states such as battery impedance and temperature into the RUL prediction of the lithium battery is better. It further shows that it is accurate. In summary, the method in this paper has excellent predictive performance, considers the effects of various random factors, measures the uncertainty of RUL predictions, and provides a PDF of RUL prediction results for equipment maintenance activities. We can theoretically support you.

Conclusions and Future Work
Efficient and accurate prediction of the RUL of lithium batteries is playing an increasingly important role in the battery health management system. This paper proposes a lithium battery RUL prediction method that integrates multiple internal states. It uses battery capacity, impedance and temperature as the core to directly realize the prediction of three battery states to RUL. Finally, it is based on the Bayesian variational theory and dropout technology. Valuation quantifies the uncertainty of RUL's forecast results. The RUL prediction results in this paper are compared with the prediction results of four deep learning models introduced to verify the effectiveness and superiority of the method in this paper.
Estimating the battery lifetime is a difficult process since numerous elements, such as technology, operating temperature, and discharge current, can influence battery behaviour. Analytical battery models could help with this, resulting in findings that are near to reality. However, two issues may occur in the context of the WSN. To begin with, due to low processing capability, memory limits, and the high accuracy necessary to represent low changing analogue values, implementing complicated analytical models on low-capacity hardware platforms is a difficult undertaking. Second, the energy consumption of real-world nodes executing these types of analytical models will affect the network's lifespan. As a result, the effort necessary to estimate the network lifetime may diminish the network's lifetime. This paper proposes a RUL prediction model based wireless networks that integrates the three internal states of battery capacity, impedance and temperature, and introduces a two-way long and short-term memory network to learn the time correlation of the three state data. The goal of this research is to develop a software-based method for estimating the state of charge and voltage of batteries in WSN nodes using a temperature-dependent analytical battery model.

Data Availability
The datasets used during the current study are available from the corresponding author on reasonable request.

Conflicts of Interest
The author declares that there are no conflicts of interest.