Method and system for estimating state of charge of battery in real time

By constructing a multi-timescale charge-discharge characteristic system and an LCFF model, the problem of insufficient accuracy in traditional battery state of charge estimation is solved, enabling accurate estimation of battery state of charge and real-time monitoring of battery health, thereby improving the safety and performance of electric vehicles.

CN121784553APending Publication Date: 2026-04-03HEFEI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Traditional real-time battery state of charge estimation methods fail to fully exploit time-series information, resulting in insufficient estimation accuracy and inadequate consideration of battery degradation, which affects the safe operation of electric vehicles.

Method used

A multi-timescale charge-discharge feature system is constructed. By combining convolutional neural networks and long short-term memory networks, and through data preprocessing and feature extraction, the local fluctuations and long-term trends of the battery are captured, generating battery health status indicators and improving estimation accuracy.

Benefits of technology

By combining a multi-timescale feature system with the LCFF model, the estimation accuracy of the battery state of charge is significantly improved, the model training cost is reduced, and the health status of the battery pack can be reflected in real time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121784553A_ABST
    Figure CN121784553A_ABST
Patent Text Reader

Abstract

The invention provides a battery charge state real-time estimation method and system, and relates to the technical field of battery management, and the method comprises the steps: collecting the historical charging and discharging data of a battery pack; extracting charging and discharging data of the last cycle in the historical charging and discharging data, and preprocessing the charging and discharging data to obtain a first target data set; processing the first target data set through a pre-constructed multi-time scale charging and discharging characteristic system to obtain a first target characteristic set; the multi-time-scale charging and discharging characteristic system comprises charging characteristic extraction and discharging characteristic extraction; the first target feature set comprises a battery health state index; inputting the first target feature set into a pre-constructed estimation model to obtain a state-of-charge estimation value of the battery pack; the estimation model comprises a convolutional neural network layer, a long-short-term memory network layer and two full-connection layers. The method comprehensively considers the state of health of the battery pack and the time sequence characteristics of the battery discharge process, and can more accurately estimate the state of charge of the battery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of battery management technology, and specifically to a method and system for real-time estimation of battery state of charge. Background Technology

[0002] With the development of new energy electric vehicles, improving the performance of electric vehicle batteries has become an urgent problem to be solved. Currently, the state of charge (SOC) of lithium-ion batteries is mainly detected through a battery management system (BMS). Among these, SOC and SOH are key parameters for monitoring, evaluating, and managing battery characteristics. SOC quantifies the remaining capacity of a lithium-ion battery in the current charge-discharge cycle, which is crucial for the safe operation of electric vehicles. SOH reflects the degree of battery aging, involving changes in battery performance, including a decrease in energy density, power density, and capacity, as well as an increase in internal resistance.

[0003] Current real-time estimation of battery state of charge typically uses a Long Short-Term Memory (LSTM) network to learn the battery's SOC variation pattern and estimate the battery's SOC.

[0004] However, this traditional estimation method fails to fully extract time series information. In actual operation, the current and voltage data of the battery pack fluctuate greatly, making it difficult for the model to effectively extract time series information and affecting the estimation accuracy of the SOC estimation model. Summary of the Invention

[0005] (a) Technical problems to be solved To address the shortcomings of existing technologies, this invention provides a method and system for real-time estimation of battery state of charge, which solves the problem of insufficient accuracy in traditional real-time estimation of battery state of charge.

[0006] (II) Technical Solution To achieve the above objectives, the present invention provides the following technical solution: In a first aspect, this application provides a method for real-time estimation of the state of charge of a battery, the method comprising: Collect historical charge and discharge data of the battery pack; the historical charge and discharge data includes voltage data and current data of multiple charge and discharge cycles; Extract the charge and discharge data from the last cycle of the historical charge and discharge data and perform preprocessing to obtain the first target dataset; the preprocessing includes outlier removal and missing value imputation; The first target dataset is processed by a pre-constructed multi-timescale charge-discharge feature system to obtain a first target feature set; the multi-timescale charge-discharge feature system includes charging feature extraction and discharging feature extraction; the first target feature set includes battery health status indicators. The first target feature set is input into a pre-built estimation model to obtain the state of charge estimate of the battery pack. The estimation model includes a convolutional neural network layer, a long short-term memory network layer, and two fully connected layers. The convolutional neural network layer is used to mine hidden features, the long short-term memory network layer is used to capture short-term fluctuations and long-term trends, the first fully connected layer is used to generate a unified feature representation, and the second fully connected layer is used to generate the state of charge estimate of the battery pack.

