Lithium ion battery fault diagnosis method based on voltage reconstruction
By building a TranAD network and a dynamic threshold judgment module, combining data window segmentation and batch processing, the problem of insufficient accuracy and real-time performance in lithium-ion battery fault diagnosis is solved, and high-precision and high-real-time fault diagnosis effect is achieved.
Patent Information
- Application Number
- CN202411156309.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-11-29
AI Technical Summary
The existing lithium-ion battery fault diagnosis methods are insufficient in terms of accuracy and real-time performance, especially when data quality requirements are strict, it is difficult to achieve high-precision and high-real-time fault prediction and diagnosis.
Using a voltage reconstruction method, by building a TranAD network, using attention mechanism and adversarial training, multimodal features are extracted, and fault diagnosis is performed through the dynamic threshold judgment module, combining data window segmentation and batch processing strategies to reduce memory Consumption, improve model generalization capabilities.
It realizes high accuracy and high real-time performance in lithium-ion battery fault diagnosis, improves the accuracy and robustness of the diagnosis, adapts to the dynamics of the data, and evaluates model performance through comprehensive evaluation indicators.
Smart Images

Figure CN119044776A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of new energy vehicle battery fault diagnosis, and specifically relates to a lithium-ion battery fault diagnosis method based on voltage reconstruction. Background Art
[0002] Against the backdrop of energy shortages and tightening greenhouse gas emission regulations, electric vehicles have received widespread attention. However, new energy vehicles are still facing problems such as low accuracy in mileage estimation, poor adaptability to all-weather application environments, difficulty in residual value assessment, and especially fire accidents caused by thermal runaway, which seriously restrict the rapid, healthy and sustainable development of the industry. Power batteries are the core of the energy system of new energy vehicles. The dynamic evolution of power battery performance and safety over time in all-weather environments is the key cause of the above problems in new energy vehicles. On the one hand, power batteries are prone to inconsistent single-cell performance under long-term complex dynamic working conditions, resulting in a rapid decrease in battery system capacity and life; on the other hand, as the battery life increases, its performance and safety margins change dynamically, and there are short-board batteries that are prone to thermal runaway, leading to serious safety problems such as fire. Therefore, achieving high-precision and high-real-time power battery fault diagnosis is of great significance to ensure the long-term, reliable and safe operation of new energy vehicles.
[0003] At present, there are mainly the following methods for fault diagnosis of lithium-ion batteries: threshold-based method, model-based method and data-driven method.
[0004] Threshold-based method: The threshold-based method is often used to diagnose over-voltage and under-voltage battery failures. The specific implementation method is to set a high voltage and low voltage threshold. When the actual voltage collected by the sensor is higher than the high threshold voltage or lower than the low threshold voltage, the battery is judged to be faulty. However, the threshold-based method cannot predict the occurrence of battery failure in advance, and it is difficult to determine the appropriate threshold in practical applications.
[0005] Model-based approach: The model-based approach is to identify and predict battery failures by building and applying mathematical or physical models of the battery. This approach usually requires a large amount of battery operation data to train the model so that the model can accurately capture the changes in battery performance over time. The advantage of the model-based approach is that it can provide more accurate fault diagnosis than threshold-based methods and can predict potential failures of the battery. However, this approach usually requires a large amount of data and complex algorithms, as well as a deep understanding of battery behavior. In addition, the accuracy and reliability of the model may be affected by data quality and battery aging.
[0006] Data-driven approach: The data-driven approach mainly analyzes the battery's operating data and uses statistical learning algorithms to find the characteristics and patterns of battery failures. This approach does not require the establishment of complex physical models and is therefore more flexible. However, the data-driven approach is less robust to abnormal data, and its prediction results may not be accurate enough when the data volume is insufficient or the data quality is poor.
[0007] Based on the defects of the above methods, there is an urgent need for a battery fault diagnosis method with high precision, high real-time and non-absolutely strict data quality requirements. Summary of the invention
[0008] In order to solve the above problems existing in the prior art, the present invention provides a lithium-ion battery fault diagnosis method based on voltage reconstruction. First, the voltage values collected by the sensor are processed in batches, and the original continuous voltage data are divided into a plurality of subsequences with equal window lengths in chronological order to ensure that the format can be input into the subsequent network for training and reconstruction; then, a voltage reconstruction TranAD network is constructed, and by using an attention-based sequence encoder, reasoning is quickly performed according to the broader time trend information in the data, and a self-adjusting mechanism based on the target score is used to realize multimodal feature extraction and adversarial training; then, the TranAD network trained with normal voltage data is used to reconstruct the voltage, and then the reconstructed voltage data is subtracted from the actual voltage data, and the difference is used for fault classification through a dynamic threshold judgment module.
[0009] The objective of the present invention is achieved through the following technical solutions:
[0010] A lithium-ion battery fault diagnosis method based on voltage reconstruction comprises the following steps:
[0011] S1. Raw data processing: Slice and process the raw voltage data collected by the sensor to ensure that the processed format can be input into the neural network for training;
[0012] S2. Construction of the TranAD network: Encode the complete sequence using the encoder, then pass it to two decoders to create its reconstruction and train the network;
[0013] S3. Automatic threshold setting: Dynamic threshold setting for the abnormal score s in step S2, and dividing normal vehicles and faulty vehicles according to the score size;
[0014] S4. Evaluation index setting.
[0015] Furthermore, the step S1 comprises:
[0016] S11. Define the time series window size and divide the original data into windows;
[0017] S12. Process the window - partitioned data in batches and convert it into a data format that can be input into a neural network for training.
[0018] Further, the step S11 includes:
[0019] Determine the input window dimension W. If the data label i to be filled is less than the window dimension W, fill the first W - i data with the initial value of the original data. If the data label i to be filled is greater than the window dimension W, perform sequential filling.
[0020] If the original data set is expressed as X = [x0, x1, x2, …, x n , the window - splitting process is as follows:
[0021] If i < W, the i - th window W i = [x0, …, x0, …, x i-1 , x i , the first W - i data are filled with the initial value x0 of the original data, and the last i windows are sequentially filled from x1 to x i ;
[0022] If i > W, the i - th window W i = [x i-w , …, x i-1 , x i , and the data inside the window are sequentially filled from x i-w to x i .
[0023] Further, the step S12 includes:
[0024] Perform dimensional transformation on the data of each batch, transform the matrix data of batch number × window dimension into a matrix of window dimension column × batch number row, and select the last column element of the transformed matrix and use it as the input to be passed to the model.
[0025] Further, the step S2 includes:
[0026] S21. Build the TranAD network. The TranAD network consists of two Transformer encoders and two decoders, and consider model inference in two stages:
[0027] S211. Generate an approximate reconstruction of the input window in the first stage:
[0028] Concatenate the zero vector with the complete sequence and convert it into a matrix form with modality m, then apply positional encoding to obtain the input of the first encoder, denoted as I1. The first encoder performs the following operations:
[0029]
[0030] Among them, MultiHeadAtt(I1,I1,I1) represents the multi-head attention operation on I1, LayerNorm represents the layer normalization operation, and + represents matrix addition;
[0031] The above operation uses the input time series window and the full sequence to generate attention weights to capture the temporal trends in the input sequence;
[0032] For the second encoder, position encoding is applied to the input window W to obtain the input of the first encoder, which is recorded as I2. The second encoder performs the following operations:
[0033]
[0034] Among them, Mask means masking the window input to hide the window sequence of future timestamps in the same input batch;
[0035] Use two identical decoders to perform the following operations to obtain output values O1 and O2:
[0036]
[0037] S212. In the second stage, the reconstruction loss of the first decoder, namely ‖O1-W‖, is used as the target score, and the rest of the calculation process is the same as the first stage; ‖O1-W‖ indicates the deviation of the reconstructed output from the given input, which serves as a prerequisite for modifying the attention weights in the second stage;
[0038] S22. Use the voltage data of the normally operating vehicle, i.e. the normal voltage data, to train the constructed TranAD network:
[0039] The goal of both decoders is to reconstruct the input time series window independently, and the reconstruction loss of each decoder is defined based on the output of the first stage using the l2 norm:
[0040] L1=‖O1-W‖2
[0041] L2=‖O2-W‖2
[0042] The second encoder distinguishes the input window W and the loss ‖O1-W‖2 generated by the first decoder in the first stage by maximizing the difference; the purpose of the first decoder is to encourage the second decoder to generate the same output as O2 at this stage by minimizing ‖O1-W‖2, so the target loss function is expressed as follows:
[0043]
[0044] The above training process uses the voltage data of normally operating vehicles. For the data to be judged, the abnormal score s is defined as follows:
[0045]
[0046] Furthermore, the step S3 comprises:
[0047] S31. The part of the extreme value exceeding a certain threshold follows the generalized Pareto distribution, which can be expressed as:
[0048]
[0049] Among them, t is the threshold, x is the independent variable which follows the distribution F, and the variable exceeding the threshold t is recorded as Xt; the generalized Pareto distribution model has two parameters γ and σ, which are obtained by maximum likelihood estimation; the extreme value z of the independent variable set X q That is, the threshold for judging abnormality is calculated by the following formula:
[0050]
[0051] Where t is a fixed value, q is the expected probability, n is the total number of observations, and N t is the number of peaks;
[0052] S32. The dynamic threshold determination process is divided into two steps: initialization and dynamic update; during initialization, t and threshold z are calculated based on the existing data. q ; When dynamically updated, it will be greater than z q The data is considered abnormal, and the q The data between is considered as peak data and used to update the generalized Pareto distribution model and z q , data less than t is regarded as normal data and no processing is done.
[0053] Furthermore, in step S4, three evaluation indicators are set for fault diagnosis result analysis, namely precision, recall and F1 score; precision is used to measure the proportion of fault samples correctly identified by the model to actual fault samples, recall is used to measure the proportion of fault samples correctly identified by the model to all actual fault samples, and F1 score is used to comprehensively reflect the accuracy and robustness of the model; and then the above three evaluation indicators are weighted to obtain a comprehensive evaluation indicator Composite Score.
[0054] Furthermore, in step S4, TP is defined as the number of positive samples correctly identified; FP is defined as the number of falsely reported negative samples; TN is defined as the number of negative samples correctly identified; and FN is defined as the number of falsely reported positive samples.
[0055] The first evaluation indicator is precision, which is the proportion of samples predicted to be positive that are actually positive. The higher the precision, the fewer false positives the model produces. The indicator value range is 0 to 1. The precision calculation formula is as follows:
[0056]
[0057] The second evaluation indicator is the recall rate, which is the proportion of samples that are actually positive that are correctly predicted as positive. The higher the recall rate, the less likely the model misses true positive examples. The indicator value range is 0 to 1. The recall rate calculation formula is as follows:
[0058]
[0059] The third evaluation indicator is the F1 score, which is the harmonic mean of precision and recall. The higher the F1 score, the better the performance of the model. The indicator value range is 0 to 1. The calculation formula of the F1 score is as follows:
[0060]
[0061] Furthermore, in step S4,
[0062] The calculation formula of the comprehensive evaluation index Combined Score is as follows:
[0063] Combined Score=a×Precision+b×Recall+c×F1
[0064] a+b+c=1
[0065] Among them, a, b, c are linear weighting coefficients.
[0066] The present invention has the following beneficial effects:
[0067] 1. The present invention builds a voltage reconstruction TranAD network and obtains good diagnostic results under real vehicle data sets.
[0068] 2. The raw data processing part of the present invention adopts the strategy of data window segmentation and batch processing, which reduces the memory consumption during the training process, while better adapting to the dynamic nature of the data and improving the generalization ability of the model.
[0069] 3. The present invention innovatively introduces the concept of adversarial training in a two-layer transformer network, inputs the output of the first-layer encoder into the multi-head attention layer of the second-layer encoder, and inputs the output of the first-layer decoder into the first-layer encoder in the second stage of model reasoning, thereby improving the accuracy of the reconstructed voltage.
[0070] 4. Based on the existing extreme value theory, the present invention innovatively proposes a dynamic threshold setting method, which compares the difference between the reconstructed voltage and the actual voltage with the threshold to perform fault diagnosis.
[0071] 5. The present invention sets three indicators: precision, recall and F1 score, and weights them to evaluate the performance of the model from multiple angles. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 This is a flow chart of a lithium-ion battery fault diagnosis method based on voltage reconstruction according to an embodiment of the present invention;
[0073] Figure 2 Schematic diagram of the original data processing process described in an embodiment of the present invention;
[0074] Figure 3 Schematic diagram of the TranAD network principle described in an embodiment of the present invention;
[0075] Figure 4 Schematic diagram of the dynamic threshold setting principle in an embodiment of the present invention. DETAILED DESCRIPTION
[0076] The specific implementation scheme of the present invention is further described in detail below. In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, please refer to the accompanying drawings. According to the following description, the advantages and features of the present invention will be clearer, so that those skilled in the art can understand the present invention. It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the limiting conditions for the implementation of the present invention, so they have no technical substantive significance. In addition, the present invention is not limited to the scope of the specific implementation scheme. For those skilled in the art, as long as the various changes are within the spirit and scope of the present invention defined and determined by the attached claims, all inventions and creations using the concept of the present invention are protected.
[0077] Example
[0078] like Figure 1 As shown, this embodiment is a lithium-ion battery fault diagnosis method based on voltage reconstruction, comprising the following steps:
[0079] S1. Raw data processing: The raw voltage data collected by the sensor is segmented and processed to ensure that the processed format can be input into the neural network for training, such as Figure 2 shown.
[0080] S11. Define the time series window size and divide the original data into windows:
[0081] Determine the input window dimension. In this embodiment, the window dimension W = 10 is taken. If the data label i to be filled is less than the window dimension W, the first W - i data are filled with the initial value of the original data. If the data label i to be filled is greater than the window dimension W, sequential filling is performed;
[0082] If the original data set is expressed as X = [x0, x1, x2, …, x n , the window splitting process is described as follows:
[0083] If i < W, the i-th window W i = [x0, …, x0, …, x i-1 , x i , the first W - i data are filled with the initial value x0 of the original data, and the last i windows are sequentially filled from x1 to x i ;
[0084] If i > W, the i-th window W i = [x i-w , …, x i-1 , x i , and the data inside the window are sequentially filled from x i-w to x i .
[0085] S12. Process the data divided into windows in batches and process them into a data format that can be input into the neural network for training:
[0086] In this embodiment, the batch Batch = 128 is taken, that is, each batch contains 128 windows;
[0087] Perform dimensional transformation on the data of each batch. Transform the matrix data of 128 columns (number of batches) × 10 rows (window dimension) into 10 columns × 128 rows, and select the last column element of the transformed matrix and pass it as input to the model.
[0088] S2. Construction of the TranAD network: Use the encoder to encode the complete sequence, and then pass it to two decoders to create its reconstruction until the current timestamp with the target score is trained.
[0089] S21. Build the TranAD network, as Figure 3 shown:
[0090] The TranAD network consists of two Transformer encoders and two decoders, and the model inference is considered in two stages:
[0091] S211. Generate an approximate reconstruction of the input window in the first stage:
[0092] The zero vector is concatenated with the complete sequence and converted into a matrix with mode m. Then, position encoding is applied to obtain the input of the first encoder, which is recorded as I1. The first encoder performs the following operations:
[0093]
[0094]
[0095] Among them, MultiHeadAtt(I1,I1,I1) represents the multi-head attention operation on I1, LayerNorm represents the layer normalization operation, and + represents matrix addition. The above operation uses the input time series window and the complete sequence to generate attention weights to capture the time trend in the input sequence;
[0096] For the second encoder, position encoding is applied to the input window W to obtain the input of the first encoder, which is recorded as I2. The second encoder performs the following operations:
[0097]
[0098] Among them, Mask means masking the window input to hide the window sequence of future timestamps in the same input batch, so that the model has a greater ability to utilize the information of the previous and next time series;
[0099] Use two identical decoders to perform the following operations to obtain output values O1 and O2:
[0100]
[0101] S212. In the second stage, the reconstruction loss of the first decoder, i.e., ‖O1-W‖, is used as the target score, and the rest of the calculation process is the same as the first stage; ‖O1-W‖ indicates the deviation of the reconstructed output from the given input, which serves as a prerequisite for modifying the attention weights in the second stage and provides higher neural network activations for specific input subsequences to extract short-term temporal trends.
[0102] This two-stage autoregressive inference method amplifies biases, prevents false positives by capturing short-term temporal trends in the Window Encoder, and uses adversarial training to improve generalization, making the model robust to different input sequences.
[0103] S22. Use the voltage data of the normally operating vehicle, i.e. the normal voltage data, to train the constructed TranAD network:
[0104] The goal of both decoders is to reconstruct the input time series window independently. Here, the reconstruction loss of each decoder is defined based on the output of the first stage using the l2 norm:
[0105] L1=‖O1-W‖2
[0106] L2=‖O2-W‖2
[0107] The second encoder distinguishes the input window W from the loss ‖O1-W‖2 generated by the first decoder in the first stage by maximizing the difference. In other words, since the input window W is fixed, the second decoder minimizes the loss ‖O1-W‖2 generated in the first stage by maximizing the difference; the purpose of the first decoder is to encourage the second decoder to generate the same output as O2 at this stage by minimizing ‖O1-W‖2, so the target loss function can be expressed as follows:
[0108]
[0109] The above training process uses the voltage data of normally operating vehicles. The abnormal score for the data to be judged is defined as follows:
[0110]
[0111] S3. Automatic threshold setting: Dynamic threshold setting is performed on the abnormal score s described in step S2, and then normal vehicles and faulty vehicles are divided according to the size of the score.
[0112] S31. Extreme Value Theory (EVT) has proven that the part of the extreme value exceeding a certain threshold follows the generalized Pareto Distribution (GPD), which can be expressed as:
[0113]
[0114] Where t is the threshold, x is the independent variable which follows the distribution F, and the variable exceeding the threshold t is recorded as Xt. The GPD distribution model has two parameters γ and σ, which can be obtained by maximum likelihood estimation. The extreme value z of the independent variable set X q It can be calculated by the following formula, and the extreme value is the threshold for judging abnormality:
[0115]
[0116] Where t is a fixed value, in this example, the 98% quantile of the initialization data is taken, q is the expected probability, n is the total number of observations, and N t is the number of peaks.
[0117] like Figure 4 As shown, S32. The dynamic threshold determination process is divided into two steps: initialization and dynamic update; during initialization, t and threshold z are calculated based on the existing data.q ; When dynamically updated, it will be greater than z q The data is considered abnormal, and the q The data between is considered as peak data and used to update the GPD model and z q , data less than t is regarded as normal data and no processing is done.
[0118] The dynamic update process regards data less than t as normal data according to the formula in step S31 and does not process it.
[0119] S4. Evaluation index setting: Three evaluation indexes are set for fault diagnosis result analysis, namely precision, recall and F1 score. Precision is used to measure the proportion of fault samples correctly identified by the model to the actual fault samples. Recall is used to measure the proportion of fault samples correctly identified by the model to all actual fault samples. F1 score is used to comprehensively reflect the accuracy and robustness of the model. By weighting the above three evaluation indexes, the composite evaluation index Composite Score is obtained. The score of the composite evaluation index can more comprehensively evaluate the performance of the model in fault diagnosis tasks.
[0120] Define TP as the number of positive samples correctly identified; FP as the number of false positive negative samples; TN as the number of negative samples correctly identified; FN as the number of false positive positive samples;
[0121] The first evaluation indicator is precision, which is the proportion of samples predicted to be positive that are actually positive. It focuses on the model's ability to identify true positive examples. The higher it is, the fewer false positive examples the model will produce. The indicator value range is 0 to 1. The precision calculation formula is as follows:
[0122]
[0123] The second evaluation indicator is recall, which is the proportion of samples that are actually positive that are correctly predicted to be positive. It focuses on the model's ability to identify all true positive examples. The higher it is, the less true positive examples the model misses. The indicator value range is 0 to 1. The recall calculation formula is as follows:
[0124]
[0125] The third evaluation indicator is the F1 score, which is the harmonic mean of precision and recall. It attempts to balance precision and recall to reflect the performance of the model in practical applications. The higher the F1 score, the better the performance of the model. The indicator value range is 0 to 1. The calculation formula of the F1 score is as follows:
[0126]
[0127] In order to more comprehensively evaluate the performance of the model, the three evaluation indicators are linearly weighted to obtain the comprehensive evaluation indicator Combined Score. The calculation formula is as follows:
[0128] Combined Score=a×Precision+b×Recall+c×F1
[0129] a+b+c=1
[0130] Among them, a, b, c are linear weighting coefficients.
[0131] In the battery fault diagnosis task, the recall rate is usually more important because it measures the ability of the model to identify all actually existing faulty batteries. A high recall rate means that few faulty batteries are missed, which is crucial to ensure the safety of the battery system. Therefore, b = 0.5 is taken here.
[0132] High accuracy means that batteries flagged as faulty by the model are actually faulty with a high probability, which can reduce false positives and unnecessary battery replacements, saving cost and time.
[0133] The F1 score tries to find a balance between the two indicators, recall and precision, especially when the number of faulty batteries and non-faulty batteries is relatively balanced. In reality, the number of faulty batteries is much smaller than that of normal batteries. Therefore, the weight of the F1 score is set to the lowest, where c = 0.2 and a = 0.3.
[0134] In summary, the comprehensive performance of the system is evaluated by the Combined Score. The closer it is to 1, the better the effect of the battery fault diagnosis system.
Claims
1. A lithium-ion battery fault diagnosis method based on voltage reconstruction, characterized in that: The following steps are involved: S1. Raw data processing: Slice and process the raw voltage data collected by the sensor to ensure that the processed format can be input into the neural network for training; S2. Construction of the TranAD network: Encode the complete sequence using the encoder, then pass it to two decoders to create its reconstruction and train the network; S3. Automatic threshold setting: Dynamic threshold setting for the abnormal score s in step S2, and dividing normal vehicles and faulty vehicles according to the score size; S4. Evaluation index setting.
2. A lithium-ion battery fault diagnosis method based on voltage reconstruction as claimed in claim 1, characterized in that: The step S1 comprises: S11. Define the time series window size and divide the original data into windows; S12. Process the data divided into windows in batches and process them into a data format that can be input into a neural network for training.
3. A lithium-ion battery fault diagnosis method based on voltage reconstruction as claimed in claim 2, characterized in that: The step S11 comprises: Determine the input window dimension W. If the data number i to be filled is less than the window dimension W, fill the first Wi data with the initial value of the original data. If the data number i to be filled is greater than the window dimension W, fill it sequentially. If the original data set is expressed as X = [x0, x1, x2, ..., x n ], the window segmentation process is: If i < W, the i-th window W i = [x0, …, x0, …, x i-1 , x i , the first W - i data are filled with the initial value x0 of the original data, and the last i windows are filled sequentially from x1 to x i ; If i>W, the i-th window W i =[x i-w ,…,x i-1 ,x i ], the data inside the window is from x i-w Start filling to x i .
4. A lithium-ion battery fault diagnosis method based on voltage reconstruction as claimed in claim 3, characterized in that: The step S12 comprises: Transform the dimension of each batch of data, transform the matrix data of batch number × window dimension into window dimension column × batch number row, and select the last column of elements in the transformed matrix and pass it as input to the model.
5. A lithium-ion battery fault diagnosis method based on voltage reconstruction as claimed in claim 1, characterized in that: The step S2 comprises: S21.TranAD network construction,TranAD network consists of two Transformer encoders and two decoders, and considers model reasoning in two stages: S211. The first stage generates an approximate reconstruction of the input window: The zero vector is concatenated with the complete sequence and converted into a matrix with mode m. Then, position encoding is applied to obtain the input of the first encoder, which is recorded as I1. The first encoder performs the following operations: Among them, MultiHeadAtt(I1,I1,I1) represents the multi-head attention operation on I1, LayerNorm represents the layer normalization operation, and + represents matrix addition; The above operation uses the input time series window and the full sequence to generate attention weights to capture the temporal trends in the input sequence; For the second encoder, position encoding is applied to the input window W to obtain the input of the first encoder, which is recorded as I2. The second encoder performs the following operations: Among them, Mask means masking the window input to hide the window sequence of future timestamps in the same input batch; Use two identical decoders to perform the following operations to obtain output values O1 and O2: S212. In the second stage, the reconstruction loss of the first decoder, namely ‖O1-W‖, is used as the target score, and the rest of the calculation process is the same as the first stage; ‖O1-W‖ indicates the deviation of the reconstructed output from the given input, which serves as a prerequisite for modifying the attention weights in the second stage; S22. Use the voltage data of the normally operating vehicle, i.e. the normal voltage data, to train the constructed TranAD network: The goal of both decoders is to reconstruct the input time series window independently, and the reconstruction loss of each decoder is defined based on the output of the first stage using the l2 norm: L1=‖O1-W‖2 L2=‖O2-W‖2 The second encoder distinguishes the input window W and the loss ‖O1-W‖2 generated by the first decoder in the first stage by maximizing the difference; the purpose of the first decoder is to encourage the second decoder to generate the same output as O2 at this stage by minimizing ‖O1-W‖2, so the target loss function is expressed as follows: The above training process uses the voltage data of normally operating vehicles. For the data to be judged, the abnormal score s is defined as follows:
6. A lithium-ion battery fault diagnosis method based on voltage reconstruction as claimed in claim 1, characterized in that: The step S3 comprises: S31. The part of the extreme value exceeding a certain threshold follows the generalized Pareto distribution, which can be expressed as: Among them, t is the threshold, x is the independent variable which follows the distribution F, and the variable exceeding the threshold t is recorded as Xt; the generalized Pareto distribution model has two parameters γ and σ, which are obtained by maximum likelihood estimation; the extreme value z of the independent variable set X q That is, the threshold for judging abnormality is calculated by the following formula: Where t is a fixed value, q is the expected probability, n is the total number of observations, and N t is the number of peaks; S32. The dynamic threshold determination process is divided into two steps: initialization and dynamic update; during initialization, t and threshold z are calculated based on the existing data. q ; When dynamically updated, it will be greater than z q The data is considered abnormal, and the q The data between is considered as peak data and used to update the generalized Pareto distribution model and z q , data less than t is regarded as normal data and no processing is done.
7. A lithium-ion battery fault diagnosis method based on voltage reconstruction as claimed in claim 1, characterized in that: In step S4, three evaluation indicators are set for fault diagnosis result analysis, namely precision, recall and F1 score; precision is used to measure the proportion of fault samples correctly identified by the model to actual fault samples, recall is used to measure the proportion of fault samples correctly identified by the model to all actual fault samples, and F1 score is used to comprehensively reflect the accuracy and robustness of the model; and then the above three evaluation indicators are weighted to obtain a comprehensive evaluation indicator Composite Score.
8. A lithium-ion battery fault diagnosis method based on voltage reconstruction as claimed in claim 7, characterized in that: In step S4, TP is defined as the number of positive samples correctly identified; FP is defined as the number of falsely reported negative samples; TN is defined as the number of negative samples correctly identified; and FN is defined as the number of falsely reported positive samples. The first evaluation indicator is precision, which is the proportion of samples predicted to be positive that are actually positive. The higher the precision, the fewer false positives the model produces. The indicator value range is 0 to 1. The precision calculation formula is as follows: The second evaluation indicator is the recall rate, which is the proportion of samples that are actually positive that are correctly predicted to be positive. The higher the recall rate, the less likely the model misses true positive examples. The indicator value range is 0 to 1. The recall rate calculation formula is as follows: The third evaluation indicator is the F1 score, which is the harmonic mean of precision and recall. The higher the F1 score, the better the performance of the model. The indicator value range is 0 to 1. The calculation formula of the F1 score is as follows:
9. A lithium-ion battery fault diagnosis method based on voltage reconstruction as claimed in claim 8, characterized in that: In the step S4, The calculation formula of the comprehensive evaluation index Combined Score is as follows: Combined Score=a×Precision+b×Recall+c×F1 a+b+c=1, where a, b, c are linear weighting coefficients.
Citation Information
Cited By
Novel rural automatic water pumping system
CN119641603A
Lithium ion battery fault diagnosis method and system based on time sequence analysis
CN121348113A
Power battery abnormity identification method and device, vehicle and storage medium
CN121625807A
Lithium battery fault diagnosis method based on multi-scale streaming improved local outlier factor
CN122109891A
