Battery temperature estimation method, terminal device and storage medium
By combining the data-driven battery temperature estimation model and the electrochemical-thermal coupled model of the physical model, Bayesian inference calculates the posterior distribution, the accuracy problem caused by severe battery temperature fluctuations is solved, and higher temperature prediction accuracy and response capabilities are achieved.
Patent Information
- Application Number
- CN202411958384.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-05-30
AI Technical Summary
The prior art is difficult to accurately estimate battery temperature, especially when temperature fluctuations are severe, which affect battery performance and life, and even poses safety risks.
By inputting the state information of the battery at the previous moment and the state information of the current moment into the battery temperature estimation model, combining the electrochemical-thermal coupling model, the likelihood function and a priori distribution are used to calculate the posterior distribution, and then the final temperature estimation result of the battery at the next moment is obtained.
It improves the accuracy of battery temperature prediction, enhances the ability to respond to real-time data changes, and improves the reliability of temperature estimation results through calibration of physical models.
Smart Images

Figure CN120068582A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of batteries, and in particular, to a method for estimating battery temperature, a terminal device, and a storage medium. Background Art
[0002] With the progress of energy storage technology, batteries are increasingly widely used in various fields. During the actual use of batteries, abnormal fluctuations in temperature will have a significant impact on battery performance and lifespan, and may even lead to safety risks. Therefore, it is urgent to accurately estimate the temperature of the battery at a future moment, which is of great significance for ensuring the safety and reliability of the battery. Summary of the Invention
[0003] This application provides a method for estimating battery temperature, a terminal device, and a storage medium.
[0004] One technical solution adopted in this application is to provide a method for estimating battery temperature, the method comprising:
[0005] Inputting the first state information of the battery at the previous moment and the second state information of the battery at the current moment into a battery temperature estimation model to obtain multiple first temperature estimation results of the battery at the next moment;
[0006] Inputting the current and voltage of the battery at the current moment into an electrochemistry-thermal coupling model to obtain a state estimation result of the battery at the next moment, and further obtaining a second temperature estimation result;
[0007] Determining a likelihood function based on the multiple first temperature estimation results;
[0008] Taking the second temperature estimation result as a prior distribution; and calculating a posterior distribution by using the likelihood function and the prior distribution;
[0009] Obtaining a final temperature estimation result of the battery at the next moment according to the posterior distribution.
[0010] Optionally, the battery temperature estimation model includes a feature embedding layer, a bidirectional gated recurrent network layer, a multi-head attention network layer, and a multi-layer perceptron connected in sequence;
[0011] Inputting the first state information of the battery at the previous moment and the second state information of the battery at the current moment into a battery temperature estimation model to obtain multiple first temperature estimation results of the battery at the next moment, including:
[0012] Inputting the first state information and the second state information into the feature embedding layer to obtain a feature embedding result;
[0013] Inputting the feature embedding result into the bidirectional gated recurrent network layer to obtain a first result;
[0014] Input the first result into the multi-head attention network layer to obtain a second result;
[0015] Input the second result into a multi-layer perceptron to obtain multiple first temperature estimation results.
[0016] Optionally, the multi-layer perceptron includes a first linear layer, an activation function layer, a Monte Carlo dropout layer, and a second linear layer connected in sequence;
[0017] Inputting the second result into the multi-layer perceptron to obtain multiple first temperature estimation results includes:
[0018] Input the second result into the first linear layer to obtain a third result;
[0019] Input the third result into the activation function to obtain a fourth result;
[0020] Input the fourth result into the Monte Carlo dropout layer to obtain multiple fifth results;
[0021] Input each fifth result into the second linear layer respectively, thereby obtaining multiple first temperature estimation results.
[0022] Optionally, determining the likelihood function based on multiple first temperature estimation results includes:
[0023] Obtain the mean and variance of the multiple first temperature estimation results;
[0024] Determine the likelihood function based on the mean and variance.
[0025] Optionally, calculating the posterior distribution using the likelihood function and the prior distribution includes:
[0026] Construct a variational lower bound function using the likelihood function and the prior distribution;
[0027] By maximizing the variational lower bound function, obtain an approximation of the marginal likelihood;
[0028] Calculate the posterior distribution using the likelihood function, the prior distribution, and the approximation of the marginal likelihood.
[0029] Optionally, the battery temperature estimation model is pre-trained in the following manner:
[0030] Obtain the time-series state information of several batteries under different driving conditions, and the first battery temperature corresponding to the next moment of the time-series state information;
[0031] Use the time-series state information and the first battery temperature to train the battery temperature estimation model.
[0032] Optionally, the electrochemical-thermal coupling model is pre-identified in the following manner:
[0033] Obtain the voltages and currents of several batteries under different test conditions, as well as the second battery temperature corresponding to the voltages and currents.
[0034] Utilize the voltages, currents, and the second battery temperature to identify the parameters in the electrochemical-thermal coupling model.
[0035] Optionally, the electrochemical-thermal coupling model consists of an electrochemical model and a thermal model, where the electrochemical model is a single-particle model with electrolyte, and the thermal model is a lumped thermal model.
[0036] Another technical solution adopted by this application is to provide a terminal device, which includes a memory and a processor connected to the memory;
[0037] Among them, the memory is used to store program data, and the processor is used to execute the program data to implement the method for estimating the battery temperature as described above.
[0038] Another technical solution adopted by this application is to provide a computer storage medium, which is used to store program data. When the program data is executed by a computer, it is used to implement the method for estimating the battery temperature as described above.
[0039] The beneficial effects of this application are as follows: Input the first state information of the battery at the previous moment and the second state information of the battery at the current moment into the battery temperature estimation model obtained based on data-driven to obtain multiple first temperature estimation results of the battery at the next moment; Input the current and voltage of the battery at the current moment into the electrochemical-thermal coupling model formed based on the physical model to obtain the state estimation result of the battery at the next moment, and then obtain the second temperature estimation result; Determine the likelihood function based on the multiple first temperature estimation results; Use the second temperature estimation result as the prior distribution; And use the likelihood function and the prior distribution to calculate the posterior distribution; According to the posterior distribution, obtain the final temperature estimation result of the battery at the next moment. The method for estimating the battery temperature provided by this application takes into account the deficiency that the battery temperature estimation model obtained based on data-driven has a decrease in accuracy under different operating conditions, and the accuracy of the electrochemical-thermal coupling model based on the physical model may be inferior to that of the battery temperature estimation model under a single operating condition. By determining the likelihood function from the multiple first temperature estimation results, the response ability to real-time data changes is enhanced, and by using the second temperature estimation result as the prior distribution and calibrating the output result of the battery temperature estimation model with the temperature estimation result of the physical model, the obtained final temperature estimation result is more accurate. Description of the Drawings
[0040] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.
[0041] Figure 1 It is a schematic flowchart of an embodiment of the battery temperature estimation method provided by the present application;
[0042] Figure 2 It is a schematic structural diagram of an embodiment of the battery temperature estimation model provided by the present application;
[0043] Figure 3 It is a schematic diagram of an embodiment of the single-particle model containing electrolyte provided by the present application;
[0044] Figure 4 It is a schematic flowchart of another embodiment of the battery temperature estimation method provided by the present application;
[0045] Figure 5 is Figure 3 a schematic diagram of an embodiment of S104 in
[0046] Figure 6 It is a schematic structural diagram of an embodiment of the terminal device provided by the present application;
[0047] Figure 7 It is a schematic structural diagram of an embodiment of the computer storage medium provided by the present application. Detailed implementation manners
[0048] The following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope protected by the present application.
[0049] It should be noted that the battery temperature mentioned in the present application mainly refers to the temperature inside the battery.
[0050] In related technologies for estimating battery temperature, mainly model-based methods, data-based methods, and model-data-based methods are adopted. The model-based method mainly constructs an electro-thermal coupled physical model for battery temperature estimation. By pre-identifying the model parameters, in subsequent steps, this physical model can be used to estimate the battery temperature at the next moment. The data-based method mainly uses machine learning to learn the mapping relationship between the measurable data of the battery and the battery temperature to predict the battery temperature at the next moment. The model-data-based method combines the physical model and machine learning to improve the prediction accuracy.
[0051] In data-driven battery temperature estimation methods, usually a neural network with a simple structure or a common recurrent neural network (RNN) is adopted. These methods mainly rely on historical sequential battery data as input. However, due to the limitations of the network structure, these methods are insufficient in capturing long-term dependencies and complex sequential features, and these drawbacks may lead to a decrease in estimation accuracy, especially in the case of drastic temperature changes.
[0052] In model-driven battery temperature estimation methods, related technologies will select an equivalent circuit model, but this model can only describe the external state of the battery and cannot deeply understand the internal state of the battery and its dynamic changes, which may lead to relatively low accuracy of temperature estimation.
[0053] In the method of combining data-model-driven approaches, there are mainly two ways of combining the two, namely serial combination or parallel combination of the deep learning model and the battery model. The serial combination method is to use the output of one model as the input of the other model. This method is overly dependent on the accuracy of the previous model. If there is a deviation in the estimation of the first model, it will directly affect the performance of the subsequent model, which may lead to inefficiency and instability of the overall system. The parallel model, on the other hand, allows the two models to independently process their respective inputs, generate outputs respectively, and then fuse these two outputs. Although this method can reduce the dependence on a single model, the current fusion methods are often too simple and usually use a dynamic weight strategy for weighting, failing to fully utilize the potential guiding role of the physical model.
[0054] This application mainly designs a method to improve the accuracy of predicted battery temperature. Different from traditional methods, this application constructs a likelihood function based on the estimation result output by the data-driven battery temperature estimation model, and uses the output result of the model-driven electrochemical-thermal coupling model as the prior distribution. Then, according to the likelihood function and the prior distribution, the posterior distribution is determined, and the posterior distribution is used as the final temperature estimation result. The estimation result driven by the model is used to guide the estimation result driven by the data to improve the accuracy of predicted battery temperature.
[0055] For details, please refer to Figure 1 , Figure 1 which is a schematic flowchart of an embodiment of the battery temperature estimation method provided by this application.
[0056] As Figure 1 shown, the battery temperature estimation method of the embodiments of this application may specifically include the following steps:
[0057] S1, Input the first state information of the battery at the previous moment and the second state information at the current moment into the battery temperature estimation model to obtain multiple first temperature estimation results of the battery at the next moment.
[0058] The battery temperature estimation method provided by this application is mainly executed by a battery temperature estimation device. In some embodiments, the battery temperature estimation device may be the battery management system (BMS) itself. In some embodiments, the battery temperature estimation device may also be a device communicatively connected to the battery management system. For example, the device may be a device for monitoring images, a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, and any one or more of products such as an autonomous vehicle, a robot, a security system, glasses or helmets for augmented reality or virtual reality. In some possible implementation manners, the battery temperature estimation method may be implemented by a processor calling computer-readable instructions stored in a memory. In some possible embodiments, the battery temperature estimation device may also be a cloud server.
[0059] Specifically, the battery temperature estimation device obtains, through the battery management system, the first state information of the battery at the previous moment and the second state information at the current moment, and inputs the first state information and the second state information into the battery temperature estimation model to obtain multiple first temperature estimation results of the battery at the next moment.
[0060] Exemplarily, the previous moment may refer to 2s, 1.5s, 1s, 0.5s or 0.1s before the current moment. The next moment may refer to 0.1s, 0.5s, 1s, 1.5s, 2s after the current moment.
[0061] In some embodiments, the state information may include the voltage, (input and / or output) current, and ambient temperature of the battery. That is, the first state information may include the voltage, current, and ambient temperature of the battery at the previous moment, and the second state information may include the voltage, current, and ambient temperature of the battery at the current moment.
[0062] Exemplarily, the voltage of the battery may refer to the operating voltage, and the current of the battery may refer to the operating current.
[0063] Optionally, the ambient temperature may refer to the temperature of the battery surface or the temperature of the environment where the battery is located.
[0064] In some embodiments, the status information may also include the internal temperature of the battery.
[0065] Optionally, the battery temperature estimation model may be a deep learning model.
[0066] S2. Input the current and voltage of the battery at the current moment into the electrochemical-thermal coupling model to obtain the state estimation result of the battery at the next moment, and further obtain the second temperature estimation result.
[0067] Specifically, the battery temperature estimation device inputs the current and voltage of the battery at the current moment into the electrochemical-thermal coupling model to obtain the third temperature estimation result of the battery at the current moment, and then inputs the third temperature estimation result into the state estimation algorithm for state estimation to obtain the state estimation result of the third temperature estimation result at the next moment, and further obtain the second temperature estimation result.
[0068] Among them, the electrochemical-thermal coupling model considers the coupling effect of the electrochemical reaction and the heat transfer mechanism, reveals how the heat generation or absorption in the electrochemical process affects the system temperature, and at the same time how the temperature change affects the electrochemical characteristics such as the reaction rate and conductivity in the battery.
[0069] In some embodiments, the state estimation result of the third temperature estimation result at the next moment is the second temperature estimation result.
[0070] In some possible embodiments, the electrochemical-thermal coupling model is composed of an electrochemical model and a thermal model. Compared with the equivalent circuit model used in the related art, the electrochemical model adopted in this step can capture the physical and chemical processes inside the battery more comprehensively, so as to provide more accurate reaction heat data for the thermal model, and further improve the accuracy of the second temperature estimation result of the battery at the next moment.
[0071] Optionally, the state estimation algorithm may include one or more of the weighted least squares method (WLS), particle filtering, and state estimation methods based on machine learning or artificial intelligence. Among them, the state estimation methods based on machine learning or artificial intelligence may include one or more of neural networks and support vector machine state estimation methods.
[0072] S3. Determine the likelihood function based on multiple first temperature estimation results.
[0073] Specifically, the battery temperature estimation device determines the likelihood function according to the distribution of multiple first temperature estimation results.
[0074] Exemplarily, the battery temperature estimation device determines a likelihood function based on a normal distribution according to the distribution of a plurality of first temperature estimation results.
[0075] Exemplarily, the battery temperature estimation device determines a likelihood function based on a Poisson distribution according to the distribution of a plurality of first temperature estimation results.
[0076] Wherein, the likelihood function is used to characterize the data distribution of the data model output.
[0077] S4. Take the second temperature estimation result as the prior distribution, and calculate the posterior distribution by using the likelihood function and the prior distribution.
[0078] Specifically, the battery temperature estimation device uses Bayesian inference, takes the second temperature estimation result output by the physical model as the prior distribution, and calculates the posterior distribution by using the likelihood function and the prior distribution.
[0079] S5. Obtain the final temperature estimation result of the battery at the next moment according to the posterior distribution.
[0080] In some embodiments, the battery temperature estimation device takes the posterior distribution as the final temperature estimation result of the battery at the next moment.
[0081] In some possible embodiments, the battery temperature estimation device takes the mean value of the posterior distribution as the final temperature estimation result at the next moment, and takes the variance of the posterior distribution as the uncertainty measure of the final temperature estimation result.
[0082] In the above solution, the first state information of the battery at the previous moment and the second state information of the battery at the current moment are input into the battery temperature estimation model obtained based on data-driven, and multiple first temperature estimation results of the battery at the next moment are obtained; the current and voltage of the battery at the current moment are input into the electrochemical-thermal coupling model formed based on the physical model to obtain the state estimation result of the battery at the next moment, and then the second temperature estimation result is obtained; based on the multiple first temperature estimation results, the likelihood function is determined; the second temperature estimation result is used as the prior distribution; and the posterior distribution is calculated by using the likelihood function and the prior distribution; according to the posterior distribution, the final temperature estimation result of the battery at the next moment is obtained. The battery temperature estimation method provided by this application takes into account the deficiency that the battery temperature estimation model obtained based on data-driven has a decrease in accuracy under different operating conditions, and the accuracy of the electrochemical-thermal coupling model based on the physical model may not be as good as that of the battery temperature estimation model under a single operating condition. By determining the likelihood function from multiple first temperature estimation results, the response ability to real-time data changes is enhanced, and by using the second temperature estimation result as the prior distribution and using the temperature estimation result of the physical model to calibrate the output result of the battery temperature estimation model, the obtained final temperature estimation result is more accurate.
[0083] Another embodiment of the battery temperature estimation method provided by this application may specifically include the following steps:
[0084] S11, input the first state information and the second state information into the feature embedding layer to obtain a feature embedding result.
[0085] Among them, the battery temperature estimation model includes a feature embedding layer, a bidirectional gated recurrent network layer, a multi-head attention network layer, and a multi-layer perceptron connected in sequence.
[0086] Specifically, the battery temperature estimation device inputs the first state information and the second state information into the feature embedding layer for feature embedding processing to obtain a feature embedding result.
[0087] By performing feature embedding processing on the first state information and the second state information, the latent information in the first state information and the second state information can be extracted.
[0088] S12, input the feature embedding result into the bidirectional gated recurrent network layer to obtain a first result.
[0089] Specifically, the battery temperature estimation device inputs the feature embedding result into the bidirectional gated recurrent network layer for time feature extraction to obtain a first result.
[0090] In some embodiments, the bidirectional gated recurrent network layer is composed of multiple bidirectional gated recurrent units (Bi-GRU).
[0091] Specifically, the calculation process of a single gated recurrent unit (GRU) satisfies the following relationship:
[0092] Z t = σ(X t W xz + h t-1 W hz + b z )
[0093] R t = σ(X t W xr + h t-1 W hr + b r )
[0094]
[0095] where Z t is the output of the update gate, h t-1 is the hidden state at the previous time step (the hidden state at the previous moment), W xz and W hz are the weights of the update gate, b z is the bias of the update gate. R t is the output of the reset gate, W xr and W hr are the weights of the reset gate, b r is the bias of the reset gate. is the candidate hidden state, W xh and W hh are the weights for calculating the candidate hidden state, b h is the bias for calculating the candidate hidden state, tanh represents the hyperbolic tangent activation function, ⊙ represents the Hadamard product operation, and h t is the hidden state at the current time step.
[0096] Furthermore, the output of a single bidirectional gated recurrent network unit is obtained by concatenating the forward GRU and the backward GRU, satisfying the following relationship:
[0097]
[0098] where H t is the hidden state at the current time step of the final output (i.e., the hidden state at the current moment), and are the hidden states output by the forward and backward GRUs at the current time step, respectively.
[0099] Furthermore, the first result can satisfy the following relationship:
[0100] H = [H 1 ,H2 ,..., H T
[0101] Among them, H is the first result, T is the number of bidirectional gated recurrent units, and H 1 , H 2 ,..., H T are the output results of each bidirectional gated recurrent network unit respectively.
[0102] S13, input the first result into the multi-head attention network layer to obtain the second result.
[0103] Specifically, the battery temperature estimation device inputs the first result into the multi-head attention network layer for global information fusion to obtain the second result.
[0104] In some embodiments, first calculate the query vector, key vector, and value vector of the first result for each head.
[0105]
[0106] Among them, Q h is the query vector, K h is the key vector, V h is the value vector, are weight matrices respectively.
[0107] Furthermore, according to the query vector, key vector, and value vector, calculate the attention score and weighted value corresponding to each head.
[0108] Among them, the attention score satisfies the following relationship:
[0109]
[0110] Among them, d k is the dimension of K h , softmax is the normalization calculation, and α h is the attention score corresponding to a certain head.
[0111] Among them, the weighted value satisfies the following relationship:
[0112] A h = α h V h
[0113] Among them, A h is the weighted value corresponding to a certain head.
[0114] Furthermore, merge the outputs of all heads to obtain the fused global information A, and the fused global information is the second result.
[0115] A = [A1 , A 2 , …, A H W A
[0116] where A is the second result, W A is the weight matrix, and H is the number of heads.
[0117] This application introduces an attention mechanism into the battery temperature estimation model. The attention mechanism can better capture the influence of key time points by weighting different parts of historical data, enhancing the model's ability to extract important information from long sequences.
[0118] S14. Input the second result into a multi-layer perceptron to obtain multiple first temperature estimation results.
[0119] Specifically, the battery temperature estimation device inputs the output result of the multi-head attention mechanism, that is, the second result, into a multi-layer perceptron to obtain multiple first temperature estimation results.
[0120] S15. Input the current and voltage of the battery at the current moment into the electrochemical-thermal coupling model to obtain the state estimation result of the battery at the next moment, and then obtain the second temperature estimation result.
[0121] S16. Determine the likelihood function based on multiple first temperature estimation results.
[0122] S17. Use the second temperature estimation result as the prior distribution, and calculate the posterior distribution using the likelihood function and the prior distribution.
[0123] S18. Obtain the final temperature estimation result of the battery at the next moment according to the posterior distribution.
[0124] In the above solution, the first state information of the battery at the previous moment and the second state information at the current moment are input into the battery temperature estimation model obtained based on data-driven, and multiple first temperature estimation results of the battery at the next moment are obtained; the current and voltage of the battery at the current moment are input into the electrochemical-thermal coupling model formed based on the physical model to obtain the state estimation result of the battery at the next moment, and then the second temperature estimation result is obtained; based on the multiple first temperature estimation results, the likelihood function is determined; the second temperature estimation result is used as the prior distribution; and the posterior distribution is calculated by using the likelihood function and the prior distribution; according to the posterior distribution, the final temperature estimation result of the battery at the next moment is obtained. The battery temperature estimation method provided by this application takes into account the deficiency that the accuracy of the battery temperature estimation model obtained by data-driven decreases under different operating conditions, and the accuracy of the electrochemical-thermal coupling model based on the physical model may be inferior to that of the battery temperature estimation model under a single operating condition. By determining the likelihood function from multiple first temperature estimation results, the response ability to real-time data changes is enhanced, and the second temperature estimation result is used as the prior distribution, and the temperature estimation result of the physical model is used to calibrate the output result of the battery temperature estimation model, so that the obtained final temperature estimation result is more accurate.
[0125] Another embodiment of the battery temperature estimation method provided by this application may specifically include the following steps:
[0126] S21, input the first state information and the second state information into the feature embedding layer to obtain a feature embedding result.
[0127] Among them, the battery temperature estimation model includes a feature embedding layer, a bidirectional gated recurrent network layer, a multi-head attention network layer, and a multi-layer perceptron connected in sequence.
[0128] S22, input the feature embedding result into the bidirectional gated recurrent network layer to obtain a first result.
[0129] Among them, the multi-layer perceptron includes a first linear layer, an activation function layer, a Monte Carlo dropout layer, and a second linear layer connected in sequence.
[0130] In some embodiments, the network structure of the battery temperature estimation model can be as Figure 2 shown.
[0131] S23, input the first result into the multi-head attention network layer to obtain a second result.
[0132] S24, input the second result into the first linear layer to obtain a third result.
[0133] Specifically, the battery temperature estimation device inputs the second result into the first linear layer to obtain a third result.
[0134] S25. Input the third result into the activation function layer to obtain a fourth result.
[0135] Specifically, the battery temperature estimation device inputs the third result into the activation function layer to obtain a fourth result.
[0136] In some embodiments, the activation function layer uses the Sigmoid activation function.
[0137] S26. Input the fourth result into the Monte Carlo dropout layer respectively to obtain multiple fifth results.
[0138] Specifically, the battery temperature estimation device inputs the fourth result into the Monte Carlo Dropout layer to obtain multiple fifth results.
[0139] In this embodiment, when the model makes predictions, Monte Carlo Dropout is applied for uncertainty evaluation. Through multiple forward propagations, a certain number of neurons are discarded with a certain probability each time to obtain multiple sets of outputs.
[0140] S27. Input each fifth result into the second linear layer respectively to obtain multiple first temperature estimation results.
[0141] Specifically, the battery temperature estimation device inputs each fifth result into the second linear layer respectively to obtain multiple first temperature estimation results.
[0142] In some embodiments, each output first temperature estimation result satisfies the following relationship:
[0143]
[0144] where W y is the weight of the fully connected layer, b y is the bias of the fully connected layer, σ is the Sigmoid activation function, and D (i) is the mask of the neurons retained in the i-th forward propagation.
[0145] Furthermore, the result set corresponding to the first temperature estimation result satisfies the following relationship:
[0146]
[0147] where Y dd is the result set and I is the number of results.
[0148] It can be understood that the result set satisfies the following relationship:
[0149]
[0150] where μ y is the mean of the result set. is the variance of the result set.
[0151] In the related art, the multi-layer perceptron mainly outputs a single estimation result. Considering that in the actual application scenario, the battery temperature estimation model may have the problem of poor generalization performance and cannot meet the characteristics of the vehicle with changing scenarios during actual operation. Based on this, a Monte Carlo dropout layer structure is added to the multi-layer perceptron of the battery temperature estimation model, so that the battery temperature estimation model outputs several first temperature estimation results, and then a likelihood function is formed according to the several first temperature estimation results to improve the comprehensiveness of temperature prediction.
[0152] S28, Input the current and voltage of the battery at the current moment into the electrochemical-thermal coupling model to obtain the state estimation result of the battery at the next moment, and then obtain the second temperature estimation result.
[0153] S29, Determine the likelihood function based on multiple first temperature estimation results.
[0154] S30, Take the second temperature estimation result as the prior distribution; and use the likelihood function and the prior distribution to calculate the posterior distribution.
[0155] S31, Obtain the final temperature estimation result of the battery at the next moment according to the posterior distribution.
[0156] In the above solution, the first state information of the battery at the previous moment and the second state information of the battery at the current moment are input into the battery temperature estimation model obtained based on data-driven to obtain multiple first temperature estimation results of the battery at the next moment; the current and voltage of the battery at the current moment are input into the electrochemical-thermal coupling model formed based on the physical model to obtain the state estimation result of the battery at the next moment, and then obtain the second temperature estimation result; determine the likelihood function based on multiple first temperature estimation results; take the second temperature estimation result as the prior distribution; and use the likelihood function and the prior distribution to calculate the posterior distribution; obtain the final temperature estimation result of the battery at the next moment according to the posterior distribution. The battery temperature estimation method provided by this application takes into account the deficiency that the battery temperature estimation model obtained based on data-driven has a decrease in accuracy under different operating conditions, and the accuracy of the electrochemical-thermal coupling model based on the physical model may be inferior to that of the battery temperature estimation model under a single operating condition. By determining the likelihood function from multiple first temperature estimation results, the response ability to real-time data changes is enhanced, and by taking the second temperature estimation result as the prior distribution and using the temperature estimation result of the physical model to calibrate the output result of the battery temperature estimation model, the obtained final temperature estimation result is more accurate.
[0157] Another embodiment of the battery temperature estimation method provided by this application may specifically include the following steps:
[0158] S41. Input the first state information of the battery at the previous moment and the second state information of the battery at the current moment into the battery temperature estimation model to obtain multiple first temperature estimation results of the battery at the next moment.
[0159] Among them, the battery temperature estimation model is pre-trained through the following method:
[0160] S51. Obtain the sequential state information of several batteries under different driving conditions, and the first battery temperature corresponding to the sequential state information at the next moment.
[0161] In some embodiments, "several batteries" may refer to multiple batteries in the same production batch, or may refer to multiple batteries of the same battery model.
[0162] In some embodiments, the sequential state information may include the voltage, current, ambient temperature, and battery temperature of the battery at consecutive moments. Exemplarily, the sequential state information at least includes the voltage, current, ambient temperature, and battery temperature at the t - 1 moment, and the voltage, current, ambient temperature, and battery temperature corresponding to the t moment. It can be understood that the battery state information at the t - 1 moment corresponds to the battery temperature at the t moment.
[0163] S52. Use the sequential state information and the first battery temperature to train the battery temperature estimation model.
[0164] Specifically, the battery temperature estimation device uses the sequential state information and the first battery temperature to train the battery temperature estimation model.
[0165] In some embodiments, the battery temperature estimation device uses the first battery temperature as the label corresponding to the sequential state information to construct a data set. Further, the battery temperature estimation device divides the data set into a cross - validation set and a test set according to a ratio of 4:1. The cross - validation set is used to train and tune the parameters of the battery temperature estimation model, and a five - fold cross - validation method is adopted.
[0166] Further, the optimizer used for model training is Adam, and the loss function uses RMSE (root mean square error). The test set is used to test the generalization ability of the battery temperature estimation model to avoid overfitting of the model.
[0167] S42. Input the current and voltage of the battery at the current moment into the electrochemical - thermal coupling model to obtain the state estimation result of the battery at the next moment, and further obtain the second temperature estimation result.
[0168] Among them, the electrochemical - thermal coupling model is pre - identified through the following method:
[0169] S61. Obtain the voltages and currents of a number of batteries under different test conditions, as well as the second battery temperature corresponding to the respective voltages and currents.
[0170] Specifically, the battery temperature estimation device obtains the tests of a number of batteries of the same batch or model under different test conditions, and records the second temperature data corresponding to different batteries under different voltages and currents.
[0171] Among them, different test conditions refer to conditions such as different ambient temperatures and different charge-discharge rates. The tests include capacity tests, charge-discharge tests, and other contents.
[0172] It should be noted that the second battery temperature corresponds to the current battery temperature of the battery under different voltages and currents.
[0173] S62. Use the voltage, current, and second battery temperature to identify the parameters in the electrochemical-thermal coupling model.
[0174] Specifically, the battery temperature estimation device uses the voltage, current, and second battery temperature to identify the parameters in the electrochemical-thermal coupling model.
[0175] In some embodiments, the battery temperature estimation device uses a genetic algorithm or its variant to identify the parameters in the electrochemical-thermal coupling model.
[0176] In some embodiments, the battery temperature estimation device uses an ant colony algorithm or its variant to identify the parameters in the electrochemical-thermal coupling model.
[0177] In some embodiments, the battery temperature estimation device uses a particle swarm algorithm or its variant to identify the parameters in the electrochemical-thermal coupling model.
[0178] In some embodiments, the output of the electrochemical-thermal coupling model is Y model , which depends on the parameter set P = [p 1 , p 2 , …, p n , and the actual battery temperature data is Y true . The task of parameter identification can be defined as:
[0179]
[0180] P * = argmin p F(P)
[0181] where N is the total number of samples of the test data, t i represents the time step, and P * is the optimal parameter set.
[0182] In some embodiments, the electrochemistry-thermal coupling model consists of an electrochemistry model and a thermal model. Among them, the electrochemistry model is a single-particle model with electrolyte, and the thermal model is a lumped thermal model.
[0183] Please refer to Figure 3 , the single-particle model with electrolyte (SPM e ) is a simplified mathematical model used to describe the dynamic behavior of lithium ions in a lithium-ion battery. This model assumes that the electrode material consists of individual independent single particles, focuses on the diffusion of lithium ions inside the particles and the electrochemical reaction with the electrolyte, and can better reflect the migration process of lithium ions between the electrode and the electrolyte interface by considering the transport characteristics of the electrolyte.
[0184] Among them, in the single-particle model with electrolyte, the particle contains the following equations;
[0185]
[0186] Among them, c s,k is the lithium concentration equation of the representative particle in the k region, r k is the radial coordinate of the particle in the electrode, N s,k is the solid-phase lithium-ion flux in the k region, D s,k is the solid-phase diffusion coefficient, n represents the negative electrode, and p represents the positive electrode.
[0187] The electrolyte contains the following related equations:
[0188]
[0189] N e,n | x=0 = 0
[0190] N e,D | x=L = 0
[0191] c e,k (x, 0) = 0, k ∈ {n, s, p}
[0192] Among them, ∈ k is the electrolyte volume fraction, c e,k is the equation that dominates the first-order correction behavior of the lithium concentration in the electrolyte, N e,k is the lithium-ion flux in the electrolyte in the k region, x is the coordinate in the battery thickness direction, F is the Faraday constant, L n and L p are the thicknesses of the negative electrode and the positive electrode respectively, {n, s, p} represent the negative electrode, the separator, and the positive electrode respectively, D e is the solid-phase diffusion coefficient, t + is the transfer coefficient, I is the current density, R is the gas constant, and T is the temperature.
[0193] Furthermore, the thermal model is a lumped thermal model, and the battery temperature estimation device obtains it by solving the following ordinary differential equation:
[0194]
[0195] where ρ eff is the equivalent volume heat capacity, T and t are temperature and time respectively, is the average heat source term, h is the heat transfer coefficient, A is the cooling surface area, V is the volume of the battery, T e is the ambient temperature, ρ k is the density, c p,k is the specific heat capacity, L k is the thickness of each component, cn, n, s, p, cp represent the negative current collector, negative electrode, separator, positive electrode, and positive current collector respectively.
[0196] Furthermore, the heat Q generated by the battery consists of four parts:
[0197] (1) Ohmic heat Q Ohm,k generated by the resistance in the solid and electrolyte.
[0198] (2) Irreversible heating Q rxn,k caused by the electrochemical reaction.
[0199] (3) Reversible heating Q rev,k caused by the entropy change in the electrode.
[0200] (4) Heating Q cr caused by the contact resistance.
[0201] Furthermore, the heat of the above four parts satisfies the following relationship:
[0202] Q = Q Ohm,k + Q rxn,k + Q rev,k + Q cr
[0203]
[0204] Q rxn,k = a k j k η k
[0205]
[0206] where i k is the current, φ k is the electric potential, a k is the surface area to volume ratio, j k is the surface current density, η kis the overpotential, U is the open-circuit voltage, and R cr is the contact resistance, and V cell is the total volume of the battery.
[0207] It should be understood that the electrochemical model in the embodiments of the present application is a single-particle model with electrolyte. Those skilled in the art can, according to actual needs, adopt the SPM (Simplified Single Particle) model or the P2D (Pseudo Two-Dimensional) model as the electrochemical model. Among them, the SPM model has the characteristics of high calculation efficiency and moderate accuracy, and can be used when the computing power is low or the real-time requirement is high; the P2D model has high accuracy, however, the model parameters are large, and it can be used when the computing power is high or the real-time requirement is not too high. The single-particle model with electrolyte (SPM e ) provided by the embodiments of the present application reduces a certain amount of calculation compared with the P2D model with the highest accuracy and the largest amount of calculation, and has the advantage of high calculation efficiency; SPM e compared with the SPM model with lower accuracy and the smallest amount of calculation, has the advantage of high accuracy, however, there is a disadvantage of a large amount of calculation.
[0208] In addition, the thermal model provided by the embodiments of the present application is a lumped thermal model. Those skilled in the art can, according to actual needs, adopt the full thermal model as the thermal model of the battery. The lumped thermal model adopted in this embodiment has the advantages of small parameters and high calculation efficiency, and at the same time has the disadvantage of low accuracy. The full thermal model has the advantage of high accuracy, and at the same time has the disadvantages of complex parameters and low calculation efficiency.
[0209] In some embodiments, the battery temperature estimation device inputs the current and voltage of the battery at the current moment into the electro-thermal coupling model, and the output result corresponding to the electro-thermal coupling model is the temperature of the battery at the current moment. In order to estimate the temperature of the battery at the next moment, the embodiments of the present application adopt a state estimation algorithm, and use the temperature of the battery at the current moment to determine the temperature of the battery at the next moment.
[0210] In some embodiments, the state estimation algorithm is the Adaptive Extended Kalman Filter (AEKF), and this algorithm takes into account the problem of dynamic change of noise caused by dynamic changes in driving conditions and environment during the actual application of the battery. Among them, the temperature observation model of the battery can be expressed as:
[0211] y(k) = Hx(k) + v(k)
[0212] Among them, y(k) is the observed value, that is, the battery temperature, x(k) is the state vector of the system, H is the observation matrix, and v(k) is the noise. Among them, the state vector is determined by the temperature of the battery at the current moment (that is, the output result of the electro-thermal coupling model).
[0213] The adaptive Kalman filtering algorithm can dynamically adjust the process noise Q and the measurement noise R as follows:
[0214]
[0215] where k Q and k R are the adaptive gains respectively, is the variance of the state vector, and is the variance of the observation vector.
[0216] In the prediction step, the battery temperature estimation device uses the state vector x(k) at the current moment and the control input u(k + 1) to predict the state vector x(k + 1) at the next moment and the covariance matrix P(k + 1) at the next moment. Specifically, the state vector at the next moment and the covariance matrix at the next moment satisfy the following relationships:
[0217] x(k + 1|k) = Fx(k) + Bu(k + 1)
[0218] P(k + 1|k) = FP(k)F T + Q
[0219] where F and B are the state transition matrix and the control input matrix respectively.
[0220] Furthermore, the update formula of the state vector satisfies the following relationship:
[0221] x(k + 1|k + 1) = x(k + 1|k) + K(k + 1)(y(k + 1) - Hx(k + 1|k))
[0222] The Kalman gain K(k + 1) at the next moment satisfies the following relationship:
[0223] K(k + 1) = P(k + 1|k)H T (HP(k + 1|k)H T + R) -1
[0224] The update formula of the covariance satisfies the following relationship:
[0225] P(k + 1|k + 1) = (I - K(k + 1)H)P(k + 1|k)
[0226] Furthermore, the battery temperature estimation device substitutes the temperature estimation result output by the electrochemical-thermal coupling model at the current moment into the observation matrix to obtain the temperature estimation result at the next moment, that is, the second temperature estimation result.
[0227] y md ~(Hx(k + 1), HP(k + 1)H T+R)
[0228] where y md is the temperature estimation result at the next moment, that is, the second temperature estimation result.
[0229] It should be understood that although the embodiments of the present application mainly disclose the use of the adaptive extended Kalman filter as the state estimation algorithm, those skilled in the art can, according to actual needs, select other Kalman filter algorithms or their variants as the state estimation algorithm, and can also select the least squares method or its variants as the state estimation algorithm. Exemplarily, the least squares method with forgetting factor (FFRLS) can be selected as the state estimation algorithm.
[0230] S43. Determine the likelihood function based on multiple first temperature estimation results.
[0231] S44. Use the second temperature estimation result as the prior distribution.
[0232] S45. Construct a variational lower bound function using the likelihood function and the prior distribution.
[0233] Specifically, the battery temperature estimation device uses multiple first temperature estimation results output by the data-driven model (i.e., the battery temperature estimation model) as the likelihood function p(D|θ), and uses the second temperature estimation result output by the physical model (i.e., the electrochemical-thermal coupling model) as the prior distribution p(θ). Further, the posterior distribution satisfies the following relationship:
[0234]
[0235] where p(θ|D) is the posterior distribution and p(D) is the marginal likelihood.
[0236] In an actual scenario, the marginal likelihood is difficult to calculate. In this embodiment, the variational inference method is used to approximately calculate the posterior distribution.
[0237] Specifically, the variational lower bound function satisfies the following relationship:
[0238]
[0239] where is the variational lower bound function, q(θ; φ) is the variational distribution, where φ is the variational parameter.
[0240] S46. Obtain an approximate value of the marginal likelihood by maximizing the variational lower bound function.
[0241] Specifically, the battery temperature estimation device maximizes the result of the variational lower bound function by optimizing the variational parameter φ, and uses the maximum value of the variational lower bound function as the approximate value of the marginal likelihood.
[0242] Optionally, the method for optimizing the variational parameter φ can be any one of the gradient descent method, the Newton method or its variants, and heuristic optimization methods such as the simulated annealing method, the genetic algorithm, the ant colony algorithm, or the particle swarm algorithm, which are not limited herein.
[0243] The optimal variational parameter satisfies the following relationship:
[0244]
[0245] where φ * is the optimal variational parameter.
[0246] Furthermore, the approximation of the marginal likelihood satisfies the following relationship:
[0247]
[0248] where p′(D) is the approximation of the marginal likelihood.
[0249] S47. Using the likelihood function, the prior distribution, and the approximation of the marginal likelihood, calculate the posterior distribution.
[0250] Specifically, the posterior distribution satisfies the following relationship:
[0251]
[0252] where p(θ|D) is the posterior distribution, p(D|θ) is the likelihood function, p(θ) is the prior distribution, and p′(D) is the approximation of the marginal likelihood.
[0253] S48. According to the posterior distribution, obtain the final temperature estimation result of the battery at the next moment.
[0254] In some embodiments, the posterior distribution satisfies the following relationship:
[0255]
[0256] where y pd is the posterior distribution, μ pd is the mean value corresponding to the posterior distribution, is the variance corresponding to the posterior distribution.
[0257] In some embodiments, the battery temperature estimation device takes the mean value of the posterior distribution as the final temperature estimation result, and takes the variance of the posterior distribution as the uncertainty measure of the final temperature estimation result.
[0258] In the above solution, the first state information of the battery at the previous moment and the second state information of the battery at the current moment are input into the battery temperature estimation model obtained based on data driving, and multiple first temperature estimation results of the battery at the next moment are obtained; the current and voltage of the battery at the current moment are input into the electrochemical-thermal coupling model formed based on the physical model to obtain the state estimation result of the battery at the next moment, and then the second temperature estimation result is obtained; based on the multiple first temperature estimation results, the likelihood function is determined; the second temperature estimation result is used as the prior distribution; and the posterior distribution is calculated by using the likelihood function and the prior distribution; according to the posterior distribution, the final temperature estimation result of the battery at the next moment is obtained. The battery temperature estimation method provided in this application takes into account the deficiency that the accuracy of the battery temperature estimation model obtained based on data driving decreases under different operating conditions, and the accuracy of the electrochemical-thermal coupling model based on the physical model may be inferior to that of the battery temperature estimation model under a single operating condition. By determining the likelihood function from multiple first temperature estimation results, the response ability to real-time data changes is enhanced, and by using the second temperature estimation result as the prior distribution and using the temperature estimation result of the physical model to calibrate the output result of the battery temperature estimation model, the obtained final temperature estimation result is more accurate.
[0259] Please refer to Figure 4 , Figure 4 which is a schematic flowchart of another embodiment of the battery temperature estimation method provided in this application.
[0260] As Figure 4 shown, another embodiment of the battery temperature estimation method provided in this application may specifically include the following steps:
[0261] S101, test the battery under different working conditions to obtain battery test data, and collect the state data of the battery under actual driving conditions to construct a battery data set.
[0262] The data-driven battery temperature estimation method can often achieve high accuracy under the condition of a single working condition, but this accuracy is greatly affected by data quality, and under multi-working condition conditions, the generalization of the data-driven method is poor and cannot meet the characteristics of the changing scenarios during the operation of an actual vehicle. The model-driven method uses a physical model based on electrochemical and thermal principles, but due to the limitation of model complexity, its performance under a single working condition is often inferior to that of the data-driven method, but its generalization is high and it can adapt to multi-working condition conditions. Generally speaking, data-driven models usually have a strong learning ability and can capture potential patterns and trends from historical data; while model-driven methods are based on physical principles and provide a reliable system understanding and prediction mechanism.
[0263] Therefore, the present application provides a data-model hybrid-driven battery temperature estimation method, which fuses the outputs of the data model and the physical model by means of Bayesian inference. By treating the output of the model-driven method as the prior distribution, it fully utilizes its physical background and theoretical support. At the same time, the output of the data-driven method is used as the likelihood function, enhancing the response ability to real-time data changes. The use of Bayesian inference enables the model to be dynamically updated, thus better adapting to changes in the system state and improving the robustness of the overall prediction. This method can integrate the advantages of data-driven and model-driven methods, and has good generalization ability while ensuring the accuracy of the temperature estimation result.
[0264] In some embodiments, the battery temperature estimation device performs at least one of capacity test and charge-discharge test on the battery under different test conditions, such as different ambient temperatures and / or charge-discharge rates, etc., and records the current, voltage and battery temperature data of the battery during the test to obtain battery test data.
[0265] In some embodiments, the battery temperature estimation device acquires the state data of the battery installed on the vehicle under actual driving conditions and constructs a battery data set. Among them, the state data may include the current, voltage, temperature of the battery, and the ambient temperature of the environment where the battery is located. It should be noted that the state data in the battery data set is time-series data.
[0266] S102. Construct a deep learning model based on the data-driven method, adjust the parameters of the model using the battery data set, and use the model with adjusted parameters to output the temperature estimation for future time steps.
[0267] Among them, the deep learning model provided by the embodiments of the present application is a multi-layer perceptron neural network (ATGRU-MLP) based on the combination of attention mechanism and gated recurrent unit, and a Monte Carlo Dropout structure is added to the multi-layer perceptron (MLP).
[0268] It should be noted that this deep learning model corresponds to the battery temperature estimation model above.
[0269] In some embodiments, the network structure of the deep learning model is as Figure 2 shown.
[0270] The following combines Figure 2 to introduce the inference process of the deep learning model:
[0271] First, input the state data belonging to time-series data into the feature embedding layer to obtain the feature embedding result X at time t t ∈R d (d is the feature dimension), and use Bi-GRU for time feature extraction. The calculation process of the unidirectional GRU is as follows.
[0272] Z t = σ(X t W xz + h t-1 W hz + b z )
[0273] R t = σ(X t W xr + h t-1 W hr + b r )
[0274]
[0275] where Z t is the output of the update gate, h t-1 is the hidden state at the previous time step, W xz and W hz are the weights of the update gate, and b z is the bias of the update gate.
[0276] R t is the output of the reset gate, W xr and W hr are the weights of the reset gate, and b r is the bias of the reset gate.
[0277] is the candidate hidden state, W xh and W hh are the weights for calculating the candidate hidden state, b h is the bias for calculating the candidate hidden state, tanh represents the hyperbolic tangent activation function, ⊙ represents the Hadamard product operation, and h t is the hidden state at the current time step.
[0278] In this embodiment, the current time step may refer to the current moment, the historical time step may refer to the previous moment, and the future time step may refer to the next moment.
[0279] The output of a single Bi-GRU is then the concatenation of the outputs of the forward and reverse GRUs, as shown in the following equation:
[0280]
[0281] where H t is the hidden state of the current time step of the final output, and are the hidden states output by the forward and reverse GRUs at the current time step, respectively.
[0282] Furthermore, the multi-head attention mechanism is adopted to perform global information fusion on the total output result H = [H 1 , H 2 ,..., H T of the Bi-GRU. First, the query matrix, key matrix, and value matrix of each head are calculated:
[0283]
[0284] Among them, Q h , K h , and V h are the output results corresponding to the query matrix, key matrix, and value matrix respectively, is the weight matrix.
[0285] Then, the attention score α h is calculated, and the weighted value A h is calculated through the attention score. Finally, the outputs of all heads are combined to obtain the fused global information A. The process is shown in the following formula:
[0286]
[0287] A h = α h V h
[0288] A = [A 1 , A 2 ,..., A H W A
[0289] Among them: softmax is the normalization calculation, d k is the dimension of K h , and W A is the weight matrix.
[0290] Finally, the output A of the multi-head attention mechanism is input into the multi-layer perceptron to obtain the output Y. When the model makes predictions, Monte Carlo Dropout is applied for uncertainty evaluation. Through multiple forward propagations, a certain number of neurons are discarded with a certain probability each time to obtain multiple groups of outputs, and finally the distribution Y final of the output is obtained. The calculation process is shown in the following formula.
[0291] Y = σ(W y A + b y )
[0292]
[0293] In the formula: W y and b yare the weights and biases of the fully connected layer, σ is the Sigmoid activation function, D (i) is the mask of the neurons retained in the i-th forward propagation, μ y and σ y are respectively the mean and standard deviation of.
[0294] In some embodiments, the data in the battery dataset is time series data composed of current, voltage, and ambient temperature. The battery temperature estimation device divides the data into a cross-validation set and a test set according to a ratio of 4:1. The cross-validation set is used to train and tune the deep learning model. The five-fold cross-validation method is adopted, and the optimizer used for model training is Ada m , and the loss function uses RMSE (root mean square error). The test set is used to test the generalization ability of the deep learning model to avoid overfitting of the model. After the model training is completed, the historical time series data of the corresponding parameters can be input, and the temperature estimation of the future time step can be output.
[0295] S103. Construct an electrochemical-thermal coupling model based on the model-driven method, identify the model parameters using the test data, and use the state estimation algorithm to estimate the temperature at future time steps.
[0296] Among them, the electrochemical-thermal coupling model is composed of an electrochemical model and a thermal model.
[0297] In this embodiment, the electrochemical model adopted is SPM e (single particle model with electrolyte), and its schematic diagram is as Figure 2 shown. It is a simplified mathematical model used to describe the dynamic behavior of lithium ions in a lithium-ion battery. This model assumes that the electrode material consists of a single independent single particle, focuses on the lithium ion diffusion inside the particle and the electrochemical reaction with the electrolyte, and can better reflect the migration process of lithium ions between the electrode and the electrolyte interface by considering the transport characteristics of the electrolyte.
[0298] The equations of the particles in SPM e are as follows:
[0299]
[0300] In the formula: c s,k is the lithium concentration equation of the representative particle in the k region, r k is the radial coordinate of the particle in the electrode, N s,k is the solid-phase lithium ion flux in the k region, D s,k is the solid-phase diffusion coefficient, n represents the negative electrode, and p represents the positive electrode.
[0301] The equations related to the electrolyte are as follows:
[0302]
[0303] N e,n | x=0 = 0
[0304] N e,p | x=L = 0
[0305] c e,k (x, 0) = 0, k ∈ {n, s, p}
[0306] where ∈ k is the electrolyte volume fraction, c e,k is the equation governing the first-order correction behavior of the lithium concentration in the dominant electrolyte, N e,k is the lithium-ion flux in the electrolyte within the k region, x is the coordinate in the battery thickness direction, F is the Faraday constant, L n and L p are the negative electrode thickness and the positive electrode thickness respectively, {n, s, p} represent the negative electrode, the separator, and the positive electrode respectively, De is the solid-phase diffusion coefficient, t + is the transfer coefficient, I is the current density, R is the gas constant, and T is the temperature.
[0307] In some possible application scenarios, the electrochemical model can also be one of the SPM, P2D, etc. models.
[0308] The thermal model adopted in this embodiment is a lumped thermal model and can be obtained by solving the following ordinary differential equation:
[0309]
[0310] In the formula: ρ eff is the equivalent volume heat capacity, T and t are the temperature and time respectively, is the average heat source term, h is the heat transfer coefficient, A is the cooling surface area, V is the volume of the battery, T e is the ambient temperature, ρ k is the density, c p,k is the specific heat capacity, L k is the thickness of each component, {cn, n, s, p, cp} represent the negative electrode current collector, the negative electrode, the separator, the positive electrode, and the positive electrode current collector respectively.
[0311] Furthermore, the heat generated by the battery consists of four parts:
[0312] (1) The ohmic heat Q Ohm,k .
[0313] (2) The irreversible heating Q rxn,k .
[0314] (3) Reversible heating Q caused by entropy change in the electrode rev,k .
[0315] (4) Heating Q caused by contact resistance cr .
[0316] Specifically, the heat of these four parts satisfies the following relationship:
[0317] Q = Q Ohm,k + Q rxn,k + Q rev,k + Q cr
[0318]
[0319] Q rxn,k = a k j k η k
[0320]
[0321] Wherein, i k is the current, φ k is the electric potential, a k is the surface area to volume ratio, j k is the surface current density, η k is the overpotential, U is the open circuit voltage, R cr is the contact resistance, V cell is the total volume of the battery.
[0322] In some embodiments, the battery temperature estimation device uses battery test data and uses a genetic algorithm to identify the parameters of the electrochemical-thermal coupling model. The output of the electrochemical-thermal coupling model is Y model , which depends on the parameter set P = [p 1 , p 2 ,..., p n , and the actual data is Y true , and the parameter identification task can be defined as:
[0323]
[0324] P * = argmin P F(P)
[0325] In the formula: N is the total number of samples of the test data, t i represents the time step, and P * is the optimal parameter set.
[0326] Furthermore, the battery temperature estimation device adopts an electrochemistry-thermal coupling model that has completed calibration (i.e., parameter identification), and uses a state estimation algorithm to estimate the temperature at future time steps. In this embodiment, the state estimation algorithm adopts AEKF (Adaptive Extended Kalman Filter) to address the problem of dynamic changes in noise caused by dynamic changes in driving conditions and the environment in practical applications.
[0327] Among them, the observation model of the battery temperature can be expressed as:
[0328] y(k) = Hx(k) + v(k)
[0329] In the formula: y(k) is the observed value at the next moment, that is, the estimated temperature of the battery at the next moment, x(k) is the state vector of the system, H is the observation matrix, and v(k) is the noise.
[0330] AEKF can dynamically adjust the process noise Q and the measurement noise R as follows:
[0331]
[0332] In the formula, k Q and k R are adaptive gains, and are the variances of the state vector and the observed variable respectively.
[0333] In the prediction step, the current state x(k - 1) and the control input u(k) at the next moment are used to predict the current state x(k), as well as the predicted covariance matrix P(k):
[0334] x(k|k - 1) = Fx(k - 1) + Bu(k)
[0335] P(k|k - 1) = FP(k - 1)F T + Q
[0336] In the formula: F and B are the state transition matrix and the control input matrix respectively.
[0337] The update formula for the state is:
[0338] x(k|k) = x(k|k - 1) + K(k)(y(k) - Hx(k|k - 1))
[0339] The calculation of the Kalman gain K(k) is as follows:
[0340] K(k) = P(k|k - 1)H T (HP(k|k - 1)H T + R) -1
[0341] The update formula for covariance is as follows:
[0342] P(k|k) = (I - K(k)H)P(k|k - 1)
[0343] Substitute the state estimation result at the current moment into the observation equation to obtain the estimated result y of the battery temperature. md ~(Hx(k), HP(k)H T +R).
[0344] S104. Adopt Bayesian inference, with the output of the physical model as the prior distribution and the output of the data model as the likelihood function, and calculate the posterior distribution.
[0345] Bayesian inference is a statistical inference method. Based on Bayes' theorem, it uses existing prior knowledge (prior probability) and new observed data (likelihood) to update the belief in an event (posterior probability).
[0346] In some embodiments, the battery temperature estimation device obtains the output result set of the data model (i.e., the deep learning model), and determines the likelihood function p(D|θ) according to the mean and variance of the result set.
[0347] Furthermore, the battery temperature estimation device takes the output result y of the physical model md , as the prior distribution p(θ), and uses the output Y of the data-driven model dd as the likelihood function p(D|θ) to calculate the posterior distribution. In some embodiments, S104 can be as Figure 5 shown.
[0348] Among them, the following relationship is satisfied among the posterior distribution, the prior distribution, and the likelihood function:
[0349]
[0350] Among them, p(D) is the marginal likelihood.
[0351] Generally, it is difficult to calculate the marginal likelihood p(D). Therefore, the variational inference method can be used for approximate calculation, and the variational lower bound can be expressed as:
[0352]
[0353] By optimizing the variational parameter φ to maximize the lower bound, an approximate value of the marginal likelihood can be obtained. Among them, the optimal variational parameter satisfies the following relationship:
[0354]
[0355] Furthermore, the approximate value of the marginal likelihood satisfies the following relationship:
[0356]
[0357] where p′(D) is an approximation of the marginal likelihood.
[0358] Furthermore, the posterior distribution satisfies the following relationship:
[0359]
[0360] where p(θ|D) is the posterior distribution, p(D|θ) is the likelihood function, p(θ) is the prior distribution, and p′(D) is an approximation of the marginal likelihood.
[0361] S105, using the mean of the posterior distribution as the final temperature estimation result and the variance as a measure of the uncertainty of the temperature estimation result.
[0362] Specifically, the battery temperature estimation device uses the mean μ of the posterior distribution pd , as the estimation result of the final temperature, and the variance as a measure of the uncertainty of the temperature estimation result.
[0363] In the above solution, the first state information of the battery at the previous moment and the second state information at the current moment are input into the battery temperature estimation model obtained based on data-driven to obtain multiple first temperature estimation results of the battery at the next moment; the current and voltage of the battery at the current moment are input into the electrochemical-thermal coupling model formed based on the physical model to obtain the state estimation result of the battery at the next moment, and then the second temperature estimation result is obtained; the likelihood function is determined based on the multiple first temperature estimation results; the second temperature estimation result is used as the prior distribution; and the posterior distribution is calculated using the likelihood function and the prior distribution; and the final temperature estimation result of the battery at the next moment is obtained according to the posterior distribution. The battery temperature estimation method provided in this application takes into account the deficiency that the battery temperature estimation model obtained based on data-driven has a decrease in accuracy under different operating conditions, and the accuracy of the electrochemical-thermal coupling model based on the physical model may be inferior to that of the battery temperature estimation model under a single operating condition. By determining the likelihood function from the multiple first temperature estimation results, the response ability to real-time data changes is enhanced, and by using the second temperature estimation result as the prior distribution and calibrating the output result of the battery temperature estimation model using the temperature estimation result of the physical model, the obtained final temperature estimation result is more accurate.
[0364] Please continue to refer to Figure 6 , Figure 6 which is a schematic structural diagram of an embodiment of the terminal device provided in this application. The terminal device 500 in the embodiment of this application includes a processor 51 and a memory 52.
[0365] The processor 51 and the memory 52 are connected to a bus. Program data is stored in the memory 52, and the processor 51 is configured to execute the program data to implement the battery temperature estimation method described in the above embodiments.
[0366] In an embodiment of the present application, the processor 51 may also be referred to as a CPU (Central Processing Unit). The processor 51 may be an integrated circuit chip with signal processing capabilities. The processor 51 may also be a general-purpose processor, a digital signal processor (DSP, Digital Signal Process), an application-specific integrated circuit (ASIC, Application Specific Integrated Circuit), a field-programmable gate array (FPGA, Field Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor, or the processor 51 may also be any conventional processor, etc.
[0367] The present application also provides a computer storage medium. Please continue to refer to Figure 7 , Figure 7 FIG. is a schematic structural diagram of an embodiment of a computer storage medium provided by the present application. Program data 61 is stored in the computer storage medium 600. When the program data 61 is executed by a processor, it is used to implement the battery temperature estimation method described in the above embodiments.
[0368] When the embodiments of the present application are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.
[0369] The above are only the embodiments of the present application, and do not limit the patent scope of the present application accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be similarly included in the patent protection scope of the present application.
Claims
1. A method for estimating battery temperature, characterized in that: The method comprises: Inputting the first state information of the battery at the previous moment and the second state information of the battery at the current moment into a battery temperature estimation model to obtain a plurality of first temperature estimation results of the battery at the next moment; Inputting the current and voltage of the battery at the current moment into an electrochemical-thermal coupling model to obtain a state estimation result of the battery at the next moment, and then obtaining a second temperature estimation result; Determining a likelihood function based on a plurality of the first temperature estimation results; Using the second temperature estimation result as a prior distribution; and using the likelihood function and the prior distribution to calculate the posterior distribution; According to the posterior distribution, a final temperature estimation result of the battery at the next moment is obtained.
2. The method according to claim 1, characterized in that: The battery temperature estimation model includes a feature embedding layer, a bidirectional gated recurrent network layer, a multi-head attention network layer, and a multi-layer perceptron connected in sequence; The first state information of the battery at the previous moment and the second state information of the battery at the current moment are input into the battery temperature estimation model to obtain multiple first temperature estimation results of the battery at the next moment, including: Inputting the first state information and the second state information into the feature embedding layer to obtain a feature embedding result; Inputting the feature embedding result into the bidirectional gated recurrent network layer to obtain a first result; Inputting the first result into the multi-head attention network layer to obtain a second result; The second result is input into the multilayer perceptron to obtain a plurality of first temperature estimation results.
3. The method according to claim 2, characterized in that The multilayer perceptron includes a first linear layer, an activation function layer, a Monte Carlo dropout layer, and a second linear layer connected in sequence; The step of inputting the second result into the multi-layer perceptron to obtain a plurality of the first temperature estimation results includes: Inputting the second result into the first linear layer to obtain a third result; Inputting the third result into the activation function layer to obtain a fourth result; Inputting the fourth result into the Monte Carlo dropout layer to obtain a plurality of fifth results; Each of the fifth results is input into the second linear layer respectively, so as to obtain a plurality of the first temperature estimation results.
4. The method according to claim 1, characterized in that: The determining of a likelihood function based on the plurality of first temperature estimation results comprises: Obtaining an average value and a variance of a plurality of the first temperature estimation results; Based on the mean and the variance, the likelihood function is determined.
5. The method according to claim 1, characterized in that The calculating the posterior distribution by using the likelihood function and the prior distribution comprises: Constructing a variational lower bound function using the likelihood function and the prior distribution; By maximizing the variational lower bound function, an approximate value of the marginal likelihood is obtained; The posterior distribution is calculated using the likelihood function, the prior distribution and the approximation of the marginal likelihood.
6. The method according to claim 1, characterized in that The battery temperature estimation model is pre-trained in the following way: Acquire time sequence state information of a plurality of batteries under different driving conditions, and a first battery temperature corresponding to the next moment of the time sequence state information; The battery temperature estimation model is trained using the time series state information and the first battery temperature.
7. The method according to claim 1, characterized in that The electrochemical-thermal coupling model is pre-identified by: Obtaining voltages and currents of a plurality of batteries under different test conditions, and a second battery temperature corresponding to the voltages and the currents; The voltage, the current and the second battery temperature are used to identify parameters in the electrochemical-thermal coupling model.
8. The method according to claim 1, characterized in that The electrochemical-thermal coupling model consists of an electrochemical model and a thermal model, wherein the electrochemical model is a single particle model containing an electrolyte, and the thermal model is a lumped thermal model.
9. A terminal device, characterized in that: The terminal device includes a processor and a memory connected to the processor, wherein: The memory stores program instructions; The processor is configured to execute program instructions stored in the memory to implement the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The storage medium stores program instructions, and when the program instructions are executed, the method according to any one of claims 1 to 8 is implemented.