Method for calculating the capacity of an energy storage device

Through high-precision sensors and data processing technology, combined with mathematical model optimization and real-time correction methods, the accuracy problem of energy storage device capacity calculation is solved, high-precision and real-time capacity monitoring is achieved, and the safe and efficient operation of the energy storage device is ensured.

CN118917197BActive Publication Date: 2025-10-10三峡东山能源投资有限公司
View PDF 1 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional energy storage device capacity calculation methods are difficult to provide accurate calculation results when faced with complex working environments, which affects performance and safety.

Method used

High-precision sensors are used for data collection, combined with Z-score and IQR data cleaning, Kalman filtering and smooth interpolation, an equivalent circuit model is selected and the experimental data is fitted using the least squares method, a genetic algorithm is used to optimize the model parameters, and real-time correction is performed through a sliding window, a program is written to implement capacity calculation and set an alarm mechanism.

Benefits of technology

It significantly improves the accuracy and real-time performance of energy storage device capacity calculation, ensures the safe operation of the system in low-capacity state, realizes real-time monitoring and alarm, and improves the safety and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118917197B_ABST
    Figure CN118917197B_ABST
Patent Text Reader

Abstract

The application discloses a kind of energy storage device capacity calculation method, specifically related to energy storage technical field, S1: the initial parameter of energy storage device is collected by sensor with fixed acquisition frequency, and the data collected data is stored to database, ensure the integrity and accessibility of data;S2: using Z-score and IQR method carries out data cleaning, and data is smoothed by Kalman filtering.The application is combined with Z-score and IQR data cleaning, Kalman filtering and smoothing interpolation by high-precision sensor and reasonable acquisition frequency, selects equivalent circuit model and adopts least square method to fit experimental data, optimizes model parameters, and uses sliding window to carry out real-time correction, significantly improves the accuracy and real-time of capacity calculation.Program is written to realize capacity calculation, and the result is output to monitoring system, sets capacity threshold to trigger alarm mechanism, ensures the safe operation of system in low capacity state, realizes accurate calculation and real-time monitoring.
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 particularly, 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 being used in power systems, becoming an indispensable component of these systems. Energy storage devices play a key role in balancing grid loads, regulating power supply, and improving power system stability and reliability. However, the performance and efficiency of energy storage devices directly depend on the accurate measurement and calculation of their capacity. Therefore, accurately calculating the capacity of energy storage devices is crucial for their efficient operation and safety. However, traditional capacity calculation methods often rely on simple mathematical models or empirical formulas, which often struggle to provide accurate results in complex real-world situations. The limitations of traditional methods are particularly evident in the variable operating environments and conditions of energy storage devices. For example, simple voltage-current relationship models may fail to fully account for factors such as battery aging, temperature fluctuations, and dynamic load variations, resulting in significant errors in capacity calculations, which in turn impact the overall performance and safety of energy storage devices. Therefore, power systems urgently need a new, more accurate, and reliable method for calculating energy storage device capacity to meet practical application requirements and ensure efficient and stable operation under various operating conditions. Summary of the Invention

[0003] To overcome the aforementioned shortcomings of the prior art, the present invention provides a method for calculating the capacity of an energy storage device. This method uses high-precision sensors and a reasonable acquisition frequency, combined with Z-score and IQR data cleaning, Kalman filtering, and smooth interpolation to ensure high data quality and accuracy. 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 perform capacity calculations and output the results to a monitoring system. A capacity threshold is set to trigger an alarm mechanism to ensure safe operation of the system in a low-capacity state, achieving precise calculations and real-time monitoring to address the proposed problem.

