Lithium battery data generation method and system based on equivalent mileage and diffusion model

CN122501162BActive Publication Date: 2026-08-28HANGZHOU DIANZI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610987903.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-03
Publication Date
2026-08-28
Estimated Expiration
2046-07-03

AI Technical Summary

Technical Problem

[0004]本发明的目的是克服现有电动汽车电池包数据生成方法中老化条件标签表征能力不足、条件特征融合较浅以及局部充放电片段生成可控性较弱的问题,提出一种基于等效里程与扩散模型的锂电池数据生成方法及系统

Benefits of technology

[0064]针对现有电动汽车电池包数据生成方法中老化条件标签表征能力不足的问题,构建融合累计行驶里程、SOH衰退和内阻变化信息的等效里程指标,并以寿命终点等效里程、当前等效老化里程和局部片段起始SOC作为联合条件标签,实现对电池包寿命尺度、当前老化阶段和局部SOC区间的统一约束;针对传统生成模型中条件标签与曲线特征融合较浅的问题,本发明引入交叉注意力机制,将局部充放电曲线特征与等效里程条件特征进行深度融合,增强条件标签与电压、电流、容量、温度等局部曲线特征之间的融合能力,提高生成过程的条件可控性;针对普通条件变分自编码器生成曲线细节不足、样本多样性有限的问题,通过条件变分自编码器潜空间中引入扩散生成模型,并在反向去噪过程中利用条件特征进行交叉注意力引导,使潜变量在条件约束下逐步去噪恢复,从而提升生成局部充放电曲线的真实性、多样性和稳定性,所以这一方法有助于缓解实车数据稀缺、寿命阶段覆盖不足和特定SOC区间样本不足等问题,为SOH评估和RUL预测提供增强数据支撑。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122501162B_ABST
    Figure CN122501162B_ABST
Patent Text Reader

Abstract

The application discloses a lithium battery data generation method and system based on an equivalent mileage and diffusion model. The method first acquires battery-related data in the running process of a battery pack of an electric vehicle, obtains a local charging and discharging segment sample, constructs an equivalent mileage calculation model, obtains a current equivalent aging mileage and a life end equivalent mileage, and combines the local segment starting SOC to obtain a joint condition label for controlling the data generation process. Then, the local charging and discharging segment sample and the joint condition label are extracted and fused, and through an encoder and reparameterization, a latent variable representation is obtained. Finally, based on the latent variable representation and the conditional features, through a conditional latent space diffusion model and a decoder of a conditional variational autoencoder, local charging and discharging data are generated. The application helps to alleviate the problems of lithium battery real vehicle data scarcity, insufficient life stage coverage and insufficient SOC interval sample and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of battery data processing technology, and relates to the application of deep learning technology for data generation, specifically a lithium battery data generation method and system based on equivalent mileage and diffusion model. Background Technology

[0002] In the health management of electric vehicle power batteries, the assessment of battery state of health (SOH) and the prediction of remaining useful life (RUL) heavily rely on massive amounts of real-world operational data. However, real-world vehicle data often faces challenges such as extremely complex operating conditions, incomplete coverage of aging stages, and a lack of end-of-life (EOL) samples, resulting in sparse model training data and severely limiting the accuracy and generalization ability of predictions.

[0003] To alleviate the lack of data, existing technologies often use laboratory cyclic aging data or introduce generative artificial intelligence for data augmentation. However, these methods have significant limitations in practical applications: (1) Poor label applicability: Traditional cycle number labels are difficult to characterize the aging process of battery packs under complex real vehicle conditions, while using indicators such as cumulative mileage, SOH, or internal resistance alone is difficult to simultaneously reflect the battery pack's usage process, capacity degradation, and impedance change characteristics, resulting in the generation model lacking unified conditional constraints on the current aging stage and lifespan. (2) Shallow feature fusion: Simple splicing of conditional labels is difficult to decouple and model the complex mapping relationship between lifespan, aging stage, and local SOC starting point. (3) Weak generation controllability: It is difficult to controllably generate dynamic curves such as voltage, current, capacity, and temperature of local charging and discharging according to a specified aging state and SOC range. Therefore, a lithium battery data generation method and system based on equivalent mileage and diffusion model is proposed. This innovative method constructs an "equivalent mileage" index that integrates multi-dimensional information. It uses the equivalent mileage at the end of the battery pack's lifespan, the current equivalent aging mileage, and the initial state of charge (SOC) of a local segment as joint inputs to a generative model, thereby controlling the output of curve data under specified conditions. This method effectively alleviates the technical bottlenecks of scarce local samples from real vehicles and poor controllability in data generation, providing a high-quality augmented dataset for battery management systems (BMS). Summary of the Invention

[0004] The purpose of this invention is to overcome the problems of insufficient aging condition label characterization ability, shallow fusion of condition features, and weak controllability of local charge-discharge segment generation in existing electric vehicle battery pack data generation methods. This invention proposes a lithium battery data generation method and system based on equivalent mileage and a diffusion model. This method constructs an equivalent mileage index that integrates information on cumulative mileage, SOH degradation, and internal resistance changes. It uses the equivalent mileage at the end of the battery pack's lifespan, the current equivalent aging mileage, and the initial SOC of a local segment as joint condition labels. Combining a conditional variational autoencoder, a cross-attention mechanism, and a diffusion generation model, it achieves controllable generation of local curve data for voltage, current, capacity, and temperature under specified aging states and SOC ranges, thereby providing enhanced data for battery health status assessment and remaining service life prediction.

[0005] To achieve the above objectives, the technical solution specifically adopted by the present invention is as follows:

[0006] In one aspect, this invention provides a method for generating lithium battery data based on an equivalent mileage and diffusion model, comprising the following steps:

