A lithium ion battery power prediction method and system

By acquiring statistical features and prediction instructions from lithium-ion battery power time-series data, and using a pre-trained large language model for embedding and alignment, the problem of inaccurate power prediction in battery swapping scenarios is solved, achieving higher accuracy and generalization in power prediction.

CN120370161BActive Publication Date: 2025-12-05CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510463872.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-14
Publication Date
2025-12-05
Estimated Expiration
2045-04-14

AI Technical Summary

Technical Problem

In battery swapping scenarios, due to the diversity of lithium-ion battery types, uncertainty of initial charging state, inconsistency of battery health status, and limited historical BMS data, the energy prediction results of lithium-ion batteries in existing technologies are inaccurate.

Method used

By acquiring battery power time-series data, determining statistical features and generating prediction instructions, embedding and feature alignment are performed using a pre-trained large language model, and power prediction is carried out by combining prediction task requirements and battery swapping application background information.

Benefits of technology

It improves the accuracy and generalization ability of power prediction results, adapts to different prediction tasks, meets the needs of small amounts of data in battery swapping scenarios, and processes data with long-term dependencies to improve prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120370161B_ABST
    Figure CN120370161B_ABST
Patent Text Reader

Abstract

The application provides a lithium ion battery electric energy prediction method and system, and belongs to the technical field of battery performance prediction. The method comprises the following steps: obtaining battery electric energy time series data, prediction task requirements and battery replacement application background information; determining statistical characteristics in the battery electric energy time series data, generating a prediction instruction in a text format based on the statistical characteristics, the prediction task requirements and the battery replacement application background information; respectively embedding the prediction instruction and the battery electric energy time series data to obtain text embedding characteristics and data embedding characteristics; aligning the text embedding characteristics and the data embedding characteristics to obtain alignment characteristics; and inputting the alignment characteristics into a pre-trained large language model to obtain an electric energy prediction result. The prediction instruction comprises the statistical characteristics, the prediction task requirements and the battery replacement application background information, the reasoning capability of the pre-trained large language model is improved, and the accuracy of the electric energy prediction result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of battery performance prediction technology, specifically to a method and system for predicting the energy of lithium-ion batteries. Background Technology

[0002] In recent years, with the popularization of new energy electric vehicles, rapid and efficient battery energy replenishment has become a key factor in improving user experience and accelerating the development of the electric vehicle industry. Battery swapping technology, as a solution for quickly replacing battery packs, can replenish the energy of electric vehicles in a short time, while alleviating users' concerns about charging safety and long waiting times. When implementing battery swapping technology, accurately predicting the energy of lithium-ion batteries is crucial for improving the operational efficiency of swapping stations, optimizing resource allocation, reducing operating costs, and ensuring battery lifespan.

[0003] Methods for predicting the energy consumption of lithium-ion batteries based on electrochemical models offer high prediction accuracy, but suffer from significant limitations due to the large workload of model identification, requiring extensive parameter identification, poor adaptability, and high complexity. To address this issue, existing technologies have proposed energy prediction methods based on big data-driven deep learning. While deep learning has made progress in energy prediction, it still has limitations, specifically: insufficient capture of long-term dependent information, inadequate consideration of battery aging and cyclic use, and the need for large amounts of high-quality training data. Particularly in battery swapping scenarios, the diversity of battery types, the uncertainty of initial charging states, the inconsistency of battery health states, and the limited availability of historical BMS data make the processing and feature extraction of battery time-series data complex and challenging, resulting in poor accuracy and precision of the obtained energy prediction results.

[0004] Therefore, there is an urgent need to provide a method and system for predicting the energy of lithium-ion batteries to improve the accuracy of energy prediction results. Summary of the Invention

[0005] In view of this, it is necessary to provide a lithium-ion battery power prediction method and system to solve the technical problem that the power prediction results are inaccurate in the battery swapping scenario due to the diversity of battery types, the uncertainty of the initial charging state, the inconsistency of battery health status and the limited historical data of BMS.

[0006] On the one hand, in order to solve the above-mentioned technical problems, the present invention provides a method for predicting the power consumption of lithium-ion batteries, comprising:

[0007] Acquire battery power time-series data and predict task requirements and battery swapping application background information;

[0008] Determine the statistical characteristics in the battery power time-series data, and generate a text-formatted prediction instruction based on the statistical characteristics, the prediction task requirements, and the battery swapping application background information;

[0009] The prediction instruction and the battery power time-series data are respectively embedded to obtain text embedding features and data embedding features;

[0010] Align the text embedding features and the data embedding features to obtain alignment features;

[0011] The alignment features are input into a pre-trained large language model to obtain the power prediction results.

[0012] In one possible implementation, the battery energy timing data is embedded and processed, including:

[0013] Based on the variable type, the battery energy time series data is divided into multiple independent single-variable time series data;