[0007] Preferably, the method further includes: The historical charge and discharge data are preprocessed to obtain the second target dataset; The second target dataset is processed by a pre-constructed multi-timescale charge-discharge feature system to obtain the second target feature set; The initial estimation model is trained using the second target feature set to obtain the trained estimation model.

[0008] Preferably, the method further includes determining the fitting performance of the estimated model through model evaluation metrics, the model evaluation metrics including... MAE , MSE , R 2 ; The MAE for: The MSE for: The R 2 for: In the formula, For sample size, For the first i SOC observations for each sample, For the first i SOC estimates for each sample This is the average of the SOC observations for all samples.

[0009] Preferably, the multi-timescale charge-discharge characteristic system includes: The voltage data from multiple charging cycles in the second target dataset are fitted into a sample voltage curve; The increase in charge of the battery pack during the corresponding time period is calculated based on the sample voltage curve, and the mapping relationship between voltage value and charge is recorded as a charging template. The actual capacity interval is calculated based on the voltage and charge values ​​in the second target dataset, and the rated capacity interval is calculated based on the voltage and charge values ​​of the charging template. The battery health index is calculated by using the actual capacity interval as the dividend and the rated capacity interval as the divisor.

[0010] Preferably, the multi-timescale charge-discharge feature system includes discharge feature extraction, wherein the discharge features include current components, discharge capacity changes, discharge voltage changes, the ratio of discharge capacity changes to discharge voltage changes, total current, and total voltage within the same time window.

[0011] Preferably, the current component is obtained by decomposing the current using an empirical mode decomposition method; the expression for the empirical mode decomposition method is: In the formula, The input signal is decomposed into M One intrinsic mode function; For the first m One eigenmode function This is the residual component.

[0012] Preferably, fitting the voltage data of multiple charging cycles in the second target dataset into a sample voltage curve includes smoothing the voltage using a Savitzky-Golay filter.

[0013] Secondly, this application also provides a real-time battery state of charge estimation system, the system comprising: The data acquisition module collects historical charge and discharge data of the battery pack; the historical charge and discharge data includes voltage and current data from multiple charge and discharge cycles. The first processing module extracts the charge and discharge data from the last cycle of the historical charge and discharge data and performs preprocessing to obtain the first target dataset; the preprocessing includes outlier removal and missing value imputation; The second processing module processes the first target dataset using a pre-constructed multi-timescale charge-discharge feature system to obtain a first target feature set; the multi-timescale charge-discharge feature system includes charging feature extraction and discharging feature extraction; the first target feature set includes battery health status indicators. The third processing module inputs the first target feature set into a pre-built estimation model to obtain the state of charge (SOC) estimate of the battery pack. The estimation model includes a convolutional neural network layer, a long short-term memory (LSTM) network layer, and two fully connected layers. The convolutional neural network layer is used to mine hidden features, the LSM network layer is used to capture short-term fluctuations and long-term trends, the first fully connected layer is used to generate a unified feature representation, and the second fully connected layer is used to generate the SOC estimate of the battery pack.

[0014] Thirdly, this application also provides a computer-readable storage medium storing a computer program for real-time estimation of battery state of charge, wherein the computer program causes a computer to execute the real-time estimation method of battery state of charge as described above.

[0015] Fourthly, this application also provides an electronic device, comprising: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs including methods for performing real-time estimation of battery state of charge as described above.

[0016] (III) Beneficial Effects This invention provides a method and system for real-time estimation of battery state of charge. Compared with the prior art, it has the following advantages: This application constructs an estimation model LCFF (LSTM layer, CNN layer, and dual FC layer). By simultaneously extracting temporal and local features through the LSTM and CNN layers in the LCFF model, it captures local fluctuations and long-term trends in the input data, greatly improving the accuracy of battery SOC estimation. Simultaneously, a multi-timescale charge-discharge feature system is constructed. Through this system, features are extracted from the input data to obtain the VCF index, which characterizes the battery pack's health state, increasing the diversity of battery SOC estimation. Attached Figure Description

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

