A battery soc unsupervised estimation method, system, device and storage medium

CN122815243APending Publication Date: 2026-09-25广州粤信科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611062668.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-16
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0007]有鉴于此,本发明提供了一种电池SOC无监督估计方法、系统、设备及存储介质,用于解决现有电池SOC估计方法,对标签数据依赖度高、动态工况下估计误差易累积以及无法提供置信区间的问题

Benefits of technology

(1)本申请通过逆向扩散神经网络多步逆向扩散逐级去噪还原电池多维隐状态,根据标定先验映射+特征分量剥离算法精准解耦提取SOC分量完成估计;同时通过多次独立采样、高斯分布拟合统计实现估计结果不确定性量化输出,可精准输出SOC均值与预设置信区间,为电动航空、电网储能等对安全性要求高的决策场景提供了可量化的风险评估依据。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122815243A_ABST
    Figure CN122815243A_ABST
Patent Text Reader

Abstract

The application discloses a battery SOC unsupervised estimation method, system, device and storage medium, and relates to the field of battery management systems. The terminal voltage and the loop charge-discharge current at the current time are collected; the terminal voltage and the current are taken as the condition input of the reverse diffusion neural network, the reverse diffusion neural network is denoised step by step, and the battery multi-dimensional original hidden state variable is obtained; according to the benchmark characteristic mapping relationship, a preset characteristic component stripping algorithm is used to extract the SOC component from the multi-dimensional original hidden state variable, and the normalized output SOC estimation value is output; the same terminal voltage and current are executed multiple times independently by the reverse diffusion neural network, the sample distribution is counted, and the output SOC estimation mean value and the preset confidence interval are calculated. The application eliminates the cumulative error and the numerical divergence risk from the mechanism; relying on the diffusion model and the isomorphic characteristics of the lithium ion diffusion kinetics of the battery, the electrochemical physical constraint is embedded, and the SOC estimation precision and the cross-condition generalization ability are significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of battery management systems, and more specifically, to an unsupervised method, system, device, and storage medium for estimating battery state of charge (SOC). Background Technology

[0002] State of Charge (SOC) estimation is a core function of the Battery Management System (BMS), which directly determines the operational safety, energy dispatch strategy, equalization control, and lifecycle management of power batteries / energy storage batteries.

[0003] Recursive methods, such as various Kalman filters, employ a predict-correction cyclic recursive architecture. The model is linearized and approximates, continuously accumulating errors, and is prone to state drift and numerical divergence in long-term operation. Traditional supervised learning and deep learning solutions rely on a large amount of training data labeled with SOC ground truth values, which has high calibration and testing costs and is time-consuming and labor-intensive. In energy storage and data center backup power scenarios, labeled samples are scarce, making it difficult to scale up.

[0004] Traditional unsupervised methods are mostly based on traditional machine learning frameworks such as autoencoders, clustering, and domain adaptation. They can only achieve coarse-grained interval estimation, have poor ability to fit the nonlinear characteristics of batteries, and only output a single value. They lack uncertainty quantification and cannot support risk assessment in high-safety-level scenarios.

[0005] Existing battery SOC estimation methods are mostly designed with fixed structures and parameters, and are developed for single operating conditions. They cannot be adapted to the differentiated needs of scenarios such as high-precision, low-real-time energy storage, high-real-time and high-reliability electric aviation, and high-SOC range-specific estimation in data centers through flexible hyperparameter configuration.

[0006] In summary, there is an urgent need in this field for a label-free, error-free, uncertainty-quantifying, and multi-scenario-adaptable unsupervised SOC estimation scheme. Summary of the Invention

[0007] In view of this, the present invention provides an unsupervised method, system, device and storage medium for estimating battery SOC, which solves the problems of existing battery SOC estimation methods, such as high dependence on tag data, easy accumulation of estimation errors under dynamic operating conditions and inability to provide confidence intervals.

[0008] To achieve the above objectives, the following solution is proposed: An unsupervised method for estimating battery state of charge (SOC) includes: Collect the current terminal voltage and circuit charging / discharging current; The terminal voltage and circuit charging and discharging current are used as the conditional inputs of the pre-trained reverse diffusion neural network. Starting from the initialization of standard Gaussian noise, the reverse diffusion neural network iterates step by step to remove noise according to the preset diffusion steps, and independently restores the multidimensional original hidden state variables of the battery at the current moment. The multidimensional original hidden state variables include three core electrochemical hidden features: lithium ion concentration inside the battery, equivalent internal resistance, and interface polarization. Based on the benchmark feature mapping relationship, a preset feature component stripping algorithm is used to decouple and extract the SOC component from the multidimensional original hidden state variables. After normalization, the SOC estimate is output. The benchmark feature mapping relationship is a feature mapping relationship between multidimensional hidden state features and SOC established in advance based on the battery standard full-condition charge and discharge calibration test. Multiple independent reverse diffusions are performed on the same terminal voltage and circuit charging and discharging current through a reverse diffusion neural network to obtain multiple sets of SOC estimation samples. The number of diffusion steps, network size and sampling times of the multiple independent reverse diffusions are configured according to the application scenario. Anomaly screening and probability distribution fitting are performed on multiple sets of SOC estimation samples. The sample distribution characteristics are statistically analyzed, and the output SOC estimation mean and pre-set confidence interval are calculated.

[0009] Preferably, the inverse diffusion neural network adopts a diffusion-causal Transformer architecture, including: a causal attention mechanism layer, a cross-attention layer, and a temporal embedding layer; The causal attention mechanism layer uses a temporal masking method to shield future temporal information and completes feature calculations based only on the current moment and historical data. The cross-attention layer incorporates the conditional characteristics of terminal voltage and loop charging and discharging current into the diffusion denoising process; The temporal embedding layer encodes the temporal features of the diffusion step to distinguish the denoising weights of different diffusion stages.

