Method for calculating capacity of energy storage device

Through high-precision sensor and data cleaning technology, combined with least squares method and genetic algorithm to optimize model parameters, the problem of large errors in traditional energy storage device capacity calculation methods in complex environments is solved, high-precision and real-time capacity monitoring are achieved, and the system is ensured. security and reliability.

CN118917197AActive Publication Date: 2024-11-08三峡东山能源投资有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411030478.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-11-08
Estimated Expiration
2044-07-30

AI Technical Summary

Technical Problem

The traditional energy storage device capacity calculation method is difficult to provide accurate results in complex working environments, and cannot fully consider battery aging, temperature impact and dynamic load changes, resulting in large capacity calculation errors, affecting the performance and safety of energy storage devices.

Method used

Using high-precision sensors and reasonable acquisition frequency, combined with Z-score and IQR data cleaning, Kalman filtering and smooth interpolation, select the equivalent circuit model and use the least squares method to fit the experimental data, optimize the model parameters through the genetic algorithm, and use sliding The window performs real-time correction, writes programs to implement capacity calculations and sets threshold triggering alarm mechanisms.

Benefits of technology

It significantly improves the accuracy and real-time performance of energy storage device capacity calculation, ensures data quality and system security, realizes accurate calculation and real-time monitoring, and improves the reliability and security of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118917197A_ABST
    Figure CN118917197A_ABST
Patent Text Reader

Abstract

The invention discloses a method for calculating the capacity of an energy storage device, and particularly relates to the technical field of energy storage, and the method comprises the steps: S1, collecting an initial parameter of the energy storage device through a sensor at a fixed collection frequency, storing the collected data into a database, and guaranteeing the integrity and accessibility of the data; and S2, performing data cleaning by using Z-score and IQR methods, and smoothing the data through Kalman filtering. According to the invention, through a high-precision sensor and reasonable acquisition frequency, Z-score and IQR data cleaning, Kalman filtering and smooth interpolation are combined. By selecting an equivalent circuit model and adopting a least square method to fit experimental data, model parameters are optimized, and real-time correction is performed by using a sliding window, so that the precision and the real-time performance of capacity calculation are remarkably improved. A program is written to realize capacity calculation, a result is output to a monitoring system, and a capacity threshold is set to trigger an alarm mechanism, so that safe operation of the system in a low-capacity state is ensured, and accurate calculation and real-time monitoring are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of energy storage technology, and more specifically, to a method for calculating the capacity of an energy storage device. Background Art

[0002] With the rapid development of new energy technologies, energy storage devices are increasingly used in power systems and have become an indispensable and important part of power systems. Energy storage devices play a key role in balancing grid loads, regulating power supply, and improving the stability and reliability of power systems. However, the performance and efficiency of energy storage devices directly depend on the accurate measurement and calculation of their capacity. Therefore, accurate calculation of the capacity of energy storage devices is crucial to their efficient operation and safety. However, traditional capacity calculation methods usually rely on simple mathematical models or empirical formulas, which often find it difficult to provide accurate calculation results when faced with complex actual situations. The limitations of traditional methods are particularly evident, especially when the working environment and conditions of energy storage devices are changeable. For example, a simple voltage-current relationship model may not fully consider factors such as battery aging effects, temperature effects, and dynamic load changes, resulting in large errors in capacity calculation results, which in turn affects the overall performance and safety of energy storage devices. Therefore, the power system urgently needs a new, more accurate and reliable method for calculating the capacity of energy storage devices to meet the needs of practical applications and ensure the efficient and stable operation of energy storage devices under various working conditions. Summary of the invention

[0003] In order to overcome the above-mentioned defects of the prior art, the present invention provides a method for calculating the capacity of an energy storage device, which ensures the high quality and accuracy of the data through high-precision sensors and reasonable acquisition frequency, combined with Z-score and IQR data cleaning, Kalman filtering and smooth interpolation. By selecting an equivalent circuit model and fitting the experimental data using the least squares method, optimizing the model parameters, and using a sliding window for real-time correction, the accuracy and real-time performance of the capacity calculation are significantly improved. A program is written to implement capacity calculation, and the results are output to the monitoring system. The capacity threshold is set to trigger the alarm mechanism to ensure the safe operation of the system in a low-capacity state, and accurate calculation and real-time monitoring are achieved to solve the problems raised.

[0004] To achieve the above object, the present invention provides the following technical solution: a method for calculating the capacity of an energy storage device, the method comprising the following steps:

[0005] S1: Collect the initial parameters of the energy storage device through sensors at a fixed collection frequency, and store the collected data in the database to ensure the integrity and accessibility of the data;

[0006] S2: Data cleaning was performed using the Z-score and IQR methods, data was smoothed using Kalman filtering, and missing data was filled using linear interpolation;

[0007] S3: Select the equivalent circuit model, determine the model parameters using the least squares method, and verify the model accuracy using the mean square error and root mean square error;