[0018] Figure 1 This is a flowchart illustrating the real-time battery state of charge estimation method in the embodiments of this application; Figure 2 This is a schematic diagram of voltage curve fitting provided in an embodiment of this application; Figure 3 This is a schematic diagram of the modules of the real-time battery state of charge estimation system in the embodiments of this application; Figure 4 A comparison chart of multiple models in the test set provided in the embodiments of this application. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are described clearly and completely. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] This application provides a method and system for real-time estimation of battery state of charge, which solves the problem of insufficient estimation accuracy of traditional estimation methods and achieves accurate estimation of battery state of charge.

[0021] The technical solution in this application is to solve the above-mentioned technical problems, and the general idea is as follows: Currently, significant progress has been made in the research on real-time estimation of remaining capacity of lithium battery packs, but the following problems still exist: (1) Existing data-driven SOC estimation models require high sample quality. Training machine learning models requires a large amount of sample data, and the samples need to cover complex multi-dimensional operating conditions. However, high-quality sample collection is costly and time-consuming, while the data quality of battery packs in actual operation is poor and prone to noise interference. (2) Time series information has not been fully explored. During actual operation, the current and voltage data of battery packs fluctuate greatly, making it difficult for the model to effectively extract time series information, which affects the generalization of SOC estimation models. (3) Insufficient consideration of battery degradation. The calculation of SOH generally requires determining the actual capacity of the battery through full charging and discharging. In actual operation, this will affect the normal use of the battery pack and make it impossible to make a normalized estimate.

[0022] The real-time estimation method for remaining capacity of lithium battery packs based on multidimensional time feature extraction of the present invention includes four modules: a data acquisition and preprocessing module, a feature derivation module, a model building and fitting module, and a real-time SOC estimation module for the battery pack. The data acquisition and preprocessing module includes the acquisition of battery pack operating condition data and the processing of outliers and missing values. The feature derivation module includes three steps: feature extraction during the battery pack charging process, multidimensional time feature extraction during the battery pack discharging process, and the construction of a multi-timescale charge-discharge feature system. The model building and fitting module includes two steps: the construction of the LCFF model and the training and testing of the LCFF model. The real-time SOC estimation module includes the acquisition of real-time battery pack data, feature derivation based on the real-time data, and the estimation process of the LCFF model.

[0023] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.

[0024] Example 1: like Figure 1 As shown in the figure, this application provides a method for real-time estimation of battery state of charge, including the following steps: Step S110: Collect historical charge and discharge data of the battery pack; historical charge and discharge data includes voltage and current data from multiple charge and discharge cycles.

[0025] Step S120: Extract the charge and discharge data from the last cycle of the historical charge and discharge data and perform preprocessing to obtain the first target dataset; the preprocessing includes outlier removal and missing value imputation.

[0026] Step S130: The first target dataset is processed by a pre-constructed multi-timescale charge-discharge feature system to obtain a first target feature set; the multi-timescale charge-discharge feature system includes charging feature extraction and discharging feature extraction; the first target feature set includes battery health status indicators.

[0027] Step S140: Input the first target feature set into the pre-built estimation model to obtain the state of charge estimate of the battery pack. The estimation model includes a convolutional neural network layer, a long short-term memory network layer and two fully connected layers. The convolutional neural network layer is used to mine hidden features, the long short-term memory network layer is used to capture short-term fluctuations and long-term trends, the first fully connected layer is used to generate a unified feature representation, and the second fully connected layer is used to generate the state of charge estimate of the battery pack.

[0028] In this embodiment, an estimation model LCFF (LSTM layer, CNN layer, and dual FC layer) is constructed. By simultaneously extracting temporal and local features through the LSTM and CNN layers in the LCFF model, local fluctuations and long-term trends in the input data are captured, greatly improving the accuracy of battery SOC estimation. Simultaneously, a multi-timescale charge-discharge feature system is constructed. Through this system, features are extracted from the input data to obtain the VCF index, which characterizes the battery pack's health state, increasing the diversity of battery state-of-charge estimation.

[0029] Step S110: Collect historical charge and discharge data of the battery pack; historical charge and discharge data includes voltage and current data from multiple charge and discharge cycles.