[0014] The last data in the independent univariate time series data is copied a preset number of times to obtain multiple copied data, and the multiple copied data are concatenated to the end of the independent univariate time series data to obtain extended time series data;

[0015] The extended time series data is divided into multiple time series data blocks based on a preset length and the preset number of times.

[0016] The time-series data is enhanced with features to obtain enhanced time-series data;

[0017] The enhanced time-series data is input into the feature mapping model to obtain the data embedding features.

[0018] In one possible implementation, the number of the plurality of time-series data blocks is:

[0019]

[0020] In the formula, N This refers to the number of multiple time-series data blocks; The floor symbol; L The length of independent univariate time series data; P Preset length; S This is the preset number of times.

[0021] In one possible implementation, the step of performing feature enhancement on the time-series data to obtain enhanced time-series data includes:

[0022] Obtain a time-series sample dataset; the time-series sample dataset includes multiple time-series sample data blocks;

[0023] The time series sample data block is used as the anchor sample, the time series sample data block with the overlapping area with the anchor sample is used as the positive sample, and the time series sample data block with the non-overlapping area with the anchor sample is used as the negative sample.

[0024] Based on the encoder, feature extraction is performed on anchor point samples, negative samples, and positive samples to obtain anchor point sample features, negative sample features, and positive sample features;

[0025] Based on the decoder, the anchor point sample features, negative sample features and positive sample features are restored to obtain the restored anchor point sample, restored negative sample and restored positive sample;

[0026] Based on the anchor sample, negative sample, positive sample, restored anchor sample, restored negative sample, and restored positive sample, the embedding contrast loss value is determined, and the encoder and the decoder are trained based on the embedding contrast loss value to obtain a fully trained target encoder.

[0027] The timing data is input into the target encoder to obtain the enhanced timing data.

[0028] In one possible implementation, after obtaining the time-series sample dataset, the method further includes:

[0029] Add random perturbations to each of the aforementioned time-series sample data blocks to obtain weakly enhanced time-series sample data blocks;

[0030] Each of the time-series sample data blocks is randomly divided to obtain multiple segmented data units, and the multiple segmented data units are randomly repositioned to obtain a strongly enhanced time-series sample data block.

[0031] In one possible implementation, the feature mapping model includes a multi-head attention layer, a scaled dot product attention layer, a concatenation layer, and a linear layer; then, inputting the enhanced temporal data into the feature mapping model to obtain the data embedding features includes:

[0032] Multi-head attention is learned by performing multi-head attention learning on the enhanced temporal data based on the multi-head attention layer;

[0033] The multi-head attention is aggregated based on the scaled dot product attention layer to obtain aggregated attention;

[0034] Based on the splicing layer, the aggregated attention is spliced ​​to obtain splicing features;

[0035] The splicing features are linearly processed based on the linear layer to obtain the data embedding features.

[0036] In one possible implementation, the predicted instruction is embedded to obtain text embedding features, including:

[0037] The predicted instruction is embedded using the word segmentation and embedding module in the pre-trained large language model to obtain the text embedding features.

[0038] In one possible implementation, before embedding the battery power timing data, the method further includes:

[0039] The battery power time-series data is subjected to reversible instance normalization processing.

[0040] In one possible implementation, inputting the alignment features into a pre-trained large language model to obtain the power prediction result includes:

[0041] The alignment features are input into the pre-trained large language model to obtain the power prediction sequence;

[0042] The power prediction sequence is subjected to inverse instance normalization to obtain the power prediction result.

[0043] On the other hand, the present invention also provides a lithium-ion battery power prediction system, comprising:

[0044] The data acquisition unit is used to acquire battery power time-series data and predict task requirements and background information for battery swapping applications.

[0045] A prediction instruction generation unit is used to determine the statistical characteristics in the battery energy time-series data, and generate a text-formatted prediction instruction based on the statistical characteristics, the prediction task requirements, and the battery swapping application background information.

[0046] The feature embedding unit is used to embed the prediction instruction and the battery power time series data respectively to obtain text embedding features and data embedding features;

[0047] The feature alignment unit is used to align the text embedding feature and the data embedding feature to obtain aligned features;

[0048] The power prediction unit is used to input the alignment features into a pre-trained large language model to obtain power prediction results.

[0049] The beneficial effects of this invention are as follows: The lithium-ion battery energy prediction method provided by this invention determines the statistical characteristics in the acquired battery energy time-series data, generates prediction instructions based on the statistical characteristics, prediction task requirements, and battery swapping application background information, and predicts the lithium-ion battery energy based on the prediction instructions and battery energy time-series data. During the prediction process, the statistical characteristics can effectively help the pre-trained large language model understand the rising, falling, and fluctuating indicators of lithium-ion battery energy time-series data, improving the accuracy of the obtained energy prediction results. Simultaneously, the prediction task requirements and battery swapping application background can further provide semantic support for the large language model, enabling it to understand the prediction purpose and background, improving the reasoning ability of the pre-trained large language model, and thus further improving the accuracy of the energy prediction results.

