Real-time data streaming analysis method for power battery based on extended kalman filter
By employing a real-time streaming analysis method for power battery data based on extended Kalman filtering, and utilizing a dual RC equivalent circuit model and the sunflower optimization algorithm to optimize the noise covariance matrix, the problems of low parameter tuning efficiency and insufficient model adaptability in SOC estimation are solved. This achieves high-precision and real-time SOC estimation, supporting range prediction and safety warning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA AUTOMOTIVE ENG RES INST
- Filing Date
- 2026-03-23
- Publication Date
- 2026-06-19
AI Technical Summary
Existing technologies for estimating the state of charge (SOC) of power batteries suffer from problems such as low parameter tuning efficiency, unstable estimation accuracy, and insufficient model adaptability, making it difficult to meet the requirements of high accuracy, strong real-time performance, and robustness across operating conditions, especially in dynamic driving cycles and complex environments.
A real-time streaming analysis method for power battery data based on extended Kalman filtering is adopted. Online model parameter identification is performed through a dual RC equivalent circuit model and a recursive least squares method with a variable forgetting factor. The covariance matrix of process noise and measurement noise is optimized by combining the sunflower optimization algorithm to achieve adaptive optimization and real-time update of SOC.
It improves the accuracy and stability of SOC estimation, can adapt to changes in battery operating conditions and aging stages, outputs real-time and reliable SOC values, and supports range prediction, thermal management, and safety warnings.
Smart Images