[0007] Step 1: Obtain the voltage, current, capacity, temperature, SOC, SOH, cumulative mileage, and internal resistance changes of the electric vehicle battery pack during operation; perform data cleaning, time alignment, and outlier handling on the obtained data to convert it into a unified data representation format; based on the preset local SOC range, extract local charge / discharge segments from the battery pack charging process, discharging process, or mixed charge / discharge process, and perform length unification and serialization processing on the extracted segments to obtain local charge / discharge segment samples. .

[0008] Step 2: Use the cumulative mileage, SOH (State of Health), and internal resistance change rate from Step 1 as inputs. Construct an equivalent mileage calculation model based on the cumulative mileage, SOH degradation rate, and internal resistance change rate to characterize the current aging level and lifespan of the battery pack during actual vehicle operation. Obtain the current equivalent aging mileage. Equivalent mileage to end of life .

[0009] Step 3: Start the SOC of the local fragment obtained in Step 1. and the current equivalent aging mileage obtained in step 2. Equivalent mileage to end of life As input, the life-end equivalent mileage, current equivalent aging mileage, and local segment start state of charge (SOC) are combined to obtain the joint condition label used to control the data generation process. .

[0010] Step 4: Combine the partial charge / discharge fragment sample x obtained in Step 1 with the joint conditional label obtained in Step 3. As input, extract local curve features respectively. Conditional label features The two are then fused using a cross-attention mechanism; the fused features are then... The encoder of the input conditional variational autoencoder is used to obtain the latent variable distribution of a local segment under conditional constraints. , And reparameterize to obtain the latent variable representation .

[0011] Step 5: Represent the latent variables and conditional label features obtained in Step 4. As input, during the diffusion generation process in the latent variable space, noise is gradually added to the latent variables during the forward diffusion process to obtain noisy latent variables; in the reverse denoising process, the conditional features obtained from the joint conditional labels in step 4 are utilized. Furthermore, the conditional features are introduced into the denoising network through a cross-attention mechanism, so that the noisy latent variables are gradually restored to generating latent variables under the constraints of lifetime scale, current aging stage, and local SOC initiation point. .

[0012] Step 6: Generate latent variables obtained in Step 5 and the conditional features obtained from the joint conditional labels in step 4. As input, latent variables will first be generated. Mapping to generate latent variable features Then, the cross-attention mechanism is used to combine the conditional label features. Introducing a decoding process to obtain conditionally guided decoding features. The conditionally guided decoding features are then input into the decoder of the conditional variational autoencoder to generate partial charge-discharge data under specified equivalent mileage conditions and local SOC start-up conditions. .

[0013] Furthermore, the specific implementation process of step 1 is as follows:

[0014] Step 1.1: Determine the initial SOC of the local segment based on the SOC sequence in the battery pack operating data. .

[0015] Step 1.2, using the preset SOC range width As the segment extraction range, local charge-discharge curves are extracted from the battery pack charging process, discharging process, or mixed charge-discharge process; the extracted local charge-discharge curves satisfy their initial SOC as follows: Terminate SOC .

[0016] Step 1.3: Resample the voltage, current, capacity, and temperature sequences in the local segments to ensure that different local segments have a uniform number of sampling points.

[0017] Step 1.4: Normalize the resampled local segments to obtain local charge / discharge segment samples in a uniform format.

[0018] .

[0019] in, Indicates the first One battery pack This indicates the first [number] of the battery pack. A local segment, Indicates the start of local segment SOC, Indicates the width of the local SOC interval. , , , They represent The sequence of voltage, current, capacity, and temperature within a local segment at any given time.

[0020] Furthermore, the specific implementation process of step 2 is as follows:

[0021] Step 2.1: Based on the decrease in the initial health state of the battery pack compared to the current local segment health state, calculate the SOH (State of Health) degradation term to characterize the degree of capacity degradation. The SOH degradation term uses the difference between the initial SOH and the current SOH as the degradation amount, and uses the difference between the initial SOH and a preset lifetime end SOH threshold as a normalization benchmark, thereby mapping the SOH degradation degree of different battery packs to a unified dimension, thus obtaining the SOH degradation term. .

[0022] Step 2.2: Based on the change in the internal resistance characteristics of the current local segment of the battery pack relative to the initial internal resistance reference value, calculate the internal resistance change term to characterize the degree of impedance growth. The internal resistance change term uses the difference between the current degree of internal resistance change and the initial internal resistance reference value as the internal resistance growth amount, and uses the initial internal resistance reference value as the normalization reference, thereby reducing the impact of differences in initial internal resistance between different battery packs on aging characterization, thus obtaining the internal resistance change term. .

[0023] Step 2.3: Calculate the original equivalent mileage based on the cumulative mileage, SOH (State of Health) degradation term, and internal resistance change term. The original equivalent mileage uses the battery pack's cumulative mileage as the basic usage progress, and introduces the SOH degradation term and internal resistance change term to perform aging correction on the cumulative mileage, so that it can simultaneously reflect the vehicle's usage progress, the degree of capacity degradation, and the degree of internal resistance increase. The formula for calculating the original equivalent mileage is:

[0024]

[0025] in, For the first The battery pack in the first The cumulative mileage of a local segment, and These are the weighting coefficients.

[0026] Step 2.4: Monotonicize the original equivalent mileage to obtain the current equivalent aging mileage. Since short-term fluctuations may exist in the SOH estimate, internal resistance characteristics, and operating data, the directly calculated original equivalent mileage may show local decreases. To ensure that the equivalent mileage conforms to the overall irreversible change pattern of the battery pack aging process, the maximum value of the original equivalent mileage for the current local segment and its predecessor segments is taken to obtain the current equivalent aging mileage. .

[0027] Step 2.5: Determine the equivalent mileage at the end of the battery life based on the SOH threshold when the battery pack reaches its end-of-life. Specifically, when the first... When the State of Harmony (SOH) of a battery pack first reaches or falls below the preset lifespan end SOH threshold, the current equivalent aging mileage corresponding to that local segment is taken as the lifespan end equivalent mileage of the battery pack. .