[0050] Furthermore, this invention can construct different prediction instructions by changing the requirements of the prediction task, thereby enabling prediction for different prediction tasks and improving the generalization ability of the pre-trained large language model.

[0051] Furthermore, pre-trained large language models have the ability to learn effectively on limited data, meeting the requirement of limited battery energy time-series sample data in battery swapping scenarios, making them more suitable for battery energy prediction in such scenarios. Moreover, pre-trained large language models excel at handling data with long-term dependencies, which is extremely useful for long-term time-series prediction of battery state, thereby further improving the accuracy of the obtained energy prediction results. Attached Figure Description

[0052] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0053] Figure 1 A schematic flowchart of an embodiment of the lithium-ion battery power prediction method provided by the present invention;

[0054] Figure 2 A schematic diagram of an embodiment of the prediction instruction provided by the present invention;

[0055] Figure 3 This is a schematic flowchart of an embodiment of embedding battery power timing data in step S103 of the present invention;

[0056] Figure 4 This is a schematic diagram of an embodiment of obtaining time-series data blocks provided by the present invention;

[0057] Figure 5 For the present invention Figure 3A schematic diagram of an embodiment of S304;

[0058] Figure 6 A schematic diagram of an embodiment of the feature mapping model provided by the present invention;

[0059] Figure 7 A schematic diagram of an embodiment of the charging prediction results provided by the present invention;

[0060] Figure 8 A schematic diagram of an embodiment of the maximum energy-cycle prediction results for different types of batteries provided by the present invention;

[0061] Figure 9 A schematic diagram of an embodiment of the instruction output result provided by the present invention;

[0062] Figure 10 This is a schematic diagram of an embodiment of the lithium-ion battery power prediction system provided by the present invention. Detailed Implementation

[0063] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0064] It should be understood that the illustrative drawings are not drawn to scale. The flowcharts used in this invention illustrate operations implemented according to some embodiments of the invention. It should be understood that the operations in the flowcharts may be implemented out of order, and steps without logical contextual relationships may be reversed or performed simultaneously. Furthermore, those skilled in the art, guided by the content of this invention, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor systems and / or microcontroller systems.

[0065] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0066] This invention provides a method and system for predicting the energy of lithium-ion batteries, which will be described below.

[0067] Figure 1 This is a schematic flowchart of an embodiment of the active vibration reduction and noise reduction method for motors provided by the present invention, as shown below. Figure 1 As shown, the active vibration reduction and noise reduction methods for motors include:

[0068] S101. Acquire battery power time-series data and predict task requirements and battery swapping application background information;

[0069] S102. Determine the statistical characteristics in the battery energy time series data, and generate a text-formatted prediction instruction based on the statistical characteristics, prediction task requirements, and battery swapping application background information.

[0070] S103. Embed the prediction command and battery power time series data respectively to obtain text embedding features and data embedding features;

[0071] S104. Align the text embedding features and data embedding features to obtain aligned features;

[0072] S105. Input the alignment features into the pre-trained large language model to obtain the power prediction results.

[0073] It should be noted that the relationship between the battery energy time-series data and the energy prediction result in the embodiments of the present invention is that the energy prediction result is the data of the battery energy time-series data at future times, that is, based on a time window. For the future Variables at time Make predictions.

[0074] Among them, the statistical data of battery power time series data includes, but is not limited to, minimum value, maximum value, average value, number of upward trends (rate of increase), number of downward trends (rate of decrease), and maximum value of spectrum.

[0075] Predictive task requirements refer to using battery energy time-series data of a certain number of steps to predict energy forecast data for a future duration.

[0076] Battery swapping background application information refers to the specialized background knowledge for different prediction tasks, such as maximum energy prediction and charging sequence prediction. Specifically, the battery swapping background application information for maximum energy prediction is: predicting the maximum energy and duration of a single battery swap, with the maximum value appearing at the end of the charging sequence. The battery swapping background application information for charging sequence prediction is: predicting the energy increase during a single battery swap, with the energy value slowly increasing from 0 to the maximum value, and then slowly dissipating back to 0.

[0077] Information on battery swapping applications can provide constraints for energy prediction, such as the maximum energy occurring at the end of the charging sequence, and the energy trend during charging sequence prediction being an initial increase followed by a decrease.