[0008] The specific steps to establish the mathematical model are as follows:

[0009] S301, select the model, select the equivalent circuit model Rint model to describe the battery characteristics, the expression is: V(t) = V0-I(t·R int ; Where V(t) is the instantaneous voltage, V0 is the open circuit voltage, and I(t) is the instantaneous current R int is the internal resistance;

[0010] S302, determine the parameters, measure the battery internal resistance and voltage attenuation coefficient through experiments, use the least squares method to fit, and the fitting expression is: θ=(X T X) -1 X T Y; where θ is the parameter to be determined, X is the input matrix, and Y is the output matrix;

[0011] S303, model verification, using experimental data to verify the accuracy of the model, adjust the model parameters, the calculation expression of the mean square error is: Among them, MSE is the mean square error, y i is the actual value, is the predicted value, n is the number of samples;

[0012] S4: Genetic algorithm is used to optimize model parameters and sliding window method is used for real-time correction and error evaluation;

[0013] S5: Write a calculation program, use the optimization model to calculate the capacity, display the results, and set the threshold to trigger the alarm mechanism.

[0014] In a preferred embodiment: the specific steps of collecting initial parameters are as follows: selecting sensors for monitoring voltage, current and temperature; determining the collection frequency, f=1 Hz; wherein f is the collection frequency; storing data in a database to ensure the integrity and accessibility of the data;

[0015] In a preferred embodiment, the specific steps of data preprocessing are as follows: S201, data cleaning, removing abnormal data, ensuring the accuracy of the data, using the Z-score method to determine, the calculation expression of the Z-score is: Wherein, z is the standardized value, x is the data point, μ is the data mean, and σ is the standard deviation; the expression for data cleaning using the IQR method is: IQR=Q3-Q1; where IQR is the interquartile range, Q3 is the upper quartile, and Q1 is the lower quartile; S202, using the Kalman filter method to perform data smoothing prediction steps, the specific expression is: in, is the predicted value, A is the state transfer matrix, B is the control matrix, u k is the control input; secondly, the data update step is performed, and the specific expression of data update is: in, is the updated value, K k is the Kalman gain, z k is the observation value, H is the observation matrix; the calculation expression of Kalman gain is: K k =P k|k-1 H T (HP k|k-1 H T +R) -1 ; Among them, K k is the Kalman gain, P k|k-1 is the prediction error covariance, R is the observation noise covariance; S203, linear interpolation is performed on the missing data to ensure the integrity of the data. The specific expression of linear interpolation is: Among them, y is the interpolation result, y1 and y2 are adjacent data points, x is the point to be interpolated, and x1 and x2 are the positions of adjacent data points.

[0016] In a preferred embodiment, the specific steps of parameter optimization and correction are as follows: S401, optimization algorithm, using genetic algorithm to optimize model parameters, wherein the genetic algorithm is a fitness function, and the expression of the fitness function is: f(θ) = -MSE(θ); wherein f(θ) is the fitness function, and MSE(θ) is the mean square error; S402, real-time correction, using real-time collected data to dynamically correct the model parameters, the dynamic correction adopts a sliding window correction method, and the specific expression is: θ new =αθ old +(1-α)θ current , where θ new is the updated parameter, α is the smoothing coefficient, θ old is the old parameter, θ current is the current parameter; S403, error evaluation, the error between the evaluation model calculation result and the actual measurement value is evaluated using the mean absolute error MAE, and the evaluation expression is: Among them, MAE is the mean absolute error, y i is the actual value, is the predicted value, n is the number of samples: root mean square error Among them, RMSE is the root mean square error, y i is the actual value, is the predicted value, and n is the number of samples.

[0017] In a preferred embodiment: the mean absolute error MAE and root mean square error RMSE generated between the model calculation results and the actual measurement values ​​are used to establish a data analysis model to generate an error evaluation coefficient β MAE , through the error evaluation coefficient β MAE The error between the evaluation model calculation result and the actual measurement value, the error evaluation coefficient β MAE The generated calculation expression is:

[0018]

[0019] , where r1 and r2 are the preset proportional coefficients of mean absolute error MAE and root mean square error RMSE, respectively, and r1 and r2 are both greater than 0.

[0020] In a preferred embodiment: the error assessment coefficient generated during error assessment is compared and analyzed with a pre-set error assessment coefficient reference threshold. If the error assessment coefficient is greater than or equal to the error assessment coefficient reference threshold, it indicates that the deviation between the model calculation result and the actual measurement value is large, and the calculation result of the evaluation model is marked as abnormal. If the error assessment coefficient is less than the error assessment coefficient reference threshold, it indicates that the deviation between the model calculation result and the actual measurement value is small, and the calculation result of the evaluation model is marked as normal.

[0021] In a preferred embodiment, the specific steps of capacity calculation and output are as follows:

[0022] S501, calculation implementation, write a program to implement capacity calculation to ensure the efficiency of the calculation process. The expression for capacity calculation is: Where C is the capacity, I(t) is the instantaneous current, and V(t) is the instantaneous voltage;

[0023] S502, outputting the calculation results to the monitoring system to display the capacity status of the current energy storage device; displaying the current capacity on the monitoring system interface, and storing the calculation results in the database for subsequent analysis;

[0024] S503, alarm mechanism, set capacity threshold, when the capacity of the energy storage device is lower than the set threshold, S504, trigger the alarm mechanism, alarm trigger condition C current <C threshold Among them, C current is the current capacity, C thresholdis the set capacity threshold; the monitoring system sends an alarm message to the user: the alarm notification sends Alert=True; when C current <C threshold When an alarm notification is triggered, Alert is set to True and the system sends an alarm message.

[0025] Technical effects and advantages of the present invention:

[0026] The present invention significantly improves the accuracy and reliability of energy storage device capacity calculation through systematic data acquisition and preprocessing. First, by selecting high-precision sensors and reasonable acquisition frequencies, the integrity and real-time nature of the data are ensured. The high frequency of data acquisition can capture the detailed dynamics of the energy storage device under rapidly changing conditions and provide comprehensive time series data. Secondly, the Z-score and IQR methods are used for data cleaning to remove abnormal data. Kalman filtering technology is used to smooth the data and eliminate high-frequency noise. The missing data is supplemented by linear interpolation methods, which effectively filters out noise and outliers in the data, ensures high quality and accuracy of the data, and provides a reliable data basis for subsequent model establishment and parameter optimization.

[0027] The present invention ensures the high accuracy and real-time performance of the capacity calculation of the energy storage device by optimizing the mathematical model and the real-time correction method. First, an appropriate equivalent circuit model is selected, and the least squares method is used to fit the experimental data to establish an accurate mathematical model. The accuracy of the model is verified by the mean absolute error and the root mean square error. Secondly, the genetic algorithm is used to optimize the model parameters, and the sliding window method is used for real-time correction to ensure that the model parameters can be dynamically adjusted to adapt to the actual working state of the energy storage device. In addition, the capacity calculation is realized by writing a program, the results are output to the monitoring system, and the capacity threshold is set to trigger the alarm mechanism to ensure the safe operation of the system in a low-capacity state. This systematic capacity calculation method not only improves the capacity calculation accuracy of the energy storage device, but also realizes real-time monitoring and alarm, and improves the safety and reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 The present invention is a method flow chart of a method for calculating the capacity of an energy storage device. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0030] An example embodiment will now be described more fully with reference to the accompanying drawings, a method for calculating the capacity of an energy storage device, the method comprising the following steps: S1: collecting initial parameters of the energy storage device at a fixed collection frequency through sensors, and storing the collected data in a database to ensure data integrity and accessibility; S2: using Z-score and IQR methods for data cleaning, Kalman filtering to smooth data, and linear interpolation to fill in missing data; S3: selecting an equivalent circuit model, determining model parameters using the least squares method, and verifying model accuracy through mean square error; S4: optimizing model parameters using a genetic algorithm, using a sliding window method for real-time correction, and evaluating errors; S5: writing a calculation program, using the optimized model to calculate capacity, displaying the results, and setting a threshold to trigger an alarm mechanism; the specific steps for collecting initial parameters are as follows: selecting sensors for monitoring voltage, current, and temperature; determining the collection frequency, f=1Hz; wherein f is the collection frequency; storing data in a database to ensure data integrity and accessibility; in the first step of the method for calculating the capacity of an energy storage device, selecting sensors, determining data collection frequency, and storing data are crucial steps. First, it is the basis to select suitable sensors for monitoring the voltage, current and temperature of the energy storage device. The voltage sensor can accurately measure the voltage change of the energy storage device to ensure that accurate voltage data can be obtained under various working conditions; the Hall effect current sensor can monitor the current change of the energy storage device in real time, which is crucial for calculating the energy change during the charging and discharging process of the energy storage device; the temperature sensor can record the temperature change of the ambient temperature and the temperature of the energy storage device itself, because the temperature will affect the working state and capacity of the energy storage device. Therefore, it is crucial to select sensors that are high-precision, durable and suitable for long-term monitoring. Secondly, determine the frequency of data acquisition. In order to ensure the real-time and continuity of the data, it is usually selected to collect data once per second, that is, the acquisition frequency is 1 Hz. This means that the system will collect voltage, current and temperature data once every second, providing detailed time series data. These data provide a comprehensive foundation for subsequent analysis and model building. High-frequency data acquisition can capture the detailed dynamics of the energy storage device under rapidly changing working conditions, ensuring the accuracy and real-time performance of capacity calculation. Then, the collected data is stored in a local database or a cloud database. The selection of the database should consider factors such as data security, accessibility and storage capacity. Local databases are suitable for scenarios where the network is unstable or there is no network connection, and data can be stored and processed on local devices. Cloud databases provide larger storage space and higher data security, and support remote access and data sharing. The design of data storage also needs to consider the integrity and traceability of the data to ensure that it can be easily retrieved and used in subsequent data processing and analysis. In order to ensure data reliability, the data storage system should have automatic backup and recovery functions to prevent data loss.At the same time, the data storage format should be standardized as much as possible, using common data formats such as CSV, JSON or database formats to facilitate subsequent data processing and analysis. In practical applications, appropriate sensor models and data acquisition equipment can be selected according to specific needs, and a reasonable data storage solution can be set up to ensure high data quality and high availability. In summary, collecting initial parameters is a basic step in the capacity calculation method of energy storage devices. By selecting appropriate sensors, determining data acquisition frequency and designing a reasonable data storage solution, a reliable foundation can be provided for subsequent data processing, model building and capacity calculation.