[0028] Furthermore, the specific implementation process of step 3 is as follows:

[0029] Step 3.1: The lifespan end equivalent mileage, the current equivalent aging mileage, and the local segment start SOC are combined to obtain the joint condition label used to control the data generation process.

[0030] .

[0031] Furthermore, the specific implementation process of step 4 is as follows:

[0032] Step 4.1, partial charge / discharge segment Input curve feature encoding network to obtain local curve feature representation .

[0033] Step 4.2, combine the condition labels Input the conditional embedding network to obtain conditional label feature representations. .

[0034] Step 4.3, Represent the local curve features As a query matrix, the condition label feature representation Using the key matrix and value matrix, the local curve features and conditional label features are fused using a cross-attention mechanism to calculate the fused conditional curve features. .

[0035] Step 4.4, merge the condition curve features The encoder of the input conditional variational autoencoder is used to obtain the latent variable distribution parameters. .

[0036] Step 4.5: Obtain the latent variables through reparameter re-operation.

[0037]

[0038] in It is a noise vector obtained by random sampling from the standard normal distribution.

[0039] Furthermore, the specific implementation process of step 5 is as follows:

[0040] Step 5.1, the latent variables obtained in step 4 As the true latent variable in diffusion models .

[0041] Step 5.2, during the forward diffusion process... By gradually adding Gaussian noise, we obtain the first... Noisy latent variables of the step:

[0042]

[0043] in, For the scheduling parameters of diffuse noise, It is Gaussian noise.

[0044] Step 5.3, in the reverse denoising process, the noisy latent variables are... As a query matrix, the condition label feature representation As the key matrix and value matrix, the noisy latent variables Time step and conditional label features Conditional guidance is achieved through a cross-attention mechanism to obtain conditional guidance features. .

[0045] Step 5.4: Predict the noise term based on the conditionally guided features. This involves predicting the noisy latent variables. diffusion time step and the conditional guidance features obtained in step 5.3 Input a conditional denoising network, and have the network predict the noise term at the current diffusion time step. .

[0046] Step 5.5 trains the conditional latent space diffusion model by minimizing the error between the actual noise and the predicted noise, enabling it to generate latent variables under specified equivalent mileage conditions and local SOC conditions. .

[0047] Furthermore, the specific implementation process of step 6 is as follows:

[0048] Step 6.1, generate the latent variables obtained in step 5. and the conditional features obtained from the joint conditional labels in step 4. As input, the generated latent variables The conditional features are used to characterize the generation state of the partial charge-discharge segment to be generated in the latent variable space. Used to characterize equivalent mileage conditions and local SOC starting point conditions.

[0049] Step 6.2, generate latent variables Input the latent variable feature mapping network to obtain the generated latent variable features. .

[0050] in, Represents a latent variable feature mapping network. This represents the feature of the generated latent variable obtained by mapping the generated latent variable.

[0051] Step 6.3 will generate latent variable features. As a query matrix, the condition label feature representation As the key matrix and value matrix, latent variable features are generated by fusing them using a cross-attention mechanism. and target condition label features The decoding features obtained after conditional guidance .

[0052] Step 6.4, decode the conditionally guided features. The decoder of the input conditional variational autoencoder generates partial charge-discharge data under the target conditions:

[0053]

[0054] in, This represents the generated partial charge-discharge curve data. , , , These represent the generated voltage, current, capacity, and temperature sequences, respectively. Indicates the start of local segment SOC, This indicates the preset SOC range width.

[0055] Step 6.5: The generated partial charge-discharge curves and corresponding condition labels are combined to form an augmented dataset, which is used for training the battery health status assessment model or the remaining service life prediction model.

[0056] In another aspect, the present invention also provides a lithium battery data generation system based on an equivalent mileage and diffusion model, comprising the following modules:

[0057] The lithium battery data module is used to acquire voltage, current, capacity, temperature, SOC, SOH, cumulative mileage, and internal resistance changes during the operation of the electric vehicle battery pack, and to preprocess the data to obtain partial charge and discharge segment samples.

[0058] The equivalent mileage calculation module constructs an equivalent mileage calculation model based on the cumulative mileage, SOH, and the degree of internal resistance change, and obtains the current equivalent aging mileage and the equivalent mileage at the end of the life.

[0059] The joint condition label module is used to combine the life end equivalent mileage, the current equivalent aging mileage, and the local segment start SOC to obtain joint condition labels used to control the data generation process.

[0060] The latent variable representation module is used to extract features and fuse them by taking partial charge-discharge fragment samples and joint conditional labels as input; then, through encoder and reparameterization, the latent variable representation is obtained.

[0061] The latent variable module generates latent variables based on the latent variable representation and the conditional features obtained from the joint conditional labels, using a conditional latent space diffusion model.

[0062] The lithium battery data generation module uses latent variables and conditional features as inputs and generates partial charge and discharge data through a decoder of a conditional variational autoencoder.

[0063] This invention has the following characteristics and beneficial effects:

[0064] To address the insufficient characterization capability of aging condition labels in existing electric vehicle battery pack data generation methods, this invention constructs an equivalent mileage index that integrates information on cumulative mileage, SOH degradation, and internal resistance changes. It uses the equivalent mileage at the end of the battery life, the current equivalent aging mileage, and the initial SOC of a local segment as joint condition labels to achieve unified constraints on the battery pack's lifespan, current aging stage, and local SOC intervals. To address the shallow integration of condition labels and curve features in traditional generation models, this invention introduces a cross-attention mechanism to deeply integrate local charge / discharge curve features with equivalent mileage condition features, enhancing the integration of condition labels with voltage, current, capacity, and other parameters. The ability to fuse local curve features such as temperature improves the conditional controllability of the generation process. Addressing the issues of insufficient curve detail and limited sample diversity in conventional conditional variational autoencoders, this method introduces a diffusion generation model into the latent space of the conditional variational autoencoder and utilizes conditional features for cross-attention guidance during the reverse denoising process. This allows latent variables to be gradually denoised and recovered under conditional constraints, thereby enhancing the realism, diversity, and stability of the generated local charge-discharge curves. Therefore, this method helps alleviate problems such as scarce real-vehicle data, insufficient coverage of life stages, and insufficient samples in specific SOC intervals, providing enhanced data support for SOH assessment and RUL prediction. Attached Figure Description

[0065] Figure 1 This is a schematic diagram of the overall process of the method for generating partial charge and discharge data of electric vehicle battery packs based on equivalent mileage conditions according to the present invention.

[0066] Figure 2 This is a schematic diagram illustrating the construction process of the equivalent mileage index and joint condition label in this invention.

[0067] Figure 3 This is a schematic diagram of the local charge-discharge data generation network structure based on the cross-attention variational diffusion model in this invention;

[0068] Figure 4 This is a flowchart illustrating the training process of the local charge-discharge data generation network model based on the cross-attention variational diffusion model of this invention.

[0069] Figure 5 This invention provides a comparison between the reconstructed curve and the actual measured curve of a real vehicle.

[0070] Figure 6 The curve generated under the input conditions of this invention is compared with the statistical interval of a real vehicle under the same working conditions. Detailed Implementation

[0071] like Figure 1 and Figure 2As shown, this invention provides a lithium battery data generation method and system based on an equivalent mileage and diffusion model. The aim is to generate partial charge-discharge curves of voltage, current, capacity, and temperature under specified battery pack lifespan, current aging stage, and initial state of charge (SOC) of local segments, and to apply these data to battery health status assessment and remaining lifespan prediction model training. The implementation process of this invention is described in detail below with reference to the accompanying drawings.

[0072] In one aspect, this invention provides a method for generating lithium battery data based on an equivalent mileage and diffusion model, comprising the following steps:

[0073] Step 1: Acquisition and preprocessing of operating data of electric vehicle lithium battery pack.

[0074] Step 1-1: Obtain the voltage of the electric vehicle's lithium battery pack during actual operation. Current ,capacity ,temperature State of Charge (SOC), State of Health (SOH), and total mileage. and the degree of change in internal resistance This forms the original battery pack operating dataset. The voltage... Current ,capacity and temperature Used to construct partial charge-discharge curve samples; State of Charge (SOC) is used to determine the start and end intervals of local segments; State of Health (SOH) and cumulative mileage are also included. and the degree of change in internal resistance Used to construct equivalent mileage indicators;

[0075] Steps 1-2: Perform outlier handling, missing value completion, and time alignment on the raw battery pack operating data. To ensure a consistent input scale for different data channels during model training, voltage, current, capacity, temperature, SOC, SOH, cumulative mileage, and internal resistance variation are normalized. Through normalization, data with different dimensions are mapped to the same numerical range, resulting in the preprocessed battery pack operating dataset.

[0076] Step 2: Construction of partial charge-discharge fragment samples.

[0077] Step 2-1: Using the preset SOC range width As the segment extraction range, local charge-discharge curves are extracted from the battery pack charging process, discharging process, or mixed charge-discharge process; the extracted local charge-discharge curves satisfy their initial SOC as follows: Terminate SOC This condition is expressed as:

[0078]

[0079] Step 2-2: For the first The first battery pack Construct partial charge / discharge segment samples from several local segments:

[0080]

[0081] in, Indicates the battery pack number. This indicates the first [number] of the battery pack. A local segment, , , , These represent the voltage, current, capacitance, and temperature sequences within the local SOC range, respectively.

[0082] Steps 2-3: To ensure that local segments can be used as model input with uniform dimensions, each local segment is resampled to ensure that different local segments have the same number of sampling points. The resampled local segment is represented as:

[0083]

[0084] in, This indicates the number of time sampling points for a local segment; 4 represents the four data channels: voltage, current, capacity, and temperature.

[0085] Step 3: Constructing the equivalent mileage index:

[0086] To make the generated model applicable to real-world battery pack operation data in electric vehicles, this invention does not directly use the number of laboratory cycles as the aging condition. Instead, it constructs an equivalent mileage index based on cumulative mileage, SOH degradation degree, and internal resistance change degree to characterize the current aging stage and lifespan of the battery pack during real-world vehicle operation.

[0087] Step 3-1: Calculate the first... The battery pack in the first SOH decay term for a local segment:

[0088]

[0089] in, For the first Initial SOH of each battery pack For the first The battery pack in the first SOH of a local segment, To preset the SOH threshold at the end of the lifetime, To prevent constants with a denominator of zero.

[0090] Step 3-2: Calculate the internal resistance change term:

[0091]

[0092] in, For the first The battery pack in the first The degree of change in internal resistance of a local segment This is the reference value for the internal resistance of the battery pack in its initial state. This represents a constant used to prevent the denominator from being zero.

[0093] Step 3-3: Construct the original equivalent mileage based on the cumulative mileage, SOH decay term, and internal resistance change term:

[0094]

[0095] in, For the first The battery pack in the first The cumulative mileage of a local segment, and These are the weighting coefficients.

[0096] Steps 3-4: To avoid local decreases in equivalent mileage due to measurement fluctuations, the original equivalent mileage is monotonicized:

[0097]

[0098] Furthermore, the equivalent mileage at the end of the battery life is determined based on the SOH threshold when the battery pack reaches its end-of-life, assuming:

[0099]

[0100] Then the first The equivalent mileage at the end of the battery pack's lifespan is:

[0101]

[0102] Step 4: Constructing joint tags.