[0078] In specific embodiments of the present invention, such as Figure 2 As shown, when the prediction instruction is a charging sequence prediction instruction, the data text corresponding to the statistical features is: "The minimum value of the battery energy time series data is..." <min>The maximum value is <max>The average value is <mean>The number of upward trends is<UP_COUNT> The number of downward trends is<DOWN_COUNT> The maximum value of the spectrum is <lag>The task requirement text corresponding to the predicted task requirement is: "According to..."<seq_len> Predicting the future with a step size<pred_len> The data is in steps. The domain knowledge text corresponding to the background of battery swapping application is: "We predict the increase in power during a battery swap. The length of a cycle is 40~100. The power value slowly increases from 0 to the maximum value, and then slowly discharges back to 0."

[0079] When the prediction command is the maximum energy prediction command, the data text corresponding to the statistical features is: "The minimum value of the battery energy time series data is..." <min>The maximum value is <max>The average value is <mean>The number of upward trends is<UP_COUNT> The number of downward trends is<DOWN_COUNT> The maximum value of the spectrum is <lag>The task requirement text corresponding to the predicted task requirement is: "According to..."<seq_len> Predicting the future with a step size<pred_len> "Data from the later position." The domain knowledge text corresponding to the background of the battery swapping application is: "We predict the maximum energy and duration of a single battery swap. The length of a cycle is 40~100, and the maximum value appears at the end of the charging sequence."

[0080] It should also be noted that the specific alignment method for aligning the text embedding features and the data embedding features in step S104 is time suffix alignment, that is, the data embedding features are concatenated after the text embedding features. Time suffix alignment can distinguish between numbers and text, and only backpropagation is performed on the prediction results of time series. This ensures the model's ability to understand time series, while also allowing for instruction expansion according to task requirements.

[0081] Compared with existing technologies, the lithium-ion battery energy prediction method provided in this invention determines the statistical features in the acquired battery energy time-series data, generates prediction instructions based on these features, prediction task requirements, and battery swapping application background information, and then uses these instructions and the battery energy time-series data to jointly predict the lithium-ion battery energy. During the prediction process, the statistical features effectively help the pre-trained large language model understand the rising, falling, and fluctuating indicators of the lithium-ion battery energy time-series data, improving the accuracy of the obtained energy prediction results. Simultaneously, the prediction task requirements and battery swapping application background further provide semantic support to the large language model, enabling it to understand the prediction purpose and context, improving the reasoning ability of the pre-trained large language model, and thus further enhancing the accuracy of the energy prediction results.

[0082] Furthermore, embodiments of the present invention can construct different prediction instructions by changing the requirements of the prediction task, thereby achieving prediction for different prediction tasks and improving the generalization ability of the pre-trained large language model.

[0083] Furthermore, pre-trained large language models have the ability to learn effectively on limited data, meeting the requirement of limited battery energy time-series sample data in battery swapping scenarios, making them more suitable for battery energy prediction in such scenarios. Moreover, pre-trained large language models excel at handling data with long-term dependencies, which is extremely useful for long-term time-series prediction of battery state, thereby further improving the accuracy of the obtained energy prediction results.

[0084] In some embodiments of the present invention, such as Figure 3 As shown, the embedding process of battery power timing data in step S103 includes:

[0085] S301. Based on the variable type, divide the battery energy time series data into multiple independent single-variable time series data;

[0086] S302. Copy the last data in the independent univariate time series data a preset number of times to obtain multiple copied data, and concatenate the multiple copied data to the end of the independent univariate time series data to obtain extended time series data;

[0087] S303. Based on a preset length and a preset number of times, the extended time series data is split into multiple time series data blocks;

[0088] S304. Perform feature enhancement on the time series data to obtain enhanced time series data;

[0089] S305. Input the enhanced time series data into the feature mapping model to obtain data embedding features.

[0090] This invention divides battery energy time-series data into multiple independent univariate time-series data, and further splits each independent univariate time-series data into multiple time-series data blocks, thereby reducing the length of battery energy time-series data and decomposing multivariate time-series sequences into multiple univariate sequences, thus improving the model's processing efficiency and prediction accuracy for battery energy time-series data.

[0091] Furthermore, by performing feature enhancement on time-series data, this embodiment of the invention increases the amount of data available for the feature mapping model to learn, while also helping to improve the generalization of the feature mapping model and enabling it to learn data embedding features more accurately.

[0092] It should be noted that the feature mapping model needs to be trained according to different types of lithium-ion batteries or other factors before use. During the training process, the model parameters of the pre-trained large language model are frozen and not updated to reduce the computational complexity of the model, so that accurate power prediction can still be achieved even when there are missing samples or low sampling resolution.

[0093] In a specific embodiment of the present invention, the number of multiple time-series data blocks is:

[0094]

[0095] In the formula, N This refers to the number of multiple time-series data blocks; The floor symbol; L The length of independent univariate time series data; P Preset length; S This is the preset number of times.

[0096] It should be understood that variable types include, but are not limited to, voltage, current, temperature, and frequency.

