A lithium battery soc estimation method based on PID control and DEKF
By constructing a first-order Thevenin circuit model and combining PID control with the DEKF algorithm, the problems of large error, low precision and poor robustness in lithium battery SOC estimation are solved, faster and more accurate SOC estimation is achieved, and the system's anti-interference ability is enhanced.
Patent Information
- Application Number
- CN202310072005.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-18
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2043-01-18
Smart Images

Figure CN116047308B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to a lithium battery SOC estimation method based on PID control and DEKF, and belongs to the technical field of lithium battery SOC estimation. BACKGROUND
[0002] As one of new energy storage systems, lithium ion batteries have the advantages of long cycle life, high energy density and no pollution, and are important aids for promoting green economy and implementing the "double carbon" goal. The state of charge (SOC) is one of the most important states in the battery management system and is a direct representation of the remaining capacity of the lithium ion battery. Accurate estimation of the SOC of the lithium battery is an important measure to prolong the life of the lithium ion battery of an electric vehicle, ensure the safety of the energy storage system during charging and discharging, and improve the reliability of uninterrupted power supply.
[0003] The existing lithium battery SOC estimation method is mainly based on Kalman filter and derivative methods based on equivalent circuit model, such as Kalman filter algorithm (KF), extended Kalman filter algorithm (EKF) and dual extended Kalman filter algorithm (DEKF), etc. The KF algorithm is limited to linear systems, while the lithium battery has strong nonlinear characteristics and cannot be directly measured by the Kalman filter algorithm. The EKF algorithm linearizes the nonlinear system by using Taylor expansion, but in the case of uncertain system noise, it is easy to cause filter divergence, and it has strong dependence on the model, which is easy to produce errors, resulting in low SOC estimation accuracy. DEKF contains two extended Kalman filters, one for system state estimation and one for parameter estimation. The estimated value of the state is used in the parameter correction equation, and the estimated value of the parameter is used in the state prediction equation. Therefore, in view of the problems existing in the KF algorithm and the EKF algorithm, how to accurately estimate the SOC of the lithium battery and find an algorithm with higher accuracy, smaller error, faster convergence speed and better robustness is a technical problem worth solving.
[0004] Chinese patent application publication No. CN115327416A, entitled "Lithium ion battery SOC estimation method based on swarm intelligence optimization and particle filtering", first establishes a Thevenin equivalent circuit model to describe the dynamic characteristics of the battery. Then, the recursive least squares online parameter identification method is used to calculate the parameter values corresponding to each sampling point in a complete working condition. Next, the glowworm algorithm and particle filtering algorithm are used to estimate the SOC value of the lithium ion battery. The SOC estimation result obtained by this method has large error, low precision, slow convergence speed and poor robustness. SUMMARY
[0005] The present application aims at the problems of large error, low precision, slow convergence speed and poor robustness of the existing lithium battery SOC estimation method, and proposes a lithium battery SOC estimation method based on PID control and DEKF. Because the DEKF algorithm is suitable for nonlinear systems, the influence of measurement noise and system noise can be reduced by estimating the battery state and model parameters, and the convergence speed of the SOC estimation result can be improved by adding PID control, and the problem of poor robustness is improved, so that the SOC is estimated faster and more accurately.
[0006] The technical problem solving scheme of the present application is:
[0007] A lithium battery SOC estimation method based on PID control and DEKF, comprising the following steps:
[0008] Step 1, constructing a lithium battery equivalent circuit model: the whole model is a first-order Thevenin circuit composed of an ideal voltage source, an ohmic internal resistance, a polarization internal resistance and a polarization capacitance, the polarization internal resistance and the polarization capacitance are connected in parallel to form a first-order RC circuit, and then the ohmic resistance and the open circuit voltage are connected in series to form a first-order Thevenin equivalent circuit model of the battery, wherein the ideal voltage source describes the open circuit voltage of the battery, the parallel connection of the polarization internal resistance and the polarization capacitance describes the polarization phenomenon in the battery reaction, shows the resistive and capacitive characteristics of the battery, and simulates the internal complex reaction of the battery during the charging and discharging process;
[0009] Step 2, constructing a state space equation set: based on each element in the first-order Thevenin circuit described in step 1, the system equation and the measurement equation can be obtained by using Kirchhoff's law; select the state variable, combine the lithium battery SOC calculation formula, and discretize the system equation and the measurement equation to obtain the state space equation set of the first-order Thevenin model;
[0010] Step 3, identifying the parameters of the equivalent circuit model: the recursive least squares method based on the forgetting factor is used to identify the parameters of the first-order Thevenin circuit in step 1 on-line, so as to obtain the circuit parameters of the first-order Thevenin circuit, thereby further verifying and correcting the model;
[0011] Step 4, realizing SOC estimation: the discretized state space equation set is continuously updated based on the PID control and DEKF algorithm to realize SOC estimation;
[0012] Step 5, analyzing the accuracy of SOC estimation: the root mean squared error (Root Mean Squared Error, RMSE) and the maximum absolute error (Max Absolute Error, MAE) are introduced as numerical angle analysis to analyze the accuracy of the battery SOC estimated by the PID-DEKF algorithm and the EKF algorithm.
[0013] The step 1, ohmic resistance is composed of battery electrolyte, positive aluminum foil and negative aluminum foil, describes the mutation characteristics of voltage in the process of lithium ion battery discharge, polarization resistance and polarization capacitance describes the gradual change characteristics of voltage in the process of lithium ion battery charge and discharge.
[0014] The step 2, the system equation and the measurement equation mainly use the open circuit voltage of the battery, the voltage across the ohmic resistance, the polarization resistance and the polarization capacitance to describe the battery terminal voltage and the charge and discharge current; The state variable of the system state space equation set is the SOC value of the lithium battery and the voltage across the first order RC circuit, wherein the system equation and the measurement equation are as follows:
[0015]
[0016] Wherein, U L represents the battery terminal voltage; U oc represents the open circuit voltage; U0 represents the voltage across the ohmic resistance; U P represents the voltage across the polarization resistance and the polarization capacitance; I0 represents the charge and discharge current; C P represents the polarization capacitance; R P represents the polarization resistance; dU P represents the differential of U P ; dt represents the differential of the charge and discharge time;
[0017] The SOC calculation formula of the lithium battery is as follows:
[0018]
[0019]
[0020] Wherein, SOC represents the remaining capacity of the battery; SOC(t0) represents the initial state of charge of the battery; Q(I0) represents the battery capacity charged or discharged under the standard charge and discharge current I0 within t time; Q0 represents the rated capacity of the battery; η represents the charge and discharge efficiency; Δt represents the sampling time interval;
[0021] Therefore, the state space equation expression before discretization can be obtained from the above formula:
[0022]
[0023]
[0024] Wherein, represents the derivative of SOC; represents the derivative of U P ; R P represents the polarization resistance; C P represents the polarization capacitance; SOC represents the remaining capacity of the battery; U Prepresents the voltage across the polarization resistance and the polarization capacitance; Q represents the actual electric quantity of the lithium battery; I0 represents the charging and discharging current; U L represents the voltage across the polarization resistance and the polarization capacitance; Q represents the actual electric quantity of the lithium battery; I0 represents the charging and discharging current; U oc represents the voltage across the polarization resistance and the polarization capacitance; Q represents the actual electric quantity of the lithium battery; I0 represents the charging and discharging current; U
[0025] The formula of the discretized state space equation group is:
[0026]
[0027] Wherein, k represents the charging and discharging time; SOC k+1 and U P,k+1 respectively represent the SOC value and the polarization voltage at k+1 time; Δt represents the sampling time interval; R P represents the polarization resistance; C P represents the polarization capacitance; SOC k and U P,k respectively represent the SOC value and the polarization voltage at k time; η represents the charging and discharging efficiency; I k represents the charging and discharging current value at k time; U L,k and U oc,k respectively represent the battery terminal voltage value and the open circuit voltage value at k time; R0 represents the ohmic resistance; I0 represents the charging and discharging current.
[0028] In the step 3, the forgetting factor in the recursive least square method based on the forgetting factor is set to a fixed value, the data is time-varyingly weighted, the past collected data is continuously weakened, the effect of the current newly collected data is enhanced, and finally more accurate identification parameters of the equivalent circuit model are obtained, so that a better model selection is provided for the realization of the estimation algorithm.
[0029] In the step 4, the PID control includes proportion, integration and differentiation, the rich system state information in the error, cumulative error and error increment between the actual value and the target value of the controlled object is used to form a control strategy, and the target value of the controlled object can be quickly and stably tracked; the DEKF algorithm uses two extended Kalman filters to estimate the system state and parameters, and based on the PID control and the DEKF algorithm, the cumulative error of the battery terminal voltage is used as a limiting condition, so that the SOC estimation can be more accurately and quickly realized.
[0030] In the step 5, the root mean square error is the arithmetic square root of the mean square error, the maximum absolute value error is the maximum value of the absolute value difference between the true value and the measured value of SOC, and the smaller the values of RMSE and MAE are, the more accurate the SOC value estimated by the PID control and the DEKF algorithm based on the first-order Thevenin model is.
[0031] The advantages of the present application are as follows:
[0032] 1. The first-order Thevenin circuit is used for equivalent of the lithium battery, which can accurately reflect the static characteristics and dynamic characteristics of the lithium battery, and when the SOC is estimated based on the PID and DEKF algorithms, the model is simple, the effect is good, and the method has good practical value.
[0033] 2. Compared with the Kalman filter algorithm, the extended Kalman filter algorithm and the double extended Kalman filter algorithm, the addition of the PID algorithm has a faster convergence speed, improves the accuracy and robustness of the lithium battery SOC estimation, and also improves the defect that the extended Kalman filter algorithm depends on the model accuracy.
[0034] 3. The SOC initial value compensation strategy can not only determine the SOC initial value deviation, but also compensate the deviation, and the voltage deviation is used as a basis for judging whether the SOC initial value is compensated, and the accuracy of the lithium battery SOC estimation is further improved. BRIEF DESCRIPTION OF DRAWINGS
[0035] Figure 1 The present application is a flow chart of a lithium battery SOC estimation method based on PID control and DEKF.
[0036] Figure 2 The present application is a first-order Thevenin equivalent circuit model.
[0037] Figure 3 The present application is a PID-DEKF algorithm flow chart. DETAILED DESCRIPTION
[0038] The present application will be further described in detail below with reference to the accompanying drawings.
[0039] As shown in Figure 1 , a lithium battery SOC estimation method based on PID control and DEKF, the method specifically includes the following steps:
[0040] Step 1, construct a lithium battery equivalent circuit model: the entire model is composed of a first-order Thevenin circuit including an ideal voltage source, ohmic internal resistance, polarization internal resistance and polarization capacitance, wherein the ideal voltage source describes the open-circuit voltage of the battery, the parallel connection of the polarization internal resistance and the polarization capacitance describes the polarization phenomenon in the battery reaction, shows the resistive and capacitive characteristics of the battery, and simulates the internal complex reaction of the battery during the charging and discharging process. Figure 2 As shown in oc , the first-order Thevenin lithium battery equivalent circuit model includes an open-circuit voltage U L , an end voltage U P , an ohmic internal resistance R0, a polarization internal resistance R P, the polarization resistance and the polarization capacitance are connected in parallel to form an RC circuit, and then connected in series with the ohmic resistance to form a first-order Thevenin equivalent circuit of lithium battery.
[0041] The key to estimate the SOC of lithium battery by algorithm is to select a suitable equivalent circuit model. The common models at present are mainly divided into three types: electrochemical model, neural network model and equivalent circuit model. The electrochemical model describes the charging and discharging behavior of lithium ion battery from the electrochemical mechanism level by numerically describing the micro-reaction process such as internal electrochemical reaction kinetics, mass transfer and heat transfer of lithium ion battery, but the internal chemical reaction of electrochemical model is complex and the calculation is too large; the neural network model needs a large number of sample training data, and the acquisition process is difficult; while the equivalent circuit model can well describe the static and dynamic characteristics of lithium battery, the first-order Thevenin equivalent circuit can more accurately simulate the charging and discharging behavior of lithium battery, the calculation amount is smaller, and the model structure is relatively simple, so the first-order Thevenin model is used for lithium battery equivalent.
[0042] Step 2, constructing state space equation set: using Kirchhoff's law, the system equation and observation equation can be obtained from each element in the first-order Thevenin circuit described in step 1, and the system equation and observation equation are discretized, and the SOC value of the battery and the voltage across the first-order RC link are selected as the state variables of the system, and the state space equation set of the first-order Thevenin model is obtained by discretizing the first-order Thevenin circuit and the SOC calculation formula;
[0043] The state space equation construction process is as follows:
[0044] The observation equation and system equation are obtained by Kirchhoff's law:
[0045]
[0046] Among them, U L represents the terminal voltage of the battery; U oc represents the open circuit voltage; U0 represents the voltage across the ohmic resistance; U P represents the voltage across the polarization resistance and the polarization capacitance; I0 represents the charging and discharging current; C P represents the polarization capacitance; R P represents the polarization resistance; dU P represents the differential of U P ; dt represents the differential of the charging and discharging time;
[0047] The SOC calculation formula of lithium battery is as follows:
[0048]
[0049]
[0050] SOC (t0) = SOC (t0) + Q (I0) / Q0 * η * Δt / (R + R0) (1) where SOC represents the battery remaining capacity; SOC(t0) represents the initial SOC; Q(I0) represents the battery capacity charged or discharged under the standard charging and discharging current I0 within t time; Q0 represents the battery rated capacity; η represents the charging and discharging efficiency; and Δt represents the sampling time interval.
[0051] Therefore, the state space equation expression before discretization can be obtained from the above formula:
[0052]
[0053]
[0054] wherein, represents the derivative of SOC; represents the derivative of U P ; R P represents the polarization resistance; C P represents the polarization capacitance; SOC represents the battery remaining capacity; U P represents the voltage across the polarization resistance and the polarization capacitance; Q represents the actual capacity of the lithium battery; I0 represents the charging and discharging current; U L represents the battery terminal voltage; U oc represents the open circuit voltage; and R0 represents the ohmic resistance.
[0055] The formula of the discrete state space equation group obtained by discretizing the state space equation is:
[0056]
[0057] wherein, k represents the charging and discharging time; SOC k+1 and U P,k+1 respectively represent the SOC value and the polarization voltage at k+1 time; Δt represents the sampling time interval; R P represents the polarization resistance; C P represents the polarization capacitance; SOC k and U P,k respectively represent the SOC value and the polarization voltage at k time; η represents the charging and discharging efficiency; I k represents the charging and discharging current value at k time; U L,k and U oc,k respectively represent the battery terminal voltage value and the open circuit voltage value at k time; and R0 represents the ohmic resistance; I0 represents the charging and discharging current.
[0058] Step 3, identifying the parameters of the equivalent model: the recursive least square method based on the forgetting factor is used to perform online parameter identification on the first-order Thevenin circuit described in step 1, to obtain the circuit parameters of the first-order Thevenin circuit, thereby further verifying and correcting the model; the forgetting factor is set to a fixed value, the data is time-varying weighted, the past collected data is constantly weakened, the effect of the current newly collected data is enhanced, and finally more accurate identification parameters of the equivalent circuit model are obtained, providing a better model selection for the implementation of the estimation algorithm;
[0059] The recursive least square method based on the forgetting factor is used to perform online parameter identification on the first-order Thevenin circuit, to obtain identification parameters alpha1, alpha2 and alpha3:
[0060]
[0061]
[0062]
[0063] Wherein, T represents the sampling time; T P = R P C P ; R0 represents the ohmic internal resistance; R P represents the polarization resistance; C P represents the polarization capacitance; the circuit parameters including R0, R P and C P values are calculated based on the alpha1, alpha2 and alpha3 and T P :
[0064]
[0065]
[0066]
[0067] The online identification algorithm includes the weighted recursive adaptive least square method, the recursive least square method with forgetting factor, the bias compensation recursive least square method and the like. When the lithium battery is working, the collection of current and voltage is often accompanied by uncertain noise signals, which will cause the identified results to deviate, and the conventional least square method will cause the identified model to no longer have unbiased due to data saturation, uncertainty noise and the like. The forgetting factor introduced into the recursive least square method can avoid the data saturation phenomenon and the uncertainty noise problem, therefore the invention selects the recursive least square method based on the forgetting factor to perform online parameter identification on the first-order Thevenin model;
[0068] The detailed process of identifying the identification parameters alpha1, alpha2 and alpha3 is as follows:
[0069] Performing Laplace transform on the first-order equivalent circuit yields the following formula:
[0070]
[0071] Will U oc (s)-U L (s) as input and I(s) as output, we get the transfer function G(s):
[0072]
[0073] Perform bilinear transformation on the transfer function G(s), let The discretized transfer function is:
[0074]
[0075] Converting to a difference equation yields:
[0076] y(k)=α1y(k-1)+α2I(k)+α3I(k-1)
[0077] Give The assigned meanings are as follows:
[0078]
[0079] in is the observation vector; Represents the result of transposing 3y(k-1), i(k), and I(k-1);
[0080] Let the estimated parameter vector α be:
[0081] The steps of the recursive least squares method based on the forgetting factor are as follows:
[0082]
[0083] Where λ represents the forgetting factor; I represents the identity matrix; P(k) represents the covariance matrix at time k; K(k) represents the gain matrix; represents the result of transposing 3y(k-1), I(k), and I(k-1); P(k-1) represents the covariance matrix at time k-1.
[0084] Step 4, realizing SOC estimation: by continuously updating the state space equation set based on PID control and DEKF algorithm; PID control includes proportion, integration and differentiation, using the rich system state information of the error, cumulative error and error increment between the actual value and target value of the controlled object to form the control strategy, which can quickly and stably track the target value of the controlled object; DEKF algorithm uses two extended Kalman filters to estimate system state and parameters, and the combination of PID control and DEKF algorithm can more accurately and quickly realize SOC estimation by taking the cumulative error of the battery terminal voltage as the limiting condition;
[0085] As shown in Figure 3 , by continuously updating the discretized state equation set based on PID and double extended Kalman filter algorithm, the commonly used extended Kalman filter algorithm has strong dependence on the model and poor robustness, while the PID control algorithm has good adaptability, strong robustness, can correct deviation, fast process response, can also eliminate static error and improve the static characteristics of the system; the proportion is the input deviation multiplied by a coefficient, and the proportional response of the system deviation signal, once the deviation occurs, the controller will immediately produce an effect, which will reduce the deviation, and the advantage is fast response, which is conducive to system stability; in integral control, the output of the controller is the accumulation of the input quantity with respect to time, and the integral operation of the error depends on time, the longer the time, the larger the integral term, and the advantage is that it can eliminate steady-state error; in differential control, the output of the controller is proportional to the differential of the input error signal, and the advantage is that it can reflect the trend of the system deviation signal, and an effective early correction signal is introduced into the system before the deviation changes greatly, so as to speed up the action of the system, reduce the adjustment time and improve the rapidity of the system. Therefore, the present application adds PID control in DEKF algorithm. Among them, the nonlinear state space model of the system can be expressed as:
[0086]
[0087] In the formula, x k represents the state vector; u k-1 represents the input vector; θ represents the parameter vector; y, d represents the measurement vector; w k , v k , r k , e k represents the covariance matrix Q w , Q v , Q r , Q e independent zero mean Gaussian noise process.
[0088] Definition:
[0089]
[0090]
[0091]
[0092] The specific process based on PID and double extended Kalman filter algorithm is as follows:
[0093] Initialize the algorithm parameters: proportional gain, integral gain, and differential gain are K p , K i , K d ;
[0094] The system parameters and their error covariance are initialized as follows:
[0095]
[0096]
[0097] The system state and its error covariance are initialized as follows:
[0098]
[0099]
[0100] SOC initial value compensation:
[0101] When the battery terminal voltage cumulative error exceeds the limit, the system is judged to have an SOC initial value deviation and the state compensation process is activated. In practice, the battery terminal voltage error is easily affected by system interference such as battery model error and sampling noise, making it difficult to stabilize the system SOC initial value state. Therefore, the voltage cumulative error is used as the judgment basis to avoid excessive system interference caused by the cumulative error during the calculation process. The window estimation method is used to update the voltage cumulative error. The update process is as follows:
[0102]
[0103] in g(k) represents the observed value of the battery terminal voltage at time k, e k represents the battery terminal voltage error at time k, that is, the difference between the terminal voltage observation value and the terminal voltage estimation based on the battery model; m represents the length of the sliding data window;
[0104] When the voltage cumulative error exceeds the limit, the initial SOC value compensation is performed. The proportional, integral and differential links related to the dynamic response speed of the system in the PID control are used to simulate the observer to compensate the system state variables and improve the speed of tracking the actual value. The compensation formula is:
[0105] SOC 0,k+1 =SOC 0,k +K p e k +Ki h K +K d (e k -e k-1 )
[0106] wherein, h k is the battery terminal voltage error integral; SOC 0,k+1 represents the initial value of SOC at k+1 time; K p represents the proportional coefficient; K i represents the integral coefficient; K d represents the differential coefficient; e k represents the battery terminal voltage error at k time; e k-1 represents the battery terminal voltage error at k-1 time;
[0107] The voltage cumulative error in the SOC cycle based on the equivalent circuit model of lithium battery is calculated, and the voltage range capable of representing the effective voltage cumulative error is selected as the voltage cumulative error limit in the calculation result;
[0108] Time update of state and parameter and error covariance thereof:
[0109] Update of state and error covariance thereof:
[0110]
[0111]
[0112] Update of parameter and error covariance thereof:
[0113]
[0114]
[0115] Calculate Kalman gain:
[0116]
[0117]
[0118] Measurement update of state and parameter and error covariance thereof, introduce proportional, integral and differential elements, eliminate static error, suppress modeling error, and add Kalman filter gain, which can stabilize system oscillation, equations as follows:
[0119] Measurement update of state and error covariance thereof:
[0120]
[0121]
[0122] Measurement update of parameters and error covariance of parameters:
[0123]
[0124]
[0125] The above process is cycled to estimate the system state variables and parameter variables in real time, and the estimation result of the SOC is obtained.
[0126] Step 5, analyze the SOC estimation accuracy: introduce RMSE and MAE as numerical angle analysis to analyze the accuracy of estimating the battery SOC by using the PID-DEKF algorithm and the EKF algorithm; the root mean square error is the arithmetic square root of the mean square error, the maximum absolute error is the maximum value of the absolute value of the difference between the true value of SOC and the measured value of SOC, the smaller the value of RMSE and the value of MAE, the more accurate the SOC value estimated by the PID control and DEKF algorithm based on the first-order Davinian model;
[0127] The expression of RMSE and MAE is:
[0128]
[0129] MAE = max | soc r -soc p |
[0130] Wherein, soc r represents the true value of SOC, soc p represents the estimated value of SOC.
[0131] Embodiment: a lithium battery SOC estimation method based on PID control and DEKF, the method specifically comprises the following steps:
[0132] Step 1, construct the equivalent circuit model of lithium battery: the first-order Davinian lithium battery equivalent circuit model is as shown in Figure 2 , which includes open circuit voltage U oc , terminal voltage U L , ohmic resistance R0, polarization resistance R P and polarization capacitance C P , the polarization resistance and the polarization capacitance are connected in parallel to form an RC circuit, which is connected in series with the ohmic resistance to form a first-order Davinian lithium battery equivalent circuit, and a lithium battery equivalent circuit model is built in Matlab / Simulink.
[0133] Step 2, construct the state space equation set: use Kirchhoff's law and the SOC calculation formula to obtain the system state space expression, and discretize it to obtain the state space equation set, the expression is as follows:
[0134]
[0135] wherein k represents the charging and discharging time; SOC k+1 and U P,k+1 respectively represent the SOC value and the polarization voltage at k+1 time; Δt represents the sampling time interval; R P represents the polarization resistance; C P represents the polarization capacitance; SOC k and U P,k respectively represent the SOC value and the polarization voltage at k time; η represents the charging and discharging efficiency; I k represents the charging and discharging current value at k time; U L,k and U oc,k respectively represent the battery terminal voltage value and the open-circuit voltage value at k time; R0 represents the ohmic resistance; I0 represents the charging and discharging current.
[0136] Step 3, identifying the parameters of the equivalent circuit model: using the SOC, working current and load voltage data under the DST city working condition, based on the first-order Thevenin lithium battery equivalent circuit model in step 1, the first-order Thevenin circuit is identified on-line by using the forgetting factor-based recursive least squares method, and the identification parameters α1, α2 and α3 are obtained:
[0137]
[0138]
[0139]
[0140] wherein T represents the sampling time; T P =R P C P ; R0 represents the ohmic resistance; R P represents the polarization resistance; C P represents the polarization capacitance; the circuit parameters including R0, R P and C P values are calculated based on the α1, α2 and α3 and T P :
[0141]
[0142]
[0143]
[0144] The SOC is divided into 10 segments averagely from 0% to 100%, and the parameter identification results at different SOC of the 10 segments are obtained based on the above formula and the forgetting factor-based recursive least squares method.
[0145] Step 4, SOC estimation is achieved: the state equation group after discretization is continuously updated based on the PID and double extended Kalman filtering algorithm proposed in the application, and the specific process of the PID and double extended Kalman filtering algorithm is as follows:
[0146] Initialize algorithm parameters:
[0147] The proportional gain, integral gain and derivative gain are K p , K i and K d respectively.
[0148] The initialization of system parameters and error covariance is as follows:
[0149]
[0150]
[0151] The initialization of system state and error covariance is as follows:
[0152]
[0153]
[0154] SOC initial value compensation:
[0155] The voltage cumulative error is updated by the window estimation method, and the update process is as follows:
[0156]
[0157] Wherein g(k) represents the observation value of the battery terminal voltage at time k, e k represents the battery terminal voltage error at time k, that is, the difference between the observation value of the terminal voltage and the estimated terminal voltage based on the battery model; m represents the length of the sliding data window, and m=40 is selected;
[0158] When the voltage cumulative error is out of limit, the SOC initial value compensation is carried out, and the compensation formula is as follows:
[0159] SOC 0,k+1 = SOC 0,k + K p e k + K i h k + K d (e k -e k-1 )
[0160] Wherein, h k is the integral of the battery terminal voltage error; SOC 0,k+1 represents the initial value of SOC at time k+1; Kp represents the proportional coefficient; K i represents the integral coefficient; K d represents the derivative coefficient; e k represents the battery terminal voltage error at time k; e k-1 represents the battery terminal voltage error at time k-1; the voltage cumulative error limit is selected as ±0.3V;
[0161] Time update of state and parameter error covariance:
[0162] Update of state and error covariance:
[0163]
[0164]
[0165] Update of parameter and error covariance:
[0166]
[0167]
[0168] Calculate the Kalman gain:
[0169]
[0170]
[0171] Measurement update of state and parameter error covariance, introduce proportional, integral and derivative link, eliminate static error, suppress modeling error, the equation is as follows:
[0172] Measurement update of state and error covariance:
[0173]
[0174]
[0175] Measurement update of parameter and error covariance:
[0176]
[0177]
[0178] Loop the above process, real-time estimate system state variables and parameter variables, get the SOC estimation result.
[0179] Step 5, analyze the SOC estimation accuracy: by introducing the root mean square error (RMSE) and the maximum absolute value error (MAE) as the basis for numerical analysis:
[0180]
[0181] MAE = max |soc r -soc p |
[0182] Wherein, soc r The true value of SOC is represented by soc p The SOC estimated value is represented by soc
[0183] By comparing the double extended Kalman filter algorithm and the method of the application, the feasibility and superiority of the method of the application are further verified.The related technical index comparison of the double extended Kalman filter algorithm and the method of the application is shown in Table 1, it can be seen that the method of the application has higher precision and faster convergence time than the double extended Kalman filter method.
[0184] Table 1: Estimation accuracy and convergence time of DEKF and PID-DEKF
[0185]
[0186] In summary, the application aims to accurately estimate the SOC of lithium battery, considers the estimation accuracy and anti-interference ability and the robustness of the algorithm, and proposes a lithium battery SOC estimation method based on PID and double extended Kalman filter, establishes a first-order Davinian lithium battery equivalent model, and uses the recursive least squares method based on the forgetting factor to identify the parameters of the first-order Davinian model, so that the PID-DEKF algorithm based on the first-order Davinian equivalent circuit model estimates the SOC more accurately, improves the convergence speed of SOC estimation, improves the estimation accuracy and robustness, and reduces the static characteristic deviation of the lithium battery.
Claims
1. A lithium battery SOC estimation method based on PID control and DEKF, characterized in that: The method comprises the following steps: Step 1: Construct a lithium battery equivalent circuit model: The entire model consists of a first-order Thevenin circuit consisting of an ideal voltage source, an ohmic internal resistance, a polarization internal resistance, and a polarization capacitor. The polarization internal resistance and the polarization capacitor are connected in parallel to form a first-order RC circuit, which is then connected in series with the ohmic resistance and the open-circuit voltage to form a first-order Thevenin equivalent circuit model of the battery. The ideal voltage source describes the open-circuit voltage of the battery, and the first-order RC circuit describes the polarization phenomenon in the battery reaction, showing the resistive and capacitive characteristics inside the battery, simulating the complex internal reactions of the battery during the charge and discharge process. Step 2: Construct the state-space equations: Based on the components in the first-order Thevenin circuit described in step 1, using Kirchhoff's law, the system equations and observation equations can be obtained. Select state variables, combine with the lithium battery SOC calculation formula, discretize the system equation and observation equation, and obtain the state space equation group of the first-order Thevenin model; Step 3, identifying parameters of the equivalent circuit model: performing online parameter identification on the first-order Thevenin circuit described in step 1 using a recursive least squares method based on a forgetting factor to obtain circuit parameters of the first-order Thevenin circuit, thereby further verifying and correcting the model; Step 4: Implement SOC estimation: Implement SOC estimation by continuously updating the discretized state space equations based on PID control and DEKF algorithm; The PID control includes proportional, integral, and differential functions, and utilizes the error between the actual value of the controlled object and the target value, the accumulated error, and the error increment to form a control strategy. The DEKF algorithm uses two extended Kalman filters to estimate the system state and parameters. Based on the PID control and DEKF algorithm, the accumulated error of the battery terminal voltage is used as a constraint to achieve SOC estimation. Step 5: Analyze the SOC estimation accuracy: Introduce RMSE and MAE as numerical analysis to analyze the difference between the PID-DEKF algorithm and the EKF algorithm in estimating the SOC accuracy of lithium-ion batteries; The RMSE is the arithmetic square root of the mean square error, and the MAE is the maximum absolute value of the difference between the true SOC value and the measured SOC value. The smaller the RMSE and MAE values are, the more accurate the SOC value estimation by the PID control based on the first-order Thevenin model and the DEKF algorithm is.
2. The lithium battery SOC estimation method based on PID control and DEKF according to claim 1, characterized in that: In step 1, the ohmic internal resistance is composed of the battery electrolyte, the positive electrode aluminum foil and the negative electrode aluminum foil, and describes the sudden change characteristics of the voltage during the discharge process of the lithium-ion battery. The polarization internal resistance and polarization capacitance describe the gradual change characteristics of the voltage during the charge and discharge process of the lithium-ion battery.
3. The lithium battery SOC estimation method based on PID control and DEKF according to claim 1, characterized in that: In step 2, the system equation and measurement equation use the battery open circuit voltage, the voltage across the ohmic internal resistance, the polarization internal resistance, and the polarization capacitance to describe the battery terminal voltage and the charge and discharge current, as shown in the following formula: Among them, U L Indicates the battery terminal voltage; U oc Indicates open circuit voltage; U0 indicates the voltage across the ohmic internal resistance; U P Represents the polarization internal resistance and the voltage across the polarization capacitor; I0 represents the charge and discharge current; C P Represents polarized capacitance; R P Indicates polarization internal resistance; dU P Indicates U P The differential of ; dt represents the differential of charge and discharge time; The lithium battery SOC calculation formula is as follows: Where SOC represents the remaining battery capacity; SOC(t0) represents the battery state of charge at the initial moment; Q(I0) represents the battery capacity charged or discharged at the standard charge and discharge current I0 within time t; Q0 represents the rated capacity of the battery; η represents the charge and discharge efficiency; Δt represents the sampling time interval; Therefore, from the above formula, the state space equation expression before discretization can be obtained: in, represents the derivative of SOC; Indicates U P Derivative; R P Represents polarization internal resistance; C P Indicates polarization capacitance; SOC indicates the remaining battery capacity; U P Indicates the polarization internal resistance and the voltage across the polarization capacitor; Q indicates the actual charge of the lithium battery; I0 indicates the charge and discharge current; U L Indicates the battery terminal voltage; U oc represents the open circuit voltage; R0 represents the ohmic internal resistance; The formula of the discretized state space equations is: Among them, k represents the charging and discharging time; SOC k+1 and U P,k+1 They represent the SOC value and polarization voltage at time k+1 respectively; Δt represents the sampling time interval; R P Represents polarization internal resistance; C P Indicates polarization capacitance; SOC k and U P,k They represent the SOC value and polarization voltage at time k respectively; η represents the charge and discharge efficiency; I k Indicates the charge and discharge current value at time k; U L,k and U oc,k They represent the battery terminal voltage and open circuit voltage at time k respectively; R0 represents the ohmic internal resistance; I0 represents the charge and discharge current.
4. The lithium battery SOC estimation method based on PID control and DEKF according to claim 1, characterized in that: In step 3, the forgetting factor in the recursive least square method based on the forgetting factor is set to a fixed value, and the data is weighted time-varyingly, thereby continuously weakening the data collected in the past and enhancing the current newly collected data.
Citation Information
Patent Citations
Online parameter identification and SOC joint estimation method based on variable forgetting factor
CN113030752A
Multi-time-scale state-of-charge and capacity-based equalization strategy
CN114336884A