A lithium battery SOC estimation method based on a P2D-LNN fusion model

By combining the P2D-LNN fusion model with the electrochemical dynamic analysis of the P2D and LNN models and integrating them using the UKF algorithm, the problems of high computational cost and poor versatility in lithium battery SOC estimation are solved, and accurate online SOC estimation is achieved.

CN119902083BActive Publication Date: 2025-11-14HARBIN INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411964038.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-11-14
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

Existing lithium battery SOC estimation methods are computationally expensive, have poor versatility and interpretability, and cannot achieve accurate online estimation.

Method used

A P2D-LNN fusion model is adopted. The P2D model is constructed to capture the internal electrochemical dynamics of lithium batteries, and the LNN model is combined for time series prediction. The UKF algorithm is used for integration to establish an online SOC prediction model.

Benefits of technology

It achieves accurate estimation of lithium battery SOC, reduces computational costs, improves the accuracy and versatility of the estimation, and provides a physical interpretation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902083B_ABST
    Figure CN119902083B_ABST
Patent Text Reader

Abstract

This invention proposes a lithium battery SOC estimation method based on a P2D-LNN fusion model, belonging to the field of lithium battery management technology. It solves the problems of high computational cost, poor versatility, and poor interpretability in existing lithium battery SOC estimation methods. The method includes: collecting lithium-ion battery data and establishing a lithium-ion battery test database; constructing a P2D model to capture the electrochemical dynamics within the lithium-ion battery in the test database; identifying parameters in the lithium-ion battery test database and correcting the P2D model parameters; inputting actual current data under operating conditions into the corrected P2D model, and outputting simulated voltage, temperature, and current (c) values. ss and c s,bulk Data; the BPTT algorithm was used to optimize the LNN model, and a CNN-LNN model was established for time series prediction of lithium-ion battery state; the P2D model and the CNN-LNN model were integrated by the UKF algorithm to establish an online SOC prediction model and complete the accurate estimation of lithium battery SOC.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a lithium battery SOC estimation method based on a P2D-LNN fusion model, belonging to the field of lithium battery management technology. Background Technology

[0002] With the increasing penetration rate of electric vehicles, the energy issues associated with them are becoming increasingly important, making electrochemical energy storage technology particularly crucial. Compared to lead-acid and nickel-cadmium batteries, lithium-ion batteries are widely used in energy storage battery technology due to their superior characteristics such as low self-discharge rate, high energy density, long lifespan, no memory effect, and high environmental tolerance. However, lithium-ion batteries undergo battery degradation during charging and discharging. This leads to a series of safety and reliability issues, including decreased battery performance, and can even cause system failures and fires. Therefore, accurate health assessment of batteries is of great significance for extending battery lifespan, reducing system maintenance costs, and ensuring safe system operation.

[0003] The goal of a Battery Management System (BMS) is to ensure the safety, efficiency, and durability of lithium batteries, and to prevent extreme conditions. Within a BMS, State of Charge (SOC) is the foundation for all other functions. SOC reflects the battery's remaining charge, and its accurate estimation is crucial for extending battery life and improving energy efficiency.

[0004] Problems with existing technologies: The open-circuit voltage method requires obtaining the open-circuit voltage value of a certain SOC state through static settling, which cannot be used for online SOC estimation; the ampere-hour integration method is an open-loop method, which will generate cumulative errors and is easily affected by external interference, resulting in low accuracy in practical applications; physical model-based methods are complex and computationally intensive in establishing and solving accurate electrochemical models, and are highly dependent on parameters; data-driven methods require a large dataset for training to establish the relationships between variables, the accuracy depends on the quality of the training dataset, and the computational cost is high. Summary of the Invention

[0005] To address the problems of high computational cost, poor versatility, and poor interpretability in existing lithium battery SOC estimation methods, this invention proposes a lithium battery SOC estimation method based on a P2D-LNN fusion model.

[0006] The technical solution adopted by the present invention to solve the above problems is as follows: The present invention includes:

[0007] Step 1: Collect lithium-ion battery data and establish a lithium-ion battery test database;

[0008] Step 2: Construct a P2D model to capture the electrochemical dynamics inside lithium batteries in the lithium-ion battery test database;

[0009] Step 3: Identify parameters in the lithium-ion battery test database and correct the P2D model parameters based on the parameters obtained from the parameter identification;

[0010] Step 4: Input the actual current data under operating conditions into the corrected P2D model, and output the simulated voltage, temperature, and current. ss and c s,bulk data;

[0011] Step 5: Optimize the LNN model using the BPTT algorithm to build a CNN-LNN model, and use the CNN-LNN model to predict the time series of lithium-ion battery states.

[0012] Step 6: Integrate the P2D model and the CNN-LNN model using the UKF algorithm to establish an online SOC prediction model, and use the online SOC prediction model to accurately estimate the SOC of the lithium battery.

[0013] Preferably, step 2 specifically includes:

[0014] Step 2.1: Use kinetic transport to describe the relationship between lithium-ion concentration and battery current, and obtain the control equation and boundary conditions between lithium-ion concentration and battery current;

[0015] Step 2.2: Calculate the potentials in the solid electrode and electrolyte, and substitute the exchange current into the Butler-Volmer equation to calculate the exchange flux j. n ;

[0016] Step 2.3: Calculate the potentials in the solid electrode and electrolyte, and the exchange flux j. n By combining the calculation formulas, we can obtain the battery terminal voltage V(t).

