Fault detection method, device and equipment for lithium ion battery of energy storage power station and storage medium

By using a combination of variational autoencoders and classifiers, feature vectors are extracted from lithium-ion battery data and detection embeddings are generated, which solves the problems of accuracy and real-time performance in lithium-ion battery fault detection in energy storage power stations, and enables earlier and more accurate fault identification.

CN120949062APending Publication Date: 2025-11-14GUANGDONG DIANWANG GONGSI YUNFU POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511282372.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-09
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

Existing technologies have poor accuracy and real-time performance in fault detection of lithium-ion batteries in energy storage power stations, making it difficult to achieve early warning and identification of complex fault types.

Method used

A combination of variational autoencoder (VAE) encoder and classifier is used to extract feature vectors from lithium-ion battery data. A detection embedding is generated by a pre-trained VAE encoder and then input into a classifier to identify fault types, including the processing of time-frequency images and semantic feature vectors.

Benefits of technology

It improves the accuracy and real-time performance of fault detection, enabling earlier identification of abnormal states in lithium-ion batteries and enhancing the ability to identify complex faults.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120949062A_ABST
    Figure CN120949062A_ABST
Patent Text Reader

Abstract

The invention discloses a fault detection method, device and equipment for a lithium ion battery of an energy storage power station and a storage medium, which are used for solving the technical problems of poor fault detection accuracy and real-time performance of the lithium ion battery of the energy storage power station. The method comprises the following steps: acquiring data of a to-be-detected lithium ion battery; extracting a feature vector from the data of the lithium ion battery to be detected; inputting the feature vector into a pre-trained VAE encoder to obtain detection embedding; and embedding the detection into an input pre-trained classifier, and outputting a fault type.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of battery fault detection technology, and in particular to a method, apparatus, equipment and storage medium for fault detection of lithium-ion batteries in energy storage power stations. Background Technology

[0002] Energy storage power stations are critical infrastructure for mitigating fluctuations in renewable energy output and ensuring stable grid operation. Lithium-ion batteries, with their high energy density and long cycle life, have become the core energy storage medium in these stations. Battery failures not only disrupt the operation of energy storage power stations but can also trigger safety accidents such as thermal runaway, causing significant economic losses and social impact. Therefore, developing a fault detection method applicable to different operating conditions and capable of promptly identifying abnormal battery states is of great significance for promoting the development of battery management systems for energy storage power stations.

[0003] Traditional fault detection methods mostly rely on monitoring single electrical parameters such as voltage, current, and internal resistance, and achieve fault identification through threshold setting or simple statistical analysis. In recent years, some methods based on deep learning, such as reconstruction error and probabilistic modeling, have been proposed for fault detection. However, these methods can only capture anomalies after a fault occurs, making it difficult to achieve early warning, and their ability to identify complex fault types and potential hazards is limited.

[0004] Existing technologies disclose fault diagnosis methods for lithium-ion battery energy storage power stations with threshold adaptive functionality. These methods use simulation models to generate fault data and employ multi-type single-time-step SFMT data processing techniques to diagnose faults in lithium-ion battery energy storage power stations. However, these methods rely on specific simulation models to generate data, which may differ from the complex and variable operating conditions of actual energy storage power stations, potentially limiting the accuracy of diagnostic results in practical applications.

[0005] Existing technologies also disclose an evaluation method for lithium-ion battery energy storage systems based on a device health model. This method uses a weighted average method to comprehensively evaluate the health indicators of individual battery cells, battery modules, and energy storage subsystems. However, in the process of determining the indicators, this method may lack a sufficient dynamic adjustment mechanism for setting the weights of different types of abnormal batteries, making it difficult to accurately adapt to the actual conditions of different operating stages and complex environments of energy storage power stations, resulting in biases in the assessment of the health of the energy storage system. Summary of the Invention

[0006] This invention provides a method, apparatus, equipment, and storage medium for fault detection of lithium-ion batteries in energy storage power stations, which solves the technical problems of poor accuracy and real-time performance in fault detection of lithium-ion batteries in energy storage power stations.

[0007] This invention provides a method for fault detection of lithium-ion batteries in energy storage power stations, comprising:

[0008] Acquire data from the lithium-ion battery under test;

[0009] Extract feature vectors from the lithium-ion battery data to be tested;

[0010] The feature vector is input into a pre-trained VAE encoder to obtain the detection embedding;

[0011] The detection is embedded into a pre-trained classifier, which outputs the fault type.

[0012] Optionally, the feature vector includes a time-frequency image or a semantic feature vector; the step of extracting the feature vector from the lithium-ion battery data to be detected includes:

[0013] Add a timestamp to the lithium-ion battery data to be tested to obtain time data;

[0014] Acquire sensor data and synchronize the time data with the sensor data to obtain synchronized data;

[0015] The synchronized data is cleaned to obtain cleaned data;

[0016] The cleaned data is normalized and standardized to obtain time-frequency images or semantic feature vectors.

[0017] Optionally, the step of inputting the feature vector into a pre-trained VAE encoder to obtain the detection embedding includes:

[0018] When the feature vector is a time-frequency image, the time-frequency image is input into a pre-trained first VAE encoder to generate a first detection embedding;

[0019] When the feature vector is a semantic feature vector, the semantic feature vector is input into the pre-trained second VAE encoder to generate a second detection embedding.

[0020] Optionally, the training steps for the first VAE encoder and the second VAE encoder include:

[0021] Obtain historical battery timing data;