[0031] Next, the specific steps of data preprocessing are as follows: S201, data cleaning, eliminating abnormal data, ensuring the accuracy of the data, using the Z-score method to determine, the calculation expression of the Z-score is: Wherein, z is the standardized value, x is the data point, μ is the data mean, and σ is the standard deviation; the expression for data cleaning using the IQR method is: IQR=Q3-Q1; where IQR is the interquartile range, Q3 is the upper quartile, and Q1 is the lower quartile; S202, using the Kalman filter method to perform data smoothing prediction steps, the specific expression is: in is the predicted value, A is the state transfer matrix, B is the control matrix, u k is the control input; secondly, the data update step is performed, and the specific expression of data update is: in, is the updated value, K k is the Kalman gain, z k is the observation value, H is the observation matrix; the calculation expression of Kalman gain is: K k =P k|k-1 H T (HP k|k-1 H T +R) -1 ; Among them, K k is the Kalman gain, P k|k-1 is the prediction error covariance, R is the observation noise covariance; S203, linear interpolation is performed on the missing data to ensure the integrity of the data. The specific expression of linear interpolation is: Among them, y is the interpolation result, y1 and y2 are adjacent data points, x is the point to be interpolated, and x1 and x2 are the positions of adjacent data points; in the second step of the energy storage device capacity calculation method, data preprocessing is a key step to ensure data quality and accuracy. First, the collected data is cleaned to remove abnormal data points and ensure the accuracy and reliability of the data. Data cleaning can be achieved using a variety of statistical methods. Common methods include the Z-score method and the IQR method. The Z-score method calculates the difference between each data point and the data mean and standardizes it to the standard deviation unit to identify abnormal data points exceeding a certain threshold. For example, if the Z-score value of a data point exceeds 3, the data point is considered to be an outlier and should be removed. The IQR method identifies abnormal data that exceeds the upper and lower limits by calculating the interquartile range of the data. Specifically, the interquartile range is the difference between the upper and lower quartiles of the data. By calculating the lower and upper limits, data points below the lower limit and above the upper limit are considered abnormal data. Next, the Kalman filter method is used to smooth the data. Kalman filtering is a recursive filtering algorithm that can predict and update data through a dynamic model to filter out noise. Kalman filtering includes two steps: prediction and update. In the prediction step, the state transfer matrix and control matrix are used to predict the data to obtain the predicted value at the next moment. In the update step, the Kalman gain is calculated by comparing the observed value with the predicted value, and the predicted value is finally updated to make it closer to the actual observed value. Through multiple iterations, Kalman filtering can effectively smooth the data, remove high-frequency noise, and retain the main trend of the data. In addition, linear interpolation of missing data is also an important step in data preprocessing. Linear interpolation is to estimate through adjacent known data points, fill in the missing data points, and ensure the integrity of the data. Specifically, linear interpolation is to estimate the value of the missing data point according to the linear relationship based on the values ​​of adjacent data points. For example, if a data point is located between two known data points in time, the value of the data point can be calculated according to the linear relationship through the values ​​of the two known data points. Data interpolation can ensure the continuity and integrity of the data, which is crucial for subsequent data analysis and model building. In general, the data preprocessing step ensures the quality and accuracy of the data through data cleaning, filtering, smoothing, interpolation and other methods, providing a reliable data basis for subsequent model building and capacity calculation. By eliminating abnormal data, filtering out noise, and filling in missing data, the quality of the data can be significantly improved, ensuring the reliability of the model input data, thereby improving the accuracy and reliability of capacity calculation.