[0103] Start the SOC of the local fragment obtained in step 2. and the current equivalent aging mileage obtained in step 3. Equivalent mileage to end of life Combine them to construct joint conditional labels:

[0104]

[0105] in Used to characterize the global lifetime of a battery pack. Used to characterize the current aging stage of the battery pack. This is used to control the initial state of charge (SOC) of the generated local segments. Through the joint conditional label, the generation model can generate corresponding partial charge-discharge data according to a specified lifetime scale, current aging stage, and local SOC initiation point.

[0106] Step 5: Design of Cross-Attention Variational Diffusion Data Generation Network.

[0107] like Figure 3 As shown, a local charge-discharge data generation network based on a cross-attention variational diffusion model is constructed. The data generation network includes a curve feature encoding module, a conditional embedding module, a cross-attention fusion module, a conditional variational encoding module, a conditional latent space diffusion generation module, and a conditional cross-attention decoding module.

[0108] Step 5-1: Curve Feature Encoding Module.

[0109] Partial charge-discharge segment sample Input curve feature encoding module to obtain local curve feature representation:

[0110]

[0111] in, This represents a curve feature encoding network. This represents the local curve features. In this embodiment, a one-dimensional convolutional network is used to extract features of the voltage, current, capacity, and temperature sequences in the local segment, with an output dimension of [missing information]. The local curve features are represented.

[0112] Step 5-2: Conditional Embedding Module.

[0113] Combined conditional labels Input the conditional embedding module to obtain conditional label features:

[0114]

[0115] in, This indicates a conditional embedding network. The conditional embedding network, consisting of fully connected layers, nonlinear activation functions, and normalization layers, represents the conditional label features. It maps low-dimensional conditional labels to a high-dimensional feature space that matches the curve features.

[0116] Step 5-3: To enhance the information interaction between local curve features and conditional label features, a cross-attention mechanism is used to fuse them. Specifically, the local curve features... As the query vector, the conditional label features are used as the key vector and value vector:

[0117]

[0118] in, , , This is the learnable parameter matrix.

[0119] Calculate attention weights:

[0120]

[0121] And the characteristics of the fused condition curve are obtained:

[0122]

[0123] in, The feature dimension representing the attention space, This represents a local curve feature that incorporates condition label information.

[0124] Step 5-4: Merge the conditional curve features Input the conditional variational coding module. Obtain the mean and standard deviation of the latent variable distribution:

[0125]

[0126]

[0127] in and These represent the mean mapping network and the standard deviation mapping network, respectively.

[0128] Latent variables are obtained through reparameterization:

[0129]

[0130] Step 5-5: Conditional latent space diffusion generation module.

[0131] Step 5-5-1: Include latent variables As the true latent variable in the diffusion model, it is denoted as:

[0132]

[0133] Step 5-5-2: During the forward diffusion process, the true latent variables are... By gradually adding Gaussian noise, we obtain the first... Noisy latent variables of the step:

[0134]

[0135] in, It is Gaussian noise. For the spread noise scheduling parameters, , Indicates the number of diffusion steps.

[0136] Step 5-5-3: In the reverse denoising process, the noisy latent variables are... Time step coding Conditional label features Input conditional denoising network. To constrain the denoising process by equivalent mileage conditions and local SOC conditions, conditional label features are introduced into the denoising network through a cross-attention mechanism:

[0137]

[0138] Conditional denoising network outputs predicted noise:

[0139]

[0140] in, This represents the noise term predicted by the conditional denoising network. The parameter is Conditional denoising network; Indicates the first Noisy latent variables at each diffusion time step; Indicates the diffusion time step encoding; This represents the condition-guided feature obtained by fusing noisy latent variables and conditional label features through cross-attention.

[0141] Steps 5-6: Train the conditional latent space diffusion model by minimizing the error between the actual noise and the predicted noise, so that it can generate latent variables under specified equivalent mileage conditions and local SOC conditions. .

[0142] Step 6: Training the cross-attention variational diffusion data generation network.

[0143] like Figure 4 As shown, the cross-attention variational diffusion data generation network constructed in step 5 is trained.

[0144] Step 6-1: Conditional variational coding and decoding training:

[0145] Step 6-1-1: Partial charge / discharge segment and corresponding joint condition tags The input model is processed through curve feature encoding, conditional embedding, cross-attention fusion, and conditional variational encoding to obtain latent variables. ;

[0146] Step 6-1-2: Incorporate latent variables Conditional label features The reconstructed local fragment is obtained by decoding using the conditional cross-attention decoding module. .

[0147] Step 6-1-3: Construct the reconstruction loss:

[0148]

[0149] Step 6-1-4: Construct the KL divergence loss:

[0150]

[0151] in, This represents the posterior distribution of the latent variables obtained by the conditional variational encoder. This represents the standard normal prior distribution.

[0152] Step 6-2: Conditional latent space diffusion denoising training.

[0153] Step 6-2-1: Convert the latent variables obtained by the conditional variational coding module As a real latent variable Random sampling diffusion time step and Gaussian noise Noisy latent variables are obtained. .

[0154] Step 6-2-2: Transfer noisy latent variables Time step coding and conditional label features Input-conditional denoising network. Specifically, conditional guided features are obtained through a cross-attention mechanism. and output predicted noise. .

[0155] Step 6-2-3: Construct the diffusion denoising loss:

[0156]

[0157] Step 6-3: Construct the total loss function.

[0158] To simultaneously ensure reconstruction accuracy, reasonable latent variable distribution, and diffusion denoising capability, a total loss function is constructed:

[0159]

[0160] Furthermore, to improve the smoothness and temporal continuity of the generated partial charge-discharge curves, curve smoothing constraints can be added:

[0161]

[0162] Construct the total loss function:

[0163]