[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: The initial parameters of the energy storage device are collected by sensors at a fixed collection frequency, and the collected data are stored 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 were filled using linear interpolation.

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

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

[0009] S301. Select a model. Select the equivalent circuit model Rint 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, and use the least squares method to fit. 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 an acquisition frequency, f=1 Hz; wherein f is the acquisition frequency; storing the data in a database to ensure data integrity and accessibility;

[0015] In a preferred embodiment, 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 accuracy. The calculation expression of the Z-score is: 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 interquartile range, Q3 is the upper quartile, and Q1 is the lower quartile. S202: Use the Kalman filter method to perform data smoothing prediction. 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. 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: Where 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 results 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 both r1 and r2 are greater than 0.

[0020] In a preferred embodiment: the error assessment coefficient generated during the 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 current capacity status of the energy storage device; displaying the current capacity on the monitoring system interface, and storing the calculation results in a database for subsequent analysis;

[0024] S503, alarm mechanism, set capacity threshold, when the energy storage device capacity 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; send alarm information to the user through the monitoring system: send alarm notification 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 calculations through systematic data acquisition and preprocessing. First, by selecting high-precision sensors and a reasonable acquisition frequency, 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 working conditions and provide comprehensive time series data. Secondly, the Z-score and IQR methods are used for data cleaning to eliminate abnormal data. Kalman filtering technology is used to smooth the data and eliminate high-frequency noise. Missing data is supplemented by linear interpolation, which effectively filters out noise and outliers in the data, ensures high quality and high accuracy of the data, and provides a reliable data foundation for subsequent model establishment and parameter optimization.

[0027] This invention ensures high-precision and real-time performance in calculating the capacity of an energy storage device by optimizing mathematical models and real-time correction methods. First, an appropriate equivalent circuit model is selected and experimental data is fitted using the least squares method to establish a precise mathematical model. The accuracy of the model is verified using mean absolute error and root mean square error. Secondly, a genetic algorithm is used to optimize model parameters, and a sliding window method is used for real-time correction to ensure that model parameters can be dynamically adjusted to adapt to the actual operating conditions of the energy storage device. Furthermore, a program is written to perform capacity calculations, output the results to a monitoring system, and a capacity threshold is set to trigger an alarm mechanism to ensure safe operation of the system in low-capacity states. This systematic capacity calculation method not only improves the accuracy of energy storage device capacity calculations but also enables real-time monitoring and alarming, enhancing the safety and reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0029] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 making creative efforts 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, including 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 the 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, performing real-time correction using a sliding window method, and evaluating errors; S5: writing a calculation program, using the optimized model to calculate capacity, displaying the results, and setting thresholds 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 = 1 Hz; where 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 the data collection frequency, and storing data are crucial steps. First, selecting appropriate sensors to monitor the voltage, current, and temperature of the energy storage device is essential. Voltage sensors accurately measure changes in the energy storage device's voltage, ensuring accurate voltage data under all operating conditions. Hall-effect current sensors monitor current changes in real time, which is crucial for calculating energy changes during the device's charging and discharging processes. Temperature sensors record changes in ambient temperature and the temperature of the energy storage device itself, as temperature can affect the device's operating status and capacity. Therefore, selecting sensors that are highly accurate, durable, and suitable for long-term monitoring is crucial. Secondly, determining the frequency of data collection is crucial. To ensure real-time and continuous data, data is typically collected every second, or at a frequency of 1 Hz. This means the system collects voltage, current, and temperature data every second, providing detailed time series data. This data provides a comprehensive foundation for subsequent analysis and model building. High-frequency data collection captures the detailed dynamics of the energy storage device under rapidly changing operating conditions, ensuring accurate and real-time capacity calculations. The collected data is then stored in a local or cloud database. The database selection should consider factors such as data security, accessibility, and storage capacity. Local databases are suitable for scenarios with unstable or no network connection, allowing data storage and processing on local devices. Cloud databases, on the other hand, offer greater storage space and security, supporting remote access and data sharing. Data storage design also needs to consider data integrity and traceability to ensure easy retrieval and use during subsequent data processing and analysis. To ensure data reliability, data storage systems should include automatic backup and recovery capabilities 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 energy storage device capacity calculation method. By selecting appropriate sensors, determining the 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, 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 interquartile range, Q3 is the upper quartile, and Q1 is the lower quartile. S202: Use the Kalman filter method to perform data smoothing prediction. 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. 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: Where 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 locations of adjacent data points. In the second step of the energy storage device capacity calculation method, data preprocessing is a key step in ensuring data quality and accuracy. First, the collected data is cleaned to remove outliers and ensure data accuracy and reliability. 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 mean and normalizes it to standard deviation units to identify outliers that exceed a certain threshold. For example, if a data point's Z-score exceeds 3, it is considered an outlier and should be removed. The IQR method calculates the interquartile range of the data to identify outliers that fall outside of upper and lower bounds. Specifically, the interquartile range is the difference between the upper and lower quartiles of the data. By calculating the lower and upper bounds, data points below the lower and upper bounds are considered outliers. Next, a Kalman filter is used to smooth the data. The Kalman filter is a recursive filtering algorithm that uses a dynamic model to predict and update data, thereby filtering out noise. Kalman filtering involves two steps: prediction and update. In the prediction step, the state transition matrix and control matrix are used to predict the data and obtain the predicted value for the next moment. In the update step, the observed value is compared with the predicted value to calculate the Kalman gain, and the predicted value is ultimately updated to more closely approximate the actual observed value. Through multiple iterations, the Kalman filter effectively smooths the data, removes high-frequency noise, and preserves the main trends in the data. Furthermore, linear interpolation for missing data is an important step in data preprocessing. Linear interpolation uses adjacent known data points to fill in missing data points and ensure data integrity. Specifically, linear interpolation estimates the value of a missing data point based on the values ​​of adjacent data points according to a linear relationship. For example, if a data point falls between two known data points in time, the value of that data point can be calculated using the values ​​of these two known data points according to a linear relationship. Data interpolation ensures data continuity and integrity and is crucial for subsequent data analysis and model building. In general, data preprocessing ensures data quality and accuracy through methods such as data cleaning, filtering, smoothing, and interpolation, providing a reliable data foundation for subsequent model building and capacity calculations. By removing abnormal data, filtering out noise, and filling in missing data, data quality can be significantly improved, ensuring the reliability of model input data and, consequently, improving the accuracy and reliability of capacity calculations.

