Battery fault detection method and device, electronic equipment and storage medium
By acquiring the target strain data of individual battery cells, performing median difference processing and converting it into a grayscale image, and combining it with a visual Transformer model, the problem of low accuracy in battery fault detection in existing technologies is solved, achieving efficient and accurate battery fault detection.
Patent Information
- Application Number
- CN202511612799.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-06
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2045-11-06
AI Technical Summary
Existing battery fault detection methods rely solely on voltage data as a criterion, resulting in low accuracy and an inability to comprehensively detect battery faults.
By acquiring the target strain data of the battery cell, performing median difference processing to convert it into a grayscale image, and using the visual Transformer model to extract global and local features of the image, it is possible to determine whether the battery cell has failed.
It improves the accuracy of battery fault detection, can identify minor faults in individual battery cells, and achieves automation and high efficiency in battery fault detection.
Smart Images

Figure CN121069210A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power battery fault diagnosis technology, and in particular to a battery fault detection method, device, electronic device and storage medium. Background Technology
[0002] As a core component of electric vehicles, the health of the power battery directly affects the vehicle's safety performance and lifespan. During long-term operation, power batteries inevitably degrade or even malfunction, potentially leading to serious safety hazards such as thermal runaway and fire. Therefore, detecting potential faults in the power battery is crucial for ensuring the safe operation of electric vehicles.
[0003] Relevant battery fault detection methods typically use the voltage of a normal battery as a reference group, judging whether the battery voltage deviates from the reference group voltage and whether the deviation exceeds a preset threshold, as a standard for judging whether the battery has malfunctioned. However, this method, relying solely on voltage data as a standard for judging whether the battery has malfunctioned, cannot comprehensively detect battery faults, thus leading to low accuracy in battery fault detection. Summary of the Invention
[0004] In view of the above problems, battery fault detection methods, apparatus, electronic devices, and storage media are proposed to overcome or at least partially solve the above problems, including: In a first aspect, embodiments of this application provide a battery fault detection method applied to a vehicle, the vehicle including a battery cell, the method comprising: Obtain target strain data for any of the aforementioned battery cells, wherein the target strain data is the relative change in length, and the target strain data is the ratio of the change in length to the original length; The target strain data is subjected to median differencing to obtain median differencing strain data; The median differential strain data is converted into a grayscale image; The grayscale image is input into a pre-generated battery cell fault detection model to obtain fault detection result labels. The pre-generated battery cell fault detection model is a visual Transformer model, which has the ability to capture global dependency information of the image. Based on a self-attention mechanism, the global features and local features of the grayscale image are extracted from the input grayscale image. The fault detection result labels are determined based on the global features and local features of the grayscale image. If the fault detection result label is a preset first value, then the fault detection result of the battery cell is determined to be that the battery cell has failed. If the fault detection result label is a preset second value, then the fault detection result of the battery cell is determined to be that the battery cell has not failed.
[0005] Optionally, obtaining the target strain data of any one of the battery cells includes: Obtain the initial strain data of any one of the battery cells; The initial strain data is downsampled to obtain the target strain data.
[0006] Optionally, the downsampling process of the initial strain data to obtain the target strain data includes: For any preset time window, obtain the length of the time window and the initial strain data within the time window; The average value of the initial strain data is determined based on the length of the time window and the initial strain data within the time window; The average value of the initial strain data is used as the target strain data.
[0007] Optionally, the step of performing median differencing on the target strain data to obtain median differencing strain data includes: For any of the aforementioned time windows, acquire the target strain data within the time window; Determine the median value of the target strain data based on the target strain data; For any of the target strain data, median differential strain data is determined based on the target strain data and the median of the target strain data.
[0008] Optionally, converting the median differential strain data into a grayscale image includes: The median differential strain data is normalized to obtain the normalized median differential strain data. The normalized median difference strain data is converted into polar coordinates, wherein the polar coordinates include polar angles; Construct the target matrix based on the polar angle; The target matrix is converted into a grayscale image.
[0009] Optionally, the normalization process for the median differential strain data to obtain the normalized median differential strain data includes: The first target median differential strain data and the second target median differential strain data are determined based on the median differential strain data. For any of the aforementioned median differential strain data, the normalized median differential strain data is determined based on the median differential strain data, the first target median differential strain data, and the second target median differential strain data.
[0010] Optionally, the step of recognizing the grayscale image to obtain the fault detection result of the battery cell includes: The grayscale image is input into a pre-generated battery cell fault detection model to obtain fault detection result labels; If the fault detection result label is a preset first value, then the fault detection result of the battery cell is determined to be that the battery cell has failed. If the fault detection result label is a preset second value, then the fault detection result of the battery cell is determined to be that the battery cell has not failed.
[0011] Secondly, embodiments of this application provide a battery fault detection device applied to a vehicle, the vehicle including a battery cell, the device comprising: The data acquisition module is configured to acquire target strain data of any of the battery cells, wherein the target strain data is the relative change in length and the target strain data is the ratio of the change in length to the original length. The data processing module is configured to perform median difference processing on the target strain data to obtain median difference strain data; The data conversion module is configured to convert the median differential strain data into a grayscale image; The model processing module is configured to input the grayscale image into a pre-generated battery cell fault detection model to obtain a fault detection result label. The pre-generated battery cell fault detection model is a visual Transformer model, which has the ability to capture global dependency information of the image. Based on a self-attention mechanism, it extracts the global features and local features of the grayscale image from the input grayscale image, and determines the fault detection result label based on the global features and local features of the grayscale image. The first fault detection module is configured to determine that the fault detection result of the battery cell is a fault if the fault detection result label is a preset first value. The second fault detection module is configured to determine that the fault detection result of the battery cell is that the battery cell has not failed if the fault detection result label is a preset second value.
[0012] Optionally, the data acquisition module includes: The initial data acquisition submodule is configured to acquire the initial strain data of any of the battery cells. The downsampling processing submodule is configured to downsample the initial strain data to obtain the target strain data.
[0013] Optionally, the downsampling processing submodule includes: The initial strain data acquisition unit is configured to acquire the length of the time window and the initial strain data within the time window for any preset time window. The average value calculation unit is configured to determine the average value of the initial strain data based on the length of the time window and the initial strain data within the time window; The target strain data determination unit is configured to use the average value of the initial strain data as the target strain data.
[0014] Optionally, the data processing module includes: The target strain data acquisition unit is configured to acquire the target strain data within any given time window; A median processing unit is configured to determine the median of the target strain data based on the target strain data. The differential processing unit is configured to determine median differential strain data for any of the target strain data, based on the target strain data and the median of the target strain data.
[0015] Optionally, the data conversion module includes: The normalization processing submodule is configured to normalize the median differential strain data to obtain the normalized median differential strain data. The polar coordinate transformation submodule is configured to convert the normalized median difference strain data into polar coordinates, wherein the polar coordinates include polar angles; The matrix construction submodule is configured to construct the target matrix based on the polar angle; The image determination submodule is configured to convert the target matrix into a grayscale image.
[0016] Optionally, the normalization processing submodule includes: The target median differential strain data determination unit is configured to determine first target median differential strain data and second target median differential strain data based on the median differential strain data; The normalization processing unit is configured to determine the normalized median differential strain data based on the median differential strain data, the first target median differential strain data, and the second target median differential strain data for any of the median differential strain data.
[0017] Thirdly, embodiments of this application also provide an electronic device, including: a processor; and a memory for storing processor-executable instructions, wherein the processor is configured to execute the instructions to implement the battery fault detection method as described above.
[0018] Fourthly, embodiments of this application also provide a storage medium that, when the instructions in the storage medium are executed by the processor of an electronic device, enables the electronic device to perform any of the battery fault detection methods described above.
[0019] In this embodiment, target strain data of any battery cell is acquired, and median difference processing is performed on the target strain data to obtain median difference strain data. The median difference strain data is then converted into a grayscale image, and the grayscale image is recognized to obtain the fault detection result of the battery cell. This application introduces target strain data of battery cells, which can capture the dynamic mechanical characteristics of the battery cell during operation. Median difference processing of the target strain data effectively removes noise and highlights the changing trend of the target strain data. Converting the median difference strain data into a grayscale image improves the separability of faults. Finally, the grayscale image is recognized to obtain the fault detection result of the battery cell, enabling the identification of minor faults in the battery cell, thereby improving the accuracy of battery fault detection.
[0020] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0021] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a flowchart of the steps of a battery fault detection method provided in an embodiment of this application; Figure 2 This is a block diagram of a battery fault detection device provided in an embodiment of this application; Figure 3 This is a structural diagram of an electronic device provided in an embodiment of this application; Figure 4 This is a schematic diagram of a grayscale image provided in an embodiment of this application; Figure 5 This is one of the schematic diagrams provided in the embodiments of this application for detecting grayscale images; Figure 6 This is a second schematic diagram of a grayscale image detection method provided in the embodiments of this application. Detailed Implementation
[0022] Exemplary embodiments of the present application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this application will be thorough and complete, and will fully convey the scope of the present application to those skilled in the art.
[0023] The following detailed description, in conjunction with the accompanying drawings, of a battery fault detection method, apparatus, electronic device, and storage medium provided in this application, through specific embodiments and application scenarios, will be provided in detail.
[0024] Figure 1 This is a flowchart illustrating the steps of a battery fault detection method provided in an embodiment of this application, as follows: Figure 1 As shown, the method includes: Step 101: Obtain the target strain data of any single battery cell, wherein the target strain data is the relative change in length, and the target strain data is the ratio of the change in length to the original length.
[0025] Step 102: Perform median difference processing on the target strain data to obtain median difference strain data.
[0026] Step 103: Convert the median differential strain data into a grayscale image.
[0027] Step 104: Input the grayscale image into the pre-generated battery cell fault detection model to obtain the fault detection result label. The pre-generated battery cell fault detection model is a visual Transformer model. The visual Transformer model has the ability to capture global dependency information of the image. Based on the self-attention mechanism, it extracts the global features and local features of the grayscale image from the input grayscale image. Based on the global features and local features of the grayscale image, the fault detection result label is determined.
[0028] Step 105: If the fault detection result label is the preset first value, then the fault detection result of the battery cell is determined to be that the battery cell has failed.
[0029] Step 106: If the fault detection result label is the preset second value, then the fault detection result of the battery cell is determined to be that the battery cell has not failed.
[0030] In some embodiments of this application, the battery in the vehicle includes multiple battery modules, and each battery module includes multiple battery cells. Strain data refers to the relative change in length, where strain data = change in length / original length.
[0031] The target strain data of a battery cell refers to the data obtained after downsampling the initial strain data of the battery cell.
[0032] For any given battery cell, target strain data is acquired. To capture the dynamic mechanical properties of the battery cell, after acquiring the target strain data, median differencing is performed to obtain median differencing strain data.
[0033] In order to detect minute faults in individual battery cells, the median differential strain data can be converted into a two-dimensional grayscale image after the median differential strain data is acquired.
[0034] The pre-generated battery cell fault detection model can be a visual Transformer model, which is a classification model. This visual Transformer model has the ability to capture global dependency information of the image and can perform deep feature extraction on the input grayscale image based on the self-attention mechanism, including extracting global features and local features of the grayscale image, and then obtaining the classification output result corresponding to the grayscale image, that is, the fault detection result label.
[0035] After acquiring the grayscale image, the acquired grayscale image is used as input to the pre-generated battery cell fault detection model. The battery cell fault detection model can then automatically output fault detection result labels.
[0036] After obtaining the fault detection result label, the system determines whether a battery cell has failed, i.e., determines the fault detection result of the battery cell. The preset first value can be 1; if the fault detection result label is 1, it indicates that the battery cell has failed, and the fault detection result of the battery cell is determined to be faulty. The preset second value can be 0; if the fault detection result label is 0, it indicates that the battery cell has not failed, and the fault detection result of the battery cell is determined to be faultless.
[0037] In this grayscale image, each pixel represents the temporal phase relationship between two time periods, i.e., the dynamic change pattern of strain in a single battery cell at different time intervals. Bright areas (high grayscale) represent positive correlation (i.e., similar trends), while dark areas (low grayscale) represent negative correlation (i.e., opposite trends).
[0038] like Figure 5 As shown, the original image img1 has a stable grayscale distribution and uniform texture, indicating that the temporal characteristics of the strain data of the battery cell are normal. Therefore, the original image img1 is a grayscale image obtained based on the target strain data of a normal battery cell, and is a normal grayscale image. The original image img1 is used as input to a pre-generated battery cell fault detection model. The model performs deep feature extraction on the input original image img1, including extracting global and local features. Gradients are extracted from these features, and the average is calculated based on the weighted gradient strength. The weights are then back-mapped back to the input original image img1 to obtain a heatmap corresponding to img1, i.e., the img1 heatmap. Since brighter colors (displayed as red or yellow) in the heatmap contribute more to the battery cell fault detection model's judgment of battery cell failure,... Since the heatmap of img1 is almost entirely blue, the battery cell fault detection model believes that there are no obvious fault features in the heatmap of img1. The original image of img1 is a normal grayscale image, and the battery cell is in a healthy state. Therefore, it will output the fault detection result label 0, indicating that the battery cell has not failed.
[0039] like Figure 6 As shown, the original image img2 exhibits obvious blocky and abrupt textures, indicating that the temporal characteristics of the strain data of the battery cell have undergone abnormal changes. Therefore, the original image img2 is a grayscale image obtained based on the target strain data of the faulty battery cell, and is an abnormal grayscale image. The original image img2 is used as input to a pre-generated battery cell fault detection model. The model performs deep feature extraction on the input original image img2, including extracting global and local features. Gradients are extracted from these features, and a weighted average is calculated based on the gradient strength. The weights are then back-mapped back to the input original image img2 to obtain a heatmap corresponding to the original image img2, i.e., the img2 heatmap. Since brighter colors (displayed as red or yellow) in the heatmap contribute more to the battery cell fault detection model's judgment of battery cell failure, the heatmap is more effective. The obvious red and yellow blocks in the upper right and lower left corners of the img2 heatmap indicate that the time-series characteristics of the strain data in these areas are the most abnormal. The battery cell fault detection model will judge that the original image of img2 is an abnormal grayscale image based on these characteristics. If the battery cell fails, it will output the fault detection result label 1, indicating that the battery cell has failed.
[0040] Furthermore, the specific implementation process for identifying battery cell fault detection results from grayscale images can also be as follows: The grayscale image is preprocessed to obtain a preprocessed grayscale image, where preprocessing may include denoising, contrast enhancement, and image segmentation. Image features related to battery cell faults are extracted from the preprocessed grayscale image, where image features may include edge features, texture features, and geometric features. The extracted image features are compared with preset thresholds. If the extracted image features exceed the preset threshold, the battery cell is determined to be faulty; if the extracted image features are below the preset threshold, the battery cell is determined not to be faulty.
[0041] This application introduces target strain data of individual battery cells, which captures the dynamic mechanical characteristics of the cells during operation. Median difference processing of the target strain data effectively removes noise and highlights the changing trends. The median-differenced strain data is then converted into a grayscale image to improve fault separability. Finally, the grayscale image is used to identify the fault detection results of the individual battery cells, enabling the identification of even minor faults and improving the accuracy of battery fault detection. Furthermore, by inputting the grayscale image into a pre-generated battery cell fault detection model, this application automates battery cell fault detection, reducing manual intervention and improving efficiency. Additionally, by using preset first and second values as fault detection result labels, this application clarifies the criteria for determining whether a battery cell has failed or not, ensuring the clarity and consistency of the battery cell fault detection results.
[0042] Furthermore, in some embodiments of this application, step 101 may also include the following steps: Step 1011: Obtain the initial strain data of any single battery cell.
[0043] Step 1012: Downsample the initial strain data to obtain the target strain data.
[0044] In some embodiments of this application, strain gauges are pre-attached to each battery cell. For any given battery cell, initial strain data is acquired using the strain gauges. After acquiring the initial strain data, the initial strain data is downsampled; the downsampled initial strain data is then used as the target strain data.
[0045] In addition, after obtaining the initial strain data of all battery cells, a power battery database can be established based on the initial strain data of all battery cells.
[0046] This application downsamples the initial strain data of individual cells, which not only effectively reduces the amount of initial strain data but also preserves the main characteristics of the initial strain data, making subsequent strain data processing and analysis more efficient and reducing the consumption of computing resources.
[0047] Furthermore, in some embodiments of this application, step 1012 may also include the following steps: Sub-step 11: For any preset time window, obtain the length of the time window and the initial strain data within the time window.
[0048] Sub-step 12: Determine the average value of the initial strain data based on the length of the time window and the initial strain data within the time window.
[0049] Sub-step 13: Use the average value of the initial strain data as the target strain data.
[0050] In some embodiments of this application, downsampling refers to reducing the sampling frequency. For example, if w data points were originally collected over a period of time, now only one data point is used instead. This one data point is equal to the average of the w data points originally collected.
[0051] The specific implementation process for downsampling the initial strain data to obtain the target strain data is as follows: A time window is preset. For any preset time window, the length of the time window and the initial strain data within the time window are acquired. Based on the length of the time window and the initial strain data within the time window, the average value of all initial strain data within the time window is calculated to obtain the average value of the initial strain data. After obtaining the average value of the initial strain data, this average value is used as the target strain data.
[0052] The formula for downsampling is shown in formula (1): Formula (1) in, For time window, For the first A time window, For initial strain data, For the first The average value of the initial strain data within each time window The length of the time window, For the first The first time window Initial strain data.
[0053] For example: if the length of the time window is 3, and the initial strain data are 1, 2, 3, 4, 5, and 6, then the average value of all the initial strain data within the first time window can be calculated using the above formula (1). The average value of all initial strain data within the second time window is: In this way, the average value of one initial strain data point can replace the original three initial strain data points, thus completing the downsampling process for the initial strain data.
[0054] This application uses the average value of the initial strain data as the target strain data, that is, it replaces multiple initial strain data within the original time window with the average value of one initial strain data. This can effectively reduce the redundancy of the initial strain data, while preserving the overall trend and characteristics of the initial strain data, thereby improving the stability and reliability of the initial strain data.
[0055] Furthermore, in some embodiments of this application, step 102 may also include the following steps: Step 1021: For any given time window, acquire the target strain data within that time window.
[0056] Step 1022: Determine the median of the target strain data based on the target strain data.
[0057] Step 1023: For any target strain data, determine the median differential strain data based on the target strain data and the median of the target strain data.
[0058] In some embodiments of this application, the specific implementation process of performing median differencing on target strain data to obtain median differencing strain data is as follows: For any given time window, acquire all target strain data within that time window. After acquiring all target strain data within the time window, sort all target strain data in ascending order (or descending order). After sorting, acquire the count of all target strain data. If the count of all target strain data is odd, the median value of the target strain data is the middle target strain data. If the count of all target strain data is even, the median value of the target strain data is the average of the two middle target strain data. For any target strain data within the time window, perform a difference operation between the target strain data and the median value of the target strain data to obtain the median differencing strain data.
[0059] The formulas for median differencing are shown in formulas (2) and (3): Formula (2) Where T is the time window, For the first A time window, For the first The median of all target strain data within each time window, where CMP is a sequence of the medians of all target strain data within each time window.
[0060] Formula (3) Where U is the first Any target strain data within a time window For the first The median of all target strain data within a time window The preset scaling parameters, Let CDP be the standard deviation of all target strain data, and CDP be the standard deviation for the first target strain data. The median differential strain data is calculated from any target strain data within a time window.
[0061] This application enhances the robustness of target strain data by calculating the median of the target strain data and removing outliers and noise. Furthermore, by calculating the difference between each target strain data point and its median, this application quantifies the deviation of each target strain data point from the median, facilitating the analysis of fluctuations and anomalies in the target strain data.
[0062] Furthermore, in some embodiments of this application, step 103 may also include the following steps: Step 1031: Normalize the median differential strain data to obtain normalized median differential strain data.
[0063] Step 1032: Convert the normalized median difference strain data into polar coordinates, where the polar coordinates include polar angles.
[0064] Step 1033: Construct the target matrix based on the polar angle.
[0065] Step 1034: Convert the target matrix into a grayscale image.
[0066] In some embodiments of this application, time-series data is encoded into a two-dimensional image using the GADF (Gramian Angular Difference Field) method, preserving the temporal dependencies and sequence structure of the original data. By analyzing the texture and patterns of the image, anomalies and regularities in the original time-series data can be more easily identified.
[0067] The specific implementation process of converting median differential strain data into a grayscale image is as follows: The median differential strain data is normalized to obtain normalized median differential strain data. GADF is used to convert the normalized median differential strain data into a grayscale image. The normalized median differential strain data is converted into polar coordinates according to the following formula (4). A two-dimensional Gram matrix is constructed based on the polar angle in the polar coordinates. The constructed two-dimensional Gram matrix is the target matrix, as shown in formula (5). The values in any row and column of the target matrix are converted into grayscale values according to the following formula (6). After all values in the target matrix are converted into grayscale values, a grayscale image is generated based on all the grayscale values.
[0068] Formula (4) in, For the first The normalized median difference strain data, where arccos is the inverse trigonometric cosine function. For the first The polar angle of the normalized median difference strain data in the polar coordinate system, ranging from 0 to π. For the first The timestamp or index corresponding to the normalized median difference strain data. The total length of the normalized median difference strain data. This represents the radial component in polar coordinates.
[0069] Formula (5) Where GADF is the target matrix. For the first The polar angle of the normalized median difference strain data in the polar coordinate system.
[0070] Formula (6) in, For the first in the target matrix Line 1 The column's values, where `int` represents floor function, are used to convert floating-point grayscale values to image pixel grayscale values. For the first in the target matrix Line 1 The grayscale value corresponding to the column's values.
[0071] One possible implementation process for converting median differential strain data into a grayscale image is as follows: Normalize the median differential strain data to the range [0, 1] to obtain normalized median differential strain data. Map the normalized median differential strain data to the pixel value range (0-255) of the grayscale image. Fill the pixel values into the image matrix to generate the grayscale image.
[0072] Furthermore, steps 1031-1034 are illustrated with examples, the details of which are as follows: If the median differential strain data are 23.207, 27.228, 27.035, and 28.279, and these median differential strain data are normalized respectively, the normalized median differential strain data are 0.14276, 0.167495, 0.166308, and 0.173961.
[0073] The normalized median difference strain data were converted into polar coordinates, each containing a polar angle. The polar angles in these polar coordinates were 2.51185, 2.50209, 2.50256, and 2.49956, respectively.
[0074] The target matrix constructed based on the polar angles in these polar coordinates is shown below:
[0075] The target matrix obtained above is converted into a grayscale image, and the resulting grayscale image is as follows: Figure 4 As shown.
[0076] This application normalizes the median differential strain data to eliminate the influence of data dimensions and ensures that the data maintains a consistent scale during subsequent polar coordinate transformation. Furthermore, by converting the normalized median differential strain data into polar coordinates, constructing a target matrix based on the polar angles, and then converting the target matrix into a grayscale image, this application achieves the conversion of one-dimensional normalized median differential strain data into a two-dimensional grayscale image, facilitating rapid and effective classification and recognition of the grayscale image.
[0077] Furthermore, in some embodiments of this application, step 1031 may also include the following steps: Sub-step 21: Determine the first target median differential strain data and the second target median differential strain data based on the median differential strain data.
[0078] Sub-step 22: For any median differential strain data, determine the normalized median differential strain data based on the median differential strain data, the first target median differential strain data, and the second target median differential strain data.
[0079] In some embodiments of this application, the first target median differential strain data can be the largest median differential strain data among all median differential strain data, and the second target median differential strain data can be the smallest median differential strain data among all median differential strain data.
[0080] Normalization refers to mapping data to a specific interval range, where the specific interval range can be [-1, 1]. The specific implementation process for normalizing median differential strain data to obtain normalized median differential strain data is as follows: First target median differential strain data and second target median differential strain data are determined based on all median differential strain data. For any given median differential strain data, the normalized median differential strain data can be determined based on the median differential strain data, the first target median differential strain data, and the second target median differential strain data.
[0081] The formula for normalization is shown in formula (7): Formula (7) Wherein, CDP represents any median differential strain data. This is a sequence consisting of all median difference strain data. This represents the minimum median differential strain data among all median differential strain data. This represents the maximum median differential strain data among all median differential strain data. The data are normalized median difference strain data.
[0082] This application standardizes the input for normalization processing by determining the first and second target median differential strain data based on the median differential strain data, ensuring the consistency and repeatability of the normalization process. Furthermore, this application determines the normalized median differential strain data based on the median differential strain data, the first target median differential strain data, and the second target median differential strain data, mapping the value range of the median differential strain data to a specific interval, thus unifying the range of the median differential strain data and facilitating subsequent analysis and processing.
[0083] In some embodiments of this application, to illustrate the effectiveness of the embodiments, overcharge test data for a battery module was prepared in advance. This battery module includes six battery cells, all of which were determined to have experienced thermal runaway according to the national standard thermal runaway criteria. Testing showed that using the embodiments of this application, all battery cells that experienced thermal runaway were diagnosed as faulty, predicting faults in all six battery cells without false negatives. Furthermore, it was able to individually diagnose whether each battery cell was normal or faulty. Therefore, the faulty battery cells were located while simultaneously detecting battery faults.
[0084] Corresponding to the method provided in the above-described embodiments of the battery fault detection method of this application, see [link to relevant documentation]. Figure 2 This application also provides a device block diagram of a battery fault detection device. In this embodiment, the device includes: The data acquisition module 201 is configured to acquire the target strain data of any single battery cell, wherein the target strain data is the relative change in length, and the target strain data is the ratio of the change in length to the original length. The data processing module 202 is configured to perform median difference processing on the target strain data to obtain median difference strain data; Data conversion module 203 is configured to convert median differential strain data into grayscale images; The model processing module 204 is configured to input a grayscale image into a pre-generated battery cell fault detection model to obtain a fault detection result label. The pre-generated battery cell fault detection model is a visual Transformer model, which has the ability to capture global dependency information of the image. Based on the self-attention mechanism, it extracts the global features and local features of the grayscale image from the input grayscale image and determines the fault detection result label based on the global features and local features of the grayscale image. The first fault detection module 205 is configured to determine that the fault detection result of the battery cell is a fault if the fault detection result label is a preset first value. The second fault detection module 206 is configured to determine that the fault detection result of the battery cell is not faulty if the fault detection result label is a preset second value.
[0085] Optionally, the data acquisition module 201 includes: The initial data acquisition submodule is configured to acquire the initial strain data of any single battery cell; The downsampling processing submodule is configured to downsample the initial strain data to obtain the target strain data.
[0086] Optionally, the downsampling processing submodule includes: The initial strain data acquisition unit is configured to acquire the length of the time window and the initial strain data within the time window for any preset time window. The average value calculation unit is configured to determine the average value of the initial strain data based on the length of the time window and the initial strain data within the time window; The target strain data determination unit is configured to use the average value of the initial strain data as the target strain data.
[0087] Optionally, the data processing module 202 includes: The target strain data acquisition unit is configured to acquire target strain data within any given time window. The median processing unit is configured to determine the median of the target strain data based on the target strain data. The differential processing unit is configured to determine median differential strain data for any target strain data, based on the target strain data and the median of the target strain data.
[0088] Optionally, the data conversion module 203 includes: The normalization processing submodule is configured to normalize the median differential strain data to obtain normalized median differential strain data. The polar coordinate transformation submodule is configured to convert normalized median difference strain data into polar coordinates, where polar coordinates include polar angles; The matrix construction submodule is configured to construct the target matrix based on the polar angle; The image determination submodule is configured to convert the target matrix into a grayscale image.
[0089] Optionally, the normalization processing submodule includes: The target median differential strain data determination unit is configured to determine the first target median differential strain data and the second target median differential strain data based on the median differential strain data; The normalization processing unit is configured to determine the normalized median differential strain data based on the median differential strain data, the first target median differential strain data, and the second target median differential strain data for any median differential strain data.
[0090] Figure 3 This is a structural diagram of an electronic device M00 provided in an embodiment of this application. In the diagram, the electronic device M00 includes a processor M01 and a memory M02. The memory M02 stores a program or instructions that can run on the processor M01. When the program or instructions are executed by the processor M01, they implement the various steps of the above-described battery fault detection method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0091] In embodiments of this application, the memory M02 can be used to store software programs and various data. The memory M02 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, applications or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory M02 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory M02 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.
[0092] The processor M01 may include one or more processing units; optionally, the processor M01 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into the processor M01.
[0093] This application also provides a storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described battery fault detection method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0094] The processor is the processor in the electronic device described in the above embodiments. The storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0095] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the related technology, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0096] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A battery failure detection method characterized by, The method is applied to a vehicle comprising battery cells, and comprises: obtaining target strain data of any of the battery cells, wherein the target strain data is a relative change in length, and the target strain data is a ratio of a change in length to an original length; performing median difference processing on the target strain data to obtain median difference strain data; converting the median difference strain data into a grayscale image; inputting the grayscale image into a pre-generated battery cell fault detection model to obtain a fault detection result label, wherein the pre-generated battery cell fault detection model is a visual Transformer model, the visual Transformer model has the ability to capture global dependency information of an image, extracts global features of the grayscale image and local features of the grayscale image from the input grayscale image based on a self-attention mechanism, and determines the fault detection result label according to the global features of the grayscale image and the local features of the grayscale image; if the fault detection result label is a preset first numerical value, determining that a fault detection result of the battery cell is that the battery cell has a fault; if the fault detection result label is a preset second numerical value, determining that the fault detection result of the battery cell is that the battery cell does not have a fault.
2. The method of claim 1, wherein, The method comprises: obtaining initial strain data of any of the battery cells; performing down-sampling processing on the initial strain data to obtain target strain data.
3. The method of claim 2, wherein, The method comprises: for any preset time window, obtaining a length of the time window and the initial strain data in the time window; determining an average value of the initial strain data according to the length of the time window and the initial strain data in the time window; and taking the average value of the initial strain data as the target strain data.
4. The method of claim 3, wherein, The method comprises: for any of the time windows, obtaining the target strain data in the time window; determining a median value of the target strain data according to the target strain data; for any of the target strain data, determining median difference strain data according to the target strain data and the median value of the target strain data.
5. The method of claim 1, wherein, The method comprises: performing normalization processing on the median difference strain data to obtain normalized median difference strain data; converting the normalized median difference strain data into polar coordinates, wherein the polar coordinates comprise a polar angle; constructing a target matrix according to the polar angle; and converting the target matrix into a grayscale image.
6. The method of claim 5, wherein, The method comprises: determining first target median difference strain data and second target median difference strain data according to the median difference strain data; and performing normalization processing on the first target median difference strain data and the second target median difference strain data to obtain normalized first target median difference strain data and normalized second target median difference strain data. For any median differential strain data, normalized median differential strain data is determined according to the median differential strain data, the first target median differential strain data, and the second target median differential strain data.
7. A battery failure detection apparatus characterized by comprising: The device is applied to a vehicle including a battery cell, and the device includes: a data acquisition module configured to acquire target strain data of any battery cell, wherein the target strain data is a relative change in length, and the target strain data is a ratio of a change in length to an original length; a data processing module configured to perform median differential processing on the target strain data to obtain median differential strain data; a data conversion module configured to convert the median differential strain data into a grayscale image; a model processing module configured to input the grayscale image into a pre-generated battery cell fault detection model to obtain a fault detection result label, wherein the pre-generated battery cell fault detection model is a visual Transformer model, the visual Transformer model has the ability to capture global dependency information of an image, extracts global features of the grayscale image and local features of the grayscale image from the input grayscale image based on a self-attention mechanism, and determines the fault detection result label according to the global features of the grayscale image and the local features of the grayscale image; a first fault detection module configured to determine that a fault detection result of the battery cell is that the battery cell has a fault if the fault detection result label is a preset first value; a second fault detection module configured to determine that the fault detection result of the battery cell is that the battery cell does not have a fault if the fault detection result label is a preset second value.
8. An electronic device, comprising: comprise: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the battery fault detection method of any one of claims 1 to 6.
9. A storage medium, characterized by When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device can perform the battery fault detection method of any one of claims 1 to 6.
Citation Information
Patent Citations
Lithium ion battery health state estimation and life prediction method considering mechanical strain
CN113504482A
Thermal runaway protection method, device and equipment of battery management system and storage medium
CN117237349A
Battery fault detection model construction method and device and battery fault detection method and device
CN117849627A
Power battery multi-fault risk assessment and early warning method
CN119369940A
Lithium battery thermal runaway fire identification method and system
CN119805226A