[0010] Preferably, the inverse diffusion neural network is trained using a purely unsupervised method, and the training process includes: The time-series terminal voltage and time-series current sequences under normal full-condition operation of the battery are collected as unlabeled training data sources. Based on the training data source, a multidimensional original hidden state variable is defined. Gaussian noise is gradually superimposed according to a preset noise scheduling method to generate intermediate hidden states with progressively enhanced noise, thus completing the forward diffusion process. The multidimensional original hidden state variable includes three core electrochemical hidden features: lithium ion concentration, equivalent internal resistance, and interface polarization. The training voltage and training current are used as the conditional inputs of the reverse diffusion neural network. The reverse diffusion neural network is based on pure Gaussian noise distribution to denoise step by step, restore the multidimensional original hidden state variables of the battery, and complete the reverse diffusion process. A composite loss function is constructed based on the reverse diffusion process. This loss function incorporates constraints from the Fick lithium-ion diffusion law and the Butler-Wolmer electrode kinetics equation, in addition to the basic diffusion reconstruction loss. An adaptive weighted regularization mechanism is adopted to dynamically adjust the weights of two types of constraint terms based on the model training iteration residuals and the validation set fitting error.

[0011] Preferably, the process of decoupling and extracting SOC components from multidimensional original latent state variables using a preset feature component stripping algorithm, and then normalizing and outputting the SOC estimate includes: A feature weight matrix is ​​constructed based on the correlation between lithium ion concentration and SOC to weight the multidimensional original hidden state variables; Principal component analysis is used to decompose the weighted feature space into a signal subspace and a noise subspace, and SOC principal component features are extracted. Based on the benchmark feature mapping relationship, the SOC principal component features are mapped to the SOC range, and the normalized SOC estimate is output.

[0012] Preferably, it also includes a SOC trend analysis step: The system analyzes the estimated SOC value and the mean SOC value within a preset time range, and outputs the SOC change trend through time series slope analysis and interval fluctuation variance statistics.

[0013] Preferably, it also includes an emergency estimation mode control step: The system monitors the grid operation status in real time. When abnormal conditions such as sudden voltage drop, sudden current change, or grid disconnection are detected, the emergency estimation mode is triggered, reducing the diffusion steps to a preset safe range and employing a single rapid sampling mechanism.

[0014] Preferably, the process of anomaly screening and probability distribution fitting includes: Valid samples were selected using the 3σ outlier removal rule. Based on Gaussian distribution fitting of effective samples, the noise reduction optimization process of SOC estimation samples is completed; The preset confidence interval is any confidence interval between 90% and 99%.

[0015] A battery SOC unsupervised estimation system, used to perform the battery SOC unsupervised estimation method described in any of the preceding claims, comprising: The data acquisition module collects the current terminal voltage and circuit charging / discharging current. The online estimation module uses the terminal voltage and circuit charging / discharging current as conditional inputs to a pre-trained inverse diffusion neural network. Starting from standard Gaussian noise initialization, the inverse diffusion neural network iterates step by step to remove noise according to a preset diffusion step number, independently restoring the multidimensional original hidden state variables of the battery at the current moment. The multidimensional original hidden state variables include three core electrochemical hidden features: lithium ion concentration inside the battery, equivalent internal resistance, and interface polarization. The feature decoupling module extracts the SOC component from the multidimensional original hidden state variables based on the benchmark feature mapping relationship and a preset feature component stripping algorithm. After normalization, it outputs the SOC estimate. The benchmark feature mapping relationship is a feature mapping relationship between multidimensional hidden state features and SOC established in advance based on the battery standard full-condition charge and discharge calibration test. The uncertainty sampling module performs multiple independent reverse diffusions on the same terminal voltage and circuit charging and discharging current through a reverse diffusion neural network to obtain multiple sets of SOC estimation samples. The number of diffusion steps, network size and sampling times of the multiple independent reverse diffusions are configured according to the application scenario. The uncertainty quantification module performs anomaly screening and probability distribution fitting on multiple sets of SOC estimate samples, statistically analyzes the sample distribution characteristics, and calculates the output SOC estimate mean and preset confidence interval.

[0016] The scenario adaptation configuration module is used to adaptively configure the diffusion steps, network size, and sampling times according to the computing power, accuracy, and real-time requirements of the application scenario.

[0017] A battery SOC unsupervised estimation device for performing the battery SOC unsupervised estimation method described in any of the preceding claims, comprising: a memory and a processor; The memory is used to store programs; The processor is used to execute the program to implement the various steps of the aforementioned unsupervised estimation method for battery SOC.

[0018] A storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the unsupervised estimation method for battery SOC as described in any of the preceding claims.

[0019] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects: (1) This application uses a reverse diffusion neural network to perform multi-step reverse diffusion to gradually denoise and restore the multidimensional hidden state of the battery. It accurately decouples and extracts the SOC component based on the calibration prior mapping + feature component stripping algorithm to complete the estimation. At the same time, it achieves the quantitative output of the uncertainty of the estimation result through multiple independent sampling and Gaussian distribution fitting statistics. It can accurately output the SOC mean and the preset confidence interval, providing a quantifiable risk assessment basis for decision-making scenarios with high safety requirements such as electric aviation and grid energy storage.

[0020] (2) The SOC estimation at each time point in this invention is based on an independent diffusion generation process, and there is no transmission and accumulation of historical state estimation errors. Relying on the ability of the diffusion model to fit the global data distribution, combined with the dual electrochemical physical constraint regularization training mechanism, the errors caused by the linearization approximation of the model in traditional methods are effectively avoided, ensuring the estimation stability of the battery in the long-term operation process and reducing numerical divergence and SOC drift.

