Method and apparatus for generating battery data
By employing a two-stage battery data generation method, a strong correspondence between current and voltage segments is generated using a diffusion model. This addresses the issues of insufficient battery data quality and usability in existing technologies, enabling the generation of high-quality battery data and multi-task adaptability.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2025-08-13
- Publication Date
- 2026-07-30
AI Technical Summary
Existing battery data generation schemes produce battery data of low quality and poor usability. They fail to effectively capture strong correspondences between current and voltage data and cannot handle extremely long sequences and missing values.
A two-stage battery data generation method is adopted. First, current segments are generated by starting and ending SOC. Then, voltage segments are generated using the current segments to ensure a strong correspondence between the current and voltage segments. Generation models such as diffusion models are used to generate current and voltage data, and the segment length is processed by the ampere-hour integration method.
It improves the quality and availability of battery data, can handle extremely long sequences and missing values, adapts to various operating conditions, and supports multi-task battery data generation.
Smart Images

Figure CN2025114427_30072026_PF_FP_ABST
Abstract
Description
A method and apparatus for generating battery data
[0001] This application claims priority to Chinese Patent Application No. 202510125418.3, filed on January 26, 2025, entitled "A Method and Apparatus for Generating Battery Data", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of artificial intelligence (AI) technology, and in particular to a method and apparatus for generating battery data. Background Technology
[0003] my country's new energy industry has entered a stage of high-quality development, with a continuous surge in the shipment of energy storage products and a doubling of battery cell capacity. This has led to battery safety hazards becoming a social issue. Therefore, effective full lifecycle safety management of energy products, ensuring prevention and avoidance, is crucial. Intelligent battery lifecycle technology has evolved from traditional feature-engineering-based battery modeling methods to building general-purpose battery safety pre-trained models for various downstream tasks, placing high demands on both the quantity and quality of data. However, existing battery data generation schemes produce battery data of low quality and poor usability. Summary of the Invention
[0004] The embodiments of this application provide a method and apparatus for generating battery data. By first generating current segments and then using the current segments to guide the generation of voltage segments, a two-stage battery data generation method is used to ensure a strong correspondence between the generated current segments and voltage segments, thereby improving the quality of the generated battery data and enhancing its usability.
[0005] In a first aspect, this application provides a method for generating battery data. The method includes acquiring state of charge (SOC) information, whereby the SOC information (also referred to as start and end SOC) includes a start SOC and a stop SOC. The start SOC indicates the start SOC of the battery data segment to be generated, and the stop SOC indicates the stop SOC of the battery data segment to be generated. The method further includes using the SOC information as input to a current generation model to guide the current generation model in generating a current segment; using the current segment and SOC information as input to a voltage generation model to guide the voltage generation model in generating a voltage segment; and determining the battery data segment based on the SOC information, the current segment, and the voltage segment.
[0006] The battery data generation method provided in this application first inputs the start and end SOC conditions into the current generation model in the first generation stage, guiding the current generation model to generate current segments that meet the start and end SOC conditions. Then, in the second generation stage, the start and end SOC conditions and the current segments generated in the first generation stage are input into the voltage generation model, guiding the voltage generation model to generate voltage segments that meet the start and end SOC conditions and correspond to the current segments. In this way, through the two-stage current and voltage data generation, it is ensured that the generated current segments and voltage segments follow the battery model mechanism, and the current segments and voltage segments have a strong correspondence, thereby improving the quality of the generated battery data and thus improving the usability of the battery data.
[0007] In one possible implementation, the state of charge information is used as input to the current generation model to guide the current generation model in generating current segments. One specific implementation is to use the state of charge information and current noise samples as input to the current generation model and output current segments.
[0008] In another possible implementation, after taking the state of charge information and current noise samples as inputs to the current generation model, the current generation model processes the state of charge information and current noise samples as follows: extracting features from the state of charge information to obtain a first representation vector; extracting features from the current noise samples to obtain a second representation vector; fusing the first representation vector and the second representation vector to obtain a first fused vector; and generating a current segment based on the first fused vector.
[0009] In this possible implementation, the influence of SOC on current changes is fully captured by fusing the SOC characterization vector and the characterization vector of the current noise sample, thereby improving the quality of the generated current segment.
[0010] Current generation models can be implemented using various generative models, such as generative adversarial networks (GANs), variational autoencoders (VAEs), and diffusion models.
[0011] Taking the current generation model as an example of a diffusion model, the current generation model includes a noise prediction model. Using SOC information as input to the current generation model, a specific implementation that guides the current generation model to generate current segments is as follows: using state of charge information and current noise samples as input to the noise prediction network, the state of charge guides the noise prediction network to estimate the predicted noise at the current time step; based on the predicted noise at multiple time steps, the current noise samples are denoised to generate current segments.
[0012] Optionally, the first noise prediction network includes at least one state-of-charge (SOC) encoding layer, an encoder layer, and a decoder layer. The encoder layer includes N encoders, and the decoder layer includes N decoders. Both encoders and decoders are constructed based on 2D convolutional neural networks, where N is a positive integer. A specific implementation of using SOC information and current noise samples as inputs to the noise prediction network, with SOC information guiding the network to estimate the first predicted noise at the current time step, involves: using SOC information as input to the state-of-charge encoding layer, outputting a SOC encoded vector; using the current time step and its current noise samples as input to the encoder layer, outputting an encoded vector; and using the encoded vector as input to the decoder layer, outputting the predicted noise at the current time step. During encoding at the encoder layer, the SOC encoded vector is fused with the output of at least one encoder; or during decoding at the decoder layer, the SOC encoded vector is fused with the input of at least one decoder. In one example, an SOC encoded vector can be introduced into each layer of the encoder-decoder architecture to fully interact with the current data and SOC information, effectively capturing the impact of SOC on current changes.
[0013] In another possible implementation, the current noise samples are 2D current noise samples. In this way, the current segment to be generated is regarded as a 2D matrix similar to an image, and the long-term and short-term patterns and detailed changes of the current data can be characterized by 2D convolution.
[0014] It should be explained that the meaning of 2D current noise sample is that the sampled current noise sample is two-dimensional. For example, the current noise sample sampled previously was a one-dimensional current noise sample of 1*1024, while the 2D current noise sample sampled in this application is a two-dimensional current noise sample of 32*32.
[0015] Optionally, the current generation model includes a convolutional neural network, which is convenient for processing 2D current noise samples.
[0016] In another possible implementation, the current segment and state of charge information are used as inputs to the voltage generation model to guide the generation of voltage segments. One specific implementation is to use the state of charge information, current segment, and voltage noise samples as inputs to the voltage generation model and output an electric voltage segment.
[0017] In another possible implementation, after taking the state of charge (SOC) information, current segments, and voltage noise samples as inputs to the voltage generation model, the voltage generation model processes the SOC information and current noise samples as follows: Features are extracted from the SOC information to obtain a third representation vector; features are extracted from the current segments to obtain a current representation vector; features are extracted from the voltage noise samples to obtain a fourth representation vector; the current representation vector and the fourth representation vector are fused to obtain a second fused vector; and a voltage segment is generated based on the third representation vector and the second fused vector.
[0018] By fusing the current representation vector and the voltage noise sample representation vector, the influence of current on voltage shape and details is captured, ensuring a strong correspondence between current and voltage data and improving the usability of the generated current and voltage data.
[0019] In another possible implementation, the current representation vector includes multiple sub-current representation vectors, which are obtained based on feature extraction of current segments at different scales; the fourth representation vector includes multiple sub-fourth representation vectors, which are obtained based on feature extraction of voltage noise samples at different scales; a specific implementation of fusing the current representation vector and the fourth representation vector to obtain the second fused vector is as follows: the multiple sub-current representation vectors and the multiple sub-fourth representation vectors are fused to obtain the second fused vector.
[0020] By fusing current features and voltage noise sample features at different scales, the influence of current on voltage details and shape changes is captured in fine detail (P(U|I)), ensuring a strong correspondence between the generated current and voltage, enabling the voltage generation model to generate voltage segments under specified SOC and current segments.
[0021] It should be noted that different scales can be understood as sampling at different granularities of current segments or voltage noise samples. Different features can be observed at different scales (also called granularities), thus accomplishing different tasks. For example, smaller scale sampling reveals more details, while larger scale sampling reveals the overall trend. In this application, the current features and voltage noise sample features at different scales are fused to simultaneously capture the influence of current on voltage details and shape changes. Features of current segments and voltage noise samples at different scales can be obtained in various ways. For example, different sampling intervals can be set to sample current segments and voltage noise samples separately to obtain features of current segments and voltage noise samples at different scales. Taking current as an example, for a certain current segment, the current segment is first sampled at a sampling interval of 10s (i.e., the current segment is sampled once every 10s) to obtain the current segment features at the first scale (smallest scale). Then, the current segment is sampled at a sampling interval of 20s to obtain the current segment features at the second scale, and so on, to obtain the current segment features at the Nth scale. A similar operation is performed on the voltage noise samples to obtain voltage noise sample features at N scales. Then, the current segment features and voltage noise sample features at the same scale are fused. Specifically, the current segment features at the first scale are fused with the voltage noise sample features at the first scale, the current segment features at the second scale are fused with the voltage noise sample features at the second scale, and so on, until the current segment features at the Nth scale are fused with the voltage noise sample features at the Nth scale. This completes the fusion of current features and voltage noise sample features at different scales. Alternatively, the features at different scales can be obtained by processing the current segment and voltage noise samples separately using convolutional kernels of different scales. This application does not limit the specific method for obtaining current segment features and voltage noise sample features at different scales; appropriate methods can be selected as needed.
[0022] Voltage generation models can be implemented using various generative models, such as GANs, VAEs, and diffusion models. Voltage generation models can be of the same type as current generation models, for example, both can be GANs, VAEs, or diffusion models. Alternatively, voltage and current generation models can be of different types, such as a diffusion model for current generation and a GAN model for voltage generation.
[0023] In another possible implementation, SOC information is used as input to the current generation model to guide the current condition generation model to generate current segments. This includes: determining the target operating condition corresponding to the battery segment data to be generated, including at least two of the following: constant power operating condition, multi-stage operating condition, and dynamic operating condition; and based on the target operating condition, calling the current generation model and voltage generation model that match the target operating condition to generate current segments and voltage segments.
[0024] In this possible implementation, current generation models and voltage generation models under various operating conditions are trained. During battery data generation, the current generation model and voltage generation model under the corresponding operating conditions are called to generate battery data under the corresponding operating conditions, thereby further improving the quality of the generated battery data.
[0025] For example, the current generation model and voltage generation model include current generation models and voltage generation models under constant power condition, multi-stage condition, and dynamic condition, respectively. When it is necessary to generate battery data under constant power condition, the current generation model and voltage generation model corresponding to constant power condition are called to generate current and voltage data; when it is necessary to generate battery data under multi-stage condition, the current generation model and voltage generation model corresponding to multi-stage condition are called to generate current and voltage data; when it is necessary to generate battery data under dynamic condition, the current generation model and voltage generation model corresponding to dynamic condition are called to generate current and voltage data.
[0026] In another possible implementation, both the current segment and the voltage segment are of fixed length. A specific implementation for determining the battery data segment based on the state of charge information, the current segment, and the voltage segment is as follows: A target length is determined based on the ampere-hour integration method and the state of charge information; the target length is different from the fixed length; the current segment is processed to obtain a current segment of the target length; the voltage segment is processed to obtain a voltage segment of the target length; the battery data segment is determined based on the state of charge information, the current segment of the target length, and the voltage segment of the target length.
[0027] By using the ampere-hour integration method to post-process the generated current and voltage segments, it is possible to generate current and voltage data with a specified start and end point SOC and arbitrary length.
[0028] For example, the current and voltage segments output by the current generation model and the voltage generation model are both of fixed length (e.g., 1024). After the current generation model outputs a current segment of length 1024, the target length (e.g., target length 800) is calculated based on the start and end SOC and the ampere-hour integration method. If the target length is different from the fixed length output by the model, the current and voltage segments are adjusted to the target length by linear interpolation or resampling.
[0029] In another possible implementation, the current generation model can also be used to perform one or more of the following tasks: current missing value completion task, current segment extension task, single-cell current segment generation task, and multi-cell current generation task; the voltage generation model can also be used to perform one or more of the following tasks: voltage missing value completion task, voltage segment extension task, single-cell voltage segment generation task, and multi-cell voltage generation task.
[0030] In other words, the battery data generation method of this application can not only generate battery data, but also support multiple tasks such as single cell data generation, multi-cell data generation, missing value completion, and short segment extension. It has strong versatility and realizes a unified two-stage battery data generation scheme for multiple tasks.
[0031] In another possible implementation, the current generation template is trained based on a first training dataset, which includes multiple sets of first training data, each set of first training data including current segments corresponding to SOC information and state of charge information; the voltage generation model is trained based on a second training dataset, which includes multiple sets of second training data, each set of second training data including SOC information, current segments corresponding to SOC information, and voltage segments.
[0032] In another possible implementation, the battery data generation method provided in this application further includes: receiving parameters of a current generation model and parameters of a voltage generation model uploaded from several different locations; determining the current generation model and voltage generation model corresponding to each location based on the parameters of the current generation model and voltage generation model uploaded from each of the several different locations; and generating the battery data segment for each location based on the current generation model and voltage generation model corresponding to each location.
[0033] In this possible implementation, the data distribution characteristics of different locations are learned to generate high-quality battery simulation data, solving the problems of data not leaving the site and knowledge / models being evolvable.
[0034] Secondly, this application also provides a battery data generation apparatus, which includes an acquisition module, a current generation module, a voltage generation module, and a determination module. The acquisition module acquires State of Charge (SOC) information, including a start SOC and a stop SOC. The start SOC indicates the start SOC of the battery data segment to be generated, and the stop SOC indicates the stop SOC of the battery data segment to be generated. The current generation module uses the SOC information as input to a current generation model to guide the current generation model in generating current segments. The voltage generation module uses the current segments and SOC information as input to a voltage generation model to guide the voltage generation model in generating voltage segments. The determination module determines the battery data segment based on the SOC information, the current segment, and the voltage segment.
[0035] In one possible implementation, the current generation module is specifically used to: take the state of charge information and current noise samples as input to the current generation model and output current segments.
[0036] In another possible implementation, after taking the state of charge information and current noise samples as inputs to the current generation model, the current generation model processes the state of charge information and current noise samples as follows: extracting features from the state of charge information to obtain a first representation vector; extracting features from the current noise samples to obtain a second representation vector; fusing the first representation vector and the second representation vector to obtain a first fused vector; and generating a current segment based on the first fused vector.
[0037] Current generation models can be implemented using various generative models, such as GANs, VAEs, and diffusion models.
[0038] Taking the current generation model as an example of a diffusion model, the current generation model includes a noise prediction model. Using SOC information as input to the current generation model, a specific implementation that guides the current generation model to generate current segments is as follows: using state of charge information and current noise samples as input to the noise prediction network, the state of charge guides the noise prediction network to estimate the predicted noise at the current time step; based on the predicted noise at multiple time steps, the current noise samples are denoised to generate current segments.
[0039] Optionally, the first noise prediction network includes at least one state-of-charge (SOC) encoding layer, an encoder layer, and a decoder layer. The encoder layer includes N encoders, and the decoder layer includes N decoders. Both the encoders and decoders are constructed based on a 2D convolutional neural network, where N is a positive integer. A specific implementation of using SOC information and current noise samples as inputs to the noise prediction network, with the SOC information guiding the network to estimate the first predicted noise at the current time step, involves: using the SOC information as input to the state-of-charge (SOC) encoding layer, outputting an SOC encoded vector; using the current time step and its current noise samples as input to the encoder layer, outputting an encoded vector; and using the encoded vector as input to the decoder layer, outputting the predicted noise at the current time step. During the encoding process in the encoder layer, the SOC encoded vector is fused with the output of at least one encoder; or during the decoding process in the decoder layer, the SOC encoded vector is fused with the input of at least one decoder. In one example, an SOC encoded vector can be introduced into each layer of the Encoder-Decoder architecture to fully interact with the current data and SOC information, thus fully capturing the impact of SOC on current changes.
[0040] In another possible implementation, the current noise sample is a 2D current noise sample.
[0041] Optionally, the current generation model includes a convolutional neural network.
[0042] In another possible implementation, the voltage generation module is specifically used to: take state-of-charge information, current segments, and voltage noise samples as inputs to the voltage generation model, and output an electrical voltage segment.
[0043] In another possible implementation, after taking the state of charge (SOC) information, current segments, and voltage noise samples as inputs to the voltage generation model, the voltage generation model processes the SOC information and current noise samples as follows: Features are extracted from the SOC information to obtain a third representation vector; features are extracted from the current segments to obtain a current representation vector; features are extracted from the voltage noise samples to obtain a fourth representation vector; the current representation vector and the fourth representation vector are fused to obtain a second fused vector; and a voltage segment is generated based on the third representation vector and the second fused vector.
[0044] In another possible implementation, the current representation vector includes multiple sub-current representation vectors, which are obtained based on feature extraction of current segments at different scales; the fourth representation vector includes multiple sub-fourth representation vectors, which are obtained based on feature extraction of voltage noise samples at different scales; a specific implementation of fusing the current representation vector and the fourth representation vector to obtain the second fused vector is as follows: the multiple sub-current representation vectors and the multiple sub-fourth representation vectors are fused to obtain the second fused vector.
[0045] Voltage generation models can be implemented using various generative models, such as GANs, VAEs, and diffusion models. Voltage generation models can be of the same type as current generation models, for example, both can be GANs, VAEs, or diffusion models. Alternatively, voltage and current generation models can be of different types, such as a diffusion model for current generation and a GAN model for voltage generation.
[0046] In another possible implementation, the battery data generation apparatus provided in this application further includes an operating condition determination module, which is used to determine the target operating condition corresponding to the battery segment data to be generated. The operating condition includes at least two of constant power operating condition, multi-stage operating condition and dynamic operating condition; based on the target operating condition, a current generation model and a voltage generation model matching the target operating condition are invoked to generate current segment and voltage segment.
[0047] In another possible implementation, both the current segment and the voltage segment are of fixed length; the determination module is specifically used to: determine the target length based on the ampere-hour integration method and the state of charge information; determine that the target length and the fixed length are different; process the current segment to obtain the current segment of the target length; process the voltage segment to obtain the voltage segment of the target length; and determine the battery data segment based on the state of charge information, the current segment of the target length, and the voltage segment of the target length.
[0048] In another possible implementation, the current generation model can also be used to perform one or more of the following tasks: current missing value completion task, current segment extension task, single-cell current segment generation task, and multi-cell current generation task; the voltage generation model can also be used to perform one or more of the following tasks: voltage missing value completion task, voltage segment extension task, single-cell voltage segment generation task, and multi-cell voltage generation task.
[0049] In another possible implementation, the current generation template is trained based on a first training dataset, which includes multiple sets of first training data, each set of first training data including current segments corresponding to SOC information and state of charge information; the voltage generation model is trained based on a second training dataset, which includes multiple sets of second training data, each set of second training data including SOC information, current segments corresponding to SOC information, and voltage segments.
[0050] In another possible implementation, the battery data generation apparatus provided in this application further includes a receiving module and a generation module. The receiving module is used to receive parameters of the current generation model and the voltage generation model uploaded from several different locations. The generation module is used to determine the current generation model and the voltage generation model corresponding to each location based on the parameters of the current generation model and the voltage generation model uploaded from each of the several different locations. Based on the current generation model and the voltage generation model corresponding to each location, the generation module generates the battery data segment for each location.
[0051] Thirdly, embodiments of this application provide a computing device, including a memory and a processor, wherein the memory stores instructions that, when executed by the processor, cause the method described in the first aspect or any possible implementation of the first aspect to be implemented.
[0052] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the method described in the first aspect or any possible implementation thereof to be implemented.
[0053] Fifthly, embodiments of this application provide a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the method described in the first aspect or any possible implementation thereof to be implemented.
[0054] In a sixth aspect, embodiments of this application also provide a computer program or computer program product, which includes instructions that, when executed, cause a computer to perform the method described in the first aspect or any possible implementation thereof.
[0055] In a seventh aspect, embodiments of this application also provide a chip including at least one processor and a communication interface, the processor being configured to perform the method described in the first aspect or any possible implementation thereof.
[0056] It is understandable that the beneficial effects of the second to seventh aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here for the sake of brevity. Attached Figure Description
[0057] Figure 1 is a flowchart illustrating the battery data generation method provided in an embodiment of this application;
[0058] Figure 2 shows a schematic diagram illustrating the implementation principle of the diffusion model;
[0059] Figure 3 shows a schematic diagram of a network structure when the current generation model of this application is implemented using a diffusion model architecture;
[0060] Figure 4 is a schematic diagram of the network structure when the current generation model is a GAN architecture;
[0061] Figure 5 shows a schematic diagram of a network structure when the voltage generation model of this application is implemented using a diffusion model architecture;
[0062] Figure 6 shows a schematic diagram of a network structure when the voltage generation model of this application is implemented using a diffusion model;
[0063] Figure 7 is a schematic diagram of the network structure when the voltage generation model is a GAN architecture;
[0064] Figure 8 shows an overall framework diagram of the current data generation method improved according to an embodiment of this application;
[0065] Figure 9 shows a schematic diagram of a voltage generation model during the training phase, considering the operating conditions.
[0066] Figure 10 shows a comparative schematic diagram of the current and voltage segments before and after the battery data generation model provided in the embodiment of this application performs the missing value completion task;
[0067] Figure 11 shows a comparative schematic diagram of the current and voltage segments before and after the battery data generation model provided in the embodiment of this application performs the short segment extension task;
[0068] Figure 12 shows a schematic diagram of an implementation architecture of the battery data generation method provided in this application.
[0069] Figure 13 illustrates a schematic diagram of possible applications of battery data generated by the battery data generation method provided in this application embodiment;
[0070] Figure 14 is a schematic diagram of a battery data generation device provided in an embodiment of this application;
[0071] Figure 15 is a schematic diagram of the structure of the computing device provided in the embodiment of this application. Detailed Implementation
[0072] The term "and / or" used in this article describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. The symbol " / " in this article indicates that the related objects are in an "or" relationship; for example, A / B means A or B.
[0073] The terms "first" and "second," etc., used in the specification and claims herein are used to distinguish different objects, not to describe a specific order of objects. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same properties in the description of embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a list of elements is not necessarily limited to those elements, but may include other elements not expressly listed or inherent to such processes, methods, systems, products, or apparatus.
[0074] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0075] In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more, for example, multiple processing units means two or more processing units, multiple elements means two or more elements, etc.
[0076] To address the issue of insufficient battery data, various solutions have been proposed in related technologies. For example, one solution uses current, voltage, and temperature data as input, trains a generative model based on a GAN framework, generates fake battery data to enhance the original battery data, and then combines the generated dataset with the original dataset to construct a so-called "socio estimation" model, improving its accuracy. In this GAN framework, both the generator and discriminator are composed of multiple long short-term memory (LSTM) network modules connected in series, using LSTM to capture dynamic correlations in the battery data.
[0077] However, this scheme has the following technical drawbacks: Generating battery data by capturing time-series correlations in the data using LSTM requires ensuring strong correlations between consecutive samples during the generation process. This can lead to over-smoothing of the generated samples, making it only suitable for generating battery data under constant current charge-discharge conditions. For battery data under stepped or dynamic charging-discharge conditions, the current data is pseudo-time series data with strong randomness, resulting in poor generation performance.
[0078] The second related technical solution uses four-dimensional features—current, voltage, temperature, and battery condition labels—as model input. A generative model is trained based on a GAN framework to generate fake battery data. This solution employs the TimeGAN model architecture, with both the generator and discriminator composed of cascaded LSTM modules. Unlike the first related technical solution, this method adds three additional penalty terms to the model training loss function, besides the GAN's own penalty term: First, the generated data must be able to predict the data from the next time step as much as possible, ensuring strong dependencies between time steps. Second, the latent features constructed before inputting real data into the discriminator must have the ability to reconstruct the original data, ensuring its representational power. Third, the generated data must conform to the condition category used as input.
[0079] However, this approach still has the following problems: if the original input sequence is very long, the LSTM processing speed is very slow. The overall framework overemphasizes the correlation between the generated data, which can lead to over-smoothing of the generated data and distortion of the generated current data.
[0080] A battery system is a highly nonlinear, pseudo-cyclic electrochemical system. Its current and voltage characteristics during charging and discharging are complex and influenced by various factors, including the charging / discharging object (e.g., residential / energy storage stations), the charging / discharging mode (e.g., fast charging / deep charging / shallow charging / discharging), and battery characteristics (e.g., power / polarization / SOC). This presents a significant challenge to data generation. The shortcomings of related technical solutions are summarized below:
[0081] 1. In real battery data, current and voltage data have a strong correlation. However, related technologies do not consider the requirement for a strong correlation between the generated current and voltage data, resulting in a mismatch between the current and voltage data in the generated battery data, leading to insufficient battery data quality and reduced usability.
[0082] 2. Real data fragments vary in length, with sample lengths ranging from tens to thousands, posing a challenge in modeling and generating ultra-long sequences. Related techniques based on LSTM modules have slow processing speeds.
[0083] 3. The current data is pseudo-time series data, lacking strong time-series dependencies. Its changes are random and varied. For example, due to the battery module mechanism, the current is prone to random fluctuations at the end of charging and discharging. Affected by power plant peak shaving and frequency regulation, the current segment undergoes non-stationary dynamic changes. Related technical solutions overemphasize the time-series dependencies of the data, resulting in overly smoothed data with distorted details.
[0084] 4. The generative models in the relevant technical solutions cannot extend the missing values and short segments in the original data.
[0085] In view of this, embodiments of this application provide a method and apparatus for generating battery data. Through a two-stage battery data generation mode, in the first generation stage, the start and end SOC conditions are input to the current generation model to guide the current generation model to generate current segments that meet the start and end SOC conditions. Then, in the second generation stage, the start and end SOC conditions and the current segments generated in the first generation stage are input to the voltage generation model to guide the voltage generation model to generate voltage segments that meet the start and end SOC conditions and correspond to the current segments. This two-stage current and voltage data generation ensures that the generated current and voltage segments follow the battery model mechanism, and that the current and voltage segments have a strong correspondence, thus improving the quality of the generated battery data and thereby enhancing its usability.
[0086] To facilitate understanding of the battery data generation method and apparatus provided in the embodiments of this application, some technical terms involved in the embodiments of this application will be briefly explained below.
[0087] Equivalent circuit models (ECMs) use electrical components such as resistors, capacitors, voltage sources, and current sources to construct circuits that simulate the electrical performance of a battery. Because ECM models are based on empirical methods, they require relevant experimental data for parameter fitting. ECM models have very low computational cost and high solution efficiency. Furthermore, due to the presence of RC parallel structures in the ECM equivalent circuit, they exhibit good adaptability to drastic load changes.
[0088] State of Charge (SOC): This refers to the relative measure of energy stored in a battery, defined as the ratio of the amount of charge that can be extracted from the cell at a specific point in time to the total capacity. Accurate SOC estimation is crucial because the battery management system (BMS) uses SOC estimates to inform the user of the expected available charge before recharging, ensuring the battery operates within a safe range, implementing control strategies, and ultimately extending battery life.
[0089] Battery Management System (BMS): This refers to the electronic system that manages rechargeable secondary batteries (mostly lithium-ion batteries, but may also be battery packs). Its functions include ensuring that the battery is used under safe operating conditions, avoiding abnormal conditions such as over-discharge, over-charge, and over-temperature, maintaining the battery's lifespan, monitoring and estimating various battery information (such as battery health status and state of charge), calculating battery-related information, reporting battery information, controlling the battery's operating environment, battery certification, and battery balancing.
[0090] Open circuit voltage (OCV), also known as resting voltage, refers to the voltage between the two terminals of a battery when it is not charging or discharging. Open circuit voltage is an important indicator of a lithium battery's capacity and can be used to estimate its remaining charge and state of being. Therefore, measuring the OCV of a lithium battery is crucial for its use and maintenance.
[0091] The following describes in detail, with reference to the accompanying drawings and embodiments, the specific implementation of the battery data generation method and apparatus provided in this application.
[0092] Figure 1 is a flowchart illustrating the battery data generation method provided in this embodiment. This method can be executed by any device, equipment, platform, or cluster of devices with computing capabilities. This embodiment does not specifically limit the specific computing device executing the method; a suitable computing device can be selected as needed. For example, it can be implemented by a terminal device, i.e., the current generation model and voltage generation model are deployed on the terminal device to provide a high-quality battery data generation service. Alternatively, it can be implemented by a server, with the battery generation model and voltage generation model deployed on the server to provide a high-quality battery data generation service. Alternatively, it can be implemented on a cloud device to provide a high-quality battery data generation service to users in the form of a cloud service. For ease of description, the form of the executing entity will not be distinguished in the following text; all will be described as executing devices. As shown in Figure 1, the battery data generation method provided in this embodiment includes at least steps S101 to S104.
[0093] In step S101, SOC information is obtained.
[0094] In this embodiment, the SOC information includes the starting SOC and ending SOC of the battery data to be generated, which can be simply referred to as start-end SOC. The start-end SOC can be obtained by various methods. For example, the start-end SOC can be obtained by uniform sampling. For instance, sampling can be performed from 0% to 100% at sampling intervals of 10%, and the resulting start-end SOCs are 0% to 10%, 10% to 20%, 20% to 30%, 30% to 40%, 40% to 50%, 50% to 60%, 60% to 70%, 70% to 80%, 80% to 90%, and 90% to 100%, respectively. Similarly, other start-end SOCs can be obtained by adjusting the sampling interval, thus ensuring the diversity of the generated battery data and improving the training effect of the general battery safety pre-training model.
[0095] For example, the start and end SOCs can also be obtained through random sampling, such as randomly sampling from 0% to 100% to obtain the start and end SOCs.
[0096] This application does not specify the exact method for obtaining the start and end SOCs in the embodiments. Appropriate methods can be used to obtain the start and end SOCs as needed.
[0097] In step S102, the SOC information is used as input to the current generation model to guide the current generation model in generating current segments.
[0098] The start and end SOCs obtained in the previous step are input into the current generation model to guide it in generating current segments that meet the start and end SOC conditions. The current generation model can be implemented using various generation models, such as GANs, VAEs, and diffusion models. This application does not specifically limit the type of generation model used; a suitable model can be selected as needed.
[0099] The current generation model of this application embodiment is described below from the training phase and the inference phase of the current generation model.
[0100] Training phase
[0101] First, a training dataset is obtained. This dataset consists of multiple training data sets, each containing the start and end SOC, current segments, and voltage segments for the same battery within the same time period. The start and end SOC and current segments from each training data set are used as training data for the current generation model. The start and end SOC, and the current and voltage segments generated by the current generation model based on the start and end SOC, are used as training data for the voltage generation model. For example, during battery charging / discharging, the actual start and end SOC and current segments of the battery are collected and recorded. For instance, if a battery's SOC increases from 10% to 80% during a 30-minute charging process, the current and voltage segments during this charging process are recorded. This current segment can be referred to as the current segment corresponding to the start and end SOC (i.e., starting SOC of 10% and ending SOC of 80%). In other words, the battery generates a set of battery data during charging / discharging, including start and end SOC, current segments, and voltage segments. Each training data set in the current generation model's training dataset includes start and end SOC and current segments.
[0102] The training dataset is obtained by preprocessing the raw battery data. In one example, preprocessing includes alignment; for example, for original current and voltage data of varying lengths, missing values are first imputed, such as by using the previous element to fill in missing values. The cell capacity is then calculated using the ampere-hour integration method on all imputed data, and the mean and variance of the cell capacity are calculated. The initial and cutoff SOCs for each charge / discharge segment are calculated based on the SOC curve. Finally, all current and voltage segments are standardized to a specified length, such as 1024, through linear interpolation or resampling.
[0103] Then, each current and voltage segment is normalized. For example, the maximum and minimum values of each current and voltage segment are obtained, and then the maximum and minimum values are normalized to scale each current and voltage segment to the 0-1 range, avoiding the influence of data dimensions on model training. In this way, multiple sets of training data for the current generation model and voltage generation model are obtained, which constitute the training dataset for the current generation model and voltage generation model.
[0104] The current generation model is obtained by training the current generation model using the training dataset of the current generation model.
[0105] The current generation model is illustrated using a diffusion model architecture.
[0106] Figure 2 illustrates the implementation principle of the diffusion model. As shown in Figure 2, the diffusion model includes two stages: forward noise addition and reverse noise reduction. In Figure 2, the direction from X0 to Z represents the forward noise addition process, and the direction from Z to X0 represents the reverse noise reduction process. In the noise addition stage, given the data source (current segment in this application), noise (e.g., Gaussian noise or Poisson noise) is continuously added to it in small amounts multiple times at a certain ratio, ultimately transforming it into white noise through T noise additions. The formula for the forward noise addition process is as follows:
[0107] Where 0 < β t <1 indicates the noise variance at each step, ranging from 0 to 1, ∈ t ~N(0,I) represents Gaussian noise (in some other examples, it can also be other noise such as Poisson noise). t∈{1,2,3,…,T} represents the noise addition / denoising steps in the diffusion model. Typically, T is chosen to be 1000. Later steps use larger variances, i.e., satisfying 0<β1<β2<…<β T <1, the original data corresponds to x0. Forward noise addition is a linear process and can be achieved without a neural network.
[0108] The second stage involves sequentially denoising the Gaussian noise T times to restore it to its original state as much as possible. This denoising stage is the reverse of the forward noise addition process, considering x... t →x t-1 Unlike the forward denoising process, the denoising process cannot be modeled as a simple linear relationship. It requires learning the expectation and variance of each denoising step using neural network parameters θ, as follows: x t-1 ~p(x t-1 |x t )=N(x t-1 μ(x) t ,t),∑ θ (x t ,t,soc))
[0109] μ(x t ,t),∑ θ (x t (t, soc) represents the mean and variance. The neural network here can be called a noise prediction network. The noise prediction network can have a UNet network structure, and the input to the noise prediction network is x. t Given time step t and start / end soc, the model output is a generated current segment whose distribution closely approximates the input current segment data. The model input x t At step 0, the initial input is a current segment from a set of training data. In subsequent time steps, it becomes a noisy current segment. For example, if there are 1000 noisy time steps, then at step 500, the input x of the diffusion model...t This is the current segment after 499 noise additions.
[0110] To ensure the quality of the current segments generated by the current generation model, the start and end SOCs and current codes are fused during model processing to fully capture the influence of start and end SOCs on current changes.
[0111] Figure 3 illustrates a network structure diagram of the current generation model implemented using a diffusion model architecture according to an embodiment of this application. As shown in Figure 3, the current generation model is a UNet network structure, which is an Encoder-Decoder architecture. The Encoder and Decoder can be connected through residual layers. SOC encoding is introduced in each Encoder-Decoder layer to fully interact with current data and SOC information, thus fully capturing the impact of start and end SOC on current changes. For example, in Figure 3, the input start and end SOC are encoded by a multilayer perceptron (MLP) to obtain the SOC encoding vector. Of course, in some other examples, SOC can also be encoded using other networks.
[0112] Of course, in some other examples, it's not necessary to introduce SOC encoding in every Encoder-Decoder layer; instead, SOC encoding can be introduced in only one Encoder-Decoder layer, or in multiple Encoder-Decoder layers. Introducing SOC encoding means fusing it with the encoder output, the decoder output, or the output of the residual network layer in the Encoder-Decoder. For example, the SOC encoded vector is fused with the current encoded vector output by the encoder in the Encoder-Decoder to obtain a fused vector 'a', which is then used as the input to the next encoder layer. When the encoder is the last layer, fused vector 'a' is used as the input to the residual layer. Alternatively, the SOC encoded vector is fused with the output of the residual network layer in the Encoder-Decoder to obtain a fused vector 'b', which is then used as the input to the next decoder layer. Or, the SOC encoded vector is fused with the output of the decoder in the Encoder-Decoder to obtain a fused vector 'c', which is used as the input to the next decoder layer when the decoder is not the last decoder.
[0113] It should be noted that the SOC encoding vector and the current representation vector in the noise prediction network (including the encoder vector output by the encoder, the current representation vector output by the residual layer, or the decoder vector output by the decoder) can be fused in various ways. For example, they can be fused by concatenating the SOC encoding vector and the current representation vector, or they can be fused in other feasible ways, such as by superposition and nonlinear weighting. This application does not limit the specific method of fusing the SOC encoding vector and the current representation vector, and a suitable fusion method can be selected as needed.
[0114] In another example, considering the weak temporal characteristics of current changes, to break away from the one-dimensional modeling approach for sequence data, this embodiment rearranges the one-dimensional current data into a 2D matrix similar to an image. For example, a 1*1024 one-dimensional current sequence is rearranged into a 32*32 2D matrix. Then, 2D convolution is used to characterize the short-term and long-term patterns and detailed changes in the current data, and SOC encoding and current encoding are fused during the convolution process. In other words, both the encoder and decoder in the noise prediction model are built based on 2D convolutional neural networks.
[0115] Reasoning stage
[0116] During the inference phase, the current generation model does not include the noise-adding module of the diffusion model; that is, no noise-adding processing is required on the input data during the inference phase. The current generation model includes a noise prediction network of the diffusion model, which predicts the noise at each time step. The noise from the input noise samples is then denoised using the predicted noise from T time steps, and the generated current segment is output.
[0117] For example, random sampling of Gaussian noise yields current noise samples, and the current noise sample x is... t Using time step t and start / end soc as inputs to the noise prediction model, the model predicts the noise estimate for the current time step, and then applies the noise estimate for the current current noise sample x to the model. t Denoising is performed to obtain the current noise sample x for the next time step. t-1 Through T iterations, the generated current segment is output.
[0118] Understandably, the randomly sampled Gaussian noise needs to be compatible with the length of the current segment output by the current generation model. For example, if the current segment is a 32*32 2D matrix, the randomly sampled Gaussian noise is also a 32*32 2D matrix. The current generation model generates a 2D representation of the current segment, and then converts the 2D representation of the current segment into a 1D current sequence. For example, the 32*32 2D current segment is converted into a 1*1024 one-dimensional current sequence to obtain the generated current segment.
[0119] In one example, the current noise sample is a 2D current noise sample, which corresponds to the training phase. The current segments input during the training phase are converted into a 2D matrix representation. Therefore, the current noise sample sampled during the inference phase is also a 2D current noise sample, for example, the current noise sample is 32*32 Gaussian noise.
[0120] The explanation will be based on the current generation model using a GAN architecture.
[0121] Training phase
[0122] A generator can be constructed using multi-scale 2D deconvolution, and SOC encoding can be introduced into each deconvolution layer of the generator to interact with current and SOC information, thereby capturing the influence of SOC on current changes.
[0123] Figure 4 is a schematic diagram of the network structure when the current generation model is a GAN architecture. As shown in Figure 4, the embodiment of this application uses a GAN architecture based on start and end SOC conditions for current data generation, which includes two parts: a generator and a discriminator.
[0124] The generator aims to generate spurious current data based on noise vectors sampled from a specified distribution, with the input being a noise vector Z∈R sampled from a uniform distribution. N×d and the start and end soc vectors S∈R N×2 Where N represents the number of training samples, and the start and end soc vectors S∈R N×2 Feature expansion S∈R is performed using a multilayer perceptron (MLP). N×j The noise vector Z∈R N×d A three-dimensional tensor C∈R is obtained by using a kernel block composed of multiple layers of 2D convolutional neural networks and batch-norm layers. N×k×h A 2D convolutional neural network is used to broaden the modeling perspective and better capture changes in the shape of current data. Next, C∈R... N×k×h Rearrangement transforms it into a two-dimensional tensor C∈R N×kh Then, the two-dimensional tensor C is processed by Reshape to align S in dimensions, facilitating the subsequent splicing steps. The spliced S∈R N×j and C∈RN×kh The two tensors are then fed into an adaptive fusion layer, which can employ a multilayer perceptron or a convolutional neural network, ultimately outputting a spurious current D∈R. N×l ,l represents the sequence length.
[0125] The discriminator aims to build a classifier that separates generated current and real current as much as possible. The inputs are spurious current and soc vector, real current and soc vector. The discriminator can be a binary classifier composed of a 2D convolutional neural network or a multilayer perceptron. The outputs are the probabilities of real current (labeled 1) and spurious current (labeled 0) with labels 0 and 1, respectively.
[0126] During training, the generator and discriminator are trained using an adversarial generation approach. The objective function is shown in the following formula. First, the generator is optimized to maximize the discriminator loss, ensuring that the spurious current generated by the generator is as similar as possible to the real current. Then, the discriminator is optimized to distinguish the real current from the spurious current as much as possible. The two models are iteratively optimized alternately until the loss of both modules tends to stabilize, thus completing the training.
[0127] Where G represents the generator and D represents the discriminator.
[0128] Reasoning stage
[0129] During the inference phase, the current generation model does not include a discriminator, only a generator. That is, the inference phase only executes the part of the input data in Figure 4 to generate the current segment. For example, random sampling of Gaussian noise is used to obtain current noise samples. The current noise samples and the start and end SOCs are used as inputs to the current generation model. The start and end SOCs are input to the MLP, which processes the start and end SOCs to obtain the SOC representation vector. The current noise samples are used as inputs to 2D kernel blocks. The current noise samples are processed sequentially by 2D kernel blocks, 2D tensors, and reshape to obtain the current noise representation vector. Then, the SOC representation vector and the current noise representation vector are fused to obtain a fused vector. The fused vector is input to the generator to generate the current segment.
[0130] In step S103, the current segment and SOC information are used as inputs to the voltage generation model to guide the voltage generation model in generating voltage segments.
[0131] The above two steps yield the start and end SOCs and the generated current segments. These SOCs and current segments are then used as inputs to the voltage generation model, guiding the model to generate voltage segments. The generated point voltage judgment, guided by the current generated in the previous step, ensures a strong correspondence between the generated current and voltage, adhering to the battery ECM equation principle.
[0132] In one example, the current generation model is a voltage generation model based on multi-scale fusion. By fusing the current and voltage representations at different scales, the influence of current on voltage details and shape changes at different scales can be captured, fully modeling the P(U|I) conditional distribution and enhancing the correspondence between the two.
[0133] It should be noted that different scales can be understood as sampling at different granularities of current or voltage segments. Different features can be observed at different scales (also called granularities), thus accomplishing different tasks. For example, smaller scale sampling reveals more details, while larger scale sampling reveals the overall trend. In this application, the current features and voltage noise features at different scales are fused to simultaneously capture the influence of current on voltage details and shape changes. Features of current and voltage segments at different scales can be obtained in various ways. For example, different sampling intervals can be set to sample current and voltage segments separately to obtain features of current and voltage segments at different scales. Taking current as an example, for a certain current segment, the current segment is first sampled at a sampling interval of 10s (i.e., the current segment is sampled once every 10s) to obtain the current segment features at the first scale (smallest scale). Then, the current segment is sampled at a sampling interval of 20s to obtain the current segment features at the second scale, and so on, to obtain the current segment features at the Nth scale. A similar operation is performed on the voltage noise samples to obtain voltage segment features at N scales. Then, the current segment features and voltage segment features at the same scale are fused; that is, the current segment features at the first scale are fused with the voltage segment features at the first scale, the current segment features at the second scale are fused with the voltage segment features at the second scale, and so on, until the current segment features at the Nth scale are fused with the voltage segment features at the Nth scale. This completes the fusion of current and voltage segment features at different scales. Alternatively, current and voltage segment features at different scales can be obtained by processing the current and voltage segments separately using convolutional kernels of different scales. This application does not limit the specific method for obtaining current and voltage segment features at different scales; appropriate methods can be selected as needed.
[0134] The voltage generation model is used as an example of a diffusion model architecture for illustration.
[0135] Training phase
[0136] Figure 5 shows a schematic diagram of a network structure when the voltage generation model of this application is implemented using a diffusion model architecture. As shown in Figure 5, unlike the current generation model, each step of the denoising process in the voltage generation model is performed using the start and end SOCs, while the current generation model uses the start and end SOCs as inputs to generate current segments for denoising, in order to ensure a strong correspondence between current and voltage data. Therefore, the above denoising process is transformed into the following formula: x t-1 ~p(x t-1 |x t )=N(x t-1 μ(x) t ,t),∑ θ (x t ,t,soc,current))
[0137] μ(x t ,t),∑ θ (x t The parameters (t, soc, current) are provided by the neural network, where current represents the current segment corresponding to the input voltage data. The shape and length of the generated voltage data are determined by soc and the current data. The process for further predicting noise is modified as follows:
[0138] Compared to f in the current generation model θ Here, the focus is on the voltage generated by f. θ The design will be more complex, requiring a separate 2D neural network to represent the current, and the representation vector output by the 2D convolutional neural network will be concatenated to x. t Then, voltage data is fed into each layer of the network model to fully model the correlation between current, voltage, and solenoid.
[0139] Current characterization vector I t With voltage representation vector X t Multi-scale fusion is performed; for example, the current representation vector includes multiple sub-representation vectors I1, I2, ..., I at different scales. n The voltage representation vector includes multiple sub-representation vectors X1, X2, ..., X at different scales. n Then, the sub-representation vectors of current and voltage at different scales are fused, for example, I1 and X1 are fused, I2 and X2 are fused, ..., I n and X nBy fusing current and voltage representations at different scales, the influence of current on voltage details and shape changes at different scales can be captured. The P(U|I) conditional distribution is fully modeled, the correspondence between the two is enhanced, and the strong correspondence between the current and voltage segments generated by the model is increased.
[0140] It should be explained that, since voltage data is correlated with time, the voltage data does not need to be rearranged into a 2D matrix. The voltage data is a one-dimensional voltage sequence, and the corresponding voltage noise samples are also one-dimensional noise samples.
[0141] Reasoning stage
[0142] During the inference phase, the voltage generation model does not include the noise-adding module of the diffusion model; that is, no noise-adding processing is required on the input data during the inference phase. The voltage generation model includes a noise prediction network of the diffusion model, which predicts the noise at each time step. The noise from the input noise samples is then denoised using the predicted noise from T time steps, and the generated current segment is output.
[0143] For example, random sampling of Gaussian noise yields voltage noise samples, and the voltage noise sample X at the current time step and the current segment I generated by the current generation model are then combined. t Using time step t and start / end soc as inputs to the noise prediction model, the model predicts the noise estimate for the current time step, and then applies the noise estimate to the voltage noise sample X at the current time step. t Denoising is performed to obtain the voltage noise sample X for the next time step. t-1 Through T iterations, the generated voltage segment is output.
[0144] The following explanation uses a voltage generation model based on a VAE architecture as an example.
[0145] Training phase
[0146] Figure 6 shows a schematic diagram of a network structure when the voltage generation model of this application is implemented using a diffusion model. As shown in Figure 6, the voltage generation model adopts a VAE architecture. The voltage generation model structure during the training phase is shown in Figure 6. The voltage generation model includes two parts: an encoder and an interpretable decoder.
[0147] The encoder uses the original current I∈R N×l Voltage U∈R N×l and start and end SOC S∈R N×2 For input, S∈R N×2 Extending to a higher-dimensional space S∈R using a multilayer perceptron N×d ,U∈R N×lCompressed to a low-dimensional space U∈R by a V-Encoder N×d The V-Encoder can be implemented using MLP, GRU, or 1D convolution, where I∈R N×l Compressed to a specified dimensional space I∈R by 2D convolution. N×d The three vectors are then concatenated and passed through an adaptive aggregation layer to output the mean and standard deviation vectors. This adaptive aggregation layer can be implemented using networks such as multilayer perceptrons or 1D convolutions. The generated mean and standard deviation vectors are then resampled to obtain the noise vector Z∈R. N×h .
[0148] The interpretable decoder takes a noise vector as input and current and soc vectors as conditions to generate a trend vector and a residual vector, respectively. The final spurious voltage is obtained by superimposing these two vectors. The model training objective consists of two terms: the first constrains the generated spurious voltage to conform as closely as possible to the original data distribution; the second constrains the noise vector to be as close as possible to a standard normal distribution, allowing noise to be directly sampled from a standard Gaussian distribution for data generation. The objective function is shown below:
[0149] Reasoning stage
[0150] During the inference phase, the voltage generation model does not include an encoder, but only an interpretable decoder. This means that the start and end points of the SOC, current segments, and voltage noise samples during the inference phase are directly input to the interpretable decoder. After processing by the interpretable decoder, the generated voltage segments are output.
[0151] For example, random sampling of Gaussian noise yields voltage noise samples. These voltage noise samples, current segments generated by the current generation model, and start and end SOCs are used as inputs to an interpretable decoder. After processing by the interpretable decoder, the generated current segments are output.
[0152] It is understandable that the randomly sampled Gaussian noise needs to be compatible with the length of the voltage segment output by the voltage generation model. For example, if the voltage segment output by the voltage generation model is a one-dimensional voltage sequence of 1*1024, then the randomly sampled Gaussian noise is also a one-dimensional Gaussian noise of 1*1024.
[0153] Optionally, the interpretable decoder fuses current representations and voltage noise sample representations at different scales during processing to capture the influence of current on voltage details and shape changes at different scales, fully model the P(U|I) conditional distribution, and enhance the correspondence between the two.
[0154] Taking the voltage generation model as an example, which is based on the GAN architecture.
[0155] Training phase
[0156] Figure 7 shows a schematic diagram of the network structure when the voltage generation model uses a GAN architecture. As shown in Figure 7, the GAN architecture generates current data and includes two parts: a generator and a discriminator. The start and end SOCs, current and voltage noise samples generated by the current generation model (e.g., Gaussian noise or Poisson noise) are used as inputs. 1D-deconvolution is used to represent these samples, and the representations of the current and voltage noise samples are fused at multiple scales based on the 1D-deconvolution output. Training is then performed using an adversarial generative objective function. This is similar to the implementation of a current generation model based on a GAN architecture. For a detailed description of Figure 4 above, please refer to the previous text; for brevity, it will not be repeated here.
[0157] Reasoning stage
[0158] During the inference phase, the current generation model does not include a discriminator, but only a generator. That is, the inference phase only executes the input data in Figure 7 to generate the voltage segment in the generator. For example, random sampling of Gaussian noise is used to obtain voltage noise samples. The voltage noise samples, the start and end SOCs, and the current segments generated by the current generation model are used as inputs to the voltage generation model. After processing by the generator, the voltage segments are output.
[0159] The current generation model and voltage generation model in this embodiment can be considered as a battery data generation model. In other words, the battery data generation model includes a current generation model and a voltage generation model. The battery data generation model has a time sequence requirement when generating battery data: first, the current generation model is called to generate a current segment, and then the battery data generation model is called again to generate a voltage segment using the generated current segment. The current and voltage segments are generated in two stages: in the first stage, the current generation model generates a current segment using the start and end SOC; in the second stage, the voltage generation model generates a voltage segment using the current segment generated by the current generation model and the start and end SOC. The current generation model and the voltage generation model can be of the same type, for example, both can be GAN, VAE, or diffusion models. Alternatively, the voltage generation model and the current generation model can be of different types, for example, the current generation model can be a diffusion model, and the voltage generation model can be a GAN, etc.
[0160] In step S104, battery data segments are determined based on SOC information, current segments, and voltage segments.
[0161] After obtaining the start and end SOC, current segment, and voltage segment through the above steps, the battery data segment is obtained based on the start and end SOC, current segment, and voltage segment.
[0162] In one example, consider that the current and voltage segments output by the current and voltage generation models have fixed lengths, such as 1024 segments each. However, the actual lengths of the current and voltage segments are not fixed; they are determined by the start and end SOCs. Therefore, it is necessary to calculate the actual lengths of the current and voltage segments using the start and end SOCs and then restore them to their true lengths.
[0163] Optionally, the length of the current segment can be calculated using the ampere-hour integration method. The formula for the ampere-hour integration method is shown below:
[0164] Where η represents the charge / discharge efficiency, Q N The actual battery capacity is represented by k, which represents time and corresponds to a sampling point. Δt represents the sampling interval, which is the time difference between two sampling points k+1 and k.
[0165] Therefore, the formula for calculating the sequence length based on the inverse ampere-hour integration method is derived as follows:
[0166] Where Num represents the uniform output length specified by the model (i.e., the current generation model and the voltage generation model), and d represents the sampling interval of the raw data.
[0167] The target length (i.e., the actual length of the current and voltage segments) is calculated using the above formula. When the target length differs from the uniform length output by the model—for example, if the calculated target length is 800, but the model outputs current and voltage segments with lengths of 1024—then the current and voltage segments are processed to adjust their lengths to the target length. This can be done by linear interpolation or resampling (upsampling or downsampling) to adjust the model output current and voltage segments to the target length. This allows for the generation of current and voltage data of arbitrary lengths.
[0168] The current segment and voltage segment after adjustment to the target length, along with the start and end SOC, constitute a set of battery data, also known as a battery segment. That is, a battery segment includes the start and end SOC, the current segment generated based on the start and end SOC (adjusted to the actual length), and the voltage segment generated based on the start and end SOC and the generated current segment (adjusted to the actual length).
[0169] The battery data generation method provided in this application, through a two-stage generation approach of current and voltage data, ensures a strong correspondence between the generated current and voltage data, thereby improving the quality of the generated battery data. Simultaneously, the current data undergoes 2D reconstruction, using 2D convolution to characterize the short- and long-term patterns and detailed changes in the current data, constructing a 2D current generation model based on SOC (State of Charge) to generate current data with varying lengths under a specified SOC state. This application breaks away from the one-dimensional modeling approach for sequential data, proposing a 2D reconstruction method to construct a current generation model that can generate realistically detailed current segments. Secondly, based on a multi-scale fusion-based voltage generation model, by fusing current and voltage features at different scales, the influence of current on voltage details and shape changes (P(U|I)) is captured in fine detail, ensuring a strong correspondence between current and voltage, and generating voltage segments corresponding to specified SOC and current segments. This ensures that the generated current and voltage segments follow the battery model mechanism, using current and SOC as inputs to the voltage generation model. The multi-scale fusion mechanism fully models the influence of current and SOC on voltage shape and details, guaranteeing a strong correspondence between current and voltage data and improving data usability.
[0170] In some other embodiments, considering the distribution characteristics of battery data and its correlation with battery operating conditions—for example, current data distribution is stepped in multi-stage operating conditions, fluctuates significantly in multi-power operating conditions, and exhibits relatively small overall fluctuations in constant-power operating conditions—this embodiment divides the training dataset into training datasets for different operating conditions. Then, it trains current generation models to generate current data for different operating conditions using these training datasets. For instance, the operating condition statistics module divides the original current data into three categories: constant power, multi-stage, and dynamic operating conditions. For each operating condition, the maximum and minimum values of the current data are calculated, and the current and voltage data are scaled to the 0-1 range using maximum-minimum value normalization to avoid the influence of data dimensions on model training. Then, the training datasets for different operating conditions are used to train current generation models and voltage generation models for different operating conditions. These models are used to generate current and voltage segments under different operating conditions. For example, current and voltage generation models for constant power conditions are used to generate current and voltage segments under constant power conditions; current and voltage generation models for multi-stage conditions are used to generate current and voltage segments under multi-stage conditions; and current and voltage generation models for dynamic conditions are used to generate current and voltage segments under dynamic conditions. This improves the quality of the battery data generated by the models, enabling the generation of realistic charge-discharge battery segments under various operating conditions, including dynamic, constant power, and multi-stage conditions.
[0171] Figure 8 shows the overall framework of the current data generation method improved in this application embodiment. As shown in Figure 8, the left side represents the offline training stage, and the right side represents the online inference stage. In the training stage, the collected raw current segments, voltage segments, and start-end SOCs are preprocessed to obtain standardized battery data segments. Then, the battery data operating conditions are divided. For example, according to the operating condition statistical rules, the battery data is divided into three categories of training data: constant power, multi-stage, and dynamic operating conditions. The training data of each of the three operating conditions are used to train the current generation model corresponding to each operating condition. Then, the current segments output by the current generation model corresponding to each operating condition, along with the start-end SOC and voltage segments under that operating condition, are used to train the voltage generation model corresponding to each operating condition, thus obtaining the current generation model and voltage generation model corresponding to each operating condition. During the inference phase, the current generation model for the specified operating conditions is imported based on the specified operating conditions (the specified operating conditions can be input by the user or automatically generated by the default order of the execution equipment, such as constant power operating conditions first, then multi-stage operating conditions, and finally dynamic operating conditions). The current generation model under the specified operating conditions and the start and end SOC are used to generate current segments. Then, the voltage generation model under the specified operating conditions, the start and end SOC, and the current segments generated by the current generation model are used to generate voltage segments. Finally, the ampere-hour integration method is used to restore the generated current and voltage segments to the target length. Finally, the data is denormalized to restore the original dimensions. The start and end SOC, current segments, and voltage segments constitute a set of battery segment data.
[0172] In one example, considering multiple operating conditions, both the current generation model and the voltage generation model need to use the operating condition label as input to guide the generation of current and voltage segments under the specified operating conditions during the training and inference phases.
[0173] For example, Table 1 shows the input and output of the battery data generation model during the training phase, where the input comes from the raw data.
[0174] Table 1
[0175] The input requirements for the testing phase, which cannot obtain raw battery data, differ from those for the training phase. The inputs for the testing phase are shown in Table 2.
[0176] Table 2
[0177] The output of the testing phase consists of generated variable-length data, as shown in Table 3:
[0178] Table 3
[0179] Figure 9 illustrates a schematic diagram of a voltage generation model during the training phase, considering the operating conditions. As shown in Figure 9, the inputs include a condition label, State of Charge (SOC), current, and noise. The condition label indicates the specified operating condition, SOC represents the current up to the specified SOC, current represents the current segment generated by the current generation model, and noise represents voltage noise samples. Using the specified operating condition as input to the voltage generation model instructs it to generate voltage segments that conform to the distribution characteristics of the specified operating condition, resulting in a more realistic data distribution of the generated voltage segments.
[0180] In some other embodiments, the current generation model and voltage generation model provided in this application can also perform other tasks. For example, the current generation model can also be used to perform one or more of the following tasks: current missing value completion task, current segment extension task, single-cell current segment generation task, and multi-cell current generation task; the voltage generation model can also be used to perform one or more of the following tasks: voltage missing value completion task, voltage segment extension task, single-cell voltage segment generation task, and multi-cell voltage generation task.
[0181] In other words, the battery data generation method of this application can not only generate battery data, but also support multiple tasks such as single cell data generation, multi-cell data generation, missing value completion, and short segment extension. It has strong versatility and realizes a unified two-stage battery data generation scheme for multiple tasks.
[0182] For example, this solution in the embodiments of this application can support the generation of battery data at the single cell level, and can also support the simultaneous generation of data from multiple cells corresponding to the same current. When generating single-cell data, the above models (i.e., the current generation model and the voltage generation model) are imported, the start and end SOCs are randomly sampled, and an initial sample a is randomly sampled from a Gaussian distribution. The start and end SOCs and the initial sample are input into the current generation model to generate a current segment. Then, an initial sample b is randomly sampled from the Gaussian distribution. The initial sample b, the start and end SOCs, and the generated current segment are input into the voltage generation model to output a generated voltage segment. When generating multi-cell data, the above models (i.e., the current generation model and the voltage generation model) are imported, the start and end SOCs are randomly sampled, and an initial sample c is randomly sampled from a Gaussian distribution. The start and end SOCs and the initial sample c are input into the current generation model to generate a current segment. Then, an initial sample d is randomly sampled from the Gaussian distribution. The start and end SOCs, the generated current segment, and the initial sample d are input into the voltage generation model to generate a voltage segment. Multiple voltage segments generated based on the same current and start and end SOCs and multiple samplings can then be used as multi-cell voltage segments. Multiple initial noise samples (d1, d2, ..., dn) are obtained through repeated sampling. Then, the initial noise samples d1, d2, ..., dn, along with their corresponding start and end SOC values and generated current segments, are used as inputs to the voltage generation model to generate n voltage segments. These n voltage segments constitute the voltage segments of the multi-cell battery. The value of n depends on the number of cells in the multi-cell battery. For example, if the battery has 5 cells, then n is 5, and the voltage generation model generates 5 voltage segments. The battery data at this point includes the start and end SOC values, current segments, and voltage segments 1, 2, 3, 4, and 5. These five sets of data constitute the battery data for the multi-cell battery. Of course, there are other ways to represent it, such as (start and end SOC, current segment, voltage segment 1, voltage segment 2, voltage segment 3, voltage segment 4, voltage segment 5).
[0183] For example, embodiments of this application can also perform tasks such as filling in missing current / voltage values and extending current / voltage segments. That is, based on the constructed generation model (including the current generation model and the voltage generation model), missing values can be filled in or short segments can be extended for battery data with missing segments.
[0184] In practical applications of batteries, there are often shallow charge / discharge segments and missing value segments, which can lead to poor battery data usability. For example, the raw battery data from some sites may contain a large number of shallow charge / discharge segments and missing value segments. Such poor battery data segment usability will further reduce the amount of high-quality battery data. To address this, the battery generation model provided in this application can be used to perform missing value completion tasks on missing value segments and current / voltage segment extension tasks on shallow charge / discharge segments, thereby improving the usability of the raw battery data.
[0185] For example, both the current generation model and the voltage generation model include a noise-adding module. The missing parts are noise-added using this module. The noise-added current segment and its start and end SOCs are then used as input to the current generation model, which generates current data for the noise-added parts, ultimately outputting the padded current segment. A similar operation is used for missing value imputation in the voltage segment. The missing parts are noise-added using the noise-adding module. The noise-added voltage segment, its start and end SOCs, and the padded current segment are then used as input to the voltage generation model, which generates voltage data for the noise-added parts, ultimately outputting the padded voltage segment. In one possible implementation, the missing value imputation steps are as follows: Step 1: Current missing value imputation. The missing parts of the current data with missing values are padded with 0s and used as input for noise addition. The results of the noise addition steps for the observable data (i.e., the current data without missing values) are recorded. Then, denoising is performed based on the trained current generation model. Each observable part is replaced with the recorded noise addition results, ultimately obtaining the value of the missing part. Step 2: Using the completed current segment and the voltage segment to be filled as input, perform voltage missing value filling (that is, use the noise-adding module to add noise to the missing value part of the voltage segment to obtain the noise-adding voltage segment, and then use the start and end SOC, the completed current segment and the noise-adding voltage segment as input to the voltage generation model to generate the voltage value of the noise-adding part, that is, the voltage value of the missing part, to obtain the completed voltage segment).
[0186] Figure 10 shows a comparative diagram of the current and voltage segments before and after the battery data generation model provided in this embodiment performs the missing value completion task. As shown in Figure 10, the current and voltage segments after completion using the scheme provided in this embodiment still maintain excellent detail, and the generated current and voltage segments are close to the data distribution of real current and voltage segments.
[0187] Figure 11 shows a comparative schematic diagram of the current and voltage segments before and after the battery data generation model provided in the embodiment of this application performs the short segment extension task.
[0188] The current / voltage segment extension task, also known as the short segment extension task, operates similarly to the missing value imputation task. Specifically, the noise-adding module in the current generation model adds noise to the portion to be extended (the blank area on the left in Figure 11). The noise-adding current segment and its start and end SOCs are then used as input to the current generation model, which generates current data for the noise-adding portion, ultimately outputting the imputed current segment. The extended current segment and the voltage segment to be extended are then used as input to perform voltage segment extension.
[0189] In another example, considering that in some energy storage scenarios, due to privacy and security requirements, data from some sites cannot be transmitted back to the cloud, resulting in the cloud being unable to obtain massive amounts of data across all scenarios, the battery data generation method provided in this application embodiment is applied to this scenario. For example, the battery data generation model in this application embodiment is trained using the original battery data from different sites. Then, each site uploads the parameters of the trained battery data generation model to the cloud. The cloud server generates battery data fragments that conform to the data distribution characteristics of each site based on the battery data generation model uploaded by each site. In this way, it is possible to learn the data distribution of different sites, generate high-quality simulated data, improve the availability of source data, and solve the problems of data not being transmitted and knowledge / models being able to evolve.
[0190] In other words, the battery data generation method provided in this application embodiment can be applied to the battery life cycle management platform. On the one hand, for locations where data cannot be transmitted back, after the data is uploaded to the database, a generation model can be trained locally, and then the trained generation model parameters can be transmitted back to the server in the cloud development environment. The operation and maintenance personnel can run the transmitted generation model on the cloud server to generate massive amounts of data for each location.
[0191] As is understandable, a "site" refers to the geographical region where the battery is located. For example, sites can be categorized as European sites, Asian sites, African sites, etc. The processing of battery data from each site must comply with the regulatory requirements of its respective region. For instance, battery data from a European site must comply with European regulations, which may prohibit the transmission of raw battery data from that site back to China. In this case, all battery data from the European site cannot be transmitted back to the cloud, resulting in the loss of a significant amount of battery data. The solution provided in this application addresses this issue by uploading only the parameters of the battery data generation model trained at the European site to the cloud. Then, the battery data generation model uploaded from that site is used to generate battery data with a distribution similar to but not identical to the battery data from the European site. This achieves data anonymization while simultaneously obtaining the battery data distribution characteristics of that site.
[0192] Of course, in some other implementations, the local stations can be divided into more granular categories, such as the North China station, South China station, and Central China station.
[0193] Figure 12 illustrates a schematic diagram of an implementation architecture for the battery data generation method provided in this application. As shown in Figure 12, battery data is distributed across multiple different locations, such as location 1, location 2, ..., location N. A data generation model (i.e., the battery data generation model mentioned above in the embodiments of this application, including a current generation model and a voltage generation model) is trained using the original battery data from each location. For example, data generation model 1 for location 1 is trained using battery data from location 1, data generation model 2 for location 2 is trained using battery data from location 2, ..., and data generation model N for location N is trained using battery data from location N. Each location's data generation model can generate battery data that closely approximates the battery data distribution at that location. Then, the parameters of each location's data generation model are uploaded to the cloud. The cloud service obtains the parameters of the trained data generation models for each location and constructs a data generation model for each location based on these parameters. The cloud server uses the data generation models for each location to generate simulation data for each location. The data distribution characteristics of this simulation data closely approximate the actual data distribution characteristics at the location. For example, a cloud server uses data generation model 1 to generate simulation data for site 1, data generation model 2 to generate simulation data for site 2, and so on, using data generation model N to generate simulation data for site N. Then, this simulation data is used to train a battery safety model for pre-training. After training, the battery safety model is sent to each site. In this way, data can remain within the site, and the battery safety model can learn and evolve.
[0194] The battery data generation method provided in this application can fill in data gaps (i.e., extend short segments) in massive amounts of battery data in a database, effectively improving battery data quality and supporting R&D and engineering personnel at various sites to use high-quality data. Of course, the battery data generated by the method provided in this application can be applied to various scenarios. For example, the generated battery data provides a data foundation for R&D personnel in the cloud, who can use this data to conduct various simulation experiments, optimize safety designs, and build various battery safety early warning models, etc.
[0195] Figure 13 illustrates a schematic diagram of possible applications of battery data generated by the battery data generation method provided in this application embodiment.
[0196] Based on the same concept as the aforementioned embodiment of the battery data generation method, this application also provides a battery data generation apparatus 1400. This battery data generation apparatus 1400 can be deployed on a server or terminal device to provide high-quality battery data generation services. The battery data generation apparatus 1400 includes units or modules for implementing the various steps in the battery data generation method shown in Figures 1-13.
[0197] Figure 14 is a schematic diagram of a battery data generation device provided in an embodiment of this application. As shown in Figure 14, the battery data generation device 1400 includes an acquisition module 1401, a current generation module 1402, a voltage generation module 1403, and a determination module 1404. The acquisition module 1401 is used to acquire SOC information, which includes a start SOC and a stop SOC. The start SOC indicates the start SOC of the battery data segment to be generated, and the stop SOC indicates the stop SOC of the battery data segment to be generated. The current generation module 1402 is used to use the SOC information as input to a current generation model to guide the current generation model to generate current segments. The voltage generation module 1403 is used to use the current segments and SOC information as input to a voltage generation model to guide the voltage generation model to generate voltage segments. The determination module 1404 is used to determine battery data segments based on the SOC information, current segments, and voltage segments.
[0198] In one possible implementation, the current generation module 1402 is specifically used to: take the state of charge information and current noise samples as input to the current generation model and output a current segment.
[0199] In another possible implementation, after taking the state of charge information and current noise samples as inputs to the current generation model, the current generation model processes the state of charge information and current noise samples as follows: extracting features from the state of charge information to obtain a first representation vector; extracting features from the current noise samples to obtain a second representation vector; fusing the first representation vector and the second representation vector to obtain a first fused vector; and generating a current segment based on the first fused vector.
[0200] Current generation models can be implemented using various generative models, such as GANs, VAEs, and diffusion models.
[0201] Taking the current generation model as an example of a diffusion model, the current generation model includes a noise prediction model. Using SOC information as input to the current generation model, a specific implementation that guides the current generation model to generate current segments is as follows: using state of charge information and current noise samples as input to the noise prediction network, the state of charge guides the noise prediction network to estimate the predicted noise at the current time step; based on the predicted noise at multiple time steps, the current noise samples are denoised to generate current segments.
[0202] Optionally, the first noise prediction network includes at least one state-of-charge (SOC) encoding layer, an encoder layer, and a decoder layer. The encoder layer includes N encoders, and the decoder layer includes N decoders. Both the encoders and decoders are constructed based on a 2D convolutional neural network, where N is a positive integer. A specific implementation of using SOC information and current noise samples as inputs to the noise prediction network, with the SOC information guiding the network to estimate the first predicted noise at the current time step, involves: using the SOC information as input to the state-of-charge (SOC) encoding layer, outputting an SOC encoded vector; using the current time step and its current noise samples as input to the encoder layer, outputting an encoded vector; and using the encoded vector as input to the decoder layer, outputting the predicted noise at the current time step. During the encoding process in the encoder layer, the SOC encoded vector is fused with the output of at least one encoder; or during the decoding process in the decoder layer, the SOC encoded vector is fused with the input of at least one decoder. In one example, an SOC encoded vector can be introduced into each layer of the Encoder-Decoder architecture to fully interact with the current data and SOC information, thus fully capturing the impact of SOC on current changes.
[0203] In another possible implementation, the current noise sample is a 2D current noise sample.
[0204] In another possible implementation, the voltage generation module 1403 is specifically used to: take the state of charge information, current segments and voltage noise samples as inputs to the voltage generation model, and output an electrical voltage segment.
[0205] In another possible implementation, after taking the state of charge (SOC) information, current segments, and voltage noise samples as inputs to the voltage generation model, the voltage generation model processes the SOC information and current noise samples as follows: Features are extracted from the SOC information to obtain a third representation vector; features are extracted from the current segments to obtain a current representation vector; features are extracted from the voltage noise samples to obtain a fourth representation vector; the current representation vector and the fourth representation vector are fused to obtain a second fused vector; and a voltage segment is generated based on the third representation vector and the second fused vector.
[0206] In another possible implementation, the current representation vector includes multiple sub-current representation vectors, which are obtained based on feature extraction of current segments at different scales; the fourth representation vector includes multiple sub-fourth representation vectors, which are obtained based on feature extraction of voltage noise samples at different scales; a specific implementation of fusing the current representation vector and the fourth representation vector to obtain the second fused vector is as follows: the multiple sub-current representation vectors and the multiple sub-fourth representation vectors are fused to obtain the second fused vector.
[0207] Voltage generation models can be implemented using various generative models, such as GANs, VAEs, and diffusion models. Voltage generation models can be of the same type as current generation models, for example, both can be GANs, VAEs, or diffusion models. Alternatively, voltage and current generation models can be of different types, such as a diffusion model for current generation and a GAN model for voltage generation.
[0208] In another possible implementation, the battery data generation apparatus 1400 provided in this application further includes an operating condition determination module 1405, which is used to determine the target operating condition corresponding to the battery segment data to be generated. The operating condition includes at least two of constant power operating condition, multi-stage operating condition and dynamic operating condition. Based on the target operating condition, a current generation model and a voltage generation model that match the target operating condition are invoked to generate current segments and voltage segments.
[0209] In another possible implementation, both the current segment and the voltage segment are of fixed length; the determination module 1404 is specifically used to: determine the target length based on the ampere-hour integration method and the state of charge information; determine that the target length and the fixed length are different; process the current segment to obtain the current segment of the target length; process the voltage segment to obtain the voltage segment of the target length; and determine the battery data segment based on the state of charge information, the current segment of the target length, and the voltage segment of the target length.
[0210] In another possible implementation, the current generation model can also be used to perform one or more of the following tasks: current missing value completion task, current segment extension task, single-cell current segment generation task, and multi-cell current generation task; the voltage generation model can also be used to perform one or more of the following tasks: voltage missing value completion task, voltage segment extension task, single-cell voltage segment generation task, and multi-cell voltage generation task.
[0211] In another possible implementation, the current generation template is trained based on a first training dataset, which includes multiple sets of first training data, each set of first training data including current segments corresponding to SOC information and state of charge information; the voltage generation model is trained based on a second training dataset, which includes multiple sets of second training data, each set of second training data including SOC information, current segments corresponding to SOC information, and voltage segments.
[0212] In another possible implementation, the battery data generation apparatus 1400 provided in this application further includes a receiving module 1406 and a generation module 1407. The receiving module 1406 is used to receive parameters of the current generation model and the voltage generation model uploaded from several different locations. The generation module 1407 is used to determine the current generation model and the voltage generation model corresponding to each location based on the parameters of the current generation model and the voltage generation model uploaded from each of the several different locations. Based on the current generation model and the voltage generation model corresponding to each location, the generation module 1407 generates the battery data segment for each location.
[0213] The battery data generation apparatus 1400 according to the embodiments of this application can correspond to the execution of the methods described in the embodiments of this application, and the above and other operations and / or functions of each module in the battery data generation apparatus 1400 are respectively to implement the corresponding processes of each method in FIG1-13. For the sake of brevity, they will not be described again here.
[0214] This application also provides a computing device including at least one processor, a memory, and a communication interface, wherein the processor is used to execute the method described in Figures 1-13.
[0215] Figure 15 is a schematic diagram of the structure of the computing device provided in the embodiment of this application.
[0216] As shown in Figure 15, the computing device 1500 includes at least one processor 1501, a memory 1502, and a communication interface 1503. The processor 1501, memory 1502, and communication interface 1503 are communicatively connected, which can be achieved via a wired (e.g., bus) or wireless connection. The communication interface 1503 is used to send and / or receive data from other devices. The memory 1502 stores computer instructions, which the processor 1501 executes to perform the methods described in the aforementioned method embodiments, thereby generating high-quality battery data and improving the availability of the battery data.
[0217] It should be understood that, in the embodiments of this application, the processor 1501 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0218] The memory 1502 may include read-only memory and random access memory, and provides instructions and data to the processor 1501. The memory 1502 may also include non-volatile random access memory. Optionally, the random access memory may be, for example, high bandwidth memory (HBM).
[0219] The memory 1502 can be volatile memory or non-volatile memory, or it can include both. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0220] It should be understood that the computing device 1500 according to the embodiments of this application can execute the method shown in Figures 1-13 of the embodiments of this application. For a detailed description of the implementation of the method, please refer to the above text. For the sake of brevity, it will not be repeated here.
[0221] Embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein when the computer instructions are executed by a processor, the aforementioned method is implemented.
[0222] Embodiments of this application also provide a non-transitory computer-readable storage medium having a computer program stored thereon, wherein when the computer instructions are executed by a processor, the methods mentioned above are implemented.
[0223] An embodiment of this application provides a chip including at least one processor and an interface, wherein the at least one processor determines program instructions or data through the interface; the at least one processor is used to execute the program instructions to implement the method mentioned above.
[0224] Embodiments of this application provide a computer program or computer program product that includes instructions that, when executed, cause a computer to perform the methods mentioned above.
[0225] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0226] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented using hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0227] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this application. It should be understood that the above description is only a specific embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method of generating battery data, the method comprising: include: Obtain state of charge information, which includes initial state of charge and cut-off state of charge. The initial state of charge indicates the initial state of charge of the battery data segment to be generated, and the cut-off state of charge indicates the cut-off state of charge of the battery data segment to be generated. The state of charge information is used as input to the current generation model to guide the current generation model in generating current segments. The current segment and the state of charge information are used as inputs to the voltage generation model to guide the voltage generation model in generating voltage segments. The battery data segment is determined based on the state of charge information, the current segment, and the voltage segment.
2. The method of claim 1, wherein, The step of using the state of charge information as input to the current generation model to guide the current generation model in generating current segments includes: The state of charge information and current noise samples are used as inputs to the current generation model to output the current segment.
3. The method of claim 2, wherein, After using the state of charge information and current noise samples as input to the current generation model, the current generation model processes the state of charge information and current noise samples as follows: Feature extraction is performed on the charged state information to obtain a first representation vector; Feature extraction is performed on the current noise samples to obtain a second characterization vector; The first representation vector and the second representation vector are fused to obtain the first fused vector; The current segment is generated based on the first fusion vector.
4. The method according to claim 2 or 3, characterized in that, The current noise sample is a 2D current noise sample.
5. The method according to any one of claims 1 to 4, characterized in that, The current generation model includes a convolutional neural network.
6. The method according to any one of claims 1 to 5, characterized in that, The step of using the current segment and the state of charge information as inputs to the voltage generation model to guide the voltage generation model in generating voltage segments includes: The state of charge information, the current segment, and the voltage noise sample are used as inputs to the voltage generation model, and the voltage segment is output.
7. The method of claim 6, wherein, After using the state of charge information, the current segment, and the voltage noise sample as inputs to the voltage generation model, the voltage generation model processes the state of charge information and the current noise sample as follows: Feature extraction is performed on the charged state information to obtain a third representation vector; Feature extraction is performed on the current segment to obtain a current characterization vector; Feature extraction is performed on the voltage noise samples to obtain a fourth characterization vector; The current characterization vector and the fourth characterization vector are fused to obtain a second fused vector; The voltage segment is generated based on the third characterization vector and the second fusion vector.
8. The method of claim 7, wherein, The current characterization vector includes multiple sub-current characterization vectors, which are obtained based on feature extraction of the current segment from different scales. The fourth representation vector includes multiple sub-fourth representation vectors, which are obtained based on feature extraction from the voltage noise samples at different scales. The step of fusing the current characterization vector and the fourth characterization vector to obtain the second fused vector includes: The multiple sub-current characterization vectors and multiple sub-fourth characterization vectors are fused to obtain the second fused vector.
9. The method according to any one of claims 1 to 8, characterized in that, The step of using the state of charge information as input to the current generation model to guide the current condition generation model in generating current segments also includes: Determine the target operating condition corresponding to the battery segment data to be generated, wherein the operating condition includes at least two of the following: constant power operating condition, multi-stage operating condition, and dynamic operating condition; Based on the target operating condition, the current generation model and the voltage generation model that match the target operating condition are invoked to generate the current segment and the voltage segment.
10. The method according to any one of claims 1 to 9, characterized in that, Both the current segment and the voltage segment are of fixed length; The process of determining the battery data segment based on the state of charge information, the current segment, and the voltage segment includes: The target length is determined based on the ampere-hour integral method and the state of charge information; It is determined that the target length and the fixed length are different; The current segment is processed to obtain a current segment of the target length; The voltage segment is processed to obtain a voltage segment of the target length; The battery data segment is determined based on the state of charge information, the current segment of the target length, and the voltage segment of the target length.
11. The method according to any one of claims 1 to 10, characterized in that, The current generation model can also be used to perform one or more of the following tasks: current missing value completion task, current segment extension task, single cell current segment generation task, and multi-cell current generation task. The voltage generation model can also be used to perform one or more of the following tasks: voltage missing value completion task, voltage segment extension task, single cell voltage segment generation task, and multi-cell voltage generation task.
12. The method according to any one of claims 1-11, wherein the current generation template is trained based on a first training dataset, the first training dataset including multiple sets of first training data, each set of first training data including state of charge information and a current segment corresponding to the state of charge information; The voltage generation model is trained based on a second training dataset, which includes multiple sets of second training data. Each set of second training data includes state of charge information, a current segment corresponding to the state of charge information, and a voltage segment.
13. The method according to any one of claims 1 to 12, characterized in that, Also includes: Receive parameters of the current generation model and the voltage generation model uploaded from several different locations; Based on the parameters of the current generation model and the voltage generation model uploaded by each of several different locations, the current generation model and voltage generation model corresponding to each location are determined. Based on the current generation model and voltage generation model corresponding to each site, the battery data segment for each site is generated.
14. A battery data generating apparatus characterized by comprising: include: The acquisition module is used to acquire state of charge information, which includes an initial state of charge and a cutoff state of charge. The initial state of charge indicates the initial state of charge of the battery data segment to be generated, and the cutoff state of charge indicates the cutoff state of charge of the battery data segment to be generated. The current generation module is used to take the state of charge information as input to the current generation model and guide the current generation model to generate current segments. A voltage generation module is used to take the current segment and the state of charge information as inputs to a voltage generation model, and guide the voltage generation model to generate voltage segments. The determination module is used to determine the battery data segment based on the state of charge information, the current segment, and the voltage segment.
15. A computing device comprising a memory and a processor, wherein: The memory stores instructions that, when executed by a processor, cause the method described in any one of claims 1-13 to be implemented.
16. A computer readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by a processor, it causes the method as described in any one of claims 1-13 to be implemented.
17. A computer program or computer program product comprising instructions that, when executed, cause a computer to perform the method as claimed in any one of claims 1-13.
18. A chip comprising at least one processor and a communication interface, the processor being configured to perform the method as claimed in any one of claims 1-13.