A method and device for predicting state of charge of lithium batteries based on model fusion
Through model fusion technology, combining the Thevenin equivalent circuit model and CrossFormer deep learning model, using the energy valley optimization algorithm and entropy weight method, the problem of low prediction accuracy of a single model is solved, and the prediction accuracy and stability of lithium battery SOC are improved. Enhanced characterization of battery health.
Patent Information
- Application Number
- CN202311820312.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2043-12-26
AI Technical Summary
The existing single model predicts lithium battery SOC with low accuracy and poor stability, and cannot fully characterize the battery health.
A method based on model fusion is adopted, combining the second-order Thevenin equivalent circuit model and the CrossFormer deep learning model, and using the energy valley optimization algorithm and the entropy weight method for parameter identification and data fusion to improve the accuracy and reliability of SOC prediction.
It significantly improves the accuracy and stability of the lithium battery state-of-charge estimation model, reduces the robustness risk of a single model, enhances the ability to characterize battery health, and avoids over-fitting.
Smart Images

Figure CN117783875B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of lithium battery state of charge detection, and specifically relates to a lithium battery state of charge prediction method and device based on model fusion. Background Art
[0002] State of charge is one of the core parameters of the battery management system (BMS). BMS monitors and estimates the state of charge (SOC) of the battery to ensure that the battery works efficiently while avoiding battery damage caused by overcharging or over-discharging. Accurate estimation of SOC helps to reasonably utilize the power provided by the battery, improve the utilization rate of the battery, and extend the service life of the battery pack. At the same time, it should be noted that the estimation of SOC is affected by many factors, such as temperature, charge and discharge rate, battery aging, etc. Therefore, the battery management system needs to constantly correct the SOC to maintain its accuracy, which can prevent the battery from working at too high or too low a state of charge, thereby reducing the aging and self-discharge rate of the battery and extending the service life of the battery. Through real-time monitoring and prediction of SOC, abnormal conditions such as overcharging and over-discharging of the battery can be discovered in time, so that corresponding measures can be taken to avoid the occurrence of safety accidents. Accurate prediction of the state of charge of lithium batteries is of great significance for improving battery performance, extending battery life, optimizing energy management and ensuring safety.
[0003] The state of charge of a lithium battery is the ratio of the remaining battery power to the fully charged state capacity, and this ratio ranges from 0 to 1. When the SOC is 0, it means that the battery has been fully discharged; when the SOC is 1, it means that the battery has been fully charged. In practical applications, a variety of algorithms and methods are often used to estimate the SOC. Accurate prediction of the SOC can help people use battery energy reasonably during the charging and discharging process, avoid overcharging or over-discharging, and thus improve battery utilization. The advantage of this method is that there is no need to deeply study the complex chemical reaction mechanism inside the lithium battery. The battery's charge state can be predicted by monitoring easily measurable parameters such as voltage and current as well as historical data; however, this method also has obvious shortcomings, namely, the single prediction model is more random and less robust, and cannot fully characterize information on the battery's health status. Summary of the invention
[0004] Purpose of the invention: In view of the low accuracy and poor stability of the existing single model for predicting the SOC of lithium batteries, this invention provides a method and device for predicting the state of charge of lithium batteries based on model fusion, which can significantly improve the accuracy of the lithium battery state of charge estimation model.
[0005] Technical solution: The present invention discloses a method for predicting the state of charge of a lithium battery based on model fusion, comprising the following steps:
[0006] (1) Collect the initial battery data of the lithium-ion battery, obtain the training set required for the second-order Thevenin equivalent circuit model, and preprocess it:
[0007] (2) Establishing a second-order Thevenin equivalent circuit model of a lithium battery, and transforming the equivalent circuit model equation into a mathematical form that can be recognized by a computer and includes the terminal voltage, open circuit voltage, capacitance, and parameters to be determined of the lithium battery;
[0008] (3) Based on the improved energy valley optimization algorithm IEVO, the second-order Thevenin equivalent circuit model is parameter identified to obtain the optimized second-order Thevenin equivalent circuit model of the lithium battery, and the SOC prediction data of the lithium battery is calculated using the ampere-hour integration method; the improved energy valley optimization algorithm IEVO adopts a multi-kernel learning method to perform local multivariate search on the position of the population during the iteration process; and adopts a chaotic local search strategy to find a better solution by searching the vicinity of each solution;
[0009] (4) Inputting the preprocessed lithium battery data set into the CrossFormer deep learning model after random initialization parameters for training, obtaining a trained deep learning model, and thus obtaining lithium battery SOC prediction data;
[0010] (5) The SOC prediction data of the two models obtained in step (3) and step (4) are fused by the entropy weight method to obtain the final state of charge of the lithium battery.
[0011] Furthermore, the data set in step (1) includes charging and discharging data of the lithium battery, open circuit voltage, lithium battery temperature, internal resistance, capacity, operating current and corresponding state of charge indicators.
[0012] Furthermore, the data processing in step (1) is to first filter the training data using a Savitzky-Golay filter and then perform z-score normalization.
[0013] Furthermore, in step (2), a second-order Thevenin equivalent circuit model is established, and the state space equation of the equivalent circuit model is as shown in the following formula:
[0014] U O =U OC -U P1 -U P2 -IR
[0015]
[0016] Where U P1 and U P2 are the voltages of the two RC loops in the second-order Thevenin equivalent circuit model; R P1 , R P2 is the two polarization internal resistance of the battery; C P1 , C P2 are the two polarization capacitors of the battery; U OC Represents the open circuit voltage; U O is the terminal voltage; R is the internal resistance of the battery; I is the total current in the circuit; R P1 , R P2 , C P1 , C P2 , U OC is the parameter to be identified.
[0017] Furthermore, the implementation process of step (3) is as follows:
[0018] The lithium battery state space equation is embedded into the energy valley optimization algorithm EVO, and after repeated iterations, the equivalent circuit parameters of R1, R2, C1, and C2 are identified;
[0019] Perform the initialization process and set the parameters X i Assume particles with different stability levels in the search space:
[0020]
[0021]
[0022] Where n represents the total number of particles in the search space, d is the dimension of the problem considered, is the jth decision variable that determines the initial position of the i-th candidate, and They represent the lower and upper bounds of the j variables in the ith candidate variable, respectively. rand is a random number uniformly distributed in the range [0,1].
[0023] Adding a chaotic local search strategy uses the chaotic phenomenon to generate a set of initial solutions with randomness and uniformity:
[0024]
[0025] in, represents the new solution generated at the t+1th iteration using the chaotic local search strategy, and They represent two different individuals randomly selected from the dominant group, C t represents the chaotic value generated by the chaotic map of the tth iteration;
[0026] The SOC value is obtained by the ampere-hour integration method:
[0027]
[0028] Where U1(t), U2(t) are the electrochemical polarization voltages of lithium batteries:
[0029]
[0030] Where C represents the capacitance of the lithium battery, i L (t) is the working current of the lithium battery during charging and discharging at time t, and SOC(0) represents the SOC1 value of the lithium battery at the initial moment.
[0031] Furthermore, the implementation process of step (4) is as follows:
[0032] L2 regularization optimization of the CrossFormer deep learning model:
[0033]
[0034] Among them, L(w) is the loss function with L2 regularization, loss(w,x) is the original loss function of the model, and w is the weight vector of the model. is the square of the L2 norm of the weight vector, and λ is the regularization parameter used to control the strength of regularization;
[0035] Use dimension segmentation to embed multivariate time series; the hierarchical encoder-decoder structure uses larger scale information for prediction in the Crossformer deep learning model, adds the prediction values of different scales, and outputs the final result SOC2.
[0036] Furthermore, the implementation process of step (5) is as follows:
[0037] Each indicator is de-dimensionalized and the data is standardized: two data sets {SOC1, SOC2}, where SOC i ={x1,x2,…,x n}, the standardized value of each data set is {SOC1 * ,SOC2 *},So:
[0038]
[0039] Find the size of the variation in each dataset:
[0040]
[0041] Find the information entropy of each data set. According to the definition of information entropy, the information entropy of a set of data is:
[0042]
[0043] Among them, E i ≥0, if p ij =0, define E i =0; determine the weight of each indicator, and calculate the information entropy of each data set as E1, E2 according to the information entropy calculation formula;
[0044] The weight of each indicator is calculated by information entropy:
[0045]
[0046] Data fusion uses the entropy weight estimation algorithm, as shown in the formula:
[0047]
[0048] Where SOC is the final state of charge prediction of the lithium battery after fusion.
[0049] A device according to the present invention includes a memory and a processor, wherein:
[0050] A memory for storing computer programs that can be run on the processor;
[0051] The processor is used to execute the steps of the lithium battery state of charge prediction method based on model fusion as described above when running the computer program.
[0052] Beneficial effects: Compared with the prior art, the present invention has the following beneficial effects:
[0053] In view of the problems of low accuracy and poor parameter stability of the traditional second-order Thevenin equivalent circuit during parameter identification, the present invention combines the energy valley optimization algorithm to improve the global optimization ability and local search ability during parameter identification, so that the algorithm is more refined in the process of finding high-quality solutions, and provides more accurate parameters for SOC estimation to improve accuracy; the CrossFormer deep prediction model has too many parameters, which will cause the model to require a lot of computing resources and time during training. In addition, too many parameters may also cause the model to overfit, thereby reducing the prediction performance. L2 regularization is used to reduce the number of model parameters, thereby reducing the risk of overfitting; the present invention adopts a model fusion method to comprehensively consider the internal chemical reactions of the battery during operation and accurately simulate the external dynamic response of the battery. The multi-model prediction method can make full use of the characteristics of different models, realize complementary advantages, reduce the risk of a single model, and improve the reliability of the prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is a flow chart of the lithium battery state of charge prediction method based on model fusion;
[0055] Figure 2 This is the second-order Thevenin equivalent circuit diagram provided by the present invention. DETAILED DESCRIPTION
[0056] The present invention will be further described in detail below in conjunction with the accompanying drawings.
[0057] like Figure 1 As shown, the present invention provides a lithium battery state of charge prediction method based on model fusion, which uses a Savitzky-Golay filter to first filter the training data and then perform z-score normalization, which can effectively reduce noise interference, improve data quality, and improve model efficiency; three models of second-order Thevenin equivalent circuit and CrossFormer deep learning are established. In order to improve EVO and improve search efficiency and search accuracy, a chaotic local search strategy is introduced to improve EVO, and an improved algorithm (IEVO) is obtained. IEVO is used to identify the parameters of the second-order Thevenin, and then the lithium battery SOC is solved according to the calculation formula. Finally, the entropy weight method is used to perform weighted fusion on the SOC of two groups of lithium batteries, which can effectively predict the charge state and improve the model prediction accuracy. The specific steps are as follows:
[0058] Step 1, obtain the historical usage data of lithium batteries. The data set includes the charging and discharging data, open circuit voltage, lithium battery temperature, internal resistance, capacity, working current and the corresponding state of charge indicators of lithium batteries. The training data is first filtered using a Savitzky-Golay filter and then z-score normalized, which can effectively reduce noise interference, improve data quality, simplify the data processing process, and improve the performance and prediction accuracy of the model.
[0059] The Savitzky-Golay filter is used to filter the training data first, and then z-score normalization is performed, including the following steps:
[0060] Use SG filter to perform polynomial fitting on the data in the window. Assume that the width of the filter window is n=2m+1, the length of the original signal is N, and the data to be smoothed in the window is: x i =(x -m ,x -m+1 ,…,x0,x1,…,x m-1 ,x m ), use (k-1) degree polynomial to perform polynomial fitting on the data in the window:
[0061] y i=a0+a1x+a2x 2 +…+a k-1 x k-1 (1)
[0062] The fitting parameters are determined by the least squares method. Such n equations constitute a k-dimensional linear equation system (n>k), and the fitting parameters a0, a1, a2, …, a are determined by the least squares method. k-1 .Right now:
[0063]
[0064] Its matrix expression is:
[0065] Y (2m+1)×1 =X (2m+1)×k ·A k×1 +E (2m+1)×1 (3)
[0066] The least squares solution of A for:
[0067]
[0068] After filtering, the output value or predicted value for:
[0069]
[0070] The z-score normalization process is as follows:
[0071]
[0072] Among them, x is the data to be normalized, x' is the normalized data, μ is the mean value of the data, and S is the standard deviation.
[0073] Step 2: Establish a second-order Thevenin equivalent circuit model of the lithium battery, and transform the equivalent circuit model equation into a mathematical form that can be recognized by a computer and includes the terminal voltage, open circuit voltage, capacitance and parameters to be determined of the lithium battery, so as to prepare for model identification.
[0074] Establish as Figure 2 The second-order Thevenin shown, its state space equation can be expressed by the following formula:
[0075] U O =U OC -U P1 -U P2 -IR (7)
[0076]
[0077] Where: UP1 and U P2 are the voltages of the two RC loops in the Thevenin circuit model, R P1 , R P2 is the two polarization internal resistance of the battery, C P1 , C P2 are the two polarization capacitors of the battery; U OC Represents the open circuit voltage, U O is the terminal voltage; R is the internal resistance of the battery; I is the total current in the circuit, R P1 , R P2 , C P1 , C P2 , U OC , are the parameters to be identified.
[0078] Step 3, improve the energy valley optimization algorithm EVO, optimize the algorithm using a chaotic local search strategy, and obtain the IEVO algorithm. Combine the mathematical form of the above steps with the improved energy valley optimization algorithm IEVO to calculate the various parameters to be determined in step S1, and then complete the parameter identification of the equivalent circuit model to obtain a complete second-order Thevenin equivalent circuit model of the lithium battery, and use the ampere-hour integration method to calculate the SOC prediction data SOC1 of the lithium battery.
[0079] The lithium battery state space equation is embedded into the energy valley optimization algorithm (EVO), and the equivalent circuit parameters of R1, R2, C1, and C2 are identified through repeated iterations.
[0080] Perform the initialization process and set the parameters X i Assume particles with different stability levels in the search space:
[0081]
[0082]
[0083] Where n represents the total number of particles in the search space, d is the dimension of the problem considered, is the jth decision variable that determines the initial position of the i-th candidate, and They represent the lower and upper bounds of the j variables in the ith candidate variable, respectively, and rand is a random number uniformly distributed in the range of [0,1].
[0084] By simulating the iterative process in which particles with different stability levels release energy through decay to reach a stable level in the physical process, the optimal solution for each parameter in the second-order Thevenin equivalent circuit model can be found.
[0085] Determine the enrichment bound (EB) of the particle, which is used to consider the difference between neutron-rich particles and neutron-poor particles. The objective function is evaluated for each particle and determined as the neutron enrichment level (NEL) of the particle. The mathematical expression is as follows:
[0086]
[0087] Among them, NEL i is the neutron enrichment level of the ith particle, and EB is the enrichment bound of particles in the universe.
[0088] According to the objective function evaluation, the stability level of the particles is determined as follows:
[0089]
[0090] Among them, for the SL i BS and WS are the particles with the best and worst stability in the universe, and their stability levels are respectively equivalent to the minimum and maximum values of the objective function found so far.
[0091] In the main search loop of EVO, if the neutron enrichment level of the particle is above the enrichment limit (NEL i >EB) then it is assumed that the particle has a large N / Z ratio, and it makes sense to use the decay process in α, β or γ format. A random number is generated in the range [0,1] to simulate the stability bound (SB) in the universe. If the stability level of the particle is higher than the stability bound (SL i >SB), then alpha and gamma decays are considered to occur, which is mathematically expressed as one of the position update schemes of EVO, where a new candidate solution is generated. Generate two random integers, namely Alpha Index1 in the range [1, d] (indicating the number of emitted rays) and Alpha Index2 in the range [1, Alpha Index1] (defining the alpha ray to be emitted).
[0092] The emitted rays are decision variables in the candidate solutions, which are removed and replaced by the solution with the best stability level (X BS ) of the particle or ray in the candidate solution. The mathematical formulas for these aspects are as follows:
[0093]
[0094] in is a newly generated particle in the universe, X i is the current position vector of the i-th particle (candidate solution) in the universe (search space), X BS is the position vector of the particle with the best stability level, is the jth decision variable or emitted ray.
[0095] Furthermore, in gamma decay, gamma rays are emitted to increase the stability level of the excited particles, so this aspect can be mathematically formulated as another position update process of EVO, in which new candidate solutions are generated. For this purpose, two random integers are generated: Gamma Index1 is in the range [1, d] and represents the number of emitted photons; in this case, the total distance between the considered particle and the other particles is calculated as follows, and the nearest particle is used:
[0096]
[0097] in is the total distance between the ith particle and the kth neighboring particle, (x1, y1) and (x2, y2) represent the coordinates of the particles in the search space, and using these operations, the position update process for generating the second candidate solution at this stage is as follows:
[0098]
[0099] in is a newly generated particle in the universe, X i is the current position vector of the i-th candidate solution in the search space, X Ng is the position vector of the neighboring particles around the ith particle, is the jth decision variable. Gamma Index2 is in the range [1, GammaIndex1] and indicates which photons in the particle are considered. The photons in the particle are the decision variables in the candidate solution, and they are removed and replaced by neighboring particles or candidate X Ng This mimics the interaction of excited particles with other particles and even magnetic fields.
[0100] Adding a chaotic local search strategy uses the chaotic phenomenon to generate a set of initial solutions with randomness and uniformity:
[0101]
[0102] in, represents the new solution generated at the t+1th iteration using the chaotic local search strategy, and They represent two different individuals randomly selected from the dominant group, C t represents the chaotic value generated by the chaotic map of the tth iteration.
[0103] If the stability level of the particle is below the stability limit (S Li ≤SB), it is considered that β decay has occurred, and the particle position is updated.BS and particle center X CP These aspects of the algorithm simulate the tendency of particles to reach a stable band, where most known particles are located near this band and most have higher stability. The mathematical formula is as follows:
[0104] By the current particle position X i Get the current particle center position X CP :
[0105]
[0106]
[0107] expression represents the new vector position, X BS is the optimal particle position, SL i is the stability level of the ith particle, r1 and r2 are two random numbers in the range [0,1], which determine the amount of movement of the particle.
[0108] If the neutron enrichment level of a particle is below the enrichment limit (NEL i ≤EB), the particle is considered to have a small N / Z ratio, and therefore the particle tends to move towards the stable band through electron capture or positron emission. In this regard, random motion in the search space is determined to consider these types of motion as follows:
[0109]
[0110] In the formula and X i is the future and current position vector of the i-th candidate solution in the search space, and r is a random number in the range [0,1] that determines the amount of particle motion.
[0111] At the end of the EVO main loop, if the enrichment level of a particle is above the enrichment limit, only two new position vectors are generated for each particle, namely and For particles with lower enrichment levels, only As the new position vector, at each state, the newly generated vector is merged with the current population, and the best particle participates in the next search cycle of the algorithm. For decision variables that exceed the predefined upper and lower bounds, the boundary violation flag is determined. The maximum number of objective function evaluations or the maximum number of iterations can be used as the termination criterion.
[0112] Finally, the particle with the best stability is returned, that is, we get the optimal solution for each parameter in the second-order Thevenin equivalent circuit model.
[0113] Step 3.3: Obtain the SOC value by the ampere-hour integration method:
[0114]
[0115] Where U1(t), U2(t) are the electrochemical polarization voltages of lithium batteries:
[0116]
[0117] Where C represents the capacitance of the lithium battery, i L (t) is the working current of the lithium battery during charging and discharging at time t, and SOC(0) represents the SOC1 value of the lithium battery at the initial moment.
[0118] Step 4, input the preprocessed stable lithium battery data set including: battery charging and discharging data, internal resistance, temperature, capacity, voltage, current, and SOC data into the CrossFormer deep learning model after random initialization parameters for training, and obtain the trained deep learning model, thereby obtaining the lithium battery SOC prediction data SOC2.
[0119] Establish the CrossFormer model and perform L2 regularization optimization on the CrossFormer deep learning model:
[0120]
[0121] Where L(w) is the loss function with L2 regularization, loss(w,x) is the original loss function of the model (e.g., mean squared error or cross entropy), and w is the weight vector of the model. is the square of the L2 norm of the weight vector, and λ is the regularization parameter used to control the strength of regularization. The larger the regularization parameter λ is, the greater the proportion of the regularization term in the loss function, and the greater the penalty for the weight.
[0122] The preprocessed lithium battery historical data set is embedded into the multivariate time series (MTS) using dimension-segment-wise (DSW) embedding: DSW embedding divides the points on each dimension of the lithium battery historical data set into segments of length Lseg and then embeds them:
[0123]
[0124]
[0125] is a d-dimensional seg The i-th paragraph of .
[0126] Each line segment is embedded into a vector using linear projection plus position embedding:
[0127]
[0128] Represents a learnable projection matrix Learnable position embeddings (i, d) representing locations.
[0129] After embedding, we get a two-dimensional vector array:
[0130]
[0131] Each h i,d Represents a univariate time series segment.
[0132] A two-stage attention (TSA) layer is used to effectively capture the dependencies between the processed lithium battery history dataset embedding segments. A two-stage attention (TSA) layer is used to capture the dependencies between data of different dimensions.
[0133] Given a two-dimensional array As the input of the TSA layer, L is the number of segments and D is the dimension. Here Z can be the DSW embedding or the output of the lower TSA layer. i,: Represents the vector of all dimensions at time step i, Z :,d represents a vector of all dimensions at time step d. In the cross-time stage, multi-head self-attention (MSA) is directly applied to each dimension:
[0134]
[0135]
[0136] Where 1≤d≤D, LayerNorm represents the widely used layer normalization, MLP represents the multi-layer feedforward network, MSA(Q,K,V) represents the multi-head self-attention layer, where Q; K; V are the query, key and value, and all dimensions 1≤d≤D share the same MSA layer. Z time represents the output of MSA and MLP. After this stage, in Z time The dependencies between time periods of the same dimension are captured in Z. Then, time Become the input to the cross-dimensional stage to capture cross-dimensional dependencies.
[0137] The second stage: the cross-dimensional stage, a fixed number of learnable vectors (c<<D) are set as routers for each time step i. These routers first aggregate messages from all dimensions by using routers as queries in MSA and vectors of all dimensions as keys and values. Then, the routers use the dimension vectors as queries and the aggregated messages as keys and values to assign the received messages to each dimension. In this way, all-to-all connections between D dimensions are established:
[0138]
[0139]
[0140]
[0141]
[0142] In the formula (c is a constant) as the learnable vector array of the router, is the aggregated message from all dimensions, represents the output of the router mechanism, and all time steps (1≤i≤L) share the same Z dim represents the skip connection output and the MLP output.
[0143] Connecting the equations for the cross-time phase and the cross-latitude phase yields:
[0144] Y=Z dim =TSA(Z) (32)
[0145] Where Z, Represents the input and output vector arrays of the TSA layer, respectively. After the cross-time and cross-dimensional stage, every two segments (ieZ i1,d1 ,Z i2,d2 ) are connected, so dependencies across time and dimensions are captured in Y.
[0146] The hierarchical encoder-decoder structure is used in the CrossFormer model for multivariate lithium battery state-of-charge time prediction and to obtain information at different scales.
[0147] In each layer of the encoder (except the first layer), every two vectors that are adjacent in time domain are merged to obtain a representation at a coarser level, and then TSA layers are applied to capture the dependencies at this scale. This process is modeled as Z enc,l =Encoder(Z enc,l-1 ):
[0148]
[0149]
[0150] Where H is the two-dimensional array obtained by DSW embedding, Z enc,l represents the output of the I-th layer encoder; represents the learnable matrix for segment merging, [·] represents the concatenation operation, and L l-1 Represents the number of line segments in each dimension in layer l-1. If it is not divisible by 2, Z enc,l-1 Fill to the appropriate length; Represents the array after the i-th layer segment is merged. Assuming that there are N layers in the encoder, use Z enc,0 ,Z enc,1 ,…,Z enc,N Z enc,0 Represents the N+1 outputs of the encoder.
[0151] Decoder: Obtain the N+1 feature arrays output by the encoder and use the N+1 layers (indexed 0, 1, ..., N) for prediction. The first layer takes the array encoded by the first layer as input and outputs the two-dimensional array decoded by the first layer. The process can be summarized as follows: dec,l =Decoder(Z dec,l-1 ,Z enc,l ):
[0152]
[0153]
[0154]
[0155]
[0156] In the formula represents the learnable position embedding of the decoder, is the output of TSA, and the MSA layer is As a query, As the key and value, the connection between the encoder and the decoder is established, and the output of MSA is recorded as Z dec,l They represent the jumper output and MLP output, with Z dec,0 ,Z dec,1 ,…,Z dec,N Denotes the decoder output, applies linear projection to the output of each layer to get the prediction of this layer, and adds the predictions of each layer to get the final prediction:
[0157]
[0158]
[0159] in is a learnable matrix that projects vectors into time series segments.
[0160] represents the i-th segment of prediction dimension d.
[0161]
[0162] All segments in layer l are rearranged to obtain layer predictions Add up the predictions of all layers to get the final prediction
[0163] Hierarchical encoder-decoders use the proposed DSW embedding, TSA layer and segment merging to construct a hierarchical encoder-decoder (HED), which uses information at a larger scale for prediction, adds the prediction values at different scales, and outputs the final result SOC2.
[0164] The key to predicting lithium battery SOC with CrossFormer neural network is to learn the characteristics of lithium battery historical data and fit the nonlinear curve behind it. The process is as follows: Data preparation: It is necessary to collect and organize the historical data of lithium batteries, which includes time series data of voltage, current, temperature, and other dimensions; Data preprocessing: Preprocess the collected historical data, including data cleaning, normalization, time series decomposition, etc., to ensure the quality and availability of the data; Model training: Input the preprocessed historical data into the CrossFormer model for training. The model will learn the cross-dependencies between different dimensions and establish the model's ability to predict the state of charge through historical data; State of charge prediction: Once the model training is completed, it can be used to predict the future state of charge. Input the new time series data into the trained CrossFormer model, and the model will generate a prediction result for the future state of charge;
[0165] Step 5: The SOC output data of the two models obtained in the above steps 3 and 4 are fused by the entropy weight method to obtain the final state of charge of the lithium battery.
[0166] First, each indicator is de-dimensionalized and the data is standardized. There are three data sets {SOC1, SOC2}, where SOC i ={x1,x2,…,x n}, assuming that the standardized value of each data set is {SOC1 * ,SOC2 *},So
[0167]
[0168] Find the size of the variation in each dataset:
[0169]
[0170] Find the information entropy of each data set. According to the definition of information entropy, the information entropy of a set of data is:
[0171]
[0172] Where E i ≥0. If p ij =0, define E i =0.
[0173] Determine the weight of each indicator, and calculate the information entropy of each data set as E1 and E2 according to the calculation formula of information entropy.
[0174] The weight of each indicator is calculated by information entropy:
[0175]
[0176] Data fusion uses the entropy weight estimation algorithm, as shown in the formula:
[0177]
[0178] Where SOC is the final state of charge prediction of the lithium battery after fusion.
[0179] The present invention also provides a device, including a memory and a processor, wherein the memory is used to store a computer program that can be run on the processor; the processor is used to execute the steps of the lithium battery state of charge prediction method based on model fusion as described above when running the computer program.
[0180] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent transformation or modification made according to the spirit of the present invention should be included in the protection scope of the present invention.
Claims
1. A lithium battery state of charge prediction method based on model fusion, characterized in that: The following steps are involved: (1) Collect the initial battery data of the lithium-ion battery, obtain the training set required for the second-order Thevenin equivalent circuit model, and preprocess it: (2) Establishing a second-order Thevenin equivalent circuit model of a lithium battery, and transforming the equivalent circuit model equation into a mathematical form that can be recognized by a computer and includes the terminal voltage, open circuit voltage, capacitance, and parameters to be determined of the lithium battery; (3) Based on the improved energy valley optimization algorithm IEVO, the second-order Thevenin equivalent circuit model is parameter identified to obtain the optimized second-order Thevenin equivalent circuit model of the lithium battery, and the SOC prediction data of the lithium battery is calculated using the ampere-hour integration method; the improved energy valley optimization algorithm IEVO adopts a multi-kernel learning method to perform local multivariate search on the position of the population during the iteration process; and adopts a chaotic local search strategy to find a better solution by searching the vicinity of each solution; (4) Inputting the preprocessed lithium battery data set into the CrossFormer deep learning model after random initialization parameters for training, obtaining a trained deep learning model, and thus obtaining lithium battery SOC prediction data; (5) The SOC prediction data of the two models obtained in step (3) and step (4) are fused by the entropy weight method to obtain the final state of charge of the lithium battery.
2. A lithium battery state of charge prediction method based on model fusion according to claim 1, characterized in that: The battery initial data in step (1) includes the charge and discharge data, open circuit voltage, lithium battery temperature, internal resistance, capacity, operating current and corresponding charge state indicators of the lithium battery.
3. A lithium battery state of charge prediction method based on model fusion according to claim 1, characterized in that: The preprocessing in step (1) is to first filter the training data using a Savitzky-Golay filter and then perform z-score normalization.
4. The method for predicting the state of charge of a lithium battery based on model fusion according to claim 1, characterized in that: In step (2), a second-order Thevenin equivalent circuit model is established, and the state space equation of the equivalent circuit model is shown in the following formula: U O =U OC -U P1 -U P2 -IR Where U P1 and U P2 are the voltages of the two RC loops in the second-order Thevenin equivalent circuit model; R P1 , R P2 is the two polarization internal resistance of the battery; C P1 , C P2 are the two polarization capacitors of the battery; U OC Represents the open circuit voltage; U O is the terminal voltage; R is the internal resistance of the battery; I is the total current in the circuit; R P1 , R P2 , C P1 , C P2 , U OC is the parameter to be identified.
5. The method for predicting the state of charge of a lithium battery based on model fusion according to claim 1, characterized in that: The implementation process of step (3) is as follows: The lithium battery state space equation is embedded into the energy valley optimization algorithm EVO, and after repeated iterations, the equivalent circuit parameters of R1, R2, C1, and C2 are identified; Perform the initialization process and set the parameters X i Assume particles with different stability levels in the search space: Where n represents the total number of particles in the search space, d is the dimension of the problem considered, is the jth decision variable that determines the initial position of the i-th candidate, and They represent the lower and upper bounds of the j variables in the ith candidate variable, respectively. rand is a random number uniformly distributed in the range [0,1]. Adding a chaotic local search strategy uses the chaotic phenomenon to generate a set of initial solutions with randomness and uniformity: in, represents the new solution generated at the t+1th iteration using the chaotic local search strategy, and They represent two different individuals randomly selected from the dominant group, C t represents the chaotic value generated by the chaotic map of the tth iteration; The SOC value is obtained by the ampere-hour integration method: Where U1(t), U2(t) are the electrochemical polarization voltages of lithium batteries: Where C represents the capacitance of the lithium battery, i L (t) is the working current of the lithium battery during charging and discharging at time t, and SOC(0) represents the SOC1 value of the lithium battery at the initial moment.
6. A lithium battery state of charge prediction method based on model fusion according to claim 1, characterized in that: The implementation process of step (4) is as follows: L2 regularization optimization of the CrossFormer deep learning model: Among them, L(w) is the loss function with L2 regularization, loss(w,x) is the original loss function of the model, and w is the weight vector of the model. is the square of the L2 norm of the weight vector, and λ is the regularization parameter used to control the strength of regularization; Use dimension segmentation to embed multivariate time series; the hierarchical encoder-decoder structure uses larger scale information for prediction in the Crossformer deep learning model, adds the prediction values of different scales, and outputs the final result SOC2.
7. A lithium battery state of charge prediction method based on model fusion according to claim 1, characterized in that: The implementation process of step (5) is as follows: Each indicator is de-dimensionalized and the data is standardized: two data sets {SOC1, SOC2}, where SOC i ={x1,x2,…,x n }, the standardized value of each data set is {SOC1 * ,SOC2 * },So: Find the size of the variation in each dataset: Find the information entropy of each data set. According to the definition of information entropy, the information entropy of a set of data is: Among them, E i ≥0, if p ij =0, define E i =0; determine the weight of each indicator, and calculate the information entropy of each data set as E1, E2 according to the information entropy calculation formula; The weight of each indicator is calculated by information entropy: Data fusion uses the entropy weight estimation algorithm, as shown in the formula: Where SOC is the final state of charge prediction of the lithium battery after fusion.
8. A device using the method according to any one of claims 1 to 7, characterized in that: comprising a memory and a processor, wherein: A memory for storing computer programs that can be run on the processor; A processor is used to execute the steps of the lithium battery state of charge prediction method based on model fusion as described in any one of claims 1 to 7 when running the computer program.
Citation Information
Patent Citations
Grey wolf optimization algorithm gene selection method based on diffusion and chaotic local search
CN112116952A
Updating method and device of pre-training model and electronic equipment
CN116186534A
Lithium battery health state prediction method
CN116679211A
Method for charging and testing rechargeable accumulators
JP1994511310A
Device and method for predicting state of battery
US20230076118A1