[0022] The historical battery timing data is synchronized to obtain historical synchronization data;

[0023] The historical synchronization data is cleaned to obtain historical cleaned data;

[0024] The historical cleaning data is labeled with faults to obtain a fault type label corresponding to each historical cleaning data.

[0025] Convert the historical cleaning data into historical time-frequency images;

[0026] Convert the historical time-frequency image into a grayscale time-frequency image;

[0027] The grayscale time-frequency image is reconstructed using the ViT-MAE model to obtain the reconstructed image;

[0028] Obtain the attribute and hierarchy information of known faults;

[0029] Based on the hierarchical information, the attribute information is converted into a first semantic feature vector;

[0030] Obtain the semantic or feature encoding of the new fault;

[0031] A second semantic feature vector is generated based on the semantic encoding or the feature encoding;

[0032] Define a joint training loss function, with the minimum of the joint training loss function as the optimization objective. Train the first VAE encoder using the reconstructed image, and train the second VAE encoder using the first semantic feature vector and the second semantic feature vector.

[0033] Optionally, before the step of embedding the detection into the pre-trained classifier and outputting the fault type, the method further includes:

[0034] Collect a preset proportion of normal battery samples, known fault samples, and new fault samples;

[0035] The normal battery samples are input into the pre-trained first VAE encoder to generate normal sample embeddings and normal label encodings;

[0036] The known fault samples are input into a pre-trained second VAE encoder to generate known fault embeddings and known fault label encodings;

[0037] The new fault sample is input into the pre-trained second VAE encoder to generate pseudo-embedding and new fault label encoding;

[0038] The classifier is trained using the normal sample embedding, the normal label encoding, the known fault embedding, the known fault label encoding, the pseudo embedding, and the new fault label encoding to obtain a pre-trained classifier.

[0039] The present invention also provides a fault detection device for lithium-ion batteries in energy storage power stations, comprising:

[0040] The lithium-ion battery data acquisition module is used to acquire data of the lithium-ion battery to be tested.

[0041] The feature vector extraction module is used to extract feature vectors from the lithium-ion battery data to be detected.

[0042] The detection embedding generation module is used to input the feature vector into a pre-trained VAE encoder to obtain the detection embedding;

[0043] The fault type identification module is used to embed the detection into a pre-trained classifier and output the fault type.

[0044] Optionally, the feature vector includes a time-frequency image or a semantic feature vector; the feature vector extraction module includes:

[0045] The time data generation submodule is used to add timestamps to the lithium-ion battery data to be tested to obtain time data.

[0046] The synchronization submodule is used to acquire sensor data and synchronize the time data with the sensor data to obtain synchronized data;

[0047] The data cleaning submodule is used to clean the synchronized data to obtain cleaned data.

[0048] The normalization and standardization submodule is used to normalize and standardize the cleaned data to obtain time-frequency images or semantic feature vectors.

[0049] Optionally, the detection embedding generation module includes:

[0050] The first detection embedding generation submodule is used to input the time-frequency image into a pre-trained first VAE encoder to generate a first detection embedding when the feature vector is a time-frequency image;

[0051] The second detection embedding generation submodule is used to input the semantic feature vector into the pre-trained second VAE encoder when the feature vector is a semantic feature vector, and generate the second detection embedding.

[0052] The present invention also provides an electronic device, the device comprising a processor and a memory:

[0053] The memory is used to store program code and transmit the program code to the processor;

[0054] The processor is used to execute the lithium-ion battery fault detection method for energy storage power stations as described above, according to the instructions in the program code.

[0055] The present invention also provides a computer-readable storage medium for storing program code for executing the lithium-ion battery fault detection method for energy storage power stations as described in any of the preceding claims.

[0056] As can be seen from the above technical solutions, the present invention has the following advantages: The present invention provides a method for fault detection of lithium-ion batteries in energy storage power stations, specifically disclosing: acquiring lithium-ion battery data to be detected; extracting feature vectors from the lithium-ion battery data to be detected; inputting the feature vectors into a pre-trained VAE encoder to obtain a detection embedding; inputting the detection embedding into a pre-trained classifier to output the fault type. The present invention improves the accuracy and real-time performance of fault detection by extracting feature vectors from the lithium-ion battery data to be detected; inputting the feature vectors into a pre-trained VAE encoder to obtain a detection embedding; and inputting the detection embedding into a pre-trained classifier to output the fault type. Attached Figure Description

[0057] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0058] Figure 1 A flowchart illustrating the steps of a lithium-ion battery fault detection method for an energy storage power station provided in an embodiment of the present invention;

[0059] Figure 2 A flowchart illustrating the steps of a lithium-ion battery fault detection method for an energy storage power station, as provided in another embodiment of the present invention;

[0060] Figure 3 This is a structural block diagram of a lithium-ion battery fault detection device for an energy storage power station, provided in an embodiment of the present invention. Detailed Implementation

[0061] This invention provides a method, apparatus, equipment, and storage medium for detecting faults in lithium-ion batteries in energy storage power stations, which addresses the technical problems of poor accuracy and real-time performance in detecting faults in lithium-ion batteries in energy storage power stations.

[0062] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0063] Please see Figure 1 , Figure 1A flowchart illustrating the steps of a lithium-ion battery fault detection method for an energy storage power station, as provided in an embodiment of the present invention.

[0064] The present invention provides a lithium-ion battery fault detection method, which may specifically include the following steps:

[0065] Step 101: Obtain data of the lithium-ion battery to be tested;

[0066] Lithium-ion batteries are rechargeable batteries that primarily function by the movement of lithium ions between the positive and negative electrodes. During charging and discharging, Li... + Intercalation and deintercalation back and forth between the two electrodes: During charging, Li + The lithium is extracted from the positive electrode and inserted into the negative electrode through the electrolyte, putting the negative electrode in a lithium-rich state; the opposite occurs during discharge.

[0067] In this embodiment of the invention, when performing lithium-ion battery fault detection, data of the lithium-ion battery to be tested can be collected. This data may include voltage, current, temperature, and other data.

[0068] Step 102: Extract feature vectors from the lithium-ion battery data to be tested;

[0069] After acquiring the data of the lithium-ion battery to be tested, feature vectors can be extracted from it. These features can include time-frequency images and semantic feature vectors.

[0070] Step 103: Input the feature vector into the pre-trained VAE encoder to obtain the detection embedding;

[0071] A VAE encoder, or variational autoencoder, does not directly compress the input data into a fixed code. Instead, it learns and outputs the probability distribution parameters (usually the mean and variance) of this code, thereby describing the uncertainty in the latent space.

[0072] In this embodiment of the invention, the feature vector can be converted into a detection embedding by a VAE encoder.

[0073] Step 104: Embed the detection into the pre-trained classifier and output the fault type.

[0074] In this embodiment of the invention, a classifier that takes detection embedding as input and fault type as output can be pre-trained to identify the fault type of the lithium-ion battery to be detected.

[0075] This invention improves the accuracy and real-time performance of fault detection by extracting feature vectors from lithium-ion battery data to be tested; inputting the feature vectors into a pre-trained VAE encoder to obtain a detection embedding; and inputting the detection embedding into a pre-trained classifier to output the fault type.

[0076] Please see Figure 2 , Figure 2 A flowchart illustrating the steps of a lithium-ion battery fault detection method for an energy storage power station, as provided in another embodiment of the present invention. Specifically, it may include the following steps:

[0077] Step 201: Obtain data of the lithium-ion battery to be tested;

[0078] Step 201 is the same as step 101. For details, please refer to the description of step 101. It will not be repeated here.

[0079] Step 202: Add timestamps to the lithium-ion battery data to be tested to obtain time data;

[0080] Step 203: Acquire sensor data and synchronize time data with sensor data to obtain synchronized data;

[0081] In this embodiment of the invention, a timestamp can be added to the lithium-ion battery data to be tested, and then aligned with the data from multiple collected sensors to obtain synchronized data that is synchronized with the sensor data.

[0082] Step 204: Clean the synchronized data to obtain cleaned data;

[0083] In this embodiment of the invention, abnormal values ​​in the synchronization data, such as data with voltage greater than 5V or less than 0V, can be deleted to obtain cleaned data.

[0084] Step 205: Normalize and standardize the cleaned data to obtain time-frequency images or semantic feature vectors;

[0085] In this embodiment of the invention, after obtaining the cleaned data, the cleaned data can be normalized and standardized to obtain a time-frequency image or semantic feature vector.

[0086] Step 206: Input the feature vector into the pre-trained VAE encoder to obtain the detection embedding;

[0087] In this embodiment of the invention, a VAE encoder can be used to convert feature vectors into detection embeddings.

[0088] In one example, step 206 includes:

[0089] S61, when the feature vector is a time-frequency image, input the time-frequency image into the pre-trained first VAE encoder to generate the first detection embedding;

[0090] S62, when the feature vector is a semantic feature vector, the semantic feature vector is input into the pre-trained second VAE encoder to generate the second detection embedding.

[0091] In a specific implementation, when the feature vector is a time-frequency image, the time-frequency image can be input into a pre-trained first VAE encoder to generate a first detection embedding; when the feature vector is a semantic feature vector, the semantic feature vector can be input into a pre-trained second VAE to generate a second detection embedding.

[0092] In the specific implementation, the training steps for the first VAE encoder and the second VAE encoder include:

[0093] S11, Obtain historical battery timing data;

[0094] S12, synchronize historical battery timing data to obtain historical synchronized data;

[0095] S13, perform data cleaning on the historical synchronized data to obtain historical cleaned data;

[0096] S14, mark the historical cleaning data for faults to obtain the fault type label corresponding to each historical cleaning data;

[0097] In this embodiment of the invention, a first VAE encoder is first constructed to establish a mapping from time-frequency images to the latent space.

[0098] In the specific implementation, before building the first VAE encoder, historical battery timing data is first obtained, and then the data is synchronized to obtain historical synchronization data.

[0099] Data synchronization is used to add a timestamp to each piece of historical data and to align the historical battery time-series data from different times.

[0100] Next, the obtained synchronized data is cleaned to remove abnormal data.

[0101] Then, the known faults in the synchronization data are labeled with fault types, such as overcharge, over-discharge, thermal runaway, internal short circuit, capacity decay, etc.

[0102] S15, convert historical cleaned data into historical time-frequency images;

[0103] After data cleaning is completed, discrete wavelet transform can be performed on the data to obtain historical time-frequency images.

[0104] Discrete wavelet transform typically discretizes the scale parameter a and the translation parameter b in the following manner:

[0105]

[0106] Where a0>1 is the scale discretization step size (usually a0=2), b0>0 is the translation discretization step size, and j,k∈Z represent the discrete indices of scale and translation, respectively.

[0107] The corresponding discrete wavelet basis functions are:

[0108]

[0109] The functional expression for wavelet transform is:

[0110]

[0111] in, yes The complex conjugate of the signal, the coefficient representing the signal With discrete wavelet basis functions The correlation between them reflects the characteristics of the signal at scale j (corresponding to frequency) and translation k (corresponding to time).

[0112] S16, convert the historical time-frequency image into a grayscale time-frequency image;

[0113] In this embodiment of the invention, historical time-frequency images can be converted into grayscale time-frequency images through normalization. The normalization function expression is:

[0114]

[0115] Where G is the grayscale time-frequency image. It is the minimum value in the historical time-frequency image. It is the maximum value of the historical time-frequency image, guaranteed to be within the range of 0-1.

[0116] S17, The grayscale time-frequency image is reconstructed using the ViT-MAE model to obtain the reconstructed image;

[0117] The ViT-MAE model consists of an encoder composed of a Vision Transformer layer with causal attention and a lightweight decoder. The encoder transforms the input temporal patch sequence into a deep latent feature sequence, capturing the essential patterns of normal battery operation through a self-supervised reconstruction task; the decoder reconstructs the original temporal patch sequence based on the latent feature sequence and mask tokens, outputting the reconstructed sequence.

[0118] In one example, the process of pre-training a grayscale time-frequency image using the ViT-MAE model to obtain the reconstructed image is as follows:

[0119] 1. Constructing the ViT-MAE model: The ViT-MAE model consists of an encoder composed of Vision Transformer (ViT) and a lightweight decoder. The encoder uses a Transformer layer with causal constraints, and the decoder uses a simplified version of the Transformer structure to reduce computational complexity.

[0120] 2. Historical data processing:

[0121] The encoder, built on the ViT-MAE model, processes normalized historical time-frequency images and extracts the corresponding latent feature sequences. The encoder is a Vision Transformer with causal attention. Its output depends only on the patched data of the current and historical time steps of the input sequence. The weight allocation of future data is restricted by the mask attention matrix to avoid the leakage of future information and ensure that the output meets the causal requirements of time-series data.

[0122] In one example, the encoder's process of extracting latent feature sequences includes the following steps:

[0123] First, the historical time-frequency image is divided into patches of fixed length. Each patch contains multi-source sensor observations (such as voltage, temperature, SOC, etc.) for P consecutive time steps, and the overlap step size between patches can be set (usually P / 2). After this processing, multiple local time-series patch sequences are generated, which serve as input samples for the model.

[0124] Each time-series patch sequence is input into the encoder and processed by a multi-layer Transformer module with causal attention. The self-attention mechanism of each Transformer layer, through a preset mask matrix, allows the current patch to assign attention weights only to itself and historical patches, without involving future patches, thus ensuring the causality of the output. After attention calculation, the sequence is fed into a multilayer perceptron (MLP) and layer normalization module to extract deep-seated dynamic change patterns in the time series (such as voltage fluctuation patterns and temperature evolution trends during battery charging and discharging).

[0125] After multiple Transformer transformations, the encoder outputs a low-dimensional representation corresponding to the patch sequence, called the "latent feature representation". This representation has the following characteristics: under the guidance of self-supervised training objectives, its distribution can capture the essential features of normal battery operation, and it is statistically weakly correlated with the redundant information of the input sequence (such as noise and high-frequency perturbations).

[0126] All time-series patch sequences are processed sequentially by the encoder to obtain a set of continuous latent feature representations, which are then combined in chronological order to form a complete latent feature sequence. This sequence retains key dynamic features of the input time series (such as the long-term evolution trend of battery state) but has eliminated most of the redundant information and noise interference.

[0127] In one example, the function expression for building the encoder is as follows:

[0128]

[0129] in, This represents the latent feature representation at time t; This represents the function mapping relationship learned by the ViT-MAE encoder; This represents the patch data of the current time step and the previous m-1 time steps after the time series has been patched, forming a causal history window; m is the memory length of the encoder, corresponding to the patch sequence length (i.e., the receptive field size) of the Transformer encoder.

[0130] function It consists of a set of Transformer layers with causal attention, whose parameters are optimized by minimizing the following self-supervised loss function:

[0131]

[0132] In the formula, For encoder parameters, These are decoder parameters; The original patch sequence is randomly masked (the masking rate is usually set to 75%). This represents the decoder function used to reconstruct the mask patch from latent features and mask tokens; This is a regularization term used to constrain the sparsity of attention weights in the Transformer layer, enhancing the model's ability to focus on key features. This is the weighting factor for the regularization term (usually set to 0.01). This represents the expected calculation of the training samples. The core of the loss function is the reconstruction error of the mask patch. The model is driven by self-supervised learning to capture the potential patterns of normal battery time series data.

[0133] In addition to building the ViT-MAE encoder, the decoder is also built simultaneously, and its function expression is as follows:

[0134]

[0135] in: The ViT-MAE decoder function consists of a set of lightweight Transformer layers, whose input is the latent feature sequence generated by the encoder. Mask token (mask_token, a learnable vector used to fill the masked position) and position embedding (pos_emb, used for the temporal position information of the encoding patch). The output sample sequence reconstructed by the decoder is the reconstructed image; m represents the size of the decoder's receptive field, which is consistent with the length of the encoder's patch sequence to ensure the alignment of the temporal data.

[0136] The construction process of the first VAE encoder is as follows:

[0137] The first VAE encoder takes the reconstructed image of the lithium battery video image as input (generated by wavelet transform of event sequences such as battery voltage and current), and its structure includes an encoder and a decoder:

[0138] The encoder (VAE encoder 1) adopts a cascaded structure of "pre-trained masked autoencoder (MAE) + feature transformation layer":

[0139] 1. Pre-trained MAE encoder: Based on the ImageNet pre-trained MAE model, it extracts preliminary features from the input time-frequency image and outputs a 768-dimensional feature vector.

[0140] 2. Feature Transformation Layer: This layer sequentially connects a flattening layer, a linear layer (output dimension 512), and a ReLU activation layer to map the feature vectors to the latent space, ultimately outputting the mean of the latent variables. (256-dimensional vector) and covariance (256-dimensional diagonal matrix).

[0141] The decoder (VAE decoder 1) adopts a cascaded structure of "inverse feature transform layer + Transformer reconstruction block":

[0142] 1. Feature Inverse Transformation Layer: Connects sequentially a linear layer (256-dimensional input, 512-dimensional output), a ReLU activation layer, and a reshaping layer (Reshapes a 2D feature map).

[0143] 2. Transformer Reconstruction Block: Contains 4 Transformer encoder blocks (each block contains a multi-head self-attention layer and a feedforward network), which perform spatial correlation modeling on the feature map and finally output a reconstructed time-frequency image with the same size as the input.

[0144] In this embodiment of the invention, the training process of the second VAE encoder is as follows:

[0145] S18, Obtain the attribute information and hierarchy information of known faults;

[0146] S19, convert the attribute information into the first semantic feature vector according to the hierarchical information;

[0147] S110, Obtain the semantic or feature encoding of the new fault;

[0148] S111, Generate a second semantic feature vector based on semantic encoding or feature encoding;

[0149] In the specific implementation, a known battery fault semantic vector can be defined to obtain the first semantic feature vector. The battery fault semantic table is shown in Table 1 below:

[0150] Table 1

[0151]

[0152] According to Table 1, the attribute information is converted into a first semantic feature vector using a multi-value encoding formula:

[0153]

[0154] in, This is the first semantic feature vector; The number of attribute levels; Let y be the level ID of the fault on attribute i.

[0155] It should be noted that in practical applications, new faults that were not considered in the fault definition may often occur. Therefore, the second VAE encoder can be updated cyclically in conjunction with these new faults.

[0156] The semantic vector of the new fault must be strictly consistent with the input dimension of the second VAE encoder. The construction methods can be classified into two categories:

[0157] 1. Expert knowledge-driven semantic encoding:

[0158] Based on expert knowledge, a 15-point score is assigned to the core features of novel faults (such as "novel diaphragm puncture") (e.g., voltage fluctuation frequency, temperature gradient, current mutation rate), generating a 10-dimensional fault type vector. Simultaneously, the fault description text (e.g., "diaphragm puncture caused a local short circuit, and the temperature rose rapidly") is Word2Vec encoded, and the resulting concatenation forms a semantic code. new .

[0159] 2. Data-driven statistical feature coding:

[0160] If there are a small number of samples of new faults, the following statistical features can be extracted and normalized:

[0161] Voltage series: mean, variance, kurtosis, skewness (4 dimensions);

[0162] Current series: mean, variance, number of zero crossings (3-dimensional);

[0163] Temperature series: maximum rate of temperature rise, temperature standard deviation (2D);

[0164] Remaining features: cosine similarity (1-dimensional) with semantic templates (such as “mechanical damage”, “thermal runaway”).

[0165] The 10-dimensional statistical features mentioned above are concatenated with the text features to generate feature code a. new .

[0166] After generating the first semantic feature vector and the second semantic feature vector, the first semantic feature vector and the second semantic feature vector can be input into a preset VAE encoder to train the second VAE encoder. The purpose of training the second VAE encoder is to map the semantic feature vector into the latent space.

[0167] In one example, the construction process of the second VAE encoder is as follows:

[0168] The second VAE encoder takes the first and second semantic feature vectors of the lithium battery as input (dimension N+300, where N is the number of fault types, empirical value N=10), and its structure includes an encoder and a decoder:

[0169] The encoder (VAE encoder 2) adopts a lightweight structure of "linear layer + Tanh activation":

[0170] 1. First linear layer: Input dimension N+300, output dimension 512;

[0171] 2. Tanh activation layer: Introduces nonlinear transformation;

[0172] 3. Second linear layer: Input dimension 512, output dimension 256*2 (corresponding to the mean of the latent variables respectively). Covariance (diagonal elements).

[0173] The decoder (VAE decoder 2) adopts a symmetrical structure of "linear layer + sigmoid activation":

[0174] 1. First linear layer: Input dimension 256, output dimension 512;

[0175] 2. Sigmoid activation layer: maps feature values ​​to the [0,1] interval;

[0176] 3. Second linear layer: input dimension 512, output dimension N+300, consistent with the dimension of the output semantic vector.

[0177] By inputting the first semantic feature vector and the second semantic feature vector, a second VAE encoder can be trained and generated.

[0178] S112, Define a joint training loss function, with the minimum of the joint training loss function as the optimization objective. Train the first VAE encoder using the reconstructed image, and train the second VAE encoder using the first semantic feature vector and the second semantic feature vector.

[0179] In this embodiment of the invention, to address the non-differentiability problem of latent variable sampling, a reparameterization technique can be used to sample the latent feature vector z from the mean-variance distributions of the first VAE encoder and the second VAE encoder, as shown in the formula:

[0180]

[0181] in, The latent variable mean ( or ), The covariance matrix ( or );

[0182] To follow a standard normal distribution A random noise vector;

[0183] For element-wise multiplication, is the vector of diagonal elements of the covariance matrix.

[0184] Next, we define the joint training loss function:

[0185] Joint training loss function It consists of three weighted parts, realizing bidirectional constraints between image and semantics in the latent space:

[0186]

[0187] in, , This is the loss weighting coefficient.

[0188] 1. VAE's own losses The formula for measuring the reconstruction capability and distribution constraints of a single-modal VAE is:

[0189]

[0190] The first item is the reconstruction error (using mean square error MSE), which measures the decoder's ability to recover the input data.

[0191] The second term is the KL divergence, which represents the posterior and prior distributions (standard normal distributions) of the constraint encoder output. To avoid overfitting, the differences in ) should be considered. The weighting coefficients for the KL divergence.

[0192] 2. Cross-alignment loss The constraint for cross-modal translation of images and semantics is defined by the following formula:

[0193]

[0194] in, Reconstructed images from historical time-frequency images. It is a semantic feature vector; , The encoder / decoder for the first VAE encoder. , The encoder / decoder for the second VAE encoder.

[0195] The first term is the "semantic-driven image reconstruction" error, and the second term is the "image-driven semantic reconstruction" error, which forces cross-modal feature association.

[0196] 3. Distribution Alignment Loss The formula for constraining the distribution consistency of the bimodal latent space is:

[0197]

[0198] in, The L2 norm measures the difference between the mean vectors. The Frobenius norm measures the difference in the square roots of the covariance matrix (Cholesky decomposition); this loss is used to achieve alignment at the latent space distribution level.

[0199] Finally, joint training and latent space alignment are performed:

[0200] To minimize To achieve this, the Adam optimizer (initial learning rate $1e4$, cosine annealing scheduling) is used to jointly iteratively update the parameters of the first and second VAE encoders. The training process is as follows:

[0201] 1. Data Preparation: Constructing an Image Semantic Pairing Dataset ( (Total number of samples).

[0202] 2. Parameter initialization: The MAE encoder of the first VAE encoder loads the ImageNet pre-trained weights, and the He of the remaining layers is initialized; the He of all layers of the second VAE encoder is initialized.

[0203] 3. Training iteration: Forward propagation generates latent features, calculates the loss, and backpropagates to update the parameters.

[0204] 4. Convergence criterion: The rate of decrease in loss over 50 consecutive epochs. It may stop when 500 epochs are reached.

[0205] 5. Model saving: Save the first and second VAE encoders after training to obtain a latent space aligned bimodal variational autoencoder.

[0206] Through this training step, the latent features of the image and semantics achieve "consistent feature expression and matching distribution trends", providing a unified and highly discriminative feature space for subsequent zero-shot fault diagnosis.

[0207] Step 207: The detection is embedded into the pre-trained classifier and the fault type is output.

[0208] In this embodiment of the invention, the first detection embedding generated by the first VAE encoder and the second detection embedding generated by the second VAE encoder can be input into the pre-trained classifier to output the fault type (such as "normal", "thermal runaway", "new fault X"), i.e., the confidence level (SVM outputs the distance from the hyperplane, MLP outputs the Softmax probability).

[0209] In this embodiment of the invention, the training process of the pre-trained classifier may include the following sub-steps:

[0210] S21, collect a preset ratio of normal battery samples, known fault samples, and new fault samples;

[0211] S22, Input normal battery samples into the pre-trained first VAE encoder to generate normal sample embeddings and normal label encodings;

[0212] S23, Input the known fault samples into the pre-trained second VAE encoder to generate known fault embeddings and known fault label encodings;

[0213] S24, Input the new fault sample into the pre-trained second VAE encoder to generate pseudo-embedding and new fault label encoding;

[0214] S25. The classifier is trained using normal sample embedding, normal label encoding, known fault embedding, known fault label encoding, pseudo embedding, and new fault label encoding to obtain a pre-trained classifier.

[0215] In the specific implementation, a training set is first constructed, which includes pseudo-embeddedness (new faults), normal sample embeddings, and known fault embeddings. A classifier is then trained to achieve multi-class fault identification.

[0216] Training set construction:

[0217] Normal sample embedding: 1000 normal battery samples are collected, preprocessed and transformed by time and frequency, and then input into the first VAE encoder to generate 1000 256-dimensional normal sample embeddings.

[0218] Known fault embedding: Collect 500 samples for each known fault (such as thermal runaway, internal resistance abnormality), and generate known fault embeddings through the same process.

[0219] Pseudo-embeddedness: Generate 100 pseudo-embeddednesses for each new fault (by changing...) To achieve data augmentation, the calculation formula is as follows:

[0220]

[0221] in: , The mean and covariance of the VAE2 encoder output (from...) (Calculated) It is a random noise vector. (Pseudo-embedding) The dimension is consistent with the latent space (e.g., 256 dimensions) and follows the same distribution as the image embedding.

[0222] Label encoding: Normal sample label encoding is as follows The known fault label code is (Corresponding fault type), the new fault label code is: (The last digit is 1).

[0223] Classifier selection and training:

[0224] Support Vector Machine (SVM) is used as the base classifier (it has strong generalization ability in small sample scenarios). Key parameter settings:

[0225] Kernel function: Radial basis function (RBF), the formula is:

[0226]

[0227] in ;

[0228] Regularization parameters: (Balancing classification accuracy with model complexity);

[0229] Optimization objective: Minimize hinge loss, as shown in the formula:

[0230]

[0231] in, For the classifier output, For tags, λ is the regularization coefficient.

[0232] If the sample size exceeds 5000, a multilayer perceptron (MLP) is used, with the following structure:

[0233] Input layer: 256 dimensions (latent space dimensions);

[0234] Hidden layer 1: 128-dimensional, ReLU activation;

[0235] Hidden layer 2: 64-dimensional, ReLU activation;

[0236] Output layer: dimension( (Number of fault types, including new faults), Softmax is activated;

[0237] Loss function: Cross-entropy loss, the formula is:

[0238]

[0239] in, One-hot encoding of the real label. i,k To predict probabilities.

[0240] Furthermore, after identifying the fault type, the results can be visualized, such as in real time through an industrial control interface (e.g., a SCADA system). The displayed content may include:

[0241] Fault type: Text label (e.g., "new type of diaphragm puncture fault");

[0242] Confidence level: percentage value (e.g., 92.3%);

[0243] Key features: abnormal time-frequency image regions (thermograph markers), voltage / temperature anomaly curves;

[0244] Decision recommendations: such as "It is recommended to shut down the machine for maintenance within 30 minutes".

[0245] This invention improves the accuracy and real-time performance of fault detection by extracting feature vectors from lithium-ion battery data to be tested; inputting the feature vectors into a pre-trained VAE encoder to obtain a detection embedding; and inputting the detection embedding into a pre-trained classifier to output the fault type.

[0246] Please see Figure 3 , Figure 3 This is a structural block diagram of a lithium-ion battery fault detection device for an energy storage power station, provided in an embodiment of the present invention.

[0247] This invention provides a fault detection device for lithium-ion batteries in an energy storage power station, comprising:

[0248] The lithium-ion battery data acquisition module 301 is used to acquire data of the lithium-ion battery to be tested.

[0249] The feature vector extraction module 302 is used to extract feature vectors from the lithium-ion battery data to be tested.

[0250] The detection embedding generation module 303 is used to input the feature vector into the pre-trained VAE encoder to obtain the detection embedding;

[0251] The fault type identification module 304 is used to embed the detection into the input pre-trained classifier and output the fault type.

[0252] In this embodiment of the invention, the feature vector includes a time-frequency image or a semantic feature vector; the feature vector extraction module 302 includes:

[0253] The time data generation submodule is used to add timestamps to the lithium-ion battery data to be tested, thereby obtaining time data.

[0254] The synchronization submodule is used to acquire sensor data and synchronize time data with sensor data to obtain synchronized data;

[0255] The data cleaning submodule is used to clean the synchronized data to obtain cleaned data;

[0256] The normalization and standardization submodule is used to normalize and standardize the cleaned data to obtain time-frequency images or semantic feature vectors.

[0257] In this embodiment of the invention, the detection embedding generation module 303 includes:

[0258] The first detection embedding generation submodule is used to input the time-frequency image into the pre-trained first VAE encoder to generate the first detection embedding when the feature vector is a time-frequency image;

[0259] The second detection embedding generation submodule is used to input the semantic feature vector into the pre-trained second VAE encoder to generate the second detection embedding when the feature vector is a semantic feature vector.

[0260] In this embodiment of the invention, the training of the first VAE encoder and the second VAE encoder includes:

[0261] Historical battery timing data acquisition unit, used to acquire historical battery timing data;

[0262] The data synchronization unit is used to synchronize historical battery timing data to obtain historical synchronized data;

[0263] The data cleaning unit is used to clean historical synchronized data to obtain historical cleaned data.

[0264] The fault labeling unit is used to label historical cleaned data for faults, and obtain the fault type label corresponding to each historical cleaned data.

[0265] The historical time-frequency image conversion unit is used to convert historical cleaned data into historical time-frequency images;

[0266] The grayscale time-frequency image conversion unit is used to convert historical time-frequency images into grayscale time-frequency images;

[0267] The image reconstruction unit is used to reconstruct the grayscale time-frequency image using the ViT-MAE model to obtain the reconstructed image;

[0268] The attribute information and hierarchy information acquisition unit is used to acquire the attribute information and hierarchy information of known faults;

[0269] The first semantic feature vector conversion unit is used to convert attribute information into a first semantic feature vector based on hierarchical information;

[0270] Semantic encoding or feature encoding acquisition unit, used to acquire the semantic encoding or feature encoding of new faults;

[0271] The second semantic feature vector generation unit is used to generate a second semantic feature vector based on semantic encoding or feature encoding.

[0272] The training unit is used to define the joint training loss function. The optimization objective is to minimize the joint training loss function. The first VAE encoder is trained using the reconstructed image, and the second VAE encoder is trained using the first semantic feature vector and the second semantic feature vector.

[0273] In this embodiment of the invention, it further includes:

[0274] The sample acquisition module is used to collect normal battery samples, known fault samples, and new fault samples in a preset proportion.

[0275] The normal sample embedding and normal label encoding generation module is used to input normal battery samples into the pre-trained first VAE encoder to generate normal sample embeddings and normal label encodings.

[0276] The known fault embedding and known fault label encoding generation module is used to input known fault samples into the pre-trained second VAE encoder to generate known fault embeddings and known fault label encodings.

[0277] The pseudo-embedding and new fault label encoding generation module is used to input new fault samples into the pre-trained second VAE encoder to generate pseudo-embedding and new fault label encoding.

[0278] The classifier training module is used to train the classifier using normal sample embedding, normal label encoding, known fault embedding, known fault label encoding, pseudo embedding, and new fault label encoding to obtain a pre-trained classifier.

[0279] This invention also provides an electronic device, which includes a processor and a memory:

[0280] The memory is used to store program code and transfer the program code to the processor;

[0281] The processor is used to execute the lithium-ion battery fault detection method for energy storage power stations according to the instructions in the program code of this invention.

[0282] This invention also provides a computer-readable storage medium for storing program code, which is used to execute the lithium-ion battery fault detection method for energy storage power stations according to this invention.

[0283] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0284] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0285] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0286] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1A device that provides the functions specified in one or more boxes.