[0097] In specific embodiments of the present invention, such as Figure 4 As shown, the battery power time-series data is represented as follows: , is a length of , dimension A multivariate sequence, each channel denoted as . Next, a sliding window is used for each channel to split the sequence into multiple blocks, each block corresponding to a time-series data block (Token). To ensure that the number of data items in each block is the same, the last value in each channel is copied. Next, proceed to the end of the original sequence.

[0098] Through the above-described splitting process, this invention can obtain temporal data blocks that accurately reflect the entire input space without randomness. By using patching operations, the number of input blocks within a channel is reduced from L to N, allowing the model to process longer temporal information with the same complexity and achieve better learning capabilities.

[0099] In some embodiments of the present invention, such as Figure 5 As shown, step S304 includes:

[0100] S501. Obtain the time series sample dataset; the time series sample dataset includes multiple time series sample data blocks;

[0101] S502. Use time series sample data blocks as anchor samples, use time series sample data blocks that overlap with anchor samples as positive samples, and use time series sample data blocks that do not overlap with anchor samples as negative samples.

[0102] S503. Based on the encoder, feature extraction is performed on anchor point samples, negative samples, and positive samples to obtain anchor point sample features, negative sample features, and positive sample features.

[0103] S504. Based on the decoder, feature restoration is performed on the anchor point sample features, negative sample features and positive sample features to obtain restored anchor point samples, restored negative samples and restored positive samples.

[0104] S505. Determine the embedding contrast loss value based on anchor samples, negative samples, positive samples, restored anchor samples, restored negative samples, and restored positive samples. Train the encoder and decoder based on the embedding contrast loss value to obtain a fully trained target encoder.

[0105] S506. Input the timing data into the target encoder to obtain enhanced timing data.

[0106] This invention, through determining the positive and negative samples corresponding to the anchor samples, and based on the idea of ​​contrastive learning, can map time series data to the target space. While ensuring that the mapped result can fully represent the time series data information, it also makes the dimension of the embedding space smaller, thereby further improving the efficiency of power prediction.

[0107] The encoder is a multilayer perceptron (MLP), and its feature extraction process can be described as mapping samples to an embedding space e of dimension D. This process can be described as follows:

[0108]

[0109] in, This can be interpreted as a sample. Independent representation in higher-dimensional space.

[0110] The loss function used when training the encoder and decoder is the embedding contrastive loss. Specifically:

[0111]

[0112]

[0113] In the formula, For anchor sample features e and positive sample features e + cosine similarity, For anchor sample features e and negative sample features e - The cosine similarity, where B is the number of negative sample features; f d (e) To reconstruct the anchor point sample, f d (e - ) To restore the negative samples, f d (e + ) To restore the positive samples; This is a hyperparameter.

[0114] To further adapt the lithium-ion battery power prediction method to scenarios with few samples, in some embodiments of the present invention, after step S501, the method further includes:

[0115] Add random perturbations to each time series sample data block to obtain weakly enhanced time series sample data blocks;

[0116] Each time series sample data block is randomly divided to obtain multiple segmented data units, and the positions of the multiple segmented data units are randomly transformed to obtain a strongly enhanced time series sample data block.

[0117] This invention augments time-series sample data blocks by adding random perturbations and random position transformations, which can generate multiple samples in low-sample scenarios, improve its adaptability to low-sample scenarios, and improve the accuracy of power prediction in low-sample scenarios.

[0118] In specific embodiments of the present invention, such as Figure 6 As shown, the feature mapping model includes a multi-head attention layer, a scaled dot-product attention layer, a concatenation layer, and a linear layer; therefore, step S205 includes:

[0119] Multi-head attention is learned by performing multi-head attention learning on augmented temporal data based on a multi-head attention layer;

[0120] Aggregated attention is obtained by aggregating multi-head attention based on a scaled dot product attention layer;

[0121] The aggregation attention is spliced ​​based on the splicing layer to obtain spliced ​​features;

[0122] Linear processing is performed on the spliced ​​features based on a linear layer to obtain data embedding features.

[0123] Specifically, the multi-head attention layer includes multi-head attention Q, K, and V, namely:

[0124]

[0125] In the formula, W h Q This is the Q-attention matrix; W h K Let K be the attention matrix; W h V V is the attention matrix; Q h (i) For Q attention; K h (i) For K attention; V h (i) V represents attention.

[0126] Among them, aggregated attention is:

[0127]

[0128] In the formula, d k This is the scaling factor.

[0129] The embodiments of the present invention map enhanced temporal features to a new representation space through a feature mapping model. The dimensional features and temporal features of the sequence are independent of each other, and have good feature integration and extraction properties.

[0130] Since the pre-trained large language model has built-in text embedding capabilities, in order to further reduce the training load, in a specific embodiment of the present invention, step S103 involves embedding the predicted instructions to obtain text embedding features, including:

[0131] The predicted instructions are embedded using the word segmentation and embedding module in the pre-trained large language model to obtain text embedding features.

[0132] In a specific embodiment of the present invention, the word segmentation and embedding module includes a tokenization layer and an embedding layer.

[0133] To avoid excessively large values ​​in the battery power time series data from affecting the training and prediction results, in some embodiments of the present invention, before step S104, the following steps are further included:

[0134] Reversible instance normalization is performed on the battery energy time series data.

[0135] After reversible instance normalization, the battery energy time series data is transformed into a standard normal distribution with a mean of 0 and a variance of 1. This removes the non-stationary characteristics of the input battery energy time series data, making it easier for the pre-trained large language model to learn from the battery energy time series data and facilitating gradient updates during model training.

[0136] To make the power prediction results more accurate, in some embodiments of the present invention, step S105 specifically includes:

[0137] The alignment features are input into a pre-trained large language model to obtain the power prediction sequence;

[0138] The power prediction sequence is subjected to inverse instance normalization to obtain the power prediction result.

[0139] Before outputting the power prediction results, this embodiment of the invention performs inverse instance normalization on the power prediction sequence, reintegrating the non-stationary information of the original data into the output, thereby improving the accuracy of the power prediction results.

[0140] It should be noted that the pre-trained large language model in this embodiment of the invention is GPT-2, and its specific structure is existing technology, which will not be described in detail here.

[0141] To verify the effectiveness of the lithium-ion battery energy prediction method proposed in this invention, corresponding experimental verifications were also designed, including energy prediction experiments, model comparison experiments, and command input experiments. Lithium-ion battery energy prediction is a supervised regression task, and the mean squared error (MSE), mean absolute error (MAE), relative squared error (RSE), mean percentage error (MAPE), and symmetric mean percentage error (sMAPE) are typically used to measure the model output results. Compared with the true value The deviation is calculated using the following formulas:

[0142]

[0143]

[0144]

[0145]

[0146] In the formula, n represents the total amount of data.

[0147] 1. Electrical energy prediction experiment

[0148] 1.1 Prediction of Single-Round Charging Sequences for Different Batteries

[0149] To meet the prediction requirements of various battery types in battery replacement scenarios, this invention presents charging energy prediction experiments focusing on widely used LFP and NCM batteries. A total of four batteries were selected from each type. The experiment first inputs a charging sequence consisting of 15 time steps, each time step representing 60 seconds of the displayed time. This sequence originates from the beginning of the battery charging data to predict the subsequent charging energy of the battery. The prediction results of these experiments are as follows: Figure 7 As shown, Figure 7 The horizontal axis represents time, and the vertical axis represents battery capacity (mWh). The solid blue line represents the actual input time-series data, the solid red line represents the predicted results, and the dashed blue line represents the actual collected time-series data corresponding to the predicted results in time.

[0150] Depend on Figure 7 As can be seen, the method proposed in this embodiment effectively captures the overall trend of charging sequences for various types of batteries, and the predicted curves match the actual values ​​very well. The maximum error typically occurs in the non-linear portion of the time-energy curve, near the middle to the end of the cycle. Regarding the error metric, the predicted MAPE values ​​for all eight batteries consistently remain below 2%. Specifically, the MAPE value for LFP batteries is 1.10%, and for NMC batteries it is 1.50%. Overall, the prediction process demonstrates high accuracy, highlighting the robustness of this embodiment in predicting various battery types.

[0151] 1.2 Battery degradation analysis experiment

[0152] Battery degradation trends can be reflected in the decay of maximum energy at the end of various charging cycle sequences. Therefore, the main purpose of this experiment is to extract and compare actual sequence end data from predicted charging sequences of the same battery at different cycles. Figure 8 The results show a comparison between the actual value of the maximum energy curve over the entire battery lifespan and the prediction result of the method proposed in this embodiment of the invention. Figure 8 The horizontal axis represents the cycle number, the vertical axis represents the battery energy, the blue solid line represents the actual value, and the red scatter points represent the predicted value.

[0153] like Figure 8 As shown, the blue solid line represents the actual value, while the red scatter dots represent the predicted maximum energy for each cycle. The predicted MAPE values ​​for all four battery types remained below 1%, with the LFP battery exhibiting superior performance compared to the NCM battery. This difference is primarily due to the stable chemistry of the LFP battery, resulting in a slower energy decay during multiple charge-discharge cycles. The results demonstrate that the embodiments of this invention accurately predict the maximum energy capacity of different batteries.

[0154] Furthermore, the accuracy of the maximum energy prediction in the embodiments of the present invention was observed to remain consistent across consecutive charging cycles, demonstrating its stability and accuracy in tracking energy changes over multiple cycles. Therefore, monitoring the maximum energy predictions of the embodiments of the present invention can effectively assess the current degradation state of the battery and guide decisions regarding battery recycling or replacement. This ensures that the battery remains in a healthy operating condition, thereby mitigating economic losses and safety risks associated with unexpected failures.

