Battery SOC determination method and device, computer equipment and storage medium
Through the adaptive filtering algorithm and the traceless Kalman filtering algorithm, combined with the battery equivalent model, the preset problem of measurement noise matrix in battery SOC determination is solved, and the accuracy of the SOC and the stability of the battery management system are improved.
Patent Information
- Application Number
- CN202411122038.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-11-26
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, there are accuracy problems in determining the battery SOC, especially the preset of the measurement noise matrix leads to inaccurate determination of the SOC, which affects the effectiveness of the battery management system.
The adaptive filtering algorithm is used to estimate the measurement noise matrix of the battery, and combined with the traceless Kalman filtering algorithm, the state vector is iteratively updated through the battery equivalent model and state equation to improve the determination accuracy of SOC.
It improves the determination accuracy of the battery SOC, reduces the error in the measurement noise matrix, and enhances the reliability and battery life of the battery management system.
Smart Images

Figure CN119024202A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a method, device, computer equipment and storage medium for determining a battery SOC. Background Art
[0002] my country has taken the lead in developing new energy vehicles, which has promoted the rapid development of the new energy vehicle industry. As the core component of new energy vehicles, batteries have attracted much attention. Among them, the state of charge (SOC) of the battery is a key parameter that reflects the remaining power of the battery and plays a vital role in the battery management system. In addition, the accurate evaluation of the battery SOC is crucial to the health and safety of the battery, which can help the battery management system achieve the best charge and discharge control of the battery, thereby extending the battery life. Therefore, how to determine the SOC of the battery is the focus of the industry. Summary of the invention
[0003] The embodiments of the present application provide a method, device, computer equipment and storage medium for determining the SOC of a battery, which can improve the accuracy of determining the SOC of a battery. The technical solution is as follows:
[0004] In one aspect, a method for determining a battery SOC is provided, the method comprising:
[0005] Based on a battery equivalent model and for the battery at multiple temperatures, parameter identification is performed on the battery to obtain battery parameters of the battery at the multiple temperatures, wherein the battery parameters include a first voltage across a charge transfer resistor, a second voltage across a diffusion resistor, an open circuit voltage, a current, a temperature, and an ohmic internal resistance;
[0006] Determine a state equation and a measurement equation of the battery equivalent model based on the first voltage, the second voltage, the open circuit voltage, the current, the temperature, and the ohmic internal resistance;
[0007] Determine a state vector and a covariance matrix of the battery at time k, wherein the state vector of the battery at time k includes the first voltage, the second voltage, and the SOC of the battery;
[0008] Determine the measurement noise matrix of the battery at time k based on an adaptive filtering algorithm;
[0009] Based on the measurement noise matrix of the battery at time k, updating the covariance matrix of the battery at time k;
[0010] Determine a first sigma point set of the battery at time k based on the state vector and covariance matrix of the battery at time k, wherein the first sigma point set includes multiple state vectors of the battery at time k;
[0011] Based on each state vector included in the first sigma point set, updating the state vector of the battery at time k;
[0012] Based on the updated state vector and covariance matrix of the battery at time k, the state vector of the battery is updated in sequence through the state equation and measurement equation of the battery equivalent model until the state vector of the battery is finally obtained;
[0013] The final SOC of the battery is determined from the final state vector of the battery.
[0014] In a possible implementation, based on the updated state vector and covariance matrix of the battery at time k, the state vector of the battery is updated in sequence through the state equation and measurement equation of the battery equivalent model until the state vector of the battery is finally obtained, including:
[0015] Based on the updated state vector and covariance matrix of the battery at time k, determine the state vector and covariance matrix of the battery at time k+1 through the state equation and measurement equation of the battery equivalent model;
[0016] Determine the measurement noise matrix of the battery at time k+1 based on an adaptive filtering algorithm and the measurement noise matrix of the battery at time k;
[0017] Based on the measurement noise matrix of the battery at time k+1, updating the covariance matrix of the battery at time k+1;
[0018] Determine a second sigma point set of the battery at time k+1 based on the state vector and covariance matrix of the battery at time k+1, wherein the second sigma point set includes multiple state vectors of the battery at time k+1;
[0019] Based on each state vector included in the second sigma point set, updating the state vector of the battery at time k+1;
[0020] Based on the updated state vector and covariance matrix of the battery at time k+1, the state vector and covariance matrix of the battery at time k+1 are updated again through the state equation and measurement equation of the equivalent model of the battery, and so on, until the state vector of the battery is finally obtained.
[0021] In another possible implementation, the state vector and covariance matrix of the battery at time k+1 are updated again through the state equation and measurement equation of the equivalent model of the battery based on the updated state vector and covariance matrix of the battery at time k+1, and so on, until the state vector of the battery is finally obtained, including:
[0022] Determine the gain matrix of the battery at time k+1 based on the covariance matrix of the battery updated at time k+1 and the measurement data of the battery, and determine the measured output covariance matrix of the battery at time k+1;
[0023] Based on the gain matrix, the state vector and covariance matrix of the battery at time k+1 are updated through the state equation and measurement equation of the equivalent model of the battery;
[0024] Determine the SOC of the battery included in the updated state vector of the battery at time k+1;
[0025] When the SOC of the battery included in the state vector updated by the battery at time k+1 is within the estimation range and the iteration stop condition is not reached, continue the iterative training;
[0026] When the SOC of the battery included in the updated state vector of the battery at time k+1 is not within the estimation range or the iteration stop condition is reached, the updated state vector of the battery at time k+1 is determined as the final state vector of the battery.
[0027] In another possible implementation, determining the measurement noise matrix of the battery at time k+1 based on the adaptive filtering algorithm and the measurement noise matrix of the battery at time k includes:
[0028] Determine the measurement noise mean of the battery at time k, the measurement noise mean of the battery at time k+1, the measurement matrix of the battery at time k+1, the next step prediction covariance matrix of the battery from time k to time k+1, the system residual of the battery at time k+1, and the first weighted value;
[0029] Based on the measurement noise matrix of the battery at time k, the measurement noise mean of the battery at time k, the measurement noise mean of the battery at time k+1, the measurement matrix of the battery at time k+1, the next step prediction covariance matrix of the battery from time k to time k+1, the system residual of the battery at time k+1 and the first weighted value, the measurement noise matrix of the battery at time k+1 is determined by the following formula 1;
[0030] Formula 1:
[0031] r k+1 =(1-d k )r k +d k ε k+1
[0032] Among them, r k and r k+1 are the measurement noise means at time k and time k+1, R k and R k+1 is the measurement noise matrix at time k and time k+1, H k+1 is the measurement matrix at time k+1, P x,k+1,k is the next prediction covariance matrix from time k to time k+1, d k is the first weighted value, ε k+1 is the system residual at time k+1.
[0033] In another possible implementation, updating the covariance matrix of the battery at time k+1 based on the measurement noise matrix of the battery at time k+1 includes:
[0034] Based on the measurement matrix of the battery at time k, determining the measurement matrix of the battery at time t+1 through the measurement equation;
[0035] Determine the observation value and the second weighted value of the battery at time t+1;
[0036] Based on the measurement noise matrix, measurement matrix, observation value and second weighted value of the battery at time k+1, the covariance matrix of the battery at time t+1 is updated by the following formula 2;
[0037] Formula 2:
[0038] in, is the covariance matrix of the battery after updating at time k+1, W i c is the second weighted value, Z i,k+1,k is the measurement matrix of the battery at time k+1, is the observed value of the battery at time k+1, R k+1 represents the measurement noise matrix of the battery at time k+1, and n is a constant.
[0039] In another possible implementation, determining the first sigma point set of the battery at time k based on the state vector and covariance matrix of the battery at time k includes:
[0040] Determine a third sigma point set of the battery at time k based on the scale parameter corresponding to the battery, the state vector and covariance matrix of the battery at time k, and the dimensions included in the state vector of the battery at time k;
[0041] Performing nonlinear transformation and weighted processing on each state vector in the third sigma point set, and updating the state vector and covariance matrix of the battery at time k;
[0042] Based on the scale parameter corresponding to the battery, the updated state vector and covariance matrix of the battery at time k, and the dimensions included in the updated state vector of the battery at time k, the fourth sigma point set of the battery at time k is determined, and so on, until the first sigma point set of the battery at time k is obtained.
[0043] In another aspect, a device for determining a battery SOC is provided, the device comprising:
[0044] an identification module, configured to perform parameter identification on the battery at multiple temperatures based on a battery equivalent model, and obtain battery parameters of the battery at the multiple temperatures, wherein the battery parameters include a first voltage across a charge transfer resistor, a second voltage across a diffusion resistor, an open circuit voltage, a current, a temperature, and an ohmic internal resistance;
[0045] A first determination module, configured to determine a state equation and a measurement equation of the battery equivalent model based on the first voltage, the second voltage, the open circuit voltage, the current, the temperature, and the ohmic internal resistance;
[0046] A second determination module, configured to determine a state vector and a covariance matrix of the battery at time k, wherein the state vector of the battery at time k includes the first voltage, the second voltage, and the SOC of the battery;
[0047] A third determination module is used to determine the measurement noise matrix of the battery at time k based on an adaptive filtering algorithm;
[0048] A first updating module, configured to update a covariance matrix of the battery at time k based on a measurement noise matrix of the battery at time k;
[0049] a fourth determination module, configured to determine a first sigma point set of the battery at time k based on the state vector and covariance matrix of the battery at time k, wherein the first sigma point set includes multiple state vectors of the battery at time k;
[0050] A second updating module, configured to update the state vector of the battery at time k based on each state vector included in the first sigma point set;
[0051] A third updating module is used to update the state vector of the battery in sequence through the state equation and measurement equation of the battery equivalent model based on the updated state vector and covariance matrix of the battery at time k until the state vector of the battery is finally obtained;
[0052] The fifth determination module is used to determine the final SOC of the battery from the final state vector of the battery.
[0053] In a possible implementation, the third updating module is used to determine the state vector and covariance matrix of the battery at time k+1 based on the updated state vector and covariance matrix of the battery at time k, through the state equation and measurement equation of the battery equivalent model; determine the measurement noise matrix of the battery at time k+1 based on the adaptive filtering algorithm and the measurement noise matrix of the battery at time k; update the covariance matrix of the battery at time k+1 based on the measurement noise matrix of the battery at time k+1; and covariance matrix, determine a second sigma point set of the battery at time k+1, the second sigma point set including multiple state vectors of the battery at time k+1; based on each state vector included in the second sigma point set, update the state vector of the battery at time k+1; based on the updated state vector and covariance matrix of the battery at time k+1, through the state equation and measurement equation of the equivalent model of the battery, update the state vector and covariance matrix of the battery at time k+1 again, and so on, until the state vector of the battery is finally obtained.
[0054] In another possible implementation, the third update module is used to determine the gain matrix of the battery at time k+1 based on the covariance matrix of the battery after being updated at time k+1 and the measured output covariance matrix of the battery at time k+1 determined based on the measurement data of the battery; based on the gain matrix, update the state vector and covariance matrix of the battery at time k+1 through the state equation and measurement equation of the equivalent model of the battery; determine the SOC of the battery included in the state vector of the battery after being updated at time k+1; continue iterative training when the SOC of the battery included in the state vector of the battery after being updated at time k+1 is within the estimation range and the iteration stop condition is not met; when the SOC of the battery included in the state vector of the battery after being updated at time k+1 is not within the estimation range or the iteration stop condition is met, determine the state vector of the battery after being updated at time k+1 as the final state vector of the battery.
[0055] In another possible implementation, the third updating module is used to determine the measurement noise mean of the battery at time k, the measurement noise mean of the battery at time k+1, the measurement matrix of the battery at time k+1, the next prediction covariance matrix of the battery from time k to time k+1, the system residual of the battery at time k+1 and the first weighted value; based on the measurement noise matrix of the battery at time k, the measurement noise mean of the battery at time k, the measurement noise mean of the battery at time k+1, the measurement matrix of the battery at time k+1, the next prediction covariance matrix of the battery from time k to time k+1, the system residual of the battery at time k+1 and the first weighted value, the measurement noise matrix of the battery at time k+1 is determined by the following formula 1;
[0056] Formula 1:
[0057] r k+1 =(1-d k )r k +d k ε k+1
[0058] Among them, r k and r k+1 are the measurement noise means at time k and time k+1, R k and R k+1 is the measurement noise matrix at time k and time k+1, H k+1 is the measurement matrix at time k+1, P x,k+1,k is the next prediction covariance matrix from time k to time k+1, d k is the first weighted value, ε k+1 is the system residual at time k+1.
[0059] In another possible implementation, the third updating module is used to determine the measurement matrix of the battery at time t+1 through the measurement equation based on the measurement matrix of the battery at time k; determine the observation value and the second weighted value of the battery at time t+1; based on the measurement noise matrix, measurement matrix, observation value and second weighted value of the battery at time k+1, update the covariance matrix of the battery at time t+1 through the following formula 2;
[0060] Formula 2:
[0061] in, is the covariance matrix of the battery after updating at time k+1, W i c is the second weighted value, Z i,k+1,k is the measurement matrix of the battery at time k+1, is the observed value of the battery at time k+1, R k+1 represents the measurement noise matrix of the battery at time k+1, and n is a constant.
[0062] In another possible implementation, the fourth determination module is used to determine the third sigma point set of the battery at time k based on the scale parameter corresponding to the battery, the state vector and covariance matrix of the battery at time k, and the dimensions included in the state vector of the battery at time k; perform nonlinear transformation and weighted processing on each state vector in the third sigma point set to update the state vector and covariance matrix of the battery at time k; determine the fourth sigma point set of the battery at time k based on the scale parameter corresponding to the battery, the updated state vector and covariance matrix of the battery at time k, and the dimensions included in the updated state vector of the battery at time k, and so on, until the first sigma point set of the battery at time k is obtained.
[0063] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement any of the above-mentioned methods for determining the battery SOC.
[0064] On the other hand, a computer-readable storage medium is provided, in which at least one program code is stored. The at least one program code is loaded and executed by a processor to implement any of the above-mentioned methods for determining the battery SOC.
[0065] On the other hand, a computer program product is provided, wherein at least one program code is stored in the computer program product, and the at least one program code is loaded and executed by a processor to implement any of the above-mentioned methods for determining the battery SOC.
[0066] In the embodiment of the present application, the measurement noise matrix will affect the determination of SOC; and in the related art, a preset measurement noise matrix is set, which will cause the set measurement noise matrix to be inaccurate, thereby affecting the accuracy of the determined SOC. In the embodiment of the present application, based on the adaptive filtering algorithm, the measurement noise matrix of the battery at time k is estimated, and the adaptive filtering algorithm can adaptively adjust and finally give a reasonable measurement noise matrix, thereby improving the accuracy of the determined measurement noise matrix. In this way, combined with the unscented Kalman filtering algorithm, the accuracy of the determined battery SOC can be improved.
[0067] It is to be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 is a flow chart of a method for determining a battery SOC provided in an embodiment of the present application;
[0069] Figure 2 is a circuit diagram of an equivalent circuit model provided in an embodiment of the present application;
[0070] Figure 3 is a flow chart of a method for determining a battery SOC provided in an embodiment of the present application;
[0071] Figure 4 This is a current, SOC, and voltage curve provided in an embodiment of the present application when the initial SOC value is 70%;
[0072] Figure 5 It is a voltage absolute error curve when the initial SOC value is 70% provided in an embodiment of the present application;
[0073] Figure 6 is a convergence curve of a different algorithm provided in an embodiment of the present application;
[0074] Figure 7 is a structural schematic diagram of a battery SOC determination device provided in an embodiment of the present application;
[0075] Figure 8 It is a structural block diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0076] In order to make the technical solutions and advantages of the present application clearer, the implementation methods of the present application are described in further detail below.
[0077] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0078] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions. For example, the battery parameters and battery measurement data involved in this application are all obtained with full authorization.
[0079] Figure 1 is a flow chart of a method for determining a battery SOC provided in an embodiment of the present application, which is executed by a computer device, see Figure 1 , the method comprising:
[0080] Step 101: The computer device identifies battery parameters at multiple temperatures based on a battery equivalent model to obtain battery parameters at multiple temperatures, wherein the battery parameters include a first voltage across a charge transfer resistor, a second voltage across a diffusion resistor, an open circuit voltage, a current, a temperature, and an ohmic internal resistance.
[0081] The battery equivalent model is built through Matlab's Simulink module, and the battery equivalent model is used to simulate the battery parameters collected in real time, and the battery SOC is determined by the battery parameters. For example, the battery equivalent model uses a second-order resistor-capacitance (RC) equivalent circuit model. Based on Kirchhoff's circuit law, the equation of the equivalent circuit model can be listed. The battery equivalent model is as follows: Figure 2 As shown, the battery equivalent model includes a charge transfer resistor R1, a charge transfer capacitor C1, a diffusion resistor R2, a diffusion capacitor C2 and an ohmic internal resistance R0; wherein, a section of the ohmic internal resistance R0 is electrically connected to the negative electrode of the battery, the positive electrode of the battery is electrically connected to the charge transfer resistor R1 and the charge transfer capacitor C1 at the same time, and the other end of the charge transfer resistor R1 and the charge transfer capacitor C1 after being connected in parallel is electrically connected to the diffusion resistor R2 and the diffusion capacitor C2 at the same time, and the diffusion resistor R2 and the diffusion capacitor C2 are connected in parallel, so that the charge transfer resistor R1 and the charge transfer capacitor C1 form a polarization loop, and the diffusion resistor R2 and the diffusion capacitor C2 form a concentration difference loop; when the battery discharge direction is set to be positive, Uoc is the open circuit voltage of the circuit, and UL is the terminal voltage of the battery.
[0082] In some embodiments, the computer device uses a hybrid power pulse characteristic (Hybrid Pulse Power Characteristic, HPPC) experiment to perform parameter identification on the equivalent circuit model to obtain battery parameters of the battery at multiple temperatures. For example, the computer device uses the least squares method with a variable adaptive forgetting factor to perform parameter identification on the equivalent circuit model to obtain battery parameters of the battery at multiple temperatures; when the computer device uses the least squares method with a variable adaptive forgetting factor for parameter identification, a forgetting factor is introduced to overcome the "data saturation" phenomenon of the least squares method with a variable adaptive forgetting factor; wherein, in this example, the initial value r of the forgetting factor is set to 0.98, and the relationship between the subsequently updated variable adaptive forgetting factor and the battery parameter can be expressed as:
[0083] r=1-(y0-H′*θ)*(y0-H′*θ)′ / (1+H′*P*H)
[0084] Among them, r is the variable adaptive forgetting factor, y0 is the difference between the open circuit voltage and the measured terminal voltage, H is the data vector, θ is the coefficient vector to be estimated, and P is the covariance matrix of the battery equivalent model. The identified parameters are: Uoc, R0, R1, C1, R2, C2.
[0085] Since there are differences in the capacity parameters of the battery at different operating temperatures, and there are also differences in the dischargeable capacity of the battery at different operating temperatures, it is obvious that the temperature has an impact on the parameter identification results of the battery and the corresponding SOC value obtained by looking up the current open circuit voltage table. Therefore, in the embodiments of the present application, considering the impact of temperature on the estimated battery SOC can reduce the error of the determined battery SOC, that is, improve the accuracy of the determined battery SOC. For example, through the embodiments of the present application, it can be obtained that the SOC is closer to the actual battery in low and high temperature environments.
[0086] The battery in the embodiment of the present application may be a lithium battery, and the lithium battery in the embodiment of the present application may be used in the fields of transportation, medical treatment, and energy storage; for example, if the lithium battery is used in the field of transportation, then the lithium battery is used in electric vehicles to provide power for the electric vehicles. The lithium battery in the embodiment of the present application may be any lithium battery; for example, the lithium battery may be a single-cell 20Ah lithium iron phosphate battery with a voltage range of 2.0V-3.65V, and the positive electrode material and negative electrode material of the lithium battery are lithium iron phosphate and artificial graphite, respectively.
[0087] Step 102: The computer device determines a state equation and a measurement equation of a battery equivalent model based on the first voltage, the second voltage, the open circuit voltage, the current, the temperature, and the ohmic internal resistance.
[0088] The state equation and measurement equation of the nonlinear system set by the computer equipment are:
[0089]
[0090] Among them, the state vector of the nonlinear system at time k is X k ; The state vector of the nonlinear system at time k-1 is X k-1 ; The observed variable of the nonlinear system at time k is Z k ; The state transfer matrix of the nonlinear system is Φ k-1,k , and Φ k-1,k It represents the state transition relationship from time k-1 to time k; the observation matrix of the nonlinear system is H k , and H k represents the relationship between the observed variable and the state vector at time k; the process noise of the nonlinear system at time k-1 is w k-1 , and w k Subject to the mean value q k , the covariance is Q k Gaussian distribution of; the measurement noise of the nonlinear system at time k is v k , and v k The mean is r k , covariance is R k Gaussian distribution; the process noise and measurement noise of nonlinear systems are independent of each other.
[0091] The computer device determines the state equation and measurement equation of the battery equivalent model based on the first voltage, the second voltage, the open circuit voltage, the current, the temperature, the ohmic internal resistance, and the state equation and measurement equation of the nonlinear system. The state equation and measurement equation of the battery equivalent model are used to determine the SOC of the battery through an unscented Kalman filter algorithm. The state equation and measurement equation of the battery equivalent model can also be called the unscented Kalman filter state equation and measurement equation.
[0092] Among them, the state equation of the battery equivalent model can be:
[0093] X k =AX k-1 +BU k +w k-1
[0094] k is the simulation time, X k is the state vector of the battery at time k, X k-1 is the state vector of the battery at time k-1, U k is the terminal voltage of the battery at time k; AX k-1 +BU k is the state transition equation of the battery equivalent model, w k-1 is the process noise matrix of the battery at time k-1, A represents the state transfer system matrix, and B represents the transfer matrix.
[0095] The sampling time of the current and voltage (first voltage, second voltage and open circuit voltage) in the embodiment of the present application is 0.01s, so the calculation period T of the iterative update of the present application is also 0.01; the capacity of the lithium iron phosphate battery selected is 20Ah, represented by Qn. k and X k+1 The state transfer system matrix between is defined as A, which is as follows:
[0096]
[0097] Among them, t1 and t2 are time constants, T is the sampling time interval, and X k is the state vector of the battery at time k, U k is the open circuit voltage of the battery at time k.
[0098] The transfer matrix B is:
[0099]
[0100] Among them, a is current, b is temperature, Qn is battery capacity, qr is battery capacity parameter (battery capacity parameter can be a constant), R1 is charge transfer resistance, R2 is diffusion capacitance, t1 and t2 are time constants, and T is sampling time interval.
[0101] The computer device uses the terminal voltage of the battery as the observed quantity, and the measurement equation for determining the battery equivalent model can be:
[0102] Z k =h(X k )+v(k)
[0103] U L (k) = U OC (SOC(k))-U1(k)-U2(k)-R0I L (k-1)+v(k)
[0104] Among them, Z k is the measurement vector of the battery at time k, h(X k ) is the measurement conversion equation, v(k) is the measurement noise matrix of the battery at time k, U L (k) is the terminal voltage of the battery at time k; U OC is the open circuit voltage of the battery, SOC(k) is the SOC value of the battery at time k, U1(k) is the first voltage of the battery at time k, U2(k) is the second voltage of the battery at time k, R0 is the ohmic internal resistance, I L (k-1) is the current of the battery at time k-1.
[0105] In some embodiments, the computer device may also determine an output matrix, which is used to subsequently determine a measurement output covariance matrix; wherein the content of the output matrix C is as follows:
[0106]
[0107] Where, OCV represents the open circuit voltage, x k represents the state vector at time k, u k represents the open circuit voltage at time k.
[0108] Obviously, the dimension L of the state vector X is 3. We set the distribution state α of the unscented Kalman filter control sampling point to 0.01; include the influence of high-order terms, and set the non-negative weight coefficient β of the combined high-order term moment to 2; use the scaling parameter to reduce the total prediction error λ = α 2 (L+k)-L is calculated, where α is the parameter to be determined and k is the adopted time.
[0109] Step 103: The computer device determines the state vector and covariance matrix of the battery at time k, where the state vector of the battery at time k includes the first voltage, the second voltage, and the SOC of the battery.
[0110] In the embodiment of the present application, iterative training starts with k=0, and this step is for the computer device to determine the initial value of the state vector and the initial value of the covariance matrix of the battery at the initial moment. It is [U1; U2; SOC], and in this example, it is assigned to [0; 0; SOC0], where SOC0 is the initial value of SOC. SOC0 can be determined based on the open circuit voltage by looking up the table from the correspondence between open circuit voltage and SOC. The mean value q of the process noise matrix of the battery is assigned to 0.01. If this parameter q is increased, the target true trajectory is the curve; the measurement noise mean r is assigned to 0.0001. Therefore, the initial value P of the covariance matrix is:
[0111]
[0112] Step 104: The computer device determines the measurement noise matrix of the battery at time k based on an adaptive filtering algorithm.
[0113] The adaptive filtering algorithm can be any filtering algorithm that can adaptively estimate the measurement noise matrix; for example, the adaptive filtering algorithm can be Sage-Husa; wherein, Sage-Husa is an update formula that adds the measurement noise matrix R to the unscented Kalman filter for adaptive estimation. During the update process of the measurement noise matrix, the covariance matrix based on the measurement noise matrix is adaptively updated, so that the SOC of the battery determined based on the updated covariance matrix is smoother and closer to the theoretical value.
[0114] In the embodiment of the present application, iterative training starts with k=0. When k=0, the measurement noise matrix can be a preset measurement noise matrix. When k=1 or greater than 1, the computer device determines the measurement noise matrix of the battery at time k based on the adaptive filtering algorithm through the following steps (1)-(2), including:
[0115] (1) The computer device determines the measurement noise mean of the battery at time k-1, the measurement noise mean of the battery at time k, the measurement matrix of the battery at time k, the next step prediction covariance matrix of the battery from time k-1 to time k, the system residual of the battery at time k and the third weighted value.
[0116] (2) The computer device determines the measurement noise matrix of the battery at time k based on the measurement noise matrix of the battery at time k-1, the measurement noise mean of the battery at time k, the measurement noise mean of the battery at time k, the measurement matrix of the battery at time k, the next step prediction covariance matrix of the battery from time k-1 to time k, the system residual of the battery at time k and the third weighted value, through the following formula three;
[0117] Formula 3:
[0118] r k =(1-d k-1 )r k-1 +d k-1 ε k
[0119] Among them, r k-1 and r k are the measurement noise means at time k-1 and time k+1, R k-1 and R k is the measurement noise matrix at time k-1 and time k, H k is the measurement matrix at time k, P x,k,k is the next prediction covariance matrix from time k-1 to time k, d k-1 is the third weighted value, ε k is the system residual at time k.
[0120] In some embodiments, the computer device also needs to determine whether the system residual of the battery at time k is equal to the theoretical value; when the system residual of the battery at time k is equal to the theoretical value, step 105 is executed; when the system residual of the battery at time k is not equal to the theoretical value, step 104 is re-executed, that is, the measurement noise matrix of the battery at time k is re-determined based on the adaptive filtering algorithm until the determined system residual is equal to the theoretical value. For example, Among them, γ≥1. If this formula holds, it is considered that the filter diverges, and it is necessary to re-determine the measurement noise matrix of the battery at time k based on the adaptive filtering algorithm.
[0121] In the embodiment of the present application, the Sage-Husa adaptive algorithm is improved by adding a system residual value criterion, which solves the problem of filter fluctuation when the initial value is inaccurate. In addition, the improved Sage-Husa adaptive algorithm solves the problems of long adjustment time and large filter fluctuation when the initial value is inaccurate, thereby achieving rapid tracking of the real state of the system, thereby improving the tracking performance and calculation efficiency of the algorithm.
[0122] Step 105: The computer device updates the covariance matrix of the battery at time k based on the measurement noise matrix of the battery at time k.
[0123] When k is 0, the covariance matrix of the battery at time k is the initial value of the covariance matrix; when k=1 or greater than 1, this step can be implemented by the following steps (1-3), including:
[0124] (1) The computer device determines the measurement matrix of the battery at time k through the measurement equation based on the measurement matrix of the battery at time k-1.
[0125] The computer device inputs the measurement matrix of the battery at time k-1 into the measurement equation and outputs the measurement matrix of the battery at time k.
[0126] (2) The computer device determines the observation value and the second weighted value of the battery at time k.
[0127] The computer device obtains the observation value of the battery at time k from the experimental data of the battery at time k. The second weighted value can be set and changed as needed, and the second weighted value is not specifically limited in the embodiment of the present application.
[0128] (3) The computer device updates the covariance matrix of the battery at time k based on the measurement noise matrix, measurement matrix, observation value and second weighted value of the battery at time k through the following formula 4.
[0129] Formula 4:
[0130] in, is the covariance matrix of the battery after updating at time k, W i c is the second weighted value, Z i,k,k is the measurement matrix of the battery at time k, is the observed value of the battery at time k, R k represents the measurement noise matrix of the battery at time k, and n is a constant.
[0131] Step 106: The computer device determines a first sigma point set of the battery at time k based on the state vector and covariance matrix of the battery at time k, where the first sigma point set includes multiple state vectors of the battery at time k.
[0132] The computer device determines the first sigma based on the symmetric sampling strategy. Accordingly, this step can be implemented by the following steps (1) to (3), including:
[0133] (1) The computer device determines the third sigma point set of the battery at time k based on the scale parameters corresponding to the battery, the state vector and covariance matrix of the battery at time k, and the dimensions included in the state vector of the battery at time k.
[0134] The computer device determines the third sigma point set of the battery at time k through the following formula 5 based on the scale parameter corresponding to the battery, the state vector and covariance matrix of the battery at time k, and the dimensions included in the state vector of the battery at time k:
[0135] Formula 5:
[0136] λ=α 2 (n+k)-n
[0137] Among them, χ k represents the Sigma point set, is the state vector, L is the dimension of the state vector X, λ is the scale parameter, α is the first parameter to be determined, which can be a constant, P k is the covariance matrix at time k, n is a constant, and k is the simulation time.
[0138] (2) The computer device performs nonlinear transformation and weighted processing on each state vector in the third sigma point set to update the state vector and covariance matrix of the battery at time k.
[0139] The computer device determines the nonlinear transformation of each state vector in the third sigma point set by the following formula six:
[0140] χ i,k+1,k =A k +BU k
[0141] Among them, χ k represents the Sigma point set, A represents the state transfer system matrix, B represents the transfer matrix, χ i,k+1,k Represents the state vector after nonlinear transformation.
[0142] For nonlinear transformation Each state vector after is weighted to get the next prediction and the covariance matrix P k+1,k :
[0143] predict:
[0144] Covariance matrix:
[0145]
[0146] in, Represents the predicted state vector at the next moment, P k+1,k Represents the covariance matrix of the next moment of prediction, χ i,k+1,k Represents the predicted nonlinear transformed state vector; W i m and W i c represents the fourth weight and the second weight, and the matrix must be positive definite when running the simulation, Q k represents the system noise matrix at time k, α is the first parameter to be determined, which may be a constant, β is the second parameter to be determined, which may be a constant, and n is a constant.
[0147] (3) The computer device determines the fourth sigma point set of the battery at time k based on the scale parameters corresponding to the battery, the updated state vector and covariance matrix of the battery at time k, and the dimensions included in the updated state vector of the battery at time k, and so on, until the first sigma point set of the battery at time k is obtained.
[0148] The computer device performs a nonlinear transformation on the state vector in the third sigma point set based on the state vector and covariance matrix predicted in step (2):
[0149]
[0150] Among them, χ k represents the state vector after nonlinear transformation, is the predicted state vector of the next moment, P k+1,k represents the covariance matrix of the next moment of the prediction, L represents the dimension of the state vector X, and λ represents the scale parameter.
[0151] For observation update, the computer device updates the Sigma point set χ according to the nonlinear observation equation k Perform nonlinear transformation, Z k+1,k It is not filtered by UKF:
[0152] Z k+1,k =h(χk+1,k )
[0153] Among them, Z k+1,k represents the measurement vector without UKF filtering, χ k+1,k Represents the predicted nonlinear transformed state vector.
[0154] The weight W used by the computer equipment to calculate the mean i m Compute forecasts for observed values, is the trajectory after UKF filtering:
[0155]
[0156] in, represents the measurement vector after UKF filtering, W i m represents the fourth weighted value, n is a constant, Z i,k+1,k Represents the i-th measurement vector in the Sigma point set that has not been filtered by UKF.
[0157] Computer device pair covariance matrix To update:
[0158]
[0159] in, represents the updated covariance matrix, W i c represents the second weighted value, n is a constant, Z i,k+1,k represents the i-th measurement vector in the Sigma point set that has not been UKF filtered, represents the measurement vector after UKF filtering, is the predicted state vector of the next moment, χ k+1,k Represents the predicted nonlinear transformed state vector.
[0160] Step 107: The computer device updates the state vector of the battery at time k based on each state vector included in the first sigma point set.
[0161] The computer device determines the mean of each state vector in the first sigma point set to obtain the updated state vector of the battery at time k; or, the computer device performs weighted summation on each state vector in the first sigma point set to obtain the updated state vector of the battery at time k.
[0162] Step 108: Based on the updated state vector and covariance matrix of the battery at time k, the computer device sequentially updates the state vector of the battery through the state equation and measurement equation of the battery equivalent model until the state vector of the battery is finally obtained.
[0163] (1) The computer device determines the state vector and covariance matrix of the battery at time k+1 based on the updated state vector and covariance matrix of the battery at time k through the state equation and measurement equation of the battery equivalent model.
[0164] The computer device inputs the updated state vector of the battery at time k into the state equation of the battery equivalent model, and outputs the state vector of the battery at time k+1; inputs the covariance matrix of the battery at time k into the measurement equation of the battery equivalent model, and outputs the covariance matrix of the battery at time k+1.
[0165] (2) The computer device determines the measurement noise matrix of the battery at time k+1 based on the adaptive filtering algorithm and the measurement noise matrix of the battery at time k.
[0166] This step can be achieved by following the steps (2-1)-(2-2), including:
[0167] (2-1) The computer device determines the measurement noise mean of the battery at time k, the measurement noise mean of the battery at time k+1, the measurement matrix of the battery at time k+1, the next step prediction covariance matrix of the battery from time k to time k+1, and the system residual and weight value of the battery at time k+1.
[0168] (2-2) The computer device determines the measurement noise matrix of the battery at time k+1 based on the measurement noise matrix of the battery at time k, the measurement noise mean of the battery at time k, the measurement noise mean of the battery at time k+1, the measurement matrix of the battery at time k+1, the next step prediction covariance matrix of the battery from time k to time k+1, the system residual of the battery at time k+1 and the first weighted value through the following formula 1;
[0169] Formula 1:
[0170]
[0171] r k+1 =(1-d k )r k +d k ε k+1
[0172] Among them, r k and r k+1 are the measurement noise means at time k and time k+1, R k and R k+1 is the measurement noise matrix at time k and time k+1, H k+1 is the measurement matrix at time k+1, P x,k+1,k is the next prediction covariance matrix from time k to time k+1, dk is the first weighted value, ε k+1 is the system residual at time k+1.
[0173] in, Calculate, where b is the forgetting factor, and b is a constant greater than 0 and less than 1. The larger b is, the less the measurement noise matrix depends on the previous moment. The data weight can be adjusted by b; ε k+1 is the system residual at time k+1, and the formula ε k+1 =Z k+1 -h(X k+1 ,0) for calculation.
[0174] In some embodiments, because P x,k+1,k As the filter converges, it gradually approaches 0. The influence of the matrix on the measurement noise matrix can be ignored. Therefore, the measurement noise matrix formula of the battery at time k+1 is rewritten as:
[0175] R k+1 =(1-d k )R k +d k (ε k+1 -r k+1 )(ε k+1 -r k+1 ) T
[0176] Among them, R k+1 represents the measurement noise matrix of the battery at time k+1, R k represents the measurement noise matrix of the battery at time k, d k represents the first weighted value, ε k+1 represents the system residual at time k+1, r k+1 Represents the mean value of the measurement noise at time k+1.
[0177] (3) The computer device updates the covariance matrix of the battery at time k+1 based on the measurement noise matrix of the battery at time k+1.
[0178] This step can be achieved by the following steps (3-1)-(3-3), including:
[0179] (3-1) Based on the measurement matrix of the battery at time k, the computer device determines the measurement matrix of the battery at time t+1 through the measurement equation.
[0180] The computer device inputs the measurement matrix of the battery at time k into the measurement equation and outputs the measurement matrix of the battery at time t+1.
[0181] (3-2) The computer device determines the observation value and the second weighted value of the battery at time t+1.
[0182] The computer device obtains the observation value of the battery at time t+1 from the experimental data of the battery at time t+1. The second weighted value can be set and changed as needed, and the second weighted value is not specifically limited in the embodiment of the present application.
[0183] (3-3) The computer device updates the covariance matrix of the battery at time t+1 based on the measurement noise matrix, measurement matrix, observation value and second weighted value of the battery at time k+1 by the following formula 2;
[0184] Formula 2:
[0185] in, is the covariance matrix of the battery after updating at time k+1, W i c is the second weighted value, Z i,k+1,k is the measurement matrix of the battery at time k+1, is the observed value of the battery at time k+1, R k+1 represents the measurement noise matrix of the battery at time k+1, and n is a constant.
[0186] (4) The computer device determines a second sigma point set of the battery at time k+1 based on the state vector and covariance matrix of the battery at time k+1, where the second sigma point set includes multiple state vectors of the battery at time k+1.
[0187] This step is similar to the process of determining the first sigma point set of the battery at time k based on the state vector and covariance matrix of the battery at time k by the computer device, and will not be repeated here.
[0188] (5) The computer device updates the state vector of the battery at time k+1 based on each state vector included in the second sigma point set.
[0189] This step is similar to the process in which the computer device updates the state vector of the battery at time k based on each state vector included in the first sigma point set, and will not be repeated here.
[0190] (6) The computer device updates the state vector and covariance matrix of the battery at time k+1 again based on the updated state vector and covariance matrix of the battery at time k+1 through the state equation and measurement equation of the equivalent model of the battery, and so on, until the state vector of the battery is finally obtained.
[0191] This step can be achieved by the following steps (6-1)-(6-5), including:
[0192] (6-1) The computer device determines the measurement output covariance matrix of the battery at time k+1 based on the updated covariance matrix of the battery at time k+1 and the measurement data of the battery, and determines the gain matrix of the battery at time k+1.
[0193] Gain matrix:
[0194] Among them, K k+1 represents the gain matrix of the battery at time k+1, represents the covariance matrix of the battery after updating at time k+1, Represents the measured output covariance matrix of the battery at time k+1. In some embodiments, the computer device determines the measured output covariance matrix of the battery at time k+1 based on the output matrix C; for example, the computer device multiplies the output matrix C by a preset coefficient to obtain the measured output covariance matrix of the battery at time t+1.
[0195] (6-2) Based on the gain matrix, the computer device updates the state vector and covariance matrix of the battery at time k+1 through the state equation and measurement equation of the equivalent model of the battery.
[0196] The battery state variables after update at time k+1 as follows:
[0197]
[0198] The covariance matrix of the battery after updating at time k+1 is as follows:
[0199]
[0200] in, represents the state variable of the battery after being updated at time k+1, represents the state variable of the battery before updating at time k+1, K k+1 represents the gain matrix of the battery at time k+1, Z k+1 represents the measurement vector of the battery at time k+1, represents the measurement vector at time k+1 predicted based on the measurement vector at time k, P k+1 represents the covariance matrix of the battery after updating at time k+1, P k+1,k represents the covariance matrix at time k+1 predicted based on the covariance matrix at time k, Represents the measured output covariance matrix of the battery at time k+1.
[0201] (6-3) The computer device determines the SOC of the battery included in the updated state vector of the battery at time k+1.
[0202] (6-4) When the SOC of the battery included in the updated state vector of the battery at time k+1 is within the estimation range and the iteration stop condition is not reached, the computer device continues iterative training.
[0203] The iteration stop condition may be that the number of iterations reaches a preset number.
[0204] (6-5) When the SOC of the battery included in the updated state vector of the battery at time k+1 is not within the estimation range or the iteration stop condition is reached, the computer device determines the updated state vector of the battery at time k+1 as the final state vector of the battery.
[0205] Step 109: The computer device determines the final SOC of the battery from the final state vector of the battery.
[0206] The state vector is a matrix with one row and three columns, and the matrix is [U1, U2, SOC]. The SOC can be directly obtained from the matrix, and the obtained SOC is the final determined SOC of the battery.
[0207] The process in the embodiment of the present application is as follows Figure 3 As shown in the figure: the computer device first determines the battery equivalent model; then identifies multiple battery parameters of the battery based on the battery equivalent model; determines the initial value of the battery state vector and the initial value of the covariance matrix, and then determines the state transfer matrix A, the control matrix B and the output matrix C based on the multiple battery parameters; determines the state equation and the measurement equation based on the state transfer matrix A and the control matrix B, and then obtains a set of sigma point sets, predicts the state vector in the sigma point set, and performs a nonlinear transformation on the predicted value of the state vector to obtain a new sigma point set; then calculates the predicted observation value based on the new sigma point set, that is, predicts the state vector and covariance matrix at the next moment. The difference matrix is used to determine the system residual based on the state matrix and covariance matrix at the next moment, and determine whether the system residual is consistent with the theoretical value; when the system residual is consistent with the theoretical value, the measurement noise matrix is updated and the measurement output covariance matrix is determined based on the output matrix C, and the Kalman gain matrix is determined based on the measurement noise matrix and the measurement output covariance matrix; the state variables and the covariance matrix are updated based on the gain matrix; the SOC of the battery is determined based on the updated state variables to determine whether the SOC is within the estimation range; if the SOC is within the estimation range, a set of Sigma point sets is obtained based on the updated state variables, and so on; if the SOC is not within the estimation range, the process ends. In addition, when the system residual is inconsistent with the theoretical value, the SOC included in the current state variables can also be determined, and then a subsequent judgment process of determining whether the SOC is within the estimation range is performed.
[0208] For example, see Figure 4, Figure 4 This is the curve relationship between current, SOC and voltage when the initial value of SOC is 70%. Please refer to Figure 5 , Figure 5 This is the voltage absolute error curve when the initial value of SOC is 70%. Please refer to Figure 6 , Figure 6 is the iterative convergence speed of different algorithms.
[0209] In the embodiment of the present application, the measurement noise matrix will affect the determination of SOC; and in the related art, a preset measurement noise matrix is set, which will cause the set measurement noise matrix to be inaccurate, thereby affecting the accuracy of the determined SOC. In the embodiment of the present application, based on the adaptive filtering algorithm, the measurement noise matrix of the battery at time k is estimated, and the adaptive filtering algorithm can adaptively adjust and finally give a reasonable measurement noise matrix, thereby improving the accuracy of the determined measurement noise matrix. In this way, combined with the unscented Kalman filtering algorithm, the accuracy of the determined battery SOC can be improved.
[0210] Figure 7 is a schematic diagram of a battery SOC determination device provided in an embodiment of the present application, see Figure 7 , the device comprises:
[0211] The identification module 701 is used to identify the battery parameters at multiple temperatures based on the battery equivalent model to obtain the battery parameters at multiple temperatures, where the battery parameters include the first voltage at both ends of the charge transfer resistor, the second voltage at both ends of the diffusion resistor, the open circuit voltage, the current, the temperature, and the ohmic internal resistance;
[0212] A first determination module 702, configured to determine a state equation and a measurement equation of a battery equivalent model based on the first voltage, the second voltage, the open circuit voltage, the current, the temperature and the ohmic internal resistance;
[0213] A second determination module 703 is used to determine a state vector and a covariance matrix of the battery at time k, where the state vector of the battery at time k includes a first voltage, a second voltage, and an SOC of the battery;
[0214] A third determination module 704 is used to determine the measurement noise matrix of the battery at time k based on an adaptive filtering algorithm;
[0215] A first updating module 705 is used to update the covariance matrix of the battery at time k based on the measurement noise matrix of the battery at time k;
[0216] A fourth determination module 706 is used to determine a first sigma point set of the battery at time k based on the state vector and covariance matrix of the battery at time k, where the first sigma point set includes multiple state vectors of the battery at time k;
[0217] A second updating module 707, configured to update the state vector of the battery at time k based on each state vector included in the first sigma point set;
[0218] The third updating module 708 is used to update the state vector of the battery in sequence through the state equation and measurement equation of the battery equivalent model based on the updated state vector and covariance matrix of the battery at time k until the state vector of the battery is finally obtained;
[0219] The fifth determination module 709 is configured to determine the final SOC of the battery from the final state vector of the battery.
[0220] In one possible implementation, the third update module 708 is used to determine the state vector and covariance matrix of the battery at time k+1 based on the updated state vector and covariance matrix of the battery at time k, through the state equation and measurement equation of the battery equivalent model; determine the measurement noise matrix of the battery at time k+1 based on the adaptive filtering algorithm and the measurement noise matrix of the battery at time k; update the covariance matrix of the battery at time k+1 based on the measurement noise matrix of the battery at time k+1; determine the second sigma point set of the battery at time k+1 based on the state vector and covariance matrix of the battery at time k+1, the second sigma point set including multiple state vectors of the battery at time k+1; update the state vector of the battery at time k+1 based on each state vector included in the second sigma point set; based on the updated state vector and covariance matrix of the battery at time k+1, through the state equation and measurement equation of the equivalent model of the battery, update the state vector and covariance matrix of the battery at time k+1 again, and so on, until the state vector of the battery is finally obtained.
[0221] In another possible implementation, the third update module 708 is used to determine the gain matrix of the battery at time k+1 based on the covariance matrix of the battery after being updated at time k+1 and the measurement data of the battery, and to update the state vector and covariance matrix of the battery at time k+1 through the state equation and measurement equation of the equivalent model of the battery based on the gain matrix; determine the SOC of the battery included in the updated state vector of the battery at time k+1; continue iterative training when the SOC of the battery included in the state vector updated by the battery at time k+1 is within the estimation range and the iteration stop condition is not met; when the SOC of the battery included in the state vector updated by the battery at time k+1 is not within the estimation range or the iteration stop condition is met, determine the updated state vector of the battery at time k+1 as the final state vector of the battery.
[0222] In another possible implementation, the third updating module 708 is used to determine the measurement noise mean of the battery at time k, the measurement noise mean of the battery at time k+1, the measurement matrix of the battery at time k+1, the next prediction covariance matrix of the battery from time k to time k+1, the system residual of the battery at time k+1, and the first weighted value; based on the measurement noise matrix of the battery at time k, the measurement noise mean of the battery at time k, the measurement noise mean of the battery at time k+1, the measurement matrix of the battery at time k+1, the next prediction covariance matrix of the battery from time k to time k+1, the system residual of the battery at time k+1, and the first weighted value, the measurement noise matrix of the battery at time k+1 is determined by the following formula 1;
[0223] Formula 1:
[0224] r k+1 =(1-d k )r k +d k ε k+1
[0225] Among them, r k and r k+1 are the measurement noise means at time k and time k+1, R k and R k+1 is the measurement noise matrix at time k and time k+1, H k+1 is the measurement matrix at time k+1, P x,k+1,k is the next prediction covariance matrix from time k to time k+1, d k is the first weighted value, ε k+1 is the system residual at time k+1.
[0226] In another possible implementation, the third updating module 708 is used to determine the measurement matrix of the battery at time t+1 through the measurement equation based on the measurement matrix of the battery at time k; determine the observation value and the second weighted value of the battery at time t+1; based on the measurement noise matrix, measurement matrix, observation value and second weighted value of the battery at time k+1, update the covariance matrix of the battery at time t+1 through the following formula 2;
[0227] Formula 2:
[0228] in, is the covariance matrix of the battery after updating at time k+1, W i c is the second weighted value, Z i,k+1,k is the measurement matrix of the battery at time k+1, is the observed value of the battery at time k+1, R k+1represents the measurement noise matrix of the battery at time k+1, and n is a constant.
[0229] In another possible implementation, the fourth determination module 706 is used to determine the third sigma point set of the battery at time k based on the scale parameters corresponding to the battery, the state vector and covariance matrix of the battery at time k, and the dimensions included in the state vector of the battery at time k; perform nonlinear transformation and weighted processing on each state vector in the third sigma point set, and update the state vector and covariance matrix of the battery at time k; determine the fourth sigma point set of the battery at time k based on the scale parameters corresponding to the battery, the updated state vector and covariance matrix of the battery at time k, and the dimensions included in the updated state vector of the battery at time k, and so on, until the first sigma point set of the battery at time k is obtained.
[0230] In the embodiment of the present application, the measurement noise matrix will affect the determination of SOC; and in the related art, a preset measurement noise matrix is set, which will cause the set measurement noise matrix to be inaccurate, thereby affecting the accuracy of the determined SOC. In the embodiment of the present application, based on the adaptive filtering algorithm, the measurement noise matrix of the battery at time k is estimated, and the adaptive filtering algorithm can adaptively adjust and finally give a reasonable measurement noise matrix, thereby improving the accuracy of the determined measurement noise matrix. In this way, combined with the unscented Kalman filtering algorithm, the accuracy of the determined battery SOC can be improved.
[0231] It should be noted that the battery SOC determination device provided in the above embodiment only uses the division of the above functional modules as an example when determining the battery SOC. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the battery SOC determination device provided in the above embodiment and the battery SOC determination method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0232] Figure 8It is a structural block diagram of a computer device provided in an embodiment of the present application. Generally, the computer device 800 includes: a processor 801, a memory 802, a voice receiving device 803 and a controller 804. The processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 801 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 801 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 801 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0233] The memory 802 may include one or more computer-readable storage media, which may be non-transitory. The memory 802 may also include a high-speed random access memory and a non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 802 is used to store at least one instruction, which is used to be executed by the processor 801 to implement the lighting control method provided in the method embodiment of the present application.
[0234] In some embodiments, the computer device 800 may further include: a peripheral device interface 805 and at least one peripheral device. The processor 801, the memory 802 and the peripheral device interface 805 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 805 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 806, an audio circuit 807 and a power supply 808.
[0235] The peripheral device interface 805 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 801 and the memory 802. In some embodiments, the processor 801, the memory 802, and the peripheral device interface 805 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 801, the memory 802, and the peripheral device interface 805 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0236] The radio frequency circuit 806 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 806 communicates with communication networks and other communication devices through electromagnetic signals. The radio frequency circuit 806 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 806 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 806 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 806 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0237] The audio circuit 807 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 801 for processing, or input them into the radio frequency circuit 806 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there can be multiple microphones, which are respectively arranged at different parts of the computer device 800. The microphone can also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 801 or the radio frequency circuit 806 into sound waves. The speaker can be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 807 may also include a headphone jack.
[0238] The power supply 808 is used to power various components in the computer device 800. The power supply 808 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 808 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0239] Those skilled in the art will understand that Figure 8 The structure shown in the figure does not constitute a limitation on the computer device 800, and the computer device 800 may include more or less components than those shown in the figure, or combine some components, or adopt a different arrangement of components.
[0240] In an exemplary embodiment, a computer-readable storage medium is also provided, the computer-readable medium storing at least one program code, the at least one program code being loaded and executed by a processor to implement the method for determining the battery SOC in the above-mentioned embodiment. Optionally, the storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a ROM (Read-Only Memory), a RAM (Random Access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, an optical data storage device, and the like.
[0241] In an exemplary embodiment, a computer program product is further provided. The computer program product stores at least one program code. The at least one program code is loaded and executed by a processor to implement the method for determining the battery SOC in the above embodiment.
[0242] In some embodiments, the computer program product involved in the embodiments of the present application may be deployed and executed on a computer device, or on multiple computer devices located at one location, or on multiple computer devices distributed at multiple locations and interconnected by a communication network. Multiple computer devices distributed at multiple locations and interconnected by a communication network may constitute a blockchain system.
[0243] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0244] The above description is only for the purpose of facilitating those skilled in the art to understand the technical solution of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for determining battery SOC, characterized in that: The method comprises: Based on a battery equivalent model and for the battery at multiple temperatures, parameter identification is performed on the battery to obtain battery parameters of the battery at the multiple temperatures, wherein the battery parameters include a first voltage across a charge transfer resistor, a second voltage across a diffusion resistor, an open circuit voltage, a current, a temperature, and an ohmic internal resistance; Determine a state equation and a measurement equation of the battery equivalent model based on the first voltage, the second voltage, the open circuit voltage, the current, the temperature, and the ohmic internal resistance; Determine a state vector and a covariance matrix of the battery at time k, wherein the state vector of the battery at time k includes the first voltage, the second voltage, and the SOC of the battery; Determine the measurement noise matrix of the battery at time k based on an adaptive filtering algorithm; Based on the measurement noise matrix of the battery at time k, updating the covariance matrix of the battery at time k; Determine a first sigma point set of the battery at time k based on the state vector and covariance matrix of the battery at time k, wherein the first sigma point set includes multiple state vectors of the battery at time k; Based on each state vector included in the first sigma point set, updating the state vector of the battery at time k; Based on the updated state vector and covariance matrix of the battery at time k, the state vector of the battery is updated in sequence through the state equation and measurement equation of the battery equivalent model until the state vector of the battery is finally obtained; The final SOC of the battery is determined from the final state vector of the battery.
2. The method according to claim 1, characterized in that The method of updating the state vector of the battery in sequence based on the updated state vector and covariance matrix of the battery at time k through the state equation and measurement equation of the battery equivalent model until the state vector of the battery is finally obtained includes: Based on the updated state vector and covariance matrix of the battery at time k, determine the state vector and covariance matrix of the battery at time k+1 through the state equation and measurement equation of the battery equivalent model; Determine the measurement noise matrix of the battery at time k+1 based on an adaptive filtering algorithm and the measurement noise matrix of the battery at time k; Based on the measurement noise matrix of the battery at time k+1, updating the covariance matrix of the battery at time k+1; Determine a second sigma point set of the battery at time k+1 based on the state vector and covariance matrix of the battery at time k+1, wherein the second sigma point set includes multiple state vectors of the battery at time k+1; Based on each state vector included in the second sigma point set, updating the state vector of the battery at time k+1; Based on the updated state vector and covariance matrix of the battery at time k+1, the state vector and covariance matrix of the battery at time k+1 are updated again through the state equation and measurement equation of the equivalent model of the battery, and so on, until the state vector of the battery is finally obtained.
3. The method according to claim 2, characterized in that The state vector and covariance matrix of the battery at time k+1 are updated again through the state equation and measurement equation of the equivalent model of the battery based on the updated state vector and covariance matrix of the battery at time k+1, and so on, until the state vector of the battery is finally obtained, including: Determine the gain matrix of the battery at time k+1 based on the covariance matrix of the battery updated at time k+1 and the measurement data of the battery, and determine the measured output covariance matrix of the battery at time k+1; Based on the gain matrix, the state vector and covariance matrix of the battery at time k+1 are updated through the state equation and measurement equation of the equivalent model of the battery; Determine the SOC of the battery included in the updated state vector of the battery at time k+1; When the SOC of the battery included in the state vector updated by the battery at time k+1 is within the estimation range and the iteration stop condition is not reached, continue the iterative training; When the SOC of the battery included in the updated state vector of the battery at time k+1 is not within the estimation range or the iteration stop condition is reached, the updated state vector of the battery at time k+1 is determined as the final state vector of the battery.
4. The method according to claim 2, characterized in that: The method of determining the measurement noise matrix of the battery at time k+1 based on the adaptive filtering algorithm and the measurement noise matrix of the battery at time k includes: Determine the measurement noise mean of the battery at time k, the measurement noise mean of the battery at time k+1, the measurement matrix of the battery at time k+1, the next step prediction covariance matrix of the battery from time k to time k+1, the system residual of the battery at time k+1, and the first weighted value; Based on the measurement noise matrix of the battery at time k, the measurement noise mean of the battery at time k, the measurement noise mean of the battery at time k+1, the measurement matrix of the battery at time k+1, the next step prediction covariance matrix of the battery from time k to time k+1, the system residual of the battery at time k+1 and the first weighted value, the measurement noise matrix of the battery at time k+1 is determined by the following formula 1; Formula 1: r k+1 =(1-d k )r k +d k ε k+1 Among them, r k and r k+1 are the measurement noise means at time k and time k+1, R k and R k+1 is the measurement noise matrix at time k and time k+1, H k+1 is the measurement matrix at time k+1, P x,k+1,k is the next prediction covariance matrix from time k to time k+1, d k is the first weighted value, ε k+1 is the system residual at time k+1.
5. The method according to claim 2, characterized in that: The updating of the covariance matrix of the battery at time k+1 based on the measurement noise matrix of the battery at time k+1 includes: Based on the measurement matrix of the battery at time k, determining the measurement matrix of the battery at time t+1 through the measurement equation; Determining an observation value and a second weighted value of the battery at time t+1; Based on the measurement noise matrix, measurement matrix, observation value and second weighted value of the battery at time k+1, the covariance matrix of the battery at time t+1 is updated by the following formula 2; Formula 2: in, is the covariance matrix of the battery after updating at time k+1, W i c is the second weighted value, Z i,k+1,k is the measurement matrix of the battery at time k+1, is the observed value of the battery at time k+1, R k+1 represents the measurement noise matrix of the battery at time k+1, and n is a constant.
6. The method according to claim 1, characterized in that The determining the first sigma point set of the battery at time k based on the state vector and covariance matrix of the battery at time k includes: Determine a third sigma point set of the battery at time k based on the scale parameter corresponding to the battery, the state vector and covariance matrix of the battery at time k, and the dimensions included in the state vector of the battery at time k; Performing nonlinear transformation and weighted processing on each state vector in the third sigma point set, and updating the state vector and covariance matrix of the battery at time k; Based on the scale parameter corresponding to the battery, the updated state vector and covariance matrix of the battery at time k, and the dimensions included in the updated state vector of the battery at time k, the fourth sigma point set of the battery at time k is determined, and so on, until the first sigma point set of the battery at time k is obtained.
7. A device for determining battery SOC, characterized in that: The device comprises: an identification module, configured to perform parameter identification on the battery at multiple temperatures based on a battery equivalent model, and obtain battery parameters of the battery at the multiple temperatures, wherein the battery parameters include a first voltage across a charge transfer resistor, a second voltage across a diffusion resistor, an open circuit voltage, a current, a temperature, and an ohmic internal resistance; A first determination module, configured to determine a state equation and a measurement equation of the battery equivalent model based on the first voltage, the second voltage, the open circuit voltage, the current, the temperature, and the ohmic internal resistance; A second determination module, configured to determine a state vector and a covariance matrix of the battery at time k, wherein the state vector of the battery at time k includes the first voltage, the second voltage, and the SOC of the battery; A third determination module is used to determine the measurement noise matrix of the battery at time k based on an adaptive filtering algorithm; A first updating module, configured to update a covariance matrix of the battery at time k based on a measurement noise matrix of the battery at time k; a fourth determination module, configured to determine a first sigma point set of the battery at time k based on the state vector and covariance matrix of the battery at time k, wherein the first sigma point set includes multiple state vectors of the battery at time k; A second updating module, configured to update the state vector of the battery at time k based on each state vector included in the first sigma point set; A third updating module is used to update the state vector of the battery in sequence through the state equation and measurement equation of the battery equivalent model based on the updated state vector and covariance matrix of the battery at time k until the state vector of the battery is finally obtained; The fifth determination module is used to determine the final SOC of the battery from the final state vector of the battery.
8. A computer device, characterized in that: The computer device includes a processor and a memory, wherein at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to implement the method for determining the battery SOC according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: At least one program code is stored in the computer-readable storage medium, and the at least one program code is loaded and executed by the processor to implement the method for determining the battery SOC according to any one of claims 1 to 6.
10. A computer program product, characterized in that At least one program code is stored in the computer program product, and the at least one program code is loaded and executed by a processor to implement the method for determining the battery SOC according to any one of claims 1 to 6.
Citation Information
Patent Citations
SOC (state of charge) estimation method for controlling equivalent charging and discharging of lithium battery
CN108594135A
Lithium battery state-of-charge estimation method based on BCRLS-UKF
CN113805075A
Broadband oscillation state detection method and device, terminal and medium
CN118367572A
Method of determining the state of charge of a battery used in an electric vehicle
US20210278466A1
