Energy storage battery health state prediction method, device, equipment and medium

By introducing genetic algorithms to optimize hyperparameter combinations in the Transformer model, the problem of accuracy and applicability of health status prediction methods in the prior art and the problem of easy local optimality of the model is achieved, and higher prediction accuracy and generalization capabilities are achieved.

CN119644177AInactive Publication Date: 2025-03-18CHINA YANGTZE POWER +1

Patent Information

Application Number
CN202411632072.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-03-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, traditional health status prediction methods have limitations in accuracy and applicability. The parameter tuning of the Transformer model is complex and the calculation amount is large, which can easily lead to the model falling into local optimization.

Method used

Genetic algorithm is used to optimize the hyperparameter combination of the Transformer model, and the initial hyperparameter combination is randomly generated, iteratively trained, and the selection, crossover and mutation operations are performed, the population is updated until the iteration termination condition is met, and the optimal hyperparameter combination is obtained.

Benefits of technology

It significantly improves the accuracy and generalization ability of health status prediction, avoids the model from falling into local optimization, and enables the Transformer model to achieve the best prediction effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119644177A_ABST
    Figure CN119644177A_ABST
Patent Text Reader

Abstract

The invention discloses an energy storage battery health state prediction method, device and equipment and a medium, and the method comprises the steps: collecting operation data of a target battery, carrying out the preprocessing of the operation data, obtaining battery data, and dividing the battery data into a training set and a test set; establishing a Transform model to perform health state prediction on the target battery; a genetic algorithm is adopted, and an optimal hyper-parameter combination of the Transform model is determined; according to the optimal hyper-parameter combination, using the training set to train a Transform model; and inputting the test set into the trained Transform model to carry out health state prediction so as to obtain a health state prediction value of the target battery. According to the method, the prediction precision can be improved, the complexity of model training is reduced, and the accuracy of health state prediction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of battery status prediction, and in particular to a method, device, equipment and medium for predicting the health status of an energy storage battery based on a genetic algorithm optimized Transformer model. Background Art

[0002] Lithium-ion batteries are core energy storage devices widely used in electric vehicles and renewable energy storage. As the usage time increases, their performance will gradually decline. Therefore, accurate prediction of the battery's state of health (SOH) plays a key role in ensuring the long-term stable operation of the battery system.

[0003] In the existing technology, traditional health status prediction methods, such as Kalman filtering or machine learning methods based on equivalent circuit models, have certain limitations in accuracy and applicability. In recent years, deep learning technology has performed well in sequence data processing, especially the Transformer model, which has been widely used in time series prediction tasks because of its self-attention mechanism's ability to capture long-term dependencies. However, the current parameter tuning process of the Transformer model is complex and computationally intensive, which can easily cause the model to fall into a local optimum. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides a method, device, equipment and medium for predicting the health status of a storage battery, which can improve the prediction accuracy while reducing the complexity of model training, thereby improving the accuracy of health status prediction.

[0005] An embodiment of the present invention provides a method for predicting the health status of an energy storage battery, comprising:

[0006] Collecting and preprocessing the operating data of the target battery to obtain battery data, wherein the battery data is divided into a training set and a test set;

[0007] Establishing a Transformer model to predict the health status of the target battery;

[0008] Using a genetic algorithm, determining an optimal hyperparameter combination of the Transformer model;

[0009] According to the optimal hyperparameter combination, training the Transformer model using the training set;

[0010] The test set is input into the trained Transformer model to perform health state prediction, and the health state prediction value of the target battery is obtained.

[0011] As an improvement of the above solution, the genetic algorithm is used to determine the optimal hyperparameter combination of the Transformer model, including:

[0012] Randomly generate a set of initial hyperparameter combinations of the Transformer model to form an initial population, where each initial hyperparameter combination is an individual in the initial population;

[0013] Calculating the fitness of each individual in the initial population according to a preset fitness function;

[0014] Based on the initial population, iterative training is performed until the iteration termination condition is met to obtain the final population; in each round of iteration, according to the fitness of individuals in the current population obtained in the previous round of iteration, the individuals in the current population are selected, crossed and mutated to update the population, and the fitness of individuals in the updated population is calculated;