[0032] Then, the specific 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, through the experimental determination of the battery internal resistance and voltage attenuation coefficient: 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, Where 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, selecting an appropriate mathematical model to describe the battery characteristics of the energy storage device is crucial. Commonly used models include equivalent circuit models, such as the Rint model. Equivalent circuit models equate the electrochemical behavior of a battery to electrical components, facilitating calculation and analysis. The Rint model describes the relationship between voltage, current, and internal resistance to reflect the instantaneous voltage and capacity changes of a battery. This model simplifies complex electrochemical processes, transforming them into electrical problems that are easy to analyze and calculate. Next, key parameters required for the model, such as the battery's internal resistance and voltage decay coefficient, are experimentally determined. To obtain these parameters, a series of experiments are conducted, recording voltage, current, and capacity data under different operating conditions. Then, by fitting these experimental data using the least squares method, estimated model parameters are obtained. The least squares method is a statistical method that optimizes the parameters by minimizing the squared error between the observed values ​​and the model's predicted values. This step ensures the accuracy and reliability of the model parameters, thereby improving the model's precision. These parameters are then used to build a mathematical model to describe the capacity changes of the energy storage device under different operating conditions. Specifically, the charging and discharging processes of the energy storage device can be simulated by establishing a mathematical relationship between voltage, current, and capacity. For example, the capacity changes of the energy storage device under different charging and discharging conditions can be calculated based on the relationship between voltage, current, and internal resistance. To verify the accuracy of the model, experimental data must be used to validate the model. By calculating the mean squared error (MSE), the deviation between the model's predicted values ​​and the actual values ​​can be assessed, thereby determining the model's accuracy. The smaller the MSE, the more accurate the model's predictions. By validating the model against multiple experimental data sets, the model's applicability and accuracy can be comprehensively assessed. Finally, the model parameters are adjusted to better align with the actual conditions, thereby improving the model's accuracy and reliability. This process may require multiple iterations, with model parameters continuously optimized until satisfactory results are achieved. In practical applications, appropriate mathematical models can be selected based on the type and operating conditions of the energy storage device, and corresponding parameter adjustments and optimizations can be performed. In summary, establishing a mathematical model is the core step in the energy storage device capacity calculation method. By selecting an appropriate 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 the energy storage device under different operating 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 the model parameters, where the genetic algorithm is the fitness function, the expression of the fitness function is: f(θ) = -MSE(θ); where 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 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 measurement 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 results 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 both r1 and r2 are 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 result and the actual measurement value, 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 result and the actual measurement value is greater, and vice versa, indicating that the deviation between the model calculation result and the actual measurement value is smaller.

