Power battery multi-state collaborative estimation method and system based on large language model
Through the multi-state collaborative estimation method based on the large language model, aging features are extracted and fragmented charging data are processed, and the problems of performance degradation and safety hazards of lithium-ion batteries are solved, and efficient and flexible multi-state collaborative estimation is achieved to adapt to complex working conditions .
Patent Information
- Application Number
- CN202411753406.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-12-02
AI Technical Summary
Under the influence of extreme operating conditions, abnormal charging/discharging, internal material structure deterioration, high temperature and other factors, lithium-ion batteries have deteriorated performance, resulting in a decrease in battery life of electric vehicles and an increase in safety hazards. The existing multi-state synergistic estimation method has poor flexibility and low accuracy. , difficult to implement effectively.
The multi-state collaborative estimation method of power batteries based on large language models is adopted. By initializing the large language model, aging characteristics are extracted, battery state parameters are integrated, model input and output are adjusted, output layer module is added, the model is fine-tuned by low-rank adaptation method, and fragmentation is processed. Multi-state synergistic estimation is performed by recombinant charging data.
It realizes reliable extraction of aging characteristics under random charging behavior, improves the flexibility, accuracy and dynamic response capabilities of multi-state collaborative estimation, adapts to complex operating conditions in engineering practice, and breaks through the poor flexibility and strict prerequisites of existing methods. A harsh problem.
Smart Images