[0021] (3) This invention can dynamically balance estimation accuracy, real-time performance and computing power overhead by adjusting hyperparameters such as diffusion steps, network size and sampling times, and adaptively adjusting according to scenario-level adaptation rules. For energy storage scenarios with sufficient computing power, a large-scale diffusion step can be configured to pursue high accuracy, and for electric aviation scenarios with limited computing power, a lightweight network can be configured to meet real-time performance, thus having good multi-scenario adaptability.

[0022] (4) The present invention adopts a pure unsupervised training paradigm, relying only on unlabeled voltage and current time series data to complete model training. The charging and discharging calibration curve is only a fixed prior benchmark and does not participate in training iteration. There is no need for SOC ground truth labeling, which greatly reduces the model calibration cost and is suitable for industrial application scenarios where labels are scarce. Attached Figure Description

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

[0024] Figure 1 A flowchart of an unsupervised battery SOC estimation method provided in an embodiment of the present invention; Figure 2 A reverse diffusion flowchart provided for embodiments of the present invention; Figure 3 This is a diagram of the reverse diffusion neural network architecture provided in an embodiment of the present invention; Figure 4 A flowchart for quantifying the uncertainty of SOC during multiple rounds of sampling provided in this embodiment of the invention; Figure 5 A forward diffusion flowchart provided for embodiments of the present invention; Figure 6 This is a schematic diagram of the unsupervised estimation system structure for battery SOC provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of another unsupervised battery SOC estimation system provided in an embodiment of the present invention; Figure 8 This is a hardware structure block diagram of an unsupervised estimation device for battery SOC provided in an embodiment of the present invention. Detailed Implementation

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

[0026] First, combined Figure 1 This invention introduces an unsupervised SOC estimation method for batteries, which is applicable to battery operation and management scenarios with ample computing power and scarce SOC truth labels, such as energy storage power stations, electric aircraft eVTOL, and data center UPS backup power. Figure 1 As shown, the method includes: Step S1: Collect the current terminal voltage and circuit charging / discharging current.

[0027] Specifically, when the battery is running online, the current terminal voltage is collected. Current As a conditional input to the inverse diffusion neural network .

[0028] Step S2: The terminal voltage and circuit charging and discharging current are used as the conditional inputs of the pre-trained reverse diffusion neural network. Starting from the initialization of standard Gaussian noise, the reverse diffusion neural network iterates step by step to remove noise according to the preset diffusion steps, and independently restores the battery's multidimensional original hidden state variables corresponding to the current moment.

[0029] Specifically, such as Figure 2 The diagram shows the diffusion step count configured as T steps, from standard Gaussian noise. Initialization begins by loading the trained inverse diffusion neural network. The inverse diffusion neural network iteratively denoises the current terminal voltage and current step-by-step (T steps) to independently reconstruct the multidimensional original hidden state variables at the current moment. The diffusion estimation results at each time point are independent of each other and there is no accumulation of time-series recursive errors. Short-term historical operating condition data is only called for feature enhancement during the feature calculation stage, and there is no state recursive dependency of traditional filtering algorithms.

[0030] like Figure 3As shown, the inverse diffusion neural network adopts a diffusion-causal Transformer architecture, specifically including: a causal attention mechanism layer, a cross-attention layer, and a temporal embedding layer. The causal attention mechanism layer uses a temporal mask matrix to shield feature information from future moments, calculating feature attention weights only based on the current moment and historical temporal data, aligning with the physical causal logic of real-time battery operation and avoiding temporal information leakage. The cross-attention layer integrates real-time collected voltage and circuit charging / discharging current condition features dimensionally into each step of the diffusion denoising process, achieving coupling between operating condition features and hidden state reconstruction. The temporal embedding layer performs high-dimensional encoding of the temporal features of different diffusion steps, distinguishing the denoising weights of each diffusion stage and improving the accuracy of hidden state reconstruction.

[0031] Step S3: Based on the baseline feature mapping relationship, a preset feature component stripping algorithm is used to decouple and extract the SOC component from the multidimensional original hidden state variables, and the normalized SOC estimate is output.

[0032] Specifically, the multidimensional original hidden state variables obtained through reverse diffusion It contains multiple dimensions of electrochemical hidden characteristics such as lithium-ion concentration, interface polarization, equivalent internal resistance and voltage hysteresis inside the battery.

[0033] A baseline state mapping relationship between multidimensional original latent features and the true State of Charge (SOC) is established in advance through standard battery charge and discharge calibration conditions. The baseline state mapping relationship is a fixed prior rule obtained from offline calibration, stored in the form of a piecewise linear interpolation function or a polynomial fitting function. It is only used for feature decoupling and SOC mapping in the inference stage and does not participate in the model training iteration throughout the process. This ensures that the model training stage is completely detached from the SOC ground truth label and strictly guarantees the unsupervised training properties.

[0034] This invention employs a preset feature component stripping algorithm to decouple SOC features. The specific process includes the following sub-steps: Step S31: Construct a feature weight matrix: Based on the correlation between lithium ion concentration and SOC, construct a feature weight matrix to weight the multidimensional hidden states. Assign high weights (e.g., weight values ​​ranging from 0.7 to 1.0) to the feature dimensions related to lithium ion concentration in the multidimensional original hidden state variables output by the inverse diffusion neural network, and assign low weights (e.g., weight values ​​ranging from 0 to 0.3) to the interference feature dimensions such as equivalent internal resistance, interface polarization, and voltage hysteresis, forming an initial feature weight matrix.

[0035] Step S32, Orthogonal component decomposition: Perform principal component analysis on the weighted multidimensional hidden state features, decompose the feature space into principal component directions consistent with the SOC change direction (i.e., signal subspace) and interference component directions orthogonal to the SOC change direction (i.e., noise subspace), and take the first principal component of the signal subspace as the SOC principal component feature. Step S33, calibration mapping: The extracted SOC principal component features are linearly mapped to the SOC range of 0%~100% according to the pre-calibrated benchmark feature mapping relationship, completing the decoupling extraction and dimensional normalization of SOC components, and outputting the SOC estimate.

