Disclosure of Invention
In order to solve the technical problem of low temperature prediction precision in the prior art, the invention provides a battery temperature prediction method and a battery temperature prediction system.
The battery temperature prediction method provided by the invention comprises the following steps:
Acquiring charging data of a battery according to a period, wherein the charging data comprises historical charging data and real-time charging data;
determining historical derived data from the historical charging data;
determining feature vector data from the historical charging data and the historical derived data;
determining model input samples under various charging conditions according to the feature vector data;
establishing a depth autoregressive model according to the model input sample;
And determining the predicted temperature of the battery according to the real-time charging data and the depth autoregressive model.
The battery temperature prediction method provided by the invention is further improved in that the determining historical derived data according to the historical charging data comprises the following steps:
determining the average value of the battery cell temperature, the extremely poor battery cell temperature, the average value of the battery cell voltage and the extremely poor battery cell voltage according to the historical charging data;
determining periodic characteristics of the charging time according to the historical charging data, the sine function and the cosine function;
according to the historical charging time data, carrying out standardized processing on the month of charging time, the week of charging in one year and the hour of charging in one day to determine the charging frequency characteristic;
And determining the temperature hysteresis term characteristics according to the historical battery cell charging temperature data and preset hysteresis term parameters.
The battery temperature prediction method provided by the invention is still further improved in that the determining historical derived data according to the historical charging data further comprises:
and determining the highest temperature prediction trend according to the historical charging data and a linear interpolation method.
The battery temperature prediction method provided by the invention is still further improved in that the determining historical derived data according to the historical charging data further comprises:
and determining longitude and latitude information during charging according to the historical charging data, and performing standardization processing on the longitude and latitude information to determine a longitude and latitude interval.
The invention provides a battery temperature prediction method, which is further improved in that the determining model input samples under various charging conditions according to the feature vector data comprises the following steps:
Determining training data under various charging conditions according to the feature vector data, the preset observation time window length, the preset prediction window length and the preset maximum hysteresis term;
And uniformly sampling the training data according to a preset random number seed, and determining the model input sample.
The battery temperature prediction method provided by the invention is further improved in that a sample is input according to the model, and a chain rule of conditional probability distribution is used for establishing the depth autoregressive model.
The battery temperature prediction method provided by the invention is further improved in that the determining the battery predicted temperature according to the real-time charging data and the depth autoregressive model comprises the following steps:
Determining real-time derived data according to the real-time charging data;
And determining the battery temperature prediction probability distribution in the prediction window length according to the real-time charging data, the real-time derivative data and the depth autoregressive model.
The battery temperature prediction method provided by the invention is further improved in that the method further comprises the following steps:
performing abnormality detection on the predicted temperature of the battery;
And when the battery predicted temperature is abnormal, generating battery predicted temperature abnormal information, and performing fault processing according to the battery predicted temperature abnormal information.
The battery temperature prediction method provided by the invention is further improved in that the abnormality detection of the battery temperature prediction method comprises the following steps:
Acquiring the actual temperature of a battery;
Determining a residual error according to the actual temperature of the battery and the predicted temperature of the battery;
determining a residual mean value and a residual standard deviation according to the residual;
determining an abnormal threshold according to the residual error, the residual error mean value and the residual error standard deviation;
and determining an anomaly score according to the residual average value, the residual standard deviation and the anomaly threshold value, wherein the anomaly score is used for representing the probability of battery temperature anomaly.
In addition, the invention also provides a battery temperature prediction system, which comprises the following steps:
the first module is used for acquiring charging data of the battery according to a period, wherein the charging data comprises historical charging data and real-time charging data;
A second module for determining historical derived data from the historical charging data;
A third module for determining feature vector data from the historical charging data and the historical derived data;
A fourth module, configured to determine model input samples under multiple charging conditions according to the feature vector data;
a fifth module for establishing a depth autoregressive model according to the model input sample;
and a sixth module for determining a predicted battery temperature based on the real-time charging data and the deep autoregressive model.
The method adopts a method based on big data driving, predicts and diagnoses the highest temperature of the battery monomer in real time in the charging process by mining the characteristics and the hidden information of the data sequence, can remarkably improve the accuracy of temperature prediction, avoids prediction deviation caused by inconsistent experimental environment in a real-vehicle environment, predicts probability distribution of temperature by considering various related time sequence characteristics, predicts possible temperature faults in advance, gives an alarm before an accident, determines a temperature early warning threshold by adopting an unsupervised learning mode, outputs abnormal scores, improves early warning accuracy and reduces false alarm rate.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to solve the technical problem of low temperature prediction precision in the prior art, the invention provides a battery temperature prediction method and a battery temperature prediction system.
Example 1:
As shown in fig. 1 to 3, the battery temperature prediction method provided in embodiment 1 includes:
Step S101, charging data of a battery is obtained according to a period, wherein the charging data comprises historical charging data and real-time charging data;
step S102, determining historical derived data according to the historical charging data;
Step S103, determining feature vector data according to the historical charging data and the historical derivative data;
step S104, determining model input samples under various charging conditions according to the feature vector data;
step 105, establishing a depth autoregressive model according to the model input sample;
And S106, determining the predicted temperature of the battery according to the real-time charging data and the depth autoregressive model.
In this embodiment 1, a temperature prediction method based on deep autoregressive is provided for the problem of overheating of the monomer temperature possibly occurring in the charging process of the power battery, so that the accuracy of temperature prediction can be significantly improved.
In this embodiment 1, step S101 is a data acquisition step, where vehicle data including battery-related data during charging, stationary and running of the vehicle is first acquired, and charging data during charging of the vehicle is split from the vehicle data. The period is in the order of seconds, and preferably, the period in embodiment 1 is 10 seconds. Data (one data every 10 s) in the charging process of the power battery can be collected through a TBox (automobile box) by utilizing a temperature sensor, a current sensor, a voltage sensor and the like, and the data is transmitted back to a big data platform after being cleaned.
The historical charge data includes historical cell temperature, historical charge current, historical charge voltage, historical charge amount, historical battery resistance, historical state of charge, historical charge time data, historical cell charge temperature data, and the like. The real-time charging data comprises real-time battery cell temperature, real-time charging current, real-time charging voltage, real-time charge quantity, real-time battery resistance, real-time charge state, real-time charging time data, real-time battery cell charging temperature data and the like.
The historical derived data comprises a highest temperature prediction trend, a battery cell temperature average value, a battery cell temperature range, a battery cell voltage average value, a battery cell voltage range, longitude and latitude intervals during charging, periodic characteristics of charging time, charging frequency characteristics, temperature hysteresis term characteristics and the like.
Further, step S102 includes:
Determining a maximum temperature prediction trend according to historical charging data and a linear interpolation method, and firstly, filling the missing value of the temperature of the historical battery cell by using the linear interpolation method to obtain the maximum temperature trend of the battery cell in a period of time in the future;
determining the average value of the battery cell temperature, the extremely poor battery cell temperature, the average value of the battery cell voltage and the extremely poor battery cell voltage according to the historical charging data;
Specifically, the temperature sequence, voltage sequence, resistance sequence, SOC sequence, etc. of each battery cell are extracted from the historical charging data, the indexes such as the average temperature of the battery cell, the extremely poor temperature of the battery cell, the average voltage of the battery cell, the extremely poor voltage of the battery cell, etc. are calculated, in the data of each 10s of the data in this embodiment 1, 30 temperature sensors and 60 voltage sensors are provided according to the number of collected sensors, for example, 30 temperature values and 60 voltage values are recorded, the indexes such as the average temperature, the extremely poor voltage, etc. are calculated according to the 30 temperature values and the 60 voltage values, the maximum value of the 30 temperature values is obtained, and the data of the frequency of 10s forms a sequence, namely the highest temperature trend.
Determining longitude and latitude information during charging according to historical charging data, performing standardization processing on the longitude and latitude information to determine a longitude and latitude interval, specifically extracting the longitude and latitude information during charging from the historical charging data, and performing standardization processing;
determining periodic characteristics of charging time according to historical charging data, a sine function and a cosine function;
the charging frequency characteristics are determined by carrying out standardization processing on the month of the charging time, the week of charging in one year and the hour of charging in one day according to the historical charging time data, for example, the charging month data is 1 month and can be standardized to be-0.5, 12 months and 0.5, and the standardized month is in the interval of-0.5 and 0.5 in 12 months in one year;
The method comprises the steps of determining a temperature hysteresis term characteristic according to historical battery monomer charging temperature data and preset hysteresis term parameters, specifically extracting hysteresis term characteristics of a temperature sequence, such as hysteresis 1 order, 5 order, 6 order, 10 order and the like, assuming that the current time is t and the corresponding time of the hysteresis 1 order is t-10, and selecting a specific hysteresis term can be set by a user according to a model prediction effect.
In step S103, parameters critical to battery temperature prediction are selected, and a multi-element time series composed of a plurality of feature arrays is divided to form feature vectors. The historical charging data is set to be in an array form, historical derivative data is added to columns of the array, and data acquired in one data acquisition period is one row of the array to form feature vector data.
The historical derived data may also include voltage cell cumulative bias, number of voltage cell cumulative bias, and the like. The voltage cell cumulative deviation is obtained by subtracting the voltage cell median from the cell voltage and taking the absolute value.
Further, step S104 includes determining training data under various charging conditions according to the feature vector data, the preset observation time window length, the preset prediction window length and the preset maximum hysteresis term, and uniformly sampling the training data according to the preset random number seeds to determine model input samples. In the embodiment 1, given the observation time window length, the prediction window length and the maximum hysteresis term, the feature vector data is subjected to data segmentation to form model training data under different charging working conditions, random number seeds are set, the training data is uniformly sampled, the data in a single charging process is uniformly sampled to obtain a sampling sample in the single charging process, and the data in multiple charging processes is sampled to obtain a model input sample. The obtained model input sample can represent charging data under different charging working conditions in the process of multiple times of charging and is used for model training input.
Further, in step S105, a deep autoregressive model is built from the model input samples and using the chain law of conditional probability distribution. In this embodiment 1, model training is performed based on feature vector data using an autoregressive model based on deep learning.
The value of the ith sequence at time step t is denoted by zi,t, xi,t denotes the feature, and t0 denotes the predicted start time. The probability distribution of zi,t is predicted based on an autoregressive cyclic neural network and is represented by a likelihood function l (zi,t|θi,t), wherein θi,t represents the parameter space to be learned. The model is shown in fig. 3, with training on the left and prediction on the right.
During training, at each time step t, the network inputs include the feature xi,t, the value zi,t-1 of the last time step, and the state of the last time stepThe current state is calculated firstThen calculate the parameters of likelihood l (z|θ)Finally by maximizing log-likelihood) To learn network parameters. In this example 1, a 2-layer hidden layer is used, and a network structure of 100 units per layer is used, and LSTM (long short term memory network) is used as the neuron unit.
In the prediction process, historical data of t < t0 is fed into the network to obtain an initial stateThe prediction results were then obtained using samples, T, for T0,t0 +1This sampled value is used as input for the next step. By repeating the process, a series of sampling values T0 -T can be obtained, and the required target values, such as quantiles, expectations and the like, can be calculated by using the sampling values. The result of this prediction forms a probability distribution rather than a single point estimate.The specific form of (c) depends on the likelihood function i (z|θ) because the temperature prediction is a continuous real number, and the likelihood function we choose a gaussian distribution, then θ= (μ, σ), where μ, σ represent the mean, standard deviation parameters of the gaussian distribution. In the following formulaThe state of the current time step is indicated,Bμ denotes the slope and intercept term of mu,Bσ denotes the slope of σ, the intercept term.
The output objective of the network is a parameter of the probability distribution.
Further, step S106 includes determining real-time derived data from the real-time charging data, and determining a predicted probability distribution of battery temperature over a predicted window length from the real-time charging data, the real-time derived data, and the deep autoregressive model. And cleaning the real-time charging data, determining real-time derived data, and inputting the real-time charging data and the real-time derived data into a deep autoregressive model to obtain the battery temperature prediction probability distribution within the prediction window length.
The method further comprises the steps of detecting the battery predicted temperature abnormally, generating battery predicted temperature abnormal information when the battery predicted temperature is abnormal, performing fault processing according to the battery predicted temperature abnormal information, specifically, performing further processing according to the abnormal battery predicted temperature, performing fault alarm according to a processing result, displaying alarm information through a display screen, and playing the alarm information through a loudspeaker.
Further, the abnormality detection of the predicted battery temperature includes:
Acquiring the actual temperature of a battery;
determining residual errors according to the actual temperature of the battery and the predicted temperature of the battery;
Determining a residual mean value and a residual standard deviation according to the residual;
Determining an abnormal threshold according to the residual error, the residual error mean value and the residual error standard deviation;
And determining an anomaly score according to the residual mean value, the residual standard deviation and the anomaly threshold value, wherein the anomaly score is used for representing the probability of battery temperature anomaly.
Specifically, a residual sequence e= [ e(t-h),...e(t-1), e (t) ] is calculated, wherein the residual isY(t) is the actual value of the temperature acquired by the sensor in real time,Is a predicted value of the depth autoregressive model, h is a predicted window length, and t is a corresponding current time point.
In this embodiment 1, an anomaly threshold value is determined by adopting an unsupervised learning method, which is specifically as follows:
Assume that the outlier threshold is generated by ε=μ (e) +zσ (e), μ (e), σ (e) being the mean and standard deviation of the residuals, respectively, where z >0, is a coefficient of standard deviation. Then:
Wherein:
Δμ(e)=μ(e)-μ({e∈e|e<ε})
Δσ(e)=σ(e)-σ({e∈e|e<ε})
ea={e∈e|e>∈}
Eseq=|ea∈ea|
The outlier threshold is determined in such a way that if the residual is largely removed, the original residual sequence mean and standard deviation should be largely reduced. In addition, punishment is carried out on the magnitude and the number of the residual values in the out-of-range so as to obtain an adaptive abnormal threshold value.
The anomaly score calculation is performed according to the following formula:
Wherein the method comprises the steps ofThe maximum value of the residual sequence ea at the i-th prediction is represented. That is, the residual sequence is normalized, and an abnormality score is output, wherein the higher the abnormality score is, the greater the possibility of abnormality of the battery temperature is.
In addition, the determination of the abnormal threshold value can also be based on the mode of the service, the standard is set, and the abnormal threshold value is set by the user.
Conventional prediction methods are single sequence time series predictions in which model parameters for each given time are estimated independently from past observations, the model typically being manually selected to account for different factors such as autocorrelation structure, trends, seasonal factors, etc. In this embodiment 1, based on the deep autoregressive model, considering that the temperature change of the power battery is affected by various related time sequences, such as current, charging resistance, charge quantity and ambient temperature in the charging process, the related time sequence attributes are included in this embodiment 1, and a more complex and accurate model is fitted. Meanwhile, the workload brought by manual feature engineering and model selection is reduced in the embodiment 1. In addition, by writing a prediction framework, the model supports time sequence training and prediction with the frequency of second level, and is different from the model training mode of the traditional model which only supports more than minute level, the embodiment 1 can be better suitable for the temperature prediction and early warning of the power battery.
Conventional timing predictions can only give a single point estimate of temperature. This embodiment 1 can provide not only a specific single point estimation value but also a probability distribution of the battery temperature in a certain period of time in the future, and this embodiment 1 can better assist decision by providing the entire probability prediction distribution of the temperature.
In this embodiment 1, a model input sample is obtained by means of uniform sampling. And performing time window sliding on all the observed time sequences according to the observation time window length, the prediction window length and the maximum hysteresis term of the temperature sequences. And all samples formed after the time window slides are uniformly sampled, so that input samples of the model are obtained. The processing mode improves the model training speed on one hand, and obtains the characteristics under different charging working conditions on the other hand. Is superior to the traditional processing mode adopting all samples or splitting samples randomly.
In the prior art, an early warning threshold is directly provided according to service experience, or N times of standard deviation is directly set to judge abnormality, and the traditional modes often lead to false alarm and false alarm due to accidental deviation of a temperature sequence in practice. In this embodiment 1, an unsupervised learning method is adopted to determine a temperature early warning threshold value, and an abnormality score is output. In the embodiment 1, an unsupervised learning mode is adopted to provide an early warning threshold, accidental deviations are identified and removed, an abnormal score value is provided on the basis, early warning accuracy is improved, and false alarm rate is reduced.
The invention adopts a method based on a depth autoregressive model and big data driving, and carries out real-time prediction and real-time diagnosis on the highest temperature of the battery monomer in the charging process by mining the characteristics and the hidden information of a data sequence. And the prediction deviation caused by inconsistent experimental environment in the real vehicle environment is avoided. Considering various related time sequence characteristics, predicting probability distribution of temperature, predicting possible temperature faults in advance, and giving an alarm before an accident. And a temperature early warning threshold value is determined by adopting an unsupervised learning mode, accidental deviation is identified and removed, an abnormal score value is provided on the basis, the early warning accuracy is improved, and the false alarm rate is reduced.
Example 2:
as shown in fig. 4, this embodiment 2 provides a battery temperature prediction system 100, and using the method in embodiment 1, the battery temperature prediction system 100 includes:
A first module 11, configured to obtain charging data of the battery according to a period, where the charging data includes historical charging data and real-time charging data;
a second module 12 for determining historical derived data from the historical charging data;
a third module 13 for determining feature vector data from the historical charging data and the historical derived data;
A fourth module 14, configured to determine model input samples under multiple charging conditions according to the feature vector data;
a fifth module 15, configured to establish a depth autoregressive model according to the model input samples;
a sixth module 16 is configured to determine a predicted battery temperature based on the real-time charging data and the deep autoregressive model.
The invention is based on a depth autoregressive model, and can perform temperature anomaly detection based on residual sequences by using an RNN (recurrent neural network) architecture for probability prediction. Aiming at the problem of monomer temperature overheating possibly occurring in the charging process of the power battery, the invention provides a temperature prediction method based on deep autoregressive, which can remarkably improve the accuracy of temperature prediction and the effect of temperature abnormality diagnosis.
The foregoing is only illustrative of the present invention and is not to be construed as limiting thereof, but rather as various modifications, equivalent arrangements, improvements, etc., within the spirit and principles of the present invention.