Diffusion bridge-based distributed energy storage device state of charge prediction method and system

By fusing a dual-channel Mamba model based on diffusion bridging and a Bayesian neural network with negative feedback, the problems of gradient vanishing and high computational complexity in lithium-ion battery SOC prediction are solved, achieving high-precision and robust real-time SOC estimation.

CN121142346BActive Publication Date: 2026-02-13STATE GRID SHANDONG ELECTRIC POWER CO MARKETING SERVICE CENT (MEASURING CENT)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511695076.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-19
Publication Date
2026-02-13
Estimated Expiration
2045-11-19

AI Technical Summary

Technical Problem

Existing methods for predicting the state of charge (SOC) of lithium-ion batteries suffer from gradient vanishing or exploding problems in long-term series, have high computational complexity, and are not robust enough when dealing with noisy and non-stationary data, making it difficult to achieve accurate and real-time SOC estimation.

Method used

A dual-channel Mamba model based on diffusion bridging is adopted. SOC prediction is performed through a one-dimensional convolutional layer, a dual-channel Mamba module, a sparse diffusion bridging module, and a fully connected layer. A negative feedback fusion is performed by combining a sparse selection attention mechanism and a Bayesian neural network to construct a dual-channel Mamba negative feedback model based on diffusion bridging.

Benefits of technology

It improves the accuracy and robustness of SOC prediction, can process long-term series data in real time, reduces computational complexity, enhances the model's prediction ability under complex working conditions, and achieves high-precision and robust SOC estimation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121142346B_ABST
    Figure CN121142346B_ABST
Patent Text Reader

Abstract

The application discloses a diffusion bridge-based distributed energy storage device state of charge prediction method and system, relates to the technical field of battery health management, and comprises the following steps: inputting original charging and discharging data into a diffusion bridge-based double-channel Mamba model for processing, the process being: performing one-dimensional convolution layer projection on the original charging and discharging data to obtain a characteristic sequence; inputting the characteristic sequence after forward scanning and the characteristic sequence after reverse scanning into a main channel and an auxiliary channel of the double-channel Mamba module respectively for processing to obtain hidden states of the main channel and the auxiliary channel; inputting the hidden states of the main channel and the auxiliary channel and a temperature characteristic sequence into a sparse diffusion bridge module to model a diffusion process, and adopting a sparse selection attention mechanism to select key differences to obtain fused features; and inputting the fused features into a full connection layer after flattening processing to obtain an SOC prediction result, so that the SOC can be accurately and timely estimated.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of battery health management, and particularly relates to a diffusion bridge-based distributed energy storage device state of charge prediction method and system. BACKGROUND

[0002] The statements in this section merely provide background information related to the present disclosure and do not necessarily constitute the prior art.

[0003] With the continuous rise of fossil fuel consumption, the greenhouse effect is becoming increasingly intense, leading to an imbalance in the ecosystem. Clean energy has gradually become a strong alternative to traditional energy, reducing environmental pollution and solving the problem of energy shortage. Distributed energy storage devices are one of the ways to store clean energy. Lithium-ion batteries have the characteristics of long cycle life, high energy density, small size, good performance, and have been widely used in distributed energy storage devices. However, due to the long service life of lithium-ion batteries, their performance tends to deteriorate over time, and the accurate prediction of their state of charge (SOC) is crucial for the safe operation, life optimization, and energy scheduling of the battery management system.

[0004] Currently, SOC prediction methods can be mainly divided into two categories: physical model-based methods and data-driven methods. Physical model-based methods, such as the ampere-hour integral method, although simple in principle and easy to implement, are essentially an open-loop estimation method, susceptible to sensor errors, current fluctuations, and battery aging, and have cumulative error problems, with a significant decrease in accuracy over time.

[0005] To overcome the limitations of physical models, data-driven methods, particularly deep learning models, have become a research hotspot. For example, recurrent neural networks (RNN) and their variants (such as LSTM, GRU) can capture the dependency of time series and are widely used in SOC prediction. However, such models are prone to gradient vanishing or explosion problems when dealing with long sequences, and have high computational complexity. In recent years, the Transformer model has shown its advantages in multiple fields due to its strong global dependency modeling capability, but the computational complexity of its self-attention mechanism is proportional to the square of the sequence length, resulting in a huge computational overhead when dealing with long time series charge and discharge data, making it difficult to meet the real-time monitoring requirements.

[0006] State Space Model (SSM), especially the latest Mamba model, provides a new way for SOC prediction due to its linear computational complexity and excellent performance in long sequence modeling. However, the standard Mamba model still has certain limitations when dealing with data with strong noise and non-stationary characteristics such as battery charging and discharging: first, the traditional one-way Mamba model only looks at past information and ignores future information, which may not fully capture the key information of the context in time series data; second, the model is sensitive to noise and redundant information in the input data, which may lead to unstable state estimation; third, the existing data-driven model lacks an effective correction mechanism when the model output is abnormal, resulting in insufficient robustness of the prediction result under complex working conditions. SUMMARY

[0007] To overcome the above-mentioned deficiencies of the prior art, the present application provides a distributed energy storage device state of charge prediction method and system based on diffusion bridging, aiming to accurately and timely estimate the SOC.

[0008] To achieve the above-mentioned purpose, one or more embodiments of the present application provide the following technical solutions:

[0009] In a first aspect, the present application provides a distributed energy storage device state of charge prediction method based on diffusion bridging, comprising:

[0010] Obtaining the original charging and discharging data of the energy storage device;

[0011] Inputting the original charging and discharging data into a diffusion bridging-based double-channel Mamba model for processing to obtain a SOC prediction result;

[0012] The diffusion bridging-based double-channel Mamba model includes a one-dimensional convolution layer, a double-channel Mamba module, a sparse diffusion bridging module, and a full connection layer, and its construction process includes:

[0013] The one-dimensional convolution layer is used to project the original charging and discharging data to obtain a feature sequence; the feature sequence includes a voltage feature sequence, a current feature sequence, and a temperature feature sequence;

[0014] The double-channel Mamba module includes a main channel and an auxiliary channel; the feature sequence after forward scanning is input into the main channel for chronological processing, and the feature sequence after reverse scanning is input into the auxiliary channel for reverse chronological processing; the main channel and the auxiliary channel perform different Mamba operation sequences to obtain the hidden state of the main channel and the hidden state of the auxiliary channel;

[0015] The hidden states of the main channel, the auxiliary channel, and the temperature feature sequence are input into the sparse diffusion bridging module. The sparse diffusion bridging module calculates the path difference by subtracting the hidden states of the main channel and the auxiliary channel, obtains the diffusion rate based on the temperature feature sequence, and simulates the diffusion bridging process based on the second spatial derivative of the path difference and the diffusion rate, outputting the fused features.

[0016] The fused features are flattened and then input into a fully connected layer for mapping to obtain the SOC prediction result.

[0017] A further technical solution involves performing forward and reverse scanning on the feature sequence to obtain forward scanning feature sequences and reverse scanning feature sequences, which are then input into the main channel and auxiliary channel, respectively.

[0018] In a further technical solution, both the main channel and the auxiliary channel include a linear projection, a convolutional layer, an activation layer, a state space model, and a linear projection connected in sequence.

[0019] The linear projection formula is as follows:

[0020]

[0021]

[0022] in, and They represent the numbers after the projection. The main and auxiliary channel characteristics of the step. Indicates the main channel number The input vector at each time step, Indicates the auxiliary channel number The input vector at each time step, This represents the learnable projection matrix. This represents a learnable bias vector.

[0023] A further technical solution is that the convolutional layer employs depthwise separable convolution, which is formulated as follows:

[0024]

[0025]

[0026] in, , They represent the convolutional order of the first and second convolutions. Local fusion features of the main channel and local fusion features of the auxiliary channel;

[0027] The main channel local fusion feature is input to the state space model of the main channel, and the auxiliary channel local fusion feature is input to the state space model of the auxiliary channel, which is represented as:

[0028]

[0029]

[0030] wherein, denotes the hidden state of the main channel at the time step, denotes the hidden state of the main channel at the time step, denotes the hidden state of the auxiliary channel at the time step, denotes the hidden state of the auxiliary channel at the time step, denotes the discretized continuous state transition matrix, denotes the discretized continuous time input matrix.

[0031] Further technical solutions, the calculation formula of the diffusion speed is:

[0032]

[0033] wherein, denotes the diffusion speed controlled by the temperature feature sequence, denotes the activation function, denotes the weight matrix, denotes the bias vector.

[0034] Further technical solutions, the continuous diffusion bridging equation is discretized, and a sparse selection attention mechanism is added in the discretization process, and the formula is represented as:

[0035]

[0036] wherein, denotes the discretized feature of the sparse diffusion bridging module at the moment, denotes the discretized feature of the sparse diffusion bridging module at the moment, denotes the time step, denotes the diffusion speed controlled by the temperature feature sequence, denotes the second-order spatial derivative of the path difference, denotes the state transition matrix, denotes the sparse attention matrix at the moment.

[0037] Further, a negative feedback structure is designed for the diffusion bridge-based double-channel Mamba model, and the SOC estimation result obtained by the physical model integral calculation is fused and corrected with the SOC prediction result output by the diffusion bridge-based double-channel Mamba model to obtain the final SOC result.

[0038] In the fusion correction process, the SOC prediction result output by the diffusion bridge-based double-channel Mamba model is evaluated by using a Bayesian neural network to determine its accuracy.

[0039] In a second aspect, the present application provides a diffusion bridge-based distributed energy storage device state of charge prediction system, comprising:

[0040] A data acquisition module configured to acquire original charge and discharge data of the energy storage device;

[0041] An SOC prediction module configured to input the original charge and discharge data into the diffusion bridge-based double-channel Mamba model for processing to obtain an SOC prediction result;

[0042] The diffusion bridge-based double-channel Mamba model comprises a one-dimensional convolution layer, a double-channel Mamba module, a sparse diffusion bridge module and a full connection layer, and the construction process comprises:

[0043] The original charge and discharge data is projected by the one-dimensional convolution layer to obtain a feature sequence; the feature sequence comprises a voltage feature sequence, a current feature sequence and a temperature feature sequence;

[0044] The double-channel Mamba module comprises a main channel and an auxiliary channel, the feature sequence after forward scanning is input into the main channel for forward processing, and the feature sequence after reverse scanning is input into the auxiliary channel for reverse processing; the main channel and the auxiliary channel perform different Mamba operation sequences to obtain a hidden state of the main channel and a hidden state of the auxiliary channel;

