Training method, equipment and storage medium for battery health status prediction model
By introducing source domain dictionary and sparse coding, combined with prediction loss and domain difference loss optimization, the problem of poor generalization performance of battery health status prediction model when cross-domain data distribution shifts is solved, and higher prediction accuracy and adaptability are achieved.
Patent Information
- Application Number
- CN202511054853.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-07-30
AI Technical Summary
The generalization performance of existing battery health status prediction models degrades when cross-domain data distribution shifts, resulting in poor prediction accuracy in new environments.
By introducing source domain dictionary and sparse coding, the common structural characteristics of different battery application scenarios and the non-stationary characteristics of the dynamic aging process are captured. The prediction loss and domain difference loss are combined for collaborative optimization to update the parameters of the health status prediction model.
The model's prediction stability and accuracy under different working conditions are improved, its adaptability to new environments is enhanced, and the overall performance of the battery health status prediction model is improved.
Smart Images

Figure CN120561657B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of battery technology, and in particular to a training method, device, and storage medium for a battery health status prediction model. Background Art
[0002] Lithium-ion batteries are one of the most widely used battery technologies, suitable for a variety of applications, including mobile devices, electric vehicles, and renewable energy storage. However, as lithium-ion batteries age and cycle, their performance and capacity gradually decline, impacting the operational efficiency of the device or system. Therefore, accurate and timely estimation and monitoring of the status of lithium-ion batteries is crucial. The state of health (SOH) of a lithium-ion battery is an indicator that assesses the state and performance of a battery after long-term use and charge-discharge cycles. Accurate SOH estimation can help users and system maintenance personnel understand the battery's lifespan and availability, allowing them to perform battery replacement or maintenance in advance, thereby reducing the risk and cost of equipment failure.
[0003] Currently, battery health status estimation mainly relies on data-driven methods. Although data-driven methods can mine useful patterns in battery operating data, they usually assume that training data and test data come from the same distribution. In reality, due to factors such as charging and discharging conditions, environmental stress, and individual aging differences, cross-domain data distribution shifts, resulting in a decrease in the model's generalization performance in new environments. Summary of the Invention
[0004] The main purpose of this application is to provide a training method, device and storage medium for a battery health status prediction model, aiming to solve the technical problem of the existing battery health status prediction model having degraded generalization performance in the case of cross-domain data distribution offset.
[0005] To achieve the above objectives, the present application proposes a method for training a battery health state prediction model, the method comprising:
[0006] Determine a source domain spatiotemporal feature matrix based on source domain target time series data of a source domain battery under charge and discharge conditions, and determine a target domain spatiotemporal feature matrix based on target domain target time series data of a target domain battery under charge and discharge conditions;
[0007] Perform battery health state prediction based on the source domain spatiotemporal feature matrix to obtain a source domain battery SOH prediction value;
[0008] Performing an iterative solution based on the source domain spatiotemporal feature matrix to obtain a source domain dictionary and a source domain sparse coefficient matrix;
[0009] Reconstructing target domain features based on the source domain dictionary, and determining the difference between the two domains according to the corresponding reconstruction results and the target domain spatiotemporal feature matrix;
[0010] Based on the source domain battery SOH predicted value, the source domain battery SOH true value and the difference between the two domains, a total loss value is obtained, and the parameters of the health status prediction model are updated according to the total loss value. When the total loss value is less than or equal to the preset value, the trained battery health status prediction model is obtained.
[0011] In some embodiments, the source domain target time series data is at least one of first voltage time series data, first current time series data, and first battery temperature time series data during a constant current discharge test of a battery after cyclic constant current and constant voltage charging;
[0012] The target domain target timing data is at least one of second voltage timing data, second current timing data, and second battery temperature timing data during a random discharge test of the battery after cyclic constant current and constant voltage charging.
[0013] In some embodiments, the step of performing an iterative solution based on the source domain spatiotemporal feature matrix to obtain a source domain dictionary and a source domain sparse coefficient matrix includes:
[0014] The importance-weighted cross-validation method is used to determine the target hyperparameter from multiple preset candidate hyperparameters;
[0015] Initialize the source domain dictionary and obtain the intermediate value of the source domain dictionary;
[0016] Fixing the intermediate value of the source domain dictionary, and obtaining the intermediate value of the source domain sparse coefficient matrix by using a fast iterative soft threshold algorithm according to the source domain spatiotemporal feature matrix and the target hyperparameter;
[0017] Fixing the intermediate value of the source domain sparse coefficient matrix, and updating the intermediate value of the source domain dictionary through the optimal direction algorithm according to the source domain spatiotemporal feature matrix and the target hyperparameter;
[0018] If the intermediate value of the source domain sparse coefficient matrix and the intermediate value of the source domain dictionary do not converge, the step of fixing the intermediate value of the source domain dictionary and obtaining the intermediate value of the source domain sparse coefficient matrix by a fast iterative soft threshold algorithm according to the source domain spatiotemporal feature matrix and the target hyperparameter is jumped to execution;
[0019] If the intermediate value of the source domain sparse coefficient matrix and the intermediate value of the source domain dictionary converge, the intermediate value of the source domain sparse coefficient matrix is determined as the source domain dictionary, and the intermediate value of the source domain sparse coefficient matrix is determined as the source domain sparse coefficient matrix.
[0020] In some embodiments, the step of determining the target hyperparameter from a plurality of preset candidate hyperparameters using an importance-weighted cross-validation method includes:
[0021] Splitting the source domain spatiotemporal feature matrix and the target domain spatiotemporal feature matrix into a training set and a validation set, wherein the source domain spatiotemporal feature matrix and the target domain spatiotemporal feature matrix have the same probability distribution in the validation set and the training set;
[0022] Performing classification training on the classifier to be trained based on the training set to obtain the trained classifier;
[0023] Input each verification sample in the verification set into the classifier to perform category prediction, and obtain the category probability of each verification sample;
[0024] Based on the category probability of each of the verification samples, the density ratio weight is calculated using the Bayesian formula to obtain the density ratio of the verification set samples;
[0025] Traverse the preset candidate hyperparameter set, and for each of the preset candidate hyperparameters, use the fast iterative soft threshold algorithm and the optimal direction method to iteratively solve based on the verification set and the preset candidate hyperparameters to obtain the candidate verification set dictionary and the candidate verification set sparse coefficient matrix corresponding to the preset candidate hyperparameter; determine the preset candidate hyperparameter corresponding to the reconstruction loss with the smallest value as the target hyperparameter.
[0026] In some embodiments, reconstructing target domain features based on the source domain dictionary and determining the difference between the two domains according to the corresponding reconstruction results and the target domain spatiotemporal feature matrix includes:
[0027] Performing target domain sparse coding according to the source domain dictionary and the target domain spatiotemporal feature matrix to obtain a target domain sparse coefficient matrix;
[0028] Determine the corresponding reconstruction result according to the target domain sparse coefficient matrix and the source domain dictionary, and calculate the reconstruction residual according to the reconstruction result and the target domain spatiotemporal feature matrix to obtain a reconstruction residual;
[0029] According to the reconstructed residual and the target domain sparse coefficient matrix, a difference matrix between the source domain dictionary and the target domain implicit dictionary is solved by a ridge regression algorithm to obtain the difference between the two domains.
[0030] In some embodiments, the step of obtaining a total loss value based on the source domain battery SOH predicted value, the source domain battery SOH true value, and the difference between the two domains includes:
[0031] Calculating a regression loss value corresponding to a mean square error loss function based on the source domain battery SOH predicted value and the source domain battery SOH true value;
[0032] Based on the difference between the two domains, a domain difference loss value is calculated by using the square of the Frobenius norm;
[0033] The total loss value is determined according to the regression loss value and the domain difference loss value.
[0034] In some embodiments, after the step of obtaining the trained battery health status prediction model, the method further includes:
[0035] Obtain battery target timing data of the battery to be tested under charge and discharge conditions;
[0036] Inputting the battery target time series data into the feature extractor of the battery health state prediction model, performing spatiotemporal feature extraction on the battery target time series data by the feature extractor to obtain a spatiotemporal feature matrix of the battery to be tested;
[0037] The spatiotemporal characteristic matrix of the battery to be detected is input into the regression model of the battery health state prediction model, and the battery health state of the battery to be detected is predicted by the regression model to obtain the SOH prediction value of the battery to be detected.
[0038] In some embodiments, the step of performing battery health state prediction based on the source domain spatiotemporal feature matrix to obtain a source domain battery SOH prediction value includes:
[0039] Reshaping the source domain spatiotemporal feature matrix to obtain reshaped features;
[0040] Performing convolution processing on the reshaped features to obtain convolution features;
[0041] Performing pooling processing on the convolutional features to obtain corresponding pooling processing results;
[0042] Performing data reshaping processing on the pooling processing result to obtain source domain battery sequence characteristics;
[0043] Inputting the source domain battery sequence features as input sequences into the input layer of the long-term and short-term neural network of the regression model, and inputting the output sequence features of the input layer into the hidden layer of the long-term and short-term neural network in sequence;
[0044] Based on the calculation of connection weights and thresholds between each gating unit and cell unit in the hidden layer, the features of the output sequence of the input layer are abstracted into a new dimensional space to extract the spatiotemporal variation characteristics of the source domain battery charge and discharge conditions, and the spatiotemporal variation characteristics of the source domain battery charge and discharge conditions are linearly divided. The result of the linear division calculated by the hidden layer is input into a fully connected layer. Each gating unit includes an input gate, a forget gate, and an output gate;
[0045] A nonlinear transformation is performed on the input value of the fully connected layer to predict the source domain battery SOH based on the input value of the fully connected layer to obtain the source domain battery SOH prediction value.
[0046] In addition, to achieve the above-mentioned purpose, the present application also proposes a training device for a battery health state prediction model, wherein the training device for the battery health state prediction model comprises:
[0047] a feature extraction module, configured to determine a source domain spatiotemporal feature matrix based on source domain target time series data of a source domain battery under charge and discharge conditions, and to determine a target domain spatiotemporal feature matrix based on target domain target time series data of a target domain battery under charge and discharge conditions;
[0048] A prediction module is used to predict the battery health state based on the source domain spatiotemporal feature matrix to obtain a source domain battery SOH prediction value;
[0049] A dictionary learning module is used to perform iterative solution based on the source domain spatiotemporal feature matrix to obtain a source domain dictionary and a source domain sparse coefficient matrix;
[0050] A reconstruction module, configured to reconstruct target domain features based on the source domain dictionary, and determine the difference between the two domains according to the corresponding reconstruction results and the target domain spatiotemporal feature matrix;
[0051] A parameter updating module is used to obtain a total loss value based on the source domain battery SOH predicted value, the source domain battery SOH true value and the difference between the two domains, and to update the parameters of the health status prediction model according to the total loss value. When the total loss value is less than or equal to the preset value, the trained battery health status prediction model is obtained.
[0052] In addition, to achieve the above-mentioned purpose, the present application also proposes a training device for a battery health status prediction model, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program is configured to implement the steps of the training method for the battery health status prediction model as described above.
[0053] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the training method of the battery health status prediction model as described above are implemented.
[0054] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the training method of the battery health status prediction model as described above.
[0055] One or more technical solutions proposed in this application have at least the following technical effects: determining a source domain spatiotemporal feature matrix based on source domain target time series data, and determining a target domain spatiotemporal feature matrix based on target domain target time series data of a target domain battery under charge and discharge conditions, thereby capturing the battery's behavior patterns under different operating conditions. The source domain battery's state of health (SOH) is predicted based on the source domain spatiotemporal feature matrix, obtaining a source domain SOH prediction value. Iteratively solving the source domain spatiotemporal feature matrix yields a source domain dictionary and a source domain sparse coefficient matrix, laying the foundation for subsequent target domain feature reconstruction. Target domain features are reconstructed based on the source domain dictionary, and the difference between the two domains is determined based on the corresponding reconstruction results and the target domain spatiotemporal feature matrix. The domain difference is stabilized and quantified through residual reconstruction. A total loss value is obtained based on the source domain SOH prediction value, the true source domain SOH value, and the difference between the two domains. The parameters of the feature extractor and regression model of the health state prediction model are updated based on the total loss value. The prediction loss and domain difference loss are combined to balance domain alignment and prediction accuracy. When the total loss value is less than or equal to a preset value, a trained battery state of health prediction model is obtained. This application introduces source domain dictionaries and sparse coding to capture the common structural characteristics between different battery application scenarios and the correlation of non-stationary features in the dynamic aging process, thereby effectively alleviating the problem of model generalization performance degradation caused by cross-domain data distribution offset, improving the model's adaptability to new environments, and using prediction loss and domain difference loss for collaborative optimization to simultaneously reduce domain differences while improving regression accuracy, thereby obtaining a battery health status prediction model that can accurately predict battery SOH and has good cross-domain adaptability, thereby improving the overall performance of the battery health status prediction model. By comprehensively considering multiple aspects such as dictionary learning, feature reconstruction, and loss function, the problem of poor generalization performance of battery health status prediction models in the existing technology when facing cross-domain data distribution offset is solved, and the stability and accuracy of the model's prediction under different working conditions are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0057] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0058] Figure 1 A flowchart illustrating a first embodiment of a method for training a battery health status prediction model according to the present invention;
[0059] Figure 2This is a schematic diagram of the relationship between the voltage curve and battery health status during the charging phase of the source domain data of this application;
[0060] Figure 3 This is a schematic diagram of the relationship between the current curve and battery health status during the charging phase of the source domain data of this application;
[0061] Figure 4 This is a diagram showing the relationship between the battery profile curve and the battery health status during the charging phase of the source domain data of this application;
[0062] Figure 5 A flowchart illustrating a second embodiment of the method for training a battery health status prediction model of the present application;
[0063] Figure 6 A flowchart of the third embodiment of the method for training a battery health status prediction model of the present application is provided;
[0064] Figure 7 This is a schematic diagram of the module structure of the training device for the battery health status prediction model according to an embodiment of the present application;
[0065] Figure 8 Schematic diagram of the device structure of the hardware operating environment involved in the training method of the battery health status prediction model in the embodiment of the present application.
[0066] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0067] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.
[0068] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0069] The main solution of the embodiment of the present application is: determining the source domain spatiotemporal feature matrix based on the source domain target time series data of the source domain battery under charging and discharging conditions, and determining the target domain spatiotemporal feature matrix based on the target domain target time series data of the target domain battery under charging and discharging conditions; predicting the battery state of health based on the source domain spatiotemporal feature matrix to obtain the source domain battery SOH prediction value; iteratively solving based on the source domain spatiotemporal feature matrix to obtain the source domain dictionary and the source domain sparse coefficient matrix; reconstructing the target domain features based on the source domain dictionary, and determining the difference between the two domains based on the corresponding reconstruction results and the target domain spatiotemporal feature matrix; obtaining the total loss value based on the source domain battery SOH prediction value, the source domain battery SOH true value and the difference between the two domains, and updating the parameters of the health state prediction model based on the total loss value. When the total loss value is less than or equal to the preset value, a trained battery health state prediction model is obtained.
[0070] In this embodiment, for ease of description, the following description is made with the training device of the battery health status prediction model as the execution subject.
[0071] Lithium-ion batteries are one of the most widely used battery technologies, suitable for a variety of applications, including mobile devices, electric vehicles, and renewable energy storage. However, as lithium-ion batteries age and cycle, their performance and capacity gradually decline, impacting the operational efficiency of the device or system. Therefore, accurate and timely estimation and monitoring of the state of lithium-ion batteries is crucial. Lithium-ion battery state of health (SOH) is an indicator that assesses the battery's condition and performance after long-term use and charge-discharge cycles. Accurate SOH estimation can help users and system maintenance personnel understand the battery's lifespan and usability, allowing them to proactively replace or maintain the battery, thereby reducing the risk and cost of equipment failure.
[0072] Currently, battery health state estimation relies primarily on data-driven approaches. While these methods can uncover useful patterns in battery operating data, they typically assume that training and test data come from the same distribution. In reality, factors such as charging and discharging conditions, environmental stress, and individual aging differences can lead to cross-domain data distribution shifts, resulting in decreased model generalization performance in new environments. Furthermore, existing research has attempted to address these challenges through transfer learning and domain adaptation techniques. For example, domain alignment methods using adversarial training can narrow the gap between the source and target domains, or dictionary learning methods can be used to construct a shared feature base space. However, these methods can struggle with capturing instability and non-stationary feature correlations when processing serialized battery data.
[0073] In response to the above problems, this application provides a solution. By introducing source domain dictionaries and sparse coding, the common structural characteristics between different battery application scenarios and the correlation of non-stationary features in the dynamic aging process are captured, thereby effectively alleviating the problem of model generalization performance degradation caused by cross-domain data distribution offset, improving the model's adaptability to new environments, and using prediction loss and domain difference loss for collaborative optimization. While simultaneously reducing domain differences, the regression accuracy is improved, resulting in a battery health status prediction model that can accurately predict battery SOH and has good cross-domain adaptability, thereby improving the overall performance of the battery health status prediction model. By comprehensively considering multiple aspects such as dictionary learning, feature reconstruction, and loss function, the problem of poor generalization performance of battery health status prediction models in the existing technology when facing cross-domain data distribution offset is solved, and the stability and accuracy of the model's prediction under different working conditions are improved.
[0074] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device capable of implementing the above functions, a battery health status prediction model training device, etc. The following uses the battery health status prediction model training device as an example to illustrate this embodiment and the following embodiments.
[0075] Based on this, the embodiment of the present application provides a method for training a battery health status prediction model, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the training method for the battery health status prediction model of the present application.
[0076] In this embodiment, the training method of the battery health status prediction model includes steps 101 to 105:
[0077] Step 101: determine a source domain spatiotemporal feature matrix based on source domain target time series data of a source domain battery under charge and discharge conditions, and determine a target domain spatiotemporal feature matrix based on target domain target time series data of a target domain battery under charge and discharge conditions.
[0078] Specifically, the source domain target time series data and the true state of health (SOH) value of the source domain battery under charge and discharge conditions are obtained, as well as the target domain target time series data of the target domain battery under charge and discharge conditions. The source domain target time series data and the target domain target time series data are input into the feature extractor of the battery health state prediction model. The feature extractor extracts spatiotemporal features to obtain the source domain spatiotemporal feature matrix and the target domain spatiotemporal feature matrix.
[0079] The above-mentioned source domain target time series data can be the time series data of the battery during the charge and discharge cycle of the laboratory standard cycle test (cyclic constant current and constant voltage charging followed by constant current discharge test), including current, voltage, battery temperature, timestamp, etc. The source domain target time series data can reflect the working status of the source domain battery and its dynamic behavior. The source domain battery SOH true value is the true value of the battery health status obtained through high-precision experiments, which is used to supervise model training. In this application, it is the capacity retention rate of the corresponding cycle, which is the goal of model learning. The target domain target time series data is the time series data of the battery during the charge and discharge cycle of the test simulating the actual application scenario (cyclic constant current and constant voltage charging followed by random discharge test). There is an offset in the distribution of the target domain target time series data and the source domain target time series data. There is no corresponding SOH true value (unlabeled data) or there is noise. It is the target scenario data that the model needs to generalize.
[0080] In some embodiments, several batteries are divided into two groups, one group is source domain batteries, and the other group is target domain batteries. In a laboratory environment, the source domain batteries are subjected to a constant current and constant voltage charging cycle followed by a constant current discharge test, and the time series data such as voltage, current, and temperature of each cycle are recorded. The SOH true value of each battery in each cycle is obtained through high-precision measurement equipment, and the collected time series data and the corresponding SOH true value are paired and stored to obtain the source domain target time series data and the source domain battery SOH true value. The target domain batteries are subjected to a random discharge test after cyclic constant current and constant voltage charging to simulate the timing changes of the battery's charge and discharge conditions in actual application scenarios, and the time series data such as voltage, current, and temperature of each cycle are recorded. The collected time series data are stored to obtain the target domain target time series data. By obtaining source domain target time series data, source domain battery SOH true value and target domain target time series data, the model is provided with the input data required for training. The source domain data provides rich training information, and the target domain data simulates the actual application scenario. By combining the source domain data and the target domain data, the model can learn cross-domain shared features during the training process and better understand the battery behavior patterns under different working conditions, thereby improving its adaptability to the target domain data.
[0081] In some embodiments, the feature extractor is the front-end component of the battery health prediction model and is an algorithm or model that can automatically identify and extract useful features. For example, the feature extractor can be a recurrent neural network (RNN), a long short-term memory (LSTM), a graph neural network (GNN), or a transformer model. The feature extractor can be used to convert raw time series data into a more easily processable feature representation, mapping the raw charge and discharge time series data into a high-dimensional feature space and automatically learning hierarchical representations in the data. The source domain spatiotemporal feature matrix is a matrix generated after spatiotemporal feature extraction of the source domain target time series data. It contains high-dimensional features extracted from the source domain target time series data and can reflect not only dynamic changes in the time dimension (such as trends during the charge and discharge process) but also spatial correlations between different measurement parameters (such as the relationship between voltage and current). The target domain spatiotemporal feature matrix is a matrix-shaped data generated after the target domain target time series data is extracted through spatiotemporal feature extraction. It contains high-dimensional features extracted from the target domain target time series data. It can not only reflect the dynamic changes of the target domain target time series data in the time dimension (such as the trend during the charging and discharging process), but also includes the spatial correlation between different measurement parameters (such as the relationship between voltage and current).
[0082] In some embodiments, before the source domain target time series data and the target domain target time series data are input into the feature extractor of the battery health state prediction model, the source domain and target domain time series data can be preprocessed, such as normalization, missing value filling, noise reduction and other operations to improve data quality, and organize the source domain and target domain time series data into a format suitable for input into the feature extractor. The preprocessed source domain target time series data and target domain target time series data are input into the feature extractor of the battery health state prediction model for spatiotemporal feature extraction, capturing long-term dependencies in the time series and extracting local spatial features, and converting the original charge and discharge data into a high-dimensional feature matrix. For the source domain target time series data, the feature extractor outputs the source domain spatiotemporal feature matrix , which can represent the key features in the source domain data. For the target domain target time series data, the feature extractor outputs the target domain spatiotemporal feature matrix , which can represent the key features in the target domain data. The extracted source domain spatiotemporal feature matrix and target domain spatiotemporal feature matrix can be saved as NumPy arrays or Tensors for subsequent domain alignment and regression. By sharing a feature extractor, valuable features for SOH prediction can be extracted from complex source domain target time series data and target domain target time series data, laying the foundation for subsequent cross-domain transfer learning. Using the same feature extractor to extract features from source and target domain data and identify common features between the two helps reduce model performance degradation caused by data distribution shift.
[0083] Step 102 : Predict the battery state of health based on the source domain spatiotemporal feature matrix to obtain a source domain battery SOH prediction value.
[0084] Specifically, the source domain spatiotemporal feature matrix is input into the regression model of the battery health state prediction model, and the battery health state of the source domain battery is predicted based on the regression model to obtain the source domain battery SOH prediction value.
[0085] The source domain spatiotemporal feature matrix contains key features extracted from the source domain target time series data, reflecting the operating status of the source domain battery at different time points and its changing trend. The regression model is a deep learning model used in the battery health status prediction model to map high-dimensional feature vectors (source domain spatiotemporal feature matrix) to SOH values. In this application, the regression model can be a hybrid model based on a convolutional neural network (CNN)-LSTM. The source domain battery SOH prediction value is an estimated value of the source domain battery health status obtained after calculation by the regression model, which is used for subsequent evaluation of the battery health status prediction model performance and optimization of model parameters.
[0086] In some embodiments, the source domain spatiotemporal feature matrix after feature extraction is input as input data to the regression model. The regression model performs a series of calculations (such as convolution processing, weight adjustment, activation function application, etc.) to output a source domain battery SOH prediction value. During the training process, the regression model learns feature dimensions that are strongly correlated with SOH and suppresses irrelevant or redundant information. The source domain battery SOH prediction value can be used to evaluate the accuracy of the model and provide a basis for further optimization. By inputting the source domain spatiotemporal feature matrix into the regression model, the source domain battery SOH prediction value is obtained, and the source domain battery SOH prediction value is constrained by the SOH true value, thereby improving the model's ability to capture the essential laws of the target domain. The feature extractor is updated in coordination with the domain alignment loss obtained by subsequent calculations to achieve a balanced improvement in cross-domain generalization performance.
[0087] Step 103: performing an iterative solution based on the source domain spatiotemporal feature matrix to obtain a source domain dictionary and a source domain sparse coefficient matrix.
[0088] Specifically, the source domain dictionary The source domain sparse coefficient matrix is a set of basis vectors learned from the source domain feature matrix. In this application, each element in the source domain dictionary can be regarded as an abstract representation of a specific battery behavior pattern. In addition, the source domain dictionary can be used as a benchmark for cross-domain feature alignment to reconstruct target domain features and measure distribution differences. is the linear combination coefficient matrix of the source domain features under the source domain dictionary, satisfying the sparsity constraint (most elements are close to zero). The source domain spatiotemporal feature matrix can be reconstructed using the basis vectors in the source domain dictionary and the source domain sparse coefficient matrix.
[0089] In some embodiments, the dictionary is initialized by randomly generating or using a preset pattern as the initial value. The fast iterative soft threshold algorithm (FISTA) can be used to sparsely encode the given source domain spatiotemporal feature matrix to find a set of sparse coefficients that minimizes the error between the data reconstructed using the dictionary and the original data. At the same time, the optimal direction method is used to update the dictionary so that the dictionary elements can better capture the main structure of the data. After multiple iterations, a set of stable source domain dictionaries and corresponding source domain sparse coefficient matrices are finally obtained. The source domain dictionary and the corresponding source domain sparse coefficient matrix are used together to characterize the behavioral pattern of the source domain battery. Through dictionary learning, the complex source domain spatiotemporal feature matrix is compressed into a small number of basic patterns (source domain dictionary and source domain sparse coefficient matrix), simplifying the complexity of subsequent analysis. At the same time, while iteratively solving the source domain dictionary through the fast iterative soft threshold algorithm and the optimal direction method, the basic patterns of battery behavior can be captured and a shared feature base space can be constructed, which can alleviate the data distribution offset problem caused by differences in operating conditions between the target domain battery and the source domain battery to a certain extent. Especially when the target domain data lacks labels, the use of the source domain dictionary helps to understand the potential structure of the target domain data and identify similar behavior patterns in the target domain, capturing the non-stationary feature correlation in the battery aging process, which is very important for accurately predicting SOH.
[0090] Step 104 : reconstruct the target domain features based on the source domain dictionary, and determine the difference between the two domains according to the corresponding reconstruction results and the target domain spatiotemporal feature matrix.
[0091] Specifically, the difference between the two domains is the magnitude by which the source domain dictionary needs to be adjusted to minimize the difference in feature distribution between the source and target domains. Reconstructing target domain features in this application involves reconstructing the spatiotemporal feature matrix of the target domain using the source domain dictionary, and approximating the target domain features using a linear combination of basis vectors in the source domain dictionary.
[0092] In some embodiments, the source domain dictionary is used to reconstruct the target domain features, and sparse coding technology is used to find a set of coefficients so that the basis vectors in the source domain dictionary are as close as possible to the target domain spatiotemporal feature matrix after weighted summation according to the set of coefficients, thereby obtaining the corresponding reconstruction result. By comparing the reconstruction result of the source domain dictionary with the original target domain spatiotemporal feature matrix, the difference matrix between the source domain dictionary and the target domain implicit dictionary can be solved by the ridge regression algorithm to obtain the difference between the two domains. The difference between the two domains can reflect whether the source domain dictionary represents the target domain data, and further indicate the size of the distribution difference between the source domain and the target domain. By reconstructing and analyzing the difference of the target domain features, a basis can be provided for subsequent parameter updates and adjustments of the model, which can make the model pay more attention to the behavior patterns that are unique to the target domain but not fully captured by the source domain, enhance the applicability of the model in different application scenarios, and help alleviate the problem of decreased generalization performance due to distribution offset.
[0093] In step 105, a total loss value is obtained based on the source domain battery SOH prediction value, the source domain battery SOH true value, and the difference between the two domains, and the parameters of the feature extractor and regression model of the health state prediction model are updated based on the total loss value. When the total loss value is less than or equal to the preset value, a trained battery health state prediction model is obtained.
[0094] Specifically, the total loss value is the weighted sum of the regression loss (source domain prediction error) and the domain difference loss, which is used to jointly optimize the battery health status prediction model, balance the regression accuracy and cross-domain distribution alignment, and drive the battery health status prediction model to simultaneously meet the prediction accuracy and generalization ability.
[0095] In some embodiments, for each sample in the source domain data set, the difference between the source domain battery SOH prediction value and the source domain battery SOH true value is compared, and the difference can be quantified using the mean square error (MSE) or mean absolute error (MAE) to calculate the regression loss value. According to the above two domain differences, calculate the corresponding domain difference loss value , and design a total loss function that includes domain difference loss value and regression loss value, such as ,in, is the total loss value, is the regression loss value, The domain difference loss is the loss value, and β is the coefficient that weighs the two loss values. Based on the total loss value, the backpropagation algorithm is used to calculate the gradient of the total loss with respect to the model parameters. The Adaptive Moment Estimation (Adam) optimizer or the Root Mean Square Propagation (RMSProp) optimizer can be used to update the parameters of the feature extractor and regression model. Training is terminated when the total loss value is less than or equal to a preset threshold (e.g., 0.01) or the maximum number of training rounds is reached, resulting in a battery health prediction model that works effectively in cross-domain environments. By incorporating the difference between the two domains into the loss function, optimization is performed to address cross-domain data distribution shifts, helping to mitigate the decline in model prediction accuracy caused by data distribution changes due to factors such as operating conditions and aging. A multi-objective joint optimization approach is used to dynamically adjust the parameters of the feature extractor and regression model based on the total loss value, enabling the model to flexibly adapt to new data distributions in different application scenarios, improving the overall robustness and applicability of the model.
[0096] Based on the training method of the battery health status prediction model provided in this application, by introducing source domain dictionaries and sparse coding, the common structural characteristics between different battery application scenarios and the correlation of non-stationary features in the dynamic aging process are captured, thereby effectively alleviating the problem of model generalization performance degradation caused by cross-domain data distribution offset, improving the model's adaptability to new environments, and using prediction loss and domain difference loss for collaborative optimization, while simultaneously reducing domain differences and improving regression accuracy, a battery health status prediction model that can accurately predict battery SOH and has good cross-domain adaptability is obtained, thereby improving the overall performance of the battery health status prediction model. By comprehensively considering multiple aspects such as dictionary learning, feature reconstruction, and loss function, the problem of poor generalization performance of the battery health status prediction model in the existing technology when facing cross-domain data distribution offset is solved, and the stability and accuracy of the model's prediction under different working conditions are improved.
[0097] In some embodiments, the source domain target timing data is at least one of the first voltage timing data, the first current timing data, and the first battery temperature timing data during the constant current discharge test of the battery after cyclic constant current and constant voltage charging; the target domain target timing data is at least one of the second voltage timing data, the second current timing data, and the second battery temperature timing data during the random discharge test of the battery after cyclic constant current and constant voltage charging.
[0098] Specifically, the first voltage time series data, the first current time series data, and the first battery temperature time series data are the time series data of the source domain battery, and the second voltage time series data, the second current time series data, and the second battery temperature time series data are the time series data of the target domain battery. The source domain target time series data of the source domain battery under charge and discharge conditions, the source domain battery SOH true value, and the target domain target time series data of the target domain battery under charge and discharge conditions can be obtained through the following steps:
[0099] Select multiple new batteries for cyclic constant-current and constant-voltage charging followed by constant-current discharge testing until the capacity retention rate of each battery is lower than the preset retention rate, and collect the first voltage, first battery temperature, and first current in each cycle in real time. The first voltage, first battery temperature, and first current are determined as source domain target time series data, and the capacity retention rate of the corresponding cycle is calculated based on the source domain target time series data. The capacity retention rate is determined as the source domain battery SOH true value;
[0100] A number of new batteries are selected for cyclic constant current and constant voltage charging followed by random discharge testing until the capacity retention rate of each battery is lower than the preset retention rate. The second voltage, second battery temperature, and second current in each cycle are collected in real time, and the second voltage, second battery temperature, and second current are determined as source domain target timing data.
[0101] As an example, during the battery modeling phase, several new battery cell samples are divided into two groups: one source domain battery and one target domain battery. The source domain batteries are subjected to cyclic constant current and constant voltage charging followed by constant current discharge testing. Specifically, the source domain batteries are charged at a constant current of 2.0C (4A) to 4.2V, maintaining the voltage constant until the current drops to 0.05C (0.1A); then allowed to rest for 5 minutes; then discharged at 1.0C (2A) to 2.5V; and allowed to rest for 5 minutes. This cycle is terminated when the capacity retention rate of the source domain battery cell falls below a preset retention rate. During each cycle, voltage, current, and temperature data are recorded in real time to form source domain target time series data (i.e., first voltage, first battery temperature, and first current). The discharge capacity obtained through integral calculation during each complete discharge process is used as the current capacity corresponding to the source domain target time series data for that cycle. This capacity retention rate is then compared with the initial capacity to determine the capacity retention rate, which is used as the true SOH value for that cycle.
[0102] The target domain battery is subjected to a random discharge test after cyclic constant current and constant voltage charging. Specifically, the target domain battery is charged to 4.2V at a constant current of 2.0C (2A), and then the voltage is maintained unchanged until the current drops to 0.05C (0.1A); it is left to stand for 5 minutes; it is discharged to 3.0V at xC (x is a cyclic value in {0.5, 1, 2, 3, 5}); it is left to stand for 5 minutes; every time x cycles are completed, the following operation is performed to measure the capacity: it is charged to 4.2V at a constant current and constant voltage of 2C (4A); it is left to stand for 5 minutes; it is discharged to 2.5V at 1C (2A); it is left to stand for 5 minutes;
[0103] The above steps are repeated until the capacity retention rate of the single battery drops below the preset retention rate. During each cycle, the voltage, current, and temperature data are recorded in real time to form the target domain target time series data (i.e., the second voltage, the second battery temperature, and the second current).
[0104] In some embodiments, Figure 2 This is a diagram showing the relationship between the voltage curve of the source data during the charging phase and the battery health status. Figure 2 , Figure 2 The voltage curve changes in the constant current constant voltage (CC-CV) charging stage under different cycle numbers (corresponding to battery health status) are shown. The cycle number (0~300 times) is represented by the color gradient (light gray → dark gray), which intuitively reflects the impact of battery aging on charging behavior. Figure 2The horizontal axis represents the time during the charging process, and the vertical axis represents the battery voltage during the charging process. The color bar shows the distribution of different charge and discharge cycles, with light to dark colors representing the change from early to late cycles. For example, light colors may represent early cycles (such as the 50th), while dark colors represent late cycles (such as the 300th). In the early stages of the cycle (light gray curve), the voltage rises faster and takes a shorter time to reach a stable voltage, reflecting the charging characteristics of a new battery or a battery in good health. In the later stages of the cycle (dark gray curve), the voltage rises more slowly and takes longer to reach a stable voltage, reflecting the decline in battery health after multiple cycles.
[0105] In some embodiments, Figure 3 This is a diagram showing the relationship between the current curve of the source data charging stage and the battery health status. Figure 3 , Figure 3 The current curve changes during the constant current constant voltage (CC-CV) charging stage under different cycle numbers (corresponding to the battery health state SOH). The cycle number (0-300 times) is represented by the color gradient (light gray → dark gray), which intuitively reflects the impact of battery aging on the battery current during charging. Figure 3 The horizontal axis represents the time during the charging process, and the vertical axis represents the current value of the battery during the charging process. The color bar shows the distribution of different charge and discharge cycle numbers, with the change from light to dark representing the change from early to late cycles. For example, light colors may represent early cycles (such as the 50th cycle) and dark colors represent late cycles (such as the 300th cycle). Figure 3 Each curve represents the time-varying current of the source battery during a specific charge-discharge cycle. As charging time increases, the current gradually decreases and stabilizes. In the early stages of the cycle (light gray curve), the current decreases rapidly and reaches a stable current quickly, reflecting the charging characteristics of a new or healthy battery. In the later stages of the cycle (dark gray curve), the current decreases more slowly and takes longer to reach a stable current, reflecting a decline in battery health after multiple cycles.
[0106] In some embodiments, Figure 4 This is a schematic diagram of the relationship between the temperature curve of the source data charging stage and the battery health status, reference Figure 4 , Figure 3 The battery temperature curve changes during the constant current constant voltage (CC-CV) charging stage at different cycle numbers (corresponding to the battery health state SOH) are displayed. The cycle number (0-300 times) is represented by the color gradient (light gray → dark gray), which intuitively reflects the impact of battery aging on the battery temperature during charging. Figure 3The horizontal axis represents the time during the charging process, and the vertical axis represents the battery temperature during the charging process. The color bar shows the distribution of different charge and discharge cycle numbers, with light to dark colors representing the change from early to late cycles. For example, light colors may represent early cycles (such as the 50th), while dark colors represent late cycles (such as the 300th). In the early cycles (light gray curve), the temperature rises rapidly, reaches a peak, and then quickly decreases, resulting in a higher peak temperature. In the later cycles (dark gray curve), the peak temperature is lower, and the overall battery temperature is lower.
[0107] In some embodiments, step 103 may include steps 501 to 506:
[0108] refer to Figure 5 , Figure 5 A flow chart is provided for Example 2 of the training method for the battery health status prediction model of the present application, that is, a flow chart provided in the present application for iterative solution using a fast iterative soft threshold algorithm and an optimal direction method, which gradually approaches the optimal solution by fixing one variable and optimizing another variable until convergence, and jointly learns the source domain dictionary and the source domain sparse coefficient matrix from the source domain spatiotemporal feature matrix.
[0109] Based on the source domain spatiotemporal feature matrix, an iterative solution is performed to obtain the source domain dictionary and the source domain sparse coefficient matrix, including:
[0110] Step 501, using an importance-weighted cross-validation method to determine a target hyperparameter from a plurality of preset candidate hyperparameters;
[0111] Step 502: Initialize the source domain dictionary and obtain the source domain dictionary intermediate value;
[0112] Step 503: fix the source domain dictionary intermediate value, and obtain the source domain sparse coefficient matrix intermediate value by using a fast iterative soft threshold algorithm based on the source domain spatiotemporal feature matrix and the target hyperparameters;
[0113] Step 504: fix the intermediate value of the source domain sparse coefficient matrix, and update the intermediate value of the source domain dictionary through the optimal direction algorithm according to the source domain spatiotemporal feature matrix and the target hyperparameter;
[0114] Step 505: whether the intermediate value of the source domain sparse coefficient matrix and the intermediate value of the source domain dictionary converge;
[0115] If the intermediate value of the source domain sparse coefficient matrix and the intermediate value of the source domain dictionary do not converge, the step of jumping to fixing the intermediate value of the source domain dictionary and solving the intermediate value of the source domain sparse coefficient matrix through a fast iterative soft threshold algorithm according to the source domain spatiotemporal feature matrix and the target hyperparameters is performed;
[0116] Step 506: If the intermediate value of the source domain sparse coefficient matrix and the intermediate value of the source domain dictionary converge, the intermediate value of the source domain sparse coefficient matrix is determined as the source domain dictionary, and the intermediate value of the source domain sparse coefficient matrix is determined as the source domain sparse coefficient matrix.
[0117] Specifically, the plurality of preset candidate hyperparameters are a set of user-defined hyperparameter values, and the preset candidate hyperparameter of the regularization coefficient λ may be 0.01, 0.1, 1.0, and so on.
[0118] As an example, under each value, the FISTA method and the MOD method are used to iteratively solve the dictionary and the sparse coefficient matrix, and the importance-weighted cross-validation method is used to perform weighted summation according to the importance of the samples to obtain the reconstruction loss corresponding to each preset candidate hyperparameter. The preset candidate hyperparameter corresponding to the minimum reconstruction loss is determined as the target hyperparameter. Multiple samples can be randomly selected from the source domain spatiotemporal feature matrix (including time series features such as temperature and voltage) as the initial dictionary atoms to form the source domain dictionary intermediate value; the current source domain dictionary intermediate value is fixed. , using the fast iterative soft threshold algorithm to solve the intermediate value of the source domain sparse coefficient matrix , the objective function is ,in is the intermediate value of the source domain sparse coefficient matrix, is the source domain spatiotemporal feature matrix, is the middle value of the source domain dictionary, is the target hyperparameter, is the square of the Frobenius norm, the L1 regularization term ( ) constrains the source domain sparse coefficient matrix to be represented by only a few dictionary atoms. Using Nesterov accelerated gradient descent and soft threshold shrinkage, a highly sparse solution, namely the source domain sparse coefficient matrix, is obtained within a few iterations. The intermediate values of the source domain sparse coefficient matrix are fixed. Based on the source domain spatiotemporal feature matrix and target hyperparameters, the optimal direction algorithm is used to update the intermediate values of the source domain dictionary. The optimal direction algorithm uses the least squares method to solve the following objective function and update the intermediate values of the source domain dictionary: , where I is an all-one matrix. Repeat the above steps, alternately fixing the intermediate value of the source domain dictionary or the intermediate value of the source domain sparse coefficient matrix for iterative calculation until the intermediate value of the source domain sparse coefficient matrix and the intermediate value of the source domain dictionary are reached. When the intermediate value of the source domain sparse coefficient matrix and the intermediate value of the source domain dictionary converge, the intermediate value is used as the source domain dictionary and the source domain sparse coefficient matrix respectively. By alternately optimizing the source domain dictionary and the source domain sparse coefficient matrix, the battery aging path can be adaptively adapted to capture the evolution law of non-stationary features. Through sparse reconstruction, the target domain features are constrained to be interpretable in the source domain dictionary space, which helps to solve the problem of data distribution offset and capture the key patterns of battery behavior, thereby enhancing the adaptability and generalization ability of the battery health status prediction model under different working conditions, and helping to accurately predict the battery health status.
[0119] In some embodiments, reference Figure 6 , Figure 6 This is a flowchart of a third embodiment of a method for training a battery health status prediction model of the present application. Step 501 may include steps 601 to 607:
[0120] Importance-weighted cross-validation is used to determine the target hyperparameters from multiple preset candidate hyperparameters, including:
[0121] Step 601: Split the source domain spatiotemporal feature matrix and the target domain spatiotemporal feature matrix into a training set and a validation set, wherein the source domain spatiotemporal feature matrix and the target domain spatiotemporal feature matrix have the same probability distribution in the validation set and the training set;
[0122] Step 602: Perform classification training on the classifier to be trained based on the training set to obtain a trained classifier;
[0123] Step 603: Input each validation sample in the validation set into the classifier for category prediction to obtain the category probability of each validation sample;
[0124] Step 604: Based on the class probabilities of the validation samples, the density ratio weight is calculated using the Bayesian formula to obtain the density ratio of the validation set samples.
[0125] Step 605: traverse the preset candidate hyperparameter set, and for each preset candidate hyperparameter, use a fast iterative soft threshold algorithm and an optimal direction method to iteratively solve based on the validation set and the preset candidate hyperparameter to obtain a candidate validation set dictionary and a candidate validation set sparse coefficient matrix corresponding to the preset candidate hyperparameter;
[0126] Step 606 , determining the reconstruction loss corresponding to the preset candidate hyperparameter based on the candidate validation set dictionary, the candidate validation set sparse coefficient matrix, the preset candidate hyperparameter, the density ratio of the validation set samples, and the validation set;
[0127] Step 607: Determine the preset candidate hyperparameter corresponding to the reconstruction loss with the minimum value as the target hyperparameter.
[0128] Specifically, the source domain feature data and the target domain feature data (i.e., the source domain spatiotemporal feature matrix and the target domain spatiotemporal feature matrix) are divided into a training set and a validation set according to a preset ratio, wherein the preset ratio can be 8:2, that is, the training set is 80% of the source domain feature data (source domain spatiotemporal feature matrix) and 80% of the target domain feature data (target domain spatiotemporal feature matrix), and the labels are set to 0 and 1 respectively; the validation set is the remaining 20% of the source domain feature data and 20% of the target domain feature data, and the labels are set to 0 and 1 respectively. The probability distribution of the source domain spatiotemporal feature matrix and the target domain spatiotemporal feature matrix in the validation set and the training set is the same. Based on the training set, the classifier to be trained is classified and trained to obtain a trained classifier. The classifier to be trained can be a CNN. Each verification sample in the validation set is input into the classifier for category prediction to obtain the category probability of each verification sample. , Characterizing validation set samples The conditional probability of belonging to the target domain (domain=1). The validation set samples can be calculated using the following formula: Density ratio:
[0129]
[0130] in, For validation set samples The conditional probability of belonging to the target domain (domain=1), For validation set samples The conditional probability of belonging to the source domain (domain=0), and is the sample ratio prior when training the classifier, For validation set samples By calculating the density ratio of the validation set samples, the distribution difference between the source domain and the target domain can be quantified. The larger the sample density ratio, the higher the weight of the reconstruction loss in the loss function, thereby constraining the model to focus on the generalization of the target domain. Traverse the preset candidate hyperparameter set, and for each preset candidate hyperparameter in the preset candidate hyperparameter set, use the fast iterative soft threshold algorithm and the optimal direction method to iteratively solve based on the validation set and the preset candidate hyperparameters. Obtain the candidate validation set dictionary and candidate validation set sparse coefficient matrix corresponding to each preset candidate hyperparameter, and the reconstruction loss corresponding to the preset candidate hyperparameter can be determined by the following formula:
[0131]
[0132] in, is the reconstruction loss corresponding to the preset candidate hyperparameters, For validation set samples The density ratio, is the reconstruction error of the validation set samples, n is the total number of validation set samples, is the sparsity penalty, To preset candidate hyperparameters, For validation set samples , validation set samples It can be the source domain spatiotemporal feature matrix or the target domain spatiotemporal feature matrix. is the candidate validation set sparse coefficient matrix, is the candidate validation set dictionary. After determining the reconstruction losses corresponding to all preset candidate hyperparameters, compare the reconstruction losses corresponding to all candidate hyperparameters, and determine the preset candidate hyperparameter corresponding to the reconstruction loss with the smallest value as the target hyperparameter. Determine the hyperparameter setting that can optimize the model performance, thereby improving the overall performance of the model. Through importance-weighted cross-validation, the target hyperparameter with the best generalization performance for the target domain is screened out from the preset candidate hyperparameter set. This can solve the overfitting problem caused by the distribution difference between the source domain and the target domain in traditional cross-domain validation in cross-domain scenarios, and improve the generalization ability of the battery health status prediction model under complex working conditions.
[0133] In some embodiments, target domain features are reconstructed based on a source domain dictionary, and the difference between the two domains is determined based on the corresponding reconstruction results and the target domain spatiotemporal feature matrix, including: performing target domain sparse coding based on the source domain dictionary and the target domain spatiotemporal feature matrix to obtain a target domain sparse coefficient matrix; determining the corresponding reconstruction result based on the target domain sparse coefficient matrix and the source domain dictionary, and performing reconstruction residual calculation based on the reconstruction result and the target domain spatiotemporal feature matrix to obtain a reconstruction residual; solving the difference matrix between the source domain dictionary and the target domain implicit dictionary through a ridge regression algorithm based on the reconstruction residual and the target domain sparse coefficient matrix to obtain the difference between the two domains.
[0134] Specifically, the following formula can be used to perform target domain sparse coding based on the source domain dictionary and the target domain spatiotemporal feature matrix to obtain the target domain sparse coefficient matrix:
[0135]
[0136] in, is the target domain sparse coefficient matrix, is the source domain dictionary, γ is the regularization parameter, is the target domain spatiotemporal feature matrix, by finding the target domain sparse coefficient matrix , so that the source domain dictionary is used The target domain feature data can be represented as accurately as possible. The target domain sparse coefficient matrix and source domain dictionary , determine the corresponding reconstruction result , and according to the reconstruction results and the target domain spatiotemporal feature matrix Perform reconstruction residual calculation to obtain reconstruction residual , , by calculating the reconstructed residual , quantifies the representation error of the source domain dictionary on the target domain feature data, reflecting the distribution difference between the two domains. Approximating the target domain implicit dictionary When the residual reaches the minimum, the difference between the two domains , the difference matrix between the source domain dictionary and the target domain implicit dictionary can be solved by the ridge regression algorithm, and we get ,in, is the regularization parameter, is the unit matrix. In this application, the difference between the two domains is Representing the source domain dictionary and the target domain implicit dictionary The difference matrix between the two domains can be used to drive the model optimization feature extractor to generate domain-invariant features. Through sparse coding, reconstruction error analysis, and ridge regression, the distribution difference between the source and target domains is quantified, and the difference between the two domains is obtained, which provides a clear direction for subsequent model optimization.
[0137] In addition, the above regularization parameter It is also possible to optimize by using importance weighting methods.
[0138] In some embodiments, a total loss value is obtained based on the source domain battery SOH prediction value, the source domain battery SOH true value and the difference between the two domains, including: calculating the regression loss value corresponding to the mean square error loss function based on the source domain battery SOH prediction value and the source domain battery SOH true value; calculating the domain difference loss value by the Frobenius norm square based on the difference between the two domains; and determining the total loss value based on the regression loss value and the domain difference loss value.
[0139] As an example, the regression loss value It can be calculated by the following formula:
[0140] Where N is the number of batteries in the source domain, is the true value of the SOH of the battery in the i-th source domain, is the predicted SOH value of the battery in the i-th source domain. It directly reflects the performance of the model in predicting the SOH of the source domain battery and is an important indicator for evaluating the regression ability of the model. It can be calculated by the following formula: = ,in is the square of the Frobenius norm. The larger the loss, the poorer the source domain dictionary's ability to explain the target domain's features, and the need to optimize model parameters to narrow the gap. The regression loss and domain difference loss are weighted and summed to obtain the total loss. This takes into account the model's prediction accuracy and cross-domain adaptability. By properly adjusting the weight coefficients, the model's performance in the source domain can be improved while also enhancing its adaptability to target domain data. The total loss is determined based on the regression loss and domain difference loss. The model parameters are updated based on this total loss. By minimizing the total loss, the two losses are combined to optimize model performance, ensuring that the model not only performs well in the source domain but also better adapts to the data characteristics of the target domain.
[0141] In some embodiments, after obtaining the trained battery health status prediction model, the method further includes:
[0142] Obtain battery target time series data of the battery to be tested under charge and discharge conditions; input the battery target time series data into the feature extractor of the battery health state prediction model, extract spatiotemporal features of the battery target time series data through the feature extractor, and obtain the spatiotemporal feature matrix of the battery to be tested; input the spatiotemporal feature matrix of the battery to be tested into the regression model of the battery health state prediction model, predict the battery health state of the battery to be tested through the regression model, and obtain the SOH prediction value of the battery to be tested.
[0143] Specifically, the target time series data of the battery to be evaluated is the charge and discharge process data (sequence of voltage, current, and temperature changes over time) recorded during actual use of the battery to be evaluated.
[0144] In some embodiments, the source domain spatiotemporal feature matrix is input into the regression model of the battery health state prediction model to predict the battery health state, and the source domain battery SOH prediction value is obtained, including: reshaping the source domain spatiotemporal feature matrix to obtain reshaped features; performing convolution processing on the reshaped features to obtain convolution features; performing pooling processing on the convolution features to obtain corresponding pooling processing results; performing data reshaping processing on the pooling processing results to obtain source domain battery sequence features; inputting the source domain battery sequence features as input sequences into the input layer of the long-term and short-term neural network of the regression model in sequence, and sequentially converting the output sequence features of the input layer into the input layer. Input the hidden layer of the long-term short-term neural network; based on the calculation of the connection weights and thresholds between each gating unit and cell unit in the hidden layer, the characteristics of the output sequence of the input layer are abstracted to a new dimensional space to extract the spatiotemporal variation characteristics of the source domain battery charge and discharge conditions, and the spatiotemporal variation characteristics of the source domain battery charge and discharge conditions are linearly divided, and the results of the linear division calculated by the hidden layer are input into the fully connected layer, and each gating unit includes an input gate, a forget gate and an output gate; the input value of the fully connected layer is nonlinearly transformed to predict the source domain battery SOH based on the input value of the fully connected layer to obtain the source domain battery SOH prediction value.
[0145] As an example, before inputting the source domain spatiotemporal feature matrix into the regression model, the source domain spatiotemporal feature matrix is reshaped to accommodate subsequent processing steps. This data structure is adjusted to meet the input requirements of a convolutional neural network (CNN), generating reshaped features. The reshaped features are then convolved with a convolutional layer. Local features are extracted using a sliding window approach, capturing the changing patterns at different time points and spatial locations during the battery's charge and discharge process. These convolutional features are then pooled, selecting the most representative feature values from each local region (e.g., using max pooling or average pooling) to reduce data dimensionality and prevent overfitting. This results in a pooled result, simplifying model complexity while preserving key information. The pooled result is then reshaped again to convert it into a source domain battery sequence feature format suitable for LSTM processing, enabling it to be input into the LSTM to capture long-term dependencies in the time series. The source-domain battery sequence features are sequentially input into the LSTM input layer, and their output features are further passed to the hidden layer. The LSTM hidden layer contains multiple gated units, including input, forget, and output gates, as well as cell units. By learning connection weights and thresholds, the model effectively controls the update and transmission of information flow. This enables the model to abstractly represent the spatiotemporal variations in the source-domain battery charge and discharge conditions and perform linear partitioning within the new dimensional space, thereby better understanding the battery aging process. Finally, the results calculated by the hidden layer are input into the fully connected layer, which performs a nonlinear transformation on the input values (such as using activation functions such as Sigmoid or ReLU) to obtain the predicted SOH value of the source-domain battery.
[0146] It should be noted that the above examples are only used to understand this application and do not constitute a limitation on the training method of the battery health status prediction model of this application. More forms of simple transformations based on this technical concept are all within the scope of protection of this application.
[0147] This application also provides a training device for a battery health status prediction model. Please refer to Figure 7 , the training device of the battery health status prediction model includes:
[0148] A feature extraction module 701 is configured to determine a source domain spatiotemporal feature matrix based on source domain target time series data of a source domain battery under charge and discharge conditions, and to determine a target domain spatiotemporal feature matrix based on target domain target time series data of a target domain battery under charge and discharge conditions;
[0149] Prediction module 702, configured to predict the battery health status based on the source domain spatiotemporal feature matrix to obtain a source domain battery SOH prediction value;
[0150] A dictionary learning module 703 is configured to perform an iterative solution based on the source domain spatiotemporal feature matrix to obtain a source domain dictionary and a source domain sparse coefficient matrix;
[0151] The reconstruction module 704 is used to reconstruct the target domain features based on the source domain dictionary and determine the difference between the two domains according to the corresponding reconstruction results and the target domain spatiotemporal feature matrix;
[0152] The parameter update module 705 is used to obtain the total loss value based on the source domain battery SOH prediction value, the source domain battery SOH true value and the difference between the two domains, and update the parameters of the health status prediction model according to the total loss value. When the total loss value is less than or equal to the preset value, the trained battery health status prediction model is obtained.
[0153] The training device for the battery health state prediction model provided in this application adopts the training method for the battery health state prediction model in the above-mentioned embodiment, which can solve the technical problem of the existing battery health state prediction model in which the generalization performance is reduced in the case of cross-domain data distribution offset. Compared with the prior art, the beneficial effects of the training device for the battery health state prediction model provided in this application are the same as the beneficial effects of the training method for the battery health state prediction model provided in the above-mentioned embodiment, and the other technical features of the training device for the battery health state prediction model are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.
[0154] The present application provides a training device for a battery health status prediction model, and the training device for a battery health status prediction model includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the training method for the battery health status prediction model in the above-mentioned embodiment one.
[0155] Reference below Figure 8 , which shows a schematic diagram of the structure of a training device suitable for implementing the battery health state prediction model in the embodiment of the present application. The training device of the battery health state prediction model in the embodiment of the present application may include but is not limited to a fixed terminal such as a laptop computer, desktop computer, etc. Figure 8 The training device for the battery health status prediction model shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0156] like Figure 8As shown, the training device for a battery health status prediction model may include a processing device 1001 (e.g., a central processing unit, graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 1002 or programs loaded from a storage device 1003 into a random access memory (RAM) 1004. RAM 1004 also stores various programs and data required for the operation of the training device for a battery health status prediction model. Processing device 1001, ROM 1002, and RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to the input / output interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, hard disk, etc.; and communication devices 1009. Communication devices 1009 may allow the training device for the battery health status prediction model to communicate wirelessly or wired with other devices to exchange data. While the figure illustrates a training device for the battery health status prediction model with various systems, it should be understood that implementation or presence of all of the illustrated systems is not required. More or fewer systems may alternatively be implemented or present.
[0157] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are performed.
[0158] The training device for the battery health state prediction model provided in this application adopts the training method for the battery health state prediction model in the above-mentioned embodiment, which can solve the technical problem of the existing battery health state prediction model in which the generalization performance is reduced in the case of cross-domain data distribution offset. Compared with the prior art, the beneficial effects of the training device for the battery health state prediction model provided in this application are the same as the beneficial effects of the training method for the battery health state prediction model provided in the above-mentioned embodiment, and the other technical features of the training device for the battery health state prediction model are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0159] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0160] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0161] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, and the computer-readable program instructions are used to execute the training method of the battery health status prediction model in the above-mentioned embodiment.
[0162] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0163] The computer-readable storage medium may be included in the training device for the battery health state prediction model; or may exist independently without being assembled into the training device for the battery health state prediction model.
[0164] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the training device of the battery health state prediction model, the training device of the battery health state prediction model: determines the source domain spatiotemporal feature matrix based on the source domain target time series data of the source domain battery under charging and discharging conditions, and determines the target domain spatiotemporal feature matrix based on the target domain target time series data of the target domain battery under charging and discharging conditions; predicts the battery health state based on the source domain spatiotemporal feature matrix to obtain the source domain battery SOH prediction value; performs iterative solution based on the source domain spatiotemporal feature matrix to obtain the source domain dictionary and the source domain sparse coefficient matrix; reconstructs the target domain features based on the source domain dictionary, and determines the difference between the two domains based on the corresponding reconstruction results and the target domain spatiotemporal feature matrix; obtains the total loss value based on the source domain battery SOH prediction value, the source domain battery SOH true value and the difference between the two domains, and updates the parameters of the health state prediction model according to the total loss value. When the total loss value is less than or equal to the preset value, a trained battery health state prediction model is obtained.
[0165] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0166] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0167] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0168] The computer-readable storage medium provided in this application stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned method for training a battery health state prediction model. This computer-readable storage medium can address the technical issue of existing battery health state prediction models experiencing reduced generalization performance in the presence of cross-domain data distribution shifts. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are similar to those of the battery health state prediction model training method provided in the aforementioned embodiments, and are not further elaborated here.
[0169] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the above-mentioned battery health status prediction model training method.
[0170] The computer program product provided in this application can address the technical issue of degraded generalization performance of existing battery health state prediction models in the presence of cross-domain data distribution shifts. Compared to the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the battery health state prediction model training method provided in the aforementioned embodiment, and are not further elaborated here.
[0171] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for training a battery health status prediction model, characterized in that: The training method of the battery health status prediction model includes: Determine a source domain spatiotemporal feature matrix based on source domain target time series data of a source domain battery under charge and discharge conditions, and determine a target domain spatiotemporal feature matrix based on target domain target time series data of a target domain battery under charge and discharge conditions; Perform battery health state prediction based on the source domain spatiotemporal feature matrix to obtain a source domain battery SOH prediction value; Performing an iterative solution based on the source domain spatiotemporal feature matrix to obtain a source domain dictionary and a source domain sparse coefficient matrix; Reconstructing target domain features based on the source domain dictionary, and determining the difference between the two domains according to the corresponding reconstruction results and the target domain spatiotemporal feature matrix; Based on the source domain battery SOH predicted value, the source domain battery SOH true value and the difference between the two domains, a total loss value is obtained, and the parameters of the health status prediction model are updated according to the total loss value. When the total loss value is less than or equal to the preset value, the trained battery health status prediction model is obtained.
2. The method for training a battery health status prediction model according to claim 1, wherein: include: The source domain target time series data is at least one of first voltage time series data, first current time series data, and first battery temperature time series data during a constant current discharge test after cyclic constant current and constant voltage charging of the battery; The target domain target timing data is at least one of second voltage timing data, second current timing data, and second battery temperature timing data during a random discharge test of the battery after cyclic constant current and constant voltage charging.
3. The method for training a battery health status prediction model according to claim 1, wherein: The step of performing iterative solution based on the source domain spatiotemporal feature matrix to obtain a source domain dictionary and a source domain sparse coefficient matrix includes: The importance-weighted cross-validation method is used to determine the target hyperparameter from multiple preset candidate hyperparameters; Initialize the source domain dictionary and obtain the intermediate value of the source domain dictionary; Fixing the intermediate value of the source domain dictionary, and obtaining the intermediate value of the source domain sparse coefficient matrix by using a fast iterative soft threshold algorithm according to the source domain spatiotemporal feature matrix and the target hyperparameter; Fixing the intermediate value of the source domain sparse coefficient matrix, and updating the intermediate value of the source domain dictionary through the optimal direction algorithm according to the source domain spatiotemporal feature matrix and the target hyperparameter; If the intermediate value of the source domain sparse coefficient matrix and the intermediate value of the source domain dictionary do not converge, the step of fixing the intermediate value of the source domain dictionary and obtaining the intermediate value of the source domain sparse coefficient matrix by a fast iterative soft threshold algorithm according to the source domain spatiotemporal feature matrix and the target hyperparameter is jumped to execution; If the intermediate value of the source domain sparse coefficient matrix and the intermediate value of the source domain dictionary converge, the intermediate value of the source domain sparse coefficient matrix is determined as the source domain dictionary, and the intermediate value of the source domain sparse coefficient matrix is determined as the source domain sparse coefficient matrix.
4. The method for training a battery health status prediction model according to claim 3, wherein: The step of using the importance-weighted cross-validation method to determine the target hyperparameter from multiple preset candidate hyperparameters includes: Splitting the source domain spatiotemporal feature matrix and the target domain spatiotemporal feature matrix into a training set and a validation set, wherein the source domain spatiotemporal feature matrix and the target domain spatiotemporal feature matrix have the same probability distribution in the validation set and the training set; Performing classification training on the classifier to be trained based on the training set to obtain the trained classifier; Input each verification sample in the verification set into the classifier to perform category prediction, and obtain the category probability of each verification sample; Based on the category probability of each of the verification samples, the density ratio weight is calculated using the Bayesian formula to obtain the density ratio of the verification set samples; Traversing the preset candidate hyperparameter set, for each of the preset candidate hyperparameters, based on the validation set and the preset candidate hyperparameters, using a fast iterative soft threshold algorithm and an optimal direction method to iteratively solve, to obtain a candidate validation set dictionary and a candidate validation set sparse coefficient matrix corresponding to the preset candidate hyperparameter; Determining a reconstruction loss corresponding to the preset candidate hyperparameter based on the candidate validation set dictionary, the candidate validation set sparse coefficient matrix, the preset candidate hyperparameter, the density ratio of the validation set samples, and the validation set; The preset candidate hyperparameter corresponding to the reconstruction loss with the smallest value is determined as the target hyperparameter.
5. The method for training a battery health status prediction model according to claim 1, wherein: The step of reconstructing target domain features based on the source domain dictionary and determining the difference between the two domains according to the corresponding reconstruction results and the target domain spatiotemporal feature matrix includes: Performing target domain sparse coding according to the source domain dictionary and the target domain spatiotemporal feature matrix to obtain a target domain sparse coefficient matrix; Determine the corresponding reconstruction result according to the target domain sparse coefficient matrix and the source domain dictionary, and calculate the reconstruction residual according to the reconstruction result and the target domain spatiotemporal feature matrix to obtain a reconstruction residual; According to the reconstructed residual and the target domain sparse coefficient matrix, a difference matrix between the source domain dictionary and the target domain implicit dictionary is solved by a ridge regression algorithm to obtain the difference between the two domains.
6. The method for training a battery health status prediction model according to claim 1, wherein: The step of obtaining a total loss value based on the source domain battery SOH predicted value, the source domain battery SOH true value and the difference between the two domains includes: Calculating a regression loss value corresponding to a mean square error loss function based on the source domain battery SOH predicted value and the source domain battery SOH true value; Based on the difference between the two domains, a domain difference loss value is calculated by using the square of the Frobenius norm; The total loss value is determined according to the regression loss value and the domain difference loss value.
7. The method for training a battery health status prediction model according to claim 1, wherein: After the step of obtaining the trained battery health status prediction model, the method further includes: Obtain battery target timing data of the battery to be tested under charge and discharge conditions; Inputting the battery target time series data into the feature extractor of the battery health state prediction model, performing spatiotemporal feature extraction on the battery target time series data by the feature extractor to obtain a spatiotemporal feature matrix of the battery to be tested; The spatiotemporal characteristic matrix of the battery to be detected is input into the regression model of the battery health state prediction model, and the battery health state of the battery to be detected is predicted by the regression model to obtain the SOH prediction value of the battery to be detected.
8. The method for training a battery health status prediction model according to claim 1, wherein: The step of performing battery health state prediction based on the source domain spatiotemporal feature matrix to obtain a source domain battery SOH prediction value includes: Reshaping the source domain spatiotemporal feature matrix to obtain reshaped features; Performing convolution processing on the reshaped features to obtain convolution features; Performing pooling processing on the convolutional features to obtain corresponding pooling processing results; Performing data reshaping processing on the pooling processing result to obtain source domain battery sequence characteristics; Inputting the source domain battery sequence features as input sequences into the input layer of the long-term and short-term neural network of the regression model, and inputting the output sequence features of the input layer into the hidden layer of the long-term and short-term neural network in sequence; Based on the calculation of connection weights and thresholds between each gating unit and cell unit in the hidden layer, the features of the output sequence of the input layer are abstracted into a new dimensional space to extract the spatiotemporal variation characteristics of the source domain battery charge and discharge conditions, and the spatiotemporal variation characteristics of the source domain battery charge and discharge conditions are linearly divided. The result of the linear division calculated by the hidden layer is input into a fully connected layer. Each gating unit includes an input gate, a forget gate, and an output gate; A nonlinear transformation is performed on the input value of the fully connected layer to predict the source domain battery SOH based on the input value of the fully connected layer to obtain the source domain battery SOH prediction value.
9. A training device for a battery health status prediction model, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the method for training a battery health status prediction model according to any one of claims 1 to 8.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the training method of the battery health status prediction model according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Method for predicting state of health of battery
CN111985156A
Deep learning cross-domain prediction method for health condition of lithium battery of new energy aircraft
CN116298916A