A lithium battery equivalent circuit parameter identification method based on DNA coding multi-population particle swarm genetic algorithm
By combining a multi-population particle swarm genetic algorithm based on DNA encoding with the particle swarm algorithm, the problems of poor local search capability and slow convergence speed of genetic algorithms in the identification of equivalent circuit parameters of lithium batteries are solved, and higher identification accuracy and efficiency are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG UNIV
- Filing Date
- 2022-11-30
- Publication Date
- 2026-04-17
AI Technical Summary
Existing genetic algorithms suffer from problems such as poor local search capability, slow convergence speed, rapid loss of individual diversity, and susceptibility to local optima and premature convergence in the identification of equivalent circuit parameters of lithium batteries, which limit the optimization efficiency and solution results.
A multi-population particle swarm genetic algorithm based on DNA encoding is adopted, which uses the four base symbols of DNA to represent the genetic information of individuals in the population. By combining multi-population genetic algorithm and particle swarm algorithm, the crossover and mutation probabilities of different populations and migration operations are used. The particle swarm algorithm of elite population is combined to perform local optimization, thereby improving the global and local search capabilities.
It improves the accuracy and efficiency of lithium battery equivalent circuit parameter identification, maintains population diversity, avoids getting trapped in local optima, enhances the algorithm's global optimization ability and evolutionary efficiency, and achieves higher fitting accuracy and lower computational cost.
Smart Images

