A Multi-Layer Dynamic Trusted Weight Cooperative Adjustment Method Based on Battery State Awareness
By adopting a multi-layer dynamic credible weight collaborative adjustment method based on battery state awareness, and combining LSTM and Attention modules, a credible factor is dynamically generated, which solves the accuracy and stability problems of existing SOC estimation methods under complex working conditions, and realizes the adaptive collaboration and interpretability improvement of the model.
Patent Information
- Application Number
- CN202611487105.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-23
- Publication Date
- 2026-11-10
AI Technical Summary
Existing SOC estimation methods lack accuracy, stability, and interpretability under complex operating conditions. Fixed-weight fusion cannot dynamically adjust the model's credibility and lacks synergistic effects from physical state feedback and data features.
A multi-layer dynamic trustworthy weight collaborative adjustment method based on battery state awareness is adopted. The physical layer SOC value is obtained by the ampere-hour integral method. The data is processed by combining LSTM and Attention modules to dynamically generate trustworthy factors. A dynamic trustworthy factor network is constructed to adjust the loss, thereby realizing the adaptive collaboration between the physical and data models.
It improves the accuracy and stability of SOC estimation under complex operating conditions, enhances the interpretability and adaptability of the model, and can dynamically select more reliable information sources based on the real-time battery status, thereby improving the model training effect.
Smart Images

