Battery state estimation method and system based on genetic algorithm

Through the battery state estimation method based on genetic algorithm, the problem of inaccurate battery state evaluation in the prior art is solved, and higher detection accuracy and reliability are achieved.

CN119846476APending Publication Date: 2025-04-18HANGCHA GRP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510082346.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-04-18

Smart Images

  • Figure CN119846476A_ABST
    Figure CN119846476A_ABST
Patent Text Reader

Abstract

The invention discloses a battery state estimation method and system based on a genetic algorithm, and belongs to the technical field of electrochemical analysis technologies. The battery state estimation method based on the genetic algorithm comprises the following steps: detecting the current working temperature of a target battery, and calculating the current working parameters of the target battery according to the current working temperature; updating the current working parameters to a battery model of the target battery; inputting the load current of the target battery into the battery model to obtain a battery state measurement result; performing nonlinear prediction on the battery model based on a genetic algorithm to obtain a battery state prediction result; calculating a model error according to the battery state measurement result and the battery state prediction result; and calculating the battery state of the target battery at the next moment according to the model error. According to the invention, the accuracy and reliability of battery state detection can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electrochemical analysis, and in particular to a battery state estimation method and system based on genetic algorithm. Background Art

[0002] In battery management technology and vehicle control decisions of electric vehicles, estimating the battery state is a crucial and highly concerned core issue. To address this challenge, related technologies mainly use the Kalman filter algorithm to implement a single cell battery state estimation method.

[0003] However, in practical applications, due to the influence of factors such as the nonlinear characteristics of the battery and the complex and changeable vehicle application environment, under the traditional assumption that the battery model process noise is white noise with known covariance, independence and Gaussian distribution, it is difficult to obtain accurate process noise information; at the same time, the zero-mean Gaussian white noise prior assumption in the Kalman filter algorithm system is also difficult to fully conform to the actual situation, and related technologies cannot accurately evaluate the status of the battery.

[0004] Therefore, how to improve the accuracy and reliability of detecting the battery status is a technical problem that those skilled in the art currently need to solve. Summary of the invention

[0005] The purpose of this application is to provide a battery status estimation method, system, electronic device and storage medium based on genetic algorithm, which can improve the accuracy and reliability of battery status detection.

[0006] In order to solve the above technical problems, the present application provides a battery state estimation method based on genetic algorithm, comprising:

[0007] Detecting a current operating temperature of a target battery, and calculating current operating parameters of the target battery according to the current operating temperature; wherein the current operating parameters include battery capacity, DC resistance, polarization resistance, and polarization capacitance;

[0008] Updating the current operating parameters to a battery model of the target battery;

[0009] Inputting the load current of the target battery into the battery model to obtain a battery state measurement result;

[0010] Performing nonlinear prediction on the battery model based on a genetic algorithm to obtain a battery state prediction result;

[0011] Calculating a model error according to the battery state measurement result and the battery state prediction result;

[0012] The battery state of the target battery at the next moment is calculated according to the model error.

[0013] Optionally, inputting the load current of the target battery into the battery model to obtain a battery state measurement result includes:

[0014] Inputting the load current of the target battery into the battery model to obtain a battery capacity measurement result and a polarization voltage measurement result;

[0015] Accordingly, the battery model is subjected to nonlinear prediction based on a genetic algorithm to obtain a battery state prediction result, including:

[0016] Based on the genetic algorithm, nonlinear prediction is performed on the battery model to obtain battery capacity prediction results and polarization voltage prediction results.

[0017] Optionally, calculating a model error according to the battery state measurement result and the battery state prediction result includes:

[0018] Determining an error calculation expression for the battery model;

[0019] The battery state measurement result and the battery state prediction result are substituted into the error calculation expression to obtain the model error.

[0020] Optionally, determining an error calculation expression of the battery model includes:

[0021] Determining an indicator function corresponding to a minimum error criterion of the battery model;

[0022] Performing Taylor series expansion on the indicator function to obtain the error calculation expression; wherein the error calculation expression includes a plurality of intermediate parameter matrices represented by Lie derivatives.

[0023] Optionally, performing nonlinear prediction on the battery model based on a genetic algorithm to obtain a battery state prediction result includes:

[0024] The global solution set population corresponding to the battery model is initialized based on the genetic algorithm, and fitness evaluation, screening and recombination mutation operations are iteratively performed on the global solution set population to obtain the battery state prediction result.

[0025] Optionally, after calculating the model error according to the battery state measurement result and the battery state prediction result, the method further includes:

[0026] The covariance of the model error is calculated, and the battery state prediction result is corrected using the covariance.

[0027] Optionally, calculating the current operating parameter of the target battery according to the current operating temperature includes:

[0028] Substituting the current operating temperature into the battery capacity calculation function, the DC resistance calculation function, the polarization resistance calculation function and the polarization capacitance calculation function respectively, to obtain the current operating parameters of the target battery;

[0029] The battery capacity calculation function, the DC resistance calculation function, the polarization resistance calculation function and the polarization capacitance calculation function are all natural exponential functions obtained by fitting using the least squares method.

[0030] The present application also provides a battery state estimation system based on a genetic algorithm, the system comprising:

[0031] A parameter determination module, used to detect the current operating temperature of the target battery and calculate the current operating parameters of the target battery according to the current operating temperature; wherein the current operating parameters include battery capacity, DC resistance, polarization resistance and polarization capacitance;

[0032] A parameter updating module, used for updating the current operating parameters to the battery model of the target battery;

[0033] A measurement module, used for inputting the load current of the target battery into the battery model to obtain a battery state measurement result;

[0034] A prediction module, used for performing nonlinear prediction on the battery model based on a genetic algorithm to obtain a battery state prediction result;