[0032] Then, the specific operation steps of establishing a mathematical model are as follows: S301, select a model, select the equivalent circuit model Rint model to describe the battery characteristics, the expression is: V(t) = V0-I(t)·R int; Where V(t) is the instantaneous voltage, V0 is the open circuit voltage, and I(t) is the instantaneous current R int S302, determine the parameters, and determine the battery internal resistance and voltage attenuation coefficient through experiments: least squares fitting θ = (X T X) -1 X T Y; where θ is the parameter to be determined, X is the input matrix, and Y is the output matrix; S303, model verification, using experimental data to verify the accuracy of the model, adjust the model parameters, the calculation expression of the mean square error is: MSE Among them, MSE is the mean square error, y i is the actual value, is the predicted value, and n is the number of samples; in the third step of the energy storage device capacity calculation method, establishing a mathematical model is one of the core steps. First, it is crucial to select a suitable mathematical model to describe the battery characteristics of the energy storage device. Commonly used models include equivalent circuit models, such as the Rint model. The equivalent circuit model can equate the electrochemical behavior of the battery to electrical components, which is convenient for calculation and analysis. The Rint model reflects the instantaneous voltage change and capacity change of the battery by describing the relationship between voltage, current and internal resistance. This model can simplify complex electrochemical processes and convert them into electrical problems that are easy to analyze and calculate. Next, the key parameters required for the model, such as the internal resistance and voltage attenuation coefficient of the battery, are experimentally determined. In order to obtain these parameters, a series of experiments are required to record the voltage, current and capacity data under different working conditions. Then, by fitting these experimental data with the least squares method, the estimated values ​​of the model parameters can be obtained. The least squares method is a statistical method that obtains the optimal parameters by minimizing the square error between the observed value and the model predicted value. This step can ensure the accuracy and reliability of the model parameters, thereby improving the accuracy of the model. Then, these parameters are used to establish a mathematical model to describe the capacity change of the energy storage device under different working conditions. Specifically, the charging and discharging process of the energy storage device can be simulated by establishing a mathematical relationship between voltage, current and capacity. For example, the capacity change of the energy storage device under different charging and discharging conditions can be calculated by the relationship between voltage, current and internal resistance. In order to verify the accuracy of the model, it is necessary to verify the model with experimental data. By calculating the mean square error, the deviation between the model prediction value and the actual value can be evaluated to judge the accuracy of the model. The smaller the mean square error, the more accurate the model prediction. By verifying multiple experimental data sets, the applicability and accuracy of the model can be comprehensively evaluated. Finally, the model parameters are adjusted to make it more consistent with the actual situation and improve the accuracy and reliability of the model. This process may require multiple iterations to continuously optimize the model parameters until satisfactory results are obtained. In practical applications, a suitable mathematical model can be selected according to different types and working conditions of energy storage devices, and corresponding parameter adjustments and optimizations can be made. In summary, establishing a mathematical model is the core step in the capacity calculation method of energy storage devices. By selecting a suitable model, determining key parameters, performing least squares fitting and mean square error verification, an accurate mathematical model can be established to describe the capacity changes of energy storage devices under different working conditions, providing a reliable basis for subsequent capacity calculation and monitoring.