Figure CN115994553B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of battery equivalent circuit model parameter identification, specifically involving a lithium battery equivalent circuit parameter identification method based on a multi-population particle swarm genetic algorithm using DNA encoding. Background Technology
[0002] Lithium-ion batteries possess advantages such as high energy density, long cycle life, extremely low self-discharge rate, and smooth discharge voltage, and have rapidly developed into a new generation of energy storage power sources. To ensure the safe and reliable operation of battery energy storage systems, it is essential to establish a comprehensive battery management system based on accurate battery models to estimate and predict battery states.
[0003] Studies have shown that second-order RC models can accurately simulate various characteristics of lithium batteries, such as ohmic characteristics, concentration polarization characteristics, and electrochemical polarization characteristics, while maintaining a reasonable level of complexity and computational load. Accurately identifying the parameters in lithium battery models is fundamental for estimating and predicting battery states.
[0004] For parameter identification of battery equivalent circuit models, there are many existing research methods, such as: least squares fitting, which is computationally simple but has a large error; Kalman filtering algorithm, which can obtain the optimal estimate of state variables, but the noise values in the prediction and observation equations directly affect the accuracy of the results and are not easy to control; genetic algorithm, which has good global identification accuracy but poor local search ability and slow search speed; and particle swarm optimization algorithm, which is simple to implement and has a fast convergence speed, but is prone to getting trapped in local optima. For example, Chinese patent publication number 103927440A discloses a parameter identification method for lithium battery equivalent circuit models, including genetic algorithm objective function construction, initialization operation, crossover operation, local search, and mutation operation. For example, Chinese patent publication number 113419177A discloses a Kalman filtering algorithm combined with an improved particle swarm optimization algorithm with the goal of accurately estimating the SOC value of lithium batteries. By adding the improved particle swarm optimization algorithm to the time update and state update of the EKF algorithm for noise covariance matrix optimization, the estimation accuracy is improved.
[0005] Among them, genetic algorithms are widely used in parameter identification of battery equivalent circuit models due to their simplicity, versatility, strong global search capability, robustness, and ease of parallel processing. However, in practical applications, genetic algorithms have revealed many shortcomings. First, they have poor local search and fine-tuning capabilities, and slow convergence speed. While genetic algorithms can quickly locate the range of the global optimum in the early stages of the search, their search efficiency gradually decreases thereafter because of their poor fine-tuning ability, causing the search to stagnate.
[0006] Furthermore, genetic algorithms lack theoretical basis for selecting evolutionary parameters, and there is no clear theoretical guidance on how to select parameters, resulting in a high degree of arbitrariness; genetic algorithms are difficult to avoid local traps, and once trapped, there is a lack of effective mechanisms to help them escape.
[0007] Genetic algorithms suffer from rapid loss of individual diversity; after several generations, the differences between individuals decrease dramatically, and the population tends to become homogeneous in the later stages of evolution. Furthermore, genetic algorithms are prone to premature convergence, losing their motivation to find the global optimum. These shortcomings severely limit the optimization efficiency and solution results of genetic algorithms. Summary of the Invention
[0008] The purpose of this invention is to provide a method for identifying equivalent circuit parameters of lithium batteries based on a multi-population particle swarm genetic algorithm using DNA encoding. This method has excellent identification effect on equivalent circuit parameters of lithium batteries.
[0009] This invention provides the following technical solution:
[0010] A method for identifying equivalent circuit parameters of lithium batteries based on a multi-population particle swarm genetic algorithm encoded in DNA, the method comprising the following steps:
[0011] (1) Establish a well-defined equivalent circuit model for a lithium battery;
[0012] (2) The dynamic current and voltage data of lithium batteries under different states of charge were obtained by using hybrid pulse power characteristic test;
[0013] (3) The parameter identification process in the equivalent circuit model of lithium battery is optimized by using a multi-population particle swarm genetic algorithm to obtain the optimal identification parameters;
[0014] In step (3), the lithium battery equivalent circuit model obtains the estimated value of the battery terminal voltage at each time under dynamic conditions by substituting the current parameter value and the dynamic current data at each time in step (2); the fitness function in the multi-population particle swarm genetic algorithm is established based on the estimated value of the battery terminal voltage and the dynamic voltage data / measured voltage at the corresponding time in step (2).
[0015] This invention is based on a multi-population particle swarm genetic parameter identification algorithm using DNA encoding. It borrows from DNA encoding, employing strings composed of the four DNA base symbols A, T, C, and G to represent the genetic information of individuals within a population. For ease of calculation, 0-3 are used to represent the four bases A, T, C, and G. In one iteration cycle, each population first calculates its fitness value, using the model and data described earlier. Then, each population independently undergoes selection, crossover, and mutation operations. The crossover and mutation probabilities differ between populations. Next, an migration operation is performed, replacing the worst individual in the next population with the best individual from the current population. Finally, the best individual from each population is selected and sent to the elite population. The elite population is then optimized using particle swarm optimization and high mutation probability operations, and this process is repeated a certain number of times to improve the optimization effect. If the best individual remains unchanged for multiple generations, the best individual is output, and the algorithm ends; otherwise, the next iteration cycle begins.
[0016] In step (1), the parameters in the well-defined lithium battery equivalent circuit model include the battery's ohmic internal resistance R. a Electrochemical polarization internal resistance R c and concentration polarization internal resistance R w and electrochemical polarization capacitance C c and concentration polarization capacitance C w .
[0017] Preferably, the structurally defined equivalent circuit model of the lithium battery is as follows:
[0018] U M,k =U OC -U c,k -U w,k -I K ·R a (1)
[0019] In the formula, U M,k U is the estimated value of the battery terminal voltage at time k. OC U is the open-circuit voltage of the battery, and U is the voltage value at the initial moment in step (2). c,k and U w,k These are the terminal voltages of the two RC circuits at time k, I k U is the battery current value at time k, and U is the battery current value at time k in step (2). c,k and U w,k The calculation method is as follows:
[0020]
[0021]
[0022] In the formula, Δt is the data sampling interval, τ1 and τ2 are the time constants of the two RC loops, and U C,k-1 and U w,k-1 These are the terminal voltages of the two RC circuits at time k-1; the calculation methods for τ1 and τ2 are shown below:
[0023] τ1=R c ·C c τ2=R w ·C w (4).
[0024] Preferably, in step (2), the method for obtaining dynamic current and voltage data of lithium batteries under different states of charge using hybrid pulse power characteristic testing includes:
[0025] (2-1) At 25°C, charge the battery at a constant current of 1C to 3.6V, then keep the voltage at 3.6V until the current decreases to 0.02C, and let it rest for 120 minutes.
[0026] (2-2) Discharge the battery at a constant current rate of 1C, with a discharge capacity of 10% of the actual capacity, so that the battery state of charge is 0.9, and leave it for 120 minutes.
[0027] (2-3) Discharge the battery at a constant current of 1C for 20 seconds, let it rest for 40 seconds, then charge the battery at a constant current of 1C for 20 seconds, and let it rest for 120 minutes.
[0028] (2-4) Repeat steps (2-2) and (2-3) to test and record the battery charging and discharging current and voltage when the battery state of charge is 0.8 to 0.1, so as to obtain the dynamic current and voltage data of the lithium battery under different states of charge.
[0029] Preferably, in step (3), the fitness function is:
[0030]
[0031] In the formula, U L,k U is the measured value of the voltage. M,k denoted as , where is the estimated value of the battery terminal voltage, f is the fitness function value (the smaller f is, the higher the fitting accuracy), and n is the number of voltage data points in each set.
[0032] Preferably, in step (3), the method for optimizing the parameter identification process in the lithium battery equivalent circuit model using a multi-population particle swarm genetic algorithm includes:
[0033] (3-1) Initialization: Determine the parameter R to be identified a R c R w C cC w The length and value range of the quaternary code; randomly generate M populations, each population has N quaternary code strings, each quaternary code string represents an individual, which is composed of the quaternary codes of 5 parameters to be identified in order;
[0034] (3-2) Calculation of initial population fitness values: Convert the parameters to be identified to decimal; calculate the fitness value of each individual according to the fitness function;
[0035] (3-3) Multi-population genetic algorithm evolution: selection, mutation and crossover operations are performed within each population, and migration operations are carried out between populations;
[0036] (3-4) Selection and maintenance of elite population: The best individuals from each population are accepted as elite population individuals, and the number of elite population individuals is controlled below a set value P.
[0037] (3-5) Use particle swarm genetic algorithm to find local optimization for the elite population;
[0038] (3-6) Determining the termination condition of the algorithm: In the loop steps (3-3) to (3-5), the best individual in the elite population is extracted in each loop. If the best individual can remain unchanged for the set number of generations, the algorithm ends and the best individual is output; otherwise, the loop steps (3-3) to (3-5) is repeated.
[0039] In step (3-2), the method for converting the parameter to be identified to decimal is as follows:
[0040]
[0041] In the formula, S is the actual decimal value of the parameter to be identified, T is the value directly converted from quaternary code to decimal, X is the length of the quaternary code of the parameter to be identified, and U and L are the upper and lower limits of the range of values of the parameter to be identified, respectively.
[0042] In step (3-3), the method for evolution using a multi-population genetic algorithm is as follows:
[0043] (3-3-1) Selecting individuals within each population: Based on the fitness values obtained in step (3-2), evaluate the quality of individuals, and select the best individuals to directly enter the offspring, while the remaining individuals undergo crossover and mutation operations.
[0044] (3-3-2) Perform crossover and mutation operations within each population: pair the remaining individuals together with p x The probability is p, and in each group of two individuals, a portion of a fragment is exchanged, with the position and length of the fragment being random; the mutation operation is based on p m The probability of randomly changing the value of a certain bit in an individual's quaternary encoding string;
[0045] (3-3-3) Perform migration operations between populations: calculate the fitness value of individuals and number the populations; replace the worst individual in the next population with the best individual in the current population, and replace the worst individual in the first population with the best individual in the last population, and so on.
[0046] In step (3-4), the initial elite population is empty. When the number of individuals in the elite population is less than the set value P, the best individuals from each population in step (3-3) are directly received. When the number of individuals in the elite population reaches the set value P, if the fitness value of the best individual in the population is better than that of the worst individual in the elite population, a replacement operation is performed; otherwise, the individual is rejected.
[0047] In steps (3-5), the method of using particle swarm genetic algorithm to perform local optimization on the elite population includes:
[0048] (3-5-1) Use formula (6) to convert the parameters to be identified into decimal, determine the group's historical best and the individual's historical best, and initialize the speed;
[0049] (3-5-2) Calculate the speed of all individuals sequentially. The speed of the i-th individual in the (k+1)-th evolutionary process is:
[0050]
[0051] In the formula, α is the inertia coefficient, k+1 and k are the number of iterations, c1 and c2 are constants selected empirically, r1 and r2 are random numbers in the interval [0,1], and P... i For the individual optimality, P g For the group optimal, Let i be the position of the i-th individual after the k-th evolution;
[0052] (3-5-3) Calculate the position of all individuals sequentially. The position of the i-th individual after the (k+1)-th evolution is:
[0053]
[0054] In the formula, Let i be the position of the i-th individual after the (k+1)-th evolution. Let be the velocity of the i-th individual in the (k+1)-th evolutionary process;
[0055] (3-5-4) Calculate the fitness value of each individual according to formula (5): For each individual, first compare it with the population's optimal fitness value. If it is smaller, update the population's optimal fitness value and the population's historical best value. Otherwise, keep it unchanged. Then compare it with the individual's optimal fitness value. If it is smaller, update the individual's optimal fitness value and the individual's historical best value. Otherwise, keep it unchanged.
[0056] (3-5-5) To convert an individual string into a quaternary encoded string, first calculate the decimal value corresponding to the quaternary encoding. The calculation method is as follows:
[0057]
[0058] In the formula, S is the actual decimal value of the parameter to be identified, T is the value directly converted from quaternary code to decimal, X is the length of the quaternary code of the parameter to be identified, and U and L are the upper and lower limits of the range of values of the parameter to be identified, respectively; [] represents the rounding operation, which directly converts T into X-bit quaternary code, and combines the quaternary codes of the parameter to be identified in turn to form N individuals;
[0059] (3-5-6) Perform mutation operation with high probability. Refer to step (3-2) for the method. Use formula (6) to convert the parameters to be identified into decimal. Refer to step (3-5-4) to update the individual.
[0060] (3-5-7) Repeat steps (3-5-2) to (3-5-6) until the set number of iterations is completed.
[0061] This invention draws on the principles of DNA encoding and integrates the ideas of multi-population genetic algorithms and particle swarm genetic algorithms. All parameters to be identified in the equivalent circuit model are considered as individuals. Using the DNA encoding method, multiple populations are generated, each evolving independently using a genetic algorithm, but with different crossover and mutation probabilities. Migration operations facilitate communication between populations. After each evolution, each population outputs its best individual to the elite population. The elite population maintains a certain number of individuals through selection, and then uses particle swarm optimization and high-probability mutation operations to achieve local optimization, ultimately selecting the best from the best. If the best individual in the elite population remains unchanged for multiple generations, that best individual is output; otherwise, the iterative algorithm continues.
[0062] Compared with existing technologies: This invention employs DNA encoding, achieving higher accuracy with the same individual code length; it also reduces computational cost while maintaining the same accuracy; the introduction of multiple population genetic algorithms effectively maintains the diversity of individuals within the population; different combinations of crossover and mutation probabilities improve the algorithm's global optimization ability and prevent it from getting stuck in slow or even stagnant evolution, providing conditions for the algorithm to escape local traps; the use of particle swarm optimization (PSO) for elite populations enhances the algorithm's local search ability, enabling it to find the best individuals locally, thus achieving the effect of selecting the best among the best and improving the algorithm's local optimization capability; the change in the algorithm's termination condition improves the algorithm's evolutionary efficiency. Therefore, the method provided by this invention has a superior effect on identifying the equivalent circuit parameters of lithium batteries. Attached Figure Description
[0063] Figure 1 This is a schematic diagram of a lithium battery equivalent circuit parameter identification method based on a DNA-encoded multi-population particle swarm genetic algorithm.
[0064] Figure 2 The curve shows the change in current during the hybrid pulse power characteristic test on September 2, 2022.
[0065] Figure 3 The voltage variation curve is shown in the hybrid pulse power characteristic test conducted on September 2, 2022.
[0066] Figure 4 The current-voltage curves of the battery under pulsed operating conditions are shown in the hybrid pulse power characteristic test conducted on September 2, 2022, when the battery's state of charge is 0.9%.
[0067] Figure 5 This is a schematic diagram of the second-order equivalent circuit model of the lithium battery used in a specific embodiment.
[0068] Figure 6 This is a flowchart of a multi-population particle swarm genetic algorithm based on DNA encoding.
[0069] Figure 7 The error between the predicted voltage and the measured voltage is calculated based on the parameters identified using the algorithm of this invention on October 8, 2022. Detailed Implementation
[0070] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention.
[0071] Figure 1 The diagram shows the principle of a lithium battery equivalent circuit parameter identification method based on a DNA-encoded multi-population particle swarm genetic algorithm. It can be seen that the method includes a well-defined lithium battery equivalent circuit model, current and voltage data of the lithium battery under dynamic conditions obtained by hybrid pulse power characteristic testing, a calculation method for judging the fitting accuracy of the battery terminal voltage, and a DNA-encoded multi-population particle swarm genetic parameter identification algorithm.
[0072] 1. Establish the equivalent circuit model of the lithium battery.
[0073] This embodiment employs, as follows: Figure 5 The second-order RC equivalent circuit model is shown. This model uses a power source, a resistor, and two RC networks to fit the dynamic and static characteristics of the battery.
[0074] Among them, R a R is the ohmic internal resistance of the battery. c and Rw These are the electrochemical polarization resistance and the concentration polarization resistance, respectively, C c and C w These are the electrochemical polarization capacitance and the concentration polarization capacitance, respectively. These five parameters are the parameters that need to be identified in the second-order RC equivalent circuit model.
[0075] according to Figure 5 The estimated value of the battery terminal voltage at time k and the calculation method of the terminal voltages of the two RC loops for the equivalent circuit shown are as follows:
[0076] U M,k =U OC -U c,k -U w,k -I k ·R a (1)
[0077]
[0078]
[0079] Among them, U M,k U is the estimated value of the battery terminal voltage at time k. OC The open-circuit voltage of the battery is obtained in this embodiment by the static method, and its specific value is [value missing]. Figure 4 The voltage value at the initial moment, U c,k and U w,k These are the terminal voltages of the two RC circuits at time k, U C,k-1 and U w,k-1 These are the terminal voltages of the two RC circuits at time k-1, I k Let be the current value of the battery at time k, i.e. Figure 4 The current value at time k, Δt is the data sampling interval, which is 1s in this embodiment, and τ1 and τ2 are the time constants of the two RC circuits, calculated as follows:
[0080] τ1=R c ·C c τ2=R w ·C w (4)
[0081] 2. Dynamic current and voltage data of lithium batteries under different states of charge were obtained using hybrid pulse power characteristic testing.
[0082] In this embodiment, a multi-population particle swarm genetic algorithm based on DNA encoding is used to identify the parameters of the battery equivalent circuit model offline. Therefore, the battery is first tested for pulse power characteristics. The tested lithium iron phosphate battery has a capacity of 6000mAh and a size of 32700. The specific test steps are as follows:
[0083] Step 1: At 25°C, charge the battery at a constant current of 1C to 3.6V, then keep the voltage at 3.6V until the current decreases to 0.02C, and let it rest for 120 minutes.
[0084] Step 2: Discharge the battery at a constant current rate of 1C, discharging to 10% of the actual capacity, so that the battery's state of charge is 0.9, and let it rest for 120 minutes.
[0085] Step 3: Discharge the battery at a constant current rate of 1C for 10 seconds, let it rest for 40 seconds, then charge the battery at a constant current rate of 1C for 10 seconds, and let it rest for 120 minutes.
[0086] Step 4: Repeat steps 2 and 3 to test and record the battery charging and discharging current and voltage when the battery state of charge is between 0.8 and 0.1.
[0087] By following the four steps above, dynamic current and voltage data of the battery under different states of charge can be obtained. The current change curve during the test is shown below. Figure 2 As shown, the voltage change curve is as follows: Figure 3 As shown.
[0088] The data used in this embodiment is the current-voltage curve under pulsed operating conditions when the battery's state of charge is 0.9%. The changes in current and voltage are as follows: Figure 4 As shown.
[0089] 3. The parameter identification process in the equivalent circuit model of a lithium battery is optimized using a multi-population particle swarm genetic algorithm to obtain the optimal identification parameters.
[0090] In this embodiment, the fitting accuracy of the battery terminal voltage is reflected by the fitness function value, where the fitness function is the mean square error of the two sets of voltages at each sampling time point. The two sets of voltages are: (1) the measured value of the battery terminal voltage U obtained from the hybrid pulse power characteristic test. L,k ,Right now Figure 4 (2) Voltage values at various times; (3) Battery terminal voltage estimates U obtained by fitting the battery equivalent circuit model. M,k The fitness function is as follows:
[0091]
[0092] In the formula, f is the fitness function value. The smaller the f, the higher the fitting accuracy. n is the number of voltage data in each group, which is 65 in this embodiment.
[0093] The specific method of the DNA-encoded multi-population particle swarm genetic algorithm is as follows:
[0094] Figure 6This is a flowchart of the multi-population particle swarm genetic algorithm based on DNA encoding in this embodiment, where DNA encoding is simplified and replaced with quaternary encoding. The specific steps include:
[0095] Step 1: Initialization, which includes the following steps:
[0096] Step 1.1: Parameter R to be identified a R c R w C c C w The quaternary code length is set to 15, and the value range is R. a ∈(0,0.1), R c ∈(0,0.01), R w ∈(0,0.1), C c ∈(100,1500), C w ∈(100,6000).
[0097] Step 1.2: Randomly generate 4 populations, each population has 40 quaternary code strings, each quaternary code string represents an individual, which is composed of the quaternary codes of 5 parameters to be identified in sequence.
[0098] Step 2: Calculate the initial population fitness value, which includes the following steps:
[0099] Step 2.1: Decimal conversion of parameters, the conversion method is as follows:
[0100]
[0101] In the formula, S is the actual decimal value of the parameter to be identified, T is the value directly converted from quaternary code to decimal, and U and L are the upper and lower limits of the range of values of the parameter to be identified, respectively.
[0102] Step 2.2: Calculate the fitness value of each individual according to formula (5).
[0103] Step 3: Multi-population genetic algorithm evolution, specifically including the following steps:
[0104] Step 3.1: Selection operation, performed within each population. Based on the fitness values obtained in Step 2.2, individuals are evaluated for quality; the top 10% of individuals directly enter the offspring generation, while the remaining 90% undergo crossover and mutation operations.
[0105] Step 3.2: Crossover and mutation operations are performed within each population. Crossover involves pairing the remaining individuals together. The crossover probabilities for the four populations are 0.9, 0.8, 0.7, and 0.6, respectively. The two individuals in each pair exchange a portion of their data; the position and length of the exchanged segments are randomized. Mutation operations are performed using p...m The probability of mutation is determined by randomly changing the value of a bit in the quaternary encoding string of an individual. Here, the mutation probabilities of the four populations are 0.01, 0.05, 0.1, and 0.2, respectively. Applying different crossover and mutation probabilities can make the differences between individuals in different populations greater, making it easier to achieve the goal of global search.
[0106] Step 3.3: Migration operation, carried out between populations. Calculate the fitness value of individuals and number the populations. Replace the worst individual in the next population with the best individual in the current population, and so on, until the best individual in the fourth population replaces the worst individual in the first population, thus completing the cycle.
[0107] Step 4: Selection and maintenance of elite population. The initial number of elite individuals is 0. When the number of elite individuals is less than 20, the best individuals from each population in Step 3 are directly accepted. When the number of elite individuals reaches 20, when accepting the best individual, if the fitness value of that individual is better than the worst individual in the elite population, a replacement operation is performed; otherwise, it is rejected.
[0108] Step 5: Use the particle swarm genetic algorithm to perform local optimization on the elite population, which includes the following steps:
[0109] Step 5.1: Use formula (6) to convert the parameters to be identified into decimal, and select the individual with the smallest fitness value as the historical best of the group, denoted as P. zbest The corresponding fitness value is f zbest Each individual is considered as having the best historical performance, denoted as P. gbest The corresponding fitness value is f gbest And initialize the speed.
[0110] Step 5.2: Calculate the speed of all individuals sequentially. The speed of the i-th individual in the (k+1)-th evolutionary process is:
[0111]
[0112] In the formula, α is the inertia coefficient, k+1 and k are the number of iterations. To ensure rapid convergence of the individual in the later stages, α is set to ws - (ws - we) × (k+1) ÷ 10, where ws and we are 0.9 and 0.4 respectively, c1 and c2 are constants, selected empirically, and are both taken as 1.5 here. r1 and r2 are random numbers in the interval [0,1], and P... igbest For the i-th individual to have the best historical performance, P zbest For the group optimal, Let represent the position of the i-th individual after the k-th evolution.
[0113] Speed exceeding limits is handled by ensuring that individuals can search more carefully within the parameter range. The maximum speed of an individual should not exceed 10% of the parameter range. If the speed exceeds the maximum value after evolution, the speed is set to the maximum speed.
[0114] Step 5.3: Calculate the position of all individuals sequentially. The position of the i-th individual after the (k+1)-th evolution is:
[0115]
[0116] In the formula, Let i be the position of the i-th individual after the (k+1)-th evolution. Let be the speed of the i-th individual in the (k+1)-th evolutionary process.
[0117] Individual out-of-bounds handling: If an individual's position after evolution exceeds the parameter range, failure to handle this will make the algorithm difficult to converge and worsen its performance. The following handling is performed:
[0118] if but if but This processing method allows individuals to continuously search and evolve within the set parameter range.
[0119] Step 5.4: Calculate the fitness value of each individual according to formula (5). The fitness value of the i-th individual is represented as f. i .
[0120] If f i <f zbesr This indicates that the trait of the i-th individual after evolution is better than the group's optimal trait. Therefore, the group's optimal trait, P, is updated. zbest =X i Otherwise, the group optimum remains unchanged.
[0121] If f i <f igbest This indicates that the evolved traits of the i-th individual are better than the historical best for that individual. Therefore, the optimal individual is updated, i.e., P. igbest =X i Otherwise, the individual's historical optimality remains unchanged.
[0122] Step 5.5: Convert the individual data into a quaternary encoded string. First, calculate the decimal value corresponding to the quaternary code. The calculation method is as follows:
[0123]
[0124] In the formula, [] represents the rounding operation, and the meanings of the other parameters are exactly the same as those in formula (6).
[0125] T is directly converted into a 15-bit quaternary code, and the quaternary codes of the parameters to be identified are combined in sequence to form the essence population.
[0126] Step 5.6: Perform mutation operation with a probability of 0.5. Refer to step 3.2 for the method. Use formula (6) to convert the parameter to decimal. Refer to step 5.4 to perform the update operation on the individual.
[0127] Step 5.7: Repeat steps 5.2-5.6 for 10 cycles, and output the best individual in the elite population.
[0128] Step 6: Determining the termination condition of the algorithm. Repeat steps 3-5, extracting the best individual from the elite population in each iteration. If the best individual remains unchanged for 10 consecutive generations, the algorithm ends and the best individual is output; otherwise, repeat steps 3-5.
[0129] The parameter values of the second-order RC model of the battery obtained through the above steps are: R a =0.01232Ω, R c =0.00273Ω, R w =0.01675Ω, C c =934.59F, C w =2705.3F. The optimal fitness value is: f zbest =4.19×10 -7 .
[0130] Based on the parameter values obtained above, and Figure 4 The battery terminal voltage is predicted based on the current values at various times. The error between the predicted voltage and the measured voltage is as follows: Figure 7 As shown. The mean absolute error is 4.35 × 10⁻⁶. -4 The error is in the millivolt range, and except for a few points, the error is basically less than 1 millivolt. This shows that the DNA-encoded multi-population particle swarm genetic algorithm has excellent identification effect on the battery equivalent circuit model.
[0131] Furthermore, it should be understood that after reading the above description of the present invention, those skilled in the art can make various alterations or modifications to the present invention, and these equivalent forms also fall within the scope defined by the appended claims.
Claims
1. A method for identifying equivalent circuit parameters of lithium batteries based on a multi-population particle swarm genetic algorithm encoded in DNA, characterized in that, The identification method includes the following steps: (1) Establish a well-defined equivalent circuit model for a lithium battery; (2) The dynamic current and voltage data of lithium batteries under different states of charge were obtained by using hybrid pulse power characteristic test; (3) The parameter identification process in the equivalent circuit model of lithium battery is optimized using a multi-population particle swarm genetic algorithm based on DNA encoding to obtain the optimal identification parameters. The specific steps include: (3-1) Initialization: determine the parameters R to be identified a , R c , R w , C c , C w The quaternary code length and value range; randomly generate M populations, each population has N quaternary code strings, each quaternary code string represents an individual, which is composed of quaternary codes of 5 parameters to be identified in order; (3-2) Calculation of initial population fitness values: Convert the parameters to be identified to decimal; calculate the fitness value of each individual according to the fitness function; (3-3) Multi-population genetic algorithm evolution: selection, mutation and crossover operations are performed within each population, and migration operations are carried out between populations; (3-4) Selection and maintenance of elite population: The best individuals from each population are accepted as elite population individuals, and the number of elite population individuals is controlled below a set value P. (3-5) Use particle swarm genetic algorithm to find local optimization for the elite population; (3-6) Determining the termination condition of the algorithm: In each iteration of steps (3-3) to (3-5), the best individual in the elite population is extracted. If the best individual can remain unchanged for the set number of generations, the algorithm ends and the best individual is output; otherwise, steps (3-3) to (3-5) are repeated. In step (3), the lithium battery equivalent circuit model obtains the estimated value of the battery terminal voltage at each moment under dynamic conditions by substituting the current parameter value and the dynamic current data at each moment in step (2); the fitness function in the multi-population particle swarm genetic algorithm is established based on the estimated value of the battery terminal voltage and the dynamic voltage data / measured voltage at the corresponding moment in step (2). In step (1), the parameters in the well-defined lithium battery equivalent circuit model include the battery's ohmic internal resistance R. a Electrochemical polarization internal resistance R c and concentration polarization internal resistance R w and electrochemical polarization capacitance C c and concentration polarization capacitance C w ; The well-defined equivalent circuit model of the lithium battery is as follows: IN M,k =U OC -IN c,k -IN w,k -AND k ·R a (1) In the formula, U M,k U is the estimated value of the battery terminal voltage at time k. OC U is the open-circuit voltage of the battery, and U is the voltage value at the initial moment in step (2). c,k and U w,k These are the terminal voltages of the two RC circuits at time k, I k U is the battery current value at time k, and U is the battery current value at time k in step (2). c,k and U w,k The calculation method is as follows: In the formula, Δt is the data sampling interval, τ1 and τ2 are the time constants of the two RC loops, and U C,k-1 and U w,k-1 These are the terminal voltages of the two RC circuits at time k-1; the calculation methods for τ1 and τ2 are shown below: τ1=R c ·C c τ2=R w ·C w (4)。 2. The method for identifying equivalent circuit parameters of lithium batteries based on a multi-population particle swarm genetic algorithm using DNA encoding according to claim 1, characterized in that, In step (2), the method for obtaining dynamic current and voltage data of lithium batteries under different states of charge using hybrid pulse power characteristic testing includes: (2-1) At 25°C, charge the battery at a constant current of 1C to 3.6V, then keep the voltage at 3.6V until the current decreases to 0.02C, and let it rest for 120 minutes. (2-2) Discharge the battery at a constant current rate of 1C, with a discharge capacity of 10% of the actual capacity, so that the battery state of charge is 0.9, and leave it for 120 minutes. (2-3) Discharge the battery at a constant current rate of 1C for 20 seconds, let it rest for 40 seconds, then charge the battery at a constant current rate of 1C for 20 seconds, and let it rest for 120 minutes. (2-4) Repeat steps (2-2) and (2-3) to test and record the battery charging and discharging current and voltage when the battery state of charge is 0.8 to 0.1, so as to obtain the dynamic current and voltage data of the lithium battery under different states of charge.
3. The method for identifying equivalent circuit parameters of lithium batteries based on a multi-population particle swarm genetic algorithm using DNA encoding according to claim 1, characterized in that, In step (3-2), the fitness function is: In the formula, U L,k U is the measured value of the voltage. M,k denoted as , where is the estimated value of the battery terminal voltage, f is the fitness function value (the smaller f is, the higher the fitting accuracy), and n is the number of voltage data points in each set.
4. The method for identifying equivalent circuit parameters of lithium batteries based on a multi-population particle swarm genetic algorithm using DNA encoding according to claim 1, characterized in that, In step (3-2), the method for converting the parameter to be identified to decimal is as follows: In the formula, S is the actual decimal value of the parameter to be identified, T is the value directly converted from quaternary code to decimal, X is the length of the quaternary code of the parameter to be identified, and U and L are the upper and lower limits of the range of values of the parameter to be identified, respectively.
5. The method for identifying equivalent circuit parameters of lithium batteries based on a multi-population particle swarm genetic algorithm using DNA encoding according to claim 1, characterized in that, In step (3-3), the evolutionary method of the multi-population genetic algorithm is as follows: (3-3-1) Selecting individuals within each population: Based on the fitness values obtained in step (3-2), evaluate the quality of individuals, and select the best individuals to directly enter the offspring, while the remaining individuals undergo crossover and mutation operations. (3-3-2) Perform crossover and mutation operations within each population: pair the remaining individuals together with p x The probability is p, and in each group of two individuals, a portion of a fragment is exchanged, with the position and length of the fragment being random; the mutation operation is based on p m The probability of randomly changing the value of a certain bit in an individual's quaternary encoding string; (3-3-3) Perform migration operations between populations: calculate the fitness value of individuals and number the populations; replace the worst individual in the next population with the best individual in the current population, and replace the worst individual in the first population with the best individual in the last population, and so on.
6. The method for identifying equivalent circuit parameters of lithium batteries based on a multi-population particle swarm genetic algorithm using DNA encoding according to claim 1, characterized in that, In step (3-4), the initial elite population is empty. When the number of individuals in the elite population is less than the set value P, the best individuals from each population in step (3-3) are directly received. When the number of individuals in the elite population reaches the set value P, if the fitness value of the best individual in the population is better than that of the worst individual in the elite population, a replacement operation is performed; otherwise, the individual is rejected.
7. The method for identifying equivalent circuit parameters of lithium batteries based on a multi-population particle swarm genetic algorithm using DNA encoding according to claim 1, characterized in that, In steps (3-5), the method of using particle swarm genetic algorithm to perform local optimization on the elite population includes: (3-5-1) Use formula (6) to convert the parameters to be identified into decimal, determine the group's historical best and the individual's historical best, and initialize the speed; (3-5-2) Calculate the speed of all individuals sequentially. The speed of the i-th individual in the (k+1)-th evolutionary process is: In the formula, α is the inertia coefficient, k+1 and k are the number of iterations, c1 and c2 are constants selected empirically, r1 and r2 are random numbers in the interval [0,1], and P... i For the individual optimality, P g For the group optimal, Let i be the position of the i-th individual after the k-th evolution; (3-5-3) Calculate the position of all individuals sequentially. The position of the i-th individual after the (k+1)-th evolution is: In the formula, Let i be the position of the i-th individual after the (k+1)-th evolution. Let be the velocity of the i-th individual in the (k+1)-th evolutionary process; (3-5-4) Calculate the fitness value of each individual according to formula (5): For each individual, first compare it with the population's optimal fitness value. If it is smaller, update the population's optimal fitness value and the population's historical best value. Otherwise, keep it unchanged. Then compare it with the individual's optimal fitness value. If it is smaller, update the individual's optimal fitness value and the individual's historical best value. Otherwise, keep it unchanged. (3-5-5) To convert an individual string into a quaternary encoded string, first calculate the decimal value corresponding to the quaternary encoding. The calculation method is as follows: In the formula, S is the actual decimal value of the parameter to be identified, T is the value directly converted from quaternary code to decimal, X is the length of the quaternary code of the parameter to be identified, and U and L are the upper and lower limits of the range of values of the parameter to be identified, respectively; [] represents the rounding operation, which directly converts T into X-bit quaternary code, and combines the quaternary codes of the parameter to be identified in turn to form N individuals; (3-5-6) Perform mutation operation with high probability. Refer to step (3-2) for the method. Use formula (6) to convert the parameters to be identified into decimal. Refer to step (3-5-4) to update the individual. (3-5-7) Repeat steps (3-5-2) to (3-5-6) until the set number of iterations is completed.
Citation Information
Patent Citations
Method for identifying parameters of equivalent circuit models of lithium batteries
CN103927440A
Extended Kalman filtering SOC estimation method based on combination with improved particle swarm optimization
CN113419177A