[0035] An error calculation module, used to calculate a model error according to the battery state measurement result and the battery state prediction result;

[0036] A state estimation module is used to calculate the battery state of the target battery at the next moment according to the model error.

[0037] The present application also provides a storage medium on which a computer program is stored. When the computer program is executed, the steps of the battery state estimation method based on the genetic algorithm are implemented.

[0038] The present application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor calls the computer program in the memory, the steps of the battery state estimation method based on the genetic algorithm are implemented.

[0039] The present application provides a battery state estimation method based on a genetic algorithm. The method detects the current operating temperature of the target battery, calculates the current operating parameters of the target battery according to the current operating temperature, and updates the calculated current operating parameters to the battery model to ensure that the battery model can reflect the true state of the battery under the current working conditions. The present application inputs the load current of the target battery into the updated battery model to obtain the battery state measurement result, and performs nonlinear prediction on the battery model through a genetic algorithm to obtain the battery state prediction result. The present application calculates the model error by comparing the battery state measurement result and the battery state prediction result to determine the battery state of the target battery at the next moment. The present application significantly improves the accuracy and reliability of detecting the battery state by real-time monitoring and dynamic updating of battery model parameters, combined with genetic algorithms for nonlinear prediction and error correction. The present application also provides a battery state estimation system based on a genetic algorithm, an electronic device and a storage medium, which have the above-mentioned beneficial effects and are not repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0041] Figure 1 A flowchart of a battery state estimation method based on a genetic algorithm provided in an embodiment of the present application;

[0042] Figure 2 A flow chart of a nonlinear prediction and estimation of a power battery state based on a genetic algorithm provided in an embodiment of the present application;

[0043] Figure 3 A schematic diagram of a method for nonlinear prediction and estimation of power battery status based on a genetic algorithm provided in an embodiment of the present application;

[0044] Figure 4 A schematic diagram of the structure of a hypercube where a parent generation is provided in an embodiment of the present application;

[0045] Figure 5 A comparison chart of the estimated value and reference value of the power battery at an operating temperature of 25°C provided in an embodiment of the present application;

[0046] Figure 6 This is a schematic diagram of the estimated value error of the power battery at an operating temperature of 25°C provided in an embodiment of the present application;

[0047] Figure 7A schematic diagram of the mean absolute error of the SOC estimation value of the power battery at an operating temperature of 25° C. provided in an embodiment of the present application;

[0048] Figure 8 This is a schematic diagram of the root mean square error of the SOC estimation value of the power battery at an operating temperature of 25°C provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0050] See below Figure 1 , Figure 1 A flowchart of a battery state estimation method based on a genetic algorithm provided in an embodiment of the present application.

[0051] Specific steps may include:

[0052] S101: Detecting a current operating temperature of a target battery, and calculating a current operating parameter of the target battery according to the current operating temperature;

[0053] Among them, this embodiment can be applied to electronic equipment with data processing function. This embodiment can install a temperature sensor (such as a thermistor, thermocouple, etc.) inside or on the surface of the battery to detect the current operating temperature of the target battery.

[0054] According to the current operating temperature monitored in real time, the present embodiment can calculate the current operating parameters of the battery, such as battery capacity, DC resistance, polarization resistance and polarization capacitance. These current operating parameters reflect the actual performance of the battery under the current operating conditions. The present embodiment can establish a temperature-parameter relationship model of the battery, substitute the current operating temperature into the temperature-parameter relationship model, and obtain the current operating parameters of the battery.

[0055] S102: updating the current operating parameters to the battery model of the target battery;

[0056] Before this step, a battery model of the target battery can be pre-established, and the battery model is a mathematical model used to describe the battery behavior. In this step, the current operating parameters (such as battery capacity, DC resistance, polarization resistance and polarization capacitance) calculated in real time can be updated to the battery model to ensure that the battery model can reflect the actual state of the battery under the current working conditions.

[0057] S103: inputting the load current of the target battery into the battery model to obtain a battery state measurement result;

[0058] The load current of the target battery is input into the updated battery model. In this embodiment, the load current of the target battery can be input into the battery model to obtain the battery capacity measurement result and the polarization voltage measurement result.

[0059] S104: performing nonlinear prediction on the battery model based on a genetic algorithm to obtain a battery state prediction result;

[0060] Among them, this step performs nonlinear prediction on the battery model based on the genetic algorithm, and can accurately predict the state of the battery by optimizing the algorithm parameters and model structure. Specifically, this embodiment can perform nonlinear prediction on the battery model based on the genetic algorithm to obtain battery capacity prediction results and polarization voltage prediction results. The genetic algorithm automatically searches for the optimal solution by simulating natural selection and genetic mechanisms, thereby improving the accuracy and reliability of the prediction and providing a scientific basis for battery management and maintenance.

[0061] S105: Calculating a model error according to the battery state measurement result and the battery state prediction result;

[0062] Among them, this embodiment can compare the battery state measurement result and the battery state prediction result to obtain the model error. Specifically, this embodiment can determine an error calculation expression, substitute the actual measured battery state and the battery state predicted by the model into the error calculation expression, calculate the difference between the two, and the final value obtained is the model error.

[0063] S106: Calculating the battery state of the target battery at the next moment according to the model error.

[0064] In this embodiment, the battery state measurement result can be corrected according to the model error at the current moment to obtain the battery state at the next moment, that is, the battery state estimation result.