[0017] The equation governing the relationship between lithium-ion concentration and battery current is as follows:

[0018]

[0019] The expression for the boundary conditions of the control equation is:

[0020]

[0021] In formulas (1) and (2), c s (x,r,t) represents the lithium concentration in the solid phase at time t, located at a distance r from the center of the spherical particle at position x in the solid electrode. e (x,t) represents the concentration of the electrolyte, D s and D e These are the effective diffusion coefficients of the solid electrode and the electrolyte, respectively, where F is the Faraday constant and ε is the effective diffusion coefficient of the electrolyte.e This represents the volume fraction of the electrolyte. R is the transfer number of the anion. P For the microscale of lithium ions in the cathode, j n This represents the molar flux of lithium ions.

[0022] The formulas for calculating the potential in solid electrodes and electrolytes are:

[0023]

[0024] In formula (3), Φ s With Φ e These are the potentials in the solid electrode and electrolyte, respectively, where R is the universal gas constant and f is the potential. ca κ is the average molar coefficient in the electrolyte, and κ is the ionic conductivity in the electrolyte. The transfer number of cations;

[0025] Exchange flux j n The calculation formula is:

[0026]

[0027] In formula (4), η is the polarization overpotential and i0 is the exchange current;

[0028] The formulas for calculating the polarization overpotential η and the exchange current i0 are as follows:

[0029]

[0030] In formula (5), c s,max c is the maximum concentration in the solid phase. ss r represents the concentration of lithium ions in the solid phase on the particle surface. eff Both α and φ are constants;

[0031] The formula for calculating the battery terminal voltage V(t) is:

[0032] V(t)=Φ s (0 + ,t)-Φ s (0 - ,t)(6).

[0033] Preferably, step 3 specifically includes:

[0034] Step 3.1: Preprocess the data in the lithium-ion battery test database;

[0035] Step 3.2: Extract the current I(k), voltage U(k), temperature T(k), and battery terminal electron voltage V(t) from the preprocessed data, and use the current I(k), voltage U(k), and temperature T(k) as the input feature vector. The battery terminal electron pressure V(t) is used as the target vector y(k), and the parameter vector is obtained by iteratively applying the forgetting factor recursive least squares method.

[0036] Step 3.3: Using the parameter vector The parameters of the P2D model are corrected to obtain the corrected P2D model parameters;

[0037] The expression for the recursive least squares method for the forgetting factor is:

[0038]

[0039] In formula (7), The parameters to be estimated are... Let K be the data vector, P be the gain, and I be the covariance.

[0040] Preferably, step 3.2 specifically includes:

[0041] Step 3.2.1: For P(k) and the forgetting factor λ are initialized;

[0042] Step 3.2.2: For each time step k, obtain the feature vector of the current time step. and the target vector y(k);

[0043] Step 3.2.3: Calculate the prediction error

[0044] Step 3.2.4: Calculate the gain vector K(k);

[0045] Step 3.2.5: Update the parameter vector

[0046] Step 3.2.6: Update the error covariance matrix P(k);

[0047] Step 3.2.7: Repeat steps 3.2.2-3.2.6 until all time steps have been iterated, and the parameter vector is obtained.

[0048] Preferably, step 5, which uses the BPTT algorithm to optimize the LNN model, includes:

[0049] Step 5.1.1: Set the initial parameters θ0, learning rate α, and initial hidden state x0;

[0050] Step 5.1.2: For each time step T, calculate the hidden state x(t) and the output. Perform forward propagation;

[0051] Step 5.1.3: At the last time step T, calculate the forward propagation loss using the loss function;

[0052] Step 5.1.4: Starting from the last time step T, combine the calculated loss and recursively calculate the error gradient for each time step using the chain rule, and then perform backpropagation;

[0053] Step 5.1.5: Calculate the gradient of parameter θ and update the parameters using gradient descent to complete the optimization of the LNN model; the expression for the loss function is:

[0054]

[0055] In formula (8), yr is the final actual output. The model predicts the output, and L is the forward propagation loss.

[0056] The formula for calculating the error gradient at each time step is:

[0057]

[0058] The formula for calculating the gradient of parameter θ is:

[0059]

[0060] The expression for updating parameters using gradient descent is:

[0061]

[0062] In formula (11), α is the learning rate.

[0063] Preferably, step 5, which involves time-series analysis of the lithium-ion battery state using a CNN-LNN model, includes:

[0064] Step 5.2.1: Perform convolution operations on the input ion battery test data through the convolutional layers of a CNN network to extract the spatial features of the ion battery test database. Here, CNN is a convolutional neural network.

[0065] Step 5.2.2: Perform dimensionality reduction on the extracted spatial features using a pooling layer, where the dimensionality reduction process includes downsampling and feature compression;

[0066] Step 5.2.3: Input the dimensionality-reduced spatial features into the LNN model. The LNN network is a liquid neural network, the LNN network is a recurrent neural network, and the LSTM network is a long short-term memory network. Combine the time series information in the input lithium-ion battery test data to build a model. Add a fully connected layer after the LNN model to output the time series prediction results of the lithium-ion battery state.

[0067] The expression for the convolution operation is:

[0068]

[0069] In formula (12), W is the i-th feature vector of the m-th layer. l Let X be the weight matrix of the i-th filter in the m-th layer. m-1 This is the output of the (m-1)th layer. This is the bias value;

