A lithium battery health estimation method based on feature alignment unsupervised transfer network
By employing a feature-aligned unsupervised transfer network approach, and utilizing normalization, sliding window processing, and feature alignment techniques, the problem of insufficient generalization ability of lithium battery health state estimation across datasets and operating conditions is solved, achieving high-precision prediction under unsupervised conditions.
Patent Information
- Application Number
- CN202511559662.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-10-29
AI Technical Summary
Existing lithium battery health state estimation methods suffer from insufficient model generalization ability and low prediction accuracy due to distribution differences across datasets and operating conditions, especially in unsupervised conditions where effective feature space alignment is difficult to achieve.
We employ an unsupervised transfer network based on feature alignment, constructing a sample set through normalization and sliding window processing. We combine learnable differential convolution (LDC) and trapezoidal hierarchical skip gated fusion (T-SHIFT) modules, use an improved maximum mean difference loss function for feature distribution alignment, and perform joint optimization through mean squared error regression loss to construct the STRATA-Net model.
Without the need for target domain labels, the model's cross-domain generalization ability and prediction accuracy are improved, ensuring the reliability and adaptability of lithium battery health state estimation and enabling accurate estimation of battery health state.
Smart Images

Figure CN121027863B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of lithium battery monitoring state estimation, and particularly relates to a lithium battery health state estimation method based on feature alignment unsupervised transfer network. BACKGROUND
[0002] With the rapid development of new energy industry, lithium batteries, as the core energy supply unit of electric vehicles, energy storage power stations and portable electronic devices, their health state is directly related to the safety and reliability of the system. Accurate estimation of the health state of the battery not only ensures the normal operation of the equipment, but also effectively prolongs the service life of the battery and reduces maintenance and replacement costs. However, the battery will be affected by temperature, rate, aging mechanism and other factors during long-term charging and discharging cycles, showing complex nonlinear degradation characteristics, making the health state estimation a challenging task.
[0003] Traditional methods mostly rely on physical modeling or statistical feature extraction. Physical models need to establish complex electrochemical mechanism equations, with numerous parameters and difficult to accurately obtain, resulting in insufficient precision in actual application; data-driven methods can avoid complex mechanism modeling, but their training process usually assumes that training data and test data satisfy the same distribution, however, in actual scenarios, differences in different battery batches, test platforms and working conditions will cause significant distribution deviation between source domain and target domain data, thereby seriously affecting the generalization ability of the model.
[0004] In recent years, transfer learning has been gradually introduced into battery health state estimation to alleviate the inconsistency between source domain and target domain. By using existing label information in the source domain, the dependence on labeled data in the target domain can be reduced, so that effective prediction can still be achieved under insufficient data. However, existing methods mostly use supervised or semi-supervised methods, still need to provide part of the labeled data in the target domain, limiting their promotion in actual application. At the same time, if the distribution difference between different data sets is not fully aligned, it may even cause negative transfer effect, making the model performance decline.
[0005] Therefore, how to realize effective alignment of the feature space between the source domain and the target domain under unsupervised conditions, and improve the health state estimation accuracy of the model under cross-dataset and cross-condition, has become a key problem to be solved at present. SUMMARY
[0006] In view of the problems in the prior art, the present application provides a lithium battery health estimation method based on feature alignment unsupervised transfer network. The method normalizes the capacity sequences of the previous several charge and discharge cycles and uses a sliding window to construct samples, ensuring the comparability of different battery data in the input layer; in the feature extraction stage, a STRATA-Net combining a learnable difference convolution LDC and a trapezoidal hierarchical jump gating fusion T-SHIFT is designed to ensure that global trends and local difference features of capacity degradation can be captured at the same time; in the training process, an improved maximum mean difference loss function is introduced to realize unsupervised alignment of the feature distribution of the source domain and the target domain, and a mean square error regression loss is combined for joint optimization, so that accurate health state prediction can still be obtained under the condition of no label in the target domain. The method proposed in the present application aims to improve the cross-domain generalization ability and prediction accuracy of the model and can be applied to battery health management and life prediction scenarios.
[0007] To achieve the above technical purposes, the present application provides the following technical solutions:
[0008] A lithium battery health estimation method based on feature alignment unsupervised transfer network, which specifically comprises the following steps:
[0009] S1, collecting the capacity degradation data of the lithium battery in the charge and discharge cycle process to construct a source domain data set of the battery capacity degradation curve and a target domain data set ;
[0010] S2, normalizing the source domain data set and the target domain data set , and using a sliding window to generate a source domain sample set and a target domain sample set ;
[0011] S3, inputting the source domain sample set and the target domain sample set into the designed hierarchical transfer regression and adaptive time sequence alignment network STRATA-Net, respectively, wherein the STRATA-Net comprises a learnable difference convolution module LDC and a trapezoidal hierarchical jump gating fusion module T-SHIFT, degradation features are extracted on multiple scales and a gating mechanism is applied to realize fusion, to obtain source domain capacity features and target domain capacity features ;
[0012] S4, using the real labels of the source domain sample set to construct a regression head for prediction, and calculating the mean square error as a supervised loss; meanwhile, in and An alignment loss is introduced between the supervision loss and the alignment loss; a total loss function is constructed to guide the training of STRATA-Net based on the supervision loss and the alignment loss, and the parameters of STRATA-Net are continuously updated through backpropagation until the optimal parameter configuration of STRATA-Net is trained.
[0013] S5. Target domain sample set Inputting the data into the trained STRATA-Net, the subsequent cycle capacity values are inferred step by step using a rolling prediction method to obtain the predicted results of the battery capacity degradation curve in the target domain; the predicted results are compared with the actual curve to evaluate the network's predictive ability.
[0014] Furthermore, step S1 specifically includes:
[0015] Capacity degradation curves of different lithium batteries during charge-discharge cycles were extracted from publicly available lithium battery datasets to serve as the source domain dataset. Capacity degradation curves of different lithium batteries during charge-discharge cycles were extracted from lithium battery datasets collected in the laboratory and used as the target domain dataset. .
[0016] Furthermore, step S2 specifically includes:
[0017] S21. For the source domain dataset and target domain dataset Let the capacity sequence of the i-th lithium battery in any dataset be . Its formula is expressed as:
[0018] ;
[0019] in, This represents the capacity value of the i-th lithium battery in the t-th charge-discharge cycle. This represents the total number of charge-discharge cycles during the lifespan of a lithium battery.
[0020] S22. Define the average capacity of the first N charge-discharge cycles as the normalization metric, and normalize the capacity sequence using the formula:
[0021] ;
[0022] ;
[0023] in, Represents a capacity sequence The normalization factor, This represents the normalized capacity value of the i-th lithium battery in the t-th charge-discharge cycle.
[0024] The normalized capacity sequence is represented as: ;
[0025] S23. Training samples are generated using the sliding window method. Let the sliding window length be T and the prediction step size be P. In the normalized capacity sequence... Define the k-th input-output pair for:
[0026] ;
[0027] ;
[0028] in, This represents an input window consisting of T consecutive capacity values, characterizing the degradation features of a lithium battery over a period of time. This represents the P future capacity values corresponding to the input window, serving as the true labels of the source domain dataset and the prediction targets for the target domain dataset.
[0029] S24. For the source domain dataset The source domain sample set is obtained based on the input-output pairs. For the target domain dataset Only the input window is retained to obtain the target sample set. ;
[0030] S25, the single-channel input window Channel expansion is achieved through the repeat operation, resulting in an expanded input window. In batch processing mode, the source domain sample set and the target domain sample set are represented as follows:
[0031] ;
[0032] Where B represents the preset batch size; C represents the total number of channels.
[0033] Furthermore, step S3 specifically includes:
[0034] S31. Construct a three-branch parallel learnable differential convolutional module (LDC), with each branch denoted as... And set the kernel size for each branch. Coefficient of expansion With the number of groups , ;
[0035] Using symmetrical filling, the filling step size for each branch is: ;
[0036] S32, in the branch Internally, a set of learnable structural masks is used to dynamically modulate the convolutional kernel instead of fixed weights; the dynamically modulated convolutional weights are then used to modulate the input... and Perform convolution operations separately to obtain the branches. Feature response of the c-th output channel The formula is expressed as:
[0037] ;
[0038] in, Indicates input, The weights of the convolutional kernel are dynamically modulated; the branches are... The output channels are spliced together to obtain branches. Output characteristics ;
[0039] Similarly, the other two branches also undergo the same dynamic modulation operation, forming a multi-scale output that expands step by step:
[0040] ;
[0041] in, , Branches , The output characteristics;
[0042] S33. In the T-SHIFT module, fuse the multi-scale output features obtained in step S32: After the channel is upgraded to a higher dimension, it interacts with the gating mechanism. Complementary selection fusion is performed to obtain primary fusion characteristics. ; then Channel dimensional upgrade, and Complementary selection fusion is performed again to obtain advanced fusion features. ;at last The residual is obtained by comparing the input sequence with the output source domain capacity feature. and target domain capacity features .
[0043] More specifically, the process of dynamically modulating the convolution kernel in step S32 is as follows:
[0044] With branches For example, let's set up branches. The initial convolutional kernel weights for the c-th output channel for:
[0045] ;
[0046] in, C represents the number of input channels per group after grouping, and C represents the total number of channels.
[0047] Calculate the input branch Comprehensive influence of channel direction :
[0048] ;
[0049] in, For the first input channel in a single group The convolutional kernel weights of the c-th input channel to the c-th output channel;
[0050] Define a binary center mask vector The binary center mask vector takes a value of 1 only when index k is the center position of the convolution kernel, and takes a value of 0 at other positions.
[0051] Introducing channel-level adjustment coefficient and global adjustment coefficient Adjust the overall impact and construct branches. The dynamic mask vector of the c-th output channel The formula is expressed as:
[0052] ;
[0053] in, This indicates element-wise multiplication;
[0054] The repeat operation will Expanded to a single input channel dimension and combined with the initial convolutional kernel weights Element-wise multiplication yields the dynamically modulated convolution kernel weights. The formula is expressed as:
[0055] ;
[0056] in, This is the expanded dynamic mask vector;
[0057] The other two branches also use the same dynamic modulation method, but the channel-level modulation coefficients and global modulation coefficients differ from those of the branches. Different scales are obtained by grouping the data into different numbers.
[0058] Furthermore, step S33 specifically includes:
[0059] right Applying a 1×1 convolution to increase the channel dimension is expressed by the following formula:
[0060] ;
[0061] in, For 1×1 convolution, express Will from Ascend to , Branches after dimensional ascension The output characteristics;
[0062] based on Calculate the primary fusion gating coefficients, and under the action of the gating mechanism, [the following will occur]. and Complementary selection fusion is performed to obtain primary fusion characteristics. The formula is expressed as:
[0063] ;
[0064] in, This indicates element-wise multiplication. For the initial fusion gating coefficient; For the Sigmoid function, For the Tanh function;
[0065] Next to Apply 1×1 convolution to perform channel upsizing, and then use the upsized primary fusion features. Calculate the advanced fusion gating coefficients, and under the action of the gating mechanism, [the following will occur]. and Complementary selection fusion is performed again to obtain advanced fusion features. The formula is expressed as:
[0066] ;
[0067] in, For 1×1 convolution, express Will from Ascend to ; For advanced fusion gating coefficients;
[0068] Finally, advanced fusion features are used. Generate residual fusion gating coefficients, combined with the input Complementary selection residual fusion is performed within each domain to output source domain capacity features. and target domain capacity features The formula is expressed as:
[0069] ;
[0070] in, For residual fusion gating coefficients, It is a 1×1 convolution.
[0071] Furthermore, step S4 specifically includes:
[0072] S41. Construct a regression predictor using the true labels of the source domain sample set. Calculate the mean squared error as the supervision loss based on the prediction capacity output by STRATA-Net. The formula is expressed as:
[0073] ;
[0074] in, This represents the number of samples in the source domain. This represents the actual capacity of the i-th source domain sample; This represents the prediction capacity of the i-th source domain sample obtained through STRATA-Net regression prediction;
[0075] S42. Based on the single-core linear time maximum mean difference and time constraints, design an alignment loss. Let the source domain capacity feature set and target domain capacity feature set of the current batch be respectively... , Then alignment loss The formula is expressed as:
[0076] ;
[0077] in, , Indicates the difference between adjacent features; For time-series constraint weights; It is an unbiased estimator of single-core linear-time MMD;
[0078] S43. Based on the supervised loss and alignment loss, the total loss function is obtained. , To balance the supervision loss and alignment loss, a balancing factor is used. During training, forward propagation is performed first, inputting source domain samples into STRATA-Net to extract capacity features and calculating the total loss function. Then, with the goal of minimizing the total loss, the parameters of STRATA-Net are optimized using the backpropagation algorithm. The optimal parameter configuration of the STRATA-Net is obtained after training.
[0079] Furthermore, step S5 specifically includes:
[0080] S51, Target Domain Sample Set In a STRATA-Net with optimal parameter configuration, for any input window in the target domain sample set... ,in, This represents the normalized true capacity value of the t-th charge-discharge cycle, where T represents the input window length, i.e., T charge-discharge cycles. STRATA-Net first predicts the capacity value of the next charge-discharge cycle step by step. ;
[0081] S52. A recursive prediction strategy is adopted to concatenate the predicted value of each step with the historical capacity sequence to form a new input window, and then proceed to the next prediction step until the entire life cycle of the target domain lithium battery is covered; through step-by-step iteration, a complete predicted capacity sequence is obtained. , The total number of charge-discharge cycles during the lithium battery's lifespan; the predicted capacity curve of the target domain battery is obtained based on the complete predicted capacity sequence;
[0082] S53. Compare the predicted capacity curve with the actual capacity curve to evaluate the degradation trend prediction capability of STRATA-Net in the target domain, and provide a basis for lithium battery health management and life prediction.
[0083] Furthermore, the present invention also discloses an electronic device comprising a memory and a processor, wherein:
[0084] Memory is used to store computer programs that can run on a processor;
[0085] A processor is configured to, while running the computer program, execute a lithium battery health estimation method based on a feature-aligned unsupervised transfer network as described above.
[0086] A computer-readable storage medium is also disclosed, which stores computer instructions for causing a processor to execute a lithium battery health estimation method based on a feature-aligned unsupervised migration network as described above.
[0087] Based on the above technical solution, the present invention has at least the following beneficial effects:
[0088] This method achieves a unified representation of different battery data through normalization and sliding window processing, improving the comparability of samples in cross-dataset scenarios. By introducing learnable differential convolution (LDC) and trapezoidal hierarchical skip-gated fusion (T-SHIFT), it effectively extracts and fuses multi-scale features of capacity sequences, enhancing the model's ability to characterize battery degradation trends and local difference characteristics. By introducing an improved maximum mean difference loss function, it achieves unsupervised alignment of feature distributions between the source and target domains, thereby improving the model's generalization ability under cross-domain transfer conditions. Finally, the feature-aligned unsupervised transfer network constructed in this invention can still accurately estimate battery health status without the need for labeled data in the target domain, effectively solving the problems of poor generalization and low prediction accuracy of traditional methods when data is insufficient and distribution differences are large, ensuring the reliability and adaptability of health status estimation. Attached Figure Description
[0089] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0090] Figure 1 This is an overall flowchart of a lithium battery health estimation method based on feature-aligned unsupervised transfer networks proposed in this invention.
[0091] Figure 2 This is a diagram of the architecture of STRATA-Net in the method proposed in this invention;
[0092] Figure 3 This is a prediction graph of the health status estimation of WRBD lithium batteries using the method of the present invention;
[0093] Figure 4 This is a residual curve of the method of the present invention for estimating the state of health of WRBD lithium batteries;
[0094] Figure 5 This is a true-to-prediction scatter plot of the method of the present invention for estimating the health status of WRBD lithium batteries. Detailed Implementation
[0095] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the following description is provided in conjunction with the accompanying drawings. Figures 1-5 The present invention will be further described in detail with reference to the embodiments. This will allow for a full understanding of how the present application uses technical means to solve technical problems and achieve technical effects, and to facilitate its implementation.
[0096] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0097] like Figure 1 As shown, this invention proposes an overall flowchart for a lithium battery health estimation method based on feature-aligned unsupervised transfer networks, which specifically includes:
[0098] S1. Collect capacity decay data of lithium batteries during charge-discharge cycles to construct a source domain dataset of battery capacity degradation curves. and target domain dataset ;
[0099] In a preferred embodiment, step S1 specifically comprises:
[0100] Capacity degradation curves of different lithium batteries during charge-discharge cycles were extracted from publicly available lithium battery datasets to serve as the source domain dataset. Capacity degradation curves of different lithium batteries during charge-discharge cycles were extracted from lithium battery datasets collected in the laboratory and used as the target domain dataset. .
[0101] S2, for the source domain dataset and target domain dataset Normalization is performed, and a sliding window is used to generate source domain sample sets respectively. and target domain sample set ;
[0102] In a preferred embodiment, step S2 specifically includes:
[0103] S21. For the source domain dataset and the target domain dataset, let the capacity sequence of the i-th lithium battery in any dataset be... Its formula is expressed as:
[0104] ;
[0105] in, This represents the capacity value of the i-th lithium battery in the t-th charge-discharge cycle. This represents the total number of charge-discharge cycles during the lifespan of a lithium battery.
[0106] S22. To eliminate the influence of initial capacity differences between different batteries, this application defines the average capacity of the first N charge-discharge cycles as a normalization scale to normalize the capacity sequence, as expressed by the formula:
[0107] ;
[0108] ;
[0109] in, Represents a capacity sequence The normalization factor, Let represent the normalized capacity value of the i-th lithium battery in the t-th charge-discharge cycle; the normalized capacity sequence is represented as: ;
[0110] In this application, the normalization factor actually uses the capacity level exhibited by the battery in the initial stage (the first N cycles) as a reference benchmark, reflecting the "initial capacity scale" of the battery. Due to differences in manufacturing processes, materials, or testing conditions, the initial capacities of different batteries often vary. Directly comparing the original capacity sequences would lead to a lack of comparability between different batteries. By dividing the capacity value of each battery by the average capacity of the first N cycles, the sequences of different batteries can be scaled to a uniform relative scale. The dimensions of the normalized capacity values are unified, making the initial capacity of all batteries close to 1, thus facilitating comparison and analysis between batteries.
[0111] S23. Training samples are generated using the sliding window method. Let the input window length be T and the prediction step size be P. In the normalized capacity sequence... Define the k-th input-output pair for:
[0112] ;
[0113] ;
[0114] in, This represents an input window consisting of T consecutive capacity values, characterizing the degradation features of a lithium battery over a period of time. This represents the P future capacity values corresponding to the input window, serving as the true labels for the source domain dataset and the prediction targets for the target domain dataset. When the length of the input window is T, a total of [number] values can be generated. One sample pair;
[0115] S24. For the source domain dataset It contains input data and real labels, and obtains the source domain sample set based on the input-output pairs. For the target domain dataset Due to the lack of real labels, only the input window is retained to obtain the target sample set. ;
[0116] S25, the single-channel input window Channel expansion is achieved through the repeat operation, resulting in an expanded input window. In batch processing mode, the source domain sample set and the target domain sample set are represented as follows:
[0117] ;
[0118] Where B represents the preset batch size; C represents the total number of channels.
[0119] It's important to note that the target domain samples obtained in this step cannot be directly used for supervised regression. Instead, they serve as unsupervised alignment samples for training. Specifically, the target domain input is mapped to a feature representation by a feature extraction network and constrained by the source domain features. Distribution alignment methods, such as maximum mean difference, are used to reduce the distributional difference between the source and target domains in the feature space, thereby achieving cross-domain knowledge transfer. This process is unsupervised training. Since the target domain input lacks a true label, this application uses the supervised loss from the source domain and the cross-domain distribution alignment loss in subsequent steps to jointly constrain the network parameters, thus enabling accurate estimation of health status even when the target domain is unlabeled.
[0120] S3, Source Domain Sample Set and target domain sample set Input the designed hierarchical transfer regression and adaptive temporal alignment networks STRATA-Net respectively. STRATA-Net includes a learnable differential convolutional module LDC and a trapezoidal hierarchical skip-gated fusion module T-SHIFT, as follows: Figure 2 As shown, this application obtains source domain capacity features by extracting degradation features at multiple scales and applying a gating mechanism to achieve fusion. and target domain capacity features ;
[0121] In a preferred embodiment, step S3 specifically includes:
[0122] S31. Construct a three-branch parallel learnable differential convolutional module (LDC), with each branch denoted as... And set the kernel size for each branch. Coefficient of expansion With the number of groups , In this embodiment, the parameters of each branch are specifically set as follows:
[0123] ;
[0124] Since subsequent predictions are performed step-by-step, symmetrical padding is used to maintain consistency between the output and input time lengths. The padding step size for each branch is as follows: ;
[0125] This setup ensures that each branch has an output of equal length, and that different branches have different receptive fields. The effective receptive field at multiple scales is represented as follows:
[0126] ;
[0127] Covering short-term (small) ), mid-term (medium ) and long-term (large) The timing pattern of ).
[0128] S32, in the branch Internally, a set of learnable structural masks is used to dynamically modulate the convolutional kernel instead of fixed weights; in this embodiment, the specific process of dynamic modulation is as follows:
[0129] With branches For example, let's set up branches. The initial convolutional kernel weights for the c-th output channel for:
[0130] ;
[0131] in, C represents the number of input channels per group after grouping, and C represents the total number of channels.
[0132] Calculate the input branch Comprehensive influence of channel direction :
[0133] ;
[0134] in, For the first input channel in a single group The convolutional kernel weights of the c-th input channel to the c-th output channel;
[0135] Define a binary center mask vector The binary center mask vector takes a value of 1 only when index k is the center position of the convolution kernel, and takes a value of 0 at other positions.
[0136] Introducing channel-level adjustment coefficient and global adjustment coefficient Adjust the overall impact and construct branches. The dynamic mask vector of the c-th output channel The formula is expressed as:
[0137] ;
[0138] in, This indicates element-wise multiplication;
[0139] The repeat operation will Expanded to a single input channel dimension and combined with the initial convolutional kernel weights Element-wise multiplication yields the dynamically modulated convolution kernel weights. The formula is expressed as:
[0140] ;
[0141] in, This is the expanded dynamic mask vector;
[0142] The other two branches also use the same dynamic modulation method, but the channel-level modulation coefficients and global modulation coefficients differ from those of the branches. Different scales are obtained by grouping the data into different numbers.
[0143] Using dynamically modulated convolution weights on the input and Perform convolution operations separately to obtain the branches. Feature response of the c-th output channel The formula is expressed as:
[0144] ;
[0145] in, Indicates input, The weights of the convolutional kernel are dynamically modulated; the branches are... The output channels are spliced together to obtain branches. Output characteristics ;
[0146] Similarly, the other two branches also undergo the same dynamic modulation operation, forming a multi-scale output that expands step by step:
[0147] ;
[0148] in, , Branches , The output characteristics.
[0149] This application uses a three-branch parallel learnable differential convolution module (LDC) as the core of feature extraction, which can achieve multi-scale modeling of short-term fluctuations, phased structural changes and long-term decline trends with configurable convolution kernels, dilation and grouping without changing the input and output time length.
[0150] The LDC module achieves adaptive enhancement and background suppression of key time slices based on the learnable structural mask and channel influence at its center, maintaining stable degradation representations under low signal-to-noise ratio and operational disturbances without additional complex attention. Grouped convolution and trapezoidal channel configuration from narrow to wide significantly reduce parameter count and latency, facilitating deployment on edge / vehicle BMS. The three-branch outputs are fully aligned in the temporal dimension, naturally adapting to subsequent feature alignment losses. It can perform inter-domain alignment at the same time step or support coarse-to-fine stepwise course-based alignment. Subsequent cross-scale residual fusion with the T-SHIFT module further improves the consistency and separability of local and global information. The dynamic mask is adaptively generated by statistical analysis of the current batch of data, giving the output features a certain degree of domain invariance before entering the alignment stage, thereby reducing alignment difficulty, accelerating convergence, and improving cross-domain generalization. At the same time, all operations within the module are differentiable and have bounded coefficients, ensuring stable training and easy parameter tuning. In addition, all interfaces within the module are unified, seamlessly connecting with data after single-channel repeat expansion, and are plug-and-play. LDC provides an efficient, robust, and deployable multi-scale time series characterization foundation, which helps improve the accuracy and stability of cross-domain SOH / capacity regression and lifetime endpoint prediction.
[0151] S33. In the T-SHIFT module, fuse the multi-scale output features obtained in step S32: After the channel is upgraded to a higher dimension, it interacts with the gating mechanism. Complementary selection fusion is performed to obtain primary fusion characteristics. ; then Channel dimensional upgrade, and Complementary selection fusion is performed again to obtain advanced fusion features. Finally, the residual is calculated with the input sequence to output the source domain capacity feature. Or target domain capacity characteristics .
[0152] In a preferred embodiment, step S33 specifically includes:
[0153] right Applying a 1×1 convolution to increase the channel dimension is expressed by the following formula:
[0154] ;
[0155] in, For 1×1 convolution, express Will from Ascend to , Branches after dimensional ascension The output characteristics;
[0156] based on Calculate the primary fusion gating coefficients, and under the action of the gating mechanism, [the following will occur]. and Complementary selection fusion is performed to obtain primary fusion characteristics. The formula is expressed as:
[0157] ;
[0158] in, This indicates element-wise multiplication. For the initial fusion gating coefficient; For the Sigmoid function, For the Tanh function;
[0159] The first complementary selection fusion highlights locally sensitive patterns by using low-scale feature-driven gating, while retaining patterns from other regions. The fine-grained compensation and the complementary mechanism of one increase and one decrease also suppress redundancy and noise.
[0160] Next to Apply 1×1 convolution to perform channel upsizing, and then use the upsized primary fusion features. Calculate the advanced fusion gating coefficients, and under the action of the gating mechanism, [the following will occur]. and Complementary selection fusion is performed again to obtain advanced fusion features. The formula is expressed as:
[0161] ;
[0162] in, For 1×1 convolution, express Will from Ascend to ; For advanced fusion gating coefficients;
[0163] While maintaining the temporal resolution, the second complementary selection fusion introduces a larger receptive field and uses the mesoscale as the "arbitrator" to achieve an adaptive trade-off between local and global aspects, thereby enhancing cross-scale consistency and robustness.
[0164] Finally, advanced fusion features are used. Generate residual fusion gating coefficients, combined with the input Complementary selection residual fusion is performed within each domain to output source domain capacity features. Or target domain capacity characteristics The formula is expressed as:
[0165] ;
[0166] in, For residual fusion gating coefficients, It is a 1×1 convolution.
[0167] T-SHIFT, as the key fusion and mapping unit for lithium battery health state estimation in this invention, sequentially performs cross-layer jump fusion at low to medium to high scales along a trapezoidal channel gradation from narrow to wide at the same time resolution. It also uses complementary selection gating to adaptively balance the main and auxiliary branches, ensuring that low-level details and high-level trends coordinate as needed at each time point. Its one-dimensional convolutional channel alignment and information compression reduce the coupling overhead caused by dimensional differences between branches. The gating is dynamically generated from the current batch of features, enabling stable highlighting of degradation-sensitive segments under rate changes, temperature drift, and measurement noise. This approach suppresses redundant interference and ultimately employs domain-consistent residual gating to isomorphically map high-level fusion features to the original sequence. It shares gating parameters and fusion strategies between the source and target domains, fundamentally improving the domain invariance and interpretability of the representation. This significantly reduces the learning burden of subsequent alignment loss, accelerates model convergence, and enhances cross-domain generalization and robustness. Furthermore, the module is lightweight, parameter-controllable, and training-stable, allowing for seamless integration with the multi-scale outputs of the LDC model. This facilitates deployment in edge / vehicle BMS scenarios, improving the accuracy and stability of SOH / capacity regression and lifetime end prediction.
[0168] Using source domain sample set The true labels are used to construct a regression head for prediction, and the mean squared error is calculated as the supervised loss; simultaneously, and An alignment loss is introduced between the supervision loss and the alignment loss; a total loss function is constructed to guide the training of STRATA-Net based on the supervision loss and the alignment loss, and the parameters of STRATA-Net are continuously updated through backpropagation until the optimal parameter configuration of STRATA-Net is trained.
[0169] In a preferred embodiment, step S4 specifically includes:
[0170] S41. Construct a regression predictor using the true labels of the source domain sample set. Calculate the mean squared error as the supervision loss based on the prediction capacity output by STRATA-Net. The formula is expressed as:
[0171] ;
[0172] in, This represents the number of samples in the source domain. This represents the actual capacity of the i-th source domain sample; This represents the prediction capacity of the i-th source domain sample obtained through STRATA-Net regression prediction;
[0173] S42. Based on the single-core linear time maximum mean difference and time constraints, design an alignment loss. Let the source domain capacity feature set and target domain capacity feature set of the current batch be respectively... , Then alignment loss The formula is expressed as:
[0174] ;
[0175] in, , Indicates the difference between adjacent features; For time-series constraint weights; The unbiased estimator of single-core linear-time MMD is expressed by the following formula:
[0176] ;
[0177] in, and order , Samples were drawn in pairs in sequence; For the kernel function, a single radial basis function (RBF) is used, and the kernel bandwidth is determined by the sample union. Calculate the square of the pairwise Euclidean distance ( , u, v The median of the set of elements in the union of the samples Z is obtained.
[0178] S43. Based on the supervised loss and alignment loss, the total loss function is obtained. , To balance the supervision loss and alignment loss, a balancing factor is used. During training, forward propagation is performed first, inputting source domain samples into STRATA-Net to extract capacity features and calculating the total loss function. Then, with the goal of minimizing the total loss, the parameters of STRATA-Net are optimized using the backpropagation algorithm. The optimal parameter configuration of the STRATA-Net is obtained after training.
[0179] In this embodiment, through continuous iteration, the parameters of STRATA-Net converge. The model can ensure the accuracy of capacity prediction in the source domain and achieve distribution alignment between the source and target domains in the feature space, thereby completing cross-domain transfer training.
[0180] The total loss function proposed in this invention is jointly composed of source domain supervised regression error and cross-domain feature alignment term. The former ensures the model's capacity prediction accuracy on labeled data, while the latter employs a lightweight single-core linear-time MMD with added temporal consistency constraints. This effectively reduces the distribution difference between the source and target domains and mitigates alignment degradation trends without relying on target domain labels. The two parts adaptively balance "accuracy versus alignment" through a tradeoff factor, resulting in low computational complexity, numerical stability, and ease of parameter tuning. This accelerates convergence and significantly improves cross-domain generalization ability and robustness, while reducing the impact of operating condition changes and measurement noise on health estimation. Thus, higher SOH / capacity prediction accuracy is achieved in unsupervised transfer learning scenarios.
[0181] S5. Target domain sample set Input the data into the trained STRATA-Net and use a rolling prediction method to progressively infer the capacity values of subsequent cycles to obtain the predicted results of the battery capacity degradation curve in the target domain. Compare the predicted results with the actual curve to evaluate the predictive ability of the network.
[0182] In a preferred embodiment, step S5 specifically includes:
[0183] S51, Target Domain Sample Set In a STRATA-Net with optimal parameter configuration, for any input window in the target domain sample set... ,in, This represents the normalized true capacity value of the t-th charge-discharge cycle, where T represents the input window length, i.e., T charge-discharge cycles. STRATA-Net first predicts the capacity value of the next charge-discharge cycle step by step. ;
[0184] S52. A recursive prediction strategy is adopted to concatenate the predicted value of each step with the historical capacity sequence to form a new input window, and then proceed to the next prediction step until the entire life cycle of the target domain lithium battery is covered; through step-by-step iteration, a complete predicted capacity sequence is obtained. , The total number of charge-discharge cycles during the lithium battery's lifespan; the predicted capacity curve of the target domain battery is obtained based on the complete predicted capacity sequence;
[0185] S53. Compare the predicted capacity curve with the actual capacity curve to evaluate the degradation trend prediction capability of STRATA-Net in the target domain, and provide a basis for lithium battery health management and life prediction.
[0186] Furthermore, the present invention also discloses an electronic device comprising a memory and a processor, wherein:
[0187] Memory is used to store computer programs that can run on a processor;
[0188] A processor is configured to, while running the computer program, execute a lithium battery health estimation method based on a feature-aligned unsupervised transfer network as described above.
[0189] The present invention also discloses a computer-readable storage medium storing computer instructions for causing a processor to execute a lithium battery health estimation method based on a feature-aligned unsupervised migration network as described above.
[0190] This invention proposes a hierarchical transfer regression and adaptive temporal alignment network (STRATA-Net) for lithium battery health estimation. This network includes normalization and sliding window preprocessing, a feature extraction network combining learnable differential convolution (LDC) and trapezoidal hierarchical skip-gated fusion (T-SHIFT), and an improved maximum mean difference loss function and mean squared error joint optimization strategy. To verify the performance of the proposed method, experiments were conducted on a publicly available lithium battery dataset provided by CALCE and a lithium battery dataset collected by the WRBD laboratory. The CALCE dataset, provided by the Advanced Life Cycle Engineering Center (CALCE), contains test data for four batteries: CS2_35, CS2_36, CS2_37, and CS2_38. The WRBD dataset selected four representative batteries: cell2, cell5, cell6, and cell8. Specifically, Table 1 below shows the complete lithium battery capacity data.
[0191] Table 1. Fault types and labels in the CALCE and WRBD datasets
[0192] ;
[0193] In the experiments, this invention uses the publicly available CALCE lithium battery dataset as the source domain training set and the WRBD laboratory-collected lithium battery dataset as the target domain for unsupervised prediction evaluation. First, the source and target domain data are normalized and processed using a sliding window to construct comparable sample sequences. Then, the source and target domain samples are input into the designed STRATA-Net, where the LDC module is used to extract local difference features of capacity degradation, and the T-SHIFT module is used to achieve adaptive fusion of cross-scale features. During training, supervised regression is performed using source domain samples and their capacity labels through mean squared error loss, while an improved MMD loss is combined to achieve unsupervised alignment of feature distributions between the source and target domains, thereby optimizing network parameters. Finally, the trained STRATA-Net is used to map the target domain test samples, and health status prediction is achieved under unlabeled conditions to verify the model's accuracy and generalization ability in cross-domain scenarios.
[0194] For illustration, this invention sets the number of training iterations to 100, the batch size to 64, and the learning rate to an initial Adam algorithm of 0.001. Figure 3 The figure shows the comparison curves of the actual and predicted values of the four target domain batteries on the test set. It can be seen that the predicted curves can follow the actual trend of capacity decay well, indicating that the proposed method can effectively characterize the battery degradation process. Figure 4 The corresponding residual curves are shown. The residuals are generally within a small range, with some fluctuations only occurring in the later stages of battery degradation, indicating that the prediction model maintains high stability throughout its lifespan. Figure 5 The scatter plot of the actual and predicted values shows that the data points are closely distributed on the diagonal, further verifying the high consistency between the predicted results and the actual capacity, demonstrating the accuracy and reliability of the method of this invention in battery health state estimation.
[0195] In summary, the method proposed in this invention effectively solves the problem of insufficient capacity decay characteristics when target battery degradation data is lacking. It overcomes the shortcomings of existing battery health state estimation methods, such as insufficient generalization ability and low prediction accuracy, and can accurately predict the health state of unknown batteries under label-free conditions. This method improves adaptability and reliability across battery data conditions and is suitable for practical applications such as battery health management and lifespan prediction.
[0196] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.
[0197] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).
[0198] The above embodiments provide a detailed description of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A lithium battery health estimation method based on feature-aligned unsupervised transfer networks, characterized in that, Specifically, the following steps are included: S1. Collect capacity decay data of lithium batteries during charge-discharge cycles to construct a source domain dataset of battery capacity degradation curves. and target domain dataset ; S2, for the source domain dataset and target domain dataset Normalization is performed, and a sliding window is used to generate source domain sample sets respectively. and target domain sample set ; S3, Source Domain Sample Set and target domain sample set The hierarchical transfer regression and adaptive temporal alignment networks STRATA-Net, designed respectively, are input into the network. STRATA-Net includes a learnable differential convolutional module (LDC) and a trapezoidal hierarchical skip-gated fusion module (T-SHIFT). By extracting degradation features at multiple scales and applying a gating mechanism, the source domain capacity features are obtained. and target domain capacity features ; S4. Utilizing the source domain sample set The true labels are used to construct a regression head for prediction, and the mean squared error is calculated as the supervised loss; simultaneously, and An alignment loss is introduced between the supervision loss and the alignment loss; a total loss function is constructed to guide the training of STRATA-Net based on the supervision loss and the alignment loss, and the parameters of STRATA-Net are continuously updated through backpropagation until the optimal parameter configuration of STRATA-Net is trained. S5. Target domain sample set Inputting the data into the trained STRATA-Net, the subsequent cycle capacity values are inferred step by step using a rolling prediction method to obtain the predicted results of the battery capacity degradation curve in the target domain; the predicted results are compared with the actual curve to evaluate the network's predictive ability.
2. The lithium battery health estimation method based on feature-aligned unsupervised transfer networks according to claim 1, characterized in that, Step S1 is as follows: Capacity degradation curves of different lithium batteries during charge-discharge cycles were extracted from publicly available lithium battery datasets to serve as the source domain dataset. ; Capacity degradation curves of different lithium batteries during charge-discharge cycles were extracted from a lithium battery dataset collected in the laboratory as the target domain dataset. .
3. The lithium battery health estimation method based on feature-aligned unsupervised transfer networks according to claim 1, characterized in that, Step S2 specifically includes: S21. For the source domain dataset and target domain dataset Let the capacity sequence of the i-th lithium battery in any dataset be . Its formula is expressed as: ; in, This represents the capacity value of the i-th lithium battery in the t-th charge-discharge cycle. This represents the total number of charge-discharge cycles during the lifespan of a lithium battery. S22. Define the average capacity of the first N charge-discharge cycles as the normalization metric, and normalize the capacity sequence using the formula: ; ; in, Represents a capacity sequence The normalization factor, This represents the normalized capacity value of the i-th lithium battery in the t-th charge-discharge cycle. The normalized capacity sequence is represented as: ; S23. Training samples are generated using the sliding window method. Let the sliding window length be T and the prediction step size be P. In the normalized capacity sequence... Define the k-th input-output pair for: ; ; in, This represents an input window consisting of T consecutive capacity values, characterizing the degradation features of a lithium battery over a period of time. This represents the P future capacity values corresponding to the input window, serving as the true labels of the source domain dataset and the prediction targets for the target domain dataset. S24. For the source domain dataset The source domain sample set is obtained based on the input-output pairs. For the target domain dataset Only the input window is retained to obtain the target sample set. ; S25, The single-channel input window Channel expansion is achieved through the repeat operation, resulting in an expanded input window. In batch processing mode, the source domain sample set and the target domain sample set are represented as follows: ; Where B represents the preset batch size; C represents the total number of channels.
4. The lithium battery health estimation method based on feature-aligned unsupervised transfer networks according to claim 3, characterized in that, Step S3 specifically includes: S31. Construct a three-branch parallel learnable differential convolutional module (LDC), with each branch denoted as... And set the kernel size for each branch. Coefficient of expansion With the number of groups , ; Using symmetrical filling, the filling step size for each branch is: ; S32, in the branch Internally, a set of learnable structural masks is used to dynamically modulate the convolutional kernel instead of fixed weights; the dynamically modulated convolutional weights are then used to modulate the input... and Perform convolution operations separately to obtain the branches. Feature response of the c-th output channel The formula is expressed as: ; in, Indicates input, The weights of the convolutional kernel are dynamically modulated; the branches are... The output channels are spliced together to obtain branches. Output characteristics ; Similarly, the other two branches also undergo the same dynamic modulation operation, forming a multi-scale output that expands step by step: ; in, , Branches , The output characteristics; S33. In the T-SHIFT module, fuse the multi-scale output features obtained in step S32: After the channel is upgraded to a higher dimension, it interacts with the gating mechanism. Complementary selection fusion is performed to obtain primary fusion characteristics. ; then Channel dimensional upgrade, and Complementary selection fusion is performed again to obtain advanced fusion features. ;at last The residual is obtained by comparing the input sequence with the output source domain capacity feature. and target domain capacity features .
5. The lithium battery health estimation method based on feature-aligned unsupervised transfer networks according to claim 4, characterized in that, The specific process of dynamically modulating the convolution kernel in step S32 is as follows: With branches For example, let's set up branches. The initial kernel weights of the c-th output channel for: ; in, C represents the number of input channels per group after grouping, and C represents the total number of channels. Calculate the input branch Comprehensive influence of channel direction : ; in, For the first input channel in a single group The convolutional kernel weights of the c-th input channel to the c-th output channel; Define a binary center mask vector The binary center mask vector takes a value of 1 only when index k is the center position of the convolution kernel, and takes a value of 0 at other positions. Introducing channel-level adjustment coefficient and global adjustment coefficient Adjust the overall impact and construct branches. The dynamic mask vector of the c-th output channel The formula is expressed as: ; in, This indicates element-wise multiplication; The repeat operation will Expanded to a single input channel dimension and combined with the initial convolutional kernel weights Element-wise multiplication yields the dynamically modulated convolution kernel weights. The formula is expressed as: ; in, This is the expanded dynamic mask vector; The other two branches also use the same dynamic modulation method, but the channel-level modulation coefficients and global modulation coefficients differ from those of the branches. Different scales are obtained by grouping the data into different numbers.
6. The lithium battery health estimation method based on feature-aligned unsupervised transfer networks according to claim 4, characterized in that, Step S33 is as follows: right Applying a 1×1 convolution to increase the channel dimension is expressed by the following formula: ; in, For 1×1 convolution, express Will from Upgrade to , Branches after dimensional ascension The output characteristics; based on Calculate the primary fusion gating coefficients, and under the action of the gating mechanism, [the following will occur]. and Complementary selection fusion is performed to obtain primary fusion characteristics. The formula is expressed as: ; in, This indicates element-wise multiplication. For the initial fusion gating coefficient; For the Sigmoid function, For the Tanh function; Next to Apply 1×1 convolution to perform channel upsizing, and then use the upsized primary fusion features. Calculate the advanced fusion gating coefficients, and under the action of the gating mechanism, [the following will occur]. and Complementary selection fusion is performed again to obtain advanced fusion features. The formula is expressed as: ; in, For 1×1 convolution, express Will from Upgrade to ; For advanced fusion gating coefficients; Finally, advanced fusion features are used. Generate residual fusion gating coefficients, combined with the input Complementary selection residual fusion is performed within each domain to output source domain capacity features. and target domain capacity features The formula is expressed as: ; in, For residual fusion gating coefficients, It is a 1×1 convolution.
7. The lithium battery health estimation method based on feature-aligned unsupervised transfer networks according to claim 1, characterized in that, Step S4 specifically includes: S41. Construct a regression predictor using the true labels of the source domain sample set. Calculate the mean squared error as the supervision loss based on the prediction capacity output by STRATA-Net. The formula is expressed as: ; in, This represents the number of samples in the source domain. This represents the actual capacity of the i-th source domain sample; This represents the prediction capacity of the i-th source domain sample obtained through STRATA-Net regression prediction; S42. Based on the single-core linear time maximum mean difference and time constraints, design an alignment loss. Let the source domain capacity feature set and target domain capacity feature set of the current batch be respectively... , Then alignment loss The formula is expressed as: ; in, , Indicates the difference between adjacent features; For time-series constraint weights; It is an unbiased estimator of single-core linear-time MMD; S43. Based on the supervision loss and alignment loss, the total loss function is obtained. , To balance the supervision loss and alignment loss, a balancing factor is used. During training, forward propagation is performed first, inputting source domain samples into STRATA-Net to extract capacity features and calculating the total loss function. Then, with the goal of minimizing the total loss, the parameters of STRATA-Net are optimized using the backpropagation algorithm. The optimal parameter configuration of the STRATA-Net is obtained after training.
8. The lithium battery health estimation method based on feature-aligned unsupervised transfer networks according to claim 1, characterized in that, Step S5 specifically includes: S51, Target Domain Sample Set In a STRATA-Net with optimal parameter configuration, for any input window in the target domain sample set... ,in, This represents the normalized true capacity value of the t-th charge-discharge cycle, where T represents the input window length, i.e., T charge-discharge cycles. STRATA-Net first predicts the capacity value of the next charge-discharge cycle step by step. ; S52. A recursive prediction strategy is adopted to concatenate the predicted value of each step with the historical capacity sequence to form a new input window, and then proceed to the next prediction step until the entire life cycle of the target domain lithium battery is covered; through step-by-step iteration, a complete predicted capacity sequence is obtained. , The total number of charge-discharge cycles during the lithium battery's lifespan; the predicted capacity curve of the target domain battery is obtained based on the complete predicted capacity sequence; S53. Compare the predicted capacity curve with the actual capacity curve to evaluate the degradation trend prediction capability of STRATA-Net in the target domain, and provide a basis for lithium battery health management and life prediction.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor, wherein: Memory is used to store computer programs that can run on a processor; A processor, configured to, while running the computer program, execute a lithium battery health estimation method based on a feature-aligned unsupervised transfer network as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute a lithium battery health estimation method based on a feature-aligned unsupervised transfer network as described in any one of claims 1-8.
Citation Information
Patent Citations
Lithium battery health condition monitoring method based on feature transfer learning
CN113536676A
Lithium battery health state estimation method based on hybrid neural network and transfer learning
CN116679232A