[0036] Step S4: Perform multiple independent reverse diffusion operations on the same terminal voltage and circuit charging / discharging current using a reverse diffusion neural network to obtain multiple sets of SOC estimation samples.

[0037] Specifically, such as Figure 4 As shown, the reverse diffusion neural network performs multiple rounds of independent reverse diffusion sampling on the same set of terminal voltage and circuit charging / discharging current inputs, generating multiple sets of SOC estimation samples. The number of diffusion steps, network size, and sampling times are adaptively configured according to the computing resources, estimation accuracy, and real-time requirements of the application scenario, based on preset hierarchical adaptation threshold rules. See Table 1 for specific configuration details.

[0038] The pre-defined hierarchical adaptation rules in this invention are as follows: for high-computing-power, high-precision scenarios, the maximum number of diffusion steps and deep networks, along with a high number of samplings, are configured; for low-computing-power, high-real-time scenarios, the number of diffusion steps is reduced, lightweight networks are used, and single or small-scale sampling is employed. Hyperparameters are adaptively matched based on computing power thresholds, accuracy error thresholds, and single-frame time thresholds, dynamically balancing estimation accuracy, real-time performance, and computing power overhead. For example, for energy storage power station scenarios with ample computing power, a large-scale diffusion step count and deep networks are configured to maximize estimation accuracy; for scenarios with limited computing power, such as electric aviation or UPS backup power, lightweight networks and fast sampling strategies are configured to meet real-time response requirements.

[0039] Step S5: Perform anomaly screening and probability distribution fitting on multiple sets of SOC estimation samples, statistically analyze the sample distribution characteristics, and calculate the output SOC estimation mean and the preset confidence interval.

[0040] Specifically, the 3σ criterion is used to identify and remove discrete samples that deviate from the sample mean by more than three standard deviations. The remaining valid samples are fitted with a probability distribution based on a Gaussian distribution, and the sample mean and variance are calculated. The upper and lower limits of the pre-set confidence interval are then calculated using quantile statistics formulas, enabling the quantitative output of the uncertainty of the SOC estimation results. This provides a quantitative basis for decision-making risk in high-risk application scenarios. The pre-set confidence interval can be set to any confidence interval between 90% and 99% depending on the scenario and requirements; that is, 90%, 95%, 99%, or other confidence intervals can be selected as needed. The number of independent back-diffusion sampling operations is configured according to the application scenario; see Table 1 below for specific configuration methods.

[0041] Furthermore, in order to better meet different operational requirements, the unsupervised battery SOC estimation method of this invention supports two operating modes: In standard deployment mode, the system analyzes the estimated SOC value and mean SOC value within a preset time range, and outputs the SOC change trend through time-series slope analysis and interval fluctuation variance statistics. For example, it can perform offline batch analysis of last week's data every week to output the SOC change trend for operation and maintenance reference.

[0042] In emergency mode, a flexible trade-off between estimation speed and accuracy is achieved by dynamically adjusting the number of diffusion steps. When an abnormal condition such as a sudden drop in grid voltage, a sudden change in current, or a grid disconnection is detected, the emergency estimation mode is triggered. The inverse diffusion neural network performs lightweight and rapid estimation, reducing the number of diffusion steps to a preset safe range. A single-shot rapid sampling mechanism is used to compress computation time. Grid voltage and current operating parameters are monitored in real time, and an abnormal condition is determined based on preset emergency condition thresholds. For example, a sudden drop in grid voltage is confirmed when the grid voltage drop is ≥10% of the rated voltage; a sudden change in current is confirmed when the current change rate is ≥20% of the rated current / second; and a grid disconnection is confirmed when a grid disconnection signal is triggered. When any abnormal condition occurs, the number of diffusion steps is reduced to T=200, with single-shot rapid sampling and estimation time ≤20ms. The initial SOC value is output in seconds, ensuring the timeliness of emergency decision-making for backup power dispatch.

[0043] Next, the training process of the inverse diffusion neural network will be described in the embodiments of the present invention as follows: Step S01: Training data collection.

[0044] Specifically, the timing sequence of the battery terminal voltage and the timing sequence of the circuit charge and discharge current under normal full-condition operation are collected as unlabeled training data sources, eliminating the need to collect and label the SOC ground truth data, thus achieving pure unsupervised data collection.

[0045] Step S02: Construct the forward diffusion process.

[0046] Specifically, multidimensional primitive hidden state variables are defined based on the training data source. Multidimensional primitive hidden state variables It consists of multiple latent states, including battery terminal voltage, current, internal lithium-ion concentration, and equivalent internal resistance.

[0047] like Figure 5 As shown, according to the preset noise scheduling method, from the multidimensional original hidden state variables... Gaussian noise is gradually superimposed to generate intermediate hidden states with progressively increasing noise levels. ,through T After step diffusion, the noise distribution approximates the standard pure Gaussian noise distribution. The forward diffusion process transfer is defined as: ; in, This represents the transition probability distribution of the forward diffusion process. Indicated by For the mean, The covariance matrix is ​​a Gaussian distribution. For the first t The intermediate hidden state after the first diffusion step. Let be the noise scheduling parameters for step t. I It is an identity matrix.

[0048] The preset noise scheduling method can select a cosine noise scheduling strategy, then the noise scheduling parameters are: ; Where T is the total number of diffusion steps.

[0049] By constraining the noise increase law with a fixed cosine function, upper and lower noise thresholds are set at the beginning and end of the diffusion stage. For example, in this embodiment of the invention, the upper and lower limits are set to 0.0001 and 0.02 respectively, so as to avoid the training of the reverse diffusion neural network being unstable due to excessive or insufficient noise.