[0015] According to the fitness of the individuals in the final population, an optimal hyperparameter combination of the Transformer model in the final population is obtained.

[0016] As an improvement of the above scheme, the selection, crossover and mutation operations are performed on the individuals in the current population to update the population, and the fitness of the individuals in the updated population is calculated, including:

[0017] According to the fitness of each individual in the current population, a roulette wheel or tournament selection method is used to select individuals with better performance to obtain a first population;

[0018] Perform a crossover operation on the individuals in the first population to generate a new hyperparameter combination to obtain a second population;

[0019] Selecting some individuals from the second population with a preset probability for random mutation to obtain a third population, i.e., an updated population;

[0020] The Transformer model is trained according to each individual in the updated population, and the fitness of each individual in the updated population is calculated using a preset fitness function according to the training result.

[0021] As an improvement of the above solution, the operating data includes at least one of the terminal voltage, operating current, temperature parameter, and historical health status value of the battery;

[0022] The optimal hyperparameter combination includes at least one of a learning rate, a batch size, a model depth, and a number of attention heads.

[0023] As an improvement of the above solution, the Transformer model includes an encoder and a decoder;

[0024] The encoder is used to extract features of the battery data;

[0025] The decoder is used to generate a health state prediction value of the battery according to the characteristics and the historical health state prediction value.

[0026] As an improvement of the above solution, after obtaining the health status prediction value of the target battery, the method further includes:

[0027] The health status prediction value is evaluated for accuracy using preset indicators to verify the effectiveness of the Transformer model based on the evaluation results.

[0028] The embodiment of the present invention also provides a device for predicting the health status of an energy storage battery, comprising:

[0029] A data acquisition module, used to collect operating data of a target battery and perform preprocessing to obtain battery data, wherein the battery data is divided into a training set and a test set;

[0030] A model building module, used to build a Transformer model to predict the health status of the target battery;

[0031] A genetic algorithm module, used to determine the optimal hyperparameter combination of the Transformer model using a genetic algorithm;

[0032] A model training module, used for training the Transformer model using the training set according to the optimal hyperparameter combination;

[0033] The state prediction module is used to input the test set into the trained Transformer model to perform health state prediction and obtain the health state prediction value of the target battery.

[0034] Furthermore, the genetic algorithm module is specifically used for:

[0035] Randomly generate a set of initial hyperparameter combinations of the Transformer model to form an initial population, where each initial hyperparameter combination is an individual in the initial population;

[0036] Calculating the fitness of each individual in the initial population according to a preset fitness function;

[0037] Based on the initial population, iterative training is performed until the iteration termination condition is met to obtain the final population; in each round of iteration, according to the fitness of individuals in the current population obtained in the previous round of iteration, the individuals in the current population are selected, crossed and mutated to update the population, and the fitness of individuals in the updated population is calculated;

[0038] According to the fitness of the individuals in the final population, an optimal hyperparameter combination of the Transformer model in the final population is obtained.

[0039] An embodiment of the present invention also provides a computer device, including a processor and a memory, wherein a computer program is stored in the memory, and the computer program is configured to be executed by the processor, and when the processor executes the computer program, the method for predicting the health status of a storage battery described in any one of the above is implemented.

[0040] An embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any of the above-mentioned methods for predicting the health status of energy storage batteries.

[0041] Compared with the prior art, the beneficial effects of the energy storage battery health status prediction method, device, equipment and medium provided by the embodiment of the present invention are: by introducing the global optimization capability of the genetic algorithm, the hyperparameter combination of the Transformer model is optimized, the prediction error is reduced, and the accuracy and generalization ability of the health status prediction are significantly improved; at the same time, the global search and fast convergence characteristics of the genetic algorithm can be used to avoid the model from falling into the local optimum, so that the Transformer model can achieve the best prediction effect. The model adopted by the embodiment of the present invention can maintain a high prediction performance under different battery operating conditions, and can reduce the complexity of model training while improving the prediction accuracy, thereby improving the accuracy of battery health status prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a flow chart of a method for predicting the health status of an energy storage battery provided by an embodiment of the present invention;