[0070] The expression for dimensionality reduction is:

[0071]

[0072] In formula (13), This represents the i-th feature matrix element of the (m+1)-th layer after pooling. Let D be the i-th feature matrix element of the m-th layer. j This represents the j-th pooling region.

[0073] Preferably, step 5.2.3, which involves modeling based on the timing information in the input ion battery test data, includes:

[0074] Step 5.2.3.1: Convert the hidden states in the spatial features after dimensionality reduction into linear ordinary differential equations;

[0075] Step 5.2.3.2: Substitute the nonlinear term determined by the nonlinear function f into the linear ordinary differential equation to obtain the dynamic equation of the LNN model, and control the flow of the hidden state through the linear coupling gate f to complete the modeling.

[0076] The linear ordinary differential equation is:

[0077]

[0078] In formula (14), x(t) is the hidden state, τ is the time constant, and S(t) is the nonlinear term determined by the nonlinear function f;

[0079] The expression for the nonlinear term determined by the nonlinear function f is:

[0080] S(t)=f(x(t),In(t),t,θ)(Ax(t)) (15);

[0081] In formula (15), f is a neural network parameterized to θ, In(t) is the input, and A is the bias vector;

[0082] The expression for the dynamic equation of the LNN model is:

[0083]

[0084] The expression controlling the flow of the hidden state is:

[0085] τ sys =τ1+τ f(x(t),In(t),t,θ) (17);

[0086] In formula (17), τ1 is the initial time constant, τ f(x(t),In(t),t,θ) The time constant is a nonlinear function parameterized by a neural network, which determines the adjustment range of the time constant.

[0087] Preferably, step 6 specifically includes:

[0088] Step 6.1: Output the optimized P2D model [c ss ,c s,bulk Given a state vector x, and combined with the state covariance matrix P, a set of sigma points [χ] is generated. i ];

[0089] Step 6.2: Calculate the weighting coefficients for the corresponding sigma points;

[0090] Step 6.3: Establish a nonlinear mapping between the unknown electrochemical state and the measured voltage based on the CNN-LNN model, and obtain the measurement function h for electrochemical state estimation through the CNN-LNN neural network. Obtain the state transition equation f through the optimized P2D model equation.

[0091] Step 6.4: Combining the measurement function h and the state transition equation f, calculate the predicted mean and covariance matrix of the state variables at the next time step and the measurement mean and covariance matrix;

[0092] Step 6.5: Calculate the Kalman gain and update the state;

[0093] Step 6.6: Repeat steps 6.2-6.5 until the maximum number of iterations is reached, and output the estimated value of the lithium battery SOC;

[0094] Step 6.7: Calculate the error between the estimated value of the lithium battery voltage and the actual value of the lithium battery voltage using the root mean square error function, the mean absolute error function, and the relative error rate function. If the error is greater than the preset value, repeat steps 6.2-6.5 until the error is less than the preset value.

[0095] sigma point [χ i The expression for ] is:

[0096]

[0097] In formula (18), L = n + λ0, coefficient a = 1, n is taken as 2 in a single cell, and λ0 is the corresponding proportional coefficient. is the square root of the i-th column of the covariance matrix;

[0098] The formula for calculating the weighting coefficients corresponding to the sigma points is:

[0099] λ0=a 2 (n+mn)(19);

[0100]

[0101] In formulas (19) and (20), the proportionality coefficient m = 1, and β = 2 in the Gaussian white noise system;

[0102] The formulas for calculating the next-time prediction mean and covariance matrix of the state variables and the measurement mean and covariance matrix are as follows:

[0103]

[0104] In formulas (21) and (22), Q is the process noise covariance matrix, R is the measurement noise covariance matrix, f() is the state transition equation, and h() is the state transition equation and the measurement equation.

[0105] The expression for Kalman gain is:

[0106]

[0107] In formula (23), P xz This is the covariance matrix between the state vector and the measurement vector;

[0108] The expression for state update is:

[0109]

[0110] The formula for calculating the error between the estimated SOC of a battery and the actual SOC of a lithium battery is as follows:

[0111]

[0112] In formulas (25) and (26), N is the number of predictions, RMSE is the root mean square error function, MAE is the mean absolute error function, RER is the relative error rate function, and V is the relative error rate function. i Let i be the actual voltage at time i. For voltage prediction, N is the total number of data points.

[0113] The beneficial effects of this invention are:

[0114] 1. This invention innovatively integrates P2D and LNN to construct a highly efficient method for estimating the state of charge (SOC) of lithium-ion batteries. By constructing a P2D model to accurately capture the electrochemical dynamics within the lithium-ion battery, and simultaneously introducing an LNN model, utilizing its liquid-state time constant and nonlinear coupling gate characteristics, the complex nonlinear behavior of the lithium-ion battery is modeled, enabling time-series analysis of the battery's state. By combining the physical basis of the P2D model with the data-driven capability of the LNN model, and integrating it through the UKF algorithm, a nonlinear mapping between the unknown electrochemical state within the lithium-ion battery and the measured voltage is established, achieving accurate estimation of the lithium-ion battery's SOC.

[0115] 2. This invention accurately describes the dynamic behavior of battery input and output by combining P2D with forgetting factor least squares, providing a physical interpretation of the internal electrochemical reactions. It integrates measurable variables and unknown internal electrochemical variables to train and adjust the parameters of the LNN. By integrating the above-mentioned model that combines P2D and LNN with UKF, a hybrid physics and data-driven electrochemical state estimation method is established to predict voltage response online. This invention improves upon traditional electrochemical state estimation methods to solve problems such as high computational cost, poor generality, and poor interpretability in existing estimation methods. It not only provides physical interpretation but also avoids time-consuming partial differential equation calculations. Attached Figure Description