[0045] The hidden state of the main channel, the hidden state of the auxiliary channel and the temperature feature sequence are input into the sparse diffusion bridge module, the sparse diffusion bridge module obtains a path difference by subtracting the hidden state of the main channel from the hidden state of the auxiliary channel, obtains a diffusion speed based on the temperature feature sequence, simulates a diffusion bridge process based on a second-order spatial derivative of the path difference and the diffusion speed, and outputs a fusion feature;

[0046] The fusion feature is flattened and input into the full connection layer for mapping to obtain the SOC prediction result.

[0047] In a third aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the diffusion bridge based distributed energy storage device state of charge prediction method according to the first aspect.

[0048] In a fourth aspect, the present application provides a computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the diffusion bridge based distributed energy storage device state of charge prediction method according to the first aspect when executing the program.

[0049] The above one or more technical solutions have the following beneficial effects:

[0050] The present application performs SOC prediction based on the diffusion bridge based double-channel Mamba model, fully captures the key information of the context before and after the time series data through the double-channel Mamba module, obtains the channel hidden state difference, models the channel hidden state difference as a "diffusion process" through the sparse diffusion bridge module, and retains the key difference in the "diffusion process", and finally performs fusion feature, and obtains the SOC prediction result based on the fusion feature mapping.

[0051] The present application proposes a diffusion bridge based double-channel Mamba negative feedback type model, which has more excellent performance than the ordinary Mamba model in terms of SOC estimation accuracy and convergence ability, and the model also has good robustness and generalization in the environment without training.

[0052] The present application sets a double-channel Mamba module, the traditional one-way model only looks at the "past" and ignores the "future" information, the double-channel design looks at the front and back at the same time like "binoculars", ensuring that the global context in the long sequence of battery charging data such as hours is captured. In SOC prediction, this means that the model can better handle the "delay effect", that is, the influence of early current changes on later SOC, and improve the prediction accuracy. The auxiliary channel compensates for the blind area of the main channel and is more robust to noise or missing data, such as when the temperature sensor occasionally fails, the backward can "backfill" information. Mamba itself is Complexity (linear time), bidirectional only needs to run two paths in parallel, the total complexity is still low, better than the In the distributed energy storage device, this allows real-time prediction without consuming too many resources.

[0053] The sparse diffusion bridge module models the difference output by the double-channel as a "diffusion process", like heat spreading from high concentration areas to low concentration areas, using temperature feature sequences Driving diffusion coefficient In the diffusion process, the sparse selection mechanism uses a Top-K mask Sparse S, only keep key score, and finally fuse features. Diffusion bridge itself is linear , diffusion bridge smooths path difference, sparse selection key attention ignores noise, and after combination, it is more robust to non-stationary sequence such as SOC fluctuation under battery variable temperature.

[0054] The negative feedback Bayesian fusion module models the probability weight and automatically outputs the uncertainty variance of the prediction of the sparse bridge module , Real-time reflect the reliability of the double-channel mamba output. At the same time, the end-to-end joint optimization of the negative feedback "correction strategy" and "prediction ability" avoids the performance loss of the phased design, and improves the overall accuracy of the closed-loop feedback. The negative feedback mechanism driven by Bayesian neural network solves the problems of traditional filtering such as "artificial dependence, weak complex working condition, and difficult engineering landing" through self-learning uncertainty, end-to-end cooperation, self-robust adaptation, and lightweight inference. It provides a "high precision, strong robustness, real-time availability, and easy debugging" closed-loop solution for SOC estimation, and accelerates the landing of intelligent battery management technology from theory to engineering. BRIEF DESCRIPTION OF DRAWINGS

[0055] The drawings accompanying this specification form a part of this specification, illustrate exemplary embodiments of the present application and generally understood so as to explain the present application and are not intended to limit the present application unduly.

[0056] Figure 1 is the overall structure diagram of the double-channel Mamba negative feedback model based on diffusion bridge of the embodiment of the present application;

[0057] Figure 2 is the Mamba module structure diagram of the embodiment of the present application;

[0058] Figure 3 is the discharge estimation diagram of the SOC at 25℃ under 100% power of the embodiment of the present application;

[0059] Figure 4 is the discharge estimation diagram of the SOC at 25℃ under 80% power of the embodiment of the present application;

[0060] Figure 5 is the discharge estimation diagram of the SOC at 25℃ under 60% power of the embodiment of the present application;

[0061] Figure 6 is the MAE and RSME error comparison diagram of the embodiment of the present application under different temperatures of 100% discharge;

[0062] Figure 7 is the MAE and RSME error comparison diagram of the embodiment of the present application under different temperatures of 80% discharge;

[0063] Figure 8 MAE and RSME error comparison of 60% discharge of the embodiment of the present application at different temperatures. DETAILED DESCRIPTION

[0064] It should be noted that the following detailed description is exemplary in nature and is intended to provide further description of the application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.

[0065] It is to be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments consistent with the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, steps, operations, elements, components, and / or groups thereof, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or groups thereof.

[0066] The embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0067] Embodiment One

[0068] The embodiment discloses a diffusion bridge-based distributed energy storage device state of charge prediction method, which comprises the following steps:

[0069] S1: Obtain original charge and discharge data of the energy storage device;

[0070] In the embodiment, the distributed energy storage device is monitored in real time to obtain the original charge and discharge data , wherein, is a time step, the columns of respectively include a voltage time sequence , a current time sequence and a temperature time sequence .

[0071] S2: Input the original charge and discharge data into a diffusion bridge-based double-channel Mamba negative feedback model for processing to obtain a SOC prediction result.

