Lithium ion battery fault diagnosis method and system based on time sequence analysis
By using a time series analysis-based method, a static hybrid expert convolutional network model and a fixed-dimensional Fourier transform, the accuracy of lithium-ion battery fault diagnosis is improved. Low-latency and low-power fault detection is achieved on embedded devices, solving the problems of low accuracy and insufficient real-time performance in existing technologies.
Patent Information
- Application Number
- CN202511893401.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-16
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2045-12-16
AI Technical Summary
Existing lithium-ion battery fault diagnosis methods have low accuracy and are difficult to meet the deployment requirements of real-time and resource-constrained equipment.
A time series analysis-based approach is adopted to construct a time series by acquiring the voltage, current, and temperature signals of lithium-ion batteries. After preprocessing and periodic feature extraction, a static hybrid expert convolutional network model is used for fault diagnosis. Combined with fixed-dimensional Fourier transform and mask matrix, efficient fault identification is achieved.
It improves the accuracy of lithium-ion battery fault diagnosis and realizes low-latency and low-power fault detection on embedded hardware platforms, suitable for automotive or edge computing platforms.
Smart Images

Figure CN121348113A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of battery fault diagnosis, in particular to a lithium ion battery fault diagnosis method and system based on time series analysis. BACKGROUND
[0002] Lithium ion batteries are widely used in electric vehicles, energy storage systems and mobile electronic devices due to their high energy density and long cycle life. However, during operation, lithium ion batteries undergo complex electrochemical and thermodynamic reactions. Under the long-term influence of environmental temperature, charge-discharge rate and aging degree, lithium ion batteries may fail to some extent, and the severity may range from initial polarization to capacity attenuation, and even to internal short circuit. If these faults are not detected in time, they will cause thermal runaway accidents and pose a serious safety risk. Therefore, online monitoring and fault diagnosis of lithium ion battery operating status have become a key technology to ensure the safe and reliable operation of battery systems.
[0003] Currently, the research on lithium ion battery fault diagnosis at home and abroad mainly focuses on three methods: knowledge-based analysis method, model-based deduction method and data-driven intelligent algorithm. However, the existing methods have low accuracy in lithium ion battery fault diagnosis. SUMMARY
[0004] The present application aims to provide a lithium ion battery fault diagnosis method and system based on time series analysis, which can improve the accuracy of lithium ion battery fault diagnosis.
[0005] In a first aspect, the embodiments of the present application provide a lithium ion battery fault diagnosis method based on time series analysis, which comprises: Obtaining a plurality of lithium ion battery signals of a lithium ion battery to be diagnosed, and constructing the plurality of lithium ion battery signals into a time series, wherein the plurality of lithium ion battery signals include voltage, current and temperature; Preprocessing the time series to obtain a preprocessed time series; Extracting periodic features based on the preprocessed time series; Reconstructing the preprocessed time series through the periodic features to obtain a two-dimensional reconstruction matrix, and generating a mask matrix through the periodic features; Element-wise multiplying the two-dimensional reconstruction matrix and the mask matrix to obtain an element-wise multiplication result; Inputting the element-wise multiplication result into a trained static mixed expert convolutional network model to obtain a target feature vector; Inputting the target feature vector into a fully connected neural network to generate a target reconstruction sequence; calculate a reconstruction error between the target reconstruction sequence and the preprocessed time sequence, perform fault diagnosis on the lithium ion battery to be diagnosed based on the reconstruction error, and obtain a fault diagnosis result.
[0006] Compared with the prior art, the first aspect of the present application has the following beneficial effects: The method comprises the following steps: acquiring a plurality of lithium ion battery signals of a lithium ion battery to be diagnosed, and constructing the plurality of lithium ion battery signals into a time sequence, wherein the plurality of lithium ion battery signals comprise voltage, current and temperature; preprocessing the time sequence to obtain a preprocessed time sequence; extracting a periodic feature based on the preprocessed time sequence; reconstructing the preprocessed time sequence through the periodic feature to obtain a two-dimensional reconstruction matrix, and generating a mask matrix through the periodic feature; multiplying the two-dimensional reconstruction matrix and the mask matrix element by element to obtain an element-by-element multiplication result; inputting the element-by-element multiplication result into a trained static hybrid expert convolutional network model to obtain a target feature vector; inputting the target feature vector into a fully connected neural network to generate a target reconstruction sequence; calculating a reconstruction error between the target reconstruction sequence and the preprocessed time sequence, performing fault diagnosis on the lithium ion battery to be diagnosed based on the reconstruction error, and obtaining a fault diagnosis result. In this way, the main periodic component in the battery operating state can be identified by first extracting the periodic feature. Then, the uniform mapping from frequency spectrum analysis to static tensor input is completed by reconstructing the preprocessed time sequence through the periodic feature and generating the mask matrix, which can provide a unified input for the subsequent static hybrid expert convolutional network model and deployment reasoning. The trained static hybrid expert convolutional network model is used to extract the target feature vector to perform fault diagnosis on the lithium ion battery to be diagnosed, which can improve the accuracy of lithium ion battery fault diagnosis.
[0007] In some embodiments, the preprocessing of the time sequence to obtain a preprocessed time sequence comprises: standardizing the time sequence to obtain a standardized time sequence; inputting the standardized time sequence into an embedding layer to obtain embedding features, and taking the embedding features as the preprocessed time sequence.
[0008] In some embodiments, the extracting of the periodic feature based on the preprocessed time sequence comprises: performing matrix rearrangement on the preprocessed time sequence to obtain a rearranged matrix; constructing a real part matrix and an imaginary part matrix with fixed dimensions based on the rearranged matrix; calculating an amplitude spectrum according to the real part matrix and the imaginary part matrix; calculating the average amplitude of each sampling point in all samples and channels according to the amplitude spectrum; arranging the average amplitudes in a time dimension, performing a fixed dimension Fourier transform on the average amplitudes arranged in the time dimension to obtain a frequency spectrum analysis result; selecting a frequency point index corresponding to a plurality of amplitudes from the frequency spectrum analysis result, the amplitude being a maximum amplitude selected from the frequency spectrum analysis result or being a current maximum amplitude in the frequency spectrum analysis result after excluding the maximum amplitude selected last time; According to the sampling time sequence length and the frequency point index, a cycle set is calculated, and all cycles in the cycle set are taken as cycle characteristics.
[0009] In some embodiments, the reconstruction of the preprocessed time sequence by the cycle characteristics to obtain a two-dimensional reconstruction matrix, and the generation of a mask matrix by the cycle characteristics, include: zero padding the preprocessed time sequence by the cycle characteristics to obtain a zero-padded time sequence and a total length of the zero-padded time sequence; According to the cycle characteristics and the total length, a rearrangement operation is performed on the zero-padded time sequence to obtain a two-dimensional reconstruction matrix; According to the row index, the column index and the cycle characteristics, a mask matrix is generated.
[0010] In some embodiments, the trained static mixed expert convolutional network model includes a shared network and a routing network, the routing network includes a plurality of experts, and the input of the element-wise multiplication result into the trained static mixed expert convolutional network model to obtain a target feature vector includes: inputting the element-wise multiplication result into the shared network to obtain an output result of the shared network; inputting the element-wise multiplication result into the routing network, and extracting features of the element-wise multiplication result by each expert in the routing network to obtain a plurality of feature vectors extracted by the experts; According to the amplitude of the preprocessed time sequence at the main frequency point index, the corresponding gating weight of each expert is calculated; Based on the gating weight, the feature vectors extracted by each expert are weighted and summed to obtain an output result of the routing network; adding the output result of the shared network and the output result of the routing network to obtain a target feature vector.
[0011] In some embodiments, after inputting the element-wise multiplication result into the trained static mixed expert convolutional network model, the method further includes: The quantization step in the quantization perception training is constructed as: ; wherein, denotes a quantization step size, denotes an initial quantization step size, denotes a quantization range coefficient, denotes an expert in a channel an average frequency domain amplitude, denotes a maximum value in a set of average frequency domain amplitudes of all experts and channels, denotes a number of experts, denotes a number of channels, denotes a stabilization constant, denotes a number of selected frequency points, denotes a set of periods, denotes a quantization weight at a frequency point index denotes an absolute value, denotes a non-linear decay coefficient; based on the quantization step size, performing quantization-aware training on the static hybrid expert convolutional network model to obtain a trained static hybrid expert convolutional network model.
[0012] In some embodiments, before obtaining the fault diagnosis result, the method further comprises: constructing the period feature extraction, the time series reconstruction, the mask generation, and the trained static hybrid expert convolutional network model into an ONNX model; exporting the ONNX model and deploying the ONNX model to an edge hardware platform, the edge hardware platform including a CPU end and a GPU end; when running the ONNX model, the period feature extraction, the time series reconstruction, and the mask generation are executed on the CPU end, and the trained static hybrid expert convolutional network model is executed on the GPU end.
[0013] In a second aspect, the embodiments of the present application also provide a lithium ion battery fault diagnosis system based on time series analysis, the system comprising: a time series construction unit configured to acquire a plurality of lithium ion battery signals of a lithium ion battery to be diagnosed, and construct the plurality of lithium ion battery signals into a time series, the plurality of lithium ion battery signals including voltage, current, and temperature; a time series preprocessing unit configured to preprocess the time series to obtain a preprocessed time series; a period feature extraction unit configured to extract a period feature based on the preprocessed time series; a time series reconstruction unit configured to reconstruct the preprocessed time series through the period feature to obtain a two-dimensional reconstruction matrix, and generate a mask matrix through the period feature. an element-wise multiplication unit, configured to multiply the two-dimensional reconstruction matrix and the mask matrix element by element to obtain an element-wise multiplication result; a feature vector obtaining unit, configured to input the element-wise multiplication result into a trained static mixing expert convolutional network model to obtain a target feature vector; a reconstruction sequence generating unit, configured to input the target feature vector into a fully connected neural network to generate a target reconstruction sequence; a battery fault diagnosis unit, configured to calculate a reconstruction error between the target reconstruction sequence and the preprocessed time sequence, and perform fault diagnosis on the lithium ion battery to be diagnosed based on the reconstruction error to obtain a fault diagnosis result.
[0014] In a third aspect, an electronic device is provided, including at least one control processor and a memory in communication connection with the at least one control processor; the memory stores instructions executable by the at least one control processor, and the instructions are executed by the at least one control processor to enable the at least one control processor to perform the method for lithium ion battery fault diagnosis based on time series analysis as described above.
[0015] In a fourth aspect, a computer readable storage medium is provided, which stores computer executable instructions for causing a computer to perform the method for lithium ion battery fault diagnosis based on time series analysis as described above.
[0016] It can be understood that the beneficial effects of the second aspect to the fourth aspect compared with the related art are the same as the beneficial effects of the first aspect compared with the related art, and reference can be made to the related description in the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0017] The above and / or additional aspects and advantages of the present application will become apparent and more readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which: Figure 1 is a flowchart of an embodiment of the method for lithium ion battery fault diagnosis based on time series analysis provided by the present application; Figure 2 is a schematic diagram of the overall structure of a lithium ion battery fault diagnosis system in the best embodiment of the method for lithium ion battery fault diagnosis based on time series analysis provided by the present application; Figure 3 is a schematic diagram of the structure of a static mixing expert convolutional network model in the best embodiment of the method for lithium ion battery fault diagnosis based on time series analysis provided by the present application; Figure 4is a quantitative inference schematic diagram in the best embodiment of the lithium ion battery fault diagnosis method based on time series analysis provided in the application; Figure 5 is a raw quantitative perception training schematic diagram in the best embodiment of the lithium ion battery fault diagnosis method based on time series analysis provided in the application; Figure 6 is a periodic sensitive quantitative perception training schematic diagram in the best embodiment of the lithium ion battery fault diagnosis method based on time series analysis provided in the application; Figure 7 is an embedded flow schematic diagram in the best embodiment of the lithium ion battery fault diagnosis method based on time series analysis provided in the application; Figure 8 is a structural schematic diagram of an embodiment of the lithium ion battery fault diagnosis system provided in the application; Figure 9 is a structural schematic diagram of an embodiment of the electronic device provided in the application. DETAILED DESCRIPTION
[0018] The embodiments of the present application are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar notations represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary, only for explaining the present application, and cannot be understood as limiting the present application.
[0019] In the description of the present application, if there is a description to first, second, etc., it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features or the sequence of indicated technical features.
[0020] In the description of the present application, it is to be understood that the orientation description, such as the orientation or position relationship indicated by up, down, etc., is based on the orientation or position relationship shown in the drawings, only for the purpose of describing the present application and simplifying the description, and is not to indicate or imply that the device or element indicated must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application.
[0021] In the description of the present application, it is to be noted that, unless otherwise explicitly limited, the words such as setting, installing, connecting, etc. should be broadly understood, and the person skilled in the art can reasonably determine the specific meaning of the above words in the present application in combination with the specific content of the technical solution.
[0022] Since the accuracy of the existing method for lithium ion battery fault diagnosis is relatively low. Therefore, in order to solve the problems existing in the prior art, the present application provides a lithium ion battery fault diagnosis method and system based on time series analysis.
[0023] With reference to Figure 1 The flowchart of the lithium ion battery fault diagnosis method based on time series analysis provided by the embodiments of the present application. The lithium ion battery fault diagnosis method based on time series analysis is applied to an electronic device, which can be a server or a mobile terminal, etc. As shown in Figure 1 The lithium ion battery fault diagnosis method based on time series analysis can include the following steps: Step S101, acquiring a plurality of lithium ion battery signals of a lithium ion battery to be diagnosed, and constructing the plurality of lithium ion battery signals into a time series, the plurality of lithium ion battery signals including voltage, current and temperature; Step S102, preprocessing the time series to obtain a preprocessed time series; Step S103, extracting periodic features based on the preprocessed time series; Step S104, reconstructing the preprocessed time series through the periodic features to obtain a two-dimensional reconstruction matrix, and generating a mask matrix through the periodic features; Step S105, multiplying the two-dimensional reconstruction matrix and the mask matrix element by element to obtain an element-by-element multiplication result; Step S106, inputting the element-by-element multiplication result into the trained static mixed expert convolutional network model to obtain a target feature vector; Step S107, inputting the target feature vector into a fully connected neural network to generate a target reconstruction sequence; Step S108, calculating the reconstruction error between the target reconstruction sequence and the preprocessed time series, and based on the reconstruction error, diagnosing the fault of the lithium ion battery to be diagnosed to obtain a fault diagnosis result.
[0024] In the embodiment, a plurality of lithium ion battery signals of a lithium ion battery to be diagnosed are acquired, and the plurality of lithium ion battery signals are constructed into a time sequence, the plurality of lithium ion battery signals including voltage, current and temperature; the time sequence is preprocessed to obtain a preprocessed time sequence; periodic characteristics are extracted based on the preprocessed time sequence; the preprocessed time sequence is reconstructed by the periodic characteristics to obtain a two-dimensional reconstruction matrix, and a mask matrix is generated by the periodic characteristics; the two-dimensional reconstruction matrix and the mask matrix are multiplied element by element to obtain an element-by-element multiplication result; the element-by-element multiplication result is input into a trained static mixed expert convolutional network model to obtain a target feature vector; the target feature vector is input into a fully connected neural network to generate a target reconstruction sequence; a reconstruction error between the target reconstruction sequence and the preprocessed time sequence is calculated, and based on the reconstruction error, fault diagnosis is performed on the lithium ion battery to be diagnosed to obtain a fault diagnosis result. In this way, by extracting periodic characteristics, the main periodic components in the battery operating state can be identified; then the preprocessed time sequence is reconstructed by the periodic characteristics and the mask matrix is generated, which completes the unified mapping from frequency spectrum analysis to static tensor input, and can provide unified input for subsequent static mixed expert convolutional network model and deployment reasoning; and by extracting the target feature vector through the trained static mixed expert convolutional network model, the fault diagnosis of the lithium ion battery to be diagnosed can be performed, which can improve the accuracy of lithium ion battery fault diagnosis.
[0025] The plurality of lithium ion battery signals can be arranged in time sequence to construct the time sequence.
[0026] The preprocessing of the time sequence can be standardization, normalization and the like.
[0027] The static mixed expert convolutional network model can be a network model including an Inception module, a GELU activation function and an Inception module.
[0028] The Inception module can be a multi-branch convolutional structure, different branches using different convolution kernel sizes (such as 1x1, 3x3, 5x5) to capture features of different scales.
[0029] The fully connected neural network can be a special case of a feedforward neural network, in which each neuron is connected to all neurons of the previous layer.
[0030] The reconstruction error between the target reconstruction sequence and the preprocessed time sequence can be calculated by mean square error.
[0031] The fault diagnosis on the lithium ion battery to be diagnosed based on the reconstruction error can be that when the reconstruction error is greater than a threshold, the lithium ion battery to be diagnosed is determined as faulty; and when the reconstruction error is less than or equal to the threshold, the lithium ion battery to be diagnosed is determined as normal.
[0032] In some embodiments, the time series is preprocessed to obtain a preprocessed time series, including: The time series is standardized to obtain a standardized time series; The standardized time series is input into an embedding layer to obtain embedding features, and the embedding features are taken as the preprocessed time series.
[0033] In this embodiment, by standardizing the time series, it can be ensured that different feature dimensions have similar numerical ranges, thereby avoiding gradient instability caused by dimensional differences in the network training process. By inputting the standardized time series into the embedding layer, the embedding process not only enhances the model's representation ability for complex time series structures, but also provides a stable and rich feature basis for subsequent frequency domain analysis.
[0034] In some embodiments, based on the preprocessed time series, a periodic feature is extracted, including: The preprocessed time series is matrix rearranged to obtain a rearranged matrix; Based on the rearranged matrix, a fixed-dimension real matrix and a fixed-dimension imaginary matrix are constructed; The amplitude spectrum is calculated according to the real matrix and the imaginary matrix; The average amplitude of each sampling point over all samples and channels is calculated according to the amplitude spectrum; The average amplitude is arranged in the time dimension, and a fixed-dimension discrete Fourier transform is performed on the average amplitude arranged in the time dimension to obtain a frequency spectrum analysis result; From the frequency spectrum analysis result, a frequency point index corresponding to a plurality of amplitudes is selected, and the amplitude is the maximum amplitude selected from the frequency spectrum analysis result, or the current maximum amplitude in the frequency spectrum analysis result after excluding the previously selected maximum amplitude; According to the sampling time sequence length and the frequency point index, a period set is calculated, and all periods in the period set are taken as the periodic feature.
[0035] In this embodiment, by extracting the periodic feature, the main periodic component in the battery operating state can be identified. To avoid shape incompatibility problems caused by dynamic operators in the derivation stage, this embodiment explicitly defines the form of the real matrix and the imaginary matrix to realize the fixed-dimension discrete Fourier transform that can be recognized by ONNX.
[0036] The fixed-dimension discrete Fourier transform can be an algorithm for efficiently calculating a discrete Fourier transform (DFT) for converting a time series signal from a time domain to a frequency domain to extract periodic characteristics of the signal.
[0037] In some embodiments, the preprocessed time series is reconstructed by the periodic characteristics to obtain a two-dimensional reconstruction matrix, and a mask matrix is generated by the periodic characteristics, including: The preprocessed time series is zero-padded by the periodic characteristics to obtain a zero-padded time series and a total length of the zero-padded time series; The zero-padded time series is rearranged according to the periodic characteristics and the total length to obtain the two-dimensional reconstruction matrix; The mask matrix is generated according to the row index, the column index, and the periodic characteristics.
[0038] In this embodiment, the preprocessed time series is reconstructed by the periodic characteristics to obtain a two-dimensional reconstruction matrix, and a mask matrix is generated by the periodic characteristics, which completes the unified mapping from spectral analysis to static tensor input, and can provide unified input for subsequent static hybrid expert convolutional network models and deployment reasoning.
[0039] The row index and the column index can be row indexes and column indexes in the matrix.
[0040] In some embodiments, the trained static hybrid expert convolutional network model includes a shared network and a routing network, the routing network includes a plurality of experts, and the element-wise multiplication result is input into the trained static hybrid expert convolutional network model to obtain a target feature vector, including: The element-wise multiplication result is input into the shared network to obtain an output result of the shared network; The element-wise multiplication result is input into the routing network, and each expert in the routing network extracts features from the element-wise multiplication result to obtain a plurality of feature vectors extracted by the experts; The gating weight corresponding to each expert is calculated according to the amplitude of the preprocessed time series at the main frequency point index; Based on the gating weight, the feature vectors extracted by each expert are weighted and summed to obtain an output result of the routing network; The output result of the shared network and the output result of the routing network are added to obtain the target feature vector.
[0041] In this embodiment, multi-scale feature extraction is performed by the shared network and the routing network, and multi-scale feature fusion is performed, which can obtain a feature vector containing rich content, strengthen the feature expression of the main periodic component, lay a good data foundation for later fault diagnosis of the lithium ion battery to be diagnosed, and thus improve the accuracy of lithium ion battery fault diagnosis.
[0042] The aforementioned shared network may include the Inception module, the GELU activation function, and the Inception module.
[0043] The aforementioned experts may include the Inception module, the GELU activation function, and the Inception module.
[0044] In some implementations, the method further includes, in addition to, inputting the element-wise multiplication result into a trained static hybrid expert convolutional network model: The quantization step size in quantization-aware training is: ; in, Indicates the quantization step size. Indicates the initial quantization step size. Indicates the quantization range coefficient. Experts In the passage Average frequency domain amplitude, This represents the maximum value in the set of average frequency domain amplitudes for all experts and channels. Indicates the number of experts. Indicates the number of channels. Represents the stability constant. This indicates the number of frequency points selected. Represents a periodic set. Frequency index The quantization weights below, Represents absolute value. Indicates the nonlinear attenuation coefficient; Based on the quantization step size, a quantization-aware training method is used to train the static hybrid expert convolutional network model, resulting in a well-trained static hybrid expert convolutional network model.
[0045] In this embodiment, by constructing the quantization step size in quantization-aware training, adaptive quantization at the convolutional channel level is achieved, enabling the model to maintain a high-fidelity representation of periodic features even under low-bit quantization conditions.
[0046] The aforementioned quantization-aware training can be a technique that introduces quantization simulation during the training phase. By dynamically mapping floating-point weights and activation values to low-bit integers, the model can maintain high precision and low computational load on embedded platforms.
[0047] In some implementations, the method further includes, before obtaining the fault diagnosis results: The ONNX model is constructed by extracting periodic features, reconstructing time series, generating masks, and using a trained static hybrid expert convolutional network model. The ONNX model is exported and deployed to an edge hardware platform including a CPU end and a GPU end. When the ONNX model is run, the period feature extraction, time series reconstruction and mask generation are executed on the CPU end, and the trained static hybrid expert convolutional network model is executed on the GPU end.
[0048] In the embodiment, through the joint execution of the CPU end and the GPU end, the system can complete the multi-period feature diagnosis calculation within a millisecond level time delay, thereby improving the efficiency of the lithium ion battery fault diagnosis and saving time cost.
[0049] The ONNX model can be an open deep learning model exchange format supporting cross-framework export and deployment.
[0050] For the convenience of those skilled in the art, a set of best embodiments is provided as follows: At present, the research on lithium ion battery fault diagnosis at home and abroad mainly focuses on three types of methods: knowledge-based analysis method, model-based reasoning method and data-driven intelligent algorithm. The knowledge-based analysis method relies on expert experience, rule base or logical judgment to identify battery faults, such as expert system, fuzzy logic reasoning, fault tree analysis and threshold determination method, etc. This kind of method has simple structure, strong interpretability, and is widely used in early battery management system, but due to excessive dependence on expert experience, it lacks self-adaptation and generalization ability, and is difficult to cope with complex and variable operating conditions.
[0051] The model-based fault diagnosis method establishes an electrochemical or thermodynamic model to realize fault recognition through residual error analysis. Typical research includes electrochemical-thermal coupling model, which is used to detect internal short circuit fault of lithium ion battery. This kind of method can accurately reflect the internal mechanism of the battery in theory, and is suitable for in-depth mechanism analysis, but the modeling process is complex, the parameter precision and boundary condition are extremely high, the calculation cost is large, and it is difficult to meet the real-time demand of actual battery management system (BMS).
[0052] With the development of data scale and artificial intelligence technology, data-driven intelligent algorithms have gradually become the mainstream direction of lithium-ion battery fault diagnosis research. Such methods collect operating data such as voltage, current, and temperature, and build data-driven machine learning models based on these data to learn the mapping relationship between battery state and fault characteristics, thereby achieving fault detection and classification. Although data-driven methods have strong self-learning and adaptive ability, their accuracy depends on a large amount of high-quality training data. Due to the low frequency of battery fault events and the high cost of data acquisition, the existing methods are limited by the way of utilizing data features, and most of them only focus on static features, failing to effectively capture the time-dependent relationship in the charging and discharging process, resulting in insufficient ability to identify early or weak faults.
[0053] Although existing lithium-ion battery fault diagnosis methods have made some progress at different levels, there are still obvious deficiencies, including: 1. Traditional knowledge-based or threshold rule-based diagnosis methods rely too much on human experience and cannot adapt to the complexity of battery operating environment and the diversity of working conditions, and cannot identify new types of faults.
[0054] 2. Although model-based diagnosis methods have certain theoretical accuracy, their establishment process depends on the accurate parameters and boundary conditions of the internal electrochemical equations of the battery, and the model calculation is complex and the solution cost is high, making it difficult to meet the real-time detection requirements of the vehicle BMS system.
[0055] 3. Although data-driven intelligent algorithms (including deep learning methods) overcome the model dependency problem, their diagnosis performance is highly dependent on large-scale high-quality training data sets, while real battery fault data is difficult and costly to obtain. Restricted by this, existing models often rely only on static features or single-step prediction signals for fault judgment, and it is difficult to effectively capture the dynamic characteristics and periodic variation rules in the charging and discharging process, thus the recognition effect of early internal short circuit and other slowly evolving faults is not ideal.
[0056] 4. Although deep learning models have advantages in feature automatic extraction and complex pattern recognition, their structure is complex, parameter size is large, and calculation cost is high, which is not suitable for direct deployment in resource-constrained embedded hardware platforms, thus limiting their real-time application in vehicle battery management systems.
[0057] 5. The separation of model deployment and training framework makes it difficult for engineering to land. Most existing deep learning methods are developed in Python environment using PyTorch / TensorFlow framework. When embedding into inference engine (such as TensorRT model and RKNN model) in C / C++ environment, the dynamic graph calculation or some specific operators (such as standard DFT) relied on by the framework often have problems such as operator not supported and dynamic shape cannot be processed, resulting in model conversion failure or performance degradation, which limits the application of advanced algorithms on resource-constrained devices.
[0058] In summary, the prior art cannot balance the accuracy of battery fault diagnosis and model lightweight, and the high complexity of the model limits its real-time performance.
[0059] To solve the above problems, the purpose of the embodiment is to propose a lithium-ion battery fault diagnosis and embedded deployment method based on time series analysis, which can ensure high diagnostic accuracy while realizing model structure staticization, calculation process deployability and inference process low power consumption. Specifically, the embodiment achieves the above goals in the following ways: At the algorithm level, a periodic feature extraction mechanism based on fixed dimension discrete Fourier transform (DFT) and periodic mask matrix is proposed, which can automatically detect and identify the main period and effective data area while keeping the calculation dimension fixed, thereby realizing the static mapping of one-dimensional time series to two-dimensional time series tensor and fully exploiting the periodicity of battery operation signals.
[0060] At the model structure level, a static mixed expert convolutional network model (Static-MoE model) is designed, which replaces the traditional attention mechanism with a multi-period parallel expert structure. Each expert corresponds to a different frequency branch, and the gating weight is calculated by the frequency domain amplitude through the Softmax function. Combined with the periodic sensitivity quantization perception mechanism (Periodic Sensitivity Quantization Function, PSQF), adaptive quantization at the convolution channel level is realized, so that the model can still maintain high fidelity expression of periodic features under low bit quantization conditions.
[0061] At the deployment level, a lightweight implementation framework integrating algorithm and deployment is constructed. The framework maintains consistent calculation topology during training and exportation, replaces dynamic DFT operators with fixed dimension DFT matrix and mask generation nodes, so that the ONNX model has static shape features and can be directly converted into TensorRT model or RKNN model. In the inference stage, periodic detection and parallel expert calculation are realized through the heterogeneous collaborative mechanism of central processing unit (CPU) and graphics processing unit (GPU), and combined with energy consumption adaptive control strategy, millisecond-level real-time inference and low power consumption operation are realized on edge devices.
[0062] Through the above design, the embodiment fully considers the hardware constraints in the algorithm design stage, realizes the unified complete link from data acquisition, periodic feature modeling, convolution feature learning to embedded deployment, and can realize high-precision, low-delay and low-power fault diagnosis of lithium ion batteries on resource-limited vehicle-mounted or edge computing platforms, thereby providing an engineering-landable solution for the safety monitoring and early warning of the BMS system.
[0063] The embodiment proposes a lithium ion battery fault diagnosis and embedded deployment method based on time series analysis. The method combines frequency domain periodicity extraction, two-dimensional time series reconstruction and deep convolution network feature fusion technology, realizes high-precision fault detection and abnormality identification of the battery operating state, and realizes efficient deployment in the embedded hardware platform through model compression and ONNX export technology. The overall system structure includes a data acquisition and preprocessing module, a periodic feature extraction module, a two-dimensional time series reconstruction module, a convolution feature learning and fault identification module, and an embedded model deployment module. Specifically, it includes the following contents: (1) Overall structure of the system.
[0064] As shown in Figure 2 , the overall system of the embodiment is composed of four functional modules, including a data acquisition and preprocessing module, a periodic feature extraction and two-dimensional time series reconstruction module, a convolution feature extraction and fusion module, and an embedded model deployment module. The system realizes the complete functional link from signal acquisition, feature extraction to fault identification and early warning through a unified data bus interface.
[0065] Among them, the data acquisition and preprocessing module is used to obtain the operating parameters such as voltage, current and temperature of the lithium ion battery system in real time, and convert them into time series form input signals, providing a basis for subsequent analysis. The periodic feature extraction module is based on the improved fast Fourier transform algorithm, and completes the frequency spectrum analysis and periodicity extraction of the signal on the fixed dimension DFT matrix, so as to identify the main periodic components in the battery operating state. The extracted periodic information is used to divide and reconstruct the one-dimensional time series by period, and the corresponding two-dimensional time series feature map (i.e. two-dimensional reconstruction matrix) is constructed, so that the dynamic characteristics within and between periods are simultaneously explicitly expressed in the spatial structure.
[0066] On this basis, the convolution feature extraction and fusion module uses a static hybrid expert network structure to perform multi-scale feature extraction and fusion on two-dimensional time series feature maps using a combination of depth separable convolution and Inception-GELU-Inception multi-branch feature blocks. This module reduces computational complexity through depth separable convolution and relies on an expert weighted fusion mechanism to strengthen the feature expression of the main periodic components, enabling the identification of battery operation abnormalities. Finally, the embedded model deployment module uses ONNX export and model compression techniques to efficiently deploy the trained model to vehicle-mounted or edge hardware platforms (such as Jetson Nano, RK3588, and STM32, etc.), enabling real-time inference and online fault warning.
[0067] (2) Data acquisition and preprocessing module.
[0068] This module is used to collect real-time operating parameters from lithium-ion battery systems, including voltage, current, and temperature signals, and organize them into time series inputs for network analysis. Let the input signal (i.e., time series) be represented as: (1); where denotes the sampling time series length, and each sampling point contains feature dimensions such as current, voltage, and temperature.
[0069] Before the signal enters the neural network model, it needs to be standardized to eliminate dimensional differences and improve the stability of network model training. For the input tensor where is the batch size, is the feature dimension, and the preprocessing process includes the following steps: First, calculate the time mean to obtain the average value of each feature in the entire sequence, specifically: (2); Then calculate the standard deviation to represent the dispersion of the data distribution, specifically: (3); Finally, perform the standardization operation to standardize the input signal according to the following formula: (4); where denotes the index of the statistical dimension, such as data [B, T, C], and typical dim = 1: standardization by time (zero mean and unit variance for each sample / each feature on its time axis); dim = 2: standardization by feature dimension (zero mean and unit variance for each time step across features), denotes the mean operator, denotes a variance operator, denotes the normalized signal (i.e., normalized time series).
[0070] This process ensures that different feature dimensions have similar numerical ranges, thereby avoiding gradient instability caused by dimensional differences during network training.
[0071] The normalized signal is input into the embedding layer (Data Embedding Layer), in which the original multi-dimensional time series signal is mapped to a higher-dimensional feature space, outputting embedding features (i.e., preprocessed time series) is: (5); Embedding features serve as inputs for subsequent periodic feature extraction modules. This embedding process not only enhances the model's representation of complex time series structures but also provides a stable and rich feature basis for subsequent frequency domain analysis. The embedding layer of the present embodiment is well known to those skilled in the art, and the specific structure of the embedding layer is not described in detail.
[0072] (3) Periodic feature extraction and two-dimensional time series reconstruction module.
[0073] This module is used to convert one-dimensional time series of lithium-ion battery operating signals into a fixed-dimensional two-dimensional tensor that can be stably calculated in an embedded system, providing a unified input for subsequent static hybrid expert convolutional network models and deployment reasoning. To ensure structural consistency of the model during export and reasoning, the present embodiment proposes a Fixed-Dimension Fourier Transform and Periodicity Detection mechanism that is friendly to ONNX, and on this basis, realizes two-dimensional time series reconstruction and periodic mask matrix generation, thereby completing the unified mapping from frequency spectrum analysis to static tensor input.
[0074] (I) Fixed-Dimension Discrete Fourier Transform and Periodicity Detection
[0075] To avoid shape incompatibility problems caused by dynamic operators during the export phase, the present embodiment explicitly defines the real and imaginary matrices, realizing a Fixed-Dimension Discrete Fourier Transform (Fixed-Dimension DFT) that can be recognized by ONNX. The input time series is , which is first rearranged into a matrix , and the real and imaginary matrices of fixed dimension are constructed: (6); wherein, denotes the real part (Real Part) of the complex weight matrix, The imaginary part of the complex weight matrix is represented by the following expression: , The number of DFT points.
[0076] The real parts are calculated using matrix multiplication. With the imaginary part : (7); The amplitude spectrum is calculated using the following formula: (8); Then, the average value was taken across batch and channel dimensions to obtain the overall amplitude distribution: (9); in, Indicates the first The average amplitude of each sampling point across all samples and channels. This indicates the number of samples, i.e., the number of signal sequences input simultaneously. This indicates the number of channels, that is, the number of independent signal channels in each sample. Indicates the first The sample, the first The first channel in the The amplitude at each sampling point; a batch can contain multiple sampling points.
[0077] To avoid DC component interference, Set to zero. Arrange the average amplitudes along the time dimension, perform a fixed-dimensional Discrete Fourier Transform (DFT) on the time-series average amplitudes to obtain the spectrum analysis results, and select the one with the largest amplitude from the spectrum analysis results. Frequency point index Calculate the corresponding set of periods (i.e., periodic characteristics): (10); in, Indicates the first Frequency point index, For periodic sets .
[0078] The calculation process consists entirely of ONNX static operators such as matrix multiplication, squaring, square root, and Top-K, without the need for custom DFT nodes. It can be run directly on backends such as RKNN and TensorRT after the model is exported, achieving consistent periodicity detection across platforms.
[0079] (ii) Two-dimensional static timing reconstruction.
[0080] To map a one-dimensional signal into a static two-dimensional structure, this embodiment is based on the period. Perform zero-padding and rearrangement operations on the signal to make the length It is divisible by the period. The length after zero padding and the two-dimensional reconstruction are defined as follows: (11); in, Indicates the current period The two-dimensional reconstruction matrix below shows that the row dimension corresponds to time segments and the column dimension corresponds to sampling points within a single period. This represents the time series after zero padding. This indicates a zero-padding operation. This represents the total length after padding, used to ensure that the signal length can be periodically measured. Divisible This represents the modulo operation. This represents a two-dimensional reconstruction operation. The reconstruction process fixes the input and output dimensions during the graph construction phase, thus avoiding dynamic shape issues.
[0081] (III) Generation of periodic mask matrix.
[0082] To eliminate the impact of zero-padding regions on feature learning, this embodiment further generates a periodic mask matrix. Used to identify the valid range: (12); in, Indicates row index, Indicates column index, Indicates the period In the mask matrix below, the first line, number The values that a column element can take.
[0083] During the training and inference phases, the system uses a unified approach. As a two-dimensional input, it enables explicit separation of periodic information and optimization of sparse computation. This mask matrix is written into the ONNX graph structure during the derivation stage as a fixed constant node, ensuring consistency of computation across various hardware platforms.
[0084] (iv) Multi-period mapping and output interface.
[0085] For sets All cycles Repeat the above reconstruction and mask generation process to form periodic feature pairs. .
[0086] These features are written into the ONNX computation graph with fixed dimensions during the export phase, and at runtime, the CPU performs periodic detection and mask generation, while the GPU performs convolutional feature extraction for the corresponding period in parallel. Because The module is determined during graph construction, and all input tensor shapes are fixed. Therefore, the module and the subsequent static mixed expert convolution network implementation period correspond to the structure mapping of one expert, and provides a unified input basis for subsequent algorithm-deployment integrated inference.
[0087] (4) Convolutional feature learning and fault recognition module.
[0088] The module is the core part of the entire model, as shown in Figure 3 The embodiment constructs a static mixed expert (Static-MoE) convolutional feature learning framework (i.e., a static mixed expert convolutional network model) on the basis of a two-dimensional time series reconstruction tensor, including a routing network and a shared network. The routing network is composed of multiple experts, each expert is composed of an Inception module, a GELU, and an Inception module in series, and the shared network includes a group of Inception modules, a GELU, and an Inception module. It is assumed that a candidate period set has been obtained in the training / exporting stage according to the fixed dimension Fourier transform and the main period screening, wherein the number of experts is consistent with the number of DFT components, i.e. and is solidified as a constant during exporting. All experts are calculated simultaneously during inference, and the input / output shapes are consistent, without involving conditional control flow or dynamic routing. The gating weight is generated by a static differentiable tensor operator, and the final output is a linear weighted sum of the results of each expert, thereby ensuring the complete staticization of the computation graph and the cross-backend portability. The Inception module structure is a multi-scale convolution kernel, and an Inception module often contains multiple scales of convolution kernels such as 1x1 convolution kernel, 3x3 convolution kernel, and 5x5 convolution kernel. The convolution can adopt a depth separable convolution, which separates the traditional convolution operation, first performs single-channel convolution operation, and then performs channel mapping to achieve the purpose of reducing the number of parameters.
[0089] The static MoE fusion adopts a static mode of full-expert parallelism and continuous gating: (13); The gating weight can be driven by the frequency domain amplitude or generated by a lightweight gating network. To highlight the period-expert correspondence, the embodiment adopts amplitude-driven Softmax: (14); wherein, is a temperature coefficient, and is solidified as a constant during the exporting stage to ensure numerical consistency, represents the output result of the shared network, represents the output result of the i-th expert, denotes the gating weight corresponding to the expert, denotes the two-dimensional reconstruction matrix under the period , denotes the mask matrix under the period , denotes the amplitude of the input time sequence at the main frequency point index , denotes the amplitude of the input time sequence at the frequency point index , denotes the absolute value operation, denotes element-wise multiplication.
[0090] target feature vector generated by the fully connected neural network , i.e., the reconstruction result of the input signal . The model training stage takes the mean square error (MSE) minimization as the optimization objective to obtain the reconstruction error. In the inference stage, fault judgment is performed according to the thresholding result of the reconstruction error, i.e., when the reconstruction error is greater than the threshold, it is determined as a fault, otherwise it is determined as normal (i.e., when the reconstruction error is less than or equal to the threshold, it is determined as normal). Since E and k are fixed before derivation, and formula (13) and formula (14) only contain tensor algebra operations, the overall network maintains a completely static topology on ONNX / RKNN / TensorRT.
[0091] After completing the design of the above-mentioned static mixed expert convolution feature extraction framework, in order to further improve the precision retention and robustness of the model in the process of low-bytes embedded deployment, the embodiment introduces a quantization aware training mechanism (Quantization Aware Training, QAT) in the model training stage, as shown in Figures 4 to 6 . This mechanism explicitly simulates the quantization process of weights and activations during training, allowing the network to adapt to the precision disturbance caused by fixed-pointing in advance while maintaining end-to-end derivability. On this basis, in order to enhance the quantization robustness and deployment performance, the embodiment further introduces a per-expert-per-channel period-sensitive quantization mechanism (PSQF) in the quantization-aware training of convolution weights.
[0092] On the basis of quantization-aware training, the quantization step is expanded to (expert , channel ): (15); wherein denotes the initial quantization step, quantization range coefficient, denotes the expert in the channel average frequency domain amplitude, denotes the maximum value in the average frequency domain amplitude set of all experts-channels, denotes a stability constant, usually ( ), denotes a nonlinear decay coefficient, denotes the number of selected frequency points, denotes the frequency point index. The quantization weight obtained through the periodic sensitive quantization perception mechanism is taken as the real weight for subsequent deployment. It should be noted that the quantization perception training mechanism (QAT) of the present embodiment is a training mechanism known to those skilled in the art, and only the quantization step in the quantization perception training mechanism is expanded in the present embodiment, so it is called the periodic sensitive quantization mechanism (PSQF).
[0093] (5) Embedded model deployment module.
[0094] To realize the real-time diagnosis of the model in the vehicle-mounted edge device, the present embodiment proposes a lightweight embedded implementation framework integrating algorithm and deployment (as shown in Figure 7 ). The framework maintains the consistency of the calculation topology structure in the model training, export and inference stages, realizes the whole-link optimization from periodic feature extraction to embedded operation. The overall process takes fixed dimension DFT matrix calculation, periodic mask generation, periodic sensitive quantization perception mechanism (PSQF) and CPU-GPU heterogeneous collaborative inference as the core technical links, and establishes a unified mapping between the algorithm structure and the hardware deployment.
[0095] In the training stage, the system performs periodic sensitive quantization perception training on the convolution channels of each expert in the static mixed expert (Static-MoE) convolutional neural network model according to formula (15), and establishes an adaptive mapping relationship between the frequency domain amplitude and the weight quantization step, so that the model can still maintain a high-fidelity expression of periodic characteristics after low-bit quantization. After training, the weights and gating parameters are written into the ONNX computation graph in a static form in the export stage. It should be noted that the model of the present embodiment refers to the static mixed expert convolutional neural network model.
[0096] In the model export stage, the present embodiment directly uses fixed dimension DFT real and imaginary matrices to realize periodic detection, avoiding the use of any dynamic DFT operator. The system solidifies and as constant nodes when exporting, so that the Fourier transform, amplitude calculation and Top-K frequency selection process all exist in the form of static matrix multiplication, square, square root and index operation. The periodic set obtained by detection , corresponding two-dimensional reconstructed tensor and a mask matrix The export mechanism is combined by ONNX native operators without custom operators, and can be directly deployed on TensorRT and RKNN backends.
[0097] In the running phase, the system adopts a CPU-GPU heterogeneous collaborative inference mechanism: the periodic feature extraction, two-dimensional time series reconstruction, and mask generation module are executed on the CPU side to take advantage of its general computing and data management; the convolution expert branch and the gating fusion calculation are run in parallel on the GPU side, i.e., the static mixed expert convolution network model is executed on the GPU side to fully utilize parallel computing power. The CPU and GPU achieve data transmission and overlapping execution of task scheduling through an asynchronous memory queue, ensuring that the system completes the diagnosis calculation of multi-periodic features within a millisecond-level time delay. Specifically, after completing the convolution diagnosis calculation of multi-periodic features, the system outputs the reconstructed result of the input signal In the end-side inference process, the system calculates the reconstruction error according to and uses it as a fault score for anomaly measurement. When the score is higher than a preset threshold, the system triggers a fault alarm, records the corresponding abnormal segment, or reports the diagnosis result; when the score is lower than the threshold, the system determines that it is running normally. It should be noted that the threshold of the present embodiment can be a value adjusted according to actual conditions, which is not limited in the present embodiment.
[0098] In summary, the present embodiment optimizes the algorithm design stage in combination with hardware constraints, and achieves consistency between the trained model and the deployed model in structure through the cooperation of periodic sensitive quantization, fixed dimension Fourier operator, periodic mask matrix, and heterogeneous inference mechanism, overcoming the problems of dynamic shape incompatibility and quantization precision degradation that may occur on existing embedded platforms, and providing an embedded intelligent diagnosis solution that can be cross-platform migrated, real-time, and stable for lithium-ion battery management systems.
[0099] (6) Overall workflow.
[0100] The overall implementation of the present embodiment mainly includes data acquisition and preprocessing, fixed dimension DFT and periodic mask generation, static mixed expert convolution feature extraction and fusion, model compression and embedded deployment, and online detection and threshold judgment.
[0101] Firstly, the system collects real-time operation data such as voltage, current, temperature, etc. from the battery management system (BMS), and performs standardization and filtering preprocessing to eliminate the dimensional differences and noise effects between different sensor quantities. Then, the frequency domain amplitude distribution of the signal is calculated using fixed dimension discrete Fourier transform (DFT), the main periodic components are determined through Top-K frequency selection, and the corresponding periodic mask matrix is generated to identify the effective time region, realizing the static mapping of one-dimensional time series to two-dimensional time sequence tensor.
[0102] On this basis, the system extracts multi-scale features within and between cycles through a static mixing expert convolutional network (Static-MoE). Each expert corresponds to a different cycle branch, and the gating weight is obtained by Softmax calculation of the frequency domain amplitude, realizing the unification of cycle selection and feature fusion. The convolutional weight is optimized in the training stage using a cycle-sensitive quantization perception mechanism (PSQF), so that the model still maintains the accuracy of feature expression after low-bit quantization. The optimized model is exported in ONNX format and converted to RKNN or TensorRT model for deployment on edge computing hardware platforms.
[0103] In the running stage, the system uses a CPU-GPU heterogeneous collaborative inference mechanism: the CPU is responsible for cycle detection, two-dimensional time sequence reconstruction and mask generation, and the GPU performs parallel convolution calculation and gating fusion of each expert, realizing millisecond-level low-latency online diagnosis. When the fault score exceeds the set threshold, the system automatically triggers an alarm and records the abnormal segment, thereby realizing real-time safety monitoring and early fault warning of the battery system.
[0104] Through the above technical solutions, the embodiment constructs a complete technical link from data acquisition, cycle feature modeling, two-dimensional reconstruction, convolution feature learning to lightweight deployment, realizes high-precision, low-latency and low-power operation of lithium-ion battery fault diagnosis, and can be widely applied to embedded intelligent diagnosis scenarios of new energy vehicle battery management systems and energy storage systems.
[0105] (7) Application scenario description.
[0106] The lithium-ion battery fault diagnosis and embedded deployment method based on time series analysis of the embodiment can be widely applied to battery safety management scenarios of new energy vehicles, power energy storage systems and intelligent manufacturing equipment, and is especially suitable for real-time diagnosis tasks such as early internal short circuit detection, thermal runaway risk warning and sensor anomaly identification of batteries.
[0107] 1. On-line diagnosis of vehicle-mounted battery management system (Battery Management System, BMS).
[0108] The algorithm of the embodiment can be directly embedded into a vehicle-mounted BMS master control unit or a battery module management slave control board, and through interfacing with current, voltage and temperature sampling channels, real-time battery operation data can be received and online inference can be completed. When the system detects an anomaly, it can immediately send a warning signal to the vehicle control unit (VCU), realize millisecond-level thermal safety response and battery isolation protection, and effectively prevent the spread of thermal runaway.
[0109] 2. Battery Energy Storage System (BESS) operation monitoring.
[0110] For large-scale energy storage power stations, the algorithm of the embodiment can be deployed in an edge gateway or an industrial computing unit to realize distributed monitoring of multiple battery clusters. By analyzing the temperature and voltage fluctuation period characteristics of each cluster, the system can realize cross-cluster anomaly consistency recognition and multi-source early warning decision-making without affecting energy management control, ensuring the long-term stable operation of the energy storage system.
[0111] Through the above application scenarios, the embodiment has good applicability in the whole life cycle of power batteries, and unified algorithm framework and deployment mode can be realized from cell production, vehicle operation to operation and maintenance. The technology has the advantages of cross-platform compatibility, real-time detection, and scalable deployment, which can greatly improve the safety, reliability and operation intelligence level of lithium-ion battery systems.
[0112] Compared with the prior art, the technical solution of the embodiment has the following advantages: The most mature lithium-ion battery fault diagnosis method currently mainly includes model-based mechanism analysis method and data-driven deep learning method. The former has high accuracy in theory, but the modeling is complex and the real-time performance is poor; the latter has self-learning ability, but does not fully utilize the period characteristics of time series, and it is difficult to identify early internal short circuit and other weak abnormal signals.
[0113] The lithium-ion battery fault diagnosis and embedded deployment method based on time series analysis proposed in the embodiment combines fixed dimension DFT period analysis and two-dimensional convolution feature fusion for the first time, which not only accurately describes the dynamic characteristics of the battery operation process, but also realizes real-time diagnosis on embedded devices through lightweight model architecture design and model quantization. This method effectively overcomes the defects of large calculation amount and difficulty in deployment of traditional models, and provides a new scheme of high precision, low delay and landing for lithium-ion battery system safety monitoring and fault warning.
[0114] Reference Figure 8The embodiment of the application further provides a lithium ion battery fault diagnosis system based on time series analysis, which comprises a time series construction unit 801, a time series preprocessing unit 802, a periodic feature extraction unit 803, a time series reconstruction unit 804, an element-by-element multiplication unit 805, a feature vector obtaining unit 806, a reconstructed sequence generation unit 807 and a battery fault diagnosis unit 808, wherein: The time series construction unit 801 is configured to acquire a plurality of lithium ion battery signals of a lithium ion battery to be diagnosed, and construct the plurality of lithium ion battery signals into a time series, wherein the plurality of lithium ion battery signals comprise voltage, current and temperature. The time series preprocessing unit 802 is configured to preprocess the time series to obtain a preprocessed time series. The periodic feature extraction unit 803 is configured to extract periodic features based on the preprocessed time series. The time series reconstruction unit 804 is configured to reconstruct the preprocessed time series by using the periodic features to obtain a two-dimensional reconstruction matrix, and generate a mask matrix by using the periodic features. The element-by-element multiplication unit 805 is configured to multiply the two-dimensional reconstruction matrix and the mask matrix element by element to obtain an element-by-element multiplication result. The feature vector obtaining unit 806 is configured to input the element-by-element multiplication result into a trained static mixed expert convolutional network model to obtain a target feature vector. The reconstructed sequence generation unit 807 is configured to input the target feature vector into a full connection neural network to generate a target reconstructed sequence. The battery fault diagnosis unit 808 is configured to calculate a reconstruction error between the target reconstructed sequence and the preprocessed time series, perform fault diagnosis on the lithium ion battery to be diagnosed based on the reconstruction error, and obtain a fault diagnosis result.
[0115] It should be noted that the lithium ion battery fault diagnosis system based on time series analysis in the embodiment is based on the same inventive concept as the lithium ion battery fault diagnosis method based on time series analysis described above, and therefore the corresponding content in the method embodiment is also applicable to the system embodiment, which will not be described in detail here.
[0116] Reference Figure 9 The embodiment of the application further provides an electronic device, which comprises: at least one memory; at least one processor; at least one program; The program is stored in the memory, and the processor executes the at least one program to implement the lithium ion battery fault diagnosis method based on time series analysis described above.
[0117] The electronic device can be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a vehicle-mounted computer, and the like.
[0118] The electronic device of the embodiments of the present application is described in detail below.
[0119] The processor 1600 can be implemented in a general-purpose central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits, and the like, and is configured to execute related programs to implement the technical solutions provided by the embodiments of the present application. The memory 1700 can be implemented in a read only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM), and the like. The memory 1700 can store an operating system and other application programs. When the technical solutions provided by the embodiments of the present application are implemented by software or firmware, the related program codes are stored in the memory 1700 and are called and executed by the processor 1600 to implement the time series analysis based lithium ion battery fault diagnosis method of the embodiments of the present application.
[0120] The input / output interface 1800 is configured to implement information input and output. The communication interface 1900 is configured to implement communication interaction between the device and other devices. The communication can be realized by a wired manner (for example, a USB, a network cable, and the like) or a wireless manner (for example, a mobile network, WIFI, Bluetooth, and the like). The bus 2000 is configured to transmit information between various components (for example, the processor 1600, the memory 1700, the input / output interface 1800, and the communication interface 1900) of the device. The processor 1600, the memory 1700, the input / output interface 1800, and the communication interface 1900 are connected to each other by the bus 2000 to realize communication connection between them in the device.
[0121] The embodiments of the present application also provide a storage medium, which is a computer readable storage medium, and stores computer executable instructions for causing a computer to execute the above-mentioned time series analysis based lithium ion battery fault diagnosis method.
[0122] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory can include a high-speed random access memory and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory that is remotely disposed relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0123] The embodiments described in the embodiments of the present disclosure are used to more clearly illustrate the technical solutions of the embodiments of the present disclosure, and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. Those skilled in the art can know that, as technology evolves and new application scenarios appear, the technical solutions provided by the embodiments of the present disclosure are also applicable to similar technical problems.
[0124] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present disclosure, and can include more or fewer steps than those shown in the figures, or combine certain steps or different steps.
[0125] The device embodiments described above are only schematic, and units described as separate components can or can not be physically separate, i.e., can be located in one place or distributed over multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purposes of the embodiments.
[0126] Those skilled in the art can understand that all or some of the steps in the above disclosed method, the functional modules / units in the system and the device can be implemented as software, firmware, hardware and their appropriate combinations.
[0127] The terms "first", "second", "third", "fourth" and the like used in the specification of the present application and the above-described drawings (if any) are used to distinguish similar objects, and do not necessarily have to describe a particular order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0128] It should be understood that, in the application, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" is used to describe the association relationship of the associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases of only A, only B and A and B existing at the same time, wherein A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after it. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can represent a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b and c can be single or multiple.
[0129] In several embodiments provided in the application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of units is only a logical function division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0130] The units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, that is, they can be located in one place, or they can be distributed on multiple network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.
[0131] In addition, the functional units in each embodiment of the application can be integrated into a processing unit, or each unit can be physically present, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0132] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes multiple instructions for causing an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of each embodiment of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and various program storage media. The above embodiments of the present application are described in detail in combination with the drawings, but the present application is not limited to the above embodiments, and various changes can be made within the knowledge range of those skilled in the art without departing from the purpose of the present application.
Claims
1. A lithium-ion battery failure diagnosis method based on time series analysis, characterized by, The method comprises: acquiring a plurality of lithium ion battery signals of a lithium ion battery to be diagnosed, and constructing the plurality of lithium ion battery signals into a time sequence, wherein the plurality of lithium ion battery signals comprise voltage, current and temperature; preprocessing the time sequence to obtain a preprocessed time sequence; extracting a periodic feature based on the preprocessed time sequence; reconstructing the preprocessed time sequence through the periodic feature to obtain a two-dimensional reconstruction matrix, and generating a mask matrix through the periodic feature; element-wise multiplying the two-dimensional reconstruction matrix and the mask matrix to obtain an element-wise multiplication result; inputting the element-wise multiplication result into a trained static mixed expert convolutional network model to obtain a target feature vector; inputting the target feature vector into a fully connected neural network to generate a target reconstruction sequence; calculating a reconstruction error between the target reconstruction sequence and the preprocessed time sequence, and performing fault diagnosis on the lithium ion battery to be diagnosed based on the reconstruction error to obtain a fault diagnosis result. 2.The lithium-ion battery fault diagnosis method based on time series analysis of claim 1, wherein, The preprocessing of the time sequence to obtain a preprocessed time sequence comprises: standardizing the time sequence to obtain a standardized time sequence; inputting the standardized time sequence into an embedding layer to obtain embedding features, and taking the embedding features as the preprocessed time sequence. 3.The lithium-ion battery fault diagnosis method based on time series analysis of claim 1, wherein, The extraction of the periodic feature based on the preprocessed time sequence comprises: performing matrix rearrangement on the preprocessed time sequence to obtain a rearranged matrix; constructing a fixed-dimension real matrix and a fixed-dimension imaginary matrix based on the rearranged matrix; calculating an amplitude spectrum according to the real matrix and the imaginary matrix; calculating the average amplitude of each sampling point in all samples and channels according to the amplitude spectrum; arranging the average amplitude in the time dimension, performing fixed-dimension discrete Fourier transform on the average amplitude arranged in the time dimension to obtain a frequency spectrum analysis result; selecting a frequency point index corresponding to a plurality of amplitudes from the frequency spectrum analysis result, wherein the amplitudes are the maximum amplitude selected from the frequency spectrum analysis result, or the current maximum amplitude in the frequency spectrum analysis result after excluding the previously selected maximum amplitude; calculating a cycle set according to the sampling time sequence length and the frequency point index, and taking all cycles in the cycle set as the periodic feature. 4.The lithium-ion battery fault diagnosis method based on time series analysis of claim 1, wherein, The reconstruction of the preprocessed time sequence through the periodic feature to obtain a two-dimensional reconstruction matrix, and the generation of a mask matrix through the periodic feature comprise: zero-padding the preprocessed time sequence through the periodic feature to obtain a zero-padded time sequence and a total length of the zero-padded time sequence; performing a rearrangement operation on the zero-padded time sequence according to the periodic feature and the total length to obtain a two-dimensional reconstruction matrix; generating a mask matrix according to a row index, a column index and the periodic feature. 5.The lithium-ion battery fault diagnosis method based on time series analysis of claim 1, wherein, The trained static mixed expert convolutional network model comprises a shared network and a routing network, the routing network comprises a plurality of experts, the element-wise multiplication result is input into the trained static mixed expert convolutional network model to obtain a target feature vector, and the method comprises the following steps: inputting the element-wise multiplication result into the shared network to obtain an output result of the shared network; inputting the element-wise multiplication result into the routing network, and extracting features of the element-wise multiplication result by each expert in the routing network to obtain a plurality of feature vectors extracted by the experts; calculating a gating weight corresponding to each expert according to the amplitude of the preprocessed time series at the main frequency point index; performing weighted summation on the feature vectors extracted by each expert based on the gating weight to obtain an output result of the routing network; adding the output result of the shared network and the output result of the routing network to obtain the target feature vector. 6.The lithium-ion battery fault diagnosis method based on time series analysis of claim 1, wherein, In the step of inputting the element-wise multiplication result into the trained static mixed expert convolutional network model, the method further comprises the following steps: constructing a quantization step in the quantization-aware training as follows: ; wherein, denotes a quantization step size, denotes an initial quantization step size, denotes a quantization range coefficient, denotes an expert in a channel an average frequency domain amplitude, denotes a maximum value in a set of average frequency domain amplitudes for all experts and channels, denotes a number of experts, denotes a number of channels, denotes a stabilization constant, denotes a number of selected frequency points, denotes a set of periods, denotes a quantization weight at a frequency point index denotes an absolute value, denotes a non-linear decay coefficient; performing quantization-aware training on the static mixed expert convolutional network model based on the quantization step to obtain the trained static mixed expert convolutional network model. 7.The lithium-ion battery fault diagnosis method based on time series analysis of claim 1, wherein, Before obtaining the fault diagnosis result, the method further comprises the following steps: constructing the periodic feature extraction, the time series reconstruction, the mask generation, and the trained static mixed expert convolutional network model into an ONNX model; exporting the ONNX model and deploying the ONNX model to an edge hardware platform, the edge hardware platform comprising a CPU end and a GPU end; when the ONNX model is running, the periodic feature extraction, the time series reconstruction, and the mask generation are executed on the CPU end, and the trained static mixed expert convolutional network model is executed on the GPU end.
8. A lithium-ion battery failure diagnosis system based on time series analysis, characterized by, The system comprises: a time series construction unit configured to acquire a plurality of lithium ion battery signals of a lithium ion battery to be diagnosed, and construct the plurality of lithium ion battery signals into a time series, the plurality of lithium ion battery signals comprising voltage, current, and temperature; a time series preprocessing unit configured to preprocess the time series to obtain a preprocessed time series; a periodic feature extraction unit configured to extract periodic features based on the preprocessed time series; a time series reconstruction unit configured to reconstruct the preprocessed time series based on the periodic features to obtain a two-dimensional reconstruction matrix, and generate a mask matrix based on the periodic features; an element-wise multiplication unit configured to perform element-wise multiplication on the two-dimensional reconstruction matrix and the mask matrix to obtain an element-wise multiplication result; a feature vector obtaining unit configured to input the element-wise multiplication result into a trained static mixed expert convolutional network model to obtain a target feature vector; a reconstructed sequence generating unit configured to input the target feature vector into a fully connected neural network to generate a target reconstructed sequence; The battery fault diagnosis unit is configured to calculate a reconstruction error between the target reconstruction sequence and the preprocessed time sequence, perform fault diagnosis on the lithium ion battery to be diagnosed based on the reconstruction error, and obtain a fault diagnosis result.
9. An electronic device, comprising: The computer readable storage medium stores computer executable instructions for causing a computer to perform the time series analysis based lithium ion battery fault diagnosis method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer executable instructions for causing a computer to perform the time series analysis based lithium ion battery fault diagnosis method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Lithium battery anomaly detection method integrating variational auto-encoder and dynamic normalization
CN115469227A
Intelligent reconstruction method for shock wave field data
CN117147031A
Lithium ion battery fault diagnosis method and system based on data driving
CN118671634A
Lithium ion battery fault diagnosis method based on voltage reconstruction
CN119044776A
Nerve implicit surface-based three-dimensional reconstruction method and related device
CN119131244A