[0043] Figure 2 is a structural diagram of a Transformer model provided by an embodiment of the present invention;

[0044] Figure 3 It is a flow chart of a method for predicting the health status of an energy storage battery provided by an embodiment of the present invention;

[0045] Figure 4 is a prediction result diagram of a method for predicting the health status of an energy storage battery provided by an embodiment of the present invention;

[0046] Figure 5 It is an index comparison diagram of the prediction results of a method for predicting the health status of an energy storage battery provided by an embodiment of the present invention and an existing method;

[0047] Figure 6 It is a structural schematic diagram of a device for predicting the health status of an energy storage battery provided by an embodiment of the present invention;

[0048] Figure 7 It is a structural schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0050] See also Figure 1 , Figure 1 The figure is a flow chart of a method for predicting the health status of an energy storage battery provided by an embodiment of the present invention. The method for predicting the health status of an energy storage battery comprises:

[0051] S1: collecting and preprocessing the operating data of the target battery to obtain battery data, wherein the battery data is divided into a training set and a test set;

[0052] Specifically, based on the working characteristics of the battery, the operating data of the target battery is collected, including voltage, battery, temperature and historical SOH value (i.e., historical health status value); further, the collected operating data is standardized to obtain battery data, and the battery data is divided into a training set and a test set.

[0053] The battery voltage, current and temperature are used as inputs of the Transformer model, and the historical SOH value corresponding to each charge and discharge cycle is used as the target variable for subsequent model training and prediction.

[0054] S2: Establishing a Transformer model to predict the health status of the target battery;

[0055] As one of the optional embodiments, the Transformer model includes an encoder and a decoder;

[0056] The encoder is used to extract features of the battery data;

[0057] The decoder is used to generate a health state prediction value of the battery according to the characteristics and the historical health state prediction value.

[0058] Specifically, a Transformer model with a self-attention mechanism is used to process the battery time series data (i.e., battery data). The multi-head self-attention mechanism in the model generates a high-precision SOH prediction value by capturing the long-term dependencies in the input sequence. During the prediction process, the Transformer model infers the future changes in SOH values ​​through the historical patterns of time series data.

[0059] See also Figure 2 , Figure 2 It is a structural diagram of a Transformer model provided by an embodiment of the present invention. The Transformer model adopts an encoder-decoder structure, the encoder is used to extract the features of the input data, and the decoder is used to generate prediction results. The input battery data first passes through the input embedding layer and the position encoding layer, and then enters the encoder layer for encoding to obtain the output of the encoder; the historical SOH prediction value is right-shifted and used as the input of the decoder. Similarly, it first passes through the input embedding layer and the position encoding layer, and then is input into the decoder to obtain the output result of the decoder. The output result passes through the feedforward fully connected layer to generate the corresponding SOH prediction value (i.e., health status prediction value).

[0060] S3: Using a genetic algorithm to determine the optimal hyperparameter combination of the Transformer model;

[0061] As one of the optional embodiments, the adopting a genetic algorithm to determine the optimal hyperparameter combination of the Transformer model includes:

[0062] Randomly generate a set of initial hyperparameter combinations of the Transformer model to form an initial population, where each initial hyperparameter combination is an individual in the initial population;

[0063] Calculating the fitness of each individual in the initial population according to a preset fitness function;

[0064] Based on the initial population, iterative training is performed until the iteration termination condition is met to obtain the final population; in each round of iteration, according to the fitness of individuals in the current population obtained in the previous round of iteration, the individuals in the current population are selected, crossed and mutated to update the population, and the fitness of individuals in the updated population is calculated;

[0065] According to the fitness of the individuals in the final population, an optimal hyperparameter combination of the Transformer model in the final population is obtained.

[0066] As one of the optional embodiments, the selecting, crossover and mutation operations are performed on the individuals in the current population to update the population, and the fitness of the individuals in the updated population is calculated, including:

[0067] According to the fitness of each individual in the current population, a roulette wheel or tournament selection method is used to select individuals with better performance to obtain a first population;

[0068] Perform a crossover operation on the individuals in the first population to generate a new hyperparameter combination to obtain a second population;

[0069] Selecting some individuals from the second population with a preset probability for random mutation to obtain a third population, i.e., an updated population;