[0164] in, For local curve reconstruction loss, KL divergence loss of conditional variational autoencoder, To denoise the loss of the diffusion model, For curve smoothing loss, The loss weights are: Local Curve Reconstruction Loss (LCR) - Local Curve Reconstruction Loss ...

[0165] In this embodiment, the Adam optimizer is used to update the network parameters, and the learning rate is set to 10. −4 The batch size is set to 64. When the total loss function meets the preset convergence condition, or the number of training rounds reaches the preset maximum number of training rounds, the trained partial charge-discharge data generation network model is obtained.

[0166] Step 7: Generation of partial charge and discharge data.

[0167] Step 7-1: To further enhance the conditional control capability of the decoding stage, the generated latent variables obtained by the conditional latent space diffusion generation module are... Inputting the latent variable feature mapping network yields the generated latent variable features:

[0168]

[0169] Step 7-2: Generate latent variable features As a query vector, condition label features As key and value vectors, they are fused before decoding using a cross-attention mechanism:

[0170]

[0171] Decoding features after condition guidance Input to decoder to generate partial charge / discharge data:

[0172]

[0173] Finally, the generated normalized curve data is inversely normalized to restore it to its original physical dimensions, resulting in an enhanced dataset for partial charge and discharge of electric vehicle battery packs. This enhanced dataset can be used for training battery health status assessment models, remaining service life prediction models, or battery management system models.

[0174] In another aspect, the present invention also provides a lithium battery data generation system based on an equivalent mileage and diffusion model, for implementing the aforementioned lithium battery data generation method, comprising a lithium battery data module, an equivalent mileage calculation module, a joint conditional labeling module, a latent variable representation module, a latent variable module, and a lithium battery data generation module:

[0175] The lithium battery data module is used to acquire voltage, current, capacity, temperature, SOC, SOH, cumulative mileage, and internal resistance changes during the operation of the electric vehicle battery pack, and to preprocess the data to obtain partial charge and discharge segment samples.

[0176] The equivalent mileage calculation module constructs an equivalent mileage calculation model based on the cumulative mileage, SOH, and the degree of change in internal resistance to obtain the current equivalent aging mileage and the equivalent mileage at the end of the life.

[0177] The joint condition label module is used to combine the life end equivalent mileage, the current equivalent aging mileage, and the local segment start SOC to obtain a joint condition label for controlling the data generation process.

[0178] The latent variable representation module is used to extract features and fuse them by taking partial charge-discharge fragment samples and joint conditional labels as input; then, through encoder and reparameterization, the latent variable representation is obtained.

[0179] The latent variable module generates latent variables based on the latent variable representation and the conditional features obtained from the joint conditional labels, using a conditional latent space diffusion model.

[0180] The lithium battery data generation module uses latent variables and conditional features as inputs and generates partial charge and discharge data through a decoder of a conditional variational autoencoder.

[0181] Experimental section:

[0182] Data Description: This embodiment uses a real vehicle battery pack operation dataset for verification. The original data includes fields such as timestamp, vehicle speed, cumulative mileage, SOC, SOE, total battery pack voltage, total current, and remaining energy (left_wh), which can support the voltage, current, capacity, and temperature channels required for generating local charging segments. This embodiment processes 2,000,000 records in the original CSV file using a read method, identifies and retains 235 valid charging processes, and extracts local segments with a 10% SOC width, ultimately constructing 805 local SOC window samples. Each sample is resampled to 96 points; the training set and test set contain 564 and 241 samples, respectively.

[0183] Since the actual vehicle battery pack does not have a laboratory-calibrated true SOH value, this embodiment cannot directly use the true SOH label. Instead, it first calculates the capacity estimate corresponding to each charging segment based on the actual charging data of the vehicle using a variant ampere-hour integral formula:

[0184]

[0185] in, This represents the charging current, which takes a negative value. These are the SOCs at the start and end times of the charging segment, respectively. The sampling interval is fixed. For ease of illustration and statistical analysis, the battery pack charging current in the figure is uniformly represented by the current magnitude, therefore the current coordinate is positive.

[0186] Using the high-ranking statistical value of the previous sample as a reference full-charge capacity, the reference capacity surcharge value obtained in this experiment is 103.651 Ah. The capacity of each charging process is divided by this reference value to obtain the capacity-type SOH surcharge.

[0187] Experiments and Evaluation Metrics: Experiment 1 is a reconstruction test experiment of this invention, including two sets of comparative experiments. Comparative Experiment 1: The purpose is to compare the impact of different aging condition labels on the generation effect, set to use EFC, cumulative mileage, and the equivalent mileage of this invention, respectively. Comparative Experiment 2: Comparing different generation models, set to ordinary VAE, ordinary CVAE, and the model of this invention, respectively. Normalized MAE, R², and normalized DTW are used as indicators for each channel. The cells in the table represent normalized MAE / R² / normalized DTW in sequence, and all indicators are listed as percentages. A smaller normalized MAE is better, a larger R² is better, and a smaller normalized DTW is better. Experiment 2 is a conditional generation test under input curve and label constraints. During the test, real vehicle segments and condition labels are simultaneously input into the complete model, and then a new curve under the same label conditions is output. Experiment 2 requires the generated curve to maintain the same trend distribution as the input curve under the same label. This experiment evaluates whether the generated curve maintains the main trend of the input segment and whether it falls within the statistical range of real vehicles under the same working conditions.

[0188] Experimental results:

[0189] Table 1. Comparison of the reconstruction effect of real vehicle data under different aging conditions in Experiment 1.

[0190]

[0191] Table 2 Comparison of Real Vehicle Data Reconstruction Results for Different Generative Models in Experiment 2

[0192]