[0065] This embodiment detects the current operating temperature of the target battery, calculates the current operating parameters of the target battery based on the current operating temperature, and updates the calculated current operating parameters to the battery model to ensure that the battery model can reflect the actual state of the battery under the current operating conditions. This embodiment inputs the load current of the target battery into the updated battery model to obtain a battery state measurement result, and performs nonlinear prediction on the battery model through a genetic algorithm to obtain a battery state prediction result. This embodiment calculates the model error by comparing the battery state measurement result and the battery state prediction result to determine the battery state of the target battery at the next moment. This embodiment significantly improves the accuracy and reliability of detecting the battery state by real-time monitoring and dynamic updating of battery model parameters, combined with genetic algorithms for nonlinear prediction and error correction.

[0066] As for Figure 1 As a further introduction to the corresponding embodiment, the present embodiment can calculate the model error in the following manner: determine the error calculation expression of the battery model; substitute the battery state measurement result and the battery state prediction result into the error calculation expression to obtain the model error.

[0067] Specifically, this embodiment can determine the error calculation expression in the following manner: determine the indicator function corresponding to the minimum error criterion of the battery model; perform Taylor series expansion on the indicator function to obtain the error calculation expression; wherein the error calculation expression includes multiple intermediate parameter matrices represented by Lie derivatives.

[0068] This embodiment determines the index function corresponding to the minimum error criterion of the battery model, and performs Taylor series expansion on the index function to obtain an error calculation expression. This error calculation expression includes multiple intermediate parameter matrices represented by Lie derivatives, which can describe the nonlinear relationship between model parameters and state variables, thereby more accurately calculating the model error and improving the prediction ability and reliability of the model.

[0069] As for Figure 1 Further introduction to the corresponding embodiment, generating battery status prediction results based on genetic algorithms: initializing the global solution set population corresponding to the battery model based on the genetic algorithm, iteratively performing fitness evaluation, screening and recombination mutation operations on the global solution set population to obtain the battery status prediction results. In the above process, fitness evaluation is used to evaluate the pros and cons of each solution, the screening operation can retain solutions with higher fitness, and the recombination and mutation operations are used to generate new solutions to increase the diversity of the population. After multiple rounds of iterations, an accurate battery status prediction result is finally obtained.

[0070] As for Figure 1As a further introduction to the corresponding embodiment, after the model error is calculated according to the battery state measurement result and the battery state prediction result, the covariance of the model error may also be calculated, and the battery state prediction result may be corrected using the covariance.

[0071] As for Figure 1 Further introduction to the corresponding embodiment, this embodiment can calculate the current operating parameters of the target battery in the following way: respectively substitute the current operating temperature into the battery capacity calculation function, the DC resistance calculation function, the polarization resistance calculation function and the polarization capacitance calculation function to obtain the current operating parameters of the target battery; wherein, the battery capacity calculation function, the DC resistance calculation function, the polarization resistance calculation function and the polarization capacitance calculation function are all natural exponential functions obtained by fitting using the least squares method.

[0072] The process described in the above embodiment is explained below through an embodiment in actual application.

[0073] The state of charge (SOC) of a battery mainly describes the remaining power of the battery, that is, the ratio of the current available capacity to the rated capacity. In electric vehicles, SOC is similar to the dipstick in fuel vehicles and is one of the key estimation parameters in the battery management system. SOC information plays a decisive role in the energy management decision of hybrid vehicles and the estimation of the cruising range of pure electric vehicles. At the same time, SOC information is also of great significance for maintaining the good working condition of the battery, ensuring safety during use, and improving the battery life. However, the SOC value of the power battery cannot be obtained by direct measurement and is affected by many factors such as ambient temperature, load curve, aging degree and self-discharge rate. Therefore, how to accurately and effectively estimate the SOC value of the battery has always been a difficult problem that must be overcome in power battery research. Related technologies have proposed various different single-cell SOC estimation methods, which are mainly divided into two categories: direct estimation methods based on battery measurement data and indirect estimation methods based on battery models. These methods aim to improve the estimation accuracy and reliability and provide a more solid foundation for the design and application of power battery management systems.

[0074] In order to obtain the required state variable values, the test data needs to be processed and the required state variable values ​​need to be inferred based on the relationship between the measured values ​​and the state variables. This inference is called estimation. Generally speaking, estimation problems can be divided into two categories: one is static estimation, whose main feature is to use the measured data to estimate the system parameters or state according to the measurement equation; the other is state estimation, whose unique feature is to use the system's dynamic state equation and measurement equation to estimate the system's state value through the system's observation value. The optimal estimation problem belongs to the latter category.

[0075] The optimal estimate is the best estimate in a sense. Assuming that the system variable x to be estimated cannot be obtained by direct observation, it is necessary to estimate x by observing the random variable y that has a statistical correlation with x. According to the relevant knowledge of the system's kinematics or dynamics, the system's equation of motion and measurement equation are determined. The system's process noise, measurement noise and initial conditions are used to process the measured value y according to a certain optimal criterion to determine the system's current state x. This problem is the optimal estimation problem. The optimal estimate is an estimation method that is considered to be optimal in a sense. Assuming that the system variable x to be estimated cannot be directly observed, it is necessary to estimate x by observing the random variable y that has a statistical correlation with x. According to the relevant knowledge of the system's kinematics or dynamics, the system's equation of motion and measurement equation are determined. Based on the information of the system's process noise, measurement noise and initial conditions, the measured value y is processed according to a certain optimal criterion to determine the system's current state x. This problem is called the optimal estimation problem.

[0076] In view of this optimal estimation problem, this embodiment proposes a nonlinear prediction optimal estimation method based on genetic algorithm. This method can more flexibly adapt to the nonlinear characteristics of the battery and complex environmental conditions, thereby improving the accuracy and reliability of SOC estimation. By introducing this algorithm, a more accurate and reliable SOC estimation result is provided for the design of battery management system and the control decision of electric vehicle, which can solve the SOC estimation problem with unknown form of battery model process noise.

[0077] The basic principle and calculation method of battery state of charge estimation are as follows:

[0078] State of charge (SOC) is mainly used to describe the remaining power of the battery. It is the ratio of the remaining available power of the battery to the rated capacity. It can be expressed by the following formula:

[0079] ;

[0080] in, is the battery state of charge at time t, is the remaining battery power at time t, is the rated capacity of the battery, is the initial state of charge of the battery, is the coulombic efficiency of the battery, is the battery load current.

[0081] In engineering, the main parameters of the battery model can be regarded as functions of the operating temperature, thereby redefining the system equation of the battery model into the following form:

[0082] ;

[0083] ;

[0084] Among them, the capacity of the battery , the DC internal resistance of the battery , the polarization resistance of the battery , the polarization capacitance of the battery All are functions of the operating temperature T. is the battery terminal voltage at a certain moment, is the polarization voltage. The model error term It mainly includes the related errors of SOC(t) and Up (t), which are expressed as model error quantities and express. It is a two-dimensional vector of battery capacity and predicted polarization voltage, which varies with time t and reflects the behavioral characteristics of the system at different moments. Represents the first derivative of the state of charge with respect to time t. Represents the first derivative of the polarization voltage with respect to time t. represents multiplication, and g represents the model error distribution matrix. A marker representing a discrete time point, representing a specific moment k in the time series. Represents the open circuit voltage, which is a function of the state of charge (SOC). represents the noise term at time k, reflecting the uncertainty or random fluctuations in the measurement or modeling process.

[0085] The following is an explanation of the principle of genetic algorithm:

[0086] The genetic algorithm can naturally obtain the solution vector of multi-objective parameters (including the solution vector of target design parameters) in the initial solution global solution set population space under convergence conditions, which can effectively reduce the prediction time of battery state of charge and greatly increase the number of prediction targets, and ultimately improve the accuracy of state of charge estimation. BP neural network can adaptively obtain a population space through the initial solution global solution set population space , which contains the genetic information of the entire population of this generation. At the same time, through appropriate hybridization operators and mutation operators, the optimal parameter combination can be found in the global solution set space. This embodiment can calculate their fitness by setting a suitable natural selection function based on the existing battery electrochemical model. This is repeated for several generations of inheritance, and finally converges to obtain the estimated value of the target SOC value. It is compared with the existing observed value, and the corrected estimated value is obtained for the next round of calculation.

[0087] This embodiment can dynamically correct the impact of the nonlinearity of the power battery state on the actual estimation by repeatedly repeating the process of "estimation"-"observation"-"correction estimation".

[0088] The calculation method of nonlinear prediction estimation of power battery state based on genetic algorithm is as follows:

[0089] The entire process of nonlinear prediction and estimation of power battery status based on genetic algorithm is as follows: Figure 2 As shown, Figure 2 A flowchart of a nonlinear prediction and estimation of a power battery state based on a genetic algorithm is provided in an embodiment of the present application. The specific implementation process is as follows:

[0090] Step 1: Initialize the global solution set population space and create a certain number of solution vectors.

[0091] These two-dimensional solution vectors form a four-dimensional initial solution global solution set population space . Through the neural network, this initial solution is adaptively transformed into the global solution set population space Transform to a population space , which contains the genetic information of the entire population of this generation.

[0092] Step 2: Input the solution vectors in the global solution set population space into the natural selection function one by one (this natural selection function is fitted by the operating temperature function of the main parameters of the battery model), and calculate their fitness.

[0093] Step 3: Arrange the fitness of these solution vectors in the global solution set population space, and determine the paternal solution vector and maternal solution vector for hybridization through elimination.

[0094] This step obtains a fitness function with variable weights based on the analysis and fitting of multiple target parameters. The fitness of the solution vectors in the population space of these global solution sets under the specified engineering conditions is calculated and sorted, and a certain number of solution vectors with higher fitness are obtained as the elite community.

[0095] This scheme can eliminate other solution vectors with lower fitness and retain the elite population as the paternal solution vector and maternal solution vector to be paired.

[0096] Step 4: Use the mate selection strategy operator to select the paired paternal solution vector and maternal solution vector from the elite population.

[0097] Step 5: Each pair of genes of the paternal solution vector and the maternal solution vector is disassembled and reassembled to generate the solution vector of the offspring generation.

[0098] Step 6: Use the mutation operator to insert certain mutation genes into the solution vector set of the next generation.

[0099] This step can mutate the solution vectors in the entire sub-generation global solution set population space through the artificially specified mutation probability. The randomly selected solution vector will undergo genetic mutation through the mutation operator, which means that individual elements in the solution vector will change in unpredictable directions.

[0100] Step 7: Obtain the global solution set population space of the child generation solution vector.

[0101] Step 8: Determine whether the number of population generations has reached the target value. If not, proceed to steps 2-7 to obtain the global solution set population space of the new sub-generation solution vector. If the number of population generations has reached the target value, proceed to step 9.

[0102] Step 9: Determine whether the solution of the global solution set population space converges. If it converges, output the solution of the global solution set population space to obtain the target solution; if it does not converge, return to steps 2 to 8.

[0103] Usually, the convergence eigenvalue A first increases and then decreases. If A is too large, it means that the global solution set population space has lost its "stability tendency" under certain circumstances. On the contrary, if A is too small, it means that the global solution set population space has no "variation randomness". When the convergence eigenvalue A corresponds to the convergence eigenvector matrix and the engineering boundary condition vector matrix When the eigenvalues ​​of the result matrix of the cross product (outer product) meet a certain range, it will indicate that the solution of its global solution set population space converges under the specified engineering conditions.

[0104] The target solution vector obtained in the above process contains the predicted battery capacity and predicted polarization voltage in the system equation of the battery model. After the algorithm is completed, the solution vector of the system equation of the predicted battery model can be obtained.