[0116] Figure 1 A flowchart of the lithium battery SOC estimation method based on the P2D-LNN fusion model provided by this invention;

[0117] Figure 2 A framework diagram of the LNN model provided by this invention;

[0118] Figure 3 This is a diagram of the CNN-LNN model framework provided by the present invention;

[0119] Figure 4 The flowchart of the UKF algorithm provided by this invention. Detailed Implementation

[0120] Combination Figure 1-4 This implementation method is described as follows: Figure 1 As shown, the steps of the lithium battery SOC estimation method based on the P2D-LNN fusion model described in this embodiment include:

[0121] S1: Collect lithium-ion battery data and establish a lithium-ion battery test database;

[0122] S2: Construct a P2D model to capture the electrochemical dynamics inside lithium batteries in the lithium-ion battery test database;

[0123] To obtain accurate internal electrochemical states of the battery, this embodiment selects the P2D model as the electrochemical model. The P2D model is the most basic electrochemical model for lithium-ion batteries, suitable for electrochemical models of constant current and adiabatic systems. It equates the lithium-ion battery to a sandwich structure composed of electrodes (positive and negative electrodes) made up of countless spherical solid particles, a separator, and an electrolyte. It can comprehensively and systematically describe the working characteristics of the battery during charging and discharging. Therefore, the P2D model is adopted.

[0124] The P2D model is based on two key aspects: mass transfer and charge transfer. Mass transfer occurs within the electrolyte and material particles. In the electrolyte, the movement of lithium ions is characterized by diffusion and migration in the liquid phase; within the material particles, the movement of lithium ions is characterized by diffusion in the solid phase. Charge transfer occurs on the surface of the material particles, and its core is the analysis of exchange current density using the Butler-Volmer equation. The P2D model can be described in four parts: ion transport kinetics, current density and Ohm's law, potential and overpotential, and the Butler-Volmer equation, specifically including:

[0125] S201: Ion diffusion flow and current i due to concentration gradient e As a result, the lithium-ion concentration in the electrolyte and electrodes will change accordingly. Therefore, this embodiment uses ion transport kinetics to describe the relationship between concentration and battery current. The control equation and its boundary conditions are as follows:

[0126]

[0127] In formulas (1) and (2), c s (x,r,t) represents the lithium concentration in the solid phase at time t, located at a distance r from the center of the spherical particle at position x in the solid electrode. e (x,t) represents the concentration of the electrolyte, D s and D e These are the effective diffusion coefficients of the solid electrode and the electrolyte, respectively, where F is the Faraday constant and ε is the effective diffusion coefficient of the electrolyte. e This represents the volume fraction of the electrolyte. R is the transfer number of the anion. P For the microscale of lithium ions in the cathode, j n This represents the molar flux of lithium ions.

[0128] S202: Considering the solid phase and the electrolyte phase, the potentials in the solid electrode and the electrolyte can be expressed as:

[0129]

[0130] In formula (3), Φ s With Φ e These are the potentials in the solid electrode and electrolyte, respectively, where R is the universal gas constant and f is the potential.ca κ is the average molar coefficient in the electrolyte, and κ is the ionic conductivity in the electrolyte. The transfer number of cations;

[0131] S203: The Butler-Volmer equation determines the exchange flux j by establishing a relationship with the exchange current. n :

[0132]

[0133] In formula (4), η is the polarization overpotential and i0 is the exchange current. The formulas for calculating the polarization overpotential η and the exchange current i0 are as follows:

[0134]

[0135] In formula (5), c s,max c is the maximum concentration in the solid phase. ss r represents the concentration of lithium ions in the solid phase on the particle surface. eff Both α and φ are constants;

[0136] S204: Combining the above formulas, we can obtain the battery terminal voltage V(t):

[0137] V(t)=Φ s (0 + ,t)-Φ s (0 - ,t)(6).

[0138] S3: Perform parameter identification on the lithium-ion battery test database, correct the P2D model parameters based on the identified parameters, input the actual current data under operating conditions into the corrected P2D model, and output the simulated voltage, temperature, and current. ss and c s,bulk data;

[0139] The internal chemical reactions during the charging and discharging process of lithium-ion batteries are complex and time-varying nonlinear, making it difficult to obtain model parameters through theoretical analysis. Although fitting methods can identify model parameters, due to the time-varying nature of the battery system, these parameters change significantly with variations in factors such as battery state of charge (SOC), ambient temperature, and cycle number. Therefore, to improve the accuracy of SOC estimation and enhance the system's adaptability, it is necessary to identify and correct battery model parameters online in real time.

[0140] Least squares is a mathematical optimization technique. It finds the best function match for data by minimizing the sum of squared errors. Least squares can be used to easily obtain unknown data while minimizing the sum of squared errors between the obtained data and the actual data. However, online observations, storing all observations, and using the classical least squares method for solving the problem require significant computational resources and memory. Therefore, a recursive, dynamic programming-like approach is needed to update the parameters of the linear model online. Simultaneously, the Forgetting Factor Recursive Least Square (FFRLS) algorithm is employed for real-time online identification of open-circuit voltage and ohmic resistance, improving the data saturation problem of the least squares algorithm.

