CN-122017601-A - Informer battery SOC prediction method based on bidirectional calibration
Abstract
The invention relates to the technical field of battery management systems of electric automobiles, in particular to a Informer battery SOC prediction method based on bidirectional calibration, which comprises the following steps: and collecting battery key parameter data in the running process of the electric automobile, generating a dynamic feature matrix, inputting the dynamic feature matrix into a Informer coder, and optimizing input feature weight distribution through a learnable feature space projection operator. According to the invention, the on-line self-adaptive weight distribution of the input features is realized through a dynamic feature recalibration mechanism, a priori physical model is not needed, the long-range time sequence associated modeling capability is enhanced by combining a two-way residual error structure, gradient conflict among modules is avoided, training concussion is reduced and convergence speed is accelerated through a gradient decoupling alternating optimization strategy, meanwhile, prediction precision, speed and robustness are considered through modularized integration and structure optimization, the defect of the traditional method is overcome, and more reliable technical support is provided for a vehicle-mounted battery management system.
Inventors
- HUANG FENG
- Shang Wenzhuo
- ZHANG YU
Assignees
- 湖南工程学院
Dates
- Publication Date
- 20260512
- Application Date
- 20260401
Claims (9)
- 1. The Informer battery SOC prediction method based on bidirectional calibration is characterized by comprising the following steps of: S1, data preprocessing, namely collecting key parameter data of a battery in the running process of an electric automobile, and generating a dynamic feature matrix after cleaning and feature selection to realize weight self-adaptive calibration of input features; S2, optimizing an encoder, namely inputting the dynamic feature matrix generated in the step S1 into the Informer encoder, optimizing input feature weight distribution through a learnable feature space projection operator, adopting a double-path residual error structure, fusing the feature output of an attention residual error path and a convolution enhancement path, introducing a gradient decoupling mechanism, blocking gradient return of the dynamic feature matrix in a stepwise manner, and inhibiting initial parameter oscillation of training; S3, optimizing the decoder, namely embedding the dynamic feature matrix into a Informer model decoder to realize feature recalibration, establishing the association between the output of the encoder and the input of the decoder through a cross-attention mechanism, adopting a hierarchical parameterized residual error learning strategy, introducing hierarchical learnable health factors and channel level factor optimizing feature fusion, and improving the stability of the model; And S4, model training and prediction, namely transmitting the optimized encoder output into a decoder, outputting a battery SOC predicted value after feature fusion and mapping, and evaluating the prediction performance through a determination coefficient R2, a mean square error MSE and a mean absolute error MAE.
- 2. The method for predicting the SOC of the Informer battery based on the bidirectional calibration according to claim 1, wherein the generating of the dynamic feature matrix in the step S1 includes: S11, calculating a pearson correlation coefficient of the feature and the SOC The formula is: ; Wherein, the The observed values of the feature and the SOC respectively, Respectively averaging the features and the SOC, wherein n is the number of samples; s12, carrying out dimension division by adopting a K-means clustering algorithm, wherein an objective function is as follows: ; Where K is the number of clusters, Is the center of the kth cluster, Is a data point; s13, calculating characteristic weights through normalization of the correlation coefficients The formula is: ; Wherein, the Is the correlation coefficient of the jth feature and the SOC, and m is the total number of features; S14, calculating a correlation matrix between the features Generating a dynamic feature matrix The formula is: ; ; Wherein, the Is the correlation coefficient between the i-th feature and the j-th feature, Is the characteristic index of the jth characteristic under the ith working condition.
- 3. The method for predicting the SOC of the Informer battery based on the bidirectional calibration according to claim 1, wherein the two-way residual structure of the encoder in the step S2 satisfies: the attention residual path realizes stable update through layer normalization and random inactivation, and the formula is as follows: ; Wherein, the , D is the dimension of the feature, A minute value until the denominator is zero, h is a single-layer output vector, m is a random mask vector, In order to achieve a probability of deactivation, Is the first The output of the individual attention heads, Is a dynamic feature matrix; the convolution enhancement path is that a local mode is captured by adopting a dilation convolution and a nonlinear activation function, and the formula is as follows: ; Wherein Conv represents the convolution operation, convolution kernel Step size Filling in Alpha is an activation function parameter; two-way output weighted fusion: ; Wherein the method comprises the steps of Is an adaptive weight parameter.
- 4. The method for predicting the SOC of the Informer battery based on the bidirectional calibration according to claim 1, wherein the gradient decoupling mechanism in the step S2 is implemented by alternate optimization, and the objective function is decomposed into two sub-problems: ; ; Wherein the method comprises the steps of In order to fix the parameters of the dynamic feature matrix, In order to optimize the attention/convolution parameters, In order to fix the attention/convolution parameters, In order to optimize the parameters of the dynamic feature matrix, For the number of training iterations, As a loss function.
- 5. The method for predicting the SOC of the Informer battery based on the bidirectional calibration according to claim 1, wherein the characteristic recalibration operation of the decoder in the step S3 is: ; Wherein the method comprises the steps of In order for the decoder to input, In the case of a batch size of the product, In order to decode the length of the sequence, Is a feature dimension; is a trainable parameter matrix; Is a bias vector.
- 6. The method for predicting the SOC of the Informer battery based on the bidirectional calibration according to claim 1, wherein the hierarchical parameterized residual learning strategy in the step S3 is as follows: Hierarchical feature update: ; Output characteristic calibration: ; Wherein, the As a Sigmoid function, as would be indicated by the channel-by-channel product, N is the total number of layers of the decoder, For the level to be able to learn the health factor, As a factor of the channel level, D is a characteristic dimension for a current layer transformation function of the decoder; When (when) When approaching 0, the network is degenerated into an identity mapping, and the gradient flow is optimized; When (when) The current layer transform is intensified when approaching 1.
- 7. The method for predicting the SOC of the Informer battery based on the bidirectional calibration according to claim 1, wherein the calculation mode of the cross-attention mechanism in the step S3 is as follows; ; ; Wherein, the In order for the decoder to input, The output of the encoder is provided with, For the length of the coding sequence, In order to project the matrix of the light, As a dimension of the features, For the head dimension, softmax is the normalization function.
- 8. The method for predicting the SOC of a Informer battery based on bidirectional calibration of claim 1, wherein said battery key parameters in step S1 include at least one of total voltage, total current, ambient temperature, vehicle speed, and motor temperature.
- 9. The method for predicting the SOC of Informer batteries based on the bidirectional calibration according to claim 1, wherein the calculation formulas of the determination coefficient R2, the mean square error MSE and the mean absolute error MAE in the step S4 are respectively: ; ; ; Wherein, the Representing the actual observed value of the image, The model predictive value is represented by a model, Is the average of the actual values.
Description
Informer battery SOC prediction method based on bidirectional calibration Technical Field The invention relates to the technical field of battery management systems of electric automobiles, in particular to a Informer battery SOC prediction method based on bidirectional calibration. Background The state of charge (SOC) of an electric vehicle battery is a core parameter of a battery management system, and accurate prediction thereof is important for ensuring vehicle safety and prolonging battery life. However, the battery system has strong nonlinearity and long-range time sequence dependency, and the characteristics of the battery system are influenced by complex working conditions such as temperature fluctuation, current disturbance, battery aging and the like, so that the prediction accuracy of the SOC is difficult to ensure. In the existing SOC prediction method, although the Kalman filtering series algorithm has good instantaneity and interpretability, the performance is seriously dependent on an accurate battery equivalent circuit model, the accuracy is obviously reduced under model mismatch scenes such as battery aging, severe temperature change and the like, and although the method based on LSTM, GRU, CNN and other circulating neural networks can capture time sequence dependence, the method is limited by gradient disappearance problem, and long-range correlation of a cross-charge-discharge period is difficult to effectively model. Disclosure of Invention The invention aims to provide a Informer battery SOC prediction method based on bidirectional calibration so as to solve the problems in the background art. In order to achieve the purpose, the invention provides a Informer battery SOC prediction method based on bidirectional calibration, which comprises the following steps: S1, data preprocessing, namely collecting key parameter data of a battery in the running process of an electric automobile, and generating a dynamic feature matrix after cleaning and feature selection to realize weight self-adaptive calibration of input features; S2, optimizing an encoder, namely inputting the dynamic feature matrix generated in the step S1 into the Informer encoder, optimizing input feature weight distribution through a learnable feature space projection operator, adopting a double-path residual error structure, fusing the feature output of an attention residual error path and a convolution enhancement path, introducing a gradient decoupling mechanism, blocking gradient return of the dynamic feature matrix in a stepwise manner, and inhibiting initial parameter oscillation of training; S3, optimizing the decoder, namely embedding the dynamic feature matrix into a Informer model decoder to realize feature recalibration, establishing the association between the output of the encoder and the input of the decoder through a cross-attention mechanism, adopting a hierarchical parameterized residual error learning strategy, introducing hierarchical learnable health factors and channel level factor optimizing feature fusion, and improving the stability of the model; And S4, model training and prediction, namely transmitting the optimized encoder output into a decoder, outputting a battery SOC predicted value after feature fusion and mapping, and evaluating the prediction performance through a determination coefficient R2, a mean square error MSE and a mean absolute error MAE. Preferably, the generating the dynamic feature matrix in step S1 includes: S11, calculating a pearson correlation coefficient of the feature and the SOC The formula is: ; Wherein, the The observed values of the feature and the SOC respectively,Respectively averaging the features and the SOC, wherein n is the number of samples; s12, carrying out dimension division by adopting a K-means clustering algorithm, wherein an objective function is as follows: ; Where K is the number of clusters, Is the center of the kth cluster,Is a data point; s13, calculating characteristic weights through normalization of the correlation coefficients The formula is: ; Wherein, the Is the correlation coefficient of the jth feature and the SOC, and m is the total number of features; S14, calculating a correlation matrix between the features Generating a dynamic feature matrixThe formula is: ; ; Wherein, the Is the correlation coefficient between the i-th feature and the j-th feature,Is the characteristic index of the jth characteristic under the ith working condition. Preferably, the two-way residual structure of the encoder in step S2 satisfies: the attention residual path realizes stable update through layer normalization and random inactivation, and the formula is as follows: ; Wherein, the ,D is the dimension of the feature,A minute value until the denominator is zero, h is a single-layer output vector, m is a random mask vector,In order to achieve a probability of deactivation,Is the firstThe output of the individual attention heads,Is a dynamic feature matrix; the c