[0033] At this time, the specific steps of parameter optimization and correction are as follows: S401, optimization algorithm, using genetic algorithm to optimize model parameters, where genetic algorithm is fitness function, fitness function expression is: f(θ) = -MSE(θ); where f(θ) is fitness function, MSE(θ) is mean square error; S402, real-time correction, using real-time collected data to dynamically correct model parameters, dynamic correction using sliding window correction method, the specific expression is: θ new =αθ old +(1-α)θ current , where θ new is the updated parameter, α is the smoothing coefficient, θ old is the old parameter, θ current is the current parameter; S403, error evaluation, evaluating the error between the model calculation result and the actual measurement value, using the mean absolute error MAE and root mean square error RMSE for evaluation, the calculation expression of the mean absolute error is: Among them, MAE is the mean absolute error, y i is the actual value, is the predicted value, n is the number of samples, and the calculation expression of the root mean square error RMSE is: Among them, RMSE is the root mean square error, y i is the actual value, is the predicted value;

[0034] The mean absolute error (MAE) and root mean square error (RMSE) generated between the model calculation results and the actual measured values ​​are used to establish a data analysis model and generate the error evaluation coefficient β MAE , through the error evaluation coefficient β MAE The error between the evaluation model calculation result and the actual measurement value, the error evaluation coefficient β MAE The generated calculation expression is:

[0035]

[0036] , where r1 and r2 are the preset proportional coefficients of mean absolute error MAE and root mean square error RMSE, respectively, and r1 and r2 are both greater than 0.

[0037] It can be seen from the error evaluation coefficient that the larger the mean absolute error MAE generated between the model calculation results and the actual measurement values, the larger the root mean square error RMSE generated, that is, the larger the performance value of the generated error evaluation coefficient, indicating that the deviation between the model calculation results and the actual measurement values ​​is greater, and vice versa, it indicates that the deviation between the model calculation results and the actual measurement values ​​is smaller.

[0038] The error assessment coefficient generated during error assessment is compared and analyzed with the pre-set error assessment coefficient reference threshold. If the error assessment coefficient is greater than or equal to the error assessment coefficient reference threshold, it indicates that the deviation between the model calculation result and the actual measurement value is large, and the calculation result of the evaluation model is marked as abnormal. If the error assessment coefficient is less than the error assessment coefficient reference threshold, it indicates that the deviation between the model calculation result and the actual measurement value is small, and the calculation result of the evaluation model is marked as normal.