[0050] Step S03: Construct a conditional inverse diffusion neural network.

[0051] Specifically, the training terminal voltage and training current As a reverse diffusion neural network The conditional input is used to learn the reverse generation process of the inverse diffusion neural network, which gradually denoises the pure Gaussian noise distribution and restores the original multidimensional hidden state of the battery.

[0052] The reverse diffusion neural network denoises step-by-step based on pure Gaussian noise distribution to restore the multidimensional original hidden state variables of the battery. The transfer kernel of the reverse diffusion process is defined as follows: ; in, For the reverse diffusion process of transferring nuclei, This represents the intermediate hidden state obtained through diffusion at step t-1. For conditional input, It is a mean prediction network. For variance prediction network, t is the current diffusion step number, and k is the battery time-series sampling index, which is independent of t.

[0053] Step S04: Training an unsupervised model that incorporates physical constraints.

[0054] Specifically, a loss function is constructed based on the reverse diffusion process, and unsupervised learning is used for training. The entire training process only inputs battery terminal voltage and current time-series data, without requiring a true state of charge (SOC) label. In addition to the conventional unsupervised reconstruction loss, the loss function also includes constraints from Fick's lithium-ion diffusion law and Butler-Wolmer electrode kinetic equations.

[0055] The Fick lithium-ion diffusion law constraint term is used to constrain the SOC time-series change rate to match the diffusion and migration rate of lithium ions in the electrode pores, limit the short-term sudden change amplitude of SOC, and conform to the diffusion mechanism of battery materials; the Butler-Wolmer electrode kinetic equation constraint term is used to constrain the nonlinear mapping relationship between battery terminal voltage, current, and polarization potential, which conforms to the electrode electrochemical reaction kinetic law.

[0056] Two types of constraint terms are incorporated into the total loss function in the form of adaptive weighted regularization, and the weight ratios are dynamically adjusted in real time based on the model training iteration residuals and validation set fitting errors. In the early stage of training, the data fitting weights are increased to quickly achieve model convergence, while in the later stage of training, the electrochemical and physical constraint weights are increased to correct the mechanistic bias caused by data fitting.

[0057] The loss function is:

[0058]

[0059] in, For the total loss function, Based on the diffusion reconstruction loss function, This is a constraint term in Fick's lithium-ion diffusion law. These are the constraint terms of the Butler-Wolmer equation. , For adaptive weighting coefficients, Standard Gaussian noise, , To Mathematical expectation.

[0060] In particular, the early stage of training (the first 30% of rounds). Larger values Smaller values ​​allow the model to prioritize the evolution of lithium-ion concentration distribution using Fick's diffusion law, ensuring the physical rationality of the core hidden state; this applies to the later stages of training (the last 70% of rounds). Decrease to a smaller value Increasing these values ​​to a larger extent emphasizes the consistency of electrode dynamics constrained by the Butler-Wolmer equations, correcting for residual mechanistic biases in the data fitting. Neither coefficient participates in the data fitting term. Instead of adjusting the physical constraints, it achieves a smooth switch between two types of physical constraints, dynamically balancing the data fitting accuracy and electrochemical mechanism compliance throughout the entire training cycle. This effectively solves the defects of fixed weights, which cannot adapt to the optimization needs of the entire training stage and are prone to underfitting or mechanism distortion. The constraint model training is consistent with the real electrochemical mechanism of the battery throughout the entire process, achieving efficient and stable convergence of pure unsupervised training.

[0061] The iterative mechanism of adding and removing noise in the diffusion model shares mathematical similarities with the physical process of lithium-ion diffusion and migration within electrode pores. This invention incorporates Fick's lithium-ion diffusion law and the Butler-Wolmer electrode kinetics equation as physical constraint regularization terms into the loss function. This enables the model to strongly fit the nonlinear electrochemical characteristics of the battery, producing an output that conforms to the internal mass migration and electrochemical reaction mechanisms of the battery, effectively avoiding the overfitting problem that easily occurs in purely data-driven models. This allows the model to maintain good generalization performance and physical interpretability even when facing different battery types, ambient temperatures, and charge / discharge rates across various operating conditions.

[0062] In the training process of this invention, a forward Gaussian diffusion noise-adding process of the battery state is first constructed, and then a diffusion-causal Transformer inverse diffusion neural network is built with the battery terminal voltage and current as input conditions. Unsupervised training is carried out using only the voltage and current time series data of the battery under normal operation, without any SOC ground truth label. By relying on the isomorphic characteristics of the diffusion model and the lithium-ion diffusion dynamics of the battery and embedding electrochemical physical constraints, the SOC estimation accuracy and cross-operating condition generalization ability of the inverse diffusion neural network are significantly improved.

[0063] This invention employs an unsupervised training paradigm, relying solely on voltage and current time-series data from normal battery operation to complete model training, eliminating the need for extensive SOC ground truth calibration data in a laboratory environment. This not only reduces the cost of data acquisition and model iteration but also effectively adapts to real-world application scenarios such as energy storage power stations and data centers where obtaining large amounts of labeled samples is difficult.

[0064] Next, the embodiments of the present invention will verify the scenario adaptability of the unsupervised battery SOC estimation method of the present invention in specific application scenarios. The hyperparameter configurations in scenarios such as energy storage power stations, electric aviation, and data center backup power are shown in Table 1: Table 1

[0065] (1) Energy storage power station scenario Large-capacity 200Ah square lithium iron phosphate energy storage battery modules are deployed in groups at grid-side energy storage power stations. The battery operates within a temperature range of 5℃ to 35℃, with a charge / discharge rate of 0.2C to 1.0C, covering all typical operating conditions including constant current and constant voltage charging, constant power discharging, peak shaving and frequency regulation, low-load standby, and operating condition switching. The power station has ample computing resources and requires high accuracy in SOC estimation, allowing for minute-level offline batch processing without strict real-time constraints.

