Disclosure of Invention
The invention provides a depth network self-adaptation-based SOH estimation method for a lithium battery of an electric vehicle.
The invention is realized by the following scheme:
a self-adaptive electric vehicle lithium battery SOH estimation method based on a deep network comprises the following steps:
the method comprises the following steps: data preprocessing and feature extraction; after data preprocessing, constructing an SOC curve and a capacity increment IC curve on the basis of original voltage, current and time curves, and extracting characteristics according to the curves; calculating the correlation between the extracted features and the SOH by using a Pearson Correlation Coefficient (PCC), and verifying whether the feature extraction is effective or not;
step two: constructing an SOH estimation model; by adding a self-adaptive layer in the deep network and combining deep learning and field self-adaptation, transfer learning is realized, and an SOH estimation model based on the deep self-adaptive network is established;
step three: SOH estimation: and when new fragment data come in, carrying out data preprocessing and feature extraction on the new fragment data, and then sending the new fragment data into a trained model for prediction to obtain a prediction result of the fragment data.
Further, the air conditioner is provided with a fan,
the long-term change condition of the battery state described by the SOH is expressed by percentage, and the value range is 0-100%;
when the SOH is 100%, indicating that the battery is a new battery, and when the SOH drops to 80%, indicating that the battery life is over;
expressing the attenuation parameters of the health state of the power battery from the aspects of capacity, impedance and power; SOH definition characterized by battery capacity fade was used:
wherein CapoRepresents the initial capacity of lithium ion in Ah, CapmRepresents the maximum available capacity of the lithium ion battery at the cycle, and the unit is Ah.
Further, the air conditioner is provided with a fan,
the loss function of the deep network adaptive network adopts the following definition mode:
l=lc(Ds,ys)+λlA(Ds,Dt) (2)
wherein D
sAs a source domain, D
tIn order to be the target domain, the user terminal,
representing the ultimate loss of the network, y is the label space,
representing the regular loss of the network over the source domain,
expressing the adaptive loss of the network, expressing the distribution difference of the source domain and the target domain; λ is a weight parameter.
Further, in the first step,
the method comprises the following steps: preprocessing original data, wherein the preprocessing comprises missing value completion, abnormal value processing and noise processing;
the first step is: constructing a source domain data SOC curve aiming at the existing accurately measured voltage and current data in the source domain experimental data; the SOC at time k is defined as follows:
wherein
Is the current remaining energy of the battery, Cap
mIs the current maximum available capacity of the battery, wherein SOC (0) is the initial SOC value;
for source domain data, starting a full charge experiment when the SOC is 0, namely the value of the SOC (0) is 0;
and Cap
mCalculated according to the ampere-hour integral method, wherein
The ampere-hour integration method of (a) is defined as follows:
wherein t iskTime at time k, and I (t) is current value at time t;
step one is three: after data preprocessing, a capacity increment IC curve is constructed on the basis of the original voltage, current and time curves, and feature extraction is assisted through data dimensionality.
An IC curve is obtained by carrying out differential calculation on the change of the electric quantity of the battery and the change of the terminal voltage in the charging or discharging process, and the calculation mode of the IC curve is as follows:
in the formula (I), the compound is shown in the specification,
and
the battery power at time k and k +1 respectively,
and
battery terminal voltages at times k and k +1, respectively; the corresponding curve dQ/dU-U is an IC curve; the SG filter is adopted to carry out denoising treatment on the constructed IC curve
Step one is: calculating the correlation between the extracted features and the SOH by using a Pearson Correlation Coefficient (PCC), and verifying whether the feature extraction is effective or not;
the pearson correlation coefficient is used to measure the degree of linear correlation between two variables X and Y, the value of the degree of correlation being between-1 and 1;
the formula for the pearson correlation coefficient ρ is defined as follows:
wherein sigmax、σyRepresents the standard deviation of the two variables, con (X, Y) represents the covariance of the two variables, and the covariance calculation formula is as follows:
the pearson correlation coefficient is divided by the standard deviation of the two variables on the basis of the covariance;
step one and five: determining the characteristics of the battery attenuation condition through the Pearson correlation coefficient;
the Pearson correlation coefficient varies from-1 to 1; when the Pearson correlation coefficient is positive, the two variables are in positive correlation; when the absolute value of the two variables is close to 1, the correlation is larger, and when the value is close to 0, the degree that the two variables have no correlation is larger;
the characteristics of the 5 cells capable of reflecting the attenuation condition of the cell are respectively as follows:
(1) the charged capacity Q _ vv;
(2) IC curve peak IC _ max;
(3) IC curve mean IC mean;
(4) the segment charging duration V _ time;
(5) the variation Q _ SOC of the fragment data charging capacity/SOC;
wherein the variation Q SOC of the segment data charge capacity/SOC is defined as follows,
wherein T is1And T2Representative voltage segment is the start time and end time, TsRepresenting the sampling interval of the time series.
Further, in the second step, the first step,
the source domain data is an NASA battery aging experiment data set, and the target domain is a small amount of labeled working condition data;
through transfer learning, an SOH estimation model under working condition data is constructed by using knowledge learned on a battery aging experiment data set;
by adding an adaptive layer in the deep network and combining deep learning and field adaptation, transfer learning is realized, and an SOH estimation model based on the deep adaptive network is established.
Further, the air conditioner is provided with a fan,
the SOH estimation model modeling based on the depth adaptive network comprises the following steps:
s1: building two five-layer sensor networks, wherein the parameters of the first three-layer network are universal in two domains and always kept consistent, and the features extracted in the step one are used as the input SOH true values as labels; training the network;
s2: creating a five-layer perceptron model with the same structure, and transferring the pre-training model obtained in the step S1 to a new model; training and fine-tuning parameters on the target domain working condition data to obtain a final SOH estimation model;
s3: the new daily fragment data is subjected to data preprocessing and feature extraction, the extracted features are input into a model learned by S2, and the obtained output is the estimated value of SOH.
Further, the air conditioner is provided with a fan,
the specific learning process of the deep adaptive network is as follows:
s1: initializing parameters of each layer;
s2: sending the source domain and target domain characteristics into the network in each iteration;
s3: after the characteristics pass through the first layers of full connection layers, adding the MMD (maximum mean value difference) into the first layer of the regression layer to measure the distance between the two domains;
wherein X and Y data sets are sampled from p and q distributions respectively, m and n represent the data size of X and Y respectively, f represents a mapping function, and the MMD has the following calculation formula:
the mapping of f → f (x) is expressed by dot product and is expressed by mu
pInstead of the former
And squaring the two sides to obtain the MMD
2The derivation process is as follows:
the MMD selects a linear kernel as a kernel function, and the network adaptive loss obtained by the MMD measurement is recorded as lAComputing MSE error of source domain network predicted value and real value while computing the measurement, and recording the regression loss obtained by computation as lR;
The error function of the final model contains both these components: where lambda is the weight that measures the regression error and the domain adaptation error,
loss=lR+λlA (11)
and after the total error is obtained, performing back propagation on the calculated total error, calculating to obtain error signals of each layer, updating model parameters by adopting a random gradient descent (SGD) algorithm, selecting only one sample for iteration each time, and repeating the iteration steps after updating the parameters until the iteration times are finished.
Further, the air conditioner is provided with a fan,
gradually reducing the distance between a source domain and a target domain in the iterative process of model training, and transferring information from the source domain to the target domain to obtain a SOH estimation model based on the depth network self-adaptation;
when new fragment data come in, the fragment data are subjected to data preprocessing and feature extraction, and then are sent to a trained model for prediction, and a prediction result of the fragment data can be obtained.
The invention has the beneficial effects
(1) In order to verify the effectiveness of the SOH estimation method based on the deep network self-adaptation, the invention selects two methods commonly used in the SOH estimation: support Vector Machine Regression (SVM) and Gaussian Process Regression (GPR), and Fine _ Tune network migration-based SOH estimation methods are used as comparison methods for the method of the present invention. Many scholars adopt SVM and GPR to predict SOH, obtain many good effects, prove that SVM and GPR can predict SOH value of lithium ion battery well, and the SOH estimation method based on Fine _ Tune network migration can verify the effectiveness of the model in migration learning, so the models are suitable for being used as comparison models of the invention;
(2) the SOH estimation model based on the deep network self-adaptation is adopted, the battery aging information can be effectively migrated from the experimental data to the working condition data, the problem of insufficient battery aging information under the working condition is effectively solved, the SOH estimation precision under the working condition is improved, the SOH estimation requirement can be met, and the SOH estimation model can be applied to a vehicle-mounted battery management system.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments; all other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
In conjunction with the figures 1 to 4 of the drawings,
a self-adaptive electric vehicle lithium battery SOH estimation method based on a deep network comprises the following steps:
the method comprises the following steps: data preprocessing and feature extraction; after data preprocessing, constructing an SOC curve and a capacity increment IC curve on the basis of original voltage, current and time curves, and extracting characteristics according to the curves; calculating the correlation between the extracted features and the SOH by using a Pearson Correlation Coefficient (PCC), and verifying whether the feature extraction is effective or not;
step two: constructing an SOH estimation model; by adding a self-adaptive layer in the deep network and combining deep learning and field self-adaptation, transfer learning is realized, and an SOH estimation model based on the deep self-adaptive network is established;
step three: SOH estimation: and when new fragment data come in, carrying out data preprocessing and feature extraction on the new fragment data, and then sending the new fragment data into a trained model for prediction to obtain a prediction result of the fragment data.
The SOH estimation method mainly comprises a non-data driving method mainly based on an experimental method and a model method and a data driving method mainly based on an artificial neural network, Gaussian regression and a support vector machine method. Because the lithium ion battery has a complex measurement process and a complex internal structure, the modeling difficulty is high, and a non-data method cannot meet the requirement of daily SOH estimation. Therefore, the hot research and future directions mainly focus on the SOH estimation method based on data driving.
The SOH estimation method based on data driving is based on voltage, current, temperature, SOC, capacity and other data in the charging process of the lithium ion battery, and is combined with an algorithm to realize SOH estimation. The data driving method only needs the charging process performance data of the battery, does not need to establish a complex model according to the battery characteristics, and is more practical and more suitable for SOH real-time evaluation compared with a non-data driving method.
SOH represents the ability to store and discharge the maximum amount of electricity that can be stored and discharged after a certain time and number of cycles of charge and discharge, which is reflected in the change in performance parameters such as impedance, capacity, charge and discharge power, etc. inside the battery. The SOH describes the long-term change of the battery state, and is also expressed by percentage, the value range is 0-100%, when the SOH is 100%, the battery is a new battery, and the SOH is generally reduced to 80% at present, which is regarded as the end of the life of the battery.
Expressing the attenuation parameters of the health state of the power battery from the aspects of capacity, impedance and power; SOH definition characterized by battery capacity fade was used:
wherein CapoRepresents the initial capacity of lithium ion in Ah, CapmRepresents the maximum available capacity of the lithium ion battery at the cycle, and the unit is Ah.
And the migration learning utilizes the similarity relation between the data and the domains and utilizes the similarity to migrate the information between the two domains, thereby completing the migration learning task.
The field is divided into two parts: feature Space (Feature Space)
And a probability distribution P (X), wherein
Representing n-dimensional data samples in a feature space. If the two domains are different, then they may have different feature spaces or different marginal probability distributions.
Domain→D=(χ,P(X))
The domains are divided into a Source Domain (Source Domain) and a Target Domain (Target Domain).
The source domain has tag data, and the domain containing information useful for the target domain is an object to be migrated; the target domain is a domain in which knowledge is desired to be given by migration. The two fields are generally referred to by the lower case subscripts s and t, respectively. Representation of the binding Domain, DsRepresenting the source domain, DtRepresenting the target domain.
Given a special characterAfter the fixed domain D ═ { X, P (X) }, the task is composed of two parts, one is label space
The other is the function f corresponding to this label. Task division into source tasks T
sAnd target task T
tThe source task represents a learning objective of the source domain and the target task represents a learning objective of the target domain.
Task→T=(Y,f)
For each transfer learning task, a learning error epsilon exists between a prediction function and a true function f of the transfer learning modelDWhere h is the hypothesis learned by the model.
εD=(h,f)=Ex~D(|h(X)-f(X)|)
The goal of the transfer learning model is to make the hypothesis function as close as possible to the true function f, i.e. to make the error epsilonD(h, f) as small as possible.
The method is characterized in that a migration learning scene with the source domain and the target domain in a self-adaptive mode, which are consistent in task and characteristic space but different in characteristic data distribution, is concerned, and the migration learning is realized by reducing the difference of the data distribution between the source domain and the target domain.
The formal definition of the domain adaptation is given below:
given source domain DsAnd a target domain DtAnd D issAnd DtThe task is consistent, the feature space is consistent, and the following formula is:
when the feature data distributions are not uniform, the migration learning performed as follows is called domain adaptation.
The deep network self-adaptation is that a self-adaptation layer is added on the basis of a deep learning network, and the self-adaptation of the data distribution of a source domain and a target domain is completed through the self-adaptation layer; through the self-adaptive layer, the distribution of the source domain and the target domain can be closer, and the transfer learning task can be further completed.
The loss function of the deep network adaptive network adopts the following definition mode:
l=lc(Ds,ys)+λlA(Ds,Dt)
wherein
Which represents the eventual loss of the network,
representing the regular loss of the network over the source domain,
expressing the adaptive loss of the network and expressing the distribution difference of the source domain and the target domain; λ is a weighting parameter that measures both parts.
Compared with the traditional network, the extra term for measuring the difference between two domains in the loss function of the deep self-adaptive network
In the process of network training, the distance between two domains can be reduced while the traditional loss of the source domain is reduced, so that migration is completed.
In the first step, the first step is carried out,
the method comprises the following steps: preprocessing original data, wherein the preprocessing comprises missing value completion, abnormal value processing and noise processing;
the first step is: constructing source domain data SOC curves for the existing accurately measured voltage and current data in the source domain experimental data; the SOC at time k is defined as follows:
wherein
Is the current remaining energy of the battery, Cap
mIs the current maximum available capacity of the battery, wherein SOC (0) is the initial SOC value;
for source domain data, starting a full charge experiment when the SOC is 0, namely the value of the SOC (0) is 0;
and Cap
mCalculated according to the ampere-hour integral method, wherein
The ampere-hour integration method of (a) is defined as follows:
wherein t iskTime at time k, and I (t) is current value at time t;
step one is three: the experimental data only comprise voltage and current curves, and information which can be obtained from the two curves is limited, so that after the preliminary processing steps of missing value completion, abnormal data processing and the like are carried out, a Capacity Increment (IC) curve is constructed on the basis of the original SOC curves of voltage, current and time, and the extraction of the characteristics is assisted through data dimensionality.
The IC curve is an effective tool for analyzing the capacity loss of the battery, and is a common method for analyzing the internal degradation of the lithium battery from the data perspective. The IC curve is obtained from the charging process in the constant current state using a differential equation. There are significant peaks on the IC curve that can represent specific electrochemical processes occurring within the cell. Amplitude and position information of wave crests of the IC curves are different, the difference of the information is closely related to battery capacity attenuation, and the IC curves are adopted to monitor the aging condition of the lithium ion battery.
An IC curve is obtained by carrying out differential calculation on the change of the electric quantity of the battery and the change of the terminal voltage in the charging or discharging process, and the calculation mode of the IC curve is as follows:
in the formula (I), the compound is shown in the specification,
and
the battery power at time k and k +1 respectively,
and
battery terminal voltages at times k and k +1, respectively; the corresponding curve dQ/dU-U is an IC curve; the untreated IC curve contains a lot of noise, and it is difficult to derive information from such a curve that can reflect the aging state of the battery. Therefore, denoising processing is also required to be performed on the constructed IC curve. The invention adopts the SG filter to filter the signal.
Step one is: performing feature extraction on the basis of data preprocessing, and calculating the correlation between the extracted features and the SOH by using a Pearson Correlation Coefficient (PCC) to verify whether the feature extraction is effective or not;
the pearson correlation coefficient is used to measure the degree of linear correlation between two variables X and Y, the value of the degree of correlation being between-1 and 1;
the formula for the pearson correlation coefficient ρ is defined as follows:
wherein sigmax、σyRepresenting the standard deviation of the two variables, con (X, Y) representing the co-ordination of the two variablesThe variance, covariance calculation formula is as follows:
the pearson correlation coefficient is divided by the standard deviation of the two variables on the basis of the covariance;
step one and five: determining the characteristics of the battery attenuation condition through the Pearson correlation coefficient;
the Pearson correlation coefficient varies from-1 to 1; when the Pearson correlation coefficient is positive, the two variables are in positive correlation; when the absolute value of the two variables is close to 1, the correlation is larger, and when the absolute value of the two variables is close to 0, the degree that the two variables have no correlation is larger. Finally, 5 characteristics of the fragment data reflecting the cell decay were determined from each curve:
(1) charged capacity (Q _ vv);
(2) IC curve peak (IC _ max);
(3) IC curve mean (IC mean);
(4) segment charging duration (V _ time);
(5) the fragment data is charged to the variation of the capacity/SOC. (Q _ soc).
Wherein the fifth term is defined as follows,
wherein T is1And T2Representative voltage segment is the start time and end time, TsRepresenting the sampling interval of the time series.
In the second step, the first step is carried out,
the source domain data is an NASA battery aging experiment data set, the target domain is a small amount of labeled working condition data, and the objective of the transfer learning is to construct an SOH estimation model under the working condition data by using the knowledge learned from the battery aging experiment data set;
deep learning and field self-adaptation are combined in a mode of adding a self-adaptation layer in a deep network, so that migration learning is achieved. Therefore, a depth adaptive network-based SOH estimation model is established, as shown in fig. 1, the upper half is a source domain network, the lower half is a target domain network, and the first three layers of parameters of the two networks are shared. The specific model establishing process is as follows:
s1: building two five-layer sensor networks, wherein the parameters of the first three-layer network are universal in two domains and always kept consistent, and the features extracted in the step one are used as the input SOH true values as labels; training the network; the normal loss of the source domain and the distance between the two domains gradually decrease during the training process.
S2: creating a five-layer perceptron model with the same structure, and transferring the pre-training model obtained in the step S1 to a new model; training and fine-tuning parameters on the target domain working condition data to obtain a final SOH estimation model;
s3: the new daily fragment data is subjected to data preprocessing and feature extraction, the extracted features are input into a model learned by S2, and the obtained output is the estimated value of SOH.
The specific learning process of the deep adaptive network is as follows:
s1: initializing parameters of each layer;
s2: sending the source domain and target domain characteristics into the network in each iteration;
s3: after the characteristics pass through the first layers of full connection layers, adding the MMD (maximum mean value difference) into the first layer of the regression layer to measure the distance between the two domains;
MMD is an efficient algorithm to measure the distribution distance between the source domain and the nuclear target domain. The basic principle is as follows: and searching a function f, solving a function value on the f for the characteristic samples of the source domain and the target domain, and taking the difference of the mean values as the distance between the two domains. If the MMD is small enough, the two distributions are considered to be the same, and if the MMD is large, the two distributions are considered to be different. Therefore, MMD can be used to represent the degree of similarity between the two distributions.
The MMD distance is expressed as: wherein X and Y data sets are sampled from the distributions p and q, respectively, m and n represent the data sizes of X and Y, respectively, and f represents a mapping function that maps the original features onto a high-dimensional regenerated hilbert space. When the two distributions are the same, the MMD is zero;
the mapping of f → f (x) is expressed by dot product and is expressed by mu
pInstead of the former
And squaring the two sides to obtain the MMD
2The formula (c) is briefly derived as follows:
in MMD measurement, the selection of kernel functions plays a very important role. Commonly used kernel functions are gaussian kernels, polynomial kernels, linear kernels, laplacian kernels, and the like. Taking the Gaussian kernel as an example, the Gaussian kernel is a radial basis function kernel, and in this case, the inner product is expressed by a kernel function as follows
Therefore, the following expression can be finally obtained as a solution formula for MMD.
MMD can be viewed as the distance of two points in the regenerative nuclear hilbert space in general, a nuclear learning method that can be used to measure the distance of two distributions. The MMD loss and the source domain regression loss are weighted and then learned together, namely, the distance between the two domains is reduced in the learning process.
In the invention, the MMD measurement selects a linear kernel as a kernel function and obtains the MMD measurementIs recorded as the network adaptation loss of lAComputing MSE error of source domain network predicted value and real value while computing measurement, and recording the regression loss obtained by computation as lR. The error function of the final model contains both these components: wherein, λ is the weight for measuring the regression error and the domain adaptive error, and the model performance is optimal when the test weight parameter λ is 0.4.
loss=lR+λlA (11)
After the total error is obtained, the calculated total error is subjected to back propagation, error signals of each layer are obtained through calculation, model parameters are updated through a Stochastic Gradient Descent (SGD) algorithm, only one sample is selected for iteration each time through the SGD algorithm, and the training speed is high. And after the parameters are updated, repeating the iteration steps until the iteration times are finished.
The flow of SOH estimation is as shown in fig. 2, and is mainly divided into a training stage and a prediction stage, and first, data preprocessing and feature extraction are performed on original data; and then, building a depth field self-adaptive network according to the flow introduced in the step two, then training and iterating the model, gradually reducing the distance between the source domain and the target domain in the model training iteration process, and transferring information from the source domain to the target domain to obtain the SOH estimation model based on the depth network self-adaptation. When new fragment data comes in, the fragment data is subjected to data preprocessing and feature extraction, and then is sent into a trained model for prediction, so that a prediction result of the fragment data can be obtained.
In order to verify the effectiveness of the SOH estimation method based on deep network self-adaptation, two methods commonly used in SOH estimation are selected: support Vector Machine (SVM) and Gaussian Process Regression (GPR), and Fine _ Tune network migration-based SOH estimation methods are used as comparison methods for the methods presented in this section. Many scholars adopt SVM and GPR to predict SOH, obtain many good effects, prove that SVM and GPR can predict SOH value of lithium ion battery well, and an SOH estimation method based on Fine _ Tune network migration can verify effectiveness of models in migration learning, so that the models are suitable for being used as comparison models of the experiment.
In this set of experiments, all NASA battery experimental data were used as source domain data and condition data were used as target domain data. Setting the OSH estimation model based on the depth field self-adaptation established in the previous section, and training, wherein the parameters are set as follows:
TABLE 1
The loss change of the source domain, the distance change between the two domains and the loss change tested on the target domain in the training process are as follows, and for the convenience of observation, the y axis is set as a logarithmic coordinate axis. As can be seen from fig. 3, as the training progresses, the error of the source domain data is continuously reduced, and the migration error between the two domains is also continuously reduced, which means that the distance between the two domains is continuously close as the training progresses, and the continuous reduction of the loss of the target domain also proves the reduction of the distance between the two domains. After training is finished, the error of the model on the source domain is reduced to 1.9%, the average error on the target domain is also reduced to 3.0%, and the precision of the model is obviously improved.
The SOH values are respectively predicted by adopting a domain self-adaption method, an SVM, a Gaussian process regression and a Fine _ Tune network migration method, and the prediction results are as shown in FIG. 4: compared with other algorithms, the SOH value predicted by adopting the depth-domain adaptive algorithm is closer to the real SOH value, and the SOH value under the working condition data can be better predicted.
The SOH value estimated by each algorithm is compared with the SOH value of the real value, finally, the performance of each method on each vehicle working condition data is as shown in the table, and the results in the table show that the performance of the average error of the field self-adaptive method under the working condition is superior to that of other comparison methods, and the precision is obviously improved compared with that of other methods; finally, errors on all vehicles are reduced to 3%, the requirement of daily SOH estimation can be met, and battery aging information is well migrated from a source domain to a target domain through deep network self-adaption.
TABLE 2
The method for estimating the SOH of the lithium battery of the electric vehicle based on the deep network self-adaptation is introduced in detail, the principle and the implementation mode of the method are explained, and the explanation of the embodiment is only used for helping to understand the method and the core idea of the method; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.