[0038] The error assessment coefficient generated during the 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 crucial for improving model accuracy. First, a genetic algorithm is used to optimize the model parameters. A genetic algorithm is an optimization algorithm that simulates the natural evolutionary process, gradually finding the optimal solution through selection, crossover, and mutation. The basic idea of ​​a genetic algorithm is to evaluate the performance of each individual based on a fitness function, select individuals with high fitness for the next generation, generate new individuals through crossover, and mutate some individuals to increase the diversity of the population. After multiple iterations, the optimal model parameters are ultimately found. Specifically, the population is initialized and a set of initial parameters is randomly generated. Then, the fitness of each individual is evaluated based on the fitness function, and individuals with high fitness are selected for the next generation. Next, a crossover operation is performed to combine the parameters of two individuals 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 values ​​gradually converge, ultimately finding the optimal model parameters. The model parameters are then dynamically corrected using real-time data. Since the operating environment and state of the energy storage device are constantly changing, the model parameters also need to be adjusted accordingly. The sliding window method allows real-time correction of model parameters based on recent data. This method updates model parameters by taking a weighted average of data from a specific timeframe, adapting them to current operating conditions. Specifically, the data from the most recent period is used as a window, and the weighted average of the data within the window is calculated to update the model parameters. This ensures that the model parameters promptly reflect the actual operating conditions of the energy storage device, improving the model's adaptability and accuracy. Finally, the error between the model's calculated results and the actual measured values ​​is evaluated. The accuracy and reliability of the model can be assessed by calculating the mean absolute error (MAE) and root mean square error (RMSE). The MAE is the average of the absolute errors between the actual and predicted values, while the RMSE is the square root of the average of the squared errors. The smaller the error, the more accurate the model's predictions. By continuously optimizing and correcting model parameters, the accuracy and reliability of capacity calculations can be significantly improved. In practical applications, the parameter optimization and correction steps can be tailored to specific needs and operating conditions by selecting appropriate optimization algorithms and correction methods to ensure high model accuracy and reliability. 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 the sliding window method 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 calculations.

[0040] Finally, 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, output the result, output the calculation result to the monitoring system, and display the current capacity status of the 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 energy storage device capacity 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; send alarm information to the user through the monitoring system: send alarm notification Alert=True; when C current <C thresholdWhen the value reaches 0, an alarm notification is triggered, Alert is set to True, and the system sends an alert message. In the fifth step of the energy storage device capacity calculation method, capacity calculation and output are key steps in ultimately achieving energy storage device capacity monitoring. First, a program is developed to implement the capacity calculation, ensuring efficiency and accuracy. The program uses real-time voltage and current data collected based on an optimized mathematical model to perform capacity calculations. The basic concept of capacity calculation is to integrate the change in charge of the energy storage device over a certain time range to obtain the current capacity value. Specifically, the program continuously collects voltage and current data from the energy storage device and, based on the mathematical model, calculates the capacity change at each moment to ultimately obtain the current capacity value. To improve calculation efficiency, efficient algorithms and data structures can be used to ensure rapid calculation and updating of capacity values ​​in real-time applications. The calculation results are then output to the monitoring system, displaying the current capacity status of the energy storage device. The monitoring system can intuitively display energy storage device capacity information through a graphical interface or dashboard, allowing users to monitor the operating status of the energy storage device in real time. For example, the monitoring system can display information such as the energy storage device's current capacity, charge and discharge status, and historical capacity change curves, providing users with comprehensive capacity monitoring and management capabilities. Calculation results are stored in a database for subsequent analysis and maintenance. The data storage system should have automatic backup and recovery capabilities to ensure data security and reliability. Furthermore, to ensure the safe operation of the energy storage device, a capacity threshold must be set. When the energy storage device's capacity falls below the set threshold, an alarm mechanism is triggered, reminding the user to perform maintenance or replacement. This alarm mechanism requires the monitoring system to send an alert message to the user, such as a text message or email. When the system detects that the current capacity falls below the set threshold, an alarm notification is triggered, automatically sending an alert message to remind the user to take appropriate measures. This ensures that the energy storage device does not pose safety issues when in a low-capacity state, while also improving system reliability and user satisfaction. Through the above steps, accurate calculation and real-time monitoring of the energy storage device's capacity are achieved, ensuring the safe and efficient operation of the energy storage system. In summary, capacity calculation and output are the final steps in 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 calculations through systematic data acquisition and preprocessing. First, by selecting high-precision sensors and a reasonable acquisition frequency, 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 working conditions and provide comprehensive time series data. Secondly, the Z-score and IQR methods are used for data cleaning to eliminate abnormal data. Kalman filtering technology is used to smooth the data and eliminate high-frequency noise. Missing data is supplemented by linear interpolation, which effectively filters out noise and outliers in the data, ensures high quality and high accuracy of the data, and provides a reliable data foundation for subsequent model establishment and parameter optimization.