[0072] As shown in Figure 1 , the diffusion bridge-based double-channel Mamba model comprises a one-dimensional convolution layer, a double-channel Mamba module, a sparse diffusion bridge module and a full connection layer.

[0073] S201: Project the original charge and discharge data through the one-dimensional convolution layer to obtain a feature sequence.

[0074] In order to be able to perform deep operations on these low-dimensional data, an upper projection process is applied. For , its original space is transformed into a new multi-dimensional space through a one-dimensional convolution layer (one-dimensional convolutional neural network CNN). According to this projection, the original charge and discharge data is expanded into a feature sequence containing rich information, and this process can be formulated as:

[0075]

[0076] Wherein, represents the output feature sequence, and the feature sequence includes a voltage feature sequence, a current feature sequence and a temperature feature sequence; ∈K×C; δ[Conv(·)] represents a network constructed by a single-layer 1D-CNN with a sigmoid function. The feature sequence captures the rich feature representation of the low-dimensional data for subsequent path processing.

[0077] S202: respectively input the feature sequence after forward scanning and the feature sequence after reverse scanning into a double-channel Mamba module for processing to obtain a hidden state of a main channel and a hidden state of an auxiliary channel.

[0078] The feature sequence is respectively forward scanned and reverse scanned to obtain a forward scanning feature sequence and a reverse scanning feature sequence . The double-channel Mamba module includes a main channel and an auxiliary channel, the forward scanning feature sequence is input into the main channel for forward processing, and the reverse scanning feature sequence is input into the auxiliary channel for reverse processing, and the main channel and the auxiliary channel perform different mamba operation sequences. The forward and reverse Mamba channels together adjust the parameters of a bidirectional state space model (State Space Model, SSM) to realize global capture of signal features of the distributed energy storage device.

[0079] As shown in Figure 2 , the traditional Mamba module includes a main branch and a branch, the main branch includes a linear projection, a convolution layer, an activation layer, a state space model and a linear projection connected in sequence, and the branch includes a linear projection and an activation layer. The output of the activation layer of the branch is input into the linear projection of the main branch together with the output of the state space model of the main branch. The main channel and the auxiliary channel of the double-channel Mamba module of the present application only select the main branch of the traditional Mamba module, and the main channel and the auxiliary channel are forward and reverse channels of the bidirectional Mamba structure.

[0080] Both the main and auxiliary channels consist of a linear projection, a convolutional layer (depth-separable convolution), an activation layer, a state-space model (SSM layer), and a linear projection, connected sequentially. The internal operations of the main and auxiliary channels are as follows:

[0081] First, to ensure the input data fits the state dimensions of the SSM layer, a linear mapping of dimensions is performed. This process can be formulated as follows:

[0082]

[0083]

[0084] in, It is the main passage. The input vector at each time step, It is the auxiliary channel number The input vector at each time step, It is a learnable projection matrix responsible for dimensional translation. To create a learnable bias vector, adjust the feature distribution. and It is the first time after the shot The main and auxiliary channel characteristics of the step.

[0085] To compensate for the potential shortcomings of SSM (Short Memory Priority, Weak Local Information), Mamba modules typically incorporate depthwise separable convolutions after projection. The process of performing local feature fusion can be formulated as follows:

[0086]

[0087]

[0088] in, , They represent the convolutional order of the first and second convolutions. The main channel local fusion features and auxiliary channel local fusion features of the step.

[0089] In this embodiment, the kernel size is 3 to capture local dependencies between adjacent time steps.

[0090] The result obtained through projection and convolution The input is fed into the SSM layer of the main channel, and after projection and convolution, it is obtained... The SSM layer of the auxiliary channel is input. The current, voltage and temperature of the battery are continuous time signals, which theoretically change infinitely subdivided over time, but the state space model SSM of Mamba is a discrete time model, which only processes "time step sequences", so the continuous data must be discretized at a sampling period Δt in engineering, and the discrete time step sequence fusion features are obtained, each time step Corresponds to a sampling point. In this application, the mathematical expression of SSM is only the characteristic equation at this stage, and the state equations of the main channel and the auxiliary channel can be formulated as:

[0091]

[0092]

[0093] Wherein, the state equation is the state update equation of the discrete time state space model (SSM), and each element corresponds to the core logic of "memory transmission and input fusion". is the "memory vector" (i.e. the hidden state of the main channel) of the SSM of the main channel at the time step, which stores the compressed representation of the input information of the previous time step; is the "memory vector" (i.e. the hidden state of the auxiliary channel) of the SSM of the auxiliary channel at the time step, which stores the compressed representation of the input information of the previous time step; is the discretized continuous state transition matrix, Δt is the time step, which describes how to linearly transform the memory of the last time step into the history part of the current time memory; is the discretized continuous time input matrix, which describes how to inject the input of the current time step into the state , i.e. the contribution weight of the current input to the state update.

[0094] In order to carry out more advantageous hidden state flow fusion, the two Mamba paths only put data into Figure 2 the right main path (i.e. the main branch) for processing.

[0095] S203: input the hidden state of the main channel, the hidden state of the auxiliary channel and the temperature feature sequence to the sparse diffusion bridge modeling module to model the diffusion process, and use the sparse selection attention mechanism to select the key difference to obtain the fusion feature.

[0096] (1) Continuous diffusion bridge operation

