A method for predicting battery health at large scale for energy storage power plants
By deploying large-model and vector databases privately, and performing differentiated analysis with the results of large-model and vector search, the problem of high computing power and data labeling costs in battery health prediction of energy storage power stations is solved, and accurate prediction and optimization evaluation of battery health is achieved.
Patent Information
- Application Number
- CN202510355816.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2045-03-25
AI Technical Summary
When using large models to predict the health of energy storage power station batteries, the prior art faces the problems of high computing power investment and data labeling costs in the field, and it is difficult to achieve accurate prediction and optimization evaluation.
By deploying large models privately, pre-processing within the domain data and initializing vector databases, designing Prompt for large model prediction and iterative optimization, combining the large model and vector search results for differentiated analysis, and generating integrated SOH prediction values and optimization suggestions.
Accurate prediction and optimization evaluation of the health of energy storage power station batteries is achieved, the computing power and data labeling costs during the prediction process are reduced, and the stability and reliability of the prediction results are improved.
Smart Images

Figure CN119885678B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of energy storage management, and particularly to a method for large-scale prediction of battery health for energy storage power stations. Background Art
[0002] The State of Health (SOH) of a battery is one of the core indicators of battery health. Usually, the battery aging degree is characterized by the battery capacity or the battery internal resistance, which is closely related to the working safety and stability of the energy storage power station. Currently, there is no unified standard definition for the battery health. The mainstream definition of the battery health is: the ratio of the actual available capacity to the rated capacity when the battery is healthy. The aging of batteries, especially lithium batteries, is a long-term and complex process, which is affected by factors such as electrochemical reactions, charge and discharge cycles, temperature changes, and usage patterns. And these factors are complex and non-linear, making it difficult to accurately capture them through traditional modeling methods. The existing battery health prediction mainly includes direct measurement methods, model-based prediction methods, and data-driven methods.
[0003] With the development of big data and artificial intelligence, model-based prediction methods have gradually gained attention. However, the prediction of battery health in energy storage power stations based on large model technology still faces the following challenges: First, common large models are general large models, and specific domain knowledge is required to play the role of the large model in different fields; Second, there are large computing power investment supports and domain data annotation cost requirements for fine-tuning the large model with knowledge in a specific domain; Third, the large model is a language model, and there are still great difficulties in realizing accurate prediction applications; Fourth, there are few existing large models for question-and-answer applications related to the battery health of energy storage power stations. Summary of the Invention
[0004] In order to solve the problems that the computing power and the input cost of domain data annotation required for large-scale prediction of battery health in energy storage power stations by using large models are relatively large, it is impossible to conduct targeted and accurate prediction and optimization evaluation on the battery health of energy storage power stations, and reliable and effective large model prediction for specific domains of energy storage power stations, the present invention provides a method for large-scale prediction of battery health for energy storage power stations, and the method includes the following steps:
[0005] Step S1, privately deploy a large model; preprocess the domain data to obtain processed data; initialize a vector database, and import the processed data into the vector database;
[0006] Step S2, design the first Prompt. The first prompt is used to encapsulate battery test data and guide the large model for initial prediction. The input text for initial prediction encapsulates the input test data. After the first Prompt, call the large model to predict the input test data to obtain the SOH prediction value of the large model; based on the input test data, retrieve N SOH values from the vector database;
[0007] Step S3, based on the SOH prediction value of the large model and the N retrieved SOH values, optimize the first Prompt, and based on the optimized first Prompt, call the large model to perform iterative prediction on the input test data until the SOH prediction value of the large model obtained by iterative prediction meets the preset conditions;
[0008] Step S4, based on the SOH prediction value of the large model that meets the preset conditions and the N retrieved SOH values, obtain the integrated SOH prediction value; design the second Prompt. The second prompt is the input text that guides the large model to generate battery health status evaluation and optimization suggestions based on the integrated SOH value. Based on the integrated SOH prediction value and the second Prompt, call the large model to output battery health evaluation and optimization suggestions.
[0009] Preferably, the privatized deployment of the large model is specifically as follows:
[0010] Privatize the Qwen2.5 - 7B model in any of the system environments of ubuntu22.04, Python 3.10, PyTorch 2.1.0, and Cuda 12.1.
[0011] Preferably, the pre - processing of the in - domain data to obtain the processed data is specifically as follows:
[0012] Clean the outliers and null values from the battery data under laboratory simulated working conditions; among them, the battery data under laboratory simulated working conditions includes the parameter data measured for several batteries under laboratory simulated working conditions;
[0013] Based on the battery capacity data included in the battery data under laboratory simulated working conditions after the cleaning process, calculate several SOH values; based on the calculated SOH values, perform SOH label addition processing on the battery data under laboratory simulated working conditions after the cleaning process to generate feature column data;
[0014] Normalize the feature column data to obtain the processed data.
[0015] Preferably, the initialization of the vector database and the import of the processed data into the vector database are specifically as follows:
[0016] Initialize the Faiss vector database and import the processed data into the Faiss vector database.
[0017] Preferably, design the first Prompt. After encapsulating the input test data into the first Prompt, call the large model to predict the input test data to obtain the large model SOH prediction value. Specifically:
[0018] Design a Prompt for prediction, and obtain the test data of the target battery; based on the Prompt for prediction, encapsulate the test data, and then call the large model to predict the encapsulated test data to obtain the large model SOH prediction value corresponding to the target battery.
[0019] Preferably, based on the input test data, retrieve N SOH values from the vector database. Specifically:
[0020] Perform vectorization processing on the input test data to obtain vectorized input test data; perform similarity retrieval on the vectorized input test data and all vector data in the vector database, and retrieve N SOH values from the vector database; where the N SOH values refer to the SOH values included in the top N vector data in the vector database that have the highest similarity to the vectorized input test data.
[0021] Preferably, optimize the first Prompt based on the large model SOH prediction value and the retrieved N SOH values, including:
[0022] Obtain the SOH mean value corresponding to the retrieved N SOH values;
[0023] Based on the numerical difference between the large model SOH prediction value and the SOH mean value, splice the numerical difference to the first Prompt to optimize the first Prompt.
[0024] Preferably, based on the optimized first Prompt, call the large model to perform iterative prediction on the input test data until the large model SOH prediction value obtained by the iterative prediction meets the preset conditions. This includes:
[0025] Based on the optimized first Prompt, call the large model to perform iterative prediction on the input test data to obtain a new large model SOH prediction value; determine whether the magnitude difference between the new large model SOH prediction value and the SOH mean value meets the preset conditions;
[0026] If it is satisfied, the current new large model SOH prediction value is used as the large model SOH prediction value that meets the preset conditions; if it is not satisfied, the first Prompt is optimized again, and the large model is called to perform iterative prediction on the input test data to obtain a new large model SOH prediction value until the new large model SOH prediction value meets the preset conditions.
[0027] Preferably, based on the large model SOH prediction value that meets the preset conditions and the retrieved N SOH values, an integrated SOH prediction value is obtained, including:
[0028] Obtain the SOH mean value corresponding to the retrieved N SOH values;
[0029] Then, based on the corresponding weight ratio, weighted average processing is performed on the large model SOH prediction value that meets the preset conditions and the SOH mean value to obtain an integrated SOH prediction value.
[0030] Preferably, a second Prompt is designed, and based on the integrated SOH prediction value and the second Prompt, the large model is called to output battery health evaluation and optimization suggestions, including:
[0031] Design a battery health evaluation and optimization Prompt, load the battery health evaluation and optimization Prompt into the large model; call the large model to process the integrated SOH prediction value and the output test data to obtain battery health evaluation and optimization suggestions that match the battery health evaluation and optimization Prompt.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] First, the large model can be accurately applied to the prediction scenarios of battery core indicators such as the battery health degree of energy storage power stations;
[0034] Second, combining the large model for predicting and evaluating the battery health degree and outputting optimization suggestions realizes a closed-loop in the battery health status monitoring process;
[0035] Third, a retrieval enhancement method based on the large model is used to integrate battery data under different working conditions, and the battery data can be dynamically adjusted to make the prediction results more stable;
[0036] Fourth, a feedback link is added to the large model prediction process. Through differential analysis of the results of large model prediction and vector retrieval results, improvement suggestions are proposed to ensure the reliability of battery health degree prediction. Description of the Drawings
[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings. Among them:
[0038] Figure 1 is a flowchart of the method for large-scale prediction of battery health for an energy storage power station provided by the present invention. Detailed implementation manners
[0039] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following will, with reference to the drawings, give a detailed description of the specific implementation manners of the present invention. It can be understood that the specific embodiments described herein are only used to explain the present invention, rather than limiting the present invention. Additionally, it should be noted that for the convenience of description, only the parts related to the present invention rather than all the structures are shown in the drawings. Based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
[0040] The terms "include" and "have" in the present invention and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products, or devices.
[0041] Referring to the following, when "embodiment" is mentioned in this article, it means that the specific features, structures, or characteristics described in combination with the embodiment can be included in at least one embodiment of the present invention. The phrase appears in various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0042] Please refer to Figure 1 As shown, the present invention provides a method for large-scale prediction of battery health for an energy storage power station, and the method includes the following steps:
[0043] Step S1, privately deploy a large model; preprocess the data in the field to obtain processed data; initialize the vector database and import the processed data into the vector database.
[0044] Further, privately deploying the large model specifically means:
[0045] Privatize the deployment of the Qwen 2.5-7B model in any of the system environments of ubuntu 22.04, Python 3.10, PyTorch 2.1.0, and Cuda 12.1.
[0046] In actual work, the base class selection of the large model can be made according to actual needs. Among them, it is preferable to use the Qwen 2.5-7B model as the large model, considering that the Qwen 2.5-7B model is a relatively new domestic large model at present, and its various performances are superior among large models with the same level of parameters, and it has good support for Chinese. During the process of privatizing the deployment of the large model, environment preparation is also required, to confirm that the server hardware configuration meets the requirements for the deployment of the large model, and to install the necessary software environment, where the software environment can be but is not limited to any of the system software environments of ubuntu 22.04, Python 3.10, PyTorch 2.1.0, and Cuda 12.1. Additionally, during the process of privatizing the deployment of the large model, the server hardware information can be but is not limited to: CPU: 18 vCPU AMD EPYC 9754 128-Core; GPU: RTX 4090D (24GB) 1; Memory: 60GB; And during the process of privatizing the deployment of the large model, pull the model-related files from HuggingFace or ModelScope.
[0047] The privatized deployment of the large model has the following advantages: It can ensure that data does not leave the enterprise internal environment, guaranteeing data privacy and security; It allows the enterprise to optimize the performance of the model in specific scenarios according to its own needs. Through large model technology, specific domain knowledge, industry terms, and data can be embedded, making the large model more professional and useful and not limited by third parties; It can provide services in an offline mode, reducing dependence on the outside and risks.
[0048] Furthermore, preprocess the data within the domain to obtain processed data, specifically:
[0049] Clean the outlier and null values of the battery data under laboratory simulated working conditions; Among them, the battery data under laboratory simulated working conditions includes the parameter data measured for several batteries under laboratory simulated working conditions;
[0050] Based on the battery capacity data included in the battery data under laboratory simulated working conditions that has completed the cleaning process, calculate a number of SOH values; Based on the calculated SOH values, perform SOH label addition processing on the battery data under laboratory simulated working conditions that has completed the cleaning process to generate feature column data;
[0051] Normalize the feature column data to obtain processed data.
[0052] For the data within the domain (i.e., data related to the operation of batteries in an energy storage power station, etc.), the preprocessing of the data within the domain mainly includes two processes: data cleaning and data normalization. Specifically,
[0053] Data cleaning includes cleaning the outlier and null values of the battery data under laboratory simulated conditions. The battery data under laboratory simulated conditions may include, but is not limited to, parameter data such as current, voltage, charge and discharge time consumption, number of cycles, battery capacity, etc. measured for a certain number of batteries under laboratory simulated conditions. By cleaning the outlier and null values of the above-mentioned battery data under laboratory simulated conditions, the reliability of the battery data can be improved, and the credibility of the subsequent battery health prediction can be avoided from being affected by outlier data and null data. Among them, the acquisition process of the battery data under laboratory simulated conditions is as follows:
[0054] DEBUG: Prompt sent to model: "#prompt input "
[0055] This is the discharge cycle data of a lithium iron phosphate battery:
[0056] Cycle number: 8
[0057] Average voltage: 3.1818v
[0058] Maximum voltage: 3.4747v
[0059] Minimum voltage: 1.9994v
[0060] Voltage difference: 1.4753v
[0061] Discharge time consumption: 7531.0 seconds
[0062] Based on the battery capacity data contained in the laboratory simulated condition battery data after cleaning processing, calculate the SOH value corresponding to each battery, where the above SOH value is equal to the ratio between the actual battery capacity corresponding to the battery capacity data and the rated battery capacity. In this way, each battery data corresponding to the laboratory simulated condition corresponds to a unique SOH value. Given the one-to-one correspondence between each SOH value and each group of battery data under the laboratory simulated condition, perform SOH label addition processing on the laboratory simulated condition battery data after cleaning processing, that is, add the corresponding SOH value as a label to the battery data corresponding to each battery to generate feature column data. Then perform normalization processing on the feature column data to obtain processed data. The above normalization processing belongs to the conventional technical means in this field and will not be elaborated here. By performing normalization processing on the feature column data, the data range can be unified, enabling the large model to converge faster when searching for the optimal solution; it can, to a certain extent, avoid certain features dominating in the calculation and ignoring the importance of other features; reduce the sensitivity of the large model to outliers; normalization compresses the feature values into a fixed range (such as [0, 1]), reducing the impact of outliers on the overall data distribution.
[0063] Furthermore, initialize the vector database and import the processed data into the vector database, specifically:
[0064] Perform initialization processing on the Faiss vector database and import the processed data into the Faiss vector database.
[0065] Considering that Faiss is an efficient vector retrieval library designed to handle massive high-dimensional vector data, the present invention selects the Faiss vector database as the vector database. The core process of vectorizing structured data is to convert the numerical, categorical, and time features in the data into dense vectors respectively, and then form a unified vector representation through concatenation; after vectorization is completed, Faiss can efficiently and quickly index and retrieve semantically similar structured data. Performing initialization processing on the Faiss vector database and importing the processed data into the Faiss vector database can achieve the conversion of the vectorized representation of the processed data, enabling efficient similarity retrieval in the high-dimensional space. In addition, the vectorization of the processed data can be updated in real time, new data can be dynamically added to the knowledge base, and the updated data is directly stored in vectorized form without retraining the model, reducing the cost of fine-tuning training.
[0066] Step S2: Design the first Prompt. The first prompt is the input text used to encapsulate battery test data and guide the large model for initial prediction. After encapsulating the input test data into the first Prompt, call the large model to predict the input test data to obtain the SOH prediction value of the large model; Based on the input test data, retrieve N SOH values from the vector database.
[0067] Furthermore, design the first Prompt. After encapsulating the input test data into the first Prompt, call the large model to predict the input test data to obtain the SOH prediction value of the large model. Specifically:
[0068] Design the Prompt for prediction, and obtain the test data of the target battery; Based on the prediction Prompt, after encapsulating the test data, call the large model to predict the encapsulated test data to obtain the SOH prediction value of the large model corresponding to the target battery. Among them, the process of calling the large model to predict the encapsulated test data to obtain the large-scale SOH prediction value is as follows:
[0069] DEBUG: Full model response: "# Model response "
[0070] {
[0071] "model": "gwen2.5: latest" "# Model version "
[0072] "created at": "2024-12-10T03:32:41.291164237Z" "# Creation time "
[0073] "message": {
[0074] "role": "assistant"
[0075] "content": "To predict the SOH (state of Health) of the battery, we first need to understand the usage and aging patterns of the battery. "
[0076] “Based on the data you provided and the commonly used aging model of lithium iron phosphate batteries, we can use a non-linear regression algorithm to fit the S0H values of the battery at different cycle numbers. ”
[0077] "The given information includes: ”
[0078] "- Cycle number: 8 "
[0079] "- Average voltage: 3.1818 V "
[0080] "- Maximum voltage: 3.4747 V "
[0081] "- Minimum voltage: 1.9994 V "
[0082] "- Voltage difference: 1.4753 V "
[0083] "- Discharge time: 7531 s "
[0084] "According to the common aging model of lithium iron phosphate batteries, we can use the exponential decay model to predict the SOH of the battery. The general form of this model is: "
[0085] "\\[ SOH(t)= SOH_ 0\\cdot e^{-kt}\\] "
[0086] "Where: "
[0087] "- \\(SOH(t)\\) is the SOH value at time \\(t\\). "
[0088] "- \\(SOH_0\\) is the initial S0H value (100.0%). "
[0089] "- \\(k\\) is the decay constant, and its value is related to the battery aging rate. "
[0090] "We can estimate the value of \\(k\\) through historical data. "
[0091] "Assuming the average aging law of other lithium iron phosphate batteries under the same discharge conditions, we can use the known SOH value after 5000 cycles (usually about 80%) to calculate the value of \\(K\\) by reverse calculation. "
[0092] "The specific calculation process is relatively complex, but it can be simplified to be obtained by fitting known data points. "
[0093] "Suppose we have obtained a suitable value of \(K\) and applied it to the current data for prediction. After model fitting and parameter adjustment, we can obtain the SOH value at cycle number 8. "
[0094] "Based on this information and the common battery aging model, we can conclude that: "
[0095] "```python "
[0096] "import numpy as np "
[0097] "# Known data points "
[0098] "initial soh = 100.0 # Initial state of health "
[0099] "target_soh = 80.0 # Expected target state of health (SOH value after 5000 cycles) "
[0100] "cycles_to_target_soh = 5000 "
[0101] "# Calculate the decay constant k "
[0102] "k = -np.log(target_soh / initial_soh) / cycles_to_target_soh "
[0103] "# Current cycle number "
[0104] "current_cycles = 8 "
[0105] "# Predict the current SOH value "
[0106] "predicted_soh = initial_soh * np.exp(-k * current_cycles) " " "
[0107] “``` "
[0108] "After the above calculations, we can obtain the predicted SOH value. Assuming the calculation result is: "
[0109] "\\[ \\text{Battery health} = 97.0\\% \\] "
[0110] "Therefore, the final output is: "
[0111] "`The battery health is: 97.0’"
[0112] },
[0113] "done_reason": "stop' # Model status "
[0114] "done": true,
[0115] "total_duration": 5217956007, "# Total time taken for the model to generate messages "
[0116] "load_duration": 16782280, "# Total time taken to load the model "
[0117] "prompt_eval_count": 285, " # Number of prompt evaluations "
[0118] "prompt_eval_duration": 19000000, "# Total time taken for prompt evaluation "
[0119] "eval_count": 578, "# Number of evaluations for the model to generate messages "
[0120] "eval_duration": 5168000800 "# Total time taken for the evaluation of the model to generate messages "
[0121] }
[0122] Large models such as the Qwen2.5-7B model are language models. During the interaction with large models, a piece of text needs to be input, and the Prompt (prompt word) corresponds to the piece of text to be input. The Prompt is used to guide the large model to generate or complete the output of the task. The Prompt is the interface between the user and the large model. By designing a reasonable Prompt, the behavior of the large model can be controlled, thereby solving different tasks.
[0123] Specifically, the functions of the Prompt include: task description, which clearly tells the large model the task to be completed; context guidance, which provides relevant context information for the large model to make the output more accurate; format requirements, which clearly specify the output format; behavior control, which guides the direction of the large model's answer through tone and content examples. The design principles of the Prompt include: clarifying the task goal, that is, accurately conveying the task requirements and avoiding ambiguity; providing context information, that is, if the task requires specific background knowledge, include the necessary context in the Prompt; reducing openness, as open-ended Prompts are likely to cause the output to deviate from expectations, and appropriate restrictions should be added; concise language, that is, avoiding complex sentences or obscure expressions to ensure that the large model understands the task to be completed. Therefore, based on the above design principles, design the Prompt for prediction, which can ensure that the large model accurately completes the corresponding prediction task.
[0124] In addition, the test data of the target battery (i.e., the battery whose health needs to be determined), such as the current, voltage, capacity, etc. of the battery, are also obtained. That is, based on the prediction Prompt obtained from the above design, the test data are encapsulated, and then the large model is called to predict the encapsulated test data to obtain the predicted SOH value of the target battery corresponding to the large model, and the SOH value of the target battery is predicted at the large model level.
[0125] Furthermore, based on the input test data, N SOH values are retrieved from the vector database, specifically:
[0126] The input test data is vectorized to obtain the vectorized input test data; the vectorized input test data is retrieved for similarity with all vector data in the vector database, and N SOH values are retrieved from the vector database; where the N SOH values refer to the SOH values included in the top N vector data in the vector database that have the highest similarity to the vectorized input test data. Among them, the process of retrieving N SOH values (N = 3) from the vector database is as follows:
[0127]
[0128] The input test data is vectorized to obtain the input test data in vector form (i.e., vectorized input test data). In this way, the input test data in vector form has the same data structure as all vector data in the vector database. At this time, the vector database can be directly retrieved based on the input test data in vector form. Specifically, the vectorized input test data is retrieved for similarity with all vector data in the vector database to obtain the similarity between the vectorized input test data and each vector data in the vector database. Then, the SOH values included in the subordinate of the first N vector data with the highest similarity are used as the finally retrieved N SOH values; where N can be a positive integer greater than or equal to 3.
[0129] Step S3: Based on the SOH prediction value of the large model and the retrieved N SOH values, optimize the first Prompt, and based on the optimized first Prompt, call the large model to iteratively predict the input test data until the SOH prediction value obtained by the iterative prediction of the large model meets the preset conditions.
[0130] Furthermore, optimizing the first Prompt based on the SOH prediction value of the large model and the retrieved N SOH values includes:
[0131] Obtain the SOH mean value corresponding to the retrieved N SOH values;
[0132] Based on the numerical difference between the SOH prediction value of the large model and the SOH mean value, splice the numerical difference to the first Prompt to optimize the first Prompt accordingly.
[0133] In actual work, first calculate the arithmetic mean value of the N SOH values to obtain the SOH mean value; then calculate the difference between the SOH prediction value of the large model and the SOH mean value to obtain the numerical difference between the two, and then splice the above numerical difference value to the first Prompt, thereby optimizing the Prompt for prediction (i.e., the first Prompt), and making effective feedback adjustments for the subsequent loop prediction of the battery health by the large model.
[0134] Furthermore, based on the optimized first Prompt, calling the large model to iteratively predict the input test data until the SOH prediction value obtained by the iterative prediction of the large model meets the preset conditions includes:
[0135] Based on the optimized first Prompt, call the large model to iteratively predict the input test data to obtain a new SOH prediction value of the large model; determine whether the magnitude difference between the new SOH prediction value of the large model and the SOH mean value meets the preset conditions;
[0136] If it is satisfied, the current new large model SOH prediction value is used as the large model SOH prediction value that meets the preset conditions; if it is not satisfied, the first Prompt is optimized again, and the large model is called to perform iterative prediction on the input test data to obtain a new large model SOH prediction value until the new large model SOH prediction value meets the preset conditions.
[0137] Using the optimized first Prompt, the large model is called to perform iterative prediction on the input test data to obtain a new large model SOH prediction value, and it is judged whether the size difference ratio between the new large model SOH prediction value and the SOH mean value is less than the preset ratio threshold, that is, to judge whether (new large model SOH prediction value - SOH mean value) / new large model SOH prediction value is less than the preset ratio threshold (such as 2% or 5%, etc.); if it is less than the preset ratio threshold, it is determined that the size difference between the new large model SOH prediction value and the SOH mean value meets the preset conditions, and at this time, the current new large model SOH prediction value is used as the large model SOH prediction value that meets the preset conditions; if it is not less than the preset ratio threshold, it is determined that the size difference between the new large model SOH prediction value and the SOH mean value does not meet the preset conditions, and at this time, the first Prompt is optimized again, and the large model is called to perform iterative prediction on the input test data to obtain a new large model SOH prediction value until the new large model SOH prediction value meets the preset conditions.
[0138] The optimized first Prompt (i.e., the optimized Prompt for prediction) is reloaded into the large model to realize the data addition and update of the original large model SOH prediction value, so as to be used in the next prediction of the large model for the input test data, to perform targeted and accurate prediction and optimization evaluation on the battery health of the energy storage power station, and to perform reliable and effective large model prediction on specific fields of the energy storage power station.
[0139] Step S4, based on the large model SOH prediction value that meets the preset conditions and the retrieved N SOH values, obtain an integrated SOH prediction value; design a second Prompt, and the second prompt is an input text based on the integrated SOH value to guide the large model to generate battery health status evaluation and optimization suggestions. Based on the integrated SOH prediction value and the second Prompt, call the large model to output battery health evaluation and optimization suggestions.
[0140] Furthermore, based on the large model SOH prediction value that meets the preset conditions and the retrieved N SOH values, obtaining an integrated SOH prediction value includes:
[0141] Obtain the SOH mean value corresponding to the retrieved N SOH values;
[0142] Based on the corresponding weight ratio, the predicted SOH value and the average SOH value of the large model that meet the preset conditions are weighted and averaged to obtain the integrated SOH predicted value.
[0143] In actual work, first calculate the arithmetic mean of N SOH values to obtain the average SOH value ; then, based on the corresponding weight ratio, for the predicted SOH value of the large model and the average SOH value perform weighted average processing to obtain the integrated SOH predicted value ; for example: 。
[0144] By performing weighted average processing on the predicted SOH value of the large model and the average SOH value, the SOH values of these two are combined, making the integrated SOH predicted value more stable.
[0145] Furthermore, design a second Prompt. Based on the integrated SOH predicted value and the second Prompt, call the large model to output battery health evaluation and optimization suggestions, including:
[0146] Design a battery health evaluation and optimization Prompt, load the battery health evaluation and optimization Prompt into the large model; call the large model to process the integrated SOH predicted value and the output test data to obtain battery health evaluation and optimization suggestions that match the battery health evaluation and optimization Prompt.
[0147] When the integrated SOH predicted value of the test battery is greater than 95:
[0148] DEBUG: Full model response: "#Model response "
[0149] {
[0150] "model": "qwen2.5: latest", "#Model version "
[0151] "created at": "2024-12-10T07:25:34.4285482332", "#Creation time "
[0152] "message": {
[0153] "role": "assistant",
[0154] "content": "The SOH health of the current lithium iron phosphate battery is 96.56, indicating that the overall health of the battery is good and it is close to the full load operation state. "
[0155] "For the application scenario of energy storage power plants, the following optimization measures are recommended: "
[0156] "1. Regular maintenance : Conduct battery performance detection and cleaning once every quarter. "
[0157] "2. Temperature control : Keep the battery operating within an appropriate temperature range (about 20 - 35 °C) to avoid overheating or overcooling. "
[0158] "3. Balanced charging : Use an intelligent management system to balance the voltages of each individual battery and prevent overcharging or over-discharging. "
[0159] "4. Load management : Optimize the load distribution of the energy storage system to reduce large current surges. "
[0160] "Summary: The S0H health of the current lithium iron carbonate battery is good. For the application scenario of energy storage power plants, daily maintenance and fine management of temperature and load should be emphasized to ensure long-term stable operation."
[0161] },
[0162] "done_reason": "stop", "# Model status "
[0163] "done": true,
[0164] "total_duration": 1466557467, "# Total time taken for the model to generate the message "
[0165] "load_duration": 16705462, "# Total time taken to load the model "
[0166] "prompt_eval_count": 196, " # Number of prompt evaluations "
[0167] "prompt_eval_duration": 19000000, "#Total time taken for prompt evaluation "
[0168] "eval_count": 166, "#Number of evaluations of model-generated messages "
[0169] "eval_duration": 1423000000 "#Total time taken for evaluation of model-generated messages "
[0170] }
[0171] When the integrated SOH prediction value of the test battery is greater than or equal to 80 and less than or equal to 95:
[0172] DEBUG: Full model response: "#Model response "
[0173] {
[0174] "model": "qwen2.5:latest", "#Model version "
[0175] "created at": "2024-12-10T07:47:23.817322235Z", " #Creation time "
[0176] "message": {
[0177] "role": "assistant",
[0178] "content": "The SOH health of the current lithium iron phosphate battery is 90.08, indicating that the overall health of the battery is good, but there is still a certain risk of degradation. "
[0179] "For the energy storage power plant usage scenario, the following optimization measures are recommended: "
[0180] "1. Regular maintenance : Conduct a deep discharge test once every quarter to ensure stable battery performance. "
[0181] "2. Temperature control : Keep the battery working in an environment around 25°C to avoid high temperatures affecting the battery life. "
[0182] "3. Balanced charging : Use a smart equalizer to regularly balance the battery charge and prevent local overheating. "
[0183] "4. Load management : Reasonably arrange the charge and discharge strategies to avoid frequent large - current charge and discharge. "
[0184] "Summary: For the lithium iron phosphate batteries in energy storage power plants, through scientific maintenance and reasonable management, the battery life can be effectively extended and the system reliability can be improved."
[0185] },
[0186] "done_reason": "stop", "# Model status "
[0187] "done": true,
[0188] "total_duration": 1422452249, "# Total time taken for the model to generate messages "
[0189] "load_duration": 36079918, "# Total time taken to load the model "
[0190] "prompt_eval_count": 196, " # Number of prompt evaluations "
[0191] "prompt_eval_duration": 18000000, "# Total time taken for prompt evaluations "
[0192] "eval_count": 153, "# Number of evaluations for the model - generated messages "
[0193] "eval_duration": 1355000000 "# Total time taken for evaluations of the model - generated messages "
[0194] }
[0195] When the integrated SOH prediction value of the test battery is less than 80:
[0196] DEBUG: Full model response: "#Model response "
[0197] {
[0198] "model": "qwen2.5:latest", "#Model version "
[0199] "created at": "2024-12-10T09:26:02.150231452Z", " #Creation time "
[0200] "message": {
[0201] "role": "assistant",
[0202] "content": "According to the provided data, after 1646 cycles, the predicted health value (SOH) of the lithium iron phosphate battery is 79.78, which is lower than the ideal threshold of 80, indicating that the battery has significantly aged. "
[0203] "In the application scenario of energy storage power plants, this degree of battery performance degradation may affect the reliability and effectiveness of the system. "
[0204] "For the use scenario of energy storage power plants, the following optimization measures are recommended: "
[0205] "1. Regular monitoring and assessment : Continue to track the battery performance to ensure timely detection of any further changes. "
[0206] "2. Balanced charging management : Implement intelligent charge and discharge strategies to reduce voltage differences and thermal unevenness. "
[0207] "3. Temperature control : Optimize the cooling system of the battery pack to maintain an appropriate operating temperature range. "
[0208] "Summary: Since the SOH is significantly aged when it is lower than 80, it is recommended to replace the battery as soon as possible to ensure the stability and efficiency of the energy storage system."
[0209] },
[0210] "done_reason": "stop", "# Model status "
[0211] "done": true,
[0212] "total_duration": 1508520017, "# Total time taken for the model to generate messages "
[0213] "load_duration": 35971127, "# Total time taken to load the model "
[0214] "prompt_eval_count": 256, " # Number of prompt evaluations "
[0215] "prompt_eval_duration": 12000000, "# Total time taken for prompt evaluation "
[0216] "eval_count": 164, "# Number of evaluations for the model to generate messages "
[0217] "eval_duration": 1446000000 "# Total time taken for the evaluation of the model to generate messages "
[0218] }
[0219] Based on the above design principles, design the battery health assessment and optimization Prompt, which can ensure that the large model accurately completes the corresponding battery health assessment and optimization recommendation tasks, and load the battery health assessment and optimization Prompt into the large model to ensure that the large model can quickly and efficiently execute the battery health assessment and optimization recommendation tasks. Then call the large model to process the integrated SOH prediction value and output test data to obtain battery health assessment and optimization recommendations that match the battery health assessment and optimization Prompt; among them, the battery health assessment and optimization recommendations can be, but are not limited to, a summary of battery optimization recommendations within 200 words.
[0220] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of adding a necessary general hardware platform, and of course, it can also be implemented by a combination of hardware and software. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a computer product. The present invention can be implemented in the form of a computer program product on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) that contain computer-usable program codes.
[0221] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Other embodiments can also be used; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting battery health on a large scale for energy storage power stations, characterized in that: The method comprises the following steps: Step S1, privatize and deploy a large model; pre-process the data in the field to obtain processed data; initialize a vector database, and import the processed data into the vector database; Step S2, designing a first prompt, the first prompt is used to encapsulate battery test data, and after guiding the large model to encapsulate the input test data into the first prompt containing the input text of the initial prediction, calling the large model to predict the input test data to obtain the large model SOH prediction value; based on the input test data, retrieving N SOH values from the vector database; Step S3, based on the large model SOH prediction value and the retrieved N SOH values, optimize the first Prompt, specifically: Get the SOH mean corresponding to the retrieved N SOH values; Based on the numerical difference between the large model SOH prediction value and the SOH mean value, the numerical difference is spliced to the first Prompt, so as to optimize the first Prompt; Based on the optimized first prompt, the large model is called to iteratively predict the input test data until the large model SOH prediction value obtained by iterative prediction meets the preset conditions, specifically: Based on the optimized first prompt, call the large model to iteratively predict the input test data to obtain a new large model SOH prediction value; determine whether the size difference between the new large model SOH prediction value and the SOH mean meets the preset conditions; If satisfied, the current new large model SOH prediction value is used as the large model SOH prediction value that meets the preset conditions; if not satisfied, the first Prompt is optimized again, and the large model is called to iteratively predict the input test data to obtain a new large model SOH prediction value, until the new large model SOH prediction value meets the preset conditions; Step S4, based on the SOH prediction value of the large model that meets the preset conditions and the retrieved N SOH values, an integrated SOH prediction value is obtained; a second prompt is designed, and the second prompt is based on the integrated SOH value to guide the large model to generate input text for battery health status evaluation and optimization suggestions, and based on the integrated SOH prediction value and the second prompt, the large model is called to output battery health evaluation and optimization suggestions.
2. The method according to claim 1, characterized in that The privatized deployment model is specifically as follows: Privately deploy the Qwen2.5-7B model in any system environment including ubuntu22.04, Python 3.10, PyTorch 2.1.0, and Cuda 12.
1.
3. The method according to claim 1, characterized in that The preprocessing of the data in the field to obtain processed data is specifically as follows: Performing outlier and null value cleaning processing on the laboratory simulated working condition battery data; wherein the laboratory simulated working condition battery data includes parameter data obtained by measuring a plurality of batteries under the laboratory simulated working condition; Based on the battery capacity data contained in the laboratory simulation working condition battery data that has completed the cleaning process, several SOH values are calculated; based on the calculated SOH values, the laboratory simulation working condition battery data that has completed the cleaning process is subjected to SOH label addition processing to generate feature column data; The feature column data is normalized to obtain processed data.
4. The method according to claim 1, characterized in that: The initialization vector database imports the processed data into the vector database, specifically: The Faiss vector database is initialized, and the processed data is imported into the Faiss vector database.
5. The method according to claim 1, characterized in that The first prompt is designed, and after the input test data is encapsulated into the first prompt, the large model is called to predict the input test data to obtain the large model SOH prediction value, which is specifically: Design a prediction prompt to obtain test data of a target battery; based on the prediction prompt, package the test data, call the large model to predict the packaged test data, and obtain the large model SOH prediction value corresponding to the target battery.
6. The method according to claim 1, characterized in that The step of retrieving N SOH values from the vector database based on the input test data is specifically: Vectorize the input test data to obtain vectorized input test data; perform similarity search on the vectorized input test data and all vector data in the vector database, and obtain N SOH values from the vector database; wherein the N SOH values refer to the SOH values contained in the first N vector data in the vector database that have the highest similarity with the vectorized input test data.
7. The method according to claim 1, characterized in that Based on the large model SOH prediction value that meets the preset conditions and the retrieved N SOH values, the integrated SOH prediction value is obtained, including: Get the SOH mean corresponding to the retrieved N SOH values; Then, based on the corresponding weight ratio, the SOH prediction value of the large model that meets the preset conditions and the SOH mean are weighted averaged to obtain an integrated SOH prediction value.
8. The method according to claim 7, characterized in that Design a second prompt, based on the integrated SOH prediction value and the second prompt, call the large model to output battery health evaluation and optimization suggestions, including: Design a battery health evaluation and optimization prompt, and load the battery health evaluation and optimization prompt into the big model; call the big model to process the integrated SOH prediction value and output test data to obtain a battery health evaluation and optimization suggestion that matches the battery health evaluation and optimization prompt.
Citation Information
Patent Citations
Lithium battery SOH (state of health) prediction method and device and storage medium
CN118655466A
Agricultural knowledge intelligent question-answering system based on retrieval enhancement generation and large model
CN119226454A