[0066] The system continuously collects real-time operating sequence data for 30 days at a fixed sampling frequency of 1Hz. The collected parameters only include the terminal voltage of individual battery cells and the charging and discharging current of the circuit. There are no manually calibrated SOC true value labels throughout the process.

[0067] 2,592,000 time-series samples were obtained and divided into training and test sets in a 7:3 ratio. The training set was unlabeled and self-supervised, while the test set used the laboratory high-precision capacity calibration true value as the evaluation benchmark to quantify the error index.

[0068] The total number of diffusion steps T was set to 1000, and the cosine noise scheduling strategy was selected. The inverse diffusion neural network consisted of 12 layers and 8 attention heads, with a hidden dimension of 512. The model was trained unsupervised using an Intel Xeon 8-core processor and an NVIDIA A100 GPU, with 200 training epochs. The loss converged and stabilized after 120 epochs, and uncertainty quantization was performed independently for 20 samplings.

[0069] To verify the advantages of the unsupervised battery SOC estimation method of this invention in the context of energy storage power station scenarios, two of the most commonly used estimation methods in industry engineering were selected as comparison benchmarks, and both were compared under the same operating conditions and the same dataset: Benchmark 1: Extended Kalman Filter (EKF), based on a second-order RC equivalent circuit model, using the ampere-hour integration method for state prediction, and combined with voltage observations for correction; Benchmark 2: Conventional autoencoder unsupervised SOC estimation method, which is representative of similar unsupervised schemes in the prior art.

[0070] Table 2 shows the quantitative comparison results of the key error indicators of the unsupervised estimation method for battery SOC of this invention and the benchmark method.

[0071] Table 2

[0072] As shown in Table 2, compared with the traditional EKF method, the present invention reduces MAE by about 50.8%, RMSE by about 50.0%, and maximum absolute error by about 54.0%; the cumulative drift after 15 days of continuous operation is only 0.32%, which is almost eliminated from the accumulation of timing error compared with EKF's 2.86%, and there is no obvious SOC state drift.

[0073] Further dividing the test data into SOC intervals, the MAE of the present invention in each interval is as follows: Low SOC range (20%–40%): MAE of this invention = 1.72%; Mid-SOC range (40%–70%): MAE of this invention = 2.05%; High SOC range (70%–95%): MAE of this invention = 1.36%.

[0074] The unsupervised SOC estimation method of the present invention has better accuracy in the medium-high SOC operating range (40% to 95%) commonly used in energy storage power stations, and is adapted to the characteristics of long-term narrow-range steady-state operation of energy storage power stations.

[0075] Twenty independent back-diffusion samples were performed on the operating condition input at the same time, and the following uncertainty quantification results were obtained: SOC estimate mean standard deviation: ≤0.41%; 95% confidence interval mean width: ±0.83%.

[0076] The unsupervised estimation method for battery SOC of the present invention has good interval convergence and low dispersion of estimation results, which can provide a reliable risk quantification basis for energy storage scheduling and grid connection decision-making.

[0077] (2) Electric aircraft scenario This invention addresses the State of Charge (SOC) estimation problem for airborne platforms such as electric vertical takeoff and landing (eVTOL) aircraft, large industrial heavy-duty UAVs, and long-endurance electric fixed-wing UAVs. These aircraft experience large dynamic fluctuations in their flight conditions, have limited onboard computing resources, and require high accuracy in SOC estimation, long-term drift resistance, and robust quantification of security uncertainties. Furthermore, they need to meet real-time estimation requirements exceeding 1Hz.

[0078] Voltage and current data were collected for 50 hours during takeoff, cruise, and landing, using a sampling frequency of 10Hz, without SOC tags.

[0079] To address the limitations of onboard computing power, the network depth, width, and number of diffusion steps in the general configuration were adaptively reduced. A cosine noise scheduling strategy was chosen, with a total diffusion step count T of 500, 4 network layers, 4 attention heads, 256 hidden dimensions, and 5 independent sampling times for uncertainty quantization.

[0080] A two-stage approach is adopted: offline training on the ground and deployment on the airborne terminal. After offline training of the model is completed on the ground server, the trained lightweight model is solidified and deployed to the redundant airborne computer. The time for a single SOC estimation is ≤80ms, which meets the 1Hz real-time requirement (i.e., the interval between each estimation is ≤1000ms).

[0081] To verify the advantages of the unsupervised battery SOC estimation method of this invention in the electric aviation scenario, the unscented Kalman filter (UKF) method commonly used in airborne applications was selected as the benchmark for comparison. All comparisons were conducted under the same operating conditions and datasets, and the results are shown in Table 3. Table 3

[0082] As shown in Table 3, the MAE of the unsupervised estimation method of battery SOC in this invention is about 34% better than that of UKF, the long-term cumulative drift is reduced by about 72%, and a 95% confidence interval is output simultaneously, which can directly support flight safety decision-making.

[0083] (3) Data center backup power scenario This invention addresses the State of Charge (SOC) estimation problem for solid-state battery UPS systems in data centers. In this scenario, the battery operates in a float charge state for extended periods, maintaining a high SOC range of 90%–100%. While real-time performance requirements are relatively low, high estimation accuracy is crucial.

[0084] Data on float charging and periodic discharge conditions were collected over 12 months at a sampling frequency of 0.1Hz, with a focus on data characteristics in the high SOC range.

[0085] The noise scheduling method selected is cosine noise scheduling strategy, the total number of diffusion steps T is configured to be 800, the number of network layers is 12, the hidden dimension is 512 (a larger network is used to fully learn the subtle features in the high SOC range), and the number of regular sampling times for uncertainty quantization is 10.