[0030] Specifically, in the electric vehicle battery management system, voltage and current data from the historical charging and discharging processes of the lithium battery pack, as well as the number of battery charge-discharge cycles, are collected.

[0031] In this embodiment, data is collected to provide data input for model training and inference.

[0032] Step S120: Extract the charge and discharge data from the last cycle of the historical charge and discharge data and perform preprocessing to obtain the first target dataset; the preprocessing includes outlier removal and missing value imputation.

[0033] Specifically, during the model inference phase, only the last charge-discharge cycle from the historical charge-discharge data needs to be extracted as the model input, i.e., the charging and discharging data within the charge-discharge process at the current detection time. The extracted dataset is then preprocessed, including outlier removal and missing value imputation. Outliers are removed, such as 10 consecutive time steps with a voltage of 0V. Missing values ​​are imputed by taking the mean of the preceding and following data points.

[0034] In this embodiment, by extracting and preprocessing data appropriately, the accuracy of the model input data is ensured, and the model output efficiency and estimation accuracy are improved.

[0035] Step S130: The first target dataset is processed by a pre-constructed multi-timescale charge-discharge feature system to obtain a first target feature set; the multi-timescale charge-discharge feature system includes charging feature extraction and discharging feature extraction; the first target feature set includes battery health status indicators.

[0036] In this embodiment, a multi-timescale charge-discharge feature system, denoted as EFS (Enriched Feature Set), is pre-constructed. The multi-timescale charge-discharge feature system includes charging feature extraction and discharging feature extraction, resulting in the EFS feature set. Features extracted from discharging data within the EFS feature set include the current component (totalcurrent_mode_i), discharge capacity change (delta_q_window), discharge voltage change (delta_v_window), the ratio of discharge capacity change to discharge voltage change (IC_window), total current (totalcurrent), and total voltage (totalvoltage). Features extracted from charging data within the EFS feature set are the battery health indicator VCF (Voltage-Capacity-Feature).

[0037] Specifically, for each discharge phase within a cycle, the change in charge (delta_q) and voltage (delta_v) from the previous sampling point to the current sampling point is calculated using the total current and voltage data of the battery pack. During the operation of an electric vehicle, the current fluctuates significantly, mainly due to changes in operating conditions and the energy recovery mechanism. To extract regularity information from the discharge current, the Empirical Mode Decomposition (EMD) method is used to decompose the current. EMD is a method for processing time-frequency domain signals. It can decompose the signal based on the time characteristics of the original input data, separating signal components at different levels and residuals. These signal components at different levels are called Intrinsic Mode Functions (IMFs). The EMD decomposition model is shown below: (1) In the formula, The input signal is decomposed into M One eigenmode function For the first m One eigenmode function This is the residual component.

[0038] When using EMD to decompose the current during the battery pack discharge process, the current is decomposed into... M There are 1 signal components, denoted as totalcurrent_mode_i (i=1, ..., ...). M ).

[0039] The discharge characteristics of the battery pack are extracted based on a time window T. The changes in charge (delta_q_window), voltage (delta_v_window), and the ratio between the two changes (IC_window) are calculated from the beginning to the end of the window. It should be noted that the time window T ends at the current detection time and begins at a selected moment in the discharge data of the current charge-discharge cycle. For each sampling point within the time window T, the total current and voltage of the battery pack are also used as characteristics of the discharge process, denoted as totalcurrent and totalvoltage, respectively.

[0040] In this embodiment, the multi-timescale charge-discharge feature system includes charging feature extraction. By extracting and calculating features from the charging data of the current cycle, a battery health index, VCF (Voltage-Capacity-Feature), is obtained. This battery health index reflects the performance degradation degree of a single battery and can be calculated as the ratio of the battery's actual capacity to its rated capacity. For different voltage variation ranges in each charging process, the VCF index is created to calculate the capacity change within different voltage ranges during each charging process, thereby characterizing the battery pack's health status. The following embodiment details the VCF construction process, with the specific steps as follows: Step S321: Fit the voltage data of multiple charging cycles in the second target dataset into a sample voltage curve.

[0041] Step S322: Calculate the increase in charge of the battery pack for the corresponding time period based on the sample voltage curve, and record the mapping relationship between voltage value and charge as a charging template.

