A SOC estimation method considering battery capacity decay periodically
By establishing a battery model and combining PSO-LSTM and CHIF algorithms, online co-estimation of battery capacity and SOC is realized, solving the problem of ignoring aging factors and high randomness in the existing technology, improving the estimation accuracy and system flexibility Great.
Patent Information
- Application Number
- CN202411561735.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-11-05
AI Technical Summary
The prior art ignores the aging factors of the battery during charging and discharging when estimating the battery SOC, resulting in errors in SOC estimation. The Kalman filtering algorithm and the hyperparameter selection method of the LSTM network are very random, making it difficult to obtain the best combination.
A SOC estimation method that periodically considers the decay of battery capacity is proposed. By establishing a battery model, estimating battery capacity and model parameters based on the PSO-LSTM algorithm, and combining the CHIF algorithm to conduct online estimation of SOC, the online co-estimation of battery capacity and SOC is realized.
By considering battery aging factors, the accuracy of SOC estimation is improved, and the particle swarm optimization algorithm optimizes LSTM hyperparameters, improves the accuracy of battery capacity estimation, reduces the computational burden, and enhances the robustness of the system.
Smart Images

Figure CN119066990B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of battery technology, and in particular to a SOC estimation method that periodically considers battery capacity decay. Background Art
[0002] At present, the world's energy depletion and environmental crisis are becoming increasingly serious, and cars are one of the important carriers of energy consumption and air pollution, so the optimization of automobile energy efficiency, energy conservation and emission reduction are the current research hotspots. In order to solve the environmental pollution and energy crisis caused by traditional fuel vehicles, the development of clean and pollution-free electric vehicles has become a general trend. Lithium-ion batteries have many advantages such as long cycle life, low pollution, and low self-discharge rate. This technical route has been widely used in the field of new energy vehicles.
[0003] Battery safety management plays a vital role in vehicle safety management. Therefore, it is necessary to use a battery management system (BMS) with diagnostic, control and protection functions to manage and maintain the battery system of the vehicle. The estimation of battery capacity and state of charge (SOC) is an important part of the battery management system. SOC is an important real-time indicator that reflects that the remaining capacity of the battery exceeds the rated capacity. It is expressed as the ratio of the current available capacity to the maximum available capacity of the battery after a period of full charge. Accurately estimating the current actual capacity and SOC state of charge of the battery provides a basis for users to reasonably plan their trips and charge in time. It can also effectively prevent overcharging and over-discharging of the battery and extend the battery life. In the actual use of the battery, the chemical reactions inside the battery are time-varying and complex. The SOC of the battery is difficult to obtain by direct measurement. It can only be obtained indirectly by measuring the current, voltage, resistance and other parameter information of the existing battery through calculation. Moreover, after a long period of cycle use, the parameters such as resistance and capacity of the battery will continue to change, that is, the battery will gradually age. This process increases the difficulty of accurately estimating the battery SOC.
[0004] In the framework of the battery SOC estimation method, the aging factor of the battery during the charging and discharging process is usually ignored, and the battery capacity cannot be updated in real time, which makes the battery SOC estimated by the existing technology have certain errors. The existing technology usually uses the Kalman filter algorithm to estimate the battery SOC, but the iterative process of the Kalman filter algorithm is heavily dependent on the initial model and initial state estimation, and cannot fit the nonlinear change characteristics of the SOC well, nor can it handle the occurrence of disturbances in the system, and the estimation accuracy is limited. The existing technology uses a long short-term memory network (LSTM) to estimate the battery capacity. The hyperparameters in the LSTM network are usually selected based on experience, but this selection method is relatively random and often cannot obtain the best combination. Summary of the invention
[0005] In view of the above problems, the present invention proposes a SOC estimation method that periodically considers battery capacity decay.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] A method for estimating SOC by periodically considering battery capacity decay, the method comprising the following steps:
[0008] Establish a battery model, determine the battery model parameters based on battery aging experimental tests and data analysis, and extract battery aging features and conduct correlation analysis;
[0009] Battery capacity and model parameter estimation based on PSO-LSTM algorithm, SOC estimation based on CHIF algorithm, and joint estimation framework for online co-estimation of battery capacity and SOC;
[0010] Among them, the joint estimation framework mainly consists of two parts: 1) using the PSO-LSTM algorithm to predict the battery capacity and model parameters, and taking the battery aging characteristic parameter AC as the input of the LSTM model; 2) online SOC estimation based on the CHIF algorithm, and updating the battery capacity in real time during the SOC estimation process.
[0011] As a further technical solution of the present invention, the step of establishing the battery model includes:
[0012] Different battery ECMs have significant differences in applicability and accuracy. After weighing the relationship between battery model accuracy and computational complexity, the present invention selects thevenin ECM as the battery model;
[0013] In order to analyze the nonlinear relationship of ECM, the circuit equation is expressed as:
[0014]
[0015] In the formula, is the ECM terminal voltage, is the charge and discharge current, is the polarization resistance, is the polarization capacitance, is the polarization voltage, is the ohmic internal resistance, is the open circuit voltage;
[0016] According to the ampere-hour integration method, the calculation formula of battery SOC is:
[0017] ;
[0018] In the formula For battery The initial value of is the charge and discharge efficiency, is the available capacity of the battery;
[0019] Assume that the state vector of the battery model is , the control variable is , the output variable is , , and Written in state space expression, discretized as:
[0020] ;
[0021] in, , , , ; is the sampling period, and are the process noise and measurement noise at time k respectively.
[0022] As a further technical solution of the present invention, the step of determining the battery model parameters based on battery aging experimental testing and data analysis includes:
[0023] Based on the data set of lithium battery charge and discharge obtained from the battery aging experiment test, the open circuit voltage (OCV) is obtained as a function of the battery SOC; in addition, As a parameter of the battery model, it will also affect the state of charge estimation result and needs to be identified; therefore, the present invention designs a static calibration experiment to obtain a quintic polynomial fitting curve of SOC-OCV, and the fitting curve expression is:
[0024]
[0025] in, , the polynomial coefficients obtained by polynomial fitting of experimental data are used to solve the open circuit voltage under different SOC ;
[0026] In order to obtain the battery model , and , the established battery model is rewritten incorporating zero-state and zero-input responses;
[0027] ;
[0028] ;
[0029] Simplify the above formula into the form of exponential equation:
[0030] ;
[0031] in, ;
[0032] The battery is charged with a current of 200mA. When the battery voltage rises to 4.2V, charging is stopped. The parameters can be obtained by analyzing the experimental data. , and , thus calculating the battery , and ,By identifying the battery cycle aging experimental data, the battery model parameters that change with the number of battery cycles are obtained, and the model parameter value corresponding to the number of cycles at which the battery capacity reaches the failure threshold (80%) is taken as the failure threshold.
[0033] In this embodiment, the step of extracting the battery aging characteristics includes:
[0034] The changes in battery capacity and model parameters are closely related to the electrochemical reactions in the battery, and are difficult to obtain through direct measurement in practical applications. Therefore, the estimation of battery model parameters can be indirectly completed by extracting some easily measurable measurement values that reflect the changes in battery model parameters; in the present invention, these measurement values are called battery aging characteristics (AC); the AC extracted by the present invention are: AC1 is the CC charging duration, AC2 is the voltage corresponding to the maximum curvature point of the voltage change curve during CC charging, AC3 is the CV charging duration, and AC4 is the current corresponding to the maximum curvature point of the current change curve during the CV charging stage. According to the above extraction rules, the data of the changes in the alternating current of the LiMn2O4 battery with the number of battery charge and discharge cycles in the experiment are extracted. At the same time, in order to reduce the variability between the data, the original data is linearly transformed, and the transformation results are mapped to [0,1] and normalized to:
[0035]
[0036] In the formula is the normalized battery aging characteristic parameter, x is the original battery aging characteristic parameter, are the maximum and minimum values of a single aging characteristic parameter, respectively.
[0037] As a further technical solution of the present invention, the steps of analyzing the correlation of battery aging characteristics include:
[0038] The present invention uses the Spearman correlation coefficient method to analyze the correlation between the battery aging characteristic parameters and the battery model parameters. The value range of the correlation coefficient is [-1, 1]. The larger the absolute value of the correlation coefficient, the stronger the correlation. When the correlation coefficient is greater than 0.8, it means that the correlation between the variables is extremely strong. The solution formula of the correlation coefficient is:
[0039]
[0040] in The original AC data After sorting, Indicates the position of the battery model parameters after sorting, is the difference in positional order, is the sample size, is the calculation result of Spearman correlation coefficient.
[0041] As a further technical solution of the present invention, the step of estimating the battery capacity and model parameters includes:
[0042] Based on the PSO-LSTM algorithm to estimate the capacity and model parameters of lithium-ion batteries, the LSTM neural network well reflects the nonlinear change process of the model parameters during battery aging. However, the hyperparameter selection of the LSTM model is a problem that needs to be solved. Therefore, the present invention uses a particle swarm algorithm to optimize the hyperparameters of the LSTM neural network model;
[0043] LSTM controls the transmission of state information through three gate structures, namely the input gate, the forget gate, and the output gate. The forget gate determines the information to be discarded and retained, the input gate transmits information and updates the unit state, and the output gate determines what information needs to be output. The calculation process is as follows:
[0044]
[0045] in, Represents the input of the LSTM unit at time t; Represent the outputs of the input gate, forget gate, and output gate respectively; They are the weight matrices of the forget gate, input gate, computational unit state, and output gate for the previous input data; Respectively represent the bias parameters of each gate; Respectively represent the cell state and candidate memory cell state at time t; is the output of the LSTM unit at time t; represents the activation function, where function, is the hyperbolic tangent function. The weight parameters and bias parameters of the LSTM model are calculated using the Adam optimizer:
[0046] Particle swarm optimization algorithm: The hyperparameters in LSTM networks are usually selected based on experience. However, this selection method is relatively random and often cannot obtain the best combination of hyperparameters, which has a significant impact on prediction accuracy. Therefore, the present invention uses the particle swarm algorithm to optimize two hyperparameters: the number of hidden layer neurons in the LSTM neural network and the initial learning rate ;
[0047] Assume that there are N particles forming a swarm in D-dimensional space, where the i-th particle is recorded as:
[0048]
[0049] Representative The velocity of the i-th particle in the iteration is expressed as:
[0050]
[0051] The calculation formula for updating the velocity and position of the i-th particle is:
[0052]
[0053]
[0054] In the above formula, and For the particle The speed and position at the iteration, is the individual optimal solution of particle i, is the overall optimal solution, is the inertia weight, and is the learning factor, is a random number in [0,1], mainly used to increase the randomness of the search;
[0055] Battery capacity estimation based on PSO-LSTM:
[0056] The number of hidden neurons in the LSTM neural network is improved by using particle swarm optimization. and the initial learning rate For optimization, the input is the battery aging characteristic parameter, that is, , the final output is the capacity and model parameters of the battery, that is, , including the following specific processes:
[0057] Step 1: Initialize the parameters of the PSO algorithm, including the position and speed , inertia weight , learning factor and the number of iterations And other parameters;
[0058] Step 2: Based on each particle's individual position vector The hyperparameters of the LSTM model included in , train the LSTM model and compare the training results with the reference values, using the mean square error function as The fitness function of the current particle is:
[0059] ;
[0060] Where N is the current battery cycle number; are the input and output of the i-th cycle training sample respectively; Indicates the training result of the LSTM model. The output of the LSTM model is the battery capacity and model parameters, and records the optimal value of the current fitness and its corresponding particles;
[0061] Step 3: Update the optimal value of each single particle, update the global optimal value of the population, and update the speed and position of the particle;
[0062] Step 4: Determine whether the termination condition is met. If so, the optimization process ends and proceeds to step 5. Otherwise, return to step 4 and continue hyperparameter optimization.
[0063] Step 5: After the algorithm optimization is completed, The LSTM model hyperparameters of the optimization results are , the LSTM model is used to estimate the battery capacity, with the input being the current aging characteristic parameter AC.
[0064] As a further technical solution of the present invention, the step of volumetric H-∞ filtering estimation of the battery SOC includes:
[0065] HIF uses the maximum error and minimum error criteria to minimize the impact of interference on the estimation error. The cost function is introduced based on game theory. ;
[0066]
[0067] In the formula, are the state variables and the estimates of the state variables, respectively; are the initial value and initial setting value of the state variable respectively; is the covariance matrix of the initial error; State noise The covariance matrix of To measure noise The covariance matrix of is a positive definite matrix, directly minimize is difficult to achieve. Therefore, a suitable boundary condition can be selected , which satisfies the following conditions:
[0068]
[0069] Combining the above two formulas, we can further obtain a new cost function ;
[0070]
[0071] At this point, the problem becomes: When the value of is maximized, choose the appropriate Minimum, by solving the above problem, The recursive relation that holds is:
[0072]
[0073] In the formula is the gain matrix, is the covariance matrix, which is the initial covariance matrix Recursively get, is the identity matrix, and are the prior predicted value and the prior measured value, respectively;
[0074] Considering the poor applicability of the traditional HIF algorithm to nonlinear systems and the problems caused by noise uncertainty during the use of the algorithm, the HIF algorithm is combined with the training rule. The CHIF algorithm retains the accuracy and robustness of the HIF algorithm while enhancing the applicability of the algorithm to nonlinear systems. It has the characteristics of transmitting state volume points through nonlinear systems, which can minimize non-Gaussian noise. The specific process of the CHIF algorithm is as follows:
[0075] 1) Parameter initialization: set the initial state variables and the initial covariance The value of
[0076] ;
[0077] ;
[0078] 2) Calculate the volume point of state variables:
[0079] ;
[0080] ;
[0081] in is the set of volume points;
[0082] ;
[0083] Z is the dimension of the state function;
[0084] 3) Propagation volume point:
[0085] ;
[0086] 4) Calculate state variable prediction and error covariance predicted value :
[0087] ;
[0088] ;
[0089] 5) Recalculate volume points:
[0090] ;
[0091] ;
[0092] 6) Propagation volume point:
[0093] ;
[0094] 7) Calculate the predicted value of the measurement:
[0095] ;
[0096] 8) Calculate the measurement error covariance matrix and the cross covariance matrix :
[0097] ;
[0098] ;
[0099] 9) Update the gain matrix, state variable estimates and error covariance matrix:
[0100] ;
[0101] ;
[0102] ;
[0103] in, , .
[0104] As a further technical solution of the present invention, the step of online co-estimation of battery capacity and SOC by the joint estimation framework includes:
[0105] Firstly, aging data and aging characteristic parameters AC, which are subsequently used to estimate battery capacity and model parameters, are obtained from the battery aging experiment. Considering the nonlinear change characteristics of battery model parameters during battery aging, the PSO-LSTM method is used to obtain the battery capacity in real time. After the estimated battery capacity is updated in real time, the CHIF algorithm is used to estimate the battery SOC. In this case, the battery capacity is periodically estimated at regular intervals, while the SOC is estimated at each step.
[0106] Compared with the prior art, the present invention has the following beneficial effects:
[0107] 1. The present invention intends to use an equivalent circuit model ECM, which consists of circuit elements such as power supply, resistor, capacitor, etc. It has both the mechanical properties of power batteries and certain empirical properties. Compared with the electrochemical model EM and the data-driven model, the equivalent circuit model ECM has a wide range of applicability. It can balance the requirements of accuracy and computational complexity, and has been used for batteries with different materials and different operating environments.
[0108] 2. The present invention intends to use the volumetric H-infinity filter algorithm (CHIF) for SOC estimation. The iterative process of the Kalman filter algorithm (KF) is heavily dependent on the initial model and initial state estimation. It cannot fit the nonlinear change characteristics of SOC well, nor can it handle the occurrence of disturbances in the system, and the estimation accuracy is limited. HIF adopts the maximum-minimum error criterion and has better accuracy and robustness. However, the HIF algorithm is only applicable to linear systems, while the battery model system is usually nonlinear. In the actual SOC estimation process, the noise covariance of the system may change due to the influence of the internal operation of the battery and the surrounding environment. Therefore, the present invention will adopt the CHIF algorithm to improve the estimation accuracy and adapt to nonlinear systems. By transferring state volume points in nonlinear systems, CHIF can suppress non-Gaussian noise to the greatest extent.
[0109] 3. The present invention intends to adopt a method architecture for co-estimation of battery capacity and battery state of charge SOC. Because over time, the battery will gradually age, and the maximum available capacity, resistance, capacitance and other parameters of the battery model will undergo non-negligible changes. Therefore, it is necessary to update the battery capacity in a timely manner to ensure the accuracy of the model and further improve the accuracy of SOC estimation, so the present invention intends to consider the co-estimation of SOC and battery capacity. The prior art proposes an improved adaptive EKF to achieve coordinated estimation of battery capacity and SOC, but this increases the computational burden. At present, long short-term memory (LSTM) neural networks have been widely used in battery health, and LSTM has better performance, so LSTM is used for real-time estimation of battery capacity.
[0110] 4. Use particle swarm optimization algorithm PSO to optimize the hyperparameters in LSTM. The selection of LSTM hyperparameters has an important impact on the estimation results, but the hyperparameters in the previous LSTM network are usually selected based on experience. This selection method is relatively random and often cannot obtain the best combination of hyperparameters, which has a great impact on the prediction accuracy. Therefore, the PSO used in the present invention to optimize the LSTM hyperparameters can effectively improve the prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0111] Figure 1 An equivalent circuit model diagram provided for an embodiment of the present invention.
[0112] Figure 2 LSTM architecture diagram provided for an embodiment of the present invention.
[0113] Figure 3 A flow chart of PSO-LSTM battery capacity estimation provided by an embodiment of the present invention.
[0114] Figure 4 A diagram showing error comparison results of battery capacity estimation provided by an embodiment of the present invention.
[0115] Figure 5 A logic block diagram of battery capacity and SOC co-estimation based on PSO-LSTM and CHIF provided in an embodiment of the present invention.
[0116] Figure 6 A comparison chart of the estimated SOC value and the actual value provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0117] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0118] A method for estimating SOC by periodically considering battery capacity decay, the method comprising the following steps:
[0119] Establish a battery model, determine the battery model parameters based on battery aging experimental tests and data analysis, and extract battery aging features and conduct correlation analysis;
[0120] Battery capacity and model parameter estimation based on PSO-LSTM algorithm, SOC estimation based on CHIF algorithm, and joint estimation framework for online co-estimation of battery capacity and SOC;
[0121] Among them, the joint estimation framework mainly consists of two parts: 1) using the PSO-LSTM algorithm to predict the battery capacity and model parameters, and taking the battery aging characteristic parameter AC as the input of the LSTM model; 2) online SOC estimation based on the CHIF algorithm, and updating the battery capacity in real time during the SOC estimation process.
[0122] In this embodiment, the step of establishing the battery model includes:
[0123] Different battery ECMs have significant differences in applicability and accuracy. After weighing the relationship between battery model accuracy and computational complexity, the present invention selects thevenin ECM as the battery model, and its circuit diagram is as follows: Figure 1 ;
[0124] In order to analyze the nonlinear relationship of ECM, the circuit equation is expressed as:
[0125]
[0126] In the formula, is the ECM terminal voltage, is the charge and discharge current, is the polarization resistance, is the polarization capacitance, is the polarization voltage, is the ohmic internal resistance, is the open circuit voltage;
[0127] According to the ampere-hour integration method, the calculation formula of battery SOC is:
[0128] ;
[0129] In the formula For battery The initial value of is the charge and discharge efficiency, is the available capacity of the battery;
[0130] Assume the state vector of the battery model is , the control variable is , the output variable is , , and Written in state space expression, discretized as:
[0131] ;
[0132] in, , , , ; is the sampling period, and are the process noise and measurement noise at time k respectively.
[0133] In this embodiment, the step of determining the battery model parameters based on the battery aging experimental test and data analysis includes:
[0134] The battery test uses a LiMn2O4 battery with a rated capacity of 250mAh, a rated voltage of 3.7V, a charge cut-off voltage of 4.2V, and a discharge cut-off voltage of 3.0V. The battery is tested at an ambient temperature of 25°C. The battery is charged and discharged cyclically until the current available capacity of the battery is less than 80% of the rated capacity. The single charge and discharge process of the battery mainly includes: constant current (CC) charging, constant voltage (CV) charging, high current CC discharge, and low current CC discharge. Among them, the charging current is positive and the discharge current is negative. The specific steps of the battery aging test are as follows:
[0135] Step 1: Measure the rated capacity of the new LiMn2O4 battery;
[0136] Step 2: Charge at 200mA in CC mode until the battery voltage reaches 4.2V, and leave it for 5 minutes;
[0137] Step 3: Charge the battery in CV mode until the battery current drops to 5mA, the battery charging is complete, and the battery rests for 5 minutes;
[0138] Step 4: Discharge at 200mA in CC mode until the battery voltage drops to 3V, and leave the battery to rest for 5 minutes;
[0139] Step 5: Discharge in CC mode at 40 mA until the battery voltage drops to 3 V. The discharge process is complete and the battery rests for 2 hours.
[0140] Step 6: Take the maximum capacity during the charging and discharging process as the current maximum available capacity, and determine whether the maximum available capacity of the battery is less than 80% of the rated capacity, otherwise repeat steps 2-6, and end the test if it is less than 80%;
[0141] Based on the data set of lithium battery charge and discharge obtained from the battery aging experiment test, the open circuit voltage (OCV) is obtained as a function of the battery SOC; in addition, As a parameter of the battery model, it will also affect the state of charge estimation result and needs to be identified; therefore, the present invention designs a static calibration experiment to obtain a quintic polynomial fitting curve of SOC-OCV, and the fitting curve expression is:
[0142]
[0143] in, , the polynomial coefficients obtained by polynomial fitting of experimental data are used to solve the open circuit voltage under different SOC ;
[0144] In order to obtain the battery model , and , the established battery model is rewritten incorporating zero-state and zero-input responses;
[0145] ;
[0146] ;
[0147] Simplify the above formula into the form of exponential equation:
[0148] ;
[0149] in, ;
[0150] The battery is charged with a current of 200mA. When the battery voltage rises to 4.2V, charging is stopped. The parameters can be obtained by analyzing the experimental data. , and , thus calculating the battery , and ,By identifying the battery cycle aging experimental data, the battery model parameters that change with the number of battery cycles are obtained, and the model parameter value corresponding to the number of cycles at which the battery capacity reaches the failure threshold (80%) is taken as the failure threshold.
[0151] In this embodiment, the step of extracting the battery aging characteristics includes:
[0152] The changes in battery capacity and model parameters are closely related to the electrochemical reactions in the battery, and are difficult to obtain through direct measurement in practical applications. Therefore, the estimation of battery model parameters can be indirectly completed by extracting some easily measurable measurement values that reflect the changes in battery model parameters; in the present invention, these measurement values are called battery aging characteristics (AC); the AC extracted by the present invention are: AC1 is the CC charging duration, AC2 is the voltage corresponding to the maximum curvature point of the voltage change curve during CC charging, AC3 is the CV charging duration, and AC4 is the current corresponding to the maximum curvature point of the current change curve during the CV charging stage. According to the above extraction rules, the data of the changes in the alternating current of the LiMn2O4 battery with the number of battery charge and discharge cycles in the experiment are extracted. At the same time, in order to reduce the variability between the data, the original data is linearly transformed, and the transformation results are mapped to [0,1] and normalized to:
[0153]
[0154] In the formula is the normalized battery aging characteristic parameter, x is the original battery aging characteristic parameter, are the maximum and minimum values of a single aging characteristic parameter, respectively.
[0155] In this embodiment, the steps of analyzing the battery aging characteristics include:
[0156] The present invention uses the Spearman correlation coefficient method to analyze the correlation between the battery aging characteristic parameters and the battery model parameters. The value range of the correlation coefficient is [-1, 1]. The larger the absolute value of the correlation coefficient, the stronger the correlation. When the correlation coefficient is greater than 0.8, it means that the correlation between the variables is extremely strong. The solution formula of the correlation coefficient is:
[0157]
[0158] in The original AC data After sorting, Indicates the position of the battery model parameters after sorting, is the difference in positional order, is the sample size, is the calculation result of Spearman correlation coefficient.
[0159] The accuracy of the battery model is closely related to the accuracy of SOC estimation. Battery capacity and model parameters will change as the battery ages. Capacity is the main indicator of battery aging. When capacity changes are not considered, the estimation error of battery SOC is large. Therefore, the joint estimation of SOC and capacity is the main way to improve estimation accuracy and reduce computational burden.
[0160] In this embodiment, the steps of estimating the battery capacity and model parameters include:
[0161] Based on the PSO-LSTM algorithm to estimate the capacity and model parameters of lithium-ion batteries, the LSTM neural network well reflects the nonlinear change process of the model parameters during battery aging. However, the hyperparameter selection of the LSTM model is a problem that needs to be solved. Therefore, the present invention uses a particle swarm algorithm to optimize the hyperparameters of the LSTM neural network model;
[0162] Long Short-Term Memory Network (LSTM): Compared with traditional neural networks, recurrent neural networks (RNN) have the advantage of considering historical information when predicting future moments and have stronger nonlinear approximation capabilities. However, RNN has the inevitable gradient vanishing problem in neural networks, which affects the accuracy of predictions. As an improvement on the RNN structure, the Long Short-Term Memory Network (LSTM) has the ability to retain both long-term and short-term information. This model solves the gradient vanishing and gradient exploding problems in machine learning and performs well in handling long-term dependencies.
[0163] LSTM controls the transmission of state information through three gate structures, namely the input gate, the forget gate, and the output gate. The forget gate determines the information to be discarded and retained, the input gate transmits information and updates the unit state, and the output gate determines what information needs to be output. The calculation process is as follows:
[0164]
[0165] in, Represents the input of the LSTM unit at time t; Represent the outputs of the input gate, forget gate, and output gate respectively; They are the weight matrices of the forget gate, input gate, computational unit state, and output gate for the previous input data; Respectively represent the bias parameters of each gate; Respectively represent the cell state and candidate memory cell state at time t; is the output of the LSTM unit at time t; represents the activation function, where function, is a hyperbolic tangent function. The weight parameters and bias parameters of the LSTM model are calculated by the Adam optimizer. The LSTM structure used for battery capacity prediction in the present invention is as follows: Figure 2 As shown:
[0166] Particle swarm optimization algorithm: The hyperparameters in LSTM networks are usually selected based on experience. However, this selection method is relatively random and often cannot obtain the best combination of hyperparameters, which has a significant impact on prediction accuracy. Therefore, the present invention uses the particle swarm algorithm to optimize two hyperparameters: the number of hidden layer neurons in the LSTM neural network and the initial learning rate ;
[0167] Particle swarm optimization is an improved global optimization algorithm with the advantages of fast convergence, few parameters, and simple implementation. The particle swarm algorithm is initialized as a group of random particles, and then finds the optimal solution through iteration. In each iteration, the particles are updated by tracking two extreme values. The first is the optimal solution of the particle, called the individual extreme value; the second is the optimal solution currently found by the entire group, called the global extreme value.
[0168] Assume that there are N particles forming a swarm in D-dimensional space, where the i-th particle is recorded as:
[0169]
[0170] Representative The velocity of the i-th particle in the iteration is expressed as:
[0171]
[0172] The calculation formula for updating the velocity and position of the i-th particle is:
[0173]
[0174]
[0175] In the above formula, and For the particle The speed and position at the iteration, is the individual optimal solution of particle i, is the overall optimal solution, is the inertia weight, and is the learning factor, is a random number in [0,1], mainly used to increase the randomness of the search;
[0176] Battery capacity estimation based on PSO-LSTM: The flowchart of using PSO-LSTM to estimate battery capacity and model parameters is as follows Figure 3 As shown;
[0177] The number of hidden neurons in the LSTM neural network is improved by using particle swarm optimization. and the initial learning rate For optimization, the input is the battery aging characteristic parameter, that is, , the final output is the capacity and model parameters of the battery, that is, , including the following specific processes:
[0178] Step 1: Initialize the parameters of the PSO algorithm, including the position and speed , inertia weight , learning factor and the number of iterations And other parameters;
[0179] Step 2: Based on each particle's individual position vector The hyperparameters of the LSTM model included in , train the LSTM model and compare the training results with the reference values, using the mean square error function as The fitness function of the current particle is:
[0180] ;
[0181] Where N is the current battery cycle number; are the input and output of the i-th cycle training sample respectively; Represents the training result of the LSTM model. In this paper, the output of the LSTM model is the battery capacity and model parameters, which records the optimal value of the current fitness and its corresponding particles;
[0182] Step 3: Update the optimal value of each single particle, update the global optimal value of the population, and update the speed and position of the particle;
[0183] Step 4: Determine whether the termination condition is met. If so, the optimization process ends and proceeds to step 5. Otherwise, return to step 4 and continue hyperparameter optimization.
[0184] Step 5: After the algorithm optimization is completed, The LSTM model hyperparameters of the optimization results are , the LSTM model is used to estimate the battery capacity, with the input being the current aging characteristic parameter AC;
[0185] The error comparison results of battery capacity estimation based on LSTM and PSO-LSTM algorithms are shown in the figure below. Figure 4 :
[0186] In this embodiment, the step of SOC estimation based on the CHIF algorithm includes:
[0187] Despite the existence of external disturbances and model uncertainties in the estimation process, the HIF (H Infinite Fitler) algorithm can still guarantee high estimation accuracy and robustness. However, the HIF algorithm is only applicable to linear systems, while the battery model system is usually nonlinear. In the actual SOC estimation process, the noise covariance of the system may change due to the influence of the internal and surrounding environment of the battery. Therefore, the present invention combines the volumetric method with the HIF algorithm to improve the estimation accuracy. By transferring state volume points in a nonlinear system, CHIF can suppress non-Gaussian noise to the greatest extent.
[0188] HIF uses the maximum error and minimum error criteria to minimize the impact of interference on the estimation error. The cost function is introduced based on game theory. ;
[0189]
[0190] In the formula, are the state variables and the estimates of the state variables, respectively; are the initial value and initial setting value of the state variable respectively; is the covariance matrix of the initial error; State noise The covariance matrix of To measure noise The covariance matrix of is a positive definite matrix, directly minimize is difficult to achieve. Therefore, a suitable boundary condition can be selected , which satisfies the following conditions:
[0191]
[0192] Combining the above two formulas, we can further obtain a new cost function ;
[0193]
[0194] At this point, the problem becomes: When the value of is maximized, choose the appropriate Minimum, by solving the above problem, The recursive relation that holds is:
[0195]
[0196] In the formula is the gain matrix, is the covariance matrix, which is the initial covariance matrix Recursively get, is the identity matrix, and are the prior predicted value and the prior measured value, respectively;
[0197] Considering the poor applicability of the traditional HIF algorithm to nonlinear systems and the problems caused by noise uncertainty during the use of the algorithm, the HIF algorithm is combined with the training rule. The CHIF algorithm retains the accuracy and robustness of the HIF algorithm while enhancing the applicability of the algorithm to nonlinear systems. It has the characteristics of transmitting state volume points through nonlinear systems, which can minimize non-Gaussian noise. The specific process of the CHIF algorithm is as follows:
[0198] 1) Parameter initialization: set the initial state variables and the initial covariance The value of
[0199] ;
[0200] ;
[0201] 2) Calculate the volume point of state variables:
[0202] ;
[0203] ;
[0204] in is the set of volume points;
[0205] ;
[0206] Z is the dimension of the state function;
[0207] 3) Propagation volume point:
[0208] ;
[0209] 4) Calculate state variable prediction and error covariance predicted value :
[0210] ;
[0211] ;
[0212] 5) Recalculate volume points:
[0213] ;
[0214] ;
[0215] 6) Propagation volume point:
[0216] ;
[0217] 7) Calculate the predicted value of the measurement:
[0218] ;
[0219] 8) Calculate the measurement error covariance matrix and the cross covariance matrix :
[0220] ;
[0221] ;
[0222] 9) Update the gain matrix, state variable estimates and error covariance matrix:
[0223] ;
[0224] ;
[0225] ;
[0226] in, , .
[0227] In this embodiment, the steps of online co-estimation of battery capacity and SOC by the joint estimation framework include:
[0228] First, aging data and aging characteristic parameters AC, which are then used to estimate battery capacity and model parameters, are obtained from battery aging experiments. Considering the nonlinear change characteristics of battery model parameters during battery aging, the PSO-LSTM method is used to obtain battery capacity in real time. After the estimated battery capacity is updated in real time, the CHIF algorithm is used to estimate the battery SOC. In this case, the battery capacity is estimated periodically at regular intervals, and the SOC is estimated at each step. The proposed co-estimation framework is shown in Figure 2. Figure 5 The SOC estimation and true value comparison of the method of battery capacity and SOC estimation based on PSO-LSTM and CHIF (considering aging) and the method of SOC estimation only through CHIF (not considering aging) are shown in the figure. Figure 6 shown.
[0229] It should be noted that, in this article, the term "comprises" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0230] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A SOC estimation method that periodically considers battery capacity decay, characterized in that: The method comprises the following steps: Establish a battery model, determine the battery model parameters based on battery aging experimental tests and data analysis, and extract battery aging features and conduct correlation analysis; Battery capacity and model parameter estimation based on PSO-LSTM algorithm, SOC estimation based on CHIF algorithm, and joint estimation framework for online co-estimation of battery capacity and SOC; The components of the joint estimation framework include: 1) using the PSO-LSTM algorithm to predict battery capacity and model parameters, and using the battery aging characteristic parameter AC as the input of the LSTM model; 2) online SOC estimation based on the CHIF algorithm, and real-time updating of battery capacity during the SOC estimation process; The steps of estimating battery capacity and model parameters based on the PSO-LSTM algorithm include: The battery capacity and model parameters are estimated based on the PSO-LSTM algorithm, and the particle swarm algorithm is used to optimize the hyperparameters of the LSTM neural network model; LSTM controls the transmission of state information through three gate structures, namely the input gate, the forget gate, and the output gate. The forget gate determines the information to be discarded and retained, the input gate transmits information and updates the unit state, and the output gate determines what information needs to be output. The calculation process is as follows: i t =σ(W i ·[h t-1 ,x t ]+b i ) f t =σ(W f ·[h t-1 ,x t ]+b f ) the t =σ(W o ·[h t-1 ,x t ]+b o ) h t =tanh(C t )*o t ; Among them, x t represents the input of the LSTM unit at time t; i t 、f t , o t Represent the outputs of the input gate, forget gate, and output gate respectively; W f , W i , W c and W o are the weight matrices of the forget gate, input gate, computing unit state, and output gate for the previous input data; b i , b f , b o Respectively represent the bias parameters of each gate; C t and They represent the cell state and candidate memory cell state at time t respectively; h t is the output of the LSTM unit at time t; σ and tanh represent activation functions, where σ is the sigmoid function and tanh is the hyperbolic tangent function. The weight parameters and bias parameters of the LSTM model are calculated using the Adam optimizer: Use particle swarm optimization to optimize two hyperparameters: the number of hidden layer neurons N in the LSTM neural network neuron and the initial learning rate l r ; Assume that there are N particles forming a swarm in D-dimensional space, where the i-th particle is recorded as: k represents the kth iteration, and the velocity of the i-th particle is expressed as: The calculation formula for updating the velocity and position of the i-th particle is: In the above formula, and is the velocity and position of the particle at the kth iteration, p id,best is the individual optimal solution of particle i, p gd,best is the overall optimal solution, w is the inertia weight, c1 and c2 are learning factors, r1 and r2 are random numbers in [0,1]; The steps of battery capacity estimation based on PSO-LSTM algorithm include: The particle swarm algorithm is used to optimize the number of hidden neurons N in the LSTM neural network. neuron and the initial learning rate l r The optimization is performed with the input being the battery aging characteristic parameters, i.e. X = [AC1 AC2 AC3 AC4], and the final output being the battery capacity and model parameters, i.e. Y = [Q t R o R s C s ], including the following specific processes: Step 1: Initialize the parameters of the PSO algorithm, including position x0 and velocity v0, inertia weight w, learning factors c1 and c2, and number of iterations M; Step 2: According to each particle's individual position vector p id The hyperparameters N of the LSTM model contained in neuron,i and Train the LSTM model and compare the training results with the reference values. Use the mean square error function as the fitness function of PSO. The fitness function of the current particle is: Where N is the current battery cycle number; and Y i are the input and output of the i-th cycle training sample respectively; Indicates the training result of the LSTM model. The output of the LSTM model is the battery capacity and model parameters, and records the optimal value of the current fitness and its corresponding particles; Step 3: Update the optimal value of each single particle, update the global optimal value of the population, and update the speed and position of the particle; Step 4: Determine whether the termination condition is met. If so, the optimization process ends and proceeds to step 5. Otherwise, return to step 4 and continue hyperparameter optimization. Step 5: After the optimization of the PSO algorithm is completed, the LSTM model hyperparameters of the PSO optimization result are The LSTM model is used to estimate the battery capacity, with the current aging characteristic parameter AC as input; The steps of SOC estimation based on the CHIF algorithm include: HIF adopts the maximum error and minimum error criteria to minimize the impact of interference on the estimation error, and introduces the cost function J based on game theory; In the formula, x k and X k are the state variables and the estimates of the state variables respectively; x0 and X0 are the initial values and the initial setting values of the state variables respectively; P0 is the covariance matrix of the initial error; Q k is the state noise w k The covariance matrix of k The measurement noise v k The covariance matrix of k is a positive definite matrix, it is difficult to minimize J directly, so we choose a boundary condition The following conditions are met: Further obtain a new cost function J1; At this point, the problem is transformed into: when x0, w k 、v k When the value of J1 is maximized, choose the appropriate x k To minimize J1, by solving the problem, The recursive relation that holds is: Where K k is the gain matrix, P k is the covariance matrix, which is obtained recursively from the initial covariance matrix P0, I is the unit matrix, and are the prior predicted value and the prior measured value, respectively; Combining the HIF algorithm with the training rules, the specific process of the CHIF algorithm is as follows: 1) Parameter initialization: set the value of the initial state variable X0 and the initial covariance P0; X0=E[x0]; 2) Calculate the volume point of state variables: where ζ i is the set of volume points; Z is the dimension of the state function; 3) Propagation volume point: X i,k|k-1 =A d X i,k-1|k-1 +B d u k-1 ; 4) Calculate the state variable prediction X i,k|k-1 and error covariance predicted value P k-1|k-1 : 5) Recalculate volume points: 6) Propagation volume point: Y i,k|k-1 =C d X i,k-1|k-1 +D d u k-1 ; 7) Calculate the predicted value of the measurement: 8) Calculate the measurement error covariance matrix P y|k-1 and the cross covariance matrix P xy|k-1 : 9) Update the gain matrix, state variable estimate and error covariance matrix: K k =P xy|k-1 (P y|k-1 ) -1 ; X k|k =X k|k-1 +K k (and k -AND k|k-1 ); in, 2. The SOC estimation method according to claim 1, characterized in that: The steps of establishing the battery model include: Select theveninECM as the battery model; In order to analyze the nonlinear relationship of ECM, the circuit equation is expressed as: V=U ocv (SOC)+V s +I·R o ; Where V is the ECM terminal voltage, I is the charge and discharge current, and R s is the polarization resistance, C s is the polarization capacitance, V s is the polarization voltage, R o is the ohmic internal resistance, U ocv is the open circuit voltage; According to the ampere-hour integration method, the calculation formula of battery SOC is: Where SOC(0) is the initial value of the battery SOC, η is the charge and discharge efficiency, Q t is the available capacity of the battery; Assume that the state vector of the battery model is x = [SOC V s ] T , the control variable is u=I, the output variable is y=V, x=[SOCV s ] T , u=I and y=V are written as state space expressions and discretized as; in, D d =[R o ]; T s is the sampling period, ω k and k are the process noise and measurement noise at time k respectively.
3. The SOC estimation method according to claim 2, characterized in that: The step of determining the battery model parameters based on the battery aging experimental test and data analysis includes: According to the battery charge and discharge data set obtained from the battery aging experiment test, the open circuit voltage OCV is obtained as a function of the battery SOC; in addition, R o , R s and C s As a parameter of the battery model, it will also affect the state of charge estimation result and needs to be identified; therefore, a static calibration experiment is designed to obtain a quintic polynomial fitting curve of SOC-OCV, and the fitting curve expression is: Among them, a n ,b n , n=1~5, the polynomial coefficients are obtained by polynomial fitting of experimental data, so as to solve the open circuit voltage U under different SOC ocv ; In order to obtain the R o , R s and C s , the established battery model is rewritten incorporating zero-state and zero-input responses; Simplify the above formula into the form of exponential equation: where, k0 = U ocv + I·R o + I·R s , k1 = -I·R s , λ1 = 1 / R s C s ; The battery is charged with a current of 200mA. When the battery voltage rises to 4.2V, charging is stopped. The parameters k0, k1 and λ1 are obtained by analyzing the experimental data, and the R o , R s and C s ,By identifying the battery cycle aging experimental data, the battery model parameters that change with the number of battery cycles are obtained, and the model parameter value corresponding to the number of cycles at which the battery capacity reaches the failure threshold is taken as the failure threshold.
4. The SOC estimation method according to claim 3, characterized in that: The step of extracting the battery aging characteristics comprises: The estimation of battery model parameters is indirectly completed by extracting measured values; the measured values are called battery aging characteristics AC; the extracted ACs are: AC1 is the CC charging duration, AC2 is the voltage corresponding to the maximum curvature point of the voltage change curve during CC charging, AC3 is the CV charging duration, AC4 is the current corresponding to the maximum curvature point of the current change curve during the CV charging stage, and the data of the change of the AC current of the LiMn2O4 battery with the number of battery charge and discharge cycles in the experiment are extracted. By performing linear transformation on the original data, the transformation results are mapped to [0,1] and normalized to: Where x * is the normalized battery aging characteristic parameter, x is the original battery aging characteristic parameter, x max and x min are the maximum and minimum values of a single aging characteristic parameter, respectively.
5. The SOC estimation method according to claim 4, characterized in that: The steps of correlation analysis of aging characteristics include: The Spearman correlation coefficient method is used to analyze the correlation between the battery aging characteristic parameters and the battery model parameters. The range of the correlation coefficient is [-1,1]. The larger the absolute value of the correlation coefficient, the stronger the correlation. When the correlation coefficient is greater than 0.8, it means that the correlation between the variables is extremely strong. The solution formula for the correlation coefficient is: d i =x i '-y i '; where x i ' is the original AC data x * The sorted position, y i ' indicates the position of the battery model parameters after sorting, d i is the difference in position order, n is the sample size, r xy is the calculation result of Spearman correlation coefficient.
6. The SOC estimation method according to claim 1, characterized in that: The steps of online co-estimation of battery capacity and SOC by the joint estimation framework include: Firstly, the aging data and the aging characteristic parameters AC, which are subsequently used to estimate the battery capacity and model parameters, are obtained from the battery aging experiment. Considering the nonlinear change characteristics of the battery model parameters during the battery aging process, the PSO-LSTM method is used to obtain the battery capacity in real time. After the estimated battery capacity is updated in real time, the CHIF algorithm is used to estimate the battery SOC. In this case, the battery capacity is periodically estimated at intervals, while the SOC is estimated at each step.
Citation Information
Patent Citations
Wind power prediction method and device
CN114139777A
Lithium battery charge state estimation method based on data and model filtering fusion
CN118275901A