[0086] To verify the advantages of the unsupervised battery SOC estimation method of this invention in the context of data center backup power scenarios, the traditional EKF method was selected as the benchmark for comparison, and a comparison was conducted under the condition of high SOC range (90%~100%). The results are shown in Table 4. Table 4

[0087] As shown in Table 4, the unsupervised battery SOC estimation method of the present invention achieves a MAE ≤ 0.8% in the high SOC range, with an accuracy improvement of approximately 62% compared to EKF. In emergency mode, the time taken for a single estimation is ≤ 20ms, which is much faster than EKF's 50ms, meeting the timeliness requirements for emergency decision-making.

[0088] The unsupervised battery SOC estimation system provided in the embodiments of the present invention is described below. The unsupervised battery SOC estimation system described below can be referred to in correspondence with the unsupervised battery SOC estimation method described above.

[0089] First, combine Figure 6 This paper introduces unsupervised battery SOC estimation systems, such as... Figure 6 As shown, the unsupervised battery SOC estimation system may include: Data acquisition module 1 acquires the current terminal voltage and circuit charging / discharging current; The online estimation module 2 uses the terminal voltage and circuit charging and discharging current as conditional inputs to a pre-trained reverse diffusion neural network. Starting from standard Gaussian noise initialization, the reverse diffusion neural network iterates step by step to remove noise according to a preset diffusion step number, independently restoring the battery's multidimensional original hidden state variables corresponding to the current moment. The multidimensional original hidden state variables include three core electrochemical hidden features: lithium ion concentration inside the battery, equivalent internal resistance, and interface polarization. Feature decoupling module 3, based on the benchmark feature mapping relationship, uses a preset feature component stripping algorithm to decouple and extract the SOC component from the multidimensional original hidden state variables, and outputs the SOC estimate after normalization. The benchmark feature mapping relationship is the feature mapping relationship between the multidimensional hidden state features and SOC established in advance based on the battery standard full-condition charge and discharge calibration test. Uncertainty sampling module 4 performs multiple independent reverse diffusions on the same terminal voltage and circuit charging / discharging current using a reverse diffusion neural network to obtain multiple sets of SOC estimation samples. The number of diffusion steps, network size, and sampling times of the multiple independent reverse diffusions are configured according to the application scenario. For specific configuration methods, please refer to the aforementioned embodiments and Table 1; Uncertainty quantification module 5 performs anomaly screening and probability distribution fitting on multiple sets of SOC estimate samples, statistically analyzes sample distribution characteristics, and calculates the output SOC estimate mean and preset confidence interval. It removes outlier samples using the 3σ criterion, fits Gaussian distribution, statistically analyzes sample distribution, and calculates the output SOC estimate mean and confidence interval. The scenario adaptation configuration module 6 provides a visual hyperparameter configuration interface. Based on the computing power, accuracy, and real-time requirements of the application scenario, it adaptively configures the diffusion steps, network size, and sampling frequency according to preset hierarchical adaptation rules. It can preset parameter templates for energy storage, electric aviation, and data center scenarios, and adaptively switch hyperparameters such as network size, diffusion steps, and sampling frequency.

[0090] Furthermore, such as Figure 7 As shown, the unsupervised battery SOC estimation system of this embodiment further includes: Trend Analysis Module 7 analyzes the estimated SOC value and the mean SOC value within a preset time range, and outputs the dynamic trend of SOC change through time series slope analysis and interval fluctuation statistics. Emergency control module 8 monitors the power grid operation status in real time, matches preset voltage and current change thresholds, and when abnormal power grid conditions are detected, dynamically reduces the number of diffusion steps to a preset safe value, starts a lightweight fast estimation mode, and adopts a single fast sampling mechanism. Output interaction module 9 pushes the SOC estimate and uncertainty confidence interval to the BMS main control unit, supporting local display and background cloud upload.

[0091] The battery SOC unsupervised estimation system provided in this embodiment of the invention can be applied to battery SOC unsupervised estimation devices. Figure 8 The hardware block diagram of the unsupervised estimation device for battery SOC is shown, with reference to Figure 8 The hardware structure of the device may include: at least one processor 1, at least one communication interface 2, at least one memory 3, and at least one communication bus 4; In this embodiment of the invention, the number of processor 1, communication interface 2, memory 3, and communication bus 4 is at least one, and processor 1, communication interface 2, and memory 3 communicate with each other through communication bus 4. Processor 1 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. Memory 3 may include high-speed RAM, and may also include non-volatile memory, such as at least one disk storage device; The memory stores a program, and the processor can call the program stored in the memory. The program is used to implement the various processing flows in the aforementioned unsupervised estimation method for battery SOC. This invention also provides a storage medium that can store a program suitable for processor execution, the program being used to implement various processing flows in the aforementioned unsupervised estimation scheme for battery SOC.

[0092] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0093] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0094] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An unsupervised method for estimating battery state of charge (SOC), characterized in that, include: Collect the current terminal voltage and circuit charging / discharging current; The terminal voltage and circuit charging and discharging current are used as the conditional inputs of the pre-trained reverse diffusion neural network. Starting from the initialization of standard Gaussian noise, the reverse diffusion neural network iterates step by step to remove noise according to the preset diffusion steps, and independently restores the multidimensional original hidden state variables of the battery at the current moment. The multidimensional original hidden state variables include three core electrochemical hidden features: lithium ion concentration inside the battery, equivalent internal resistance, and interface polarization. Based on the benchmark feature mapping relationship, a preset feature component stripping algorithm is used to decouple and extract the SOC component from the multidimensional original hidden state variables. After normalization, the SOC estimate is output. The benchmark feature mapping relationship is a feature mapping relationship between multidimensional hidden state features and SOC established in advance based on the battery standard full-condition charge and discharge calibration test. Multiple independent reverse diffusions are performed on the same terminal voltage and circuit charging and discharging current through a reverse diffusion neural network to obtain multiple sets of SOC estimation samples. The number of diffusion steps, network size and sampling times of the multiple independent reverse diffusions are configured according to the application scenario. Anomaly screening and probability distribution fitting are performed on multiple sets of SOC estimation samples. The sample distribution characteristics are statistically analyzed, and the output SOC estimation mean and pre-set confidence interval are calculated.