[0141] The forgetting factor recursive least squares method is an improved least squares algorithm that introduces a forgetting factor λ to reduce the influence of old data and enhance the influence of new data, thereby improving the algorithm's ability to identify time-varying parameters. This algorithm continuously updates the covariance matrix P(k) during system operation, causing the parameters to converge. The forgetting factor λ typically ranges from 0.95 to 0.99; the smaller the value, the stronger the algorithm's ability to track time-varying parameters, but the greater the fluctuation in the identification results; conversely, the larger the value of λ, the smaller the fluctuation in the identification results, but the weaker the ability to track time-varying parameters. When λ = 1, the algorithm becomes the ordinary recursive least squares method. The formula for the recursive least squares method with the forgetting factor λ is shown below:

[0142]

[0143] In formula (7), The parameters to be estimated are... Let K be the data vector, P be the gain, and I be the covariance.

[0144] The parameter identification steps include: S301: Preprocessing the data in the lithium-ion battery test database;

[0145] S302: Extract the current I(k), voltage U(k), temperature T(k), and battery terminal electron pressure V(t) from the preprocessed data, and use the current I(k), voltage U(k), and temperature T(k) as input feature vectors. The battery terminal electron pressure V(t) is used as the target vector y(k), and the parameter vector is obtained by iteratively applying the forgetting factor recursive least squares method.

[0146] S30201: Yes P(k) and the forgetting factor λ are initialized;

[0147] S30202: For each time step k, obtain the feature vector of the current time step. and the target vector y(k);

[0148] S30203: Calculate prediction error

[0149] S30204: Calculate the gain vector K(k);

[0150] S30205: Update parameter vector

[0151] S30206: Update the error covariance matrix P(k);

[0152] S30207: Repeat S30202-S30206 until all time steps are completed, and the parameter vector is obtained.

[0153] S303: Using parameter vectors The parameters of the P2D model are corrected, such as Ds, De, and the conductivity σ of the electrode material, to obtain the corrected P2D model parameters: wait.

[0154] S4: Optimize the LNN model using the BPTT algorithm, establish a CNN-LNN model, and use the CNN-LNN model to perform time series prediction of lithium-ion battery state.

[0155] LNN networks are liquid neural networks. Their core lies in modeling time series data by designing dynamic time constants and combining them with time series information from input ion battery test data.

[0156] LNNs are a novel type of time-continuous recurrent neural network model constructed by combining linear first-order dynamic systems with nonlinear coupling gates. LNNs are inspired by the dynamics and adaptability of biological neural systems, particularly the concept of fluid computing. In fluid computing, the network's state changes are driven by input signals; each input causes a change in the network state, and these changes influence future decisions. LNNs borrow this idea, constructing a network whose state continuously changes over time steps, allowing the model to dynamically process and adapt to new data.

[0157] Compared to traditional Recurrent Neural Networks (RNNs) and Long Short-Term Memory Networks (LSTMs), LNNs enhance their ability to capture complex data patterns by expanding the model's possible function space, especially when dealing with nonlinear and dynamic systems. LNNs' real-time decision-making capabilities give them a significant advantage in scenarios requiring rapid response. Furthermore, their rapid adaptability to varying data distributions improves their generalization performance across different data environments.

[0158] The working mechanism of LNNs involves two key parts: a linear dynamic system and a nonlinear coupling gate. The linear dynamic system is responsible for maintaining the network's state, while the nonlinear coupling gate adjusts the time constant based on the input and the current state, thus affecting the state update speed. This design allows LNNs to respond to different input features at different time points, achieving dynamic adaptation to time series data.

[0159] The core feature of LNNs is their dynamic time constants, which can vary independently at each time point based on the input features, thus providing a dedicated dynamic system for each hidden state element. This design gives LNNs greater flexibility and expressive power when processing time series data.

[0160] S401: The structure of the LNN model is as follows Figure 2 As shown, the core idea of ​​LNN is to declare the flow of the hidden state as a system of linear ordinary differential equations, as shown below:

[0161]

[0162] Where x(t) is the hidden state, τ is the time constant, and S(t) represents the nonlinear term determined by the nonlinear function f:

[0163] S(t)=f(x(t),In(t),t,θ)(Ax(t)) (9);

[0164] Here, f is a neural network parameterized to θ, In(t) is the input, and A is the bias vector.

[0165] By substituting into the hidden state equation, this implementation yields the dynamic equation of the LNN:

[0166]

[0167] In formula (10), the nonlinear coupling gate f not only determines the derivative of the hidden state x(t), but also acts as the time constant of the input-dependent change, controlling the flow of the hidden state:

[0168] τ sys =τ1+τ f(x(t),In(t),t,θ) (11);

[0169] In formula (11), τ1 is the initial time constant, τ f(x(t),In(t),t,θ) The time constant is a nonlinear function parameterized by a neural network, which determines the adjustment range of the time constant.

[0170] S402: LNN Model Optimization: LNNs parameterize the hidden state derivatives, transforming the discrete computation graph into a continuous time graph, thus allowing training using gradient-based optimization algorithms. It optimizes using Backpropagation Through Time (BPTT) instead of adjoint method-based optimization. The steps for optimizing an LNN using BPTT are as follows:

[0171] S40201: Initialization: Set the initial parameters θ0, learning rate α, and initial hidden state x0;