Figure CN119291515A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of lithium-ion batteries, and in particular relates to a method and system for collaboratively estimating multiple states of a power battery based on a large language model. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] With the large-scale promotion of electric vehicles, lithium-ion batteries are generally considered to be a key energy storage technology that is expected to achieve sustainable development. Due to its high energy density, low self-discharge rate, long cycle life, and lightweight characteristics, it is widely used in various fields. However, in engineering practice, due to factors such as extreme working conditions, abnormal charging / discharging, internal material structure degradation, high temperature, and abuse, the performance of lithium-ion batteries will inevitably and irreversibly decline, and there are many safety hazards. This performance degradation will significantly reduce the battery life of electric vehicles or electronic devices, increase the operating burden, and accelerate battery aging, and even cause safety accidents such as overheating, fire, or explosion. Therefore, safe management and control of lithium-ion batteries is the only way to alleviate electric vehicle range anxiety and avoid high-risk risks such as thermal runaway.
[0004] State estimation technology in battery management systems can effectively evaluate the safety of lithium-ion batteries and ensure their reliable operation. Today, the key states of lithium-ion batteries include the state of health (SOH), state of charge (SOC) and remaining useful life (RUL), which are different in definition, function and time scale. At the same time, since lithium-ion batteries are a dynamic, time-varying and nonlinear electrochemical system, there is a complex coupling relationship between the three states. Therefore, compared with the estimation technology for a single state, multi-state collaborative estimation is a more promising solution.
[0005] At present, the methods for collaborative estimation of multi-states of lithium-ion batteries include: definition method, model-based estimation method and data-driven estimation method. In the traditional definition method, the health state is defined as the percentage of the ratio of available capacity to rated capacity, the state of charge is defined as the percentage of the ratio of current remaining capacity to available capacity, and the remaining service life is defined as the number of cycles remaining from the current to the preset health threshold. The defects of this method are: in engineering practice, the available capacity required to calculate the health state and the state of charge cannot be accurately obtained, and the remaining service life cannot be directly calculated; the model-based method estimates the battery state by constructing a mathematical model that can reflect the electrochemical reaction mechanism inside the battery, mainly including empirical models, equivalent circuit models and electrochemical models. The defects of this method are: there are significant limitations in flexibility, accuracy and dynamic response, which makes it difficult to deploy stably and has poor adaptability in practice; the data-driven method does not require an in-depth understanding of the internal reaction mechanism of lithium-ion batteries, and estimates are achieved by establishing a mapping relationship between the battery state and the input features. This method is widely used and has high accuracy. However, feature engineering with strict prerequisites, easy model overfitting, and low collaborative estimation accuracy limit its further development. Therefore, the technical means and scope of application of this method still need to be strengthened. Summary of the invention
[0006] In order to solve the above problems, the present invention proposes a method and system for collaborative estimation of multi-states of power batteries based on a large language model, which can alleviate the obstacles to feature engineering caused by fragmented charging behavior in engineering practice, efficiently, flexibly and reliably extract aging features for health state estimation, and establish a mapping relationship between features and states by fine-tuning the 3B parameter scale large language model. The present invention solves the problem of poor flexibility of feature engineering caused by random charging behavior in engineering practice, clarifies the complex coupling relationship between multiple states of lithium-ion batteries with the help of a large language model, and then realizes precise collaborative estimation of multiple states.
[0007] According to some embodiments, the present invention adopts the following technical solutions:
[0008] A method for collaboratively estimating multiple states of a power battery based on a large language model comprises the following steps:
[0009] Initialize the large language model;
[0010] Aging feature extraction is performed under random charging behavior, and the window extreme voltage and accumulated charge amount are extracted as aging features;
[0011] Based on the initialized large language model, the input and output of the model are determined according to the multi-state collaborative estimation task, the extracted aging features are fused with the battery state parameters as input features, and the input type is adjusted;
[0012] Based on the input and output of the model, the large language model is improved, and an output layer module is added to the large language model to adapt to the multi-state collaborative estimation task;
[0013] Based on the improved large language model and actual dataset, the low-rank adaptation method is used to fine-tune the model;
[0014] The target fragmented charging data is processed based on the fine-tuned model to perform multi-state collaborative estimation.
[0015] As an optional implementation, the process of extracting aging characteristics under random charging behavior includes:
[0016] Obtaining fragmented charging data of a power battery in a certain cycle, and screening and combining the fragmented charging data to form voltage-charge amount data;
[0017] Based on the voltage-charge data, a two-dimensional sliding window method is used to iteratively calculate the average slope corresponding to each window;
[0018] Summarize the average slopes corresponding to all windows, and record the minimum average slope and its corresponding window information;
[0019] Based on the window information, the corresponding aging characteristics within the cycle are extracted, including the window extreme voltage and the accumulated charge capacity.
[0020] As an optional implementation, the process of obtaining fragmented charging data of a power battery in a certain cycle, and screening and combining the fragmented charging data to form voltage-charge amount data includes:
[0021] Obtain the voltage, current and charge capacity data of the power battery, remove irrelevant parameter data, and retain the voltage and charge capacity data;
[0022] Based on the data of voltage and charge amount, the data are combined into voltage-charge amount two-dimensional data, with charge amount as the x direction and voltage as the y direction.
[0023] As an optional implementation, based on the voltage-charge data, the process of iteratively calculating the average slope corresponding to each window using a two-dimensional sliding window method includes:
[0024] Based on the voltage-charge data, a two-dimensional sliding window method is adopted, with a set voltage length ΔV as the sliding window size and a voltage increase direction as the window sliding direction;
[0025] According to the set sliding window size and sliding direction, the window slides point by point, and the window information corresponding to each slide and the data point information in the window are recorded until all data points are covered and the sliding ends;
[0026] Based on the recorded window information and the data point information in the window, if a window contains multiple data points, the slope between two points is calculated point by point in the window, and a total of n-1 slope values {m1,m2,…,m n-1}, n is the total number of data points in the window;
[0027] Based on the summarized n-1 slope values, the average slope corresponding to the window is calculated, and the average slopes corresponding to all windows are iteratively calculated based on this; among them, the average slope M corresponding to the i-th window i Defined as:
[0028]
[0029] As an optional implementation, the process of summarizing the average slopes corresponding to all windows and recording the minimum average slope and its corresponding window information includes: summarizing all average slopes {M1, M2, ...} based on the average slopes of the windows;
[0030] Extract the minimum average slope M min and its corresponding sliding window information, including the voltage value and charge value corresponding to each data point in the window.
[0031] As an optional implementation, the window extreme voltage is the maximum voltage value V corresponding to the upper and lower boundaries of the window. max and minimum voltage V min , cumulative charge Q c It is the difference between the charge value corresponding to the last data point in the window and the charge value corresponding to the first data point.
[0032] As an optional implementation, a 3B parameter scale large language model is selected as the large language model.
[0033] As an optional implementation, the process of determining the input and output of the model according to the multi-state collaborative estimation task and adjusting the input includes: setting the model input to the maximum voltage value V max , minimum voltage value V min , cumulative charge Q c , and the current voltage value V t 、Current current value I t And the estimated health state SOH at the previous moment t-1 , setting the model output to health state, state of charge and remaining useful life;
[0034] Based on the model input and output, the input type is adjusted to a string type, and the output type is adjusted to a floating point type.
[0035] As an optional implementation, the process of improving the large language model includes: adding an output layer module to the large language model based on the model output type and dimension, wherein the output layer module includes a multi-layer linear layer and its activation function and a normalization layer to achieve the conversion of the dimension from 2048 to 2, i.e., the health state and the charge state;
[0036] Based on the output layer module, a lightweight model is added to realize the remaining service life prediction when the health state estimation accumulates to a set value.
[0037] As an optional implementation, the process of fine-tuning the model using the low-rank adaptation method includes: using historical data obtained from an actual power battery as an actual data set, dividing the actual data set into a training set and a test set, the training set is used to fine-tune the large language model, and the test set is used to verify the performance of the large language model;
[0038] Apply the low-rank adaptation method to the query matrix W of the multi-head attention mechanism in the Qwen layer of the large language model Q Sum matrix W V superior;
[0039] Based on the low-rank adaptation method, the required hyperparameters are set, including the learning rate of 1e-4, the batch size of 128, and the number of training rounds of 50.
[0040] As an optional implementation, in the process of multi-state collaborative estimation, the root mean square error is used as an indicator to evaluate the health state and charge state estimation performance, and the difference d between the estimated value and the true value of the number of cycles corresponding to the preset health threshold is used. R As an indicator to evaluate the remaining useful life prediction performance.
[0041] A power battery multi-state collaborative estimation system based on a large language model, comprising:
[0042] A model initialization module, configured to initialize a large language model;
[0043] A feature extraction module is configured to perform aging feature extraction under random charging behavior, and extract window extreme value voltage and accumulated charge amount as aging features;
[0044] An input feature determination module is configured to determine the input and output of the model based on the initialized large language model according to the multi-state collaborative estimation task, fuse the aging features extracted by the feature extraction module with the battery state parameters as input features, and adjust the input type;
[0045] A model improvement module is configured to improve the large language model based on the input and output of the model, and add an output layer module to the large language model to adapt to the multi-state collaborative estimation task;
[0046] A model fine-tuning module is configured to fine-tune the model using a low-rank adaptation method based on an improved large language model and actual datasets;
[0047] The multi-state collaborative estimation module is configured to process the target fragmented charging data based on the fine-tuned model to perform multi-state collaborative estimation.
[0048] The feature extraction module comprises:
[0049] A data preprocessing module is configured to obtain fragmented charging data of the power battery in a certain cycle, and screen and combine the fragmented charging data to form voltage-charge amount data;
[0050] an iterative calculation module, configured to iteratively calculate an average slope corresponding to each window using a two-dimensional sliding window method based on the voltage-charge amount data;
[0051] A summarizing module is configured to summarize the average slopes corresponding to all windows and record the minimum average slope and its corresponding window information;
[0052] The feature extraction module is configured to extract the corresponding aging features within the cycle based on the window information, including the window extreme voltage and the accumulated charge amount.
[0053] Compared with the prior art, the present invention has the following beneficial effects:
[0054] (1) Compared with the definition method based on complete charge and discharge data, the present invention is oriented to practical engineering applications. It does not require complete charge and discharge data and can achieve reliable extraction of aging characteristics under random charging behavior, thus supporting multi-state collaborative estimation.
[0055] (2) Compared with the model-based state estimation method, the present invention does not require an in-depth understanding of the electrochemical reaction mechanism inside the lithium-ion battery, nor does it require the establishment of a complex mathematical model or electrochemical model. It only relies on the nonlinear fitting capability of the large language model to establish the mapping relationship between multiple states and input features, thereby greatly improving the flexibility, accuracy and dynamic response capability of the method.
[0056] (3) Compared with the feature engineering methods used in the prior art to extract aging features, the present invention fully considers the typical characteristics of fragmented charging and discharging of electric vehicles in engineering practice, and only relies on conventional parameters such as voltage to achieve effective, efficient and reliable extraction of aging features under random charging behavior, breaking the long-standing barriers of existing methods such as poor flexibility, strict prerequisites and difficulty in effective implementation, and does not require additional data processing and complex calculation processes.
[0057] (4) Compared with the existing data-driven battery multi-state collaborative estimation method, the present invention solves the problem that traditional machine learning / deep learning models can only achieve accurate estimation of a single state on a specific data set. It uses a large language model with a large parameter scale and model fine-tuning technology to clarify the complex coupling relationship between multiple battery states, thereby improving the universal applicability, accuracy and robustness of the method.
[0058] (5) Compared with the mainstream battery multi-state collaborative estimation method, the feature engineering in the present invention is efficient and easy to implement, the estimation performance is stable and reliable, and it does not involve the electrochemical reaction mechanism and aging mechanism of lithium-ion batteries. It can adapt to the complex operating conditions of electric vehicles in actual engineering and has good development potential and scalability.
[0059] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] The accompanying drawings in the specification, 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.
[0061] Figure 1 is a flow chart of a method for extracting aging characteristics of a power battery according to an embodiment;
[0062] Figure 2 is a battery health status decay curve in a data set of an embodiment;
[0063] Figure 3 is a voltage-charge capacity curve of a lithium-ion battery Cell#1 according to an embodiment;
[0064] Figure 4 is a flow chart of a method for collaboratively estimating multiple states of a power battery according to an embodiment;
[0065] Figure 5 is an estimation result of a battery health status of an embodiment;
[0066] Figure 6 is an estimation result of a battery state of charge of an embodiment;
[0067] Figure 7 The following is a prediction result of the remaining service life of a battery in an embodiment. DETAILED DESCRIPTION
[0068] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0069] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0070] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0071] In the absence of conflict, the embodiments in this application and the features in the embodiments may be combined with each other.
[0072] Embodiment 1
[0073] like Figure 1 As shown, this embodiment provides a method for extracting aging characteristics of a power battery. In this embodiment, a lithium-ion battery in an electric vehicle is taken as an example for detailed description.
[0074] The method comprises the following steps:
[0075] Obtain fragmented charging data of lithium-ion batteries in electric vehicles within a certain cycle, and filter and combine voltage-charge data; specifically including:
[0076] Obtain fragmented charging data of lithium-ion batteries in a certain cycle through the battery management system installed in electric vehicles, including voltage, current and charge capacity, etc.; eliminate irrelevant parameter data and retain voltage and charge capacity data;
[0077] Based on the voltage and charge capacity data, the voltage-charge capacity two-dimensional data is combined, with the charge capacity as the x direction and the voltage as the y direction.
[0078] Based on the voltage-charge data, a two-dimensional sliding window technique is used to iteratively calculate the average slope corresponding to each window; specifically, the following steps are included:
[0079] Based on the voltage-charge data, a two-dimensional sliding window technology is used, with a fixed voltage length ΔV as the sliding window size, and the voltage increase direction (i.e., the y direction) as the window sliding direction. In this embodiment, the voltage length ΔV is 0.1V;
[0080] Based on the set sliding window size and sliding direction, the window slides point by point, and the window information corresponding to each slide and the data point information in the window are recorded until all data points are covered and the sliding ends;
[0081] Based on the recorded window information and the data point information in the window, taking the i-th window as an example, assuming that it contains n data points, the slope between two points is calculated point by point in the window, and a total of n-1 slope values {m1,m2,…,m n-1};
[0082] Based on the summarized n-1 slope values, the average slope corresponding to the window is calculated, and the average slopes corresponding to all windows are iteratively calculated based on this; among them, the average slope M corresponding to the i-th window i Defined as:
[0083]
[0084] Based on the average slopes of the windows, all average slopes are summarized and the minimum average slope and its corresponding window information are recorded; specifically including:
[0085] Based on the average slopes of the windows, sum up all the average slopes {M1, M2, ...};
[0086] Extract the minimum average slope M min and its corresponding sliding window information, including the voltage value and charge value corresponding to each data point in the window.
[0087] Based on the window information, the aging characteristics corresponding to the cycle are extracted, including the window extreme voltage and the accumulated charge amount; wherein the window extreme voltage is defined as the maximum voltage value V corresponding to the upper and lower boundaries of the window max and minimum voltage V min , cumulative charge Q c It is defined as the difference between the charge value corresponding to the last data point in the window and the charge value corresponding to the first data point.
[0088] The method and effect of the first embodiment are described below with specific examples:
[0089] 1. Obtain fragmented charging data of lithium-ion batteries in electric vehicles within a certain cycle, and filter and combine voltage-charge data;
[0090] Get a lithium-ion battery data set, which contains 9 battery cells, named Cell#1, #2, #3, #4, #5, #6, #7, #8, and #9. The rated capacity of each cell is 2.5Ah. The battery health decay curves of the above cells are as follows: Figure 2 In order to simulate the random charging behavior of electric vehicles in actual engineering, this case fragmented the original data. Specifically, in any cycle, the original complete data was randomly truncated into charging fragments with a fragment voltage range of 0.2V-0.5V.
[0091] Eliminate irrelevant parameter data and retain the voltage and charge capacity data.
[0092] Based on the voltage and charge data, the voltage-charge two-dimensional data is combined with the charge as the x direction and the voltage as the y direction. The voltage-charge curve of lithium-ion battery Cell#1 is as follows: Figure 3 shown.
[0093] 2. Based on the voltage-charge data, a two-dimensional sliding window technique is used to iteratively calculate the average slope corresponding to each window;
[0094] Based on the voltage-charge amount data, a two-dimensional sliding window technology is used, with a fixed voltage length ΔV=0.1V as the sliding window size and the voltage rising direction (y direction) as the window sliding direction.
[0095] Based on the set sliding window size and sliding direction, the window slides point by point, and the window information corresponding to each slide and the data point information in the window are recorded until all data points are covered and the sliding ends.
[0096] Based on the recorded window information and the data point information in the window, taking the i-th window as an example, assuming that it contains n data points, the slope between two points is calculated point by point in the window, and a total of n-1 slope values {m1,m2,…,m n-1}.
[0097] Based on the summarized n-1 slope values, the average slope corresponding to the window is calculated, and the average slopes corresponding to all windows are iteratively calculated based on this; among them, the average slope M corresponding to the i-th window i Defined as:
[0098]
[0099] 3. Based on the average slopes of the windows, all average slopes are summarized and the minimum average slope and its corresponding window information are recorded;
[0100] Based on the average slopes of the windows, all average slopes {M1, M2, ...} are summed up.
[0101] Extract the minimum average slope M min and its corresponding sliding window information, including the voltage value and charge value corresponding to each data point in the window.
[0102] 4. Based on the window information, extract the aging characteristics corresponding to the cycle, including the window extreme voltage and the accumulated charge capacity;
[0103] The window extreme voltage is defined as the maximum voltage value V corresponding to the upper and lower boundaries of the window max and minimum voltage V min , cumulative charge Qc It is defined as the difference between the charge value corresponding to the last data point in the window and the charge value corresponding to the first data point.
[0104] Embodiment 2
[0105] like Figure 4 As shown, this embodiment provides a method for collaborative estimation of multiple states of a power battery. In this embodiment, the method is implemented based on a large language model and specifically includes the following steps:
[0106] The 3B parameter scale Qwen2.5 large language model disclosed by Alibaba Cloud is used as the large language model in the present invention, and the model architecture, parameters and word segmenter are initialized; specifically, the following are included:
[0107] Based on the 3B parameter-scale large language model, load the model architecture, including the embedding layer, 36 Qwen layers based on the improved Transformer decoder;
[0108] Based on the model architecture, the pre-trained model parameters and tokenizer are loaded for model initialization.
[0109] Based on the 3B parameter-scale large language model, the model input and output are determined according to the multi-state collaborative estimation task, and the input type is adjusted; specifically, it includes:
[0110] Based on the multi-state collaborative estimation task and the power battery aging feature extraction method provided in Example 1, the model input is set to the maximum voltage value V max , minimum voltage value V min , cumulative charge Q c 、Current voltage value V t 、Current current value I t And the estimated health state SOH at the previous moment t-1 , setting the model output to health state, state of charge and remaining useful life;
[0111] Based on the model input and output, the input type is adjusted to a string type, and the output type is adjusted to a floating point type.
[0112] Based on the model input and output, an output layer module is added to the large language model to adapt to the multi-state collaborative estimation task; specifically including:
[0113] Based on the model output type and dimension, an output layer module is added to the large language model, including multiple linear layers and their activation functions and normalization layers, to achieve the conversion of the dimension from 2048 to 2, namely health status and charge status;
[0114] Based on the output layer module, a lightweight model (such as XGBoost) is added to realize the remaining service life prediction when the health status estimation accumulates k values; wherein k is 20.
[0115] Based on the improved large language model and real-world datasets, the low-rank adaptation technique (LoRA) is used to fine-tune the model.
[0116] The actual data set is historically collected data of an actual power battery.
[0117] Specifically include:
[0118] Adjust the data set to simulate actual working conditions and divide it into training set and test set. The training set is used for model fine-tuning, and the test set is used to verify model performance.
[0119] The LoRA technology is used to fine-tune the model and apply it to the query matrix W of the multi-head attention mechanism in the Qwen layer. Q Sum matrix W V superior;
[0120] Based on the fine-tuning technique, the required hyperparameters are set, including a learning rate of 1e-4, a batch size of 128, and a number of training rounds of 50.
[0121] Based on the fine-tuned model and fragmented data, multi-state collaborative estimation is achieved;
[0122] The fragmented data here refers to the newly collected fragmented data within a certain cycle;
[0123] Specifically include:
[0124] The root mean square error (RMSE) is used as an indicator to evaluate the health state and state of charge estimation performance. The difference d between the estimated value and the true value of the number of cycles corresponding to the preset health threshold is used. R As an indicator for evaluating the remaining useful life prediction performance, the preset health threshold is 80%.
[0125] The method and effect of the second embodiment are described below with a specific example:
[0126] 1. The 3B parameter scale Qwen2.5 large language model disclosed by Alibaba Cloud is used as the large language model in the present invention, and the model architecture, parameters and word segmenter are initialized:
[0127] The 3B parameter-scale Qwen2.5 large language model released by Alibaba Cloud is used as the large language model in this case. It includes the Qwen layer based on the improved Transformer decoder, with a total parameter volume of 3.09 billion.
[0128] Based on the 3B parameter-scale large language model, the model architecture is loaded, including the embedding layer and 36 Qwen layers based on the improved Transformer decoder. The embedding layer includes word embedding and rotation position encoding (RoPE), and the Qwen layer includes a multi-head attention mechanism and a feedforward network. This model architecture is used as the model architecture of the large language model in this case, and is loaded in the pre-trained model parameters and word segmenter for model initialization.
[0129] 2. Based on the 3B parameter-scale large language model, determine the model input and output according to the multi-state collaborative estimation task, and adjust the input type:
[0130] Based on the multi-state collaborative estimation task and aging feature extraction method, the model input is set to the maximum voltage value V max , minimum voltage value V min , cumulative charge Q c 、Current voltage value V t 、Current current value I t And the estimated health state SOH at the previous moment t-1 , setting the model output as health state, charge state and remaining service life.
[0131] Based on the model input and output, the input type is adjusted to a string type, that is, {str(V max ),str(V min ),str(Q c ),str(V t ),str(I t ),str(SOH t-1 )}, adjust the output type to floating point type, that is, {SOH t ,SOC t ,RUL t}.
[0132] 3. Based on the model input and output, an output layer module is added to the large language model to adapt to the multi-state collaborative estimation task:
[0133] Based on the model output type and dimension, an output layer module is added to the large language model, including a multi-layer linear layer and its activation function and a normalization layer, to achieve the dimension conversion from 2048 to 2, namely the health state and the charge state. Specifically, the multi-layer linear layer contains four layers, namely {2048,1024}, {1024,256}, {256,64} and {64,2}, and the activation function is unified as ReLU.
[0134] Based on the output layer module, a lightweight model, namely XGBoost, is added to realize the remaining service life prediction when the health state estimation accumulates k values; wherein k is 20.
[0135] 4. Based on the improved large language model and actual data set, the LoRA technology is used to fine-tune the model:
[0136] In this embodiment, the data set comes from a public data set in a journal article (https: / / doi.org / 10.1038 / s41467-022-29837-w). The data set is divided into a training set and a test set. The data of Cell#1, Cell#2, Cell#4, Cell#5, Cell#7, and Cell#8 are set as the training set, and the data of Cell#3, Cell#6, and Cell#9 are set as the test set. The training set is used for model fine-tuning, and the test set is used to verify the model performance.
[0137] The LoRA technology is used to fine-tune the model and apply it to the query matrix W of the multi-head attention mechanism in the Qwen layer. Q Sum matrix W V Set the required hyperparameters, including learning rate of 1e-4, batch size of 128, and number of training rounds of 50.
[0138] 5. Based on the fine-tuned model and fragmented data, multi-state collaborative estimation is achieved:
[0139] The root mean square error (RMSE) is used as an indicator to evaluate the health state and state of charge estimation performance. The difference d between the estimated value and the true value of the number of cycles corresponding to the preset health threshold is used. R As an indicator for evaluating the remaining useful life prediction performance, the preset health threshold is 80%.
[0140] In this case, Figure 5 and Figure 6 The estimation results of battery health status and state of charge are shown respectively, and the corresponding RMSE are 0.0046 and 0.0087. Figure 7 The prediction results of the remaining useful life of Cell#9 are shown. R Only 3.
[0141] The above results show that in the estimation of health status and state of charge, the estimated values can effectively and reliably follow the actual values, and the estimation accuracy is high. Figure 5 As shown in Figure 2, for the battery health status, there are no outliers in the estimated value, and the estimated stability is good. Figure 6 In the , the estimated value of the state of charge is consistent with the true value, and there is no frequent fluctuation caused by the huge model parameters. At the same time, relying on accurate health state estimation, the present invention performs well in the prediction of the remaining service life, such as Figure 7As shown, the remaining useful life can be accurately predicted with only 20 health status estimates.
[0142] Embodiment 3
[0143] A power battery multi-state collaborative estimation system based on a large language model, comprising:
[0144] A model initialization module, configured to initialize a large language model;
[0145] A feature extraction module is configured to perform aging feature extraction under random charging behavior, and extract window extreme value voltage and accumulated charge amount as aging features;
[0146] An input feature determination module is configured to determine the input and output of the model based on the initialized large language model according to the multi-state collaborative estimation task, fuse the aging features extracted by the feature extraction module with the battery state parameters as input features, and adjust the input type;
[0147] A model improvement module is configured to improve the large language model based on the input and output of the model, and add an output layer module to the large language model to adapt to the multi-state collaborative estimation task;
[0148] A model fine-tuning module is configured to fine-tune the model using a low-rank adaptation method based on an improved large language model and actual datasets;
[0149] The multi-state collaborative estimation module is configured to process the target fragmented charging data based on the fine-tuned model to perform multi-state collaborative estimation.
[0150] The feature extraction module comprises:
[0151] A data preprocessing module is configured to obtain fragmented charging data of the power battery in a certain cycle, and screen and combine the fragmented charging data to form voltage-charge amount data;
[0152] an iterative calculation module, configured to iteratively calculate an average slope corresponding to each window using a two-dimensional sliding window method based on the voltage-charge amount data;
[0153] A summarizing module is configured to summarize the average slopes corresponding to all windows and record the minimum average slope and its corresponding window information;
[0154] The feature extraction module is configured to extract the corresponding aging features within the cycle based on the window information, including the window extreme voltage and the accumulated charge amount.
[0155] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0156] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0157] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0158] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0159] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made by those skilled in the art within the spirit and principle of the present invention without creative labor shall be included in the protection scope of the present invention.
Claims
1. A multi-state collaborative estimation method for power batteries based on a large language model, characterized in that: The following steps are involved: Initialize the large language model; Aging feature extraction is performed under random charging behavior, and the window extreme voltage and accumulated charge amount are extracted as aging features; Based on the initialized large language model, the input and output of the model are determined according to the multi-state collaborative estimation task, the extracted aging features are fused with the battery state parameters as input features, and the input type is adjusted; Based on the input and output of the model, the large language model is improved, and an output layer module is added to the large language model to adapt to the multi-state collaborative estimation task; Based on the improved large language model and actual dataset, the low-rank adaptation method is used to fine-tune the model; The target fragmented charging data is processed based on the fine-tuned model to perform multi-state collaborative estimation.
2. The method for collaboratively estimating multiple states of a power battery based on a large language model as claimed in claim 1, characterized in that: The process of aging feature extraction under random charging behavior includes: Obtaining fragmented charging data of a power battery in a certain cycle, and screening and combining the fragmented charging data to form voltage-charge amount data; Based on the voltage-charge data, a two-dimensional sliding window method is used to iteratively calculate the average slope corresponding to each window; Summarize the average slopes corresponding to all windows, and record the minimum average slope and its corresponding window information; Based on the window information, the corresponding aging characteristics within the cycle are extracted, including the window extreme voltage and the accumulated charge capacity.
3. The method for multi-state collaborative estimation of a power battery based on a large language model as claimed in claim 2, characterized in that: The process of obtaining fragmented charging data of a power battery in a certain cycle, and screening and combining the fragmented charging data to form voltage-charge capacity data includes: Obtain the voltage, current and charge capacity data of the power battery, remove irrelevant parameter data, and retain the voltage and charge capacity data; Based on the voltage and charge data, the charge is in the x direction and the voltage is in the y direction, and the voltage-charge two-dimensional data is combined; Alternatively, based on the voltage-charge data, a process of iteratively calculating the average slope corresponding to each window using a two-dimensional sliding window method includes: Based on the voltage-charge data, a two-dimensional sliding window method is adopted, with a set voltage length ΔV as the sliding window size and a voltage increase direction as the window sliding direction; According to the set sliding window size and sliding direction, the window slides point by point, and the window information corresponding to each slide and the data point information in the window are recorded until all data points are covered and the sliding ends; Based on the recorded window information and the data point information in the window, if a window contains multiple data points, the slope between two points is calculated point by point in the window, and a total of n-1 slope values {m1,m2,…,m n-1 }, n is the total number of data points in the window; Based on the summarized n-1 slope values, the average slope corresponding to the window is calculated, and the average slopes corresponding to all windows are iteratively calculated based on this; among them, the average slope M corresponding to the i-th window i Defined as: Or, the process of summarizing the average slopes corresponding to all windows and recording the minimum average slope and its corresponding window information includes: summarizing all average slopes {M1, M2, ...} based on the average slopes of the windows; Extract the minimum average slope M min and its corresponding sliding window information, including the voltage value and charge value corresponding to each data point in the window.
4. The method for collaboratively estimating multiple states of a power battery based on a large language model as claimed in claim 2, characterized in that: The window extreme voltage is the maximum voltage value V corresponding to the upper and lower boundaries of the window. max and minimum voltage V min , cumulative charge Q c It is the difference between the charge value corresponding to the last data point in the window and the charge value corresponding to the first data point.
5. The method for collaboratively estimating multiple states of a power battery based on a large language model as claimed in claim 1, characterized in that: The process of determining the input and output of the model according to the multi-state collaborative estimation task and adjusting the input includes: setting the model input to the maximum voltage value V max , minimum voltage value V min , cumulative charge Q c , and the current voltage value V t 、Current current value I t And the estimated health state SOH at the previous moment t-1 , setting the model output to health state, state of charge and remaining useful life; Based on the model input and output, the input type is adjusted to a string type, and the output type is adjusted to a floating point type.
6. The method for multi-state collaborative estimation of a power battery based on a large language model as claimed in claim 1, characterized in that: The process of improving the large language model includes: adding an output layer module to the large language model based on the model output type and dimension, wherein the output layer module includes a multi-layer linear layer and its activation function and a normalization layer to achieve the conversion of the dimension from 2048 to 2, i.e., the health state and the charge state; Based on the output layer module, a lightweight model is added to realize the remaining service life prediction when the health state estimation accumulates to a set value.
7. The method for multi-state collaborative estimation of a power battery based on a large language model as claimed in claim 1, characterized in that: The historical data obtained from actual power batteries is used as the actual data set, and the actual data set is divided into a training set and a test set. The training set is used to fine-tune the large language model, and the test set is used to verify the performance of the large language model. Apply the low-rank adaptation method to the query matrix W of the multi-head attention mechanism in the Qwen layer of the large language model Q Sum matrix W V superior; Based on the low-rank adaptation method, the required hyperparameters are set, including the learning rate of 1e-4, the batch size of 128, and the number of training rounds of 50.
8. The method for multi-state collaborative estimation of a power battery based on a large language model as claimed in claim 1, characterized in that: In the process of multi-state collaborative estimation, the root mean square error is used as an indicator to evaluate the health state and charge state estimation performance, and the difference d between the estimated value and the true value of the number of cycles corresponding to the preset health threshold is used. R As an indicator to evaluate the remaining useful life prediction performance.
9. A power battery multi-state collaborative estimation system based on a large language model, characterized in that: include: A model initialization module, configured to initialize a large language model; A feature extraction module is configured to perform aging feature extraction under random charging behavior, and extract window extreme value voltage and accumulated charge amount as aging features; An input feature determination module is configured to determine the input and output of the model based on the initialized large language model according to the multi-state collaborative estimation task, fuse the aging features extracted by the feature extraction module with the battery state parameters as input features, and adjust the input type; A model improvement module is configured to improve the large language model based on the input and output of the model, and add an output layer module to the large language model to adapt to the multi-state collaborative estimation task; A model fine-tuning module is configured to fine-tune the model using a low-rank adaptation method based on an improved large language model and actual datasets; The multi-state collaborative estimation module is configured to process the target fragmented charging data based on the fine-tuned model to perform multi-state collaborative estimation.
10. A power battery multi-state collaborative estimation system based on a large language model as claimed in claim 9, characterized in that: The feature extraction module comprises: A data preprocessing module is configured to obtain fragmented charging data of the power battery in a certain cycle, and screen and combine the fragmented charging data to form voltage-charge amount data; an iterative calculation module, configured to iteratively calculate an average slope corresponding to each window using a two-dimensional sliding window method based on the voltage-charge amount data; A summarizing module is configured to summarize the average slopes corresponding to all windows and record the minimum average slope and its corresponding window information; The feature extraction module is configured to extract the corresponding aging features within the cycle based on the window information, including the window extreme voltage and the accumulated charge amount.
Citation Information
Patent Citations
Battery attenuation value prediction method based on time sequence, related method and device
CN117907866A
Battery health state evaluation method and system based on optimal voltage fragment search
CN118244151A
Large language model training method and device, electronic equipment and storage medium
CN118673324A
Battery management system and method and electronic equipment
CN118738604A
Battery health state estimation method and system based on pre-training large language model
CN118897198A
Cited By
Lithium ion battery multi-state collaborative estimation method and system based on battery large model
CN121142347A
Lithium ion battery multi-state collaborative estimation method and system based on battery large model
CN121142347B