Unsupervised domain adaptive algorithm for lithium-ion battery state of charge prediction
Through the unsupervised domain adaptive algorithm and deep learning model migration technology, the accuracy of lithium-ion battery state of charge prediction under different conditions is solved, and the accurate prediction of battery state of charge under changing operating conditions is achieved.
Patent Information
- Application Number
- CN202410215906.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-27
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-02-27
AI Technical Summary
The existing lithium-ion battery state-of-charge prediction methods have large errors and are unreliable in practical applications, especially when the operating conditions of the battery to be predicted are different from the offline training set, it is difficult to achieve accurate SOC estimation.
Unsupervised domain adaptive algorithm is adopted to build a deep learning model for battery charge state prediction, and feature extractors and predictors are trained using offline data sets, and unsupervised domain adaptive is built by combining domain discriminator, feature distance discriminator and reconstruction module. Framework, migration model to target conditions for battery state of charge prediction.
Accurate prediction of battery charge state under changing conditions is achieved, which improves the adaptability and reliability of the prediction model and reduces estimation error.
Smart Images

Figure CN118209861B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of battery state of charge prediction, and in particular to a method for predicting the state of charge of a lithium-ion battery using an unsupervised domain adaptive algorithm. Background Art
[0002] As the core component of electric vehicles, lithium-ion batteries play an important role in the field of electric vehicles. Lithium-ion batteries have the characteristics of long life, high energy density, and low self-discharge. Their operation is accompanied by a battery management system, which has functions such as current sensing, temperature regulation, and health monitoring. Among them, state of charge (SOC) estimation is a basic function of battery health management, which shows the remaining power of the battery in a cycle. Accurate state of charge estimation for electric vehicles is of great significance. Therefore, people have tried various methods to estimate SOC, among which the most direct method is the coulomb counting method. It calculates the integral of the current over a period of time as the charge loss. However, the initial values of these methods are unknown. In addition, the errors of this method will accumulate and lead to large estimation deviations in practical applications. Another simple and direct method is the open circuit voltage lookup table method, which establishes a predefined relationship table between the open circuit voltage and the SOC value. However, this method requires the battery to remain in a static environment for several hours before measuring the open circuit voltage, and lacks real-time application.
[0003] In addition to these two basic methods, other methods are generally divided into model-based methods and data-driven methods. For model-based methods, they can be further divided into electrochemical models and equivalent circuit models. The mass and charge transfer equations required by electrochemical methods are often complex. The equivalent circuit model establishes state space equations with capacitors and resistors as components, and then determines the parameters by least squares estimation or recursive least squares estimation. They can also be alternately estimated by polarization characteristic curves in experiments, and then estimate SOC through filters such as Kalman filters. However, these methods rely on accurate modeling of the battery and accurate estimation of parameters. In this case, accurate SOC estimation remains challenging. For data-driven methods, people can easily use measured data such as current, voltage, and temperature to directly map to SOC through deep learning networks. For example, support vector machine, long short-term memory (LSTM), bidirectional LSTM (BiLSTM), convolutional neural network (CNN), etc. These methods show the superiority and feasibility of using data-driven methods to estimate SOC without the need for physical model knowledge.
[0004] However, these methods assume that the operating conditions of the target battery to be predicted are the same as those of the offline training set batteries, that is, they assume that their marginal probabilities are the same. However, in practical applications, the target battery to be predicted may have different operating conditions from those of the batteries in the offline training set. Although some studies have proposed to directly use the model trained in the offline training set, the estimation error is large and unreliable.
[0005] In view of this, the present invention provides a method for predicting the state of charge of a lithium-ion battery using an unsupervised domain adaptive algorithm. Summary of the invention
[0006] According to the above-mentioned deficiencies, a method for predicting the state of charge of lithium-ion batteries using an unsupervised domain adaptive algorithm is provided. The present invention mainly uses an offline data set to train a source model, and then collects an unlabeled data set of batteries with varying working conditions. Based on the proposed unsupervised domain adaptive algorithm, the source model is trained together with the offline data set, and finally a prediction model migrated to the target condition is obtained, which is used for predicting the state of charge of the battery under the working condition.
[0007] The technical means adopted by the present invention are as follows:
[0008] The present invention provides a method for predicting the state of charge of a lithium-ion battery using an unsupervised domain adaptive algorithm, comprising:
[0009] Build a deep learning model for battery state of charge prediction, including feature extractors and predictors;
[0010] Get offline dataset;
[0011] Providing the battery charge state prediction deep learning model, training it using the offline data set, and obtaining feature extractor No. 1 and the trained predictor;
[0012] Providing a feature extractor, migrating the parameters of the feature extractor No. 1 to the provided feature extractor, to obtain feature extractor No. 2;
[0013] The feature extractor No. 1 and the feature extractor No. 2 are combined with a domain discriminator, a feature distance discriminator and a reconstruction module to construct an unsupervised domain adaptation framework;
[0014] Acquire an online data set, where the online data set has a different working condition from the offline data set;
[0015] Using the offline data set and the online data set to train the unsupervised domain adaptation framework to obtain the trained unsupervised domain adaptation framework;
[0016] Extract the trained feature extractor No. 2 from the trained unsupervised domain adaptation framework, and combine it with the trained predictor to form a final battery charge state prediction deep learning model;
[0017] Online data is input into the final battery state of charge prediction deep learning model, and the final battery state of charge prediction deep learning model outputs a battery state of charge prediction result.
[0018] Preferably, the offline data set includes an offline data group and corresponding labels, and the online data set includes an online data group;
[0019] After the offline data set is obtained, the offline data set is preprocessed, including: resampling the offline data set, and then normalizing the resampled offline data set;
[0020] After the online data set is acquired, the online data set is preprocessed, including: resampling the online data set, and then normalizing the resampled online data set.
[0021] Preferably, the feature extractor comprises a residual network, a depthwise separable convolution, a bidirectional long short-term memory network and a self-attention layer connected in sequence.
[0022] Preferably, providing the battery charge state prediction deep learning model, training it with the offline data set to obtain feature extractor No. 1 and the trained predictor, comprises:
[0023] Dividing the offline data set into an offline training set, an offline validation set, and an offline test set;
[0024] The battery charge state prediction deep learning model provided by the offline training set training is adopted to obtain a pre-trained battery charge state prediction deep learning model;
[0025] Inputting the offline verification set into the pre-trained battery charge state prediction deep learning model, and selecting the pre-trained battery charge state prediction deep learning model with the best performance as the trained battery charge state prediction deep learning model;
[0026] The feature extractor of the trained battery charge state prediction deep learning model is used as the feature extractor No. 1, and the predictor of the trained battery charge state prediction deep learning model is used as the trained predictor.
[0027] Preferably, the feature extractor No. 1 and the feature extractor No. 2 are combined with a domain discriminator, a feature distance discriminator and a reconstruction module to construct an unsupervised domain adaptation framework, including:
[0028] The feature extractor No. 1 is respectively connected to the domain discriminator, the feature distance discriminator, and the reconstruction module;
[0029] The feature extractor No. 2 is respectively connected to the domain discriminator, the feature distance discriminator, and the reconstruction module;
[0030] A total loss function value calculation module is provided, which is respectively connected to the domain discriminator, the feature distance discriminator, and the reconstruction module, and is used to calculate the sum of the first loss function value output by the domain discriminator, the second loss function value output by the feature distance discriminator, and the third loss function value output by the reconstruction module.
[0031] Preferably, the adopting the offline data set and the online data set to train the unsupervised domain adaptation framework to obtain the trained unsupervised domain adaptation framework includes:
[0032] Dividing the offline data set into an offline training set, an offline validation set, and an offline test set;
[0033] Dividing the online data set into an online training set, an online validation set and an online test set;
[0034] Input the offline training set into the feature extractor No. 1, and input the online training set into the feature extractor No. 2 for iteration to obtain the pre-trained unsupervised domain adaptation framework;
[0035] The offline validation set is input into the feature extractor No. 1, and the online validation set is input into the feature extractor No. 2, and the pre-trained unsupervised domain adaptation framework with the best performance is selected as the trained unsupervised domain adaptation framework.
[0036] Preferably, the step of inputting the offline training set into the feature extractor No. 1 and the step of inputting the online training set into the feature extractor No. 2 for iteration comprises:
[0037] At each iteration, the discriminator calculates the first loss function value of the feature extractor No. 1 and the feature extractor No. 2, the feature distance discriminator calculates the second loss function value of the feature extractor No. 1 and the feature extractor No. 2, and the reconstruction module calculates the third loss function value of the feature extractor No. 1 and the feature extractor No. 2; the total loss function value calculation module calculates the total loss function value according to the first loss function value, the second loss function value and the third loss function value;
[0038] When the iteration condition is met, the iteration ends.
[0039] Preferably, the iteration conditions include:
[0040] In the first stage, the total loss function value continues to decrease;
[0041] In the second stage, the total loss function value remains unchanged, and the second stage is the next stage adjacent to the first stage.
[0042] Compared with the prior art, the present invention has the following advantages:
[0043] The method for predicting the state of charge of a lithium-ion battery using an unsupervised domain adaptive algorithm provided by the present invention comprises: building a deep learning model for predicting the state of charge of a battery, including a feature extractor and a predictor; obtaining an offline data set; providing a deep learning model for predicting the state of charge of a battery, and training it using the offline data set to obtain a feature extractor No. 1 and a trained predictor; providing a feature extractor, and migrating the parameters of the feature extractor No. 1 to the provided feature extractor to obtain a feature extractor No. 2; combining the feature extractor No. 1 and the feature extractor No. 2 with a domain discriminator, a feature distance discriminator and a reconstruction module to construct an unsupervised domain adaptive framework; obtaining an online data set, wherein the online data set has different working conditions from the offline data set; training the unsupervised domain adaptive framework using the offline data set and the online data set to obtain a trained unsupervised domain adaptive framework; extracting the trained feature extractor No. 2 from the trained unsupervised domain adaptive framework, and combining it with the trained predictor to form a final deep learning model for predicting the state of charge of a battery; inputting online data into the final deep learning model for predicting the state of charge of a battery, and the final deep learning model for predicting the state of charge of a battery outputs a prediction result of the state of charge of a battery. By utilizing unlabeled data of batteries with different working conditions from the offline data set to migrate the offline pre-trained model, the model can be adapted to the domain of batteries with changing conditions, and ultimately the battery state of charge can be accurately predicted. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0045] Figure 1 A schematic flow chart of a method for predicting the state of charge of a lithium-ion battery using an unsupervised domain adaptive algorithm provided by the present invention.
[0046] Figure 2 A structural diagram of DWS1D CNN.
[0047] Figure 3A structural diagram of DWS ResBlock.
[0048] Figure 4 A lithium battery SOC prediction situation of the method for predicting the state of charge of a lithium-ion battery using the unsupervised domain adaptive algorithm provided by the present invention. DETAILED DESCRIPTION
[0049] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0050] It should be noted that the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products or apparatus.
[0051] Combination Figure 1 , Figure 1 A flow chart of a method for predicting the state of charge of a lithium-ion battery using an unsupervised domain adaptive algorithm provided by the present invention is provided to illustrate a specific embodiment of the method for predicting the state of charge of a lithium-ion battery using an unsupervised domain adaptive algorithm provided by the present invention, including:
[0052] Build a deep learning model for battery state of charge prediction, including feature extractors and predictors;
[0053] Get offline dataset;
[0054] Providing a battery state of charge prediction deep learning model, training it using an offline data set, and obtaining feature extractor No. 1 and a trained predictor;
[0055] Provide a feature extractor, transfer the parameters of feature extractor No. 1 to the provided feature extractor, and obtain feature extractor No. 2;
[0056] The feature extractor No. 1 and feature extractor No. 2 are combined with the domain discriminator, feature distance discriminator and reconstruction module to construct an unsupervised domain adaptation framework;
[0057] Obtain online data sets, which have different working conditions from offline data sets;
[0058] The unsupervised domain adaptation framework is trained using an offline dataset and an online dataset to obtain a trained unsupervised domain adaptation framework;
[0059] Extract the trained feature extractor No. 2 from the trained unsupervised domain adaptation framework and combine it with the trained predictor to form the final battery charge state prediction deep learning model;
[0060] The online data is input into the final battery state of charge prediction deep learning model, and the final battery state of charge prediction deep learning model outputs the battery state of charge prediction result.
[0061] It can be understood that the battery charge state prediction deep learning model is trained through an offline data set; the parameters of feature extractor No. 1 of the trained battery charge state prediction deep learning model are migrated to the provided feature extractor to obtain feature extractor No. 2; feature extractor No. 1 and feature extractor No. 2 are combined with a domain discriminator, a feature distance discriminator and a reconstruction module to construct an unsupervised domain adaptive framework; and the trained feature extractor No. 2 is extracted from the trained unsupervised domain adaptive framework and migrated to the final battery charge state prediction deep learning model, which can make the final battery charge state prediction deep learning model more adaptable to changing working conditions and make the prediction results more accurate.
[0062] In some optional embodiments, the offline data set includes an offline data group and corresponding labels, and the online data set includes an online data group;
[0063] After obtaining the offline data set, preprocessing the offline data set includes: resampling the offline data set, and then normalizing the resampled offline data set;
[0064] After the online data set is acquired, the online data set is preprocessed, including: resampling the online data set, and then normalizing the resampled online data set.
[0065] It can be understood that the acquisition of offline data sets can be: conduct charging and discharging experiments on lithium batteries under common domestic and foreign automobile road driving conditions (such as LA92, UDDS and US06), and obtain various monitoring data of lithium batteries to form offline data sets. The charging and discharging experiments include: first determining the basic parameters of lithium batteries, including battery rated capacity, charging and discharging cut-off voltage, etc.; secondly, conducting charging and discharging tests on lithium batteries, using domestic and foreign automobile road driving conditions charging and discharging protocols, collecting various observation data such as current, voltage, temperature and capacity in the test and obtaining corresponding charging and discharging capacity data, and the various observation data such as current, voltage, temperature and capacity at each moment constitute a set of offline data groups and have corresponding battery charge state labels. The acquisition of online data sets can be: collecting online data groups with different working conditions from offline data sets (such as different ambient temperatures or different battery aging degrees), and the online data groups constitute online data sets.
[0066] The purpose of resampling the offline and online datasets is to make the number of sample points meet the input requirements of the deep learning model, that is, the input matrix dimension meets the input layer requirements. After resampling, the offline and online datasets are normalized, that is, they are subjected to maximum and minimum normalization to accelerate the convergence of subsequent algorithms.
[0067] In some optional embodiments, referring to Figure 2 and Figure 3 , Figure 2 This is a structural diagram of DWS1D CNN. Figure 3 A structural diagram of DWS ResBlock. The feature extractor includes a sequentially connected residual network, a deep separable convolution, a bidirectional long short-term memory network, and a self-attention layer.
[0068] It should be noted that the input of the feature extractor is a data matrix, which is composed of 3-dimensional data (voltage, current, temperature), and each dimension of data consists of 40 time steps. The feature extractor is composed of a residual network, a depth-separable convolution, a bidirectional long short-term memory network, and a self-attention layer. While ensuring low computational complexity, it realizes the association between battery monitoring data and battery state of charge by deepening the network depth. The specific configuration parameters are shown in Table 1:
[0069] Table 1. Feature extractor configuration parameters
[0070]
[0071] Among them, the structure of DWS 1D CNN is as follows Figure 2As shown in Figure 1, it consists of depthwise convolution (depthwise 1D CNN), one-dimensional batch normalization (1D BatchNorm), activation function (ReLU) and pointwise convolution (pointwise 1D CNN); DWSResBlock is also composed of the basic units of DWS 1D CNN, and the network is deepened through residual connections. Its structure is as follows Figure 3 As shown; Max Pooling 1D represents the maximum pooling operation.
[0072] Specifically, the depthwise convolution (depthwise 1D CNN) is calculated as follows:
[0073] y i,j,k =∑ m,n x i+m,j+n,k ×ω m,n,k
[0074] Among them, y i,j,k is the value of the kth channel at position (i, j) of the depthwise convolution output, x i+m,j+n,k is the value of the kth channel of the input at position (i+m,j+k), ω m,n,k is the weight of the kth channel of the depthwise convolution at position (m,n).
[0075] Pointwise convolution (pointwise 1D CNN) is calculated as follows:
[0076] z i,j,l =∑ k y i,j,k ×ν k,l
[0077] Among them, z i,j,l is the value of the i-th channel at position (i, j) output by the point-by-point convolution, ν k,l It is the weight between the kth channel and the lth channel of the 1×1 convolution kernel.
[0078] The residual connection is calculated as follows:
[0079] y=F(x)+x
[0080] Where y is the output of the residual block, F(x) is the output of the main part or subpath of the residual block, and x is the input of the residual block.
[0081] The bidirectional LSTM network is composed of LSTM networks with different directions in the forward and backward propagation processes, and is calculated as follows:
[0082]
[0083] in, and Represents the hidden state of the forward and backward LSTM at time t; and Respectively represent the input of the forward (positive) and backward (reverse) parts of the sequence at time t; and They respectively represent the input of the forward (positive) and backward (reverse) parts of the sequence at time t-1; [; ] represents the connection operation.
[0084] Specifically, the long short-term memory network (LSTM) is calculated as follows:
[0085]
[0086] Among them, i t Indicates entry and determines new information The update amount; σ represents the sigmoid function; W ii , W hi , b ii and b hi represents the weight and bias associated with the input gate; W ic , W hc , b ic and b hc represents the weights and biases associated with the state update. t W represents the forget gate, which determines which information is forgotten from the state; if , W hf , b if and b hf represents the weight and bias associated with the forget gate; C t Represents the updated state; f t and i t Determined by the forget gate and the input gate respectively; * Element-by-element multiplication; o t represents the output gate, which determines the form of the new hidden state; h t represents the new hidden state; tanh represents the hyperbolic tangent activation function; W io , W ho , b io , b ho Represented as weights and biases associated with the output gate.
[0087] The self-attention layer is calculated as follows:
[0088]
[0089] Among them, h i and h j are the hidden states of the bidirectional LSTM; [hi ;h j ] is to connect two hidden states; W a is the weight matrix; v is the weight vector; T is the length of the sequence; α ij is the attention weight between the i-th element and the j-th element; AttentionOutput i is the attention output of the ith element in the sequence, which is the weighted sum of all sequence elements, where the weight is determined by the attention weight α ij Decide.
[0090] Furthermore, it also includes the maximum mean difference among multiple cores:
[0091] Given two sets of samples X = {x1, x2, ..., x m} and Y={y1,y2,...,y n}, the calculation formula of multi-core maximum mean difference (MK-MMD) is:
[0092]
[0093] in, and Represent the expectations of sample pairs in X and Y respectively; represents the expectation of taking one sample from each of X and Y; is the function f in a certain Hilbert space The norm of does not exceed 1.
[0094] In some optional embodiments, a battery state of charge prediction deep learning model is provided, and the model is trained using an offline data set to obtain a feature extractor No. 1 and a trained predictor, including:
[0095] Divide the offline dataset into an offline training set, an offline validation set, and an offline test set;
[0096] The battery state of charge prediction deep learning model provided by the offline training set is trained to obtain a pre-trained battery state of charge prediction deep learning model;
[0097] Input the offline validation set into the pre-trained battery state of charge prediction deep learning model, and select the pre-trained battery state of charge prediction deep learning model with the best performance as the trained battery state of charge prediction deep learning model;
[0098] The feature extractor of the trained battery charge state prediction deep learning model is used as feature extractor No. 1, and the predictor of the trained battery charge state prediction deep learning model is used as the trained predictor.
[0099] It can be understood that the ratio of offline training set: offline validation set: offline test set = 7:1:2. Of course, it is not limited to this and can be set according to actual needs.
[0100] In some optional embodiments, continue to refer to Figure 1 , feature extractor 1 and feature extractor 2 are combined with domain discriminator, feature distance discriminator and reconstruction module to construct an unsupervised domain adaptation framework, including:
[0101] Feature extractor No. 1 is connected to the domain discriminator, feature distance discriminator, and reconstruction module respectively;
[0102] Feature extractor No. 2 is connected to the domain discriminator, feature distance discriminator, and reconstruction module respectively;
[0103] A total loss function value calculation module is provided, which is respectively connected to the domain discriminator, the feature distance discriminator, and the reconstruction module, and is used to calculate the sum of the first loss function value output by the domain discriminator, the second loss function value output by the feature distance discriminator, and the third loss function value output by the reconstruction module.
[0104] It can be understood that the domain discriminator has the same structure as the predictor, and the final output is a binary classification. The reconstruction module and the feature extractor form a U-shaped network structure, and the feature distance discriminator uses the multi-core maximum mean difference as an indicator to judge the distance between the offline and online data sets extracted by the feature extractor. By combining the loss functions of these three, an unsupervised domain adaptation framework is finally constructed under conditions different from the offline training set conditions. By constructing a new loss function to adapt to the battery state of charge estimation in the final specific situation, the feature distance discriminator is the multi-core maximum mean difference.
[0105] The configuration parameters of the reconstruction module are shown in Table 2:
[0106] Table 2. Reconstruction module configuration parameter table
[0107]
[0108] The domain discriminator configuration parameters are shown in Table 3:
[0109] Table 3. Domain discriminator configuration parameters
[0110]
[0111] Among them, Up sampling represents the upsampling process.
[0112] In some optional embodiments, an unsupervised domain adaptation framework is trained using an offline dataset and an online dataset to obtain a trained unsupervised domain adaptation framework, including:
[0113] Divide the offline dataset into an offline training set, an offline validation set, and an offline test set;
[0114] Divide the online dataset into online training set, online validation set and online test set;
[0115] The offline training set is input into feature extractor No. 1, and the online training set is input into feature extractor No. 2 for iteration to obtain a pre-trained unsupervised domain adaptation framework;
[0116] The offline validation set is input into feature extractor No. 1, and the online validation set is input into feature extractor No. 2, and the pre-trained unsupervised domain adaptation framework with the best performance is selected as the trained unsupervised domain adaptation framework.
[0117] It can be understood that the ratio of online training set: online validation set: online test set = 7:1:2. Of course, it is not limited to this and can be set according to actual needs.
[0118] In some optional embodiments, the offline training set is input into feature extractor No. 1, and the online training set is input into feature extractor No. 2 for iteration, including:
[0119] In each iteration, the discriminator calculates the first loss function value of feature extractor No. 1 and feature extractor No. 2, the feature distance discriminator calculates the second loss function value of feature extractor No. 1 and feature extractor No. 2, and the reconstruction module calculates the third loss function value of feature extractor No. 1 and feature extractor No. 2; the total loss function value calculation module calculates the total loss function value according to the first loss function value, the second loss function value and the third loss function value;
[0120] When the iteration condition is met, the iteration ends.
[0121] In some optional embodiments, the iteration condition includes:
[0122] In the first stage, the total loss function value continues to decrease;
[0123] In the second stage, the total loss function value remains unchanged, and the second stage is the next stage adjacent to the first stage.
[0124] The second stage may be a stage of 20 iterations, but is not limited thereto and may be set according to actual needs.
[0125] In some optional embodiments, referring to Figure 4 , Figure 4A lithium battery SOC prediction situation of the method for predicting the state of charge of a lithium-ion battery using the unsupervised domain adaptive algorithm provided by the present invention. In this embodiment, for a certain ternary material battery, the test conditions are: at 25°C, with UDSS as the battery operating condition, the battery SOC runs from 100% to 0%. The method for predicting the state of charge of a lithium-ion battery using the unsupervised domain adaptive algorithm provided by the present invention predicts its SOC. Figure 4 The prediction results of SOC are shown, and it can be seen from the figure that the predicted value of this method is highly consistent with the background true value, indicating that the method for predicting the state of charge of lithium-ion batteries using the unsupervised domain adaptive algorithm provided by the present invention is highly accurate.
[0126] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0127] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting the state of charge of a lithium-ion battery using an unsupervised domain adaptive algorithm, characterized in that: include: Build a deep learning model for battery state of charge prediction, including feature extractors and predictors; Get offline dataset; Providing the battery charge state prediction deep learning model, training it using the offline data set, and obtaining feature extractor No. 1 and the trained predictor; Providing a feature extractor, migrating the parameters of the feature extractor No. 1 to the provided feature extractor, to obtain feature extractor No. 2; The feature extractor No. 1 and the feature extractor No. 2 are combined with a domain discriminator, a feature distance discriminator and a reconstruction module to construct an unsupervised domain adaptation framework; including: The feature extractor No. 1 is respectively connected to the domain discriminator, the feature distance discriminator, and the reconstruction module; The feature extractor No. 2 is respectively connected to the domain discriminator, the feature distance discriminator, and the reconstruction module; Providing a total loss function value calculation module, connected to the domain discriminator, the feature distance discriminator, and the reconstruction module respectively, for calculating the sum of a first loss function value output by the domain discriminator, a second loss function value output by the feature distance discriminator, and a third loss function value output by the reconstruction module; Acquire an online data set, where the online data set has a different working condition from the offline data set; The unsupervised domain adaptation framework is trained using the offline data set and the online data set to obtain the trained unsupervised domain adaptation framework; comprising: Dividing the offline data set into an offline training set, an offline validation set, and an offline test set; Dividing the online data set into an online training set, an online validation set and an online test set; Inputting the offline training set into the feature extractor No. 1, and inputting the online training set into the feature extractor No. 2 for iteration to obtain the pre-trained unsupervised domain adaptation framework; comprising: In each iteration, the discriminator calculates the first loss function value of the feature extractor No. 1 and the feature extractor No. 2, the feature distance discriminator calculates the second loss function value of the feature extractor No. 1 and the feature extractor No. 2, and the reconstruction module calculates the third loss function value of the feature extractor No. 1 and the feature extractor No. 2; the total loss function value calculation module calculates the total loss function value according to the first loss function value, the second loss function value and the third loss function value; when the iteration condition is met, the iteration ends; Input the offline validation set into the feature extractor No. 1, input the online validation set into the feature extractor No. 2, and select the pre-trained unsupervised domain adaptation framework with the best performance as the trained unsupervised domain adaptation framework; Extract the trained feature extractor No. 2 from the trained unsupervised domain adaptation framework, and combine it with the trained predictor to form a final battery charge state prediction deep learning model; Online data is input into the final battery state of charge prediction deep learning model, and the final battery state of charge prediction deep learning model outputs a battery state of charge prediction result.
2. The method for predicting the state of charge of a lithium-ion battery using an unsupervised domain adaptive algorithm according to claim 1, characterized in that: The offline data set includes an offline data group and corresponding labels, and the online data set includes an online data group; After the offline data set is obtained, the offline data set is preprocessed, including: resampling the offline data set, and then normalizing the resampled offline data set; After the online data set is acquired, the online data set is preprocessed, including: resampling the online data set, and then normalizing the resampled online data set.
3. The method for predicting the state of charge of a lithium-ion battery according to the unsupervised domain adaptive algorithm of claim 1 or 2, characterized in that: The feature extractor includes a sequentially connected residual network, a depthwise separable convolution, a bidirectional long short-term memory network, and a self-attention layer.
4. The method for predicting the state of charge of a lithium-ion battery using an unsupervised domain adaptive algorithm according to claim 1, characterized in that: The battery charge state prediction deep learning model is provided and trained using the offline data set. Obtaining feature extractor No. 1 and the trained predictor, including: Dividing the offline data set into an offline training set, an offline validation set, and an offline test set; The battery charge state prediction deep learning model provided by the offline training set training is adopted to obtain a pre-trained battery charge state prediction deep learning model; Inputting the offline verification set into the pre-trained battery charge state prediction deep learning model, and selecting the pre-trained battery charge state prediction deep learning model with the best performance as the trained battery charge state prediction deep learning model; The feature extractor of the trained battery charge state prediction deep learning model is used as the feature extractor No. 1, and the predictor of the trained battery charge state prediction deep learning model is used as the trained predictor.
5. The method for predicting the state of charge of a lithium-ion battery using an unsupervised domain adaptive algorithm according to claim 1, characterized in that: The iteration conditions include: In the first stage, the total loss function value continues to decrease; In the second stage, the total loss function value remains unchanged, and the second stage is the next stage adjacent to the first stage.