[0097] The sparse diffusion bridging module models the difference between the outputs of the two-channel Mamba module as a "diffusion process", like heat spreading from a high-temperature region to a low-temperature region. By analogy with the "diffusion equation" in physics, the formula is in a simple form:

[0098]

[0099] where u represents the "state" (like heat), represents the speed of diffusion, represents the "gradient operator" (such as temperature difference).

[0100] Inspired by the above physical equation, the present application regards the channel hidden state difference between the main channel and the auxiliary channel as a "temperature difference", and lets the information diffuse and fuse. The hidden states of the above two channels and are input into the sparse diffusion bridging module, and the temperature feature sequence T extracted by a one-dimensional convolution layer from the temperature time sequence is added as input into the sparse diffusion bridging module. Adding the temperature feature sequence is to regard the temperature as a "diffusion engine", and to bind the actual physical state (temperature) of the battery with the information fusion mathematical model, so that the diffusion bridging model learning process conforms to the electrochemical law; at the same time, the difference between the outputs of the two channels is analogous to the temperature gradient, and the information fusion speed is dynamically adjusted.

[0101] First, the path difference between the main channel and the auxiliary channel at different time sequences is calculated, and this process can be formalized as:

[0102]

[0103] where represents the channel hidden state difference (path difference).

[0104] At the same time, the diffusion coefficient is calculated, and this process can be formalized as:

[0105]

[0106] where represents the diffusion speed controlled by the temperature feature sequence (diffusion coefficient), represents the activation function, represents the trainable weight matrix, which is used to linearly change the temperature sequence features to extract useful information for the diffusion process; represents the bias vector, which is used to adjust the offset of the feature distribution and enhance the expression ability of the model. Assuming = 0.01, = 0 (simplified process), this operation mainly uses the sigmoid function to compress and map the temperature. The temperature feature sequence Controlling the speed of diffusion Because in distributed energy storage devices, temperature has a wide impact. The difference captures the imbalance or dynamic tension between channels, which can effectively simulate the evolution behavior of the system.

[0107] The continuous diffusion bridge equation can be formulated as:

[0108]

[0109] Where, denotes the characteristics of the bridge module at the moment, denotes the derivative of the characteristics of the bridge module at the moment, denotes the state transition matrix, denotes the second-order spatial derivative of the path difference, which measures the non-uniformity in "space", indicating the rate of information diffusion from high concentration areas to low concentration areas.

[0110] (2) Sparse attention selection

[0111] Because the traditional self-attention mechanism (such as Transformer) processes long sequence data, the computational complexity increases with the sequence length in square level ( ), resulting in large consumption of computing resources and slow inference speed. In addition, although the Mamba model is good at modeling long sequences, it is easily disturbed by noise interference or non-key information, affecting the stability and accuracy of state estimation. The present application proposes a sparse selection mechanism that retains the attention values that have the most impact on SOC estimation tasks and ignores irrelevant or noisy parts.

[0112] First, define two matrices, including the query matrix (Q) and the key matrix (K). They are obtained by performing matrix operations: , denotes the feature channel. Then, through sparse processing of S, only the largest attention value in each row / column ( ) is retained, and the rest is set to 0. This process can be formulated as:

[0113]

[0114]

[0115] Where, denotes the Top-K mask matrix, denotes the sparse attention matrix, denotes the element-wise product, denotes the channel hidden state difference.

[0116] (3) Continuous diffusion bridging discretization

[0117] SA sparsifies attention through Top-K mask matrix or threshold mask, focusing only on key diffs, which optimizes learning of nonlinear relationships and temporal dependencies, ensuring efficient and focused computation. The continuous diffusion bridging equation is discretized, with a sparse selection attention mechanism added during discretization. This process can be formulated as:

[0118]

[0119] where, denotes the discretized features of the bridging module at time t, denotes the sparse attention matrix at time t. This converts the continuous dynamics into computable recursive steps, suitable for computer implementation.

[0120] The process from the difference of discretized dual-channel hidden features to continuous bridging and then to SA discrete optimization is to construct continuous dynamics from discrete data, improve modeling capabilities, and then refine discrete computation through SA to improve efficiency and selectivity. It solves the limitations of purely discrete models (such as loss of details) and the computational difficulties of purely continuous models (such as complex solutions), forming an efficient and flexible framework that provides significant progress for time series or dynamic systems, ensuring that the model is more robust and accurate in practical applications.

[0121] Through the above technical features, the dual-channel Mamba module provides "high-quality bidirectional difference features" for sparse diffusion bridging, i.e., forward and reverse time series processing of the main and auxiliary channels, generating "channel hidden state differences" containing context dependence, solving the problem of "single feature source and weak long sequence correlation" when sparse diffusion bridging is used alone; sparse diffusion bridging "doubles optimizes" the difference features of the dual-channel Mamba module, one is noise filtering: through the temperature-driven diffusion coefficient to simulate the rules of lithium ion diffusion, smooth the invalid differences caused by noise, and solve the "noise sensitivity" problem of the dual-channel Mamba module; two is key selection: through Top-K sparse attention ( ) to filter out core differences that have a decisive impact on SOC evolution (such as differences corresponding to large current mutations and temperature surges), solving the "feature roughness" problem of the dual-channel Mamba.

[0122] Further, sparse diffusion bridging will sequence the battery temperature ( ) into the diffusion process, making the pure data-driven characteristics of the dual-channel Mamba module conform to the electrochemical law that "lithium ion diffusion accelerates with temperature rise", solving the problem of "lack of physical logic" of single Mamba.

