Power battery anomaly detection method based on improved WATformer network model
By improving the WATformer network model and combining wavelet transform and Autoformer model, the problems of insufficient time-frequency feature fusion and high computational complexity in power battery anomaly detection are solved, and efficient and accurate power battery anomaly detection is achieved.
Patent Information
- Application Number
- CN202511139308.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2025-12-05
AI Technical Summary
Existing technologies for detecting anomalies in power batteries suffer from problems such as insufficient fusion of time and frequency features, high computational complexity of models, large complexity of training and optimization, poor stability, and insufficient generalization ability across scenarios, resulting in low detection accuracy and efficiency.
An improved WATformer network model is adopted, combined with wavelet transform for time-frequency joint analysis. The Autoformer model is used for modeling, and the WTconv module is introduced to enhance the robustness and stability of the model. The self-attention mechanism is optimized to reduce the complexity of parameter tuning.
It achieves comprehensive fusion of time and frequency features, improves the ability to model long-term series, enhances detection accuracy and robustness, reduces computational complexity, and strengthens the stability and adaptability of the model, making it suitable for various power battery anomaly detection scenarios.
Smart Images

Figure CN121069199A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of power battery detection, and particularly to a power battery anomaly detection method based on an improved WATformer network model. BACKGROUND
[0002] In the field of power battery anomaly detection, in order to improve the accuracy and robustness of detection, existing technologies usually strive to explore from the following aspects:
[0003] Time and frequency domain feature extraction: current mainstream methods often extract features from one-dimensional time series signals to detect anomalies. For example, fast Fourier transform (FFT) or discrete wavelet transform (DWT) is used to analyze the signal in the frequency domain. However, these methods usually only model single features in time or frequency domain, resulting in insufficient integration of comprehensive features in time and frequency domains, limiting the model's understanding of complex anomaly patterns.
[0004] Application of deep learning models: In recent years, deep learning methods based on Transformer and its improved models (such as Autoformer) have shown certain advantages in time series anomaly detection tasks. These models rely on self-attention mechanisms and can capture global features of long time series. However, the computational complexity of Transformer is high when processing long time series, and it is prone to performance bottlenecks. In addition, the stability of model performance in different scenarios may be affected by parameter adjustment and environmental changes.
[0005] Complexity of parameter tuning and model stability: the model of the prior art needs to finely adjust parameters such as learning rate and network depth during training, and these adjustment processes are often affected by the uncertainty of data distribution and training environment, increasing the difficulty of model development and application. At the same time, traditional methods have limited modeling ability for long time series, which can easily lead to a decrease in detection accuracy.
[0006] Defects and deficiencies:
[0007] Insufficient fusion of time-domain and frequency-domain features: In existing methods, the extraction of time-domain and frequency-domain features is usually handled independently, lacking in-depth exploration of the potential connection between the two. This independent processing approach leads to one-sidedness in feature representation, failing to fully capture key information in the signal. For example, in the time-domain processing process, more attention is paid to the time series change characteristics of the signal, while the periodicity or spectral characteristics contained in the frequency domain are ignored. Conversely, in frequency domain analysis, although the frequency components and energy distribution of the signal can be extracted, the sensitivity to dynamic changes in the time dimension is often lacking. Since the features in time domain and frequency domain are highly complementary, failing to effectively fuse the information of the two will result in the model being unable to fully exploit the multi-level features contained in the signal, thus limiting its performance in complex tasks.
[0008] Limited processing capability for complex non-stationary signals: The processing of complex non-stationary signals (such as nonlinear, non-periodic or signals with mutation trends) is a major challenge for existing technologies. Traditional methods often face a trade-off when capturing signal trend changes (such as long-term trends or global patterns) and local mutation characteristics (such as short-term fluctuations, spikes or abnormal patterns). Most methods can only perform well in a specific aspect, and cannot balance global features and local details. In addition, as the complexity of data increases, multi-modal and high-dimensional data scenarios further exacerbate this problem. For example, in multi-modal data, the information fusion between different modalities is more complex, and existing methods often struggle to model uniformly, resulting in information loss or redundancy, thus reducing the overall analysis capability for non-stationary signals.
[0009] High computational complexity of the model: Although the Transformer model performs well in sequence modeling tasks, its computational complexity increases quadratically with the length of the input sequence, which results in extremely high computational cost in long time series tasks. Especially in scenarios that require processing large-scale data or real-time applications, the high computational demand of traditional Transformers becomes a major obstacle to actual deployment. The increase in computational complexity not only significantly prolongs the training time, but also puts higher requirements on hardware resources, making it difficult for the model to run efficiently in resource-limited scenarios. In addition, the complex calculation process may cause additional numerical instability problems, further affecting the performance and reliability of the model.
[0010] Model training and optimization complexity: Existing methods generally have high uncertainty in the training and optimization process, especially in terms of parameter setting and model stability. For example, hyperparameter selection is difficult: existing models usually rely on a large number of hyperparameters (such as learning rate, optimizer type, regularization parameter, etc.), and the selection of these parameters has a significant impact on model performance, but the optimal parameters are often obtained at a high cost of experiments and time.
[0011] Poor model stability: In multi-scenario and multi-task applications, the stability of the model is poor, and problems such as slow convergence in the training process, overfitting or gradient explosion are prone to occur, especially in the case of unbalanced data distribution or high noise ratio.
[0012] Insufficient cross-scene generalization ability: The existing model has poor adaptability in different scenes, and often needs to be re-optimized for each application scene, lacking the design of a universal model. The complexity of training and optimization not only increases the time and resource cost of model development, but also puts higher challenges on the professional skills of developers, limiting the widespread application and popularization of the model.
[0013] Therefore, the present application proposes a power battery abnormality detection method based on an improved WATformer network model. SUMMARY
[0014] The purpose of the present application is to solve the problems existing in the prior art and to propose a power battery abnormality detection method based on an improved WATformer network model.
[0015] In order to achieve the above-mentioned goal, the present application adopts the following technical solutions:
[0016] The power battery abnormality detection method based on the improved WATformer network model comprises the following steps:
[0017] S1: battery data acquisition, acquiring original data of new energy vehicle power battery;
[0018] S2: data preprocessing, data cleaning and completion of the original data, and filling the missing data by using interpolation technology;
[0019] S3: data feature extraction, using wavelet transform to perform multi-scale decomposition on time series signals to capture local time series feature changes, and extracting time-frequency features at different frequencies;
[0020] S4: abnormality detection modeling, using an improved model based on the Autoformer model for modeling, and identifying potential abnormal points by comparing the model output with the normal behavior pattern of the power battery operation.
[0021] Preferably: the S2 step comprises the following steps:
[0022] S21: data cleaning and format unification, for the collected original data, first data cleaning is performed to remove outliers, and the time format and coordinate system of different data sources are unified, in processing the missing values of continuous time series data, the interpolation method based on distribution aims to generate values conforming to the statistical characteristics of the original data, the baseline is determined by linear interpolation, and random noise conforming to the data distribution is superimposed to maintain the variance;
[0023] S22: Data feature screening, using the MIC correlation analysis method to calculate the MIC coefficient of the experimental data set to obtain the correlation degree between each label;
[0024] S23: Data feature extraction, based on the MIC coefficient calculated on the original data set, to extract features from the battery data.
[0025] Preferably: the S23 step comprises the following steps:
[0026] S231: Based on the sample distribution of the preset parameter variables X and Y, the grid is divided, and by evaluating the mutual information in the full permutation combination graph, the maximum value of the processed mutual information value is finally extracted as a feature index;
[0027] S232: Normalization of the maximum mutual information value;
[0028] S233: Using a multi-scale calculation strategy, the mutual information peak values obtained under each hierarchical grid division mode are integrated, and the maximum information coefficient value is represented as a set of mutual information maximum values under different resolution scales.
[0029] Preferably: in the S231 step, the mutual information value calculation formula is Where p(x, y) is the joint probability between different characteristic variables x and y.
[0030] Preferably: in the S233 step, the calculation formula of the maximum information coefficient value is: Where a, b is the grid distribution divided in the x, y direction, and B is a set parameter related to the data volume.
[0031] Preferably: in the S232 step, the normalization formula is: Where X is the data before normalization, X norm , X max , and X min are the maximum and minimum values of the data before normalization, respectively.
[0032] Preferably: the S4 step comprises the following steps:
[0033] S41: Selecting a wavelet basis function to convert the data, using continuous wavelet transform to convert the time series signal of different characteristic dimensions of the power battery into a time-frequency graph;
[0034] S42: Establishing an Autoformer model to obtain output data after data input.
[0035] Preferably: in the S41 step, the basis function is:
[0036] The beneficial effects of the present application are:
[0037] (1) Comprehensive fusion of time-frequency features: Wavelet transform is used for time-frequency joint analysis, which significantly enhances the feature extraction ability of complex non-stationary signals, and overcomes the shortcomings of existing technology in time-frequency feature fusion.
[0038] (2) Efficient long time series modeling capability: The improved WTAformer model can efficiently capture global and local features of time series through decomposition modeling and frequency domain enhancement module, and reduce the computational complexity, adapt to long time series anomaly detection task.
[0039] (3) Robustness and stability improvement: The introduction of WTconv module enhances the model's processing ability of low-frequency information and noise, and improves the adaptability and robustness to complex scenes.
[0040] (4) Significant improvement in detection accuracy: In the experiment, the WTAformer model performs better than traditional models in battery thermal runaway anomaly detection and SOC anomaly detection tasks, especially in F1 value, a comprehensive performance indicator, which proves its classification ability and generalization performance.
[0041] (5) Reduce parameter tuning complexity: The improved model architecture optimizes the self-attention mechanism, reduces the model's dependence on parameter adjustment, and improves the stability of training and the convenience of application.
[0042] (6) High industrial application value: This method is suitable for various power battery anomaly detection scenarios, can significantly improve the detection efficiency and accuracy, provides reliable technical support for battery management system, and has wide industrial application value. BRIEF DESCRIPTION OF DRAWINGS
[0043] Figure 1 Flow chart of the improved WATformer network model-based power battery anomaly detection method proposed by the present application;
[0044] Figure 2 Implementation logic diagram of the improved WATformer network model-based power battery anomaly detection method proposed by the present application;
[0045] Figure 3 Thermal map of the improved WATformer network model-based power battery anomaly detection method proposed by the present application before feature selection;
[0046] Figure 4 Thermal map of the improved WATformer network model-based power battery anomaly detection method proposed by the present application using MIC method for feature selection;
[0047] Figure 5 Battery data time sequence of the power battery abnormality detection method based on the improved WATformer network model proposed in the application Figure 1
[0048] Figure 6 Battery data time sequence of the power battery abnormality detection method based on the improved WATformer network model proposed in the application Figure 2
[0049] Figure 7 CMOR3-2 time domain (top) and frequency domain (bottom) schematic diagram of the power battery abnormality detection method based on the improved WATformer network model proposed in the application
[0050] Figure 8 Power battery time-frequency conversion diagram of the power battery abnormality detection method based on the improved WATformer network model proposed in the application
[0051] Figure 9 Model architecture diagram of the power battery abnormality detection method based on the improved WATformer network model proposed in the application
[0052] Figure 10 Improved encoder structure diagram of the power battery abnormality detection method based on the improved WATformer network model proposed in the application
[0053] Figure 11 Improved decoder structure of the power battery abnormality detection method based on the improved WATformer network model proposed in the application
[0054] Figure 12 WTconv module architecture diagram of the power battery abnormality detection method based on the improved WATformer network model proposed in the application
[0055] Figure 13 MIC feature correlation analysis heat map of the power battery abnormality detection method based on the improved WATformer network model proposed in the application
[0056] Figure 14 Battery2 dataset model comparison diagram of the power battery abnormality detection method based on the improved WATformer network model proposed in the application DETAILED DESCRIPTION
[0057] The technical solutions of the application will be further described in detail below in combination with specific embodiments.
[0058] In the description of the present application, it should be noted that unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connecting", "setting" should be understood broadly, for example, it can be fixedly connected, set, or detachably connected, set, or integrally connected, set. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0059] Embodiment 1
[0060] Power battery data collection and preprocessing
[0061] Multi-dimensional power battery data collection
[0062] In the research of abnormal detection and early warning of vehicle-mounted power battery, high-quality data is indispensable to support. However, the original data collected in the actual working condition may have irrelevant information, noise and other interference, as well as data missing, abnormal and repeated problems caused by the collection and transmission process. These problems will directly affect the accuracy and efficiency of subsequent data analysis and model construction, so the data preprocessing stage is essential.
[0063] Firstly, in order to ensure the correlation between data, invalid data irrelevant to power battery abnormal detection needs to be removed, and abnormal time series data needs to be screened, only keeping the sample data most relevant to the detection task. In the data cleaning and screening part, the interpolation algorithm constructed by using the function approximation idea has become a widely used strategy. This method effectively supplements the missing values in the data set through mathematical modeling, while eliminating the potential bias caused by incomplete data sets, and completely retaining the inherent relevance of data characteristics. At the same time, noise interference data is identified and processed by outlier detection method, the purpose is to avoid affecting the model training, so as to make the detection result deviate. In addition, in order to improve the representativeness and refinement of the data, it is also necessary to perform deduplication operation on redundant or repeated data.
[0064] After the data preprocessing is completed, in order to further reduce the data complexity and optimize the model performance, the present application introduces the maximum information coefficient method (MIC) for feature selection and extraction. The MIC method has good performance in the analysis of multi-dimensional data, and can effectively capture the non-linear relationship between variables, so as to select the feature variables most influential to the power battery abnormal detection. This step not only simplifies the model structure, but also significantly reduces the additional overhead of computing resources on the basis of optimizing data quality, and further enhances the adaptability and robustness of the algorithm on unknown data by constructing continuous smooth data distribution characteristics.
[0065] The time series data obtained by the above method is reliable in quality and more suitable for experimental analysis, which solves the overfitting problem caused by data gaps in traditional modeling, and also provides necessary theoretical framework and data support for subsequent algorithm model comparison, parameter optimization and other links.
[0066] Multi-dimensional battery data preprocessing
[0067] Data cleaning and format unification
[0068] For the collected raw data, first, data cleaning is performed to remove outliers (such as missing latitude and longitude information or unreasonable time stamp), and the time format and coordinate system of different data sources are unified. In processing the missing values of continuous time series data, the distribution-based interpolation method aims to generate values consistent with the statistical characteristics of the original data. The baseline is determined by linear interpolation, and random noise consistent with the data distribution is superimposed to maintain the variance, as shown in equation 1.
[0069]
[0070] In the formula, t1, t2 represent the known time points before and after the missing time region, x t1 , x t2 represent the known observation values corresponding to the time points t1, t2.
[0071] Data feature selection
[0072] Due to the influence of various external factors, the power battery data often presents volatility and non-stationarity, which brings not small challenge to accurate anomaly detection. Selecting appropriate features is crucial for improving the detection accuracy of the model. Selecting appropriate features as the input of the model requires in-depth analysis of the feature dimension of the original data set. Here, the MIC correlation analysis method is used to calculate the MIC coefficient of the experimental data set to obtain the correlation degree between each label. Figure 3 The correlation coefficient matrix of 18 feature dimensions of the original data is given, and each element value of the matrix represents the correlation coefficient of the row and column where the element is located.
[0073] As can be seen from the figure, the correlation between different feature dimensions of the power battery is different, such as the correlation degree of the total voltage value of the battery with multiple features is high, and for battery anomaly detection, in addition to voltage, current, temperature and other features also have representativeness. Under the premise of comprehensively considering the correlation between multiple feature dimensions, the present application selects 9 typical features for detection, Figure 4 The correlation coefficient matrix of the data set after feature selection is described. From the matrix, it can be seen that the correlation between the selected features is significantly improved.
[0074] In the validation of the anomaly detection algorithm, in addition to using the battery dataset for model comparison, several common public datasets in the field of anomaly detection are introduced for comparative experiments. The main purpose is to more comprehensively evaluate the performance and adaptability of the algorithm. Although the battery dataset and other public datasets come from different sources, they are essentially time series data and have certain similarities in data characteristics, such as time series characteristics and change trend rules. This provides the feasibility for model comparison between different datasets, and also fully verifies the generalization ability and application value of the method in processing time series data. By introducing multiple datasets, the performance of the algorithm in different data environments can be verified, and its environmental adaptability can be tested to ensure that the algorithm can adapt to the diverse and complex scenarios in actual applications. In addition, different datasets contain multiple anomaly patterns and characteristics, and through experiments, the response stability of the model method in dealing with different anomaly types can be analyzed, and its robustness under diversified conditions can be evaluated. The basic information of the related datasets is shown in Table 1.
[0075] Table 1 Main information of datasets
[0076]
[0077] It is worth noting that the Battery dataset and other anomaly detection public datasets are multivariate time series, Figure 5 and Figure 6 shows the time series of current data of the Battery dataset, and the boxed part is the abnormal time series. Through time series correlation verification, the Battery dataset exhibits similar time-domain evolution characteristics and statistical distribution rules as the conventional time series benchmark data. Based on the consistency theory of time-domain characteristics, the detection model optimized under the parameter configuration of this dataset has cross-scene migration ability for time series anomaly detection tasks in the public benchmark library of power energy and industrial control fields.
[0078] Data feature extraction
[0079] (1) Due to sensor failure or human error, real-world battery data is often damaged by missing values or outliers, which will inevitably affect the prediction accuracy of the model. To solve this problem, the following methods are used to handle missing values or outliers. For example, missing data can be replaced by the average of the previous and next time points, or by the data at the same time point. After estimating the missing values, the experimental data needs to be normalized and standardized for preprocessing to eliminate the physical dimension differences of different types of battery data, so that all data are mapped to the same range for standardization. The calculation formula is as follows: 2, where X norm is the normalized data, and X is the original time series data.
[0080]
[0081] (2) In the battery data, the real-time operation status of the whole vehicle, the power system and the continuous operation index, specifically including the power unit working mode (drive / parking), the charge and discharge mode of the battery system, the real-time driving speed value, the system comprehensive voltage intensity, the total load flow of the power distribution line, the residual capacity percentage (SOC) of the lithium battery and the life cycle driving mileage cumulative amount and other core parameter monitoring dimensions, the insulation resistance value and other data are all influencing factors of the power battery, but different factors have different influence degrees on the power battery, some have significant influence and some can be ignored. Therefore, it is necessary to perform correlation analysis on the original data, use feature selection method to reduce the number of input variables of the model and improve the prediction accuracy. The MIC correlation analysis is a method for measuring the correlation degree between multiple feature variables. Compared with mutual information, the MIC method has higher accuracy. When the sample capacity is large enough, the algorithm has universal applicability, can effectively identify the correlation relationship between different forms of multiple features, and can get rid of the limitation of the traditional method on the preset function type. For different types with similar single noise level, the correlation measurement results remain relatively consistent, and even in the data relationship with different complexity, the stable quantitative characteristics can be presented. The present application mainly extracts features from the battery data based on the MIC coefficient calculated on the original data set. The MIC value calculation process between the vehicle-mounted power battery data is as follows.
[0082] (1) Based on the sample distribution of the preset parameter variables X and Y, the grid division is performed, the mutual information is evaluated in the full permutation combination diagram, and finally the maximum value of the processed mutual information value is extracted as the feature index. The mutual information value calculation formula is shown as formula 3. Wherein p(x,y) is the joint probability between different feature variables x and y.
[0083]
[0084] (2) Maximum mutual information value normalization.
[0085] (3) A multi-scale calculation strategy is adopted, the mutual information peak values obtained under the grid division mode of each level are integrated, and the mutual information maximum value set under different resolution scales is represented as the maximum information coefficient value, as shown in formula 4.
[0086]
[0087] In the above formula, a and b are the grid distribution in the x and y directions, wherein b is a parameter related to the data quantity.
[0088] Model construction
[0089] Wavelet transform based time-frequency analysis method
[0090] Most of the signal processing techniques applied in the field of power battery anomaly detection nowadays are for one-dimensional signals. Traditional one-dimensional signal analysis methods are usually limited to single feature extraction in time domain or frequency domain, which has certain limitations in processing complex power battery anomaly signals. Because the abnormal state of the battery is often accompanied by non-stationarity and multi-scale characteristics of signal features. This complexity makes it difficult to fully capture key feature information in abnormal state by relying only on one-dimensional signal analysis. In contrast, time-frequency analysis methods can combine time and frequency information simultaneously to provide a more comprehensive description of power battery signals. Converting the original one-dimensional time series signal into an intuitive two-dimensional time-frequency image can effectively represent the dynamic evolution characteristics of the signal and capture potential features to provide more rich feature expression for battery anomaly detection.
[0091] Among the many time-frequency analysis methods, wavelet transform (WT) has become an effective tool for power battery anomaly detection due to its unique multi-resolution analysis capability. Compared with short-time Fourier transform (STFT), wavelet transform realizes dynamic trade-off in joint time-frequency analysis through a variable window function, giving priority to accurate frequency resolution in the low frequency band of the signal and time accuracy in the high frequency band. This feature makes wavelet transform have a significant advantage in dealing with the non-stationary characteristics of power battery signals. For example, during the aging process of power batteries, voltage and current signals may exhibit slow trend changes, while superimposing rapid oscillation and mutation signals. Wavelet transform can capture slow trend changes and local abnormal features in the signal through wavelet functions of different scales, thereby realizing multi-scale feature extraction.
[0092] In addition, another important advantage of wavelet transform in power battery anomaly detection is its sensitivity to sudden signals. Power battery anomalies are usually accompanied by dramatic changes in electrochemical processes, such as overcharging, over-discharging, battery short circuit, etc. which will manifest as sudden spikes or oscillation signals in voltage or current signals. Through high-frequency component analysis of wavelet transform, these transient features can be accurately captured, providing reliable basis for early warning of abnormal conditions. At the same time, the low-frequency component of wavelet transform can effectively extract the long-term trend of the overall operation state of the battery, providing important support for battery life prediction and health state assessment.
[0093] When wavelet transform is used to process the non-stationary time series signal of the vehicle-mounted power battery, the selection of the wavelet basis function plays a key role in signal processing and feature extraction, which directly determines the analysis effect after transformation and the accuracy of the processing result, and has an important influence on the overall performance. The power battery signal usually has strong non-stationary and multi-scale characteristics, and its fault mode may show trend changes, sudden signals or periodic oscillations in different time scales. The selection of the wavelet basis function needs to consider the characteristics of the data from multiple aspects. In terms of time and frequency resolution, the time-frequency localization ability of the wavelet basis function is very important. The abnormal characteristics in the power battery signal are often manifested as slow changes in low-frequency trends and local mutations in high-frequency signals. A suitable wavelet basis function should have good frequency resolution in the low-frequency region to extract global trend features, and high time resolution in the high-frequency region to accurately capture the dynamic changes of the sudden signals. This time-frequency characteristic makes some wavelet basis functions with high time-frequency localization ability the preferred choice for power battery signal analysis. Secondly, for battery voltage and SOC signals, the orthogonality and stationarity of the wavelet basis function are also important. The orthogonality of the basis function is required for the extraction of the characteristics of the stationary part to avoid interference between different scale components. For non-stationary signals such as battery temperature, a basis function that can adapt to the signal mutation characteristics is needed. Under actual working conditions, the SOC signal may be affected by sensor errors or environmental noise, resulting in the superposition of high-frequency interference in the signal. Selecting a wavelet basis function with good smoothing properties can effectively filter out high-frequency noise while preserving the key characteristics of the signal. By analyzing and researching the abnormal signals of the power battery from the above aspects, it is found that the Morlet wavelet has a significant advantage in analyzing the high-frequency components of the power battery signal due to its Gaussian-like shape and good smoothness. The function is shown in Equation 5, where ω0represents the center frequency of the function, and a represents the bandwidth parameter, Figure 7 The time and frequency domain diagrams of the selected wavelet basis function cmor3-2 are shown, which represents the complex Morlet wavelet with a bandwidth of 3 and a center frequency of 2. The basis function is
[0094]
[0095] After selecting the appropriate wavelet basis function, the battery time series signal can be further processed to generate the corresponding time-frequency diagram. As shown in Figure 8 , using continuous wavelet transform to convert the time series signal of different feature dimensions of the power battery into a time-frequency diagram, compared with the time domain diagram, the potential abnormal characteristics of the time series signal can be more intuitively displayed in the time-frequency diagram.
[0096] Improved WTAformer model
[0097] The Autoformer is selected as the basic model. The self-attention mechanism makes the Transformer perform outstandingly in modeling long dependence characteristics of time series data, providing strong technical support for the research. However, when the length of the time series increases significantly, the anomaly detection task still faces many challenges. On the one hand, complex periodic time characteristics may mask these time dependencies, making it more difficult to extract time dependencies directly from long time series. On the other hand, the Transformer model has a high computational cost when processing long sequences, which greatly affects the detection efficiency. In order to solve this problem, the Autoformer is selected to replace the traditional Transformer for anomaly detection of long time series. The overall idea can be understood as follows: based on the core idea of decomposition modeling, the time series is deeply embedded into the model architecture, and the cross-period dependence is explicitly captured by combining the efficient autocorrelation mechanism. The overall framework is based on the closed-loop logic of "decomposition-interaction-redecomposition", which gradually separates and refines the trend and periodic components to achieve decoupled modeling of complex time series patterns. The overall process of the algorithm model can be represented as Figure 9 .
[0098] In addition, the Autoformer architecture uses the residual and encoder-decoder structure in the long-time anomaly detection network, which performs very well in the time series prediction task. The Autoformer uses an embedded decomposition module as a dynamic control variable to continuously analyze the long-term trend characteristics in the hidden variables during layer-by-layer prediction. Through the cycle iteration of decomposition and optimization, the intermediate prediction results are refined synchronously. Since it can capture the context information of long time series and restore the lost details, its structure is also very effective for anomaly detection. In order to further improve the accuracy of the model anomaly detection, the encoder-decoder structure is improved, and the improved structure is as shown in Figure 10 The input data passes through two periodic trend decomposition layers in the encoder, each layer decomposes the signal into a periodic component and a trend component, and the periodic component is passed to the decoder in the subsequent process. The structure of the WTconv decoder is shown as Figure 11 In the decoder, the input of the encoder also passes through three periodic trend decomposition layers and decomposes the periodic and trend weighted components. Among them, the periodic components generated by the encoder and the decoder are weighted and then learned in the frequency domain correlation module in the subsequent frequency domain. The trend component is combined with the output periodic term in the form of accumulation, thereby generating the detection sequence of the model. In addition, the improved WTconv module structure is added in the encoder-decoder as Figure 12As shown, WTconv is originally applied in the field of image segmentation, in order to solve the problem of avoiding excessive parameterization while expanding the receptive field of the convolutional neural network. This module combines wavelet transform and convolution operation, without significantly increasing the amount of parameters and computation, through multi-layer wavelet decomposition recursive operation, further decomposes the low-frequency component, gradually expands the receptive field, while retaining the combination of local and global information, and improves the ability to capture low-frequency information and anti-interference ability. WTConv module has shown excellent results in multiple computer vision tasks, improving the overall performance and task performance of the model, and also showing stronger robustness and stability, so it is also effective in the power battery abnormal detection model.
[0099] Model solving
[0100] Dataset and baseline model
[0101] In addition to continuing to use the Battery data set introduced earlier, another different vehicle-mounted power battery charging and discharging data set is selected for experiment, which is determined as Battery2 data set here. Battery2 data set records the use information of multiple pure electric vehicles in 2 years, showing a certain capacity attenuation trend, and can be widely used in battery health state analysis and life warning research. The data set records the charging information of 20 commercial electric vehicle battery packs, including monthly capacity measurement values, and multiple feature data such as current, voltage and temperature of the battery during the cycle process. In order to improve the detection efficiency of the model, the data of 3 electric vehicles selected at random in the analysis are studied. Both data sets are divided into training set, validation set and test set according to the ratio of 7:2:1, and the model is trained for 20,000 iterations on the training set. In order to eliminate the influence of experimental randomness on the results, the average value of each group of model running 10 times is taken as the final result.
[0102] To demonstrate the superiority of the proposed model, the present application selects three different neural network models as a benchmark for comparison, including Transformer, Autoformer and Informer for comparative experimental analysis. They are all widely used in time series tasks. Compared with the traditional Transformer model based on self-attention mechanism, Autoformer has been proven to have superior performance in multiple tasks, especially in handling long time series data. Through its unique structural design, it can not only accurately capture the global features of time series, but also significantly reduce the computational complexity, thereby effectively avoiding the performance bottleneck that the Transformer model may encounter when processing long sequence data. More importantly, Autoformer focuses on the modeling ability of time series trends and periodic changes, which makes it have high accuracy in anomaly detection tasks, and significantly improves the efficiency and stability of detection. With these advantages, Autoformer provides a new perspective and method for solving abnormal behavior recognition in complex scenarios, and is a potential method in the field of anomaly detection. Autoformer also performs well in electric vehicle charging prediction and traffic flow detection, while Informer is another variant of Transformer, which mainly improves the Attention mechanism through sparsification, making the model perform well in performance while reducing the demand for computing resources. In order to ensure the credibility of the results, according to previous experience, the hyperparameters of each model are adjusted appropriately to achieve the best performance, and the average value of multiple experimental results of different models is taken. Through comparative experiments with them, the method proposed in the present application is evaluated.
[0103] In addition, further research is needed to detect and warn different types of anomalies, such as battery thermal runaway anomaly detection, which is designed to identify thermal runaway phenomena that may occur under different conditions of the battery. This phenomenon usually causes the temperature to rise rapidly, leading to serious safety accidents, so its detection is crucial for preventing potential risks. Battery SOC anomaly detection and warning focuses on the accuracy of battery state of charge estimation, and SOC that is too low or suddenly jumps can accelerate battery aging and cause safety hazards. Since these two types of anomalies differ in causes, manifestations and effects, detecting them separately can not only improve the specificity of anomaly identification, but also provide more comprehensive decision-making basis for battery management systems, thereby further ensuring the safe operation and life optimization of the battery. Therefore, in this study, the battery thermal runaway anomaly and the battery SOC anomaly are mainly detected by MIC feature correlation analysis, and the 9 feature dimensions with the highest correlation to thermal runaway and SOC are selected for comprehensive detection.
[0104] Evaluation index
[0105] In order to evaluate the performance of the proposed model, the accuracy, precision, recall and F1 score values commonly used in anomaly detection tasks are used as evaluation indicators to evaluate the model effect. The larger the F1 value, the higher the detection accuracy of the model.
[0106] The above evaluation index formula definitions are shown in 6, 7, 8 and 9.
[0107]
[0108] Among them, TP (True Positive) represents the number of time points successfully identified as abnormal; FP (False Positive) represents the number of time points that are actually normal but are misclassified as abnormal; and FN (False Negative) refers to the number of time points that are actually abnormal but are incorrectly judged as normal, and TN (True Negative) represents the number of normal time points correctly judged as normal.
[0109] Experimental results and analysis
[0110] Step 1 model training
[0111] The power battery anomaly detection model based on WATformer proposed by the present application uses the adaptive matrix estimation (Adam) optimizer for training, and the loss function is MSELoss. The weights of the feature extraction part of the model are obtained by the MIC coefficient matrix on the data set. After dividing the data set by a certain proportion, the training set, validation set and test set are obtained. In order to minimize the interference of random factors on the experimental results, 40,000 iterations of training are performed on the training set, and the average value of each group of model running 10 times is taken as the final result. Table 2 is the loss index of the CDTimesNet model after training. Among them, the training set loss value reaches 0.006993, and the test set loss value reaches 0.006249. The experimental results show that the model of the present research has achieved good training effect.
[0112] Table 2 WATformer training results
[0113]
[0114] Step 2 data processing
[0115] The application changes the original battery time sequence data into a time-frequency graph, then inputs the preprocessed data into a WTAformer model for decomposition coding modeling, and then performs abnormal detection on the test set. In order to achieve the best detection effect, the algorithm model is iteratively trained multiple times. Therefore, the main work is to evaluate the performance of the algorithm model, so as to judge whether the model can be used for vehicle-mounted power battery data to complete different types of abnormal detection and early warning. The application will perform experimental analysis on Battery1 and Battery2 data sets. The dimensions and other related information of the two data sets are shown in Table 3.
[0116] In addition, in the modeling process, through MIC feature correlation analysis, the temperature and SOC value of the monomer battery are taken as target values respectively, the correlation relationship between them and the remaining feature data is analyzed, and finally several feature dimensions with the highest correlation with the two target values are screened out for modeling. As shown in Table 1, these variables cover important operating parameters of the power battery, including cumulative mileage, total voltage and current, SOC, maximum and minimum voltage of the monomer battery, and maximum and minimum temperature of the battery. Figure 13
[0117] Table 3 Battery data set main information
[0118]
[0119] Step 3 battery thermal runaway anomaly detection
[0120] The thermal runaway refers to that the battery monomer or system causes a chain reaction due to overheat, short circuit, mechanical damage and other reasons, which leads to a state of uncontrollable temperature rise and uncontrolled state due to unbalanced internal reaction. Table 4 shows the test index results on the data set using different algorithm models. Through the evaluation of the two data sets Battery1 and Battery2, the performance differences of different algorithm models in various indicators can be clearly observed, especially the model (Ours) proposed in the present application shows significant performance improvement in comparison. On the Battery1 data set, the overall performance of the Transformer model is relatively stable, and the ACC of the Autoformer on this data set is slightly higher than that of the Transformer model, and the F1 value reaches 0.8109, and the performance is more balanced. The ACC of the Informer model is further improved, but there is a large gap between its P value and R value, and the F1 value decreases to 0.8115, which shows the deficiency of the model in recall ability. In contrast, the model (Ours) proposed in the present application performs best on the Battery1 data set, with an ACC of 0.9712, which is the highest among all models. At the same time, due to the small difference between P value and F value, the F1 value increases significantly to 0.9293, and the comprehensive performance is improved obviously, which is increased by 17.27% and 14.59% compared with the Transformer and Autoformer respectively, and is increased by 14.49% compared with the Informer, and the average increase of F1 value is more than 15%, which is better than other models. This shows that the model has high prediction accuracy and comprehensive performance in the classification task of battery anomaly detection.
[0121] As shown in Figure 14 , the performance of each model on the Battery2 data set also has certain differences. It is worth noting that the Ours model still performs well in all evaluation indicators, especially in ACC and F1 value. Compared with other models, our model has an average improvement of 13.09%. Autoformer and Informer perform well in recall rate, but their comprehensive ability is still inferior to Ours. The performance indicators of the WTAformer model on the two data sets are superior to other comparative models, fully embodying its advantages in the anomaly detection task, especially in the F1 value, which is the most outstanding comprehensive performance indicator, further proving the effectiveness and excellent robustness of the model in anomaly detection. This result further shows that through multi-scale information extraction and time-frequency domain combined analysis modeling of time series data, the classification effect of anomaly detection can be significantly improved.
[0122] Table 4 comparison of model experimental results
[0123]
[0124]
[0125] Step4 battery SOC anomaly detection
[0126] The SOC of the vehicle-mounted power battery is an important indicator for judging the health degree of the battery. In electric vehicles and hybrid electric vehicles, SOC anomalies can cause misjudgment of the cruising range, system failure, and even potential safety hazards. Therefore, it is important to detect and handle SOC anomalies in a timely manner. The improved WTAformer model is used to detect and warn the anomalies of low SOC and SOC jump.
[0127] From the analysis of the experimental results in Table 5, the performance differences of various algorithm models on different indicators can be well reflected. In particular, the model (Ours) proposed in the present application shows obvious performance advantages in multiple indicators. On the Battery1 dataset, the Transformer model shows a high classification accuracy with an ACC value of 0.9672, but the difference between its P value and R value is large, resulting in an F1 value of 0.8157, and the comprehensive performance is slightly insufficient. The Autoformer and Informer models have better balance between precision and recall on this dataset, but the low R value leads to an F1 value of 0.9223, indicating that there is still room for improvement in the detection accuracy of these two models.
[0128] In contrast, the model (Ours) proposed in the present application performs best on the Battery1 dataset, with an ACC value of 0.9838, which is the highest among all models. At the same time, the difference between the P value and the R value is small, resulting in a significant increase in the F1 value to 0.9454. Compared with other models, the F1 value is increased by 15.89%, 2.87% and 2.51% respectively, fully demonstrating the comprehensive performance advantage of the model. This result shows that the Ours model has higher classification accuracy and robustness in the battery anomaly detection task.
[0129] In addition, as can be clearly seen from the drawings in the specification, the model proposed in the present application still leads other models in various performances on the Battery2 dataset, with an average increase of 8.88% in F1 value compared with other models. This result fully proves that our model has good performance in different power battery anomaly detection tasks and can significantly improve the classification performance of time series data, providing strong technical support for anomaly detection tasks.
[0130] Table 5 comparison of model experimental results
[0131]
[0132] The present application focuses on the problem of power battery anomaly detection, and proposes a solution based on wavelet transform and improved Autof ormer model to effectively mine the potential of time-frequency domain features of battery time series data. First, the wavelet transform technology is introduced to analyze the time-frequency domain of one-dimensional time series signal of power battery, and is transformed into two-dimensional time-frequency diagram, which provides a more effective feature expression form for the model, so as to realize the joint extraction of time domain and frequency domain features. This method not only effectively captures the multi-scale time series features, but also significantly improves the analysis ability of complex non-stationary signals, providing high-quality input features for subsequent deep learning modeling. Secondly, based on the advantages of Autoformer model, combined with the characteristics of power battery anomaly detection task, an improved WTAformer model is proposed. By optimizing the deep self-association mechanism and attention structure, WTAformer can more efficiently capture global and local features in long time series, while improving the accuracy and stability in the process of anomaly detection, ensuring the efficient operation of the model in complex tasks.
[0133] In the model solving part, the WTAformer is comprehensively verified by using Battery1 and Battery2 two power battery data sets. The experimental results show that the model is better than the traditional Transformer, Autoformer and Informer model in battery thermal runaway anomaly detection and SOC anomaly detection tasks, especially in the F1 value, which is a comprehensive performance indicator, showing excellent classification ability and robustness. In addition, the research also selects the feature dimensions highly related to the target anomaly through feature correlation analysis, and the optimization design of the model enhances the pertinence of anomaly detection, while significantly improves the generalization ability of the model in different data scenarios, making it more adaptable. Therefore, this method can effectively solve the recognition problem of complex power battery abnormal behavior, and has good industrial application value.
[0134] The above describes only the preferred specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can make equivalent replacements or changes to the technical solutions and inventive concepts of the present application within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application.
Claims
1. A method for detecting power battery abnormalities based on an improved WATformer network model, characterized in that, Comprise the following steps: S1: battery data acquisition, collecting the original data of new energy vehicle power battery; S2: data preprocessing, data cleaning and completion of the original data, using interpolation technology to fill in the missing data; S3: data feature extraction, using wavelet transform to capture the feature change of local time series for multi-scale decomposition of time series signal, and extract the time-frequency features under different frequencies; S4: abnormality detection modeling, using an improved model based on Autoformer model for modeling, by comparing the model output with the normal behavior pattern of power battery operation, to identify potential abnormal points.
2. The method of claim 1, wherein the improved WATformer network model-based power battery anomaly detection method is characterized by, The S2 step comprises the following steps: S21: data cleaning and format unification, for the collected original data, first data cleaning, removing outliers, and processing the time format and coordinate system of different data sources, in processing the missing values of continuous time series data, the interpolation method based on distribution aims to generate values consistent with the statistical characteristics of the original data, by linear interpolation to determine the baseline, and superimpose random noise consistent with the data distribution to maintain the variance; S22: data feature screening, using MIC correlation analysis method to calculate the MIC coefficient of experimental data set to obtain the correlation degree between each label; S23: data feature extraction, based on the MIC coefficient calculated on the original data set, to extract the features of the battery data.
3. The method of claim 2, wherein the improved WATformer network model-based power battery anomaly detection method is characterized by, The S23 step comprises the following steps: S231: based on the sample distribution of preset parameter variables X and Y, grid division is carried out, by evaluating the mutual information in the full permutation combination diagram, finally extracting the maximum value of the processed mutual information value as the feature index; S232: maximum mutual information value normalization; S233: using multi-scale calculation strategy, comprehensive mutual information peak value obtained under each level grid division mode, the maximum mutual information value under different resolution scales is represented as the maximum information coefficient value.
4. The method of claim 3, wherein the improved WATformer network model-based power battery anomaly detection method is characterized by, In the S231 step, the mutual information value is calculated according to the formula where p(x, y) is the joint probability between different characteristic variables x and y.
5. The method of claim 3, wherein the improved WATformer network model-based power battery anomaly detection method is characterized by, In the S233 step, the calculation formula of the maximum information coefficient value is: Where a, b are the grid distribution divided in x, y direction, and B is a set parameter related to the data volume.
6. The method of claim 3, wherein the improved WATformer network model-based power battery anomaly detection method is characterized by, The formula for normalization is: where X is the data before normalization, X norm is the data after normalization, X max , X min are the maximum and minimum values of the data before normalization, respectively.
7. The method of claim 1, wherein the improved WATformer network model-based power battery anomaly detection method is characterized by, The S4 step comprises the following steps: S41: select wavelet basis function to convert data, use continuous wavelet transform to convert time series signal of different feature dimensions of power battery into time-frequency graph; S42: establish Autoformer model, get output data after data input.
8. The method of claim 1, wherein the improved WATformer network model-based power battery anomaly detection method is characterized by, In the step S41, the basis function is:
Citation Information
Cited By
Abnormal battery detection method, model training method and related device
CN117930065A