[0172] S40202: Forward Propagation: For each time step t, compute the hidden state x(t) and the output.

[0173] S40203: Calculate the loss: Calculate the loss function L at the last time step T. Where yr is the final actual output. It is the model's predicted output;

[0174] S40204: Backpropagation: Starting from the last time step T, recursively calculate the error gradient for each time step using the chain rule:

[0175]

[0176] S40205: Parameter Update: Calculate the gradient of parameter θ. Update the parameters using gradient descent: θ = θ - α▽ θ L, where α is the learning rate.

[0177] Building upon the LNN model, Convolutional Neural Networks (CNNs) are used to combine and optimize LNN. The CNN-LNN model combines the advantages of both CNNs and LNNs. CNNs are used to extract spatial features from input data, while LNNs are used to handle long-term dependencies in sequence data.

[0178] S403: Using lithium-ion battery data as the input sequence, features are extracted through one or more convolutional layers. Convolutional layers are a key part of CNNs; they reduce dimensionality and extract features through convolution operations, providing more representative and discriminative feature representations for subsequent layers. The calculation formula for convolution operations is as follows:

[0179]

[0180] In formula (13), W is the i-th feature vector of the m-th layer. l Let X be the weight matrix of the i-th filter in the m-th layer. m-1 This is the output of the (m-1)th layer. This is the bias value;

[0181] S404: Following the convolutional layers, the pooling layers reduce the dimensionality of the features, preserving key information, reducing redundancy, and simplifying computational complexity. The pooling layers process the data by downsampling and feature compression, aiming to reduce overfitting. The calculation process of the pooling layer is as follows:

[0182]

[0183] In formula (14), This represents the i-th feature matrix element of the (m+1)-th layer after pooling. Let D be the i-th feature matrix element of the m-th layer. j This is the j-th pooling region;

[0184] LNNs can utilize spatial features extracted by convolutional layers, combine them with temporal information from sequence data to model and learn temporal patterns within the data. A fully connected layer can be added after the hidden states of the LNN to output the final prediction result. See the detailed framework below. Figure 3 .

[0185] S5: By integrating the P2D model and the CNN-LNN model through the UKF algorithm, an online SOC prediction model is established, which is used to accurately estimate the SOC of lithium batteries.

[0186] The UKF algorithm combines the Unscented Transform (UT) with the Kalman Filter (KF) algorithm to address the limitations of the EKF in handling nonlinear systems. As the core and prerequisite of the UKF algorithm, the UT algorithm calculates the statistical values ​​of the nonlinear variables to derive multiple variable values ​​that conform to statistical laws. The nonlinear variables are obtained by simulating sampling points according to a certain probability distribution. Based on the statistical characteristics of the variables, a finite number of sampling points are selected according to a specific method, ensuring that the selected reference points closely approximate the probability distribution characteristics of the known variables. By determining the mean and variance of the estimated variable, and using the estimated variable as the basic data, a stacking sampling strategy is employed to derive a corresponding number of reference points. Simultaneously, it is considered that the reference points and the estimated variable have the same mean and variance; this process is called sigmaization of the estimated variable.

[0187] The core idea of ​​UKF is to use a set of sampling points called sigma points to approximate the propagation of the system's state distribution. These sigma points are propagated under a nonlinear function through an unscented transformation to more accurately capture the mean and covariance of the state distribution, such as... Figure 4 As shown, the steps of the UKF algorithm are as follows:

[0188] S501: The value output by the P2D model [c] ss ,c s,bulk ] is defined as the state vector x in UKF. It can be observed that the fusion model can establish a nonlinear mapping between the unknown electrochemical state and the measured voltage. The measurement function h for electrochemical state estimation can be obtained through the LSTM neural network. At the same time, the state transition equation f can be obtained through the P2D model equation.

[0189] S502: Based on the given state vector x and state covariance matrix P, generate a set of sigma points [χ]. i ]:

[0190]

[0191] In formula (15), L = n + λ0, coefficient a = 1, n is taken as 2 in a single cell, and λ0 is the corresponding proportional coefficient. is the square root of the i-th column of the covariance matrix;

[0192] S502: Calculate the weighting coefficients corresponding to the sigma points:

[0193] λ0=a 2 (n+mn) (16);

[0194]

[0195] In formulas (16) and (17), the proportionality coefficient m = 1, and β = 2 in the Gaussian white noise system;

[0196] S503: Calculate the next-time predicted mean and covariance matrix of the state variables and the measured mean and covariance matrix:

[0197]

[0198] In formulas (18) and (19), Q is the process noise covariance matrix, R is the measurement noise covariance matrix, f() is the state transition equation, and h() is the state transition equation and the measurement equation.

[0199] S504: Calculate Kalman gain and state update;

[0200] The expression for Kalman gain is:

[0201]

[0202] In formula (20), P xz This is the covariance matrix between the state vector and the measurement vector;

[0203] The expression for state update is:

[0204]

[0205] S606: The accuracy evaluation metric for the final SOC estimate can be represented by RMSE, and the loss function during BPTT training can also be replaced by RMSE:

[0206]

[0207] In formula (22), V i Let i be the actual voltage at time i. For voltage prediction, N is the total number of data points. Furthermore, the accuracy of the prediction can be reflected by the Mean Absolute Error (MAE) and Residual Error Rate (RER), defined as follows:

[0208]

