Battery performance degradation trend prediction method and device and electronic equipment
Through the combination of polynomial fitting and multi-scale time convolutional neural network (TCN-GRU) model, the cumulative error problem in iterative prediction is solved, and the accurate prediction of battery performance decay trend is achieved, and the prediction accuracy is improved.
Patent Information
- Application Number
- CN202411380065.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-12-07
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-14
AI Technical Summary
Iterative prediction has cumulative error problems in battery performance decay trend prediction, resulting in low prediction accuracy and unacceptable errors.
Polynomial fitting is used to generate prediction data under large-scale conditions, and performance decay trend prediction is predicted under small-scale conditions by combining time convolutional neural network (TCN) and gated recurrent unit (GRU) models. (TCN-GRU) model achieves accurate prediction.
Fully digging out the hidden information behind the data, improving the accuracy of battery performance decay trend prediction, reducing error accumulation, and improving prediction accuracy.
Smart Images

Figure CN119310462A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of performance degradation trend prediction, and in particular to a battery performance degradation trend prediction method, device and electronic equipment. Background Art
[0002] As the core technology of the PHM system, the performance degradation trend prediction technology mainly predicts the performance degradation trend of the target object by analyzing the current workload of the target object, the status monitoring sensor information, etc., combined with the physical failure model and historical performance degradation data. The performance degradation trend prediction aims to predict the degradation trend or remaining life of the target object, and to reflect the current health status of the target object with the degradation trend. On the basis of obtaining the degradation trend of the target object, the scientific planning and management of maintenance activities can be completed by analyzing the degradation trend. Iterative prediction is a more commonly used prediction method in performance degradation trend prediction, which refers to continuing the prediction with the predicted result as input. Iterative prediction is to use the prediction result as input for subsequent prediction. However, since the prediction result itself has errors, the prediction result obtained by using it as input will also have errors. In this way, the errors continue to accumulate, making the prediction accuracy very low, and the prediction will also make the error unacceptable. Summary of the invention
[0003] In order to solve the above problems, the present invention provides a battery performance degradation trend prediction, device and electronic equipment.
[0004] One aspect of the present invention provides a method for predicting battery performance degradation trend, the method comprising:
[0005] Acquire existing performance decay trend data of the battery, and obtain predicted performance decay trend data under large-scale conditions by fitting the existing performance decay trend data of the battery through a polynomial;
[0006] Constructing a TCN-GRU model of a temporal convolutional neural network combined with a gated recurrent unit, and training the TCN-GRU model using the existing performance degradation trend data of the battery to obtain a trained TCN-GRU model;
[0007] The predicted performance decay trend data under small-scale conditions is obtained by inputting the performance decay trend data to be predicted into the trained TCN-GRU model for prediction;
[0008] The predicted performance degradation trend data under the large-scale condition and the predicted performance degradation trend data under the small-scale condition are used to obtain a battery performance degradation trend prediction result.
[0009] Furthermore, by fitting the existing performance degradation trend data of the battery through a polynomial, the predicted performance degradation trend data under large-scale conditions are obtained, including:
[0010] The existing performance degradation trend data of the battery is used as the original data, and numbers in the range of nm are cyclically selected to perform polynomial fitting on the original data to obtain fitting data corresponding to each number in the range of nm; wherein n and m are both positive integers, and n is less than m;
[0011] The mean square error value between the original data and the fitting data corresponding to each number in the nm range is calculated, and the number corresponding to the smallest mean square error value is used as the best polynomial fitting number, and the fitting data corresponding to the number is used as the predicted performance degradation trend data under large-scale conditions.
[0012] Furthermore, the TCN-GRU model includes a data input layer, a TCN layer, a reconstruction layer, a GRU layer and a fully connected layer;
[0013] The TCN layer is used to learn local area features in the performance decay trend data, and the GRU layer is used to learn long-term correlations in local area features in the performance decay trend data.
[0014] Further, using the predicted performance degradation trend data under the large-scale condition and the predicted performance degradation trend data under the small-scale condition, the battery performance degradation trend prediction result is obtained, including:
[0015] Calculating a first mean square error between the predicted performance degradation trend data under the large-scale condition and the existing performance degradation trend data of the battery;
[0016] Calculating a second mean square error between the predicted performance degradation trend data under the small-scale condition and the existing performance degradation trend data of the battery;
[0017] A battery performance degradation trend prediction result is obtained according to the first mean square error, the second mean square error, the predicted performance degradation trend data under the large-scale condition, and the predicted performance degradation trend data under the small-scale condition.
[0018] Further, according to the first mean square error, the second mean square error, the predicted performance degradation trend data under the large-scale condition, and the predicted performance degradation trend data under the small-scale condition, the battery performance degradation trend prediction result is obtained, including:
[0019]
[0020] Among them, MSE1 refers to the first mean square error; MSE2 refers to the second mean square error; y1 refers to the predicted performance degradation trend data under large-scale conditions; y2 refers to the predicted performance degradation trend data under small-scale conditions; y refers to the battery performance degradation trend prediction result.
[0021] Furthermore, constructing the TCN-GRU model includes:
[0022] Determine the shape of the input data, the number of convolutional layers, the size of the convolution kernel, the size of the dilation factor, the pooling method and other model parameters, as well as the shape of the output layer and the activation function to define the model structure;
[0023] After defining the model structure, select the appropriate optimizer, loss function, and evaluation metric to compile the TCN-GRU model;
[0024] The existing performance degradation trend data of the battery is divided into a training set and a test set and loaded into a memory, and the training set and the test set loaded into the memory are preprocessed and normalized.
[0025] Furthermore, the TCN-GRU model is trained using the existing performance degradation trend data of the battery, and the trained TCN-GRU model includes:
[0026] In each training cycle, the existing performance degradation trend data of the batteries in the training set are divided into several batches to train the TCN-GRU model, and the learning rate is adjusted during the training process;
[0027] After the training is completed, the test set is used to evaluate the performance of the TCN-GRU model on unknown data to obtain the trained TCN-GRU model.
[0028] Another aspect of the present invention provides a battery performance degradation trend prediction device, comprising:
[0029] A polynomial fitting module is used to obtain existing performance decay trend data of the battery, and to obtain predicted performance decay trend data under large-scale conditions by fitting the existing performance decay trend data of the battery through a polynomial.
[0030] A model building and training module, used to build a TCN-GRU model of a temporal convolutional neural network combined with a gated recurrent unit, and train the TCN-GRU model using the existing performance degradation trend data of the battery to obtain a trained TCN-GRU model;
[0031] The prediction module is used to obtain the predicted performance decay trend data under small-scale conditions by inputting the performance decay trend data to be predicted into the trained TCN-GRU model for prediction; and to obtain the battery performance decay trend prediction result by using the predicted performance decay trend data under large-scale conditions and the predicted performance decay trend data under small-scale conditions.
[0032] Furthermore, the TCN-GRU model includes a data input layer, a TCN layer, a reconstruction layer, a GRU layer and a fully connected layer; wherein the TCN layer is used to learn local area features in performance decay trend data, and the GRU layer is used to learn long-term correlations in local area features of performance decay trend data.
[0033] Another aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor; when the computer program is executed by the processor, the steps of the battery performance degradation trend prediction method as described above are implemented.
[0034] The battery performance degradation trend prediction method, device and electronic device provided in the embodiments of the present invention generate prediction data under large-scale conditions through polynomial fitting, and use the generated data in a temporal convolutional network to predict the performance degradation trend under small-scale conditions, which can fully mine the implicit information behind the data and ultimately achieve accurate prediction.
[0035] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only used for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. In the accompanying drawings:
[0037] Figure 1 A flowchart of a method for predicting battery performance degradation trend provided by an embodiment of the present invention;
[0038] Figure 2 A schematic diagram of a technology for predicting performance degradation trends based on a multi-scale temporal convolutional network provided by an embodiment of the present invention;
[0039] Figure 3 A schematic diagram of a performance degradation trend prediction process based on a multi-scale time convolutional neural network provided in an embodiment of the present invention;
[0040] Figure 4 A schematic diagram of determining the degree of a polynomial provided by an embodiment of the present invention;
[0041] Figure 5 A schematic diagram of the TCN-GRU model structure provided in an embodiment of the present invention;
[0042] Figure 6 A schematic diagram of a prediction result visualization provided by an embodiment of the present invention;
[0043] Figure 7 A schematic diagram showing a comparison of prediction errors of different methods provided by an embodiment of the present invention;
[0044] Figure 8 A flowchart of a method for predicting performance degradation trends based on hierarchical federated learning provided in an embodiment of the present invention;
[0045] Fig. 9 A schematic diagram of a hierarchical federated learning architecture provided for an embodiment of the present invention;
[0046] Fig.10 A schematic diagram of a battery performance degradation trend prediction device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0048] Those skilled in the art will appreciate that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined.
[0049] The present invention proposes a performance degradation trend prediction model based on a multi-scale temporal convolutional network. A TCN-GRU model is built using a temporal convolutional neural network (Temporal Convolutional Networks) combined with a gated recurrent unit (Gate Recurrent Unit). The data to be predicted is generated under large-scale conditions through polynomial fitting, and the generated data is used in the TCN-GRU model to predict the performance degradation trend under small-scale conditions, ultimately achieving accurate prediction.
[0050] Temporal Convolutional Network (TCN) is an improved convolutional neural network specifically designed for processing sequence data. It uses a series of techniques, including causal convolution and dilated convolution, to achieve excellent performance. Causal convolution is used to learn sequence models, and dilated convolution and residual modules are used to memorize historical information.
[0051] Causal convolution is the core component of TCN. Its value at time t in the previous layer only depends on the value at time t in the next layer and before. This design prevents TCN from seeing future data and can only rely on the observed sequence information for prediction. This strict time constraint model makes TCN highly adaptive when processing sequence data. In causal convolution, the more hidden layers there are, the longer the hidden layer information can be traced back. The causal convolution formula is as follows: filter F = (f1, f2, ..., f K ), sequence X = (x1, x2, …, x T ), in x t The causal convolution at is as follows.
[0052]
[0053] Dilated convolution injects holes into standard convolution to increase the receptive field. This technique solves the problem that the length of time modeling in traditional convolutional neural networks is limited by the size of the convolution kernel by controlling the dilation factor, that is, the number of intervals. By increasing the receptive field, TCN can capture longer dependencies without stacking many layers linearly. When applied, the dilation factor is generally increased by an exponential multiple of 2. In theory, increasing the convolution kernel k and the dilation factor d can increase the field of view. The dilated convolution formula is as follows: filter F = (f1, f2, ..., f K ), sequence X = (x1, x2, …, x T ), in x t The dilated convolution with a dilation factor of d is as follows.
[0054]
[0055] In TCN, when the number of convolution layers is too deep, the gradient is prone to vanishing. The problem of gradient vanishing can be solved by introducing residual connection. Residual connection is a special technique that directly aligns the feature map x of the previous layer with the convolution F(X) and then sums them. This operation can effectively solve the problem of gradient vanishing because it allows the network to directly learn the residual between input and output. In this way, TCN can better utilize historical information and avoid the problem of gradient vanishing.
[0056] GRU (Gated Recurrent Unit) is a variant of recurrent neural network (RNN), which is very suitable for time series analysis. It can also be used as a complex nonlinear unit to construct a larger deep network. It was first proposed by Cho et al. in 2014. It is a simplification of long-term and short-term neural networks, making it easier to train and implement. It solves the problem of gradient explosion and disappearance in RNN in back propagation through update gate and reset gate. The update gate is mainly used to control h t-1 The information of the current state is input at all times. The larger the value of the update gate is, the more state information is input at the previous moment. The function of the reset gate is mainly to control h t-1 The greater the value of the reset gate, the less the information is ignored. GRU controls the flow of information through the gating unit, thereby better capturing the long-term dependencies in time series data and improving the performance of the model.
[0057] In terms of application scenarios, GRU is widely used in various sequence data processing tasks, such as speech recognition, natural language processing (NLP), time series prediction, etc. For example, in speech recognition, GRU can be used to capture the time series features of speech signals to identify words or phrases in speech. In NLP, GRU can be used for tasks such as text classification, sentiment analysis, and machine translation to improve the performance of the model by capturing the time series information in the text.
[0058] In terms of model design, the causal convolution of the TCN model is used to extract performance degradation trend data to ensure data temporality. The dilated convolution achieves a strong ability to capture data features. The residual connection of the model can speed up the convergence of the model. The obtained features are then input into the GRU model for nonlinear fitting to ultimately achieve accurate prediction.
[0059] like Figure 2 As shown in the figure, firstly, a polynomial is used to fit the data to be predicted, and the prediction result is generated according to the prediction step size based on the overall trend of the data to be predicted. Then, a temporal convolutional network and a gated recurrent unit are introduced to determine the coverage of the small-scale sliding window based on the prediction step size. TCN is used to learn the local area features in the time series data, and GRU is used to process the long-term correlation in the time series data. Specifically, TCN takes the historical time series as input, extracts features through multiple convolutional layers and pooling layers, and then inputs these features into the GRU to learn the long-term correlation in the data, and finally outputs the predicted value of the future time point through a fully connected layer.
[0060] The present invention proposes a performance degradation trend prediction method based on a multi-scale temporal convolutional network. First, the prediction data is generated under large-scale conditions by polynomial fitting, and the generated data is used in the temporal convolutional network to predict the performance degradation trend under small-scale conditions. The overall trend of the performance degradation trend curve is grasped by polynomial fitting under large-scale conditions, and the local shape of the curve is learned by the temporal convolutional network under small-scale conditions. The combination of the two finally achieves accurate prediction. Figure 1 As shown, the present invention provides a method for predicting battery performance degradation trend, comprising the following steps:
[0061] Step S1: obtaining existing performance decay trend data of the battery, and fitting the existing performance decay trend data of the battery by a polynomial to obtain predicted performance decay trend data under large-scale conditions;
[0062] In an embodiment of the present invention, the predicted performance degradation trend data under large-scale conditions is obtained by fitting the existing performance degradation trend data of the battery by polynomials, including:
[0063] The existing performance degradation trend data of the battery is used as the original data, and numbers in the range of nm are cyclically selected to perform polynomial fitting on the original data to obtain fitting data corresponding to each number in the range of nm; wherein n and m are both positive integers, and n is less than m;
[0064] The mean square error value between the original data and the fitting data corresponding to each number in the nm range is calculated, and the number corresponding to the smallest mean square error value is used as the best polynomial fitting number, and the fitting data corresponding to the number is used as the predicted performance degradation trend data under large-scale conditions.
[0065] Step S2: constructing a TCN-GRU model of a temporal convolutional neural network combined with a gated recurrent unit, and training the TCN-GRU model using the existing performance degradation trend data of the battery to obtain a trained TCN-GRU model;
[0066] In an embodiment of the present invention, the TCN-GRU model includes a data input layer, a TCN layer, a reconstruction layer, a GRU layer and a fully connected layer; wherein the TCN layer is used to learn local area features in performance degradation trend data, and the GRU layer is used to learn long-term correlations in local area features of performance degradation trend data.
[0067] Step S3: inputting the performance degradation trend data to be predicted into the trained TCN-GRU model for prediction, thereby obtaining the predicted performance degradation trend data under small-scale conditions;
[0068] Step S4: using the predicted performance degradation trend data under the large-scale condition and the predicted performance degradation trend data under the small-scale condition to obtain a battery performance degradation trend prediction result.
[0069] In an embodiment of the present invention, using the predicted performance degradation trend data under the large-scale condition and the predicted performance degradation trend data under the small-scale condition, obtaining a battery performance degradation trend prediction result includes:
[0070] Calculating a first mean square error between the predicted performance degradation trend data under the large-scale condition and the existing performance degradation trend data of the battery;
[0071] Calculating a second mean square error between the predicted performance degradation trend data under the small-scale condition and the existing performance degradation trend data of the battery;
[0072] A battery performance degradation trend prediction result is obtained according to the first mean square error, the second mean square error, the predicted performance degradation trend data under the large-scale condition, and the predicted performance degradation trend data under the small-scale condition.
[0073] In an embodiment of the present invention, obtaining a battery performance degradation trend prediction result according to the first mean square error, the second mean square error, the predicted performance degradation trend data under the large-scale condition, and the predicted performance degradation trend data under the small-scale condition includes:
[0074]
[0075] Among them, MSE1 refers to the first mean square error; MSE2 refers to the second mean square error; y1 refers to the predicted performance degradation trend data under large-scale conditions; y2 refers to the predicted performance degradation trend data under small-scale conditions; y refers to the battery performance degradation trend prediction result.
[0076] In an embodiment of the present invention, constructing a TCN-GRU model includes:
[0077] Determine the shape of the input data, the number of convolutional layers, the size of the convolution kernel, the size of the dilation factor, the pooling method and other model parameters, as well as the shape of the output layer and the activation function to define the model structure;
[0078] After defining the model structure, select the appropriate optimizer, loss function, and evaluation metric to compile the TCN-GRU model;
[0079] The existing performance degradation trend data of the battery is divided into a training set and a test set and loaded into a memory, and the training set and the test set loaded into the memory are preprocessed and normalized.
[0080] In an embodiment of the present invention, the TCN-GRU model is trained using the existing performance degradation trend data of the battery, and the trained TCN-GRU model includes:
[0081] In each training cycle, the existing performance degradation trend data of the batteries in the training set are divided into several batches to train the TCN-GRU model, and the learning rate is adjusted during the training process;
[0082] After the training is completed, the test set is used to evaluate the performance of the TCN-GRU model on unknown data to obtain the trained TCN-GRU model.
[0083] The present invention provides a method for predicting battery performance degradation trend. A model is built using a temporal convolutional neural network combined with a gated recurrent unit. At the same time, polynomial fitting is used to generate data to be predicted under large-scale conditions. The generated data is used in the model to predict performance degradation trend under small-scale conditions, ultimately achieving accurate prediction.
[0084] For the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0085] In order to solve the problem of cumulative errors in iterative prediction, the performance degradation trend prediction based on multi-scale time convolutional neural network is studied. For a specific battery, the process of performance degradation trend prediction based on multi-scale time convolutional neural network is as follows: First, use a polynomial to fit all existing performance degradation trend data, and generate the data to be predicted by the fitted polynomial. Since the polynomial fitting utilizes all existing performance degradation trend data, it can better grasp the overall trend of the performance degradation curve. On this basis, a TCN-GRU prediction model is constructed, and the model is trained using the original performance degradation trend data. Finally, unlike traditional iterative prediction, the performance degradation trend prediction based on multi-scale time convolutional neural network proposed in this section uses data generated by polynomials for prediction. The input of the trained TCN-GRU model is generated by fragments of the original performance degradation trend data, so it can better learn the local trend of the performance degradation curve, such as Figure 3 As shown, the following steps are included:
[0086] (1) Fitting the original data. The number of polynomial fittings is initialized to 2. According to the fitting effect, the number of polynomial fittings is continuously updated. After the best number of polynomial fittings is determined, the fitted polynomial is used to generate the data to be predicted.
[0087] (2) Build and train the TCN-GRU model. The main steps are as follows: define the model structure, determine the model parameters such as the shape of the input data, the number of convolutional layers, the size of the convolution kernel, the size of the dilation factor, the pooling method, and the shape of the output layer and the activation function; compile the model, select the appropriate optimizer, loss function and evaluation index, and compile the model; load the dataset, load the training set and test set into memory, and perform preprocessing and normalization operations; train the model, and use the loaded dataset to train the model. In each training cycle, the training set is divided into several batches for training. During the training process, the learning rate can be adjusted as needed; evaluate the model, and use the test set to evaluate the performance of the model on unknown data.
[0088] (3) First, the predicted data under large-scale conditions generated by polynomial fitting is input into the TCN-GRU model for prediction to obtain the prediction results under small-scale conditions. Then, the mean square error MSE1 between the fitted polynomial and the original data is calculated, the original data is input into the TCN-GRU model for prediction and the mean square error MSE2 between the predicted results and the original data is calculated. Then, the predicted results y1 under large-scale conditions and the predicted results y2 under small-scale conditions are weighted based on the following formula to obtain the final predicted result y.
[0089]
[0090] Example
[0091] The present invention targets lithium batteries of different models at different temperatures. For each battery sample, the length is len, and the data of [len-500,len] is predicted based on the data of [0,len-500). The decay trend is predicted based on a multi-scale time convolutional neural network, and a long short-term memory network (LSTM) is used for control experiments to prove the effectiveness of the method.
[0092] The input and output of the model are constructed by trying different step intervals and data numbers many times, combined with the receptive field size of the multi-scale time convolutional neural network model, and finally the input and output of the model are set as follows according to the model training effect: Model input: Input data X = (x t-100 ,x t-80 ,x t-60 ,x t-40 ,x t-20) is a time window data with a shape of (1×5), containing 5 data points in total, and the step interval of the data points is 20. Model output: Output data Y = (x t ) is a time window data with a shape of (1×1) and contains 1 data point.
[0093] Since the length of the performance degradation trend data of each battery is different, in order to verify and evaluate the model output results, the present invention adopts the method of dividing each battery according to the same proportion, and divides the processed battery capacity degradation data into training set and test set in a ratio of 8:2. That is, the first 80% of each battery in chronological order is used as training data to construct training samples and labels, and the last 20% is used as the test set for evaluating and comparing the model.
[0094] Cycle through the range of [2,8] to fit the original data in the range of [0,len-500) with a polynomial, and calculate the mean square error between the original data and the fitted data. Perform the above operation on all lithium battery capacity degradation data, calculate the mean square error, and plot the polynomial degree and the error between the fitted data and the original data as shown in the figure. Figure 4 As shown, it can be seen that when the degree of the fitting polynomial is 4, the fitting effect is better.
[0095] The model design includes a data input layer, a TCN layer, a reconstruction layer, a GRU layer, and a fully connected layer. The causal convolution of the TCN layer is used to extract the features of the performance degradation trend data to ensure the time series of the data. The dilated convolution can achieve a strong capture of the data features. The residual connection of the model can speed up the convergence of the model. Then the obtained features are input into the GRU layer for nonlinear fitting. The TCN-GRU model structure is as follows: Figure 5 shown.
[0096] When comprehensively evaluating the effectiveness of the performance degradation trend prediction model, the model is usually evaluated and analyzed based on specific indicators. For classification and regression, the selected evaluation indicators are also different. For the performance degradation trend prediction task, the regression model evaluation index is usually selected. Currently, the commonly used loss functions for regression tasks are mainly mean squared error (MSE) and mean absolute error (MAE). The following formulas are the definitions of these two evaluation indicators:
[0097]
[0098] Where n is the number of samples, y i is the sample label value, Predict the results for the model.
[0099] The present invention constructs a TCN-GRU performance degradation trend prediction model. First, conventional data standardization, normalization, data smoothing and other methods are used to pre-process the data. Then, a training set and a test set are constructed and the training set is imported into the TCN-GRU model for training. The Adam optimization algorithm is applied to the model training, and the training set loss function and the test set error are recorded during the training process. In order to ensure the adequacy of the training, the model training cycle is 50 rounds, the batch size is 8, and the learning rate adopts a dynamic adjustment strategy, that is, every 25 epochs, the learning rate is reduced to 0.1 times the original.
[0100] For each battery sample, a multi-scale time convolutional neural network model is used for prediction, and the final prediction results are visualized and compared with the actual data. Two loss functions are used as evaluation indicators to analyze the model prediction results.
[0101] like Figure 6 As shown, it can be seen that the curve predicted by TCN-GRU is closest to the original curve, that is, the prediction effect is the best. Quantitatively speaking, the mean square error and mean absolute error of the prediction results based on lstm and the original data are 0.013099322 and 0.006560279, the mean square error and mean absolute error of the prediction results based on TCN-GRU and the original data are 0.000240782 and 0.005897239, and the mean square error and mean absolute error of the prediction results directly fitted by polynomial and the original data are 0.075922331 and 0.052270575. The error results are shown in Figure 7 By comparing the results, it can be found that the performance degradation trend prediction model based on the multi-scale time convolution network generates data that conforms to the overall performance degradation trend of the battery under large-scale conditions through polynomial fitting, and learns the local performance degradation trend of the battery under small-scale conditions through the TCN-GRU model. Finally, the two are combined to achieve accurate prediction.
[0102] The present invention proposes a performance degradation trend prediction technology based on a multi-scale time convolutional network. Taking into account the cumulative error problem existing in iterative prediction, the prediction data is generated under large-scale conditions through polynomial fitting, and the generated data is used to predict the performance degradation trend under small-scale conditions in the time convolutional network, ultimately achieving accurate prediction.
[0103] In the case analysis part, the lithium battery data set of a new energy company is used to verify and analyze the performance degradation trend prediction technology based on multi-scale time convolutional network proposed in the present invention. The performance degradation trend prediction technology based on multi-scale time convolutional network proposed in the present invention can fully mine the implicit information behind the data and achieve accurate prediction.
[0104] The present invention also introduces a hierarchical federated learning architecture, such as Figure 8 As shown in the figure, a hierarchical federated learning architecture is introduced, which includes local servers, edge servers, and cloud servers from bottom to top. The participants are divided based on the improved K-medoids federated grouping technology, and the corresponding relationship between the local server and the edge server is determined according to the grouping result. The local server trains the model locally with local data, and the edge server receives the local model parameters for preliminary aggregation and uploads the results to the cloud server. The cloud server aggregates the edge server model parameters and sends the results to the edge server. The edge server then sends the model parameters to the local server to update the model. It specifically includes: constructing a local server, an edge server, and a cloud server from bottom to top for battery performance. A hierarchical federated learning architecture for predicting degradation trends; obtaining battery capacity degradation data stored on each local server, and grouping the local servers using the improved K-medoids-based federated grouping technology and the battery capacity degradation data stored on each local server to determine the corresponding relationship between edge servers and local servers; during the training of the hierarchical federated learning architecture using the battery capacity degradation data stored on each local server, the hierarchical federated learning architecture is trained in combination with the model aggregation strategy and the fallback update strategy to obtain the trained hierarchical federated learning architecture; based on the trained hierarchical federated learning architecture, the predicted battery performance degradation trend is predicted. Wherein, the battery capacity degradation data is battery capacity degradation data of different models, different temperatures and different formulas.
[0105] The local servers are grouped using the improved K-medoids-based federated grouping technology and the battery capacity degradation data stored on each local server to determine the corresponding relationship between the edge server and the local server, including: using the elbow method to determine the optimal clustering number of all battery capacity degradation data, and using the angle cosine distance as the distance metric in the K-Medoids clustering algorithm, and combining the optimal clustering number to obtain the improved K-Medoids clustering algorithm; based on the improved K-Medoids clustering algorithm, the battery capacity degradation data stored on each local server are grouped so that batteries with similar battery capacity degradation curves are grouped; at least one local server storing similar battery capacity degradation curves is established with the edge server to determine the corresponding relationship between the edge server and the local server.
[0106] The model aggregation strategy includes: each edge server calculates the average loss of its corresponding local server models, and uses adaptive weights to calculate the weight coefficient of each edge server model; in the cloud server, each edge server model parameter is weighted and aggregated based on the adaptive weights to obtain the global model parameters of the cloud server.
[0107] The weight coefficients of each edge server model calculated using adaptive weights include:
[0108]
[0109] Where W[k] represents the weight coefficient, represents the average loss of the local server model of client k; n represents the number of clients.
[0110] The cloud server performs weighted aggregation of each edge server model parameter based on the adaptive weight to obtain the global model parameters of the cloud server, including:
[0111]
[0112] Among them, GM represents the global model, N k Denotes the local dataset D of client k k The size of N represents the size of the entire data set, M k Represents the local server model of client k.
[0113] The rollback update strategy includes: setting a rollback window of size n on each local server to record the weight parameters of the local model in n updates; if the loss of the local model continues to increase in n updates, the local model is rolled back to the state before n rounds of updates according to the weight parameters of the model in the rollback window; if the loss of the local model does not continue to increase in n updates, then after each update, the first element in the rollback window is discarded, and the local model weight is added at the end of the rollback window.
[0114] During the training of the hierarchical federated learning architecture using the battery capacity degradation data stored on each local server, the local server trains the model locally using local data, the edge server receives the local model parameters for preliminary aggregation and uploads the results to the cloud server, the cloud server aggregates the edge server model parameters and sends the results to the edge server, and the edge server then sends the model parameters to the local server for updating the model.
[0115] Introducing a hierarchical federated learning architecture, such as Figure 8 Specifically, the process is as follows:
[0116] (81) Federated grouping: All local servers participating in hierarchical federated learning are numbered, and the data of the local servers is encrypted and handed over to the grouping server to group the local servers based on the improved K-medoids federated grouping technology to determine the number of edge servers and their corresponding relationships.
[0117] (82) Initialize the global model: The cloud server generates the model initialization parameters, which are the learning rate, the number of local training iterations on the local server, and the number of iterations on the edge server, and then broadcasts them.
[0118] (83) Sending down global model parameters: The edge server receives the global model parameters from the cloud server and further sends the global model parameters to the local server.
[0119] (84) Train the local model and upload model parameters: The local server uses local data to train the local model and uploads the local model parameters to the edge server.
[0120] (85) Collect model loss and upload model loss and parameters: The edge server collects model loss and model parameters and uploads them to the cloud server for aggregation.
[0121] (86) Update global model: The cloud server updates the global model parameters and broadcasts them to the edge servers again.
[0122] (87) Sending updated model parameters: The edge server sends updated global model parameters to the local server.
[0123] (88) Update local model: The local server updates the local model based on the global model parameters sent to complete a round of training.
[0124] (89) The above process is repeated until the specified number of cycles is reached or the model loss reaches a specified range.
[0125] Prediction model aggregation strategy and fallback update strategy
[0126] In multiple scenarios of collaborative prediction of battery degradation trends, model aggregation strategy and backoff update strategy are designed to improve the model convergence efficiency and model accuracy of hierarchical federated learning.
[0127] The classic federated average aggregation algorithm is as follows, where GM represents the global model and N k Denotes the local dataset D of client k k The size of N represents the size of the entire data set, M k Represents the local model of client k. It can be seen that the classic federated average aggregation algorithm only considers the impact of the client dataset size on the global model, and ignores the impact of the client model effect on the global model.
[0128]
[0129] Based on the above problems, the model aggregation strategy collects the average loss of the local model on the edge server, and then uses the adaptive weight calculation formula to calculate the weight coefficient of each edge model. The cloud server performs weighted aggregation of the edge server model parameters based on the adaptive weight to obtain the cloud server model parameters, such as Fig. 9 shown.
[0130]
[0131] When the edge server sends model parameters to the local server, there is a situation where the sent model parameters are not applicable to the local server, resulting in low model convergence efficiency and poor model effect of the local server. To address this problem, a rollback update strategy is designed. The rollback update strategy is to set a rollback window of size n on each local server to record the weight parameters of the local model in n updates. If it is found that the loss of the local model continues to rise in n updates, it means that these n updates are not applicable to the local model. Then, according to the weight parameters of the model in the rollback window, the local model is rolled back to the state before n rounds of updates. If it is found that the loss of the local model does not continue to rise in n updates, then after each update, the first element in the rollback window is discarded, and the local model weight is added at the end of the rollback window.
[0132] Incremental learning means that a learning system can continuously learn new knowledge from new samples and can preserve most of the previously learned knowledge. This learning method is very similar to the human learning model, because humans learn and receive new things every day during their growth process. Learning is gradual, and humans generally do not forget the knowledge they have learned. Incremental learning also plays an important role in machine learning. The cost of modifying a trained system is usually lower than retraining a system. The idea of incremental learning can be described as: whenever new data is added, there is no need to rebuild the knowledge base, but on the basis of the original knowledge base, only the new information brought by the new data is incrementally updated to the knowledge base.
[0133] Incremental learning can be divided into model structure-based methods, replay-based methods, and regularization-based methods. The model structure-based method is to continuously modify the network structure with incremental learning. For example, a new model structure is added to the incremental task, so that the old task can be maintained through the old model weights, and the newly added model structure adapts to the new task; the replay-based method refers to reusing or resampling previously learned samples when learning new tasks, so that these samples can be used again in the new learning process. The main purpose of this method is to use the knowledge that has been learned to help learn new tasks; the regularization-based method can help the model maintain good performance on the original task while adapting to new tasks. This method is simple to implement and can effectively improve model performance. It is widely used in practice. This section introduces regularization terms in the loss function of the local model to perform incremental learning, so that the model can maintain its memory of old data while learning new data, thereby continuously improving the model effect. As shown in the following formula, Represents the loss value of the local model on the new data in the e-th iteration, Represents the loss value of the local model on the old data in the e-th iteration.
[0134]
[0135] In summary, the performance degradation trend prediction method based on dynamic grouping and hierarchical federated learning first introduces a hierarchical federated learning architecture, and applies the federated grouping technology based on improved K-medoids to the division of local servers and the correspondence between local servers and edge servers in the hierarchical federated learning architecture. Then, the model aggregation strategy and fallback update strategy in the hierarchical federated learning architecture are studied. Further, considering the continuous growth of data, regularized incremental learning is introduced to improve the prediction effect of the model.
[0136] In an embodiment of the present invention, the TCN-GRU model includes a data input layer, a TCN layer, a reconstruction layer, a GRU layer and a fully connected layer; wherein the TCN layer is used to learn local area features in performance degradation trend data, and the GRU layer is used to learn long-term correlations in local area features of performance degradation trend data.
[0137] The present invention is based on the improved K-medoids federated grouping technology. By dividing the data with high similarity into a group, the weight divergence phenomenon caused by large data differences is reduced, and the purpose of stabilizing the convergence direction of the global model is achieved. Furthermore, based on the improved K-medoids federated grouping technology, considering the large differences in the decay data of multi-formula batteries, directly using these batteries in federated learning is likely to cause the global model to produce weight divergence, which will greatly slow down the training speed of the model and reduce the accuracy of the model. In view of the model weight divergence problem caused by directly applying federated learning to the decay data of multi-formula batteries, the similarity of the decay data of multi-formula batteries is calculated, and multiple batteries with correlation are clustered based on the similarity, so as to improve the model convergence consistency of the same group of batteries, thereby reducing the gradient oscillation and weight divergence problems caused by the large differences in the data of the participants, and improving the training accuracy and convergence efficiency of federated learning.
[0138] Specifically, the elbow method is first used to determine the optimal number of clusters. On this basis, the dynamic time warping distance, Euclidean distance and angle cosine distance are used to measure the similarity of the performance trend decay curves of different lithium batteries based on the K-medoids algorithm, and cluster analysis is performed according to the determined optimal number of clusters.
[0139] The core indicator of the elbow method is SSE (sum of the squared errors), which measures the quality of clustering effect. i is the i-th cluster, p is C i The sample points in m i It is C i The centroid of (the mean of all samples in Ci). The core idea of the elbow method is: as the number of clusters k increases, the sample division will be more refined, the degree of aggregation of each cluster will gradually increase, and the SSE will gradually decrease. When k is less than the actual number of clusters, increasing k will greatly increase the degree of aggregation of each cluster, and the decrease in SSE will be large. When k reaches the actual number of clusters, the return on the degree of aggregation obtained by increasing k will rapidly decrease, and the decrease in SSE will drop sharply, and then tend to be flat as the k value continues to increase. Therefore, the relationship graph between SSE and k is in the shape of an elbow, and the k value corresponding to this elbow is the actual number of clusters of the data, which is why this method is called the elbow method. The elbow method is used to determine the optimal number of clusters for lithium battery data. According to the rule of the elbow method, the k corresponding to the elbow of the relationship graph between the number of clusters and the average degree of distortion is the optimal number of clusters. The calculation formula is shown below.
[0140]
[0141] Another embodiment of the present invention further provides a device for predicting a battery performance degradation trend, the device comprising a functional module for implementing the battery performance degradation trend prediction method as described in any one of the above items. Fig.10 The schematic diagram of the structure of a battery performance degradation trend prediction device provided by an embodiment of the present invention is shown schematically. Fig.10 , specifically including a polynomial fitting module 201, a model building and training module 202 and a prediction module 203, wherein:
[0142] A polynomial fitting module 201 is used to obtain existing performance degradation trend data of the battery, and to obtain predicted performance degradation trend data under large-scale conditions by fitting the existing performance degradation trend data of the battery through a polynomial.
[0143] A model building and training module 202 is used to build a TCN-GRU model of a temporal convolutional neural network combined with a gated recurrent unit, and train the TCN-GRU model using the existing performance degradation trend data of the battery to obtain a trained TCN-GRU model;
[0144] The prediction module 203 is used to obtain the predicted performance degradation trend data under small-scale conditions by inputting the performance degradation trend data to be predicted into the trained TCN-GRU model for prediction; and to obtain the battery performance degradation trend prediction result by using the predicted performance degradation trend data under large-scale conditions and the predicted performance degradation trend data under small-scale conditions.
[0145] Another aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor; when the computer program is executed by the processor, the steps of the battery performance degradation trend prediction method described above are implemented. Figure 1 Alternatively, when the processor executes the computer program, the functions of each module in the above-mentioned vehicle fuel cell performance prediction device embodiments are realized, for example Fig.10 The polynomial fitting module 201, the model building and training module 202 and the prediction module 203 are shown.
[0146] Furthermore, those skilled in the art will appreciate that although some embodiments herein include certain features included in other embodiments but not other features, the combination of features from different embodiments is meant to be within the scope of the present invention and to form different embodiments.
[0147] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments can still be used to modify the technical solutions or to perform equivalent replacements on some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting battery performance degradation trend, characterized in that: The method comprises: Acquire existing performance decay trend data of the battery, and obtain predicted performance decay trend data under large-scale conditions by fitting the existing performance decay trend data of the battery through a polynomial; Constructing a TCN-GRU model of a temporal convolutional neural network combined with a gated recurrent unit, and training the TCN-GRU model using the existing performance degradation trend data of the battery to obtain a trained TCN-GRU model; The predicted performance decay trend data under small-scale conditions is obtained by inputting the performance decay trend data to be predicted into the trained TCN-GRU model for prediction; The predicted performance degradation trend data under the large-scale condition and the predicted performance degradation trend data under the small-scale condition are used to obtain a battery performance degradation trend prediction result.
2. The method according to claim 1, characterized in that: By fitting the existing performance degradation trend data of the battery with a polynomial, the predicted performance degradation trend data under large-scale conditions are obtained, including: The existing performance degradation trend data of the battery is used as the original data, and numbers in the range of nm are cyclically selected to perform polynomial fitting on the original data to obtain fitting data corresponding to each number in the range of nm; wherein n and m are both positive integers, and n is less than m; The mean square error value between the original data and the fitting data corresponding to each number in the nm range is calculated, and the number corresponding to the smallest mean square error value is used as the best polynomial fitting number, and the fitting data corresponding to the number is used as the predicted performance degradation trend data under large-scale conditions.
3. The method according to claim 1, characterized in that The TCN-GRU model includes a data input layer, a TCN layer, a reconstruction layer, a GRU layer and a fully connected layer; The TCN layer is used to learn local area features in the performance decay trend data, and the GRU layer is used to learn long-term correlations in local area features in the performance decay trend data.
4. The method according to claim 1, characterized in that Using the predicted performance degradation trend data under the large-scale conditions and the predicted performance degradation trend data under the small-scale conditions, the battery performance degradation trend prediction results are obtained, including: Calculating a first mean square error between the predicted performance degradation trend data under the large-scale condition and the existing performance degradation trend data of the battery; Calculating a second mean square error between the predicted performance degradation trend data under the small-scale condition and the existing performance degradation trend data of the battery; A battery performance degradation trend prediction result is obtained according to the first mean square error, the second mean square error, the predicted performance degradation trend data under the large-scale condition, and the predicted performance degradation trend data under the small-scale condition.
5. The method according to claim 4, characterized in that The battery performance degradation trend prediction result obtained according to the first mean square error, the second mean square error, the predicted performance degradation trend data under the large-scale condition, and the predicted performance degradation trend data under the small-scale condition includes: Among them, MSE1 refers to the first mean square error; MSE2 refers to the second mean square error; y1 refers to the predicted performance degradation trend data under large-scale conditions; y2 refers to the predicted performance degradation trend data under small-scale conditions; y refers to the battery performance degradation trend prediction result.
6. The method according to claim 4, characterized in that Building a TCN-GRU model includes: Determine the shape of the input data, the number of convolutional layers, the size of the convolution kernel, the size of the dilation factor, the pooling method and other model parameters, as well as the shape of the output layer and the activation function to define the model structure; After defining the model structure, select the appropriate optimizer, loss function, and evaluation metric to compile the TCN-GRU model; The existing performance degradation trend data of the battery is divided into a training set and a test set and loaded into a memory, and the training set and the test set loaded into the memory are preprocessed and normalized.
7. The method according to claim 6, characterized in that The TCN-GRU model is trained using the existing performance degradation trend data of the battery, and the trained TCN-GRU model includes: In each training cycle, the existing performance degradation trend data of the batteries in the training set are divided into several batches to train the TCN-GRU model, and the learning rate is adjusted during the training process; After the training is completed, the test set is used to evaluate the performance of the TCN-GRU model on unknown data to obtain the trained TCN-GRU model.
8. A battery performance degradation trend prediction device, characterized in that: include: A polynomial fitting module is used to obtain existing performance decay trend data of the battery, and to obtain predicted performance decay trend data under large-scale conditions by fitting the existing performance decay trend data of the battery through a polynomial. A model building and training module, used to build a TCN-GRU model of a temporal convolutional neural network combined with a gated recurrent unit, and train the TCN-GRU model using the existing performance degradation trend data of the battery to obtain a trained TCN-GRU model; A prediction module, used for obtaining predicted performance decay trend data under small-scale conditions by inputting the performance decay trend data to be predicted into the trained TCN-GRU model for prediction; The predicted performance degradation trend data under the large-scale conditions and the predicted performance degradation trend data under the small-scale conditions are used to obtain a battery performance degradation trend prediction result.
9. The device according to claim 8, characterized in that The TCN-GRU model includes a data input layer, a TCN layer, a reconstruction layer, a GRU layer and a fully connected layer; wherein the TCN layer is used to learn local area features in performance decay trend data, and the GRU layer is used to learn long-term correlations in local area features of performance decay trend data.
10. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor; when the computer program is executed by the processor, the steps of the method for predicting the battery performance degradation trend described in any one of claims 1 to 7 are implemented.