Figure CN123066587A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to new energy batteries and neural networks, specifically to a multi-layer dynamic reliable weight collaborative adjustment method based on battery state perception. Background Technology
[0002] With the development of new energy vehicles and energy storage systems, the state of charge (SOC) of a battery, as a crucial parameter of the battery management system, is of great significance for the safe operation and energy management of batteries. Currently, SOC estimation methods mainly include the ampere-hour integration method and data-driven methods. The ampere-hour integration method suffers from problems such as initial error accumulation and capacity decay; deep learning methods such as LSTM can learn the nonlinear variation law of batteries, but they rely on training data, lack physical constraints, and are prone to prediction bias under complex operating conditions.
[0003] Existing physical-data fusion SOC estimation methods typically fuse ampere-hour integral results and neural network predictions using fixed weights or simple weighting, failing to dynamically adjust the reliability of different models based on real-time battery status. Furthermore, existing attention mechanisms primarily learn weights automatically based on data features, lacking physical state feedback adjustment and failing to fully leverage the synergistic effect of physical information and data features. Additionally, existing joint loss functions usually employ a fixed-weighted summation of multiple loss terms, lacking a dynamic coordination mechanism between constraints and failing to adjust the importance of physical, data, and fusion constraints based on operational status. Therefore, existing SOC estimation methods still suffer from insufficient accuracy, stability, and interpretability under complex operating conditions.
[0004] To address the above problems, this invention proposes a multi-layer dynamic trusted weight collaborative adjustment method based on battery state awareness. Summary of the Invention
[0005] The purpose of this invention is to address the limitations of existing technologies by proposing a multi-layer dynamic trusted weight collaborative adjustment method based on battery state perception.
[0006] The present invention adopts the following technical solution: This invention provides a multi-layer dynamic reliable weight collaborative adjustment method based on battery state awareness, characterized in that the method includes the following steps: S1. Acquire battery data, including battery current, voltage, and temperature; S2. The SOC of the battery is obtained using the ampere-hour integration method and denoted as SOC. AH This provides a physical-level SOC value assessment for the model; S3. Window the data obtained from S1 and S2 to obtain a SOC with the same length as the prediction results. AHWindowed data and input feature X; S4. Normalize the input feature X; S5. The normalized input feature X is processed by the physical Attention module to obtain the feature weights of current, voltage and temperature in the data; S6. The input feature X after normalization in S4 is subjected to weighted processing based on the physical credibility factor to obtain X', wherein the physical credibility factor is a factor used to characterize the credibility of physical information obtained through a dynamic credibility factor network; S7. Input X' into an LSTM module that includes multiple LSTM layers, each of which includes a cell state, a forget gate, an input gate, and an output gate; The output of the S8.LSTM module is fed into the data-level Attention module to capture the weights W of the intermediate states of the data model. T The Attention module includes a Linear layer and a Softmax layer. S9. Using the weight W T The output of the LSTM module in S7 is weighted by a confidence factor based on the data model to obtain the context feature vector h' of the data intermediate state enhancement; S10. The context feature vector h' is input to the prediction output layer of the data model. This prediction output layer consists of multiple linear layers and ultimately outputs the SOC. LSTMAttention value; S11. Process the SOC after S3. AH SOC obtained from S10 LSTMAttention The final SOC evaluation value is obtained through physical dynamic credibility factor and data dynamic credibility factor. ; S12. Window the SOC after S3. AH X' obtained in S6, h' obtained in S9, and SOC obtained in S10 LSTMAttention Value and S11 obtained The value is input into the dynamic trust factor α network to obtain α; S13. Based on the data from S11-S12, obtain the joint loss function Loss as the loss function for the weight matrix and bias term in the LSTM layer of the offline training phase S7. S14. Combine the battery current, voltage, and temperature data obtained in S1 with the SOC data obtained in S2. AH Value, feature weights obtained in S5, and weights W obtained in S8 T SOC acquired by S10 LSTMAttention The α obtained from S12 is input to the interpretation and analysis module, and the interpretation and analysis module outputs the SOC evaluation interpretation report.
[0007] Furthermore, step S5 includes obtaining the feature weights W of the final output of the physical Attention module. F: W ℱ b is the weight matrix of the Linear layer within the physical Attention module. ℱ σ is the bias term corresponding to the Linear layer, and σ is the Sigmoid activation function that takes the data processed by the Linear layer as input.
[0008] Furthermore, the formula for obtaining X' through weighted processing in step S6 is:
[0009] in, The physical credibility factor is obtained through a dynamic credibility factor network.
[0010] Furthermore, step S7 satisfies the following conditions: Forgotten Gate: Where k is the sampling time of the current evaluation, and each sampling time has a sliding window size. W represents the time step within the sliding window corresponding to the current sampling time. f and b f These represent the weight matrix and bias term of the forget gate, respectively. Let's consider the hidden layer state at time k and time step t-1. σ is the input at time step t at time k; σ is the Sigmoid activation function; Input Gate: W i and b i W represents the weight matrix and bias term of the input gate, respectively; C and b C These represent the weight matrix and bias term of the candidate cell state, respectively; Detailed status update: This represents the detailed state at time step t-1; Output gate: Let W be the hidden layer state at time k and time step t. o and bo These represent the weight matrix and bias term of the output gate, respectively. t is the output value of the output gate; tanh is the hyperbolic tangent activation function.
[0011] Furthermore, the output value of step S8 satisfies: Among them, e t W is the output value of the Linear layer at time t. a b represents the weight matrix of the Linear layer in the data attention layer. a Represents the bias term, β t (k) represents the intermediate state weights of the data model obtained by the Attention module at time step t at time k. This is the size of the sliding window.
[0012] Furthermore, step S9 satisfies Where h' is the context feature vector for data intermediate state enhancement. ,in This represents the total number of samples at the sampling points. The dynamic credibility factor for the data is also obtained through the dynamic credibility factor network.
[0013] Furthermore, SOC assessment value satisfy: , It is the physical dynamic reliability factor at the k-th sampling time.
[0014] Furthermore, step S12 satisfies: Input feature construction formula: Alpha network first layer: W1 and b1 represent the weight matrix and bias term of the first layer, respectively; Alpha network second layer: W2 and b2 represent the weight matrix and bias term of the second layer, respectively; ReLU is the corrected linear unit. Physical dynamic credibility factor: W phy and b phy These represent the weight matrix and bias term of the physical dynamic credibility factor, respectively; Data dynamic reliability factor: W data and b data These represent the weight matrix and bias term of the data dynamic reliability factor, respectively; Loss-adjusted dynamic credibility factor: in, , ,and , Indicates the physical consistency loss weight. This indicates data-driven loss weights. W represents the weight of fusion consistency loss. loss and b loss s1 and s2 represent the weight matrix and bias term of the loss-adjusted dynamic credibility factor, respectively; s1 represents the physical consistency loss score, s2 represents the data-driven loss score, and s3 represents the fusion consistency loss score; Softmax represents the normalized exponential function. Final network output: .
[0015] Furthermore, step S13 satisfies: Fixed prior weights for physical consistency constraints; Fixed prior weights for data-driven loss; : Fixed prior weights for learning constraints in dynamic trust factor networks; : Fixed prior weights for fusion consistency loss; : Fixed prior weights of the credibility factor that change continuously and smoothly; The final fusion SOC loss is calculated using the following formula: Among them, SOC true The true SOC value is given, and the mean square error is given. The formula for the physical residual collaborative loss is as follows: SOC Final (k) is the SOC evaluation value at the k-th sampling time, SOC Final (k-1) is the SOC evaluation value at the (k-1)th sampling time, SOCAH (k) represents the SOC evaluation value using the ampere-hour integration method at the k-th sampling time, where SOC AH (k-1) represents the SOC evaluation value using the ampere-hour integration method at the (k-1)th sampling time; The collaborative loss based on the data-driven model is formulated as follows: The SOC evaluation value based on the data-driven method at the k-th sampling time is... is the SOC evaluation value based on the data-driven method at the (k-1)th sampling time; N is the total number of samples participating in the dynamic trust factor network calculation; L α The dynamic credibility factor loss is calculated using the following formula: in, This represents the true value at the k-th sampling time. The target is the dynamic reliability factor of the data at the k-th sampling time. Let be the physical branch credibility factor target at the k-th sampling time. Let k be the dynamic reliability factor of the data at the k-th sampling time. Let be the physical branch confidence factor at the k-th sampling time, and ε be a parameter to prevent the denominator from being zero. For dynamic credibility factor loss function; The specific formula for the consistency and coordination loss is as follows: in, This represents the fused SOC recalculated based on the dynamic reliability factor at the k-th sampling time; L α−smooth The α-smoothing constraint loss is given by the following formula: in, Let k be the dynamic reliability factor of the data at the k-th sampling time. Let be the physical branch confidence factor at the k-th sampling time. The dynamic reliability factor of the data at the (k-1)th sampling time is... is the physical branch confidence factor at the (k-1)th sampling time.
[0016] The beneficial effects achieved by this invention are: This invention constructs a dynamic credibility factor network to adaptively generate dynamic credibility factors, thereby dynamically adjusting the training and optimization process. Simultaneously, it addresses the issue of user or technical personnel's understanding of the evaluation process, making the fused model acceptable. This framework aims to enhance physical-data fusion models and endow them with interpretability.
[0017] This invention adaptively generates dynamic data credibility factors, physical branch credibility factors, and loss adjustment dynamic credibility factors based on the real-time operating status of the battery, physical feature information, data-driven features, and model prediction results. This enables dynamic adjustment of the contributions of the physical model, the data model, and the training optimization process. By using credibility factors to coordinate the adjustment of physical attention and data attention, the model can dynamically select more reliable information sources according to different operating conditions.
[0018] This invention achieves joint optimization between physical constraints, data features, and fusion results by combining a dynamic collaborative loss function.
[0019] To further understand the features and technical content of the present invention, please refer to the following detailed description and drawings of the present invention. However, the drawings provided are for reference and illustration only and are not intended to limit the present invention. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of the process of the present invention; Figure 2 This is an evaluation effect diagram of the present invention; Figure 3 These are comparative effect diagrams of the embodiments; Figure 4 The example shows a single-point effect diagram output by the analysis and explanation module. Figure 5 This is a flowchart illustrating the analysis and explanation module in the embodiment. Detailed Implementation
[0021] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can understand the advantages and effects of the present invention from the content disclosed in this specification. The present invention can be implemented or applied through other different specific embodiments, and various details in this specification can also be modified and changed based on different viewpoints and applications without departing from the spirit of the present invention. Furthermore, the accompanying drawings of the present invention are for simple illustrative purposes only and are not depictions of actual dimensions; this is stated in advance. The following embodiments will further describe the relevant technical content of the present invention in detail, but the disclosed content is not intended to limit the scope of protection of the present invention.
[0022] Example 1: As Figure 1 As shown, this invention provides a multi-layer dynamic reliable weight collaborative adjustment method based on battery state awareness, characterized in that the method includes the following steps: S1. Obtain battery data including battery current (A) and voltage (V), as well as temperature (°C); S2. The SOC of the battery is obtained using the ampere-hour integration method and denoted as SOC. AH This provides a physical-level SOC value assessment for the model; S3. Window the data obtained from S1 and S2 to obtain a SOC with the same length as the prediction results. AH Windowed data and input feature X; S4. Normalize the input feature X; S5. The normalized input feature X is processed by the physical Attention module to obtain the feature weights of current, voltage and temperature in the data; S6. The input feature X after normalization in S4 is subjected to weighted processing based on the physical credibility factor to obtain X', wherein the physical credibility factor is a factor used to characterize the credibility of physical information obtained through a dynamic credibility factor network; S7. Input X' into an LSTM module that includes multiple LSTM layers, each of which includes a cell state, a forget gate, an input gate, and an output gate; The output of the S8.LSTM module is fed into the data-level Attention module to capture the weights W of the intermediate states of the data model. T The Attention module includes a Linear layer and a Softmax layer. S9. Using the weight W T The output of the LSTM module in S7 is weighted by a confidence factor based on the data model to obtain the context feature vector h' of the data intermediate state enhancement; S10. The context feature vector h' is input to the prediction output layer of the data model. This prediction output layer consists of multiple linear layers and ultimately outputs the SOC.LSTMAttention value; S11. Process the SOC after S3. AH SOC obtained from S10 LSTMAttention The final SOC evaluation value is obtained through physical dynamic credibility factor and data dynamic credibility factor. ; S12. Window the SOC after S3. AH X' obtained in S6, h' obtained in S9, and SOC obtained in S10 LSTMAttention Value and S11 obtained The value is input into the dynamic trust factor α network to obtain α; S13. Based on the data from S11-S12, obtain the joint loss function Loss as the loss function for the weight matrix and bias term in the LSTM layer of the offline training phase S7. S14. Combine the battery current, voltage, and temperature data obtained in S1 with the SOC data obtained in S2. AH Value, feature weights obtained in S5, and weights W obtained in S8 T SOC acquired by S10 LSTMAttention The α obtained from S12 is input to the interpretation and analysis module, and the interpretation and analysis module outputs the SOC evaluation interpretation report.
[0023] The sampling time interval (s) and the initial SOC of the battery are known by default. The initial SOC is obtained by using the open circuit voltage (OCV) characteristic curve of the battery to obtain the OCV table for a specific SOC point (e.g., 30% SOC corresponds to voltage wEnergyPct30Volt, 80% SOC corresponds to voltage wEnergyPct80Volt, empty charge 2.5V, full charge 3.6V). Before the battery leaves the factory, it undergoes an aging test (first fully charged, then discharged to the characteristic voltage), and then the open circuit voltage at this time is compared with its corresponding SOC, which is the initial SOC value.
[0024] Furthermore, the specific formula for SOC value evaluation is as follows: in, Let k be the battery current at sampling time k. The sampling time interval, excluding the initial SOC calculation. AH Besides using the initial SOC, the remaining SOCs AH All calculations will be performed at the last SOC. AHAs the initial SOC, Cn represents the rated battery capacity, which can be obtained by performing a complete charge-discharge test on the battery pack according to specified standard test conditions. The actual measured discharge capacity is used as the rated capacity and serves as the initial capacity parameter for the BMS. For example, under specified temperature and rate conditions, the discharge capacity measured from full charge to cutoff voltage is used as the basis for capacity calibration. This ah integration method (ampere-hour integration method) can be used in conjunction with OCV boundary calibration to obtain specific OCV points of 5%, 20%, or 80%, generating corresponding flag bits. For example, if the voltage of the smallest cell in the battery remains below 5% of the voltage corresponding to the specific OCV point for 10 seconds, a flag bit fSoxStatus.bits.SocLess05Pct == true is generated. When obtaining SOC using ah integration during continuous charge-discharge, these flag bits can be used for calibration.
[0025] Among them, SOC AH Windowing is used to align the data to the length of the final prediction result, facilitating subsequent LOSS value calculation and final SOC value evaluation. Battery current, voltage, and temperature are windowed to preserve time information as input X to the method.
[0026] like Figure 2 As shown, Figure 2 To evaluate the general effectiveness of this adjustment method, the weights of the data model and the physical model at the current sampling point can be automatically adjusted to effectively improve the SOC evaluation accuracy of the model. Here, True SOC refers to the actual SOC, Fusion SOC to the fusion SOC, LSTM-Attention SOC to the data model SOC, and AHSOC to the physical method SOC. The result of the physical method SOC is the SOC value obtained by the ampere-hour integration method. AH This is step S2. The SOC result of the data model is mainly evaluated by the SOC results of the LSTM and Attention modules, i.e., step S10.
[0027] exist Figure 2 In general, the advantages of the proposed method cannot be well demonstrated, such as... Figure 3 As shown, Figure 3 The evaluation performance of this method under an extreme condition is presented. When both the data model and the physical model are inaccurate, this method can maintain the evaluation accuracy of the algorithm in most cases by dynamically adjusting the factors.
[0028] For example, if there are 1000 data points and the window size of this invention is 50, then the battery current, voltage, and temperature are windowed, and data points 1 to 50 are selected as input X. The size of X is (50, 3), that is, 50 rows and 3 columns. Data points 2 to 51 are then selected sequentially as the second input. And SOC...AH Window the selection and only select the SOC corresponding to row 50. AH The value is the SOC obtained by the ampere-hour integration method under this window. AH Therefore, SOC AH The value is (, 1). Additionally, the other methods have 950 data entries. It's worth explaining that the model is trained in batches, with X's size being (batch size, 50, 3) during training, while the batch size is set to 1 during testing or actual use.
[0029] Furthermore, normalizing the input feature X can improve the efficiency of subsequent model fitting. The specific normalization formula is as follows: The recursive calculation in step S2 is performed point-by-point across the entire window. Step S3 extracts the value at the end of the window (the 50th point) as the SOC_AH representation of that window. In actual deployment, the SOC output of the first 50 points is obtained and displayed through ampere-hour integration. min and X max These are the minimum and maximum values in the training data, respectively. The training data consists of pre-stored experimental data from different batteries of the same type in the past.
[0030] Furthermore, step S5 includes obtaining the feature weights W of the final output of the physical Attention module. F: W ℱ b is the weight matrix of the Linear layer within the physical Attention module. ℱ For the bias term corresponding to the Linear layer, σ is the Sigmoid activation function using the data processed by the Linear layer as input. The feature weights obtained in step S5 allow the model to understand the importance of the corresponding parameters and provide a basis for subsequent interpretation and analysis modules. These physical weights will provide a physical explanation for subsequent interpretation and analysis modules, and will also serve as input values for the next module.
[0031] During the initial training, the model randomly initializes a weight matrix. Then, during training, it continuously calculates the loss function and uses backpropagation to determine the impact of each weight element on the loss function. The weight matrix is then updated using gradient descent. Similarly, the bias term is updated. Neural networks utilize data to continuously update their internal weights and biases, storing the weights and biases that minimize the loss. Gradient descent updates can also be called optimization update mechanisms, commonly including Adam and SGD. The specific values of the weight matrix and the updates performed in each gradient descent iteration are all handled automatically by the program.
[0032] σ is the Sigmoid activation function, which can adaptively recalibrate the data processed by the Linear layer to generate physical weights between 0 and 1. The mathematical formula for the activation function is as follows: Where x represents the data processed by the Linear layer.
[0033] In step S6, the effective physical state information is adjusted for physical credibility. Physical credibility is incorporated into the feature selection process, allowing the model to dynamically determine the relative importance of physical information. This process enables the model to learn which physical input features are more important and require reinforcement, and which features should be discarded. The specific formula is as follows: in, The physical credibility factor is obtained through a dynamic credibility factor network.
[0034] The LSTM module in step S7 primarily provides a neural network-level evaluation based on data processing for the SOC evaluation method of this invention. The LSTM layer consists of cell states, a forget gate, an input gate, and an output gate, with the specific mathematical expressions as follows: Forgotten Gate: Where k is the sampling time of the current evaluation, and each sampling time has a sliding window size. This is the calculation formula for an LSTM unit within a single sampling time (one sliding window size) corresponding to the current sampling time. Assuming the window size is 50, W f and b f These represent the weight matrix and bias term of the forget gate, respectively. Let's consider the hidden layer state at time k and time step t-1. σ is the input at time step t at time k; σ is the Sigmoid activation function; Input Gate: W i and b i W represents the weight matrix and bias term of the input gate, respectively; C and b C These represent the weight matrix and bias term of the candidate cell state, respectively; Detailed status update: This represents the detailed state at time step t-1; (both the detailed state and the initial values of the hidden layer are all zero vectors). Output gate: Let W be the hidden layer state at time k and time step t. o and b o These represent the weight matrix and bias term of the output gate, respectively. t is the output value of the output gate; tanh is the hyperbolic tangent activation function. t The input is the output data after data preprocessing (normalization and windowing) and physical attention. t This is the output value of the forget gate. The updated cell unit includes: retained old memories + newly written information. The output gate determines which parts of the current long-term memory should be output. h t Let be the hidden layer state at time step t. The meaning of the function exp(x): exp(x) = e x βt is the output of the Softmax layer at time t.
[0035] tanh is the hyperbolic tangent activation function, which compresses the input information to between -1 and 1 and performs a nonlinear transformation. The specific formula is as follows: in, is a natural constant, approximately 2.71828, and x is the output value of the tanh activation function.
[0036] The output value of step S8 satisfies: Among them, e t W is the output value of the Linear layer at time t. a b represents the weight matrix of the Linear layer in the data attention layer. a Represents the bias term, β t (k) represents the intermediate state weights of the data model obtained by the Attention module at time step t at time k. The sliding window size is set, and the intermediate state weights W of the data model obtained by the Attention module at a single time step are set. T The range is [β1, β2, ...]. ..,β T ].
[0037] After processing by the LSTM layer in step 7, h will be obtained. =[h1 h2 , . ..,h 50 ], where 50 is the initial window size. h The data is further fed into the Attention module at the data layer, which captures the weights of intermediate states in the data model and determines their importance. The data Attention module includes a Linear layer and a Softmax layer. The meaning of the exp(x) function: exp(x) = e x The intermediate state weights W of the data model obtained by the Attention module at a single time step are set. T [β1,β2,...,β] 50 Similarly, this weight will also provide the data model-level explanation basis for the subsequent interpretation and analysis module, and provide information for the subsequent output module.
[0038] Step S9 satisfies the following: the h data processed in step 7 needs to undergo confidence factor weighting based on the data model, using the WT obtained by the data Attention module in step 8 for weighting.
[0039] Where h' is the context feature vector for data intermediate state enhancement, h' is the context feature vector for data intermediate state enhancement. ,in The total number of samples at the sampling points. It is a data model-based weighted processing of credibility factors, namely dynamic data credibility factors, which are also obtained through a dynamic credibility factor network.
[0040] Step S11: Process the SOC from step 3. AH and the SOC obtained in step 10 LSTMAttention The final SOC evaluation value of this method is obtained through dynamic credibility factors of physical and data aspects. : Step S12 satisfies the input feature construction formula: Alpha network first layer: W1 and b1 represent the weight matrix and bias term of the first layer, respectively; Alpha network second layer: W2 and b2 represent the weight matrix and bias term of the second layer, respectively; ReLU is the corrected linear unit. Physical dynamic credibility factor: W phy and b phy These represent the weight matrix and bias term of the physical dynamic credibility factor, respectively; Data dynamic reliability factor: W data and b data These represent the weight matrix and bias term of the data dynamic reliability factor, respectively; Loss-adjusted dynamic credibility factor: in, , ,and , Indicates the physical consistency loss weight. This indicates data-driven loss weights. W represents the weight of fusion consistency loss. loss and b loss s1 and s2 represent the weight matrix and bias term of the loss-adjusted dynamic credibility factor, respectively; s1 represents the physical consistency loss score, s2 represents the data-driven loss score, and s3 represents the fusion consistency loss score; Softmax represents the normalized exponential function. Final network output: .
[0041] The loss-adjusting dynamic reliability factor consists of a Linear layer and a Softmax layer. The input dimension of the Linear layer is 64, the output dimension of the second layer, and the output dimension is 3. Therefore, s loss =[s1,s2,s3]. The Softmax layer is used to output the final loss adjustment dynamic confidence factor α. loss And establish a relative weight distribution among the three Loss values, namely α. loss The credibility factor for physical, data, and capacity losses within the system is 1.
[0042] ReLU stands for Modified Linear Unit: ReLU(x) = max(0,x), where x is the input of the Modified Linear Unit. Z represents the input features.
[0043] Unlike traditional fixed-weight fusion methods, this dynamic credibility factor network can adaptively adjust the participation level of different information sources based on the real-time battery operating status, the differences between the physical model and the data model output, and the feedback information from the fusion results. This achieves dynamic collaboration across the entire process from the feature extraction layer and the SOC fusion layer to the model optimization layer, improving the accuracy, stability, and generalization ability of SOC estimation under complex operating conditions. α_phy is the credibility factor at the physical level, used to capture the importance of physical information such as current, voltage, and temperature ampere-hour integral. α_data is the credibility factor at the data model level, used for reliability assessment of the data-driven model. Training data should cover different battery types, different SOH aging stages, and typical operating conditions such as different temperatures, SOCs, and charge / discharge rates. In principle, it should cover the complete degradation process from a new battery to a significantly aged state. Regarding data volume, it is recommended to include at least dozens of batteries and hundreds to thousands of charge / discharge cycles, forming tens of thousands of time-series samples. Fixed prior weights and dynamic state adjustment factors are introduced to adjust the above constraints to mitigate the impact of erroneous models. The model optimization objective is not simply to follow any sub-model, but to comprehensively utilize information from both the physical and data models under label supervision. When the reliability of a model decreases under specific operating conditions or aging states, its corresponding constraint weights are also weakened, thereby reducing the impact of erroneous information on the fusion result.
[0044] Furthermore, step S13 satisfies: The fixed prior weights of the physical consistency constraints represent the importance of the trained model to the physical consistency constraints. Their size (0-1) is manually set to control the basic strength of the physical consistency constraints. The fixed prior weights of the data-driven loss are manually set (0-1) to control the basic strength of the data-driven constraints. The fixed prior weights of the dynamic trust factor network learning constraints are manually set (0-1) to control the supervision strength of the dynamic trust factor. The fixed prior weights of the fusion consistency loss are manually set (0-1) to control the basic strength of the fusion consistency constraints. The continuous and smooth change of the confidence factor is achieved by setting a fixed prior weight (0-1) manually to control the strength of the smooth constraint on the confidence factor. The final fusion SOC loss is calculated using the following formula: Among them, SOC trueThe true SOC value is given, and MSE represents the average error. SOCtrue does not refer to the SOC directly measurable by sensors during actual operation, but rather a high-precision reference SOC used for model training and performance evaluation. Under experimental conditions, current, voltage, and time data are collected through a battery experimental platform, and the reference SOC is obtained using a fully calibrated coulomb integration method. Simultaneously, the actual battery capacity is calibrated using a complete charge-discharge capacity test, thus obtaining a high-precision SOC reference value for training and testing.
[0045] In practical applications, since the true SOC cannot be directly measured, the model only uses real-time available information such as current, voltage, and temperature to estimate the SOC, without relying on the true SOC. The formula for the physical residual collaborative loss is as follows: SOC Final (k) is the SOC evaluation value at the k-th sampling time, SOC Final (k-1) is the SOC evaluation value at the (k-1)th sampling time, SOC AH (k) represents the SOC evaluation value using the ampere-hour integration method at the k-th sampling time, where SOC AH (k-1) represents the SOC evaluation value using the ampere-hour integration method at the (k-1)th sampling time; The collaborative loss based on the data-driven model is formulated as follows: The SOC evaluation value based on the data-driven method at the k-th sampling time is... is the SOC evaluation value based on the data-driven method at the (k-1)th sampling time; N is the total number of samples participating in the dynamic trust factor network calculation; the value range is related to the number of sampling points in the entire input dataset; L α The dynamic credibility factor loss is calculated using the following formula: in, This represents the true value at the k-th sampling time. The target is the dynamic reliability factor of the data at the k-th sampling time. Let be the physical branch credibility factor target at the k-th sampling time. Let k be the dynamic reliability factor of the data at the k-th sampling time. Let be the physical branch confidence factor at the k-th sampling time, ε be a parameter to prevent the denominator from being zero, and ε be a parameter, since e AH + It may be 0; this smoothing term prevents the denominator from being zero. Typically, this number is set to be extremely small, such as ε = 1e−6. This is the dynamic credibility factor loss function.
[0046] The specific formula for the consistency and coordination loss is as follows: The joint loss function is used only during offline training to update network parameters through backpropagation and does not participate in online SOC estimation after model deployment. This represents the fused SOC recalculated based on the dynamic reliability factor at the k-th sampling time; L α−smooth The α-smoothing constraint loss is given by the following formula: in, Let k be the dynamic reliability factor of the data at the k-th sampling time. Let be the physical branch confidence factor at the k-th sampling time. The dynamic reliability factor of the data at the (k-1)th sampling time is... is the physical branch confidence factor at the (k-1)th sampling time.
[0047] The SOC results presentation in step S13 will showcase the SOC... final SOC AH and SOC LSTMAttention All results will be printed out.
[0048] This embodiment constructs a dynamic credibility factor network to adaptively adjust the contribution ratio of the physical model and the data-driven model, avoiding estimation bias caused by traditional fixed-weight fusion and improving the accuracy and stability of SOC estimation under complex operating conditions. Through the coordinated adjustment of physical attention and data attention, the model can dynamically select more reliable information sources based on the real-time battery status, enhancing the synergy between physical laws and data features. A dynamic loss adjustment mechanism automatically adjusts the importance of physical constraints, data constraints, and fusion constraints according to the operating state, improving model training performance. Furthermore, this embodiment can output the credibility levels of different models, improving the interpretability and transparency of the SOC estimation process and enhancing the model's adaptability to different operating conditions and battery aging states.
[0049] Example 2: This example should be understood as including at least all the features of any of the foregoing examples, and further improving upon them; Fusion Decision Interpretation: The system performs a logical judgment based on the value of α. If the α value is greater than 0.7, the SOC value evaluated by the neural network is considered more accurate; if it is less than 0.3, the evaluation result from the physical calculation is considered more reliable. Otherwise, a joint judgment is made.
[0050] Feature and temporal attention interpretation and operating condition interpretation: Feature interpretation multiplies the current, voltage, and temperature data from step 1 element-wise with the feature weights captured in step 5 (similar to step 6), resulting in an array of size (1,3) ranging from 0 to 1. This array represents the current model's emphasis on the input features. The analysis and interpretation module reads this array and converts it into the corresponding interpretation language output. For example... Figure 4 The image shown is a single-point output diagram from the analysis and interpretation module.
[0051] For example: [current, voltage, temperature] -> [0.8, 0.15, 0.25]. The larger the value, the more important it is.
[0052] Furthermore, the temporal interpretation process weights the hidden layer data obtained in step 7 and the temporal features obtained in step 8 to obtain an importance array of 50 time points. The sum of these 50 data points in the array is 1 (similar to step 9). Similarly, the interpretation and analysis module reads this array data and converts it into the corresponding interpretation language output.
[0053] Operating Condition Interpretation: The interpretation and analysis module reads the current, voltage, and temperature data obtained in step 1, and provides a judgment for model evaluation by analyzing the data changes in the current window.
[0054] like Figure 5 The diagram shows a flowchart of a SOC evaluation and interpretation algorithm based on dynamic credibility factors, specifically a flowchart of the analysis and interpretation module. From start to finish, it includes the following steps: The process begins at the start node, first executing step 1 to initialize the SOC interpretation and analysis module. Next, step 2 is executed to obtain the current sampling point information. Then, step 3 is executed to output the current SOC evaluation results, including SOC_final, SOC_AH, SOC_LSTM, and the dynamic credibility factor α.
[0055] Then, proceed to step 4, interpreting the model's credibility based on the dynamic credibility factor. This is divided into three decision branches. The first branch, when α is greater than 0.7, shifts to a branch that relies more on the data-driven model, concluding that the cumulative error risk of battery integration is high. The second branch, when α is less than 0.3, shifts to a branch that relies more on the ampere-hour integration method, concluding that the AH integration result is consistent with the predicted trend, satisfying the law of energy conservation. The third branch, when α is between 0.3 and 0.7, adopts a joint fusion strategy.
[0056] Next, we proceed to step 5, the interpretation of physical contributions. We obtain the physical weights at the current time step, utilize the physical feature weights obtained from the Attention module, and output the input feature with the greatest impact.
[0057] Next, we proceed to step 6, data contribution interpretation. We obtain the time weight of the current moment, calculate key time locations and the maximum time contribution, and interpret the contribution of historical sampling points of the LSTM model to SOC prediction.
[0058] Then proceed to step 7, battery operating status explanation. Obtain current operating parameters, including current, voltage, and temperature. First, determine if the current is greater than the threshold. If yes, the output battery is in a charging state; if no, the output battery is in a discharging state. Next, determine if the temperature is greater than 45 degrees Celsius. If yes, the output temperature is high, posing a risk of heat load; if no, continue to determine if the temperature is lower than 10 degrees Celsius. If yes, the output temperature is low, indicating decreased battery activity; if no, the output temperature is within the normal range. Then, determine if the voltage is lower than 45 volts. If yes, the output voltage is low, possibly in a low SOC region; if no, continue to determine if the voltage is higher than 55 volts. If yes, the output voltage is high, possibly in a high SOC state or charging phase; if no, the output voltage is within the normal operating range.
[0059] Finally, the process proceeds to step 8, outputting a complete SOC intelligent assessment and interpretation report, and then reaches the end node.
[0060] Analysis and explanation module pseudocode: Algorithm: SOC Intelligent Evaluation Result Interpretation Algorithm enter: index Current sampling point index The result is the output of the physical-data fusion model (soc_final, soc_lstm, soc_ah, and dynamic credibility factor). raw_data: Raw battery operating data (current, voltage, and temperature). Output: SOC Assessment Explanation Report Begin 1. Initialize the SOC evaluation and interpretation module 2. Obtain the SOC information of the current sampling point. SOC_final ← result["soc_final"][index] SOC_LSTM ← result["soc_lstm"][index] SOC_AH ← result["soc_ah"][index] α ← result["alpha"][index] 3. Output the current SOC evaluation results. Output SOC_final Output SOC_AH Output SOC_LSTM Output dynamic credibility factor α 4. Interpret the model's credibility based on the dynamic credibility factor α. If α > 0.7 Then Determining the current state relies more on the LSTM model Output: There is a significant deviation between the AH integral and the LSTM prediction. The risk of cumulative error in current integration is relatively high. Else If α < 0.3 Then Determining the current state relies more on the AH integral model. Output: The AH integral results are consistent with the predicted trend. Satisfies the law of conservation of electric charge Else The current strategy is determined to be a joint fusion strategy. Output: The reliability of AH integrals is close to that of LSTM. Use dynamic fusion to correct SOC End If 5. Explanation of Physical Contributions If feature_attention exists in the result, then Obtain the feature weights at the current time. Feature_weight ← feature_attention[index] For input features: Current Voltage temperature Output the corresponding contribution weights respectively Maximum contributing feature ← argmax(Feature_weight) Output has the greatest impact on input features End If 6. Data-driven contribution interpretation (the case study mainly focuses on the historical time contribution interpretation of LSTM models) If time_attention exists in the result, then Obtain historical time attention weights Time_weight ← time_attention[index] Key time position ← argmax(Time_weight) Maximum time contribution ← max(Time_weight) Output: Important historical sampling points Contribution to SOC prediction End If 7. Explanation of Battery Operating Status If raw_data existsThen Get current running parameters: Current ← Current current Voltage ← Current Voltage Temperature ← Current temperature / / Current state judgment If Current > 0 Then Output: The battery is charging. Else Output: The battery is in a discharging state. End If / / Temperature status judgment If Temperature > 45℃ Then Output: High temperature, posing a risk of heat load. Else If Temperature < 10℃ Then Output: Lower temperature leads to decreased battery activity. Else Output: Temperature is within normal range End If / / Voltage state judgment If Voltage < 45V Then Output: Voltage is too low, possibly in a low SOC region. Else If Voltage > 55V Then Output: High voltage, possibly indicating high SOC or charging phase. Else Output: Voltage is within normal operating range End If End If 8. Output a complete SOC intelligent assessment and interpretation report. End This embodiment further provides fusion decision interpretation, feature and time attention interpretation, and operating condition interpretation capabilities based on Embodiment 1. By making logical judgments based on the value of the dynamic credibility factor α, it can clearly determine whether the current output relies more on the neural network model, the ampere-hour integral model, or a joint fusion strategy, making the evaluation process more transparent to users and technicians. By converting the input feature weights into readable explanatory language, it can intuitively show the contribution of current, voltage, and temperature to SOC estimation; through time attention interpretation, it can locate the historical sampling points that contribute the most to SOC prediction; through operating condition interpretation, it can combine current, voltage, and temperature to determine whether the battery is currently charging or discharging, whether the temperature is within the normal range, and whether the voltage is in the low or high SOC region. The above explanatory capabilities enhance the acceptability and engineering practicality of the fusion model, making the SOC estimation results not only accurate but also understandable and traceable.
[0061] The present invention has the following advantages: This invention constructs a dynamic credibility factor network to adaptively adjust the contribution ratio of the physical model and the data-driven model, avoiding estimation bias caused by traditional fixed-weight fusion and improving the accuracy and stability of SOC estimation under complex operating conditions. By dynamically adjusting the physical and data attention through the credibility factor, the model can select more reliable information sources based on the real-time battery status, enhancing the synergy between physical laws and data features. Simultaneously, a dynamic loss adjustment mechanism is introduced to automatically adjust the importance of physical constraints, data constraints, and fusion constraints according to the operating state, improving model training performance. Furthermore, this method can output the credibility level of different models, improving the interpretability and transparency of the SOC estimation process and enhancing the model's adaptability under different operating conditions and battery aging states. At the same time, the physical information acquired by the attention model and the intermediate state information based on the data model, along with the credibility factor α, can be fed back to the interpretability layer of the framework for interpretation and analysis, generating an intelligent SOC evaluation report.
[0062] The content disclosed above is only a preferred and feasible embodiment of the present invention, and is not intended to limit the scope of protection of the present invention. Therefore, all equivalent technical changes made based on the content of the present invention specification and drawings are included within the scope of protection of the present invention. Furthermore, the elements therein can be updated as technology develops.
Claims
1. A multi-layer dynamic reliable weight collaborative adjustment method based on battery state awareness, characterized in that, The method includes the following steps: S1. Acquire battery data, including battery current, voltage, and temperature; S2. The SOC of the battery is obtained using the ampere-hour integration method and denoted as SOC. AH This provides a physical-level SOC value assessment for the model; S3. Window the data obtained from S1 and S2 to obtain a SOC with the same length as the prediction results. AH Windowed data and input feature X; S4. Normalize the input feature X; S5. The normalized input feature X is processed by the physical Attention module to obtain the feature weights of current, voltage and temperature in the data; S6. The input feature X after normalization in S4 is subjected to weighted processing based on the physical credibility factor to obtain X', wherein the physical credibility factor is a factor used to characterize the credibility of physical information obtained through a dynamic credibility factor network; S7. Input X' into an LSTM module that includes multiple LSTM layers, each of which includes a cell state, a forget gate, an input gate, and an output gate; The output of the S8.LSTM module is fed into the data-level Attention module to capture the weights W of the intermediate states of the data model. T The Attention module includes a Linear layer and a Softmax layer. S9. Using the weight W T The output of the LSTM module in S7 is weighted by a confidence factor based on the data model to obtain the context feature vector h' that enhances the data intermediate state; S10. The context feature vector h' is input to the prediction output layer of the data model. This prediction output layer consists of multiple linear layers and ultimately outputs the SOC. LSTMAttention value; S11. Process the SOC after S3. AH SOC obtained from S10 LSTMAttention The final SOC evaluation value is obtained through physical dynamic credibility factor and data dynamic credibility factor. ; S12. Window the SOC after S3. AH X' obtained in S6, h' obtained in S9, and SOC obtained in S10 LSTMAttention Value and S11 obtained The value is input into the dynamic trust factor α network to obtain α; S13. Based on the data from S11-S12, obtain the joint loss function Loss as the loss function for the weight matrix and bias term in the LSTM layer of the offline training phase S7. S14. Combine the battery current, voltage, and temperature data obtained in S1 with the SOC data obtained in S2. AH Value, feature weights obtained in S5, and weights W obtained in S8 T SOC acquired by S10 LSTMAttention The α obtained from S12 is input to the interpretation and analysis module, and the interpretation and analysis module outputs the SOC evaluation interpretation report.
2. The multi-layer dynamic reliable weight collaborative adjustment method based on battery state awareness as described in claim 1, characterized in that, Step S5 includes obtaining the feature weights W of the final output of the physical Attention module. F: W ℱ b is the weight matrix of the Linear layer within the physical Attention module. ℱ σ is the bias term corresponding to the Linear layer, and σ is the Sigmoid activation function that takes the data processed by the Linear layer as input.
3. The multi-layer dynamic reliable weight collaborative adjustment method based on battery state awareness as described in claim 2, characterized in that, The formula for obtaining X' through weighted processing in step S6 is: in, The physical credibility factor is obtained through a dynamic credibility factor network.
4. The multi-layer dynamic reliable weight collaborative adjustment method based on battery state awareness as described in claim 3, characterized in that, Step S7 satisfies the following conditions: Forgotten Gate: Where k is the sampling time of the current evaluation, and each sampling time has a sliding window size. W represents the time step within the sliding window corresponding to the current sampling time. f and b f These represent the weight matrix and bias term of the forget gate, respectively. Let k be the hidden layer state at time step t-1. σ is the input at time step t at time k; σ is the Sigmoid activation function; Input Gate: W i and b i W represents the weight matrix and bias term of the input gate, respectively; C and b C These represent the weight matrix and bias term of the candidate cell state, respectively; Detailed status update: For the detailed state at time step t-1; Output gate: Let W be the hidden layer state at time k and time step t. o and b o These represent the weight matrix and bias term of the output gate, respectively. t is the output value of the output gate; tanh is the hyperbolic tangent activation function.
5. The multi-layer dynamic reliable weight collaborative adjustment method based on battery state awareness as described in claim 4, characterized in that, The output value of step S8 satisfies: in, W represents the output value of the Linear layer at time k and time step t. a b represents the weight matrix of the Linear layer in the data attention layer. a Represents the bias term, β t (k) represents the intermediate state weights of the data model obtained by the Attention module at time step t at time k. This is the size of the sliding window.
6. The multi-layer dynamic reliable weight collaborative adjustment method based on battery state awareness as described in claim 5, characterized in that, satisfy Where h' is the context feature vector for data intermediate state enhancement. ,in This represents the total number of samples at the sampling points. The dynamic credibility factor for the data is also obtained through the dynamic credibility factor network.
7. The multi-layer dynamic reliable weight collaborative adjustment method based on battery state awareness as described in claim 6, characterized in that, SOC Assessment Value satisfy , It is the physical dynamic reliability factor at the k-th sampling time.
8. The multi-layer dynamic reliable weight collaborative adjustment method based on battery state awareness as described in claim 7, characterized in that, Step S12 satisfies: Input feature construction formula: Alpha network first layer: W1 and b1 represent the weight matrix and bias term of the first layer, respectively; Alpha network second layer: W2 and b2 represent the weight matrix and bias term of the second layer, respectively; ReLU is the corrected linear unit. Physical dynamic credibility factor: W phy and b phy These represent the weight matrix and bias term of the physical dynamic credibility factor, respectively; Data dynamic reliability factor: W data and b data These represent the weight matrix and bias term of the data dynamic reliability factor, respectively; Loss-adjusted dynamic credibility factor: in, , ,and , Indicates the physical consistency loss weight. This indicates data-driven loss weights. W represents the weight of fusion consistency loss. loss and b loss s1 and s2 represent the weight matrix and bias term of the loss-adjusted dynamic credibility factor, respectively; s1 represents the physical consistency loss score, s2 represents the data-driven loss score, and s3 represents the fusion consistency loss score; Softmax represents the normalized exponential function. Final network output: 。 9. The multi-layer dynamic reliable weight collaborative adjustment method based on battery state awareness as described in claim 8, characterized in that, Step S13 satisfies: Fixed prior weights for physical consistency constraints; Fixed prior weights for data-driven loss; : Fixed prior weights for learning constraints in dynamic trust factor networks; : Fixed prior weights for fusion consistency loss; : Fixed prior weights of the credibility factor that change continuously and smoothly; The final fusion SOC loss is calculated using the following formula: Among them, SOC true The true SOC value is given, and the mean square error is given. The formula for the physical residual collaborative loss is as follows: SOC Final (k) is the SOC evaluation value at the k-th sampling time, SOC Final (k-1) is the SOC evaluation value at the (k-1)th sampling time, SOC AH (k) represents the SOC evaluation value using the ampere-hour integration method at the k-th sampling time, where SOC AH (k-1) represents the SOC evaluation value using the ampere-hour integration method at the (k-1)th sampling time; The collaborative loss based on the data-driven model is formulated as follows: The SOC evaluation value based on the data-driven method at the k-th sampling time is... is the SOC evaluation value based on the data-driven method at the (k-1)th sampling time; N is the total number of samples participating in the dynamic trust factor network calculation; L α The dynamic credibility factor loss is calculated using the following formula: in, This represents the true value at the k-th sampling time. The target is the dynamic reliability factor of the data at the k-th sampling time. The physical branch credibility factor target is at the k-th sampling time; Let k be the dynamic reliability factor of the data at the k-th sampling time. Let be the physical branch confidence factor at the k-th sampling time, and ε be a parameter to prevent the denominator from being zero. For dynamic credibility factor loss function; The specific formula for the consistency and coordination loss is as follows: in, This represents the fused SOC recalculated based on the dynamic reliability factor at the k-th sampling time; L α−smooth The α-smoothing constraint loss is given by the following formula: in, Let k be the dynamic reliability factor of the data at the k-th sampling time. Let be the physical branch confidence factor at the k-th sampling time. The dynamic reliability factor of the data at the (k-1)th sampling time is... is the physical branch confidence factor at the (k-1)th sampling time.