[0105] In the present invention, the solution vector is composed of various parameters in the system equation of the battery model as basic elements, and is a two-dimensional vector for predicting the battery capacity and the polarization voltage. The solution vector is constructed as follows:

[0106] ;

[0107] in, is the solution vector predicted by the genetic algorithm, is the battery state of charge at time t predicted by the genetic algorithm, is the polarization voltage predicted by the genetic algorithm.

[0108] In this embodiment, a certain number of solution vectors Xmn (m, n∈N) can be used to form an initial solution global solution set population space :

[0109] ;

[0110] Through the above operations, an initial solution of the global solution set population space Contains these n×m solution vectors X mn It is formed into a two-dimensional matrix, each matrix element contains two degrees of freedom, so the population space of this initial solution global solution set is It is a four-dimensional space.

[0111] This embodiment can analyze the BP neural network into a population space , thus the BP network completes the approximate mapping of the 4-dimensional space vector to the 2-dimensional space. The BP neural network consists of three layers, namely the input layer, the hidden layer, and the output layer. There are connection weights between the hidden layer and the input layer and the output layer respectively. The transfer function is a nonlinear transformation function, and the nonlinear transformation is the following formula:

[0112] ;

[0113] Wherein, net is the input value of the hidden layer, and f(net) is the output value of the hidden layer. In this embodiment, the input value xn of the input layer can also be set, and the connection weight ωn of the input layer and the hidden layer can also be set.

[0114] The size of this population (i.e., the number of individuals in the population) is represented by N; the length of the chromosome of the individual in the population is represented by L. Usually, in order to make the convergent eigenvalue A easier to calculate, n=m is selected to form an n-order matrix .

[0115] When initializing the global solution set population space, it is necessary to limit the numerical range of the solution vector Xmn, and then use a random number algorithm to define a certain number of solution vectors, and combine these solution vectors into the global solution set population space .

[0116] The natural selection function is a set of operators that obtain a series of fitness parameters. In this invention, the capacity function of the battery is As the first objective function, one of the weight coefficients k1 of its variable weight fitness function is:

[0117] ;

[0118] It means bringing the capacity function of the battery into the solution vector.

[0119] This embodiment can also be based on the DC internal resistance of the battery , the polarization resistance of the battery , the polarization capacitance of the battery , construct other weight coefficients k2~k4 of the corresponding fitness function:

[0120] ;

[0121] ;

[0122] ;

[0123] The expression of fitness function fitness is:

[0124] ; kn means k1~k4.

[0125] The fitness function fitness is an inner product algorithm, and its result is a scalar. According to the size of the fitness result, the fitness ranking of the global solution set population under the engineering conditions can be arranged. A ratio can be assumed for screening to obtain the elite population space e.

[0126] In order to limit the boundary conditions and improve the solution population space The proportion of feasible solutions inside the solution is calculated by adding a penalty function to solve optimization problems with complex constraints. The penalty function imposes a penalty on infeasible solutions to reduce the survival probability of infeasible solution individuals that do not meet the constraints in the next generation.

[0127] In the genetic algorithm of this embodiment, infeasible solutions are not completely denied. The non-feasible solution may be very close to the optimal feasible solution. However, in many practical problems, in order to evaluate the quality of an individual, multiple criteria must be considered to determine the superiority of the individual. This involves the optimization problem of multiple objectives. In this embodiment, the objective function values ​​of multiple objectives can be weighted by a linear weighting method, and then the fitness calculation method of some single-objective problems described above can be used. Special methods such as Pareto non-dominance sorting method can also be used.

[0128] The error estimation method of the model is as follows:

[0129] In this embodiment, the index function of the minimum model error criterion can be Defined as:

[0130] ;

[0131] in, is the system sampling interval. The indicator function consists of two penalty functions:

[0132] (1) Measurement residual The weighted sum of squares of Represents the observation function output of the battery model, Represents the observation function output of the power battery. represents the measurement noise covariance matrix, and the subscript T represents the transposed sign.

[0133] (2) Model error The weighted sum of squares; W is the semi-positive definite model error weighting matrix, and the balance of the penalty function depends on the value of W.

[0134] The Taylor series expansion of the indicator function of the minimization formula can be expressed as follows:

[0135] ;

[0136] in, , and are all intermediate parameter matrices, R represents the covariance matrix of zero-mean Gaussian white noise, represents the state variables of the battery model, Represents the state variable predicted by the genetic algorithm. The specific calculation method is as follows:

[0137] ;

[0138] ;

[0139] ;

[0140] It is a Lie derivative commonly used in nonlinear control systems, 1≤j≤n, 1≤i≤m. L represents the operator of the Lie derivative, gi represents the vector field associated with the input of the system, f represents the vector field of the dynamic characteristics inherent in the system itself, and h i represents the observation function (output function, also known as the output function); ri represents the maximum order of Taylor series expansion, which can also be called order or dimension; Represents a state variable. represents the elements on the diagonal of the matrix Λ(Δt), which is used to simulate the evolution or decay of the system state over time; a represents an integer index, which is used to represent the order of the Taylor series expansion.

[0141] in, is the observation function output of the battery model, It is the observation function output of the power battery.

[0142] Under the nonlinear system model, the observation function output of the battery model can be expressed as:

[0143] ;

[0144] in, is the time at time k, is the model observation value at time k, is the state equation output at time k, is a time-varying parameter, is a functional function representing the model-observation relationship, is a zero-mean Gaussian white noise.

[0145] Under the nonlinear system model, the observation function output of the power battery can be expressed as:

[0146] ;

[0147] in, is the time at time k, is the power battery observation value at time k, is the state equation output at time k, is a time-varying parameter, is a functional function representing the observation relationship of the power battery, is a zero-mean Gaussian white noise.