[0287] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0288] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0289] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0290] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0291] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0292] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for fault detection of lithium-ion batteries in an energy storage power station, characterized in that, include: Acquire data from the lithium-ion battery under test; Extract feature vectors from the lithium-ion battery data to be tested; The feature vector is input into a pre-trained VAE encoder to obtain the detection embedding; The detection is embedded into a pre-trained classifier, which outputs the fault type.

2. The method according to claim 1, characterized in that, The feature vector includes a time-frequency image or a semantic feature vector; the step of extracting the feature vector from the lithium-ion battery data to be detected includes: Add a timestamp to the lithium-ion battery data to be tested to obtain time data; Acquire sensor data and synchronize the time data with the sensor data to obtain synchronized data; The synchronized data is cleaned to obtain cleaned data; The cleaned data is normalized and standardized to obtain time-frequency images or semantic feature vectors.

3. The method according to claim 2, characterized in that, The step of inputting the feature vector into a pre-trained VAE encoder to obtain the detection embedding includes: When the feature vector is a time-frequency image, the time-frequency image is input into a pre-trained first VAE encoder to generate a first detection embedding; When the feature vector is a semantic feature vector, the semantic feature vector is input into the pre-trained second VAE encoder to generate a second detection embedding.

4. The method according to claim 3, characterized in that, The training steps for the first VAE encoder and the second VAE encoder include: Obtain historical battery timing data; The historical battery timing data is synchronized to obtain historical synchronization data; The historical synchronization data is cleaned to obtain historical cleaned data; The historical cleaning data is labeled with faults to obtain a fault type label corresponding to each historical cleaning data. Convert the historical cleaning data into historical time-frequency images; Convert the historical time-frequency image into a grayscale time-frequency image; The grayscale time-frequency image is reconstructed using the ViT-MAE model to obtain the reconstructed image; Obtain the attribute and hierarchy information of known faults; Based on the hierarchical information, the attribute information is converted into a first semantic feature vector; Obtain the semantic or feature encoding of the new fault; A second semantic feature vector is generated based on the semantic encoding or the feature encoding; Define a joint training loss function, with the minimum of the joint training loss function as the optimization objective. Train the first VAE encoder using the reconstructed image, and train the second VAE encoder using the first semantic feature vector and the second semantic feature vector.

5. The method according to claim 1, characterized in that, Before the step of embedding the detection into the pre-trained classifier and outputting the fault type, the method further includes: Collect a preset proportion of normal battery samples, known fault samples, and new fault samples; The normal battery samples are input into the pre-trained first VAE encoder to generate normal sample embeddings and normal label encodings; The known fault samples are input into a pre-trained second VAE encoder to generate known fault embeddings and known fault label encodings; The new fault sample is input into the pre-trained second VAE encoder to generate pseudo-embedding and new fault label encoding; The classifier is trained using the normal sample embedding, the normal label encoding, the known fault embedding, the known fault label encoding, the pseudo embedding, and the new fault label encoding to obtain a pre-trained classifier.

6. A fault detection device for lithium-ion batteries in an energy storage power station, characterized in that, include: The lithium-ion battery data acquisition module is used to acquire data of the lithium-ion battery to be tested. The feature vector extraction module is used to extract feature vectors from the lithium-ion battery data to be detected. The detection embedding generation module is used to input the feature vector into a pre-trained VAE encoder to obtain the detection embedding; The fault type identification module is used to embed the detection into a pre-trained classifier and output the fault type.

7. The apparatus according to claim 6, characterized in that, The feature vector includes time-frequency image or semantic feature vector; The feature vector extraction module includes: The time data generation submodule is used to add timestamps to the lithium-ion battery data to be tested to obtain time data. The synchronization submodule is used to acquire sensor data and synchronize the time data with the sensor data to obtain synchronized data; The data cleaning submodule is used to clean the synchronized data to obtain cleaned data. The normalization and standardization submodule is used to normalize and standardize the cleaned data to obtain time-frequency images or semantic feature vectors.

8. The apparatus according to claim 7, characterized in that, The detection embedding generation module includes: The first detection embedding generation submodule is used to input the time-frequency image into a pre-trained first VAE encoder to generate a first detection embedding when the feature vector is a time-frequency image; The second detection embedding generation submodule is used to input the semantic feature vector into the pre-trained second VAE encoder when the feature vector is a semantic feature vector, and generate the second detection embedding.

9. An electronic device, characterized in that, The device includes a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the lithium-ion battery fault detection method for energy storage power stations according to the instructions in the program code according to any one of claims 1-5.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store program code for executing the lithium-ion battery fault detection method for energy storage power stations according to any one of claims 1-5.