[0193] Experimental results analysis: As shown in Table 1, in the fully trained CVAE-latent space diffusion model, when using the equivalent mileage condition of this invention, the average normalized MAE, average R², and average normalized DTW after four-channel synthesis are 1.57%, 98.46%, and 0.98%, respectively. Compared with 1.63%, 98.34%, and 1.02% using only equivalent loop counts, the average normalized MAE decreases by approximately 4.0%, and the average normalized DTW decreases by approximately 4.0%; compared with 1.72%, 98.18%, and 1.06% using only cumulative mileage, the average normalized MAE decreases by approximately 8.7%, and the average normalized DTW decreases by approximately 7.3%. Looking at each channel individually, under the equivalent mileage condition, the voltage, current, capacity, and temperature channels are 1.08 / 98.37 / 0.59, 2.02 / 97.58 / 1.51, 1.66 / 99.22 / 0.86, and 1.51 / 98.67 / 0.97, respectively. This indicates that the equivalent mileage condition can provide more effective aging state constraints within the same complete model training framework.

[0194] As shown in Table 2, under the same latent variable perturbation intensity, the average normalized MAE, average R², and average normalized DTW of the four-channel integrated model of this invention are 1.57%, 98.46%, and 0.98%, respectively, which are better than the 1.72%, 98.30%, and 1.08% of ordinary CVAE. The average normalized MAE is reduced by about 8.6%, and the average normalized DTW is reduced by about 9.1%; it is also better than the 1.78%, 98.17%, and 1.12% of ordinary VAE. Looking at individual channels, the voltage, current, capacity, and temperature channels of the model of this invention are 1.08 / 98.37 / 0.59, 2.02 / 97.58 / 1.51, 1.66 / 99.22 / 0.86, and 1.51 / 98.67 / 0.97, respectively. These results indicate that the latent space diffusion denoising network can recover a more stable local charging curve representation after the latent variable is subjected to random perturbation, thereby improving reconstruction accuracy and temporal similarity.

[0195] Figure 5Taking a typical fast charging segment as an example, the comparison results between the real segment and the denoised reconstructed segment of the complete model are presented. The solid black line represents the actual measured curve from a real vehicle, and the dashed red line represents the reconstructed curve obtained by the complete model of this invention after conditional variational coding, latent space denoising, conditional diffusion denoising, and conditional decoding. As can be seen from the figure, the denoised reconstructed curve can maintain the main physical trends such as voltage rise, battery pack charging current plateau, increase in local cumulative charging capacity, and temperature rise, indicating that the trained latent space diffusion module can recover the key structural information of local segments from perturbation latent variables.

[0196] Depend on Figure 6 As can be seen, Experiment 2, under the same input segment and joint condition labels, generated multiple new curves by changing the latent space diffusion sampling noise. In the figure, the light blue area represents the statistical trend reference interval of real vehicle samples under similar operating conditions, the black solid line represents the input reference segment, and the multiple red dashed lines represent the curves generated by the model's actual sampling. The generated curves did not replicate the local random details in the black input curve point by point, but maintained a consistent trend in voltage changes, current operating levels, capacity accumulation, and temperature increases, and generally fell within or approached the statistical interval of the same operating condition. In this generation result, the voltage correlation was 90.59%, the mean current deviation was 0.01%, the capacity endpoint deviation was 3.35%, the temperature correlation was 97.66%, and the coverage rate of the same operating condition interval was 74.85%. This indicates that the model of this invention can generate local charging curves with the same trend, the same operating condition distribution characteristics, and a certain degree of diversity when given the input segment and joint condition labels.

Claims

1. A method for generating lithium battery data based on equivalent mileage and diffusion models, characterized in that, Includes the following steps: S1: Obtain the voltage, current, capacity, temperature, SOC, SOH, cumulative mileage, and internal resistance change during the operation of the electric vehicle battery pack, and preprocess it to obtain partial charge and discharge segment samples; S2: Based on the cumulative mileage, SOH, and the degree of internal resistance change, an equivalent mileage calculation model is constructed to obtain the current equivalent aging mileage and the equivalent mileage at the end of the service life. The specific implementation process is as follows: S2.1 Calculate the SOH degradation term, which characterizes the degree of capacity degradation. The SOH degradation term uses the difference between the initial SOH and the current SOH as the degradation amount, and uses the difference between the initial SOH and the preset life end SOH threshold as the normalization benchmark to map the SOH degradation degree of different battery packs to a unified dimension, thus obtaining the SOH degradation term. ; S2.2, Calculate the internal resistance change term characterizing the degree of impedance growth. The internal resistance change term uses the difference between the current degree of internal resistance change and the initial internal resistance reference value as the internal resistance growth amount, and uses the initial internal resistance reference value as the normalization reference to obtain the internal resistance change term. ; S2.3, calculate the original equivalent mileage based on the cumulative mileage, SOH degradation term, and internal resistance change term. The original equivalent mileage uses the cumulative mileage of the battery pack as the basic usage progress, and introduces the SOH degradation term and internal resistance change term to perform aging correction on the cumulative mileage to obtain the original equivalent mileage. ,in, For the first The battery pack in the first The cumulative mileage of each local segment, and These are the weighting coefficients; S2.4, take the maximum value of the original equivalent mileage of the current local segment and the previous local segments to obtain the current equivalent aging mileage. ; S2.5, when the first When the State of Harmony (SOH) of a battery pack first reaches or falls below the preset lifespan end SOH threshold, the current equivalent aging mileage corresponding to that local segment is taken as the lifespan end equivalent mileage of the battery pack. ; S3: Combine the life end equivalent mileage, the current equivalent aging mileage, and the local segment start SOC to obtain a joint condition label for controlling the data generation process; S4: Taking partial charge-discharge fragment samples and joint conditional labels as input, features are extracted and fused; then, through encoder and reparameterization, latent variable representations are obtained. The specific implementation process is as follows: S4.1, partial charge / discharge segment Input curve feature encoding network to obtain local curve feature representation ; S4.2, combine condition labels Input the conditional embedding network to obtain conditional label feature representations. ; S4.3, Representing Local Curve Features As a query matrix, the condition label feature representation Using the key matrix and value matrix, the local curve features and conditional label features are fused using a cross-attention mechanism to calculate the fused conditional curve features. ; S4.4, merging the condition curve features The encoder of the input conditional variational autoencoder is used to obtain the latent variable distribution parameters. ; S4.5, obtaining latent variables through reparameter re-operation. ,in It is a noise vector obtained by random sampling from a standard normal distribution; S5: Based on the conditional features obtained from latent variable representation and joint conditional labels, latent variables are generated through the conditional latent space diffusion model; S6: Based on latent variables and conditional features as input, partial charge and discharge data are generated through the decoder of a conditional variational autoencoder.