[0123] Further, the dual-channel Mamba module (computational complexity ) and the sparse diffusion bridging module (computational complexity ) both maintain linear complexity, and the overall complexity after cooperation is still , avoiding the complexity superposition of traditional fusion models (such as Transformer+CNN), meeting the engineering needs of "real-time monitoring" of distributed energy storage devices.

[0124] S204: After flattening the fusion features, input them into the fully connected layer for mapping to obtain the SOC prediction result.

[0125] The output of the diffusion bridging model (i.e., the sparse diffusion bridging module) Before entering the fully connected layer, flattening is needed, i.e., converting the three-dimensional data tensor (for example: ) into a two-dimensional tensor (for example: ). This step allows the fully connected layer to process the information of the entire sequence without distinguishing time steps, treating all hidden states in the sequence as a whole for subsequent processing.

[0126] Let be the output tensor of the diffusion bridging model, and the flattened tensor be , which can be expressed by the formula:

[0127]

[0128] Among them, , , represent the sample index, time step index, and hidden state dimension index of respectively; represents the one-dimensional index after flattening, .

[0129] After flattening, we get , which enters the fully connected layer. Each neuron of the fully connected layer is connected to all neurons of the input layer, and linear transformation is performed through the weight matrix and the bias vector . The formula is expressed as:

[0130]

[0131] Among them, represents the output of the fully connected layer. In this process The dimension of is determined according to the number of neurons of input and output. For example, if the input ( ) dimension is m (i.e. ), the output dimension is n (for example, the SOC value to be finally obtained can be regarded as a dimension), then The dimension of is n x m, and through this linear transformation, the model can learn the complex mapping relationship between the input features ( ) and the SOC value.

[0132] The output of the fully connected layer This vector integrates and maps the input features to the range of SOC values through the parameters learned by the model during training. During the training process, the model adjusts the weights and biases of the fully connected layer according to the SOC true value in the training data, so that the SOC estimation value output by the model is as close to the true value as possible. By minimizing the loss function (such as root mean square error RMSE) to optimize these parameters, the model can accurately extract information from it and convert it into SOC estimation results.

[0133] In this embodiment, it is found through research that the above-mentioned double-channel Mamba model based on diffusion bridge may have abnormal output SOC, in order to solve this problem, the present application designs a negative feedback structure, and constructs a double-channel Mamba negative feedback model based on diffusion bridge. The calculated by integrating the physical model ampere-hour integral through current integration is fused and corrected with the predicted by the double-channel Mamba model based on diffusion bridge through current and voltage and temperature, to obtain the final , and the process can be formulated as:

[0134]

[0135] Among them, represents the closed-loop gain at time , used to quantify the correction weight of the data-driven model ( ) to the physical model ( ).

[0136] In the process of fusion, the Bayesian neural network (BNN) is used to evaluate the accuracy of the output by the diffusion bridge double-channel Mamba model. First, take as the input of BNN, and set the neural network weight subject to Gaussian prior distribution, and the process is formulated as:

[0137]

[0138] where, represents the weight variance, which is used to control the complexity of the model.

[0139] Secondly, the probability model of the output (i.e., SOC) is:

[0140]

[0141] where, is the observation noise, which is subject to a zero-mean Gaussian distribution, representing the additional error in the current measurement or the current bridge model output itself, in addition to the uncertainty of the model itself (reflected in ).

[0142] In the process of training the BNN, the approximate posterior is used to approximate the true posterior , and the evidence lower bound (ELBO) is optimized, which can be formulated as:

[0143]

[0144] where, is the data likelihood, which is similar to the loss function in the training of ordinary neural networks, encouraging the predicted values of the model to better fit the true SOC values; is the complexity penalty term, which constrains not to deviate too far from the prior , preventing overfitting. The training goal is to maximize the ELBO, which is equivalent to minimizing the trade-off between prediction error and model complexity.

[0145] In the closed-loop fusion implementation stage, the state equation, i.e., the SOC tested by the ampere-hour integral, can be formulated as:

[0146]

[0147] where, is the rated capacity of the battery, is the process noise, is the variance.

[0148] The observation equation of the BNN output can be formulated as:

[0149]

[0150] where, is the uncertainty measure of the BNN's prediction of the current SOC, which is essentially the result of the combined effect of the uncertainty of the model weights and the noise of the input data. The uncertainty of the weights ( ) is passed through the network layers and is affected by the observation noise in the process, finally outputting the uncertainty .

[0151] In the above SOC fusion formula The closed-loop gain, calculated based on the observation noise covariance of the Bayesian neural network output, can be formulated as follows:

[0152]

[0153] in, This represents the prediction error of the ampere-hour integral. This represents the noise variance of the BNN output.

[0154] The relationship between the closed-loop gain and noise variance, as described above, is obtained through fusion. As can be seen from the formula, if the diffusion-bridged dual-channel Mamba model outputs... Unreliable models, such as those based on sudden current changes, will predict large fluctuations, leading to large outputs from BNNs. . Enlarged shrinking and thus leading to The low correction weights lead to poor fusion results. Closer to ampere-hour integrals The physical model is more stable; if the diffusion bridges the dual-channel Mamba model output... In reliable conditions, such as steady-state operation, the BNN will output a small value. . shrinking leads to Enlarged and thus caused The high correction weights lead to poor fusion results. More closely resembles the output of a diffuse-bridged dual-channel Mamba model. .