[0148] According to the ergodic theorem, the covariance calculation expression of the model error term d(t) is as follows:

[0149] ;

[0150] Among them, D is the variance of the model error d(t) calculated through the time series, the model error weighting matrix W is taken as the inverse of D, and E represents the mathematical expectation.

[0151] The method for updating the current power battery status is as follows:

[0152] The current power battery state is updated according to this error, and then recorded as the power battery state of the next frame (or the next calculation cycle), which is .

[0153] .

[0154] Representation is a two-dimensional vector of battery capacity and predicted polarization voltage; A nonlinear function used to represent the dynamic characteristics of the system, which depends on the state vector at the current time t And time itself.

[0155] See also Figure 3 , Figure 3 A schematic diagram of a method for nonlinear prediction and estimation of power battery status based on a genetic algorithm provided in an embodiment of the present application, wherein the operating temperature is input into a function of the relationship between temperature and parameters, and current is input into the battery model, power battery and genetic algorithm estimation matrix. During the operation, an intermediate parameter matrix can be obtained, model error terms are estimated, a model error term weighted matrix is ​​generated, and finally a status update is performed to obtain the battery status of the next frame.

[0156] The intermediate parameter matrix includes , and ;

[0157] The model error term can be estimated to obtain d(t);

[0158] ;

[0159] The output of the power battery is , the output of the genetic algorithm estimation matrix is . Indicates the battery status of the current frame, Indicates the battery status of the next frame.

[0160] The entire algorithm structure will repeatedly repeat the process of "calculation" - "observation" - "correction of calculation".

[0161] First of all, the "inference" is the genetic algorithm mentioned above, which will calculate the battery capacity function and the DC internal resistance of the battery. , polarization resistance of the battery and the polarization capacitance of the battery A fitness function corresponding to each weight coefficient is constructed to calculate a solution vector, which is a two-dimensional vector representing the predicted battery capacity and the predicted polarization voltage in the system equation of the battery model.

[0162] Then, “observation” is to measure and record the operating temperature, input current and battery terminal voltage of the power battery in real time, and then calculate the corresponding system equation based on the known battery model.

[0163] "Corrected extrapolation" is to calculate this D, which will be used to judge the error between the result of nonlinear prediction based on genetic algorithm and the actual measurement result. Then, the system equation of the power battery state finally calculated is updated. This embodiment proposes an algorithm structure of repeatedly "estimating" - "observing" - "corrected extrapolation", and proposes a calculation method for estimating the power battery state by nonlinear prediction of genetic algorithm. This embodiment calculates D, and then judges the error between the result of nonlinear prediction based on genetic algorithm and the actual measurement result, so as to correct the extrapolation method.

[0164] After testing the single cells, the test data is processed, and the corresponding functional relationship is obtained by using the natural exponential polynomial combined with the least square method:

[0165] ;

[0166] ;

[0167] ;

[0168] ;

[0169] The above function can be substituted into the system equation of the battery model for use.

[0170] The global solution set population space of the elite population The methods for selecting the father and mother of e generally adopt the classical roulette wheel selection method (or called the proportional selection method), and the specific operations are as follows:

[0171] (1) Calculate the fitness of each individual in the population fitness (i = 1, 2,..., M), where M is the population size;

[0172] (2) Calculate the probability that each individual is inherited into the next generation population:

[0173] ;

[0174] (3) Calculate the cumulative probability of each individual:

[0175] ;

[0176] The above q i is the cumulative probability of chromosome xi (i = 1, 2,..., n), representing the probability of a single chromosome.

[0177] (4) Generate a uniformly distributed pseudo-random number r in the interval [0, 1];

[0178] (5) If r < q1, then select individual 1, otherwise, select individual k such that: q k-1 < r ≤ q k holds;

[0179] (6) Repeat steps (4) and (5) M times.

[0180] Since all the parameters of the system equation for calculating the power battery state in this embodiment are located in the real number space. Therefore, the crossover operator used in this embodiment is the intermediate recombination method of the classical real-value recombination algorithm, and the specific process is as follows:

[0181] Intermediate reorganizations can slightly exceed the boundaries of the parent hypercube, such as Figure 4 is the position of the possible offspring variables in the solution space after the intermediate reorganization, Figure 4 A schematic diagram of the structure of a parent hypercube provided in an embodiment of the present application shows a parent parent1, a parent parent2, a possible offspring Possible Offspring, and Variable1 and Variable2 represent variables.

[0182] For example, the chromosomes of the parent are:

[0183] Parent individual 1: 0.4 1.2 -0.3;

[0184] Parent individual 2: 0.2 0.7 0.6;

[0185] The chromosomes of the generated offspring individuals can be: 0.3 0.9 0.4. Intermediate recombination is a recombination algorithm that is only applicable to individuals with real variables. Here, the variable values ​​of the offspring are selected from the interval of the generation variable. The formula for generating offspring individuals is as follows:

[0186] ; ;

[0187] in, is a random number between [−d,1 + d], which is a uniformly randomly chosen scaling factor.

[0188] represents the offspring individual, and Represents the parent individual.

[0189] The value of the parameter d represents the size of the region of possible offspring. d = 0 means that the region size of the variable values ​​of the offspring is the same as that of the parent, which is called "(standard) intermediate recombination". However, since most of the variables of the offspring are not generated on the boundary of the possible region, the area covered by the variables may become smaller and smaller. Therefore, this variable space shrinkage phenomenon will occur only with standard intermediate recombination with d = 0. Therefore, this phenomenon can be prevented by setting a larger d value. Generally, d = 0.25 is set, at which time it can be statistically guaranteed that the range of variable values ​​of the offspring will not shrink. Mutation refers to the process of forming a new solution vector by changing part of the elements in the solution vector. It can increase the diversity of the population and reduce the risk of the evolutionary algorithm falling into a local optimal solution.