[0039] In the fourth step of the energy storage device capacity calculation method, parameter optimization and correction are important steps to improve the accuracy of the model. First, the genetic algorithm is used to optimize the model parameters. The genetic algorithm is an optimization algorithm that simulates the natural evolution process. It gradually finds the optimal solution through selection, crossover and mutation operations. The basic idea of ​​the genetic algorithm is to evaluate the pros and cons of each individual according to the fitness function, select individuals with high fitness to enter the next generation, generate new individuals through crossover operations, and mutate some individuals to increase the diversity of the population. After multiple iterations, the optimal model parameters can be found. Specifically, the population is initialized first, and a set of initial parameters are randomly generated; then, the fitness value of each individual is evaluated according to the fitness function, and individuals with high fitness are selected to enter the next generation; then, the parameters of the two individuals are combined through crossover operations to generate new individuals; finally, the parameters of some individuals are randomly mutated to increase the diversity of the population. After multiple iterations, the fitness value gradually converges, and the optimal model parameters are finally found. Then, the model parameters are dynamically corrected using real-time collected data. Since the working environment and state of the energy storage device are constantly changing, the model parameters also need to be adjusted accordingly. Through the sliding window method, the model parameters can be corrected in real time according to the data of the recent period. The sliding window method is to update the model parameters by weighted averaging the data within a certain time range in the past, so that it can better adapt to the current working state. Specifically, the data of the recent period is used as a window, and the weighted average of the data in the window is calculated to update the model parameters. In this way, it can be ensured that the model parameters can reflect the actual working state of the energy storage device in a timely manner, and the adaptability and accuracy of the model are improved. Finally, the error between the model calculation results and the actual measured values ​​is evaluated. The accuracy and reliability of the model can be evaluated by calculating the mean absolute error and the root mean square error. The mean absolute error is the average value of the absolute error between the actual value and the predicted value, while the root mean square error is the square root of the average value of the square of the error. The smaller the error, the more accurate the prediction of the model. By continuously optimizing and correcting the model parameters, the accuracy and reliability of the capacity calculation can be significantly improved. In practical applications, the parameter optimization and correction steps can select appropriate optimization algorithms and correction methods according to specific needs and working conditions to ensure high accuracy and high reliability of the model. In summary, parameter optimization and correction are crucial steps in the capacity calculation method of energy storage devices. By using genetic algorithms for optimization, using sliding window methods for real-time correction, and evaluating errors, the accuracy and reliability of the model can be significantly improved, ensuring the accuracy and real-time performance of capacity calculation.

[0040] Finally, the specific operation steps of capacity calculation and output are as follows: S501, calculation implementation, write a program to implement capacity calculation, ensure the efficiency of the calculation process, the expression of capacity calculation is: Wherein, C is capacity, I(t) is instantaneous current, and V(t) is instantaneous voltage; S502, result output, output the calculation result to the monitoring system, and display the capacity status of the current energy storage device; display the current capacity on the monitoring system interface, and store the calculation result in the database for subsequent analysis; S503, alarm mechanism, set the capacity threshold, when the capacity of the energy storage device is lower than the set threshold, S504, trigger the alarm mechanism, the alarm trigger condition C current <C threshold Among them, C current is the current capacity, C threshold is the set capacity threshold; the monitoring system sends an alarm message to the user: the alarm notification sends Alert=True; when C current <C thresholdWhen the alarm notification is triggered, Alert is set to True, and the system sends an alarm message; in the fifth step of the energy storage device capacity calculation method, capacity calculation and output are the key steps to finally realize the capacity monitoring of the energy storage device. First, write a program to realize capacity calculation to ensure the efficiency and accuracy of the calculation process. The program needs to use the voltage and current data collected in real time according to the optimized mathematical model to perform capacity calculation. The basic idea of ​​capacity calculation is to obtain the current capacity value by integrating the change of the amount of electricity of the energy storage device within a certain time range. Specifically, the program needs to continuously collect the voltage and current data of the energy storage device, calculate the capacity change of the energy storage device at each moment according to the mathematical model, and finally obtain the current capacity value. In order to improve the efficiency of calculation, efficient algorithms and data structures can be used to ensure that the capacity value can be quickly calculated and updated in real-time applications. Then, the calculation results are output to the monitoring system to display the capacity status of the current energy storage device. The monitoring system can intuitively display the capacity information of the energy storage device through a graphical interface or dashboard, so that users can monitor the working status of the energy storage device in real time. For example, the current capacity, charge and discharge status, historical capacity change curve and other information of the energy storage device can be displayed in the monitoring system to provide users with comprehensive capacity monitoring and management functions. At the same time, the calculation results are stored in the database for subsequent analysis and maintenance. The data storage system should have automatic backup and recovery functions to ensure the security and reliability of the data. In addition, in order to ensure the safe operation of the energy storage device, a capacity threshold needs to be set. When the capacity of the energy storage device is lower than the set threshold, the alarm mechanism is triggered to remind the user to perform maintenance or replacement. The implementation of the alarm mechanism requires sending alarm information to the user through the monitoring system, such as text messages, emails, etc. When the system detects that the current capacity is lower than the set threshold, an alarm notification is triggered, and the system automatically sends an alarm message to remind the user to take corresponding measures. This ensures that the energy storage device will not have safety problems in the low capacity state, and can also improve the reliability of the system and user satisfaction. Through the above steps, the capacity of the energy storage device can be accurately calculated and monitored in real time to ensure the safe and efficient operation of the energy storage system. In summary, capacity calculation and output are the final steps of the energy storage device capacity calculation method. By writing a program to implement capacity calculation, outputting the calculation results to the monitoring system, and setting capacity thresholds and alarm mechanisms, the capacity monitoring and management of the energy storage device can be fully realized to ensure the safe and efficient operation of the system.