[0070] The Transformer model is trained according to each individual in the updated population, and the fitness of each individual in the updated population is calculated using a preset fitness function according to the training result.

[0071] See also Figure 3 , Figure 3 It is a flow chart of a method for predicting the health status of an energy storage battery provided by an embodiment of the present invention. First, the population is initialized, and a set of initial hyperparameter combinations of the Transformer model are randomly generated to form an initial population; the Transformer model is trained for each individual in the population (i.e., each initial hyperparameter combination), and the fitness of each individual is evaluated based on the SOH prediction accuracy on the validation set. Specifically, the fitness of each individual is calculated based on a preset fitness function, and the fitness is used to evaluate the quality of the individual (hyperparameter combination).

[0072] Furthermore, strategies such as roulette or tournament selection are used to select individuals with better performance to enter the next generation; the selected individuals are crossovered to generate new hyperparameter combinations, which simulates the gene recombination process; then the individual genes are mutated, and the hyperparameters of some individuals are randomly mutated with a low probability to increase the diversity of the population and avoid falling into the local optimum. Repeat the above selection, crossover, mutation, and fitness evaluation operations for iterative optimization until the predetermined number of iterations is reached or the fitness is no longer significantly improved, and the optimal individual in the current population, that is, the optimal hyperparameter combination, is output.

[0073] S4: training the Transformer model using the training set according to the optimal hyperparameter combination;

[0074] Specifically, the Transformer model is trained according to the optimal hyperparameter combination. First, the parameters of the Transformer model are initialized, and the model is trained according to the optimal hyperparameter values. In each round of training, the prediction error under the current parameters of the model is calculated, and then the network weights of the model are updated according to the error until the end condition is met, and a trained Transformer model is obtained.

[0075] S5: Input the test set into the trained Transformer model to perform health state prediction, and obtain the health state prediction value of the target battery.

[0076] As one of the optional embodiments, the operating data includes at least one of the terminal voltage, operating current, temperature parameter, and historical health status value of the battery;

[0077] The optimal hyperparameter combination includes at least one of a learning rate, a batch size, a model depth, and a number of attention heads.

[0078] As one of the optional embodiments, after obtaining the health status prediction value of the target battery, the method further includes:

[0079] The health status prediction value is evaluated for accuracy using preset indicators to verify the effectiveness of the Transformer model based on the evaluation results.

[0080] Specifically, after obtaining the prediction results of the target battery, an error analysis is performed on the prediction results, and evaluation indicators such as the mean square error (MSE) are calculated to ensure the robustness and stability of the model under different working conditions.

[0081] In a specific example, the aging experimental data of five groups of lithium batteries B0005, B0006, B0007, and B0018 from a research center are used to predict the battery health status. The battery data of batteries 6, 7, and 18 are used as the training set, and the battery data of battery 5 is used as the test set. The test conditions are:

[0082] Temperature: room temperature 24 degrees;

[0083] Charging: Charge in constant current (CC) mode at 1.5A until the battery voltage reaches 4.2V, then charge in constant voltage (CV) mode until the charge current drops to 20mA;

[0084] Discharge: Discharge in constant current (CC) mode at 2A until the voltages of batteries 5, 6, 7, and 18 drop to 2.7V, 2.5V, 2.2V, and 2.5V;

[0085] Termination condition: When the battery reaches the End Of Life (EOF) standard, that is, the rated capacity drops to 30% of it, that is, the rated capacity of batteries 5, 6, 7 and 18 decreases from 2Ahr to 1.4Ahr.

[0086] A SOH prediction model based on GA-Transformer was built on the local server, and its training parameters were as follows: the population size of the genetic algorithm (GA) was set to n = 100, the maximum number of iterations MaxGen = 100, the crossover probability Cross_rate = 0.9, the mutation probability Mutation_rate = 0.01, the elite retention ratio Elitism = 5%, and the selection strategy was roulette selection; the model dimension of Transformer was set to embed_dim = 32, the number of attention heads num_heads = 2, the number of encoder layers num_layers = 6, the hidden layer size of the feedforward network ff_dim = 32, the dropout rate dropout = 0.5, and the learning rate learning_rate = 0.001.