[0190] The mutation operator of this embodiment is Gaussian mutation. Gaussian mutation means that the result of the mutation obeys the normal distribution, including Gaussian mutation with the current value as the center point and Gaussian mutation with the center of the search domain as the center point. Gaussian mutation provides a σ (standard deviation of the normal distribution) to control the size of the mutation. However, it does not strictly limit the range of mutation like uniform mutation. In the case of large samples, the probability that the mutation result falls in the neighborhood of length α near the center point is about 68.27%; the probability that it falls in the neighborhood of length 3α near the center point is about 99.73%. The embodiment uses the Gaussian mutation function used in the Geatpy genetic algorithm box. After several generations of alternation, it is necessary to determine whether the solution of the global solution set population space converges, and then obtain the solution vector of the target resonant cavity design parameters.

[0191] The method for finding the convergent eigenvalue A is as follows:

[0192] n-th order matrix , there exists a number A and a non-zero vector x that satisfies the relationship: .

[0193] Usually, the convergence eigenvalue A first increases and then decreases. If A is too large, it means that the global solution set population space has lost its "stability tendency" under certain circumstances. On the contrary, if A is too small, it means that the global solution set population space has no "variation randomness". When the convergence eigenvalue A corresponds to the convergence eigenvector matrix and the engineering boundary condition vector matrix When the eigenvalues ​​of the result matrix of the cross product (outer product) meet a certain range (this range is limited by the actual engineering needs), it will indicate that the solution of its global solution set population space converges under the specified engineering conditions.

[0194] See also Figure 5 , Figure 6 , Figure 7 and Figure 8 , Figure 5 This is a comparison chart of the estimated value and reference value of the power battery at an operating temperature of 25°C provided in the embodiment of the present application. Figure 6 This is a schematic diagram of the estimated value error of the power battery at a working temperature of 25°C provided in an embodiment of the present application. Figure 7 This is a schematic diagram of the mean absolute error of the SOC estimation value of the power battery at an operating temperature of 25° C. provided in an embodiment of the present application. Figure 8This is a schematic diagram of the root mean square error of the SOC estimation value of the power battery at an operating temperature of 25°C provided in an embodiment of the present application. In the figure, Reference represents the reference value, Estimation represents the estimated value, the horizontal axis represents time (s), the vertical axis represents the state of charge SOC, the estimated state of charge error SOC Error, the mean absolute error SOC MAE of the state of charge, and the root mean square error SOC RMSE of the state of charge, and (-) represents an arbitrary unit.

[0195] It can be seen that under the operating temperature of 25°C, the SOC estimation method of this embodiment achieves good estimation accuracy, the maximum SOC estimation error is less than 2%, and the mean absolute error MAE and root mean square error RMSE are both less than 1%. Under different operating temperatures, the accuracy of the SOC estimation method does not change much and maintains a small estimation error. Based on the above analysis, it can be seen that by incorporating the functional relationship between the battery model parameters and the operating temperature into the SOC estimation method based on the genetic algorithm, the application of the SOC estimation method can be expanded to a wider battery operating temperature range, and a better estimation effect can be achieved.

[0196] A battery state estimation system based on a genetic algorithm provided in an embodiment of the present application may include:

[0197] A parameter determination module, used to detect the current operating temperature of the target battery and calculate the current operating parameters of the target battery according to the current operating temperature; wherein the current operating parameters include battery capacity, DC resistance, polarization resistance and polarization capacitance;

[0198] A parameter updating module, used for updating the current operating parameters to the battery model of the target battery;

[0199] A measurement module, used for inputting the load current of the target battery into the battery model to obtain a battery state measurement result;

[0200] A prediction module, used for performing nonlinear prediction on the battery model based on a genetic algorithm to obtain a battery state prediction result;

[0201] An error calculation module, used to calculate a model error according to the battery state measurement result and the battery state prediction result;

[0202] A state estimation module is used to calculate the battery state of the target battery at the next moment according to the model error.

[0203] This embodiment detects the current operating temperature of the target battery, calculates the current operating parameters of the target battery based on the current operating temperature, and updates the calculated current operating parameters to the battery model to ensure that the battery model can reflect the actual state of the battery under the current operating conditions. This embodiment inputs the load current of the target battery into the updated battery model to obtain a battery state measurement result, and performs nonlinear prediction on the battery model through a genetic algorithm to obtain a battery state prediction result. This embodiment calculates the model error by comparing the battery state measurement result and the battery state prediction result to determine the battery state of the target battery at the next moment. This embodiment significantly improves the accuracy and reliability of detecting the battery state by real-time monitoring and dynamic updating of battery model parameters, combined with genetic algorithms for nonlinear prediction and error correction.

[0204] Further, the measurement module inputs the load current of the target battery into the battery model to obtain a battery state measurement result, including: inputting the load current of the target battery into the battery model to obtain a battery capacity measurement result and a polarization voltage measurement result;

[0205] Correspondingly, the prediction module performs nonlinear prediction on the battery model based on the genetic algorithm to obtain a battery state prediction result, including: performing nonlinear prediction on the battery model based on the genetic algorithm to obtain a battery capacity prediction result and a polarization voltage prediction result.

[0206] Furthermore, the process of the error calculation module calculating the model error based on the battery state measurement result and the battery state prediction result includes: determining the error calculation expression of the battery model; substituting the battery state measurement result and the battery state prediction result into the error calculation expression to obtain the model error.

[0207] Furthermore, the process of the error calculation module determining the error calculation expression of the battery model includes: determining the indicator function corresponding to the minimum error criterion of the battery model; performing Taylor series expansion on the indicator function to obtain the error calculation expression; wherein the error calculation expression includes multiple intermediate parameter matrices represented by Lie derivatives.