[0041] The present invention significantly improves the accuracy and reliability of energy storage device capacity calculation through systematic data acquisition and preprocessing. First, by selecting high-precision sensors and reasonable acquisition frequencies, the integrity and real-time nature of the data are ensured. The high frequency of data acquisition can capture the detailed dynamics of the energy storage device under rapidly changing conditions and provide comprehensive time series data. Secondly, the Z-score and IQR methods are used for data cleaning to remove abnormal data. Kalman filtering technology is used to smooth the data and eliminate high-frequency noise. The missing data is supplemented by linear interpolation methods, which effectively filters out noise and outliers in the data, ensures high quality and accuracy of the data, and provides a reliable data basis for subsequent model establishment and parameter optimization.

[0042] The present invention ensures the high accuracy and real-time performance of the capacity calculation of the energy storage device by optimizing the mathematical model and the real-time correction method. First, an appropriate equivalent circuit model is selected, and the least squares method is used to fit the experimental data to establish an accurate mathematical model. The accuracy of the model is verified by the mean absolute error and the root mean square error. Secondly, the genetic algorithm is used to optimize the model parameters, and the sliding window method is used for real-time correction to ensure that the model parameters can be dynamically adjusted to adapt to the actual working state of the energy storage device. In addition, the capacity calculation is realized by writing a program, the results are output to the monitoring system, and the capacity threshold is set to trigger the alarm mechanism to ensure the safe operation of the system in a low-capacity state. This systematic capacity calculation method not only improves the capacity calculation accuracy of the energy storage device, but also realizes real-time monitoring and alarm, and improves the safety and reliability of the system.

[0043] The above embodiments can be implemented in whole or in part by software, hardware, firmware and any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions and computer programs. When the computer instructions and computer programs are loaded and executed on a computer, the processes and functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server and data center to another website site, computer, server and data center by wired (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0044] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0045] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0046] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0047] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0048] If the functions are implemented in the form of software functional units and sold and used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.

[0049] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes and substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.

Claims

1. A method for calculating the capacity of an energy storage device, It is characterized in that The calculation method comprises the following steps: S1: Collect the initial parameters of the energy storage device through sensors at a fixed collection frequency, and store the collected data in the database to ensure the integrity and accessibility of the data; S2: Data cleaning was performed using the Z-score and IQR methods, data was smoothed using Kalman filtering, and missing data was filled using linear interpolation; S3: Select the equivalent circuit model, determine the model parameters using the least squares method, and verify the model accuracy using the mean square error and root mean square error; The specific steps to establish the mathematical model are as follows: S301, select the model, select the equivalent circuit model Rint model to describe the battery characteristics, the expression is: V(t) = V 0 -I(t)·R int ; Where V(t) is the instantaneous voltage, V 0 is the open circuit voltage, I(t) is the instantaneous current R int is the internal resistance; S302, determine the parameters, measure the battery internal resistance and voltage attenuation coefficient through experiments, use the least squares method to fit, and the fitting expression is: θ=(X T X) -1 X T Y; where θ is the parameter to be determined, X is the input matrix, and Y is the output matrix; S303, model verification, using experimental data to verify the accuracy of the model, adjust the model parameters, the calculation expression of the mean square error is: Among them, MSE is the mean square error, y i is the actual value, is the predicted value, n is the number of samples; S4: Genetic algorithm is used to optimize model parameters and sliding window method is used for real-time correction and error evaluation; S5: Write a calculation program, use the optimization model to calculate the capacity, display the results, and set the threshold to trigger the alarm mechanism.

2. A method for calculating the capacity of an energy storage device according to claim 1, It is characterized in that The specific steps for collecting initial parameters are as follows: Select sensors to monitor voltage, current and temperature; determine the acquisition frequency, f = 1 Hz; where f is the acquisition frequency; store the data in a database to ensure data integrity and accessibility.