[0155] Experimental description:

[0156] To simulate the dynamic operating conditions of lithium-ion batteries in distributed energy storage devices, lithium iron phosphate (LFP) batteries were discharged for 0, 10, 25, 30, 40, and 50 minutes. For each charge / discharge cycle, the battery was first fully charged in constant current (1C) and constant voltage modes. When the current fell below the charging cutoff current, the charging process was stopped, and the battery continued to discharge under one of the aforementioned dynamic operating conditions until it was depleted. The battery was considered fully discharged when the terminal voltage fell below the discharge cutoff voltage. Throughout this process, the battery's current, voltage, and surface temperature signals were recorded every second. Figure 3 , Figure 4 , Figure 5 As shown, this experiment also tested the SOC and error values ​​of lithium-ion batteries at various temperatures of 100%, 80%, and 60% due to the influence of temperature.

[0157] As Figure 6 , Figure 7 , Figure 8 shown, in order to evaluate the proposed method, the mean absolute error (MAE) and the root mean square error (RMSE) are used as evaluation indicators:

[0158]

[0159] wherein, is the number of all test samples, and are the actual value and the estimated value of SOC at time step k, respectively.

[0160] The experimental results show that the method proposed in the application can more accurately estimate the SOC under different temperatures and initial states.

[0161] Embodiment Two

[0162] The embodiment discloses a distributed energy storage device state of charge prediction system based on diffusion bridging, comprising:

[0163] A data acquisition module configured to acquire original charge-discharge data of the energy storage device;

[0164] An SOC prediction module configured to input the original charge-discharge data into a diffusion bridging-based double-channel Mamba model for processing to obtain an SOC prediction result;

[0165] The diffusion bridging-based double-channel Mamba model comprises a one-dimensional convolution layer, a double-channel Mamba module, a sparse diffusion bridging module and a full connection layer, and the construction process comprises:

[0166] The original charge-discharge data is projected onto a feature sequence through the one-dimensional convolution layer; the feature sequence comprises a voltage feature sequence, a current feature sequence and a temperature feature sequence;

[0167] The double-channel Mamba module comprises a main channel and an auxiliary channel; the feature sequence after forward scanning is input into the main channel for forward processing, and the feature sequence after reverse scanning is input into the auxiliary channel for reverse processing; the main channel and the auxiliary channel perform different Mamba operation sequences to obtain a hidden state of the main channel and a hidden state of the auxiliary channel;

[0168] The hidden state of the main channel, the hidden state of the auxiliary channel and the temperature feature sequence are input into the sparse diffusion bridging module; the sparse diffusion bridging module obtains a path difference by subtracting the hidden state of the main channel from the hidden state of the auxiliary channel, obtains a diffusion speed based on the temperature feature sequence, simulates a diffusion bridging process based on a second-order spatial derivative of the path difference and the diffusion speed, and outputs a fusion feature;

[0169] The fusion features are flattened and input into a fully connected layer for mapping to obtain the SOC prediction result.

[0170] Embodiment three

[0171] The purpose of this embodiment is to provide a computing device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method of embodiment one when executing the program.

[0172] Embodiment four

[0173] The purpose of this embodiment is to provide a computer-readable storage medium, a computer-readable storage medium having a computer program stored thereon, wherein the program is executed by a processor to perform the steps of the method of embodiment one.

[0174] The steps involved in the devices of embodiments three and four above correspond to the method of embodiment one, and the specific embodiments can be seen in the relevant description of embodiment one. The term "computer-readable storage medium" should be understood to include a single medium or multiple media of one or more instruction sets; it should also be understood to include any medium capable of storing, encoding, or carrying instruction sets for execution by a processor and causing the processor to perform any of the methods of the present application.

[0175] Those skilled in the art should understand that the above-mentioned modules or steps of the present application can be realized by a general computer device, alternatively, they can be realized by program codes executable by a computing device, so that they can be stored in a storage device for execution by a computing device, or they can be made into individual integrated circuit modules, or a plurality of modules or steps among them can be made into a single integrated circuit module. The present application is not limited to any specific combination of hardware and software.

[0176] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

[0177] The above describes the specific embodiments of the present application in combination with the accompanying drawings, but is not intended to limit the protection scope of the present application. Those skilled in the art should understand that various modifications or changes made on the basis of the technical solutions of the present application without creative labor are still within the protection scope of the present application.

Claims

1. A method for predicting the state of charge (SOC) of distributed energy storage devices based on diffusion bridging, characterized in that, include: Acquire raw charge and discharge data of energy storage devices; The raw charge and discharge data are input into a diffusion-bridged dual-channel Mamba model for processing to obtain the SOC prediction results. The dual-channel Mamba model based on diffusion bridging includes a one-dimensional convolutional layer, a dual-channel Mamba module, a sparse diffusion bridging module, and a fully connected layer. Its construction process includes: The original charge-discharge data is up-projected using a one-dimensional convolutional layer to obtain a feature sequence; the feature sequence includes a voltage feature sequence, a current feature sequence, and a temperature feature sequence. The dual-channel Mamba module includes a main channel and an auxiliary channel. The feature sequence after forward scanning is input into the main channel for sequential processing, and the feature sequence after reverse scanning is input into the auxiliary channel for reverse processing. Different Mamba operation sequences are performed on the main channel and the auxiliary channel to obtain the hidden state of the main channel and the hidden state of the auxiliary channel. The hidden states of the main channel, the auxiliary channel, and the temperature feature sequence are input into the sparse diffusion bridging module. The sparse diffusion bridging module calculates the path difference by subtracting the hidden states of the main channel and the auxiliary channel, obtains the diffusion rate based on the temperature feature sequence, and simulates the diffusion bridging process based on the second spatial derivative of the path difference and the diffusion rate, outputting the fused features. The fused features are flattened and then input into a fully connected layer for mapping to obtain the SOC prediction result.

