Lithium battery SOC (State of Charge) estimation method, device, equipment, medium and product
By combining a hybrid strategy of r-GA optimization algorithm and neural network training method, the initial parameters of the lithium battery SOC estimation model are optimized, gradient instability and local search dilemma are solved, and efficient and accurate SOC estimation is achieved.
Patent Information
- Application Number
- CN202510545700.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-07-18
AI Technical Summary
The existing SOC estimation method of lithium batteries causes gradient vanishing or gradient explosion due to improper initial parameter selection, unstable training process, affecting estimation accuracy, and local search methods are difficult to quickly find the global optimal solution.
A hybrid training strategy is adopted, combined with the global search capability of the r-genetic algorithm (r-GA) optimization algorithm, the initial parameters of the neural network model are optimized, and the neural network is constructed through historical lithium battery discharge characteristics, and the training efficiency and accuracy are improved in combination with local search.
Through the combination of global and local search, the training efficiency of neural networks is improved, the high accuracy and rapid convergence of SOC estimation are ensured, gradient instability is avoided, and the accuracy of SOC estimation is improved.
Smart Images

Figure CN120334749A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of State Of Charge (SOC) estimation of lithium batteries, and particularly to a method, device, equipment, medium and product for estimating the SOC of lithium batteries. Background Art
[0002] Electric vehicles, with their advantages of high energy efficiency and zero emissions, have become an important driving force for promoting the transformation of the low-carbon economy. Lithium-ion batteries, due to their excellent performance, have become the preferred power batteries. The Battery Management System (BMS) ensures the safe and stable operation of lithium-ion batteries through the estimation of battery states and control strategies. Accurate SOC estimation is crucial for the effectiveness of the BMS, directly affecting the driving range, safety and performance of electric vehicles.
[0003] Currently, data-driven methods are a hot research direction for lithium battery SOC estimation. Such methods have strong generality, can be flexibly adjusted to apply to different types of batteries, and can be migrated and adapted in different environments. Among them, Convolutional Neural Networks (CNN), due to its powerful feature extraction ability and good adaptability to non-linear problems, has become an important tool for SOC estimation. CNN uses parameters such as the discharge current, voltage, and temperature of the battery as inputs, and establishes a non-linear mapping relationship of SOC by learning historical data, so as to achieve high-precision estimation. However, the performance of CNN is often affected by the quality of training data and model design, and usually requires a large amount of historical data for learning and optimization.
[0004] Existing neural network-based SOC estimation methods often rely on randomly initialized network parameters, resulting in instability in the training process. Improper selection of initial weights may lead to problems such as gradient disappearance or gradient explosion, and more training time is required for adjustment. Therefore, the fluctuations in training results caused by unstable initial parameters affect the estimation accuracy of SOC.
[0005] In addition, existing neural network-based SOC estimation methods usually use the gradient information of the loss function to continuously adjust network parameters to approach the optimal solution, which can actually be regarded as a kind of local search. However, local search methods are prone to falling into local optima and have a slow convergence speed. A pure local search method may perform poorly when facing complex, non-linear problems and is difficult to quickly find the global optimal solution. Summary of the Invention
[0006] The purpose of this application is to provide a method, device, equipment, medium and product for estimating the state of charge (SOC) of a lithium battery, so as to solve the problems of low accuracy of SOC estimation and difficulty in quickly finding the global optimal solution.
[0007] To achieve the above object, this application provides the following solutions:
[0008] In the first aspect, this application provides a method for estimating the SOC of a lithium battery, including:
[0009] Based on a hybrid training strategy, using the global search ability of the r - Genetic Algorithm (GA) optimization algorithm to search for the initial parameters of the neural network model; the hybrid training strategy is a hybrid training strategy that combines the r - GA optimization algorithm and the neural network training method; the initial parameters include weights and biases; the neural network model is constructed based on the historical discharge characteristics of the lithium battery;
[0010] Load the initial parameters into the neural network model, and use the historical lithium battery discharge data to train the neural network model for local search to determine the trained neural network model;
[0011] Collect the lithium battery discharge data, and input the lithium battery discharge data into the trained neural network model to output the SOC prediction result; the lithium battery discharge data includes battery current, voltage and temperature.
[0012] In the second aspect, this application provides a device for estimating the SOC of a lithium battery, including:
[0013] An initial parameter search module, configured to search for the initial parameters of the neural network model based on a hybrid training strategy, using the global search ability of the r - GA optimization algorithm; the initial parameters include weights and biases; the neural network model is constructed based on the historical discharge characteristics of the lithium battery;
[0014] A neural network model training module, configured to load the initial parameters into the neural network model, and use the historical lithium battery discharge data to train the neural network model for local search to determine the trained neural network model;
[0015] An SOC prediction result output module, configured to collect the lithium battery discharge data, and input the lithium battery discharge data into the trained neural network model to output the SOC prediction result; the lithium battery discharge data includes battery current, voltage and temperature.
[0016] In the third aspect, this application provides a computer device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the method for estimating the SOC of a lithium battery as described in any one of the above.
[0017] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the lithium battery SOC estimation method described in any one of the above.
[0018] In a fifth aspect, the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the lithium battery SOC estimation method described in any one of the above.
[0019] According to the specific embodiments provided by the present application, the following technical effects are disclosed:
[0020] The present application proposes a hybrid training strategy that combines the r-GA optimization algorithm and the neural network training method, which solves problems such as gradient disappearance and gradient explosion caused by improper selection of initial parameters in the SOC estimation method based on neural networks. By using the global search ability of r-GA to optimize the initial parameters of the neural network, the instability caused by random initialization is avoided, and the rationality of the initial parameters is ensured. Through this hybrid optimization strategy, the training efficiency and accuracy of the neural network in SOC estimation are improved.
[0021] In addition, through the global search ability of the r-GA optimization algorithm, the present application avoids the dilemma that the neural network training is prone to falling into local optimal solutions, overcomes the limitations of simple local search. Subsequently, based on the initial parameters of the searched neural network model, the neural network is trained for local search, which speeds up the convergence rate and ensures the effective learning of the network in complex non-linear problems.
[0022] The present application effectively combines the advantages of global search and local search, not only improving the training efficiency of the neural network, but also being able to find the global optimal solution faster, ensuring the high accuracy of the SOC estimation model. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0024] Figure 1 It is a flowchart of the lithium battery SOC estimation method provided by the present application;
[0025] Figure 2 It is a schematic diagram of the CNN model structure provided by the present application;
[0026] Figure 3Flowchart of the hybrid training strategy provided by this application. Detailed implementation manners
[0027] The following will clearly and completely describe the technical solutions in the embodiments of this application with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part rather than all of the embodiments of this application. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.
[0028] To make the above objects, features, and advantages of this application more obvious and understandable, the following further details this application in conjunction with the accompanying drawings and specific implementation manners.
[0029] The embodiment of this application provides a method for estimating the state of charge (SOC) of a lithium battery. This method is executed by a computer device, specifically, it can be executed alone by a computer device such as a terminal or a server, or jointly executed by a terminal and a server. In the embodiment of this application, as Figure 1 shown, this method includes the following steps.
[0030] S1: Based on the hybrid training strategy, utilize the global search ability of the r-GA optimization algorithm to search for the initial parameters of the neural network model; the hybrid training strategy is a hybrid training strategy that combines the r-GA optimization algorithm and the neural network training method; the initial parameters include weights and biases; the neural network model is constructed based on the historical discharge characteristics of lithium batteries.
[0031] S2: Load the initial parameters into the neural network model, and use the historical lithium battery discharge data to train the neural network model for local search to determine the trained neural network model.
[0032] S3: Collect lithium battery discharge data, and input the lithium battery discharge data into the trained neural network model to output the SOC prediction result; the lithium battery discharge data includes battery current, voltage, and temperature.
[0033] In an exemplary embodiment, first, the collected historical lithium battery discharge data is divided into a training set, a validation set, and a test set, and 10% of the data is separated from the validation set as the environmental screening data set.
[0034] Then, a neural network model is constructed. Due to its powerful feature extraction ability and good adaptability to nonlinear problems, the CNN model has become an effective SOC estimation tool. In this embodiment, the CNN model constructed in this application is as Figure 2 shown, and it includes 3 convolutional layers and 2 fully connected layers.
[0035] The neural network hybrid training strategy provided by this application is also applicable to other neural network models, including artificial neural networks, recurrent neural networks, long short-term memory networks, gated recurrent unit networks, etc.
[0036] In an exemplary embodiment, for the constructed CNN model, this application combines the r-GA optimization algorithm and the neural network training method to provide a hybrid training strategy to improve the training efficiency and performance of the model. The following will detail the improvement principle of r-GA and the specific process of optimizing the neural network parameters by the hybrid training strategy.
[0037] The core of the genetic algorithm is that old individuals can generate new individuals through crossover and mutation. Therefore, the global search ability of the genetic algorithm is closely related to the number of individuals in the population. If there are too few individuals in the population, it will lead to insufficient population diversity and may miss the optimal solution; if there are too many individuals in the population, it will increase a large amount of computational cost and reduce the search efficiency.
[0038] The r-selection strategy is a theory in ecology that describes the reproductive strategies of biological populations and is part of the r / K selection theory.
[0039] The r-selection strategy emphasizes ensuring the survival of the population through high reproductive rates and rapid adaptation in high-mortality or unstable environments. This strategy is widely present in nature, especially in insects, certain plants, and fish.
[0040] In this application, in the genetic algorithm, drawing on the principles of the r-selection strategy, the improved r-GA optimization algorithm is obtained by adding steps of overproduction, environmental screening, and microevolution.
[0041] As Figure 3 shown, using the parameters (weights and biases) of the CNN as individuals and the loss functions of different datasets as the environmental selection function and fitness function to optimize the initial parameters of the CNN model. S1 can be replaced by the following steps.
[0042] S11: Take the neural network model parameters as individuals and initialize the population; the population includes multiple individuals; the neural network model parameters include weights and biases.
[0043] S12: Conduct environmental selection on the initialized population to determine the screened population.
[0044] S13: Introduce an individual fitness function to measure the ability of individuals in the screened population to adapt to the environment. All individuals in the screened population undergo microevolution, and the fitness of the evolved individuals is calculated.
[0045] S14: Select parents for reproduction from the evolved individuals according to the fitness of the evolved individuals.
[0046] S15: Recombine the selected parents to generate new individuals.
[0047] S16: Mutate the genes of the new individuals to generate mutated individuals.
[0048] S17: Generate a new population based on the mutated individuals, and use the new population as the initialized population, then return to step S12 until the stop condition is reached, and output the currently mutated individual as the optimal individual.
[0049] S18: Use the optimal individual as the initial parameters of the neural network model.
[0050] In an exemplary embodiment, S11 can be replaced by the following steps.
[0051] Initialize the population: The individuals in the population can be represented as a set:
[0052]
[0053] where, P (0) is the initial population, represents the i-th individual in the initial population, i = 1, 2,..., N, corresponding to a CNN parameter initialization scheme, and N represents the population size, that is, there are N different CNN parameter initialization configurations in total.
[0054] In an exemplary embodiment, due to over-reproduction, the number of individuals in each generation of the population is huge. If direct fitness evaluation, reproduction and other operations are carried out, it will increase the huge computational cost. Therefore, mimicking the environmental pressures (living environment, natural enemies) faced by organisms in nature, an environmental selection function is introduced to screen the population individuals, so as to screen out most individuals with a small computational cost and only retain high-quality individuals for fitness evaluation, reproduction and other operations. This is the process of natural selection. Survival pressure and natural enemies will eliminate most offspring, and only the individuals most adapted to the environment can survive and participate in the reproduction competition. This improvement greatly improves the probability of finding the global optimal parameters of the CNN model while increasing a small amount of computational cost. S12 can be replaced by the following steps.
[0055] S121: Divide the historical lithium battery discharge data into a training set, a validation set and a test set, and use a set number of historical lithium battery discharge data in the validation set as the environmental screening data set.
[0056] S122: Use the loss function of the environmental screening data set on the neural network model as the environmental selection function; the environmental selection function is: where, is the environmental selection function value of the individual ; Loss tinyis the loss function of the environmental screening dataset on the neural network model; M is the number of samples in the environmental screening dataset; y j is the true label of the j-th sample; is the predicted value of the j-th sample.
[0057] S123: According to the environmental selection function, sort the individuals in the initialized population in ascending order, select the top k individuals, and generate the screened population.
[0058] In practical applications, load the individuals (t) in the population P into the constructed CNN model, and use the loss function Loss tiny of the environmental screening dataset on this model as the environmental selection function, so as to select high-quality individuals at a small computational cost. That is, the environmental selection function of the individual can be calculated by the following formula:
[0059]
[0060] The smaller the value, the better the individual .
[0061] Sort the individuals according to the environmental selection function value , and select the top k individuals. The selection can be expressed as:
[0062] S (t) = top-k{P (t)}
[0063] where S (t) is the population after screening, and P (t) is the current population.
[0064] In an exemplary embodiment, perform a small evolution on the individuals in S (t) , that is, micro-evolution, and S13 can be replaced by the following steps.
[0065] S131: Introduce the individual fitness function to measure the fitness of the individuals in the screened population; where is the fitness of the individual ; Fitness() is the fitness function; Loss val is the loss function of the validation dataset on the neural network model; V is the number of samples in the validation set.
[0066] S132: Update the individual using the gradient descent method according to the fitness of the individual, perform microevolution on all individuals in the selected population, and determine the evolved individual.
[0067] In practical applications, first, introduce an individual fitness function to measure the ability of individuals in population S (t) to adapt to the environment, that is, evaluate the impact of the parameter combination corresponding to the individual on the performance of the neural network. Since the parameter evolution process of the r-GA algorithm is similar to the parameter update process during the training of the neural network, a fitness function is designed based on the loss function of the neural network, and the value of the loss function is quantified to measure the quality of the individual, that is
[0068]
[0069] Load the individual into the constructed CNN model, and use the test set loss function as the fitness function. V is the number of samples in the validation set. It should be noted that, different from conventional problems, in this paper, the smaller the fitness, the better the individual performance.
[0070] Next, considering that for an individual with poor performance, some of its genes may be close to excellent genes, that is, some of the parameters in the individual may be excellent. Therefore, directly discarding individuals with poor performance may miss excellent parameters in its vicinity. Thus, referring to the characteristic that organisms will slowly change their characteristics from generation to generation to adapt to the surrounding environmental pressure, a method for microevolution of individual parameters based on the gradient descent method is proposed, and the parameters in the individual are updated through one or more iterations, that is
[0071]
[0072] represents the evolved individual, represents the gradient of the fitness function at the individual location, and η is the learning rate, which is used to control the step size of the update.
[0073] S133: Calculate the fitness of the evolved individual using the individual fitness function.
[0074] Evaluate the fitness of the individuals after environmental selection and evolution: Among them, is the fitness of the evolved individual.
[0075] In an exemplary embodiment, S14 can be replaced by the following steps.
[0076] S141: According to the fitness of the evolved individual, use Determine the probability that the evolved individual is selected as a parent; For the evolved individual The probability of being selected as a parent; Is the fitness of the evolved individual.
[0077] In this embodiment, the selection probability Is inversely proportional to the fitness And is inversely proportional.
[0078] S142: Select parents from the evolved individuals for reproduction according to the probability of being selected as a parent.
[0079] In an exemplary embodiment, the selected individuals are used as parents, introducing the idea of overproduction to increase the reproduction rate and mutation rate, ensuring that a large number of individuals are generated in each generation, increasing the diversity of the population, and covering a wider search space. This strategy overcomes the defect of local search, helps the CNN model to jump out of the local optimum, obtain better initial parameters, and thus improve the accuracy and robustness of SOC estimation. Following the r-selection strategy, a large number of individuals are generated through genetic recombination. S15 can be replaced by the following steps.
[0080] S151: Use To perform genetic recombination on the selected parents to generate new individuals; where x new Is the new individual, that is, the new individual generated after genetic recombination of the selected individuals; Crossover() represents the crossover of the parameters of the parent individuals.
[0081] In practical applications, the individuals generated after mutation form a new generation population, and S12 - S17 are repeated iteratively until the stop condition is reached, and the current optimal individual is output as the initial parameter of the CNN model. This method avoids the problems caused by improper selection of the initial parameters of the CNN model and helps to obtain more stable and accurate SOC estimation results.
[0082] This application combines the r-GA optimization algorithm and the neural network training method to propose a hybrid training strategy for neural networks for accurate estimation of the state of charge (SOC) of lithium batteries. First, a suitable neural network model is constructed, taking parameters such as the current, voltage, and temperature of the battery as inputs to learn the non-linear mapping relationship between them and the SOC. In the training stage, an improved r-selection genetic algorithm (r-GA) is proposed. Using the idea of r-selection, the genetic algorithm (GA) is improved by adding steps of overproduction, environmental screening, and microevolution to obtain a broader search space and stronger optimization ability. During training, first use r-GA to globally search for the optimal weights and biases of the neural network, and then perform local search through the training network, thereby improving the training efficiency and performance of the neural network. In the online application stage of SOC estimation, signals such as battery current, voltage, and temperature are sampled in real time, and the data is normalized. Subsequently, the data is input into the trained neural network model to obtain a high-precision prediction result of the SOC.
[0083] In an exemplary embodiment, after obtaining the optimized initial parameters, the training of the CNN model, S2 can be replaced by the following steps.
[0084] S21: Collect signals such as battery current, voltage, and temperature, and perform normalized preprocessing on the data.
[0085] S22: Load the initial parameters obtained in S1 into the CNN model, then input the processed data into the CNN model, calculate the SOC prediction value through forward propagation, and calculate the error between the prediction value and the true value using the loss function.
[0086] S23: Use the backpropagation algorithm to calculate the gradient, and update the network weights and biases in combination with the optimization algorithm to minimize the loss function. This process continues until the training error converges or meets the set accuracy requirements, thereby obtaining the final SOC estimation model, that is, the trained neural network model.
[0087] In an exemplary embodiment, S3 can be replaced by the following steps.
[0088] S31: During prediction, first sample signals such as the current, voltage, and temperature of the battery in real time.
[0089] S32: Normalize the collected data to eliminate the dimensional differences between different physical quantities and construct a data format suitable for the input of the CNN.
[0090] S33: Input the preprocessed data into the trained CNN model. The model extracts features through multiple layers of convolution and combines fully connected layers for non-linear mapping, and finally outputs the SOC prediction result.
[0091] This application first uses the r-GA optimization algorithm to search for the initial parameters of the CNN, replacing the traditional method of initializing the neural network parameters, which ensures the rationality of the initial parameters. Then, the initial parameters obtained by the r-GA optimization algorithm are used as the initial parameters of the neural network for training, thereby avoiding the instability caused by random initialization. This application effectively combines the advantages of global search and local search, not only improving the training efficiency of the neural network, but also being able to find the global optimal solution faster, ensuring the high accuracy of the final SOC estimation model and improving the SOC estimation accuracy.
[0092] Based on the same inventive concept, the embodiments of this application also provide a lithium battery SOC estimation device for implementing the lithium battery SOC estimation method involved above. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the lithium battery SOC estimation device provided below can refer to the limitations on the lithium battery SOC estimation method in the above text and will not be repeated here.
[0093] In an exemplary embodiment, a lithium battery SOC estimation device is provided, including:
[0094] An initial parameter search module, configured to search for the initial parameters of the neural network model based on a hybrid training strategy and using the global search ability of the r-GA optimization algorithm; the initial parameters include weights and biases; the neural network model is constructed based on the historical lithium battery discharge characteristics.
[0095] A neural network model training module, configured to load the initial parameters into the neural network model and perform local search by training the neural network with historical lithium battery discharge data to determine the trained neural network model.
[0096] An SOC prediction result output module, configured to collect lithium battery discharge data and input the lithium battery discharge data into the trained neural network model to output an SOC prediction result; the lithium battery discharge data includes battery current, voltage, and temperature.
[0097] In an exemplary embodiment, a computer device is provided, which may be a server or a terminal. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store lithium battery SOC estimation data. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with an external terminal through a network connection. The computer program, when executed by the processor, implements a method for estimating the SOC of a lithium battery.
[0098] In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the above method is implemented.
[0099] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the above method is implemented.
[0100] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the above method is implemented.
[0101] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAMs), magnetoresistive random access memories (MRAMs), ferroelectric random access memories (FRAMs), phase change memories (PCMs), graphene memories, etc. Volatile memories can include random access memories (RAMs) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0102] In this application, all actions of obtaining signals, information, or data are carried out on the premise of complying with the corresponding data protection regulations and policies of the country where the location is located and obtaining authorization from the owner of the corresponding device.
[0103] The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logics, data processing logics based on quantum computing, etc., without limitation.
[0104] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope described in this specification.
[0105] In this text, specific examples are used to elaborate on the principles and implementation manners of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application. At the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation on this application.
Claims
1. A method for estimating the state of charge (SOC) of a lithium battery, characterized in that, The method for estimating the SOC of the lithium battery includes: Based on a hybrid training strategy, using the global search ability of the r-GA optimization algorithm to search for the initial parameters of the neural network model; the hybrid training strategy is a hybrid training strategy that combines the r-GA optimization algorithm and the neural network training method; the initial parameters include weights and biases; the neural network model is constructed based on the historical discharge characteristics of the lithium battery; Load the initial parameters into the neural network model, and use the historical lithium battery discharge data to train the neural network model for local search to determine the trained neural network model; Collect the lithium battery discharge data, and input the lithium battery discharge data into the trained neural network model to output the SOC prediction result; the lithium battery discharge data includes battery current, voltage, and temperature.
2. The method for estimating the SOC of a lithium battery according to claim 1, wherein Using the global search ability of the r-GA optimization algorithm to search for the initial parameters of the neural network model specifically includes: Taking the neural network model parameters as individuals, initialize the population; the population includes multiple individuals; the neural network model parameters include weights and biases; Perform environmental selection on the initialized population to determine the selected population; Introduce an individual fitness function to measure the ability of individuals in the selected population to adapt to the environment, perform micro-evolution on all individuals in the selected population, and calculate the fitness of the evolved individuals; According to the fitness of the evolved individuals, select parents from the evolved individuals for reproduction; Perform genetic recombination on the selected parents to generate new individuals; Mutate the genes of the new individuals to generate mutated individuals; According to the mutated individuals, generate a new population, and use the new population as the initialized population, and return to the step "Perform environmental selection on the initialized population to determine the selected population" until the stop condition is reached, and output the currently mutated individual as the optimal individual; Use the optimal individual as the initial parameters of the neural network model.
3. The method for estimating the SOC of a lithium battery according to claim 2, wherein Performing environmental selection on the initialized population to determine the selected population specifically includes: Divide the historical lithium battery discharge data into a training set, a validation set, and a test set, and use a set number of historical lithium battery discharge data in the validation set as the environmental screening data set; Take the loss function of the environmental screening dataset on the neural network model as the environmental selection function; the environmental selection function is: Where is the environmental selection function value of individual ; Loss tiny is the loss function of the environmental screening dataset on the neural network model; M is the number of samples in the environmental screening dataset; y j is the true label of the j-th sample; is the predicted value of the j-th sample; According to the environmental selection function, sort the individuals in the initialized population in ascending order, select the top k individuals to generate the selected population.
4. The method for estimating the state of charge (SOC) of a lithium battery according to claim 3, wherein, Introduce an individual fitness function to measure the ability of individuals in the selected population to adapt to the environment, perform micro-evolution on all individuals in the selected population, and calculate the fitness of the evolved individuals specifically includes: Introduce an individual fitness function Measure the fitness of individuals in the screened population; where is the individual 's fitness; Fitness() is the fitness function; Loss val is the loss function of the validation dataset on the neural network model; V is the number of samples in the validation set; According to the fitness of the individuals, use the gradient descent method to update the individuals, perform micro-evolution on all individuals in the selected population to determine the evolved individuals; Use the individual fitness function to calculate the fitness of the evolved individuals.
5. The method for estimating the SOC of a lithium battery according to claim 4, wherein According to the fitness of the evolved individuals, select parents from the evolved individuals for reproduction specifically includes: According to the evolved individual fitness, use to determine the probability that the evolved individual is selected as a parent; For the evolved individual the probability of being selected as a parent; is the evolved individual fitness; Select parents from the evolved individuals for reproduction according to the probability of being selected as parents.
6. The method for estimating the SOC of a lithium battery according to claim 5, characterized in that, Performing genetic recombination on the selected parents to generate new individuals specifically includes: Utilize Perform genetic recombination on the selected parents to generate new individuals; where x new is the new individual; Crossover() represents performing crossover on the parameters of the parent individuals.
7. A lithium battery SOC estimation device, characterized in that, The lithium battery SOC estimation device includes: An initial parameter search module, which is used to search for the initial parameters of the neural network model based on the hybrid training strategy and by utilizing the global search ability of the r-GA optimization algorithm; the initial parameters include weights and biases; the neural network model is constructed based on the historical lithium battery discharge characteristics; A neural network model training module, which is used to load the initial parameters into the neural network model, train the neural network model using the historical lithium battery discharge data for local search, and determine the trained neural network model; An SOC prediction result output module, which is used to collect the lithium battery discharge data, input the lithium battery discharge data into the trained neural network model, and output the SOC prediction result; the lithium battery discharge data includes battery current, voltage, and temperature.
8. A computer device, comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the lithium battery SOC estimation method according to any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the lithium battery SOC estimation method according to any one of claims 1-6.
10. A computer program product comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the lithium battery SOC estimation method according to any one of claims 1-6.