[0208] Furthermore, the prediction module performs nonlinear prediction on the battery model based on a genetic algorithm, and the process of obtaining a battery state prediction result includes: initializing a global solution set population corresponding to the battery model based on the genetic algorithm, iteratively performing fitness evaluation, screening and recombination mutation operations on the global solution set population, and obtaining the battery state prediction result.

[0209] Furthermore, it also includes:

[0210] The correction module is used to calculate the covariance of the model error after calculating the model error according to the battery state measurement result and the battery state prediction result, and correct the battery state prediction result by using the covariance.

[0211] Furthermore, the process of the parameter determination module calculating the current operating parameters of the target battery according to the current operating temperature includes: respectively substituting the current operating temperature into the battery capacity calculation function, the DC resistance calculation function, the polarization resistance calculation function and the polarization capacitance calculation function to obtain the current operating parameters of the target battery; wherein the battery capacity calculation function, the DC resistance calculation function, the polarization resistance calculation function and the polarization capacitance calculation function are all natural exponential functions obtained by fitting using the least squares method.

[0212] Since the embodiments of the system part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the system part, which will not be repeated here.

[0213] The present application also provides a storage medium on which a computer program is stored, and when the computer program is executed, the steps provided in the above embodiment can be implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0214] The present application also provides an electronic device, which may include a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps provided in the above embodiment may be implemented. Of course, the electronic device may also include various network interfaces, power supplies and other components.

[0215] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of this application.

[0216] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

Claims

1. A battery state estimation method based on genetic algorithm, characterized in that: include: Detecting a current operating temperature of a target battery, and calculating current operating parameters of the target battery according to the current operating temperature; wherein the current operating parameters include battery capacity, DC resistance, polarization resistance, and polarization capacitance; Updating the current operating parameters to a battery model of the target battery; Inputting the load current of the target battery into the battery model to obtain a battery state measurement result; Performing nonlinear prediction on the battery model based on a genetic algorithm to obtain a battery state prediction result; Calculating a model error according to the battery state measurement result and the battery state prediction result; The battery state of the target battery at the next moment is calculated according to the model error.

2. The method for estimating battery status based on genetic algorithm according to claim 1, characterized in that: Inputting the load current of the target battery into the battery model to obtain a battery state measurement result, including: Inputting the load current of the target battery into the battery model to obtain a battery capacity measurement result and a polarization voltage measurement result; Accordingly, the battery model is subjected to nonlinear prediction based on a genetic algorithm to obtain a battery state prediction result, including: Based on the genetic algorithm, nonlinear prediction is performed on the battery model to obtain battery capacity prediction results and polarization voltage prediction results.

3. The battery state estimation method based on genetic algorithm according to claim 1, characterized in that: Calculating a model error according to the battery state measurement result and the battery state prediction result includes: Determining an error calculation expression for the battery model; The battery state measurement result and the battery state prediction result are substituted into the error calculation expression to obtain the model error.

4. The method for estimating battery status based on genetic algorithm according to claim 3, characterized in that: Determine the error calculation expression of the battery model, including: Determining an indicator function corresponding to a minimum error criterion of the battery model; Performing Taylor series expansion on the indicator function to obtain the error calculation expression; wherein the error calculation expression includes a plurality of intermediate parameter matrices represented by Lie derivatives.

5. The method for estimating battery status based on genetic algorithm according to claim 1, characterized in that: The battery model is subjected to nonlinear prediction based on a genetic algorithm to obtain a battery state prediction result, including: The global solution set population corresponding to the battery model is initialized based on the genetic algorithm, and fitness evaluation, screening and recombination mutation operations are iteratively performed on the global solution set population to obtain the battery state prediction result.

6. The battery state estimation method based on genetic algorithm according to claim 1, characterized in that: After calculating the model error according to the battery state measurement result and the battery state prediction result, the method further includes: The covariance of the model error is calculated, and the battery state prediction result is corrected using the covariance.

7. The battery state estimation method based on genetic algorithm according to claim 1, characterized in that: Calculating the current operating parameter of the target battery according to the current operating temperature includes: Substituting the current operating temperature into the battery capacity calculation function, the DC resistance calculation function, the polarization resistance calculation function and the polarization capacitance calculation function respectively, to obtain the current operating parameters of the target battery; The battery capacity calculation function, the DC resistance calculation function, the polarization resistance calculation function and the polarization capacitance calculation function are all natural exponential functions obtained by fitting using the least squares method.

8. A battery state estimation system based on genetic algorithm, characterized in that: include: A parameter determination module, used to detect the current operating temperature of the target battery and calculate the current operating parameters of the target battery according to the current operating temperature; wherein the current operating parameters include battery capacity, DC resistance, polarization resistance and polarization capacitance; A parameter updating module, used for updating the current operating parameters to the battery model of the target battery; A measurement module, used for inputting the load current of the target battery into the battery model to obtain a battery state measurement result; A prediction module, used for performing nonlinear prediction on the battery model based on a genetic algorithm to obtain a battery state prediction result; An error calculation module, used to calculate a model error according to the battery state measurement result and the battery state prediction result; A state estimation module is used to calculate the battery state of the target battery at the next moment according to the model error.

9. An electronic device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and when the processor calls the computer program in the memory, the steps of the battery state estimation method based on genetic algorithm as claimed in any one of claims 1 to 7 are implemented.

10. A storage medium, characterized in that: The storage medium stores computer executable instructions, and when the computer executable instructions are loaded and executed by the processor, the steps of the battery state estimation method based on genetic algorithm as claimed in any one of claims 1 to 7 are implemented.