[0209] In summary, this invention innovatively integrates P2D and LNN to construct a highly efficient method for estimating the state of charge (SOC) of lithium-ion batteries. By constructing a P2D model to accurately capture the electrochemical dynamics within the lithium-ion battery, and simultaneously introducing an LNN model, utilizing its liquid-state time constant and nonlinear coupling gate characteristics, the complex nonlinear behavior of the lithium-ion battery is modeled, enabling time-series analysis of the battery's state. By combining the physical foundation of the P2D model with the data-driven capabilities of the LNN model, and integrating it through the UKF algorithm, a nonlinear mapping between the unknown electrochemical state within the lithium-ion battery and the measured voltage is established, achieving accurate estimation of the lithium-ion battery's SOC.

[0210] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent substitutions, and improvements made to the above embodiments without departing from the scope of the present invention, based on the technical essence of the present invention and within the spirit and principles of the present invention, shall still fall within the protection scope of the present invention.

Claims

1. A lithium battery SOC estimation method based on a P2D-LNN fusion model, characterized in that, The steps of the lithium battery SOC estimation method based on the P2D-LNN fusion model include: Step 1: Collect lithium-ion battery data and establish a lithium-ion battery test database; Step 2: Construct a P2D model to capture the electrochemical dynamics inside lithium batteries in the lithium-ion battery test database; Step 3: Identify parameters in the lithium-ion battery test database and correct the P2D model parameters based on the parameters obtained from the parameter identification; Step 4: Input the actual current data under operating conditions into the corrected P2D model, and output the simulated voltage, temperature, and... and data; Step 5: Optimize the LNN model using the BPTT algorithm to build a CNN-LNN model, and use the CNN-LNN model to predict the time series of lithium-ion battery states. Step 6: Integrate the P2D model and the CNN-LNN model using the UKF algorithm to establish an online SOC prediction model, and use the online SOC prediction model to accurately estimate the SOC of the lithium battery.

2. The lithium battery SOC estimation method based on the P2D-LNN fusion model according to claim 1, characterized in that, Step 2 specifically includes: Step 2.1: Use kinetic transport to describe the relationship between lithium-ion concentration and battery current, and obtain the control equation and boundary conditions between lithium-ion concentration and battery current; Step 2.2: Calculate the potentials in the solid electrode and electrolyte, and substitute the exchange current into the Butler-Volmer equation to calculate the exchange flux. ; Step 2.3: Calculate the potential and exchange flux in the solid electrode and electrolyte. By combining the calculation formulas, the battery terminal voltage can be obtained. ; The equation governing the relationship between lithium-ion concentration and battery current is as follows: (1); The expression for the boundary conditions of the control equation is: (2); In formulas (1) and (2), for Time distance from solid electrode located in The distance from the center of the spherical particle The concentration of lithium in the solid phase. The concentration of the electrolyte. and These are the effective diffusion coefficients of the solid electrode and the electrolyte, respectively. It is Faraday's constant. This represents the volume fraction of the electrolyte. The transfer number of the anion. This refers to the microscopic scale of lithium ions at the cathode. This represents the molar flux of lithium ions. The formulas for calculating the potential in solid electrodes and electrolytes are: (3); In formula (3), Let be the potential of the solid electrode. The potential in the electrolyte. This is the universal gas constant. The average molar coefficient in the electrolyte. This represents the ionic conductivity in the electrolyte. The transfer number of cations; Exchange flux The calculation formula is: (4); In formula (4), This is the polarization overpotential. For exchanging current; polarization overpotential With exchange current The calculation formula is: (5); In formula (5), This represents the maximum concentration in the solid phase. The concentration of lithium ions in the solid phase on the particle surface. and All are constants; Battery terminal voltage The calculation formula is: (6)。 3. The lithium battery SOC estimation method based on the P2D-LNN fusion model according to claim 1, characterized in that, Step 3 specifically includes: Step 3.1: Preprocess the data in the lithium-ion battery test database; Step 3.2: Extract the current from the preprocessed data ,Voltage ,temperature and battery terminal electronic voltage , to current ,Voltage ,temperature As input feature vector Battery terminal electronic voltage As the target vector The parameter vector is obtained by iteratively applying the forgetting factor recursive least squares method. ; Step 3.3: Using the parameter vector The parameters of the P2D model are corrected to obtain the corrected P2D model parameters; The expression for the recursive least squares method for the forgetting factor is: (7); In formula (7), The parameters to be estimated are... For data vectors, For gain, For covariance, It is an identity matrix.

4. The lithium battery SOC estimation method based on the P2D-LNN fusion model according to claim 3, characterized in that, Step 3.2 specifically includes: Step 3.2.1: For , and forgetting factor Perform initialization; Step 3.2.2: For each time step Obtain the feature vector at the current time step. and target vector ; Step 3.2.3: Calculate the prediction error ; Step 3.2.4: Calculate the gain vector ; Step 3.2.5: Update the parameter vector ; Step 3.2.6: Update the error covariance matrix ; Step 3.2.7: Repeat steps 3.2.2-3.2.6 until all time steps have been iterated, and the parameter vector is obtained. .