Figure CN122238896A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power battery monitoring technology, and specifically to a real-time streaming analysis method for power battery data based on Kalman filtering. Background Technology
[0002] Accurate estimation of the State of Charge (SOC) of a power battery is one of the core issues in energy management and safety control of new energy vehicles. SOC directly reflects the remaining battery capacity, and its estimation accuracy not only affects the reliability of the vehicle's range prediction but also directly relates to the formulation of charging and discharging strategies, battery equalization management, and the trigger thresholds of safety protection mechanisms such as overcharging and over-discharging. Since SOC cannot be directly measured by sensors, it must be indirectly calculated using algorithms based on physical quantities such as voltage, current, and temperature collected by the battery management system. Therefore, SOC estimation algorithms have always been a research hotspot in the field of power battery technology. Currently, mainstream SOC estimation methods can be divided into several categories. The first category is traditional methods, including the ampere-hour integration method and the open-circuit voltage method. The ampere-hour integration method calculates the change in SOC by integrating the current over time. It is simple in principle and easy to implement, and is the basic method for many commercial BMS systems. However, this method has inherent defects: the measurement error of the current sensor accumulates continuously during the integration process, causing the estimated SOC value to gradually deviate from the true value over time. Furthermore, the initial SOC cannot be accurately obtained, and its accuracy is difficult to guarantee under long-term operation or complex operating conditions. The open-circuit voltage method estimates the open-circuit voltage and SOC by utilizing the stable correspondence between the battery's open-circuit voltage and SOC after the battery has been left to rest for a long time. This method has high accuracy, but it requires the battery to be left to rest for a long time in order to obtain a stable open-circuit voltage. It cannot meet the real-time estimation requirements during vehicle operation and can usually only be used as an auxiliary calibration method.
[0003] The second category is model-based methods, among which Kalman filtering and its derivative algorithms are the most widely used. Extended Kalman filtering (EKF), by linearizing the nonlinear battery model, can fuse model predictions with real-time measurement data, achieving recursive estimation of SOC under dynamic operating conditions. It effectively suppresses measurement noise and overcomes the error accumulation drawback of the ampere-hour integration method, thus becoming a research focus in both academia and engineering. However, the estimation performance of EKF is highly dependent on two key parameters: the process noise covariance matrix Q and the measurement noise covariance matrix R. Q reflects the uncertainty of the battery model itself, while R reflects the statistical characteristics of sensor measurement noise. In practical applications, Q and R usually need to be determined through repeated trial and error based on manual experience. This method is not only inefficient but also makes it difficult to guarantee optimal estimation results under various operating conditions and different aging stages. Improper setting of Q and R may lead to filter divergence or decreased estimation accuracy, slower convergence speed, and inability to adapt to rapidly changing dynamic conditions. Furthermore, a battery is a typical time-varying nonlinear system, and its internal parameters, such as ohmic resistance and polarization capacitance, will change with SOC, temperature and aging. If a battery model with fixed parameters is used, model mismatch error will inevitably occur, which will further affect the accuracy of SOC estimation.
[0004] The third category is data-driven methods, such as neural networks and support vector machines. These methods learn the mapping relationship between battery external characteristics and SOC through a large amount of training data. They can achieve high accuracy on specific datasets, but their generalization ability is limited by the coverage of the training data, and they have high computational complexity, demanding high computing power from embedded hardware, making it difficult to implement real-time streaming processing on resource-constrained BMS controllers. In summary, existing technologies generally suffer from low parameter tuning efficiency, unstable estimation accuracy, and insufficient model adaptability when dealing with the real-time SOC estimation problem of power batteries. They struggle to simultaneously meet the comprehensive requirements of high accuracy, strong real-time performance, and robustness across operating conditions. Especially under dynamic driving cycles and complex environmental conditions, a method that can adaptively optimize filtering parameters and update the model online is needed to improve the overall performance of SOC estimation. Summary of the Invention
[0005] The technical problem solved by this invention is to provide a real-time streaming analysis method for power battery data based on Kalman filtering, which can adaptively optimize filtering parameters and update the model online to improve the overall performance of SOC estimation.
[0006] The basic solution provided by this invention is a real-time streaming analysis method for power battery data based on extended Kalman filtering, comprising the following steps: S1. Obtain real-time operating data of the battery, including individual cell voltage, current, temperature and timestamp; S2. The state-space equation of the battery is constructed based on the dual RC equivalent circuit model, and the variable forgetting factor recursive least squares method is used to identify the model parameters online and update the coefficient matrix of the state-space equation in real time. S3. Set the initial parameters of the sunflower optimization algorithm, use the mean square error between the SOC estimate and the true value as the fitness function, and use the sunflower optimization algorithm to perform offline global optimization on the process noise covariance matrix Q and the measurement noise covariance matrix R of the extended Kalman filter to obtain the optimal Q matrix and R matrix. S4. Expand the optimal Q matrix and R matrix obtained from offline optimization into the Kalman filter. During vehicle operation, predict the SOC based on the current current and historical state, and perform Kalman filter correction in combination with the measured terminal voltage to output the real-time SOC estimate. S5. Based on real-time SOC estimates and operational data, generate analysis results for range prediction, thermal management, and safety warnings.
[0007] The principle and advantages of this invention are as follows: First, real-time operational data such as cell voltage, current, temperature, and timestamps of the battery are acquired as the basis for analysis. Second, the state-space equation of the battery is constructed based on a dual RC equivalent circuit model, and the model parameters are identified online using a recursive least squares method with a variable forgetting factor, updating the coefficient matrix of the state-space equation in real time. Then, the initial parameters of the sunflower optimization algorithm are set, using the mean square error between the estimated and actual SOC values as the fitness function. The sunflower optimization algorithm is used to perform offline global optimization on the process noise covariance matrix Q and measurement noise covariance matrix R of the extended Kalman filter to obtain the optimal Q and R matrices. Next, the optimal Q and R matrices obtained from the offline optimization are embedded into the extended Kalman filter. During vehicle operation, SOC prediction is performed based on the current current and historical state, and Kalman filter correction is performed in conjunction with the measured terminal voltage to output a real-time SOC estimate. Finally, based on the real-time SOC estimate and operational data, analysis results for range prediction, thermal management, and safety warning are generated.
[0008] During vehicle operation, the power battery is in a constantly changing state of charge and discharge, and its internal characteristics are complex and difficult to measure directly. To accurately estimate the battery's state of charge (SOC), sensors are used to collect external voltage, current, and temperature data. These data contain information about the battery's state but are mixed with measurement noise and interference. A dual-RC equivalent circuit model is used to describe the battery's dynamic response characteristics, establishing a mathematical model for the battery. The resistance and capacitance parameters in the model change with the battery's operating state. The variable forgetting factor recursive least squares method continuously tracks the changes in these parameters during vehicle operation, ensuring that the model remains consistent with the battery's current actual state. The Sunflower optimization algorithm is used offline to find the optimal noise parameters for the extended Kalman filter. The process noise covariance matrix Q reflects the error of the model itself, and the measurement noise covariance matrix R reflects the measurement error of the sensors. The values of these two parameters directly affect the estimation accuracy of the filter. In traditional methods, Q and R are usually obtained through trial and error, which is difficult to guarantee suitability under various operating conditions. The Sunflower optimization algorithm finds the optimal combination of Q and R through global search, enabling the filter to achieve optimal performance in subsequent online estimation. The online extended Kalman filter predicts the change in SOC based on the current input and corrects the prediction result with the measured voltage, finally outputting a real-time and reliable SOC value.
[0009] Furthermore, S1 includes the following steps: S11. Receive operating data from the power battery management system in real time, with a collection frequency of not less than 10Hz; S12. Perform integrity checks and clean the received raw running data, deleting invalid data such as outliers, null values, and duplicate values; S13. The voltage, current and temperature signals after cleaning are balanced using a sliding mean filter.
[0010] Furthermore, S2 includes the following steps: S21. Based on the dual RC equivalent circuit model, select the battery's state of charge (SOC) and the polarization voltage of the first RC network. The polarization voltage of the second RC network As a state variable, current I is used as an input variable, and terminal voltage U is used as an output variable:
[0011] in A, B, C, and D are matrices of undetermined coefficients, w is process noise, and v is noise caused by measurement. To predict the output terminal voltage; S22. Set the initial parameters for the recursive least multiplication of the forgettable factor, including the initial covariance matrix, the initial parameter vector, and the range of values for the forgettable factor. S23. At each sampling time, based on the current and voltage measurements at that time, the model parameters are identified online using a recursive least squares method with a variable forgetting factor. The model parameters include the series resistance. The resistance of the first RC network and capacitor The resistance of the second RC network and capacitor ; S24. Based on the currently identified model parameters, calculate and update the coefficient matrices A, B, C, and D in the state-space equation in real time to reflect the changes in battery characteristics under different SOC, temperature, and operating conditions.
[0012] Furthermore, S3 includes the following steps: S31. Set the initial parameters of the sunflower optimization algorithm. The initial parameters include the population size, pollination rate, mortality rate, survival rate, maximum number of iterations, and the search range of the process noise covariance matrix Q and the measurement noise covariance matrix R to be optimized. S32. The mean square error between the SOC estimate and the reference SOC is used as the fitness function to evaluate the accuracy of SOC estimation under different combinations of Q and R matrices:
[0013] For the sample size, Indicates the true value of SOC. This represents the SOC obtained through the Kalman filter algorithm; S33. Within the set search range, the sunflower optimization algorithm is used to perform a global search and iterative update of the Q matrix and R matrix. In each iteration, the extended Kalman filter is called to calculate the SOC estimate and evaluate the fitness function value. S34. When the fitness function value reaches the preset threshold or the number of iterations reaches the maximum value, the optimization process is terminated, and the Q matrix and R matrix that minimize the fitness function value are output as the optimal filtering parameters.
[0014] Furthermore, S4 includes the following steps: S41. When the vehicle starts, set the initial state estimate of the extended Kalman filter. and the initial error covariance matrix The optimal process noise covariance matrix Q and measurement noise covariance matrix R obtained from offline optimization are used as input filters with fixed parameters. S42. State estimate based on the previous time step and the input current at the current moment The prior state estimate at the current moment is calculated using the battery's state-space equation. At the same time, according to the state transition matrix The process noise covariance matrix Q and the prediction prior error covariance matrix :
[0015]
[0016] S43. Estimation based on prior state and the input current at the current moment Predict the terminal voltage at the current moment. :
[0017] S44, Based on the prior error covariance matrix Observation matrix Measure the noise covariance matrix and calculate the Kalman gain matrix. :
[0018] S45. Obtain the measured terminal voltage at the current moment. The prior state estimate is corrected using Kalman gain to obtain the posterior state estimate. :
[0019] S46. Update the posterior error covariance matrix. Used for prediction of the next time step:
[0020] S47. From the updated state vector Extract the SOC component and output it as the real-time SOC estimate for the current moment.
[0021] Furthermore, S6 includes the following steps: S61. At each sampling time, the updated real-time SOC estimate is continuously output as streaming data to form a SOC time series. S62. Based on the current SOC estimate, total battery capacity, historical average energy consumption, and real-time operating parameters, the remaining driving range of the vehicle is calculated and output in real time using a preset driving range estimation model. S63. Combining the SOC change, current integral value, and temperature data within the current sampling period, calculate the battery's charge and discharge efficiency under the current condition, and output the efficiency index for energy management strategy optimization. S64. Real-time monitoring of the rate of change of the SOC estimate. When the SOC jump exceeds the preset threshold, the rate of change of SOC exceeds the normal range, or when combined with abnormal temperature, trigger and output the corresponding safety warning signal. S65. The above-mentioned SOC estimate, remaining driving range, charging and discharging efficiency and safety warning information are fused and structured to generate multi-dimensional real-time analysis results, which can be called by the vehicle controller, thermal management system or cloud platform remote monitoring system. Attached Figure Description
[0022] Figure 1 This is a schematic diagram of an embodiment of the present invention. Detailed Implementation
[0023] The following detailed description illustrates the specific implementation method: The basic implementation examples are as follows: Figure 1 As shown: The real-time streaming analysis method for power battery data based on extended Kalman filtering includes the following steps: S1. Obtain real-time operating data of the battery, including individual cell voltage, current, temperature and timestamp.
[0024] S1 includes the following steps: S11. Receive operating data from the power battery management system in real time, with a collection frequency of not less than 10Hz.
[0025] The system receives real-time vehicle operating data from the Battery Management System (BMS), including cell voltage, total current, temperature at each monitoring point, and corresponding timestamps. To ensure the capture of rapid changes in the battery under dynamic operating conditions, the sampling frequency is set to no less than 10Hz. In this embodiment, a fixed sampling rate of 10Hz is actually used, meaning a set of data is collected every 0.1 seconds. The data is transmitted to the microcontroller via the CAN bus and stored in a circular buffer for processing.
[0026] S12. Perform integrity checks and clean the received raw running data, deleting invalid data such as outliers, null values, and duplicate values.
[0027] The received raw data undergoes integrity checks and cleaning, as follows: Integrity check: Check whether each data entry contains four fields: voltage, current, temperature, and timestamp. If any field is missing or incorrectly formatted, the data entry is discarded.
[0028] Outlier removal: Reasonable ranges are set based on the battery's physical limits. In this embodiment, the normal range for single-cell voltage is 2.5V~4.3V, the current range does not exceed ±500A of the battery's maximum allowable charge / discharge current, and the temperature range is -30℃~80℃. Data exceeding these ranges are considered outliers and are deleted directly.
[0029] Null and Duplicate Value Handling: Records with empty data or NaN values are deleted; for multiple consecutive records with the same timestamp, only the first one is kept and the rest are deleted.
[0030] S13. The voltage, current and temperature signals after cleaning are balanced using a sliding mean filter.
[0031] The voltage, current, and temperature signals after cleaning are smoothed using a moving average filter to suppress high-frequency random noise. In this embodiment, the moving window length is set to 5, meaning the output value at the current moment is equal to the arithmetic mean of the current moment's and the sampled values from the previous four moments.
[0032] S2. The state-space equation of the battery is constructed based on the dual RC equivalent circuit model, and the model parameters are identified online using the recursive least squares method with variable forgetting factor, and the coefficient matrix of the state-space equation is updated in real time.
[0033] S2 includes the following steps: S21. Based on the dual RC equivalent circuit model, select the battery's state of charge (SOC) and the polarization voltage of the first RC network. The polarization voltage of the second RC network As a state variable, current I is used as an input variable, and terminal voltage U is used as an output variable:
[0034] in A, B, C, and D are matrices of undetermined coefficients, w is process noise, and v is noise caused by measurement. To predict the output terminal voltage; S22. Set the initial parameters for the recursive least multiplication of the forgettable factor, including the initial covariance matrix, the initial parameter vector, and the range of values for the forgettable factor. S23. At each sampling time, based on the current and voltage measurements at that time, the model parameters are identified online using a recursive least squares method with a variable forgetting factor. The model parameters include the series resistance. The resistance of the first RC network and capacitor The resistance of the second RC network and capacitor ; S24. Based on the currently identified model parameters, calculate and update the coefficient matrices A, B, C, and D in the state-space equation in real time to reflect the changes in battery characteristics under different SOC, temperature, and operating conditions.
[0035] Specifically, this step establishes an equivalent circuit model of the battery and updates the model parameters in real time through an online parameter identification method, so that the model can accurately reflect the current dynamic characteristics of the battery.
[0036] First, a dual-RC equivalent circuit model is established. This model consists of an ohmic internal resistance R0, two parallel RC networks (R1, C1 and R2, C2), and a controlled voltage source. The controlled voltage source represents the functional relationship between the battery's open-circuit voltage and its state of charge (SOC). The state variables are selected as SOC, polarization voltages V1 and V2, the input variable is current I, and the output variable is terminal voltage U.
[0037] The model parameters are time-varying and need to be identified online. A variable forgetting factor recursive least squares (VFFRLS) method is used for real-time parameter updates. After obtaining the latest R0, R1, C1, R2, and C2, these are substituted into the state-space equations to calculate the coefficient matrices A, B, C, and D, which are then used for the EKF recursion at the next time step. In this way, the model consistently reflects the actual characteristics of the battery under the current SOC, temperature, and operating conditions.
[0038] S3. Set the initial parameters of the sunflower optimization algorithm, using the mean square error between the SOC estimate and the true value as the fitness function. Use the sunflower optimization algorithm to perform offline global optimization on the process noise covariance matrix Q and the measurement noise covariance matrix R of the extended Kalman filter to obtain the optimal Q matrix and R matrix.
[0039] Specifically, S3 includes the following steps: S31. Set the initial parameters of the sunflower optimization algorithm. The initial parameters include the population size, pollination rate, mortality rate, survival rate, maximum number of iterations, and the search range of the process noise covariance matrix Q and the measurement noise covariance matrix R to be optimized. S32. The mean square error between the SOC estimate and the reference SOC is used as the fitness function to evaluate the accuracy of SOC estimation under different combinations of Q and R matrices:
[0040] For the sample size, Indicates the true value of SOC. This represents the SOC obtained through the Kalman filter algorithm; S33. Within the set search range, the sunflower optimization algorithm is used to perform a global search and iterative update of the Q matrix and R matrix. In each iteration, the extended Kalman filter is called to calculate the SOC estimate and evaluate the fitness function value. S34. When the fitness function value reaches the preset threshold or the number of iterations reaches the maximum value, the optimization process is terminated, and the Q matrix and R matrix that minimize the fitness function value are output as the optimal filtering parameters.
[0041] The estimation accuracy of the extended Kalman filter (SOC) strongly depends on the process noise covariance matrix Q and the measurement noise covariance matrix R. This step employs the Sunflower Optimization (SFO) algorithm to perform offline global optimization of Q and R to obtain the optimal parameter combination that minimizes the SOC estimation error.
[0042] The optimization process was carried out in a laboratory environment using a measured dataset containing typical operating conditions such as UDDS, HWFET, and DST. This dataset included current, voltage, temperature, and a high-precision reference SOC (e.g., recorded by a high-precision battery test device).
[0043] The specific steps of the optimization process are as follows: 1. Initialize the population: Randomly generate 50 candidate solutions (Q, R) within the search range. Q is a 3×3 diagonal matrix (corresponding to three state variables), and R is a scalar.
[0044] 2. For each candidate solution, run EKF using the entire historical dataset, calculate the SOC estimation sequence, and obtain the MSE as the fitness value.
[0045] 3. Sort the candidate solutions according to their fitness values, with lower fitness values being better.
[0046] 4. Simulate the behavior of sunflowers, with better candidate solutions serving as the "sun" and other candidate solutions moving toward it; at the same time, pollination, death, and survival mechanisms are added to generate new candidate solutions.
[0047] 5. Repeat steps 2-4 until the maximum number of iterations is reached or the fitness does not improve significantly over multiple generations.
[0048] 6. Output the Q and R values that minimize fitness as the optimal filtering parameters.
[0049] S4. Expand the optimal Q matrix and R matrix obtained from offline optimization into the Kalman filter. During vehicle operation, predict the SOC based on the current current and historical state, and perform Kalman filter correction in combination with the measured terminal voltage to output the real-time SOC estimate. S4 includes the following steps: S41. When the vehicle starts, set the initial state estimate of the extended Kalman filter. and the initial error covariance matrix The optimal process noise covariance matrix Q and measurement noise covariance matrix R obtained from offline optimization are used as input filters with fixed parameters. S42. State estimate based on the previous time step and the input current at the current moment The prior state estimate at the current moment is calculated using the battery's state-space equation. At the same time, according to the state transition matrix The process noise covariance matrix Q and the prediction prior error covariance matrix :
[0050]
[0051] S43. Estimation based on prior state and the input current at the current moment Predict the terminal voltage at the current moment. :
[0052] S44, Based on the prior error covariance matrix Observation matrix Measure the noise covariance matrix and calculate the Kalman gain matrix. :
[0053] S45. Obtain the measured terminal voltage at the current moment. The prior state estimate is corrected using Kalman gain to obtain the posterior state estimate. :
[0054] S46. Update the posterior error covariance matrix. Used for prediction of the next time step:
[0055] S47. From the updated state vector Extract the SOC component and output it as the real-time SOC estimate for the current moment.
[0056] S5. Based on real-time SOC estimates and operational data, generate analysis results for range prediction, thermal management, and safety warnings.
[0057] S6 includes the following steps: S61. At each sampling time, the updated real-time SOC estimate is continuously output as streaming data to form a SOC time series. S62. Based on the current SOC estimate, total battery capacity, historical average energy consumption, and real-time operating parameters, the remaining driving range of the vehicle is calculated and output in real time using a preset driving range estimation model. S63. Combining the SOC change, current integral value, and temperature data within the current sampling period, calculate the battery's charge and discharge efficiency under the current condition, and output the efficiency index for energy management strategy optimization. S64. Real-time monitoring of the rate of change of the SOC estimate. When the SOC jump exceeds the preset threshold, the rate of change of SOC exceeds the normal range, or when combined with abnormal temperature, trigger and output the corresponding safety warning signal. S65. The above-mentioned SOC estimate, remaining driving range, charging and discharging efficiency, and safety warning information are fused and structured to generate multi-dimensional real-time analysis results, which can be used by the vehicle controller, thermal management system, or cloud platform remote monitoring system. Specifically, this step further processes the SOC estimation results into information valuable for vehicle control and safety, and outputs it in real time.
[0058] Continuous SOC Output: At each sampling time, the updated real-time SOC estimate is continuously output as streaming data, forming an SOC time series. This series can be used for instrument displays, energy management strategies, etc.
[0059] Remaining driving range prediction: Based on the current SOC estimate, total battery capacity (e.g., 50kWh), historical average energy consumption (e.g., 15kWh / 100km), and real-time operating parameters (e.g., current vehicle speed, air conditioning power), a preset driving range estimation model is used to calculate and output the vehicle's remaining driving range in real time. For example, if the current SOC is 60%, the remaining battery capacity is 30kWh, and combined with the average energy consumption, the estimated driving range is 200 kilometers.
[0060] Charge / discharge efficiency calculation: Combining the SOC change, current integral value, and temperature data within the current sampling period, the charge / discharge efficiency of the battery in the current state is calculated. Efficiency metrics can be used to optimize energy management strategies, such as limiting power output in low-efficiency ranges. The calculation formula is: Efficiency = (Energy change corresponding to SOC change) / (Current integral charge) × 100%. For example, if the SOC drops from 50% to 49.5% within 10 seconds, corresponding to an energy change of 0.25 kWh, and the current integral yields a discharge charge of 0.27 kWh, then the discharge efficiency is 92.6%.
[0061] Safety Warning: Real-time monitoring of the rate of change of the estimated SOC value. When the SOC jump exceeds a preset threshold (e.g., 2%), the rate of change of SOC exceeds the normal range (e.g., more than 10% per minute), or combined with abnormal temperature (e.g., temperature exceeds 60℃ and SOC drops rapidly), a corresponding safety warning signal is triggered and output. For example, if the SOC is detected to jump from 50% to 48% within 1 second, an "Abnormal SOC Jump" warning is immediately output to remind the BMS or vehicle controller to intervene and check.
[0062] Multidimensional analysis results generation: The above-mentioned SOC estimate, remaining driving range, charging and discharging efficiency, and safety warning information are fused and structured to generate multidimensional real-time analysis results, which can be used by the vehicle controller, thermal management system, or cloud platform remote monitoring system. For example, the data is packaged and sent to the instrument panel and central control screen via CAN bus, and simultaneously uploaded to the cloud via 4G / 5G network for big data analysis.
[0063] The above are merely embodiments of the present invention. Commonly known structures and characteristics are not described in detail here. Those skilled in the art are aware of all common technical knowledge in the field prior to the application date or priority date, are aware of all existing technologies in that field, and have the ability to apply conventional experimental methods prior to that date. Those skilled in the art can, under the guidance of this application, improve and implement this solution in combination with their own capabilities. Some typical known structures or methods should not be obstacles for those skilled in the art to implement this application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the structure of the present invention. These should also be considered within the scope of protection of the present invention, and will not affect the effectiveness of the implementation of the present invention or the practicality of the patent. The scope of protection claimed in this application should be determined by the content of its claims, and the specific embodiments described in the specification can be used to interpret the content of the claims.
Claims
1. A real-time streaming analysis method for power battery data based on extended Kalman filtering, characterized in that: Includes the following steps: S1. Obtain real-time operating data of the battery, including individual cell voltage, current, temperature and timestamp; S2. The state-space equation of the battery is constructed based on the dual RC equivalent circuit model, and the variable forgetting factor recursive least squares method is used to identify the model parameters online and update the coefficient matrix of the state-space equation in real time. S3. Set the initial parameters of the sunflower optimization algorithm, use the mean square error between the SOC estimate and the true value as the fitness function, and use the sunflower optimization algorithm to perform offline global optimization on the process noise covariance matrix Q and the measurement noise covariance matrix R of the extended Kalman filter to obtain the optimal Q matrix and R matrix. S4. Expand the optimal Q matrix and R matrix obtained from offline optimization into the Kalman filter. During vehicle operation, predict the SOC based on the current current and historical state, and perform Kalman filter correction in combination with the measured terminal voltage to output the real-time SOC estimate. S5. Based on real-time SOC estimates and operational data, generate analysis results for range prediction, thermal management, and safety warnings.
2. The real-time streaming analysis method for power battery data based on extended Kalman filtering according to claim 1, characterized in that: S1 includes the following steps: S11. Receive operating data from the power battery management system in real time, with a collection frequency of not less than 10Hz; S12. Perform integrity checks and clean the received raw running data, deleting invalid data such as outliers, null values, and duplicate values; S13. The voltage, current and temperature signals after cleaning are balanced using a sliding mean filter.
3. The real-time streaming analysis method for power battery data based on extended Kalman filtering according to claim 1, characterized in that: S2 includes the following steps: S21. Based on the dual RC equivalent circuit model, select the battery's state of charge (SOC) and the polarization voltage of the first RC network. The polarization voltage of the second RC network As a state variable, current I is used as an input variable, and terminal voltage U is used as an output variable: in A, B, C, and D are matrices of undetermined coefficients, w is process noise, and v is noise caused by measurement. To predict the output terminal voltage, k represents the sampling time; S22. Set the initial parameters for the recursive least multiplication of the forgettable factor, including the initial covariance matrix, the initial parameter vector, and the range of values for the forgettable factor. S23. At each sampling time, based on the current and voltage measurements at that time, the model parameters are identified online using a recursive least squares method with a variable forgetting factor. The model parameters include the series resistance. The resistance of the first RC network and capacitor The resistance of the second RC network and capacitor ; S24. Based on the currently identified model parameters, calculate and update the coefficient matrices A, B, C, and D in the state-space equation in real time to reflect the changes in battery characteristics under different SOC, temperature, and operating conditions.
4. The real-time streaming analysis method for power battery data based on extended Kalman filtering according to claim 3, characterized in that: S3 includes the following steps: S31. Set the initial parameters of the sunflower optimization algorithm. The initial parameters include the population size, pollination rate, mortality rate, survival rate, maximum number of iterations, and the search range of the process noise covariance matrix Q and the measurement noise covariance matrix R to be optimized. S32. The mean square error between the SOC estimate and the reference SOC is used as the fitness function to evaluate the accuracy of SOC estimation under different combinations of Q and R matrices: For the sample size, Indicates the true value of SOC. This represents the SOC obtained through the Kalman filter algorithm; S33. Within the set search range, the sunflower optimization algorithm is used to perform a global search and iterative update of the Q matrix and R matrix. In each iteration, the extended Kalman filter is called to calculate the SOC estimate and evaluate the fitness function value. S34. When the fitness function value reaches the preset threshold or the number of iterations reaches the maximum value, the optimization process is terminated, and the Q matrix and R matrix that minimize the fitness function value are output as the optimal filtering parameters.
5. The real-time streaming analysis method for power battery data based on extended Kalman filtering according to claim 4, characterized in that: S4 includes the following steps: S41. When the vehicle starts, set the initial state estimate of the extended Kalman filter. and the initial error covariance matrix The optimal process noise covariance matrix Q and measurement noise covariance matrix R obtained from offline optimization are used as input filters with fixed parameters. S42. State estimate based on the previous time step and the input current at the current moment The prior state estimate at the current moment is calculated using the battery's state-space equation. At the same time, according to the state transition matrix The process noise covariance matrix Q and the prediction prior error covariance matrix : S43. Estimation based on prior state and the input current at the current moment Predict the terminal voltage at the current moment. : S44, Based on the prior error covariance matrix Observation matrix Measure the noise covariance matrix and calculate the Kalman gain matrix. : S45. Obtain the measured terminal voltage at the current moment. The prior state estimate is corrected using Kalman gain to obtain the posterior state estimate. : S46. Update the posterior error covariance matrix. Used for prediction of the next time step: S47. From the updated state vector Extract the SOC component and output it as the real-time SOC estimate for the current moment.
6. The real-time streaming analysis method for power battery data based on extended Kalman filtering according to claim 5, characterized in that: S6 includes the following steps: S61. At each sampling time, the updated real-time SOC estimate is continuously output as streaming data to form a SOC time series. S62. Based on the current SOC estimate, total battery capacity, historical average energy consumption, and real-time operating parameters, the remaining driving range of the vehicle is calculated and output in real time using a preset driving range estimation model. S63. Combining the SOC change, current integral value, and temperature data within the current sampling period, calculate the battery's charge and discharge efficiency under the current condition, and output the efficiency index for energy management strategy optimization. S64. Real-time monitoring of the rate of change of the SOC estimate. When the SOC jump exceeds the preset threshold, the rate of change of SOC exceeds the normal range, or when combined with abnormal temperature, trigger and output the corresponding safety warning signal. S65. The above-mentioned SOC estimate, remaining driving range, charging and discharging efficiency and safety warning information are fused and structured to generate multi-dimensional real-time analysis results, which can be called by the vehicle controller, thermal management system or cloud platform remote monitoring system.