2. The lithium battery data generation method based on the equivalent mileage and diffusion model according to claim 1, characterized in that, The specific samples of the partial charge-discharge segments are as follows: S1.1, Based on the SOC sequence in the battery pack operating data, determine the initial SOC of the local segment as... ; S1.2, with a preset SOC interval width As the segment extraction range, local charge-discharge curves are extracted from the battery pack charging process, discharging process, or mixed charge-discharge process; the extracted local charge-discharge curves satisfy their initial SOC as follows: Terminate SOC ; S1.3 resamples the voltage, current, capacity, and temperature sequences in the local segments to ensure that different local segments have a uniform number of sampling points; S1.4, normalize the resampled local segments to obtain local charge-discharge segment samples with a uniform format. ,in, Indicates the first One battery pack This indicates the first [number] of the battery pack. A local segment, Indicates the start of local segment SOC, Indicates the width of the local SOC interval. , , , They represent The sequence of voltage, current, capacity, and temperature within a local segment at any given time.

3. The lithium battery data generation method based on the equivalent mileage and diffusion model according to claim 2, characterized in that, The specific implementation process of step S5 is as follows: S5.1, latent variables As the true latent variable in diffusion models ; S5.2, during the forward diffusion process to By gradually adding Gaussian noise, we obtain the first... Noisy latent variables of the step ; S5.3, in the reverse denoising process, the noisy latent variable is... As a query matrix, the condition label feature representation As the key matrix and value matrix, the noisy latent variables Time step and conditional label features Conditional guidance is achieved through a cross-attention mechanism to obtain conditional guidance features. ; S5.4, noisy latent variables diffusion time step and conditional guidance features Input a conditional denoising network, and have the network predict the noise term at the current diffusion time step. ; S5.5 trains the conditional latent space diffusion model by minimizing the error between the actual noise and the predicted noise, enabling the conditional latent space diffusion model to generate latent variables under specified equivalent mileage conditions and local SOC conditions. .

4. The lithium battery data generation method based on the equivalent mileage and diffusion model according to claim 3, characterized in that, The specific implementation process of step S6 is as follows: S6.1 will generate latent variables. and conditional features As input, latent variables are generated. Used to characterize the generation state of the to-be-generated partial charge-discharge segment in the latent variable space, conditional features Used to characterize equivalent mileage conditions and local SOC starting point conditions; S6.2, the generated latent variables Input the latent variable feature mapping network to obtain the generated latent variable features. ; S6.3 will generate latent variable features. As a query matrix, the condition label feature representation As the key matrix and value matrix, latent variable features are generated by fusing them using a cross-attention mechanism. and target condition label features The decoding features obtained after conditional guidance are obtained. ; S6.4, Decoding features after conditional guidance The decoder of the input conditional variational autoencoder generates the partial charge-discharge curve under the target condition. ,in , , , These represent the generated voltage sequence, current sequence, capacity sequence, and temperature sequence, respectively. S6.5 combines the generated partial charge-discharge curves with the corresponding condition labels to form an enhanced dataset, which is used for training the battery health status assessment model or the remaining service life prediction model.

5. The lithium battery data generation method based on the equivalent mileage and diffusion model according to claim 4, characterized in that, In step S5, when training the conditional latent space diffusion model, the local curve reconstruction loss is used to constrain the error between the generated curve and the true curve, the KL divergence loss is used to constrain the distribution of latent variables, the diffusion model denoising loss is used to constrain the consistency between the predicted noise and the true noise, and the curve smoothing loss term enhances the continuity of the generated curve in the local SOC interval.

6. A lithium battery data generation system based on an equivalent mileage and diffusion model, used to implement the lithium battery data generation method according to any one of claims 1 to 5, characterized in that, Includes the following modules: The lithium battery data module is used to acquire voltage, current, capacity, temperature, SOC, SOH, cumulative driving mileage, and internal resistance changes during the operation of electric vehicle battery packs, and to preprocess data to obtain partial charge and discharge segment samples. The equivalent mileage calculation module constructs an equivalent mileage calculation model based on the cumulative mileage, SOH and the degree of internal resistance change, and obtains the current equivalent aging mileage and the equivalent mileage at the end of the life. The joint condition label module is used to combine the life end equivalent mileage, the current equivalent aging mileage, and the local segment start SOC to obtain a joint condition label for controlling the data generation process. The latent variable representation module takes partial charge-discharge fragment samples and joint conditional labels as input, extracts features and fuses them; then, through encoder and reparameterization, it obtains the latent variable representation. The latent variable module generates latent variables based on the latent variable representation and the conditional features obtained from the joint conditional labels, using a conditional latent space diffusion model. The lithium battery data generation module uses latent variables and conditional features as inputs and generates partial charge and discharge data through a decoder of a conditional variational autoencoder.

Citation Information

Patent Citations

  • Equivalent estimation method and device for service life of power battery

    CN115079029A

  • Battery life prediction method for estimating attenuation curve parameters based on LSTM (Long Short Term Memory)

    CN120254630A