[0087] It should be noted that the model provided by the embodiment of the present invention uses the data of the 4 time steps closest to the current point to predict the data of the next 1 time step, wherein one time step represents one charge and discharge cycle.

[0088] Furthermore, the trained model is used for prediction to obtain the prediction results, such as Figure 4 As shown, Figure 4 This is a prediction result diagram of a method for predicting the health status of an energy storage battery provided by an embodiment of the present invention. It can be seen that the error between the prediction curve and the actual curve is small and the accuracy is high, which reflects the powerful prediction ability of the model.

[0089] In order to demonstrate the advantages of the Transformer model provided by the embodiment of the present invention, we use CNN, LSTM, RNN and GRU to predict SOH, and evaluate the prediction results of these models by using four indicators, namely MAE, RMSE, MAPE and R2, to describe the performance of different models. Figure 5 , Figure 5 This is a comparison chart of the prediction results of a method for predicting the health status of an energy storage battery provided by an embodiment of the present invention and the indicators of the existing methods, wherein Figures (a), (b), (c), and (d) are comparison charts of the MAE indicator, RMSE indicator, MAPE indicator, and R2 indicator of five models, respectively. It can be seen that compared with the existing model, the prediction model provided by the embodiment of the present invention shows stronger prediction ability and robustness, which can provide an effective solution for battery health management and has wide application potential and practical value.

[0090] The embodiment of the present invention introduces the global optimization capability of the genetic algorithm to optimize the hyperparameter combination of the Transformer model, thereby reducing the prediction error and significantly improving the accuracy and generalization ability of the health status prediction; at the same time, the global search and fast convergence characteristics of the genetic algorithm can prevent the model from falling into the local optimum, so that the Transformer model can achieve the best prediction effect. The model adopted by the embodiment of the present invention can maintain a high prediction performance under different battery operating conditions, and can reduce the complexity of model training while improving the prediction accuracy, thereby improving the accuracy of battery health status prediction.

[0091] Correspondingly, the present invention also provides a device for predicting the health status of an energy storage battery, which can implement all the processes of the method for predicting the health status of an energy storage battery in the above embodiment.

[0092] See also Figure 6 , Figure 6 1 is a schematic diagram of a device for predicting the health status of an energy storage battery provided by an embodiment of the present invention. The device for predicting the health status of an energy storage battery comprises:

[0093] The data acquisition module 601 is used to collect the operating data of the target battery and perform preprocessing to obtain battery data, wherein the battery data is divided into a training set and a test set;

[0094] A model building module 602 is used to build a Transformer model to predict the health status of the target battery;

[0095] A genetic algorithm module 603 is used to determine the optimal hyperparameter combination of the Transformer model using a genetic algorithm;

[0096] A model training module 604 is used to train the Transformer model using the training set according to the optimal hyperparameter combination;

[0097] The state prediction module 605 is used to input the test set into the trained Transformer model to perform health state prediction to obtain the health state prediction value of the target battery.

[0098] Preferably, the genetic algorithm module 603 is specifically used for:

[0099] Randomly generate a set of initial hyperparameter combinations of the Transformer model to form an initial population, where each initial hyperparameter combination is an individual in the initial population;

[0100] Calculating the fitness of each individual in the initial population according to a preset fitness function;

[0101] Based on the initial population, iterative training is performed until the iteration termination condition is met to obtain the final population; in each round of iteration, according to the fitness of individuals in the current population obtained in the previous round of iteration, the individuals in the current population are selected, crossed and mutated to update the population, and the fitness of individuals in the updated population is calculated;

[0102] According to the fitness of the individuals in the final population, an optimal hyperparameter combination of the Transformer model in the final population is obtained.

[0103] Preferably, the performing selection, crossover and mutation operations on the individuals in the current population to update the population, and calculating the fitness of the individuals in the updated population, includes:

[0104] According to the fitness of each individual in the current population, a roulette wheel or tournament selection method is used to select individuals with better performance to obtain a first population;

[0105] Perform a crossover operation on the individuals in the first population to generate a new hyperparameter combination to obtain a second population;