[0155] 2. Model Comparison Experiment

[0156] To demonstrate the relative superiority of the pre-trained large language model (BatteryGPT) used in this embodiment of the invention, the mainstream large language models since 2023, GPT4TS and Time-LLM, the current state-of-the-art time series model PatchTST, and traditional time series models Informer and LSTM were selected for comparison. The comparison results are shown in Table 1:

[0157] Table 1 Performance Comparison of Different Models

[0158]

[0159] As shown in Table 1, BatteryGPT in this embodiment of the invention has the best prediction performance for battery swapping sequences, and its MSE, MAE, RMSE, MAPE, and sMAPE are all superior to other prediction models. In comparison with other large models, the average improvement of the proposed model is 81.38%, and the improvement compared with the state-of-the-art time series model is 88.16%.

[0160] In summary, the BatteryGPT model proposed in this embodiment of the invention is more suitable for battery energy sequence prediction tasks in battery swapping scenarios.

[0161] 3. Command Input Experiment

[0162] This invention presents an experiment involving command input in various usage scenarios: users input prediction requirements, including background information and domain knowledge related to the battery swapping scenario; then they provide input data; finally, the model outputs energy prediction results for different tasks, including battery charging sequence prediction and maximum battery energy prediction.

[0163] LFP and NMC batteries were selected for demonstration purposes. This experiment was set to a length of 30, meaning it outputs predicted energy consumption over a future length of 30 meters. Figure 9 It can be seen that by constructing a suitable instruction set, the model can predict the charging sequence and maximum energy of lithium-ion batteries according to the input prediction requirements, and the output results meet the task requirements.

[0164] In summary, the lithium-ion battery energy prediction method proposed in this embodiment of the invention has the following beneficial effects:

[0165] 1. Based on prediction commands and battery power time series data, power prediction can be performed for different scenarios by changing the prediction commands. This eliminates the need to train a separate model for the source and load data of each scenario, thus improving the generalization ability of the model.

[0166] 2. It fully utilizes the powerful generalization ability and rich world knowledge of the pre-trained large language model, so that a large number of samples are not required during training, and the model does not need to be trained from scratch, thus meeting the needs of small sample conditions in the lithium-ion battery performance prediction scenario.

[0167] 3. Instance normalization is performed before inputting the data into the model to remove the non-stationarity of the battery energy time series data, which facilitates the model's learning of time series information and is beneficial for gradient updates during model training. Inverse instance normalization is performed at the output to reintegrate the non-stationarity information of the original data into the output, thereby improving the accuracy of the prediction results.

[0168] 4. The battery energy time series data was processed by segmentation and channel separation to reduce the length of the input sequence and decompose the multivariate time series into multiple univariate sequences, thereby improving the model's processing efficiency and prediction accuracy for battery energy time series data.

[0169] To better implement the lithium-ion battery power prediction method in the embodiments of the present invention, based on the lithium-ion battery power prediction method, the embodiments of the present invention also provide a lithium-ion battery power prediction system, such as... Figure 10 As shown, the lithium-ion battery power prediction system 1000 includes:

[0170] The data acquisition unit 1001 is used to acquire battery power time-series data and predict task requirements and battery swapping application background information.

[0171] The prediction instruction generation unit 1002 is used to determine the statistical characteristics in the battery energy time series data, and generate a text-format prediction instruction based on the statistical characteristics, prediction task requirements and battery swapping application background information.

[0172] The feature embedding unit 1003 is used to embed the prediction command and battery power time series data respectively to obtain text embedding features and data embedding features.

[0173] Feature alignment unit 1004 is used to align text embedding features and data embedding features to obtain aligned features;

[0174] The power prediction unit 1005 is used to input the alignment features into the pre-trained large language model to obtain the power prediction result.

[0175] The lithium-ion battery power prediction system 1000 provided in the above embodiments can realize the technical solutions described in the above lithium-ion battery power prediction method embodiments. The specific implementation principles of each module or unit can be found in the corresponding content in the above lithium-ion battery power prediction method embodiments, and will not be repeated here.

[0176] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.), and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0177] The present invention provides a detailed description of a lithium-ion battery power prediction method and system. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. The content of this specification should not be construed as a limitation of the present invention.< / lag> < / mean> < / max> < / min> < / lag> < / mean> < / max> < / min>

Claims