5. The lithium battery SOC estimation method based on the P2D-LNN fusion model according to claim 1, characterized in that, Step 5 involves optimizing the LNN model using the BPTT algorithm, including: Step 5.1.1: Set initial parameters Learning rate and the initial hidden state ; Step 5.1.2: For each time step T Calculate the hidden state and output Propagation proceeds forward. Step 5.1.3: In the last time step T The forward propagation loss is calculated using the loss function; Step 5.1.4: From the last time step T Initially, based on the calculated loss, the error gradient at each time step is recursively calculated using the chain rule, and then backpropagation is performed. Step 5.1.5: Calculate parameters The gradient is calculated, and the parameters are updated using gradient descent to complete the optimization of the LNN model; The expression for the loss function is: (8); In formula (8), For the final actual output, For the model's predicted output, L Losses due to forward propagation; The formula for calculating the error gradient at each time step is: (9); parameter The formula for calculating the gradient is: (10); The expression for updating parameters using gradient descent is: (11); In formula (11), This is the learning rate.

6. The lithium battery SOC estimation method based on the P2D-LNN fusion model according to claim 1, characterized in that, Step 5, which involves time-series analysis of the lithium-ion battery state using a CNN-LNN model, includes: Step 5.2.1: Perform convolution operations on the input ion battery test data through the convolutional layers of a CNN network to extract the spatial features of the ion battery test database. Here, CNN is a convolutional neural network. Step 5.2.2: Perform dimensionality reduction on the extracted spatial features using a pooling layer, where the dimensionality reduction process includes downsampling and feature compression; Step 5.2.3: Input the dimensionality-reduced spatial features into the LNN model, where the LNN network is a liquid neural network, the LNN network is a recurrent neural network, and the LSTM network is a long short-term memory network. Combine the time series information in the input lithium-ion battery test data to build a model, add a fully connected layer after the LNN model, and output the time series prediction results of the lithium-ion battery state. The expression for the convolution operation is: (12); In formula (12), For the first The first layer 1 eigenvector For the first The first layer The weight matrix of each filter, For the first The output of the layer, This is the bias value; The expression for dimensionality reduction is: (13); In formula (13), The first layer after pooling treatment The first layer Each feature matrix element For the first The first layer Each feature matrix element For the first Each pooled region.

7. The lithium battery SOC estimation method based on the P2D-LNN fusion model according to claim 6, characterized in that, Step 5.2.3, which involves modeling based on the time-series information from the input ion battery test data, includes: Step 5.2.3.1: Convert the hidden states in the spatial features after dimensionality reduction into linear ordinary differential equations; Step 5.2.3.2: The nonlinear function Substituting the determined nonlinear terms into the linear ordinary differential equation yields the dynamic equation of the LNN model, which is then passed through a linear coupling gate. Control the flow of the hidden state to complete the modeling; The linear ordinary differential equation is: (14); In formula (14), In hidden state, It is a time constant. For nonlinear functions Determined nonlinear terms; nonlinear functions The expression for the determined nonlinear term is: (15); In formula (15), For a parameterized neural networks, For input, It is the bias vector; The expression for the dynamic equation of the LNN model is: (16); The expression controlling the flow of the hidden state is: (17); In formula (17), The initial time constant, The time constant is a nonlinear function parameterized by a neural network, which determines the adjustment range of the time constant.

8. The lithium battery SOC estimation method based on the P2D-LNN fusion model according to claim 1, characterized in that, Step 6 specifically includes: Step 6.1: Output the optimized P2D model As a given state vector Combined with the state covariance matrix Generate a set of sigma points ; Step 6.2: Calculate the weighting coefficients for the corresponding sigma points; Step 6.3: Establish a nonlinear mapping between the unknown electrochemical state and the measured voltage based on the CNN-LNN model, and obtain the measurement function for electrochemical state estimation through the CNN-LNN neural network. The state transition equation is obtained through the optimized P2D model equation. ; Step 6.4: Combine measurement function and state transition equations Calculate the predicted mean and covariance matrix of the state variables at the next time step and the measured mean and covariance matrix; Step 6.5: Calculate the Kalman gain and update the state; Step 6.6: Repeat steps 6.2-6.5 until the maximum number of iterations is reached, and output the estimated value of the lithium battery SOC; Step 6.7: Calculate the error between the estimated value of the lithium battery voltage and the actual value of the lithium battery voltage using the root mean square error function, the mean absolute error function, and the relative error rate function. If the error is greater than the preset value, repeat steps 6.2-6.5 until the error is less than the preset value. sigma point The expression is: (18); In formula (18), , In a single cell Take 2, This is the corresponding proportionality coefficient. The first covariance matrix is ​​the first... The square root of the column; The formula for calculating the weighting coefficients corresponding to the sigma points is: (19); (20); In formulas (19) and (20), the proportionality coefficient Gaussian white noise system ; The formulas for calculating the next-time prediction mean and covariance matrix of the state variables and the measurement mean and covariance matrix are as follows: (21); (22); In formulas (21) and (22), The process noise covariance matrix is... To measure the noise covariance matrix, The state transition equation is... For measurement equations; The expression for Kalman gain is: (23); In formula (23), This is the covariance matrix between the state vector and the measurement vector; The expression for state update is: (24); The formula for calculating the error between the estimated SOC of a battery and the actual SOC of a lithium battery is as follows: (25); (26); In formulas (25) and (26), RMSE is the root mean square error function, MAE is the mean absolute error function, and RER is the relative error rate function. For a moment The actual voltage, To predict voltage, N This represents the total number of data points.

Citation Information

Patent Citations

  • Power battery SOC and SOH estimation method based on data and model fusion

    CN117148162A

  • Lithium battery thermal runaway multistage early warning method based on attention mechanism

    CN118209873A