TDA-based battery life prediction method, apparatus and device, and medium
Through the TDA-based battery life prediction method, the physical characteristics and TDA characteristics in the battery cycle data are extracted and trained in combination with the random forest model, the problems of feature diversity and redundancy during battery life prediction in the prior art are solved, and high-precision and low-cost battery life prediction are achieved.
Patent Information
- Application Number
- CN202411619615.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-13
AI Technical Summary
In the prior art, there is diversity and redundancy between characteristics when predicting battery life, making it difficult to accurately describe the degradation process of the battery under different usage conditions, and the calculation cost is high, making it difficult to apply to the battery management system in real time.
The battery life prediction method based on topological data analysis (TDA) is used to obtain the battery's cyclic data for preprocessing, extract physical features and TDA features to form a feature matrix, and combine it with a random forest model for training. The hyperparameters are optimized through 50% cross-validation to obtain a trained random forest model to predict the remaining cycle life of the battery.
Improves the accuracy and robustness of battery residual life prediction, reduces calculation costs, and is suitable for rapid evaluation of battery health, extends battery life and reduces maintenance costs.
Smart Images

Figure CN119619848A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of battery management technology, and in particular to a battery life prediction method, device, equipment and medium based on TDA. Background Art
[0002] With the rapid development of electric vehicles and consumer electronics, lithium-ion batteries, as the main energy storage devices, have been widely used in various fields. However, the cycle life of the battery limits the durability and stability of the battery in practical applications. Traditional battery life prediction methods usually rely on complex physical models, which are not only difficult to accurately describe the degradation process of the battery under different usage conditions, but also have high computational costs and are difficult to be applied in real time in actual battery management systems.
[0003] In recent years, data-driven machine learning methods have shown great potential in battery life prediction. These methods can establish high-precision prediction models by analyzing historical battery data and extracting key features. Topological Data Analysis (TDA), as an effective geometric and topological tool, can extract persistent homogeneous features from battery cycle data and identify hidden trends in battery degradation. Combined with traditional physical features, these topological features can provide more comprehensive information for accurate prediction of battery life. The random forest model, as an integrated learning algorithm, can process high-dimensional data and is suitable for capturing complex feature relationships.
[0004] Therefore, a battery life prediction method, device, equipment and medium based on TDA are proposed to solve the technical problems of diversity and redundancy among features when predicting battery life in the prior art. Summary of the invention
[0005] In order to overcome the problems existing in the related art, the present disclosure provides a battery life prediction method, device, equipment and medium based on TDA to solve the technical problems of diversity and redundancy among features when predicting battery life in the related art.
[0006] One or more embodiments of this specification provide a battery life prediction method based on TDA, comprising the following steps:
[0007] Obtain battery cycle data and perform preprocessing;
[0008] Extract physical characteristics and TDA features from the battery cycle data to form a feature matrix as an input data set;
[0009] The random forest model is trained by using the input data set, and the hyperparameters are optimized by 5-fold cross validation to obtain a trained random forest model;
[0010] Based on the trained random forest model, the remaining cycle life of the battery is predicted and the predicted life value of the battery is output.
[0011] Preferably, the extracting of TDA features from the battery cycle data specifically comprises the following steps:
[0012] Extract the mean discharge capacity, mean internal resistance and mean charging time of each cycle in the battery cycle data to construct point cloud data;
[0013] The point cloud data is subjected to persistent homology graph analysis to calculate TDA features.
[0014] Preferably, the hyperparameter optimization by 5-fold cross validation specifically comprises the following steps:
[0015] Divide the input dataset into 5 folds, with each fold serving as a validation set in turn and the rest as training sets;
[0016] Set the hyperparameters of the random forest model, including the number of trees, minimum number of leaf nodes, and maximum tree depth;
[0017] For each set of hyperparameter combinations, the training set was used to train the model in each of the five folds, and the validation set was used to predict the model, and the root mean square error was calculated;
[0018] Get the root mean square error of all hyperparameter combinations, and take the hyperparameter combination with the lowest root mean square error as the best model configuration.
[0019] Preferably, the method further comprises the following steps:
[0020] Using the optimal hyperparameter configuration, training a random forest model on the input data set;
[0021] The trained random forest model was used to predict the test set, and the root mean square error and relative error between the predicted life span value and the actual life span value were calculated to evaluate the prediction performance of the model.
[0022] Preferably, the method further comprises the following steps:
[0023] Compare the model's predicted life expectancy with the actual life expectancy through a visual chart.
[0024] One or more embodiments of this specification provide a battery life prediction device based on TDA, including a preprocessing module, a feature matrix module, a model training module and a prediction module;
[0025] The preprocessing module is used to obtain the cycle data of the battery and perform preprocessing;
[0026] The feature matrix module is used to extract physical features and TDA features from the battery cycle data to form a feature matrix as an input data set;
[0027] The model training module is used to train the random forest model through the input data set, optimize the hyperparameters through 5-fold cross validation, and obtain a trained random forest model;
[0028] The prediction module is used to predict the remaining cycle life of the battery based on the trained random forest model and output the predicted life value of the battery.
[0029] Preferably, the feature matrix module is specifically configured to extract the mean value of discharge capacity, the mean value of internal resistance and the mean value of charging time of each cycle in the cycle data of the battery, and construct point cloud data;
[0030] The point cloud data is subjected to persistent homology graph analysis to calculate TDA features.
[0031] Preferably, the model training module is specifically configured to divide the input data set into 5 folds, each fold is used as a validation set in turn, and the rest are used as training sets;
[0032] Set the hyperparameters of the random forest model, including the number of trees, minimum number of leaf nodes, and maximum tree depth;
[0033] For each set of hyperparameter combinations, the training set was used to train the model in each of the five folds, and the validation set was used to predict the model, and the root mean square error was calculated;
[0034] Get the root mean square error of all hyperparameter combinations, and take the hyperparameter combination with the lowest root mean square error as the best model configuration.
[0035] One or more embodiments of the present specification provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the TDA-based battery life prediction method as described above when executing the computer program.
[0036] One or more embodiments of the present specification provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the battery life prediction method based on TDA as described above.
[0037] The present disclosure provides a method, device, equipment and medium for predicting battery life based on TDA, which has the advantages of obtaining battery cycle data and performing preprocessing, and being able to merge various data sets to form a complete data set; extracting physical characteristics and TDA characteristics from the battery cycle data to form a feature matrix as an input data set to ensure that the model can fully utilize the early cycle data of the battery; training a random forest model with the input data set, optimizing hyperparameters through 5-fold cross-validation, and obtaining a trained random forest model, thereby effectively improving the accuracy and robustness of battery remaining life prediction; based on the trained random forest model, predicting the remaining cycle life of the battery, and outputting the predicted life value of the battery, the method has a low computational cost, is suitable for quickly evaluating the battery health status, can provide an accurate prediction basis for the battery management system, extend the battery service life and reduce maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate one or more embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0039] Figure 1 A flowchart of a battery life prediction method based on TDA provided for one or more embodiments of this specification;
[0040] Figure 2 A persistent homology graph generated for a battery point cloud data provided by one or more embodiments of this specification;
[0041] Figure 3 One or more embodiments of this specification provide Figure 2 Persistent images generated by PD;
[0042] Figure 4 A complete flow chart of a battery life prediction method provided for one or more embodiments of this specification;
[0043] Figure 5 A graph showing a trend of the out-of-bag mean square error of the final random forest model provided in one or more embodiments of this specification as the number of trees increases;
[0044] Figure 6 A comparison chart between the battery cycle life prediction result and the actual cycle life provided in one or more embodiments of this specification;
[0045] Figure 7A schematic diagram of the structure of a battery life prediction device based on TDA provided in one or more embodiments of this specification;
[0046] Figure 8 A schematic diagram of the structure of a computer device provided for one or more embodiments of this specification. DETAILED DESCRIPTION
[0047] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below in conjunction with the drawings in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the protection scope of the present invention.
[0048] The present invention is described in detail below in conjunction with specific implementation methods and the accompanying drawings.
[0049] Method Embodiment
[0050] According to an embodiment of the present invention, a battery life prediction method based on TDA is provided. Figure 1 FIG. 1 is a flow chart of a method for predicting battery life based on TDA provided in this embodiment. The method for predicting battery life based on TDA according to an embodiment of the present invention includes the following steps:
[0051] S110, load the data set of battery cycle data, including training set (train Data), validation set (valData) and test set (test Data), and preprocess, merge the three preprocessed data sets into a complete data set (all Data). The data set contains the cycle data of multiple batteries, and the data of each battery includes key parameters such as discharge capacity, internal resistance, and charging time. In order to ensure that the model can make full use of the early cycle data of the battery, only the data of the first 100 cycles of each battery are extracted.
[0052] During the data processing, the load function of MATLAB is used to import the data set and save the data of each battery in a structure array. The data structure of each battery includes summary information of each cycle (such as discharge capacity, internal resistance) and detailed voltage and time data measured during the cycle. The specific steps are as follows:
[0053] Load data: Use load('battery Discharge Data.mat') to import the MAT-file containing the training, validation, and test data.
[0054] Merge data sets: Merge the training set, validation set, and test set one by one into a unified structure array allData to ensure that the data of all batteries are concentrated together for subsequent processing.
[0055] Initialize the feature matrix: determine the number of batteries num Batteries and the number of cycles to use numCyclesToUse (set to 100). Initialize the matrix basic Features (size numBatteriesx10) used to store physical features and the matrix tda Features (size num Batteriesx3) used to store TDA features.
[0056] S120 , extracting physical features and TDA features from the battery cycle data to form a feature matrix as an input data set.
[0057] Among them, physical features are extracted: physical features are extracted from the battery cycle data, mainly selecting features related to battery health. 10 physical features are extracted from the cycle data of each battery. For each battery, the following features are extracted from the first 100 cycles, including:
[0058] (1) Discharge capacity of the second cycle: represents the early battery performance.
[0059] (2) Average internal resistance and internal resistance standard deviation: reflect the stability of the battery's internal resistance.
[0060] (3) Standard deviation and maximum and minimum values of capacity: measure the fluctuation range of discharge capacity.
[0061] (4) Capacity difference: the difference in discharge capacity between the 100th cycle and the 2nd cycle, reflecting the capacity decay trend.
[0062] (5) Average charging time of the first 100 cycles: reflects the change in charging efficiency.
[0063] The above features can fully reflect the health status and attenuation trend of the battery in the early cycle, and provide important information for the prediction of the remaining life. The physical feature extraction process is implemented in the extract_physical_features function and applied to the data of all batteries.
[0064] Extract TDA features:
[0065] In order to further improve the accuracy of battery life prediction, TDA technology is introduced. TDA can capture subtle changes in the battery aging process by analyzing the geometric structure of battery cycle data. TDA features are mainly based on persistent homogeneous H1 features, which are calculated by constructing a point cloud composed of feature means.
[0066] The specific steps include:
[0067] 1. Construct point cloud data: Based on the data of the first 100 cycles of each battery, extract the mean discharge capacity, internal resistance and charging time of each cycle to form three-dimensional point cloud data. These mean values represent the key performance indicators of the battery in each cycle and can reflect the overall health of the battery.
[0068] 2. Persistent homology calculation: Use Python's ripser library to perform persistent homology analysis on the constructed point cloud data and calculate topological features.
[0069] Specifically, the H1 homology graph is calculated and the following features are extracted:
[0070] Total persistence of H1 homology: the sum of the persistence of all H1 homology features, reflecting the overall stability of the topological structure.
[0071] Maximum persistence of H1 homology: The value with the largest persistence among the H1 homology features represents the most significant topological feature.
[0072] Number of features of H1 homology: The number of topological features present in the H1 homology graph, reflecting the complexity.
[0073] Feature integration: The extracted H1 persistent homology features are combined with the physical features to form a complete feature matrix, providing comprehensive input data for subsequent model training.
[0074] The TDA feature extraction process is implemented in the extract_TDA_features_new function, and the Python libraries ripser and persim are used to calculate persistent homology.
[0075] like Figure 2 As shown, a persistence diagram (PD) generated for a battery point cloud data provided in this embodiment, the vertical axis represents the death time (Death) of the feature, and the horizontal axis represents the birth time (Birth) of the feature. The figure shows the H2 (blue dots) and H1 (orange dots) persistent homology features. H0 represents the topological features of the connected components, while H1 represents the topological features of the one-dimensional ring structure. The dotted line in the figure is the "death = birth" line. The farther the point is from this line, the more stable its corresponding topological feature. This figure is used to analyze the topological structure in the battery voltage data and provide a basis for subsequent TDA feature extraction.
[0076] like Figure 3 As shown, the embodiment provided is based on Figure 2The persistence image (PI) generated by the PD. By converting the persistent homology features into density distribution, the colors in the figure represent the persistence strength of the topological features. The brighter the color, the more significant the topological features of the area. This image is used to extract topological features from battery data and provide input for subsequent machine learning models.
[0077] S130. The random forest model is trained to predict battery life by using the input data set, i.e., combining the extracted physical features and TDA features. The hyperparameters are optimized by 5-fold cross validation to train the model and tune the hyperparameters to obtain a trained random forest model.
[0078] S140: Based on the trained random forest model, the remaining cycle life of the battery is predicted, the predicted life value of the battery is output, and the evaluation is performed on the test set. The evaluation indicators include root mean square error (RMSE) and relative error. The specific steps are as follows:
[0079] S1401, training the final model: using the optimal hyperparameter configuration, training the final random forest regression model finalMdl on all feature data.
[0080] S1402, Model performance evaluation: Use the trained random forest model to predict the test set, calculate the RMSE and relative error between the predicted life value and the actual life value, and evaluate the prediction performance of the model. RMSE reflects the average deviation between the predicted life value and the actual life value. The smaller the value, the more accurate the model prediction. The relative error represents the ratio of the deviation between the predicted life value and the actual life value to the actual value, providing a relative measure of the prediction accuracy.
[0081] S1403. Result visualization: Out-of-Bag Error graph: Draw the Out-of-Bag Error curve to evaluate the performance changes of the model under different numbers of trees. The out-of-bag error is used to evaluate the generalization ability of the random forest model. Prediction and actual comparison graph: Generate a scatter plot to show the comparison between the predicted life value and the actual life value, and add an ideal reference line. Through visual comparison, the prediction effect and accuracy of the model are intuitively displayed. The experimental results show that the RMSE of the method on the test set is about 70, and the average relative error is controlled within 8%. This shows that the random forest regression model of the present invention, combined with the topological data analysis characteristics, has efficient and accurate battery life prediction capabilities. Figure 4 A complete flow chart of the battery life prediction method provided in this embodiment.
[0082] The method provided in this embodiment can merge various data sets to form a complete data set by acquiring the cycle data of the battery and performing preprocessing; extract physical characteristics and TDA characteristics in the cycle data of the battery to form a feature matrix as an input data set to ensure that the model can fully utilize the early cycle data of the battery; train the random forest model through the input data set, optimize the hyperparameters through 5-fold cross-validation, and obtain a trained random forest model, thereby effectively improving the accuracy and robustness of the remaining life prediction of the battery; based on the trained random forest model, predict the remaining cycle life of the battery, and output the predicted life value of the battery. This method has a low computational cost and is suitable for quickly evaluating the health status of the battery. It can provide an accurate prediction basis for the battery management system, extend the battery service life and reduce maintenance costs.
[0083] In one embodiment, the step of optimizing hyperparameters by 5-fold cross validation specifically includes the following steps:
[0084] 1. Define cross validation: Divide the input dataset into 5 folds, each fold takes turns as a validation set, and the rest as training sets.
[0085] 2. Define the hyperparameter search space: Set the hyperparameters of the random forest model, including the number of trees (200, 300, 500), the minimum number of leaf nodes (2, 4, 6), and the maximum tree depth (10, 20, 30).
[0086] For each set of hyperparameter combinations, the following operations are performed: the model is trained using the training set in each of the five folds, the model is predicted using the validation set, and the root mean square error (RMSE) is calculated.
[0087] 3. Select the best hyperparameters: Get the root mean square error of all hyperparameter combinations, record the RMSE of each hyperparameter combination in each fold, and calculate the average RMSE. The hyperparameter combination with the lowest root mean square error is taken as the best model configuration.
[0088] The method provided in this embodiment performs model training and hyperparameter tuning through a 5-fold cross-validation method to ensure the generalization ability and prediction accuracy of the model.
[0089] In one embodiment, the following steps are also included:
[0090] S1501, training the final model: using the optimal hyperparameter configuration, training the random forest model final-Mdl on the input data set;
[0091] S1502. Use the trained random forest model to predict the test set, calculate the root mean square error and relative error between the predicted life value and the actual life value, and evaluate the prediction performance of the model. RMSE reflects the average deviation between the predicted life value and the actual life value. The smaller the value, the more accurate the model prediction. The relative error represents the ratio of the deviation between the predicted life value and the actual life value to the actual value, providing a relative measure of the prediction accuracy.
[0092] In one embodiment, the following steps are also included:
[0093] S160. Compare the predicted life value and the actual life value of the model through a visual chart.
[0094] Out-of-Bag Error Graph: Draw the Out-of-Bag Error curve to evaluate the performance changes of the model under different numbers of trees. The out-of-bag error is used to evaluate the generalization ability of the random forest model. Prediction and actual comparison graph: Generate a scatter plot to show the comparison between the predicted life value and the actual life value, and add an ideal reference line. Through visual comparison, the prediction effect and accuracy of the model are intuitively displayed. The experimental results show that the RMSE of the method on the test set is about 70, and the average relative error is controlled within 8%. This shows that the random forest regression model of the present invention, combined with the topological data analysis characteristics, has efficient and accurate battery life prediction capabilities.
[0095] like Figure 5 As shown, the Out-of-Bag Mean Squared Error (OOB MSE) of the final random forest model provided in this embodiment changes with the number of trees. The vertical axis is the Out-of-Bag Mean Squared Error, and the horizontal axis is the number of generated trees. As the number of trees increases, the Out-of-Bag Error decreases rapidly and tends to stabilize, indicating that the generalization performance of the model reaches the best after adding a certain number of trees. The Out-of-Bag Error of the final model stabilizes at a lower value when there are 200 trees, indicating that the model has good predictive ability.
[0096] like Figure 6 As shown, it is a comparison chart between the battery cycle life prediction results and the actual cycle life in the embodiment of the present invention. The blue points represent the battery life value predicted by the random forest regression model, the horizontal axis is the actual cycle life of the battery, and the vertical axis is the battery cycle life predicted by the model. The red dotted line is the ideal diagonal line (Ideal Line) under ideal conditions, indicating an ideal state in which the predicted life value and the actual life value are completely consistent. As shown in the figure, most of the blue points are close to the red ideal line, indicating that the model has good prediction accuracy in the range of 500 to 1200 cycle lifespans. When the actual cycle life exceeds 1200 times, the model will slightly underestimate the remaining life of the battery in some cases, but the overall trend still maintains good consistency.
[0097] Device Embodiment
[0098] According to an embodiment of the present invention, a battery life prediction device based on TDA is provided, such as Figure 1 As shown, it is a schematic diagram of the structure of the battery life prediction based on TDA provided in this embodiment. According to the battery life prediction device based on TDA in this embodiment of the present invention, it includes a preprocessing module, a feature matrix module, a model training module and a prediction module:
[0099] The preprocessing module 71 is used to obtain the cycle data of the battery and perform preprocessing.
[0100] The feature matrix module 72 is used to extract physical features and TDA features from the cycle data of the battery to form a feature matrix as an input data set.
[0101] The model training module 73 is used to train the random forest model using the input data set, optimize the hyperparameters through 5-fold cross validation, and obtain a trained random forest model.
[0102] The prediction module 74 is used to predict the remaining cycle life of the battery based on the trained random forest model and output the predicted life value of the battery.
[0103] The device provided in this embodiment obtains the cycle data of the battery and performs preprocessing through the preprocessing module 71, and can merge various data sets to form a complete data set; the feature matrix module 72 is used to extract the physical characteristics and TDA characteristics in the cycle data of the battery to form a feature matrix as an input data set to ensure that the model can make full use of the early cycle data of the battery; the model training module 73 is used to train the random forest model through the input data set, optimize the hyperparameters through 5-fold cross-validation, and obtain a trained random forest model, thereby effectively improving the accuracy and robustness of the battery remaining life prediction; the prediction module 74 predicts the remaining cycle life of the battery based on the trained random forest model, and outputs the predicted life value of the battery. This method has a low computational cost and is suitable for quickly evaluating the health status of the battery. It can provide an accurate prediction basis for the battery management system, extend the battery life and reduce maintenance costs.
[0104] In one embodiment, the feature matrix module 72 is specifically configured to extract the mean value of discharge capacity, the mean value of internal resistance and the mean value of charging time of each cycle in the cycle data of the battery, and construct point cloud data;
[0105] The point cloud data is subjected to persistent homology graph analysis to calculate TDA features, thereby further analyzing the collective structure of the battery cycle data and capturing subtle changes during the battery aging process.
[0106] In one embodiment, the model training module 73 is specifically configured to divide the input data set into 5 folds, each fold is used as a validation set in turn, and the rest are used as training sets.
[0107] Set the hyperparameters of the random forest model, including the number of trees, minimum number of leaf nodes, and maximum tree depth.
[0108] For each set of hyperparameter combinations, the training set was used to train the model in 5 folds, and the validation set was used to predict the model, and the root mean square error was calculated.
[0109] Get the root mean square error of all hyperparameter combinations, and take the hyperparameter combination with the lowest root mean square error as the best model configuration.
[0110] The device provided in this embodiment performs model training and hyperparameter tuning through a 5-fold cross-validation method to ensure the generalization ability and prediction accuracy of the model.
[0111] The embodiment of the present invention is an apparatus embodiment corresponding to the above-mentioned method embodiment. The specific operations of the processing steps of each module can be understood by referring to the description of the method embodiment, which will not be repeated here.
[0112] like Figure 8 As shown, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the battery life prediction method based on TDA in the above-mentioned embodiment, or, when executed by a processor, implements the battery life prediction method based on TDA in the above-mentioned embodiment.
[0113] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and 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-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0114] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0115] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and the contents not described in detail in the specification of the present invention belong to the common knowledge of those skilled in the art.
Claims
1. A battery life prediction method based on TDA, characterized in that: The following steps are involved: Obtain battery cycle data and perform preprocessing; Extract physical characteristics and TDA features from the battery cycle data to form a feature matrix as an input data set; The random forest model is trained by using the input data set, and the hyperparameters are optimized by 5-fold cross validation to obtain a trained random forest model; Based on the trained random forest model, the remaining cycle life of the battery is predicted and the predicted life value of the battery is output.
2. The battery life prediction method according to claim 1, characterized in that: The extracting of TDA features from the battery cycle data specifically includes the following steps: Extract the mean discharge capacity, mean internal resistance and mean charging time of each cycle in the battery cycle data to construct point cloud data; The point cloud data is subjected to persistent homology graph analysis to calculate TDA features.
3. The battery life prediction method according to claim 1, characterized in that: The optimization of hyperparameters by 5-fold cross validation specifically includes the following steps: Divide the input dataset into 5 folds, with each fold serving as a validation set in turn and the rest as training sets; Set the hyperparameters of the random forest model, including the number of trees, minimum number of leaf nodes, and maximum tree depth; For each set of hyperparameter combinations, the training set was used to train the model in each of the five folds, and the validation set was used to predict the model, and the root mean square error was calculated; Get the root mean square error of all hyperparameter combinations, and take the hyperparameter combination with the lowest root mean square error as the best model configuration.
4. The battery life prediction method according to claim 3, characterized in that: The following steps are also included: Using the optimal hyperparameter configuration, training a random forest model on the input data set; The trained random forest model was used to predict the test set, and the root mean square error and relative error between the predicted life span value and the actual life span value were calculated to evaluate the prediction performance of the model.
5. The battery life prediction method according to claim 3, characterized in that: The following steps are also included: Compare the model's predicted life expectancy with the actual life expectancy through a visual chart.
6. A battery life prediction device based on TDA, characterized in that: Includes preprocessing module, feature matrix module, model training module and prediction module; The preprocessing module is used to obtain the cycle data of the battery and perform preprocessing; The feature matrix module is used to extract physical features and TDA features from the battery cycle data to form a feature matrix as an input data set; The model training module is used to train the random forest model through the input data set, optimize the hyperparameters through 5-fold cross validation, and obtain a trained random forest model; The prediction module is used to predict the remaining cycle life of the battery based on the trained random forest model and output the predicted life value of the battery.
7. The battery life prediction method according to claim 6, characterized in that: The feature matrix module is specifically configured to extract the mean value of discharge capacity, the mean value of internal resistance and the mean value of charging time of each cycle in the cycle data of the battery, and construct point cloud data; The point cloud data is subjected to persistent homology graph analysis to calculate TDA features.
8. The battery life prediction method according to claim 6, characterized in that: The model training module is specifically configured to divide the input data set into 5 folds, each fold is used as a validation set in turn, and the rest are used as training sets; Set the hyperparameters of the random forest model, including the number of trees, minimum number of leaf nodes, and maximum tree depth; For each set of hyperparameter combinations, the training set was used to train the model in each of the five folds, and the validation set was used to predict the model, and the root mean square error was calculated; Get the root mean square error of all hyperparameter combinations, and take the hyperparameter combination with the lowest root mean square error as the best model configuration.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the TDA-based battery life prediction method according to any one of claims 1 to 5 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the battery life prediction method based on TDA as claimed in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Method for predicting residual cycle life of lithium battery based on random forest model
CN111965562A
Lithium battery state prediction method and system based on hybrid machine learning method, and medium
CN114742203A
Multi-classifier selection method, frozen gait detection system and device, and storage medium
CN115886794A
High-voltage cable mode identification method and device based on time sequence topological data analysis
CN116243115A
Systems and methods for predicting outcomes using a prediction learning model
US20160267397A1