1. A method for predicting the electrical energy of a lithium-ion battery, characterized in that, include: Acquire battery power time-series data and predict task requirements and battery swapping application background information; Determine the statistical characteristics in the battery power time-series data, and generate a text-formatted prediction instruction based on the statistical characteristics, the prediction task requirements, and the battery swapping application background information; The prediction instruction and the battery power time-series data are respectively embedded to obtain text embedding features and data embedding features; Align the text embedding features and the data embedding features to obtain alignment features; The alignment features are input into a pre-trained large language model to obtain the power prediction results; The battery power time-series data is embedded and processed, including: Based on the variable type, the battery energy time series data is divided into multiple independent single-variable time series data; The last data in the independent univariate time series data is copied a preset number of times to obtain multiple copied data, and the multiple copied data are concatenated to the end of the independent univariate time series data to obtain extended time series data; The extended time series data is divided into multiple time series data blocks based on a preset length and the preset number of times. The time-series data is enhanced with features to obtain enhanced time-series data; The enhanced time-series data is input into the feature mapping model to obtain the data embedding features.

2. The lithium-ion battery power prediction method according to claim 1, characterized in that, The number of the plurality of time-series data blocks is: In the formula, N This refers to the number of multiple time-series data blocks; The floor symbol; L The length of independent univariate time series data; P Preset length; S This is the preset number of times.

3. The lithium-ion battery power prediction method according to claim 1, characterized in that, The step of performing feature enhancement on the time-series data to obtain enhanced time-series data includes: Obtain a time-series sample dataset; the time-series sample dataset includes multiple time-series sample data blocks; The time series sample data block is used as the anchor sample, the time series sample data block with the overlapping area with the anchor sample is used as the positive sample, and the time series sample data block with the non-overlapping area with the anchor sample is used as the negative sample. Based on the encoder, feature extraction is performed on anchor point samples, negative samples, and positive samples to obtain anchor point sample features, negative sample features, and positive sample features; Based on the decoder, the anchor point sample features, negative sample features and positive sample features are restored to obtain the restored anchor point sample, restored negative sample and restored positive sample; Based on the anchor sample, negative sample, positive sample, restored anchor sample, restored negative sample, and restored positive sample, the embedding contrast loss value is determined, and the encoder and the decoder are trained based on the embedding contrast loss value to obtain a fully trained target encoder. The timing data is input into the target encoder to obtain the enhanced timing data.

4. The lithium-ion battery power prediction method according to claim 3, characterized in that, After obtaining the time-series sample dataset, the following is also included: Add random perturbations to each of the aforementioned time-series sample data blocks to obtain weakly enhanced time-series sample data blocks; Each of the time-series sample data blocks is randomly divided to obtain multiple segmented data units, and the multiple segmented data units are randomly repositioned to obtain a strongly enhanced time-series sample data block.

5. The lithium-ion battery energy prediction method according to claim 1, characterized in that, The feature mapping model includes a multi-head attention layer, a scaled dot product attention layer, a concatenation layer, and a linear layer; then, inputting the enhanced temporal data into the feature mapping model to obtain the data embedding features includes: Multi-head attention is learned by performing multi-head attention learning on the enhanced temporal data based on the multi-head attention layer; The multi-head attention is aggregated based on the scaled dot product attention layer to obtain aggregated attention; Based on the splicing layer, the aggregated attention is spliced ​​to obtain splicing features; The splicing features are linearly processed based on the linear layer to obtain the data embedding features.

6. The lithium-ion battery energy prediction method according to claim 1, characterized in that, The predicted instructions are embedded to obtain text embedding features, including: The predicted instruction is embedded using the word segmentation and embedding module in the pre-trained large language model to obtain the text embedding features.

7. The lithium-ion battery power prediction method according to claim 1, characterized in that, Before embedding the battery power timing data, the process also includes: The battery power time-series data is subjected to reversible instance normalization processing.

8. The lithium-ion battery power prediction method according to claim 1, characterized in that, The step of inputting the alignment features into a pre-trained large language model to obtain the power prediction result includes: The alignment features are input into the pre-trained large language model to obtain the power prediction sequence; The power prediction sequence is subjected to inverse instance normalization to obtain the power prediction result.

9. A lithium-ion battery power prediction system, characterized in that, Using the lithium-ion battery power prediction method according to any one of claims 1-8, the system comprises: The data acquisition unit is used to acquire battery power time-series data and predict task requirements and background information for battery swapping applications. A prediction instruction generation unit is used to determine the statistical characteristics in the battery energy time-series data, and generate a text-formatted prediction instruction based on the statistical characteristics, the prediction task requirements, and the battery swapping application background information. The feature embedding unit is used to embed the prediction instruction and the battery power time series data respectively to obtain text embedding features and data embedding features; The feature alignment unit is used to align the text embedding feature and the data embedding feature to obtain aligned features; The power prediction unit is used to input the alignment features into a pre-trained large language model to obtain power prediction results.

Citation Information

Patent Citations

  • Battery replacement demand prediction method and system and computer equipment

    CN118446376A

  • Large model construction method for intelligent collaboration and decision-making of power time series

    CN119692415A