[0042] Step S323: Calculate the actual capacity interval based on the voltage and charge values ​​in the second target dataset, and calculate the rated capacity interval based on the voltage and charge values ​​of the charging template.

[0043] Step S324: Calculate the battery health status index using the actual capacity interval as the dividend and the rated capacity interval as the divisor.

[0044] Specifically, after preprocessing the raw data, the battery pack dataset is divided into multiple individual cycles, each containing charging and discharging processes. The next key step is to select representative charging processes.

[0045] For example, the charging processes with the lowest voltage at the start of charging and the highest voltage at the end of charging are selected from the first 20 historical cycles. It's worth noting that, according to literature, when the number of charging cycles is less than 20, the total impedance of the battery remains at a low level. The minimum and maximum voltage values ​​during all charging processes are obtained using the following formula: (2) (3) In the formula, For loop The minimum voltage during the charging process; For loop The maximum voltage during the charging process; Indicates all The minimum value in the cycle ; Indicates all The maximum value in the range and belonging to the cycle .

[0046] when Time, cycle With loop There is a discontinuity; therefore, a voltage value is selected from another charging process in the remaining 18 cycles, denoted as . The selected cycle charging voltages are combined as shown in the following formula: (4) In the formula, Indicates a loop All charging voltage values, and For loop The maximum voltage; Indicates a loop All charging voltage values, and For loop The minimum voltage in; Indicates a loop All charging voltage values; and Loops The maximum and minimum voltage values; This is the voltage value after splicing.

[0047] When repeated voltage values ​​exist within the selected cycle, the voltage value of the cycle with the lower average voltage should be selected. See also Figure 2 , Figure 2 This indicates that historical charging data from multiple cycles was fitted to voltage curves and then selected and stitched together to form sample voltage curves. Specifically, the voltage curves from charging cycles (a), (b), and (c) were stitched together to form the sample voltage curve shown in (d). Specific charging processes with maximum and minimum voltage values ​​within a specific time period were extracted from the multiple cyclic datasets. The voltage curves of these selected processes were then stitched together to form sample voltage curves, which were then used as charging templates. These sample voltage curves represent a complete charging cycle from minimum voltage to maximum voltage.

[0048] In order to enhance the regularity of voltage change with charging time in the battery pack charging template, a Savitzky-Golay filter is used to smooth the voltage curve.

[0049] Based on the smooth voltage trajectory in the charging template, the voltage transitions from its minimum to its maximum value. The calculation is performed from the initial sampling time to the... t The amount of charge added to the battery pack at the sampling time. This increase in charge can be calculated by integrating the current over time, as shown in the following expression: (5) in, I This represents the current flowing through the battery pack during charging. t This is the end time of the charging process. Q From the initial sampling time to t The amount of charge already added to the battery pack at that moment.

[0050] In the charging template, the amount of battery charge corresponding to each smoothed voltage value is considered the battery pack's capacity at that voltage level. By establishing the charging template, a one-to-one mapping relationship between smoothed voltage values ​​and capacities during charging is obtained. Therefore, given a specific voltage value, the corresponding battery pack capacity can be determined. That is, given the battery pack's initial voltage, the corresponding amount of charge represents the initial capacity at that initial voltage. Similarly, if a final voltage is provided, the final capacity of the battery pack at that voltage is obtained. The expression for this quantitative relationship is as follows: (6) in, During battery pack charging t Voltage value at time, For correspondence Down The battery pack capacity value.

