Lithium-ion battery multi-fault hierarchical diagnosis method and system based on large language model
By combining a large language model with disproportionality features, and utilizing disproportionality calculation and downsampling methods, the problems of misdiagnosis and missed diagnosis in lithium-ion battery fault diagnosis are solved, accurate fault classification and graded diagnosis under complex working conditions are achieved, and diagnostic accuracy and efficiency are improved.
Patent Information
- Application Number
- CN202510819732.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-06-19
AI Technical Summary
Existing lithium-ion battery fault diagnosis methods suffer from serious misdiagnosis and missed diagnosis under complex working conditions, have difficulty detecting early minor faults, and have insufficient model generalization capabilities to meet practical application requirements.
A large language model is combined with disproportionality features and downsampling methods. The battery signal is calculated through the disproportionality to construct prompt words for fault classification and grading tasks. The mutually exclusive low-rank adaptation fine-tuning method (M-LoRA) is used to fine-tune the large model to achieve fault classification and grading functions.
Accurate classification and graded diagnosis of minor faults are achieved under complex working conditions, which improves the accuracy of fault identification, reduces misdiagnosis and missed diagnosis, simplifies the fault diagnosis process and reduces computational complexity.
Smart Images

Figure CN120354209B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of lithium-ion battery safety control, and in particular to a lithium-ion battery multi-fault hierarchical diagnosis method and system based on a large language model. Background Art
[0002] The statements in this section merely provide background information related to the present disclosure and do not necessarily constitute prior art.
[0003] Lithium-ion batteries are at the heart of electric vehicles and energy storage systems. Frequent safety incidents with these batteries have severely hindered the further development of new energy systems. Fault diagnosis is an effective means of ensuring battery safety. However, lithium-ion batteries are highly complex, nonlinear, and time-varying systems, with subtle and hidden early fault signatures. Existing fault diagnosis methods are limited by model size and poor nonlinear fitting capabilities. This leads to significant misdiagnosis and missed diagnoses under complex operating conditions, making it difficult to prevent and control fault risks.
[0004] Existing methods, such as a clustering algorithm-based micro-short circuit fault diagnosis method, use IC curves under constant-current charging conditions as features and leverage data processing methods such as principal component analysis and machine learning methods such as unsupervised clustering to detect micro-short circuit faults. However, this method is only effective under constant-current charging conditions, significantly limiting its scope of application. Existing methods, such as a deep learning-based diagnosis method, use small neural network models such as CNN and GRU to predict voltage curves and diagnose faults based on the residual difference between the predicted and true voltages. However, due to model size limitations, this method has a limited voltage prediction step size, which can only detect relatively obvious voltage anomalies and cannot diagnose early-stage battery failures. Existing methods, such as a fault diagnosis method based on a mechanism model, utilize electrochemical mechanisms to construct a battery lithium insertion and expansion compensation model to assess the battery's lithium deposition state and subsequently diagnose faults. However, the mechanism model has extremely poor generalization capabilities and can only be applied to specific batteries, making it difficult to meet practical application requirements. Existing methods, such as a neural network-based fault diagnosis method, use multiple training runs on simulation data to score the degree of battery anomaly and diagnose batteries that exceed a threshold as faulty. However, this method is only effective for a few fault types included in the training set and lacks generalization. As can be seen, existing methods are greatly limited by model size and lack effectiveness, generalization, and reliability, failing to meet the requirements of diagnosing early-stage minor faults. Summary of the Invention
[0005] To overcome the deficiencies of the above-mentioned prior art, the present invention provides a lithium-ion battery multi-fault classification diagnosis method and system based on a large language model. By leveraging the excellent nonlinear fitting capability of the large language model, minor faults can be accurately captured under complex working conditions. At the same time, the multi-task parallel processing capability of the large language model can be brought into play to realize fault classification and classification functions under the same base model.
[0006] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:
[0007] In a first aspect, the present invention provides a multi-fault hierarchical diagnosis method for lithium-ion batteries based on a large language model, comprising:
[0008] Acquiring battery signals in the battery pack to be tested, and calculating the disproportionation degree of the battery pack to be tested based on the battery signals;
[0009] Downsampling the battery signal based on the disproportionation degree to obtain a downsampled battery signal;
[0010] Constructing a fault classification task prompt word based on the downsampled battery signal, inputting the fault classification task prompt word into the fault classification large model, and obtaining the fault type and the battery signal sequence corresponding to the fault;
[0011] The voltage variance quantile is calculated based on the battery signal sequence corresponding to the fault, and a fault classification task prompt word is constructed based on the voltage variance quantile; the fault classification task prompt word is input into the fault classification large model to obtain the fault level.
[0012] According to a further technical solution, the disproportionation degree includes a voltage difference degree and a current deviation degree.
[0013] A further technical solution is to calculate the voltage difference based on the characteristic voltage matrix, which is expressed as:
[0014]
[0015] Among them, VDD represents the voltage difference, represents the improved correlation coefficient, i Indicates the save batteries, Indicates the save batteries, Represents improved multiplication operation.
[0016] In a further technical solution, the current deviation calculation formula is:
[0017]
[0018] in, represents the current sequence, represents the current sequence after normalization and adding square wave signal, represents the scaling factor, Indicates the current deviation.
[0019] A further technical solution is to determine the voltage difference threshold and the current deviation threshold by using the quantile method, and determine the sampling frequency based on the disparity degree, which is expressed as:
[0020]
[0021] in, represents the frequency after downsampling, represents the original frequency, Indicates the voltage difference threshold, Indicates the current deviation threshold.
[0022] According to a further technical solution, the fault classification task prompt words include task type, sampling frequency, data length, current data, voltage data and temperature data; the fault grading task prompt words include task type, number of batteries, quantile, fault type, voltage difference and current deviation.
[0023] According to a further technical solution, the fault classification model and the fault grading model are obtained by fine-tuning the large language model using a mutually exclusive low-rank adaptive fine-tuning method.
[0024] In a second aspect, the present invention provides a lithium-ion battery multi-fault hierarchical diagnosis system based on a large language model, comprising:
[0025] a data acquisition module configured to: acquire battery signals in the battery pack to be tested, and calculate the disproportionation degree of the battery pack to be tested based on the battery signals;
[0026] a downsampling module configured to: downsample the battery signal based on the disproportionation degree to obtain a downsampled battery signal;
[0027] A fault classification module is configured to: construct a fault classification task prompt word based on the downsampled battery signal, input the fault classification task prompt word into the fault classification large model, and obtain the fault type and the battery signal sequence corresponding to the fault;
[0028] The fault classification module is configured to: calculate the voltage variance quantile based on the battery signal sequence corresponding to the fault, construct a fault classification task prompt based on the voltage variance quantile; input the fault classification task prompt into the fault classification model to obtain the fault level.
[0029] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the lithium-ion battery multi-fault hierarchical diagnosis method based on a large language model as described in the first aspect.
[0030] In a fourth aspect, the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the multi-fault hierarchical diagnosis method for lithium-ion batteries based on a large language model as described in the first aspect are implemented.
[0031] One or more of the above technical solutions have the following beneficial effects:
[0032] Large language models, with their large number of parameters and complex structure, inherently offer excellent nonlinear fitting and multitasking capabilities, demonstrating impressive performance in a wide range of fields. However, large language models also suffer from high computational complexity and slow speed, hindering their practical application in battery fault diagnosis. To address this issue, this paper first proposes a fault signal downsampling method based on the degree of disproportionality and invents a new disproportionality feature. This feature evaluates the overall abnormality level of multiple battery cells within a battery module over different time periods, reflecting the probability of failure within those time periods. Based on the degree of disproportionality, the sampling frequency in low-fault-probability intervals is reduced, compressing the fault signal length to less than 1 / 200. Furthermore, this paper proposes a large model fine-tuning method for fault diagnosis tasks. Using M-LoRA technology, the large language model is fine-tuned based on high-quality fault samples, enabling it to simultaneously perform fault classification and grading. Finally, this paper proposes a large model-based fault diagnosis framework that integrates three functional modules: data downsampling, fault classification, and fault grading. The downsampling results are first used for fault classification, followed by fault grading based on the fault type and the original fault signal, completing the entire fault classification and grading process in one go.
[0033] This invention leverages the powerful nonlinear fitting capabilities of large models to achieve precise classification and hierarchical diagnosis of minor faults under complex operating conditions. Compared with traditional small-model methods, fault identification accuracy is significantly improved, and misdiagnosis and missed diagnoses are significantly reduced.
[0034] The present invention utilizes the multi-task parallel processing capability of a large model to realize fault classification and fault grading under the same large model basis, thereby simplifying the fault diagnosis process.
[0035] The present invention designs a downsampling method based on the degree of disproportionation, thereby significantly reducing the signal length without losing fault information, reducing the computational complexity of large models, and providing the possibility for online diagnosis.
[0036] This paper proposes the Mutually Exclusive Low-Rank Adaptation Fine-tuning method (M-LoRA) for the first time. By constructing two mutually orthogonal low-rank matrices, the parameter updates are decoupled in the fault classification and fault grading task training to reduce mutual interference. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0038] Figure 1This is a flow chart of a multi-fault hierarchical diagnosis method for lithium-ion batteries according to an embodiment of the present invention;
[0039] Figure 2 is a signal curve diagram of an embodiment of the present invention under UDDS working conditions;
[0040] Figure 3 is a signal curve diagram of an embodiment of the present invention under charging conditions;
[0041] Figure 4 : is the voltage difference curve of the embodiment of the present invention under UDDS working conditions;
[0042] Figure 5 is a current deviation curve of an embodiment of the present invention under UDDS working conditions;
[0043] Figure 6 is a voltage difference curve of an embodiment of the present invention under charging conditions;
[0044] Figure 7 is a current deviation curve of an embodiment of the present invention under charging conditions;
[0045] Figure 8 is a parameter curve after sampling under UDDS working conditions in an embodiment of the present invention;
[0046] Figure 9 It is a parameter curve after sampling under charging conditions in an embodiment of the present invention. DETAILED DESCRIPTION
[0047] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs.
[0048] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.
[0049] In the absence of conflict, the embodiments of the present invention and the features thereof may be combined with each other.
[0050] Example 1
[0051] like Figure 1 As shown, this embodiment discloses a multi-fault hierarchical diagnosis method for lithium-ion batteries based on a large language model, the method comprising the following steps:
[0052] S1: Acquire battery signals in the battery pack to be tested, and calculate the disproportionation degree of the battery pack to be tested based on the battery signals;
[0053] In this embodiment, the battery signal includes a voltage signal, a current signal and a temperature signal. First, a new feature, namely, disproportionation, is defined. The disproportionation is composed of voltage difference and current deviation.
[0054] The voltage variance evaluates the overall degree of variation in the voltages of multiple cells within a battery pack. A higher value indicates a greater voltage variance between cells and a higher likelihood of failure. The voltage variance is calculated as follows:
[0055] First, the battery voltage is normalized, and then a square wave signal is added to the normalized battery signal, as shown in formula (1):
[0056] (1)
[0057] in, Indicates the Save battery in time The normalized voltage at each moment, Indicates the Save battery in time The original voltage at the moment, Indicates the rated voltage range of the battery. represents the normalized battery voltage series, represents the total length of the battery sequence (time direction), Indicates the first Battery voltage sequence, Represents a constant used to adjust the amplitude of the square wave signal; represents a symbolic function, when The value is 1 when The time value is 0, The time value is -1.
[0058] The raw correlation coefficient between battery voltages is severely affected by noise. Even small noise from a single battery cell can easily cause a significant drop in the correlation coefficient. For example, the voltage sequences of three sampling points for two batteries are 3.2V, 3.21V, and 3.2V, and 3.2V, 3.19V, and 3.2V, respectively. These two voltage sequences differ minimally, yet the correlation coefficient is -1, which can easily lead to misdiagnosis. Therefore, this embodiment adds a square wave to the raw data (normalized battery signals), effectively adding an initial bias. This eliminates the effects of small noise and increases the robustness of the algorithm.
[0059] Then, the battery with the largest voltage range and the largest voltage variance is selected from the battery pack as the sentinel battery, and its voltage constitutes the characteristic voltage matrix, as shown in formula (2):
[0060] (2)
[0061] in, represents the sequence containing the highest voltage, represents the sequence containing the lowest voltage, represents the sequence containing the maximum voltage range, represents the sequence containing the cell with the maximum voltage contrast, represents the sequence containing the cell with the minimum voltage contrast, represents the characteristic voltage matrix.
[0062] Based on the characteristic voltage matrix, the voltage difference VDD can be calculated as shown in formula (3):
[0063] (3)
[0064] Where VDD represents the voltage difference, which is the maximum improved correlation coefficient between different voltage sequences in the characteristic voltage matrix; It represents the improved correlation coefficient, which replaces the dot product in the traditional correlation coefficient with the improved multiplication operation; Indicates the save batteries, Indicates the save batteries, It represents an improved multiplication operation. By introducing coefficients and exponents, it strengthens the influence of elements with different signs on the result. Representation sequence The standard deviation of Representation sequence The standard deviation of .
[0065] Current deviation characterizes the degree of correlation between voltage changes within a battery pack and factors other than current. Normal battery voltage changes are primarily affected by current, while faulty battery voltage changes are affected by faults. Therefore, current deviation can also reflect the possibility of faults and is more sensitive to module-level faults. The current deviation calculation is shown in Equation (4):
[0066] (4)
[0067] in, represents the current sequence, represents the current sequence after normalization and adding square wave signal, Indicates the scaling factor, used to amplify the current signal; Indicates the current deviation, which is the ratio of the voltage extreme difference to the current extreme difference; Indicates the maximum value of the current, Indicates the minimum value of the current.
[0068] S2: Downsampling the battery signal based on the disproportionation degree to obtain a downsampled battery signal;
[0069] In this embodiment, the voltage difference threshold and the current deviation threshold are determined by the quantile method. The method for determining the sampling frequency based on the degree of disparity is shown in formula (5):
[0070] (5)
[0071] in, represents the frequency after downsampling, represents the original frequency, Indicates the voltage difference threshold, Represents the current deviation threshold. When both the voltage difference and the current deviation exceed the threshold, a low sampling frequency is used. When either exceeds the threshold, a medium sampling frequency is used. When neither exceeds the threshold, a low sampling frequency is used.
[0072] Open circuit and short circuit faults are sudden faults, requiring a higher sampling frequency to capture their characteristics. However, inconsistent self-discharge faults are slow-moving faults, which can be captured at a lower sampling frequency. The current disparity reflects the degree of abnormality in the voltage signal and is an important indicator of short-term faults. A high disparity indicates a high probability of sudden faults such as poor contact and short circuits, requiring a higher data frequency for diagnosis. A low disparity indicates no sudden faults and only more gradual faults such as self-discharge. In this case, a lower data frequency does not affect the diagnostic results.
[0073] S3: Constructing a fault classification task prompt word based on the downsampled battery signal, inputting the fault classification task prompt word into the fault classification large model, and obtaining the fault type and the battery signal sequence corresponding to the fault;
[0074] In this embodiment, a fault classification task prompt is constructed based on the downsampled battery signals, namely, voltage, current, and temperature signals. The fault classification task prompt includes the task type, sampling frequency, data length, current data (current signal), voltage data (voltage signal), and temperature data (temperature signal). Its structure is shown in Table 1:
[0075] Table 1 Prompt word structure for fault classification task
[0076]
[0077] The expected output of the large model is the battery failure type. An example of the output result is: "Battery 1: normal, Battery 2: internal short circuit failure, Battery 3: normal, ..."
[0078] A fault classification training set is constructed using the fault classification task prompt as input and the fault type as output. Based on this training set, the large model is fine-tuned using the mutex low-rank adaptation method (M-LoRa). This enables the large model's fault classification capabilities and yields a large fault classification model. This example was verified on the Qwen2.5 7b model.
[0079] The fault classification model classifies the faults according to the input fault classification task prompt words, and outputs the fault type and the data corresponding to the fault.
[0080] S4: Calculate the voltage variance quantile based on the battery signal sequence corresponding to the fault, construct a fault classification task prompt based on the voltage variance quantile; input the fault classification task prompt into the fault classification model to obtain the fault level.
[0081] In this embodiment, the fault type of the input battery data is returned during fault classification. If a fault exists, the segment is considered a fault segment, and the data before downsampling of the segment, i.e., the original battery signal data, is obtained. Based on the data in the segment diagnosed as a fault, the variance sequence of the battery voltage is calculated using the following formula:
[0082] (6)
[0083] in, express The average voltage in the battery module at any moment, express The voltage variance in the battery module at each moment, Represents the variance sequence of the battery module at historical moments.
[0084] Calculate the voltage variance quantile as shown in formula (7):
[0085] (7)
[0086] in, represents the first quantile, represents the second quantile, Represents the third quantile. First, sort the voltage variance sequence from largest to smallest. The first, second, and third quantiles are the variance values at the 25th, 50th, and 75th percentiles, respectively. If the position is not an integer, it is obtained by taking the difference between the left and right values.
[0087] The fault classification task prompt words are constructed based on the voltage variance quantile. The fault classification task prompt words include task type, number of batteries, quantile, fault type, voltage difference VDD and current deviation CDD. Its structure is shown in Table 2:
[0088] Table 2. Prompt word structure for fault classification task
[0089]
[0090] Fine-tune the fault classification function of the large model based on the original frequency fault data. The expected output is the fault level, which can be determined based on factors such as voltage fluctuations. For example, the output result label example is "Battery 2: Internal short circuit fault level 3."
[0091] A fault classification training set is constructed with the fault classification task prompt words as input and the fault level as output. Based on the fault classification training set, the mutually exclusive low-rank adaptation fine-tuning method (M-LoRA) is used to fine-tune the large model to enable the fault classification function of the large language model and obtain a large fault classification model.
[0092] Therefore, this application uses a large-scale model-based battery multi-fault hierarchical diagnosis framework to complete fault classification and quantitative diagnosis. First, the input signal is downsampled based on the degree of disproportionation to obtain a low-frequency battery signal sequence. Then, based on the low-frequency signal, a fault classification task prompt word is constructed, and the prompt word is input into the large-scale model to complete the fault classification task and obtain the fault type of all batteries in the battery pack. Finally, based on the data in the diagnosed fault segment, the voltage variance quantile is calculated to construct the fault classification prompt word. The prompt word is input into the large-scale model to complete the fault classification.
[0093] This paper proposes the Mutually Exclusive Low-Rank Adaptation Fine-tuning method (M-LoRA) for the first time. By constructing two mutually orthogonal low-rank matrices, the parameter updates are decoupled in the fault classification and fault grading task training to reduce mutual interference.
[0094] The core idea is to design two LoRa matrices , so that it satisfies the orthogonality constraint ,in is the Frobenius inner product.
[0095] The two matrices are the trainable parameters corresponding to the fault classification task and the fault grading task, respectively. Their orthogonality condition ensures that the update directions of the two tasks do not overlap, and the gradients do not interfere with each other during the back propagation process. The specific fine-tuning method is as follows:
[0096] (1) Constructing a low-rank left factor and low-rank right factors , making , freeze all other parameters.
[0097] (2) Update the large language model LLM parameters to ,in is the LLM parameter, .
[0098] (3) The gradients of different low-rank matrices are calculated and projected separately during the training of the two tasks.
[0099] (8)
[0100] in, and are the two corrected low-rank matrix gradients, and as well as They are the original gradients of the two low-rank matrices to the Loss function.
[0101] (4) Alternating update of matrix parameters
[0102] (9)
[0103] in, is the learning rate.
[0104] Through the above method, the gradient directions of the two task training are projected to directions orthogonal to each other, ensuring that the gradient propagation does not affect the effects of the two tasks.
[0105] The following describes specific application examples.
[0106] like Figure 2 、 Figure 3 As shown, the voltage data of 6 series-connected cells in an existing electric vehicle battery pack (obtained from a simulation experiment) and the signal curves under UDDS (urban dynamic driving conditions) and charging conditions.
[0107] Under UDDS conditions, battery 2 experienced an external short circuit between 200 and 400 seconds, resulting in a voltage drop of approximately 0.01V. Battery 2 experienced an internal short circuit between 600 and 800 seconds, causing a voltage drop of 0.05V and a temperature increase of 2°C. Battery 3 experienced a poor contact between 1000 and 1200 seconds, causing voltage fluctuations. Under constant current charging conditions, battery 1 experienced a self-discharge fault, resulting in a slow voltage rise. Battery 4 experienced an inconsistency fault, resulting in a higher SOC than the other batteries.
[0108] The results of disproportionation degree under UUDS working condition are as follows Figure 4 、 Figure 5As shown, during the 200-400s and 1000-1200s periods, both the voltage difference and current deviation increased significantly, so the highest sampling frequency was used during these periods. During the 600-800s period, only one parameter exceeded the threshold, so the next highest sampling frequency was used. Furthermore, during most of the time, both indicators exceeded the threshold, so a lower sampling frequency was used.
[0109] The calculation results of the two parameters under constant current charging conditions are as follows: Figure 6 、 Figure 7 As shown in the figure, in the entire sampling interval, both characteristic parameters are low and do not exceed the threshold, so a lower sampling frequency is adopted.
[0110] The signal downsampling results under the two working conditions are as follows Figure 8 、 Figure 9 As shown in Figure 2, the number of signal points after downsampling is 72 and 170 respectively.
[0111] Based on the sampled signals, we constructed prompt words and performed fault classification. The diagnostic results are shown in Table 3. It can be seen that all faults were successfully detected and accurately classified.
[0112] Table 3 Fault classification results
[0113]
[0114] The complete data signal within the fault segment was used to construct prompt words for fault classification. The classification results are shown in Table 4. It can be seen that all faults were accurately classified.
[0115] Table 4 Fault classification results
[0116]
[0117] Example 2
[0118] This embodiment discloses a lithium-ion battery multi-fault hierarchical diagnosis system based on a large language model, including:
[0119] a data acquisition module configured to: acquire battery signals in the battery pack to be tested, and calculate the disproportionation degree of the battery pack to be tested based on the battery signals;
[0120] a downsampling module configured to: downsample the battery signal based on the disproportionation degree to obtain a downsampled battery signal;
[0121] A fault classification module is configured to: construct a fault classification task prompt word based on the downsampled battery signal, input the fault classification task prompt word into the fault classification large model, and obtain the fault type and the battery signal sequence corresponding to the fault;
[0122] The fault classification module is configured to: calculate the voltage variance quantile based on the battery signal sequence corresponding to the fault, construct a fault classification task prompt based on the voltage variance quantile; input the fault classification task prompt into the fault classification model to obtain the fault level.
[0123] Example 3
[0124] The purpose of this embodiment is to provide a computing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method of embodiment 1 when executing the program.
[0125] Example 4
[0126] The purpose of this embodiment is to provide a computer-readable storage medium, a computer-readable storage medium having a computer program stored thereon, which performs the steps of the method of embodiment 1 when executed by a processor.
[0127] The steps involved in the apparatuses of Examples 3 and 4 above correspond to those of Method Example 1. For detailed implementation, please refer to the relevant description of Example 1. The term "computer-readable storage medium" should be understood to mean a single medium or multiple media containing one or more instruction sets; it should also be understood to include any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and causing the processor to perform any of the methods of the present invention.
[0128] Those skilled in the art will appreciate that the modules or steps of the present invention described above can be implemented using a general-purpose computer device. Alternatively, they can be implemented using program code executable by a computing device, which can then be stored in a storage device and executed by the computing device. Alternatively, they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.
[0129] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.
[0130] Although the above describes the specific embodiments of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without any creative work are still within the scope of protection of the present invention.
Claims
1. A multi-fault hierarchical diagnosis method for lithium-ion batteries based on a large language model, characterized in that: include: Acquire battery signals in the battery pack to be tested, and calculate the disproportionation degree of the battery pack to be tested based on the battery signals, wherein the disproportionation degree includes a voltage difference degree and a current deviation degree; The battery signal is downsampled based on the disproportionality to obtain a downsampled battery signal. Specifically, the voltage difference threshold and the current deviation threshold are determined by the quantile method. The method for determining the sampling frequency based on the disproportionality is as follows: ; in, represents the frequency after downsampling, represents the original frequency, Indicates the voltage difference threshold, Indicates the current deviation threshold; when both the voltage difference and the current deviation exceed the threshold, a low sampling frequency is used; when one of them exceeds the threshold, a medium sampling frequency is used; and when neither exceeds the threshold, a low sampling frequency is used; Constructing a fault classification task prompt word based on the downsampled battery signal, inputting the fault classification task prompt word into the fault classification large model, and obtaining the fault type and the battery signal sequence corresponding to the fault; Calculating voltage variance quantiles based on the battery signal sequence corresponding to the fault, constructing a fault classification task prompt based on the voltage variance quantiles; inputting the fault classification task prompt into a large fault classification model to obtain a fault grade; The fault classification model and the fault grading model are obtained by fine-tuning the large language model using a mutually exclusive low-rank adaptive fine-tuning method. The specific fine-tuning method is as follows: Constructing a low-rank left factor and low-rank right factors , making , freeze all other parameters; Update the large language model LLM parameters to ,in is the LLM parameter, ; The gradients of different low-rank matrices are calculated and projected separately during the training of the two tasks: ; in, and are the two corrected low-rank matrix gradients, and as well as They are the original gradients of the two low-rank matrices to the Loss function; Alternately update the matrix parameters: ; in, is the learning rate.
2. The multi-fault hierarchical diagnosis method for lithium-ion batteries based on a large language model according to claim 1, characterized in that: The voltage difference is calculated based on the characteristic voltage matrix and is expressed as: Among them, VDD represents the voltage difference, represents the improved correlation coefficient, Indicates the save batteries, Indicates the save batteries, Represents improved multiplication operation.
3. The multi-fault hierarchical diagnosis method for lithium-ion batteries based on a large language model according to claim 1, characterized in that: The current deviation calculation formula is: in, represents the current sequence, represents the current sequence after normalization and adding square wave signal, represents the scaling factor, Indicates the current deviation.
4. The multi-fault hierarchical diagnosis method for lithium-ion batteries based on a large language model according to claim 1, characterized in that: The voltage difference threshold and current deviation threshold are determined by the quantile method, and the sampling frequency is determined based on the degree of disparity, which is expressed as: in, represents the frequency after downsampling, represents the original frequency, Indicates the voltage difference threshold, Indicates the current deviation threshold.
5. The multi-fault hierarchical diagnosis method for lithium-ion batteries based on a large language model according to claim 1, characterized in that: The fault classification task prompts include task type, sampling frequency, data length, current data, voltage data and temperature data; the fault grading task prompts include task type, number of batteries, quantile, fault type, voltage difference and current deviation.
6. A multi-fault hierarchical diagnosis system for lithium-ion batteries based on a large language model, characterized by: include: a data acquisition module configured to: acquire battery signals in the battery pack to be tested, and calculate the disproportionation degree of the battery pack to be tested based on the battery signals, wherein the disproportionation degree includes a voltage difference degree and a current deviation degree; The downsampling module is configured to: downsample the battery signal based on the disproportionality to obtain a downsampled battery signal, specifically: determine the voltage difference threshold and the current deviation threshold by using a quantile method. The method for determining the sampling frequency based on the disproportionality is as follows: ; in, represents the frequency after downsampling, represents the original frequency, Indicates the voltage difference threshold, Indicates the current deviation threshold; when both the voltage difference and the current deviation exceed the threshold, a low sampling frequency is used; when one of them exceeds the threshold, a medium sampling frequency is used; and when neither exceeds the threshold, a low sampling frequency is used; A fault classification module is configured to: construct a fault classification task prompt word based on the downsampled battery signal, input the fault classification task prompt word into the fault classification large model, and obtain the fault type and the battery signal sequence corresponding to the fault; A fault classification module is configured to: calculate a voltage variance quantile based on a battery signal sequence corresponding to the fault, construct a fault classification task prompt based on the voltage variance quantile; input the fault classification task prompt into a fault classification model to obtain a fault level; The fault classification model and the fault grading model are obtained by fine-tuning the large language model using a mutually exclusive low-rank adaptive fine-tuning method. The specific fine-tuning method is as follows: Constructing a low-rank left factor and low-rank right factors , making , freeze all other parameters; Update the large language model LLM parameters to ,in is the LLM parameter, ; The gradients of different low-rank matrices are calculated and projected separately during the training of the two tasks: ; in, and are the two corrected low-rank matrix gradients, and as well as They are the original gradients of the two low-rank matrices to the Loss function; Alternately update the matrix parameters: ; in, is the learning rate.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the lithium-ion battery multi-fault hierarchical diagnosis method based on a large language model as described in any one of claims 1 to 5 are implemented.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the lithium-ion battery multi-fault hierarchical diagnosis method based on a large language model are implemented as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Power battery fault diagnosis method and system, vehicle and storage medium
CN116593897A
Large language model distributed pipeline parallel fine tuning method for heterogeneous GPU graphics card
CN118796455A