3. A method for calculating the capacity of an energy storage device according to claim 1, It is characterized in that The specific steps of data preprocessing are as follows: S201, data cleaning, eliminating abnormal data, ensuring the accuracy of the data, and using the Z-score method to determine the calculation expression of the Z-score: Where z is the standardized value, x is the data point, μ is the data mean, and σ is the standard deviation; the expression for data cleaning using the IQR method is: IQR = Q3-Q1; where IQR is the quartile, Q3 is the upper quartile, and Q1 is the lower quartile; S202, using the Kalman filter method to perform data smoothing prediction step, the specific expression is: in, is the predicted value, A is the state transfer matrix, B is the control matrix, u k is the control input; secondly, the data update step is performed, and the specific expression of data update is: in, is the updated value, K k is the Kalman gain, z k is the observation value, H is the observation matrix; the calculation expression of Kalman gain is: K k =P k|k-1 H T (HP k|k-1 H T +R) -1 ; Among them, K k is the Kalman gain, P k|k-1 is the prediction error covariance, R is the observation noise covariance; S203, linear interpolation is performed on the missing data to ensure data integrity. The specific expression of linear interpolation is: Among them, y is the interpolation result, y 1 and 2 are adjacent data points, x is the point to be interpolated, and x 1 and x 2 is the location of adjacent data points.

4. A method for calculating the capacity of an energy storage device according to claim 1, It is characterized in that The specific steps of parameter optimization and correction are as follows: S401, optimization algorithm, using genetic algorithm to optimize model parameters, wherein the genetic algorithm is a fitness function, and the expression of the fitness function is: f(θ)=-MSE(θ); wherein f(θ) is the fitness function, and MSE(θ) is the mean square error; S402, real-time correction, using real-time collected data to dynamically correct the model parameters. The dynamic correction adopts the sliding window correction method. The specific expression is: θ new =αθ old +(1-α)θ current , where θ new is the updated parameter, α is the smoothing coefficient, θ old is the old parameter, θ current is the current parameter; S403, error evaluation, evaluating the error between the model calculation result and the actual measurement value, using mean absolute error MAE and root mean square error RMSE for evaluation, the calculation expression of mean absolute error is: Among them, MAE is the mean absolute error, y i is the actual value, is the predicted value, n is the number of samples, and the calculation expression of the root mean square error RMSE is: Among them, RMSE is the root mean square error, y i is the actual value, is the predicted value.

5. A method for calculating the capacity of an energy storage device according to claim 4, It is characterized in that The mean absolute error (MAE) and root mean square error (RMSE) generated between the model calculation results and the actual measured values ​​are used to establish a data analysis model and generate the error evaluation coefficient β MAE , through the error evaluation coefficient β MAE The error between the evaluation model calculation result and the actual measurement value, the error evaluation coefficient β MAE The generated calculation expression is: , where r 1 、r 2 are the preset proportional coefficients of mean absolute error MAE and root mean square error RMSE, and r 1 、r 2 Both are greater than 0.

6. A method for calculating the capacity of an energy storage device according to claim 5, It is characterized in that The error assessment coefficient generated during error assessment is compared and analyzed with the pre-set error assessment coefficient reference threshold. If the error assessment coefficient is greater than or equal to the error assessment coefficient reference threshold, it indicates that the deviation between the model calculation result and the actual measurement value is large, and the calculation result of the evaluation model is marked as abnormal. If the error assessment coefficient is less than the error assessment coefficient reference threshold, it indicates that the deviation between the model calculation result and the actual measurement value is small, and the calculation result of the evaluation model is marked as normal.

7. A method for calculating the capacity of an energy storage device according to claim 1, It is characterized in that The specific steps for capacity calculation and output are as follows: S501, calculation implementation, write a program to implement capacity calculation to ensure the efficiency of the calculation process. The expression for capacity calculation is: Where C is the capacity, I(t) is the instantaneous current, and V(t) is the instantaneous voltage; S502, outputting the calculation results to the monitoring system to display the capacity status of the current energy storage device; displaying the current capacity on the monitoring system interface, and storing the calculation results in the database for subsequent analysis; S503, alarm mechanism, set capacity threshold, when the capacity of the energy storage device is lower than the set threshold, S504, trigger the alarm mechanism, alarm trigger condition C current <C threshold Among them, C current is the current capacity, C threshold is the set capacity threshold; the monitoring system sends an alarm message to the user: the alarm notification sends Alert=True; when C current <C threshold When an alarm notification is triggered, Alert is set to True and the system sends an alarm message.

Citation Information

Patent Citations

  • Rapid calculating method for absolute capacity of battery pack

    CN109581228A

  • Storage battery capacity estimation method, training method, service life estimation method and device

    CN115718261A

  • Method and device for predicting residual capacity of lead-acid storage battery

    CN118131053A

  • Method and system for estimating health state value of battery system

    CN118566770A

  • Infusion pump battery capacity management and battery charge alert system and method

    US20150196709A1