[0042] This invention ensures high-precision and real-time performance in calculating the capacity of an energy storage device by optimizing mathematical models and real-time correction methods. First, an appropriate equivalent circuit model is selected and experimental data is fitted using the least squares method to establish a precise mathematical model. The accuracy of the model is verified using mean absolute error and root mean square error. Secondly, a genetic algorithm is used to optimize model parameters, and a sliding window method is used for real-time correction to ensure that model parameters can be dynamically adjusted to adapt to the actual operating conditions of the energy storage device. Furthermore, a program is written to perform capacity calculations, output the results to a monitoring system, and a capacity threshold is set to trigger an alarm mechanism to ensure safe operation of the system in low-capacity states. This systematic capacity calculation method not only improves the accuracy of energy storage device capacity calculations but also enables real-time monitoring and alarming, enhancing 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 device. 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, computer, server and data center to another website, computer, server and data center via a wired (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center 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 drive.

[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 will 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 separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[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, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and other media that can store program codes.

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

Claims

1. A method for calculating the capacity of an energy storage device, characterized in that: The calculation method comprises the following steps: S1: The initial parameters of the energy storage device are collected by sensors at a fixed collection frequency, and the collected data are stored 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 were filled using linear interpolation. S3: Select an equivalent circuit model, determine the model parameters using the least squares method, and verify the model accuracy using mean square error and root mean square error; The specific steps to establish the mathematical model are as follows: S301. Select a model. Select the equivalent circuit model Rint 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; S302, determine the parameters, measure the battery internal resistance and voltage attenuation coefficient through experiments, and use the least squares method to fit. 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. The method for calculating the capacity of an energy storage device according to claim 1, wherein: 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; and store the data in a database to ensure data integrity and accessibility.

3. The method for calculating the capacity of an energy storage device according to claim 1, wherein: 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: Use Kalman filtering 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. 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. Perform linear interpolation on the missing data to ensure data integrity. The specific expression of linear interpolation is: Where 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.

4. The method for calculating the capacity of an energy storage device according to claim 1, wherein: The specific steps of parameter optimization and correction are as follows: S401, optimization algorithm, using a 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, evaluate 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.

5. The method for calculating the capacity of an energy storage device according to claim 4, characterized in that: 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 and generate the error evaluation coefficient β MAE , through the error evaluation coefficient β MAE The error between the evaluation model calculation results and the actual measurement value, the error evaluation coefficient β MAE The generated calculation expression is: Where r1 and r2 are the preset proportional coefficients of mean absolute error (MAE) and root mean square error (RMSE), respectively, and both r1 and r2 are greater than 0.

6. A method for calculating the capacity of an energy storage device according to claim 5, characterized in that: The error assessment coefficient generated during the 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. The method for calculating the capacity of an energy storage device according to claim 1, 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 current capacity status of the energy storage device; displaying the current capacity on the monitoring system interface, and storing the calculation results in a database for subsequent analysis; S503, alarm mechanism, set capacity threshold, when the energy storage device capacity 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; send alarm information to the user through the monitoring system: send alarm notification 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

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

    CN118566770A