[0106] Selecting some individuals from the second population with a preset probability for random mutation to obtain a third population, i.e., an updated population;

[0107] The Transformer model is trained according to each individual in the updated population, and the fitness of each individual in the updated population is calculated using a preset fitness function according to the training result.

[0108] Preferably, the operating data includes at least one of the terminal voltage, operating current, temperature parameter, and historical health status value of the battery;

[0109] The optimal hyperparameter combination includes at least one of a learning rate, a batch size, a model depth, and a number of attention heads.

[0110] Preferably, the Transformer model includes an encoder and a decoder;

[0111] The encoder is used to extract features of the battery data;

[0112] The decoder is used to generate a health state prediction value of the battery according to the characteristics and the historical health state prediction value.

[0113] Preferably, the device further comprises:

[0114] The verification module is used to use preset indicators to evaluate the accuracy of the health status prediction value to verify the effectiveness of the Transformer model based on the evaluation results.

[0115] In the specific implementation, the working principle, control process and technical effect achieved by the energy storage battery health status prediction device provided in the embodiment of the present invention are the same as those of the energy storage battery health status prediction method in the above embodiment, and will not be repeated here.

[0116] See also Figure 7 , Figure 7 7 is a structural block diagram of a computer device provided in an embodiment of the present application, and the computer device includes: a processor 701, a memory 702, and a computer program stored in the memory 702 and executable on the processor 701. When the processor 701 executes the computer program, the steps in the above-mentioned energy storage battery health status prediction method embodiment are implemented. Alternatively, when the processor 701 executes the computer program, the functions of each module / unit in the above-mentioned device embodiments are implemented.

[0117] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 702 and executed by the processor 701 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the computer device.

[0118] The computer device may include, but is not limited to, a processor 701 and a memory 702. Those skilled in the art will appreciate that the schematic diagram is merely an example of a computer device and does not limit the computer device. The computer device may include more or fewer components than shown in the diagram, or may combine certain components, or may include different components. For example, the computer device may also include an input / output device, a network access device, a bus, etc.

[0119] The processor 701 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor 701 is the control center of the computer device, and uses various interfaces and lines to connect various parts of the entire computer device.

[0120] The memory 702 can be used to store the computer program and / or module, and the processor 701 realizes various functions of the computer device by running or executing the computer program and / or module stored in the memory 702, and calling the data stored in the memory 702. The memory 702 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 702 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0121] Wherein, if the module / unit integrated in the computer device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor 701. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.

[0122] An embodiment of the present invention also provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the energy storage battery health status prediction method described in any of the above embodiments.

[0123] The embodiments of the present invention provide a method, device, equipment and medium for predicting the health status of energy storage batteries, which have the following beneficial effects: by introducing the global optimization capability of genetic algorithms, the hyperparameter combination of the Transformer model is optimized, the prediction error is reduced, and the accuracy and generalization ability of health status prediction are significantly improved; at the same time, the global search and fast convergence characteristics of genetic algorithms are utilized to avoid the model from falling into the local optimum, so that the Transformer model can achieve the best prediction effect. The model adopted in the embodiments of the present invention can maintain a high prediction performance under different battery operating conditions, and can reduce the complexity of model training while improving the prediction accuracy, thereby improving the accuracy of battery health status prediction.

[0124] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for predicting the health status of an energy storage battery, characterized in that: include: Collecting and preprocessing the operating data of the target battery to obtain battery data, wherein the battery data is divided into a training set and a test set; Establishing a Transformer model to predict the health status of the target battery; Using a genetic algorithm, determining an optimal hyperparameter combination of the Transformer model; According to the optimal hyperparameter combination, training the Transformer model using the training set; The test set is input into the trained Transformer model to perform health state prediction, and the health state prediction value of the target battery is obtained.

2. The method for predicting the health status of an energy storage battery according to claim 1, characterized in that: The method of using a genetic algorithm to determine an optimal hyperparameter combination of the Transformer model includes: Randomly generate a set of initial hyperparameter combinations of the Transformer model to form an initial population, where each initial hyperparameter combination is an individual in the initial population; Calculating the fitness of each individual in the initial population according to a preset fitness function; Based on the initial population, iterative training is performed until the iteration termination condition is met to obtain the final population; in each round of iteration, according to the fitness of individuals in the current population obtained in the previous round of iteration, the individuals in the current population are selected, crossed and mutated to update the population, and the fitness of individuals in the updated population is calculated; According to the fitness of the individuals in the final population, an optimal hyperparameter combination of the Transformer model in the final population is obtained.

