Disclosure of Invention
In order to realize the problems of SOC estimation precision and jump in the stage of a lithium iron phosphate battery platform and incapability of effectively estimating the SOC of the battery under the condition of fading caused by the use of the battery, the invention provides an adaptive fuzzy Kalman estimation SOC algorithm. The invention adopts the following technical scheme:
an adaptive fuzzy kalman estimation SOC algorithm, comprising the steps of:
s1, establishing an equivalent circuit model of a battery, establishing a state space equation and an observation equation by using an extended Kalman algorithm, and estimating a short-time polarized terminal voltage variable V st Medium-time polarization terminal voltage variable V mt Polarization for a long timeTerminal voltage variable V lt And a battery state of charge, SOC, variable;
s2, setting equivalent internal resistance, each polarization capacitor and polarization resistance of an equivalent circuit model in the battery charging and discharging process through a battery characteristic experiment under the condition that different SOCs are matched with the temperature T;
s3, constructing a traditional extended Kalman algorithm for battery SOC estimation, and realizing Kalman prediction and updating by applying a state space equation and an observation equation to the Kalman equation to estimate the value of the SOC in each sampling period in real time;
s4, applying an EKF and an ampere-hour integral to calculate a corrected ampere-hour integral factor of the platform period in the OCV-SOC non-platform period, applying the EKF again to verify the corrected ampere-hour integral of the platform period when the platform period is finished, introducing fuzzy control to carry out error correction on the platform period correction factor, and finally applying the correction factor to the ampere-hour integral of a new round of non-platform period correction algorithm.
The invention has the advantages that: according to the invention, on the basis of an extended Kalman estimation SOC algorithm, fuzzy control is introduced to correct the extended Kalman platform period, so that the SOC of the lithium iron phosphate battery is accurately estimated in the platform period, and the SOC jump is avoided.
Detailed Description
An adaptive fuzzy kalman estimation SOC algorithm, comprising the steps of:
s1, establishing a third-order equivalent circuit model of a battery, and estimating the following state variables including a short-time polarization terminal voltage, a medium-time polarization terminal voltage, a long-time polarization terminal voltage and a battery state of charge (SOC) by using an extended Kalman algorithm as shown in fig. 1, wherein a state space equation and an observation equation are as follows:
x(k)=A·x(k-1)+B·I bat (k)+v(k) (1)
V term (k)=C·x(k)+R 0 ·I bat (k)+w(k) (2)
τ st =R st ·C st
τ mt =R mt ·C mt
τ lt =R lt ·C lt
where k is the current time, k1 is the last time, x is the state variable, V oc The open circuit voltage of the OCV-SOC is checked for the battery SOC, S is the battery SOC, V term For real-time measurement of terminal voltage, R 0 Is the internal resistance of the battery, I bat (k) The charge and discharge current at time k, v (k) is state noise at time k, w (k) is observation noise at time k, T s For sampling period C use The method is characterized by comprising the steps of obtaining the maximum available capacity of a battery, wherein A is a state transition matrix, B is an excitation matrix and C is an observation matrix; v (V) st 、V mt 、V lt The voltage is respectively short-time, medium-time and long-time polarization terminal voltage; τ st 、τ mt 、τ lt Respectively short time, medium time and long time constants, R st 、R mt 、R lt The polarization resistance is short, medium and long, C st 、C mt 、C lt Respectively short-time, medium-time and long-time polarization capacitances.
S2, defining equivalent internal resistance, polarization capacitance and polarization resistance of each SOC and temperature T through a battery characteristic experiment, and matching the equivalent resistance, the polarization resistance and the polarization resistance in the moment according to different SOCs and T in the battery charging and discharging process, so that the estimation process is more flexible, and the estimation precision is improved.
And S3, constructing a traditional extended Kalman algorithm for estimating the battery SOC, and estimating the value of the SOC in each sampling period in real time through a Kalman prediction and update equation.
Specifically, the state space equation and the observation equation obtained in step S1 are applied to the kalman equation as follows:
P - (k)=AP(k-1)A T +Q (4)
K(k)=P - (k)C T (CP - (k)C T +R) -1 (5)
P(k)=(I-K(k)C)P - (k) (7)
wherein equation (3) is calculated by the state variable x (k-1) and the excitation I at the previous time bat (k-1) calculating a pre-estimated value at the present timeThe equation (4) updates a state transition covariance pre-estimation value P- (k) at the current moment according to the state transition covariance matrix P (k-1) at the last moment and the noise covariance matrix Q; equation (5) calculates the Kalman coefficient K (K) by using the pre-estimated state transition covariance P- (K) and the observed noise variance R, and updates the state estimation value ++at the current moment by the residual error of K (K) and the observed value y (K) and the pre-estimated value>And synchronously updates the state transition covariance matrix P (k) at the current moment.
S4, applying an EKF and an ampere-hour integral to calculate a corrected ampere-hour integral factor of the platform stage in the OCV-SOC non-platform stage, applying the EKF to verify the corrected ampere-hour integral of the platform stage again at the end of the platform stage, introducing fuzzy control to correct errors of the platform stage correction factor, and finally applying the correction factor to the ampere-hour integral of a new round of non-platform stage correction algorithm to ensure that the smaller the deviation between the ampere-hour integral of the non-platform stage and the estimated EKF is, the smaller the error of the corrected ampere-hour integral of the new round of platform stage is, so that the SOC value of the lithium iron phosphate platform stage can be accurately estimated.
The method comprises the following steps:
s41, designing a fuzzy controller, wherein the absolute value of the deviation of the SOC and the current SOC estimated by the ampere-hour integral and the extended Kalman filtering are used as the input of the fuzzy controller, the fuzzy correction factor fac is used as the output, the input variable and the output variable are subjected to fuzzification respectively, a corresponding membership function is established, the fuzzy rule is calibrated according to experimental data, and the completed fuzzy logic is shown in figure 3.
S42, dividing the battery cell OCV-SOC curve into SOC low (SOC) lo ) SOC platform (SOC) platform ) High with SOC (SOC) hi ) Three sections, the transition points are K1 and K2 respectively, as shown in FIG. 2, when the SOC is at the SOC lo Or SOC (System on chip) hi The EKF estimation SOC is activated. And at this time use the SOC EKF SOC as final estimation of SOC est . Verifying errors of a platform period correction algorithm at the positions of K1check and K2check, and correcting the platform period correction factors through fuzzy control; let the final stage correction factor beAlgorithm run-time +.>Will be +.>And storing the correction data into a nonvolatile memory, and taking the next correction as a reference correction factor for iteration.
S43A, as being chargedState and satisfy SOC init +X is less than or equal to K1, wherein X is the minimum effective value for defining the SOC variation, SOC init For the SOC estimation value in the initial state, the charging calibration condition is satisfied, and [ init, K1 ] is calculated through ampere-hour integration]The SOC variation during the period is ΔSOC AH The SOC variation estimated by EKF is delta SOC EKF =SOC EKF (K1)-SOC init The method comprises the steps of carrying out a first treatment on the surface of the Considering the problems of noise and accuracy of the sensor of the ampere-hour integral current, the results of the estimation of the two algorithms are different, and the deviation of the SOC variation value estimated by the two algorithms is delta SOC diff =ΔSOC EKF -ΔSOC AH The method comprises the steps of carrying out a first treatment on the surface of the Correction factor of K1 pointAmpere-hour integral SOC as this plateau AHfix Is a correction factor of (a); />Where i is the charging current, C is the nominal capacity, SOC in plateau phase est Is SOC (State of charge) AHfix ;
When SOC is est When=k2, EKF estimation SOC is activated again, when SOC est When=k2check, the platform phase correction algorithm is validated: the method comprises the following specific steps:
S43A1, considering that the EKF estimates the SOC more accurately in the non-platform period, correcting the SOC error SOC estimated by ampere-hour integration err =|SOC EKF (K2check)-SOC AHfix (K2 check) |; recording device
S442, selecting SOC by applying the fuzzy controller of the step S41 err And K2check is taken as an input, and an error correction factor fac (K2 check) is calculated.
S43A3, correcting factor corrected again according to errorPlatform phase repair, which can be considered a one-time charging processJust, will be +.>And writing into the nonvolatile memory.
S53B, homonymy discharge satisfies SOC est When X is more than or equal to K2, wherein X is the minimum effective value for defining the SOC variation and meets the discharge calibration condition, the ampere-hour integration at the moment needs to take the last correction factor into consideration, and the ampere-hour integration is read from a nonvolatile memory[init,K2]The SOC variation calculated by ampere-hour integration during which the correction factor of the previous round is applied is delta SOC AH And then the delta SOC calculated in the period EKF Comparing, calculating correction factor ++K 2 point>Since the last round of flatbed correction factor is applied +.>Compared with the calculated +.>Closer to 1, thereby enabling the estimation of the SOC from the K1 value after the discharge has passed the plateau AHfix (K1) The error with the actual SOC is gradually reduced, and the estimated SOC precision is higher as the number of times that the charge-discharge cycle meets the calibration condition of the platform phase correction algorithm is more.
According to the method, continuous charging data in a certain period of time are simulated, as shown in fig. 4, when the SOC estimation is carried out on the lithium iron phosphate battery through only the extended Kalman filter, the real SOC is more consistent with the extended Kalman algorithm in the platform period (about 25%), but after the platform period is carried out, the extended Kalman state estimation process needs to be carried out through checking an OCV-SOC table, so that the deviation between the extended Kalman estimated SOC value and the real SOC value is larger and larger, when the SOC exceeds 80%, the deviation between the extended Kalman and the real SOC is reduced due to the fact that the SOC leaves the platform period, but the value of the real SOC still cannot be reflected, the extended Kalman algorithm is corrected in the OCV-SOC platform period of the lithium iron phosphate battery through introducing a fuzzy control algorithm, the extended Kalman algorithm is corrected immediately after the extended Kalman algorithm enters the platform period, the SOC estimation is gradually corrected to the real SOC in the platform period, the SOC is ideal in the 60% synchronization with the real SOC, and the fuzzy estimation effect of the lithium iron phosphate algorithm can be seen.
The above embodiments are merely preferred embodiments of the present invention and are not intended to limit the present invention, and any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.