2. The method for predicting the state of charge of distributed energy storage devices based on diffusion bridging as described in claim 1, characterized in that, The feature sequence is subjected to forward scanning and reverse scanning respectively to obtain forward scanning feature sequence and reverse scanning feature sequence, which are then input to the main channel and auxiliary channel respectively.

3. The method for predicting the state of charge of distributed energy storage devices based on diffusion bridging as described in claim 2, characterized in that, Both the main channel and the auxiliary channel include a linear projection, a convolutional layer, an activation layer, a state space model, and a linear projection connected in sequence. The linear projection formula is as follows: in, and They represent the numbers after the projection. The main and auxiliary channel characteristics of the step. Indicates the main channel number The input vector at each time step, Indicates the auxiliary channel number The input vector at each time step, This represents the learnable projection matrix. This represents a learnable bias vector.

4. The method for predicting the state of charge of distributed energy storage devices based on diffusion bridging as described in claim 3, characterized in that, The convolutional layer employs depthwise separable convolution, which is formulated as follows: in, , They represent the convolutional order of the first and second convolutions. Local fusion features of the main channel and local fusion features of the auxiliary channel; The local fusion features of the main channel are input into the state space model of the main channel, and the local fusion features of the auxiliary channel are input into the state space model of the auxiliary channel, as follows: in, Indicates the first The hidden state of the main channel at each time step Indicates the first The hidden state of the main channel at each time step Indicates the first The hidden state of the auxiliary channel at each time step. Indicates the first The hidden state of the auxiliary channel at each time step. This represents the discretized continuous state transition matrix. This represents the discretized continuous-time input matrix.

5. The method for predicting the state of charge of distributed energy storage devices based on diffusion bridging as described in claim 1, characterized in that, The formula for calculating the diffusion rate is: in, This indicates the diffusion rate controlled by the temperature characteristic sequence. This represents the activation function. Represents the weight matrix. This represents the bias vector.

6. The method for predicting the state of charge of distributed energy storage devices based on diffusion bridging as described in claim 1, characterized in that, The continuous diffusion bridging equation is discretized, and a sparse selection attention mechanism is incorporated during the discretization process. The formula is as follows: in, express Discretization characteristics of time-sparse diffusion bridging modules express Discretization characteristics of time-sparse diffusion bridging modules Indicates the time step. This indicates the diffusion rate controlled by the temperature characteristic sequence. The second spatial derivative represents the path difference. Represents the state transition matrix. express Sparse attention matrix at each time step.

7. The method for predicting the state of charge of distributed energy storage devices based on diffusion bridging as described in claim 1, characterized in that, A negative feedback structure is designed for the diffusion-bridged dual-channel Mamba model. The SOC estimation result calculated by the ampere-hour integral of the physical model is fused and corrected with the SOC prediction result output by the diffusion-bridged dual-channel Mamba model to obtain the final SOC result. During the fusion correction process, a Bayesian neural network is used to evaluate the SOC prediction results output by the dual-channel Mamba model based on diffusion bridging to determine its accuracy.

8. A state-of-charge prediction system for distributed energy storage devices based on diffusion bridging, characterized in that, include: The data acquisition module is configured to acquire raw charge and discharge data from the energy storage device. The SOC prediction module is configured to input the raw charge and discharge data into a diffusion-bridged dual-channel Mamba model for processing to obtain the SOC prediction result. The dual-channel Mamba model based on diffusion bridging includes a one-dimensional convolutional layer, a dual-channel Mamba module, a sparse diffusion bridging module, and a fully connected layer. Its construction process includes: The original charge-discharge data is up-projected using a one-dimensional convolutional layer to obtain a feature sequence; the feature sequence includes a voltage feature sequence, a current feature sequence, and a temperature feature sequence. The dual-channel Mamba module includes a main channel and an auxiliary channel. The feature sequence after forward scanning is input into the main channel for sequential processing, and the feature sequence after reverse scanning is input into the auxiliary channel for reverse processing. Different Mamba operation sequences are performed on the main channel and the auxiliary channel to obtain the hidden state of the main channel and the hidden state of the auxiliary channel. The hidden states of the main channel, the auxiliary channel, and the temperature feature sequence are input into the sparse diffusion bridging module. The sparse diffusion bridging module calculates the path difference by subtracting the hidden states of the main channel and the auxiliary channel, obtains the diffusion rate based on the temperature feature sequence, and simulates the diffusion bridging process based on the second spatial derivative of the path difference and the diffusion rate, outputting the fused features. The fused features are flattened and then input into a fully connected layer for mapping to obtain the SOC prediction result.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the method for predicting the state of charge of a distributed energy storage device based on diffusion bridging as described in any one of claims 1-7.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the method for predicting the state of charge of a distributed energy storage device based on diffusion bridging as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Energy storage equipment charging state prediction method and system based on gating fusion and attention mechanism

    CN119807824A

  • Sodium battery life prediction method based on TCN-Mama neural network

    CN120742117A