Lithium ion battery health state estimation method based on cross attention mechanism
By using a cross-attention mechanism to integrate health indicators and charging data depth characteristics in lithium-ion battery health status estimation, the problem of difficulty in quantifying the aging mode of automotive lithium-ion batteries and difficult to explain the reasons for the decline in health status is solved, and accurate health status estimation and interpretability analysis are achieved.
Patent Information
- Application Number
- CN202411879714.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-12-19
AI Technical Summary
The aging trajectory of automotive lithium-ion batteries is uncertain and nonlinear. The existing methods are difficult to accurately reflect the battery's internal aging pattern and usage behavior, and it is difficult to explain the reasons for the decline in battery health status.
The health status estimation method of lithium-ion batteries based on the cross attention mechanism is used to extract health indicators reflecting the aging mechanism of the battery from the vehicle data. The cross attention mechanism integrates health indicators and charging data depth characteristics to predict the battery health status and analyze the reasons for the decline in health status.
It has realized the accurate construction of health indicators reflecting the aging pattern of the battery under random charging and discharging conditions, improved the interpretability of the battery health status estimation, and analyzed the main factors affecting the decline of health status, helping to improve the battery usage and charging and discharging strategies.
Smart Images

Figure CN119827991A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of lithium-ion battery state estimation, and more specifically, relates to a lithium-ion battery health state estimation method based on a cross-attention mechanism. Background Art
[0002] The development of new energy electric vehicles has reduced dependence on traditional fossil energy and promoted environmental protection and energy conservation. As the core energy storage component of electric vehicles, commercial lithium-ion batteries, usually lithium iron phosphate batteries and ternary lithium batteries, have the advantages of high energy density, low self-discharge rate, and long cycle life. With the continuous use of electric vehicles, the battery gradually ages, which is reflected in the decrease of the remaining battery capacity. The battery health state (SOH) indicator is defined as the ratio of the current maximum remaining available capacity of the battery to the rated capacity, which reflects the health level of the battery.
[0003] At present, the estimation of the health status of lithium-ion batteries often requires the manual construction of health indicators, combining battery operating data with machine learning, deep learning and other methods to achieve health status estimation. However, affected by the production and manufacturing process of battery cells, regional distribution, driving habits and charging strategies, the aging trajectory of on-board lithium-ion batteries is characterized by uncertainty and strong nonlinearity. The charging process of on-board batteries may start from any SOC and does not meet the fixed charging protocol, making the quantitative methods that accurately reflect the battery degradation mechanism and aging mode in the laboratory no longer applicable in practice. Secondly, the causes of battery aging are poorly explainable and their importance cannot be measured. The statistical features or deep features extracted by existing methods are difficult to explain the causes of the decline of battery health status.
[0004] Therefore, it has become an urgent need in this field to design a method to accurately extract health indicators that reflect the battery aging mechanism and battery usage behavior from the on-board battery operation data, and to integrate the health indicators with the battery data to accurately predict the health status and analyze and explain the causes of the battery health status decline. Summary of the invention
[0005] 1. Technical issues to be resolved
[0006] Based on the defects mentioned in the above background technology, the present invention discloses a method for estimating the health status of lithium-ion batteries based on a cross-attention mechanism, which includes extracting health indicators reflecting the battery aging mechanism from on-board data, using a cross-attention mechanism to fuse health indicators with charging data to estimate the battery health status, and analyzing the reasons for the decline in battery health status. The method aims to solve the problems of random charging and discharging of on-board lithium-ion batteries under application conditions, the difficulty in quantifying the aging pattern reflecting the internal mechanism of the battery, the difficulty in explaining the reasons for the decline in battery health status, and the difficulty in accurately estimating the battery health status.
[0007] (II) Technical solution
[0008] The present invention discloses a lithium-ion battery health state estimation method based on a cross-attention mechanism, comprising the following steps:
[0009] Step S100, data preparation, during the use of the lithium-ion battery, obtaining the historical data of the total voltage, total current, temperature and state of charge of the battery recorded by the battery management system;
[0010] Step S200: dividing the charging and discharging segments, dividing the charging segment and the discharging segment in the historical data according to the charging flag bit;
[0011] Step S300: Calculate the health index x reflecting the battery aging pattern and usage behavior h , calculate the health indicators reflecting the three aging modes of battery active material loss, lithium ion loss and conductivity loss from the charging segment; also calculate the health indicators reflecting the battery usage behavior from the charging segment and the discharging segment, including the average charging rate, charging and discharging rate and temperature, charging and discharging depth and temperature, battery cumulative cycle number, mileage and discharge current information entropy.
[0012] Step S400: Use a stacked convolutional neural network to perform convolution operations on the charging segment to obtain the charging data depth feature F c ;
[0013] Step S500: Using the cross attention mechanism to fuse the deep features F of the charging data c and health indicators x h Based on the cross attention mechanism, the attention of the deep features of the charging data related to the health indicators is enhanced, and the attention of the deep features of the charging data related to the health indicators is enhanced to obtain the fusion feature A that is most relevant to the battery health status. c and A h ;
[0014] Step S600: Fusion feature A c and A h Input the fully connected neural network to predict the health status of the battery; and the health indicator x h The attention weight S h Analyze and obtain the main factors causing the degradation of battery health status.
[0015] Preferably, step S200 specifically includes:
[0016] When the charging flag bit of the historical data is "charging" or "charging completed", the historical data is divided into the charging segment; when the charging flag bit of the historical data is "discharging", the historical data is divided into the discharging segment.
[0017] Preferably, step S300 specifically includes:
[0018] Step S310: Calculating a health index reflecting the battery active material loss aging pattern from the charging segment
[0019] The approximate constant current charging current is intercepted from the charging data of the charging segment and recorded as I cc (k), the charging voltage is denoted as V cc (k), charging voltage V for the approximately constant current segment cc (k) Smoothing and interpolation are performed to obtain The incremental capacity curve is calculated using formula (2)
[0020]
[0021] Among them, ΔQ cc (k) is the charging capacity of the approximate constant current section at the current time k, and sigmoid(·) is the sigmoid function;
[0022] Formula (3) is used to calculate the health index reflecting the loss of battery active materials
[0023]
[0024] in, and The first and nth charging of the battery respectively The peak value of the curve, max is the maximum value function;
[0025] Step S320: Calculate a health indicator reflecting the battery lithium ion loss aging pattern from the charging segment
[0026] The capacity charged between fixed SOC intervals is used to quantitatively quantify the battery lithium ion loss aging mode. A starting SOC and an ending SOC are selected to cover most of the random charging conditions in the dataset, denoted as and The corresponding times are k 1 and k 2 ; Then, k 1 and k 2 The partial charge capacity Q s is calculated as shown in formula (4)
[0027]
[0028] Among them, I ch (j) is the charging current at the jth moment, Δt is the current sampling time interval; then, calculate the Q of the nth charge s and initial Q s The rate of change between As shown in formula (5)
[0029]
[0030] Where Q s,1 and Q s,n The SOC of the battery in the first and nth charging is and The partial charge capacity between
[0031] Step S330: Calculating a health indicator reflecting a battery conductivity loss aging pattern from the charging segment;
[0032] The battery conductivity loss is quantified by the ohmic internal resistance. Since the ohmic internal resistance varies with temperature and SOC factors, the relatively fixed ohmic internal resistance at 100% SOC is used as a quantitative indicator of the battery conductivity loss aging mode, as shown in formula (6):
[0033]
[0034] Among them, R ohm,1 and R ohm,k They are the 100% SOC internal resistance of the battery during the 1st and kth charging processes respectively.
[0035] Preferably, step S300 further includes step S340:
[0036] Step S340: Calculate the health index reflecting the battery usage behavior from the charging segment and the discharging segment, using HI 1 , HI 2 , HI 3 , HI 4 , HI 5 , HI 6 express;
[0037] HI 1 is the weighted average charging rate: In order to consider the non-constant current charging condition of the random charging and discharging process, a weighted average charging rate index is defined, as shown in formula (7):
[0038]
[0039] Among them, I ch(k) is the charging current at the kth moment, L is the length of the charging data of this charging segment, Q 0 is the rated capacity of the battery;
[0040] HI 2 For the charge and discharge rate and temperature: establish a health index related to the charge and discharge depth and temperature, as shown in formula (8)
[0041]
[0042] Among them, T ch (k) is the charging temperature, T min The lowest temperature allowed for the battery to operate;
[0043] HI 3 For charge and discharge depth and temperature: Establish a health indicator related to charge and discharge depth and temperature, which is defined as the product of charge and discharge depth and average temperature, as shown in formula (9):
[0044]
[0045] Wherein, SOC(0) and SOC(L) represent the starting SOC and ending SOC of the charging segment respectively;
[0046] HI 4 The cumulative number of battery cycles is defined as the cumulative number of cycles of the battery at the nth charge. The health indicator is the sum of the depth of charge DOD of the battery from the first charge to the depth of charge DOD of the nth charge, as shown in formula (10):
[0047]
[0048] Where i is the charging times index, n is the current charging times; SOC i (0) and SOC i (L) is the starting SOC and ending SOC of the i-th charging;
[0049] HI 5 Mileage: The vehicle's mileage is expressed as "mileage", which is directly used as one of the health indicators of the battery usage process, as shown in formula (11):
[0050] HI 5 =mileage (11)
[0051] HI 6 is the discharge current information entropy: the frequent changes in the vehicle discharge current measure the intensity of the driver's accelerator and brake and the bumpiness of the road conditions to a certain extent; the entropy value is mathematically defined as the degree of disorder of the system, which is a health indicator suitable for measuring the frequency of discharge current changes. Its calculation method is shown in formula (12)
[0052]
[0053] where p i is the probability of appearing in a discharge segment when the discharge current is i, and W is the length of the discharge data of this discharge segment.
[0054] Preferably, step S400 specifically includes:
[0055] The deep features of the charging data are calculated. The charging data with a starting SOC less than 81% and a termination SOC greater than 98% in the charging segment are regarded as valid charging data. The charging data of the charging segment are interpolated using the PCHIP interpolation method to obtain the charging voltage V sampled at equal time intervals. ch (k), current I ch (k), temperature T ch (k) and SOC(k) are used as the input of the charging data encoder sub-network, as shown in Equation (13):
[0056] x c ={[V ch (k),I ch (k),T ch (k),SOC(k)] i ,k=1,2,...,L} (13)
[0057] For the charging data encoder, a stacked one-dimensional convolutional neural network is used for encoding. The calculation process of the one-dimensional convolutional neural network is shown in formula (14):
[0058]
[0059] Among them, x j+m-1 Charging data x c The j+m-1th dimension feature, h m is the convolution kernel, b is the bias of the convolutional neural network, and σ(·) is the activation function.
[0060] Preferably, step S500 specifically includes:
[0061] Step S510: Determine the depth feature F of the charging data c Perform health indicators x h Related attention enhancement;
[0062] The alternative indicator of aging mode in the nth charging process And the health indicator HI during battery use 1 ,HI 2 ,...,HI 6 Integrate them together through vector splicing as a comprehensive health indicator xh , as shown in formula (15)
[0063]
[0064] Calculate x through a fully connected neural network h The query weight Q h , as shown in formula (16); then, the key K of the deep feature of the charging data is calculated using a fully connected neural network c Sum value V c , as shown in formula (17) and formula (18):
[0065]
[0066] Then, the query weight Q reflecting the aging pattern is calculated h Key K c The attention weight is shown in formula (19);
[0067]
[0068] The attention score S c Reflects the charge depth characteristic F c Neutral and health indicators x h The most relevant weight; then, according to formula (20), S c V c Weighted, A c is the charging data deep feature F c The updated fusion features are enhanced by the cross-attention mechanism;
[0069] A c =S c ·V c (20)
[0070] Through the above calculation, the value V c Neutral and health indicators x h The most relevant features are enhanced with attention;
[0071] Step S520: Health index x h Perform deep feature F on charging data c Related attention enhancement;
[0072] The charging depth feature is calculated through a deep neural network to obtain the query weight Q c , use a fully connected neural network to calculate x h Key K h Sum value V h , as shown in equations (21) to (23)
[0073] Q c =Wc q F c (twenty one)
[0074]
[0075] V c =W c v F c (twenty three)
[0076] Then, the query weight Q that reflects the deep features of the charging data is calculated c Key K h The attention weight is shown in formula (24);
[0077]
[0078] The attention weight S h Reflects the health indicator x h Deep features of charging data F c The most relevant weight; then, according to formula (25), S h V h Weighted, A h is the health indicator x h The updated fusion features are enhanced by the cross-attention mechanism;
[0079] A h =S h ·V h (25)
[0080] Through equations (20) and (25), the cross-attention of mechanism and data is completed. This cross-attention mechanism pays different attention to different parts of the deep features of health indicators and charging data by calculating the attention weights, and can obtain a more complementary mechanism and data fusion feature A. c and A h .
[0081] Preferably, step S600 specifically includes:
[0082] Step S610: using a stack of multiple fully connected layers as an output neural network to predict the battery health state;
[0083] Multiple stacked fully connected layers are used as the output neural network to concatenate the features that integrate the mechanism and data. The concatenated fusion features are then input into the output sub-network and mapped to the battery health status label. The calculation formula is shown in formula (26):
[0084]
[0085] in, is the output of the neural network, representing the predicted value of the battery SOH, concat(·) is a matrix concatenation operation, LinearLayers(·) is a stack of multiple fully connected layers, and the calculation method of each fully connected layer is shown in formula (27);
[0086] y o =σ(W i x i +b i ) (27)
[0087] Among them, x i , W i and b i are the input, weight and bias of a single fully connected layer, y o is the output of a single fully connected layer.
[0088] Preferably, step S610 further includes:
[0089] The SmoothL1 loss function is used to calculate the output of the network With the dataset SOH label SOH label The loss between is shown in formula (28):
[0090]
[0091] After obtaining the loss, the Adam optimization algorithm is used to perform back-propagation iterative optimization on the parameters of the neural network. The initial learning rate is set to 0.02. After every 200 iterations, the learning rate is reduced to half of the previous one. After 600 rounds of training, the training process of the charging feature extraction neural network, the cross-attention neural network and the output neural network is completed. After the neural network is trained, the model parameters of the neural network are fixed, and the charging data and health indicators of the vehicle battery are input to predict the health status of the vehicle battery.
[0092] Preferably, step S600 further includes step S620:
[0093] Step S620: Attention weight S based on health index h , analyze the main factors that affect the decline of health status;
[0094] The attention weight S for health indicators h Analyze and obtain the main factors that cause the battery health status to decline. In the process of calculating the attention weight, it represents the health index x h Deep features of charging data F c The most relevant weight of attention weight S h is obtained, therefore, S hConsidered as the output of the network, the attention weight is further expressed as shown in formula (29);
[0095]
[0096] in, are the attention weights of the three aging modes, are the attention weights of the six health indicators respectively. The first k health indicators are selected from large to small according to the value. Then these k health indicators are the k factors that contribute most to the battery capacity degradation.
[0097] (III) Beneficial effects
[0098] The present invention improves and designs a lithium-ion battery health status estimation method based on the cross-attention mechanism. By processing the data of the charging and discharging fragments in the randomized historical data, the multi-faceted health indicators reflecting the battery aging mechanism are extracted from the vehicle data. h , and based on the stacked convolutional neural network, the convolution operation is performed on the charging fragment to obtain the charging data depth feature F c , and uses the cross attention mechanism to fuse the deep features of charging data F c and health indicators x h Based on the cross attention mechanism, the attention of the deep features of the charging data related to the health indicators and the attention of the deep features of the charging data related to the health indicators are enhanced to obtain the fusion feature A that is most relevant to the battery health status. c and A h , in order to accurately predict the battery health status and analyze the reasons for the decline of battery health status.
[0099] First, the voltage, current and temperature operating data of lithium-ion batteries are collected and divided into charging and discharging segments. Then, health indicators reflecting battery aging patterns and usage behaviors are calculated. Health indicators reflecting three aging patterns of battery active material loss, lithium ion loss and conductivity loss are calculated from the charging segment. Health indicators reflecting battery usage behaviors are calculated from the discharging segment, including average charging rate, charging and discharging rate and temperature, charging and discharging depth and temperature, cumulative battery cycles, mileage and discharge current information entropy. A stacked one-dimensional convolutional neural network is used to encode the charging data to obtain the deep features of the charging data. Then, the cross-attention mechanism is used to fuse the charging deep features and health indicators. Based on the cross-attention, the attention enhancement related to the health indicators is performed on the deep features of the charging data and the attention enhancement related to the deep features of the charging data is performed on the health indicators, respectively, to obtain the fusion features most relevant to the battery health status. Finally, the fusion features are input into the fully connected neural network to predict the health status of the battery. In addition, the attention weights of the health indicators are analyzed to obtain the main factors causing the decline in the battery health status.
[0100] The simulation results on a vehicle battery actual operation data set show that even under random charge and discharge conditions, the battery health status estimation method proposed in the present invention can accurately construct health indicators that reflect the battery aging pattern, achieve interpretable estimation of the health status, and analyze the main factors affecting the decline in health status, helping vehicle operating departments and users to improve battery usage and charging and discharging strategies, and has practical application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0101] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments:
[0102] Figure 1 A schematic diagram of a process for estimating the health status of a lithium-ion battery based on a cross-attention mechanism provided by the present invention;
[0103] Figure 2 A flow chart of calculating a health indicator reflecting a battery active material loss aging mode from a charging segment in the present invention;
[0104] Figure 3 The overall architecture diagram of the battery health status estimation neural network based on the cross-attention mechanism in the present invention;
[0105] Figure 4This is a comparison chart of the battery health status estimation effects of the algorithm proposed in the present invention (referred to as crossattention) on a vehicle battery actual operation data set, and the traditional convolutional neural network (CNN network) and self-attention neural network (self attention), label SOH is the actual SOH state label value. DETAILED DESCRIPTION
[0106] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0107] In order to solve the problems that lithium-ion batteries are mostly shallowly charged and discharged during actual use, it is difficult to construct health indicators that accurately reflect the battery aging mechanism, it is difficult to predict the battery health status under random charging and discharging conditions, and the prediction results lack interpretability, the present invention improves and designs a lithium-ion battery health status estimation method based on the cross-attention mechanism.
[0108] like Figure 1 As shown, the lithium-ion battery health state estimation method based on the cross-attention mechanism specifically includes the following steps:
[0109] Step S100, data preparation, during the use of the lithium-ion battery, obtaining the historical data of the battery total voltage, total current, temperature and state of charge recorded by the battery management system.
[0110] The historical data of lithium-ion batteries of a certain model of electric vehicles for up to 500 days are collected. The underlying battery management system of this model of electric vehicles records the total voltage, total current, 17 temperature probe values, state of charge (SOC), charging status flag, and mileage of the battery pack. These data are sent from the underlying battery management system to the cloud platform once every 10 seconds. These data are obtained from the cloud platform, and the abnormal values, null values, and overflow values in the data are removed. The median value of the 17 temperature probe values is used as the temperature to complete the data preparation.
[0111] Step S200: dividing the charging and discharging segments, dividing the charging segment and the discharging segment in the historical data according to the charging flag bit.
[0112] When the charging flag bit of the historical data is "charging" or "charging completed", the historical data is divided into the charging segment; when the charging flag bit of the historical data is "discharging", the historical data is divided into the discharging segment.
[0113] Step S300: Calculate the health index x reflecting the battery aging pattern and usage behavior h , health indicators reflecting three aging modes of battery active material loss, lithium ion loss and conductivity loss are calculated from the charging segment; health indicators reflecting battery usage behavior are also calculated from the charging and discharging segments, including six types of health indicators of usage behavior: average charging rate, charging and discharging rate and temperature, charging and discharging depth and temperature, cumulative battery cycle times, mileage and discharge current information entropy.
[0114] Wherein, step S300 specifically includes the following steps:
[0115] Step S310: Calculate the health index reflecting the battery active material loss (LAM) aging mode from the charging segment
[0116] From the calibration data of the electric vehicle battery pack or the factory test data of the battery pack, find an approximate constant current charging data from a lower starting SOC, such as SOC = 20%, SOC = 30%, etc., to SOC = 100%, and use formula (1) to calculate the IC curve of the charging process, such as Figure 2 As shown in Figure (a).
[0117]
[0118] Then, the starting SOC and ending SOC are selected to contain all IC peaks, denoted as and
[0119] once and After being determined, the present invention searches the historical data of the vehicle for the charging start SOC to meet And the termination SOC meets Charging fragments, such as Figure 2 As shown in Figure (b). Since a sudden change in charging current may lead to a sudden change in charging voltage, only the constant current section in the charging segment where the charging current is approximately constant is intercepted. The intercepted charging current of the approximately constant current section is recorded as I cc (k), the charging voltage is denoted as V cc (k) Figure 2 As shown in Figure (c).
[0120] The charging voltage V for the approximately constant current segmentcc (k) Perform a locally weighted scatterplot smoothing (Lowess) to remove the impact of low sampling accuracy on the charging voltage. Then, the smoothed voltage is interpolated using the piecewise cubic Hermite interpolation polynomial (PCHIP). PCHIP interpolation is a shape-preserving interpolation method, which means that the extreme points, inflection points and other characteristic points of the data will be retained during the interpolation process, thereby avoiding the distortion of the voltage curve shape by the interpolation result. The voltage after smoothing and interpolation is recorded as At this time, the portion of the charging voltage ΔV→0 is sufficiently reduced, such as Figure 2 As shown in Figure (d).
[0121] like Figure 2 As shown in Figure (e), the incremental capacity IC curve is calculated using formula (2):
[0122]
[0123] Among them, ΔQ cc (k) is the charging capacity of the approximate constant current section at the current time k, and sigmoid(·) is the sigmoid function.
[0124] Formula (3) is used to calculate the health index reflecting the loss of battery active material LAM
[0125]
[0126] in, and The first and nth charging of the battery respectively The peak value of the curve, max is the maximum value function.
[0127] Step S320: Calculate a health indicator reflecting the battery lithium ion loss (LLI) aging mode from the charging segment
[0128] Battery lithium ion loss (LLI) is caused by side reactions such as SEI layer growth, electrolyte decomposition and lithium deposition during lithiation / delithiation, which consume lithium ions in the electrolyte. The capacity charged between fixed SOC intervals is used to quantitatively quantify the LLI aging pattern. A starting SOC and an ending SOC are selected to cover most of the random charging conditions in the dataset, denoted as and The corresponding times are k1 and k 2 ; Then, k 1 and k 2 The partial charge capacity Q s is calculated as shown in formula (4)
[0129]
[0130] Among them, I ch (j) is the charging current at the jth moment, and Δt is the current sampling time interval. Then, calculate Q for the nth charge s and initial Q s The rate of change between As shown in formula (5)
[0131]
[0132] Where Q s,1 and Q s,n The SOC of the battery in the first and nth charging is and The partial charge capacity between.
[0133] Step S330: Calculate a health indicator reflecting the battery conductivity loss (CL) aging mode from the charging segment
[0134] The battery conductivity loss CL is related to the corrosion of the current collector and the decomposition of the binder during the reaction process, and can be quantified by the ohmic internal resistance. Since the ohmic internal resistance varies with factors such as temperature and SOC, the relatively fixed ohmic internal resistance at 100% SOC is used as a quantitative indicator of the CL aging mode, as shown in formula (6):
[0135]
[0136] Among them, R ohm,1 and R ohm,k They are the 100% SOC internal resistance of the battery during the 1st and kth charging processes respectively.
[0137] Step S340: Calculate the health index reflecting the battery usage behavior from the charging segment and the discharging segment, using HI 1 , HI 2 , HI 3 , HI 4 , HI 5 , HI 6 Health indicators representing six battery usage behaviors.
[0138] HI 1is the weighted average charge rate: the charge current rate has a certain impact on the aging of the battery. A high charge rate will cause the growth of lithium dendrites and SEI film to a certain extent, which will lead to the growth of LLI. In order to consider the non-constant current charging of the random charge and discharge process, a weighted average charge rate index is defined, as shown in formula (7)
[0139]
[0140] Among them, I ch (k) is the charging current at the kth moment, L is the length of the charging data of this charging segment, Q 0 is the rated capacity of the battery.
[0141] HI 2 is the charge and discharge rate and temperature: the lithium plating of the battery will be aggravated at low temperature and high current charge rate. Therefore, a health index related to charge and discharge depth and temperature is established, as shown in formula (8)
[0142]
[0143] Among them, T ch (k) is the charging temperature, T min The lowest temperature allowed for the battery to operate.
[0144] HI 3 Depth of charge and discharge and temperature: LAM and LLI aging modes are associated with deep depth of charge and discharge and high temperature. It is necessary to define an indicator to measure the driver's charging habits, that is, whether the driver is accustomed to discharging the battery to a higher SOC or discharging it to a lower SOC. Therefore, a health indicator related to depth of charge and discharge and temperature is established, which is defined as the product of the depth of charge and discharge and the average temperature, as shown in formula (9)
[0145]
[0146] Wherein, SOC(0) and SOC(L) represent the starting SOC and ending SOC of the charging segment respectively.
[0147] HI 4 The cumulative number of battery cycles: LAM is related to the number of battery cycles. The increase in the number of cycles will inevitably cause the battery LAM to age. The health index of the cumulative number of cycles of the battery at the nth charge is defined as the sum of the depth of charge DOD of the battery at the first charge to the depth of charge DOD of the nth charge, as shown in formula (10):
[0148]
[0149] Where i is the charging times index and n is the current charging times. SOCi (0) and SOC i (L) is the starting SOC and ending SOC of the i-th charging.
[0150] HI 5 Mileage: The longer the vehicle's mileage, the longer the battery life. Therefore, the vehicle's mileage, usually expressed as "mileage", is directly used as one of the health indicators of the battery life, as shown in formula (11):
[0151] HI 5 =mileage (11)
[0152] HI 6 The information entropy of the discharge current: The frequent changes in the vehicle discharge current measure the intensity of the driver's accelerator and brake and the bumpiness of the road conditions to a certain extent. The entropy value is mathematically defined as the degree of disorder of the system. It is a health indicator suitable for measuring the frequency of discharge current changes. Its calculation method is shown in formula (12)
[0153]
[0154] where p i is the probability of appearing in a discharge segment when the discharge current is i, and W is the length of the discharge data of this discharge segment.
[0155] Step S400: Use a stacked convolutional neural network to perform convolution operations on the charging segment to obtain the charging data depth feature F c .
[0156] The charging data with a starting SOC less than 81% and a termination SOC greater than 98% in the charging segment are regarded as valid charging data. In order to solve the problem of inconsistent charging data length caused by random charging, the PCHIP interpolation method is used to interpolate the charging data of the charging segment to obtain the charging voltage V sampled at equal time intervals. ch (k), current I ch (k), temperature T ch (k) and SOC(k) are used as the input of the charging data encoder sub-network, as shown in Equation (13):
[0157] x c ={[V ch (k),I ch (k),T ch (k),SOC(k)] i ,k=1,2,...,L} (13)
[0158] In this embodiment, 256 points of voltage, current, temperature and SOC are sampled at equal intervals.
[0159] For the charging data encoder, a stacked one-dimensional convolutional neural network Conv Block is used for encoding. The calculation process of the one-dimensional convolutional neural network is shown in formula (14):
[0160]
[0161] Among them, x j+m-1 Charging data x c The j+m-1th dimension feature, h m is the convolution kernel, b is the bias of the convolutional neural network, σ(·) is the activation function, preferably the Relu activation function. The one-dimensional convolutional neural network captures local patterns by sliding the convolution kernel on the input sequence, which can capture the characteristics of the input raw charging data from local to global, which is conducive to reducing the feature dimension of the raw data, and then learning the high-dimensional abstract feature representation of the raw charging data. The stacked one-dimensional convolutional neural network structure is as follows: Figure 3 As shown in the three "Conv Blocks" in Figure 1, Conv Block includes the batch normalization BatchNorm1d, activation function Relu and maximum pooling MaxPool1d functions that are sequentially connected with the convolution function Conv1d. c The deep features of the charging data obtained.
[0162] Step S500: Using the cross attention mechanism to fuse the deep features F of the charging data c and health indicators x h Based on the cross attention mechanism, the attention of the deep features of the charging data related to the health indicators is enhanced, and the attention of the deep features of the charging data related to the health indicators is enhanced to obtain the fusion feature A that is most relevant to the battery health status. c and A h .
[0163] Preferably, step S500 specifically includes the following steps:
[0164] Step S510: Determine the depth feature F of the charging data c Perform health indicators x h Related attention enhancement.
[0165] The raw data such as the original charging current, voltage and temperature contain potential aging information, but it is not interpretable to use only neural networks to establish the mapping relationship between the raw data and the remaining capacity. Therefore, a deep neural network with cross-attention between health indicators and deep features is designed, and the health indicators with mechanistic significance are used to guide the neural network to extract more representative features from the raw charging data. And the health indicator HI during battery use1 ,HI 2 ,...,HI 6 Integrate them together through vector splicing as a comprehensive health indicator x h , as shown in formula (15)
[0166]
[0167] Calculate x through a fully connected neural network (Fully Connected Neural Network, FN) h The query weight Q h , as shown in formula (16). Then, the key K of the deep feature of charging data is calculated using a fully connected neural network c Sum value V c , as shown in formula (17) and formula (18):
[0168]
[0169]
[0170]
[0171] Then, the query weight Q reflecting the aging pattern is calculated h Key K c The attention weight is shown in formula (19).
[0172]
[0173] The attention score S c Reflects the charge depth characteristic F c Neutral and health indicators x h The most relevant weight. Then, according to formula (20), S c V c Weighted, A c is the charging data deep feature F c The updated fusion features are enhanced by the cross-attention mechanism.
[0174] A c =S c ·V c (20)
[0175] Through the above calculation, the value V c Neutral and health indicators x h The most relevant features are enhanced with attention.
[0176] Step S520: Health index x h Perform deep feature F on charging data cRelated attention enhancement.
[0177] The deep features of charging data are calculated through a deep neural network to obtain the query weight Q c , use a fully connected neural network to calculate x h Key K h Sum value V h , as shown in equations (21) to (23)
[0178]
[0179]
[0180]
[0181] Then, the query weight Q that reflects the deep features of the charging data is calculated c Key K h The attention weight is shown in formula (24).
[0182]
[0183] The attention weight S h Reflects the health indicator x h The feature map F c The most relevant weight. Then, according to formula (25), S h V h Weighted, A h is the health indicator x h The updated fusion features are enhanced by the cross-attention mechanism.
[0184] A h =S h ·V h (25)
[0185] Through equations (20) and (25), the cross attention of mechanism and data is completed. This cross attention mechanism pays different attention to different parts of the deep features of health indicators and charging data by calculating the attention weights, and can obtain a more complementary mechanism and data fusion feature A. c and A h The network structure for calculating the cross attention mechanism is as follows Figure 3 As shown in the “Cross-attention Block” in the figure, MatMul, Scale, and Softmax are matrix multiplication function, scaling function, and normalization function respectively.
[0186] Step S600: Fusion feature A c and A hInput the fully connected neural network to predict the health status of the battery. And, for the health indicator x h The attention weight S h Analyze and obtain the main factors causing the degradation of battery health status.
[0187] Step S600 specifically includes the following steps:
[0188] Step S610: Use stacked multiple fully connected layers as the output neural network to predict the battery health status.
[0189] Multiple stacked fully connected layers are used as the output neural network to concatenate the features that integrate the mechanism and data. The concatenated fusion features are then input into the output sub-network and mapped to the battery health status label. The calculation formula is shown in formula (26):
[0190]
[0191] in, is the output of the neural network (i.e. Figure 3 y value in ), represents the predicted value of battery SOH, concat(·) is a matrix concatenation operation, LinearLayers(·) is a stack of multiple fully connected layers, and the calculation method of each fully connected layer is shown in formula (27).
[0192] y o =σ(W i x i +b i ) (27)
[0193] Among them, x i , W i and b i are the input, weight and bias of a single fully connected layer respectively. o is the output of a single fully connected layer. The SmoothL1 loss function is used to calculate the output of the network With the dataset SOH label SOH label The loss between is shown in formula (28):
[0194]
[0195] After obtaining the loss, the Adam optimization algorithm is used to perform back propagation iterative optimization on the parameters of the neural network. The initial learning rate is set to 0.02, and the learning rate is reduced to half of the previous one every 200 iterations. After 600 rounds of training, the training process of the charging feature extraction neural network, the cross attention neural network, and the output neural network is completed. After the neural network is trained, the model parameters of the neural network are fixed, and the charging data and health indicators of the vehicle battery are input to predict the health status of the vehicle battery.
[0196] Step S620: Attention weight S based on health index h , analyze the main factors affecting the decline in health status.
[0197] The attention weight S for health indicators h For analysis, the attention weight S h Specifically, based on formula (24), the main factors causing the battery health status to decline are obtained. In the process of calculating the attention weight, the health index x h Deep features of charging data F c The most relevant weight of attention weight S h is obtained. Therefore, S h Considered as the output of the network, the present invention further expresses the attention weight as shown in formula (29).
[0198]
[0199] in, are the attention weights of the three aging modes, are the attention weights of the six health indicators, corresponding to the health indicators x in formula (15) h The first k health indicators are selected from large to small values, and these k health indicators are the k factors that contribute most to the battery capacity degradation.
[0200] Accurate estimation of the health status of lithium-ion batteries is crucial to the safe and smooth operation of electric vehicles. However, the characteristics of shallow charging and random charging during battery use make it difficult to extract battery health indicators. The existing methods for extracting health indicators under laboratory conditions are no longer applicable under vehicle-mounted application conditions. The existing health status estimation methods are difficult to accurately establish the causal relationship between health indicators and battery health status, resulting in poor interpretability of the estimation results. In response to these problems, the present invention uses segment charging capacity, sigmoid constraints and 100% SOC internal resistance in random charging segments to construct health indicators reflecting battery aging patterns, respectively, and solves the problem that traditional health indicator construction methods cannot be calculated under actual vehicle-mounted application conditions based on the cross-attention mechanism. The present invention integrates health indicators with deep features of charging data through the cross-attention mechanism, analyzes the main factors affecting the decline of battery health status according to the attention weight, solves the problem of poor interpretability of traditional battery health status estimation methods, helps vehicle operation departments and users improve battery usage and charging and discharging strategies, and has practical application value.
[0201] like Figure 4As shown, the lithium-ion battery health state estimation method based on the cross attention mechanism (cross attention) disclosed in this embodiment is more accurate than the battery health state estimation effect of the traditional convolutional neural network (CNN network) and the self-attention neural network (self attention), and is more in line with the actual value of the SOH label. Therefore, the present invention can be applied to the health state estimation of vehicle-mounted lithium-ion batteries.
[0202] Finally, it is noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A lithium-ion battery health state estimation method based on a cross-attention mechanism, characterized in that: The following steps are involved: Step S100, data preparation, during the use of the lithium-ion battery, obtaining the historical data of the total voltage, total current, temperature and state of charge of the battery recorded by the battery management system; Step S200: dividing the charging and discharging segments, dividing the charging segment and the discharging segment in the historical data according to the charging flag bit; Step S300: Calculate the health index x reflecting the battery aging pattern and usage behavior h , calculate the health indicators reflecting the three aging modes of battery active material loss, lithium ion loss and conductivity loss from the charging segment; also calculate the health indicators reflecting the battery usage behavior from the charging segment and the discharging segment, including the average charging rate, charging and discharging rate and temperature, charging and discharging depth and temperature, battery cumulative cycle number, mileage and discharge current information entropy. Step S400: Use a stacked convolutional neural network to perform convolution operations on the charging segment to obtain the charging data depth feature F c ; Step S500: Using the cross attention mechanism to fuse the deep features F of the charging data c and health indicators x h Based on the cross attention mechanism, the attention of the deep features of the charging data related to the health indicators is enhanced, and the attention of the deep features of the charging data related to the health indicators is enhanced to obtain the fusion feature A that is most relevant to the battery health status. c and A h ; Step S600: Fusion feature A c and A h Input the fully connected neural network to predict the health status of the battery; and the health indicator x h The attention weight S h Analyze and obtain the main factors causing the degradation of battery health status.
2. The lithium-ion battery health state estimation method based on the cross-attention mechanism according to claim 1 is characterized in that: Step S200 specifically includes: When the charging flag of the historical data is "charging" or "charging completed", the historical data is divided into the charging segment; when the charging flag of the historical data is "discharging", the historical data is divided into the discharging segment.
3. The lithium-ion battery health state estimation method based on the cross-attention mechanism according to claim 1 is characterized in that: Step S300 specifically includes: Step S310: Calculating a health index reflecting the battery active material loss aging pattern from the charging segment The approximate constant current charging current is intercepted from the charging data of the charging segment and recorded as I cc (k), the charging voltage is denoted as V cc (k), charging voltage V for the approximately constant current segment cc (k) Smoothing and interpolation are performed to obtain The incremental capacity curve is calculated using formula (2) Among them, ΔQ cc (k) is the charging capacity of the approximate constant current section at the current time k, and sigmoid(·) is the sigmoid function; Formula (3) is used to calculate the health index reflecting the loss of battery active materials in, and The first and nth charging of the battery respectively The peak value of the curve, max is the maximum value function; Step S320: Calculate a health indicator reflecting the battery lithium ion loss aging pattern from the charging segment The capacity charged between fixed SOC intervals is used to quantitatively quantify the battery lithium ion loss aging mode. A starting SOC and an ending SOC are selected to cover most of the random charging conditions in the dataset, denoted as and The corresponding times are k1 and k2 respectively; then, the partial charge capacity Q between k1 and k2 s is calculated as shown in formula (4) Among them, I ch (j) is the charging current at the jth moment, Δt is the current sampling time interval; then, calculate the Q of the nth charge s and initial Q s The rate of change between As shown in formula (5) Where Q s,1 and Q s,n The SOC of the battery in the first and nth charging is and The partial charge capacity between Step S330: Calculating a health indicator reflecting a battery conductivity loss aging pattern from the charging segment; The battery conductivity loss is quantified by the ohmic internal resistance. Since the ohmic internal resistance varies with temperature and SOC factors, the relatively fixed ohmic internal resistance at 100% SOC is used as a quantitative indicator of the battery conductivity loss aging mode, as shown in formula (6): Among them, R ohm,1 and R ohm,k They are the 100% SOC internal resistance of the battery during the 1st and kth charging processes respectively.
4. The lithium-ion battery health state estimation method based on the cross-attention mechanism according to claim 3 is characterized in that: Step S300 also includes step S340: Step S340: Calculate health indicators reflecting battery usage behavior from the charging segment and the discharging segment, represented by HI1, HI2, HI3, HI4, HI5, and HI6 respectively; HI1 is the weighted average charging rate: In order to consider the non-constant current charging condition of the random charging and discharging process, a weighted average charging rate index is defined, as shown in formula (7): Among them, I ch (k) is the charging current at the kth moment, L is the length of the charging data of this charging segment, and Q0 is the rated capacity of the battery; HI2 is the charge and discharge rate and temperature: Establish a health index related to charge and discharge depth and temperature, as shown in formula (8) Among them, T ch (k) is the charging temperature, T min The lowest temperature allowed for the battery to operate; HI3 is the charge and discharge depth and temperature: Establish a health index related to the charge and discharge depth and temperature, which is defined as the product of the charge and discharge depth and the average temperature, as shown in formula (9): Wherein, SOC(0) and SOC(L) represent the starting SOC and ending SOC of the charging segment respectively; HI4 is the cumulative number of battery cycles: it is defined as the cumulative number of battery cycles at the nth charge. The health indicator is the sum of the battery's charging depth from the first charge to the nth charge, as shown in formula (10): Where i is the charging times index, n is the current charging times; SOC i (0) and SOC i (L) is the starting SOC and ending SOC of the i-th charging; HI5 is the mileage: The vehicle's mileage is expressed as "mileage" and is directly used as one of the health indicators of the battery usage process, as shown in formula (11) HI5=mileage (11) HI6 is the discharge current information entropy: the frequent changes in the vehicle discharge current measure the intensity of the driver's accelerator and brake and the bumpiness of the road conditions to a certain extent; the entropy value is mathematically defined as the degree of disorder of the system, which is a health indicator suitable for measuring the frequency of discharge current changes. Its calculation method is shown in formula (12) where p i is the probability of appearing in a discharge segment when the discharge current is i, and W is the length of the discharge data of this discharge segment.
5. The lithium-ion battery health state estimation method based on the cross-attention mechanism according to claim 4 is characterized in that: Step S400 specifically includes: The deep features of the charging data are calculated. The charging data with a starting SOC less than 81% and a termination SOC greater than 98% in the charging segment are regarded as valid charging data. The charging data of the charging segment are interpolated using the PCHIP interpolation method to obtain the charging voltage V sampled at equal time intervals. ch (k), current I ch (k), temperature T ch (k) and SOC(k) are used as the input of the charging data encoder sub-network, as shown in Equation (13): x c ={[V ch (k),I ch (k),T ch (k),SOC(k)] i ,k=1,2,...,L} (13) For the charging data encoder, a stacked one-dimensional convolutional neural network is used for encoding. The calculation process of the one-dimensional convolutional neural network is shown in formula (14): Among them, x j+m-1 Charging data x c The j+m-1th dimension feature, h m is the convolution kernel, b is the bias of the convolutional neural network, and σ(·) is the activation function.
6. The lithium-ion battery health state estimation method based on the cross-attention mechanism according to claim 5 is characterized in that: Step S500 specifically includes: Step S510: Determine the depth feature F of the charging data c Perform health indicators x h Related attention enhancement; The alternative indicator of aging mode in the nth charging process The health indicators HI1, HI2, ..., HI6 of the battery usage process are integrated together through vector splicing as a comprehensive health indicator x h , as shown in formula (15) Calculate x through a fully connected neural network h The query weight Q h , as shown in formula (16); then, the key K of the deep feature of the charging data is calculated using a fully connected neural network c Sum value V c , as shown in formula (17) and formula (18): Then, the query weight Q reflecting the aging pattern is calculated h Key K c The attention weight is shown in formula (19); The attention score S c Reflects the charge depth characteristic F c Neutral and health indicators x h The most relevant weight; then, according to formula (20), S c V c Weighted, A c is the charging data deep feature F c The updated fusion features are enhanced by the cross-attention mechanism; A c =S c ·V c (20) Through the above calculation, the value V c Neutral and health indicators x h The most relevant features are enhanced with attention; Step S520: Health index x h Perform deep feature F on charging data c Related attention enhancement; The deep features of charging data are calculated through a deep neural network to obtain the query weight Q c , use a fully connected neural network to calculate x h Key K h Sum value V h , as shown in equations (21) to (23) Then, the query weight Q that reflects the deep features of the charging data is calculated c Key K h The attention weight is shown in formula (24); The attention weight S h Reflects the health indicator x h Deep features of charging data F c The most relevant weight; then, according to formula (25), S h V h Weighted, A h is the health indicator x h The updated fusion features are enhanced by the cross-attention mechanism; A h =S h ·V h (25) Through equations (20) and (25), the cross-attention of mechanism and data is completed. This cross-attention mechanism pays different attention to different parts of the deep features of health indicators and charging data by calculating the attention weights, and can obtain a more complementary mechanism and data fusion feature A. c and A h .
7. The lithium-ion battery health state estimation method based on the cross-attention mechanism according to claim 6 is characterized in that: Step S600 specifically includes: Step S610: using a stack of multiple fully connected layers as an output neural network to predict the battery health state; Multiple stacked fully connected layers are used as the output neural network to concatenate the features that integrate the mechanism and data. The concatenated fusion features are then input into the output sub-network and mapped to the battery health status label. The calculation formula is shown in formula (26): in, is the output of the neural network, representing the predicted value of the battery SOH, concat(·) is a matrix concatenation operation, LinearLayers(·) is a stack of multiple fully connected layers, and the calculation method of each fully connected layer is shown in formula (27); y o =σ(W i x i +b i ) (27) Among them, x i , W i and b i are the input, weight and bias of a single fully connected layer, y o is the output of a single fully connected layer.
8. The lithium-ion battery health state estimation method based on the cross-attention mechanism according to claim 7 is characterized in that: Step S610 also includes: The SmoothL1 loss function is used to calculate the output of the network With the dataset SOH label SOH label The loss between is shown in formula (28): After obtaining the loss, the Adam optimization algorithm is used to perform back-propagation iterative optimization on the parameters of the neural network. The initial learning rate is set to 0.
02. After every 200 iterations, the learning rate is reduced to half of the previous one. After 600 rounds of training, the training process of the charging data deep feature extraction neural network, the cross-attention neural network and the output neural network is completed. After the neural network is trained, the model parameters of the neural network are fixed, and the charging data and health indicators of the vehicle battery are input to predict the health status of the vehicle battery.
9. The lithium-ion battery health state estimation method based on the cross-attention mechanism according to claim 7 is characterized in that: Step S600 further includes step S620: Step S620: Attention weight S based on health index h , analyze the main factors that affect the decline of health status; The attention weight S for health indicators h Analyze and obtain the main factors that cause the battery health status to decline. In the process of calculating the attention weight, it represents the health index x h Deep features of charging data F c The most relevant weight of attention weight S h is obtained, therefore, S h Considered as the output of the network, the attention weight is further expressed as shown in formula (29); in, are the attention weights of the three aging modes, are the attention weights of the six health indicators respectively. The first k health indicators are selected from large to small according to the value. Then these k health indicators are the k factors that contribute most to the battery capacity degradation.
Citation Information
Patent Citations
Multi-working-condition SOH estimation method and system based on local stage charging data
CN116577686A
Cited By
SOC-SOH joint estimation method based on double-cross physical guidance framework
CN120142959A
soc-soh joint estimation method based on double-cross physical guiding framework
CN120142959B
Rapid detection method for health state of vehicle lithium iron phosphate battery pack
CN120428129A
Lithium ion battery health state estimation method based on aging multi-channel feature enhancement
CN121856819A
A Health Status Estimation Method for Lithium-ion Batteries Based on Aging Multi-channel Feature Enhancement
CN121856819B