Method and device for estimating health state of new energy vehicle-mounted battery
By obtaining full life cycle data in new energy vehicles, and optimizing the XGBoost model using recursive feature elimination and particle swarm optimization algorithm, the problem of inaccurate battery health status estimation is solved, and higher-precision battery health status prediction is achieved, which improves the vehicle's battery life stability and user experience.
Patent Information
- Application Number
- CN202510823866.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-08-15
AI Technical Summary
The existing technology fails to make full use of vehicle life cycle data, resulting in inaccurate estimates of the health status of new energy vehicles, and it is difficult to effectively predict the health status of batteries.
By obtaining real-time vehicle monitoring data for the entire life cycle of new energy vehicles, data preprocessing and feature extraction are performed, combining recursive feature elimination and XGBoost model, the model parameters are optimized using particle swarm optimization algorithm, and the training sample noise is reduced through error impact factor analysis, and the denoised PSO-XGBoost model is constructed for battery health status estimation.
It improves the accuracy and robustness of battery health status prediction, ensures the stability of the endurance of new energy vehicles, and improves the overall user experience of the vehicle.
Smart Images

Figure CN120490834A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of new energy vehicle-mounted battery health detection technology, and in particular to a new energy vehicle-mounted battery health status estimation method and device. Background Art
[0002] The new energy vehicle battery industry is a core driver of new energy vehicle development and has experienced explosive growth in recent years. my country's installed power battery capacity is projected to reach 387.7GWh in 2023, primarily driven by lithium-ion batteries, with lithium iron phosphate and ternary lithium batteries dominating the technology. While research and development of emerging technologies such as solid-state batteries and sodium-ion batteries is accelerating, mass production still faces challenges in materials and processes. Industry pain points include the safety risk of thermal runaway, an imperfect recycling system, and volatile raw material prices.
[0003] Battery health estimation can directly reflect the degree of battery aging by quantifying capacity decay (such as the ratio of current capacity to initial capacity) and internal resistance growth (such as an increase from 50mΩ to 70mΩ). For example, when the capacity decays to 80%, the IEEE standard recommends replacing the battery. Accurate battery health estimation can optimize charging and discharging strategies and reduce capacity decay. Combined with the battery health estimate, the charge and discharge power limits are adjusted in real time to avoid overcharging / over-discharging. Experiments have shown that controlling the DOD (depth of discharge) between 20% and 80% can extend the cycle life by three times. In addition, battery health is strongly correlated with battery life: a 10% capacity decay results in a 12% to 15% reduction in battery life. Accurately estimating the health level can enhance user trust.
[0004] Given the importance of battery health status estimation in the new energy vehicle battery industry, several technical solutions for battery health status prediction have emerged. However, some existing technologies fail to fully utilize vehicle lifecycle data, making it difficult to accurately estimate battery health status. This is not conducive to estimating the health status of new energy vehicle batteries and cannot effectively predict battery health status. Summary of the Invention
[0005] The problem to be solved by the present invention is to provide a method and device for estimating the health status of batteries on new energy vehicles, which can predict the health status of batteries based on the full utilization of the various characteristics of low-error data throughout the vehicle life cycle, thereby improving the accuracy and effectiveness of the prediction.
[0006] The present invention solves the above technical problems through the following technical means: In a first aspect, a method for estimating the health status of a battery in a new energy vehicle is provided, comprising the following steps:
[0007] S1. Obtain all real-time vehicle monitoring data throughout the life cycle of new energy vehicles;
[0008] S2. Data preprocessing, including data cleaning and sorting, dividing the real-time vehicle data into operating conditions to obtain the vehicle charging, discharging, and rest intervals;
[0009] S3. Extract and preliminarily process initial features, including battery-related information features, frequency domain-related features, time domain-related features, statistical analysis-related features, and composite features, to form an initial feature matrix;
[0010] S4. Divide the training set and test set, and use the recursive feature elimination (RFE) combined with XGBoost to filter the initial features and obtain the optimal feature subset;
[0011] S5. Optimize the parameters of the XGBoost model through the particle swarm optimization algorithm (PSO) and train the XGBoost model;
[0012] S6. Based on the error influencing factor analysis, the training set samples are adjusted to reduce the noise of the training set samples and obtain the denoised PSO-XGBoost model;
[0013] S7. Use the denoised PSO-XGBoost model to estimate the health status of new energy vehicle batteries.
[0014] This invention captures the vehicle operating condition profile by considering as many data features as possible, obtains detailed battery characteristics by dividing the vehicle operating conditions, and optimizes the XGBoost model through the PSO particle swarm optimization algorithm to effectively predict the health status of new energy vehicle batteries. This can ensure the endurance stability of new energy vehicles and improve the overall vehicle usage experience.
[0015] Preferably, in step S1, all real-time vehicle monitoring data of the new energy vehicle throughout its life cycle include: vehicle identification code, acquisition time, displayed SOC, charging status, vehicle status, current, cell voltage, cell temperature and mileage data.
[0016] Preferably, in step S2, the data preprocessing includes the following sub-steps:
[0017] S21, performing data cleaning on the real-time vehicle monitoring data collected in step S1 to remove abnormal data, including: invalid data, data outside the numerical range, and duplicate data;
[0018] S22. Arrange the cleaned data in ascending time order to obtain the time difference between two adjacent rows of data;
[0019] S23, missing data filling, filling in the data packets lost or delayed in the real-time vehicle monitoring data;
[0020] S24. Based on the vehicle status field data, including: charging status, vehicle status, current, and displayed SOC data, the operating conditions of the entire vehicle data are divided into: charging interval, discharging interval, and static interval.
[0021] Preferably, in step S3, the initial features further include composite features;
[0022] The battery-related information characteristics include: the internal chemical composition and reaction mechanism of different types of battery cells;
[0023] The frequency domain related information features include: the distribution ratio of different battery discharge rates and temperature ranges, and the energy of the charge and discharge current fluctuation spectrum;
[0024] The time domain related information features include: vehicle running time;
[0025] The statistical analysis related features include: total charging energy, battery consistency;
[0026] The composite characteristics include: high temperature and high rate charging state.
[0027] Preferably, in step S4, the initial feature set is screened using a method combining recursive feature elimination and XGBoost, which includes the following sub-steps:
[0028] S41, train the initial XGBoost model;
[0029] S42. After the training is completed, the importance score of each feature is obtained using the method provided by the XGBoost model. The gain function calculation formula is as follows;
[0030]
[0031] Among them, g i and h i are the first-order derivative and second-order derivative of sample i, I L and I R are the left and right subsets after splitting, and λ is the regularization coefficient;
[0032] S43. Sort all features according to their importance scores and determine the features to be removed from the feature set according to pre-set rules; for example, remove the k features with the lowest scores or remove the n% of features ranked at the bottom;
[0033] S44, deleting the features to be removed from the feature matrix X to obtain a new feature matrix X_new;
[0034] S45. Retrain the XGBoost model using the new feature matrix X_new and target variable y
[0035] S46. Repeat steps S41 to S45 until the preset stopping condition is reached, and use the remaining feature set as the optimal feature subset screened by combining RFE and XGBoost.
[0036] Preferably, in step S5, the training of the XGBoost model includes the following sub-steps:
[0037] S51. Define the objective function, accept a set of hyperparameters as input, and return the performance indicators of the XGBoost model, including: cross-validation accuracy, F1 score,
[0038] The calculation formula is as follows:
[0039] Objective(θ)=F1 CV (XGBoost(θ,X train ,y train ))
[0040]
[0041] Among them, Objective(θ) is the hyperparameter θ in the training set X train The average F1 score of the XGBoost model trained on the dataset is calculated through K-fold cross validation, which is used to evaluate the generalization performance of the model. θ represents all the configuration parameters of XGBoost, such as max_depth, learning_ratesubsample, etc. train ,y train Represent the feature matrix and label vector of the training dataset respectively;
[0042] In the definition formula of the F1 score value (harmonic mean), Precision represents the accuracy rate, which means the proportion of samples predicted to be positive that are actually positive, which is used to reduce false positives; Recall represents the recall rate, which means the proportion of samples that are correctly predicted to be positive, which is used to reduce false negatives. The F1 score takes into account both precision and recall rates and is used to measure the performance of the XGBoost model.
[0043] S52, initializing the particle swarm optimization algorithm, initializing the position and velocity of the particle swarm, where the position of each particle represents a set of hyperparameters, and the velocity represents the moving direction and speed of the particle in the parameter space;
[0044] S53, running the particle swarm optimization algorithm, iteratively updating the position and velocity of the particle until the maximum number of iterations is reached or the stopping condition is satisfied; in each iteration, the particle updates its position based on its own historical best position and the global best position;
[0045] The velocity v of particle i in parameter spacei and position x i The update formula is as follows;
[0046]
[0047] Among them, w is the inertia weight, c1, c2 are learning factors, r1, r2 ~ U (0, 1), P best,i is the best historical position of particle i, g best,i is the global optimal position of particle i;
[0048] S54. Use the optimal parameters obtained by the particle swarm optimization algorithm to train the XGBoost model.
[0049] Preferably, in step S6, adjusting the training set samples includes the following sub-steps:
[0050] S61, using the XGBoost model trained in step S54, predicting the test set samples to obtain preliminary prediction results;
[0051] S62. Based on the preliminary prediction result, obtain an error evaluation index value between the actual health state of the battery and the prediction result;
[0052] S63. Based on the error evaluation index, the error influencing factor analysis is performed on the samples with large errors, the training set is denoised, and the denoised PSO-XGBoost model is obtained.
[0053] Preferably, in step S7, the health status of the new energy vehicle battery is estimated using the denoised PSO-XGBoost model to obtain battery health status estimation data, which is used to quantify the degree of degradation of the battery's current performance relative to its initial performance. For example, if the battery health status estimate is less than 80%, active intervention should be performed.
[0054] In a second aspect, a device for estimating the health status of a battery on a new energy vehicle is provided, which is used in any of the above-mentioned methods for estimating the health status of a battery on a new energy vehicle, comprising:
[0055] Data acquisition module, used to obtain all real-time vehicle monitoring data throughout the life cycle of new energy vehicles;
[0056] Data preprocessing module, used to clean and sort real-time vehicle monitoring data;
[0057] Vehicle status classification module, used to determine the vehicle status based on real-time vehicle monitoring data;
[0058] Feature module, used to extract the initial feature matrix;
[0059] Model training module, used to train the XGBoost model;
[0060] Furthermore, the new energy vehicle-mounted battery health status estimation device also includes: a request receiving module and a prediction result output module, which are used to receive a battery health status estimation request and output an estimation result.
[0061] In a third aspect, a storage medium is provided, on which a computer executable command is stored. When the command is executed by a processor, the health status estimation method of the new energy vehicle battery described in the first aspect is implemented.
[0062] Compared with the prior art, the present invention adopts the above technical solution and has the following technical effects:
[0063] 1. The health status estimation method of the new energy vehicle battery of the present invention can make full use of the vehicle's full life cycle data and obtain a refined feature set by dividing the vehicle's operating conditions; at the same time, it considers as many data features as possible to capture the vehicle's operating condition overview.
[0064] 2. The present invention avoids model errors and computational burdens caused by too many features without sacrificing prediction accuracy by rationally using feature screening methods. At the same time, by further denoising the samples, pure, low-interference, and reasonably distributed samples and label data are obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 This is a flowchart of the method for estimating the health status of batteries on new energy vehicles according to the present invention;
[0066] Figure 2 This is a partial frequency domain feature distribution diagram of the health status estimation method for new energy vehicle batteries of the present invention;
[0067] Figure 3 This is a block diagram of the new energy vehicle battery health status estimation system of the present invention. DETAILED DESCRIPTION
[0068] In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions of the application are further elaborated in detail below with reference to the accompanying drawings. The described embodiments are only a part of the embodiments involved in the present invention. All non-innovative embodiments of other researchers in this field on this embodiment fall within the scope of protection of the present invention. At the same time, the step numbers in the embodiments of the present invention are only set for the convenience of explanation and description, and the order between the steps is not limited in any way. The execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.
[0069] Example 1
[0070] A method for estimating the health status of batteries in new energy vehicles is provided, which is applied to servers. Figure 1 As shown, the following steps are included:
[0071] S1: Obtain all real-time vehicle monitoring data throughout the life cycle of new energy vehicles.
[0072] In this embodiment, all real-time vehicle data of the new energy vehicle throughout its entire life cycle is obtained, including: vehicle identification code, collection time, displayed SOC, current, cell voltage, cell temperature, mileage and other data.
[0073] It is understandable that the battery health status estimation tag value should also be included, that is, the actual capacity value corresponding to the sample. The above data can be obtained from the database or the Internet of Vehicles through historical data acquisition, database query, etc.
[0074] S2: Data preprocessing, including cleaning, sorting and other operations. On this basis, the vehicle data operating conditions are divided to obtain the vehicle charging, discharging and static intervals.
[0075] In this embodiment, the data obtained in step S1 is cleaned to remove invalid data, data outside the numerical range, duplicate data, and other abnormal data. These abnormal data will have a significant impact on the training of the model. For example, a value outside the range of 0-100 for the displayed SOC is considered to be outside the data range.
[0076] Furthermore, the cleaned data is sorted in ascending time order, and the time difference data of two adjacent rows is obtained to facilitate the subsequent estimation steps;
[0077] Furthermore, because vehicle data is transmitted via wireless networks (such as 4G / 5G), affected by base station coverage and signal strength, data packet loss or delays may occur, resulting in temporal discontinuity in real-time vehicle data. This missing data can cause errors in model training, necessitating appropriate data filling.
[0078] Furthermore, combined with vehicle status field data, such as charging status and vehicle status, current, displayed SOC and other data, the operating condition interval of the entire vehicle data is divided into charging interval, discharging interval and static interval.
[0079] It is understandable that the static interval begins to be calculated only after the vehicle has been static for a specific threshold time.
[0080] S3: Extract and preliminarily process initial features, mainly including: battery-related information, frequency domain-related features, time domain-related features, and statistical analysis-related features.
[0081] In this embodiment, based on the data processed in step S2, the initial features of the model are extracted, including:
[0082] Battery-related information characteristics: Different types of battery cells have significant differences in their internal chemical composition and reaction mechanisms;
[0083] Frequency domain information characteristics: such as the distribution ratio of different battery discharge rates and temperature ranges, the spectrum energy of charge and discharge current fluctuations, etc.
[0084] Time domain related information characteristics: such as vehicle running time, etc.;
[0085] Statistical analysis of relevant features: such as total charging energy, current consistency, etc.
[0086] In this embodiment, some frequency domain features are distributed as follows: Figure 2 shown.
[0087] It should be noted that the consistency of new energy vehicle batteries refers to the degree of similarity among battery cells from the same batch in key parameters such as voltage, capacity, and internal resistance. For example, if a battery pack for an electric vehicle consists of 100 cells connected in series and the capacity of one cell is 5% lower than the others, that cell will be fully charged first during charging and trigger the BMS to stop charging, resulting in a 3% to 5% loss in the actual capacity of the entire pack.
[0088] Inconsistencies primarily arise from differences in manufacturing processes (such as uneven electrode coating thickness) or operating environments (such as uneven temperature distribution). Typical issues include: voltage inconsistency, where high-voltage cells "cross-charge" low-voltage cells, resulting in energy losses of up to 10%; and capacity inconsistency, where low-capacity cells, after overdischarge, act as a load, accelerating the aging of the entire pack. If the SOH is estimated based on the mean of individual parameters, inconsistencies can lead to estimation bias; and if the lowest-capacity cell is not identified, the cycle life of the entire pack may be overestimated.
[0089] It is important to note that the impact of these characteristics on vehicle health is not independent and requires comprehensive consideration. Therefore, in addition to the basic characteristics, the impact of composite characteristics, such as high-temperature and high-rate charging, needs to be considered.
[0090] S4: Rationally divide the training set and test set, and use the method of combining recursive feature elimination (RFE) and XGBoost to screen the initial feature set.
[0091] In this embodiment, the distribution ratio of each sample in the training set and the test set needs to meet certain conditions.
[0092] As you can understand, model training will be more effective if the distribution of samples across health status intervals is reasonable. The key requirement is that the distribution ratios of health status intervals in the training and test sets must be consistent with those in the original dataset. Kernel density estimation plots or the Kolmogorov-Smirnov test can be used to verify the similarity of feature distributions in the training and test sets.
[0093] Specifically, in step S4, the first step is to train the initial XGBoost model; after the training is completed, the importance score of each feature is obtained using the method provided by the XGBoost model.
[0094] Furthermore, all features are sorted based on the obtained feature importance scores. Features to be removed from the feature set are determined according to pre-set rules, such as removing a certain proportion of the least important features each time, or removing features with importance scores below a certain threshold. These features are then deleted from the feature matrix X to obtain a new feature matrix X_new.
[0095] Furthermore, the XGBoost model is retrained using the updated feature matrix X_new and target variable y.
[0096] Repeat the above step S4 until the preset stopping condition is reached. The remaining feature set is the optimal feature subset selected by combining RFE and XGBoost.
[0097] S5: Use the particle swarm optimization algorithm (PSO) as the parameter optimization algorithm of the XGBoost model to train the model.
[0098] In this embodiment, the first step is to define the objective function.
[0099] This objective function accepts a set of hyperparameters as input and returns the performance indicators of the model, such as cross-validation accuracy, F1 score, etc. The objective function will be used to evaluate the pros and cons of each set of hyperparameters.
[0100] The second step is to initialize the PSO algorithm.
[0101] The PSO algorithm requires initializing the position and velocity of the particle swarm. The position of each particle represents a set of hyperparameters, and the velocity represents the direction and speed of the particle's movement in the parameter space.
[0102] The third step is to run the PSO algorithm.
[0103] The PSO algorithm will iteratively update the particle's position and velocity until the maximum number of iterations is reached or the stopping condition is met. In each iteration, the particle will update its position based on its own historical best position and the global best position.
[0104] The fourth step is to train the XGBoost model using the optimal parameters obtained by the PSO optimization algorithm.
[0105] S6: Based on the error influencing factor analysis, targeted adjustments are made to the training samples to reduce the noise of the training samples and obtain the denoised PSO-XGBoost model.
[0106] In this embodiment, in the first step, the obtained data is grouped according to vehicle codes and arranged in ascending order of date.
[0107] In the second step, the XGBoost model with parameters obtained by feature screening and PSO optimization algorithm is used to predict the samples in the test set and obtain preliminary prediction results.
[0108] The third step is to obtain the error evaluation index value between the actual health status and the predicted result based on the preliminary prediction results, such as mean square error, determination coefficient or mean absolute error.
[0109] The fourth step is to perform error influencing factor analysis on samples with large errors based on the error evaluation index and further reduce the noise of the training set.
[0110] For example, there may be samples of vehicles with re-runs or battery pack replacements after repairs, which can affect model building, and these data may be missed during data cleaning. This approach allows us to obtain clean, minimally disturbed, and reasonably distributed sample and label data, leading to a more accurate model and improved prediction accuracy.
[0111] S7: Use the denoised PSO-XGBoost model to estimate the health status of new energy vehicle batteries.
[0112] In this example, the denoised PSO-XGBoost model is used to estimate the health status of new energy vehicle batteries. The resulting battery health estimate is used to quantify the degree of degradation of the battery's current performance relative to its initial performance. For example, if the battery's health estimate falls below 80%, proactive intervention is indicated.
[0113] Furthermore, through cross-comparison verification with different models, it is shown that the denoised PSO-XGBoost model of this embodiment has better accuracy and robustness.
[0114] Specifically, cross-comparison and verification with the initial XGBoost model, the XGBoost model without feature screening, and the PSO-XGboost model without denoising showed that the denoised PSO-XGBoost model has higher accuracy and robustness, and can better estimate the health status of new energy vehicle batteries.
[0115] Example 2
[0116] Provided is a device for estimating the health status of batteries in new energy vehicles, which is applied to servers.
[0117] The device is as Figure 3As shown, it includes: a data acquisition module for obtaining real-time monitoring data of new energy vehicles; a data preprocessing module for cleaning, sorting and other operations on the real-time monitoring data of new energy vehicles; a vehicle state classification module for judging the state of the vehicle based on the real-time monitoring data of new energy vehicles; a feature extraction module for extracting the initial feature matrix; and a model training module for training the XGBoost model.
[0118] In particular, the new energy vehicle battery health status estimation device of this embodiment further includes a prediction request receiving module and a prediction result output module, which are used to receive a battery health status estimation request and output an estimation result.
[0119] Example 3
[0120] A storage medium is provided, on which computer-executable commands are stored. When the commands are executed by a processor, the method for estimating the health status of a new energy vehicle battery as described in any of the above embodiments is used.
[0121] In summary, the method and device for estimating the health status of new energy vehicle batteries proposed in the present invention can solve the technical problems in the existing technology that the vehicle's entire life cycle data is not fully utilized, the battery health status estimation is difficult, and it is not conducive to the estimation of the battery health status of new energy vehicles. The XGBoost model is optimized by the PSO particle swarm optimization algorithm to further predict the health status of new energy vehicle batteries. On the basis of fully utilizing the various characteristics of the vehicle's entire life cycle low-error data, the accuracy and effectiveness of the battery health status prediction are improved.
[0122] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for estimating the health status of a battery in a new energy vehicle, characterized in that: The following steps are involved: S1. Obtain all real-time vehicle monitoring data throughout the life cycle of new energy vehicles; S2. Data preprocessing, including data cleaning and sorting, dividing the real-time vehicle data into operating conditions to obtain the vehicle charging, discharging, and rest intervals; S3. Extract and preliminarily process initial features, including battery-related information features, frequency domain-related features, time domain-related features, statistical analysis-related features, and composite features, to form an initial feature matrix; S4. Divide the training set and test set, and use the method of recursive feature elimination combined with XGBoost to filter the initial features and obtain the optimal feature subset; S5. Optimize the parameters of the XGBoost model through the particle swarm optimization algorithm and train the XGBoost model; S6. Based on the error influencing factor analysis, the training set samples are adjusted to reduce the noise of the training set samples and obtain the denoised PSO-XGBoost model; S7. Use the denoised PSO-XGBoost model to estimate the health status of new energy vehicle batteries.
2. The method for estimating the health status of a new energy vehicle battery according to claim 1, wherein: In step S1, all real-time vehicle monitoring data of the new energy vehicle throughout its life cycle includes: vehicle identification code, collection time, displayed SOC, charging status, vehicle status, current, cell voltage, cell temperature and mileage data.
3. The method for estimating the health status of a new energy vehicle battery according to claim 2, wherein: The data preprocessing in step S2 includes the following sub-steps: S21, performing data cleaning on the real-time vehicle monitoring data collected in step S1 to remove abnormal data, including: invalid data, data outside the numerical range, and duplicate data; S22. Arrange the cleaned data in ascending time order to obtain the time difference between two adjacent rows of data; S23, missing data filling, filling in the data packets lost or delayed in the real-time vehicle monitoring data; S24. Based on the vehicle status field data, including: charging status, vehicle status, current, and displayed SOC data, the operating conditions of the entire vehicle data are divided into: charging interval, discharging interval, and static interval.
4. The method for estimating the health status of a new energy vehicle battery according to claim 1, wherein: The initial features described in step S3 also include composite features; The battery-related information characteristics include: the internal chemical composition and reaction mechanism of different types of battery cells; The frequency domain related information features include: the distribution ratio of different battery discharge rates and temperature ranges, and the energy of the charge and discharge current fluctuation spectrum; The time domain related information features include: vehicle running time; The statistical analysis related features include: total charging energy, battery consistency; The composite characteristics include: high temperature and high rate charging state.
5. The method for estimating the health status of a new energy vehicle battery according to claim 1, wherein: In step S4, the initial feature set is screened using a combination of recursive feature elimination and XGBoost, which includes the following sub-steps: S41, train the initial XGBoost model; S42. After the training is completed, the importance score of each feature is obtained using the method provided by the XGBoost model. The gain function calculation formula is as follows; Among them, g i and h i are the first-order derivative and second-order derivative of sample i, I L and I R are the left and right subsets after splitting, and λ is the regularization coefficient; S43. Sort all features according to their importance scores, and determine features to be removed from the feature set according to pre-set rules, including but not limited to: removing the k features with the lowest scores and removing the bottom n% of the ranked features; S44, deleting the features to be removed from the feature matrix X to obtain a new feature matrix X_new; S45. Retrain the XGBoost model using the new feature matrix X_new and target variable y S46. Repeat steps S41 to S45, that is, retrain the model with the remaining features each time until the preset stopping condition is reached, such as the number of remaining features ≤ the target value or the model performance drops by more than the threshold, and use the remaining feature set as the optimal feature subset screened by combining RFE with XGBoost.
6. The method for estimating the health status of a new energy vehicle battery according to claim 5, wherein: The training of the XGBoost model in step S5 includes the following sub-steps: S51. Define the objective function, which accepts a set of hyperparameters as input and returns the performance indicators of the XGBoost model, including the cross-validation accuracy and F1 score. The calculation formula is as follows: Objective(θ)=F1 CV (XGBoost(θ,X train ,y train )) Among them, Objective(θ) is the hyperparameter θ in the training set X train The average F1 score of the XGBoost model trained on the dataset is calculated by K-fold cross validation and used to evaluate the generalization performance of the model; θ represents all the configuration parameters of XGBoost, X train ,y train Represents the feature matrix and label vector of the training dataset respectively; Precision represents the precision rate, Recall represents the recall rate, and the F1 score comprehensively considers the precision rate and recall rate to measure the performance of the XGBoost model; S52, initializing the particle swarm optimization algorithm, initializing the position and velocity of the particle swarm, where the position of each particle represents a set of hyperparameters, and the velocity represents the moving direction and speed of the particle in the parameter space; S53, running the particle swarm optimization algorithm, iteratively updating the position and velocity of the particle until the maximum number of iterations is reached or the stopping condition is satisfied; in each iteration, the particle updates its position based on its own historical best position and the global best position; The velocity v of particle i in parameter space i and position x i The update formula is as follows; Among them, w is the inertia weight, c1, c2 are learning factors, r1, r2 ~ U (0, 1), P best,i is the best historical position of particle i, g best,i is the global optimal position of particle i; S54. Use the optimal parameters obtained by the particle swarm optimization algorithm to train the XGBoost model.
7. The method for estimating the health status of a new energy vehicle battery according to claim 6, wherein: In step S6, the training set samples are adjusted, including the following sub-steps: S61, using the XGBoost model trained in step S54, predicting the test set samples to obtain preliminary prediction results; S62. Based on the preliminary prediction result, obtain an error evaluation index value between the actual health state of the battery and the prediction result; S63. Based on the error evaluation index, the error influencing factor analysis is performed on the samples with large errors, the training set is denoised, and the denoised PSO-XGBoost model is obtained.
8. The method for estimating the health status of a new energy vehicle battery according to claim 7, wherein: In step S7, the health status of the new energy vehicle battery is estimated by the denoised PSO-XGBoost model to obtain the battery health status estimation data, which is used to quantify the degree of attenuation of the battery's current performance relative to the initial performance.
9. A device for estimating the health status of a battery on a new energy vehicle, used to implement the method according to any one of claims 1 to 8, characterized in that: include: Data acquisition module, used to obtain all real-time vehicle monitoring data throughout the life cycle of new energy vehicles; Data preprocessing module, used to clean and sort real-time vehicle monitoring data; Vehicle status classification module, used to determine the vehicle status based on real-time vehicle monitoring data; Feature module, used to extract the initial feature matrix; Model training module, used to train the XGBoost model; The request receiving module and the prediction result output module are used to receive the battery health status estimation request and output the estimation result.
10. A storage medium, characterized in that: A computer program is stored thereon, which, when executed by a processor, implements the steps in the method for estimating the health status of a new energy vehicle battery according to any one of claims 1 to 8.
Citation Information
Cited By
Battery health state estimation method and system, electronic equipment and storage medium
CN121186617A