2. The unsupervised estimation method for battery SOC according to claim 1, characterized in that, The inverse diffusion neural network adopts a diffusion causal Transformer architecture, including: a causal attention mechanism layer, a cross attention layer, and a temporal embedding layer; The causal attention mechanism layer uses a temporal masking method to shield future temporal information and completes feature calculations only based on the current moment and historical data. The cross-attention layer incorporates the conditional characteristics of terminal voltage and loop charging and discharging current into the diffusion denoising process; The temporal embedding layer encodes the temporal features of the diffusion step to distinguish the denoising weights of different diffusion stages.

3. The unsupervised estimation method for battery SOC according to claim 1, characterized in that, The inverse diffusion neural network is trained using a purely unsupervised method, and the training process includes: The time-series terminal voltage and time-series current sequences under normal full-condition operation of the battery are collected as unlabeled training data sources. Based on the training data source, a multidimensional original hidden state variable is defined. Gaussian noise is gradually superimposed according to a preset noise scheduling method to generate intermediate hidden states with progressively enhanced noise, thus completing the forward diffusion process. The multidimensional original hidden state variable includes three core electrochemical hidden features: lithium ion concentration, equivalent internal resistance, and interface polarization. The training voltage and training current are used as the conditional inputs of the reverse diffusion neural network. The reverse diffusion neural network is based on pure Gaussian noise distribution to denoise step by step, restore the multidimensional original hidden state variables of the battery, and complete the reverse diffusion process. A composite loss function is constructed based on the reverse diffusion process. This loss function incorporates constraints from the Fick lithium-ion diffusion law and the Butler-Wolmer electrode kinetics equation, in addition to the basic diffusion reconstruction loss. An adaptive weighted regularization mechanism is adopted to dynamically adjust the weights of two types of constraint terms based on the model training iteration residuals and the validation set fitting error.

4. The unsupervised estimation method for battery SOC according to claim 1, characterized in that, The process of decoupling and extracting SOC components from multidimensional original latent state variables using a preset feature component stripping algorithm, and then normalizing and outputting the SOC estimate includes: A feature weight matrix is ​​constructed based on the correlation between lithium ion concentration and SOC to weight the multidimensional original hidden state variables; Principal component analysis is used to decompose the weighted feature space into a signal subspace and a noise subspace, and SOC principal component features are extracted. Based on the benchmark feature mapping relationship, the SOC principal component features are mapped to the SOC range, and the normalized SOC estimate is output.

5. The unsupervised estimation method for battery SOC according to claim 1, characterized in that, It also includes the SOC trend analysis step: The system analyzes the estimated SOC value and the mean SOC value within a preset time range, and outputs the SOC change trend through time series slope analysis and interval fluctuation variance statistics.

6. The unsupervised estimation method for battery SOC according to claim 1, characterized in that, It also includes emergency estimation model control steps: The system monitors the grid operation status in real time. When abnormal conditions such as sudden voltage drop, sudden current change, or grid disconnection are detected, the emergency estimation mode is triggered, reducing the diffusion steps to a preset safe range and employing a single rapid sampling mechanism.

7. The unsupervised estimation method for battery SOC according to claim 1, characterized in that, The process of anomaly screening and probability distribution fitting includes: Valid samples were selected using the 3σ outlier removal rule. Based on Gaussian distribution fitting of effective samples, the noise reduction optimization process of SOC estimation samples is completed; The preset confidence interval is any confidence interval between 90% and 99%.

8. A battery SOC unsupervised estimation system, characterized in that, The method for performing the unsupervised estimation of battery SOC according to any one of claims 1-7 includes: The data acquisition module collects the current terminal voltage and circuit charging / discharging current. The online estimation module uses the terminal voltage and circuit charging and discharging current as conditional inputs to a pre-trained inverse diffusion neural network. Starting from standard Gaussian noise initialization, the inverse diffusion neural network iterates step by step to remove noise according to a preset diffusion step number, independently restoring the battery's multidimensional original hidden state variables corresponding to the current moment. The multidimensional original hidden state variables include three core electrochemical hidden features: lithium ion concentration inside the battery, equivalent internal resistance, and interface polarization. The feature decoupling module extracts the SOC component from the multidimensional original hidden state variables based on the benchmark feature mapping relationship and a preset feature component stripping algorithm. After normalization, it outputs the SOC estimate. The benchmark feature mapping relationship is a feature mapping relationship between multidimensional hidden state features and SOC established in advance based on the battery standard full-condition charge and discharge calibration test. The uncertainty sampling module performs multiple independent reverse diffusions on the same terminal voltage and circuit charging and discharging current through a reverse diffusion neural network to obtain multiple sets of SOC estimation samples. The number of diffusion steps, network size and sampling times of the multiple independent reverse diffusions are configured according to the application scenario. The uncertainty quantification module performs anomaly screening and probability distribution fitting on multiple sets of SOC estimate samples, statistically analyzes the sample distribution characteristics, and calculates the output SOC estimate mean and preset confidence interval. The scenario adaptation configuration module is used to adaptively configure the diffusion steps, network size, and sampling times according to the computing power, accuracy, and real-time requirements of the application scenario.

9. A battery SOC unsupervised estimation device, characterized in that, include: Memory and processor; The memory is used to store programs; The processor is configured to execute the program to implement the steps of the battery SOC unsupervised estimation method as described in any one of claims 1-7.

10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the battery SOC unsupervised estimation method as described in any one of claims 1-7.