Battery early warning method and system based on unsupervised learning, and medium
By using an unsupervised learning variational autoencoder model and a dynamic threshold generation mechanism, the sensitivity and robustness issues in battery health status assessment are solved, achieving highly sensitive and accurate early warning of battery faults, which is suitable for vehicle-mounted BMS equipment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING INST OF TECH
- Filing Date
- 2026-02-24
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies suffer from insufficient sensitivity, loss of timing information, and high computational complexity in battery health status assessment and early warning, making it difficult to achieve highly sensitive and robust early safety warnings for batteries.
We employ a variational autoencoder model based on unsupervised learning, and construct a multi-dimensional, dynamic viewpoint battery health status assessment method. By utilizing the sliding window method and dynamic threshold generation mechanism, we achieve highly sensitive identification and early warning of battery consistency anomalies.
It achieves highly sensitive identification of early battery consistency anomalies, improves the accuracy and reliability of early warning, is suitable for resource-constrained vehicle BMS equipment, and meets the requirements of real-time performance and reliability.
Smart Images

Figure CN122017628A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of battery safety management technology, specifically to a battery early warning method, system, and medium based on unsupervised learning. Background Technology
[0002] As a core component of new energy vehicles, the health of the power battery directly affects the vehicle's range, reliability, and safety. In practical applications, power battery packs consist of hundreds or thousands of individual cells connected in series and parallel. Due to differences in manufacturing processes, operating environments, and loads, the performance degradation of individual cells is difficult to synchronize, leading to inconsistencies in parameters such as voltage and internal resistance. This inconsistency, especially the deterioration of voltage consistency, is a key early warning sign of serious safety hazards such as battery pack performance degradation and thermal runaway. Therefore, accurate monitoring and early warning of battery consistency is an important issue in the field of battery safety management.
[0003] Currently, the industry faces significant challenges in battery health assessment and early warning. First, many existing technologies rely too heavily on battery capacity as a single dimension for health evaluation. However, capacity decay is a relatively slow macroscopic process and cannot sensitively reflect the dynamic performance differences caused by early faults within the battery, such as micro-short circuits and lithium plating, making it difficult to comprehensively and accurately determine the true aging state of the battery. Second, although voltage inconsistency is a key indicator of battery anomalies, current technologies lack effective methods for quantitatively analyzing and utilizing this "coupled inconsistency." In particular, accurately extracting key features from massive amounts of operational data and overcoming operational interference to achieve robust monitoring of minor voltage deviations remains a current technical challenge.
[0004] To address these challenges, the industry has proposed various technical solutions, but all have limitations: Patent CN113960484A proposes a health diagnosis method based on linear fitting of single-cell voltage difference. This method evaluates the battery by statistically analyzing the voltage difference and fitting its linear trend. However, early battery faults often exhibit complex nonlinear characteristics in the voltage sequence, making it difficult for linear models to effectively capture them, resulting in insufficient sensitivity. Furthermore, the fixed threshold filtering method used may inadvertently reject valid fault information, and the simple algebraic correction fails to model the dynamic coupling relationship between multi-dimensional parameters such as voltage and current.
[0005] Patent CN120910721A proposes an evaluation framework based on causal inference. Although this method can control confounding biases, in order to achieve causal inference, dynamic time-series data needs to be highly aggregated into static indicators, completely losing the complete trajectory of the evolution of parameters such as voltage over time. Early signs of battery safety risks are precisely hidden in these time-series details, making it unable to meet the needs of real-time and fine monitoring.
[0006] Patent CN121106303A proposes an energy management method based on the fusion of Transformer reinforcement learning and a battery mechanism model. The bottleneck of this method lies in the high computational complexity of the Transformer model, which makes it difficult to meet the computational power requirements for real-time decision-making in automotive applications. Furthermore, its performance is highly dependent on the accuracy of the parameters of the built-in battery model, which are difficult to calibrate accurately in real-time in practical applications. Parameter mismatch can introduce new risks, and the generalization ability of offline training strategies is uncertain.
[0007] In summary, existing technologies exhibit a tiered limitation in addressing the challenges of battery safety management: from insufficient sensitivity of simple linear methods, to the loss of temporal information in advanced statistical frameworks, and further to the deployment difficulties and generalization risks of complex intelligent models. These limitations collectively reveal the contradiction between the current state of technology and the high standards required for early warning sensitivity, state estimation precision, and real-time algorithm reliability in vehicle safety management. Therefore, there is an urgent need in this field for a novel battery early safety warning solution that is highly sensitive, robust, and easy to deploy. Summary of the Invention
[0008] The purpose of this invention is to provide a battery early warning method, system, and medium based on unsupervised learning to solve the above-mentioned problems in the prior art. It assesses the battery health status from a multi-dimensional and dynamic perspective, and can identify early consistency anomalies from complex operating data with high sensitivity and robustness, thereby achieving forward-looking early warning of battery safety.
[0009] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A battery warning method based on unsupervised learning includes the following steps: S1. Data Acquisition and Synchronization: Synchronously acquire voltage data, total current data, and temperature data of multiple modules in the battery pack, and perform time alignment processing on all data to form a time-synchronized multi-channel data sequence; S2. Spatiotemporal feature tensor construction: The multi-channel data sequence is preprocessed, and a three-dimensional tensor containing both the time dimension and the module number dimension is constructed using the sliding window method. S3. Unsupervised voltage reconstruction: The three-dimensional tensor is input into a pre-trained variational autoencoder model. The encoder of the model maps the input data to the latent space and obtains the latent variables. The decoder of the model then reconstructs the ideal voltage data representing the battery health state based on the latent variables. S4. Reconstruction error calculation: For each module, calculate the difference between its original voltage sequence and the reconstructed voltage sequence to obtain the corresponding reconstruction error; S5. Dynamic threshold generation and anomaly judgment: Calculate the group statistical characteristics based on the reconstruction error of all modules, and generate a dynamic threshold based on this; when the reconstruction error of a certain module continuously exceeds the dynamic threshold within multiple consecutive time windows, it is determined that the module has an anomaly and an early warning is triggered.
[0010] Furthermore, the time alignment process described in S1 includes: assigning a unified timestamp to all collected data and using interpolation to fill in data that is delayed or lost.
[0011] Furthermore, the encoder of the variational autoencoder model described in S3 is implemented using a long short-term memory network or a one-dimensional convolutional neural network.
[0012] Furthermore, the latent variable mentioned in S3 is obtained through reparameterization, specifically by linearly combining the probability distribution parameters of the encoder output with an external noise variable sampled from a standard normal distribution to obtain the latent variable.
[0013] Furthermore, the decoder of the variational autoencoder model described in S3 employs a linear activation function in its output layer.
[0014] Furthermore, the variational autoencoder model is trained using historical operating data of the battery under normal healthy conditions.
[0015] Furthermore, the generation of the dynamic threshold in S5 specifically involves: calculating the mean and standard deviation of the reconstruction errors of all modules, and adding a preset multiple of the mean and standard deviation to the mean as the dynamic threshold.
[0016] Another object of the present invention is to provide a battery warning system based on unsupervised learning, for implementing the aforementioned battery warning method based on unsupervised learning, comprising: The data acquisition and preprocessing module is configured to synchronously acquire the operating data of multiple modules in the battery pack, and perform time alignment and standardization preprocessing on the data to construct a three-dimensional tensor containing the time dimension and the module number dimension. The model inference and reconstruction module has a built-in pre-trained variational autoencoder model, which is configured to receive the three-dimensional tensor and reconstruct the ideal voltage data representing the battery health state, and calculate the reconstruction error of each module. The anomaly detection and alarm module is configured to generate a dynamic threshold based on the reconstruction error of all modules, and to trigger an early warning signal when the reconstruction error of a specific module continues to exceed the dynamic threshold.
[0017] Another object of the present invention is to provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned battery warning method based on unsupervised learning.
[0018] Compared with the prior art, the present invention has the following significant advantages: 1. This invention represents a leap from single-dimensional capacity assessment to multi-dimensional dynamic performance assessment, significantly improving early warning sensitivity. It fundamentally changes the traditional single-assessment model that only focuses on capacity decay. By deeply mining the spatiotemporal dynamic characteristics of battery voltage through a variational autoencoder, it can keenly capture minute, nonlinear changes in voltage consistency caused by early faults such as micro-short circuits and slight increases in internal resistance. This enables highly sensitive and proactive identification of potential safety hazards, effectively overcoming the slow response of existing technologies.
[0019] 2. This paper introduces unsupervised learning into battery consistency monitoring, overcoming the bottleneck of reliance on fault samples. The core advantage of this method is that it requires no fault labels for training; it can construct an accurate "health baseline" model using only a large amount of readily available normal battery data. This perfectly solves the practical problem of scarce and difficult-to-label early fault samples in industrial practice, greatly improving the applicability and universality of this technology and laying the foundation for large-scale engineering applications.
[0020] 3. By employing a dynamic threshold and continuous verification mechanism, the accuracy and reliability of early warnings are effectively guaranteed. This invention abandons the rigid decision-making of fixed thresholds and innovatively introduces an adaptive dynamic threshold based on population statistical characteristics, combined with continuous verification within a time window. This design enables the system to intelligently distinguish between normal operating condition fluctuations and genuine abnormal symptoms, significantly suppressing false alarms caused by instantaneous interference and ensuring high reliability of early warning results.
[0021] 4. The model is highly efficient and reliable, with excellent potential for engineering implementation. Compared to deep learning methods that require complex physical models or massive computational demands, the model structure used in this solution is compact, has high inference efficiency, and relatively low hardware computing power requirements. It is easier to deploy in real time on resource-constrained in-vehicle BMS or edge computing devices, meeting the stringent requirements of automotive-grade applications for real-time performance and reliability. Attached Figure Description
[0022] Figure 1 This is a flowchart of the method of the present invention; Figure 2 The diagrams are comparative diagrams of the voltage reconstruction effect of the battery modules of the present invention, wherein (a) is a diagram of the voltage reconstruction effect of module 76, (b) is a diagram of the voltage reconstruction effect of module 89, and (c) is a diagram of the voltage reconstruction effect of module 118. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0024] This invention aims to provide a highly sensitive and robust early warning scheme for battery failures. Its core lies in utilizing a generative model, the Variational Autoencoder (VAE), to construct a "health baseline" model by learning from a large amount of historical data of batteries under normal healthy conditions. In practical applications, the deviation between the real-time battery operating data and the "ideal" data reconstructed by this baseline model (i.e., reconstruction error) is monitored, and a dynamic threshold based on population statistics is used for judgment, thereby achieving accurate early warning of failures.
[0025] This embodiment provides a battery early warning method based on unsupervised learning, such as... Figure 1 As shown, it includes the following steps: S1. Data Acquisition and Synchronization: Synchronously acquire voltage data, total current data, and temperature data of multiple modules in the battery pack, and perform time alignment processing on all data to form a time-synchronized multi-channel data sequence; S2. Spatiotemporal feature tensor construction: The multi-channel data sequence is preprocessed, and a three-dimensional tensor containing both the time dimension and the module number dimension is constructed using the sliding window method. S3. Unsupervised voltage reconstruction: The three-dimensional tensor is input into a pre-trained variational autoencoder model. The encoder of the model maps the input data to the latent space and obtains the latent variables. The decoder of the model then reconstructs the ideal voltage data representing the battery health state based on the latent variables. S4. Reconstruction error calculation: For each module, calculate the difference between its original voltage sequence and the reconstructed voltage sequence to obtain the corresponding reconstruction error; S5. Dynamic threshold generation and anomaly judgment: Calculate the group statistical characteristics based on the reconstruction error of all modules, and generate a dynamic threshold based on this; when the reconstruction error of a certain module continuously exceeds the dynamic threshold within multiple consecutive time windows, it is determined that the module has an anomaly and an early warning is triggered.
[0026] The implementation process of the above method will be explained in detail below.
[0027] I. Data Acquisition and Synchronization: Voltage, total current, and temperature data from multiple modules within the battery pack are acquired synchronously, and all data undergoes time alignment processing to form a time-synchronized multi-channel data sequence. The time alignment processing includes assigning a unified timestamp to all acquired data and using interpolation to fill in any delayed or missing data.
[0028] The purpose of this step is to obtain raw battery pack operating data that is strictly aligned in time. Specifically, voltage data, total circuit current data, and temperature data reported by at least one temperature sensor are synchronously acquired from the Battery Management System (BMS) via a vehicle network (such as a CAN bus) at a fixed sampling frequency (e.g., 1 Hz) of N parallel modules (or individual cells) within the battery pack.
[0029] To achieve precise time synchronization, the BMS main control unit broadcasts a high-precision global timestamp. All data (including voltage, total current, and temperature of N modules) must be stamped with this unified timestamp during upload. Considering potential delays or data frame loss in the communication link, a buffer needs to be set up at the data receiving end (such as an in-vehicle gateway or cloud server) for timing alignment and reorganization. For a module's data missing at a specific time t, linear interpolation is used, that is, interpolation calculations are performed based on its data at the previous valid time (t-1) and the next valid time (t+1) to fill the missing value; or zero-order hold is used, directly using the data from the previous time (t-1). Through the above processing, it is ensured that the voltage, current, and temperature data of all N modules are completely synchronized on the time axis, ultimately forming a set of multi-channel data sequences without missing data and with strict time alignment.
[0030] II. Spatiotemporal Feature Tensor Construction: The multi-channel data sequence is preprocessed, and a three-dimensional tensor containing both the time dimension and the module number dimension is constructed using the sliding window method. After data acquisition and synchronization are completed, the raw data is cleaned and structured, transforming it into a format suitable for input to deep learning models. First, a moving average filter is applied to the obtained time-synchronized multi-channel data sequence to suppress high-frequency measurement noise. Then, the filtered data undergoes Z-score normalization to eliminate the influence of different physical dimensions such as voltage and current.
[0031] Constructing a feature tensor that simultaneously preserves temporal dynamics and spatial correlations between modules is crucial in this step. A sliding window method is used to segment the standardized continuous time series: a fixed-length window T (time step size, e.g., T=100) is set, and the window slides at a preset step size (e.g., one sampling point) to sequentially extract data segments. The data within each window is constructed into a three-dimensional tensor with dimensions (B, T, N). Here, B is the batch size (the number of windows processed at once), T is the time step size, and N is the number of modules. This three-dimensional tensor structure not only captures the dynamic sequence features of each module's voltage change over time (T dimension), but more importantly, by preserving the data from all N modules at each time point (N dimension), it effectively characterizes the spatial cross-correlation and voltage consistency features between modules, providing a critical information foundation for subsequent model identification of group anomalies.
[0032] 3. Unsupervised voltage reconstruction: The three-dimensional tensor is input into a pre-trained variational autoencoder model. The encoder of the model maps the input data to the latent space and obtains the latent variables. The decoder of the model then reconstructs the ideal voltage data representing the battery health state based on the latent variables.
[0033] A Variational Autoencoder (VAE) is a generative network model based on deep learning, consisting of an encoder and a decoder, used to learn the normal distribution pattern of battery module voltage consistency. The encoder maps the input data to a probability distribution in the latent space, while the decoder samples and reconstructs the data from this distribution. The latent space refers to the low-dimensional feature space formed by the encoder output of the VAE, used to compress high-order abstract features representing the input data. After constructing the spatiotemporal feature tensor, a pre-trained VAE model is used to reconstruct "ideal" voltage data representing the battery's health state from the high-dimensional tensor containing spatiotemporal information. Its core lies in the fact that the VAE model learns the intrinsic probability distribution model (i.e., the "health manifold") of battery voltage under healthy conditions through unsupervised training on a large amount of normal battery data. When abnormal data is input, the model will struggle to reconstruct accurately, thus exposing faults through reconstruction errors.
[0034] 1. Model Input The three-dimensional tensor of shape (B, T, N) output from step two is used as the input to the VAE model. It is particularly important to emphasize that this VAE model is pre-trained, and its training data is entirely derived from historical operating data of the battery under normal and healthy conditions (such as historical charging data). This "unsupervised" training strategy is the key to this invention, enabling the model to learn normal behavior patterns without any fault labels, thus overcoming the bottleneck of scarce fault samples.
[0035] 2. Working principle of an encoder The encoder network, as the core of feature extraction in a VAE, bears the heavy responsibility of compressing high-dimensional voltage spatiotemporal signals into low-dimensional, abstract representations. Its internal processing logic can be divided into three progressive stages: Feature aggregation: The encoder primarily employs temporal modeling units (such as Long Short-Term Memory networks (LSTM) or one-dimensional convolutional neural networks (1D-CNN) as core operators. Taking LSTM as an example, at each time step, it performs a "spatial scan" and weighted fusion of the voltage values of N modules through internal forget gates, input gates, and other mechanisms, aiming to capture the strong cross-correlation features between modules due to physical consistency. As time step T progresses, the hidden state of the LSTM is continuously updated, ultimately compressing all spatiotemporal dynamic information within a time window into a fixed-length hidden state vector h.
[0036] Latent space mapping: The feature vector h is input to two sets of parallel fully connected layers, which output two core parameters of the latent space probability distribution: the mean vector μ and the log-variance vector. The mean vector μ determines the location center of the input data in the latent space, representing the health characteristics that the voltage sequence should ideally possess; while the logarithmic variance vector... This quantifies the uncertainty or fluctuation range of the data under normal noise interference.
[0037] Reparameterized sampling: To solve the problem of directly sampling from distribution N(μ, To address the gradient interruption problem caused by sampling in the model, a reparameterization technique is used to generate the latent variable z. Specifically, this involves first sampling an auxiliary noise variable from a standard normal distribution. ( ), and then through the formula The latent variable z is calculated, where This technique transfers randomness to an external variable. This ensures that the sampling process is differentiable, allowing the gradient to propagate backward to the encoder parameters via z.
[0038] 3. Decoder Reconstruction Process The decoder is the inverse process of the encoder, and its goal is to reconstruct the original input using the latent variable z as the "generation seed".
[0039] The decoder network is usually symmetrical to the encoder. The latent variable z is first expanded in dimension through a fully connected layer, and then through dimension reshaping and upsampling operations (such as deconvolution layers or additional LSTM layers) to gradually restore the temporal structure and spatial dimension of the data.
[0040] A key design element lies in the activation function of the decoder's output layer. In this embodiment, a linear activation function is used for the decoder's output layer. This is because the input voltage data, after Z-score normalization, is distributed across the entire real number domain. Using saturating functions such as Sigmoid or Tanh would compress the output value into a fixed range, distorting the voltage waveform amplitude information. The linear activation function ensures that the model can perform lossless and accurate regression reconstruction of the voltage dynamic range.
[0041] The final output of the decoder is the reconstructed voltage tensor. Its shape is exactly the same as the original input X, which is (B, T, N).
[0042] The deeper physical significance of this process lies in the fact that the VAE model, through learning, internalizes the "ideal consistent behavior pattern" of the battery module under healthy conditions. Therefore, the generated reconfigured voltage... This can be considered a "health baseline" that excludes abnormal interference. This output is strongly logically coupled with the reconstruction error calculation in subsequent step four: by calculating the real-time measurement value X and the "health baseline"... By analyzing the differences (reconstruction error) between modules, the system can quantitatively identify which modules exhibit early fault characteristics due to deviations from their learned normal patterns.
[0043] IV. Reconstruction Error Calculation: For each module, the difference between its original voltage sequence and the reconstructed voltage sequence is calculated to obtain the corresponding reconstruction error. This process aims to quantify the degree of deviation between the measured voltage behavior of each battery module and the "health benchmark" reconstructed by the VAE model. This degree of deviation is the reconstruction error, which is the core indicator for identifying anomalies.
[0044] Specifically, for each module channel n, calculate its reconstruction error within the current time window T. The present invention preferably uses mean square error as the metric, and its calculation formula is as follows: in, It is the standardized measured voltage of module n at time t. It is the ideal voltage value reconstructed by the VAE decoder.
[0045] The physical significance of this calculation process lies in the fact that, since the variational autoencoder only internalizes the "ideal consistent behavior pattern" of the battery pack under healthy operating conditions during the training phase, the model can achieve extremely high-fidelity reconstruction for modules that perform normally, thus minimizing its reconstruction error. The background noise level is maintained at a low level; however, once a module experiences a micro-short circuit or performance inconsistency deteriorates, its voltage drop rate and characteristic fluctuation pattern will deviate from the normal population evolution law, becoming an "out-of-distribution" sample that the model has never seen before. This causes the decoder to be unable to accurately reproduce its waveform, thus increasing the reconstruction error of that channel. The error increases significantly. Therefore, the larger the error value, the more the voltage behavior of the module deviates from the normal group consistency pattern.
[0046] V. Dynamic Threshold Generation and Anomaly Detection: Based on the reconstruction errors of all modules, a group statistical characteristic is calculated, and a dynamic threshold is generated accordingly. When the reconstruction error of a certain module continuously exceeds the dynamic threshold within multiple consecutive time windows, the module is determined to be abnormal and an early warning is triggered. The generation of the dynamic threshold specifically involves: calculating the mean and standard deviation of the reconstruction errors of all modules, and adding a preset multiple of the mean and standard deviation to the standard deviation as the dynamic threshold.
[0047] This step, serving as the execution decision layer of the entire algorithm, has the core task of automatically identifying and locating faults by quantifying the deviation between the measured voltage and the reconstructed "ideal voltage," while ensuring the reliability of the decision and a low false alarm rate. The decision logic comprises two key components: Dynamic threshold generation: To improve the system's robustness under complex and varying operating conditions, this invention abandons the traditional fixed threshold method and instead adopts an adaptive dynamic threshold mechanism based on the statistical characteristics of a sliding window. Within each decision cycle, the system calculates in real time the mean of the reconstruction errors of all N modules in the current batch. with standard deviation And based on statistical principles, a dynamic decision threshold Th is set, which is expressed as follows: Where k is the sensitivity coefficient, typically set between 3 and 5 based on actual operating conditions. The physical meaning of this design lies in using the overall consistency level of the module group as a dynamic reference benchmark, allowing the threshold to automatically adjust with load fluctuations and environmental noise across the entire battery pack. For example, the threshold automatically increases under high-noise conditions to avoid false alarms, while decreasing under stable conditions to improve monitoring sensitivity.
[0048] Anomaly detection and early warning: The final fault determination adopts a logic that combines "instantaneous amplitude judgment with time persistence verification". The system continuously monitors the reconstruction error of each module. The judgment does not rely solely on a single instance of error exceeding the limit, but requires that the abnormal state have temporal persistence: only when the reconstruction error of a certain module exceeds the limit... The system only determines that the module has an impedance abnormality (such as a micro-short circuit or increased internal resistance) when the dynamic threshold Th is continuously exceeded for M consecutive sliding windows (e.g., M=3). At this time, the system triggers a battery fault warning signal and reports the precise index of the abnormal module.
[0049] By shifting from "instantaneous residuals" to "spatiotemporal statistical characteristics," the system can effectively suppress false alarms caused by transient electromagnetic interference, while accurately capturing weak and persistent early voltage failure characteristics caused by internal battery losses, thereby significantly improving the reliability of early warnings.
[0050] VI. To verify the technical effectiveness of the present invention, an experimental verification was conducted on the early warning system in one specific embodiment. The results show that the system achieves significant technical effectiveness in unsupervised voltage reconstruction tasks.
[0051] By performing full-cycle visualization validation on randomly selected typical modules (such as module 76, module 89, and module 118), the robustness of the model in capturing battery voltage characteristics can be clearly observed. On the training set data, such as... Figure 2 As shown to the left of the dividing line between (a) and (c), the reconstructed curve (dashed line) of the VAE model highly coincides with the original voltage curve (solid line). Whether it is a smooth voltage plateau or dynamic transient fluctuations, the reconstructed curve fits closely. This indicates that the probabilistic encoder network successfully maps the high-dimensional voltage tensor to a low-dimensional feature space with rich physical meaning. The model not only effectively filters out high-frequency measurement noise, but also deeply internalizes the "ideal consistency pattern" of the battery pack in a healthy state, rather than simply memorizing training samples.
[0052] More importantly, regarding the test set data ( Figure 2 (a) - 2 (c) to the right of the dividing line), facing entirely new operating condition data that was not used in model training, the model demonstrated extremely strong generalization ability and anti-interference capability. The reconstructed curve did not show obvious overfitting oscillations, phase lag, or amplitude decay, and could still reproduce the minute details of the original voltage changes with high fidelity. This reliability on unknown data verifies that the latent space constructed by the VAE model has good continuity and robustness, providing a reliable guarantee for the long-term stable operation of the system in actual complex operating environments.
[0053] The high-precision reconstruction of normal samples establishes a highly reliable physical benchmark for subsequent anomaly detection modules. The core of the detection logic in this invention lies in the fact that "the model cannot effectively reconstruct its unlearned fault modes." The low background reconstruction error observed in actual measurements indicates that noise under normal operating conditions has been effectively suppressed. Therefore, once a module experiences a micro-short circuit, abnormally increased internal resistance, or deteriorated consistency, its voltage trajectory will significantly deviate from the learned healthy mode, causing its reconstruction error (residual) to increase sharply and exceed the dynamic threshold. In summary, Figure 2 The excellent reconstruction effect demonstrated is the core foundation for this invention to achieve early warning of battery faults with high sensitivity and low false alarm rate.
[0054] This embodiment provides a battery warning system based on unsupervised learning, used to implement the aforementioned battery warning method based on unsupervised learning, including: The data acquisition and preprocessing module is configured to synchronously acquire the operating data of multiple modules in the battery pack, and perform time alignment and standardization preprocessing on the data to construct a three-dimensional tensor containing the time dimension and the module number dimension. The model inference and reconstruction module has a built-in pre-trained variational autoencoder model, which is configured to receive the three-dimensional tensor and reconstruct the ideal voltage data representing the battery health state, and calculate the reconstruction error of each module. The anomaly detection and alarm module is configured to generate a dynamic threshold based on the reconstruction error of all modules, and to trigger an early warning signal when the reconstruction error of a specific module continues to exceed the dynamic threshold.
[0055] This embodiment provides a computer-readable storage medium storing a computer program thereon, characterized in that the computer program, when executed by a processor, implements the aforementioned battery warning method based on unsupervised learning.
[0056] Embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied 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.
[0057] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (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 apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0058] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function 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.
[0059] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable 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.
[0060] Contents not described in detail in this specification are prior art known to those skilled in the art. It is hereby indicated that the above description is intended to help those skilled in the art understand this invention, but does not limit the scope of protection of this invention. Any equivalent substitutions, modifications, improvements, or simplifications of the above descriptions that do not depart from the essential content of this invention fall within the scope of protection of this invention.
Claims
1. A battery early warning method based on unsupervised learning, characterized in that, Includes the following steps: S1. Data Acquisition and Synchronization: Synchronously acquire voltage data, total current data, and temperature data of multiple modules in the battery pack, and perform time alignment processing on all data to form a time-synchronized multi-channel data sequence; S2. Spatiotemporal feature tensor construction: The multi-channel data sequence is preprocessed, and a three-dimensional tensor containing both the time dimension and the module number dimension is constructed using the sliding window method. S3. Unsupervised voltage reconstruction: The three-dimensional tensor is input into a pre-trained variational autoencoder model. The encoder of the model maps the input data to the latent space and obtains the latent variables. The decoder of the model then reconstructs the ideal voltage data representing the battery health state based on the latent variables. S4. Reconstruction error calculation: For each module, calculate the difference between its original voltage sequence and the reconstructed voltage sequence to obtain the corresponding reconstruction error; S5. Dynamic threshold generation and anomaly judgment: Calculate the group statistical characteristics based on the reconstruction error of all modules, and generate a dynamic threshold based on this. When the reconstruction error of a module continuously exceeds the dynamic threshold within multiple consecutive time windows, the module is determined to be abnormal and an early warning is triggered.
2. The battery early warning method based on unsupervised learning according to claim 1, characterized in that, The time alignment process described in S1 includes: assigning a unified timestamp to all collected data and using interpolation to fill in data that is delayed or lost.
3. The battery early warning method based on unsupervised learning according to claim 1, characterized in that, The encoder of the variational autoencoder model described in S3 is implemented using a long short-term memory network or a one-dimensional convolutional neural network.
4. The battery early warning method based on unsupervised learning according to claim 1, characterized in that, The latent variable mentioned in S3 is obtained through reparameterization, specifically by linearly combining the probability distribution parameters of the encoder output with an external noise variable sampled from a standard normal distribution to obtain the latent variable.
5. The battery early warning method based on unsupervised learning according to claim 1, characterized in that, The decoder of the variational autoencoder model described in S3 uses a linear activation function in its output layer.
6. The battery early warning method based on unsupervised learning according to claim 1, characterized in that, The variational autoencoder model is trained using historical operating data of the battery under normal and healthy conditions.
7. The battery early warning method based on unsupervised learning according to claim 1, characterized in that, The generation of the dynamic threshold in S5 is specifically as follows: calculate the mean and standard deviation of the reconstruction error of all modules, and add a preset multiple of the mean and the standard deviation to the mean as the dynamic threshold.
8. A battery warning system based on unsupervised learning, used to implement the battery warning method based on unsupervised learning according to any one of claims 1-7, characterized in that, include: The data acquisition and preprocessing module is configured to synchronously acquire the operating data of multiple modules in the battery pack, and perform time alignment and standardization preprocessing on the data to construct a three-dimensional tensor containing the time dimension and the module number dimension. The model inference and reconstruction module has a built-in pre-trained variational autoencoder model, which is configured to receive the three-dimensional tensor and reconstruct the ideal voltage data representing the battery health state, and calculate the reconstruction error of each module. The anomaly detection and alarm module is configured to generate a dynamic threshold based on the reconstruction error of all modules, and to trigger an early warning signal when the reconstruction error of a specific module continues to exceed the dynamic threshold.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements a battery warning method based on unsupervised learning as described in any one of claims 1-7.