3. The method for predicting the health status of an energy storage battery according to claim 2, characterized in that: The selecting, crossover and mutation operations are performed on the individuals in the current population to update the population, and the fitness of the individuals in the updated population is calculated, including: According to the fitness of each individual in the current population, a roulette wheel or tournament selection method is used to select individuals with better performance to obtain a first population; Perform a crossover operation on the individuals in the first population to generate a new hyperparameter combination to obtain a second population; Selecting some individuals from the second population with a preset probability for random mutation to obtain a third population, i.e., an updated population; The Transformer model is trained according to each individual in the updated population, and the fitness of each individual in the updated population is calculated using a preset fitness function according to the training result.

4. The method for predicting the health status of an energy storage battery according to claim 1, characterized in that: The operating data includes at least one of the terminal voltage, operating current, temperature parameter, and historical health status value of the battery; The optimal hyperparameter combination includes at least one of a learning rate, a batch size, a model depth, and a number of attention heads.

5. The method for predicting the health status of an energy storage battery according to claim 1, characterized in that: The Transformer model includes an encoder and a decoder; The encoder is used to extract features of the battery data; The decoder is used to generate a health state prediction value of the battery according to the characteristics and the historical health state prediction value.

6. The method for predicting the health status of an energy storage battery according to claim 1, characterized in that: After obtaining the health status prediction value of the target battery, the method further includes: The health status prediction value is evaluated for accuracy using preset indicators to verify the effectiveness of the Transformer model based on the evaluation results.

7. A device for predicting the health status of an energy storage battery, characterized in that: include: A data acquisition module, used to collect the operating data of the target battery and perform preprocessing to obtain battery data, wherein the battery data is divided into a training set and a test set; A model building module, used to build a Transformer model to predict the health status of the target battery; A genetic algorithm module, used to determine the optimal hyperparameter combination of the Transformer model using a genetic algorithm; A model training module, used for training the Transformer model using the training set according to the optimal hyperparameter combination; The state prediction module is used to input the test set into the trained Transformer model to perform health state prediction and obtain the health state prediction value of the target battery.

8. The device for predicting the health status of an energy storage battery according to claim 7, characterized in that: The genetic algorithm module is specifically used for: Randomly generate a set of initial hyperparameter combinations of the Transformer model to form an initial population, each initial hyperparameter combination being an individual in the initial population; Calculating the fitness of each individual in the initial population according to a preset fitness function; Based on the initial population, iterative training is performed until the iteration termination condition is met to obtain the final population; In each round of iteration, according to the fitness of individuals in the current population obtained in the previous round of iteration, selection, crossover and mutation operations are performed on the individuals in the current population to update the population, and the fitness of individuals in the updated population is calculated; According to the fitness of the individuals in the final population, an optimal hyperparameter combination of the Transformer model in the final population is obtained.

9. A computer device, characterized in that: It comprises a processor and a memory, wherein a computer program is stored in the memory, and the computer program is configured to be executed by the processor, and when the processor executes the computer program, the method for predicting the health status of an energy storage battery as described in any one of claims 1 to 6 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the device where the computer-readable storage medium is located executes the computer program, the method for predicting the health status of an energy storage battery as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Human body composition prediction method based on improved adaptive genetic algorithm

    CN110459267A

  • Lithium battery health state prediction method

    CN116679211A

  • Battery health degree prediction method and device, electronic equipment and storage medium

    CN117214722A

  • Lightweight lithium battery health state estimation method based on L-TCN and GL-Former

    CN117805651A

Cited By

  • Battery health state estimation method and system, electronic equipment and storage medium

    CN121186617A

  • Battery life prediction method based on pre-training model guided genetic programming

    CN121389835A

  • Battery Life Prediction Method Based on Pre-trained Model-Guided Genetic Programming

    CN121389835B