[0051] Based on the starting voltage of the charging process in each cycle in the battery pack sample ( ) and termination voltage ( The change in electrical quantity during the voltage rise process is considered as the voltage range ( ~ The actual capacity interval of the battery pack within () The expression is as follows: (7) In the formula, and These are the charging times at the beginning and end of the battery pack charging process, respectively. and .

[0052] On the charging template and Corresponding capacity and end capacity It can be obtained through a formula. The charging template's... and The difference is denoted as the battery pack voltage range. ~ The rated capacity range is calculated as follows: (8) In the formula, and They are respectively and The corresponding capacity. Therefore, the voltage range of the battery pack. ~ The rated capacity interval is .

[0053] The battery health status index VCF is calculated using the actual capacity interval as the dividend and the rated capacity interval as the divisor, and the expression is as follows: (9) In this embodiment, charge and discharge features are extracted from the last charge and discharge process at the current detection time using a pre-constructed multi-timescale charge and discharge feature system. Then, all features extracted from the battery pack's discharge and charge processes are concatenated and normalized to obtain the first target dataset. The first target feature set extracted by EFS includes the current component, discharge capacity change, discharge voltage change, the ratio of discharge capacity change to discharge voltage change, total current, total voltage, and VCF within the same time window.

[0054] Step S140: Input the first target feature set into the pre-built estimation model to obtain the state of charge estimate of the battery pack. The estimation model includes a convolutional neural network layer, a long short-term memory network layer and two fully connected layers. The convolutional neural network layer is used to mine hidden features, the long short-term memory network layer is used to capture short-term fluctuations and long-term trends, the first fully connected layer is used to generate a unified feature representation, and the second fully connected layer is used to generate the state of charge estimate of the battery pack.

[0055] Specifically, the LCFF model utilizes LSTM for learning temporal features and a one-dimensional CNN for further mining of hidden features. In essence, the LCFF model integrates one CNN layer, one LSTM layer, and two fully connected (FC) layers. Features are input into the LCFF model and processed simultaneously by the CNN and LSTM layers to capture short-term fluctuations and long-term trends. The outputs of these layers are then combined into a one-dimensional feature representation, which is passed through the first FC layer to generate a unified feature representation; subsequently, the second FC layer generates the SOC estimate.

[0056] The real-time battery state-of-charge estimation method provided in this application obtains the VCF (Vehicle Charge Function) based on the charging data of the charge-discharge cycle in which the battery pack is currently detected during actual use; then, it obtains the remaining features in the EFS (Electronic State of Charge) feature set based on the discharge data of the T time window before the current detection time in this cycle. Finally, the EFS feature set is input into the optimized LCFF model to obtain the real-time estimated SOC (State of Charge) value of the battery pack.

[0057] Example 2: Next, we will further explain the training phase of the model: Step S310: Preprocess the historical charge and discharge data to obtain the second target dataset.

[0058] Step S320: The second target dataset is processed by a pre-constructed multi-timescale charge and discharge feature system to obtain the second target feature set.

[0059] Step S330: Use the second target feature set to train the initial estimation model to obtain the trained estimation model.

[0060] Specifically, the second target dataset includes historical charge cycle data from the battery pack. The second target dataset is processed using a multi-timescale charge-discharge feature system to obtain the second target feature set. This second target feature set is then divided into a training set and a test set, with a ratio of 1:9. The training set is input into the LCFF model for evaluation and hyperparameter tuning. The test set is used to test the LCFF model.

[0061] The initial estimation model was configured with preliminary parameter settings to ensure baseline performance. Specifically, the hyperparameters of the CNN layers were configured as in_channels=1, out_channels=16, and kernel_size=3. The input_size parameter of the LSTM layers was set to the number of input features: hidden_size=8, num_layers=1. In the fully connected layers, the first fully connected (FC) layer had an output dimension of out_features=16, and the second FC layer had an output dimension of out_features=1.

[0062] The model evaluation performance is assessed using model evaluation metrics, which include: MAE , MSE , R 2 .

[0063] MAE Mean Absolute Error (MAE) represents the average absolute error between the estimated and observed values, expressed as: (10) MSE Mean Squared Error (MSE) represents the average of the squared errors between the estimated and observed values, and is expressed as: (11) R 2 The R-squared (ratio of determination) measures a model's ability to explain variation in the data. Its expression is: (12) In the formula, For sample size, For the first i SOC observations for each sample, For the first i SOC estimates for each sample This is the average of the SOC observations for all samples.

[0064] To verify the reliability of the proposed method, the vin2 dataset from the large dataset of lithium-ion batteries for electric vehicles released by the State Key Laboratory of Intelligent Vehicle Safety Technology was used as sample data to validate the proposed method.

[0065] The preprocessed dataset has a size of 723,302. When the ratio of training set to test set is 1:9, the training dataset contains approximately 18.1 hours of data, including two discharge cycles.

[0066] The parameter settings for the LCFF model are as follows: In the CNN layers, the in_channels parameter is set to 1, the out_channels parameter is set to 16, and the kernel_size parameter is set to 3. In the LSTM layers, the input_size parameter is set to the number of input features, the hidden_size parameter is set to 8, and the num_layers parameter is set to 1. In the fully connected layers, the out_features parameter for the first FC layer is set to 16, and the out_features parameter for the second FC layer is set to 1.

[0067] LCFF model adopts MSE The weights are updated using the Adam optimizer with a learning rate of 0.001 as the loss function. Based on empirical observations of training loss convergence, an epoch of 200 is sufficient for model training, as the loss tends to stabilize at this point.

[0068] To evaluate the performance of the LCFF model, it was compared with four other models: Neural Network (NN), LSTM, CNN, and Support Vector Regression (SVR). In the test set, the LCFF model outperformed the NN, LSTM, CNN, and SVR models. R 2 For example Figure 4 As shown.

[0069] like Figure 3 As shown in the figure, this embodiment of the invention also provides a real-time battery state of charge estimation system, including: The data acquisition module 210 collects historical charge and discharge data of the battery pack; the historical charge and discharge data includes voltage and current data from multiple charge and discharge cycles. The first processing module 220 extracts the charge and discharge data from the last cycle of the historical charge and discharge data and performs preprocessing to obtain the first target dataset; the preprocessing includes outlier removal and missing value imputation; The second processing module 230 processes the first target dataset through a pre-constructed multi-timescale charge-discharge feature system to obtain a first target feature set; the multi-timescale charge-discharge feature system includes charging feature extraction and discharging feature extraction; the first target feature set includes battery health status indicators; The third processing module 240 inputs the first target feature set into the pre-built estimation model to obtain the state of charge estimate of the battery pack. The estimation model includes a convolutional neural network layer, a long short-term memory network layer, and two fully connected layers. The convolutional neural network layer is used to mine hidden features, the long short-term memory network layer is used to capture short-term fluctuations and long-term trends, the first fully connected layer is used to generate a unified feature representation, and the second fully connected layer is used to generate the state of charge estimate of the battery pack.

[0070] It is understood that the real-time battery state of charge estimation system provided in this embodiment of the invention corresponds to the real-time battery state of charge estimation method described above. The explanations, examples, and beneficial effects of the relevant content can be referred to the corresponding content in the real-time battery state of charge estimation method, and will not be repeated here.

[0071] This invention also provides a computer-readable storage medium storing a computer program for a real-time battery state of charge estimation method, wherein the computer program causes a computer to execute the real-time battery state of charge estimation method as described above.

[0072] This application also provides an electronic device, including: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs including methods for performing the real-time battery state of charge estimation method as described above.

[0073] In summary, compared with existing technologies, it has the following beneficial effects: 1. This application's embodiments obtain the latest battery health status based on a partial charging process. A battery pack charging template is constructed, and based on the charging process with different start and end voltages of the battery pack, the VCF (Vehicle Function Factor) index, which characterizes the battery pack's health status, is obtained. Furthermore, this index can reflect the latest performance degradation of the battery pack based on the latest charging process data.

[0074] 2. This application's embodiments construct a multi-timescale charge-discharge feature system. In addition to the VCF index obtained during the charging process, this method extracts discharge features at different time granularities, constructing a multi-timescale charge-discharge feature system covering sample sampling intervals, time windows, and charging process duration, providing more explicit features for the SOC estimation model.

[0075] 3. The LCFF model in this application embodiment has the ability to simultaneously extract temporal and local features. The combined use of LSTM and CNN can simultaneously extract temporal and local information from the charging and discharging feature system at multiple time scales. Furthermore, the LCFF model can further mine hidden features and utilize fully connected layers for feature fusion, improving the model's SOC estimation accuracy.

[0076] 4. The embodiments of this application reduce the cost of model training. By combining the feature derivation capabilities of the multi-timescale charge-discharge feature system with the feature mining advantages of the LCFF model, the number of samples required for LCFF model training is reduced, thereby lowering the model training cost.

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

[0078] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for real-time estimation of battery state of charge, characterized in that, The method includes: Collect historical charge and discharge data of the battery pack; the historical charge and discharge data includes voltage data and current data of multiple charge and discharge cycles; Extract the charge and discharge data from the last cycle of the historical charge and discharge data and perform preprocessing to obtain the first target dataset; the preprocessing includes outlier removal and missing value imputation; The first target dataset is processed by a pre-constructed multi-timescale charge-discharge feature system to obtain a first target feature set; the multi-timescale charge-discharge feature system includes charging feature extraction and discharging feature extraction; the first target feature set includes battery health status indicators. The first target feature set is input into a pre-built estimation model to obtain the state of charge (SOC) estimate of the battery pack. The estimation model includes a convolutional neural network layer, a long short-term memory (LSTM) network layer, and two fully connected layers. The convolutional neural network layer is used to mine hidden features, the LSM network layer is used to capture short-term fluctuations and long-term trends, the first fully connected layer is used to generate a unified feature representation, and the second fully connected layer is used to generate the SOC estimate of the battery pack.

2. The real-time battery state of charge estimation method according to claim 1, characterized in that, The method further includes: The historical charge and discharge data are preprocessed to obtain the second target dataset; The second target dataset is processed by a pre-constructed multi-timescale charge-discharge feature system to obtain the second target feature set; The initial estimation model is trained using the second target feature set to obtain the trained estimation model.

3. The real-time battery state of charge estimation method according to claim 2, characterized in that, The method further includes determining the fitting performance of the estimated model through model evaluation metrics, the model evaluation metrics including... MAE , MSE , R 2 ; The MAE for: The MSE for: The R 2 for: In the formula, For sample size, For the first i SOC observations for each sample, For the first i SOC estimates for each sample This is the average of the SOC observations for all samples.

4. The real-time battery state of charge estimation method according to claim 2, characterized in that, The multi-timescale charge-discharge characteristic system includes: The voltage data from multiple charging cycles in the second target dataset are fitted into a sample voltage curve; The increase in charge of the battery pack during the corresponding time period is calculated based on the sample voltage curve, and the mapping relationship between voltage value and charge is recorded as a charging template. The actual capacity interval is calculated based on the voltage and charge values ​​in the second target dataset, and the rated capacity interval is calculated based on the voltage and charge values ​​of the charging template. The battery health status index is calculated by using the actual capacity interval as the dividend and the rated capacity interval as the divisor.

5. The real-time battery state of charge estimation method according to claim 1, characterized in that, The multi-timescale charge and discharge feature system includes discharge feature extraction, which includes current components, discharge capacity changes, discharge voltage changes, the ratio of discharge capacity changes to discharge voltage changes, total current, and total voltage within the same time window.

6. The real-time battery state of charge estimation method according to claim 5, characterized in that, The current component is obtained by decomposing the current using the empirical mode decomposition method; the expression for the empirical mode decomposition method is: In the formula, The input signal is decomposed into M One intrinsic mode function; For the first m One eigenmode function This is the residual component.

7. The real-time battery state of charge estimation method according to claim 4, characterized in that, The step of fitting the voltage data of multiple charging cycles in the second target dataset into a sample voltage curve includes smoothing the voltage using a Savitzky-Golay filter.

8. A real-time battery state of charge estimation system, characterized in that, The system includes: The data acquisition module collects historical charge and discharge data of the battery pack; the historical charge and discharge data includes voltage and current data from multiple charge and discharge cycles. The first processing module extracts the charge and discharge data from the last cycle of the historical charge and discharge data and performs preprocessing to obtain the first target dataset; the preprocessing includes outlier removal and missing value imputation; The second processing module processes the first target dataset using a pre-constructed multi-timescale charge-discharge feature system to obtain a first target feature set; the multi-timescale charge-discharge feature system includes charging feature extraction and discharging feature extraction; the first target feature set includes battery health status indicators. The third processing module inputs the first target feature set into a pre-built estimation model to obtain the state of charge (SOC) estimate of the battery pack. The estimation model includes a convolutional neural network layer, a long short-term memory (LSTM) network layer, and two fully connected layers. The convolutional neural network layer is used to mine hidden features, the LSM network layer is used to capture short-term fluctuations and long-term trends, the first fully connected layer is used to generate a unified feature representation, and the second fully connected layer is used to generate the SOC estimate of the battery pack.

9. A computer-readable storage medium, characterized in that, It stores a computer program for real-time estimation of battery state of charge, wherein the computer program causes the computer to execute the real-time estimation method of battery state of charge as described in any one of claims 1 to 7.

10. An electronic device, characterized in that, include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs including methods for performing real-time estimation of battery state of charge as described in any one of claims 1 to 7.